PageSourceSearch

https://jbenbudd-ptm-llama.hf.space/assets/PlotlyPlot-B7svdT9W.js

js jbenbudd-ptm-llama.hf.space collected 2026-10-03 17:00:37 UTC 3,750,914 bytes, 3,529 lines download raw bytes

1import{h as Bi,g as Yp}from"./index-DblUErZU.js";import{c as $c}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./svelte/svelte.js";var dh={exports:{}};(function(Vs,Xo){(function(y){Vs.exports=y()})(function(){return function y(ee,te,g){function m(e,n){if(!te[e]){if(!ee[e]){var t=typeof $c=="function"&&$c;if(!n&&t)return t(e,!0);if(b)return b(e,!0);var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}var r=te[e]={exports:{}};ee[e][0].call(r.exports,function(d){return m(ee[e][1][d]||d)},r,r.exports,y,ee,te,g)}return te[e].exports}for(var b=typeof $c=="function"&&$c,v=0;v<g.length;v++)m(g[v]);return m}({1:[function(y,ee,te){var g=y("../src/lib"),m={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .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:#fff;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:#fff;","X .select-outline-2":"stroke:#000;stroke-dasharray:2px 2px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;
1","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var b in m){var v=b.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");g.addStyleRule(v,m[b])}},{"../src/lib":503}],2:[function(y,ee,te){ee.exports=y("../src/transforms/aggregate")},{"../src/transforms/aggregate":1114}],3:[function(y,ee,te){ee.exports=y("../src/traces/bar")},{"../src/traces/bar":656}],4:[function(y,ee,te){ee.exports=y("../src/traces/barpolar")},{"../src/traces/barpolar":669}],5:[function(y,ee,te){ee.exports=y("../src/traces/box")},{"../src/traces/box":679}],6:[function(y,ee,te){ee.exports=y("../src/components/calendars")},{"../src/components/calendars":364}],7:[function(y,ee,te){ee.exports=y("../src/traces/candlestick")},{"../src/traces/candlestick":688}],8:[function(y,ee,te){ee.exports=y("../src/traces/carpet")},{"../src/traces/carpet":707}],9:[function(y,ee,te){ee.exports=y("../src/traces/choropleth")},{"../src/traces/choropleth":721}],10:[function(y,ee,te){ee.exports=y("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":728}],11:[function(y,ee,te){ee.exports=y("../src/traces/cone")},{"../src/traces/cone":734}],12:[function(y,ee,te){ee.exports=y("../src/traces/contour")},{"../src/traces/contour":749}],13:[function(y,ee,te){ee.exports=y("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":760}],14:[function(y,ee,te){ee.exports=y("../src/core")},{"../src/core":481}],15:[function(y,ee,te){ee.exports=y("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":768}],16:[function(y,ee,te){ee.exports=y("../src/transforms/filter")},{"../src/transforms/filter":1115}],17:[function(y,ee,te){ee.exports=y("../src/traces/funnel")},{"../src/traces/funnel":778}],18:[function(y,ee,te){ee.exports=y("../src/traces/funnelarea")},{"../src/traces/funnelarea":787}],19:[function(y,ee,te){ee.exports=y("../src/transforms/groupby")},{"../src/transforms/groupby":1116}],20:[function(y,ee,te){ee.exports=y("../src/traces/heatmap")},{"../src/traces/heatmap":800}],21:[function(y,ee,te){ee.exports=y("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":811}],22:[function(y,ee,te){ee.exports=y("../src/traces/histogram")},{"../src/traces/histogram":823}],23:[function(y,ee,te){ee.exports=y("../src/traces/histogram2d")},{"../src/traces/histogram2d":829}],24:[function(y,ee,te){ee.exports=y("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":833}],25:[function(y,ee,te){ee.exports=y("../src/traces/icicle")},{"../src/traces/icicle":839}],26:[function(y,ee,te){ee.exports=y("../src/traces/image")},{"../src/traces/image":852}],27:[function(y,ee,te){var g=y("./core");g.register([y("./bar"),y("./box"),y("./heatmap"),y("./histogram"),y("./histogram2d"),y("./histogram2dcontour"),y("./contour"),y("./scatterternary"),y("./violin"),y("./funnel"),y("./waterfall"),y("./image"),y("./pie"),y("./sunburst"),y("./treemap"),y("./icicle"),y("./funnelarea"),y("./scatter3d"),y("./surface"),y("./isosurface"),y("./volume"),y("./mesh3d"),y("./cone"),y("./streamtube"),y("./scattergeo"),y("./choropleth"),y("./scattergl"),y("./splom"),y("./pointcloud"),y("./heatmapgl"),y("./parcoords"),y("./parcats"),y("./scattermapbox"),y("./choroplethmapbox"),y("./densitymapbox"),y("./sankey"),y("./indicator"),y("./table"),y("./carpet"),y("./scattercarpet"),y("./contourcarpet"),y("./ohlc"),y("./candlestick"),y("./scatterpolar"),y("./scatterpolargl"),y("./barpolar"),y("./scattersmith"),y("./aggregate"),y("./filter"),y("./groupby"),y("./sort"),y("./calendars")]),ee.exports=g},{"./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,"./icicle":25,"./image":26,"./indicator":28,"./isosurface":29,"./mesh3d":30,"./ohlc":31,"./parcats":32,"./parcoords":33,"./pie":34,"./pointcloud":35,"./sankey":36,"./scatter3d":37,"./scattercarpet":38,"./scattergeo":39,"./scattergl":40,"./scattermapbox":41,"./scatterpolar":42,"./scatterpolargl":43,"./scattersmith":44,"./scatterternary":45,"./sort":46,"./splom":47,"./streamtube":48,"./sunburst":49,"./surface":50,"./table":51,"./treemap":52,"./violin":53,"./volume":54,"./waterfall":55}],28:[function(y,ee,te){ee.exports=y("../src/traces/indicator")},{"../src/traces/indicator":860}],29:[function(y,ee,te){ee.exports=y("../src/traces/isosurface")},{"../src/traces/isosurface":866}],30:[function(y,ee,te){ee.exports=y("../src/traces/mesh3d")},{"../src/traces/mesh3d":871}],31:[function(y,ee,te){ee.exports=y("../src/traces/ohlc")},{"../src/traces/ohlc":876}],32:[function(y,ee,te){ee.exports=y("../src/traces/parcats")},{"../src/traces/parcats":885}],33:[function(y,ee,te){ee.exports=y("../src/traces/parcoords")},{"../src/traces/parcoords":895}],34:[function(y,ee,te){ee.exports=y("../src/traces/pie")},{"../src/traces/pie":906}],35:[function(y,ee,te){ee.exports=y("../src/traces/pointcloud")},{"../src/traces/pointcloud":915}],36:[function(y,ee,te){ee.exports=y("../src/traces/sankey")},{"../src/traces/sankey":921}],37:[function(y,ee,te){ee.exports=y("../src/traces/scatter3d")},{"../src/traces/scatter3d":959}],38:[function(y,ee,te){ee.exports=y("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":966}],39:[function(y,ee,te){ee.exports=y("../src/traces/scattergeo")},{"../src/traces/scattergeo":974}],40:[function(y,ee,te){ee.exports=y("../src/traces/scattergl")},{"../src/traces/scattergl":987}],41:[function(y,ee,te){ee.exports=y("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":997}],42:[function(y,ee,te){ee.exports=y("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1005}],43:[function(y,ee,te){ee.exports=y("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1012}],44:[function(y,ee,te){ee.exports=y("../src/traces/scattersmith")},{"../src/traces/scattersmith":1019}],45:[function(y,ee,te){ee.exports=y("../src/traces/scatterternary")},{"../src/traces/scatterternary":1027}],46:[function(y,ee,te){ee.exports=y("../src/transforms/sort")},{"../src/transforms/sort":1118}],47:[function(y,ee,te){ee.exports=y("../src/traces/splom")},{"../src/traces/splom":1036}],48:[function(y,ee,te){ee.exports=y("../src/traces/streamtube")},{"../src/traces/streamtube":1044}],49:[function(y,ee,te){ee.exports=y("../src/traces/sunburst")},{"../src/traces/sunburst":1052}],50:[function(y,ee,te){ee.exports=y("../src/traces/surface")},{"../src/traces/surface":1061}],51:[function(y,ee,te){ee.exports=y("../src/traces/table")},{"../src/traces/table":1069}],52:[function(y,ee,te){ee.exports=y("../src/traces/treemap")},{"../src/traces/treemap":1080}],53:[function(y,ee,te){ee.exports=y("../src/traces/violin")},{"../src/traces/violin":1093}],54:[function(y,ee,te){ee.exports=y("../src/traces/volume")},{"../src/traces/volume":1101}],55:[function(y,ee,te){ee.exports=y("../src/traces/waterfall")},{"../src/traces/waterfall":1109}],56:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?m(te,y("d3-array"),y("d3-collection"),y("d3-shape"),y("elementary-circuits-directed-graph")):m(g.d3=g.d3||{},g.d3,g.d3,g.d3,null)})(this,function(g,m,b,v,e){function n(re){return re.target.depth}function t(re,ne){return re.sourceLinks.length?re.depth:ne-1}function o(re){return function(){return re}}e=e&&e.hasOwnProperty("default")?e.default:e;var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(re){return typeof re}:function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re};function d(re,ne){return i(re.source,ne.source)||re.index-ne.index}function c(re,ne){return i(re.target,ne.target)||re.index-ne.index}function i(re,ne){return re.partOfCycle===ne.partOfCycle?re.y0-ne.y0:re.circularLinkType==="top"||ne.circularLinkType==="bottom"?-1:1}function u(re){return re.value}function f(re){return(re.y0+re.y1)/2}function s(re){return f(re.source)}function h(re){return f(re.target)}function p(re){return re.index}function a(re){return re.nodes}function x(re){return re.links}function l(re,ne){var se=re.get(ne);if(!se)throw new Error("missing: "+ne);return se}function w(re,ne){return ne(re)}function _(re,ne,se){var oe=0;if(se===null){for(var pe=[],ce=0;ce<re.links.length;ce++){var de=re.links[ce],xe=de.source.index,we=de.target.index;pe[xe]||(pe[xe]=[]),pe[we]||(pe[we]=[]),pe[xe].indexOf(we)===-1&&pe[xe].push(we)}var be=e(pe);be.sort(function(me,Te){return me.length-Te.length});var Ee={};for(ce=0;ce<be.length;ce++){var fe=be[ce].slice(-2);Ee[fe[0]]||(Ee[fe[0]]={}),Ee[fe[0]][fe[1]]=!0}re.links.forEach(function(me){var Te=me.target.index,_e=me.source.index;Te===_e||Ee[_e]&&Ee[_e][Te]?(me.circular=!0,me.circularLinkID=oe,oe+=1):me.circular=!1})}else re.links.forEach(function(me){me.source[se]<me.target[se]?me.circular=!1:(me.circular=!0,me.circularLinkID=oe,oe+=1)})}function T(re,ne){var se=0,oe=0;re.links.forEach(function(pe){pe.circular&&(pe.source.circularLinkType||pe.target.circularLinkType?pe.circularLinkType=pe.source.circularLinkType?pe.source.circularLinkType:pe.target.circularLinkType:pe.circularLinkType=se<oe?"top":"bottom",pe.circularLinkType=="top"?se+=1:oe+=1,re.nodes.forEac
1h(function(ce){w(ce,ne)!=w(pe.source,ne)&&w(ce,ne)!=w(pe.target,ne)||(ce.circularLinkType=pe.circularLinkType)}))}),re.links.forEach(function(pe){pe.circular&&(pe.source.circularLinkType==pe.target.circularLinkType&&(pe.circularLinkType=pe.source.circularLinkType),X(pe,ne)&&(pe.circularLinkType=pe.source.circularLinkType))})}function k(re){var ne=Math.abs(re.y1-re.y0),se=Math.abs(re.target.x0-re.source.x1);return Math.atan(se/ne)}function L(re,ne){var se=0;re.sourceLinks.forEach(function(pe){se=pe.circular&&!X(pe,ne)?se+1:se});var oe=0;return re.targetLinks.forEach(function(pe){oe=pe.circular&&!X(pe,ne)?oe+1:oe}),se+oe}function A(re){var ne=re.source.sourceLinks,se=0;ne.forEach(function(ce){se=ce.circular?se+1:se});var oe=re.target.targetLinks,pe=0;return oe.forEach(function(ce){pe=ce.circular?pe+1:pe}),!(se>1||pe>1)}function I(re,ne,se){return re.sort(S),re.forEach(function(oe,pe){var ce,de,xe=0;if(X(oe,se)&&A(oe))oe.circularPathData.verticalBuffer=xe+oe.width/2;else{for(var we=0;we<pe;we++)if(ce=re[pe],de=re[we],!(ce.source.column<de.target.column||ce.target.column>de.source.column)){var be=re[we].circularPathData.verticalBuffer+re[we].width/2+ne;xe=be>xe?be:xe}oe.circularPathData.verticalBuffer=xe+oe.width/2}}),re}function P(re,ne,se,oe){var pe=m.min(re.links,function(ce){return ce.source.y0});re.links.forEach(function(ce){ce.circular&&(ce.circularPathData={})}),I(re.links.filter(function(ce){return ce.circularLinkType=="top"}),ne,oe),I(re.links.filter(function(ce){return ce.circularLinkType=="bottom"}),ne,oe),re.links.forEach(function(ce){if(ce.circular){if(ce.circularPathData.arcRadius=ce.width+10,ce.circularPathData.leftNodeBuffer=5,ce.circularPathData.rightNodeBuffer=5,ce.circularPathData.sourceWidth=ce.source.x1-ce.source.x0,ce.circularPathData.sourceX=ce.source.x0+ce.circularPathData.sourceWidth,ce.circularPathData.targetX=ce.target.x0,ce.circularPathData.sourceY=ce.y0,ce.circularPathData.targetY=ce.y1,X(ce,oe)&&A(ce))ce.circularPathData.leftSmallArcRadius=10+ce.width/2,ce.circularPathData.leftLargeArcRadius=10+ce.width/2,ce.circularPathData.rightSmallArcRadius=10+ce.width/2,ce.circularPathData.rightLargeArcRadius=10+ce.width/2,ce.circularLinkType=="bottom"?(ce.circularPathData.verticalFullExtent=ce.source.y1+25+ce.circularPathData.verticalBuffer,ce.circularPathData.verticalLeftInnerExtent=ce.circularPathData.verticalFullExtent-ce.circularPathData.leftLargeArcRadius,ce.circularPathData.verticalRightInnerExtent=ce.circularPathData.verticalFullExtent-ce.circularPathData.rightLargeArcRadius):(ce.circularPathData.verticalFullExtent=ce.source.y0-25-ce.circularPathData.verticalBuffer,ce.circularPathData.verticalLeftInnerExtent=ce.circularPathData.verticalFullExtent+ce.circularPathData.leftLargeArcRadius,ce.circularPathData.verticalRightInnerExtent=ce.circularPathData.verticalFullExtent+ce.circularPathData.rightLargeArcRadius);else{var de=ce.source.column,xe=ce.circularLinkType,we=re.links.filter(function(fe){return fe.source.column==de&&fe.circularLinkType==xe});ce.circularLinkType=="bottom"?we.sort(D):we.sort(E);var be=0;we.forEach(function(fe,me){fe.circularLinkID==ce.circularLinkID&&(ce.circularPathData.leftSmallArcRadius=10+ce.width/2+be,ce.circularPathData.leftLargeArcRadius=10+ce.width/2+me*ne+be),be+=fe.width}),de=ce.target.column,we=re.links.filter(function(fe){return fe.target.column==de&&fe.circularLinkType==xe}),ce.circularLinkType=="bottom"?we.sort(H):we.sort(F),be=0,we.forEach(function(fe,me){fe.circularLinkID==ce.circularLinkID&&(ce.circularPathData.rightSmallArcRadius=10+ce.width/2+be,ce.circularPathData.rightLargeArcRadius=10+ce.width/2+me*ne+be),be+=fe.width}
1),ce.circularLinkType=="bottom"?(ce.circularPathData.verticalFullExtent=Math.max(se,ce.source.y1,ce.target.y1)+25+ce.circularPathData.verticalBuffer,ce.circularPathData.verticalLeftInnerExtent=ce.circularPathData.verticalFullExtent-ce.circularPathData.leftLargeArcRadius,ce.circularPathData.verticalRightInnerExtent=ce.circularPathData.verticalFullExtent-ce.circularPathData.rightLargeArcRadius):(ce.circularPathData.verticalFullExtent=pe-25-ce.circularPathData.verticalBuffer,ce.circularPathData.verticalLeftInnerExtent=ce.circularPathData.verticalFullExtent+ce.circularPathData.leftLargeArcRadius,ce.circularPathData.verticalRightInnerExtent=ce.circularPathData.verticalFullExtent+ce.circularPathData.rightLargeArcRadius)}ce.circularPathData.leftInnerExtent=ce.circularPathData.sourceX+ce.circularPathData.leftNodeBuffer,ce.circularPathData.rightInnerExtent=ce.circularPathData.targetX-ce.circularPathData.rightNodeBuffer,ce.circularPathData.leftFullExtent=ce.circularPathData.sourceX+ce.circularPathData.leftLargeArcRadius+ce.circularPathData.leftNodeBuffer,ce.circularPathData.rightFullExtent=ce.circularPathData.targetX-ce.circularPathData.rightLargeArcRadius-ce.circularPathData.rightNodeBuffer}if(ce.circular)ce.path=function(fe){var me="";return me=fe.circularLinkType=="top"?"M"+fe.circularPathData.sourceX+" "+fe.circularPathData.sourceY+" L"+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.sourceY+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftSmallArcRadius+" 0 0 0 "+fe.circularPathData.leftFullExtent+" "+(fe.circularPathData.sourceY-fe.circularPathData.leftSmallArcRadius)+" L"+fe.circularPathData.leftFullExtent+" "+fe.circularPathData.verticalLeftInnerExtent+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftLargeArcRadius+" 0 0 0 "+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.verticalFullExtent+" L"+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.verticalFullExtent+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightLargeArcRadius+" 0 0 0 "+fe.circularPathData.rightFullExtent+" "+fe.circularPathData.verticalRightInnerExtent+" L"+fe.circularPathData.rightFullExtent+" "+(fe.circularPathData.targetY-fe.circularPathData.rightSmallArcRadius)+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightSmallArcRadius+" 0 0 0 "+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.targetY+" L"+fe.circularPathData.targetX+" "+fe.circularPathData.targetY:"M"+fe.circularPathData.sourceX+" "+fe.circularPathData.sourceY+" L"+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.sourceY+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftSmallArcRadius+" 0 0 1 "+fe.circularPathData.leftFullExtent+" "+(fe.circularPathData.sourceY+fe.circularPathData.leftSmallArcRadius)+" L"+fe.circularPathData.leftFullExtent+" "+fe.circularPathData.verticalLeftInnerExtent+" A"+fe.circularPathData.leftLargeArcRadius+" "+fe.circularPathData.leftLargeArcRadius+" 0 0 1 "+fe.circularPathData.leftInnerExtent+" "+fe.circularPathData.verticalFullExtent+" L"+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.verticalFullExtent+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightLargeArcRadius+" 0 0 1 "+fe.circularPathData.rightFullExtent+" "+fe.circularPathData.verticalRightInnerExtent+" L"+fe.circularPathData.rightFullExtent+" "+(fe.circularPathData.targetY+fe.circularPathData.rightSmallArcRadius)+" A"+fe.circularPathData.rightLargeArcRadius+" "+fe.circularPathData.rightSmallArcRadius+" 0 0 1 "+fe.circularPathData.rightInnerExtent+" "+fe.circularPathData.targetY+" L"+fe.circularPathData.targetX+" "+fe.circularPathData.targetY,me}(ce);else{var Ee=v.linkHorizontal().source(function(fe){return[fe.source.x0+(fe.source.x1-fe.source.x0),fe.y0]}).target(function(fe){return[fe.target.x0,fe.y1]});ce.path=Ee(ce)}})}function S(re,ne){return V(re)==V(ne)?re.circularLinkType=="bottom"?D(re,ne):E(re,ne):V(ne)-V(re)}function E(re,ne){return re.y0-ne.y0}function D(re,ne){return ne.y0-re.y0}
1function F(re,ne){return re.y1-ne.y1}function H(re,ne){return ne.y1-re.y1}function V(re){return re.target.column-re.source.column}function Z(re){return re.target.x0-re.source.x1}function K(re,ne){var se=k(re),oe=Z(ne)/Math.tan(se);return j(re)=="up"?re.y1+oe:re.y1-oe}function q(re,ne){var se=k(re),oe=Z(ne)/Math.tan(se);return j(re)=="up"?re.y1-oe:re.y1+oe}function W(re,ne,se,oe){re.links.forEach(function(pe){if(!pe.circular&&pe.target.column-pe.source.column>1){var ce=pe.source.column+1,de=pe.target.column-1,xe=1,we=de-ce+1;for(xe=1;ce<=de;ce++,xe++)re.nodes.forEach(function(be){if(be.column==ce){var Ee,fe=xe/(we+1),me=Math.pow(1-fe,3),Te=3*fe*Math.pow(1-fe,2),_e=3*Math.pow(fe,2)*(1-fe),Ae=Math.pow(fe,3),Pe=me*pe.y0+Te*pe.y0+_e*pe.y1+Ae*pe.y1,De=Pe-pe.width/2,Ve=Pe+pe.width/2;De>be.y0&&De<be.y1?(Ee=be.y1-De+10,Ee=be.circularLinkType=="bottom"?Ee:-Ee,be=R(be,Ee,ne,se),re.nodes.forEach(function(Qe){w(Qe,oe)!=w(be,oe)&&Qe.column==be.column&&$(be,Qe)&&R(Qe,Ee,ne,se)})):(Ve>be.y0&&Ve<be.y1||De<be.y0&&Ve>be.y1)&&(Ee=Ve-be.y0+10,be=R(be,Ee,ne,se),re.nodes.forEach(function(Qe){w(Qe,oe)!=w(be,oe)&&Qe.column==be.column&&Qe.y0<be.y1&&Qe.y1>be.y1&&R(Qe,Ee,ne,se)}))}})}})}function $(re,ne){return re.y0>ne.y0&&re.y0<ne.y1||re.y1>ne.y0&&re.y1<ne.y1||re.y0<ne.y0&&re.y1>ne.y1}function R(re,ne,se,oe){return re.y0+ne>=se&&re.y1+ne<=oe&&(re.y0=re.y0+ne,re.y1=re.y1+ne,re.targetLinks.forEach(function(pe){pe.y1=pe.y1+ne}),re.sourceLinks.forEach(function(pe){pe.y0=pe.y0+ne})),re}function N(re,ne,se,oe){re.nodes.forEach(function(pe){oe&&pe.y+(pe.y1-pe.y0)>ne&&(pe.y=pe.y-(pe.y+(pe.y1-pe.y0)-ne));var ce=re.links.filter(function(we){return w(we.source,se)==w(pe,se)}),de=ce.length;de>1&&ce.sort(function(we,be){if(!we.circular&&!be.circular){if(we.target.column==be.target.column||!Q(we,be))return we.y1-be.y1;if(we.target.column>be.target.column){var Ee=q(be,we);return we.y1-Ee}if(be.target.column>we.target.column)return q(we,be)-be.y1}return we.circular&&!be.circular?we.circularLinkType=="top"?-1:1:be.circular&&!we.circular?be.circularLinkType=="top"?1:-1:we.circular&&be.circular?we.circularLinkType===be.circularLinkType&&we.circularLinkType=="top"?we.target.column===be.target.column?we.target.y1-be.target.y1:be.target.column-we.target.column:we.circularLinkType===be.circularLinkType&&we.circularLinkType=="bottom"?we.target.column===be.target.column?be.target.y1-we.target.y1:we.target.column-be.target.column:we.circularLinkType=="top"?-1:1:void 0});var xe=pe.y0;ce.forEach(function(we){we.y0=xe+we.width/2,xe+=we.width}),ce.forEach(function(we,be){if(we.circularLinkType=="bottom"){for(var Ee=be+1,fe=0;Ee<de;Ee++)fe+=ce[Ee].width;we.y0=pe.y1-fe-we.width/2}})})}function U(re,ne,se){re.nodes.forEach(function(oe){var pe=re.links.filter(function(xe){return w(xe.target,se)==w(oe,se)}),ce=pe.length;ce>1&&pe.sort(function(xe,we){if(!xe.circular&&!we.circular){if(xe.source.column==we.source.column||!Q(xe,we))return xe.y0-we.y0;if(we.source.column<xe.source.column){var be=K(we,xe);return xe.y0-be}if(xe.source.column<we.source.column)return K(xe,we)-we.y0}return xe.circular&&!we.circular?xe.circularLinkType=="top"?-1:1:we.circular&&!xe.circular?we.circularLinkType=="top"?1:-1:xe.circular&&we.circular?xe.circularLinkType===we.circularLinkType&&xe.circularLinkType=="top"?xe.source.column===we.source.column?xe.s
1ource.y1-we.source.y1:xe.source.column-we.source.column:xe.circularLinkType===we.circularLinkType&&xe.circularLinkType=="bottom"?xe.source.column===we.source.column?xe.source.y1-we.source.y1:we.source.column-xe.source.column:xe.circularLinkType=="top"?-1:1:void 0});var de=oe.y0;pe.forEach(function(xe){xe.y1=de+xe.width/2,de+=xe.width}),pe.forEach(function(xe,we){if(xe.circularLinkType=="bottom"){for(var be=we+1,Ee=0;be<ce;be++)Ee+=pe[be].width;xe.y1=oe.y1-Ee-xe.width/2}})})}function Q(re,ne){return j(re)==j(ne)}function j(re){return re.y0-re.y1>0?"up":"down"}function X(re,ne){return w(re.source,ne)==w(re.target,ne)}function J(re,ne,se){var oe=re.nodes,pe=re.links,ce=!1,de=!1;if(pe.forEach(function(be){be.circularLinkType=="top"?ce=!0:be.circularLinkType=="bottom"&&(de=!0)}),ce==0||de==0){var xe=m.min(oe,function(be){return be.y0}),we=(se-ne)/(m.max(oe,function(be){return be.y1})-xe);oe.forEach(function(be){var Ee=(be.y1-be.y0)*we;be.y0=(be.y0-xe)*we,be.y1=be.y0+Ee}),pe.forEach(function(be){be.y0=(be.y0-xe)*we,be.y1=(be.y1-xe)*we,be.width=be.width*we})}}g.sankeyCircular=function(){var re,ne,se=0,oe=0,pe=1,ce=1,de=24,xe=p,we=t,be=a,Ee=x,fe=32,me=2,Te=null;function _e(){var Oe={nodes:be.apply(null,arguments),links:Ee.apply(null,arguments)};Ae(Oe),_(Oe,xe,Te),Pe(Oe),De(Oe),T(Oe,xe),Ve(Oe,fe,xe),Qe(Oe);for(var Ue=4,Ge=0;Ge<Ue;Ge++)N(Oe,ce,xe),U(Oe,ce,xe),W(Oe,oe,ce,xe),N(Oe,ce,xe),U(Oe,ce,xe);return J(Oe,oe,ce),P(Oe,me,ce,xe),Oe}function Ae(Oe){Oe.nodes.forEach(function(Ge,Ye){Ge.index=Ye,Ge.sourceLinks=[],Ge.targetLinks=[]});var Ue=b.map(Oe.nodes,xe);return Oe.links.forEach(function(Ge,Ye){Ge.index=Ye;var tt=Ge.source,lt=Ge.target;(tt===void 0?"undefined":r(tt))!=="object"&&(tt=Ge.source=l(Ue,tt)),(lt===void 0?"undefined":r(lt))!=="object"&&(lt=Ge.target=l(Ue,lt)),tt.sourceLinks.push(Ge),lt.targetLinks.push(Ge)}),Oe}function Pe(Oe){Oe.nodes.forEach(function(Ue){Ue.partOfCycle=!1,Ue.value=Math.max(m.sum(Ue.sourceLinks,u),m.sum(Ue.targetLinks,u)),Ue.sourceLinks.forEach(function(Ge){Ge.circular&&(Ue.partOfCycle=!0,Ue.circularLinkType=Ge.circularLinkType)}),Ue.targetLinks.forEach(function(Ge){Ge.circular&&(Ue.partOfCycle=!0,Ue.circularLinkType=Ge.circularLinkType)})})}function De(Oe){var Ue,Ge,Ye;for(Ue=Oe.nodes,Ge=[],Ye=0;Ue.length;++Ye,Ue=Ge,Ge=[])Ue.forEach(function(tt){tt.depth=Ye,tt.sourceLinks.forEach(function(lt){Ge.indexOf(lt.target)<0&&!lt.circular&&Ge.push(lt.target)})});for(Ue=Oe.nodes,Ge=[],Ye=0;Ue.length;++Ye,Ue=Ge,Ge=[])Ue.forEach(function(tt){tt.height=Ye,tt.targetLinks.forEach(function(lt){Ge.indexOf(lt.source)<0&&!lt.circular&&Ge.push(lt.source)})});Oe.nodes.forEach(function(tt){tt.column=Math.floor(we.call(null,tt,Ye))})}function Ve(Oe,Ue,Ge){var Ye=b.nest().key(function(St){return St.column}).sortKeys(m.ascending).entries(Oe.nodes).map(function(St){return St.values});(function(St){if(ne){var rt=1/0;Ye.forEach(function(Kt){var Be=ce*ne/(Kt.length+1);rt=Be<rt?Be:rt}),re=rt}var et=m.min(Ye,function(Kt){return(ce-oe-(Kt.length-1)*re)/m.sum(Kt,u)});et*=.3,Oe.links.forEach(function(Kt){Kt.width=Kt.value*et});var Tt=function(Kt){var Be=0,qe=0,Re=0,Xe=0,ke=m.max(Kt.nodes,function(Le){return Le.column});return Kt.links.forEach(function(Le){Le.circular&&(Le.circularLinkType=="top"?Be+=Le.width:qe+=Le.width,Le.target.column==0&&(Xe+=Le.width),Le.source.column==ke&&(Re+=Le.width))}),{top:Be=Be>0?Be+25+10:Be,bottom:qe=qe>0?qe+25+10:qe,left:Xe=Xe>0?Xe+25+10:Xe,right:Re=Re>0?Re+25+10:Re}}(Oe),Vt=function(Kt,Be){var qe=m.max(Kt.nodes,function(Ie){return Ie.column}),Re=pe-se,Xe=ce-oe,ke=Re/(Re+Be.right+Be.left),Le=Xe/(Xe+Be.top+Be.bottom);return se=se*ke+Be.left,pe=Be.right==0?pe:pe*ke,oe=oe*Le+Be.top,ce*=Le,Kt.nodes.forEach(function(Ie){Ie.x0=se+Ie.column*((pe-se-de)/qe),Ie.x1=Ie.x0+de}),Le}(Oe,Tt);et*=Vt,Oe.links.forEach(function(Kt){Kt.width=Kt.value*et}),Ye.forEach(function(Kt){var Be=Kt.length;Kt.forEach(function(qe,Re){qe.depth==Ye.length-1&&Be==1||qe.depth==0&&Be==1?(qe.y0=ce/2-qe.value*et,qe.y1=qe.y0+qe.value*et):qe.partOfCycle?L(qe,St)==0?(qe.y0=ce/2+Re,qe.y1=qe.y0+qe.value*et):qe.circularLinkType=="top"?(qe.y0=oe+Re,qe.y1=qe.y0+qe.value*et):(qe.y0=ce-qe.value*et-Re,qe.y1=qe.y0+qe.value*et):Tt.top==0||Tt.bottom==0?(qe.y0=(ce-oe)/Be*Re,qe.y1=qe.y0+qe.value*et):(qe.y0=(ce-oe)/2-Be/2+Re,qe.y1=qe.y0+qe.value*et)})})})(Ge),It();for(var tt=1,lt=Ue;lt>0;--lt)vt(tt*=.99,Ge),It();function vt(St,rt){var et=Ye.length;Ye.forEach(function(Tt){var Vt=Tt.length,Kt=Tt[0].depth;Tt.forEach(function(Be){var qe;if((Be.sourceLinks.length||Be.targetLinks.length)&&!(Be.partOfCycle&&L(Be,rt)>0))if(Kt==0&&Vt==1)qe=Be.y1-Be.y0,Be.y0=ce/2-qe/2,Be.y1=ce/2+qe/2;else if(Kt==et-1&&Vt==1)qe=Be.y1-Be.y0,Be.y0=ce/2-qe/2,Be.y1=ce/2+qe/2;else{var Re=m.mean(Be.sourceLinks,h),Xe=m.mean(Be.targetLinks,s),ke=((Re&&Xe?(Re+Xe)/2:Re||Xe)-f(Be))*St;Be.y0+=ke,Be.y1+=ke}})})}function It(){Ye.forEach(function(St){var rt,et,Tt,Vt=oe,Kt=St.length;for(St.sort(i),Tt=0;Tt<Kt;++Tt)(et=Vt-(rt=St[Tt]).y0)>0&&(rt.y0+=et,rt.y1+=et),Vt=rt.y1+re;if((et=Vt-re-ce)>0)for(Vt=rt.y0-=et,rt.y1-=et,Tt=Kt-2;Tt>=0;--Tt)(et=(rt=St[Tt]).y1+re-Vt)>0&&(rt.y0-=et,rt.y1-=et),Vt=rt.y0})}}
1function Qe(Oe){Oe.nodes.forEach(function(Ue){Ue.sourceLinks.sort(c),Ue.targetLinks.sort(d)}),Oe.nodes.forEach(function(Ue){var Ge=Ue.y0,Ye=Ge,tt=Ue.y1,lt=tt;Ue.sourceLinks.forEach(function(vt){vt.circular?(vt.y0=tt-vt.width/2,tt-=vt.width):(vt.y0=Ge+vt.width/2,Ge+=vt.width)}),Ue.targetLinks.forEach(function(vt){vt.circular?(vt.y1=lt-vt.width/2,lt-=vt.width):(vt.y1=Ye+vt.width/2,Ye+=vt.width)})})}return _e.nodeId=function(Oe){return arguments.length?(xe=typeof Oe=="function"?Oe:o(Oe),_e):xe},_e.nodeAlign=function(Oe){return arguments.length?(we=typeof Oe=="function"?Oe:o(Oe),_e):we},_e.nodeWidth=function(Oe){return arguments.length?(de=+Oe,_e):de},_e.nodePadding=function(Oe){return arguments.length?(re=+Oe,_e):re},_e.nodes=function(Oe){return arguments.length?(be=typeof Oe=="function"?Oe:o(Oe),_e):be},_e.links=function(Oe){return arguments.length?(Ee=typeof Oe=="function"?Oe:o(Oe),_e):Ee},_e.size=function(Oe){return arguments.length?(se=oe=0,pe=+Oe[0],ce=+Oe[1],_e):[pe-se,ce-oe]},_e.extent=function(Oe){return arguments.length?(se=+Oe[0][0],pe=+Oe[1][0],oe=+Oe[0][1],ce=+Oe[1][1],_e):[[se,oe],[pe,ce]]},_e.iterations=function(Oe){return arguments.length?(fe=+Oe,_e):fe},_e.circularLinkGap=function(Oe){return arguments.length?(me=+Oe,_e):me},_e.nodePaddingRatio=function(Oe){return arguments.length?(ne=+Oe,_e):ne},_e.sortNodes=function(Oe){return arguments.length?(Te=Oe,_e):Te},_e.update=function(Oe){return T(Oe,xe),Qe(Oe),Oe.links.forEach(function(Ue){Ue.circular&&(Ue.circularLinkType=Ue.y0+Ue.y1<ce?"top":"bottom",Ue.source.circularLinkType=Ue.circularLinkType,Ue.target.circularLinkType=Ue.circularLinkType)}),N(Oe,ce,xe,!1),U(Oe,ce,xe),P(Oe,me,ce,xe),Oe},_e},g.sankeyCenter=function(re){return re.targetLinks.length?re.depth:re.sourceLinks.length?m.min(re.sourceLinks,n)-1:0},g.sankeyLeft=function(re){return re.depth},g.sankeyRight=function(re,ne){return ne-1-re.height},g.sankeyJustify=t,Object.defineProperty(g,"__esModule",{value:!0})})},{"d3-array":107,"d3-collection":108,"d3-shape":119,"elementary-circuits-directed-graph":130}],57:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?m(te,y("d3-array"),y("d3-collection"),y("d3-shape")):m(g.d3=g.d3||{},g.d3,g.d3,g.d3)})(this,function(g,m,b,v){function e(w){return w.target.depth}function n(w,_){return w.sourceLinks.length?w.depth:_-1}function t(w){return function(){return w}}function o(w,_){return d(w.source,_.source)||w.index-_.index}function r(w,_){return d(w.target,_.target)||w.index-_.index}function d(w,_){return w.y0-_.y0}function c(w){return w.value}function i(w){return(w.y0+w.y1)/2}function u(w){return i(w.source)*w.value}function f(w){return i(w.target)*w.value}function s(w){return w.index}function h(w){return w.nodes}function p(w){return w.links}function a(w,_){var T=w.get(_);if(!T)throw new Error("missing: "+_);return T}function x(w){return[w.source.x1,w.y0]}function l(w){return[w.target.x0,w.y1]}g.sankey=function(){var w=0,_=0,T=1,k=1,L=24,A=8,I=s,P=n,S=h,E=p,D=32;function F(){var W={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return H(W),V(W),Z(W),K(W),q(W),W}function H(W){W.nodes.forEach(function(R,N){R.index=N,R.sourceLinks=[],R.targetLinks=[]});var $=b.map(W.nodes,I);W.links.forEach(function(R,N){R.index=N;var U=R.source,Q=R.target;typeof U!="object"&&(U=R.source=a($,U)),typeof Q!="object"&&(Q=R.target=a($,Q)),U.sourceLinks.push(R),Q.targetLinks.push(R)})}function V(W){W.nodes.forEach(function($){$.value=Math.max(m.sum($.sourceLinks,c),m.sum($.targetLinks,c))})}function Z(W){var $,R,N;for($=W.nodes,R=[],N=0;$.length;++N,$=R,R=[])$.forEach(function(Q){Q.depth=N,Q.sourceLinks.forEach(function(j){R.indexOf(j.target)<0&&R.push(j.target)})});for($=W.nodes,R=[],N=0;$.length;++N,$=R,R=[])$.forEach(function(Q){Q.height=N,Q.targetLinks.forEach(function(j){R.indexOf(j.source)<0&&R.push(j.source)})});var U=(T-w-L)/(N-1);W.nodes.forEach(function(Q){Q.x1=(Q.x0=w+Math.max(0,Math.min(N-1,Math.floor(P.call(null,Q,N))))*U)+L})}function K(W){var $=b.nest().key(function(X){return X.x0}).sortKeys(m.ascending).entries(W.nodes).map(function(X){return X.values});(function(){var X=m.max($,function(ne){return ne.length}),J=2/3*(k-_)/(X-1);A>J&&(A=J);var re=m.min($,function(ne){return(k-_-(ne.length-1)*A)/m.sum(ne,c)});$.forEach(function(ne){ne.forEach(function(se,oe){se.y1=(se.y0=oe)+se.value*re})}),W.links.forEach(function(ne){ne.width=ne.value*re})})(),j();for(var R=1,N=D;N>0;--N)Q(R*=.99),j(),U(R),j();function U(X){$.forEach(function(J){J.forEach(function(re){if(re.targetLinks.length){var ne=(m.sum(re.targetLinks,u)/m.sum(re.targetLinks,c)-i(re))*X;re.y0+=ne,re.y1+=ne}})})}
1function Q(X){$.slice().reverse().forEach(function(J){J.forEach(function(re){if(re.sourceLinks.length){var ne=(m.sum(re.sourceLinks,f)/m.sum(re.sourceLinks,c)-i(re))*X;re.y0+=ne,re.y1+=ne}})})}function j(){$.forEach(function(X){var J,re,ne,se=_,oe=X.length;for(X.sort(d),ne=0;ne<oe;++ne)(re=se-(J=X[ne]).y0)>0&&(J.y0+=re,J.y1+=re),se=J.y1+A;if((re=se-A-k)>0)for(se=J.y0-=re,J.y1-=re,ne=oe-2;ne>=0;--ne)(re=(J=X[ne]).y1+A-se)>0&&(J.y0-=re,J.y1-=re),se=J.y0})}}function q(W){W.nodes.forEach(function($){$.sourceLinks.sort(r),$.targetLinks.sort(o)}),W.nodes.forEach(function($){var R=$.y0,N=R;$.sourceLinks.forEach(function(U){U.y0=R+U.width/2,R+=U.width}),$.targetLinks.forEach(function(U){U.y1=N+U.width/2,N+=U.width})})}return F.update=function(W){return q(W),W},F.nodeId=function(W){return arguments.length?(I=typeof W=="function"?W:t(W),F):I},F.nodeAlign=function(W){return arguments.length?(P=typeof W=="function"?W:t(W),F):P},F.nodeWidth=function(W){return arguments.length?(L=+W,F):L},F.nodePadding=function(W){return arguments.length?(A=+W,F):A},F.nodes=function(W){return arguments.length?(S=typeof W=="function"?W:t(W),F):S},F.links=function(W){return arguments.length?(E=typeof W=="function"?W:t(W),F):E},F.size=function(W){return arguments.length?(w=_=0,T=+W[0],k=+W[1],F):[T-w,k-_]},F.extent=function(W){return arguments.length?(w=+W[0][0],T=+W[1][0],_=+W[0][1],k=+W[1][1],F):[[w,_],[T,k]]},F.iterations=function(W){return arguments.length?(D=+W,F):D},F},g.sankeyCenter=function(w){return w.targetLinks.length?w.depth:w.sourceLinks.length?m.min(w.sourceLinks,e)-1:0},g.sankeyLeft=function(w){return w.depth},g.sankeyRight=function(w,_){return _-1-w.height},g.sankeyJustify=n,g.sankeyLinkHorizontal=function(){return v.linkHorizontal().source(x).target(l)},Object.defineProperty(g,"__esModule",{value:!0})})},{"d3-array":107,"d3-collection":108,"d3-shape":119}],58:[function(y,ee,te){(function(){var g={version:"3.8.0"},m=[].slice,b=function(le){return m.call(le)},v=self.document;function e(le){return le&&(le.ownerDocument||le.document||le).documentElement}function n(le){return le&&(le.ownerDocument&&le.ownerDocument.defaultView||le.document&&le||le.defaultView)}if(v)try{b(v.documentElement.childNodes)[0].nodeType}catch{b=function(C){for(var z=C.length,B=new Array(z);z--;)B[z]=C[z];return B}}if(Date.now||(Date.now=function(){return+new Date}),v)try{v.createElement("DIV").style.setProperty("opacity",0,"")}catch{var t=this.Element.prototype,o=t.setAttribute,r=t.setAttributeNS,d=this.CSSStyleDeclaration.prototype,c=d.setProperty;t.setAttribute=function(C,z){o.call(this,C,z+"")},t.setAttributeNS=function(C,z,B){r.call(this,C,z,B+"")},d.setProperty=function(C,z,B){c.call(this,C,z+"",B)}}function i(le,C){return le<C?-1:le>C?1:le>=C?0:NaN}function u(le){return le===null?NaN:+le}function f(le){return!isNaN(le)}function s(le){return{left:function(C,z,B,G){for(arguments.length<3&&(B=0),arguments.length<4&&(G=C.length);B<G;){var ie=B+G>>>1;le(C[ie],z)<0?B=ie+1:G=ie}return B},right:function(C,z,B,G){for(arguments.length<3&&(B=0),arguments.length<4&&(G=C.length);B<G;){var ie=B+G>>>1;le(C[ie],z)>0?G=ie:B=ie+1}return B}}}g.ascending=i,g.descending=function(le,C){return C<le?-1:C>le?1:C>=le?0:NaN},g.min=function(le,C){var z,B,G=-1,ie=le.length;if(arguments.length===1){for(;++G<ie;)if((B=le[G])!=null&&B>=B){z=B;break}for(;++G<ie;)(B=le[G])!=null&&z>B&&(z=B)}else{for(;++G<ie;)if((B=C.call(le,le[G],G))!=null&&B>=B){z=B;break}for(;++G<ie;)(B=C.call(le,le[G],G))!=null&&z>B&&(z=B)}return z},g.max=function(le,C){var z,B,G=-1,ie=le.length;if(arguments.length===1){for(;++G<ie;)if((B=le[G])!=null&&B>=B){z=B;break}for(;++G<ie;)(B=le[G])!=null&&B>z&&(z=B)}else{for(;++G<ie;)if((B=C.call(le,le[G],G))!=null&&B>=B){z=B;break}for(;++G<ie;)(B=C.call(le,le[G],G))!=null&&B>z&&(z=B)}return z},g.extent=function(le,C){var z,B,G,ie=-1,ue=le.length;if(arguments.length===1){for(;++ie<ue;)if((B=le[ie])!=null&&B>=B){z=G=B;break}for(;++ie<ue;)(B=le[ie])!=null&&(z>B&&(z=B),G<B&&(G=B))}else{for(;++ie<ue;)if((B=C.call(le,le[ie],ie))!=null&&B>=B){z=G=B;break}for(;++ie<ue;)(B=C.call(le,le[ie],ie))!=null&&(z>B&&(z=B),G<B&&(G=B))}return[z,G]},g.sum=function(le,C){var z,B=0,G=le.length,ie=-1;if(arguments.length===1)for(;++ie<G;)f(z=+le[ie])&&(B+=z);else for(;++ie<G;)f(z=+C.call(le,le[ie],ie))&&(B+=z);return B},g.mean=function(le,C){var z,B=0,G=le.length,ie=-1,ue=G;if(arguments.length===1)for(;++ie<G;)f(z=u(le[ie]))?B+=z:--ue;else for(;++ie<G;)f(z=u(C.call(le,le[ie],ie)))?B+=z:--ue;if(ue)return B/ue},g.quantile=function(le,C){var z=(le.length-1)*C+1,B=Math.floor(z),G=+le[B-1],ie=z-B;return ie?G+ie*(le[B]-G):G},g.median=function(le,C){var z,B=[],G=le.length,ie=-1;if(arguments.length===1)for(;++ie<G;)f(z=u(le[ie]))&&B.push(z);else for(;++ie<G;)f(z=u(C.call(le,le[ie],ie)))&&B.push(z);if(B.length)return g.quantile(B.sort(i),.5)},g.variance=function(le,C){var z,B,G=le.length,ie=0,ue=0,ge=-1,ye=0;if(arguments.length===1)for(;++ge<G;)f(z=u(le[ge]))&&(ue+=(B=z-ie)*(z-(ie+=B/++ye)));else for(;++ge<G;)f(z=u(C.call(le,le[ge],ge)))&&(ue+=(B=z-ie)*(z-(ie+=B/++ye)));if(ye>1)return ue/(ye-1)},g.deviation=function(){var le=g.variance.apply(this,arguments);return le&&Math.sqrt(le)};var h=s(i);function p(le){return le.length}g.bisectLeft=h.left,g.bisect=g.bisectRight=h.right,g.bisector=function(le){return s(le.length===1?function(C,z){return i(le(C),z)}:le)},g.shuffle=function(le,C,z){(ie=arguments.length)<3&&(z=le.length,ie<2&&(C=0));for(var B,G,ie=z-C;ie;)G=Math.random()*ie--|0,B=le[ie+C],le[ie+C]=le[G+C],le[G+C]=B;return le},g.permute=function(le,C){for(var z=C.length,B=new Array(z);z--;)B[z]=le[C[z]];return B},g.pairs=function(le){for(var C=0,z=le.length-1,B=le[0],G=new Array(z<0?0:z);C<z;)G[C]=[B,B=le[++C]];return G},g.transpose=function(le){if(!(G=le.length))return[];for(var C=-1,z=g.min(le,p),B=new Array(z);++C<z;)for(var G,ie=-1,ue=B[C]=new Array(G);++ie<G;)ue[ie]=le[ie][C];return B},g.zip=function(){return g.transpose(arguments)},g.keys=function(le){var C=[];for(var z in le)C.push(z);return C},g.values=function(le){var C=[];for(var z in le)C.push(le[z]);return C},g.entries=function(le){var C=[];for(var z in le)C.push({key:z,value:le[z]});return C},g.merge=function(le){for(var C,z,B,G=le.length,ie=-1,ue=0;++ie<G;)ue+=le[ie].length;for(z=new Array(ue);--G>=0;)for(C=(B=le[G]).length;--C>=0;)z[--ue]=B[C];return z};var a=Math.abs;function x(le){for(var C=1;le*C%1;)C*=10;return C}function l(le,C){for(var z in C)Object.defineProperty(le.prototype,z,{value:C[z],enumerable:!1})}function w(){this._=Object.create(null)}g.range=function(le,C,z){if(arguments.length<3&&(z=1,arguments.length<2&&(C=le,le=0)),(C-le)/z==1/0)throw new Error("infinite range");var B,G=[],ie=x(a(z)),ue=-1;if(le*=ie,C*=ie,(z*=ie)<0)for(;(B=le+z*++ue)>C;)G.push(B/ie);else for(;(B=le+z*++ue)<C;)G.push(B/ie);return G},g.map=function(le,C){var z=new w;if(le instanceof w)le.forEach(function(ge,ye){z.set(ge,ye)});else if(Array.isArray(le)){var B,G=-1,ie=le.length;if(arguments.length===1)for(;++G<ie;)z.set(G,le[G]);else for(;++G<ie;)z.set(C.call(le,B=le[G],G),B)}else for(var ue in le)z.set(ue,le[ue]);return z};function _(le){return(le+="")=="__proto__"||le[0]==="\0"?"\0"+le:le}function T(le){return(le+="")[0]==="\0"?le.slice(1):le}function k(le){return _(le)in this._}function L(le){return(le=_(le))in this._&&delete this._[le]}function A(){var le=[];for(var C in this._)le.push(T(C));return le}function I(){var le=0;for(var C in this._)++le;return le}function P(){for(var le in this._)return!1;return!0}function S(){this._=Object.create(null)}function E(le){return le}function D(le,C,z){return function(){var B=z.apply(C,arguments);return B===C?le:B}}function F(le,C){if(C in le)return C;C=C.charAt(0).toUpperCase()+C.slice(1);for(var z=0,B=H.length;z<B;++z){var G=H[z]+C;
1if(G in le)return G}}l(w,{has:k,get:function(le){return this._[_(le)]},set:function(le,C){return this._[_(le)]=C},remove:L,keys:A,values:function(){var le=[];for(var C in this._)le.push(this._[C]);return le},entries:function(){var le=[];for(var C in this._)le.push({key:T(C),value:this._[C]});return le},size:I,empty:P,forEach:function(le){for(var C in this._)le.call(this,T(C),this._[C])}}),g.nest=function(){var le,C,z={},B=[],G=[];function ie(ue,ge,ye){if(ye>=B.length)return C?C.call(z,ge):le?ge.sort(le):ge;for(var Me,je,We,nt,bt=-1,At=ge.length,_t=B[ye++],wt=new w;++bt<At;)(nt=wt.get(Me=_t(je=ge[bt])))?nt.push(je):wt.set(Me,[je]);return ue?(je=ue(),We=function(xt,Ft){je.set(xt,ie(ue,Ft,ye))}):(je={},We=function(xt,Ft){je[xt]=ie(ue,Ft,ye)}),wt.forEach(We),je}return z.map=function(ue,ge){return ie(ge,ue,0)},z.entries=function(ue){return function ge(ye,Me){if(Me>=B.length)return ye;var je=[],We=G[Me++];return ye.forEach(function(nt,bt){je.push({key:nt,values:ge(bt,Me)})}),We?je.sort(function(nt,bt){return We(nt.key,bt.key)}):je}(ie(g.map,ue,0),0)},z.key=function(ue){return B.push(ue),z},z.sortKeys=function(ue){return G[B.length-1]=ue,z},z.sortValues=function(ue){return le=ue,z},z.rollup=function(ue){return C=ue,z},z},g.set=function(le){var C=new S;if(le)for(var z=0,B=le.length;z<B;++z)C.add(le[z]);return C},l(S,{has:k,add:function(le){return this._[_(le+="")]=!0,le},remove:L,values:A,size:I,empty:P,forEach:function(le){for(var C in this._)le.call(this,T(C))}}),g.behavior={},g.rebind=function(le,C){for(var z,B=1,G=arguments.length;++B<G;)le[z=arguments[B]]=D(le,C,C[z]);return le};var H=["webkit","ms","moz","Moz","o","O"];function V(){}function Z(){}function K(le){var C=[],z=new w;function B(){for(var G,ie=C,ue=-1,ge=ie.length;++ue<ge;)(G=ie[ue].on)&&G.apply(this,arguments);return le}return B.on=function(G,ie){var ue,ge=z.get(G);return arguments.length<2?ge&&ge.on:(ge&&(ge.on=null,C=C.slice(0,ue=C.indexOf(ge)).concat(C.slice(ue+1)),z.remove(G)),ie&&C.push(z.set(G,{on:ie})),le)},B}function q(){g.event.preventDefault()}function W(){for(var le,C=g.event;le=C.sourceEvent;)C=le;return C}function $(le){for(var C=new Z,z=0,B=arguments.length;++z<B;)C[arguments[z]]=K(C);return C.of=function(G,ie){return function(ue){try{var ge=ue.sourceEvent=g.event;ue.target=le,g.event=ue,C[ue.type].apply(G,ie)}finally{g.event=ge}}},C}g.dispatch=function(){for(var le=new Z,C=-1,z=arguments.length;++C<z;)le[arguments[C]]=K(le);return le},Z.prototype.on=function(le,C){var z=le.indexOf("."),B="";if(z>=0&&(B=le.slice(z+1),le=le.slice(0,z)),le)return arguments.length<2?this[le].on(B):this[le].on(B,C);if(arguments.length===2){if(C==null)for(le in this)this.hasOwnProperty(le)&&this[le].on(B,null);return this}},g.event=null,g.requote=function(le){return le.replace(R,"\\$&")};var R=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,N={}.__proto__?function(le,C){le.__proto__=C}:function(le,C){for(var z in C)le[z]=C[z]};function U(le){return N(le,J),le}var Q=function(le,C){return C.querySelector(le)},j=function(le,C){return C.querySelectorAll(le)},X=function(le,C){var z=le.matches||le[F(le,"matchesSelector")];return(X=function(B,G){return z.call(B,G)})(le,C)};typeof Sizzle=="function"&&(Q=function(le,C){return Sizzle(le,C)[0]||null},j=Sizzle,X=Sizzle.matchesSelector),g.selection=function(){return g.select(v.documentElement)};var J=g.selection.prototype=[];function re(le){return typeof le=="function"?le:function(){return Q(le,this)}}function ne(le){return typeof le=="function"?le:function(){return j(le,this)}}J.select=function(le){var C,z,B,G,ie=[];le=re(le);for(var ue=-1,ge=this.length;++ue<ge;){ie.push(C=[]),C.parentNode=(B=this[ue]).parentNode;for(var ye=-1,Me=B.length;++ye<Me;)(G=B[ye])?(C.push(z=le.call(G,G.__data__,ye,ue)),z&&"__data__"in G&&(z.__data__=G.__data__)):C.push(null)}return U(ie)},J.selectAll=function(le){var C,z,B=[];le=ne(le);for(var G=-1,ie=this.length;++G<ie;)for(var ue=this[G],ge=-1,ye=ue.length;++ge<ye;)(z=ue[ge])&&(B.push(C=b(le.call(z,z.__data__,ge,G))),C.parentNode=z);return U(B)};var se="http://www.w3.org/1999/xhtml",oe={svg:"http://www.w3.org/2000/svg",xhtml:se,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pe(le,C){return le=g.ns.qualify(le),C==null?le.local?function(){this.removeAttributeNS(le.space,le.local)}:function(){this.removeAttribute(le)}:typeof C=="function"?le.local?function(){var z=C.apply(this,arguments);z==null?this.removeAttributeNS(le.space,le.local):this.setAttributeNS(le.space,le.local,z)}:function(){var z=C.apply(this,arguments);z==null?this.removeAttribute(le):this.setAttribute(le,z)}:le.local?function(){this.setAttributeNS(le.space,le.local,C)}:function(){this.setAttribute(le,C)}}function ce(le){return le.trim().replace(/\s+/g," ")}function de(le){return new RegExp("(?:^|\\s+)"+g.requote(le)+"(?:\\s+|$)","g")}function xe(le){return(le+"").trim().split(/^|\s+/)}function we(le,C){var z=(le=xe(le).map(be)).length;return typeof C=="function"?function(){for(var B=-1,G=C.apply(this,arguments);++B<z;)le[B](this,G)}:function(){for(var B=-1;++B<z;)le[B](this,C)}}function be(le){var C=de(le);return function(z,B){if(G=z.classList)return B?G.add(le):G.remove(le);var G=z.getAttribute("class")||"";B?(C.lastIndex=0,C.test(G)||z.setAttribute("class",ce(G+" "+le))):z.setAttribute("class",ce(G.replace(C," ")))}}function Ee(le,C,z){return C==null?function(){this.style.removeProperty(le)}:typeof C=="function"?function(){var B=C.apply(this,arguments);B==null?this.style.removeProperty(le):this.style.setProperty(le,B,z)}:function(){this.style.setProperty(le,C,z)}}function fe(le,C){return C==null?function(){delete this[le]}:typeof C=="function"?function(){var z=C.apply(this,arguments);z==null?delete this[le]:this[le]=z}:function(){this[le]=C}}function me(le){return typeof le=="function"?le:(le=g.ns.qualify(le)).local?function(){return this.ownerDocument.createElementNS(le.space,le.local)}:function(){var C=this.ownerDocument,z=this.namespaceURI;return z===se&&C.documentElement.namespaceURI===se?C.createElement(le):C.createElementNS(z,le)}}function Te(){var le=this.parentNode;le&&le.removeChild(this)}function _e(le){return{__data__:le}}function Ae(le){return function(){return X(this,le)}}function Pe(le){return arguments.length||(le=i),function(C,z){return C&&z?le(C.__data__,z.__data__):!C-!z}}function De(le,C){for(var z=0,B=le.length;z<B;z++)for(var G,ie=le[z],ue=0,ge=ie.length;ue<ge;ue++)(G=ie[ue])&&C(G,ue,z);return le}function Ve(le){return N(le,Qe),le}g.ns={prefix:oe,qualify:function(le){var C=le.indexOf(":"),z=le;return C>=0&&(z=le.slice(0,C))!=="xmlns"&&(le=le.slice(C+1)),oe.hasOwnProperty(z)?{space:oe[z],local:le}:le}},J.attr=function(le,C){if(arguments.length<2){if(typeof le=="string"){var z=this.node();return(le=g.ns.qualify(le)).local?z.getAttributeNS(le.space,le.local):z.getAttribute(le)}for(C in le)this.each(pe(C,le[C]));return this}return this.each(pe(le,C))},J.classed=function(le,C){if(arguments.length<2){if(typeof le=="string"){var z=this.node(),B=(le=xe(le)).length,G=-1;if(C=z.classList){for(;++G<B;)if(!C.contains(le[G]))return!1}else for(C=z.getAttribute("class");++G<B;)if(!de(le[G]).test(C))return!1;return!0}for(C in le)this.each(we(C,le[C]));return this}return this.each(we(le,C))},J.style=function(le,C,z){var B=arguments.length;if(B<3){if(typeof le!="string"){for(z in B<2&&(C=""),le)this.each(Ee(z,le[z],C));return this}if(B<2){var G=this.node();return n(G).getComputedStyle(G,null).getPropertyValue(le)}z=""}return this.each(Ee(le,C,z))},J.property=function(le,C){if(arguments.length<2){if(typeof le=="string")return this.node()[le];for(C in le)this.each(fe(C,le[C]));return this}return this.each(fe(le,C))},J.text=function(le){return arguments.length?this.each(typeof le=="function"?function(){var C=le.apply(this,arguments);this.textContent=C??""}:le==null?function(){this.textContent=""}:function(){this.textContent=le}):this.node().textContent},J.html=function(le){return arguments.length?this.each(typeof le=="function"?function(){var C=le.apply(this,arguments);this.innerHTML=C??""}:le==null?function(){this.innerHTML=""}:function(){this.innerHTML=le}):this.node().innerHTML},J.append=function(le){return le=me(le),this.select(function(){return this.appendChild(le.apply(this,arguments))})},J.insert=function(le,C){return le=me(le),C=re(C),this.select(function(){return this.insertBefore(le.apply(this,arguments),C.apply(this,arguments)||null)})},J.remove=function(){return this.each(Te)},J.data=function(le,C){var z,B,G=-1,ie=this.length;if(!arguments.length){for(le=new Array(ie=(z=this[0]).length);++G<ie;)(B=z[G])&&(le[G]=B.__data__);return le}function ue(je,We){var nt,bt,At,_t=je.length,wt=We.length,xt=Math.min(_t,wt),Ft=new Array(wt),Ot=new Array(wt),Nt=new Array(_t);if(C){var er,fr=new w,kr=new Array(_t);for(nt=-1;++nt<_t;)(bt=je[nt])&&(fr.has(er=C.call(bt,bt.__data__,nt))?Nt[nt]=bt:fr.set(er,bt),kr[nt]=er);for(nt=-1;++nt<wt;
1)(bt=fr.get(er=C.call(We,At=We[nt],nt)))?bt!==!0&&(Ft[nt]=bt,bt.__data__=At):Ot[nt]=_e(At),fr.set(er,!0);for(nt=-1;++nt<_t;)nt in kr&&fr.get(kr[nt])!==!0&&(Nt[nt]=je[nt])}else{for(nt=-1;++nt<xt;)bt=je[nt],At=We[nt],bt?(bt.__data__=At,Ft[nt]=bt):Ot[nt]=_e(At);for(;nt<wt;++nt)Ot[nt]=_e(We[nt]);for(;nt<_t;++nt)Nt[nt]=je[nt]}Ot.update=Ft,Ot.parentNode=Ft.parentNode=Nt.parentNode=je.parentNode,ge.push(Ot),ye.push(Ft),Me.push(Nt)}var ge=Ve([]),ye=U([]),Me=U([]);if(typeof le=="function")for(;++G<ie;)ue(z=this[G],le.call(z,z.parentNode.__data__,G));else for(;++G<ie;)ue(z=this[G],le);return ye.enter=function(){return ge},ye.exit=function(){return Me},ye},J.datum=function(le){return arguments.length?this.property("__data__",le):this.property("__data__")},J.filter=function(le){var C,z,B,G=[];typeof le!="function"&&(le=Ae(le));for(var ie=0,ue=this.length;ie<ue;ie++){G.push(C=[]),C.parentNode=(z=this[ie]).parentNode;for(var ge=0,ye=z.length;ge<ye;ge++)(B=z[ge])&&le.call(B,B.__data__,ge,ie)&&C.push(B)}return U(G)},J.order=function(){for(var le=-1,C=this.length;++le<C;)for(var z,B=this[le],G=B.length-1,ie=B[G];--G>=0;)(z=B[G])&&(ie&&ie!==z.nextSibling&&ie.parentNode.insertBefore(z,ie),ie=z);return this},J.sort=function(le){le=Pe.apply(this,arguments);for(var C=-1,z=this.length;++C<z;)this[C].sort(le);return this.order()},J.each=function(le){return De(this,function(C,z,B){le.call(C,C.__data__,z,B)})},J.call=function(le){var C=b(arguments);return le.apply(C[0]=this,C),this},J.empty=function(){return!this.node()},J.node=function(){for(var le=0,C=this.length;le<C;le++)for(var z=this[le],B=0,G=z.length;B<G;B++){var ie=z[B];if(ie)return ie}return null},J.size=function(){var le=0;return De(this,function(){++le}),le};var Qe=[];function Oe(le){var C,z;return function(B,G,ie){var ue,ge=le[ie].update,ye=ge.length;for(ie!=z&&(z=ie,C=0),G>=C&&(C=G+1);!(ue=ge[C])&&++C<ye;);return ue}}function Ue(le,C,z){var B="__on"+le,G=le.indexOf("."),ie=Ye;G>0&&(le=le.slice(0,G));var ue=Ge.get(le);function ge(){var ye=this[B];ye&&(this.removeEventListener(le,ye,ye.$),delete this[B])}return ue&&(le=ue,ie=tt),G?C?function(){var ye=ie(C,b(arguments));ge.call(this),this.addEventListener(le,this[B]=ye,ye.$=z),ye._=C}:ge:C?V:function(){var ye,Me=new RegExp("^__on([^.]+)"+g.requote(le)+"$");for(var je in this)if(ye=je.match(Me)){var We=this[je];this.removeEventListener(ye[1],We,We.$),delete this[je]}}}g.selection.enter=Ve,g.selection.enter.prototype=Qe,Qe.append=J.append,Qe.empty=J.empty,Qe.node=J.node,Qe.call=J.call,Qe.size=J.size,Qe.select=function(le){for(var C,z,B,G,ie,ue=[],ge=-1,ye=this.length;++ge<ye;){B=(G=this[ge]).update,ue.push(C=[]),C.parentNode=G.parentNode;for(var Me=-1,je=G.length;++Me<je;)(ie=G[Me])?(C.push(B[Me]=z=le.call(G.parentNode,ie.__data__,Me,ge)),z.__data__=ie.__data__):C.push(null)}return U(ue)},Qe.insert=function(le,C){return arguments.length<2&&(C=Oe(this)),J.insert.call(this,le,C)},g.select=function(le){var C;return typeof le=="string"?(C=[Q(le,v)]).parentNode=v.documentElement:(C=[le]).parentNode=e(le),U([C])},g.selectAll=function(le){var C;return typeof le=="string"?(C=b(j(le,v))).parentNode=v.documentElement:(C=b(le)).parentNode=null,U([C])},J.on=function(le,C,z){var B=arguments.length;if(B<3){if(typeof le!="string"){for(z in B<2&&(C=!1),le)this.each(Ue(z,le[z],C));return this}if(B<2)return(B=this.node()["__on"+le])&&B._;z=!1}return this.each(Ue(le,C,z))};
1var Ge=g.map({mouseenter:"mouseover",mouseleave:"mouseout"});function Ye(le,C){return function(z){var B=g.event;g.event=z,C[0]=this.__data__;try{le.apply(this,C)}finally{g.event=B}}}function tt(le,C){var z=Ye(le,C);return function(B){var G=B.relatedTarget;G&&(G===this||8&G.compareDocumentPosition(this))||z.call(this,B)}}v&&Ge.forEach(function(le){"on"+le in v&&Ge.remove(le)});var lt,vt=0;function It(le){var C=".dragsuppress-"+ ++vt,z="click"+C,B=g.select(n(le)).on("touchmove"+C,q).on("dragstart"+C,q).on("selectstart"+C,q);if(lt==null&&(lt=!("onselectstart"in le)&&F(le.style,"userSelect")),lt){var G=e(le).style,ie=G[lt];G[lt]="none"}return function(ue){if(B.on(C,null),lt&&(G[lt]=ie),ue){var ge=function(){B.on(z,null)};B.on(z,function(){q(),ge()},!0),setTimeout(ge,0)}}}g.mouse=function(le){return rt(le,W())};var St=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function rt(le,C){C.changedTouches&&(C=C.changedTouches[0]);var z=le.ownerSVGElement||le;if(z.createSVGPoint){var B=z.createSVGPoint();if(St<0){var G=n(le);if(G.scrollX||G.scrollY){var ie=(z=g.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();St=!(ie.f||ie.e),z.remove()}}return St?(B.x=C.pageX,B.y=C.pageY):(B.x=C.clientX,B.y=C.clientY),[(B=B.matrixTransform(le.getScreenCTM().inverse())).x,B.y]}var ue=le.getBoundingClientRect();return[C.clientX-ue.left-le.clientLeft,C.clientY-ue.top-le.clientTop]}function et(){return g.event.changedTouches[0].identifier}g.touch=function(le,C,z){if(arguments.length<3&&(z=C,C=W().changedTouches),C){for(var B,G=0,ie=C.length;G<ie;++G)if((B=C[G]).identifier===z)return rt(le,B)}},g.behavior.drag=function(){var le=$(G,"drag","dragstart","dragend"),C=null,z=ie(V,g.mouse,n,"mousemove","mouseup"),B=ie(et,g.touch,E,"touchmove","touchend");function G(){this.on("mousedown.drag",z).on("touchstart.drag",B)}function ie(ue,ge,ye,Me,je){return function(){var We,nt=this,bt=g.event.target.correspondingElement||g.event.target,At=nt.parentNode,_t=le.of(nt,arguments),wt=0,xt=ue(),Ft=".drag"+(xt==null?"":"-"+xt),Ot=g.select(ye(bt)).on(Me+Ft,fr).on(je+Ft,kr),Nt=It(bt),er=ge(At,xt);function fr(){var Tr,Jr,Xr=ge(At,xt);Xr&&(Tr=Xr[0]-er[0],Jr=Xr[1]-er[1],wt|=Tr|Jr,er=Xr,_t({type:"drag",x:Xr[0]+We[0],y:Xr[1]+We[1],dx:Tr,dy:Jr}))}function kr(){ge(At,xt)&&(Ot.on(Me+Ft,null).on(je+Ft,null),Nt(wt),_t({type:"dragend"}))}We=C?[(We=C.apply(nt,arguments)).x-er[0],We.y-er[1]]:[0,0],_t({type:"dragstart"})}}return G.origin=function(ue){return arguments.length?(C=ue,G):C},g.rebind(G,le,"on")},g.touches=function(le,C){return arguments.length<2&&(C=W().touches),C?b(C).map(function(z){var B=rt(le,z);return B.identifier=z.identifier,B}):[]};var Tt=1e-6,Vt=Math.PI,Kt=2*Vt,Be=Kt-Tt,qe=Vt/2,Re=Vt/180,Xe=180/Vt;function ke(le){return le>1?qe:le<-1?-qe:Math.asin(le)}function Le(le){return((le=Math.exp(le))+1/le)/2}var Ie=Math.SQRT2;g.interpolateZoom=function(le,C){var z,B,G=le[0],ie=le[1],ue=le[2],ge=C[0],ye=C[1],Me=C[2],je=ge-G,We=ye-ie,nt=je*je+We*We;if(nt<1e-12)B=Math.log(Me/ue)/Ie,z=function(Ft){return[G+Ft*je,ie+Ft*We,ue*Math.exp(Ie*Ft*B)]};else{var bt=Math.sqrt(nt),At=(Me*Me-ue*ue+4*nt)/(2*ue*2*bt),_t=(Me*Me-ue*ue-4*nt)/(2*Me*2*bt),wt=Math.log(Math.sqrt(At*At+1)-At),xt=Math.log(Math.sqrt(_t*_t+1)-_t);B=(xt-wt)/Ie,z=function(Ft){var Ot,Nt=Ft*B,er=Le(wt),fr=ue/(2*bt)*(er*(Ot=Ie*Nt+wt,((Ot=Math.exp(2*Ot))-1)/(Ot+1))-function(kr){return((kr=Math.exp(kr))-1/kr)/2}(wt));return[G+fr*je,ie+fr*We,ue*er/Le(Ie*Nt+wt)]}}return z.duration=1e3*B,z},g.behavior.zoom=function(){var le,C,z,B,G,ie,ue,ge,ye,Me={x:0,y:0,k:1},je=[960,500],We=it,nt=250,bt=0,At="mousedown.zoom",_t="mousemove.zoom",wt="mouseup.zoom",xt="touchstart.zoom",Ft=$(Ot,"zoomstart","zoom","zoomend");function Ot(jr){jr.on(At,on).on(Je+".zoom",Gn).on("dblclick.zoom",oa).on(xt,Nn)}function Nt(jr){return[(jr[0]-Me.x)/Me.k,(jr[1]-Me.y)/Me.k]}function er(jr){Me.k=Math.max(We[0],Math.min(We[1],jr))}function fr(jr,Mn){Mn=function(Yn){return[Yn[0]*Me.k+Me.x,Yn[1]*Me.k+Me.y]}(Mn),Me.x+=jr[0]-Mn[0],Me.y+=jr[1]-Mn[1]}function kr(jr,Mn,Yn,Vn){jr.__chart__={x:Me.x,y:Me.y,k:Me.k},er(Math.pow(2,Vn)),fr(C=Mn,Yn),jr=g.select(jr),nt>0&&(jr=jr.transition().duration(nt)),jr.call(Ot.event)}function Tr(){ue&&ue.domain(ie.range().map(function(jr){return(jr-Me.x)/Me.k}).map(ie.invert)),ye&&ye.domain(ge.range().map(function(jr){return(jr-Me.y)/Me.k}).map(ge.invert))}function Jr(jr){bt++||jr({type:"zoomstart"})}function Xr(jr){Tr(),jr({type:"zoom",scale:Me.k,translate:[Me.x,Me.y]})}function hn(jr){--bt||(jr({type:"zoomend"}),C=null)}function on(){var jr=this,Mn=Ft.of(jr,arguments),Yn=0,Vn=g.select(n(jr)).on(_t,wa).on(wt,Zn),Qn=Nt(g.mouse(jr)),la=It(jr);function wa(){Yn=1,fr(g.mouse(jr),Qn),Xr(Mn)}function Zn(){Vn.on(_t,null).on(wt,null),la(Yn),hn(Mn)}Ts.call(jr),Jr(Mn)}function Nn(){var jr,Mn=this,Yn=Ft.of(Mn,arguments),Vn={},Qn=0,la=".zoom-"+g.event.changedTouches[0].identifier,wa="touchmove"+la,Zn="touchend"+la,ma=[],pa=g.select(Mn),Aa=It(Mn);function va(){var Ai=g.touches(Mn);
vendor: 1,448 bytes, line 1
1return jr=Me.k,Ai.forEach(function(Si){Si.identifier in Vn&&(Vn[Si.identifier]=Nt(Si))}),Ai}function Sa(){var Ai=g.event.target;g.select(Ai).on(wa,Da).on(Zn,ii),ma.push(Ai);for(var Si=g.event.changedTouches,ai=0,xi=Si.length;ai<xi;++ai)Vn[Si[ai].identifier]=null;var ui=va(),po=Date.now();if(ui.length===1){if(po-G<500){var ji=ui[0];kr(Mn,ji,Vn[ji.identifier],Math.floor(Math.log(Me.k)/Math.LN2)+1),q()}G=po}else if(ui.length>1){ji=ui[0];var Po=ui[1],ys=ji[0]-Po[0],Bs=ji[1]-Po[1];Qn=ys*ys+Bs*Bs}}function Da(){var Ai,Si,ai,xi,ui=g.touches(Mn);Ts.call(Mn);for(var po=0,ji=ui.length;po<ji;++po,xi=null)if(ai=ui[po],xi=Vn[ai.identifier]){if(Si)break;Ai=ai,Si=xi}if(xi){var Po=(Po=ai[0]-Ai[0])*Po+(Po=ai[1]-Ai[1])*Po,ys=Qn&&Math.sqrt(Po/Qn);Ai=[(Ai[0]+ai[0])/2,(Ai[1]+ai[1])/2],Si=[(Si[0]+xi[0])/2,(Si[1]+xi[1])/2],er(ys*jr)}G=null,fr(Ai,Si),Xr(Yn)}function ii(){if(g.event.touches.length){for(var Ai=g.event.changedTouches,Si=0,ai=Ai.length;Si<ai;++Si)delete Vn[Ai[Si].identifier];for(var xi in Vn)return void va()}g.selectAll(ma).on(la,null),pa.on(At,on).on(xt,Nn),Aa(),hn(Yn)}Sa(),Jr(Yn),pa.on(At,null).on(xt,Sa)}function Gn(){var jr=Ft.of(this,arguments);B?clearTimeout(B):(Ts.call(this),le=Nt(C=z||g.mouse(this)),Jr(jr)),B=setTimeout(function(){B=null,hn(jr)},50),q(),er(Math.pow(2,.002*Ce())*Me.k),fr(C,le),Xr(jr)}function oa(){var jr=g.mouse(this),Mn=Math.log(Me.k)/Math.LN2;kr(this,jr,Nt(jr),g.event.shiftKey?Math.ceil(Mn)-1:Math.floor(Mn)+1)}
1return Je||(Je="onwheel"in v?(Ce=function(){return-g.event.deltaY*(g.event.deltaMode?120:1)},"wheel"):"onmousewheel"in v?(Ce=function(){return g.event.wheelDelta},"mousewheel"):(Ce=function(){return-g.event.detail},"MozMousePixelScroll")),Ot.event=function(jr){jr.each(function(){var Mn=Ft.of(this,arguments),Yn=Me;hs?g.select(this).transition().each("start.zoom",function(){Me=this.__chart__||{x:0,y:0,k:1},Jr(Mn)}).tween("zoom:zoom",function(){var Vn=je[0],Qn=je[1],la=C?C[0]:Vn/2,wa=C?C[1]:Qn/2,Zn=g.interpolateZoom([(la-Me.x)/Me.k,(wa-Me.y)/Me.k,Vn/Me.k],[(la-Yn.x)/Yn.k,(wa-Yn.y)/Yn.k,Vn/Yn.k]);return function(ma){var pa=Zn(ma),Aa=Vn/pa[2];this.__chart__=Me={x:la-pa[0]*Aa,y:wa-pa[1]*Aa,k:Aa},Xr(Mn)}}).each("interrupt.zoom",function(){hn(Mn)}).each("end.zoom",function(){hn(Mn)}):(this.__chart__=Me,Jr(Mn),Xr(Mn),hn(Mn))})},Ot.translate=function(jr){return arguments.length?(Me={x:+jr[0],y:+jr[1],k:Me.k},Tr(),Ot):[Me.x,Me.y]},Ot.scale=function(jr){return arguments.length?(Me={x:Me.x,y:Me.y,k:null},er(+jr),Tr(),Ot):Me.k},Ot.scaleExtent=function(jr){return arguments.length?(We=jr==null?it:[+jr[0],+jr[1]],Ot):We},Ot.center=function(jr){return arguments.length?(z=jr&&[+jr[0],+jr[1]],Ot):z},Ot.size=function(jr){return arguments.length?(je=jr&&[+jr[0],+jr[1]],Ot):je},Ot.duration=function(jr){return arguments.length?(nt=+jr,Ot):nt},Ot.x=function(jr){return arguments.length?(ue=jr,ie=jr.copy(),Me={x:0,y:0,k:1},Ot):ue},Ot.y=function(jr){return arguments.length?(ye=jr,ge=jr.copy(),Me={x:0,y:0,k:1},Ot):ye},g.rebind(Ot,Ft,"on")};var Ce,Je,it=[0,1/0];function ht(){}function ut(le,C,z){return this instanceof ut?(this.h=+le,this.s=+C,void(this.l=+z)):arguments.length<2?le instanceof ut?new ut(le.h,le.s,le.l):vr(""+le,pr,ut):new ut(le,C,z)}g.color=ht,ht.prototype.toString=function(){return this.rgb()+""},g.hsl=ut;var kt=ut.prototype=new ht;function ot(le,C,z){var B,G;function ie(ue){return Math.round(255*function(ge){return ge>360?ge-=360:ge<0&&(ge+=360),ge<60?B+(G-B)*ge/60:ge<180?G:ge<240?B+(G-B)*(240-ge)/60:B}(ue))}return le=isNaN(le)?0:(le%=360)<0?le+360:le,C=isNaN(C)||C<0?0:C>1?1:C,B=2*(z=z<0?0:z>1?1:z)-(G=z<=.5?z*(1+C):z+C-z*C),new jt(ie(le+120),ie(le),ie(le-120))}function Lt(le,C,z){return this instanceof Lt?(this.h=+le,this.c=+C,void(this.l=+z)):arguments.length<2?le instanceof Lt?new Lt(le.h,le.c,le.l):ze(le instanceof pt?le.l:(le=ar((le=g.rgb(le)).r,le.g,le.b)).l,le.a,le.b):new Lt(le,C,z)}kt.brighter=function(le){return le=Math.pow(.7,arguments.length?le:1),new ut(this.h,this.s,this.l/le)},kt.darker=function(le){return le=Math.pow(.7,arguments.length?le:1),new ut(this.h,this.s,le*this.l)},kt.rgb=function(){return ot(this.h,this.s,this.l)},g.hcl=Lt;var Et=Lt.prototype=new ht;function Ze(le,C,z){return isNaN(le)&&(le=0),isNaN(C)&&(C=0),new pt(z,Math.cos(le*=Re)*C,Math.sin(le)*C)}function pt(le,C,z){return this instanceof pt?(this.l=+le,this.a=+C,void(this.b=+z)):arguments.length<2?le instanceof pt?new pt(le.l,le.a,le.b):le instanceof Lt?Ze(le.h,le.c,le.l):ar((le=jt(le)).r,le.g,le.b):new pt(le,C,z)}Et.brighter=function(le){return new Lt(this.h,this.c,Math.min(100,this.l+Ct*(arguments.length?le:1)))},Et.darker=function(le){return new Lt(this.h,this.c,Math.max(0,this.l-Ct*(arguments.length?le:1)))},Et.rgb=function(){return Ze(this.h,this.c,this.l).rgb()},g.lab=pt;var Ct=18,zt=pt.prototype=new ht;function Gt(le,C,z){var B=(le+16)/116,G=B+C/500,ie=B-z/200;return new jt(Dt(3.2404542*(G=.95047*st(G))-1.5371385*(B=1*st(B))-.4985314*(ie=1.08883*st(ie))),Dt(-.969266*G+1.8760108*B+.041556*ie),Dt(.0556434*G-.2040259*B+1.0572252*ie))}function ze(le,C,z){return le>0?new Lt(Math.atan2(z,C)*Xe,Math.sqrt(C*C+z*z),le):new Lt(NaN,NaN,le)}function st(le){return le>.206893034?le*le*le:(le-4/29)/7.787037}function yt(le){return le>.008856?Math.pow(le,1/3):7.787037*le+4/29}function Dt(le){return Math.round(255*(le<=.00304?12.92*le:1.055*Math.pow(le,1/2.4)-.055))}function jt(le,C,z){return this instanceof jt?(this.r=~~le,this.g=~~C,void(this.b=~~z)):arguments.length<2?le instanceof jt?new jt(le.r,le.g,le.b):vr(""+le,jt,ot):new jt(le,C,z)}function or(le){return new jt(le>>16,le>>8&255,255&le)}function Ut(le){return or(le)+""}zt.brighter=function(le){return new pt(Math.min(100,this.l+Ct*(arguments.length?le:1)),this.a,this.b)},zt.darker=function(le){return new pt(Math.max(0,this.l-Ct*(arguments.length?le:1)),this.a,this.b)},zt.rgb=function(){return Gt(this.l,this.a,this.b)},g.rgb=jt;var Xt=jt.prototype=new ht;function sr(le){return le<16?"0"+Math.max(0,le).toString(16):Math.min(255,le).toString(16)}function vr(le,C,z){var B,G,ie,ue=0,ge=0,ye=0;if(B=/([a-z]+)\((.*)\)/.exec(le=le.toLowerCase()))switch(G=B[2].split(","),B[1]){case"hsl":return z(parseFloat(G[0]),parseFloat(G[1])/100,parseFloat(G[2])/100);case"rgb":return C(hr(G[0]),hr(G[1]),hr(G[2]))}return(ie=Or.get(le))?C(ie.r,ie.g,ie.b):(le==null||le.charAt(0)!=="#"||isNaN(ie=parseInt(le.slice(1),16))||(le.length===4?(ue=(3840&ie)>>4,ue|=ue>>4,ge=240&ie,ge|=ge>>4,ye=15&ie,ye|=ye<<4):le.length===7&&(ue=(16711680&ie)>>16,ge=(65280&ie)>>8,ye=255&ie)),C(ue,ge,ye))}function pr(le,C,z){var B,G,ie=Math.min(le/=255,C/=255,z/=255),ue=Math.max(le,C,z),ge=ue-ie,ye=(ue+ie)/2;return ge?(G=ye<.5?ge/(ue+ie):ge/(2-ue-ie),B=le==ue?(C-z)/ge+(C<z?6:0):C==ue?(z-le)/ge+2:(le-C)/ge+4,B*=60):(B=NaN,G=ye>0&&ye<1?0:B),new ut(B,G,ye)}function ar(le,C,z){var B=yt((.4124564*(le=lr(le))+.3575761*(C=lr(C))+.1804375*(z=lr(z)))/.95047),G=yt((.2126729*le+.7151522*C+.072175*z)/1);return pt(116*G-16,500*(B-G),200*(G-yt((.0193339*le+.119192*C+.9503041*z)/1.08883)))}function lr(le){return(le/=255)<=.04045?le/12.92:Math.pow((le+.055)/1.055,2.4)}function hr(le){var C=parseFloat(le);return le.charAt(le.length-1)==="%"?Math.round(2.55*C):C}Xt.brighter=function(le){le=Math.pow(.7,arguments.length?le:1);
vendor: 7,986 bytes, lines 1-4
1var C=this.r,z=this.g,B=this.b,G=30;return C||z||B?(C&&C<G&&(C=G),z&&z<G&&(z=G),B&&B<G&&(B=G),new jt(Math.min(255,C/le),Math.min(255,z/le),Math.min(255,B/le))):new jt(G,G,G)},Xt.darker=function(le){return new jt((le=Math.pow(.7,arguments.length?le:1))*this.r,le*this.g,le*this.b)},Xt.hsl=function(){return pr(this.r,this.g,this.b)},Xt.toString=function(){return"#"+sr(this.r)+sr(this.g)+sr(this.b)};var Or=g.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function dr(le){return typeof le=="function"?le:function(){return le}}function Fr(le){return function(C,z,B){return arguments.length===2&&typeof z=="function"&&(B=z,z=null),tn(C,z,le,B)}}function tn(le,C,z,B){var G={},ie=g.dispatch("beforesend","progress","load","error"),ue={},ge=new XMLHttpRequest,ye=null;function Me(){var je,We=ge.status;if(!We&&function(nt){var bt=nt.responseType;return bt&&bt!=="text"?nt.response:nt.responseText}(ge)||We>=200&&We<300||We===304){try{je=z.call(G,ge)}catch(nt){return void ie.error.call(G,nt)}ie.load.call(G,je)}else ie.error.call(G,ge)}return self.XDomainRequest&&!("withCredentials"in ge)&&/^(http(s)?:)?\/\//.test(le)&&(ge=new XDomainRequest),"onload"in ge?ge.onload=ge.onerror=Me:ge.onreadystatechange=function(){ge.readyState>3&&Me()},ge.onprogress=function(je){var We=g.event;g.event=je;try{ie.progress.call(G,ge)}finally{g.event=We}},G.header=function(je,We){return je=(je+"").toLowerCase(),arguments.length<2?ue[je]:(We==null?delete ue[je]:ue[je]=We+"",G)},G.mimeType=function(je){return arguments.length?(C=je==null?null:je+"",G):C},G.responseType=function(je){return arguments.length?(ye=je,G):ye},G.response=function(je){return z=je,G},["get","post"].forEach(function(je){G[je]=function(){return G.send.apply(G,[je].concat(b(arguments)))}}),G.send=function(je,We,nt){if(arguments.length===2&&typeof We=="function"&&(nt=We,We=null),ge.open(je,le,!0),C==null||"accept"in ue||(ue.accept=C+",*/*"),ge.setRequestHeader)for(var bt in ue)ge.setRequestHeader(bt,ue[bt]);return C!=null&&ge.overrideMimeType&&ge.overrideMimeType(C),ye!=null&&(ge.responseType=ye),nt!=null&&G.on("error",nt).on("load",function(At){nt(null,At)}),ie.beforesend.call(G,ge),ge.send(We??null),G},G.abort=function(){return ge.abort(),G},g.rebind(G,ie,"on"),B==null?G:G.get(function(je){return je.length===1?function(We,nt){je(We==null?nt:null)}:je}(B))}Or.forEach(function(le,C){Or.set(le,or(C))}),g.functor=dr,g.xhr=Fr(E),g.dsv=function(le,C){var z=new RegExp('["'+le+`
2]`),B=le.charCodeAt(0);function G(Me,je,We){arguments.length<3&&(We=je,je=null);var nt=tn(Me,C,je==null?ie:ue(je),We);return nt.row=function(bt){return arguments.length?nt.response((je=bt)==null?ie:ue(bt)):je},nt}function ie(Me){return G.parse(Me.responseText)}function ue(Me){return function(je){return G.parse(je.responseText,Me)}}function ge(Me){return Me.map(ye).join(le)}function ye(Me){return z.test(Me)?'"'+Me.replace(/\"/g,'""')+'"':Me}return G.parse=function(Me,je){var We;return G.parseRows(Me,function(nt,bt){if(We)return We(nt,bt-1);var At=function(_t){for(var wt={},xt=nt.length,Ft=0;Ft<xt;++Ft)wt[nt[Ft]]=_t[Ft];return wt};We=je?function(_t,wt){return je(At(_t),wt)}:At})},G.parseRows=function(Me,je){var We,nt,bt={},At={},_t=[],wt=Me.length,xt=0,Ft=0;function Ot(){if(xt>=wt)return At;if(nt)return nt=!1,bt;var er=xt;if(Me.charCodeAt(er)===34){for(var fr=er;fr++<wt;)if(Me.charCodeAt(fr)===34){if(Me.charCodeAt(fr+1)!==34)break;++fr}return xt=fr+2,(kr=Me.charCodeAt(fr+1))===13?(nt=!0,Me.charCodeAt(fr+2)===10&&++xt):kr===10&&(nt=!0),Me.slice(er+1,fr).replace(/""/g,'"')}for(;xt<wt;){var kr,Tr=1;if((kr=Me.charCodeAt(xt++))===10)nt=!0;else if(kr===13)nt=!0,Me.charCodeAt(xt)===10&&(++xt,++Tr);else if(kr!==B)continue;return Me.slice(er,xt-Tr)}return Me.slice(er)}for(;(We=Ot())!==At;){for(var Nt=[];We!==bt&&We!==At;)Nt.push(We),We=Ot();je&&(Nt=je(Nt,Ft++))==null||_t.push(Nt)}return _t},G.format=function(Me){if(Array.isArray(Me[0]))return G.formatRows(Me);var je=new S,We=[];return Me.forEach(function(nt){for(var bt in nt)je.has(bt)||We.push(je.add(bt))}),[We.map(ye).join(le)].concat(Me.map(function(nt){return We.map(function(bt){return ye(nt[bt])}).join(le)})).join(`
3`)},G.formatRows=function(Me){return Me.map(ge).join(`
4`)},G},g.csv=g.dsv(",","text/csv"),g.tsv=g.dsv("	","text/tab-separated-values");var rn,An,Ln,_n,Vr=this[F(this,"requestAnimationFrame")]||function(le){setTimeout(le,17)};function Ir(le,C,z){var B=arguments.length;B<2&&(C=0),B<3&&(z=Date.now());var G=z+C,ie={c:le,t:G,n:null};return An?An.n=ie:rn=ie,An=ie,Ln||(_n=clearTimeout(_n),Ln=1,Vr(xr)),ie}function xr(){var le=Nr(),C=en()-le;C>24?(isFinite(C)&&(clearTimeout(_n),_n=setTimeout(xr,C)),Ln=0):(Ln=1,Vr(xr))}function Nr(){for(var le=Date.now(),C=rn;C;)le>=C.t&&C.c(le-C.t)&&(C.c=null),C=C.n;return le}function en(){for(var le,C=rn,z=1/0;C;)C.c?(C.t<z&&(z=C.t),C=(le=C).n):C=le?le.n=C.n:rn=C.n;return An=le,z}function Qr(le){return le[0]}function yn(le){return le[1]}function un(le){for(var C,z,B,G=le.length,ie=[0,1],ue=2,ge=2;ge<G;ge++){for(;ue>1&&(C=le[ie[ue-2]],z=le[ie[ue-1]],B=le[ge],(z[0]-C[0])*(B[1]-C[1])-(z[1]-C[1])*(B[0]-C[0])<=0);)--ue;ie[ue++]=ge}return ie.slice(0,ue)}function $r(le,C){return le[0]-C[0]||le[1]-C[1]}g.timer=function(){Ir.apply(this,arguments)},g.timer.flush=function(){Nr(),en()},g.round=function(le,C){return C?Math.round(le*(C=Math.pow(10,C)))/C:Math.round(le)}
vendor: 5,519 bytes, line 4
4,g.geom={},g.geom.hull=function(le){var C=Qr,z=yn;if(arguments.length)return B(le);function B(G){if(G.length<3)return[];var ie,ue=dr(C),ge=dr(z),ye=G.length,Me=[],je=[];for(ie=0;ie<ye;ie++)Me.push([+ue.call(this,G[ie],ie),+ge.call(this,G[ie],ie),ie]);for(Me.sort($r),ie=0;ie<ye;ie++)je.push([Me[ie][0],-Me[ie][1]]);var We=un(Me),nt=un(je),bt=nt[0]===We[0],At=nt[nt.length-1]===We[We.length-1],_t=[];for(ie=We.length-1;ie>=0;--ie)_t.push(G[Me[We[ie]][2]]);for(ie=+bt;ie<nt.length-At;++ie)_t.push(G[Me[nt[ie]][2]]);return _t}return B.x=function(G){return arguments.length?(C=G,B):C},B.y=function(G){return arguments.length?(z=G,B):z},B},g.geom.polygon=function(le){return N(le,In),le};var In=g.geom.polygon.prototype=[];function Qt(le,C,z){return(z[0]-C[0])*(le[1]-C[1])<(z[1]-C[1])*(le[0]-C[0])}function Pt(le,C,z,B){var G=le[0],ie=z[0],ue=C[0]-G,ge=B[0]-ie,ye=le[1],Me=z[1],je=C[1]-ye,We=B[1]-Me,nt=(ge*(ye-Me)-We*(G-ie))/(We*ue-ge*je);return[G+nt*ue,ye+nt*je]}function Yt(le){var C=le[0],z=le[le.length-1];return!(C[0]-z[0]||C[1]-z[1])}In.area=function(){for(var le,C=-1,z=this.length,B=this[z-1],G=0;++C<z;)le=B,B=this[C],G+=le[1]*B[0]-le[0]*B[1];return .5*G},In.centroid=function(le){var C,z,B=-1,G=this.length,ie=0,ue=0,ge=this[G-1];for(arguments.length||(le=-1/(6*this.area()));++B<G;)C=ge,ge=this[B],z=C[0]*ge[1]-ge[0]*C[1],ie+=(C[0]+ge[0])*z,ue+=(C[1]+ge[1])*z;return[ie*le,ue*le]},In.clip=function(le){for(var C,z,B,G,ie,ue,ge=Yt(le),ye=-1,Me=this.length-Yt(this),je=this[Me-1];++ye<Me;){for(C=le.slice(),le.length=0,G=this[ye],ie=C[(B=C.length-ge)-1],z=-1;++z<B;)Qt(ue=C[z],je,G)?(Qt(ie,je,G)||le.push(Pt(ie,ue,je,G)),le.push(ue)):Qt(ie,je,G)&&le.push(Pt(ie,ue,je,G)),ie=ue;ge&&le.push(le[0]),je=G}return le};var cr,wr,qr,Ur,br,_r=[],Ar=[];function Mr(){ei(this),this.edge=this.site=this.circle=null}function Cr(le){var C=_r.pop()||new Mr;return C.site=le,C}function Gr(le){Pn(le),qr.remove(le),_r.push(le),ei(le)}function cn(le){var C=le.circle,z=C.x,B=C.cy,G={x:z,y:B},ie=le.P,ue=le.N,ge=[le];Gr(le);for(var ye=ie;ye.circle&&a(z-ye.circle.x)<Tt&&a(B-ye.circle.cy)<Tt;)ie=ye.P,ge.unshift(ye),Gr(ye),ye=ie;ge.unshift(ye),Pn(ye);for(var Me=ue;Me.circle&&a(z-Me.circle.x)<Tt&&a(B-Me.circle.cy)<Tt;)ue=Me.N,ge.push(Me),Gr(Me),Me=ue;ge.push(Me),Pn(Me);var je,We=ge.length;for(je=1;je<We;++je)Me=ge[je],ye=ge[je-1],ua(Me.edge,ye.site,Me.site,G);ye=ge[0],(Me=ge[We-1]).edge=vn(ye.site,Me.site,null,G),pn(ye),pn(Me)}function wn(le){for(var C,z,B,G,ie=le.x,ue=le.y,ge=qr._;ge;)if((B=Kr(ge,ue)-ie)>Tt)ge=ge.L;else{if(!((G=ie-bn(ge,ue))>Tt)){B>-Tt?(C=ge.P,z=ge):G>-Tt?(C=ge,z=ge.N):C=z=ge;break}if(!ge.R){C=ge;break}ge=ge.R}var ye=Cr(le);if(qr.insert(C,ye),C||z){if(C===z)return Pn(C),z=Cr(C.site),qr.insert(ye,z),ye.edge=z.edge=vn(C.site,ye.site),pn(C),void pn(z);if(z){Pn(C),Pn(z);var Me=C.site,je=Me.x,We=Me.y,nt=le.x-je,bt=le.y-We,At=z.site,_t=At.x-je,wt=At.y-We,xt=2*(nt*wt-bt*_t),Ft=nt*nt+bt*bt,Ot=_t*_t+wt*wt,Nt={x:(wt*Ft-bt*Ot)/xt+je,y:(nt*Ot-_t*Ft)/xt+We};ua(z.edge,Me,At,Nt),ye.edge=vn(Me,le,null,Nt),z.edge=vn(le,At,null,Nt),pn(C),pn(z)}else ye.edge=vn(C.site,ye.site)}}function Kr(le,C){var z=le.site,B=z.x,G=z.y,ie=G-C;if(!ie)return B;var ue=le.P;if(!ue)return-1/0;var ge=(z=ue.site).x,ye=z.y,Me=ye-C;if(!Me)return ge;var je=ge-B,We=1/ie-1/Me,nt=je/Me;return We?(-nt+Math.sqrt(nt*nt-2*We*(je*je/(-2*Me)-ye+Me/2+G-ie/2)))/We+B:(B+ge)/2}function bn(le,C){var z=le.N;if(z)return Kr(z,C);var B=le.site;return B.y===C?B.x:1/0}function zr(le){this.site=le,this.edges=[]}function Wr(le,C){return C.angle-le.angle}function mn(){ei(this),this.x=this.y=this.arc=this.site=this.cy=null}function pn(le){var C=le.P,z=le.N;if(C&&z){var B=C.site,G=le.site,ie=z.site;if(B!==ie){var ue=G.x,ge=G.y,ye=B.x-ue,Me=B.y-ge,je=ie.x-ue,We=2*(ye*(wt=ie.y-ge)-Me*je);if(!(We>=-1e-12)){var nt=ye*ye+Me*Me,bt=je*je+wt*wt,At=(wt*nt-Me*bt)/We,_t=(ye*bt-je*nt)/We,wt=_t+ge,xt=Ar.pop()||new mn;xt.arc=le,xt.site=G,xt.x=At+ue,xt.y=wt+Math.sqrt(At*At+_t*_t),xt.cy=wt,le.circle=xt;for(var Ft=null,Ot=br._;Ot;)if(xt.y<Ot.y||xt.y===Ot.y&&xt.x<=Ot.x){if(!Ot.L){Ft=Ot.P;break}Ot=Ot.L}else{if(!Ot.R){Ft=Ot;break}Ot=Ot.R}br.insert(Ft,xt),Ft||(Ur=xt)}}}}function Pn(le){var C=le.circle;C&&(C.P||(Ur=C.N),br.remove(C),Ar.push(C),ei(C),le.circle=null)}function aa(le,C){var z=le.b;if(z)return!0;var B,G,ie=le.a,ue=C[0][0],ge=C[1][0],ye=C[0][1],Me=C[1][1],je=le.l,We=le.r,nt=je.x,bt=je.y,At=We.x,_t=We.y,wt=(nt+At)/2,xt=(bt+_t)/2;if(_t===bt){if(wt<ue||wt>=ge)return;if(nt>At){if(ie){if(ie.y>=Me)return}else ie={x:wt,y:ye};z={x:wt,y:Me}}else{if(ie){if(ie.y<ye)return}else ie={x:wt,y:Me};z={x:wt,y:ye}}}else if(G=xt-(B=(nt-At)/(_t-bt))*wt,B<-1||B>1)if(nt>At){if(ie){if(ie.y>=Me)return}else ie={x:(ye-G)/B,y:ye};z={x:(Me-G)/B,y:Me}}else{if(ie){if(ie.y<ye)return}else ie={x:(Me-G)/B,y:Me};z={x:(ye-G)/B,y:ye}}else if(bt<_t){if(ie){if(ie.x>=ge)return}else ie={x:ue,y:B*ue+G};z={x:ge,y:B*ge+G}}else{if(ie){if(ie.x<ue)return}else ie={x:ge,y:B*ge+G};z={x:ue,y:B*ue+G}}return le.a=ie,le.b=z,!0}function qn(le,C){this.l=le,this.r=C,this.a=this.b=null}function vn(le,C,z,B){var G=new qn(le,C);return cr.push(G),z&&ua(G,le,C,z),B&&ua(G,C,le,B),wr[le.i].edges.push(new Ya(G,le,C)),wr[C.i].edges.push(new Ya(G,C,le)),G}function ea(le,C,z){var B=new qn(le,null);return B.a=C,B.b=z,cr.push(B),B}function ua(le,C,z,B){le.a||le.b?le.l===z?le.b=B:le.a=B:(le.a=B,le.l=C,le.r=z)}function Ya(le,C,z){var B=le.a,G=le.b;this.edge=le,this.site=C,this.angle=z?Math.atan2(z.y-C.y,z.x-C.x):le.l===C?Math.atan2(G.x-B.x,B.y-G.y):Math.atan2(B.x-G.x,G.y-B.y)}function Ei(){this._=null}
4function ei(le){le.U=le.C=le.L=le.R=le.P=le.N=null}function gi(le,C){var z=C,B=C.R,G=z.U;G?G.L===z?G.L=B:G.R=B:le._=B,B.U=G,z.U=B,z.R=B.L,z.R&&(z.R.U=z),B.L=z}function ka(le,C){var z=C,B=C.L,G=z.U;G?G.L===z?G.L=B:G.R=B:le._=B,B.U=G,z.U=B,z.L=B.R,z.L&&(z.L.U=z),B.R=z}function Fa(le){for(;le.L;)le=le.L;return le}function so(le,C){var z,B,G,ie=le.sort(Do).pop();for(cr=[],wr=new Array(le.length),qr=new Ei,br=new Ei;;)if(G=Ur,ie&&(!G||ie.y<G.y||ie.y===G.y&&ie.x<G.x))ie.x===z&&ie.y===B||(wr[ie.i]=new zr(ie),wn(ie),z=ie.x,B=ie.y),ie=le.pop();else{if(!G)break;cn(G.arc)}C&&(function(ge){for(var ye,Me,je,We,nt,bt=cr,At=(Me=ge[0][0],je=ge[0][1],We=ge[1][0],nt=ge[1][1],function(wt){var xt,Ft=wt.a,Ot=wt.b,Nt=Ft.x,er=Ft.y,fr=0,kr=1,Tr=Ot.x-Nt,Jr=Ot.y-er;if(xt=Me-Nt,Tr||!(xt>0)){if(xt/=Tr,Tr<0){if(xt<fr)return;xt<kr&&(kr=xt)}else if(Tr>0){if(xt>kr)return;xt>fr&&(fr=xt)}if(xt=We-Nt,Tr||!(xt<0)){if(xt/=Tr,Tr<0){if(xt>kr)return;xt>fr&&(fr=xt)}else if(Tr>0){if(xt<fr)return;xt<kr&&(kr=xt)}if(xt=je-er,Jr||!(xt>0)){if(xt/=Jr,Jr<0){if(xt<fr)return;xt<kr&&(kr=xt)}else if(Jr>0){if(xt>kr)return;xt>fr&&(fr=xt)}if(xt=nt-er,Jr||!(xt<0)){if(xt/=Jr,Jr<0){if(xt>kr)return;xt>fr&&(fr=xt)}else if(Jr>0){if(xt<fr)return;xt<kr&&(kr=xt)}return fr>0&&(wt.a={x:Nt+fr*Tr,y:er+fr*Jr}),kr<1&&(wt.b={x:Nt+kr*Tr,y:er+kr*Jr}),wt}}}}}),_t=bt.length;_t--;)(!aa(ye=bt[_t],ge)||!At(ye)||a(ye.a.x-ye.b.x)<Tt&&a(ye.a.y-ye.b.y)<Tt)&&(ye.a=ye.b=null,bt.splice(_t,1))}(C),function(ge){for(var ye,Me,je,We,nt,bt,At,_t,wt,xt,Ft=ge[0][0],Ot=ge[1][0],Nt=ge[0][1],er=ge[1][1],fr=wr,kr=fr.length;kr--;)if((nt=fr[kr])&&nt.prepare())for(_t=(At=nt.edges).length,bt=0;bt<_t;)je=(xt=At[bt].end()).x,We=xt.y,ye=(wt=At[++bt%_t].start()).x,Me=wt.y,(a(je-ye)>
4Tt||a(We-Me)>Tt)&&(At.splice(bt,0,new Ya(ea(nt.site,xt,a(je-Ft)<Tt&&er-We>Tt?{x:Ft,y:a(ye-Ft)<Tt?Me:er}:a(We-er)<Tt&&Ot-je>Tt?{x:a(Me-er)<Tt?ye:Ot,y:er}:a(je-Ot)<Tt&&We-Nt>Tt?{x:Ot,y:a(ye-Ot)<Tt?Me:Nt}:a(We-Nt)<Tt&&je-Ft>Tt?{x:a(Me-Nt)<Tt?ye:Ft,y:Nt}:null),nt.site,null)),++_t)}(C));var ue={cells:wr,edges:cr};return qr=br=cr=wr=null,ue}function Do(le,C){return C.y-le.y||C.x-le.x}zr.prototype.prepare=function(){for(var le,C=this.edges,z=C.length;z--;)(le=C[z].edge).b&&le.a||C.splice(z,1);return C.sort(Wr),C.length},Ya.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Ei.prototype={insert:function(le,C){var z,B,G;if(le){if(C.P=le,C.N=le.N,le.N&&(le.N.P=C),le.N=C,le.R){for(le=le.R;le.L;)le=le.L;le.L=C}else le.R=C;z=le}else this._?(le=Fa(this._),C.P=null,C.N=le,le.P=le.L=C,z=le):(C.P=C.N=null,this._=C,z=null);for(C.L=C.R=null,C.U=z,C.C=!0,le=C;z&&z.C;)z===(B=z.U).L?(G=B.R)&&G.C?(z.C=G.C=!1,B.C=!0,le=B):(le===z.R&&(gi(this,z),z=(le=z).U),z.C=!1,B.C=!0,ka(this,B)):(G=B.L)&&G.C?(z.C=G.C=!1,B.C=!0,le=B):(le===z.L&&(ka(this,z),z=(le=z).U),z.C=!1,B.C=!0,gi(this,B)),z=le.U;this._.C=!1},remove:function(le){le.N&&(le.N.P=le.P),le.P&&(le.P.N=le.N),le.N=le.P=null;var C,z,B,G=le.U,ie=le.L,ue=le.R;if(z=ie?ue?Fa(ue):ie:ue,G?G.L===le?G.L=z:G.R=z:this._=z,ie&&ue?(B=z.C,z.C=le.C,z.L=ie,ie.U=z,z!==ue?(G=z.U,z.U=le.U,le=z.R,G.L=le,z.R=ue,ue.U=z):(z.U=G,G=z,le=z.R)):(B=le.C,le=z),le&&(le.U=G),!B)if(le&&le.C)le.C=!1;else{do{if(le===this._)break;if(le===G.L){if((C=G.R).C&&(C.C=!1,G.C=!0,gi(this,G),C=G.R),C.L&&C.L.C||C.R&&C.R.C){C.R&&C.R.C||(C.L.C=!1,C.C=!0,ka(this,C),C=G.R),C.C=G.C,G.C=C.R.C=!1,gi(this,G),le=this._;break}}else if((C=G.L).C&&(C.C=!1,G.C=!0,ka(this,G),C=G.L),C.L&&C.L.C||C.R&&C.R.C){C.L&&C.L.C||(C.R.C=!1,C.C=!0,gi(this,C),C=G.L),C.C=G.C,G.C=C.L.C=!1,ka(this,G),le=this._;break}C.C=!0,le=G,G=G.U}while(!le.C);le&&(le.C=!1)}}},g.geom.voronoi=function(le){var C=Qr,z=yn,B=C,G=z,ie=qo;if(le)return ue(le);function ue(ye){var Me=new Array(ye.length),je=ie[0][0],We=ie[0][1],nt=ie[1][0],bt=ie[1][1];return so(ge(ye),ie).cells.forEach(function(At,_t){var wt=At.edges,xt=At.site;(Me[_t]=wt.length?wt.map(function(Ft){var Ot=Ft.start();return[Ot.x,Ot.y]}):xt.x>=je&&xt.x<=nt&&xt.y>=We&&xt.y<=bt?[[je,bt],[nt,bt],[nt,We],[je,We]]:[]).point=ye[_t]}),Me}function ge(ye){return ye.map(function(Me,je){return{x:Math.round(B(Me,je)/Tt)*Tt,y:Math.round(G(Me,je)/Tt)*Tt,i:je}})}return ue.links=function(ye){return so(ge(ye)).edges.filter(function(Me){return Me.l&&Me.r}).map(function(Me){return{source:ye[Me.l.i],target:ye[Me.r.i]}})},ue.triangles=function(ye){var Me=[];return so(ge(ye)).cells.forEach(function(je,We){for(var nt,bt,At,_t,wt=je.site,xt=je.edges.sort(Wr),Ft=-1,Ot=xt.length,Nt=xt[Ot-1].edge,er=Nt.l===wt?Nt.r:Nt.l;++Ft<Ot;)nt=er,er=(Nt=xt[Ft].edge).l===wt?Nt.r:Nt.l,We<nt.i&&We<er.i&&(At=nt,_t=er,((bt=wt).x-_t.x)*(At.y-bt.y)-(bt.x-At.x)*(_t.y-bt.y)<0)&&Me.push([ye[We],ye[nt.i],ye[er.i]])}),Me},ue.x=function(ye){return arguments.length?(B=dr(C=ye),ue):C},ue.y=function(ye){return arguments.length?(G=dr(z=ye),ue):z},ue.clipExtent=function(ye){return arguments.length?(ie=ye??qo,ue):ie===qo?null:ie},ue.size=function(ye){return arguments.length?ue.clipExtent(ye&&[[0,0],ye]):ie===qo?null:ie&&ie[1]},ue};var qo=[[-1e6,-1e6],[1e6,1e6]];function Vi(le){return le.x}function Gi(le){return le.y}function Ro(le,C,z,B,G,ie){if(!le(C,z,B,G,ie)){var ue=.5*(z+G),ge=.5*(B+ie),ye=C.nodes;ye[0]&&Ro(le,ye[0],z,B,ue,ge),ye[1]&&Ro(le,ye[1],ue,B,G,ge),ye[2]&&Ro(le,ye[2],z,ge,ue,ie),ye[3]&&Ro(le,ye[3],ue,ge,G,ie)}}function ja(le,C,z,B,G,ie,ue){var ge,ye=1/0;return function Me(je,We,nt,bt,At){if(!(We>ie||nt>ue||bt<B||At<G)){if(_t=je.point){var _t,wt=C-je.x,xt=z-je.y,Ft=wt*wt+xt*xt;if(Ft<ye){var Ot=Math.sqrt(ye=Ft);B=C-Ot,G=z-Ot,ie=C+Ot,ue=z+Ot,ge=_t}}for(var Nt=je.nodes,er=.5*(We+bt),fr=.5*(nt+At),kr=(z>=fr)<<1|C>=er,Tr=kr+4;kr<Tr;++kr)if(je=Nt[3&kr])switch(3&kr){case 0:Me(je,We,nt,er,fr);break;case 1:Me(je,er,nt,bt,fr);break;case 2:Me(je,We,fr,er,At);break;case 3:Me(je,er,fr,bt,At)}}}(le,B,G,ie,ue),ge}function wo(le,C){le=g.rgb(le),C=g.rgb(C);var z=le.r,B=le.g,G=le.b,ie=C.r-z,ue=C.g-B,ge=C.b-G;return function(ye){return"#"+sr(Math.round(z+ie*ye))+sr(Math.round(B+ue*ye))+sr(Math.round(G+ge*ye))}}function lo(le,C){var z,B={},G={};for(z in le)z in C?B[z]=Ii(le[z],C[z]):G[z]=le[z];for(z in C)z in le||(G[z]=C[z]);return function(ie){for(z in B)G[z]=B[z](ie);return G}}function mi(le,C){return le=+le,C=+C,function(z){return le*(1-z)+C*z}}function Yi(le,C){var z,B,G,ie=co.lastIndex=xo.lastIndex=0,ue=-1,ge=[],ye=[];for(le+="",C+="";(z=co.exec(le))&&(B=xo.exec(C));)(G=B.index)>ie&&(G=C.slice(ie,G),ge[ue]?ge[ue]+=G:ge[++ue]=G),(z=z[0])===(B=B[0])?ge[ue]?ge[ue]+=B:ge[++ue]=B:(ge[++ue]=null,ye.push({i:ue,x:mi(z,B)})),ie=xo.lastIndex;return ie<C.length&&(G=C.slice(ie),ge[ue]?ge[ue]+=G:ge[++ue]=G),ge.length<2?ye[0]?(C=ye[0].x,function(Me){return C(Me)+""}):function(){return C}:(C=ye.length,function(Me){for(var je,We=0;We<C;++We)ge[(je=ye[We]).i]=je.x(Me);return ge.join("")})}g.geom.delaunay=function(le){return g.geom.voronoi().triangles(le)},g.geom.quadtree=function(le,C,z,B,G){var ie,ue=Qr,ge=yn;if(ie=arguments.length)return ue=Vi,ge=Gi,ie===3&&(G=z,B=C,z=C=0),ye(le);function ye(Me){var je,We,nt,bt,At,_t,wt,xt,Ft,Ot=dr(ue),Nt=dr(ge);
4if(C!=null)_t=C,wt=z,xt=B,Ft=G;else if(xt=Ft=-(_t=wt=1/0),We=[],nt=[],At=Me.length,ie)for(bt=0;bt<At;++bt)(je=Me[bt]).x<_t&&(_t=je.x),je.y<wt&&(wt=je.y),je.x>xt&&(xt=je.x),je.y>Ft&&(Ft=je.y),We.push(je.x),nt.push(je.y);else for(bt=0;bt<At;++bt){var er=+Ot(je=Me[bt],bt),fr=+Nt(je,bt);er<_t&&(_t=er),fr<wt&&(wt=fr),er>xt&&(xt=er),fr>Ft&&(Ft=fr),We.push(er),nt.push(fr)}var kr=xt-_t,Tr=Ft-wt;function Jr(on,Nn,Gn,oa,jr,Mn,Yn,Vn){if(!isNaN(Gn)&&!isNaN(oa))if(on.leaf){var Qn=on.x,la=on.y;if(Qn!=null)if(a(Qn-Gn)+a(la-oa)<.01)Xr(on,Nn,Gn,oa,jr,Mn,Yn,Vn);else{var wa=on.point;on.x=on.y=on.point=null,Xr(on,wa,Qn,la,jr,Mn,Yn,Vn),Xr(on,Nn,Gn,oa,jr,Mn,Yn,Vn)}else on.x=Gn,on.y=oa,on.point=Nn}else Xr(on,Nn,Gn,oa,jr,Mn,Yn,Vn)}function Xr(on,Nn,Gn,oa,jr,Mn,Yn,Vn){var Qn=.5*(jr+Yn),la=.5*(Mn+Vn),wa=Gn>=Qn,Zn=oa>=la,ma=Zn<<1|wa;on.leaf=!1,wa?jr=Qn:Yn=Qn,Zn?Mn=la:Vn=la,Jr(on=on.nodes[ma]||(on.nodes[ma]={leaf:!0,nodes:[],point:null,x:null,y:null}),Nn,Gn,oa,jr,Mn,Yn,Vn)}kr>Tr?Ft=wt+kr:xt=_t+Tr;var hn={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(on){Jr(hn,on,+Ot(on,++bt),+Nt(on,bt),_t,wt,xt,Ft)},visit:function(on){Ro(on,hn,_t,wt,xt,Ft)},find:function(on){return ja(hn,on[0],on[1],_t,wt,xt,Ft)}};if(bt=-1,C==null){for(;++bt<At;)Jr(hn,Me[bt],We[bt],nt[bt],_t,wt,xt,Ft);--bt}else Me.forEach(hn.add);return We=nt=Me=je=null,hn}return ye.x=function(Me){return arguments.length?(ue=Me,ye):ue},ye.y=function(Me){return arguments.length?(ge=Me,ye):ge},ye.extent=function(Me){return arguments.length?(Me==null?C=z=B=G=null:(C=+Me[0][0],z=+Me[0][1],B=+Me[1][0],G=+Me[1][1]),ye):C==null?null:[[C,z],[B,G]]},ye.size=function(Me){return arguments.length?(Me==null?C=z=B=G=null:(C=z=0,B=+Me[0],G=+Me[1]),ye):C==null?null:[B-C,G-z]},ye},g.interpolateRgb=wo,g.interpolateObject=lo,g.interpolateNumber=mi,g.interpolateString=Yi;var co=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xo=new RegExp(co.source,"g");function Ii(le,C){for(var z,B=g.interpolators.length;--B>=0&&!(z=g.interpolators[B](le,C)););return z}function li(le,C){var z,B=[],G=[],ie=le.length,ue=C.length,ge=Math.min(le.length,C.length);for(z=0;z<ge;++z)B.push(Ii(le[z],C[z]));for(;z<ie;++z)G[z]=le[z];for(;z<ue;++z)G[z]=C[z];return function(ye){for(z=0;z<ge;++z)G[z]=B[z](ye);return G}}g.interpolate=Ii,g.interpolators=[function(le,C){var z=typeof C;return(z==="string"?Or.has(C.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(C)?wo:Yi:C instanceof ht?wo:Array.isArray(C)?li:z==="object"&&isNaN(C)?lo:mi)(le,C)}],g.interpolateArray=li;var Hi=function(){return E},gs=g.map({linear:Hi,poly:function(le){return function(C){return Math.pow(C,le)}},quad:function(){return bs},cubic:function(){return _s},sin:function(){return ws},exp:function(){return To},circle:function(){return ko},elastic:function(le,C){var z;return arguments.length<2&&(C=.45),arguments.length?z=C/Kt*Math.asin(1/le):(le=1,z=C/4),function(B){return 1+le*Math.pow(2,-10*B)*Math.sin((B-z)*Kt/C)}},back:function(le){return le||(le=1.70158),function(C){return C*C*((le+1)*C-le)}},bounce:function(){return Fo}}),xs=g.map({in:E,out:cs,"in-out":Jo,"out-in":function(le){return Jo(cs(le))}});function Ua(le){return function(C){return C<=0?0:C>=1?1:le(C)}}function cs(le){return function(C){return 1-le(1-C)}}function Jo(le){return function(C){return .5*(C<.5?le(2*C):2-le(2-2*C))}}function bs(le){return le*le}function _s(le){return le*le*le}function ms(le){if(le<=0)return 0;if(le>=1)return 1;var C=le*le,z=C*le;return 4*(le<.5?z:3*(le-C)+z-.75)}function ws(le){return 1-Math.cos(le*qe)}function To(le){return Math.pow(2,10*(le-1))}function ko(le){return 1-Math.sqrt(1-le*le)}function Fo(le){return le<1/2.75?7.5625*le*le:le<2/2.75?7.5625*(le-=1.5/2.75)*le+.75:le<2.5/2.75?7.5625*(le-=2.25/2.75)*le+.9375:7.5625*(le-=2.625/2.75)*le+.984375}function Bo(le,C){return C-=le,function(z){return Math.round(le+C*z)}}function No(le){var C,z,B,G=[le.a,le.b],ie=[le.c,le.d],ue=uo(G),ge=Ko(G,ie),ye=uo(((C=ie)[0]+=(B=-ge)*(z=G)[0],C[1]+=B*z[1],C))||0;G[0]*ie[1]<ie[0]*G[1]&&(G[0]*=-1,G[1]*=-1,ue*=-1,ge*=-1),this.rotate=(ue?Math.atan2(G[1],G[0]):Math.atan2(-ie[0],ie[1]))*Xe,this.translate=[le.e,le.f],this.scale=[ue,ye],this.skew=ye?Math.atan2(ge,ye)*Xe:0}function Ko(le,C){return le[0]*C[0]+le[1]*C[1]}function uo(le){var C=Math.sqrt(Ko(le,le));return C&&(le[0]/=C,le[1]/=C),C}g.ease=function(le){var C=le.indexOf("-"),z=C>=0?le.slice(0,C):le,B=C>=0?le.slice(C+1):"in";return z=gs.get(z)||Hi,Ua((B=xs.get(B)||E)(z.apply(null,m.call(arguments,1
vendor: 1,742 bytes, line 4
4))))},g.interpolateHcl=function(le,C){le=g.hcl(le),C=g.hcl(C);var z=le.h,B=le.c,G=le.l,ie=C.h-z,ue=C.c-B,ge=C.l-G;return isNaN(ue)&&(ue=0,B=isNaN(B)?C.c:B),isNaN(ie)?(ie=0,z=isNaN(z)?C.h:z):ie>180?ie-=360:ie<-180&&(ie+=360),function(ye){return Ze(z+ie*ye,B+ue*ye,G+ge*ye)+""}},g.interpolateHsl=function(le,C){le=g.hsl(le),C=g.hsl(C);var z=le.h,B=le.s,G=le.l,ie=C.h-z,ue=C.s-B,ge=C.l-G;return isNaN(ue)&&(ue=0,B=isNaN(B)?C.s:B),isNaN(ie)?(ie=0,z=isNaN(z)?C.h:z):ie>180?ie-=360:ie<-180&&(ie+=360),function(ye){return ot(z+ie*ye,B+ue*ye,G+ge*ye)+""}},g.interpolateLab=function(le,C){le=g.lab(le),C=g.lab(C);var z=le.l,B=le.a,G=le.b,ie=C.l-z,ue=C.a-B,ge=C.b-G;return function(ye){return Gt(z+ie*ye,B+ue*ye,G+ge*ye)+""}},g.interpolateRound=Bo,g.transform=function(le){var C=v.createElementNS(g.ns.prefix.svg,"g");return(g.transform=function(z){if(z!=null){C.setAttribute("transform",z);var B=C.transform.baseVal.consolidate()}return new No(B?B.matrix:us)})(le)},No.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var us={a:1,b:0,c:0,d:1,e:0,f:0};function ao(le){return le.length?le.pop()+",":""}function jo(le,C){var z=[],B=[];return le=g.transform(le),C=g.transform(C),function(G,ie,ue,ge){if(G[0]!==ie[0]||G[1]!==ie[1]){var ye=ue.push("translate(",null,",",null,")");ge.push({i:ye-4,x:mi(G[0],ie[0])},{i:ye-2,x:mi(G[1],ie[1])})}else(ie[0]||ie[1])&&ue.push("translate("+ie+")")}(le.translate,C.translate,z,B),function(G,ie,ue,ge){G!==ie?(G-ie>180?ie+=360:ie-G>180&&(G+=360),ge.push({i:ue.push(ao(ue)+"rotate(",null,")")-2,x:mi(G,ie)})):ie&&ue.push(ao(ue)+"rotate("+ie+")")}(le.rotate,C.rotate,z,B),function(G,ie,ue,ge){G!==ie?ge.push({i:ue.push(ao(ue)+"skewX(",
vendor: 5,665 bytes, line 4
4null,")")-2,x:mi(G,ie)}):ie&&ue.push(ao(ue)+"skewX("+ie+")")}(le.skew,C.skew,z,B),function(G,ie,ue,ge){if(G[0]!==ie[0]||G[1]!==ie[1]){var ye=ue.push(ao(ue)+"scale(",null,",",null,")");ge.push({i:ye-4,x:mi(G[0],ie[0])},{i:ye-2,x:mi(G[1],ie[1])})}else ie[0]===1&&ie[1]===1||ue.push(ao(ue)+"scale("+ie+")")}(le.scale,C.scale,z,B),le=C=null,function(G){for(var ie,ue=-1,ge=B.length;++ue<ge;)z[(ie=B[ue]).i]=ie.x(G);return z.join("")}}function fs(le,C){return C=(C-=le=+le)||1/C,function(z){return(z-le)/C}}function Mo(le,C){return C=(C-=le=+le)||1/C,function(z){return Math.max(0,Math.min(1,(z-le)/C))}}function Ba(le){for(var C=le.source,z=le.target,B=function(ue,ge){if(ue===ge)return ue;for(var ye=Ne(ue),Me=Ne(ge),je=ye.pop(),We=Me.pop(),nt=null;je===We;)nt=je,je=ye.pop(),We=Me.pop();return nt}(C,z),G=[C];C!==B;)C=C.parent,G.push(C);for(var ie=G.length;z!==B;)G.splice(ie,0,z),z=z.parent;return G}function Ne(le){for(var C=[],z=le.parent;z!=null;)C.push(le),le=z,z=z.parent;return C.push(le),C}function He(le){le.fixed|=2}function $e(le){le.fixed&=-7}function at(le){le.fixed|=4,le.px=le.x,le.py=le.y}function mt(le){le.fixed&=-5}g.interpolateTransform=jo,g.layout={},g.layout.bundle=function(){return function(le){for(var C=[],z=-1,B=le.length;++z<B;)C.push(Ba(le[z]));return C}},g.layout.chord=function(){var le,C,z,B,G,ie,ue,ge={},ye=0;function Me(){var We,nt,bt,At,_t,wt={},xt=[],Ft=g.range(B),Ot=[];for(le=[],C=[],We=0,At=-1;++At<B;){for(nt=0,_t=-1;++_t<B;)nt+=z[At][_t];xt.push(nt),Ot.push(g.range(B)),We+=nt}for(G&&Ft.sort(function(hn,on){return G(xt[hn],xt[on])}),ie&&Ot.forEach(function(hn,on){hn.sort(function(Nn,Gn){return ie(z[on][Nn],z[on][Gn])})}),We=(Kt-ye*B)/We,nt=0,At=-1;++At<B;){for(bt=nt,_t=-1;++_t<B;){var Nt=Ft[At],er=Ot[Nt][_t],fr=z[Nt][er],kr=nt,Tr=nt+=fr*We;wt[Nt+"-"+er]={index:Nt,subindex:er,startAngle:kr,endAngle:Tr,value:fr}}C[Nt]={index:Nt,startAngle:bt,endAngle:nt,value:xt[Nt]},nt+=ye}for(At=-1;++At<B;)for(_t=At-1;++_t<B;){var Jr=wt[At+"-"+_t],Xr=wt[_t+"-"+At];(Jr.value||Xr.value)&&le.push(Jr.value<Xr.value?{source:Xr,target:Jr}:{source:Jr,target:Xr})}ue&&je()}function je(){le.sort(function(We,nt){return ue((We.source.value+We.target.value)/2,(nt.source.value+nt.target.value)/2)})}return ge.matrix=function(We){return arguments.length?(B=(z=We)&&z.length,le=C=null,ge):z},ge.padding=function(We){return arguments.length?(ye=We,le=C=null,ge):ye},ge.sortGroups=function(We){return arguments.length?(G=We,le=C=null,ge):G},ge.sortSubgroups=function(We){return arguments.length?(ie=We,le=null,ge):ie},ge.sortChords=function(We){return arguments.length?(ue=We,le&&je(),ge):ue},ge.chords=function(){return le||Me(),le},ge.groups=function(){return C||Me(),C},ge},g.layout.force=function(){var le,C,z,B,G,ie,ue={},ge=g.dispatch("start","tick","end"),ye=[1,1],Me=.9,je=dt,We=Mt,nt=-30,bt=Jt,At=.1,_t=.64,wt=[],xt=[];function Ft(Nt){return function(er,fr,kr,Tr){if(er.point!==Nt){var Jr=er.cx-Nt.x,Xr=er.cy-Nt.y,hn=Tr-fr,on=Jr*Jr+Xr*Xr;if(hn*hn/_t<on){if(on<bt){var Nn=er.charge/on;Nt.px-=Jr*Nn,Nt.py-=Xr*Nn}return!0}er.point&&on&&on<bt&&(Nn=er.pointCharge/on,Nt.px-=Jr*Nn,Nt.py-=Xr*Nn)}return!er.charge}}function Ot(Nt){Nt.px=g.event.x,Nt.py=g.event.y,ue.resume()}return ue.tick=function(){if((z*=.99)<.005)return le=null,ge.end({type:"end",alpha:z=0}),!0;var Nt,er,fr,kr,Tr,Jr,Xr,hn,on,Nn=wt.length,Gn=xt.length;for(er=0;er<Gn;++er)kr=(fr=xt[er]).source,(Jr=(hn=(Tr=fr.target).x-kr.x)*hn+(on=Tr.y-kr.y)*on)&&(hn*=Jr=z*G[er]*((Jr=Math.sqrt(Jr))-B[er])/Jr,on*=Jr,Tr.x-=hn*(Xr=kr.weight+Tr.weight?kr.weight/(kr.weight+Tr.weight):.5),Tr.y-=on*Xr,kr.x+=hn*(Xr=1-Xr),kr.y+=on*Xr);if((Xr=z*At)&&(hn=ye[0]/2,on=ye[1]/2,er=-1,Xr))for(;++er<Nn;)(fr=wt[er]).x+=(hn-fr.x)*Xr,fr.y+=(on-fr.y)*Xr;if(nt)for(function oa(jr,Mn,Yn){var Vn=0,Qn=0;if(jr.charge=0,!jr.leaf)for(var la,wa=jr.nodes,Zn=wa.length,ma=-1;++ma<Zn;)(la=wa[ma])!=null&&(oa(la,Mn,Yn),jr.charge+=la.charge,Vn+=la.charge*la.cx,Qn+=la.charge*la.cy);if(jr.point){jr.leaf||(jr.point.x+=Math.random()-.5,jr.point.y+=Math.random()-.5);var pa=Mn*Yn[jr.point.index];jr.charge+=jr.pointCharge=pa,Vn+=pa*jr.point.x,Qn+=pa*jr.point.y}jr.cx=Vn/jr.charge,jr.cy=Qn/jr.charge}(Nt=g.geom.quadtree(wt),z,ie),er=-1;++er<Nn;)(fr=wt[er]).fixed||Nt.visit(Ft(fr));for(er=-1;++er<Nn;)(fr=wt[er]).fixed?(fr.x=fr.px,fr.y=fr.py):(fr.x-=(fr.px-(fr.px=fr.x))*Me,fr.y-=(fr.py-(fr.py=fr.y))*Me);ge.tick({type:"tick",alpha:z})},ue.nodes=function(Nt){return arguments.length?(wt=Nt,ue):wt},ue.links=function(Nt){return arguments.length?(xt=Nt,ue):xt},ue.size=function(Nt){return arguments.length?(ye=Nt,ue):ye},ue.linkDistance=function(Nt){return arguments.length?(je=typeof Nt=="function"?Nt:+Nt,ue):je},ue.distance=ue.linkDistance,ue.linkStrength=function(Nt){return arguments.length?(We=typeof Nt=="function"?Nt:+Nt,ue):We},ue.friction=function(Nt){return arguments.length?(Me=+Nt,ue):Me},ue.charge=function(Nt){return arguments.length?(nt=typeof Nt=="function"?Nt:+Nt,ue):nt},ue.chargeDistance=function(Nt){return arguments.length?(bt=Nt*Nt,ue):Math.sqrt(bt)},ue.gravity=function(Nt){return arguments.length?(At=+Nt,ue):At},ue.theta=function(Nt){return arguments.length?(_t=Nt*Nt,ue):Math.sqrt(_t)},ue.alpha=function(Nt){return arguments.length?(Nt=+Nt,z?Nt>0?z=Nt:(le.c=null,le.t=NaN,le=null,ge.end({type:"end",alpha:z=0})):Nt>0&&(ge.start({type:"start",alpha:z=Nt}),le=Ir(ue.tick)),ue):z},ue.start=function(){var Nt,er,fr,kr=wt.length,Tr=xt.length,Jr=ye[0],Xr=ye[1];for(Nt=0;Nt<kr;++Nt)(fr=wt[Nt]).index=Nt,fr.weight=0;for(Nt=0;Nt<Tr;++Nt)typeof(fr=xt[Nt]).source=="number"&&(fr.source=wt[fr.source]),typeof fr.target=="number"&&(fr.target=wt[fr.target]),++fr.source.weight,++fr.target.weight;for(Nt=0;Nt<kr;
vendor: 5,161 bytes, line 4
4++Nt)fr=wt[Nt],isNaN(fr.x)&&(fr.x=hn("x",Jr)),isNaN(fr.y)&&(fr.y=hn("y",Xr)),isNaN(fr.px)&&(fr.px=fr.x),isNaN(fr.py)&&(fr.py=fr.y);if(B=[],typeof je=="function")for(Nt=0;Nt<Tr;++Nt)B[Nt]=+je.call(this,xt[Nt],Nt);else for(Nt=0;Nt<Tr;++Nt)B[Nt]=je;if(G=[],typeof We=="function")for(Nt=0;Nt<Tr;++Nt)G[Nt]=+We.call(this,xt[Nt],Nt);else for(Nt=0;Nt<Tr;++Nt)G[Nt]=We;if(ie=[],typeof nt=="function")for(Nt=0;Nt<kr;++Nt)ie[Nt]=+nt.call(this,wt[Nt],Nt);else for(Nt=0;Nt<kr;++Nt)ie[Nt]=nt;function hn(on,Nn){if(!er){for(er=new Array(kr),Mn=0;Mn<kr;++Mn)er[Mn]=[];for(Mn=0;Mn<Tr;++Mn){var Gn=xt[Mn];er[Gn.source.index].push(Gn.target),er[Gn.target.index].push(Gn.source)}}for(var oa,jr=er[Nt],Mn=-1,Yn=jr.length;++Mn<Yn;)if(!isNaN(oa=jr[Mn][on]))return oa;return Math.random()*Nn}return ue.resume()},ue.resume=function(){return ue.alpha(.1)},ue.stop=function(){return ue.alpha(0)},ue.drag=function(){if(C||(C=g.behavior.drag().origin(E).on("dragstart.force",He).on("drag.force",Ot).on("dragend.force",$e)),!arguments.length)return C;this.on("mouseover.force",at).on("mouseout.force",mt).call(C)},g.rebind(ue,ge,"on")};var dt=20,Mt=1,Jt=1/0;function $t(le,C){return g.rebind(le,C,"sort","children","value"),le.nodes=le,le.links=Pr,le}function Wt(le,C){for(var z=[le];(le=z.pop())!=null;)if(C(le),(G=le.children)&&(B=G.length))for(var B,G;--B>=0;)z.push(G[B])}function tr(le,C){for(var z=[le],B=[];(le=z.pop())!=null;)if(B.push(le),(ie=le.children)&&(G=ie.length))for(var G,ie,ue=-1;++ue<G;)z.push(ie[ue]);for(;(le=B.pop())!=null;)C(le)}function ur(le){return le.children}function mr(le){return le.value}function yr(le,C){return C.value-le.value}function Pr(le){return g.merge(le.map(function(C){return(C.children||[]).map(function(z){return{source:C,target:z}})}))}g.layout.hierarchy=function(){var le=yr,C=ur,z=mr;function B(G){var ie,ue=[G],ge=[];for(G.depth=0;(ie=ue.pop())!=null;)if(ge.push(ie),(Me=C.call(B,ie,ie.depth))&&(ye=Me.length)){for(var ye,Me,je;--ye>=0;)ue.push(je=Me[ye]),je.parent=ie,je.depth=ie.depth+1;z&&(ie.value=0),ie.children=Me}else z&&(ie.value=+z.call(B,ie,ie.depth)||0),delete ie.children;return tr(G,function(We){var nt,bt;le&&(nt=We.children)&&nt.sort(le),z&&(bt=We.parent)&&(bt.value+=We.value)}),ge}return B.sort=function(G){return arguments.length?(le=G,B):le},B.children=function(G){return arguments.length?(C=G,B):C},B.value=function(G){return arguments.length?(z=G,B):z},B.revalue=function(G){return z&&(Wt(G,function(ie){ie.children&&(ie.value=0)}),tr(G,function(ie){var ue;ie.children||(ie.value=+z.call(B,ie,ie.depth)||0),(ue=ie.parent)&&(ue.value+=ie.value)})),G},B},g.layout.partition=function(){var le=g.layout.hierarchy(),C=[1,1];function z(B,G){var ie=le.call(this,B,G);return function ue(ge,ye,Me,je){var We=ge.children;if(ge.x=ye,ge.y=ge.depth*je,ge.dx=Me,ge.dy=je,We&&(nt=We.length)){var nt,bt,At,_t=-1;for(Me=ge.value?Me/ge.value:0;++_t<nt;)ue(bt=We[_t],ye,At=bt.value*Me,je),ye+=At}}(ie[0],0,C[0],C[1]/function ue(ge){var ye=ge.children,Me=0;if(ye&&(je=ye.length))for(var je,We=-1;++We<je;)Me=Math.max(Me,ue(ye[We]));return 1+Me}(ie[0])),ie}return z.size=function(B){return arguments.length?(C=B,z):C},$t(z,le)},g.layout.pie=function(){var le=Number,C=nn,z=0,B=Kt,G=0;function ie(ue){var ge,ye=ue.length,Me=ue.map(function(Ft,Ot){return+le.call(ie,Ft,Ot)}),je=+(typeof z=="function"?z.apply(this,arguments):z),We=(typeof B=="function"?B.apply(this,arguments):B)-je,nt=Math.min(Math.abs(We)/ye,+(typeof G=="function"?G.apply(this,arguments):G)),bt=nt*(We<0?-1:1),At=g.sum(Me),_t=At?(We-ye*bt)/At:0,wt=g.range(ye),xt=[];return C!=null&&wt.sort(C===nn?function(Ft,Ot){return Me[Ot]-Me[Ft]}:function(Ft,Ot){return C(ue[Ft],ue[Ot])}),wt.forEach(function(Ft){xt[Ft]={data:ue[Ft],value:ge=Me[Ft],startAngle:je,endAngle:je+=ge*_t+bt,padAngle:nt}}),xt}return ie.value=function(ue){return arguments.length?(le=ue,ie):le},ie.sort=function(ue){return arguments.length?(C=ue,ie):C},ie.startAngle=function(ue){return arguments.length?(z=ue,ie):z},ie.endAngle=function(ue){return arguments.length?(B=ue,ie):B},ie.padAngle=function(ue){return arguments.length?(G=ue,ie):G},ie};var nn={};function dn(le){return le.x}function En(le){return le.y}function On(le,C,z){le.y0=C,le.y=z}g.layout.stack=function(){var le=E,C=ha,z=ba,B=On,G=dn,ie=En;function ue(ge,ye){if(!(nt=ge.length))return ge;var Me=ge.map(function(Ft,Ot){return le.call(ue,Ft,Ot)}),je=Me.map(function(Ft){return Ft.map(function(Ot,Nt){return[G.call(ue,Ot,Nt),ie.call(ue,Ot,Nt)]})}),We=C.call(ue,je,ye);Me=g.permute(Me,We),je=g.permute(je,We);var nt,bt,At,_t,wt=z.call(ue,je,ye),xt=Me[0].length;for(At=0;At<xt;++At)for(B.call(ue,Me[0][At],_t=wt[At],je[0][At][1]),bt=1;bt<nt;++bt)B.call(ue,Me[bt][At],_t+=je[bt-1][At][1],je[bt][At][1]);return ge}return ue.values=function(ge){return arguments.length?(le=ge,ue):le},ue.order=function(ge){return arguments.length?(C=typeof ge=="function"?ge:Un.get(ge)||ha,ue):C},ue.offset=function(ge){return arguments.length?(z=typeof ge=="function"?ge:zn.get(ge)||ba,ue):z},ue.x=function(ge){return arguments.length?(G=ge,ue):G},ue.y=function(ge){return arguments.length?(ie=ge,ue):ie},ue.out=function(ge){return arguments.length?(B=ge,ue):B},ue};
vendor: 5,507 bytes, line 4
4var Un=g.map({"inside-out":function(le){var C,z,B=le.length,G=le.map(Oa),ie=le.map(Ia),ue=g.range(B).sort(function(We,nt){return G[We]-G[nt]}),ge=0,ye=0,Me=[],je=[];for(C=0;C<B;++C)z=ue[C],ge<ye?(ge+=ie[z],Me.push(z)):(ye+=ie[z],je.push(z));return je.reverse().concat(Me)},reverse:function(le){return g.range(le.length).reverse()},default:ha}),zn=g.map({silhouette:function(le){var C,z,B,G=le.length,ie=le[0].length,ue=[],ge=0,ye=[];for(z=0;z<ie;++z){for(C=0,B=0;C<G;C++)B+=le[C][z][1];B>ge&&(ge=B),ue.push(B)}for(z=0;z<ie;++z)ye[z]=(ge-ue[z])/2;return ye},wiggle:function(le){var C,z,B,G,ie,ue,ge,ye,Me,je=le.length,We=le[0],nt=We.length,bt=[];for(bt[0]=ye=Me=0,z=1;z<nt;++z){for(C=0,G=0;C<je;++C)G+=le[C][z][1];for(C=0,ie=0,ge=We[z][0]-We[z-1][0];C<je;++C){for(B=0,ue=(le[C][z][1]-le[C][z-1][1])/(2*ge);B<C;++B)ue+=(le[B][z][1]-le[B][z-1][1])/ge;ie+=ue*le[C][z][1]}bt[z]=ye-=G?ie/G*ge:0,ye<Me&&(Me=ye)}for(z=0;z<nt;++z)bt[z]-=Me;return bt},expand:function(le){var C,z,B,G=le.length,ie=le[0].length,ue=1/G,ge=[];for(z=0;z<ie;++z){for(C=0,B=0;C<G;C++)B+=le[C][z][1];if(B)for(C=0;C<G;C++)le[C][z][1]/=B;else for(C=0;C<G;C++)le[C][z][1]=ue}for(z=0;z<ie;++z)ge[z]=0;return ge},zero:ba});function ha(le){return g.range(le.length)}function ba(le){for(var C=-1,z=le[0].length,B=[];++C<z;)B[C]=0;return B}function Oa(le){for(var C,z=1,B=0,G=le[0][1],ie=le.length;z<ie;++z)(C=le[z][1])>G&&(B=z,G=C);return B}function Ia(le){return le.reduce(za,0)}function za(le,C){return le+C[1]}function vi(le,C){return pi(le,Math.ceil(Math.log(C.length)/Math.LN2+1))}function pi(le,C){for(var z=-1,B=+le[0],G=(le[1]-B)/C,ie=[];++z<=C;)ie[z]=G*z+B;return ie}function ti(le){return[g.min(le),g.max(le)]}function ri(le,C){return le.value-C.value}function di(le,C){var z=le._pack_next;le._pack_next=C,C._pack_prev=le,C._pack_next=z,z._pack_prev=C}function Oi(le,C){le._pack_next=C,C._pack_prev=le}function Wi(le,C){var z=C.x-le.x,B=C.y-le.y,G=le.r+C.r;return .999*G*G>z*z+B*B}function Zi(le){if((C=le.children)&&(ye=C.length)){var C,z,B,G,ie,ue,ge,ye,Me=1/0,je=-1/0,We=1/0,nt=-1/0;if(C.forEach(Xi),(z=C[0]).x=-z.r,z.y=0,Ot(z),ye>1&&((B=C[1]).x=B.r,B.y=0,Ot(B),ye>2))for(Ea(z,B,G=C[2]),Ot(G),di(z,G),z._pack_prev=G,di(G,B),B=z._pack_next,ie=3;ie<ye;ie++){Ea(z,B,G=C[ie]);var bt=0,At=1,_t=1;for(ue=B._pack_next;ue!==B;ue=ue._pack_next,At++)if(Wi(ue,G)){bt=1;break}if(bt==1)for(ge=z._pack_prev;ge!==ue._pack_prev&&!Wi(ge,G);ge=ge._pack_prev,_t++);bt?(At<_t||At==_t&&B.r<z.r?Oi(z,B=ue):Oi(z=ge,B),ie--):(di(z,G),B=G,Ot(G))}var wt=(Me+je)/2,xt=(We+nt)/2,Ft=0;for(ie=0;ie<ye;ie++)(G=C[ie]).x-=wt,G.y-=xt,Ft=Math.max(Ft,G.r+Math.sqrt(G.x*G.x+G.y*G.y));le.r=Ft,C.forEach(Ji)}function Ot(Nt){Me=Math.min(Nt.x-Nt.r,Me),je=Math.max(Nt.x+Nt.r,je),We=Math.min(Nt.y-Nt.r,We),nt=Math.max(Nt.y+Nt.r,nt)}}function Xi(le){le._pack_next=le._pack_prev=le}function Ji(le){delete le._pack_next,delete le._pack_prev}function Ea(le,C,z){var B=le.r+z.r,G=C.x-le.x,ie=C.y-le.y;if(B&&(G||ie)){var ue=C.r+z.r,ge=G*G+ie*ie,ye=.5+((B*=B)-(ue*=ue))/(2*ge),Me=Math.sqrt(Math.max(0,2*ue*(B+ge)-(B-=ge)*B-ue*ue))/(2*ge);z.x=le.x+ye*G+Me*ie,z.y=le.y+ye*ie-Me*G}else z.x=le.x+B,z.y=le.y}function ft(le,C){return le.parent==C.parent?1:2}function Rt(le){var C=le.children;return C.length?C[0]:le.t}function nr(le){var C,z=le.children;return(C=z.length)?z[C-1]:le.t}function Ht(le,C,z){var B=z/(C.i-le.i);C.c-=B,C.s+=z,le.c+=B,C.z+=z,C.m+=z}function ir(le,C,z){return le.a.parent===C.parent?le.a:z}function Lr(le){return{x:le.x,y:le.y,dx:le.dx,dy:le.dy}}function Dr(le,C){var z=le.x+C[3],B=le.y+C[0],G=le.dx-C[1]-C[3],ie=le.dy-C[0]-C[2];return G<0&&(z+=G/2,G=0),ie<0&&(B+=ie/2,ie=0),{x:z,y:B,dx:G,dy:ie}}function Yr(le){var C=le[0],z=le[le.length-1];return C<z?[C,z]:[z,C]}function sn(le){return le.rangeExtent?le.rangeExtent():Yr(le.range())}function an(le,C,z,B){var G=z(le[0],le[1]),ie=B(C[0],C[1]);return function(ue){return ie(G(ue))}}function gn(le,C){var z,B=0,G=le.length-1,ie=le[B],ue=le[G];return ue<ie&&(z=B,B=G,G=z,z=ie,ie=ue,ue=z),le[B]=C.floor(ie),le[G]=C.ceil(ue),le}function Tn(le){return le?{floor:function(C){return Math.floor(C/le)*le},ceil:function(C){return Math.ceil(C/le)*le}}:ln}g.layout.histogram=function(){var le=!0,C=Number,z=ti,B=vi;function G(ie,ue){for(var ge,ye,Me=[],je=ie.map(C,this),We=z.call(this,je,ue),nt=B.call(this,We,je,ue),bt=(ue=-1,je.length),At=nt.length-1,_t=le?1:1/bt;++ue<At;)(ge=Me[ue]=[]).dx=nt[ue+1]-(ge.x=nt[ue]),ge.y=0;if(At>0)for(ue=-1;++ue<bt;)(ye=je[ue])>=We[0]&&ye<=We[1]&&((ge=Me[g.bisect(nt,ye,1,At)-1]).y+=_t,ge.push(ie[ue]));return Me}return G.value=function(ie){return arguments.length?(C=ie,G):C},G.range=function(ie){return arguments.length?(z=dr(ie),G):z},G.bins=function(ie){return arguments.length?(B=typeof ie=="number"?function(ue){return pi(ue,ie)}:dr(ie),G):B},G.frequency=function(ie){return arguments.length?(le=!!ie,G):le},G},g.layout.pack=function(){var le,C=g.layout.hierarchy().sort(ri),z=0,B=[1,1];function G(ie,ue){var ge=C.call(this,ie,ue),ye=ge[0],Me=B[0],je=B[1],We=le==null?Math.sqrt:typeof le=="function"?le:function(){return le};if(ye.x=ye.y=0,tr(ye,function(bt){bt.r=+We(bt.value)}),tr(ye,Zi),z){var nt=z*(le?1:Math.max(2*ye.r/Me,2*ye.r/je))/2;tr(ye,function(bt){bt.r+=nt}),tr(ye,Zi),tr(ye,function(bt){bt.r-=nt})}return function bt(At,_t,wt,xt){var Ft=At.children;if(At.x=_t+=xt*At.x,At.y=wt+=xt*At.y,At.r*=xt,Ft)for(var Ot=-1,Nt=Ft.length;++Ot<Nt;)bt(Ft[Ot],_t,wt,xt)}(ye,Me/2,je/2,le?1:1/Math.max(2*ye.r/Me,2*ye.r/je)),ge}return G.size=function(ie){return arguments.length?(B=ie,G):B}
vendor: 10,286 bytes, line 4
4,G.radius=function(ie){return arguments.length?(le=ie==null||typeof ie=="function"?ie:+ie,G):le},G.padding=function(ie){return arguments.length?(z=+ie,G):z},$t(G,C)},g.layout.tree=function(){var le=g.layout.hierarchy().sort(null).value(null),C=ft,z=[1,1],B=null;function G(ye,Me){var je=le.call(this,ye,Me),We=je[0],nt=function(Ot){for(var Nt,er={A:null,children:[Ot]},fr=[er];(Nt=fr.pop())!=null;)for(var kr,Tr=Nt.children,Jr=0,Xr=Tr.length;Jr<Xr;++Jr)fr.push((Tr[Jr]=kr={_:Tr[Jr],parent:Nt,children:(kr=Tr[Jr].children)&&kr.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:Jr}).a=kr);return er.children[0]}(We);if(tr(nt,ie),nt.parent.m=-nt.z,Wt(nt,ue),B)Wt(We,ge);else{var bt=We,At=We,_t=We;Wt(We,function(Ot){Ot.x<bt.x&&(bt=Ot),Ot.x>At.x&&(At=Ot),Ot.depth>_t.depth&&(_t=Ot)});var wt=C(bt,At)/2-bt.x,xt=z[0]/(At.x+C(At,bt)/2+wt),Ft=z[1]/(_t.depth||1);Wt(We,function(Ot){Ot.x=(Ot.x+wt)*xt,Ot.y=Ot.depth*Ft})}return je}function ie(ye){var Me=ye.children,je=ye.parent.children,We=ye.i?je[ye.i-1]:null;if(Me.length){(function(bt){for(var At,_t=0,wt=0,xt=bt.children,Ft=xt.length;--Ft>=0;)(At=xt[Ft]).z+=_t,At.m+=_t,_t+=At.s+(wt+=At.c)})(ye);var nt=(Me[0].z+Me[Me.length-1].z)/2;We?(ye.z=We.z+C(ye._,We._),ye.m=ye.z-nt):ye.z=nt}else We&&(ye.z=We.z+C(ye._,We._));ye.parent.A=function(bt,At,_t){if(At){for(var wt,xt=bt,Ft=bt,Ot=At,Nt=xt.parent.children[0],er=xt.m,fr=Ft.m,kr=Ot.m,Tr=Nt.m;Ot=nr(Ot),xt=Rt(xt),Ot&&xt;)Nt=Rt(Nt),(Ft=nr(Ft)).a=bt,(wt=Ot.z+kr-xt.z-er+C(Ot._,xt._))>0&&(Ht(ir(Ot,bt,_t),bt,wt),er+=wt,fr+=wt),kr+=Ot.m,er+=xt.m,Tr+=Nt.m,fr+=Ft.m;Ot&&!nr(Ft)&&(Ft.t=Ot,Ft.m+=kr-fr),xt&&!Rt(Nt)&&(Nt.t=xt,Nt.m+=er-Tr,_t=bt)}return _t}(ye,We,ye.parent.A||je[0])}function ue(ye){ye._.x=ye.z+ye.parent.m,ye.m+=ye.parent.m}function ge(ye){ye.x*=z[0],ye.y=ye.depth*z[1]}return G.separation=function(ye){return arguments.length?(C=ye,G):C},G.size=function(ye){return arguments.length?(B=(z=ye)==null?ge:null,G):B?null:z},G.nodeSize=function(ye){return arguments.length?(B=(z=ye)==null?null:ge,G):B?z:null},$t(G,le)},g.layout.cluster=function(){var le=g.layout.hierarchy().sort(null).value(null),C=ft,z=[1,1],B=!1;function G(ie,ue){var ge,ye=le.call(this,ie,ue),Me=ye[0],je=0;tr(Me,function(_t){var wt=_t.children;wt&&wt.length?(_t.x=function(xt){return xt.reduce(function(Ft,Ot){return Ft+Ot.x},0)/xt.length}(wt),_t.y=function(xt){return 1+g.max(xt,function(Ft){return Ft.y})}(wt)):(_t.x=ge?je+=C(_t,ge):0,_t.y=0,ge=_t)});var We=function _t(wt){var xt=wt.children;return xt&&xt.length?_t(xt[0]):wt}(Me),nt=function _t(wt){var xt,Ft=wt.children;return Ft&&(xt=Ft.length)?_t(Ft[xt-1]):wt}(Me),bt=We.x-C(We,nt)/2,At=nt.x+C(nt,We)/2;return tr(Me,B?function(_t){_t.x=(_t.x-Me.x)*z[0],_t.y=(Me.y-_t.y)*z[1]}:function(_t){_t.x=(_t.x-bt)/(At-bt)*z[0],_t.y=(1-(Me.y?_t.y/Me.y:1))*z[1]}),ye}return G.separation=function(ie){return arguments.length?(C=ie,G):C},G.size=function(ie){return arguments.length?(B=(z=ie)==null,G):B?null:z},G.nodeSize=function(ie){return arguments.length?(B=(z=ie)!=null,G):B?z:null},$t(G,le)},g.layout.treemap=function(){var le,C=g.layout.hierarchy(),z=Math.round,B=[1,1],G=null,ie=Lr,ue=!1,ge="squarify",ye=.5*(1+Math.sqrt(5));function Me(_t,wt){for(var xt,Ft,Ot=-1,Nt=_t.length;++Ot<Nt;)Ft=(xt=_t[Ot]).value*(wt<0?0:wt),xt.area=isNaN(Ft)||Ft<=0?0:Ft}function je(_t){var wt=_t.children;if(wt&&wt.length){var xt,Ft,Ot,Nt=ie(_t),er=[],fr=wt.slice(),kr=1/0,Tr=ge==="slice"?Nt.dx:ge==="dice"?Nt.dy:ge==="slice-dice"?1&_t.depth?Nt.dy:Nt.dx:Math.min(Nt.dx,Nt.dy);for(Me(fr,Nt.dx*Nt.dy/_t.value),er.area=0;(Ot=fr.length)>0;)er.push(xt=fr[Ot-1]),er.area+=xt.area,ge!=="squarify"||(Ft=nt(er,Tr))<=kr?(fr.pop(),kr=Ft):(er.area-=er.pop().area,bt(er,Tr,Nt,!1),Tr=Math.min(Nt.dx,Nt.dy),er.length=er.area=0,kr=1/0);er.length&&(bt(er,Tr,Nt,!0),er.length=er.area=0),wt.forEach(je)}}function We(_t){var wt=_t.children;if(wt&&wt.length){var xt,Ft=ie(_t),Ot=wt.slice(),Nt=[];for(Me(Ot,Ft.dx*Ft.dy/_t.value),Nt.area=0;xt=Ot.pop();)Nt.push(xt),Nt.area+=xt.area,xt.z!=null&&(bt(Nt,xt.z?Ft.dx:Ft.dy,Ft,!Ot.length),Nt.length=Nt.area=0);wt.forEach(We)}}function nt(_t,wt){for(var xt,Ft=_t.area,Ot=0,Nt=1/0,er=-1,fr=_t.length;++er<fr;)(xt=_t[er].area)&&(xt<Nt&&(Nt=xt),xt>Ot&&(Ot=xt));return wt*=wt,(Ft*=Ft)?Math.max(wt*Ot*ye/Ft,Ft/(wt*Nt*ye)):1/0}function bt(_t,wt,xt,Ft){var Ot,Nt=-1,er=_t.length,fr=xt.x,kr=xt.y,Tr=wt?z(_t.area/wt):0;if(wt==xt.dx){for((Ft||Tr>xt.dy)&&(Tr=xt.dy);++Nt<er;)(Ot=_t[Nt]).x=fr,Ot.y=kr,Ot.dy=Tr,fr+=Ot.dx=Math.min(xt.x+xt.dx-fr,Tr?z(Ot.area/Tr):0);Ot.z=!0,Ot.dx+=xt.x+xt.dx-fr,xt.y+=Tr,xt.dy-=Tr}else{for((Ft||Tr>xt.dx)&&(Tr=xt.dx);++Nt<er;)(Ot=_t[Nt]).x=fr,Ot.y=kr,Ot.dx=Tr,kr+=Ot.dy=Math.min(xt.y+xt.dy-kr,Tr?z(Ot.area/Tr):0);Ot.z=!1,Ot.dy+=xt.y+xt.dy-kr,xt.x+=Tr,xt.dx-=Tr}}function At(_t){var wt=le||C(_t),xt=wt[0];return xt.x=xt.y=0,xt.value?(xt.dx=B[0],xt.dy=B[1]):xt.dx=xt.dy=0,le&&C.revalue(xt),Me([xt],xt.dx*xt.dy/xt.value),(le?We:je)(xt),ue&&(le=wt),wt}return At.size=function(_t){return arguments.length?(B=_t,At):B},At.padding=function(_t){if(!arguments.length)return G;function wt(Ot){var Nt=_t.call(At,Ot,Ot.depth);return Nt==null?Lr(Ot):Dr(Ot,typeof Nt=="number"?[Nt,Nt,Nt,Nt]:Nt)}function xt(Ot){return Dr(Ot,_t)}var Ft;return ie=(G=_t)==null?Lr:(Ft=typeof _t)=="function"?wt:(Ft==="number"&&(_t=[_t,_t,_t,_t]),xt),At},At.round=function(_t){return arguments.length?(z=_t?Math.round:Number,At):z!=Number},At.sticky=function(_t){return arguments.length?(ue=_t,le=null,At):ue},At.ratio=function(_t){return arguments.length?(ye=_t,At):ye},At.mode=function(_t){return arguments.length?(ge=_t+"",At):ge},$t(At,C)},g.random={normal:function(le,C){var z=arguments.length;return z<2&&(C=1),z<1&&(le=0),function(){var B,G,ie;do ie=(B=2*Math.random()-1)*B+(G=2*Math.random()-1)*G;while(!ie||ie>1);return le+C*B*Math.sqrt(-2*Math.log(ie)/ie)}},logNormal:function(){var le=g.random.normal.apply(g,arguments);return function(){return Math.exp(le())}},bates:function(le){var C=g.random.irwinHall(le);return function(){return C()/le}},irwinHall:function(le){return function(){for(var C=0,z=0;z<le;z++)C+=Math.random();return C}}},g.scale={};var ln={floor:E,ceil:E};function kn(le,C,z,B){var G=[],ie=[],ue=0,ge=Math.min(le.length,C.length)-1;for(le[ge]<le[0]&&(le=le.slice().reverse(),C=C.slice().reverse());++ue<=ge;)G.push(z(le[ue-1],le[ue])),ie.push(B(C[ue-1],C[ue]));return function(ye){var Me=g.bisect(le,ye,1,ge)-1;return ie[Me](G[Me](ye))}}function Dn(le,C){return g.rebind(le,C,"range","rangeRound","interpolate","clamp")}function jn(le,C){return gn(le,Tn($n(le,C)[2])),gn(le,Tn($n(le,C)[2])),le}function $n(le,C){C==null&&(C=10);var z=Yr(le),B=z[1]-z[0],G=Math.pow(10,Math.floor(Math.log(B/C)/Math.LN10)),ie=C/B*G;return ie<=.15?G*=10:ie<=.35?G*=5:ie<=.75&&(G*=2),z[0]=Math.ceil(z[0]/G)*G,z[1]=Math.floor(z[1]/G)*G+.5*G,z[2]=G,z}function Zr(le,C){return g.range.apply(g,$n(le,C))}g.scale.linear=function(){return function le(C,z,B,G){var ie,ue;function ge(){var Me=Math.min(C.length,z.length)>2?kn:an,je=G?Mo:fs;return ie=Me(C,z,je,B),ue=Me(z,C,je,Ii),ye}function ye(Me){return ie(Me)}return ye.invert=function(Me){return ue(Me)},ye.domain=function(Me){return arguments.length?(C=Me.map(Number),ge()):C},ye.range=function(Me){return arguments.length?(z=Me,ge()):z},ye.rangeRound=function(Me){return ye.range(Me).interpolate(Bo)},ye.clamp=function(Me){return arguments.length?(G=Me,ge()):G},ye.interpolate=function(Me){return arguments.length?(B=Me,ge()):B},ye.ticks=function(Me){return Zr(C,Me)},ye.tickFormat=function(Me,je){return d3_scale_linearTickFormat(C,Me,je)},ye.nice=function(Me){return jn(C,Me),ge()},ye.copy=function(){return le(C,z,B,G)},ge()}([0,1],[0,1],Ii,!1)},g.scale.log=function(){return function le(C,z,B,G){function ie(ye){return(B?Math.log(ye<0?0:ye):-Math.log(ye>0?0:-ye))/Math.log(z)}function ue(ye){return B?Math.pow(z,ye):-Math.pow(z,-ye)}function ge(ye){return C(ie(ye))}return ge.invert=function(ye){return ue(C.invert(ye))},ge.domain=function(ye){return arguments.length?(B=ye[0]>=0,C.domain((G=ye.map(Number)).map(ie)),ge):G},ge.base=function(ye){return arguments.length?(z=+ye,C.domain(G.map(ie)),ge):z},ge.nice=function(){var ye=gn(G.map(ie),B?Math:Jn);return C.domain(ye),G=ye.map(ue),ge},ge.ticks=function(){var ye=Yr(G),Me=[],je=ye[0],We=ye[1],nt=Math.floor(ie(je)),bt=Math.ceil(ie(We)),At=z%1?2:z;if(isFinite(bt-nt)){if(B){for(;nt<bt;nt++)for(var _t=1;_t<At;_t++)Me.push(ue(nt)*_t);Me.push(ue(nt))}else for(Me.push(ue(nt));nt++<bt;)for(_t=At-1;_t>0;_t--)Me.push(ue(nt)*_t);for(nt=0;Me[nt]<je;nt++);for(bt=Me.length;Me[bt-1]>We;bt--);Me=Me.slice(nt,bt)}return Me},ge.copy=function(){return le(C.copy(),z,B,G)},Dn(ge,C)}(g.scale.linear().domain([0,1]),10,!0,[1,10])};var Jn={floor:function(le){return-Math.ceil(-le)},ceil:function(le){return-Math.floor(-le)}};function Cn(le){return function(C){return C<0?-Math.pow(-C,le):Math.pow(C,le)}}g.scale.pow=function(){return function le(C,z,B){var G=Cn(z),ie=Cn(1/z);function ue(ge){return C(G(ge))}return ue.invert=function(ge){return ie(C.invert(ge))},ue.domain=function(ge){return arguments.length?(C.domain((B=ge.map(Number)).map(G)),ue):B},ue.ticks=function(ge){return Zr(B,ge)},ue.tickFormat=function(ge,ye){return d3_scale_linearTickFormat(B,ge,ye)},ue.nice=function(ge){return ue.domain(jn(B,ge))},ue.exponent=function(ge){return arguments.length?(G=Cn(z=ge),ie=Cn(1/z),C.domain(B.map(G)),ue):z},ue.copy=function(){return le(C.copy(),z,B)},Dn(ue,C)}(g.scale.linear(),1,[0,1])},g.scale.sqrt=function(){return g.scale.pow().exponent(.5)},g.scale.ordinal=function(){return function le(C,z){var B,G,ie;function ue(ye){return G[((B.get(ye)||(z.t==="range"?B.set(ye,C.push(ye)):NaN))-1)%G.length]}function ge(ye,Me){return g.range(C.length).map(function(je){return ye+Me*je})}return ue.domain=function(ye){if(!arguments.length)return C;C=[],B=new w;for(var Me,je=-1,We=ye.length;++je<We;)B.has(Me=ye[je])||B.set(Me,C.push(Me));return ue[z.t].apply(ue,z.a)},ue.range=function(ye){return arguments.length?(G=ye,ie=0,z={t:"range",a:arguments},ue):G},ue.rangePoints=function(ye,Me){arguments.length<2&&(Me=0);var je=ye[0],We=ye[1],nt=C.length<2?(je=(je+We)/2,0):(We-je)/(C.length-1+Me);return G=ge(je+nt*Me/2,nt),ie=0,z={t:"rangePoints",a:arguments},ue},ue.rangeRoundPoints=function(ye,Me){arguments.length<2&&(Me=0);var je=ye[0],We=ye[1],nt=C.length<2?(je=We=Math.round((je+We)/2),
vendor: 11,418 bytes, line 4
40):(We-je)/(C.length-1+Me)|0;return G=ge(je+Math.round(nt*Me/2+(We-je-(C.length-1+Me)*nt)/2),nt),ie=0,z={t:"rangeRoundPoints",a:arguments},ue},ue.rangeBands=function(ye,Me,je){arguments.length<2&&(Me=0),arguments.length<3&&(je=Me);var We=ye[1]<ye[0],nt=ye[We-0],bt=ye[1-We],At=(bt-nt)/(C.length-Me+2*je);return G=ge(nt+At*je,At),We&&G.reverse(),ie=At*(1-Me),z={t:"rangeBands",a:arguments},ue},ue.rangeRoundBands=function(ye,Me,je){arguments.length<2&&(Me=0),arguments.length<3&&(je=Me);var We=ye[1]<ye[0],nt=ye[We-0],bt=ye[1-We],At=Math.floor((bt-nt)/(C.length-Me+2*je));return G=ge(nt+Math.round((bt-nt-(C.length-Me)*At)/2),At),We&&G.reverse(),ie=Math.round(At*(1-Me)),z={t:"rangeRoundBands",a:arguments},ue},ue.rangeBand=function(){return ie},ue.rangeExtent=function(){return Yr(z.a[0])},ue.copy=function(){return le(C,z)},ue.domain(C)}([],{t:"range",a:[[]]})},g.scale.category10=function(){return g.scale.ordinal().range(Bn)},g.scale.category20=function(){return g.scale.ordinal().range(Xn)},g.scale.category20b=function(){return g.scale.ordinal().range(xa)},g.scale.category20c=function(){return g.scale.ordinal().range(Ma)};var Bn=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Ut),Xn=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Ut),xa=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Ut),Ma=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Ut);function Sn(){return 0}g.scale.quantile=function(){return function le(C,z){var B;function G(){var ue=0,ge=z.length;for(B=[];++ue<ge;)B[ue-1]=g.quantile(C,ue/ge);return ie}function ie(ue){if(!isNaN(ue=+ue))return z[g.bisect(B,ue)]}return ie.domain=function(ue){return arguments.length?(C=ue.map(u).filter(f).sort(i),G()):C},ie.range=function(ue){return arguments.length?(z=ue,G()):z},ie.quantiles=function(){return B},ie.invertExtent=function(ue){return(ue=z.indexOf(ue))<0?[NaN,NaN]:[ue>0?B[ue-1]:C[0],ue<B.length?B[ue]:C[C.length-1]]},ie.copy=function(){return le(C,z)},G()}([],[])},g.scale.quantize=function(){return function le(C,z,B){var G,ie;function ue(ye){return B[Math.max(0,Math.min(ie,Math.floor(G*(ye-C))))]}function ge(){return G=B.length/(z-C),ie=B.length-1,ue}return ue.domain=function(ye){return arguments.length?(C=+ye[0],z=+ye[ye.length-1],ge()):[C,z]},ue.range=function(ye){return arguments.length?(B=ye,ge()):B},ue.invertExtent=function(ye){return[ye=(ye=B.indexOf(ye))<0?NaN:ye/G+C,ye+1/G]},ue.copy=function(){return le(C,z,B)},ge()}(0,1,[0,1])},g.scale.threshold=function(){return function le(C,z){function B(G){if(G<=G)return z[g.bisect(C,G)]}return B.domain=function(G){return arguments.length?(C=G,B):C},B.range=function(G){return arguments.length?(z=G,B):z},B.invertExtent=function(G){return G=z.indexOf(G),[C[G-1],C[G]]},B.copy=function(){return le(C,z)},B}([.5],[0,1])},g.scale.identity=function(){return function le(C){function z(B){return+B}return z.invert=z,z.domain=z.range=function(B){return arguments.length?(C=B.map(z),z):C},z.ticks=function(B){return Zr(C,B)},z.tickFormat=function(B,G){return d3_scale_linearTickFormat(C,B,G)},z.copy=function(){return le(C)},z}([0,1])},g.svg={},g.svg.arc=function(){var le=Ta,C=fa,z=Sn,B=La,G=Ca,ie=_a,ue=Za;function ge(){var Me=Math.max(0,+le.apply(this,arguments)),je=Math.max(0,+C.apply(this,arguments)),We=G.apply(this,arguments)-qe,nt=ie.apply(this,arguments)-qe,bt=Math.abs(nt-We),At=We>nt?0:1;if(je<Me&&(_t=je,je=Me,Me=_t),bt>=Be)return ye(je,At)+(Me?ye(Me,1-At):"")+"Z";var _t,wt,xt,Ft,Ot,Nt,er,fr,kr,Tr,Jr,Xr,hn=0,on=0,Nn=[];if((Ft=(+ue.apply(this,arguments)||0)/2)&&(xt=B===La?Math.sqrt(Me*Me+je*je):+B.apply(this,arguments),At||(on*=-1),je&&(on=ke(xt/je*Math.sin(Ft))),Me&&(hn=ke(xt/Me*Math.sin(Ft)))),je){Ot=je*Math.cos(We+on),Nt=je*Math.sin(We+on),er=je*Math.cos(nt-on),fr=je*Math.sin(nt-on);var Gn=Math.abs(nt-We-2*on)<=Vt?0:1;if(on&&Kn(Ot,Nt,er,fr)===At^Gn){var oa=(We+nt)/2;Ot=je*Math.cos(oa),Nt=je*Math.sin(oa),er=fr=null}}else Ot=Nt=0;if(Me){kr=Me*Math.cos(nt-hn),Tr=Me*Math.sin(nt-hn),Jr=Me*Math.cos(We+hn),Xr=Me*Math.sin(We+hn);var jr=Math.abs(We-nt+2*hn)<=Vt?0:1;if(hn&&Kn(kr,Tr,Jr,Xr)===1-At^jr){var Mn=(We+nt)/2;kr=Me*Math.cos(Mn),Tr=Me*Math.sin(Mn),Jr=Xr=null}}else kr=Tr=0;if(bt>Tt&&(_t=Math.min(Math.abs(je-Me)/2,+z.apply(this,arguments)))>.001){wt=Me<je^At?0:1;var Yn=_t,Vn=_t;if(bt<Vt){var Qn=Jr==null?[kr,Tr]:er==null?[Ot,Nt]:Pt([Ot,Nt],[Jr,Xr],[er,fr],[kr,Tr]),la=Ot-Qn[0],wa=Nt-Qn[1],Zn=er-Qn[0],ma=fr-Qn[1],pa=1/Math.sin(Math.acos((la*Zn+wa*ma)/(Math.sqrt(la*la+wa*wa)*Math.sqrt(Zn*Zn+ma*ma)))/2),Aa=Math.sqrt(Qn[0]*Qn[0]+Qn[1]*Qn[1]);Vn=Math.min(_t,(Me-Aa)/(pa-1)),Yn=Math.min(_t,(je-Aa)/(pa+1))}if(er!=null){var va=Va(Jr==null?[kr,Tr]:[Jr,Xr],[Ot,Nt],je,Yn,At),Sa=Va([er,fr],[kr,Tr],je,Yn,At);_t===Yn?Nn.push("M",va[0],"A",Yn,",",Yn," 0 0,",wt," ",va[1],"A",je,",",je," 0 ",1-At^Kn(va[1][0],va[1][1],Sa[1][0],Sa[1][1]),",",At," ",Sa[1],"A",Yn,",",Yn," 0 0,",wt," ",Sa[0]):Nn.push("M",va[0],"A",Yn,",",Yn," 0 1,",wt," ",Sa[0])}else Nn.push("M",Ot,",",Nt);if(Jr!=null){var Da=Va([Ot,Nt],[Jr,Xr],Me,-Vn,At),ii=Va([kr,Tr],er==null?[Ot,Nt]:[er,fr],Me,-Vn,At);_t===Vn?Nn.push("L",ii[0],"A",Vn,",",Vn," 0 0,",wt," ",ii[1],"A",Me,",",Me," 0 ",At^Kn(ii[1][0],ii[1][1],Da[1][0],Da[1][1]),",",1-At," ",Da[1],"A",Vn,",",Vn," 0 0,",wt," ",Da[0]):Nn.push("L",ii[0],"A",Vn,",",Vn," 0 0,",wt," ",Da[0])}else Nn.push("L",kr,",",Tr)}else Nn.push("M",Ot,",",Nt),er!=null&&Nn.push("A",je,",",je," 0 ",Gn,",",At," ",er,",",fr),Nn.push("L",kr,",",Tr),Jr!=null&&Nn.push("A",Me,",",Me," 0 ",jr,",",1-At," ",Jr,",",Xr);return Nn.push("Z"),Nn.join("")}function ye(Me,je){return"M0,"+Me+"A"+Me+","+Me+" 0 1,"+je+" 0,"+-Me+"A"+Me+","+Me+" 0 1,"+je+" 0,"+Me}return ge.innerRadius=function(Me){return arguments.length?(le=dr(Me),ge):le},ge.outerRadius=function(Me){return arguments.length?(C=dr(Me),ge):C},ge.cornerRadius=function(Me){return arguments.length?(z=dr(Me),ge):z},ge.padRadius=function(Me){return arguments.length?(B=Me==La?La:dr(Me),ge):B},ge.startAngle=function(Me){return arguments.length?(G=dr(Me),ge):G},ge.endAngle=function(Me){return arguments.length?(ie=dr(Me),ge):ie},ge.padAngle=function(Me){return arguments.length?(ue=dr(Me),ge):ue},ge.centroid=function(){var Me=(+le.apply(this,arguments)+ +C.apply(this,arguments))/2,je=(+G.apply(this,arguments)+ +ie.apply(this,arguments))/2-qe;return[Math.cos(je)*Me,Math.sin(je)*Me]},ge};var La="auto";function Ta(le){return le.innerRadius}function fa(le){return le.outerRadius}function Ca(le){return le.startAngle}function _a(le){return le.endAngle}function Za(le){return le&&le.padAngle}function Kn(le,C,z,B){return(le-z)*C-(C-B)*le>0?0:1}function Va(le,C,z,B,G){var ie=le[0]-C[0],ue=le[1]-C[1],ge=(G?B:-B)/Math.sqrt(ie*ie+ue*ue),ye=ge*ue,Me=-ge*ie,je=le[0]+ye,We=le[1]+Me,nt=C[0]+ye,bt=C[1]+Me,At=(je+nt)/2,_t=(We+bt)/2,wt=nt-je,xt=bt-We,Ft=wt*wt+xt*xt,Ot=z-B,Nt=je*bt-nt*We,er=(xt<0?-1:1)*Math.sqrt(Math.max(0,Ot*Ot*Ft-Nt*Nt)),fr=(Nt*xt-wt*er)/Ft,kr=(-Nt*wt-xt*er)/Ft,Tr=(Nt*xt+wt*er)/Ft,Jr=(-Nt*wt+xt*er)/Ft,Xr=fr-At,hn=kr-_t,on=Tr-At,Nn=Jr-_t;return Xr*Xr+hn*hn>on*on+Nn*Nn&&(fr=Tr,kr=Jr),[[fr-ye,kr-Me],[fr*z/Ot,kr*z/Ot]]}function zi(){return!0}function Go(le){var C=Qr,z=yn,B=zi,G=fo,ie=G.key,ue=.7;function ge(ye){var Me,je=[],We=[],nt=-1,bt=ye.length,At=dr(C),_t=dr(z);function wt(){je.push("M",G(le(We),ue))}for(;++nt<bt;)B.call(this,Me=ye[nt],nt)?We.push([+At.call(this,Me,nt),+_t.call(this,Me,nt)]):We.length&&(wt(),We=[]);return We.length&&wt(),je.length?je.join(""):null}return ge.x=function(ye){return arguments.length?(C=ye,ge):C},ge.y=function(ye){return arguments.length?(z=ye,ge):z},ge.defined=function(ye){return arguments.length?(B=ye,ge):B},ge.interpolate=function(ye){return arguments.length?(ie=typeof ye=="function"?G=ye:(G=Co.get(ye)||fo).key,ge):ie},ge.tension=function(ye){return arguments.length?(ue=ye,ge):ue},ge}g.svg.line=function(){return Go(E)};var Co=g.map({linear:fo,"linear-closed":da,step:function(le){for(var C=0,z=le.length,B=le[0],G=[B[0],",",B[1]];++C<z;)G.push("H",(B[0]+(B=le[C])[0])/2,"V",B[1]);return z>1&&G.push("H",B[0]),G.join("")},"step-before":ci,"step-after":ho,basis:Ni,"basis-open":function(le){if(le.length<4)return fo(le);for(var C,z=[],B=-1,G=le.length,ie=[0],ue=[0];++B<3;)C=le[B],ie.push(C[0]),ue.push(C[1]);for(z.push(Ja(Ki,ie)+","+Ja(Ki,ue)),--B;++B<G;)C=le[B],ie.shift(),ie.push(C[0]),ue.shift(),ue.push(C[1]),as(z,ie,ue);return z.join("")},"basis-closed":function(le){for(var C,z,B=-1,G=le.length,ie=G+4,ue=[],ge=[];++B<4;)z=le[B%G],ue.push(z[0]),ge.push(z[1]);for(C=[Ja(Ki,ue),",",Ja(Ki,ge)],--B;++B<ie;)z=le[B%G],ue.shift(),ue.push(z[0]),ge.shift(),ge.push(z[1]),as(C,ue,ge);return C.join("")},bundle:function(le,C){var z=le.length-1;if(z)for(var B,G,ie=le[0][0],ue=le[0][1],ge=le[z][0]-ie,ye=le[z][1]-ue,Me=-1;++Me<=z;)B=le[Me],G=Me/z,B[0]=C*B[0]+(1-C)*(ie+G*ge),B[1]=C*B[1]+(1-C)*(ue+G*ye);return Ni(le)},cardinal:function(le,C){return le.length<3?fo(le):le[0]+Ha(le,yi(le,C))},"cardinal-open":function(le,C){return le.length<4?fo(le):le[1]+Ha(le.slice(1,-1),yi(le,C))},"cardinal-closed":function(le,C){return le.length<3?da(le):le[0]+Ha((le.push(le[0]),le),yi([le[le.length-2]].concat(le,[le[1]]),C))},monotone:function(le){return le.length<3?fo(le):le[0]+Ha(le,function(C){for(var z,B,G,ie,ue=[],ge=function(je){for(var We=0,nt=je.length-1,bt=[],At=je[0],_t=je[1],wt=bt[0]=Qo(At,_t);++We<nt;)bt[We]=(wt+(wt=Qo(At=_t,_t=je[We+1])))/2;return bt[We]=wt,bt}(C),ye=-1,Me=C.length-1;++ye<Me;)z=Qo(C[ye],C[ye+1]),a(z)<Tt?ge[ye]=ge[ye+1]=0:(B=ge[ye]/z,G=ge[ye+1]/z,(ie=B*B+G*G)>9&&(ie=3*z/Math.sqrt(ie),ge[ye]=ie*B,ge[ye+1]=ie*G));for(ye=-1;++ye<=Me;)ie=(C[Math.min(Me,ye+1)][0]-C[Math.max(0,ye-1)][0])/(6*(1+ge[ye]*ge[ye])),ue.push([ie||0,ge[ye]*ie||0]);return ue}(le))}});function fo(le){return le.length>1?le.join("L"):le+"Z"}function da(le){return le.join("L")+"Z"}function ci(le){for(var C=0,z=le.length,B=le[0],G=[B[0],",",B[1]];++C<z;)G.push("V",(B=le[C])[1],"H",B[0]);return G.join("")}function ho(le){for(var C=0,z=le.length,B=le[0],G=[B[0],",",B[1]];++C<z;)G.push("H",(B=le[C])[0],"V",B[1]);return G.join("")}function Ha(le,C){if(C.length<1||le.length!=C.length&&le.length!=C.length+2)return fo(le);var z=le.length!=C.length,B="",G=le[0],ie=le[1],ue=C[0],ge=ue,ye=1;if(z&&(B+="Q"+(ie[0]-2*ue[0]/3)+","+(ie[1]-2*ue[1]/3)+","+ie[0]+","+ie[1],G=le[1],ye=2),C.length>1){ge=C[1],ie=le[ye],ye++,B+="C"+(G[0]+ue[0])+","+(G[1]+ue[1])+","+(ie[0]-ge[0])+","+(ie[1]-ge[1])+","+ie[0]+","+ie[1];for(var Me=2;Me<C.length;Me++,ye++)ie=le[ye],ge=C[Me],B+="S"+(ie[0]-ge[0])+","+(ie[1]-ge[1])+","+ie[0]+","+ie[1]}if(z){var je=le[ye];B+="Q"+(ie[0]+2*ge[0]/3)+","+(ie[1]+2*ge[1]/3)+","+je[0]+","+je[1]}return B}function yi(le,C){for(var z,B=[],G=(1-C)/2,ie=le[0],ue=le[1],ge=1,ye=le.length;++ge<ye;)z=ie,ie=ue,ue=le[ge],B.push([G*(ue[0]-z[0]),G*(ue[1]-z[1])]);return B}function Ni(le){if(le.length<3)return fo(le);var C=1,z=le.length,B=le[0],G=B[0],ie=B[1],ue=[G,G,G,(B=le[1])[0]],ge=[ie,ie,ie,B[1]],ye=[G,",",ie,"L",Ja(Ki,ue),",",Ja(Ki,ge)];for(le.push(le[z-1]);++C<=z;)B=le[C],ue.shift(),ue.push(B[0]),ge.shift(),ge.push(B[1]),as(ye,ue,ge);
vendor: 13,728 bytes, line 4
4return le.pop(),ye.push("L",B),ye.join("")}function Ja(le,C){return le[0]*C[0]+le[1]*C[1]+le[2]*C[2]+le[3]*C[3]}Co.forEach(function(le,C){C.key=le,C.closed=/-closed$/.test(le)});var io=[0,2/3,1/3,0],Ka=[0,1/3,2/3,0],Ki=[0,1/6,2/3,1/6];function as(le,C,z){le.push("C",Ja(io,C),",",Ja(io,z),",",Ja(Ka,C),",",Ja(Ka,z),",",Ja(Ki,C),",",Ja(Ki,z))}function Qo(le,C){return(C[1]-le[1])/(C[0]-le[0])}function zs(le){for(var C,z,B,G=-1,ie=le.length;++G<ie;)z=(C=le[G])[0],B=C[1]-qe,C[0]=z*Math.cos(B),C[1]=z*Math.sin(B);return le}function Li(le){var C=Qr,z=Qr,B=0,G=yn,ie=zi,ue=fo,ge=ue.key,ye=ue,Me="L",je=.7;function We(nt){var bt,At,_t,wt=[],xt=[],Ft=[],Ot=-1,Nt=nt.length,er=dr(C),fr=dr(B),kr=C===z?function(){return At}:dr(z),Tr=B===G?function(){return _t}:dr(G);function Jr(){wt.push("M",ue(le(Ft),je),Me,ye(le(xt.reverse()),je),"Z")}for(;++Ot<Nt;)ie.call(this,bt=nt[Ot],Ot)?(xt.push([At=+er.call(this,bt,Ot),_t=+fr.call(this,bt,Ot)]),Ft.push([+kr.call(this,bt,Ot),+Tr.call(this,bt,Ot)])):xt.length&&(Jr(),xt=[],Ft=[]);return xt.length&&Jr(),wt.length?wt.join(""):null}return We.x=function(nt){return arguments.length?(C=z=nt,We):z},We.x0=function(nt){return arguments.length?(C=nt,We):C},We.x1=function(nt){return arguments.length?(z=nt,We):z},We.y=function(nt){return arguments.length?(B=G=nt,We):G},We.y0=function(nt){return arguments.length?(B=nt,We):B},We.y1=function(nt){return arguments.length?(G=nt,We):G},We.defined=function(nt){return arguments.length?(ie=nt,We):ie},We.interpolate=function(nt){return arguments.length?(ge=typeof nt=="function"?ue=nt:(ue=Co.get(nt)||fo).key,ye=ue.reverse||ue,Me=ue.closed?"M":"L",We):ge},We.tension=function(nt){return arguments.length?(je=nt,We):je},We}function Ds(le){return le.source}function Ci(le){return le.target}function $o(le){return le.radius}function ia(le){return[le.x,le.y]}function ga(le){return function(){var C=le.apply(this,arguments),z=C[0],B=C[1]-qe;return[z*Math.cos(B),z*Math.sin(B)]}}function Rs(){return 64}function Fs(){return"circle"}function es(le){var C=Math.sqrt(le/Vt);return"M0,"+C+"A"+C+","+C+" 0 1,1 0,"+-C+"A"+C+","+C+" 0 1,1 0,"+C+"Z"}g.svg.line.radial=function(){var le=Go(zs);return le.radius=le.x,delete le.x,le.angle=le.y,delete le.y,le},ci.reverse=ho,ho.reverse=ci,g.svg.area=function(){return Li(E)},g.svg.area.radial=function(){var le=Li(zs);return le.radius=le.x,delete le.x,le.innerRadius=le.x0,delete le.x0,le.outerRadius=le.x1,delete le.x1,le.angle=le.y,delete le.y,le.startAngle=le.y0,delete le.y0,le.endAngle=le.y1,delete le.y1,le},g.svg.chord=function(){var le=Ds,C=Ci,z=$o,B=Ca,G=_a;function ie(Me,je){var We,nt,bt=ue(this,le,Me,je),At=ue(this,C,Me,je);return"M"+bt.p0+ge(bt.r,bt.p1,bt.a1-bt.a0)+(nt=At,((We=bt).a0==nt.a0&&We.a1==nt.a1?ye(bt.r,bt.p1,bt.r,bt.p0):ye(bt.r,bt.p1,At.r,At.p0)+ge(At.r,At.p1,At.a1-At.a0)+ye(At.r,At.p1,bt.r,bt.p0))+"Z")}function ue(Me,je,We,nt){var bt=je.call(Me,We,nt),At=z.call(Me,bt,nt),_t=B.call(Me,bt,nt)-qe,wt=G.call(Me,bt,nt)-qe;return{r:At,a0:_t,a1:wt,p0:[At*Math.cos(_t),At*Math.sin(_t)],p1:[At*Math.cos(wt),At*Math.sin(wt)]}}function ge(Me,je,We){return"A"+Me+","+Me+" 0 "+ +(We>Vt)+",1 "+je}function ye(Me,je,We,nt){return"Q 0,0 "+nt}return ie.radius=function(Me){return arguments.length?(z=dr(Me),ie):z},ie.source=function(Me){return arguments.length?(le=dr(Me),ie):le},ie.target=function(Me){return arguments.length?(C=dr(Me),ie):C},ie.startAngle=function(Me){return arguments.length?(B=dr(Me),ie):B},ie.endAngle=function(Me){return arguments.length?(G=dr(Me),ie):G},ie},g.svg.diagonal=function(){var le=Ds,C=Ci,z=ia;function B(G,ie){var ue=le.call(this,G,ie),ge=C.call(this,G,ie),ye=(ue.y+ge.y)/2,Me=[ue,{x:ue.x,y:ye},{x:ge.x,y:ye},ge];return"M"+(Me=Me.map(z))[0]+"C"+Me[1]+" "+Me[2]+" "+Me[3]}return B.source=function(G){return arguments.length?(le=dr(G),B):le},B.target=function(G){return arguments.length?(C=dr(G),B):C},B.projection=function(G){return arguments.length?(z=G,B):z},B},g.svg.diagonal.radial=function(){var le=g.svg.diagonal(),C=ia,z=le.projection;return le.projection=function(B){return arguments.length?z(ga(C=B)):C},le},g.svg.symbol=function(){var le=Fs,C=Rs;function z(B,G){return(Ao.get(le.call(this,B,G))||es)(C.call(this,B,G))}return z.type=function(B){return arguments.length?(le=dr(B),z):le},z.size=function(B){return arguments.length?(C=dr(B),z):C},z};var Ao=g.map({circle:es,cross:function(le){var C=Math.sqrt(le/5)/2;return"M"+-3*C+","+-C+"H"+-C+"V"+-3*C+"H"+C+"V"+-C+"H"+3*C+"V"+C+"H"+C+"V"+3*C+"H"+-C+"V"+C+"H"+-3*C+"Z"},diamond:function(le){var C=Math.sqrt(le/(2*Js)),z=C*Js;return"M0,"+-C+"L"+z+",0 0,"+C+" "+-z+",0Z"},square:function(le){var C=Math.sqrt(le)/2;return"M"+-C+","+-C+"L"+C+","+-C+" "+C+","+C+" "+-C+","+C+"Z"},"triangle-down":function(le){var C=Math.sqrt(le/Uo),z=C*Uo/2;return"M0,"+z+"L"+C+","+-z+" "+-C+","+-z+"Z"},"triangle-up":function(le){var C=Math.sqrt(le/Uo),z=C*Uo/2;return"M0,"+-z+"L"+C+","+z+" "+-C+","+z+"Z"}});g.svg.symbolTypes=Ao.keys();var Uo=Math.sqrt(3),Js=Math.tan(30*Re);J.transition=function(le){for(var C,z,B=hs||++ps,G=Ms(le),ie=[],ue=is||{time:Date.now(),ease:ms,delay:0,duration:250},ge=-1,ye=this.length;++ge<ye;){ie.push(C=[]);for(var Me=this[ge],je=-1,We=Me.length;++je<We;)(z=Me[je])&&os(z,je,G,B,ue),C.push(z)}return Qa(ie,G,B)},J.interrupt=function(le){return this.each(le==null?Ts:qa(Ms(le)))};var Ts=qa(Ms());function qa(le){return function(){var C,z,B;(C=this[le])&&(B=C[z=C.active])&&(B.timer.c=null,B.timer.t=NaN,--C.count?delete C[z]:delete this[le],C.active+=.5,B.event&&B.event.interrupt.call(this,this.__data__,B.index))}}function Qa(le,C,z){return N(le,Mi),le.namespace=C,le.id=z,le}var hs,is,Mi=[],ps=0;function ks(le,C,z,B){var G=le.id,ie=le.namespace;return De(le,typeof z=="function"?function(ue,ge,ye){ue[ie][G].tween.set(C,B(z.call(ue,ue.__data__,ge,ye)))}:(z=B(z),function(ue){ue[ie][G].tween.set(C,z)}))}function vs(le){return le==null&&(le=""),function(){this.textContent=le}}function Ms(le){return le==null?"__transition__":"__transition_"+le+"__"}function os(le,C,z,B,G){var ie,ue,ge,ye,Me,je=le[z]||(le[z]={active:0,count:0}),We=je[B];function nt(At){var _t=je.active,wt=je[_t];for(var xt in wt&&(wt.timer.c=null,wt.timer.t=NaN,--je.count,delete je[_t],wt.event&&wt.event.interrupt.call(le,le.__data__,wt.index)),je)if(+xt<B){var Ft=je[xt];Ft.timer.c=null,Ft.timer.t=NaN,--je.count,delete je[xt]}ue.c=bt,Ir(function(){return ue.c&&bt(At||1)&&(ue.c=null,ue.t=NaN),1},0,ie),je.active=B,We.event&&We.event.start.call(le,le.__data__,C),Me=[],We.tween.forEach(function(Ot,Nt){(Nt=Nt.call(le,le.__data__,C))&&Me.push(Nt)}),ye=We.ease,ge=We.duration}function bt(At){for(var _t=At/ge,wt=ye(_t),xt=Me.length;xt>0;)Me[--xt].call(le,wt);if(_t>=1)return We.event&&We.event.end.call(le,le.__data__,C),--je.count?delete je[B]:delete le[z],1}We||(ie=G.time,ue=Ir(function(At){var _t=We.delay;if(ue.t=_t+ie,_t<=At)return nt(At-_t);ue.c=nt},0,ie),We=je[B]={tween:new w,time:ie,timer:ue,delay:G.delay,duration:G.duration,ease:G.ease,index:C},G=null,++je.count)}Mi.call=J.call,Mi.empty=J.empty,Mi.node=J.node,Mi.size=J.size,g.transition=function(le,C){return le&&le.transition?hs?le.transition(C):le:g.selection().transition(le)},g.transition.prototype=Mi,Mi.select=function(le){var C,z,B,G=this.id,ie=this.namespace,ue=[];le=re(le);for(var ge=-1,ye=this.length;++ge<ye;){ue.push(C=[]);for(var Me=this[ge],je=-1,We=Me.length;++je<We;)(B=Me[je])&&(z=le.call(B,B.__data__,je,ge))?("__data__"in B&&(z.__data__=B.__data__),os(z,je,ie,G,B[ie][G]),C.push(z)):C.push(null)}return Qa(ue,ie,G)},Mi.selectAll=function(le){var C,z,B,G,ie,ue=this.id,ge=this.namespace,ye=[];le=ne(le);for(var Me=-1,je=this.length;++Me<je;)for(var We=this[Me],nt=-1,bt=We.length;++nt<bt;)if(B=We[nt]){ie=B[ge][ue],z=le.call(B,B.__data__,nt,Me),ye.push(C=[]);for(var At=-1,_t=z.length;++At<_t;)(G=z[At])&&os(G,At,ge,ue,ie),C.push(G)}return Qa(ye,ge,ue)},Mi.filter=function(le){var C,z,B=[];typeof le!="function"&&(le=Ae(le));for(var G=0,ie=this.length;G<ie;G++){B.push(C=[]);for(var ue,ge=0,ye=(ue=this[G]).length;ge<ye;ge++)(z=ue[ge])&&le.call(z,z.__data__,ge,G)&&C.push(z)}return Qa(B,this.namespace,this.id)},Mi.tween=function(le,C){var z=this.id,B=this.namespace;return arguments.length<2?this.node()[B][z].tween.get(le):De(this,C==null?function(G){G[B][z].tween.remove(le)}:function(G){G[B][z].tween.set(le,C)})},Mi.attr=function(le,C){if(arguments.length<2){for(C in le)this.attr(C,le[C]);return this}var z=le=="transform"?jo:Ii,B=g.ns.qualify(le);function G(){this.removeAttribute(B)}function ie(){this.removeAttributeNS(B.space,B.local)}function ue(ye){return ye==null?G:(ye+="",function(){var Me,je=this.getAttribute(B);return je!==ye&&(Me=z(je,ye),function(We){this.setAttribute(B,Me(We))})})}function ge(ye){return ye==null?ie:(ye+="",function(){var Me,je=this.getAttributeNS(B.space,B.local);return je!==ye&&(Me=z(je,ye),function(We){this.setAttributeNS(B.space,B.local,Me(We))})})}return ks(this,"attr."+le,C,B.local?ge:ue)},Mi.attrTween=function(le,C){var z=g.ns.qualify(le);return this.tween("attr."+le,z.local?function(B,G){var ie=C.call(this,B,G,this.getAttributeNS(z.space,z.local));return ie&&function(ue){this.setAttributeNS(z.space,z.local,ie(ue))}}:function(B,G){var ie=C.call(this,B,G,this.getAttribute(z));return ie&&function(ue){this.setAttribute(z,ie(ue))}})},Mi.style=function(le,C,z){var B=arguments.length;if(B<3){if(typeof le!="string"){for(z in B<2&&(C=""),le)this.style(z,le[z],C);return this}z=""}function G(){this.style.removeProperty(le)}function ie(ue){return ue==null?G:(ue+="",function(){var ge,ye=n(this).getComputedStyle(this,null).getPropertyValue(le);return ye!==ue&&(ge=Ii(ye,ue),function(Me){this.style.setProperty(le,ge(Me),z)})})}return ks(this,"style."+le,C,ie)},Mi.styleTween=function(le,C,z){function B(G,ie){var ue=C.call(this,G,ie,n(this).getComputedStyle(this,null).getPropertyValue(le));return ue&&function(ge){this.style.setProperty(le,ue(ge),z)}}return arguments.length<3&&(z=""),this.tween("style."+le,B)},Mi.text=function(le){return ks(this,"text",le,vs)},Mi.remove=function(){var le=this.namespace;return this.each("end.transition",function(){var C;this[le].count<2&&(C=this.parentNode)&&C.removeChild(this)})},Mi.ease=function(le){var C=this.id,z=this.namespace;return arguments.length<1?this.node()[z][C].ease:(typeof le!="function"&&(le=g.ease.apply(g,arguments)),De(this,function(B){B[z][C].ease=le}))},Mi.delay=function(le){var C=this.id,z=this.namespace;return arguments.length<1?this.node()[z][C].delay:De(this,typeof le=="function"?function(B,G,ie){B[z][C].delay=+le.call(B,B.__data__,G,ie)}:(le=+le,function(B){B[z][C].delay=le}))},Mi.duration=function(le){var C=this.id,z=this.namespace;return arguments.length<1?this.node()[z][C].duration:De(this,typeof le=="function"?function(B,G,ie){B[z][C].duration=Math.max(1,le.call(B,B.__data__,G,ie))}:(le=Math.max(1,le),function(B){B[z][C].duration=le}))},Mi.each=function(le,C){var z=this.id,B=this.namespace;if(arguments.length<2){var G=is,ie=hs;try{hs=z,De(this,function(ue,ge,ye){is=ue[B][z],le.call(ue,ue.__data__,ge,ye)})}finally{is=G,hs=ie}}else De(this,function(ue){var ge=ue[B][z];(ge.event||(ge.event=g.dispatch("start","end","interrupt"))).on(le,C)});return this},Mi.transition=function(){for(var le,C,z,B=this.id,G=++ps,ie=this.namespace,ue=[],ge=0,ye=this.length;ge<ye;ge++){ue.push(le=[]);for(var Me,je=0,We=(Me=this[ge]).length;je<We;je++)(C=Me[je])&&os(C,je,ie,G,{time:(z=C[ie][B]).time,ease:z.ease,delay:z.delay+z.duration,duration:z.duration}),le.push(C)}return Qa(ue,ie,G)},g.svg.axis=function(){var le,C=g.scale.linear(),z=Ks,B=6,G=6,ie=3,ue=[10],ge=null;function ye(Me){Me.each(function(){var je,We=g.select(this),nt=this.__chart__||C,bt=this.__chart__=C.copy(),At=ge??(bt.ticks?bt.ticks.apply(bt,ue):bt.domain()),_t=le??(bt.tickFormat?bt.tickFormat.apply(bt,ue):E),wt=We.selectAll(".tick").data(At,bt),xt=wt.enter().insert("g",".domain").attr("class","tick").style("opacity",Tt),Ft=g.transition(wt.exit()).style("opacity",Tt).remove(),Ot=g.transition(wt.order()).style("opacity",1),Nt=Math.max(B,0)+ie,er=sn(bt),fr=We.selectAll(".domain").data([0]),kr=(fr.enter().append("path").attr("class","domain"),g.transition(fr));xt.append("line"),xt.append("text");var Tr,Jr,Xr,hn,on=xt.select("line"),Nn=Ot.select("line"),Gn=wt.select("text").text(_t),oa=xt.select("text"),jr=Ot.select("text"),Mn=z==="top"||z==="left"?-1:1;if(z==="bottom"||z==="top"?(je=ds,Tr="x",Xr="y",Jr="x2",hn="y2",Gn.attr("dy",Mn<0?"0em":".71em").style("text-anchor","middle"),kr.attr("d","M"+er[0]+","+Mn*G+"V0H"+er[1]+"V"+Mn*G)):(je=Qs,Tr="y",Xr="x",Jr="y2",hn="x2",Gn.attr("dy",".32em").style("text-anchor",Mn<0?"end":"start"),kr.attr("d","M"+Mn*G+","+er[0]+"H0V"+er[1]+"H"+Mn*G)),on.attr(hn,Mn*B),oa.attr(Xr,Mn*Nt),Nn.attr(Jr,0).attr(hn,Mn*B),jr.attr(Tr,0).attr(Xr,Mn*Nt),bt.rangeBand){var Yn=bt,Vn=Yn.rangeBand()/2;nt=bt=function(Qn){return Yn(Qn)+Vn}}else nt.rangeBand?nt=bt:Ft.call(je,bt,nt);xt.call(je,nt,bt),Ot.call(je,bt,bt)})}return ye.scale=function(Me){return arguments.length?(C=Me,ye):C},ye.orient=function(Me){return arguments.length?(z=Me in ol?Me+"":Ks,ye):z},ye.ticks=function(){return arguments.length?(ue=b(arguments),ye):ue},ye.tickValues=function(Me){return arguments.length?(ge=Me,ye):ge},ye.tickFormat=function(Me){return arguments.length?(le=Me,ye):le},ye.tickSize=function(Me){var je=arguments.length;return je?(B=+Me,G=+arguments[je-1],ye):B},ye.innerTickSize=function(Me){return arguments.length?(B=+Me,ye):B},ye.outerTickSize=function(Me){return arguments.length?(G=+Me,ye):G},ye.tickPadding=function(Me){return arguments.length?(ie=+Me,ye):ie},ye.tickSubdivide=function(){return arguments.length&&ye},ye};var Ks="bottom",ol={top:1,right:1,bottom:1,left:1};function ds(le,C,z){le.attr("transform",function(B){var G=C(B);
vendor: 4,059 bytes, line 4
4return"translate("+(isFinite(G)?G:z(B))+",0)"})}function Qs(le,C,z){le.attr("transform",function(B){var G=C(B);return"translate(0,"+(isFinite(G)?G:z(B))+")"})}g.svg.brush=function(){var le,C,z=$(je,"brushstart","brush","brushend"),B=null,G=null,ie=[0,0],ue=[0,0],ge=!0,ye=!0,Me=Qi[0];function je(_t){_t.each(function(){var wt=g.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",At).on("touchstart.brush",At),xt=wt.selectAll(".background").data([0]);xt.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),wt.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ft=wt.selectAll(".resize").data(Me,E);Ft.exit().remove(),Ft.enter().append("g").attr("class",function(fr){return"resize "+fr}).style("cursor",function(fr){return As[fr]}).append("rect").attr("x",function(fr){return/[ew]$/.test(fr)?-3:null}).attr("y",function(fr){return/^[ns]/.test(fr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ft.style("display",je.empty()?"none":null);var Ot,Nt=g.transition(wt),er=g.transition(xt);B&&(Ot=sn(B),er.attr("x",Ot[0]).attr("width",Ot[1]-Ot[0]),nt(Nt)),G&&(Ot=sn(G),er.attr("y",Ot[0]).attr("height",Ot[1]-Ot[0]),bt(Nt)),We(Nt)})}function We(_t){_t.selectAll(".resize").attr("transform",function(wt){return"translate("+ie[+/e$/.test(wt)]+","+ue[+/^s/.test(wt)]+")"})}function nt(_t){_t.select(".extent").attr("x",ie[0]),_t.selectAll(".extent,.n>rect,.s>rect").attr("width",ie[1]-ie[0])}function bt(_t){_t.select(".extent").attr("y",ue[0]),_t.selectAll(".extent,.e>rect,.w>rect").attr("height",ue[1]-ue[0])}function At(){var _t,wt,xt=this,Ft=g.select(g.event.target),Ot=z.of(xt,arguments),Nt=g.select(xt),er=Ft.datum(),fr=!/^(n|s)$/.test(er)&&B,kr=!/^(e|w)$/.test(er)&&G,Tr=Ft.classed("extent"),Jr=It(xt),Xr=g.mouse(xt),hn=g.select(n(xt)).on("keydown.brush",Gn).on("keyup.brush",oa);if(g.event.changedTouches?hn.on("touchmove.brush",jr).on("touchend.brush",Yn):hn.on("mousemove.brush",jr).on("mouseup.brush",Yn),Nt.interrupt().selectAll("*").interrupt(),Tr)Xr[0]=ie[0]-Xr[0],Xr[1]=ue[0]-Xr[1];else if(er){var on=+/w$/.test(er),Nn=+/^n/.test(er);wt=[ie[1-on]-Xr[0],ue[1-Nn]-Xr[1]],Xr[0]=ie[on],Xr[1]=ue[Nn]}else g.event.altKey&&(_t=Xr.slice());function Gn(){g.event.keyCode==32&&(Tr||(_t=null,Xr[0]-=ie[1],Xr[1]-=ue[1],Tr=2),q())}function oa(){g.event.keyCode==32&&Tr==2&&(Xr[0]+=ie[1],Xr[1]+=ue[1],Tr=0,q())}function jr(){var Vn=g.mouse(xt),Qn=!1;wt&&(Vn[0]+=wt[0],Vn[1]+=wt[1]),Tr||(g.event.altKey?(_t||(_t=[(ie[0]+ie[1])/2,(ue[0]+ue[1])/2]),Xr[0]=ie[+(Vn[0]<_t[0])],Xr[1]=ue[+(Vn[1]<_t[1])]):_t=null),fr&&Mn(Vn,B,0)&&(nt(Nt),Qn=!0),kr&&Mn(Vn,G,1)&&(bt(Nt),Qn=!0),Qn&&(We(Nt),Ot({type:"brush",mode:Tr?"move":"resize"}))}function Mn(Vn,Qn,la){var wa,Zn,ma=sn(Qn),pa=ma[0],Aa=ma[1],va=Xr[la],Sa=la?ue:ie,Da=Sa[1]-Sa[0];if(Tr&&(pa-=va,Aa-=Da+va),wa=(la?ye:ge)?Math.max(pa,Math.min(Aa,Vn[la])):Vn[la],Tr?Zn=(wa+=va)+Da:(_t&&(va=Math.max(pa,Math.min(Aa,2*_t[la]-wa))),va<wa?(Zn=wa,wa=va):Zn=va),Sa[0]!=wa||Sa[1]!=Zn)return la?C=null:le=null,Sa[0]=wa,Sa[1]=Zn,!0}function Yn(){jr(),Nt.style("pointer-events","all").selectAll(".resize").style("display",je.empty()?"none":null),g.select("body").style("cursor",null),hn.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),Jr(),Ot({type:"brushend"})}Nt.style("pointer-events","none").selectAll(".resize").style("display",null),g.select("body").style("cursor",Ft.style("cursor")),Ot({type:"brushstart"}),jr()}return je.event=function(_t){_t.each(function(){var wt=z.of(this,arguments),xt={x:ie,y:ue,i:le,j:C},Ft=this.__chart__||xt;this.__chart__=xt,hs?g.select(this).transition().each("start.brush",function(){le=Ft.i,C=Ft.j,ie=Ft.x,ue=Ft.y,wt({type:"brushstart"})}).tween("brush:brush",function(){var Ot=li(ie,xt.x),Nt=li(ue,xt.y);return le=C=null,function(er){ie=xt.x=Ot(er),ue=xt.y=Nt(er),wt({type:"brush",mode:"resize"})}}
4).each("end.brush",function(){le=xt.i,C=xt.j,wt({type:"brush",mode:"resize"}),wt({type:"brushend"})}):(wt({type:"brushstart"}),wt({type:"brush",mode:"resize"}),wt({type:"brushend"}))})},je.x=function(_t){return arguments.length?(Me=Qi[!(B=_t)<<1|!G],je):B},je.y=function(_t){return arguments.length?(Me=Qi[!B<<1|!(G=_t)],je):G},je.clamp=function(_t){return arguments.length?(B&&G?(ge=!!_t[0],ye=!!_t[1]):B?ge=!!_t:G&&(ye=!!_t),je):B&&G?[ge,ye]:B?ge:G?ye:null},je.extent=function(_t){var wt,xt,Ft,Ot,Nt;return arguments.length?(B&&(wt=_t[0],xt=_t[1],G&&(wt=wt[0],xt=xt[0]),le=[wt,xt],B.invert&&(wt=B(wt),xt=B(xt)),xt<wt&&(Nt=wt,wt=xt,xt=Nt),wt==ie[0]&&xt==ie[1]||(ie=[wt,xt])),G&&(Ft=_t[0],Ot=_t[1],B&&(Ft=Ft[1],Ot=Ot[1]),C=[Ft,Ot],G.invert&&(Ft=G(Ft),Ot=G(Ot)),Ot<Ft&&(Nt=Ft,Ft=Ot,Ot=Nt),Ft==ue[0]&&Ot==ue[1]||(ue=[Ft,Ot])),je):(B&&(le?(wt=le[0],xt=le[1]):(wt=ie[0],xt=ie[1],B.invert&&(wt=B.invert(wt),xt=B.invert(xt)),xt<wt&&(Nt=wt,wt=xt,xt=Nt))),G&&(C?(Ft=C[0],Ot=C[1]):(Ft=ue[0],Ot=ue[1],G.invert&&(Ft=G.invert(Ft),Ot=G.invert(Ot)),Ot<Ft&&(Nt=Ft,Ft=Ot,Ot=Nt))),B&&G?[[wt,Ft],[xt,Ot]]:B?[wt,xt]:G&&[Ft,Ot])},je.clear=function(){return je.empty()||(ie=[0,0],ue=[0,0],le=C=null),je},je.empty=function(){return!!B&&ie[0]==ie[1]||!!G&&ue[0]==ue[1]},g.rebind(je,z,"on")};var As={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Qi=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function sl(le){return JSON.parse(le.responseText)}function ll(le){var C=v.createRange();return C.selectNode(v.body),C.createContextualFragment(le.responseText)}g.text=Fr(function(le){return le.responseText}),g.json=function(le,C){return tn(le,"application/json",sl,C)},g.html=function(le,C){return tn(le,"text/html",ll,C)},g.xml=Fr(function(le){return le.responseXML}),typeof ee=="object"&&ee.exports?ee.exports=g:this.d3=g}).apply(self)},{}],59:[function(y,ee,te){ee.exports=y("./quad")},{"./quad":60}],60:[function(y,ee,te){var g=y("binary-search-bounds"),m=y("clamp"),b=y("parse-rect"),v=y("array-bounds"),e=y("pick-by-alias"),n=y("defined"),t=y("flatten-vertex-data"),o=y("is-obj"),r=y("dtype"),d=y("math-log2");function c(i,u){for(var f=u[0],s=u[1],h=1/(u[2]-f),p=1/(u[3]-s),a=new Array(i.length),x=0,l=i.length/2;x<l;x++)a[2*x]=m((i[2*x]-f)*h,0,1),a[2*x+1]=m((i[2*x+1]-s)*p,0,1);return a}ee.exports=function(i,u){u||(u={}),i=t(i,"float64"),u=e(u,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var f=n(u.maxDepth,255),s=n(u.bounds,v(i,2));s[0]===s[2]&&s[2]++,s[1]===s[3]&&s[3]++;var h,p=c(i,s),a=i.length>>>1;u.dtype||(u.dtype="array"),typeof u.dtype=="string"?h=new(r(u.dtype))(a):u.dtype&&(h=u.dtype,Array.isArray(h)&&(h.length=a));for(var x=0;x<a;++x)h[x]=x;var l=[],w=[],_=[],T=[];(function F(H,V,Z,K,q,W){if(!K.length)return null;var $=l[q]||(l[q]=[]),R=_[q]||(_[q]=[]),N=w[q]||(w[q]=[]),U=$.length;if(++q>f||W>1073741824){for(var Q=0;Q<K.length;Q++)$.push(K[Q]),R.push(W),N.push(null,null,null,null);return U}if($.push(K[0]),R.push(W),K.length<=1)return N.push(null,null,null,null),U;for(var j=.5*Z,X=H+j,J=V+j,re=[],ne=[],se=[],oe=[],pe=1,ce=K.length;pe<ce;pe++){var de=K[pe],xe=p[2*de],we=p[2*de+1];xe<X?we<J?re.push(de):ne.push(de):we<J?se.push(de):oe.push(de)}return W<<=2,N.push(F(H,V,j,re,q,W),F(H,J,j,ne,q,W+1),F(X,V,j,se,q,W+2),F(X,J,j,oe,q,W+3)),U})(0,0,1,h,0,1);for(var k=0,L=0;L<l.length;L++){var A=l[L];if(h.set)h.set(A,k);else for(var I=0,P=A.length;I<P;I++)h[I+k]=A[I];var S=k+l[L].length;T[L]=[k,S],k=S}return h.range=function(){for(var F,H=[],V=arguments.length;V--;)H[V]=arguments[V];if(o(H[H.length-1])){var Z=H.pop();H.length||Z.x==null&&Z.l==null&&Z.left==null||(H=[Z],F={}),F=e(Z,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else F={};H.length||(H=s);var K=b.apply(void 0,H),q=[Math.min(K.x,K.x+K.width),Math.min(K.y,K.y+K.height),Math.max(K.x,K.x+K.width),Math.max(K.y,K.y+K.height)],W=q[0],$=q[1],R=q[2],N=q[3],U=c([W,$,R,N],s),Q=U[0],j=U[1],X=U[2],J=U[3],re=n(F.level,l.length);if(F.d!=null){var ne;typeof F.d=="number"?ne=[F.d,F.d]:F.d.length&&(ne=F.d),re=Math.min(Math.max(Math.ceil(-d(Math.abs(ne[0])/(s[2]-s[0]))),Math.ceil(-d(Math.abs(ne[1])/(s[3]-s[1])))),re)}if(re=Math.min(re,l.length),F.lod)return E(Q,j,X,J,re);var se=[];function oe(ce,de,xe,we,be,Ee){if(be!==null&&Ee!==null&&!(Q>ce+xe||j>de+xe||X<ce||J<de||we>=re||be===Ee)){var fe=l[we];Ee===void 0&&(Ee=fe.length);for(var me=be;me<Ee;me++){var Te=fe[me],_e=i[2*Te],Ae=i[2*Te+1];_e>=W&&_e<=R&&Ae>=$&&Ae<=N&&se.push(Te)}var Pe=w[we],De=Pe[4*be+0],Ve=Pe[4*be+1],Qe=Pe[4*be+2],Oe=Pe[4*be+3],Ue=pe(Pe,be+1),Ge=.5*xe,Ye=we+1;oe(ce,de,Ge,Ye,De,Ve||Qe||Oe||Ue),oe(ce,de+Ge,Ge,Ye,Ve,Qe||Oe||Ue),oe(ce+Ge,de,Ge,Ye,Qe,Oe||Ue),oe(ce+Ge,de+Ge,Ge,Ye,Oe,Ue)}}function pe(ce,de){for(var xe=null,we=0;xe===null;)if(xe=ce[4*de+we],++we>ce.length)return null;return xe}return oe(0,0,1,0,0,1),se},h;function E(F,H,V,Z,K){for(var q=[],W=0;W<K;W++){var $=_[W],R=T[W][0],N=D(F,H,W),U=D(V,Z,W),Q=g.ge($,N),j=g.gt($,U,Q,$.length-1);q[W]=[Q+R,j+R]}return q}function D(F,H,V){for(var Z=1,K=.5,q=.5,W=.5,$=0;$<V;$++)Z<<=2,Z+=F<K?H<q?0:1:H<q?2:3,W*=.5,K+=F<K?-W:W,q+=H<q?-W:W;return Z}}}
4,{"array-bounds":71,"binary-search-bounds":80,clamp:86,defined:124,dtype:127,"flatten-vertex-data":191,"is-obj":235,"math-log2":240,"parse-rect":249,"pick-by-alias":253}],61:[function(y,ee,te){Object.defineProperty(te,"__esModule",{value:!0});var g=y("@turf/meta");function m(e){var n=0;if(e&&e.length>0){n+=Math.abs(b(e[0]));for(var t=1;t<e.length;t++)n-=Math.abs(b(e[t]))}return n}function b(e){var n,t,o,r,d,c,i=0,u=e.length;if(u>2){for(c=0;c<u;c++)c===u-2?(o=u-2,r=u-1,d=0):c===u-1?(o=u-1,r=0,d=1):(o=c,r=c+1,d=c+2),n=e[o],t=e[r],i+=(v(e[d][0])-v(n[0]))*Math.sin(v(t[1]));i=6378137*i*6378137/2}return i}function v(e){return e*Math.PI/180}te.default=function(e){return g.geomReduce(e,function(n,t){return n+function(o){var r,d=0;switch(o.type){case"Polygon":return m(o.coordinates);case"MultiPolygon":for(r=0;r<o.coordinates.length;r++)d+=m(o.coordinates[r]);return d;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)},0)}},{"@turf/meta":63}],62:[function(y,ee,te){function g(u,f,s){s===void 0&&(s={});var h={type:"Feature"};return(s.id===0||s.id)&&(h.id=s.id),s.bbox&&(h.bbox=s.bbox),h.properties=f||{},h.geometry=u,h}function m(u,f,s){if(s===void 0&&(s={}),!u)throw new Error("coordinates is required");if(!Array.isArray(u))throw new Error("coordinates must be an Array");if(u.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!i(u[0])||!i(u[1]))throw new Error("coordinates must contain numbers");return g({type:"Point",coordinates:u},f,s)}function b(u,f,s){s===void 0&&(s={});for(var h=0,p=u;h<p.length;h++){var a=p[h];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var x=0;x<a[a.length-1].length;x++)if(a[a.length-1][x]!==a[0][x])throw new Error("First and last Position are not equivalent.")}return g({type:"Polygon",coordinates:u},f,s)}function v(u,f,s){if(s===void 0&&(s={}),u.length<2)throw new Error("coordinates must be an array of two or more positions");return g({type:"LineString",coordinates:u},f,s)}function e(u,f){f===void 0&&(f={});var s={type:"FeatureCollection"};return f.id&&(s.id=f.id),f.bbox&&(s.bbox=f.bbox),s.features=u,s}function n(u,f,s){return s===void 0&&(s={}),g({type:"MultiLineString",coordinates:u},f,s)}function t(u,f,s){return s===void 0&&(s={}),g({type:"MultiPoint",coordinates:u},f,s)}function o(u,f,s){return s===void 0&&(s={}),g({type:"MultiPolygon",coordinates:u},f,s)}function r(u,f){f===void 0&&(f="kilometers");var s=te.factors[f];
4if(!s)throw new Error(f+" units is invalid");return u*s}function d(u,f){f===void 0&&(f="kilometers");var s=te.factors[f];if(!s)throw new Error(f+" units is invalid");return u/s}function c(u){return 180*(u%(2*Math.PI))/Math.PI}function i(u){return!isNaN(u)&&u!==null&&!Array.isArray(u)}Object.defineProperty(te,"__esModule",{value:!0}),te.earthRadius=63710088e-1,te.factors={centimeters:100*te.earthRadius,centimetres:100*te.earthRadius,degrees:te.earthRadius/111325,feet:3.28084*te.earthRadius,inches:39.37*te.earthRadius,kilometers:te.earthRadius/1e3,kilometres:te.earthRadius/1e3,meters:te.earthRadius,metres:te.earthRadius,miles:te.earthRadius/1609.344,millimeters:1e3*te.earthRadius,millimetres:1e3*te.earthRadius,nauticalmiles:te.earthRadius/1852,radians:1,yards:1.0936*te.earthRadius},te.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/te.earthRadius,yards:1.0936133},te.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},te.feature=g,te.geometry=function(u,f,s){switch(u){case"Point":return m(f).geometry;case"LineString":return v(f).geometry;case"Polygon":return b(f).geometry;case"MultiPoint":return t(f).geometry;case"MultiLineString":return n(f).geometry;case"MultiPolygon":return o(f).geometry;default:throw new Error(u+" is invalid")}},te.point=m,te.points=function(u,f,s){return s===void 0&&(s={}),e(u.map(function(h){return m(h,f)}),s)},te.polygon=b,te.polygons=function(u,f,s){return s===void 0&&(s={}),e(u.map(function(h){return b(h,f)}),s)},te.lineString=v,te.lineStrings=function(u,f,s){return s===void 0&&(s={}),e(u.map(function(h){return v(h,f)}),s)},te.featureCollection=e,te.multiLineString=n,te.multiPoint=t,te.multiPolygon=o,te.geometryCollection=function(u,f,s){return s===void 0&&(s={}),g({type:"GeometryCollection",geometries:u},f,s)},te.round=function(u,f){if(f===void 0&&(f=0),f&&!(f>=0))throw new Error("precision must be a positive number");var s=Math.pow(10,f||0);return Math.round(u*s)/s},te.radiansToLength=r,te.lengthToRadians=d,te.lengthToDegrees=function(u,f){return c(d(u,f))},te.bearingToAzimuth=function(u){var f=u%360;return f<0&&(f+=360),f},te.radiansToDegrees=c,te.degreesToRadians=function(u){return u%360*Math.PI/180},te.convertLength=function(u,f,s){if(f===void 0&&(f="kilometers"),s===void 0&&(s="kilometers"),!(u>=0))throw new Error("length must be a positive number");return r(d(u,f),s)},te.convertArea=function(u,f,s){if(f===void 0&&(f="meters"),s===void 0&&(s="kilometers"),!(u>=0))throw new Error("area must be a positive number");var h=te.areaFactors[f];if(!h)throw new Error("invalid original units");var p=te.areaFactors[s];if(!p)throw new Error("invalid final units");return u/h*p},te.isNumber=i,te.isObject=function(u){return!!u&&u.constructor===Object},te.validateBBox=function(u){if(!u)throw new Error("bbox is required");if(!Array.isArray(u))throw new Error("bbox must be an Array");if(u.length!==4&&u.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");u.forEach(function(f){if(!i(f))throw new Error("bbox must only contain numbers")})},te.validateId=function(u){if(!u)throw new Error("id is required");if(["string","number"].indexOf(typeof u)===-1)throw new Error("id must be a number or a string")}},{}],63:[function(y,ee,te){Object.defineProperty(te,"__esModule",{value:!0});var g=y("@turf/helpers");function m(r,d,c){if(r!==null)for(var i,u,f,s,h,p,a,x,l=0,w=0,_=r.type,T=_==="FeatureCollection",k=_==="Feature",L=T?r.features.length:1,A=0;A<L;A++){h=(x=!!(a=T?r.features[A].geometry:k?r.geometry:r)&&a.type==="GeometryCollection")?a.geometries.length:1;for(var I=0;I<h;I++){var P=0,S=0;if((s=x?a.geometries[I]:a)!==null){p=s.coordinates;var E=s.type;switch(l=!c||E!=="Polygon"&&E!=="MultiPolygon"?0:1,E){case null:break;case"Point":if(d(p,w,A,P,S)===!1)return!1;w++,P++;break;case"LineString":case"MultiPoint":for(i=0;i<p.length;i++){if(d(p[i],w,A,P,S)===!1)return!1;w++,E==="MultiPoint"&&P++}E==="LineString"&&P++;break;case"Polygon":case"MultiLineString":for(i=0;i<p.length;i++){for(u=0;
4u<p[i].length-l;u++){if(d(p[i][u],w,A,P,S)===!1)return!1;w++}E==="MultiLineString"&&P++,E==="Polygon"&&S++}E==="Polygon"&&P++;break;case"MultiPolygon":for(i=0;i<p.length;i++){for(S=0,u=0;u<p[i].length;u++){for(f=0;f<p[i][u].length-l;f++){if(d(p[i][u][f],w,A,P,S)===!1)return!1;w++}S++}P++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(m(s.geometries[i],d,c)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function b(r,d){var c;switch(r.type){case"FeatureCollection":for(c=0;c<r.features.length&&d(r.features[c].properties,c)!==!1;c++);break;case"Feature":d(r.properties,0)}}function v(r,d){if(r.type==="Feature")d(r,0);else if(r.type==="FeatureCollection")for(var c=0;c<r.features.length&&d(r.features[c],c)!==!1;c++);}function e(r,d){var c,i,u,f,s,h,p,a,x,l,w=0,_=r.type==="FeatureCollection",T=r.type==="Feature",k=_?r.features.length:1;for(c=0;c<k;c++){for(h=_?r.features[c].geometry:T?r.geometry:r,a=_?r.features[c].properties:T?r.properties:{},x=_?r.features[c].bbox:T?r.bbox:void 0,l=_?r.features[c].id:T?r.id:void 0,s=(p=!!h&&h.type==="GeometryCollection")?h.geometries.length:1,u=0;u<s;u++)if((f=p?h.geometries[u]:h)!==null)switch(f.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(d(f,w,a,x,l)===!1)return!1;break;case"GeometryCollection":for(i=0;i<f.geometries.length;i++)if(d(f.geometries[i],w,a,x,l)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}else if(d(null,w,a,x,l)===!1)return!1;w++}}function n(r,d){e(r,function(c,i,u,f,s){var h,p=c===null?null:c.type;switch(p){case null:case"Point":case"LineString":case"Polygon":return d(g.feature(c,u,{bbox:f,id:s}),i,0)!==!1&&void 0}switch(p){case"MultiPoint":h="Point";break;case"MultiLineString":h="LineString";break;case"MultiPolygon":h="Polygon"}for(var a=0;a<c.coordinates.length;a++){var x={type:h,coordinates:c.coordinates[a]};if(d(g.feature(x,u),i,a)===!1)return!1}})}function t(r,d){n(r,function(c,i,u){var f=0;if(c.geometry){var s=c.geometry.type;if(s!=="Point"&&s!=="MultiPoint"){var h,p=0,a=0,x=0;return m(c,function(l,w,_,T,k){if(h===void 0||i>p||T>a||k>x)return h=l,p=i,a=T,x=k,void(f=0);var L=g.lineString([h,l],c.properties);if(d(L,i,u,k,f)===!1)return!1;f++,h=l})!==!1&&void 0}}})}function o(r,d){if(!r)throw new Error("geojson is required");n(r,function(c,i,u){if(c.geometry!==null){var f=c.geometry.type,s=c.geometry.coordinates;switch(f){case"LineString":if(d(c,i,u,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h<s.length;h++)if(d(g.lineString(s[h],c.properties),i,u,h)===!1)return!1}}})}te.coordEach=m,te.coordReduce=function(r,d,c,i){var u=c;return m(r,function(f,s,h,p,a){u=s===0&&c===void 0?f:d(u,f,s,h,p,a)},i),u},te.propEach=b,te.propReduce=function(r,d,c){var i=c;return b(r,function(u,f){i=f===0&&c===void 0?u:d(i,u,f)}),i},te.featureEach=v,te.featureReduce=function(r,d,c){var i=c;return v(r,function(u,f){i=f===0&&c===void 0?u:d(i,u,f)}),i},te.coordAll=function(r){var d=[];return m(r,function(c){d.push(c)}),d},te.geomEach=e,te.geomReduce=function(r,d,c){var i=c;return e(r,function(u,f,s,h,p){i=f===0&&c===void 0?u:d(i,u,f,s,h,p)}),i},te.flattenEach=n,te.flattenReduce=function(r,d,c){var i=c;return n(r,function(u,f,s){i=f===0&&s===0&&c===void 0?u:d(i,u,f,s)}),i},te.segmentEach=t,te.segmentReduce=function(r,d,c){var i=c,u=!1;return t(r,function(f,s,h,p,a){i=u===!1&&c===void 0?f:d(i,f,s,h,p,a),u=!0}),i},te.lineEach=o,te.lineReduce=function(r,d,c){var i=c;return o(r,function(u,f,s,h){i=f===0&&c===void 0?u:d(i,u,f,s,h)}),i},te.findSegment=function(r,d){if(d=d||{},!g.isObject(d))throw new Error("options is invalid");var c,i=d.featureIndex||0,u=d.multiFeatureIndex||0,f=d.geometryIndex||0,s=d.segmentIndex||0,h=d.properties;switch(r.type){case"FeatureCollection":i<0&&(i=r.features.length+i),h=h||r.features[i].properties,c=r.features[i].geometry;break;case"Feature":h=h||r.properties,c=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=r;break;
4default:throw new Error("geojson is invalid")}if(c===null)return null;var p=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=p.length+s-1),g.lineString([p[s],p[s+1]],h,d);case"Polygon":return f<0&&(f=p.length+f),s<0&&(s=p[f].length+s-1),g.lineString([p[f][s],p[f][s+1]],h,d);case"MultiLineString":return u<0&&(u=p.length+u),s<0&&(s=p[u].length+s-1),g.lineString([p[u][s],p[u][s+1]],h,d);case"MultiPolygon":return u<0&&(u=p.length+u),f<0&&(f=p[u].length+f),s<0&&(s=p[u][f].length-s-1),g.lineString([p[u][f][s],p[u][f][s+1]],h,d)}throw new Error("geojson is invalid")},te.findPoint=function(r,d){if(d=d||{},!g.isObject(d))throw new Error("options is invalid");var c,i=d.featureIndex||0,u=d.multiFeatureIndex||0,f=d.geometryIndex||0,s=d.coordIndex||0,h=d.properties;switch(r.type){case"FeatureCollection":i<0&&(i=r.features.length+i),h=h||r.features[i].properties,c=r.features[i].geometry;break;case"Feature":h=h||r.properties,c=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=r;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var p=c.coordinates;switch(c.type){case"Point":return g.point(p,h,d);case"MultiPoint":return u<0&&(u=p.length+u),g.point(p[u],h,d);case"LineString":return s<0&&(s=p.length+s),g.point(p[s],h,d);case"Polygon":return f<0&&(f=p.length+f),s<0&&(s=p[f].length+s),g.point(p[f][s],h,d);case"MultiLineString":return u<0&&(u=p.length+u),s<0&&(s=p[u].length+s),g.point(p[u][s],h,d);case"MultiPolygon":return u<0&&(u=p.length+u),f<0&&(f=p[u].length+f),s<0&&(s=p[u][f].length-s),g.point(p[u][f][s],h,d)}throw new Error("geojson is invalid")}},{"@turf/helpers":62}],64:[function(y,ee,te){Object.defineProperty(te,"__esModule",{value:!0});var g=y("@turf/meta");function m(b){var v=[1/0,1/0,-1/0,-1/0];return g.coordEach(b,function(e){v[0]>e[0]&&(v[0]=e[0]),v[1]>e[1]&&(v[1]=e[1]),v[2]<e[0]&&(v[2]=e[0]),v[3]<e[1]&&(v[3]=e[1])}),v}m.default=m,te.default=m},{"@turf/meta":66}],65:[function(y,ee,te){arguments[4][62][0].apply(te,arguments)},{dup:62}],66:[function(y,ee,te){arguments[4][63][0].apply(te,arguments)},{"@turf/helpers":65,dup:63}],67:[function(y,ee,te){Object.defineProperty(te,"__esModule",{value:!0});var g=y("@turf/meta"),m=y("@turf/helpers");te.default=function(b,v){v===void 0&&(v={});var e=0,n=0,t=0;return g.coordEach(b,function(o){e+=o[0],n+=o[1],t++}),m.point([e/t,n/t],v.properties)}},{"@turf/helpers":68,"@turf/meta":69}],68:[function(y,ee,te){function g(u,f,s){s===void 0&&(s={});var h={type:"Feature"};return(s.id===0||s.id)&&(h.id=s.id),s.bbox&&(h.bbox=s.bbox),h.properties=f||{},h.geometry=u,h}function m(u,f,s){return s===void 0&&(s={}),g({type:"Point",coordinates:u},f,s)}function b(u,f,s){s===void 0&&(s={});for(var h=0,p=u;h<p.length;h++){var a=p[h];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var x=0;x<a[a.length-1].length;x++)if(a[a.length-1][x]!==a[0][x])throw new Error("First and last Position are not equivalent.")}return g({type:"Polygon",coordinates:u},f,s)}function v(u,f,s){if(s===void 0&&(s={}),u.length<2)throw new Error("coordinates must be an array of two or more positions");return g({type:"LineString",coordinates:u},f,s)}function e(u,f){f===void 0&&(f={});var s={type:"FeatureCollection"};return f.id&&(s.id=f.id),f.bbox&&(s.bbox=f.bbox),s.features=u,s}function n(u,f,s){return s===void 0&&(s={}),g({type:"MultiLineString",coordinates:u},f,s)}function t(u,f,s){return s===void 0&&(s={}),g({type:"MultiPoint",coordinates:u},f,s)}function o(u,f,s){return s===void 0&&(s={}),g({type:"MultiPolygon",coordinates:u},f,s)}function r(u,f){f===void 0&&(f="kilometers");var s=te.factors[f];
4if(!s)throw new Error(f+" units is invalid");return u*s}function d(u,f){f===void 0&&(f="kilometers");var s=te.factors[f];if(!s)throw new Error(f+" units is invalid");return u/s}function c(u){return 180*(u%(2*Math.PI))/Math.PI}function i(u){return!isNaN(u)&&u!==null&&!Array.isArray(u)&&!/^\s*$/.test(u)}Object.defineProperty(te,"__esModule",{value:!0}),te.earthRadius=63710088e-1,te.factors={centimeters:100*te.earthRadius,centimetres:100*te.earthRadius,degrees:te.earthRadius/111325,feet:3.28084*te.earthRadius,inches:39.37*te.earthRadius,kilometers:te.earthRadius/1e3,kilometres:te.earthRadius/1e3,meters:te.earthRadius,metres:te.earthRadius,miles:te.earthRadius/1609.344,millimeters:1e3*te.earthRadius,millimetres:1e3*te.earthRadius,nauticalmiles:te.earthRadius/1852,radians:1,yards:te.earthRadius/1.0936},te.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/te.earthRadius,yards:1/1.0936},te.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},te.feature=g,te.geometry=function(u,f,s){switch(u){case"Point":return m(f).geometry;case"LineString":return v(f).geometry;case"Polygon":return b(f).geometry;case"MultiPoint":return t(f).geometry;case"MultiLineString":return n(f).geometry;case"MultiPolygon":return o(f).geometry;default:throw new Error(u+" is invalid")}},te.point=m,te.points=function(u,f,s){return s===void 0&&(s={}),e(u.map(function(h){return m(h,f)}),s)},te.polygon=b,te.polygons=function(u,f,s){return s===void 0&&(s={}),e(u.map(function(h){return b(h,f)}),s)},te.lineString=v,te.lineStrings=function(u,f,s){return s===void 0&&(s={}),e(u.map(function(h){return v(h,f)}),s)},te.featureCollection=e,te.multiLineString=n,te.multiPoint=t,te.multiPolygon=o,te.geometryCollection=function(u,f,s){return s===void 0&&(s={}),g({type:"GeometryCollection",geometries:u},f,s)},te.round=function(u,f){if(f===void 0&&(f=0),f&&!(f>=0))throw new Error("precision must be a positive number");var s=Math.pow(10,f||0);return Math.round(u*s)/s},te.radiansToLength=r,te.lengthToRadians=d,te.lengthToDegrees=function(u,f){return c(d(u,f))},te.bearingToAzimuth=function(u){var f=u%360;return f<0&&(f+=360),f},te.radiansToDegrees=c,te.degreesToRadians=function(u){return u%360*Math.PI/180},te.convertLength=function(u,f,s){if(f===void 0&&(f="kilometers"),s===void 0&&(s="kilometers"),!(u>=0))throw new Error("length must be a positive number");return r(d(u,f),s)},te.convertArea=function(u,f,s){if(f===void 0&&(f="meters"),s===void 0&&(s="kilometers"),!(u>=0))throw new Error("area must be a positive number");var h=te.areaFactors[f];if(!h)throw new Error("invalid original units");var p=te.areaFactors[s];if(!p)throw new Error("invalid final units");return u/h*p},te.isNumber=i,te.isObject=function(u){return!!u&&u.constructor===Object},te.validateBBox=function(u){if(!u)throw new Error("bbox is required");if(!Array.isArray(u))throw new Error("bbox must be an Array");if(u.length!==4&&u.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");u.forEach(function(f){if(!i(f))throw new Error("bbox must only contain numbers")})},te.validateId=function(u){if(!u)throw new Error("id is required");if(["string","number"].indexOf(typeof u)===-1)throw new Error("id must be a number or a string")},te.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},te.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},te.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},te.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},te.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},te.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},te.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}
4],69:[function(y,ee,te){Object.defineProperty(te,"__esModule",{value:!0});var g=y("@turf/helpers");function m(r,d,c){if(r!==null)for(var i,u,f,s,h,p,a,x,l=0,w=0,_=r.type,T=_==="FeatureCollection",k=_==="Feature",L=T?r.features.length:1,A=0;A<L;A++){h=(x=!!(a=T?r.features[A].geometry:k?r.geometry:r)&&a.type==="GeometryCollection")?a.geometries.length:1;for(var I=0;I<h;I++){var P=0,S=0;if((s=x?a.geometries[I]:a)!==null){p=s.coordinates;var E=s.type;switch(l=!c||E!=="Polygon"&&E!=="MultiPolygon"?0:1,E){case null:break;case"Point":if(d(p,w,A,P,S)===!1)return!1;w++,P++;break;case"LineString":case"MultiPoint":for(i=0;i<p.length;i++){if(d(p[i],w,A,P,S)===!1)return!1;w++,E==="MultiPoint"&&P++}E==="LineString"&&P++;break;case"Polygon":case"MultiLineString":for(i=0;i<p.length;i++){for(u=0;u<p[i].length-l;u++){if(d(p[i][u],w,A,P,S)===!1)return!1;w++}E==="MultiLineString"&&P++,E==="Polygon"&&S++}E==="Polygon"&&P++;break;case"MultiPolygon":for(i=0;i<p.length;i++){for(S=0,u=0;u<p[i].length;u++){for(f=0;f<p[i][u].length-l;f++){if(d(p[i][u][f],w,A,P,S)===!1)return!1;w++}S++}P++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(m(s.geometries[i],d,c)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function b(r,d){var c;switch(r.type){case"FeatureCollection":for(c=0;c<r.features.length&&d(r.features[c].properties,c)!==!1;c++);break;case"Feature":d(r.properties,0)}}function v(r,d){if(r.type==="Feature")d(r,0);else if(r.type==="FeatureCollection")for(var c=0;c<r.features.length&&d(r.features[c],c)!==!1;c++);}function e(r,d){var c,i,u,f,s,h,p,a,x,l,w=0,_=r.type==="FeatureCollection",T=r.type==="Feature",k=_?r.features.length:1;for(c=0;c<k;c++){for(h=_?r.features[c].geometry:T?r.geometry:r,a=_?r.features[c].properties:T?r.properties:{},x=_?r.features[c].bbox:T?r.bbox:void 0,l=_?r.features[c].id:T?r.id:void 0,s=(p=!!h&&h.type==="GeometryCollection")?h.geometries.length:1,u=0;u<s;u++)if((f=p?h.geometries[u]:h)!==null)switch(f.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(d(f,w,a,x,l)===!1)return!1;break;case"GeometryCollection":for(i=0;i<f.geometries.length;i++)if(d(f.geometries[i],w,a,x,l)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}else if(d(null,w,a,x,l)===!1)return!1;w++}}function n(r,d){e(r,function(c,i,u,f,s){var h,p=c===null?null:c.type;switch(p){case null:case"Point":case"LineString":case"Polygon":return d(g.feature(c,u,{bbox:f,id:s}),i,0)!==!1&&void 0}switch(p){case"MultiPoint":h="Point";break;case"MultiLineString":h="LineString";break;case"MultiPolygon":h="Polygon"}for(var a=0;a<c.coordinates.length;a++){var x={type:h,coordinates:c.coordinates[a]};if(d(g.feature(x,u),i,a)===!1)return!1}})}function t(r,d){n(r,function(c,i,u){var f=0;if(c.geometry){var s=c.geometry.type;if(s!=="Point"&&s!=="MultiPoint"){var h,p=0,a=0,x=0;return m(c,function(l,w,_,T,k){if(h===void 0||i>p||T>a||k>x)return h=l,p=i,a=T,x=k,void(f=0);var L=g.lineString([h,l],c.properties);if(d(L,i,u,k,f)===!1)return!1;f++,h=l})!==!1&&void 0}}})}function o(r,d){if(!r)throw new Error("geojson is required");n(r,function(c,i,u){if(c.geometry!==null){var f=c.geometry.type,s=c.geometry.coordinates;switch(f){case"LineString":if(d(c,i,u,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h<s.length;h++)if(d(g.lineString(s[h],c.properties),i,u,h)===!1)return!1}}})}te.coordEach=m,te.coordReduce=function(r,d,c,i){var u=c;return m(r,function(f,s,h,p,a){u=s===0&&c===void 0?f:d(u,f,s,h,p,a)},i),u},te.propEach=b,te.propReduce=function(r,d,c){var i=c;return b(r,function(u,f){i=f===0&&c===void 0?u:d(i,u,f)}),i},te.featureEach=v,te.featureReduce=function(r,d,c){var i=c;return v(r,function(u,f){i=f===0&&c===void 0?u:d(i,u,f)}),i},te.coordAll=function(r){var d=[];return m(r,function(c){d.push(c)}),d},te.geomEach=e,te.geomReduce=function(r,d,c){var i=c;return e(r,function(u,f,s,h,p){i=f===0&&c===void 0?u:d(i,u,f,s,h,p)}),i},te.flattenEach=n,te.flattenReduce=function(r,d,c){var i=c;return n(r,function(u,f,s){i=f===0&&s===0&&c===void 0?u:d(i,u,f,s)}),i},te.segmentEach=t,te.segmentReduce=function(r,d,c){var i=c,u=!1;return t(r,function(f,s,h,p,a){i=u===!1&&c===void 0?f:d(i,f,s,h,p,a),u=!0}),i},te.lineEach=o,te.lineReduce=function(r,d,c){var i=c;return o(r,function(u,f,s,h){i=f===0&&c===void 0?u:d(i,u,f,s,h)}),i},te.findSegment=function(r,d){if(d=d||{}
4,!g.isObject(d))throw new Error("options is invalid");var c,i=d.featureIndex||0,u=d.multiFeatureIndex||0,f=d.geometryIndex||0,s=d.segmentIndex||0,h=d.properties;switch(r.type){case"FeatureCollection":i<0&&(i=r.features.length+i),h=h||r.features[i].properties,c=r.features[i].geometry;break;case"Feature":h=h||r.properties,c=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=r;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var p=c.coordinates;switch(c.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=p.length+s-1),g.lineString([p[s],p[s+1]],h,d);case"Polygon":return f<0&&(f=p.length+f),s<0&&(s=p[f].length+s-1),g.lineString([p[f][s],p[f][s+1]],h,d);case"MultiLineString":return u<0&&(u=p.length+u),s<0&&(s=p[u].length+s-1),g.lineString([p[u][s],p[u][s+1]],h,d);case"MultiPolygon":return u<0&&(u=p.length+u),f<0&&(f=p[u].length+f),s<0&&(s=p[u][f].length-s-1),g.lineString([p[u][f][s],p[u][f][s+1]],h,d)}throw new Error("geojson is invalid")},te.findPoint=function(r,d){if(d=d||{},!g.isObject(d))throw new Error("options is invalid");var c,i=d.featureIndex||0,u=d.multiFeatureIndex||0,f=d.geometryIndex||0,s=d.coordIndex||0,h=d.properties;switch(r.type){case"FeatureCollection":i<0&&(i=r.features.length+i),h=h||r.features[i].properties,c=r.features[i].geometry;break;case"Feature":h=h||r.properties,c=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":c=r;break;default:throw new Error("geojson is invalid")}if(c===null)return null;var p=c.coordinates;switch(c.type){case"Point":return g.point(p,h,d);case"MultiPoint":return u<0&&(u=p.length+u),g.point(p[u],h,d);case"LineString":return s<0&&(s=p.length+s),g.point(p[s],h,d);case"Polygon":return f<0&&(f=p.length+f),s<0&&(s=p[f].length+s),g.point(p[f][s],h,d);case"MultiLineString":return u<0&&(u=p.length+u),s<0&&(s=p[u].length+s),g.point(p[u][s],h,d);case"MultiPolygon":return u<0&&(u=p.length+u),f<0&&(f=p[u].length+f),s<0&&(s=p[u][f].length-s),g.point(p[u][f][s],h,d)}throw new Error("geojson is invalid")}},{"@turf/helpers":68}],70:[function(y,ee,te){ee.exports=function(g){var m=0,b=0,v=0,e=0;return g.map(function(n){var t=(n=n.slice())[0],o=t.toUpperCase();if(t!=o)switch(n[0]=o,t){case"a":n[6]+=v,n[7]+=e;break;case"v":n[1]+=e;break;case"h":n[1]+=v;break;default:for(var r=1;r<n.length;)n[r++]+=v,n[r++]+=e}switch(o){case"Z":v=m,e=b;break;case"H":v=n[1];break;case"V":e=n[1];break;case"M":v=m=n[1],e=b=n[2];break;default:v=n[n.length-2],e=n[n.length-1]}return n})}},{}],71:[function(y,ee,te){ee.exports=function(g,m){if(!g||g.length==null)throw Error("Argument should be an array");m=m==null?1:Math.floor(m);for(var b=Array(2*m),v=0;v<m;v++){for(var e=-1/0,n=1/0,t=v,o=g.length;t<o;t+=m)g[t]>e&&(e=g[t]),g[t]<n&&(n=g[t]);b[v]=n,b[m+v]=e}return b}},{}],72:[function(y,ee,te){ee.exports=function(g,m,b){if(typeof Array.prototype.findIndex=="function")return g.findIndex(m,b);if(typeof m!="function")throw new TypeError("predicate must be a function");var v=Object(g),e=v.length;if(e===0)return-1;for(var n=0;n<e;n++)if(m.call(b,v[n],n,v))return n;return-1}},{}],73:[function(y,ee,te){var g=y("array-bounds");ee.exports=function(m,b,v){if(!m||m.length==null)throw Error("Argument should be an array");b==null&&(b=1),v==null&&(v=g(m,b));for(var e=0;e<b;e++){var n=v[b+e],t=v[e],o=e,r=m.length;if(n===1/0&&t===-1/0)for(o=e;o<r;o+=b)m[o]=m[o]===n?1:m[o]===t?0:.5;else if(n===1/0)for(o=e;o<r;o+=b)m[o]=m[o]===n?1:0;else if(t===-1/0)for(o=e;o<r;o+=b)m[o]=m[o]===t?0:1;else{var d=n-t;for(o=e;o<r;o+=b)isNaN(m[o])||(m[o]=d===0?.5:(m[o]-t)/d)}}return m}},{"array-bounds":71}],74:[function(y,ee,te){ee.exports=function(g,m){var b=typeof g=="number",v=typeof m=="number";b&&!v?(m=g,g=0):b||v||(g=0,m=0);var e=(m|=0)-(g|=0);if(e<0)throw new Error("array length must be positive");for(var n=new Array(e),t=0,o=g;t<e;t++,o++)n[t]=o;return n}},{}],75:[function(y,ee,te){(function(g){(function(){var m=y("object-assign");/*!
5 * The buffer module from node.js, for the browser.
6 *
7 * @author   Feross Aboukhadijeh <[email protected]> <http://feross.org>
8 * @license  MIT
9 */function b(T,k){if(T===k)return 0;for(var L=T.length,A=k.length,I=0,P=Math.min(L,A);I<P;++I)if(T[I]!==k[I]){L=T[I],A=k[I];break}return L<A?-1:A<L?1:0}function v(T){return g.Buffer&&typeof g.Buffer.isBuffer=="function"?g.Buffer.isBuffer(T):!(T==null||!T._isBuffer)}var e=y("util/"),n=Object.prototype.hasOwnProperty,t=Array.prototype.slice,o=function(){}.name==="foo";function r(T){return Object.prototype.toString.call(T)}function d(T){return!v(T)&&typeof g.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(T):!!T&&(T instanceof DataView||!!(T.buffer&&T.buffer instanceof ArrayBuffer)))}var c=ee.exports=p,i=/\s*function\s+([^\(\s]*)\s*/;function u(T){if(e.isFunction(T)){if(o)return T.name;var k=T.toString().match(i);return k&&k[1]}}function f(T,k){return typeof T=="string"?T.length<k?T:T.slice(0,k):T}function s(T){if(o||!e.isFunction(T))return e.inspect(T);var k=u(T);return"[Function"+(k?": "+k:"")+"]"}function h(T,k,L,A,I){throw new c.AssertionError({message:L,actual:T,expected:k,operator:A,stackStartFunction:I})}function p(T,k){T||h(T,!0,k,"==",c.ok)}function a(T,k,L,A){if(T===k)return!0;
9if(v(T)&&v(k))return b(T,k)===0;if(e.isDate(T)&&e.isDate(k))return T.getTime()===k.getTime();if(e.isRegExp(T)&&e.isRegExp(k))return T.source===k.source&&T.global===k.global&&T.multiline===k.multiline&&T.lastIndex===k.lastIndex&&T.ignoreCase===k.ignoreCase;if(T!==null&&typeof T=="object"||k!==null&&typeof k=="object"){if(d(T)&&d(k)&&r(T)===r(k)&&!(T instanceof Float32Array||T instanceof Float64Array))return b(new Uint8Array(T.buffer),new Uint8Array(k.buffer))===0;if(v(T)!==v(k))return!1;var I=(A=A||{actual:[],expected:[]}).actual.indexOf(T);return I!==-1&&I===A.expected.indexOf(k)||(A.actual.push(T),A.expected.push(k),function(P,S,E,D){if(P==null||S==null)return!1;if(e.isPrimitive(P)||e.isPrimitive(S))return P===S;if(E&&Object.getPrototypeOf(P)!==Object.getPrototypeOf(S))return!1;var F=x(P),H=x(S);if(F&&!H||!F&&H)return!1;if(F)return P=t.call(P),S=t.call(S),a(P,S,E);var V,Z,K=_(P),q=_(S);if(K.length!==q.length)return!1;for(K.sort(),q.sort(),Z=K.length-1;Z>=0;Z--)if(K[Z]!==q[Z])return!1;for(Z=K.length-1;Z>=0;Z--)if(V=K[Z],!a(P[V],S[V],E,D))return!1;return!0}(T,k,L,A))}return L?T===k:T==k}function x(T){return Object.prototype.toString.call(T)=="[object Arguments]"}function l(T,k){if(!T||!k)return!1;if(Object.prototype.toString.call(k)=="[object RegExp]")return k.test(T);try{if(T instanceof k)return!0}catch{}return!Error.isPrototypeOf(k)&&k.call({},T)===!0}function w(T,k,L,A){var I;if(typeof k!="function")throw new TypeError('"block" argument must be a function');typeof L=="string"&&(A=L,L=null),I=function(E){var D;try{E()}catch(F){D=F}return D}(k),A=(L&&L.name?" ("+L.name+").":".")+(A?" "+A:"."),T&&!I&&h(I,L,"Missing expected exception"+A);var P=typeof A=="string",S=!T&&I&&!L;if((!T&&e.isError(I)&&P&&l(I,L)||S)&&h(I,L,"Got unwanted exception"+A),T&&I&&L&&!l(I,L)||!T&&I)throw I}c.AssertionError=function(T){this.name="AssertionError",this.actual=T.actual,this.expected=T.expected,this.operator=T.operator,T.message?(this.message=T.message,this.generatedMessage=!1):(this.message=function(E){return f(s(E.actual),128)+" "+E.operator+" "+f(s(E.expected),128)}(this),this.generatedMessage=!0);var k=T.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,k);else{var L=new Error;if(L.stack){var A=L.stack,I=u(k),P=A.indexOf(`
10`+I);if(P>=0){var S=A.indexOf(`
11`,P+1);A=A.substring(S+1)}this.stack=A}}},e.inherits(c.AssertionError,Error),c.fail=h,c.ok=p,c.equal=function(T,k,L){T!=k&&h(T,k,L,"==",c.equal)},c.notEqual=function(T,k,L){T==k&&h(T,k,L,"!=",c.notEqual)},c.deepEqual=function(T,k,L){a(T,k,!1)||h(T,k,L,"deepEqual",c.deepEqual)},c.deepStrictEqual=function(T,k,L){a(T,k,!0)||h(T,k,L,"deepStrictEqual",c.deepStrictEqual)},c.notDeepEqual=function(T,k,L){a(T,k,!1)&&h(T,k,L,"notDeepEqual",c.notDeepEqual)},c.notDeepStrictEqual=function T(k,L,A){a(k,L,!0)&&h(k,L,A,"notDeepStrictEqual",T)},c.strictEqual=function(T,k,L){T!==k&&h(T,k,L,"===",c.strictEqual)},c.notStrictEqual=function(T,k,L){T===k&&h(T,k,L,"!==",c.notStrictEqual)},c.throws=function(T,k,L){w(!0,T,k,L)},c.doesNotThrow=function(T,k,L){w(!1,T,k,L)},c.ifError=function(T){if(T)throw T},c.strict=m(function T(k,L){k||h(k,!0,L,"==",T)},c,{equal:c.strictEqual,deepEqual:c.deepStrictEqual,notEqual:c.notStrictEqual,notDeepEqual:c.notDeepStrictEqual}),c.strict.strict=c.strict;var _=Object.keys||function(T){var k=[];for(var L in T)n.call(T,L)&&k.push(L);return k}}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"object-assign":247,"util/":78}],76:[function(y,ee,te){typeof Object.create=="function"?ee.exports=function(g,m){g.super_=m,g.prototype=Object.create(m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:ee.exports=function(g,m){g.super_=m;var b=function(){};b.prototype=m.prototype,g.prototype=new b,g.prototype.constructor=g}},{}],77:[function(y,ee,te){ee.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],78:[function(y,ee,te){(function(g,m){(function(){var b=/%[sdj%]/g;te.format=function(P){if(!h(P)){for(var S=[],E=0;E<arguments.length;E++)S.push(n(arguments[E]));return S.join(" ")}E=1;for(var D=arguments,F=D.length,H=String(P).replace(b,function(Z){if(Z==="%%")return"%";if(E>=F)return Z;switch(Z){case"%s":return String(D[E++]);case"%d":return Number(D[E++]);case"%j":try{return JSON.stringify(D[E++])}catch{return"[Circular]"}default:return Z}}),V=D[E];E<F;V=D[++E])f(V)||!x(V)?H+=" "+V:H+=" "+n(V);return H},te.deprecate=function(P,S){if(p(m.process))return function(){return te.deprecate(P,S).apply(this,arguments)};if(g.noDeprecation===!0)return P;var E=!1;return function(){if(!E){if(g.throwDeprecation)throw new Error(S);g.traceDeprecation?console.trace(S):console.error(S),E=!0}return P.apply(this,arguments)}};var v,e={};function n(P,S){var E={seen:[],stylize:o};return arguments.length>=3&&(E.depth=arguments[2]),arguments.length>=4&&(E.colors=arguments[3]),u(S)?E.showHidden=S:S&&te._extend(E,S),p(E.showHidden)&&(E.showHidden=!1),p(E.depth)&&(E.depth=2),p(E.colors)&&(E.colors=!1),p(E.customInspect)&&(E.customInspect=!0),E.colors&&(E.stylize=t),r(E,P,E.depth)}function t(P,S){var E=n.styles[S];return E?"\x1B["+n.colors[E][0]+"m"+P+"\x1B["+n.colors[E][1]+"m":P}function o(P,S){return P}function r(P,S,E){if(P.customInspect&&S&&_(S.inspect)&&S.inspect!==te.inspect&&(!S.constructor||S.c
vendor: 3,107 bytes, lines 11-20
11onstructor.prototype!==S)){var D=S.inspect(E,P);return h(D)||(D=r(P,D,E)),D}var F=function(R,N){if(p(N))return R.stylize("undefined","undefined");if(h(N)){var U="'"+JSON.stringify(N).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return R.stylize(U,"string")}if(s(N))return R.stylize(""+N,"number");if(u(N))return R.stylize(""+N,"boolean");if(f(N))return R.stylize("null","null")}(P,S);if(F)return F;var H=Object.keys(S),V=function(R){var N={};return R.forEach(function(U,Q){N[U]=!0}),N}(H);if(P.showHidden&&(H=Object.getOwnPropertyNames(S)),w(S)&&(H.indexOf("message")>=0||H.indexOf("description")>=0))return d(S);if(H.length===0){if(_(S)){var Z=S.name?": "+S.name:"";return P.stylize("[Function"+Z+"]","special")}if(a(S))return P.stylize(RegExp.prototype.toString.call(S),"regexp");if(l(S))return P.stylize(Date.prototype.toString.call(S),"date");if(w(S))return d(S)}var K,q="",W=!1,$=["{","}"];return i(S)&&(W=!0,$=["[","]"]),_(S)&&(q=" [Function"+(S.name?": "+S.name:"")+"]"),a(S)&&(q=" "+RegExp.prototype.toString.call(S)),l(S)&&(q=" "+Date.prototype.toUTCString.call(S)),w(S)&&(q=" "+d(S)),H.length!==0||W&&S.length!=0?E<0?a(S)?P.stylize(RegExp.prototype.toString.call(S),"regexp"):P.stylize("[Object]","special"):(P.seen.push(S),K=W?function(R,N,U,Q,j){for(var X=[],J=0,re=N.length;J<re;++J)I(N,String(J))?X.push(c(R,N,U,Q,String(J),!0)):X.push("");return j.forEach(function(ne){ne.match(/^\d+$/)||X.push(c(R,N,U,Q,ne,!0))}),X}(P,S,E,V,H):H.map(function(R){return c(P,S,E,V,R,W)}),P.seen.pop(),function(R,N,U){return R.reduce(function(Q,j){return j.indexOf(`
12`)>=0,Q+j.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?U[0]+(N===""?"":N+`
13 `)+" "+R.join(`,
14  `)+" "+U[1]:U[0]+N+" "+R.join(", ")+" "+U[1]}(K,q,$)):$[0]+q+$[1]}function d(P){return"["+Error.prototype.toString.call(P)+"]"}function c(P,S,E,D,F,H){var V,Z,K;if((K=Object.getOwnPropertyDescriptor(S,F)||{value:S[F]}).get?Z=K.set?P.stylize("[Getter/Setter]","special"):P.stylize("[Getter]","special"):K.set&&(Z=P.stylize("[Setter]","special")),I(D,F)||(V="["+F+"]"),Z||(P.seen.indexOf(K.value)<0?(Z=f(E)?r(P,K.value,null):r(P,K.value,E-1)).indexOf(`
15`)>-1&&(Z=H?Z.split(`
16`).map(function(q){return"  "+q}).join(`
17`).substr(2):`
18`+Z.split(`
19`).map(function(q){return"   "+q}).join(`
20`)):Z=P.stylize("[Circular]","special")),p(V)){if(H&&F.match(/^\d+$/))return Z;(V=JSON.stringify(""+F)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.substr(1,V.length-2),V=P.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=P.stylize(V,"string"))}return V+": "+Z}function i(P){return Array.isArray(P)}function u(P){return typeof P=="boolean"}function f(P){return P===null}function s(P){return typeof P=="number"}function h(P){return typeof P=="string"}function p(P){return P===void 0}function a(P){return x(P)&&T(P)==="[object RegExp]"}function x(P){return typeof P=="object"&&P!==null}function l(P){return x(P)&&T(P)==="[object Date]"}function w(P){return x(P)&&(T(P)==="[object Error]"||P instanceof Error)}function _(P){return typeof P=="function"}function T(P){return Object.prototype.toString.call(P)}
20function k(P){return P<10?"0"+P.toString(10):P.toString(10)}te.debuglog=function(P){if(p(v)&&(v=g.env.NODE_DEBUG||""),P=P.toUpperCase(),!e[P])if(new RegExp("\\b"+P+"\\b","i").test(v)){var S=g.pid;e[P]=function(){var E=te.format.apply(te,arguments);console.error("%s %d: %s",P,S,E)}}else e[P]=function(){};return e[P]},te.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},te.isArray=i,te.isBoolean=u,te.isNull=f,te.isNullOrUndefined=function(P){return P==null},te.isNumber=s,te.isString=h,te.isSymbol=function(P){return typeof P=="symbol"},te.isUndefined=p,te.isRegExp=a,te.isObject=x,te.isDate=l,te.isError=w,te.isFunction=_,te.isPrimitive=function(P){return P===null||typeof P=="boolean"||typeof P=="number"||typeof P=="string"||typeof P=="symbol"||P===void 0},te.isBuffer=y("./support/isBuffer");var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var P=new Date,S=[k(P.getHours()),k(P.getMinutes()),k(P.getSeconds())].join(":");return[P.getDate(),L[P.getMonth()],S].join(" ")}function I(P,S){return Object.prototype.hasOwnProperty.call(P,S)}te.log=function(){console.log("%s - %s",A(),te.format.apply(te,arguments))},te.inherits=y("inherits"),te._extend=function(P,S){if(!S||!x(S))return P;for(var E=Object.keys(S),D=E.length;D--;)P[E[D]]=S[E[D]];return P}}).call(this)}).call(this,y("_process"),typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":77,_process:277,inherits:76}],79:[function(y,ee,te){te.byteLength=function(r){var d=t(r),c=d[0],i=d[1];return 3*(c+i)/4-i},te.toByteArray=function(r){var d,c,i=t(r),u=i[0],f=i[1],s=new b(function(a,x,l){return 3*(x+l)/4-l}(0,u,f)),h=0,p=f>0?u-4:u;for(c=0;c<p;c+=4)d=m[r.charCodeAt(c)]<<18|m[r.charCodeAt(c+1)]<<12|m[r.charCodeAt(c+2)]<<6|m[r.charCodeAt(c+3)],s[h++]=d>>16&255,s[h++]=d>>8&255,s[h++]=255&d;return f===2&&(d=m[r.charCodeAt(c)]<<2|m[r.charCodeAt(c+1)]>>4,s[h++]=255&d),f===1&&(d=m[r.charCodeAt(c)]<<10|m[r.charCodeAt(c+1)]<<4|m[r.charCodeAt(c+2)]>>2,s[h++]=d>>8&255,s[h++]=255&d),s},te.fromByteArray=function(r){for(var d,c=r.length,i=c%3,u=[],f=0,s=c-i;f<s;f+=16383)u.push(o(r,f,f+16383>s?s:f+16383));return i===1?(d=r[c-1],u.push(g[d>>2]+g[d<<4&63]+"==")):i===2&&(d=(r[c-2]<<8)+r[c-1],u.push(g[d>>10]+g[d>>4&63]+g[d<<2&63]+"=")),u.join("")};for(var g=[],m=[],b=typeof Uint8Array<"u"?Uint8Array:Array,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=v.length;e<n;++e)g[e]=v[e],m[v.charCodeAt(e)]=e;function t(r){var d=r.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=r.indexOf("=");return c===-1&&(c=d),[c,c===d?0:4-c%4]}function o(r,d,c){for(var i,u,f=[],s=d;s<c;s+=3)i=(r[s]<<16&16711680)+(r[s+1]<<8&65280)+(255&r[s+2]),f.push(g[(u=i)>>18&63]+g[u>>12&63]+g[u>>6&63]+g[63&u]);return f.join("")}m[45]=62,m[95]=63},{}],80:[function(y,ee,te){function g(t,o,r,d,c){for(var i=c+1;d<=c;){var u=d+c>>>1,f=t[u];(r!==void 0?r(f,o):f-o)>=0?(i=u,c=u-1):d=u+1}return i}function m(t,o,r,d,c){for(var i=c+1;d<=c;){var u=d+c>>>1,f=t[u];(r!==void 0?r(f,o):f-o)>0?(i=u,c=u-1):d=u+1}return i}function b(t,o,r,d,c){for(var i=d-1;d<=c;){var u=d+c>>>1,f=t[u];(r!==void 0?r(f,o):f-o)<0?(i=u,d=u+1):c=u-1}return i}function v(t,o,r,d,c){for(var i=d-1;d<=c;){var u=d+c>>>1,f=t[u];(r!==void 0?r(f,o):f-o)<=0?(i=u,d=u+1):c=u-1}return i}function e(t,o,r,d,c){for(;d<=c;){var i=d+c>>>1,u=t[i],f=r!==void 0?r(u,o):u-o;if(f===0)return i;f<=0?d=i+1:c=i-1}return-1}function n(t,o,r,d,c,i){return typeof r=="function"?i(t,o,r,d===void 0?0:0|d,c===void 0?t.length-1:0|c):i(t,o,void 0,r===void 0?0:0|r,d===void 0?t.length-1:0|d)}ee.exports={ge:function(t,o,r,d,c){return n(t,o,r,d,c,g)},gt:function(t,o,r,d,c){return n(t,o,r,d,c,m)},lt:function(t,o,r,d,c){return n(t,o,r,d,c,b)},le:function(t,o,r,d,c){return n(t,o,r,d,c,v)},eq:function(t,o,r,d,c){return n(t,o,r,d,c,e)}}},{}],81:[function(y,ee,te){function g(b){var v=32;return(b&=-b)&&v--,65535&b&&(v-=16),16711935&b&&(v-=8),252645135&b&&(v-=4),858993459&b&&(v-=2),1431655765&b&&(v-=1),v}te.INT_BITS=32,te.INT_MAX=2147483647,te.INT_MIN=-1<<31,te.sign=function(b){return(b>0)-(b<0)},te.abs=function(b){var v=b>>31;return(b^v)-v},te.min=function(b,v){return v^(b^v)&-(b<v)},te.max=function(b,v){return b^(b^v)&-(b<v)},te.isPow2=function(b){return!(b&b-1||!b)},te.log2=function(b){var v,e;return v=(b>65535)<<4,v|=e=((b>>>=v)>255)<<3,v|=e=((b>>>=e)>
vendor: 1,775 bytes, line 20
2015)<<2,(v|=e=((b>>>=e)>3)<<1)|(b>>>=e)>>1},te.log10=function(b){return b>=1e9?9:b>=1e8?8:b>=1e7?7:b>=1e6?6:b>=1e5?5:b>=1e4?4:b>=1e3?3:b>=100?2:b>=10?1:0},te.popCount=function(b){return 16843009*((b=(858993459&(b-=b>>>1&1431655765))+(b>>>2&858993459))+(b>>>4)&252645135)>>>24},te.countTrailingZeros=g,te.nextPow2=function(b){return b+=b===0,--b,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,(b|=b>>>16)+1},te.prevPow2=function(b){return b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,(b|=b>>>16)-(b>>>1)},te.parity=function(b){return b^=b>>>16,b^=b>>>8,b^=b>>>4,27030>>>(b&=15)&1};var m=new Array(256);(function(b){for(var v=0;v<256;++v){var e=v,n=v,t=7;for(e>>>=1;e;e>>>=1)n<<=1,n|=1&e,--t;b[v]=n<<t&255}})(m),te.reverse=function(b){return m[255&b]<<24|m[b>>>8&255]<<16|m[b>>>16&255]<<8|m[b>>>24&255]},te.interleave2=function(b,v){return(b=1431655765&((b=858993459&((b=252645135&((b=16711935&((b&=65535)|b<<8))|b<<4))|b<<2))|b<<1))|(v=1431655765&((v=858993459&((v=252645135&((v=16711935&((v&=65535)|v<<8))|v<<4))|v<<2))|v<<1))<<1},te.deinterleave2=function(b,v){return(b=65535&((b=16711935&((b=252645135&((b=858993459&((b=b>>>v&1431655765)|b>>>1))|b>>>2))|b>>>4))|b>>>16))<<16>>16},te.interleave3=function(b,v,e){return b=1227133513&((b=3272356035&((b=251719695&((b=4278190335&((b&=1023)|b<<16))|b<<8))|b<<4))|b<<2),(b|=(v=1227133513&((v=3272356035&((v=251719695&((v=4278190335&((v&=1023)|v<<16))|v<<8))|v<<4))|v<<2))<<1)|(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<2},te.deinterleave3=function(b,v){return(b=1023&((b=4278190335&((b=251719695&((b=3272356035&((b=b>>>v&1227133513)|b>>>2))|b>>>4))|b>>>8))|b>>>16))<<22>>22},te.nextCombination=function(b){var v=b|b-1;return v+1|(~v&-~v)-1>>>g(b)+1}},{}],82:[function(y,ee,te){var g=y("clamp");
20ee.exports=function(e,n){n||(n={});var t,o,r,d,c,i,u,f,s,h,p,a=n.cutoff==null?.25:n.cutoff,x=n.radius==null?8:n.radius,l=n.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!n.width||!n.height)throw Error("For raw data width and height should be provided by options");t=n.width,o=n.height,d=e,i=n.stride?n.stride:Math.floor(e.length/t/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=(f=e).getContext("2d"),t=f.width,o=f.height,s=u.getImageData(0,0,t,o),d=s.data,i=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(f=e.canvas,u=e,t=f.width,o=f.height,s=u.getImageData(0,0,t,o),d=s.data,i=4):window.ImageData&&e instanceof window.ImageData&&(s=e,t=e.width,o=e.height,d=s.data,i=4);if(r=Math.max(t,o),window.Uint8ClampedArray&&d instanceof window.Uint8ClampedArray||window.Uint8Array&&d instanceof window.Uint8Array)for(c=d,d=Array(t*o),h=0,p=c.length;h<p;h++)d[h]=c[h*i+l]/255;else if(i!==1)throw Error("Raw data can have only 1 value per pixel");var w=Array(t*o),_=Array(t*o),T=Array(r),k=Array(r),L=Array(r+1),A=Array(r);for(h=0,p=t*o;h<p;h++){var I=d[h];w[h]=I===1?0:I===0?m:Math.pow(Math.max(0,.5-I),2),_[h]=I===1?m:I===0?0:Math.pow(Math.max(0,I-.5),2)}b(w,t,o,T,k,A,L),b(_,t,o,T,k,A,L);var P=window.Float32Array?new Float32Array(t*o):new Array(t*o);for(h=0,p=t*o;h<p;h++)P[h]=g(1-((w[h]-_[h])/x+a),0,1);return P};var m=1e20;function b(e,n,t,o,r,d,c){for(var i=0;i<n;i++){for(var u=0;u<t;u++)o[u]=e[u*n+i];for(v(o,r,d,c,t),u=0;u<t;u++)e[u*n+i]=r[u]}for(u=0;u<t;u++){for(i=0;i<n;i++)o[i]=e[u*n+i];for(v(o,r,d,c,n),i=0;i<n;i++)e[u*n+i]=Math.sqrt(r[i])}}function v(e,n,t,o,r){t[0]=0,o[0]=-m,o[1]=+m;for(var d=1,c=0;d<r;d++){for(var i=(e[d]+d*d-(e[t[c]]+t[c]*t[c]))/(2*d-2*t[c]);i<=o[c];)c--,i=(e[d]+d*d-(e[t[c]]+t[c]*t[c]))/(2*d-2*t[c]);t[++c]=d,o[c]=i,o[c+1]=+m}for(d=0,c=0;d<r;d++){for(;o[c+1]<d;)c++;n[d]=(d-t[c])*(d-t[c])+e[t[c]]}}},{clamp:86}],83:[function(y,ee,te){},{}],84:[function(y,ee,te){var g,m=typeof Reflect=="object"?Reflect:null,b=m&&typeof m.apply=="function"?m.apply:function(s,h,p){return Function.prototype.apply.call(s,h,p)};g=m&&typeof m.ownKeys=="function"?m.ownKeys:Object.getOwnPropertySymbols?function(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))}:function(s){return Object.getOwnPropertyNames(s)};var v=Number.isNaN||function(s){return s!=s};function e(){e.init.call(this)}ee.exports=e,ee.exports.once=function(s,h){return new Promise(function(p,a){function x(){l!==void 0&&s.removeListener("error",l),p([].slice.call(arguments))}var l;h!=="error"&&(l=function(w){s.removeListener(h,x),a(w)},s.once("error",l)),s.once(h,x)})},e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var n=10;function t(s){if(typeof s!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof s)}function o(s){return s._maxListeners===void 0?e.defaultMaxListeners:s._maxListeners}function r(s,h,p,a){var x,l,w,_;if(t(p),(l=s._events)===void 0?(l=s._events=Object.create(null),s._eventsCount=0):(l.newListener!==void 0&&(s.emit("newListener",h,p.listener?p.listener:p),l=s._events),w=l[h]),w===void 0)w=l[h]=p,++s._eventsCount;else if(typeof w=="function"?w=l[h]=a?[p,w]:[w,p]:a?w.unshift(p):w.push(p),(x=o(s))>0&&w.length>x&&!w.warned){w.warned=!0;var T=new Error("Possible EventEmitter memory leak detected. "+w.length+" "+String(h)+" listeners added. Use emitter.setMaxListeners() to increase limit");T.name="MaxListenersExceededWarning",T.emitter=s,T.type=h,T.count=w.length,_=T,console&&console.warn&&console.warn(_)}return s}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(s,h,p){var a={fired:!1,wrapFn:void 0,target:s,type:h,listener:p},x=d.bind(a);return x.listener=p,a.wrapFn=x,x}function i(s,h,p){var a=s._events;if(a===void 0)return[];var x=a[h];return x===void 0?[]:typeof x=="function"?p?[x.listener||x]:[x]:p?function(l){for(var w=new Array(l.length),_=0;_<w.length;++_)w[_]=l[_].listener||l[_];return w}(x):f(x,x.length)}function u(s){var h=this._events;if(h!==void 0){var p=h[s];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}function f(s,h){for(var p=new Array(h),a=0;a<h;++a)p[a]=s[a];return p}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(s){if(typeof s!="number"||s<0||v(s))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+s+".");n=s}}),e.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(s){if(typeof s!="number"||s<0||v(s))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+s+".");return this._maxListeners=s,this},e.prototype.getMaxListeners=function(){return o(this)},e.prototype.emit=function(s){for(var h=[],p=1;p<arguments.length;p++)h.push(arguments[p]);var a=s==="error",x=this._events;if(x!==void 0)a=a&&x.error===void 0;else if(!a)return!1;if(a){var l;if(h.length>0&&(l=h[0]),l instanceof Error)throw l;var w=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw w.context=l,w}var _=x[s];if(_===void 0)return!1;if(typeof _=="function")b(_,this,h);else{var T=_.length,k=f(_,T);for(p=0;p<T;
20++p)b(k[p],this,h)}return!0},e.prototype.addListener=function(s,h){return r(this,s,h,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(s,h){return r(this,s,h,!0)},e.prototype.once=function(s,h){return t(h),this.on(s,c(this,s,h)),this},e.prototype.prependOnceListener=function(s,h){return t(h),this.prependListener(s,c(this,s,h)),this},e.prototype.removeListener=function(s,h){var p,a,x,l,w;if(t(h),(a=this._events)===void 0)return this;if((p=a[s])===void 0)return this;if(p===h||p.listener===h)--this._eventsCount==0?this._events=Object.create(null):(delete a[s],a.removeListener&&this.emit("removeListener",s,p.listener||h));else if(typeof p!="function"){for(x=-1,l=p.length-1;l>=0;l--)if(p[l]===h||p[l].listener===h){w=p[l].listener,x=l;break}if(x<0)return this;x===0?p.shift():function(_,T){for(;T+1<_.length;T++)_[T]=_[T+1];_.pop()}(p,x),p.length===1&&(a[s]=p[0]),a.removeListener!==void 0&&this.emit("removeListener",s,w||h)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(s){var h,p,a;if((p=this._events)===void 0)return this;if(p.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):p[s]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete p[s]),this;if(arguments.length===0){var x,l=Object.keys(p);for(a=0;a<l.length;++a)(x=l[a])!=="removeListener"&&this.removeAllListeners(x);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(h=p[s])=="function")this.removeListener(s,h);else if(h!==void 0)for(a=h.length-1;a>=0;a--)this.removeListener(s,h[a]);return this},e.prototype.listeners=function(s){return i(this,s,!0)},e.prototype.rawListeners=function(s){return i(this,s,!1)},e.listenerCount=function(s,h){return typeof s.listenerCount=="function"?s.listenerCount(h):u.call(s,h)},e.prototype.listenerCount=u,e.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]}},{}],85:[function(y,ee,te){(function(g){(function(){var m=y("base64-js"),b=y("ieee754");te.Buffer=e,te.SlowBuffer=function(R){return+R!=R&&(R=0),e.alloc(+R)},te.INSPECT_MAX_BYTES=50;function v(R){if(R>2147483647)throw new RangeError('The value "'+R+'" is invalid for option "size"');var N=new Uint8Array(R);return N.__proto__=e.prototype,N}function e(R,N,U){if(typeof R=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return o(R)}return n(R,N,U)}
20function n(R,N,U){if(typeof R=="string")return function(X,J){if(typeof J=="string"&&J!==""||(J="utf8"),!e.isEncoding(J))throw new TypeError("Unknown encoding: "+J);var re=0|c(X,J),ne=v(re),se=ne.write(X,J);return se!==re&&(ne=ne.slice(0,se)),ne}(R,N);if(ArrayBuffer.isView(R))return r(R);if(R==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R);if(W(R,ArrayBuffer)||R&&W(R.buffer,ArrayBuffer))return function(X,J,re){if(J<0||X.byteLength<J)throw new RangeError('"offset" is outside of buffer bounds');if(X.byteLength<J+(re||0))throw new RangeError('"length" is outside of buffer bounds');var ne;return ne=J===void 0&&re===void 0?new Uint8Array(X):re===void 0?new Uint8Array(X,J):new Uint8Array(X,J,re),ne.__proto__=e.prototype,ne}(R,N,U);if(typeof R=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Q=R.valueOf&&R.valueOf();if(Q!=null&&Q!==R)return e.from(Q,N,U);var j=function(X){if(e.isBuffer(X)){var J=0|d(X.length),re=v(J);return re.length===0||X.copy(re,0,0,J),re}if(X.length!==void 0)return typeof X.length!="number"||$(X.length)?v(0):r(X);if(X.type==="Buffer"&&Array.isArray(X.data))return r(X.data)}(R);if(j)return j;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof R[Symbol.toPrimitive]=="function")return e.from(R[Symbol.toPrimitive]("string"),N,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R)}function t(R){if(typeof R!="number")throw new TypeError('"size" argument must be of type number');if(R<0)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function o(R){return t(R),v(R<0?0:0|d(R))}function r(R){for(var N=R.length<0?0:0|d(R.length),U=v(N),Q=0;Q<N;Q+=1)U[Q]=255&R[Q];return U}function d(R){if(R>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|R}function c(R,N){if(e.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||W(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);var U=R.length,Q=arguments.length>2&&arguments[2]===!0;if(!Q&&U===0)return 0;for(var j=!1;;)switch(N){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return Z(R).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return K(R).length;default:if(j)return Q?-1:Z(R).length;N=(""+N).toLowerCase(),j=!0}}function i(R,N,U){var Q=!1;if((N===void 0||N<0)&&(N=0),N>this.length||((U===void 0||U>this.length)&&(U=this.length),U<=0)||(U>>>=0)<=(N>>>=0))return"";for(R||(R="utf8");;)switch(R){case"hex":return A(this,N,U);case"utf8":case"utf-8":return T(this,N,U);case"ascii":return k(this,N,U);case"latin1":case"binary":return L(this,N,U);case"base64":return _(this,N,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,N,U);default:if(Q)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),Q=!0}}function u(R,N,U){var Q=R[N];R[N]=R[U],R[U]=Q}function f(R,N,U,Q,j){if(R.length===0)return-1;if(typeof U=="string"?(Q=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),$(U=+U)&&(U=j?0:R.length-1),U<0&&(U=R.length+U),U>=R.length){if(j)return-1;U=R.length-1}else if(U<0){if(!j)return-1;U=0}if(typeof N=="string"&&(N=e.from(N,Q)),e.isBuffer(N))return N.length===0?-1:s(R,N,U,Q,j);if(typeof N=="number")return N&=255,typeof Uint8Array.prototype.indexOf=="function"?j?Uint8Array.prototype.indexOf.call(R,N,U):Uint8Array.prototype.lastIndexOf.call(R,N,U):s(R,[N],U,Q,j);throw new TypeError("val must be string, number or Buffer")}function s(R,N,U,Q,j){var X,J=1,re=R.length,ne=N.length;if(Q!==void 0&&((Q=String(Q).toLowerCase())==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(R.length<2||N.length<2)return-1;J=2,re/=2,ne/=2,U/=2}function se(de,xe){return J===1?de[xe]:de.readUInt16BE(xe*J)}if(j){var oe=-1;for(X=U;X<re;X++)if(se(R,X)===se(N,oe===-1?0:X-oe)){if(oe===-1&&(oe=X),X-oe+1===ne)return oe*J}else oe!==-1&&(X-=X-oe),oe=-1}else for(U+ne>re&&(U=re-ne),X=U;X>=0;X--){for(var pe=!0,ce=0;ce<ne;ce++)if(se(R,X+ce)!==se(N,ce)){pe=!1;break}if(pe)return X}return-1}function h(R,N,U,Q){U=Number(U)||0;var j=R.length-U;Q?(Q=Number(Q))>j&&(Q=j):Q=j;var X=N.length;Q>X/2&&(Q=X/2);for(var J=0;J<Q;++J){var re=parseInt(N.substr(2*J,2),16);if($(re))return J;R[U+J]=re}return J}function p(R,N,U,Q){return q(Z(N,R.length-U),R,U,Q)}function a(R,N,U,Q){return q(function(j){for(var X=[],J=0;J<j.length;
20++J)X.push(255&j.charCodeAt(J));return X}(N),R,U,Q)}function x(R,N,U,Q){return a(R,N,U,Q)}function l(R,N,U,Q){return q(K(N),R,U,Q)}function w(R,N,U,Q){return q(function(j,X){for(var J,re,ne,se=[],oe=0;oe<j.length&&!((X-=2)<0);++oe)J=j.charCodeAt(oe),re=J>>8,ne=J%256,se.push(ne),se.push(re);return se}(N,R.length-U),R,U,Q)}function _(R,N,U){return N===0&&U===R.length?m.fromByteArray(R):m.fromByteArray(R.slice(N,U))}function T(R,N,U){U=Math.min(R.length,U);for(var Q=[],j=N;j<U;){var X,J,re,ne,se=R[j],oe=null,pe=se>239?4:se>223?3:se>191?2:1;if(j+pe<=U)switch(pe){case 1:se<128&&(oe=se);break;case 2:(192&(X=R[j+1]))==128&&(ne=(31&se)<<6|63&X)>127&&(oe=ne);break;case 3:X=R[j+1],J=R[j+2],(192&X)==128&&(192&J)==128&&(ne=(15&se)<<12|(63&X)<<6|63&J)>2047&&(ne<55296||ne>57343)&&(oe=ne);break;case 4:X=R[j+1],J=R[j+2],re=R[j+3],(192&X)==128&&(192&J)==128&&(192&re)==128&&(ne=(15&se)<<18|(63&X)<<12|(63&J)<<6|63&re)>65535&&ne<1114112&&(oe=ne)}oe===null?(oe=65533,pe=1):oe>65535&&(oe-=65536,Q.push(oe>>>10&1023|55296),oe=56320|1023&oe),Q.push(oe),j+=pe}return function(ce){var de=ce.length;if(de<=4096)return String.fromCharCode.apply(String,ce);for(var xe="",we=0;we<de;)xe+=String.fromCharCode.apply(String,ce.slice(we,we+=4096));return xe}(Q)}te.kMaxLength=2147483647,e.TYPED_ARRAY_SUPPORT=function(){try{var R=new Uint8Array(1);return R.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},R.foo()===42}catch{return!1}}(),e.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(R,N,U){return n(R,N,U)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,e.alloc=function(R,N,U){return function(Q,j,X){return t(Q),Q<=0?v(Q):j!==void 0?typeof X=="string"?v(Q).fill(j,X):v(Q).fill(j):v(Q)}(R,N,U)},e.allocUnsafe=function(R){return o(R)},e.allocUnsafeSlow=function(R){return o(R)},e.isBuffer=function(R){return R!=null&&R._isBuffer===!0&&R!==e.prototype},e.compare=function(R,N){if(W(R,Uint8Array)&&(R=e.from(R,R.offset,R.byteLength)),W(N,Uint8Array)&&(N=e.from(N,N.offset,N.byteLength)),!e.isBuffer(R)||!e.isBuffer(N))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(R===N)return 0;for(var U=R.length,Q=N.length,j=0,X=Math.min(U,Q);j<X;++j)if(R[j]!==N[j]){U=R[j],Q=N[j];break}return U<Q?-1:Q<U?1:0},e.isEncoding=function(R){switch(String(R).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(R,N){if(!Array.isArray(R))throw new TypeError('"list" argument must be an Array of Buffers');if(R.length===0)return e.alloc(0);var U;if(N===void 0)for(N=0,U=0;U<R.length;++U)N+=R[U].length;var Q=e.allocUnsafe(N),j=0;for(U=0;U<R.length;++U){var X=R[U];if(W(X,Uint8Array)&&(X=e.from(X)),!e.isBuffer(X))throw new TypeError('"list" argument must be an Array of Buffers');X.copy(Q,j),j+=X.length}return Q},e.byteLength=c,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var R=this.length;if(R%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var N=0;N<R;N+=2)u(this,N,N+1);return this},e.prototype.swap32=function(){var R=this.length;if(R%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var N=0;N<R;N+=4)u(this,N,N+3),u(this,N+1,N+2);return this},e.prototype.swap64=function(){var R=this.length;if(R%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var N=0;N<R;N+=8)u(this,N,N+7),u(this,N+1,N+6),u(this,N+2,N+5),u(this,N+3,N+4);return this},e.prototype.toString=function(){var R=this.length;return R===0?"":arguments.length===0?T(this,0,R):i.apply(this,arguments)}
vendor: 7,712 bytes, line 20
20,e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(R){if(!e.isBuffer(R))throw new TypeError("Argument must be a Buffer");return this===R||e.compare(this,R)===0},e.prototype.inspect=function(){var R="",N=te.INSPECT_MAX_BYTES;return R=this.toString("hex",0,N).replace(/(.{2})/g,"$1 ").trim(),this.length>N&&(R+=" ... "),"<Buffer "+R+">"},e.prototype.compare=function(R,N,U,Q,j){if(W(R,Uint8Array)&&(R=e.from(R,R.offset,R.byteLength)),!e.isBuffer(R))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof R);if(N===void 0&&(N=0),U===void 0&&(U=R?R.length:0),Q===void 0&&(Q=0),j===void 0&&(j=this.length),N<0||U>R.length||Q<0||j>this.length)throw new RangeError("out of range index");if(Q>=j&&N>=U)return 0;if(Q>=j)return-1;if(N>=U)return 1;if(this===R)return 0;for(var X=(j>>>=0)-(Q>>>=0),J=(U>>>=0)-(N>>>=0),re=Math.min(X,J),ne=this.slice(Q,j),se=R.slice(N,U),oe=0;oe<re;++oe)if(ne[oe]!==se[oe]){X=ne[oe],J=se[oe];break}return X<J?-1:J<X?1:0},e.prototype.includes=function(R,N,U){return this.indexOf(R,N,U)!==-1},e.prototype.indexOf=function(R,N,U){return f(this,R,N,U,!0)},e.prototype.lastIndexOf=function(R,N,U){return f(this,R,N,U,!1)},e.prototype.write=function(R,N,U,Q){if(N===void 0)Q="utf8",U=this.length,N=0;else if(U===void 0&&typeof N=="string")Q=N,U=this.length,N=0;else{if(!isFinite(N))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");N>>>=0,isFinite(U)?(U>>>=0,Q===void 0&&(Q="utf8")):(Q=U,U=void 0)}var j=this.length-N;if((U===void 0||U>j)&&(U=j),R.length>0&&(U<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");for(var X=!1;;)switch(Q){case"hex":return h(this,R,N,U);case"utf8":case"utf-8":return p(this,R,N,U);case"ascii":return a(this,R,N,U);case"latin1":case"binary":return x(this,R,N,U);case"base64":return l(this,R,N,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,R,N,U);default:if(X)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),X=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(R,N,U){var Q="";U=Math.min(R.length,U);for(var j=N;j<U;++j)Q+=String.fromCharCode(127&R[j]);return Q}function L(R,N,U){var Q="";U=Math.min(R.length,U);for(var j=N;j<U;++j)Q+=String.fromCharCode(R[j]);return Q}function A(R,N,U){var Q=R.length;(!N||N<0)&&(N=0),(!U||U<0||U>Q)&&(U=Q);for(var j="",X=N;X<U;++X)j+=V(R[X]);return j}function I(R,N,U){for(var Q=R.slice(N,U),j="",X=0;X<Q.length;X+=2)j+=String.fromCharCode(Q[X]+256*Q[X+1]);return j}function P(R,N,U){if(R%1!=0||R<0)throw new RangeError("offset is not uint");if(R+N>U)throw new RangeError("Trying to access beyond buffer length")}function S(R,N,U,Q,j,X){if(!e.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>j||N<X)throw new RangeError('"value" argument is out of bounds');if(U+Q>R.length)throw new RangeError("Index out of range")}function E(R,N,U,Q,j,X){if(U+Q>R.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function D(R,N,U,Q,j){return N=+N,U>>>=0,j||E(R,0,U,4),b.write(R,N,U,Q,23,4),U+4}function F(R,N,U,Q,j){return N=+N,U>>>=0,j||E(R,0,U,8),b.write(R,N,U,Q,52,8),U+8}e.prototype.slice=function(R,N){var U=this.length;(R=~~R)<0?(R+=U)<0&&(R=0):R>U&&(R=U),(N=N===void 0?U:~~N)<0?(N+=U)<0&&(N=0):N>U&&(N=U),N<R&&(N=R);var Q=this.subarray(R,N);return Q.__proto__=e.prototype,Q},e.prototype.readUIntLE=function(R,N,U){R>>>=0,N>>>=0,U||P(R,N,this.length);for(var Q=this[R],j=1,X=0;++X<N&&(j*=256);)Q+=this[R+X]*j;return Q},e.prototype.readUIntBE=function(R,N,U){R>>>=0,N>>>=0,U||P(R,N,this.length);for(var Q=this[R+--N],j=1;N>0&&(j*=256);)Q+=this[R+--N]*j;return Q},e.prototype.readUInt8=function(R,N){return R>>>=0,N||P(R,1,this.length),this[R]},e.prototype.readUInt16LE=function(R,N){return R>>>=0,N||P(R,2,this.length),this[R]|this[R+1]<<8},e.prototype.readUInt16BE=function(R,N){return R>>>=0,N||P(R,2,this.length),this[R]<<8|this[R+1]},e.prototype.readUInt32LE=function(R,N){return R>>>=0,N||P(R,4,this.length),(this[R]|this[R+1]<<8|this[R+2]<<16)+16777216*this[R+3]},e.prototype.readUInt32BE=function(R,N){return R>>>=0,N||P(R,4,this.length),16777216*this[R]+(this[R+1]<<16|this[R+2]<<8|this[R+3])},e.prototype.readIntLE=function(R,N,U){R>>>=0,N>>>=0,U||P(R,N,this.length);for(var Q=this[R],j=1,X=0;++X<N&&(j*=256);)Q+=this[R+X]*j;return Q>=(j*=128)&&(Q-=Math.pow(2,8*N)),Q},e.prototype.readIntBE=function(R,N,U){R>>>=0,N>>>=0,U||P(R,N,this.length);for(var Q=N,j=1,X=this[R+--Q];Q>0&&(j*=256);)X+=this[R+--Q]*j;return X>=(j*=128)&&(X-=Math.pow(2,8*N)),X},e.prototype.readInt8=function(R,N){return R>>>=0,N||P(R,1,this.length),128&this[R]?-1*(255-this[R]+1):this[R]},e.prototype.readInt16LE=function(R,N){R>>>=0,N||P(R,2,this.length);var U=this[R]|this[R+1]<<8;return 32768&U?4294901760|U:U},e.prototype.readInt16BE=function(R,N){R>>>=0,N||P(R,2,this.length);var U=this[R+1]|this[R]<<8;return 32768&U?4294901760|U:U},e.prototype.readInt32LE=function(R,N){return R>>>=0,N||P(R,4,this.length),this[R]|this[R+1]<<8|this[R+2]<<16|this[R+3]<<24},e.prototype.readInt32BE=function(R,N){return R>>>=0,N||P(R,4,this.length),this[R]<<24|this[R+1]<<16|this[R+2]<<8|this[R+3]},e.prototype.readFloatLE=function(R,N){return R>>>=0,N||P(R,4,this.length),b.read(this,R,!0,23,4)},e.prototype.readFloatBE=function(R,N){return R>>>=0,N||P(R,4,this.length),b.read(this,R,!1,23,4)},e.prototype.readDoubleLE=function(R,N){return R>>>=0,N||P(R,8,this.length),b.read(this,R,!0,52,8)},e.prototype.readDoubleBE=function(R,N){return R>>>=0,N||P(R,8,this.length),b.read(this,R,!1,52,8)},e.prototype.writeUIntLE=function(R,N,U,Q){R=+R,N>>>=0,U>>>=0,Q||S(this,R,N,U,Math.pow(2,8*U)-1,0);var j=1,X=0;for(this[N]=255&R;++X<U&&(j*=256);)this[N+X]=R/j&255;return N+U},e.prototype.writeUIntBE=function(R,N,U,Q){R=+R,N>>>=0,U>>>=0,Q||S(this,R,N,U,Math.pow(2,8*U)-1,0);var j=U-1,X=1;for(this[N+j]=255&R;--j>=0&&(X*=256);)this[N+j]=R/X&255;return N+U},e.prototype.writeUInt8=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,1,255,0),this[N]=255&R,N+1},e.prototype.writeUInt16LE=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,2,65535,0),this[N]=255&R,this[N+1]=R>>>8,N+2},e.prototype.writeUInt16BE=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,2,65535,0),this[N]=R>>>8,this[N+1]=255&R,N+2},e.prototype.writeUInt32LE=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,4,4294967295,0),this[N+3]=R>>>24,this[N+2]=R>>>16,this[N+1]=R>>>8,this[N]=255&R,N+4},e.prototype.writeUInt32BE=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,4,4294967295,0),this[N]=R>>>24,this[N+1]=R>>>16,this[N+2]=R>>>8,this[N+3]=255&R,N+4},e.prototype.writeIntLE=function(R,N,U,Q){if(R=+R,N>>>=0,!Q){var j=Math.pow(2,8*U-1);S(this,R,N,U,j-1,-j)}var X=0,J=1,re=0;for(this[N]=255&R;++X<U&&(J*=256);)R<0&&re===0&&this[N+X-1]!==0&&(re=1),this[N+X]=(R/J>>0)-re&255;return N+U},e.prototype.writeIntBE=function(R,N,U,Q){if(R=+R,N>>>=0,!Q){var j=Math.pow(2,8*U-1);S(this,R,N,U,j-1,-j)}var X=U-1,J=1,re=0;for(this[N+X]=255&R;--X>=0&&(J*=256);)R<0&&re===0&&this[N+X+1]!==0&&(re=1),this[N+X]=(R/J>>0)-re&255;return N+U},e.prototype.writeInt8=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,1,127,-128),R<0&&(R=255+R+1),this[N]=255&R,N+1},e.prototype.writeInt16LE=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,2,32767,-32768),this[N]=255&R,this[N+1]=R>>>8,N+2},e.prototype.writeInt16BE=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,2,32767,-32768),this[N]=R>>>8,this[N+1]=255&R,N+2},e.prototype.writeInt32LE=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,4,2147483647,-2147483648),this[N]=255&R,this[N+1]=R>>>8,this[N+2]=R>>>16,this[N+3]=R>>>
2024,N+4},e.prototype.writeInt32BE=function(R,N,U){return R=+R,N>>>=0,U||S(this,R,N,4,2147483647,-2147483648),R<0&&(R=4294967295+R+1),this[N]=R>>>24,this[N+1]=R>>>16,this[N+2]=R>>>8,this[N+3]=255&R,N+4},e.prototype.writeFloatLE=function(R,N,U){return D(this,R,N,!0,U)},e.prototype.writeFloatBE=function(R,N,U){return D(this,R,N,!1,U)},e.prototype.writeDoubleLE=function(R,N,U){return F(this,R,N,!0,U)},e.prototype.writeDoubleBE=function(R,N,U){return F(this,R,N,!1,U)},e.prototype.copy=function(R,N,U,Q){if(!e.isBuffer(R))throw new TypeError("argument should be a Buffer");if(U||(U=0),Q||Q===0||(Q=this.length),N>=R.length&&(N=R.length),N||(N=0),Q>0&&Q<U&&(Q=U),Q===U||R.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),R.length-N<Q-U&&(Q=R.length-N+U);var j=Q-U;if(this===R&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(N,U,Q);else if(this===R&&U<N&&N<Q)for(var X=j-1;X>=0;--X)R[X+N]=this[X+U];else Uint8Array.prototype.set.call(R,this.subarray(U,Q),N);return j},e.prototype.fill=function(R,N,U,Q){if(typeof R=="string"){if(typeof N=="string"?(Q=N,N=0,U=this.length):typeof U=="string"&&(Q=U,U=this.length),Q!==void 0&&typeof Q!="string")throw new TypeError("encoding must be a string");if(typeof Q=="string"&&!e.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);if(R.length===1){var j=R.charCodeAt(0);(Q==="utf8"&&j<128||Q==="latin1")&&(R=j)}}else typeof R=="number"&&(R&=255);if(N<0||this.length<N||this.length<U)throw new RangeError("Out of range index");if(U<=N)return this;var X;if(N>>>=0,U=U===void 0?this.length:U>>>0,R||(R=0),typeof R=="number")for(X=N;X<U;++X)this[X]=R;else{var J=e.isBuffer(R)?R:e.from(R,Q),re=J.length;if(re===0)throw new TypeError('The value "'+R+'" is invalid for argument "value"');for(X=0;X<U-N;++X)this[X+N]=J[X%re]}return this};var H=/[^+/0-9A-Za-z-_]/g;function V(R){return R<16?"0"+R.toString(16):R.toString(16)}function Z(R,N){var U;N=N||1/0;for(var Q=R.length,j=null,X=[],J=0;J<Q;++J){if((U=R.charCodeAt(J))>
2055295&&U<57344){if(!j){if(U>56319){(N-=3)>-1&&X.push(239,191,189);continue}if(J+1===Q){(N-=3)>-1&&X.push(239,191,189);continue}j=U;continue}if(U<56320){(N-=3)>-1&&X.push(239,191,189),j=U;continue}U=65536+(j-55296<<10|U-56320)}else j&&(N-=3)>-1&&X.push(239,191,189);if(j=null,U<128){if((N-=1)<0)break;X.push(U)}else if(U<2048){if((N-=2)<0)break;X.push(U>>6|192,63&U|128)}else if(U<65536){if((N-=3)<0)break;X.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;X.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return X}function K(R){return m.toByteArray(function(N){if((N=(N=N.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;N.length%4!=0;)N+="=";return N}(R))}function q(R,N,U,Q){for(var j=0;j<Q&&!(j+U>=N.length||j>=R.length);++j)N[j+U]=R[j];return j}function W(R,N){return R instanceof N||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===N.name}function $(R){return R!=R}}).call(this)}).call(this,y("buffer").Buffer)},{"base64-js":79,buffer:85,ieee754:230}],86:[function(y,ee,te){ee.exports=function(g,m,b){return m<b?g<m?m:g>b?b:g:g<b?b:g>m?m:g}},{}],87:[function(y,ee,te){var g=y("clamp");function m(b,v){v==null&&(v=!0);var e=b[0],n=b[1],t=b[2],o=b[3];return o==null&&(o=v?1:255),v&&(e*=255,n*=255,t*=255,o*=255),16777216*(e=255&g(e,0,255))+((n=255&g(n,0,255))<<16)+((t=255&g(t,0,255))<<8)+(o=255&g(o,0,255))}ee.exports=m,ee.exports.to=m,ee.exports.from=function(b,v){var e=(b=+b)>>>24,n=(16711680&b)>>>16,t=(65280&b)>>>8,o=255&b;return v===!1?[e,n,t,o]:[e/255,n/255,t/255,o/255]}},{clamp:86}],88:[function(y,ee,te){ee.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87
20],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],89:[function(y,ee,te){var g=y("color-rgba"),m=y("clamp"),b=y("dtype");ee.exports=function(v,e){e!=="float"&&e||(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var n=new(b(e))(4),t=e!=="uint8"&&e!=="uint8_clamped";return v.length&&typeof v!="string"||((v=g(v))[0]/=255,v[1]/=255,v[2]/=255),function(o){return o instanceof Uint8Array||o instanceof Uint8ClampedArray||!!(Array.isArray(o)&&(o[0]>1||o[0]===0)&&(o[1]>1||o[1]===0)&&(o[2]>1||o[2]===0)&&(!o[3]||o[3]>1))}(v)?(n[0]=v[0],n[1]=v[1],n[2]=v[2],n[3]=v[3]!=null?v[3]:255,t&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(t?(n[0]=v[0],n[1]=v[1],n[2]=v[2],n[3]=v[3]!=null?v[3]:1):(n[0]=m(Math.floor(255*v[0]),0,255),n[1]=m(Math.floor(255*v[1]),0,255),n[2]=m(Math.floor(255*v[2]),0,255),n[3]=v[3]==null?255:m(Math.floor(255*v[3]),0,255)),n)}},{clamp:86,"color-rgba":91,dtype:127}],90:[function(y,ee,te){(function(g){(function(){var m=y("color-name"),b=y("is-plain-obj"),v=y("defined");ee.exports=function(n){var t,o,r=[],d=1;if(typeof n=="string")if(m[n])r=m[n].slice(),o="rgb";else if(n==="transparent")d=0,o="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(n)){var c=(f=n.slice(1)).length;d=1,c<=4?(r=[parseInt(f[0]+f[0],16),parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16)],c===4&&(d=parseInt(f[3]+f[3],16)/255)):(r=[parseInt(f[0]+f[1],16),parseInt(f[2]+f[3],16),parseInt(f[4]+f[5],16)],c===8&&(d=parseInt(f[6]+f[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),o="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(n)){var i=t[1],u=i==="rgb",f=i.replace(/a$/,"");o=f,c=f==="cmyk"?4:f==="gray"?1:3,r=t[2].trim().split(/\s*,\s*/).map(function(h,p){if(/%$/.test(h))return p===c?parseFloat(h)/100:f==="rgb"?255*parseFloat(h)/100:parseFloat(h);if(f[p]==="h"){if(/deg$/.test(h))return parseFloat(h);if(e[h]!==void 0)return e[h]}return parseFloat(h)}),i===f&&r.push(1),d=u||r[c]===void 0?1:r[c],r=r.slice(0,c)}else n.length>10&&/[0-9](?:\s|\/)/.test(n)&&(r=n.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),o=n.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(n))if(b(n)){var s=v(n.r,n.red,n.R,null);s!==null?(o="rgb",r=[s,v(n.g,n.green,n.G),v(n.b,n.blue,n.B)]):(o="hsl",r=[v(n.h,n.hue,n.H),v(n.s,n.saturation,n.S),v(n.l,n.lightness,n.L,n.b,n.brightness)]),d=v(n.a,n.alpha,n.opacity,1),n.opacity!=null&&(d/=100)}else(Array.isArray(n)||g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(n))&&(r=[n[0],n[1],n[2]],o="rgb",d=n.length===4?n[3]:1);else o="rgb",r=[n>>>16,(65280&n)>>>8,255&n];return{space:o,values:r,alpha:d}};var e={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"color-name":88,defined:124,"is-plain-obj":236}],91:[function(y,ee,te){var g=y("color-parse"),m=y("color-space/hsl"),b=y("clamp");ee.exports=function(v){var e,n=g(v);return n.space?((e=Array(3))[0]=b(n.values[0],0,255),e[1]=b(n.values[1],0,255),e[2]=b(n.values[2],0,255),n.space[0]==="h"&&(e=m.rgb(e)),e.push(b(n.alpha,0,1)),e):[]}},{clamp:86,"color-parse":90,"color-space/hsl":92}],92:[function(y,ee,te){var g=y("./rgb");ee.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(m){var b,v,e,n,t,o=m[0]/360,r=m[1]/100,d=m[2]/100;if(r===0)return[t=255*d,t,t];b=2*d-(v=d<.5?d*(1+r):d+r-d*r),n=[0,0,0];for(var c=0;c<3;c++)(e=o+1/3*-(c-1))<0?e++:e>1&&e--,t=6*e<1?b+6*(v-b)*e:2*e<1?v:3*e<2?b+(v-b)*(2/3-e)*6:b,n[c]=255*t;return n}},g.hsl=function(m){var b,v,e=m[0]/255,n=m[1]/255,t=m[2]/255,o=Math.min(e,n,t),r=Math.max(e,n,t),d=r-o;return r===o?b=0:e===r?b=(n-t)/d:n===r?b=2+(t-e)/d:t===r&&(b=4+(e-n)/d),(b=Math.min(60*b,3
2060))<0&&(b+=360),v=(o+r)/2,[b,100*(r===o?0:v<=.5?d/(r+o):d/(2-r-o)),100*v]}},{"./rgb":93}],93:[function(y,ee,te){ee.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],94:[function(y,ee,te){ee.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?
20stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],95:[function(y,ee,te){ee.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],96:[function(y,ee,te){ee.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],97:[function(y,ee,te){ee.exports=["normal","italic","oblique"]},{}],98:[function(y,ee,te){ee.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],99:[function(y,ee,te){ee.exports={parse:y("./parse"),stringify:y("./stringify")}},{"./parse":101,"./stringify":102}],100:[function(y,ee,te){var g=y("css-font-size-keywords");ee.exports={isSize:function(m){return/^[\d\.]/.test(m)||m.indexOf("/")!==-1||g.indexOf(m)!==-1}}},{"css-font-size-keywords":95}],101:[function(y,ee,te){var g=y("unquote"),m=y("css-global-keywords"),b=y("css-system-font-keywords"),v=y("css-font-weight-keywords"),e=y("css-font-style-keywords"),n=y("css-font-stretch-keywords"),t=y("string-split-by"),o=y("./lib/util").isSize;ee.exports=d;var r=d.cache={};function d(i){if(typeof i!="string")throw new Error("Font argument must be a string.");if(r[i])return r[i];if(i==="")throw new Error("Cannot parse an empty string.");if(b.indexOf(i)!==-1)return r[i]={system:i};for(var u,f={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},s=t(i,/\s+/);u=s.shift();){if(m.indexOf(u)!==-1)return["style","variant","weight","stretch"].forEach(function(p){f[p]=u}),r[i]=f;if(e.indexOf(u)===-1)if(u!=="normal"&&u!=="small-caps")if(n.indexOf(u)===-1){if(v.indexOf(u)===-1){if(o(u)){var h=t(u,"/");if(f.size=h[0],h[1]!=null?f.lineHeight=c(h[1]):s[0]==="/"&&(s.shift(),f.lineHeight=c(s.shift())),!s.length)throw new Error("Missing required font-family.");
20return f.family=t(s.join(" "),/\s*,\s*/).map(g),r[i]=f}throw new Error("Unknown or unsupported font token: "+u)}f.weight=u}else f.stretch=u;else f.variant=u;else f.style=u}throw new Error("Missing required font-size.")}function c(i){var u=parseFloat(i);return u.toString()===i?u:i}},{"./lib/util":100,"css-font-stretch-keywords":96,"css-font-style-keywords":97,"css-font-weight-keywords":98,"css-global-keywords":103,"css-system-font-keywords":104,"string-split-by":305,unquote:328}],102:[function(y,ee,te){var g=y("pick-by-alias"),m=y("./lib/util").isSize,b=u(y("css-global-keywords")),v=u(y("css-system-font-keywords")),e=u(y("css-font-weight-keywords")),n=u(y("css-font-style-keywords")),t=u(y("css-font-stretch-keywords")),o={normal:1,"small-caps":1},r={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},d="1rem",c="serif";function i(f,s){if(f&&!s[f]&&!b[f])throw Error("Unknown keyword `"+f+"`");return f}function u(f){for(var s={},h=0;h<f.length;h++)s[f[h]]=1;return s}ee.exports=function(f){if((f=g(f,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"})).system)return f.system&&i(f.system,v),f.system;if(i(f.style,n),i(f.variant,o),i(f.weight,e),i(f.stretch,t),f.size==null&&(f.size=d),typeof f.size=="number"&&(f.size+="px"),!m)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=c),Array.isArray(f.family)&&(f.family.length||(f.family=[c]),f.family=f.family.map(function(h){return r[h]?h:'"'+h+'"'}).join(", "));var s=[];return s.push(f.style),f.variant!==f.style&&s.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&s.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&s.push(f.stretch),s.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),s.push(f.family),s.filter(Boolean).join(" ")}},{"./lib/util":100,"css-font-stretch-keywords":96,"css-font-style-keywords":97,"css-font-weight-keywords":98,"css-global-keywords":103,"css-system-font-keywords":104,"pick-by-alias":253}],103:[function(y,ee,te){ee.exports=["inherit","initial","unset"]},{}],104:[function(y,ee,te){ee.exports=["caption","icon","menu","message-box","small-caption","status-bar"]},{}],105:[function(y,ee,te){var g,m=y("type/value/is"),b=y("type/value/ensure"),v=y("type/plain-function/ensure"),e=y("es5-ext/object/copy"),n=y("es5-ext/object/normalize-options"),t=y("es5-ext/object/map"),o=Function.prototype.bind,r=Object.defineProperty,d=Object.prototype.hasOwnProperty;g=function(c,i,u){var f,s=b(i)&&v(i.value);return delete(f=e(i)).writable,delete f.value,f.get=function(){return!u.overwriteDefinition&&d.call(this,c)?s:(i.value=o.call(s,u.resolveContext?u.resolveContext(this):this),r(this,c,i),this[c])},f},ee.exports=function(c){var i=n(arguments[1]);return m(i.resolveContext)&&v(i.resolveContext),t(c,function(u,f){return g(f,u,i)})}},{"es5-ext/object/copy":147,"es5-ext/object/map":155,"es5-ext/object/normalize-options":156,"type/plain-function/ensure":321,"type/value/ensure":325,"type/value/is":326}],106:[function(y,ee,te){var g=y("type/value/is"),m=y("type/plain-function/is"),b=y("es5-ext/object/assign"),v=y("es5-ext/object/normalize-options"),e=y("es5-ext/string/#/contains");(ee.exports=function(n,t){var o,r,d,c,i;return arguments.length<2||typeof n!="string"?(c=t,t=n,n=null):c=arguments[2],g(n)?(o=e.call(n,"c"),r=e.call(n,"e"),d=e.call(n,"w")):(o=d=!0,r=!1),i={value:t,configurable:o,enumerable:r,writable:d},c?b(v(c),i):i}).gs=function(n,t,o){var r,d,c,i;return typeof n!="string"?(c=o,o=t,t=n,n=null):c=arguments[3],g(t)?m(t)?g(o)?m(o)||(c=o,o=void 0):o=void 0:(c=t,t=o=void 0):t=void 0,g(n)?(r=e.call(n,"c"),d=e.call(n,"e")):(r=!0,d=!1),i={get:t,set:o,configurable:r,enumerable:d},c?b(v(c),i):i}},{"es5-ext/object/assign":144,"es5-ext/object/normalize-options":156,"es5-ext/string/#/contains":163,"type/plain-function/is":322,"type/value/is":326}],107:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:g.d3
vendor: 5,542 bytes, line 20
20=g.d3||{})})(this,function(g){function m(P,S){return P<S?-1:P>S?1:P>=S?0:NaN}function b(P){var S;return P.length===1&&(S=P,P=function(E,D){return m(S(E),D)}),{left:function(E,D,F,H){for(F==null&&(F=0),H==null&&(H=E.length);F<H;){var V=F+H>>>1;P(E[V],D)<0?F=V+1:H=V}return F},right:function(E,D,F,H){for(F==null&&(F=0),H==null&&(H=E.length);F<H;){var V=F+H>>>1;P(E[V],D)>0?H=V:F=V+1}return F}}}var v=b(m),e=v.right,n=v.left;function t(P,S){return[P,S]}function o(P){return P===null?NaN:+P}function r(P,S){var E,D,F=P.length,H=0,V=-1,Z=0,K=0;if(S==null)for(;++V<F;)isNaN(E=o(P[V]))||(K+=(D=E-Z)*(E-(Z+=D/++H)));else for(;++V<F;)isNaN(E=o(S(P[V],V,P)))||(K+=(D=E-Z)*(E-(Z+=D/++H)));if(H>1)return K/(H-1)}function d(P,S){var E=r(P,S);return E&&Math.sqrt(E)}function c(P,S){var E,D,F,H=P.length,V=-1;if(S==null){for(;++V<H;)if((E=P[V])!=null&&E>=E)for(D=F=E;++V<H;)(E=P[V])!=null&&(D>E&&(D=E),F<E&&(F=E))}else for(;++V<H;)if((E=S(P[V],V,P))!=null&&E>=E)for(D=F=E;++V<H;)(E=S(P[V],V,P))!=null&&(D>E&&(D=E),F<E&&(F=E));return[D,F]}var i=Array.prototype,u=i.slice,f=i.map;function s(P){return function(){return P}}function h(P){return P}function p(P,S,E){P=+P,S=+S,E=(F=arguments.length)<2?(S=P,P=0,1):F<3?1:+E;for(var D=-1,F=0|Math.max(0,Math.ceil((S-P)/E)),H=new Array(F);++D<F;)H[D]=P+D*E;return H}var a=Math.sqrt(50),x=Math.sqrt(10),l=Math.sqrt(2);function w(P,S,E){var D=(S-P)/Math.max(0,E),F=Math.floor(Math.log(D)/Math.LN10),H=D/Math.pow(10,F);return F>=0?(H>=a?10:H>=x?5:H>=l?2:1)*Math.pow(10,F):-Math.pow(10,-F)/(H>=a?10:H>=x?5:H>=l?2:1)}function _(P,S,E){var D=Math.abs(S-P)/Math.max(0,E),F=Math.pow(10,Math.floor(Math.log(D)/Math.LN10)),H=D/F;return H>=a?F*=10:H>=x?F*=5:H>=l&&(F*=2),S<P?-F:F}function T(P){return Math.ceil(Math.log(P.length)/Math.LN2)+1}function k(P,S,E){if(E==null&&(E=o),D=P.length){if((S=+S)<=0||D<2)return+E(P[0],0,P);if(S>=1)return+E(P[D-1],D-1,P);var D,F=(D-1)*S,H=Math.floor(F),V=+E(P[H],H,P);return V+(+E(P[H+1],H+1,P)-V)*(F-H)}}function L(P,S){var E,D,F=P.length,H=-1;if(S==null){for(;++H<F;)if((E=P[H])!=null&&E>=E)for(D=E;++H<F;)(E=P[H])!=null&&D>E&&(D=E)}else for(;++H<F;)if((E=S(P[H],H,P))!=null&&E>=E)for(D=E;++H<F;)(E=S(P[H],H,P))!=null&&D>E&&(D=E);return D}function A(P){if(!(F=P.length))return[];for(var S=-1,E=L(P,I),D=new Array(E);++S<E;)for(var F,H=-1,V=D[S]=new Array(F);++H<F;)V[H]=P[H][S];return D}function I(P){return P.length}g.bisect=e,g.bisectRight=e,g.bisectLeft=n,g.ascending=m,g.bisector=b,g.cross=function(P,S,E){var D,F,H,V,Z=P.length,K=S.length,q=new Array(Z*K);for(E==null&&(E=t),D=H=0;D<Z;++D)for(V=P[D],F=0;F<K;++F,++H)q[H]=E(V,S[F]);return q},g.descending=function(P,S){return S<P?-1:S>P?1:S>=P?0:NaN},g.deviation=d,g.extent=c,g.histogram=function(){var P=h,S=c,E=T;function D(F){var H,V,Z=F.length,K=new Array(Z);for(H=0;H<Z;++H)K[H]=P(F[H],H,F);var q=S(K),W=q[0],$=q[1],R=E(K,W,$);Array.isArray(R)||(R=_(W,$,R),R=p(Math.ceil(W/R)*R,$,R));for(var N=R.length;R[0]<=W;)R.shift(),--N;for(;R[N-1]>$;)R.pop(),--N;var U,Q=new Array(N+1);for(H=0;H<=N;++H)(U=Q[H]=[]).x0=H>0?R[H-1]:W,U.x1=H<N?R[H]:$;for(H=0;H<Z;++H)W<=(V=K[H])&&V<=$&&Q[e(R,V,0,N)].push(F[H]);return Q}return D.value=function(F){return arguments.length?(P=typeof F=="function"?F:s(F),D):P},D.domain=function(F){return arguments.length?(S=typeof F=="function"?F:s([F[0],F[1]]),D):S},D.thresholds=function(F){return arguments.length?(E=typeof F=="function"?F:Array.isArray(F)?s(u.call(F)):s(F),D):E},D},g.thresholdFreedmanDiaconis=function(P,S,E){return P=f.call(P,o).sort(m),Math.ceil((E-S)/(2*(k(P,.75)-k(P,.25))*Math.pow(P.length,-1/3)))},g.thresholdScott=function(P,S,E){return Math.ceil((E-S)/(3.5*d(P)*Math.pow(P.length,-1/3)))},g.thresholdSturges=T,g.max=function(P,S){var E,D,F=P.length,H=-1;if(S==null){for(;++H<F;)if((E=P[H])!=null&&E>=E)for(D=E;++H<F;)(E=P[H])!=null&&E>D&&(D=E)}else for(;++H<F;)if((E=S(P[H],H,P))!=null&&E>=E)for(D=E;++H<F;)(E=S(P[H],H,P))!=null&&E>D&&(D=E);return D},g.mean=function(P,S){var E,D=P.length,F=D,H=-1,V=0;if(S==null)for(;++H<D;)isNaN(E=o(P[H]))?--F:V+=E;else for(;++H<D;)isNaN(E=o(S(P[H],H,P)))?--F:V+=E;if(F)return V/F},g.median=function(P,S){var E,D=P.length,F=-1,H=[];if(S==null)for(;++F<D;)isNaN(E=o(P[F]))||H.push(E);else for(;++F<D;)isNaN(E=o(S(P[F],F,P)))||H.push(E);return k(H.sort(m),.5)},g.merge=function(P){for(var S,E,D,F=P.length,H=-1,V=0;++H<F;)V+=P[H].length;for(E=new Array(V);--F>=0;)for(S=(D=P[F]).length;--S>=0;)E[--V]=D[S];return E},g.min=L,g.pairs=function(P,S){S==null&&(S=t);for(var E=0,D=P.length-1,F=P[0],H=new Array(D<0?0:D);E<D;)H[E]=S(F,F=P[++E]);return H},g.permute=function(P,S){for(var E=S.length,D=new Array(E);E--;)D[E]=P[S[E]];return D},g.quantile=k,g.range=p,g.scan=function(P,S){if(E=P.length){var E,D,F=0,H=0,V=P[H];for(S==null&&(S=m);++F<E;)(S(D=P[F],V)<0||S(V,V)!==0)&&(V=D,H=F);return S(V,V)===0?H:void 0}},g.shuffle=function(P,S,E){for(var D,F,H=(E??P.length)-(S=S==null?0:+S);H;)F=Math.random()*H--|0,D=P[H+S],P[H+S]=P[F+S],P[F+S]=D;return P},g.sum=function(P,S){var E,D=P.length,F=-1,H=0;if(S==null)for(;++F<D;)(E=+P[F])&&(H+=E);else for(;++F<D;)(E=+S(P[F],F,P))&&(H+=E);return H},g.ticks=function(P,S,E){var D,F,H,V,Z=-1;if(E=+E,(P=+P)==(S=+S)&&E>0)return[P];if((D=S<P)&&(F=P,P=S,S=F),(V=w(P,S,E))===0||!isFinite(V))return[];if(V>0)for(P=Math.ceil(P/V),S=Math.floor(S/V),H=new Array(F=Math.ceil(S-P+1));++Z<F;)H[Z]=(P+Z)*V;else for(P=Math.floor(P*V),S=Math.ceil(S*V),H=new Array(F=Math.ceil(P-S+1));++Z<F;)H[Z]=(P-Z)/V;return D&&H.reverse(),H},g.tickIncrement=w,g.tickStep=_,g.transpose=A,g.variance=r,g.zip=function(){return A(arguments)}
20,Object.defineProperty(g,"__esModule",{value:!0})})},{}],108:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:g.d3=g.d3||{})})(this,function(g){function m(){}function b(c,i){var u=new m;if(c instanceof m)c.each(function(a,x){u.set(x,a)});else if(Array.isArray(c)){var f,s=-1,h=c.length;if(i==null)for(;++s<h;)u.set(s,c[s]);else for(;++s<h;)u.set(i(f=c[s],s,c),f)}else if(c)for(var p in c)u.set(p,c[p]);return u}function v(){return{}}function e(c,i,u){c[i]=u}function n(){return b()}function t(c,i,u){c.set(i,u)}function o(){}m.prototype=b.prototype={constructor:m,has:function(c){return"$"+c in this},get:function(c){return this["$"+c]},set:function(c,i){return this["$"+c]=i,this},remove:function(c){var i="$"+c;return i in this&&delete this[i]},clear:function(){for(var c in this)c[0]==="$"&&delete this[c]},keys:function(){var c=[];for(var i in this)i[0]==="$"&&c.push(i.slice(1));return c},values:function(){var c=[];for(var i in this)i[0]==="$"&&c.push(this[i]);return c},entries:function(){var c=[];for(var i in this)i[0]==="$"&&c.push({key:i.slice(1),value:this[i]});return c},size:function(){var c=0;for(var i in this)i[0]==="$"&&++c;return c},empty:function(){for(var c in this)if(c[0]==="$")return!1;return!0},each:function(c){for(var i in this)i[0]==="$"&&c(this[i],i.slice(1),this)}};var r=b.prototype;function d(c,i){var u=new o;if(c instanceof o)c.each(function(h){u.add(h)});else if(c){var f=-1,s=c.length;if(i==null)for(;++f<s;)u.add(c[f]);else for(;++f<s;)u.add(i(c[f],f,c))}return u}o.prototype=d.prototype={constructor:o,has:r.has,add:function(c){return this["$"+(c+="")]=c,this},remove:r.remove,clear:r.clear,values:r.keys,size:r.size,empty:r.empty,each:r.each},g.nest=function(){var c,i,u,f=[],s=[];function h(p,a,x,l){if(a>=f.length)return c!=null&&p.sort(c),i!=null?i(p):p;for(var w,_,T,k=-1,L=p.length,A=f[a++],I=b(),P=x();++k<L;)(T=I.get(w=A(_=p[k])+""))?T.push(_):I.set(w,[_]);return I.each(function(S,E){l(P,E,h(S,a,x,l))}),P}return u={object:function(p){return h(p,0,v,e)},map:function(p){return h(p,0,n,t)},entries:function(p){return function a(x,l){if(++l>f.length)return x;var w,_=s[l-1];return i!=null&&l>=f.length?w=x.entries():(w=[],x.each(function(T,k){w.push({key:k,values:a(T,l)})})),_!=null?w.sort(function(T,k){return _(T.key,k.key)}):w}(h(p,0,n,t),0)},key:function(p){return f.push(p),u},sortKeys:function(p){return s[f.length-1]=p,u},sortValues:function(p){return c=p,u},rollup:function(p){return i=p,u}}},g.set=d,g.map=b,g.keys=function(c){var i=[];for(var u in c)i.push(u);return i},g.values=function(c){var i=[];for(var u in c)i.push(c[u]);return i},g.entries=function(c){var i=[];for(var u in c)i.push({key:u,value:c[u]});return i},Object.defineProperty(g,"__esModule",{value:!0})})},{}],109:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=g||self).d3=g.d3||{})})(this,function(g){function m(fe,me,Te){fe.prototype=me.prototype=Te,Te.constructor=fe}function b(fe,me){var Te=Object.create(fe.prototype);for(var _e in me)Te[_e]=me[_e];return Te}function v(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),d=new RegExp("^rgb\\("+[t,t,t]+"\\)$"),c=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),i=new RegExp("^rgba\\("+[t,t,t,n]+"\\)$"),u=new RegExp("^hsl\\("+[n,t,t]+"\\)$"),f=new RegExp("^hsla\\("+[n,t,t,n]+"\\)$"),s={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function h(){return this.rgb().formatHex()}function p(){return this.rgb().formatRgb()}function a(fe){var me,Te;return fe=(fe+"").trim().toLowerCase(),(me=o.exec(fe))?(Te=me[1].length,me=parseInt(me[1],16),Te===6?x(me):Te===3?new T(me>>8&15|me>>4&240,me>>
vendor: 4,376 bytes, line 20
204&15|240&me,(15&me)<<4|15&me,1):Te===8?l(me>>24&255,me>>16&255,me>>8&255,(255&me)/255):Te===4?l(me>>12&15|me>>8&240,me>>8&15|me>>4&240,me>>4&15|240&me,((15&me)<<4|15&me)/255):null):(me=r.exec(fe))?new T(me[1],me[2],me[3],1):(me=d.exec(fe))?new T(255*me[1]/100,255*me[2]/100,255*me[3]/100,1):(me=c.exec(fe))?l(me[1],me[2],me[3],me[4]):(me=i.exec(fe))?l(255*me[1]/100,255*me[2]/100,255*me[3]/100,me[4]):(me=u.exec(fe))?I(me[1],me[2]/100,me[3]/100,1):(me=f.exec(fe))?I(me[1],me[2]/100,me[3]/100,me[4]):s.hasOwnProperty(fe)?x(s[fe]):fe==="transparent"?new T(NaN,NaN,NaN,0):null}function x(fe){return new T(fe>>16&255,fe>>8&255,255&fe,1)}function l(fe,me,Te,_e){return _e<=0&&(fe=me=Te=NaN),new T(fe,me,Te,_e)}function w(fe){return fe instanceof v||(fe=a(fe)),fe?new T((fe=fe.rgb()).r,fe.g,fe.b,fe.opacity):new T}function _(fe,me,Te,_e){return arguments.length===1?w(fe):new T(fe,me,Te,_e??1)}function T(fe,me,Te,_e){this.r=+fe,this.g=+me,this.b=+Te,this.opacity=+_e}function k(){return"#"+A(this.r)+A(this.g)+A(this.b)}function L(){var fe=this.opacity;return((fe=isNaN(fe)?1:Math.max(0,Math.min(1,fe)))===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(fe===1?")":", "+fe+")")}function A(fe){return((fe=Math.max(0,Math.min(255,Math.round(fe)||0)))<16?"0":"")+fe.toString(16)}function I(fe,me,Te,_e){return _e<=0?fe=me=Te=NaN:Te<=0||Te>=1?fe=me=NaN:me<=0&&(fe=NaN),new E(fe,me,Te,_e)}function P(fe){if(fe instanceof E)return new E(fe.h,fe.s,fe.l,fe.opacity);if(fe instanceof v||(fe=a(fe)),!fe)return new E;if(fe instanceof E)return fe;var me=(fe=fe.rgb()).r/255,Te=fe.g/255,_e=fe.b/255,Ae=Math.min(me,Te,_e),Pe=Math.max(me,Te,_e),De=NaN,Ve=Pe-Ae,Qe=(Pe+Ae)/2;return Ve?(De=me===Pe?(Te-_e)/Ve+6*(Te<_e):Te===Pe?(_e-me)/Ve+2:(me-Te)/Ve+4,Ve/=Qe<.5?Pe+Ae:2-Pe-Ae,De*=60):Ve=Qe>0&&Qe<1?0:De,new E(De,Ve,Qe,fe.opacity)}function S(fe,me,Te,_e){return arguments.length===1?P(fe):new E(fe,me,Te,_e??1)}function E(fe,me,Te,_e){this.h=+fe,this.s=+me,this.l=+Te,this.opacity=+_e}function D(fe,me,Te){return 255*(fe<60?me+(Te-me)*fe/60:fe<180?Te:fe<240?me+(Te-me)*(240-fe)/60:me)}m(v,a,{copy:function(fe){return Object.assign(new this.constructor,this,fe)},displayable:function(){return this.rgb().displayable()},hex:h,formatHex:h,formatHsl:function(){return P(this).formatHsl()},formatRgb:p,toString:p}),m(T,_,b(v,{brighter:function(fe){return fe=fe==null?1/.7:Math.pow(1/.7,fe),new T(this.r*fe,this.g*fe,this.b*fe,this.opacity)},darker:function(fe){return fe=fe==null?.7:Math.pow(.7,fe),new T(this.r*fe,this.g*fe,this.b*fe,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k,formatHex:k,formatRgb:L,toString:L})),m(E,S,b(v,{brighter:function(fe){return fe=fe==null?1/.7:Math.pow(1/.7,fe),new E(this.h,this.s,this.l*fe,this.opacity)},darker:function(fe){return fe=fe==null?.7:Math.pow(.7,fe),new E(this.h,this.s,this.l*fe,this.opacity)},rgb:function(){var fe=this.h%360+360*(this.h<0),me=isNaN(fe)||isNaN(this.s)?0:this.s,Te=this.l,_e=Te+(Te<.5?Te:1-Te)*me,Ae=2*Te-_e;return new T(D(fe>=240?fe-240:fe+120,Ae,_e),D(fe,Ae,_e),D(fe<120?fe+240:fe-120,Ae,_e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var fe=this.opacity;return((fe=isNaN(fe)?1:Math.max(0,Math.min(1,fe)))===1?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(fe===1?")":", "+fe+")")}}));var F=Math.PI/180,H=180/Math.PI,V=6/29,Z=3*V*V;function K(fe){if(fe instanceof W)return new W(fe.l,fe.a,fe.b,fe.opacity);if(fe instanceof X)return J(fe);fe instanceof T||(fe=w(fe));var me,Te,_e=U(fe.r),Ae=U(fe.g),Pe=U(fe.b),De=$((.2225045*_e+.7168786*Ae+.0606169*Pe)/1);return _e===Ae&&Ae===Pe?me=Te=De:(me=$((.4360747*_e+.3850649*Ae+.1430804*Pe)/.96422),Te=$((.0139322*_e+.0971045*Ae+.7141733*Pe)/.82521)),new W(116*De-16,500*(me-De),200*(De-Te),fe.opacity)}function q(fe,me,Te,_e){return arguments.length===1?K(fe):new W(fe,me,Te,_e??1)}function W(fe,me,Te,_e){this.l=+fe,this.a=+me,this.b=+Te,this.opacity=+_e}function $(fe){return fe>.008856451679035631?Math.pow(fe,1/3):fe/Z+4/29}function R(fe){return fe>V?fe*fe*fe:Z*(fe-4/29)}
20function N(fe){return 255*(fe<=.0031308?12.92*fe:1.055*Math.pow(fe,1/2.4)-.055)}function U(fe){return(fe/=255)<=.04045?fe/12.92:Math.pow((fe+.055)/1.055,2.4)}function Q(fe){if(fe instanceof X)return new X(fe.h,fe.c,fe.l,fe.opacity);if(fe instanceof W||(fe=K(fe)),fe.a===0&&fe.b===0)return new X(NaN,0<fe.l&&fe.l<100?0:NaN,fe.l,fe.opacity);var me=Math.atan2(fe.b,fe.a)*H;return new X(me<0?me+360:me,Math.sqrt(fe.a*fe.a+fe.b*fe.b),fe.l,fe.opacity)}function j(fe,me,Te,_e){return arguments.length===1?Q(fe):new X(fe,me,Te,_e??1)}function X(fe,me,Te,_e){this.h=+fe,this.c=+me,this.l=+Te,this.opacity=+_e}function J(fe){if(isNaN(fe.h))return new W(fe.l,0,0,fe.opacity);var me=fe.h*F;return new W(fe.l,Math.cos(me)*fe.c,Math.sin(me)*fe.c,fe.opacity)}m(W,q,b(v,{brighter:function(fe){return new W(this.l+18*(fe??1),this.a,this.b,this.opacity)},darker:function(fe){return new W(this.l-18*(fe??1),this.a,this.b,this.opacity)},rgb:function(){var fe=(this.l+16)/116,me=isNaN(this.a)?fe:fe+this.a/500,Te=isNaN(this.b)?fe:fe-this.b/200;return new T(N(3.1338561*(me=.96422*R(me))-1.6168667*(fe=1*R(fe))-.4906146*(Te=.82521*R(Te))),N(-.9787684*me+1.9161415*fe+.033454*Te),N(.0719453*me-.2289914*fe+1.4052427*Te),this.opacity)}})),m(X,j,b(v,{brighter:function(fe){return new X(this.h,this.c,this.l+18*(fe??1
20),this.opacity)},darker:function(fe){return new X(this.h,this.c,this.l-18*(fe??1),this.opacity)},rgb:function(){return J(this).rgb()}}));var re=-.14861,ne=1.78277,se=-.29227,oe=-.90649,pe=1.97294,ce=pe*oe,de=pe*ne,xe=ne*se-oe*re;function we(fe){if(fe instanceof Ee)return new Ee(fe.h,fe.s,fe.l,fe.opacity);fe instanceof T||(fe=w(fe));var me=fe.r/255,Te=fe.g/255,_e=fe.b/255,Ae=(xe*_e+ce*me-de*Te)/(xe+ce-de),Pe=_e-Ae,De=(pe*(Te-Ae)-se*Pe)/oe,Ve=Math.sqrt(De*De+Pe*Pe)/(pe*Ae*(1-Ae)),Qe=Ve?Math.atan2(De,Pe)*H-120:NaN;return new Ee(Qe<0?Qe+360:Qe,Ve,Ae,fe.opacity)}function be(fe,me,Te,_e){return arguments.length===1?we(fe):new Ee(fe,me,Te,_e??1)}function Ee(fe,me,Te,_e){this.h=+fe,this.s=+me,this.l=+Te,this.opacity=+_e}m(Ee,be,b(v,{brighter:function(fe){return fe=fe==null?1/.7:Math.pow(1/.7,fe),new Ee(this.h,this.s,this.l*fe,this.opacity)},darker:function(fe){return fe=fe==null?.7:Math.pow(.7,fe),new Ee(this.h,this.s,this.l*fe,this.opacity)},rgb:function(){var fe=isNaN(this.h)?0:(this.h+120)*F,me=+this.l,Te=isNaN(this.s)?0:this.s*me*(1-me),_e=Math.cos(fe),Ae=Math.sin(fe);return new T(255*(me+Te*(re*_e+ne*Ae)),255*(me+Te*(se*_e+oe*Ae)),255*(me+Te*(pe*_e)),this.opacity)}})),g.color=a,g.cubehelix=be,g.gray=function(fe,me){return new W(fe,0,0,me??1)},g.hcl=j,g.hsl=S,g.lab=q,g.lch=function(fe,me,Te,_e){return arguments.length===1?Q(fe):new X(Te,me,fe,_e??1)},g.rgb=_,Object.defineProperty(g,"__esModule",{value:!0})})},{}],110:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=g||self).d3=g.d3||{})})(this,function(g){var m={value:function(){}};function b(){for(var o,r=0,d=arguments.length,c={};r<d;++r){if(!(o=arguments[r]+"")||o in c||/[\s.]/.test(o))throw new Error("illegal type: "+o);c[o]=[]}return new v(c)}function v(o){this._=o}function e(o,r){return o.trim().split(/^|\s+/).map(function(d){var c="",i=d.indexOf(".");if(i>=0&&(c=d.slice(i+1),d=d.slice(0,i)),d&&!r.hasOwnProperty(d))throw new Error("unknown type: "+d);return{type:d,name:c}})}function n(o,r){for(var d,c=0,i=o.length;c<i;++c)if((d=o[c]).name===r)return d.value}function t(o,r,d){for(var c=0,i=o.length;c<i;++c)if(o[c].name===r){o[c]=m,o=o.slice(0,c).concat(o.slice(c+1));break}return d!=null&&o.push({name:r,value:d}),o}v.prototype=b.prototype={constructor:v,on:function(o,r){var d,c=this._,i=e(o+"",c),u=-1,f=i.length;if(!(arguments.length<2)){if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++u<f;)if(d=(o=i[u]).type)c[d]=t(c[d],o.name,r);else if(r==null)for(d in c)c[d]=t(c[d],o.name,null);return this}for(;++u<f;)if((d=(o=i[u]).type)&&(d=n(c[d],o.name)))return d},copy:function(){var o={},r=this._;for(var d in r)o[d]=r[d].slice();return new v(o)},call:function(o,r){if((d=arguments.length-2)>0)for(var d,c,i=new Array(d),u=0;u<d;++u)i[u]=arguments[u+2];if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(u=0,d=(c=this._[o]).length;u<d;++u)c[u].value.apply(r,i)},apply:function(o,r,d){if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(var c=this._[o],i=0,u=c.length;i<u;++i)c[i].value.apply(r,d)}},g.dispatch=b,Object.defineProperty(g,"__esModule",{value:!0})})},{}],111:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?m(te,y("d3-quadtree"),y("d3-collection"),y("d3-dispatch"),y("d3-timer")):m(g.d3=g.d3||{},g.d3,g.d3,g.d3,g.d3)})(this,function(g,m,b,v,e){function n(s){return function(){return s}}function t(){return 1e-6*(Math.random()-.5)}function o(s){return s.x+s.vx}function r(s){return s.y+s.vy}function d(s){return s.index}function c(s,h){var p=s.get(h);if(!p)throw new Error("missing: "+h);return p}function i(s){return s.x}function u(s){return s.y}var f=Math.PI*(3-Math.sqrt(5));g.forceCenter=function(s,h){var p;function a(){var x,l,w=p.length,_=0,T=0;for(x=0;x<w;++x)_+=(l=p[x]).x,T+=l.y;for(_=_/w-s,T=T/w-h,x=0;x<w;++x)(l=p[x]).x-=_,l.y-=T}return s==null&&(s=0),h==null&&(h=0),a.initialize=function(x){p=x},a.x=function(x){return arguments.length?(s=+x,a):s},a.y=function(x){return arguments.length?(h=+x,a):h},a},g.forceCollide=function(s){var h,p,a=1,x=1;function l(){for(var T,k,L,A,I,P,S,E=h.length,D=0;D<x;++D)for(k=m.quadtree(h,o,r).visitAfter(w),T=0;T<E;++T)L=h[T],P=p[L.index],S=P*P,A=L.x+L.vx,I=L.y+L.vy,k.visit(F);function F(H,V,Z,K,q){var W=H.data,$=H.r,R=P+$;if(!W)return V>A+R||K<A-R||Z>I+R||q<I-R;if(W.index>L.index){var N=A-W.x-W.vx,U=I-W.y-W.vy,Q=N*N+U*U;Q<R*R&&(N===0&&(Q+=(N=t())*N),U===0&&(Q+=(U=t())*U),Q=(R-(Q=Math.sqrt(Q)))/Q*a,L.vx+=(N*=Q)*(R=($*=$)/(S+$)),L.vy+=(U*=Q)*R,W.vx-=N*(R=1-R),W.vy-=U*R)}}}function w(T){if(T.data)return T.r=p[T.data.index];for(var k=T.r=0;k<4;++k)T[k]&&T[k].r>T.r&&(T.r=T[k].r)}function _(){if(h){var T,k,L=h.length;for(p=new Array(L),T=0;T<L;++T)k=h[T],p[k.index]=+s(k,T,h)}}return typeof s!="function"&&(s=n(s==null?1:+s)),l.initialize=function(T){h=T,_()},l.iterations=function(T){return arguments.length?(x=+T,l):x},l.strength=function(T){return arguments.length?(a=+T,l):a},l.radius=function(T){return arguments.length?(s=typeof T=="function"?T:n(+T),_(),l):s},l},g.forceLink=function(s){var h,p,a,x,l,w=d,_=function(S){return 1/Math.min(x[S.source.index],x[S.target.index])},T=n(30),k=1;function L(S){for(var E=0,D=s.length;E<k;++E)for(var F,H,V,Z,K,q,W,$=0;$<D;++$)H=(F=s[$]).source,Z=(V=F.target).x+V.vx-H.x-H.vx||t(),K=V.y+V.vy-H.y-H.vy||t(),Z*=q=((q=Math.sqrt(Z*Z+K*K))-p[$])/q*S*h[$],K*=q,V.vx-=Z*(W=l[$]),V.vy-=K*W,H.vx+=Z*(W=1-W),H.vy+=K*W}function A(){if(a){var S,E,D=a.length,F=s.length,H=b.map(a,w);for(S=0,x=new Array(D);S<F;++S)(E=s[S]).index=S,typeof E.source!="object"&&(E.source=c(H,E.source)),typeof E.target!="object"&&(E.target=c(H,E.target)),x[E.source.index]=(x[E.source.index]||0)+1,x[E.target.index]=(x[E.target.index]||0)+1;for(S=0,l=new Array(F);S<F;++S)E=s[S],l[S]=x[E.source.index]/(x[E.source.index]+x[E.target.index]);h=new Array(F),I(),p=new Array(F),P()}}function I(){if(a)for(var S=0,E=s.length;S<E;++S)h[S]=+_(s[S],S,s)}function P(){if(a)for(var S=0,E=s.length;S<E;++S)p[S]=+T(s[S],S,s)}return s==null&&(s=[]),L.initialize=function(S){a=S,A()},L.links=function(S){return arguments.length?(s=S,A(),L):s},L.id=function(S){return arguments.length?(w=S,L):w},L.iterations=function(S){return arguments.length?(k=+S,L):k},L.strength=function(S){return arguments.length?(_=typeof S=="function"?S:n(+S),I(),L):_},L.distance=function(S){return arguments.length?(T=typeof S=="function"?S:n(+S),P(),L):T},L},g.forceManyBody=function(){var s,h,p,a,x=n(-30),l=1,w=1/0,_=.81;function T(I){var P,S=s.length,E=m.quadtree(s,i,u).visitAfter(L);for(p=I,P=0;P<S;++P)h=s[P],E.visit(A)}function k(){if(s){var I,P,S=s.length;for(a=new Array(S),I=0;I<S;++I)P=s[I],a[P.index]=+x(P,I,s)}}function L(I){var P,S,E,D,F,H=0,V=0;if(I.length){for(E=D=F=0;F<4;++F)(P=I[F])&&(S=Math.abs(P.value))&&(H+=P.value,V+=S,E+=S*P.x,D+=S*P.y);I.x=E/V,I.y=D/V}else{(P=I).x=P.data.x,P.y=P.data.y;do H+=a[P.data.index];while(P=P.next)}I.value=H}function A(I,P,S,E){if(!I.value)return!0;var D=I.x-h.x,F=I.y-h.y,H=E-P,V=D*D+F*F;
20if(H*H/_<V)return V<w&&(D===0&&(V+=(D=t())*D),F===0&&(V+=(F=t())*F),V<l&&(V=Math.sqrt(l*V)),h.vx+=D*I.value*p/V,h.vy+=F*I.value*p/V),!0;if(!(I.length||V>=w)){(I.data!==h||I.next)&&(D===0&&(V+=(D=t())*D),F===0&&(V+=(F=t())*F),V<l&&(V=Math.sqrt(l*V)));do I.data!==h&&(H=a[I.data.index]*p/V,h.vx+=D*H,h.vy+=F*H);while(I=I.next)}}return T.initialize=function(I){s=I,k()},T.strength=function(I){return arguments.length?(x=typeof I=="function"?I:n(+I),k(),T):x},T.distanceMin=function(I){return arguments.length?(l=I*I,T):Math.sqrt(l)},T.distanceMax=function(I){return arguments.length?(w=I*I,T):Math.sqrt(w)},T.theta=function(I){return arguments.length?(_=I*I,T):Math.sqrt(_)},T},g.forceRadial=function(s,h,p){var a,x,l,w=n(.1);function _(k){for(var L=0,A=a.length;L<A;++L){var I=a[L],P=I.x-h||1e-6,S=I.y-p||1e-6,E=Math.sqrt(P*P+S*S),D=(l[L]-E)*x[L]*k/E;I.vx+=P*D,I.vy+=S*D}}function T(){if(a){var k,L=a.length;for(x=new Array(L),l=new Array(L),k=0;k<L;++k)l[k]=+s(a[k],k,a),x[k]=isNaN(l[k])?0:+w(a[k],k,a)}}return typeof s!="function"&&(s=n(+s)),h==null&&(h=0),p==null&&(p=0),_.initialize=function(k){a=k,T()},_.strength=function(k){return arguments.length?(w=typeof k=="function"?k:n(+k),T(),_):w},_.radius=function(k){return arguments.length?(s=typeof k=="function"?k:n(+k),T(),_):s},_.x=function(k){return arguments.length?(h=+k,_):h},_.y=function(k){return arguments.length?(p=+k,_):p},_},g.forceSimulation=function(s){var h,p=1,a=.001,x=1-Math.pow(a,1/300),l=0,w=.6,_=b.map(),T=e.timer(L),k=v.dispatch("tick","end");function L(){A(),k.call("tick",h),p<a&&(T.stop(),k.call("end",h))}function A(S){var E,D,F=s.length;S===void 0&&(S=1);for(var H=0;H<S;++H)for(p+=(l-p)*x,_.each(function(V){V(p)}),E=0;E<F;++E)(D=s[E]).fx==null?D.x+=D.vx*=w:(D.x=D.fx,D.vx=0),D.fy==null?D.y+=D.vy*=w:(D.y=D.fy,D.vy=0);return h}function I(){for(var S,E=0,D=s.length;E<D;++E){if((S=s[E]).index=E,S.fx!=null&&(S.x=S.fx),S.fy!=null&&(S.y=S.fy),isNaN(S.x)||isNaN(S.y)){var F=10*Math.sqrt(E),H=E*f;S.x=F*Math.cos(H),S.y=F*Math.sin(H)}(isNaN(S.vx)||isNaN(S.vy))&&(S.vx=S.vy=0)}}function P(S){return S.initialize&&S.initialize(s),S}return s==null&&(s=[]),I(),h={tick:A,restart:function(){return T.restart(L),h},stop:function(){return T.stop(),h},nodes:function(S){return arguments.length?(s=S,I(),_.each(P),h):s},alpha:function(S){return arguments.length?(p=+S,h):p},alphaMin:function(S){return arguments.length?(a=+S,h):a},alphaDecay:function(S){return arguments.length?(x=+S,h):+x},alphaTarget:function(S){return arguments.length?(l=+S,h):l},velocityDecay:function(S){return arguments.length?(w=1-S,h):1-w},force:function(S,E){return arguments.length>1?(E==null?_.remove(S):_.set(S,P(E)),h):_.get(S)},find:function(S,E,D){var F,H,V,Z,K,q=0,W=s.length;for(D==null?D=1/0:D*=D,q=0;q<W;++q)(V=(F=S-(Z=s[q]).x)*F+(H=E-Z.y)*H)<D&&(K=Z,D=V);return K},on:function(S,E){return arguments.length>1?(k.on(S,E),h):k.on(S)}}},g.forceX=function(s){var h,p,a,x=n(.1);function l(_){for(var T,k=0,L=h.length;k<L;++k)(T=h[k]).vx+=(a[k]-T.x)*p[k]*_}function w(){if(h){var _,T=h.length;for(p=new Array(T),a=new Array(T),_=0;_<T;++_)p[_]=isNaN(a[_]=+s(h[_],_,h))?0:+x(h[_],_,h)}}return typeof s!="function"&&(s=n(s==null?0:+s)),l.initialize=function(_){h=_,w()},l.strength=function(_){return arguments.length?(x=typeof _=="function"?_:n(+_),w(),l):x},l.x=function(_){return arguments.length?(s=typeof _=="function"?_:n(+_),w(),l):s},l},g.forceY=function(s){var h,p,a,x=n(.1);function l(_){for(var T,k=0,L=h.length;k<L;++k)(T=h[k]).vy+=(a[k]-T.y)*p[k]*_}function w(){if(h){var _,T=h.length;for(p=new Array(T),a=new Array(T),_=0;_<T;++_)p[_]=isNaN(a[_]=+s(h[_],_,h))?0:+x(h[_],_,h)}}return typeof s!="function"&&(s=n(s==null?0:+s)),l.initialize=function(_){h=_,w()},l.strength=function(_){return arguments.length?(x=typeof _=="function"?_:n(+_),w(),l):x},l.y=function(_){return arguments.length?(s=typeof _=="function"?_:n(+_),w(),l):s},l},Object.defineProperty(g,"__esModule",{value:!0})})},{"d3-collection":108,"d3-dispatch":110,"d3-quadtree":118,"d3-timer":123}],112:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=typeof globalThis<"u"?globalThis:g||self).d3=g.d3||{})}
20)(this,function(g){function m(h,p){if((a=(h=p?h.toExponential(p-1):h.toExponential()).indexOf("e"))<0)return null;var a,x=h.slice(0,a);return[x.length>1?x[0]+x.slice(2):x,+h.slice(a+1)]}function b(h){return(h=m(Math.abs(h)))?h[1]:NaN}var v,e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(h){if(!(p=e.exec(h)))throw new Error("invalid format: "+h);var p;return new t({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}function t(h){this.fill=h.fill===void 0?" ":h.fill+"",this.align=h.align===void 0?">":h.align+"",this.sign=h.sign===void 0?"-":h.sign+"",this.symbol=h.symbol===void 0?"":h.symbol+"",this.zero=!!h.zero,this.width=h.width===void 0?void 0:+h.width,this.comma=!!h.comma,this.precision=h.precision===void 0?void 0:+h.precision,this.trim=!!h.trim,this.type=h.type===void 0?"":h.type+""}function o(h,p){var a=m(h,p);if(!a)return h+"";var x=a[0],l=a[1];return l<0?"0."+new Array(-l).join("0")+x:x.length>l+1?x.slice(0,l+1)+"."+x.slice(l+1):x+new Array(l-x.length+2).join("0")}n.prototype=t.prototype,t.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var r={"%":function(h,p){return(100*h).toFixed(p)},b:function(h){return Math.round(h).toString(2)},c:function(h){return h+""},d:function(h){return Math.abs(h=Math.round(h))>=1e21?h.toLocaleString("en").replace(/,/g,""):h.toString(10)},e:function(h,p){return h.toExponential(p)},f:function(h,p){return h.toFixed(p)},g:function(h,p){return h.toPrecision(p)},o:function(h){return Math.round(h).toString(8)},p:function(h,p){return o(100*h,p)},r:o,s:function(h,p){var a=m(h,p);if(!a)return h+"";var x=a[0],l=a[1],w=l-(v=3*Math.max(-8,Math.min(8,Math.floor(l/3))))+1,_=x.length;return w===_?x:w>_?x+new Array(w-_+1).join("0"):w>0?x.slice(0,w)+"."+x.slice(w):"0."+new Array(1-w).join("0")+m(h,Math.max(0,p+w-1))[0]},X:function(h){return Math.round(h).toString(16).toUpperCase()},x:function(h){return Math.round(h).toString(16)}};function d(h){return h}var c,i=Array.prototype.map,u=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function f(h){var p,a,x=h.grouping===void 0||h.thousands===void 0?d:(p=i.call(h.grouping,Number),a=h.thousands+"",function(P,S){for(var E=P.length,D=[],F=0,H=p[0],V=0;E>0&&H>0&&(V+H+1>S&&(H=Math.max(1,S-V)),D.push(P.substring(E-=H,E+H)),!((V+=H+1)>S));)H=p[F=(F+1)%p.length];return D.reverse().join(a)}),l=h.currency===void 0?"":h.currency[0]+"",w=h.currency===void 0?"":h.currency[1]+"",_=h.decimal===void 0?".":h.decimal+"",T=h.numerals===void 0?d:function(P){return function(S){return S.replace(/[0-9]/g,function(E){return P[+E]})}}(i.call(h.numerals,String)),k=h.percent===void 0?"%":h.percent+"",L=h.minus===void 0?"-":h.minus+"",A=h.nan===void 0?"NaN":h.nan+"";function I(P){var S=(P=n(P)).fill,E=P.align,D=P.sign,F=P.symbol,H=P.zero,V=P.width,Z=P.comma,K=P.precision,q=P.trim,W=P.type;W==="n"?(Z=!0,W="g"):r[W]||(K===void 0&&(K=12),q=!0,W="g"),(H||S==="0"&&E==="=")&&(H=!0,S="0",E="=");var $=F==="$"?l:F==="#"&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",R=F==="$"?w:/[%p]/.test(W)?k:"",N=r[W],U=/[defgprs%]/.test(W);function Q(j){var X,J,re,ne=$,se=R;if(W==="c")se=N(j)+se,j="";else{var oe=(j=+j)<0||1/j<0;if(j=isNaN(j)?A:N(Math.abs(j),K),q&&(j=function(de){e:for(var xe,we=de.length,be=1,Ee=-1;be<we;++be)switch(de[be]){case".":Ee=xe=be;break;case"0":Ee===0&&(Ee=be),xe=be;break;default:if(!+de[be])break e;Ee>0&&(Ee=0)}return Ee>0?de.slice(0,Ee)+de.slice(xe+1):de}(j)),oe&&+j==0&&D!=="+"&&(oe=!1),ne=(oe?D==="("?D:L:D==="-"||D==="("?"":D)+ne,se=(W==="s"?u[8+v/3]:"")+se+(oe&&D==="("?")":""),U){for(X=-1,J=j.length;++X<J;)if(48>(re=j.charCodeAt(X))||re>57){se=(re===46?_+j.slice(X+1):j.slice(X))+se,j=j.slice(0,X);break}}}Z&&!H&&(j=x(j,1/0));var pe=ne.length+j.length+se.length,ce=pe<V?new Array(V-pe+1).join(S):"";switch(Z&&H&&(j=x(ce+j,ce.length?V-se.length:1/0),ce=""),E){case"<":j=ne+j+se+ce;break;case"=":j=ne+ce+j+se;break;case"^":j=ce.slice(0,pe=ce.length>>1)+ne+j+se+ce.slice(pe);break;default:j=ce+ne+j+se}return T(j)}return K=K===void 0?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,K)):Math.max(0,Math.min(20,K)),Q.toString=function(){return P+""},Q}return{format:I,formatPrefix:function(P,S){var E=I(((P=n(P)).type="f",P)),D=3*Math.max(-8,Math.min(8,Math.floor(b(S)/3))),F=Math.pow(10,-D),H=u[8+D/3];return function(V){return E(F*V)+H}}}}function s(h){return c=f(h),g.format=c.format,g.formatPrefix=c.formatPrefix,c}s({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),g.FormatSpecifier=t,g.formatDefaultLocale=s,g.formatLocale=f,g.formatSpecifier=n,g.precisionFixed=function(h){return Math.max(0,-b(Math.abs(h)))},g.precisionPrefix=function(h,p){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(b(p)/3)))-b(Math.abs(h)))},g.precisionRound=function(h,p){return h=Math.abs(h),p=Math.abs(p)-h,Math.max(0,b(p)-b(h))+1}
vendor: 14,258 bytes, line 20
20,Object.defineProperty(g,"__esModule",{value:!0})})},{}],113:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?m(te,y("d3-geo"),y("d3-array")):m(g.d3=g.d3||{},g.d3,g.d3)})(this,function(g,m,b){var v=Math.abs,e=Math.atan,n=Math.atan2,t=Math.cos,o=Math.exp,r=Math.floor,d=Math.log,c=Math.max,i=Math.min,u=Math.pow,f=Math.round,s=Math.sign||function(Ne){return Ne>0?1:Ne<0?-1:0},h=Math.sin,p=Math.tan,a=1e-6,x=Math.PI,l=x/2,w=x/4,_=Math.SQRT1_2,T=E(2),k=E(x),L=2*x,A=180/x,I=x/180;function P(Ne){return Ne>1?l:Ne<-1?-l:Math.asin(Ne)}function S(Ne){return Ne>1?0:Ne<-1?x:Math.acos(Ne)}function E(Ne){return Ne>0?Math.sqrt(Ne):0}function D(Ne){return(o(Ne)-o(-Ne))/2}function F(Ne){return(o(Ne)+o(-Ne))/2}function H(Ne){var He=p(Ne/2),$e=2*d(t(Ne/2))/(He*He);function at(mt,dt){var Mt=t(mt),Jt=t(dt),$t=h(dt),Wt=Jt*Mt,tr=-((1-Wt?d((1+Wt)/2)/(1-Wt):-.5)+$e/(1+Wt));return[tr*Jt*h(mt),tr*$t]}return at.invert=function(mt,dt){var Mt,Jt=E(mt*mt+dt*dt),$t=-Ne/2,Wt=50;if(!Jt)return[0,0];do{var tr=$t/2,ur=t(tr),mr=h(tr),yr=mr/ur,Pr=-d(v(ur));$t-=Mt=(2/yr*Pr-$e*yr-Jt)/(-Pr/(mr*mr)+1-$e/(2*ur*ur))*(ur<0?.7:1)}while(v(Mt)>a&&--Wt>0);var nn=h($t);return[n(mt*nn,Jt*t($t)),P(dt*nn/Jt)]},at}function V(Ne,He){var $e=t(He),at=function(mt){return mt?mt/Math.sin(mt):1}(S($e*t(Ne/=2)));return[2*$e*h(Ne)*at,h(He)*at]}function Z(Ne){var He=h(Ne),$e=t(Ne),at=Ne>=0?1:-1,mt=p(at*Ne),dt=(1+He-$e)/2;function Mt(Jt,$t){var Wt=t($t),tr=t(Jt/=2);return[(1+Wt)*h(Jt),(at*$t>-n(tr,mt)-.001?0:10*-at)+dt+h($t)*$e-(1+Wt)*He*tr]}return Mt.invert=function(Jt,$t){var Wt=0,tr=0,ur=50;do{var mr=t(Wt),yr=h(Wt),Pr=t(tr),nn=h(tr),dn=1+Pr,En=dn*yr-Jt,On=dt+nn*$e-dn*He*mr-$t,Un=dn*mr/2,zn=-yr*nn,ha=He*dn*yr/2,ba=$e*Pr+He*mr*nn,Oa=zn*ha-ba*Un,Ia=(On*zn-En*ba)/Oa/2,za=(En*ha-On*Un)/Oa;v(za)>2&&(za/=2),Wt-=Ia,tr-=za}while((v(Ia)>a||v(za)>a)&&--ur>0);return at*tr>-n(t(Wt),mt)-.001?[2*Wt,tr]:null},Mt}function K(Ne,He){var $e=p(He/2),at=E(1-$e*$e),mt=1+at*t(Ne/=2),dt=h(Ne)*at/mt,Mt=$e/mt,Jt=dt*dt,$t=Mt*Mt;return[4/3*dt*(3+Jt-3*$t),4/3*Mt*(3+3*Jt-$t)]}V.invert=function(Ne,He){if(!(Ne*Ne+4*He*He>x*x+a)){var $e=Ne,at=He,mt=25;do{var dt,Mt=h($e),Jt=h($e/2),$t=t($e/2),Wt=h(at),tr=t(at),ur=h(2*at),mr=Wt*Wt,yr=tr*tr,Pr=Jt*Jt,nn=1-yr*$t*$t,dn=nn?S(tr*$t)*E(dt=1/nn):dt=0,En=2*dn*tr*Jt-Ne,On=dn*Wt-He,Un=dt*(yr*Pr+dn*tr*$t*mr),zn=dt*(.5*Mt*ur-2*dn*Wt*Jt),ha=.25*dt*(ur*Jt-dn*Wt*yr*Mt),ba=dt*(mr*$t+dn*Pr*tr),Oa=zn*ha-ba*Un;if(!Oa)break;var Ia=(On*zn-En*ba)/Oa,za=(En*ha-On*Un)/Oa;$e-=Ia,at-=za}while((v(Ia)>a||v(za)>a)&&--mt>0);return[$e,at]}},K.invert=function(Ne,He){if(He*=3/8,!(Ne*=3/8)&&v(He)>1)return null;var $e=1+Ne*Ne+He*He,at=E(($e-E($e*$e-4*He*He))/2),mt=P(at)/3,dt=at?function(Wt){return d(Wt+E(Wt*Wt-1))}(v(He/at))/3:function(Wt){return d(Wt+E(Wt*Wt+1))}(v(Ne))/3,Mt=t(mt),Jt=F(dt),$t=Jt*Jt-Mt*Mt;return[2*s(Ne)*n(D(dt)*Mt,.25-$t),2*s(He)*n(Jt*h(mt),.25+$t)]};var q=E(8),W=d(1+T);function $(Ne,He){var $e=v(He);return $e<w?[Ne,d(p(w+He/2))]:[Ne*t($e)*(2*T-1/h($e)),s(He)*(2*T*($e-w)-d(p($e/2)))]}function R(Ne){var He=2*x/Ne;function $e(at,mt){var dt=m.geoAzimuthalEquidistantRaw(at,mt);if(v(at)>l){var Mt=n(dt[1],dt[0]),Jt=E(dt[0]*dt[0]+dt[1]*dt[1]),$t=He*f((Mt-l)/He)+l,Wt=n(h(Mt-=$t),2-t(Mt));Mt=$t+P(x/Jt*h(Wt))-Wt,dt[0]=Jt*t(Mt),dt[1]=Jt*h(Mt)}return dt}return $e.invert=function(at,mt){var dt=E(at*at+mt*mt);if(dt>l){var Mt=n(mt,at),Jt=He*f((Mt-l)/He)+l,$t=Mt>Jt?-1:1,Wt=dt*t(Jt-Mt),tr=1/p($t*S((Wt-x)/E(x*(x-2*Wt)+dt*dt)));Mt=Jt+2*e((tr+$t*E(tr*tr-3))/3),at=dt*t(Mt),mt=dt*h(Mt)}return m.geoAzimuthalEquidistantRaw.invert(at,mt)},$e}function N(Ne,He){if(arguments.length<2&&(He=Ne),He===1)return m.geoAzimuthalEqualAreaRaw;if(He===1/0)return U;function $e(at,mt){var dt=m.geoAzimuthalEqualAreaRaw(at/He,mt);return dt[0]*=Ne,dt}return $e.invert=function(at,mt){var dt=m.geoAzimuthalEqualAreaRaw.invert(at/Ne,mt);return dt[0]*=He,dt},$e}function U(Ne,He){return[Ne*t(He)/t(He/=2),2*h(He)]}function Q(Ne,He,$e){var at,mt,dt,Mt=100;$e=$e===void 0?0:+$e,He=+He;do(mt=Ne($e))===(dt=Ne($e+a))&&(dt=mt+a),$e-=at=-1*a*(mt-He)/(mt-dt);while(Mt-- >0&&v(at)>a);return Mt<0?NaN:$e}function j(Ne,He,$e){return He===void 0&&(He=40),$e===void 0&&($e=1e-12),function(at,mt,dt,Mt){var Jt,$t,Wt;dt=dt===void 0?0:+dt,Mt=Mt===void 0?0:+Mt;for(var tr=0;tr<He;tr++){var ur=Ne(dt,Mt),mr=ur[0]-at,yr=ur[1]-mt;if(v(mr)<$e&&v(yr)<$e)break;var Pr=mr*mr+yr*yr;if(Pr>Jt)dt-=$t/=2,Mt-=Wt/=2;else{Jt=Pr;var nn=(dt>0?-1:1)*$e,dn=(Mt>0?-1:1)*$e,En=Ne(dt+nn,Mt),On=Ne(dt,Mt+dn),Un=(En[0]-ur[0])/nn,zn=(En[1]-ur[1])/nn,ha=(On[0]-ur[0])/dn,ba=(On[1]-ur[1])/dn,Oa=ba*Un-zn*ha,Ia=(v(Oa)<.5?.5:1)/Oa;if(dt+=$t=(yr*ha-mr*ba)*Ia,Mt+=Wt=(mr*zn-yr*Un)*Ia,v($t)<$e&&v(Wt)<$e)break}}return[dt,Mt]}}function X(){var Ne=N(1.68,2);function He($e,at){if($e+at<-1.4){var mt=($e-at+1.6)*($e+at+1.4)/8;$e+=mt,at-=.8*mt*h(at+x/2)}var dt=Ne($e,at),Mt=(1-t($e*at))/12;return dt[1]<0&&(dt[0]*=1+Mt),dt[1]>0&&(dt[1]*=1+Mt/1.5*dt[0]*dt[0]),dt}return He.invert=j(He),He}function J(Ne,He){var $e,at=Ne*h(He),mt=30;do He-=$e=(He+h(He)-at)/(1+t(He));while(v($e)>a&&--mt>0);return He/2}function re(Ne,He,$e){function at(mt,dt){return[Ne*mt*t(dt=J($e,dt)),He*h(dt)]}return at.invert=function(mt,dt){return dt=P(dt/He),[mt/(Ne*t(dt)),P((2*dt+h(2*dt))/$e)]},at}$.invert=function(Ne,He){if((at=v(He))<W)return[Ne,2*e(o(He))-l];var $e,at,mt=w,dt=25;do{var Mt=t(mt/2),Jt=p(mt/2);mt-=$e=(q*(mt-w)-d(Jt)-at)/(q-Mt*Mt/(2*Jt))}while(v($e)>1e-12&&--dt>0);return[Ne/(t(mt)*(q-1/h(mt))),s(He)*mt]},U.invert=function(Ne,He){var $e=2*P(He/2);return[Ne*t($e/2)/t($e),$e]};var ne=re(T/l,T,x),se=2.00276,oe=1.11072;function pe(Ne,He){var $e=J(x,He);return[se*Ne/(1/t(He)+oe/t($e)),(He+T*h($e))/se]}function ce(Ne){var He=0,$e=m.geoProjectionMutator(Ne),at=$e(He);return at.parallel=function(mt){return arguments.length?$e(He=mt*I):He*A},at}function de(Ne,He){return[Ne*t(He),He]}function xe(Ne){if(!Ne)return de;var He=1/p(Ne);function $e(at,mt){var dt=He+Ne-mt,Mt=dt&&at*t(mt)/dt;return[dt*h(Mt),He-dt*t(Mt)]}return $e.invert=function(at,mt){var dt=E(at*at+(mt=He-mt)*mt),Mt=He+Ne-dt;return[dt/t(Mt)*n(at,mt),Mt]},$e}function we(Ne){function He($e,at){var mt=l-at,dt=mt&&$e*Ne*h(mt)/mt;return[mt*h(dt)/Ne,l-mt*t(dt)]}return He.invert=function($e,at){var mt=$e*Ne,dt=l-at,Mt=E(mt*mt+dt*dt),Jt=n(mt,dt);return[(Mt?Mt/h(Mt):1)*Jt/Ne,l-Mt]},He}pe.invert=function(Ne,He){var $e,at,mt=se*He,dt=He<0?-w:w,Mt=25;do at=mt-T*h(dt),dt-=$e=(h(2*dt)+2*dt-x*h(at))/(2*t(2*dt)+2+x*t(at)*T*t(dt));while(v($e)>a&&--Mt>0);return at=mt-T*h(dt),[Ne*(1/t(at)+oe/t(dt))/se,at]},de.invert=function(Ne,He){return[Ne/t(He),He]};var be=re(1,4/x,x);function Ee(Ne,He,$e,at,mt,dt){var Mt,Jt=t(dt);if(v(Ne)>1||v(dt)>1)Mt=S($e*mt+He*at*Jt);else{var $t=h(Ne/2),Wt=h(dt/2);Mt=2*P(E($t*$t+He*at*Wt*Wt))}return v(Mt)>a?[Mt,n(at*h(dt),He*mt-$e*at*Jt)]:[0,0]}function fe(Ne,He,$e){return S((Ne*Ne+He*He-$e*$e)/(2*Ne*He))}function me(Ne){return Ne-2*x*r((Ne+x)/(2*x))}function Te(Ne,He,$e){for(var at,mt=[[Ne[0],Ne[1],h(Ne[1]),t(Ne[1])],[He[0],He[1],h(He[1]),t(He[1])],[$e[0],$e[1],h($e[1]),t($e[1])]],dt=mt[2],Mt=0;Mt<3;++Mt,dt=at)at=mt[Mt],dt.v=Ee(at[1]-dt[1],dt[3],dt[2],at[3],at[2],at[0]-dt[0]),dt.point=[0,0];var Jt=fe(mt[0].v[0],mt[2].v[0],mt[1].v[0]),$t=fe(mt[0].v[0],mt[1].v[0],mt[2].v[0]),Wt=x-Jt;mt[2].point[1]=0,mt[0].point[0]=-(mt[1].point[0]=mt[0].v[0]/2);var tr=[mt[2].point[0]=mt[0].point[0]+mt[2].v[0]*t(Jt),2*(mt[0].point[1]=mt[1].point[1]=mt[2].v[0]*h(Jt))];return function(ur,mr){var yr,Pr=h(mr),nn=t(mr),dn=new Array(3);for(yr=0;yr<3;++yr){var En=mt[yr];if(dn[yr]=Ee(mr-En[1],En[3],En[2],nn,Pr,ur-En[0]),!dn[yr][0])return En.point;dn[yr][1]=me(dn[yr][1]-En.v[1])}var On=tr.slice();for(yr=0;yr<3;++yr){var Un=yr==2?0:yr+1,zn=fe(mt[yr].v[0],dn[yr][0],dn[Un][0]);dn[yr][1]<0&&(zn=-zn),yr?yr==1?(zn=$t-zn,On[0]-=dn[yr][0]*t(zn),On[1]-=dn[yr][0]*h(zn)):(zn=Wt-zn,On[0]+=dn[yr][0]*t(zn),On[1]+=dn[yr][0]*h(zn)):(On[0]+=dn[yr][0]*t(zn),On[1]-=dn[yr][0]*h(zn))}return On[0]/=3,On[1]/=3,On}}function _e(Ne){return Ne[0]*=I,Ne[1]*=I,Ne}function Ae(Ne,He,$e){var at=m.geoCentroid({type:"MultiPoint",coordinates:[Ne,He,$e]}),mt=[-at[0],-at[1]],dt=m.geoRotation(mt),Mt=Te(_e(dt(Ne)),_e(dt(He)),_e(dt($e)));Mt.invert=j(Mt);var Jt=m.geoProjection(Mt).rotate(mt),$t=Jt.center;return delete Jt.rotate,Jt.center=function(Wt){return arguments.length?$t(dt(Wt)):dt.invert($t())},Jt.clipAngle(90)}function Pe(Ne,He){var $e=E(1-h(He));return[2/k*Ne*$e,k*(1-$e)]}function De(Ne){var He=p(Ne);function $e(at,mt){return[at,(at?at/h(at):1)*(h(mt)*t(at)-He*t(mt))]}return $e.invert=He?function(at,mt){at&&(mt*=h(at)/at);var dt=t(at);return[at,2*n(E(dt*dt+He*He-mt*mt)-dt,He-mt)]}:function(at,mt){return[at,P(at?mt*p(at)/at:mt)]},$e}Pe.invert=function(Ne,He){var $e=($e=He/k-1)*$e;return[$e>0?Ne*E(x/$e)/2:0,P(1-$e)]};var Ve=E(3);function Qe(Ne,He){return[Ve*Ne*(2*t(2*He/3)-1)/k,Ve*k*h(He/3)]}function Oe(Ne){var He=t(Ne);function $e(at,mt){return[at*He,h(mt)/He]}return $e.invert=function(at,mt){return[at/He,P(mt*He)]},$e}function Ue(Ne){var He=t(Ne);function $e(at,mt){return[at*He,(1+He)*p(mt/2)]}return $e.invert=function(at,mt){return[at/He,2*e(mt/(1+He))]},$e}function Ge(Ne,He){var $e=E(8/(3*x));return[$e*Ne*(1-v(He)/x),$e*He]}function Ye(Ne,He){var $e=E(4-3*h(v(He)));return[2/E(6*x)*Ne*$e,s(He)*E(2*x/3)*(2-$e)]}function tt(Ne,He){var $e=E(x*(4+x));return[2/$e*Ne*(1+E(1-4*He*He/(x*x))),4/$e*He]}function lt(Ne,He){var $e=(2+l)*h(He);He/=2;for(var at=0,mt=1/0;at<10&&v(mt)>a;at++){var dt=t(He);He-=mt=(He+h(He)*(dt+2)-$e)/(2*dt*(1+dt))}return[2/E(x*(4+x))*Ne*(1+t(He)),2*E(x/(4+x))*h(He)]}function vt(Ne,He){return[Ne*(1+t(He))/E(2+x),2*He/E(2+x)]}function It(Ne,He){for(var $e=(1+l)*h(He),at=0,mt=1/0;at<10&&v(mt)>a;at++)He-=mt=(He+h(He)-$e)/(1+t(He));return $e=E(2+x),[Ne*(1+t(He))/$e,2*He/$e]}Qe.invert=function(Ne,He){var $e=3*P(He/(Ve*k));return[k*Ne/(Ve*(2*t(2*$e/3)-1)),$e]},Ge.invert=function(Ne,He){var $e=E(8/(3*x)),at=He/$e;return[Ne/($e*(1-v(at)/x)),at]},Ye.invert=function(Ne,He){var $e=2-v(He)/E(2*x/3);return[Ne*E(6*x)/(2*$e),s(He)*P((4-$e*$e)/3)]},tt.invert=function(Ne,He){var $e=E(x*(4+x))/2;return[Ne*$e/(1+E(1-He*He*(4+x)/(4*x))),He*$e/2]},lt.invert=function(Ne,He){var $e=He*E((4+x)/x)/2,at=P($e),mt=t(at);return[Ne/(2/E(x*(4+x))*(1+mt)),P((at+$e*(mt+2))/(2+l))]},vt.invert=function(Ne,He){var $e=E(2+x),at=He*$e/2;return[$e*Ne/(1+t(at)),at]},It.invert=function(Ne,He){var $e=1+l,at=E($e/2);return[2*Ne*at/(1+t(He*=at)),P((He+h(He))/$e)]};var St=3+2*T;function rt(Ne,He){var $e=h(Ne/=2),at=t(Ne),mt=E(t(He)),dt=t(He/=2),Mt=h(He)/(dt+T*at*mt),Jt=E(2/(1+Mt*Mt)),$t=E((T*dt+(at+$e)*mt)/(T*dt+(at-$e)*mt));return[St*(Jt*($t-1/$t)-2*d($t)),St*(Jt*Mt*($t+1/$t)-2*e(Mt))]}rt.invert=function(Ne,He){if(!($e=K.invert(Ne/1.2,1.065*He)))return null;var $e,at=$e[0],mt=$e[1],dt=20;Ne/=St,He/=St;do{var Mt=at/2,Jt=mt/2,$t=h(Mt),Wt=t(Mt),tr=h(Jt),ur=t(Jt),mr=t(mt),yr=E(mr),Pr=tr/(ur+T*Wt*yr),nn=Pr*Pr,dn=E(2/(1+nn)),En=(T*ur+(Wt+$t)*yr)/(T*ur+(Wt-$t)*yr),On=E(En),Un=On-1/On,zn=On+1/On,ha=dn*Un-2*d(On)-Ne,ba=dn*Pr*zn-2*e(Pr)-He,Oa=tr&&_*yr*$t*nn/tr,Ia=(T*Wt*ur+yr)/(2*(ur+T*Wt*yr)*(ur+T*Wt*yr)*yr),za=-.5*Pr*dn*dn*dn,vi=za*Oa,pi=za*Ia,ti=(ti=2*ur+T*yr*(Wt-$t))*ti*On,ri=(T*Wt*ur*yr+mr)/ti,di=-T*$t*tr/(yr*ti),Oi=Un*vi-2*ri/On+dn*(ri+ri/En),Wi=Un*pi-2*di/On+dn*(di+di/En),Zi=Pr*zn*vi-2*Oa/(1+nn)+dn*zn*Oa+dn*Pr*(ri-ri/En),Xi=Pr*zn*pi-2*Ia/(1+nn)+dn*zn*Ia+dn*Pr*(di-di/En),Ji=Wi*Zi-Xi*Oi;if(!Ji)break;var Ea=(ba*Wi-ha*Xi)/Ji,ft=(ha*Zi-ba*Oi)/Ji;at-=Ea,mt=c(-l,i(l,mt-ft))}while((v(Ea)>a||v(ft)>a)&&--dt>0);return v(v(mt)-l)<a?[0,mt]:dt&&[at,mt]};var et=t(35*I);function Tt(Ne,He){var $e=p(He/2);return[Ne*et*E(1-$e*$e),(1+et)*$e]}function Vt(Ne,He){var $e=He/2,at=t($e);return[2*Ne/k*t(He)*at*at,k*p($e)]}function Kt(Ne){var He=1-Ne,$e=mt(x,0)[0]-mt(-x,0)[0],at=E(2*(mt(0,l)[1]-mt(0,-l)[1])/$e);function mt(Jt,$t){var Wt=t($t),tr=h($t);return[Wt/(He+Ne*Wt)*Jt,He*$t+Ne*tr]}function dt(Jt,$t){var Wt=mt(Jt,$t);return[Wt[0]*at,Wt[1]/at]}function Mt(Jt){return dt(0,Jt)[1]}return dt.invert=function(Jt,$t){var Wt=Q(Mt,$t);return[Jt/at*(Ne+He/t(Wt)),Wt]},dt}function Be(Ne){return[Ne[0]/2,P(p(Ne[1]/2*I))*A]}function qe(Ne){return[2*Ne[0],2*e(h(Ne[1]*I))*A]}function Re(Ne,He){var $e=2*x/He,at=Ne*Ne;function mt(dt,Mt){var Jt=m.geoAzimuthalEquidistantRaw(dt,Mt),$t=Jt[0],Wt=Jt[1],tr=$t*$t+Wt*Wt;if(tr>at){var ur=E(tr),mr=n(Wt,$t),yr=$e*f(mr/$e),Pr=mr-yr,nn=Ne*t(Pr),dn=(Ne*h(Pr)-Pr*h(nn))/(l-nn),En=Xe(Pr,dn),On=(x-Ne)/ke(En,nn,x);$t=ur;var Un,zn=50;do $t-=Un=(Ne+ke(En,nn,$t)*On-ur)/(En($t)*On);while(v(Un)>a&&--zn>0);Wt=Pr*h($t),$t<l&&(Wt-=dn*($t-l));var ha=h(yr),ba=t(yr);Jt[0]=$t*ba-Wt*ha,Jt[1]=$t*ha+Wt*ba}return Jt}return mt.invert=function(dt,Mt){var Jt=dt*dt+Mt*Mt;if(Jt>at){var $t=E(Jt),Wt=n(Mt,dt),tr=$e*f(Wt/$e),ur=Wt-tr;dt=$t*t(ur),Mt=$t*h(ur);for(var mr=dt-l,yr=h(dt),Pr=Mt/yr,nn=dt<l?1/0:0,dn=10;;){var En=Ne*h(Pr),On=Ne*t(Pr),Un=h(On),zn=l-On,ha=(En-Pr*Un)/zn,ba=Xe(Pr,ha);if(v(nn)<1e-12||!--dn)break;Pr-=nn=(Pr*yr-ha*mr-Mt)/(yr-2*mr*(zn*(On+Pr*En*t(On)-Un)-En*(En-Pr*Un))/(zn*zn))}dt=($t=Ne+ke(ba,On,dt)*(x-Ne)/ke(ba,On,x))*t(Wt=tr+Pr),Mt=$t*h(Wt)}return m.geoAzimuthalEquidistantRaw.invert(dt,Mt)},mt}function Xe(Ne,He){return function($e){var at=Ne*t($e);return $e<l&&(at-=He),E(1+at*at)}}function ke(Ne,He,$e){for(var at=($e-He)/50,mt=Ne(He)+Ne($e),dt=1,Mt=He;dt<50;++dt)mt+=2*Ne(Mt+=at);return .5*mt*at}function Le(Ne,He,$e,at,mt,dt,Mt,Jt){function $t(Wt,tr){if(!tr)return[Ne*Wt/x,0];var ur=tr*tr,mr=Ne+ur*(He+ur*($e+ur*at)),yr=tr*(mt-1+ur*(dt-Jt+ur*Mt)),Pr=(mr*mr+yr*yr)/(2*yr),nn=Wt*P(mr/Pr)/x;return[Pr*h(nn),tr*(1+ur*Jt)+Pr*(1-t(nn))]}return arguments.length<8&&(Jt=0),$t.invert=function(Wt,tr){var ur,mr,yr=x*Wt/Ne,Pr=tr,nn=50;do{var dn=Pr*Pr,En=Ne+dn*(He+dn*($e+dn*at)),On=Pr*(mt-1+dn*(dt-Jt+dn*Mt)),Un=En*En+On*On,zn=2*On,ha=Un/zn,ba=ha*ha,Oa=P(En/ha)/x,Ia=yr*Oa,za=En*En,vi=(2*He+dn*(4*$e+6*dn*at))*Pr,pi=mt+dn*(3*dt+5*dn*Mt),ti=(2*(En*vi+On*(pi-1))*zn-Un*(2*(pi-1)))/(zn*zn),ri=t(Ia),di=h(Ia),Oi=ha*ri,Wi=ha*di,Zi=yr/x*(1/E(1-za/ba))*(vi*ha-En*ti)/ba,Xi=Wi-Wt,Ji=Pr*(1+dn*Jt)+ha-Oi-tr,Ea=ti*di+Oi*Zi,ft=Oi*Oa,Rt=1+ti-(ti*ri-Wi*Zi),nr=Wi*Oa,Ht=Ea*nr-Rt*ft;if(!Ht)break;yr-=ur=(Ji*Ea-Xi*Rt)/Ht,Pr-=mr=(Xi*nr-Ji*ft)/Ht}while((v(ur)>a||v(mr)>a)&&--nn>0);return[yr,Pr]},$t}Tt.invert=function(Ne,He){var $e=He/(1+et);return[Ne&&Ne/(et*E(1-$e*$e)),2*e($e)]},Vt.invert=function(Ne,He){var $e=e(He/k),at=t($e),mt=2*$e;return[Ne*k/2/(t(mt)*at*at),mt]};
vendor: 4,588 bytes, line 20
20var Ie=Le(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),Ce=Le(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),Je=Le(5/6*x,-.62636,-.0344,0,1.3493,-.05524,0,.045);function it(Ne,He){var $e=Ne*Ne,at=He*He;return[Ne*(1-.162388*at)*(.87-952426e-9*$e*$e),He*(1+at/12)]}it.invert=function(Ne,He){var $e,at=Ne,mt=He,dt=50;do{var Mt=mt*mt;mt-=$e=(mt*(1+Mt/12)-He)/(1+Mt/4)}while(v($e)>a&&--dt>0);dt=50,Ne/=1-.162388*Mt;do{var Jt=(Jt=at*at)*Jt;at-=$e=(at*(.87-952426e-9*Jt)-Ne)/(.87-.00476213*Jt)}while(v($e)>a&&--dt>0);return[at,mt]};var ht=Le(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function ut(Ne){var He=Ne(l,0)[0]-Ne(-l,0)[0];function $e(at,mt){var dt=at>0?-.5:.5,Mt=Ne(at+dt*x,mt);return Mt[0]-=dt*He,Mt}return Ne.invert&&($e.invert=function(at,mt){var dt=at>0?-.5:.5,Mt=Ne.invert(at+dt*He,mt),Jt=Mt[0]-dt*x;return Jt<-x?Jt+=2*x:Jt>x&&(Jt-=2*x),Mt[0]=Jt,Mt}),$e}function kt(Ne,He){var $e=s(Ne),at=s(He),mt=t(He),dt=t(Ne)*mt,Mt=h(Ne)*mt,Jt=h(at*He);Ne=v(n(Mt,Jt)),He=P(dt),v(Ne-l)>a&&(Ne%=l);var $t=function(Wt,tr){if(tr===l)return[0,0];var ur,mr,yr=h(tr),Pr=yr*yr,nn=Pr*Pr,dn=1+nn,En=1+3*nn,On=1-nn,Un=P(1/E(dn)),zn=On+Pr*dn*Un,ha=(1-yr)/zn,ba=E(ha),Oa=ha*dn,Ia=E(Oa),za=ba*On;if(Wt===0)return[0,-(za+Pr*Ia)];var vi,pi=t(tr),ti=1/pi,ri=2*yr*pi,di=(-zn*pi-(-3*Pr+Un*En)*ri*(1-yr))/(zn*zn),Oi=-ti*ri,Wi=-ti*(Pr*dn*di+ha*En*ri),Zi=-2*ti*(On*(.5*di/ba)-2*Pr*ba*ri),Xi=4*Wt/x;if(Wt>.222*x||tr<x/4&&Wt>.175*x){if(ur=(za+Pr*E(Oa*(1+nn)-za*za))/(1+nn),Wt>x/4)return[ur,ur];var Ji=ur,Ea=.5*ur;ur=.5*(Ea+Ji),mr=50;do{var ft=E(Oa-ur*ur),Rt=ur*(Zi+Oi*ft)+Wi*P(ur/Ia)-Xi;if(!Rt)break;Rt<0?Ea=ur:Ji=ur,ur=.5*(Ea+Ji)}while(v(Ji-Ea)>a&&--mr>0)}else{ur=a,mr=25;do{var nr=ur*ur,Ht=E(Oa-nr),ir=Zi+Oi*Ht,Lr=ur*ir+Wi*P(ur/Ia)-Xi,Dr=ir+(Wi-Oi*nr)/Ht;ur-=vi=Ht?Lr/Dr:0}while(v(vi)>a&&--mr>0)}return[ur,-za-Pr*E(Oa-ur*ur)]}(Ne>x/4?l-Ne:Ne,He);return Ne>x/4&&(Jt=$t[0],$t[0]=-$t[1],$t[1]=-Jt),$t[0]*=$e,$t[1]*=-at,$t}function ot(Ne,He){var $e,at,mt,dt,Mt,Jt;if(He<a)return[(dt=h(Ne))-($e=He*(Ne-dt*(at=t(Ne)))/4)*at,at+$e*dt,1-He*dt*dt/2,Ne-$e];if(He>=1-a)return $e=(1-He)/4,mt=1/(at=F(Ne)),[(dt=((Jt=o(2*(Jt=Ne)))-1)/(Jt+1))+$e*((Mt=at*D(Ne))-Ne)/(at*at),mt-$e*dt*mt*(Mt-Ne),mt+$e*dt*mt*(Mt+Ne),2*e(o(Ne))-l+$e*(Mt-Ne)/at];var $t=[1,0,0,0,0,0,0,0,0],Wt=[E(He),0,0,0,0,0,0,0,0],tr=0;for(at=E(1-He),Mt=1;v(Wt[tr]/$t[tr])>a&&tr<8;)$e=$t[tr++],Wt[tr]=($e-at)/2,$t[tr]=($e+at)/2,at=E($e*at),Mt*=2;mt=Mt*$t[tr]*Ne;do mt=(P(dt=Wt[tr]*h(at=mt)/$t[tr])+mt)/2;while(--tr);return[h(mt),dt=t(mt),dt/t(mt-at),mt]}function Lt(Ne,He){if(!He)return Ne;if(He===1)return d(p(Ne/2+w));for(var $e=1,at=E(1-He),mt=E(He),dt=0;v(mt)>a;dt++){if(Ne%x){var Mt=e(at*p(Ne)/$e);Mt<0&&(Mt+=x),Ne+=Mt+~~(Ne/x)*x}else Ne+=Ne;mt=($e+at)/2,at=E($e*at),mt=(($e=mt)-at)/2}return Ne/(u(2,dt)*$e)}function Et(Ne,He){var $e=(T-1)/(T+1),at=E(1-$e*$e),mt=Lt(l,at*at),dt=d(p(x/4+v(He)/2)),Mt=o(-1*dt)/E($e),Jt=function(Wt,tr){var ur=Wt*Wt,mr=tr+1,yr=1-ur-tr*tr;return[.5*((Wt>=0?l:-l)-n(yr,2*Wt)),-.25*d(yr*yr+4*ur)+.5*d(mr*mr+ur)]}(Mt*t(-1*Ne),Mt*h(-1*Ne)),$t=function(Wt,tr,ur){var mr=v(Wt),yr=D(v(tr));if(mr){var Pr=1/h(mr),nn=1/(p(mr)*p(mr)),dn=-(nn+ur*(yr*yr*Pr*Pr)-1+ur),En=(-dn+E(dn*dn-4*((ur-1)*nn)))/2;return[Lt(e(1/E(En)),ur)*s(Wt),Lt(e(E((En/nn-1)/ur)),1-ur)*s(tr)]}return[0,Lt(e(yr),1-ur)*s(tr)]}(Jt[0],Jt[1],at*at);return[-$t[1],(He>=0?1:-1)*(.5*mt-$t[0])]}function Ze(Ne){var He=h(Ne),$e=t(Ne),at=pt(Ne);function mt(dt,Mt){var Jt=at(dt,Mt);dt=Jt[0],Mt=Jt[1];var $t=h(Mt),Wt=t(Mt),tr=t(dt),ur=S(He*$t+$e*Wt*tr),mr=h(ur),yr=v(mr)>a?ur/mr:1;return[yr*$e*h(dt),(v(dt)>l?yr:-yr)*(He*Wt-$e*$t*tr)]}return at.invert=pt(-Ne),mt.invert=function(dt,Mt){var Jt=E(dt*dt+Mt*Mt),$t=-h(Jt),Wt=t(Jt),tr=Jt*Wt,ur=-Mt*$t,mr=Jt*He,yr=E(tr*tr+ur*ur-mr*mr),Pr=n(tr*mr+ur*yr,ur*mr-tr*yr),nn=(Jt>l?-1:1)*n(dt*$t,Jt*t(Pr)*Wt+Mt*h(Pr)*$t);return at.invert(nn,Pr)},mt}function pt(Ne){var He=h(Ne),$e=t(Ne);return function(at,mt){var dt=t(mt),Mt=t(at)*dt,Jt=h(at)*dt,$t=h(mt);return[n(Jt,Mt*$e-$t*He),P($t*$e+Mt*He)]}}kt.invert=function(Ne,He){v(Ne)>1&&(Ne=2*s(Ne)-Ne),v(He)>1&&(He=2*s(He)-He);var $e=s(Ne),at=s(He),mt=-$e*Ne,dt=-at*He,Mt=dt/mt<1,Jt=function(ur,mr){for(var yr=0,Pr=1,nn=.5,dn=50;;){var En=nn*nn,On=E(nn),Un=P(1/E(1+En)),zn=1-En+nn*(1+En)*Un,ha=(1-On)/zn,ba=E(ha),Oa=ha*(1+En),Ia=ba*(1-En),za=E(Oa-ur*ur),vi=mr+Ia+nn*za;if(v(Pr-yr)<1e-12||--dn==0||vi===0)break;vi>0?yr=nn:Pr=nn,nn=.5*(yr+Pr)}if(!dn)return null;var pi=P(On),ti=t(pi),ri=1/ti,di=2*On*ti,Oi=(-zn*ti-(-3*nn+Un*(1+3*En))*di*(1-On))/(zn*zn);return[x/4*(ur*(-2*ri*(.5*Oi/ba*(1-En)-2*nn*ba*di)+-ri*di*za)+-ri*(nn*(1+En)*Oi+ha*(1+3*En)*di)*P(ur/E(Oa))),pi]}
vendor: 17,004 bytes, line 20
20(Mt?dt:mt,Mt?mt:dt),$t=Jt[0],Wt=Jt[1],tr=t(Wt);return Mt&&($t=-l-$t),[$e*(n(h($t)*tr,-h(Wt))+x),at*P(t($t)*tr)]},Et.invert=function(Ne,He){var $e,at,mt,dt,Mt,Jt,$t=(T-1)/(T+1),Wt=E(1-$t*$t),tr=Lt(l,Wt*Wt),ur=(at=-Ne,mt=Wt*Wt,($e=.5*tr-He)?(dt=ot($e,mt),at?(Jt=(Mt=ot(at,1-mt))[1]*Mt[1]+mt*dt[0]*dt[0]*Mt[0]*Mt[0],[[dt[0]*Mt[2]/Jt,dt[1]*dt[2]*Mt[0]*Mt[1]/Jt],[dt[1]*Mt[1]/Jt,-dt[0]*dt[2]*Mt[0]*Mt[2]/Jt],[dt[2]*Mt[1]*Mt[2]/Jt,-mt*dt[0]*dt[1]*Mt[0]/Jt]]):[[dt[0],0],[dt[1],0],[dt[2],0]]):[[0,(Mt=ot(at,1-mt))[0]/Mt[1]],[1/Mt[1],0],[Mt[2]/Mt[1],0]]),mr=function(yr,Pr){var nn=Pr[0]*Pr[0]+Pr[1]*Pr[1];return[(yr[0]*Pr[0]+yr[1]*Pr[1])/nn,(yr[1]*Pr[0]-yr[0]*Pr[1])/nn]}(ur[0],ur[1]);return[n(mr[1],mr[0])/-1,2*e(o(-.5*d($t*mr[0]*mr[0]+$t*mr[1]*mr[1])))-l]};var Ct=P(1-1/3)*A,zt=Oe(0);function Gt(Ne){var He=Ct*I,$e=Pe(x,He)[0]-Pe(-x,He)[0],at=zt(0,He)[1],mt=Pe(0,He)[1],dt=k-mt,Mt=L/Ne,Jt=4/L,$t=at+dt*dt*4/L;function Wt(tr,ur){var mr,yr=v(ur);if(yr>He){var Pr=i(Ne-1,c(0,r((tr+x)/Mt)));(mr=Pe(tr+=x*(Ne-1)/Ne-Pr*Mt,yr))[0]=mr[0]*L/$e-L*(Ne-1)/(2*Ne)+Pr*L/Ne,mr[1]=at+4*(mr[1]-mt)*dt/L,ur<0&&(mr[1]=-mr[1])}else mr=zt(tr,ur);return mr[0]*=Jt,mr[1]/=$t,mr}return Wt.invert=function(tr,ur){tr/=Jt;var mr=v(ur*=$t);if(mr>at){var yr=i(Ne-1,c(0,r((tr+x)/Mt)));tr=(tr+x*(Ne-1)/Ne-yr*Mt)*$e/L;var Pr=Pe.invert(tr,.25*(mr-at)*L/dt+mt);return Pr[0]-=x*(Ne-1)/Ne-yr*Mt,ur<0&&(Pr[1]=-Pr[1]),Pr}return zt.invert(tr,ur)},Wt}function ze(Ne,He){return[Ne,1&He?90-a:Ct]}function st(Ne,He){return[Ne,1&He?-90+a:-Ct]}function yt(Ne){return[Ne[0]*(1-a),Ne[1]]}function Dt(Ne){var He,$e=1+Ne,at=P(h(1/$e)),mt=2*E(x/(He=x+4*at*$e)),dt=.5*mt*($e+E(Ne*(2+Ne))),Mt=Ne*Ne,Jt=$e*$e;function $t(Wt,tr){var ur,mr,yr=1-h(tr);if(yr&&yr<2){var Pr,nn=l-tr,dn=25;do{var En=h(nn),On=t(nn),Un=at+n(En,$e-On),zn=1+Jt-2*$e*On;nn-=Pr=(nn-Mt*at-$e*En+zn*Un-.5*yr*He)/(2*$e*En*Un)}while(v(Pr)>1e-12&&--dn>0);ur=mt*E(zn),mr=Wt*Un/x}else ur=mt*(Ne+yr),mr=Wt*at/x;return[ur*h(mr),dt-ur*t(mr)]}return $t.invert=function(Wt,tr){var ur=Wt*Wt+(tr-=dt)*tr,mr=(1+Jt-ur/(mt*mt))/(2*$e),yr=S(mr),Pr=h(yr),nn=at+n(Pr,$e-mr);return[P(Wt/E(ur))*x/nn,P(1-2*(yr-Mt*at-$e*Pr+(1+Jt-2*$e*mr)*nn)/He)]},$t}function jt(Ne,He){return He>-.7109889596207567?((Ne=ne(Ne,He))[1]+=.0528035274542,Ne):de(Ne,He)}function or(Ne,He){return v(He)>.7109889596207567?((Ne=ne(Ne,He))[1]-=He>0?.0528035274542:-.0528035274542,Ne):de(Ne,He)}function Ut(Ne,He,$e,at){var mt=E(4*x/(2*$e+(1+Ne-He/2)*h(2*$e)+(Ne+He)/2*h(4*$e)+He/2*h(6*$e))),dt=E(at*h($e)*E((1+Ne*t(2*$e)+He*t(4*$e))/(1+Ne+He))),Mt=$e*$t(1);function Jt(ur){return E(1+Ne*t(2*ur)+He*t(4*ur))}function $t(ur){var mr=ur*$e;return(2*mr+(1+Ne-He/2)*h(2*mr)+(Ne+He)/2*h(4*mr)+He/2*h(6*mr))/$e}function Wt(ur){return Jt(ur)*h(ur)}var tr=function(ur,mr){var yr=$e*Q($t,Mt*h(mr)/$e,mr/x);isNaN(yr)&&(yr=$e*s(mr));var Pr=mt*Jt(yr);return[Pr*dt*ur/x*t(yr),Pr/dt*h(yr)]};return tr.invert=function(ur,mr){var yr=Q(Wt,mr*dt/mt);return[ur*x/(t(yr)*mt*dt*Jt(yr)),P($e*$t(yr/$e)/Mt)]},$e===0&&(mt=E(at/x),(tr=function(ur,mr){return[ur*mt,h(mr)/mt]}).invert=function(ur,mr){return[ur/mt,P(mr*mt)]}),tr}function Xt(Ne,He,$e,at,mt){mt===void 0&&(mt=20);var dt=Ne(He),Mt=Ne(.5*(He+$e)),Jt=Ne($e);return function $t(Wt,tr,ur,mr,yr,Pr,nn,dn,En,On,Un){if(Un.nanEncountered)return NaN;var zn,ha,ba,Oa,Ia,za,vi,pi,ti,ri;if(ha=Wt(tr+.25*(zn=ur-tr)),ba=Wt(ur-.25*zn),isNaN(ha))Un.nanEncountered=!0;else{if(!isNaN(ba))return ri=((za=(Oa=zn*(mr+4*ha+yr)/12)+(Ia=zn*(yr+4*ba+Pr)/12))-nn)/15,On>En?(Un.maxDepthCount++,za+ri):Math.abs(ri)<dn?za+ri:(pi=$t(Wt,tr,vi=tr+.5*zn,mr,ha,yr,Oa,.5*dn,En,On+1,Un),isNaN(pi)?(Un.nanEncountered=!0,NaN):(ti=$t(Wt,vi,ur,yr,ba,Pr,Ia,.5*dn,En,On+1,Un),isNaN(ti)?(Un.nanEncountered=!0,NaN):pi+ti));Un.nanEncountered=!0}}(Ne,He,$e,dt,Mt,Jt,(dt+4*Mt+Jt)*($e-He)/6,at,mt,1,{maxDepthCount:0,nanEncountered:!1})}function sr(Ne,He,$e){function at(yr){return Ne+(1-Ne)*u(1-u(yr,He),1/He)}function mt(yr){return Xt(at,0,yr,1e-4)}for(var dt=1/mt(1),Mt=1e3,Jt=(1+1e-8)*dt,$t=[],Wt=0;Wt<=Mt;Wt++)$t.push(mt(Wt/Mt)*Jt);function tr(yr){var Pr=0,nn=Mt,dn=500;do $t[dn]>yr?nn=dn:Pr=dn,dn=Pr+nn>>1;while(dn>Pr);var En=$t[dn+1]-$t[dn];return En&&(En=(yr-$t[dn+1])/En),(dn+1+En)/Mt}var ur=2*tr(1)/x*dt/$e,mr=function(yr,Pr){var nn=tr(v(h(Pr))),dn=at(nn)*yr;return nn/=ur,[dn,Pr>=0?nn:-nn]};return mr.invert=function(yr,Pr){var nn;return v(Pr*=ur)<1&&(nn=s(Pr)*P(mt(v(Pr))*dt)),[yr/at(v(Pr)),nn]},mr}function vr(Ne,He){return v(Ne[0]-He[0])<a&&v(Ne[1]-He[1])<a}function pr(Ne,He){for(var $e,at,mt,dt=-1,Mt=Ne.length,Jt=Ne[0],$t=[];++dt<Mt;){at=(($e=Ne[dt])[0]-Jt[0])/He,mt=($e[1]-Jt[1])/He;for(var Wt=0;Wt<He;++Wt)$t.push([Jt[0]+Wt*at,Jt[1]+Wt*mt]);Jt=$e}return $t.push($e),$t}function ar(Ne){var He,$e,at,mt,dt,Mt,Jt,$t=[],Wt=Ne[0].length;for(Jt=0;Jt<Wt;++Jt)$e=(He=Ne[0][Jt])[0][0],at=He[0][1],mt=He[1][1],dt=He[2][0],Mt=He[2][1],$t.push(pr([[$e+a,at+a],[$e+a,mt-a],[dt-a,mt-a],[dt-a,Mt+a]],30));for(Jt=Ne[1].length-1;Jt>=0;--Jt)$e=(He=Ne[1][Jt])[0][0],at=He[0][1],mt=He[1][1],dt=He[2][0],Mt=He[2][1],$t.push(pr([[dt-a,Mt-a],[dt-a,mt+a],[$e+a,mt+a],[$e+a,at-a]],30));return{type:"Polygon",coordinates:[b.merge($t)]}}function lr(Ne,He,$e){var at,mt;function dt($t,Wt){for(var tr=Wt<0?-1:1,ur=He[+(Wt<0)],mr=0,yr=ur.length-1;mr<yr&&$t>ur[mr][2][0];++mr);var Pr=Ne($t-ur[mr][1][0],Wt);return Pr[0]+=Ne(ur[mr][1][0],tr*Wt>tr*ur[mr][0][1]?ur[mr][0][1]:Wt)[0],Pr}$e?dt.invert=$e(dt):Ne.invert&&(dt.invert=function($t,Wt){for(var tr=mt[+(Wt<0)],ur=He[+(Wt<0)],mr=0,yr=tr.length;mr<yr;++mr){var Pr=tr[mr];if(Pr[0][0]<=$t&&$t<Pr[1][0]&&Pr[0][1]<=Wt&&Wt<Pr[1][1]){var nn=Ne.invert($t-Ne(ur[mr][1][0],0)[0],Wt);return nn[0]+=ur[mr][1][0],vr(dt(nn[0],nn[1]),[$t,Wt])?nn:null}}});var Mt=m.geoProjection(dt),Jt=Mt.stream;return Mt.stream=function($t){var Wt=Mt.rotate(),tr=Jt($t),ur=(Mt.rotate([0,0]),Jt($t));return Mt.rotate(Wt),tr.sphere=function(){m.geoStream(at,ur)},tr},Mt.lobes=function($t){return arguments.length?(at=ar($t),He=$t.map(function(Wt){return Wt.map(function(tr){return[[tr[0][0]*I,tr[0][1]*I],[tr[1][0]*I,tr[1][1]*I],[tr[2][0]*I,tr[2][1]*I]]})}),mt=He.map(function(Wt){return Wt.map(function(tr){var ur,mr=Ne(tr[0][0],tr[0][1])[0],yr=Ne(tr[2][0],tr[2][1])[0],Pr=Ne(tr[1][0],tr[0][1])[1],nn=Ne(tr[1][0],tr[1][1])[1];return Pr>nn&&(ur=Pr,Pr=nn,nn=ur),[[mr,Pr],[yr,nn]]})}),Mt):He.map(function(Wt){return Wt.map(function(tr){return[[tr[0][0]*A,tr[0][1]*A],[tr[1][0]*A,tr[1][1]*A],[tr[2][0]*A,tr[2][1]*A]]})})},He!=null&&Mt.lobes(He),Mt}jt.invert=function(Ne,He){return He>-.7109889596207567?ne.invert(Ne,He-.0528035274542):de.invert(Ne,He)},or.invert=function(Ne,He){return v(He)>.7109889596207567?ne.invert(Ne,He+(He>0?.0528035274542:-.0528035274542)):de.invert(Ne,He)};var hr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],Or=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],dr=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],Fr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],tn=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],rn=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function An(Ne,He){return[3/L*Ne*E(x*x/3-He*He),He]}function Ln(Ne){function He($e,at){if(v(v(at)-l)<a)return[0,at<0?-2:2];var mt=h(at),dt=u((1+mt)/(1-mt),Ne/2),Mt=.5*(dt+1/dt)+t($e*=Ne);return[2*h($e)/Mt,(dt-1/dt)/Mt]}return He.invert=function($e,at){var mt=v(at);if(v(mt-2)<a)return $e?null:[0,s(at)*l];if(mt>2)return null;var dt=($e/=2)*$e,Mt=(at/=2)*at,Jt=2*at/(1+dt+Mt);return Jt=u((1+Jt)/(1-Jt),1/Ne),[n(2*$e,1-dt-Mt)/Ne,P((Jt-1)/(Jt+1))]},He}An.invert=function(Ne,He){return[L/3*Ne/E(x*x/3-He*He),He]};var _n=x/T;function Vr(Ne,He){return[Ne*(1+E(t(He)))/2,He/(t(He/2)*t(Ne/6))]}function Ir(Ne,He){var $e=Ne*Ne,at=He*He;return[Ne*(.975534+at*(-.0143059*$e-.119161+-.0547009*at)),He*(1.00384+$e*(.0802894+-.02855*at+199025e-9*$e)+at*(.0998909+-.0491032*at))]}function xr(Ne,He){return[h(Ne)/t(He),p(He)*t(Ne)]}function Nr(Ne){var He=t(Ne),$e=p(w+Ne/2);function at(mt,dt){var Mt=dt-Ne,Jt=v(Mt)<a?mt*He:v(Jt=w+dt/2)<a||v(v(Jt)-l)<a?0:mt*Mt/d(p(Jt)/$e);return[Jt,Mt]}return at.invert=function(mt,dt){var Mt,Jt=dt+Ne;return[v(dt)<a?mt/He:v(Mt=w+Jt/2)<a||v(v(Mt)-l)<a?0:mt*d(p(Mt)/$e)/dt,Jt]},at}function en(Ne,He){return[Ne,1.25*d(p(w+.4*He))]}function Qr(Ne){var He=Ne.length-1;function $e(at,mt){for(var dt,Mt=t(mt),Jt=2/(1+Mt*t(at)),$t=Jt*Mt*h(at),Wt=Jt*h(mt),tr=He,ur=Ne[tr],mr=ur[0],yr=ur[1];--tr>=0;)mr=(ur=Ne[tr])[0]+$t*(dt=mr)-Wt*yr,yr=ur[1]+$t*yr+Wt*dt;return[mr=$t*(dt=mr)-Wt*yr,yr=$t*yr+Wt*dt]}return $e.invert=function(at,mt){var dt=20,Mt=at,Jt=mt;do{for(var $t,Wt=He,tr=Ne[Wt],ur=tr[0],mr=tr[1],yr=0,Pr=0;--Wt>=0;)yr=ur+Mt*($t=yr)-Jt*Pr,Pr=mr+Mt*Pr+Jt*$t,ur=(tr=Ne[Wt])[0]+Mt*($t=ur)-Jt*mr,mr=tr[1]+Mt*mr+Jt*$t;var nn,dn,En=(yr=ur+Mt*($t=yr)-Jt*Pr)*yr+(Pr=mr+Mt*Pr+Jt*$t)*Pr;Mt-=nn=((ur=Mt*($t=ur)-Jt*mr-at)*yr+(mr=Mt*mr+Jt*$t-mt)*Pr)/En,Jt-=dn=(mr*yr-ur*Pr)/En}while(v(nn)+v(dn)>1e-12&&--dt>0);if(dt){var On=E(Mt*Mt+Jt*Jt),Un=2*e(.5*On),zn=h(Un);return[n(Mt*zn,On*t(Un)),On?P(Jt*zn/On):0]}},$e}Vr.invert=function(Ne,He){var $e=v(Ne),at=v(He),mt=a,dt=l;at<_n?dt*=at/_n:mt+=6*S(_n/at);for(var Mt=0;Mt<25;Mt++){var Jt=h(dt),$t=E(t(dt)),Wt=h(dt/2),tr=t(dt/2),ur=h(mt/6),mr=t(mt/6),yr=.5*mt*(1+$t)-$e,Pr=dt/(tr*mr)-at,nn=$t?-.25*mt*Jt/$t:0,dn=.5*(1+$t),En=(1+.5*dt*Wt/tr)/(tr*mr),On=dt/tr*(ur/6)/(mr*mr),Un=nn*On-En*dn,zn=(yr*On-Pr*dn)/Un,ha=(Pr*nn-yr*En)/Un;if(dt-=zn,mt-=ha,v(zn)<a&&v(ha)<a)break}return[Ne<0?-mt:mt,He<0?-dt:dt]},Ir.invert=function(Ne,He){var $e=s(Ne)*x,at=He/2,mt=50;do{var dt=$e*$e,Mt=at*at,Jt=$e*at,$t=$e*(.975534+Mt*(-.0143059*dt-.119161+-.0547009*Mt))-Ne,Wt=at*(1.00384+dt*(.0802894+-.02855*Mt+199025e-9*dt)+Mt*(.0998909+-.0491032*Mt))-He,tr=.975534-Mt*(.119161+3*dt*.0143059+.0547009*Mt),ur=-Jt*(.238322+.2188036*Mt+.0286118*dt),mr=Jt*(.1605788+7961e-7*dt+-.0571*Mt),yr=1.00384+dt*(.0802894+199025e-9*dt)+Mt*(3*(.0998909-.02855*dt)-.245516*Mt),Pr=ur*mr-yr*tr,nn=(Wt*ur-$t*yr)/Pr,dn=($t*mr-Wt*tr)/Pr;$e-=nn,at-=dn}while((v(nn)>a||v(dn)>a)&&--mt>0);return mt&&[$e,at]},xr.invert=function(Ne,He){var $e=Ne*Ne,at=He*He+1,mt=$e+at,dt=Ne?_*E((mt-E(mt*mt-4*$e))/$e):1/E(at);return[P(Ne*dt),s(He)*S(dt)]},en.invert=function(Ne,He){return[Ne,2.5*e(o(.8*He))-.625*x]};var yn=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],un=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],$r=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],In=[[.9245,0],[0,0],[.01943,0]],Qt=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Pt(Ne,He){var $e=m.geoProjection(Qr(Ne)).rotate(He).clipAngle(90),at=m.geoRotation(He),mt=$e.center;return delete $e.rotate,$e.center=function(dt){return arguments.length?mt(at(dt)):at.invert(mt())},$e}var Yt=E(6),cr=E(7);function wr(Ne,He){var $e=P(7*h(He)/(3*Yt));return[Yt*Ne*(2*t(2*$e/3)-1)/cr,9*h($e/3)/cr]}function qr(Ne,He){for(var $e,at=(1+_)*h(He),mt=He,dt=0;dt<25&&(mt-=$e=(h(mt/2)+h(mt)-at)/(.5*t(mt/2)+t(mt)),!(v($e)<a));dt++);return[Ne*(1+2*t(mt)/t(mt/2))/(3*T),2*E(3)*h(mt/2)/E(2+T)]}function Ur(Ne,He){for(var $e,at=E(6/(4+x)),mt=(1+x/4)*h(He),dt=He/2,Mt=0;Mt<25&&(dt-=$e=(dt/2+h(dt)-mt)/(.5+t(dt)),!(v($e)<a));Mt++);return[at*(.5+t(dt))*Ne/1.5,at*dt]}function br(Ne,He){var $e=He*He,at=$e*$e,mt=$e*at;return[Ne*(.84719-.13063*$e+mt*mt*(.05494*$e-.04515-.02326*at+.00331*mt)),He*(1.01183+at*at*(.01926*$e-.02625-.00396*at))]}function _r(Ne,He){return[Ne*(1+t(He))/2,2*(He-p(He/2))]}wr.invert=function(Ne,He){var $e=3*P(He*cr/9);return[Ne*cr/(Yt*(2*t(2*$e/3)-1)),P(3*h($e)*Yt/7)]},qr.invert=function(Ne,He){var $e=He*E(2+T)/(2*E(3)),at=2*P($e);return[3*T*Ne/(1+2*t(at)/t(at/2)),P(($e+h(at))/(1+_))]},Ur.invert=function(Ne,He){var $e=E(6/(4+x)),at=He/$e;return v(v(at)-l)<a&&(at=at<0?-l:l),[1.5*Ne/($e*(.5+t(at))),P((at/2+h(at))/(1+x/4))]},br.invert=function(Ne,He){var $e,at,mt,dt,Mt=He,Jt=25;do Mt-=$e=(Mt*(1.01183+(mt=(at=Mt*Mt)*at)*mt*(.01926*at-.02625-.00396*mt))-He)/(1.01183+mt*mt*(.21186*at-.23625+-.05148*mt));while(v($e)>1e-12&&--Jt>0);return[Ne/(.84719-.13063*(at=Mt*Mt)+(dt=at*(mt=at*at))*dt*(.05494*at-.04515-.02326*mt+.00331*dt)),Mt]},_r.invert=function(Ne,He){for(var $e=He/2,at=0,mt=1/0;at<10&&v(mt)>a;++at){var dt=t(He/2);He-=mt=(He-p(He/2)-$e)/(1-.5/(dt*dt))}return[2*Ne/(1+t(He)),He]};var Ar=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Mr(Ne,He){var $e=h(He),at=t(He),mt=s(Ne);if(Ne===0||v(He)===l)return[0,He];if(He===0)return[Ne,0];if(v(Ne)===l)return[Ne*at,l*$e];var dt=x/(2*Ne)-2*Ne/x,Mt=2*He/x,Jt=(1-Mt*Mt)/($e-Mt),$t=dt*dt,Wt=Jt*Jt,tr=1+$t/Wt,ur=1+Wt/$t,mr=(dt*$e/Jt-dt/2)/tr,yr=(Wt*$e/$t+Jt/2)/ur,Pr=yr*yr-(Wt*$e*$e/$t+Jt*$e-1)/ur;return[l*(mr+E(mr*mr+at*at/tr)*mt),l*(yr+E(Pr<0?0:Pr)*s(-He*dt)*mt)]}Mr.invert=function(Ne,He){var $e=(Ne/=l)*Ne,at=$e+(He/=l)*He,mt=x*x;return[Ne?(at-1+E((1-at)*(1-at)+4*$e))/(2*Ne)*l:0,Q(function(dt){return at*(x*h(dt)-2*dt)*x+4*dt*dt*(He-h(dt))+2*x*dt-mt*He},0)]};function Cr(Ne,He){var $e=He*He;return[Ne,He*(1.0148+$e*$e*(.23185+$e*(.02406*$e-.14499)))]}function Gr(Ne,He){if(v(He)<a)return[Ne,0];var $e=p(He),at=Ne*h(He);return[h(at)/$e,He+(1-t(at))/$e]}function cn(Ne,He){var $e=Kr(Ne[1],Ne[0]),at=Kr(He[1],He[0]),mt=function(Mt,Jt){return n(Mt[0]*Jt[1]-Mt[1]*Jt[0],Mt[0]*Jt[0]+Mt[1]*Jt[1])}($e,at),dt=bn($e)/bn(at);return wn([1,0,Ne[0][0],0,1,Ne[0][1]],wn([dt,0,0,0,dt,0],wn([t(mt),h(mt),0,-h(mt),t(mt),0],[1,0,-He[0][0],0,1,-He[0][1]])))}function wn(Ne,He){return[Ne[0]*He[0]+Ne[1]*He[3],Ne[0]*He[1]+Ne[1]*He[4],Ne[0]*He[2]+Ne[1]*He[5]+Ne[2],Ne[3]*He[0]+Ne[4]*He[3],Ne[3]*He[1]+Ne[4]*He[4],Ne[3]*He[2]+Ne[4]*He[5]+Ne[5]]}function Kr(Ne,He){return[Ne[0]-He[0],Ne[1]-He[1]]}function bn(Ne){return E(Ne[0]*Ne[0]+Ne[1]*Ne[1])}function zr(Ne,He,$e){function at(Mt,Jt){var $t,Wt=He(Mt,Jt),tr=Wt.project([Mt*A,Jt*A]);return($t=Wt.transform)?[$t[0]*tr[0]+$t[1]*tr[1]+$t[2],-($t[3]*tr[0]+$t[4]*tr[1]+$t[5])]:(tr[1]=-tr[1],tr)}(function Mt(Jt,$t){if(Jt.edges=function(Pr){for(var nn=Pr.length,dn=[],En=Pr[nn-1],On=0;On<nn;++On)dn.push([En,En=Pr[On]]);return dn}(Jt.face),$t.face){var Wt=Jt.shared=function(Pr,nn){for(var dn,En,On=Pr.length,Un=null,zn=0;zn<On;++zn){dn=Pr[zn];for(var ha=nn.length;--ha>=0;)if(En=nn[ha],dn[0]===En[0]&&dn[1]===En[1]){if(Un)return[Un,dn];Un=dn}}}(Jt.face,$t.face),tr=cn(Wt.map($t.project),Wt.map(Jt.project));Jt.transform=$t.transform?wn($t.transform,tr):tr;for(var ur=$t.edges,mr=0,yr=ur.length;mr<yr;++mr)Wr(Wt[0],ur[mr][1])&&Wr(Wt[1],ur[mr][0])&&(ur[mr]=Jt),Wr(Wt[0],ur[mr][0])&&Wr(Wt[1],ur[mr][1])&&(ur[mr]=Jt);for(ur=Jt.edges,mr=0,yr=ur.length;mr<yr;++mr)Wr(Wt[0],ur[mr][0])&&Wr(Wt[1],ur[mr][1])&&(ur[mr]=$t),Wr(Wt[0],ur[mr][1])&&Wr(Wt[1],ur[mr][0])&&(ur[mr]=$t)}else Jt.transform=$t.transform;return Jt.children&&Jt.children.forEach(function(Pr){Mt(Pr,Jt)}),Jt})(Ne,{transform:null}),mn(Ne)&&(at.invert=function(Mt,Jt){var $t=function Wt(tr,ur){var mr=tr.project.invert,yr=tr.transform,Pr=ur;if(yr&&(yr=function(Un){var zn=1/(Un[0]*Un[4]-Un[1]*Un[3]);return[zn*Un[4],-zn*Un[1],zn*(Un[1]*Un[5]-Un[2]*Un[4]),-zn*Un[3],zn*Un[0],zn*(Un[2]*Un[3]-Un[0]*Un[5])]}(yr),Pr=[yr[0]*Pr[0]+yr[1]*Pr[1]+yr[2],yr[3]*Pr[0]+yr[4]*Pr[1]+yr[5]]),mr&&tr===function(Un){return He(Un[0]*I,Un[1]*I)}(nn=mr(Pr)))return nn;for(var nn,dn=tr.children,En=0,On=dn&&dn.length;En<On;++En)if(nn=Wt(dn[En],ur))return nn}(Ne,[Mt,-Jt]);return $t&&($t[0]*=I,$t[1]*=I,$t)});var mt=m.geoProjection(at),dt=mt.stream;return mt.stream=function(Mt){var Jt=mt.rotate(),$t=dt(Mt),Wt=(mt.rotate([0,0]),dt(Mt));return mt.rotate(Jt),$t.sphere=function(){Wt.polygonStart(),Wt.lineStart(),function tr(ur,mr,yr){var Pr,nn,dn=mr.edges,En=dn.length,On={type:"MultiPoint",coordinates:mr.face},Un=mr.face.filter(function(vi){return v(vi[1])!==90}),zn=m.geoBounds({type:"MultiPoint",coordinates:Un}),ha=!1,ba=-1,Oa=zn[1][0]-zn[0][0],Ia=Oa===180||Oa===360?[(zn[0][0]+zn[1][0])/2,(zn[0][1]+zn[1][1])/2]:m.geoCentroid(On);if(yr)for(;++ba<En&&dn[ba]!==yr;);++ba;for(var za=0;za<En;++za)nn=dn[(za+ba)%En],Array.isArray(nn)?(ha||(ur.point((Pr=m.geoInterpolate(nn[0],Ia)(a))[0],Pr[1]),ha=!0),ur.point((Pr=m.geoInterpolate(nn[1],Ia)(a))[0],Pr[1])):(ha=!1,nn!==yr&&tr(ur,nn,mr))}(Wt,Ne),Wt.lineEnd(),Wt.polygonEnd()},$t},mt.angle($e==null?-30:$e*A)}function Wr(Ne,He){return Ne&&He&&Ne[0]===He[0]&&Ne[1]===He[1]}function mn(Ne){return Ne.project.invert||Ne.children&&Ne.children.some(mn)}Cr.invert=function(Ne,He){He>
vendor: 4,843 bytes, line 20
201.790857183?He=1.790857183:He<-1.790857183&&(He=-1.790857183);var $e,at=He;do{var mt=at*at;at-=$e=(at*(1.0148+mt*mt*(.23185+mt*(.02406*mt-.14499)))-He)/(1.0148+mt*mt*(5*.23185+mt*(.21654*mt-1.01493)))}while(v($e)>a);return[Ne,at]},Gr.invert=function(Ne,He){if(v(He)<a)return[Ne,0];var $e,at=Ne*Ne+He*He,mt=.5*He,dt=10;do{var Mt=p(mt),Jt=1/t(mt),$t=at-2*He*mt+mt*mt;mt-=$e=(Mt*$t+2*(mt-He))/(2+$t*Jt*Jt+2*(mt-He)*Mt)}while(v($e)>a&&--dt>0);return Mt=p(mt),[(v(He)<v(mt+1/Mt)?P(Ne*Mt):s(He)*s(Ne)*(S(v(Ne*Mt))+l))/h(mt),mt]};var pn=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Pn=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(Ne){return Ne.map(function(He){return pn[He]})}),aa=2/E(3);function qn(Ne,He){var $e=Pe(Ne,He);return[$e[0]*aa,$e[1]]}function vn(Ne,He){for(var $e=0,at=Ne.length,mt=0;$e<at;++$e)mt+=Ne[$e]*He[$e];return mt}function ea(Ne){return[n(Ne[1],Ne[0])*A,P(c(-1,i(1,Ne[2])))*A]}function ua(Ne){var He=Ne[0]*I,$e=Ne[1]*I,at=t($e);return[at*t(He),at*h(He),h($e)]}function Ya(){}function Ei(Ne,He){return{type:"FeatureCollection",features:Ne.features.map(function($e){return ei($e,He)})}}function ei(Ne,He){return{type:"Feature",id:Ne.id,properties:Ne.properties,geometry:gi(Ne.geometry,He)}}function gi(Ne,He){if(!Ne)return null;if(Ne.type==="GeometryCollection")return function(at,mt){return{type:"GeometryCollection",geometries:at.geometries.map(function(dt){return gi(dt,mt)})}}(Ne,He);var $e;switch(Ne.type){case"Point":case"MultiPoint":$e=so;break;case"LineString":case"MultiLineString":$e=Do;break;case"Polygon":case"MultiPolygon":case"Sphere":$e=qo;break;default:return null}return m.geoStream(Ne,He($e)),$e.result()}qn.invert=function(Ne,He){return Pe.invert(Ne/aa,He)};var ka=[],Fa=[],so={point:function(Ne,He){ka.push([Ne,He])},result:function(){var Ne=ka.length?ka.length<2?{type:"Point",coordinates:ka[0]}:{type:"MultiPoint",coordinates:ka}:null;return ka=[],Ne}},Do={lineStart:Ya,point:function(Ne,He){ka.push([Ne,He])},lineEnd:function(){ka.length&&(Fa.push(ka),ka=[])},result:function(){var Ne=Fa.length?Fa.length<2?{type:"LineString",coordinates:Fa[0]}:{type:"MultiLineString",coordinates:Fa}:null;return Fa=[],Ne}},qo={polygonStart:Ya,lineStart:Ya,point:function(Ne,He){ka.push([Ne,He])},lineEnd:function(){var Ne=ka.length;if(Ne){do ka.push(ka[0].slice());while(++Ne<4);Fa.push(ka),ka=[]}},polygonEnd:Ya,result:function(){if(!Fa.length)return null;var Ne=[],He=[];return Fa.forEach(function($e){(function(at){if((mt=at.length)<4)return!1;for(var mt,dt=0,Mt=at[mt-1][1]*at[0][0]-at[mt-1][0]*at[0][1];++dt<mt;)Mt+=at[dt-1][1]*at[dt][0]-at[dt-1][0]*at[dt][1];return Mt<=0})($e)?Ne.push([$e]):He.push($e)}),He.forEach(function($e){var at=$e[0];Ne.some(function(mt){if(function(dt,Mt){for(var Jt=Mt[0],$t=Mt[1],Wt=!1,tr=0,ur=dt.length,mr=ur-1;tr<ur;mr=tr++){var yr=dt[tr],Pr=yr[0],nn=yr[1],dn=dt[mr],En=dn[0],On=dn[1];nn>$t^On>$t&&Jt<(En-Pr)*($t-nn)/(On-nn)+Pr&&(Wt=!Wt)}return Wt}(mt[0],at))return mt.push($e),!0})||Ne.push([$e])}),Fa=[],Ne.length?Ne.length>1?{type:"MultiPolygon",coordinates:Ne}:{type:"Polygon",coordinates:Ne[0]}:null}};function Vi(Ne){var He=Ne(l,0)[0]-Ne(-l,0)[0];function $e(at,mt){var dt=v(at)<l,Mt=Ne(dt?at:at>0?at-x:at+x,mt),Jt=(Mt[0]-Mt[1])*_,$t=(Mt[0]+Mt[1])*_;if(dt)return[Jt,$t];var Wt=He*_,tr=Jt>0^$t>0?-1:1;return[tr*Jt-s($t)*Wt,tr*$t-s(Jt)*Wt]}return Ne.invert&&($e.invert=function(at,mt){var dt=(at+mt)*_,Mt=(mt-at)*_,Jt=v(dt)<.5*He&&v(Mt)<.5*He;if(!Jt){var $t=He*_,Wt=dt>0^Mt>0?-1:1,tr=-Wt*at+(Mt>0?1:-1)*$t,ur=-Wt*mt+(dt>0?1:-1)*$t;dt=(-tr-ur)*_,Mt=(tr-ur)*_}var mr=Ne.invert(dt,Mt);return Jt||(mr[0]+=dt>0?x:-x),mr}),m.geoProjection($e).rotate([-90,-90,45]).clipAngle(179.999)}function Gi(){return Vi(Et).scale(111.48)}function Ro(Ne){var He=h(Ne);function $e(at,mt){var dt=He?p(at*He/2)/He:at/2;if(!mt)return[2*dt,-Ne];var Mt=2*e(dt*h(mt)),Jt=1/p(mt);return[h(Mt)*Jt,mt+(1-t(Mt))*Jt-Ne]}return $e.invert=function(at,mt){if(v(mt+=Ne)<a)return[He?2*e(He*at/2)/He:at,0];var dt,Mt=at*at+mt*mt,Jt=0,$t=10;do{var Wt=p(Jt),tr=1/t(Jt),ur=Mt-2*mt*Jt+Jt*Jt;Jt-=dt=(Wt*ur+2*(Jt-mt))/(2+ur*tr*tr+2*(Jt-mt)*Wt)}while(v(dt)>a&&--$t>0);var mr=at*(Wt=p(Jt)),yr=p(v(mt)<v(Jt+1/Wt)?.5*P(mr):.5*S(mr)+x/4)/h(Jt);return[He?2*e(He*yr)/He:2*yr,Jt]},$e}var ja=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function wo(Ne,He){var $e,at=i(18,36*v(He)/x),mt=r(at),dt=at-mt,Mt=($e=ja[mt])[0],Jt=$e[1],$t=($e=ja[++mt])[0],Wt=$e[1],tr=($e=ja[i(19,++mt)])[0],ur=$e[1];return[Ne*($t+dt*(tr-Mt)/2+dt*dt*(tr-2*$t+Mt)/2),(He>0?l:-l)*(Wt+dt*(ur-Jt)/2+dt*dt*(ur-2*Wt+Jt)/2)]}function lo(Ne,He){var $e=function(Mt){function Jt($t,Wt){var tr=t(Wt),ur=(Mt-1)/(Mt-tr*t($t));
vendor: 7,710 bytes, line 20
20return[ur*tr*h($t),ur*h(Wt)]}return Jt.invert=function($t,Wt){var tr=$t*$t+Wt*Wt,ur=E(tr),mr=(Mt-E(1-tr*(Mt+1)/(Mt-1)))/((Mt-1)/ur+ur/(Mt-1));return[n($t*mr,ur*E(1-mr*mr)),ur?P(Wt*mr/ur):0]},Jt}(Ne);if(!He)return $e;var at=t(He),mt=h(He);function dt(Mt,Jt){var $t=$e(Mt,Jt),Wt=$t[1],tr=Wt*mt/(Ne-1)+at;return[$t[0]*at/tr,Wt/tr]}return dt.invert=function(Mt,Jt){var $t=(Ne-1)/(Ne-1-Jt*mt);return $e.invert($t*Mt,$t*Jt*at)},dt}ja.forEach(function(Ne){Ne[1]*=1.0144}),wo.invert=function(Ne,He){var $e=He/l,at=90*$e,mt=i(18,v(at/5)),dt=c(0,r(mt));do{var Mt=ja[dt][1],Jt=ja[dt+1][1],$t=ja[i(19,dt+2)][1],Wt=$t-Mt,tr=$t-2*Jt+Mt,ur=2*(v($e)-Jt)/Wt,mr=tr/Wt,yr=ur*(1-mr*ur*(1-2*mr*ur));if(yr>=0||dt===1){at=(He>=0?5:-5)*(yr+mt);var Pr,nn=50;do yr=(mt=i(18,v(at)/5))-(dt=r(mt)),Mt=ja[dt][1],Jt=ja[dt+1][1],$t=ja[i(19,dt+2)][1],at-=(Pr=(He>=0?l:-l)*(Jt+yr*($t-Mt)/2+yr*yr*($t-2*Jt+Mt)/2)-He)*A;while(v(Pr)>1e-12&&--nn>0);break}}while(--dt>=0);var dn=ja[dt][0],En=ja[dt+1][0],On=ja[i(19,dt+2)][0];return[Ne/(En+yr*(On-dn)/2+yr*yr*(On-2*En+dn)/2),at*I]};var mi=-179.9999,Yi=179.9999,co=-89.9999;function xo(Ne){return Ne.length>0}function Ii(Ne){return Ne===-90||Ne===90?[0,Ne]:[-180,(He=Ne,Math.floor(1e4*He)/1e4)];var He}function li(Ne){var He=Ne[0],$e=Ne[1],at=!1;return He<=mi?(He=-180,at=!0):He>=Yi&&(He=180,at=!0),$e<=co?($e=-90,at=!0):$e>=89.9999&&($e=90,at=!0),at?[He,$e]:Ne}function Hi(Ne){return Ne.map(li)}function gs(Ne,He,$e){for(var at=0,mt=Ne.length;at<mt;++at){var dt=Ne[at].slice();$e.push({index:-1,polygon:He,ring:dt});for(var Mt=0,Jt=dt.length;Mt<Jt;++Mt){var $t=dt[Mt],Wt=$t[0],tr=$t[1];if(Wt<=mi||Wt>=Yi||tr<=co||tr>=89.9999){dt[Mt]=li($t);for(var ur=Mt+1;ur<Jt;++ur){var mr=dt[ur],yr=mr[0],Pr=mr[1];if(yr>mi&&yr<Yi&&Pr>co&&Pr<89.9999)break}if(ur===Mt+1)continue;if(Mt){var nn={index:-1,polygon:He,ring:dt.slice(0,Mt+1)};nn.ring[nn.ring.length-1]=Ii(tr),$e[$e.length-1]=nn}else $e.pop();if(ur>=Jt)break;$e.push({index:-1,polygon:He,ring:dt=dt.slice(ur-1)}),dt[0]=Ii(dt[0][1]),Mt=-1,Jt=dt.length}}}}function xs(Ne){var He,$e,at,mt,dt,Mt,Jt=Ne.length,$t={},Wt={};for(He=0;He<Jt;++He)at=($e=Ne[He]).ring[0],dt=$e.ring[$e.ring.length-1],at[0]!==dt[0]||at[1]!==dt[1]?($e.index=He,$t[at]=Wt[dt]=$e):($e.polygon.push($e.ring),Ne[He]=null);for(He=0;He<Jt;++He)if($e=Ne[He]){if(at=$e.ring[0],dt=$e.ring[$e.ring.length-1],mt=Wt[at],Mt=$t[dt],delete $t[at],delete Wt[dt],at[0]===dt[0]&&at[1]===dt[1]){$e.polygon.push($e.ring);continue}mt?(delete Wt[at],delete $t[mt.ring[0]],mt.ring.pop(),Ne[mt.index]=null,$e={index:-1,polygon:mt.polygon,ring:mt.ring.concat($e.ring)},mt===Mt?$e.polygon.push($e.ring):($e.index=Jt++,Ne.push($t[$e.ring[0]]=Wt[$e.ring[$e.ring.length-1]]=$e))):Mt?(delete $t[dt],delete Wt[Mt.ring[Mt.ring.length-1]],$e.ring.pop(),$e={index:Jt++,polygon:Mt.polygon,ring:$e.ring.concat(Mt.ring)},Ne[Mt.index]=null,Ne.push($t[$e.ring[0]]=Wt[$e.ring[$e.ring.length-1]]=$e)):($e.ring.push($e.ring[0]),$e.polygon.push($e.ring))}}function Ua(Ne){var He={type:"Feature",geometry:cs(Ne.geometry)};return Ne.id!=null&&(He.id=Ne.id),Ne.bbox!=null&&(He.bbox=Ne.bbox),Ne.properties!=null&&(He.properties=Ne.properties),He}function cs(Ne){if(Ne==null)return Ne;var He,$e,at,mt;switch(Ne.type){case"GeometryCollection":He={type:"GeometryCollection",geometries:Ne.geometries.map(cs)};break;case"Point":He={type:"Point",coordinates:li(Ne.coordinates)};break;case"MultiPoint":case"LineString":He={type:Ne.type,coordinates:Hi(Ne.coordinates)};break;case"MultiLineString":He={type:"MultiLineString",coordinates:Ne.coordinates.map(Hi)};break;case"Polygon":var dt=[];gs(Ne.coordinates,dt,$e=[]),xs($e),He={type:"Polygon",coordinates:dt};break;case"MultiPolygon":$e=[],at=-1,mt=Ne.coordinates.length;for(var Mt=new Array(mt);++at<mt;)gs(Ne.coordinates[at],Mt[at]=[],$e);xs($e),He={type:"MultiPolygon",coordinates:Mt.filter(xo)};break;default:return Ne}return Ne.bbox!=null&&(He.bbox=Ne.bbox),He}function Jo(Ne,He){var $e=p(He/2),at=h(w*$e);return[Ne*(.74482-.34588*at*at),1.70711*$e]}function bs(Ne,He,$e){var at=m.geoInterpolate(He,$e),mt=at(.5),dt=m.geoRotation([-mt[0],-mt[1]])(He),Mt=at.distance/2,Jt=-P(h(dt[1]*I)/h(Mt)),$t=[-mt[0],-mt[1],-(dt[0]>0?x-Jt:Jt)*A],Wt=m.geoProjection(Ne(Mt)).rotate($t),tr=m.geoRotation($t),ur=Wt.center;return delete Wt.rotate,Wt.center=function(mr){return arguments.length?ur(tr(mr)):tr.invert(ur())},Wt.clipAngle(90)}function _s(Ne){var He=t(Ne);function $e(at,mt){var dt=m.geoGnomonicRaw(at,mt);return dt[0]*=He,dt}return $e.invert=function(at,mt){return m.geoGnomonicRaw.invert(at/He,mt)},$e}function ms(Ne,He){return bs(_s,Ne,He)}function ws(Ne){if(!(Ne*=2))return m.geoAzimuthalEquidistantRaw;var He=-Ne/2,$e=-He,at=Ne*Ne,mt=p($e),dt=.5/h($e);function Mt(Jt,$t){var Wt=S(t($t)*t(Jt-He)),tr=S(t($t)*t(Jt-$e));return[((Wt*=Wt)-(tr*=tr))/(2*Ne),($t<0?-1:1)*E(4*at*tr-(at-Wt+tr)*(at-Wt+tr))/(2*Ne)]}return Mt.invert=function(Jt,$t){var Wt,tr,ur=$t*$t,mr=t(E(ur+(Wt=Jt+He)*Wt)),yr=t(E(ur+(Wt=Jt+$e)*Wt));return[n(tr=mr-yr,Wt=(mr+yr)*mt),($t<0?-1:1)*S(E(Wt*Wt+tr*tr)*dt)]},Mt}function To(Ne,He){return bs(ws,Ne,He)}function ko(Ne,He){if(v(He)<a)return[Ne,0];var $e=v(He/l),at=P($e);if(v(Ne)<a||v(v(He)-l)<a)return[0,s(He)*x*p(at/2)];var mt=t(at),dt=v(x/Ne-Ne/x)/2,Mt=dt*dt,Jt=mt/($e+mt-1),$t=Jt*(2/$e-1),Wt=$t*$t,tr=Wt+Mt,ur=Jt-Wt,mr=Mt+Jt;return[s(Ne)*x*(dt*ur+E(Mt*ur*ur-tr*(Jt*Jt-Wt)))/tr,s(He)*x*($t*mr-dt*E((Mt+1)*tr-mr*mr))/tr]}function Fo(Ne,He){if(v(He)<a)return[Ne,0];var $e=v(He/l),at=P($e);if(v(Ne)<a||v(v(He)-l)<a)return[0,s(He)*x*p(at/2)];var mt=t(at),dt=v(x/Ne-Ne/x)/2,Mt=dt*dt,Jt=mt*(E(1+Mt)-dt*mt)/(1+Mt*$e*$e);return[s(Ne)*x*Jt,s(He)*x*E(1-Jt*(2*dt+Jt))]}function Bo(Ne,He){if(v(He)<a)return[Ne,0];var $e=He/l,at=P($e);if(v(Ne)<a||v(v(He)-l)<a)return[0,x*p(at/2)];var mt=(x/Ne-Ne/x)/2,dt=$e/(1+t(at));return[x*(s(Ne)*E(mt*mt+1-dt*dt)-mt),x*dt]}function No(Ne,He){if(!He)return[Ne,0];var $e=v(He);if(!Ne||$e===l)return[0,He];var at=$e/l,mt=at*at,dt=(8*at-mt*(mt+2)-5)/(2*mt*(at-1)),Mt=dt*dt,Jt=at*dt,$t=mt+Mt+2*Jt,Wt=at+3*dt,tr=Ne/l,ur=tr+1/tr,mr=s(v(Ne)-l)*E(ur*ur-4),yr=mr*mr,Pr=(mr*($t+Mt-1)+2*E($t*(mt+Mt*yr-1)+(1-mt)*(mt*(Wt*Wt+4*Mt)+12*Jt*Mt+4*Mt*Mt)))/(4*$t+yr);return[s(Ne)*l*Pr,s(He)*l*E(1+mr*v(Pr)-Pr*Pr)]}function Ko(Ne,He,$e,at){var mt=x/3;Ne=c(Ne,a),He=c(He,a),Ne=i(Ne,l),He=i(He,x-a),$e=c($e,0),$e=i($e,100-a);var dt=(at=c(at,a))/100,Mt=S(($e/100+1)*t(mt))/mt,Jt=h(Ne)/h(Mt*l),$t=He/x,Wt=E(dt*h(Ne/2)/h(He/2));return function(tr,ur,mr,yr,Pr){function nn(dn,En){var On=mr*h(yr*En),Un=E(1-On*On),zn=E(2/(1+Un*t(dn*=Pr)));return[tr*Un*zn*h(dn),ur*On*zn]}return nn.invert=function(dn,En){var On=dn/tr,Un=En/ur,zn=E(On*On+Un*Un),ha=2*P(zn/2);return[n(dn*p(ha),tr*zn)/Pr,zn&&P(En*h(ha)/(ur*mr*zn))/yr]},nn}(Wt/E($t*Jt*Mt),1/(Wt*E($t*Jt*Mt)),Jt,Mt,$t)}function uo(){var Ne=65*I,He=60*I,$e=20,at=200,mt=m.geoProjectionMutator(Ko),dt=mt(Ne,He,$e,at);return dt.poleline=function(Mt){return arguments.length?mt(Ne=+Mt*I,He,$e,at):Ne*A},dt.parallels=function(Mt){return arguments.length?mt(Ne,He=+Mt*I,$e,at):He*A},dt.inflation=function(Mt){return arguments.length?mt(Ne,He,$e=+Mt,at):$e},dt.ratio=function(Mt){return arguments.length?mt(Ne,He,$e,at=+Mt):at},dt.scale(163.775)}Jo.invert=function(Ne,He){var $e=He/1.70711,at=h(w*$e);return[Ne/(.74482-.34588*at*at),2*e($e)]},ko.invert=function(Ne,He){if(v(He)<a)return[Ne,0];if(v(Ne)<a)return[0,l*h(2*e(He/x))];var $e=(Ne/=x)*Ne,at=(He/=x)*He,mt=$e+at,dt=mt*mt,Mt=-v(He)*(1+mt),Jt=Mt-2*at+$e,$t=-2*Mt+1+2*at+dt,Wt=at/$t+(2*Jt*Jt*Jt/($t*$t*$t)-9*Mt*Jt/($t*$t))/27,tr=(Mt-Jt*Jt/(3*$t))/$t,ur=2*E(-tr/3),mr=S(3*Wt/(tr*ur))/3;return[x*(mt-1+E(1+2*($e-at)+dt))/(2*Ne),s(He)*x*(-ur*t(mr+x/3)-Jt/(3*$t))]},Fo.invert=function(Ne,He){if(!Ne)return[0,l*h(2*e(He/x))];var $e=v(Ne/x),at=(1-$e*$e-(He/=x)*He)/(2*$e),mt=E(at*at+1);
vendor: 4,916 bytes, line 20
20return[s(Ne)*x*(mt-at),s(He)*l*h(2*n(E((1-2*at*$e)*(at+mt)-$e),E(mt+at+$e)))]},Bo.invert=function(Ne,He){if(!He)return[Ne,0];var $e=He/x,at=(x*x*(1-$e*$e)-Ne*Ne)/(2*x*Ne);return[Ne?x*(s(Ne)*E(at*at+1)-at):0,l*h(2*e($e))]},No.invert=function(Ne,He){var $e;if(!Ne||!He)return[Ne,He];He/=x;var at=s(Ne)*Ne/l,mt=(at*at-1+4*He*He)/v(at),dt=mt*mt,Mt=2*He,Jt=50;do{var $t=Mt*Mt,Wt=(8*Mt-$t*($t+2)-5)/(2*$t*(Mt-1)),tr=(3*Mt-$t*Mt-10)/(2*$t*Mt),ur=Wt*Wt,mr=Mt*Wt,yr=Mt+Wt,Pr=yr*yr,nn=Mt+3*Wt,dn=-2*yr*(4*mr*ur+(1-4*$t+3*$t*$t)*(1+tr)+ur*(14*$t-6-dt+(8*$t-8-2*dt)*tr)+mr*(12*$t-8+(10*$t-10-dt)*tr)),En=E(Pr*($t+ur*dt-1)+(1-$t)*($t*(nn*nn+4*ur)+ur*(12*mr+4*ur)));Mt-=$e=(mt*(Pr+ur-1)+2*En-at*(4*Pr+dt))/(mt*(2*Wt*tr+2*yr*(1+tr))+dn/En-8*yr*(mt*(-1+ur+Pr)+2*En)*(1+tr)/(dt+4*Pr))}while($e>a&&--Jt>0);return[s(Ne)*(E(mt*mt+4)+mt)*x/4,l*Mt]};var us=4*x+3*E(3),ao=2*E(2*x*E(3)/us),jo=re(ao*E(3)/x,ao,us/6);function fs(Ne,He){return[Ne*E(1-3*He*He/(x*x)),He]}function Mo(Ne,He){var $e=t(He),at=t(Ne)*$e,mt=1-at,dt=t(Ne=n(h(Ne)*$e,-h(He))),Mt=h(Ne);return[Mt*($e=E(1-at*at))-dt*mt,-dt*$e-Mt*mt]}function Ba(Ne,He){var $e=V(Ne,He);return[($e[0]+Ne/l)/2,($e[1]+He)/2]}fs.invert=function(Ne,He){return[Ne/E(1-3*He*He/(x*x)),He]},Mo.invert=function(Ne,He){var $e=(Ne*Ne+He*He)/-2,at=E(-$e*(2+$e)),mt=He*$e+Ne*at,dt=Ne*$e-He*at,Mt=E(dt*dt+mt*mt);return[n(at*mt,Mt*(1+$e)),Mt?-P(at*dt/Mt):0]},Ba.invert=function(Ne,He){var $e=Ne,at=He,mt=25;do{var dt,Mt=t(at),Jt=h(at),$t=h(2*at),Wt=Jt*Jt,tr=Mt*Mt,ur=h($e),mr=t($e/2),yr=h($e/2),Pr=yr*yr,nn=1-tr*mr*mr,dn=nn?S(Mt*mr)*E(dt=1/nn):dt=0,En=.5*(2*dn*Mt*yr+$e/l)-Ne,On=.5*(dn*Jt+at)-He,Un=.5*dt*(tr*Pr+dn*Mt*mr*Wt)+.5/l,zn=dt*(ur*$t/4-dn*Jt*yr),ha=.125*dt*($t*yr-dn*Jt*tr*ur),ba=.5*dt*(Wt*mr+dn*Pr*Mt)+.5,Oa=zn*ha-ba*Un,Ia=(On*zn-En*ba)/Oa,za=(En*ha-On*Un)/Oa;$e-=Ia,at-=za}while((v(Ia)>a||v(za)>a)&&--mt>0);return[$e,at]},g.geoNaturalEarth=m.geoNaturalEarth1,g.geoNaturalEarthRaw=m.geoNaturalEarth1Raw,g.geoAiry=function(){var Ne=l,He=m.geoProjectionMutator(H),$e=He(Ne);return $e.radius=function(at){return arguments.length?He(Ne=at*I):Ne*A},$e.scale(179.976).clipAngle(147)},g.geoAiryRaw=H,g.geoAitoff=function(){return m.geoProjection(V).scale(152.63)},g.geoAitoffRaw=V,g.geoArmadillo=function(){var Ne=20*I,He=Ne>=0?1:-1,$e=p(He*Ne),at=m.geoProjectionMutator(Z),mt=at(Ne),dt=mt.stream;return mt.parallel=function(Mt){return arguments.length?($e=p((He=(Ne=Mt*I)>=0?1:-1)*Ne),at(Ne)):Ne*A},mt.stream=function(Mt){var Jt=mt.rotate(),$t=dt(Mt),Wt=(mt.rotate([0,0]),dt(Mt)),tr=mt.precision();return mt.rotate(Jt),$t.sphere=function(){Wt.polygonStart(),Wt.lineStart();for(var ur=-180*He;He*ur<180;ur+=90*He)Wt.point(ur,90*He);if(Ne)for(;He*(ur-=3*He*tr)>=-180;)Wt.point(ur,He*-n(t(ur*I/2),$e)*A);Wt.lineEnd(),Wt.polygonEnd()},$t},mt.scale(218.695).center([0,28.0974])},g.geoArmadilloRaw=Z,g.geoAugust=function(){return m.geoProjection(K).scale(66.1603)},g.geoAugustRaw=K,g.geoBaker=function(){return m.geoProjection($).scale(112.314)},g.geoBakerRaw=$,g.geoBerghaus=function(){var Ne=5,He=m.geoProjectionMutator(R),$e=He(Ne),at=$e.stream,mt=-t(.01*I),dt=h(.01*I);return $e.lobes=function(Mt){return arguments.length?He(Ne=+Mt):Ne},$e.stream=function(Mt){var Jt=$e.rotate(),$t=at(Mt),Wt=($e.rotate([0,0]),at(Mt));return $e.rotate(Jt),$t.sphere=function(){Wt.polygonStart(),Wt.lineStart();for(var tr=0,ur=360/Ne,mr=2*x/Ne,yr=90-180/Ne,Pr=l;tr<Ne;++tr,yr-=ur,Pr-=mr)Wt.point(n(dt*t(Pr),mt)*A,P(dt*h(Pr))*A),yr<-90?(Wt.point(-90,-180-yr-.01),Wt.point(-90,-180-yr+.01)):(Wt.point(90,yr+.01),Wt.point(90,yr-.01));Wt.lineEnd(),Wt.polygonEnd()},$t},$e.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},g.geoBerghausRaw=R,g.geoBertin1953=function(){return m.geoProjection(X()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])},g.geoBertin1953Raw=X,g.geoBoggs=function(){return m.geoProjection(pe).scale(160.857)},g.geoBoggsRaw=pe,g.geoBonne=function(){return ce(xe).scale(123.082).center([0,26.1441]).parallel(45)},g.geoBonneRaw=xe,g.geoBottomley=function(){var Ne=.5,He=m.geoProjectionMutator(we),$e=He(Ne);return $e.fraction=function(at){return arguments.length?He(Ne=+at):Ne},$e.scale(158.837)},g.geoBottomleyRaw=we,g.geoBromley=function(){return m.geoProjection(be).scale(152.63)},g.geoBromleyRaw=be,g.geoChamberlin=Ae,g.geoChamberlinRaw=Te,g.geoChamberlinAfrica=function(){return Ae([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},g.geoCollignon=function(){return m.geoProjection(Pe).scale(95.6464).center([0,30])},g.geoCollignonRaw=Pe,g.geoCraig=function(){return ce(De).scale(249.828).clipAngle(90)},g.geoCraigRaw=De,g.geoCraster=function(){return m.geoProjection(Qe).scale(156.19)},g.geoCrasterRaw=Qe,g.geoCylindricalEqualArea=function(){return ce(Oe).parallel(38.58).scale(195.044)},g.geoCylindricalEqualAreaRaw=Oe,g.geoCylindricalStereographic=function(){return ce(Ue).scale(124.75)},g.geoCylindricalStereographicRaw=Ue,g.geoEckert1=function(){return m.geoProjection(Ge).scale(16
vendor: 11,833 bytes, line 20
205.664)},g.geoEckert1Raw=Ge,g.geoEckert2=function(){return m.geoProjection(Ye).scale(165.664)},g.geoEckert2Raw=Ye,g.geoEckert3=function(){return m.geoProjection(tt).scale(180.739)},g.geoEckert3Raw=tt,g.geoEckert4=function(){return m.geoProjection(lt).scale(180.739)},g.geoEckert4Raw=lt,g.geoEckert5=function(){return m.geoProjection(vt).scale(173.044)},g.geoEckert5Raw=vt,g.geoEckert6=function(){return m.geoProjection(It).scale(173.044)},g.geoEckert6Raw=It,g.geoEisenlohr=function(){return m.geoProjection(rt).scale(62.5271)},g.geoEisenlohrRaw=rt,g.geoFahey=function(){return m.geoProjection(Tt).scale(137.152)},g.geoFaheyRaw=Tt,g.geoFoucaut=function(){return m.geoProjection(Vt).scale(135.264)},g.geoFoucautRaw=Vt,g.geoFoucautSinusoidal=function(){var Ne=.5,He=m.geoProjectionMutator(Kt),$e=He(Ne);return $e.alpha=function(at){return arguments.length?He(Ne=+at):Ne},$e.scale(168.725)},g.geoFoucautSinusoidalRaw=Kt,g.geoGilbert=function(Ne){Ne==null&&(Ne=m.geoOrthographic);var He=Ne(),$e=m.geoEquirectangular().scale(A).precision(0).clipAngle(null).translate([0,0]);function at(dt){return He(Be(dt))}function mt(dt){at[dt]=function(){return arguments.length?(He[dt].apply(He,arguments),at):He[dt]()}}return He.invert&&(at.invert=function(dt){return qe(He.invert(dt))}),at.stream=function(dt){var Mt=He.stream(dt),Jt=$e.stream({point:function($t,Wt){Mt.point($t/2,P(p(-Wt/2*I))*A)},lineStart:function(){Mt.lineStart()},lineEnd:function(){Mt.lineEnd()},polygonStart:function(){Mt.polygonStart()},polygonEnd:function(){Mt.polygonEnd()}});return Jt.sphere=Mt.sphere,Jt},at.rotate=function(dt){return arguments.length?($e.rotate(dt),at):$e.rotate()},at.center=function(dt){return arguments.length?(He.center(Be(dt)),at):qe(He.center())},mt("angle"),mt("clipAngle"),mt("clipExtent"),mt("fitExtent"),mt("fitHeight"),mt("fitSize"),mt("fitWidth"),mt("scale"),mt("translate"),mt("precision"),at.scale(249.5)},g.geoGingery=function(){var Ne=6,He=30*I,$e=t(He),at=h(He),mt=m.geoProjectionMutator(Re),dt=mt(He,Ne),Mt=dt.stream,Jt=-t(.01*I),$t=h(.01*I);return dt.radius=function(Wt){return arguments.length?($e=t(He=Wt*I),at=h(He),mt(He,Ne)):He*A},dt.lobes=function(Wt){return arguments.length?mt(He,Ne=+Wt):Ne},dt.stream=function(Wt){var tr=dt.rotate(),ur=Mt(Wt),mr=(dt.rotate([0,0]),Mt(Wt));return dt.rotate(tr),ur.sphere=function(){mr.polygonStart(),mr.lineStart();for(var yr=0,Pr=2*x/Ne,nn=0;yr<Ne;++yr,nn-=Pr)mr.point(n($t*t(nn),Jt)*A,P($t*h(nn))*A),mr.point(n(at*t(nn-Pr/2),$e)*A,P(at*h(nn-Pr/2))*A);mr.lineEnd(),mr.polygonEnd()},ur},dt.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},g.geoGingeryRaw=Re,g.geoGinzburg4=function(){return m.geoProjection(Ie).scale(149.995)},g.geoGinzburg4Raw=Ie,g.geoGinzburg5=function(){return m.geoProjection(Ce).scale(153.93)},g.geoGinzburg5Raw=Ce,g.geoGinzburg6=function(){return m.geoProjection(Je).scale(130.945)},g.geoGinzburg6Raw=Je,g.geoGinzburg8=function(){return m.geoProjection(it).scale(131.747)},g.geoGinzburg8Raw=it,g.geoGinzburg9=function(){return m.geoProjection(ht).scale(131.087)},g.geoGinzburg9Raw=ht,g.geoGringorten=function(){return m.geoProjection(ut(kt)).scale(239.75)},g.geoGringortenRaw=kt,g.geoGuyou=function(){return m.geoProjection(ut(Et)).scale(151.496)},g.geoGuyouRaw=Et,g.geoHammer=function(){var Ne=2,He=m.geoProjectionMutator(N),$e=He(Ne);return $e.coefficient=function(at){return arguments.length?He(Ne=+at):Ne},$e.scale(169.529)},g.geoHammerRaw=N,g.geoHammerRetroazimuthal=function(){var Ne=0,He=m.geoProjectionMutator(Ze),$e=He(Ne),at=$e.rotate,mt=$e.stream,dt=m.geoCircle();return $e.parallel=function(Mt){if(!arguments.length)return Ne*A;var Jt=$e.rotate();return He(Ne=Mt*I).rotate(Jt)},$e.rotate=function(Mt){return arguments.length?(at.call($e,[Mt[0],Mt[1]-Ne*A]),dt.center([-Mt[0],-Mt[1]]),$e):((Mt=at.call($e))[1]+=Ne*A,Mt)},$e.stream=function(Mt){return(Mt=mt(Mt)).sphere=function(){Mt.polygonStart();var Jt,$t=dt.radius(89.99)().coordinates[0],Wt=$t.length-1,tr=-1;for(Mt.lineStart();++tr<Wt;)Mt.point((Jt=$t[tr])[0],Jt[1]);for(Mt.lineEnd(),Wt=($t=dt.radius(90.01)().coordinates[0]).length-1,Mt.lineStart();--tr>=0;)Mt.point((Jt=$t[tr])[0],Jt[1]);Mt.lineEnd(),Mt.polygonEnd()},Mt},$e.scale(79.4187).parallel(45).clipAngle(179.999)},g.geoHammerRetroazimuthalRaw=Ze,g.geoHealpix=function(){var Ne=4,He=m.geoProjectionMutator(Gt),$e=He(Ne),at=$e.stream;return $e.lobes=function(mt){return arguments.length?He(Ne=+mt):Ne},$e.stream=function(mt){var dt=$e.rotate(),Mt=at(mt),Jt=($e.rotate([0,0]),at(mt));return $e.rotate(dt),Mt.sphere=function(){var $t,Wt;m.geoStream(($t=180/Ne,Wt=[].concat(b.range(-180,180+$t/2,$t).map(ze),b.range(180,-180-$t/2,-$t).map(st)),{type:"Polygon",coordinates:[$t===180?Wt.map(yt):Wt]}),Jt)},Mt},$e.scale(239.75)},g.geoHealpixRaw=Gt,g.geoHill=function(){var Ne=1,He=m.geoProjectionMutator(Dt),$e=He(Ne);return $e.ratio=function(at){return arguments.length?He(Ne=+at):Ne},$e.scale(167.774).center([0,18.67])},g.geoHillRaw=Dt,g.geoHomolosine=function(){return m.geoProjection(or).scale(152.63)},g.geoHomolosineRaw=or,g.geoHufnagel=function(){var Ne=1,He=0,$e=45*I,at=2,mt=m.geoProjectionMutator(Ut),dt=mt(Ne,He,$e,at);return dt.a=function(Mt){return arguments.length?mt(Ne=+Mt,He,$e,at):Ne},dt.b=function(Mt){return arguments.length?mt(Ne,He=+Mt,$e,at):He},dt.psiMax=function(Mt){return arguments.length?mt(Ne,He,$e=+Mt*I,at):$e*A},dt.ratio=function(Mt){return arguments.length?mt(Ne,He,$e,at=+Mt):at},dt.scale(180.739)},g.geoHufnagelRaw=Ut,g.geoHyperelliptical=function(){var Ne=0,He=2.5,$e=1.183136,at=m.geoProjectionMutator(sr),mt=at(Ne,He,$e);return mt.alpha=function(dt){return arguments.length?at(Ne=+dt,He,$e):Ne},mt.k=function(dt){return arguments.length?at(Ne,He=+dt,$e):He},mt.gamma=function(dt){return arguments.length?at(Ne,He,$e=+dt):$e},mt.scale(152.63)},g.geoHyperellipticalRaw=sr,g.geoInterrupt=lr,g.geoInterruptedBoggs=function(){return lr(pe,hr).scale(160.857)},g.geoInterruptedHomolosine=function(){return lr(or,Or).scale(152.63)},g.geoInterruptedMollweide=function(){return lr(ne,dr).scale(169.529)},g.geoInterruptedMollweideHemispheres=function(){return lr(ne,Fr).scale(169.529).rotate([20,0])},g.geoInterruptedSinuMollweide=function(){return lr(jt,tn,j).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},g.geoInterruptedSinusoidal=function(){return lr(de,rn).scale(152.63).rotate([-20,0])},g.geoKavrayskiy7=function(){return m.geoProjection(An).scale(158.837)},g.geoKavrayskiy7Raw=An,g.geoLagrange=function(){var Ne=.5,He=m.geoProjectionMutator(Ln),$e=He(Ne);return $e.spacing=function(at){return arguments.length?He(Ne=+at):Ne},$e.scale(124.75)},g.geoLagrangeRaw=Ln,g.geoLarrivee=function(){return m.geoProjection(Vr).scale(97.2672)},g.geoLarriveeRaw=Vr,g.geoLaskowski=function(){return m.geoProjection(Ir).scale(139.98)},g.geoLaskowskiRaw=Ir,g.geoLittrow=function(){return m.geoProjection(xr).scale(144.049).clipAngle(89.999)},g.geoLittrowRaw=xr,g.geoLoximuthal=function(){return ce(Nr).parallel(40).scale(158.837)},g.geoLoximuthalRaw=Nr,g.geoMiller=function(){return m.geoProjection(en).scale(108.318)},g.geoMillerRaw=en,g.geoModifiedStereographic=Pt,g.geoModifiedStereographicRaw=Qr,g.geoModifiedStereographicAlaska=function(){return Pt(yn,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},g.geoModifiedStereographicGs48=function(){return Pt(un,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},g.geoModifiedStereographicGs50=function(){return Pt($r,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},g.geoModifiedStereographicMiller=function(){return Pt(In,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},g.geoModifiedStereographicLee=function(){return Pt(Qt,[165,10]).scale(250).clipAngle(130).center([-165,-10])},g.geoMollweide=function(){return m.geoProjection(ne).scale(169.529)},g.geoMollweideRaw=ne,g.geoMtFlatPolarParabolic=function(){return m.geoProjection(wr).scale(164.859)},g.geoMtFlatPolarParabolicRaw=wr,g.geoMtFlatPolarQuartic=function(){return m.geoProjection(qr).scale(188.209)},g.geoMtFlatPolarQuarticRaw=qr,g.geoMtFlatPolarSinusoidal=function(){return m.geoProjection(Ur).scale(166.518)},g.geoMtFlatPolarSinusoidalRaw=Ur,g.geoNaturalEarth2=function(){return m.geoProjection(br).scale(175.295)},g.geoNaturalEarth2Raw=br,g.geoNellHammer=function(){return m.geoProjection(_r).scale(152.63)},g.geoNellHammerRaw=_r,g.geoInterruptedQuarticAuthalic=function(){return lr(N(1/0),Ar).rotate([20,0]).scale(152.63)},g.geoNicolosi=function(){return m.geoProjection(Mr).scale(127.267)},g.geoNicolosiRaw=Mr,g.geoPatterson=function(){return m.geoProjection(Cr).scale(139.319)},g.geoPattersonRaw=Cr,g.geoPolyconic=function(){return m.geoProjection(Gr).scale(103.74)},g.geoPolyconicRaw=Gr,g.geoPolyhedral=zr,g.geoPolyhedralButterfly=function(Ne){Ne=Ne||function($e){var at=m.geoCentroid({type:"MultiPoint",coordinates:$e});return m.geoGnomonic().scale(1).translate([0,0]).rotate([-at[0],-at[1]])};var He=Pn.map(function($e){return{face:$e,project:Ne($e)}});return[-1,0,0,1,0,1,4,5].forEach(function($e,at){var mt=He[$e];mt&&(mt.children||(mt.children=[])).push(He[at])}),zr(He[0],function($e,at){return He[$e<-x/2?at<0?6:4:$e<0?at<0?2:0:$e<x/2?at<0?3:1:at<0?7:5]}).angle(-30).scale(101.858).center([0,45])},g.geoPolyhedralCollignon=function(Ne){Ne=Ne||function($e){var at=m.geoCentroid({type:"MultiPoint",coordinates:$e});return m.geoProjection(qn).translate([0,0]).scale(1).rotate(at[1]>0?[-at[0],0]:[180-at[0],180])};var He=Pn.map(function($e){return{face:$e,project:Ne($e)}});return[-1,0,0,1,0,1,4,5].forEach(function($e,at){var mt=He[$e];mt&&(mt.children||(mt.children=[])).push(He[at])}),zr(He[0],function($e,at){return He[$e<-x/2?at<0?6:4:$e<0?at<0?2:0:$e<x/2?at<0?3:1:at<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])},g.geoPolyhedralWaterman=function(Ne){Ne=Ne||function(dt){var Mt=dt.length===6?m.geoCentroid({type:"MultiPoint",coordinates:dt}):dt[0];return m.geoGnomonic().scale(1).translate([0,0]).rotate([-Mt[0],-Mt[1]])};var He=Pn.map(function(dt){for(var Mt,Jt=dt.map(ua),$t=Jt.length,Wt=Jt[$t-1],tr=[],ur=0;ur<$t;++ur)Mt=Jt[ur],tr.push(ea([.9486832980505138*Wt[0]+.31622776601683794*Mt[0],.9486832980505138*Wt[1]+.31622776601683794*Mt[1],.9486832980505138*Wt[2]+.31622776601683794*Mt[2]]),ea([.9486832980505138*Mt[0]+.31622776601683794*Wt[0],.9486832980505138*Mt[1]+.31622776601683794*Wt[1],.9486832980505138*Mt[2]+.31622776601683794*Wt[2]])),Wt=Mt;return tr}),$e=[],at=[-1,0,0,1,0,1,4,5];He.forEach(function(dt,Mt){for(var Jt,$t,Wt=Pn[Mt],tr=Wt.length,ur=$e[Mt]=[],mr=0;mr<tr;++mr)He.push([Wt[mr],dt[(2*mr+2)%(2*tr)],dt[(2*mr+1)%(2*tr)]]),at.push(Mt),ur.push((Jt=ua(dt[(2*mr+2)%(2*tr)]),$t=ua(dt[(2*mr+1)%(2*tr)]),[Jt[1]*$t[2]-Jt[2]*$t[1],Jt[2]*$t[0]-Jt[0]*$t[2],Jt[0]*$t[1]-Jt[1]*$t[0]]))});var mt=He.map(function(dt){return{project:Ne(dt),face:dt}});return at.forEach(function(dt,Mt){var Jt=mt[dt];Jt&&(Jt.children||(Jt.children=[])).push(mt[Mt])}),zr(mt[0],function(dt,Mt){var Jt=t(Mt),$t=[Jt*t(dt),Jt*h(dt),h(Mt)],Wt=dt<-x/2?Mt<0?6:4:dt<0?Mt<0?2:0:dt<x/2?Mt<0?3:1:Mt<0?7:5,tr=$e[Wt];return mt[vn(tr[0],$t)<0?8+3*Wt:vn(tr[1],$t)<0?8+3*Wt+1:vn(tr[2],$t)<0?8+3*Wt+2:Wt]}).angle(-30).scale(110.625).center([0,45])},g.geoProject=function(Ne,He){var $e,at=He.stream;if(!at)throw new Error("invalid projection");switch(Ne&&Ne.type){case"Feature":$e=ei;break;case"FeatureCollection":$e=Ei;break;default:$e=gi}return $e(Ne,at)},g.geoGringortenQuincuncial=function(){return Vi(kt).scale(176.423)},g.geoPeirceQuincuncial=Gi,g.geoPierceQuincuncial=Gi,g.geoQuantize=function(Ne,He){if(!(0<=(He=+He)&&He<=20))throw new Error("invalid digits");function $e(Wt){var tr=Wt.length,ur=2,mr=new Array(tr);for(mr[0]=+Wt[0].toFixed(He),mr[1]=+Wt[1].toFixed(He);ur<tr;)mr[ur]=Wt[ur],++ur;return mr}function at(Wt){return Wt.map($e)}function mt(Wt){for(var tr=$e(Wt[0]),ur=[tr],mr=1;mr<Wt.length;mr++){var yr=$e(Wt[mr]);(yr.length>
202||yr[0]!=tr[0]||yr[1]!=tr[1])&&(ur.push(yr),tr=yr)}return ur.length===1&&Wt.length>1&&ur.push($e(Wt[Wt.length-1])),ur}function dt(Wt){return Wt.map(mt)}function Mt(Wt){if(Wt==null)return Wt;var tr;switch(Wt.type){case"GeometryCollection":tr={type:"GeometryCollection",geometries:Wt.geometries.map(Mt)};break;case"Point":tr={type:"Point",coordinates:$e(Wt.coordinates)};break;case"MultiPoint":tr={type:Wt.type,coordinates:at(Wt.coordinates)};break;case"LineString":tr={type:Wt.type,coordinates:mt(Wt.coordinates)};break;case"MultiLineString":case"Polygon":tr={type:Wt.type,coordinates:dt(Wt.coordinates)};break;case"MultiPolygon":tr={type:"MultiPolygon",coordinates:Wt.coordinates.map(dt)};break;default:return Wt}return Wt.bbox!=null&&(tr.bbox=Wt.bbox),tr}function Jt(Wt){var tr={type:"Feature",properties:Wt.properties,geometry:Mt(Wt.geometry)};return Wt.id!=null&&(tr.id=Wt.id),Wt.bbox!=null&&(tr.bbox=Wt.bbox),tr}if(Ne!=null)switch(Ne.type){case"Feature":return Jt(Ne);case"FeatureCollection":var $t={type:"FeatureCollection",features:Ne.features.map(Jt)};return Ne.bbox!=null&&($t.bbox=Ne.bbox),$t;default:return Mt(Ne)}return Ne},g.geoQuincuncial=Vi,g.geoRectangularPolyconic=function(){return ce(Ro).scale(131.215)},g.geoRectangularPolyconicRaw=Ro,g.geoRobinson=function(){return m.geoProjection(wo).scale(152.63)},g.geoRobinsonRaw=wo,g.geoSatellite=function(){var Ne=2,He=0,$e=m.geoProjectionMutator(lo),at=$e(Ne,He);return at.distance=function(mt){return arguments.length?$e(Ne=+mt,He):Ne},at.tilt=function(mt){return arguments.length?$e(Ne,He=mt*I):He*A},at.scale(432.147).clipAngle(S(1/Ne)*A-1e-6)},g.geoSatelliteRaw=lo,g.geoSinuMollweide=function(){return m.geoProjection(jt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},g.geoSinuMollweideRaw=jt,g.geoSinusoidal=function(){return m.geoProjection(de).scale(152.63)},g.geoSinusoidalRaw=de,g.geoStitch=function(Ne){if(Ne==null)return Ne;switch(Ne.type){case"Feature":return Ua(Ne);case"FeatureCollection":var He={type:"FeatureCollection",features:Ne.features.map(Ua)};return Ne.bbox!=null&&(He.bbox=Ne.bbox),He;default:return cs(Ne)}},g.geoTimes=function(){return m.geoProjection(Jo).scale(146.153)},g.geoTimesRaw=Jo,g.geoTwoPointAzimuthal=ms,g.geoTwoPointAzimuthalRaw=_s,g.geoTwoPointAzimuthalUsa=function(){return ms([-158,21.5],[-77,39]).clipAngle(60).scale(400)},g.geoTwoPointEquidistant=To,g.geoTwoPointEquidistantRaw=ws,g.geoTwoPointEquidistantUsa=function(){return To([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},g.geoVanDerGrinten=function(){return m.geoProjection(ko).scale(79.4183)},g.geoVanDerGrintenRaw=ko,g.geoVanDerGrinten2=function(){return m.geoProjection(Fo).scale(79.4183)},g.geoVanDerGrinten2Raw=Fo,g.geoVanDerGrinten3=function(){return m.geoProjection(Bo).scale(79.4183)},g.geoVanDerGrinten3Raw=Bo,g.geoVanDerGrinten4=function(){return m.geoProjection(No).scale(127.16)},g.geoVanDerGrinten4Raw=No,g.geoWagner=uo,g.geoWagner7=function(){return uo().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},g.geoWagnerRaw=Ko,g.geoWagner4=function(){return m.geoProjection(jo).scale(176.84)},g.geoWagner4Raw=jo,g.geoWagner6=function(){return m.geoProjection(fs).scale(152.63)},g.geoWagner6Raw=fs,g.geoWiechel=function(){return m.geoProjection(Mo).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},g.geoWiechelRaw=Mo,g.geoWinkel3=function(){return m.geoProjection(Ba).scale(158.837)},g.geoWinkel3Raw=Ba,Object.defineProperty(g,"__esModule",{value:!0})})},{"d3-array":107,"d3-geo":114}],114:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?m(te,y("d3-array")):m((g=g||self).d3=g.d3||{},g.d3)})(this,function(g,m){function b(){return new v}function v(){this.reset()}v.prototype={constructor:v,reset:function(){this.s=this.t=0},add:function(ft){n(e,ft,this.t),n(this,e.s,this.s),this.s?this.t+=e.t:this.s=e.t},valueOf:function(){return this.s}};var e=new v;function n(ft,Rt,nr){var Ht=ft.s=Rt+nr,ir=Ht-Rt,Lr=Ht-ir;ft.t=Rt-Lr+(nr-ir)}var t=1e-6,o=Math.PI,r=o/2,d=o/4,c=2*o,i=180/o,u=o/180,f=Math.abs,s=Math.atan,h=Math.atan2,p=Math.cos,a=Math.ceil,x=Math.exp,l=Math.log,w=Math.pow,_=Math.sin,T=Math.sign||function(ft){return ft>0?1:ft<0?-1:0},k=Math.sqrt,L=Math.tan;function A(ft){return ft>1?0:ft<-1?o:Math.acos(ft)}function I(ft){return ft>1?r:ft<-1?-r:Math.asin(ft)}function P(ft){return(ft=_(ft/2))*ft}function S(){}function E(ft,Rt){ft&&F.hasOwnProperty(ft.type)&&F[ft.type](ft,Rt)}var D={Feature:function(ft,Rt){E(ft.geometry,Rt)},FeatureCollection:function(ft,Rt){for(var nr=ft.features,Ht=-1,ir=nr.length;++Ht<ir;)E(nr[Ht].geometry,Rt)}},F={Sphere:function(ft,Rt){Rt.sphere()},Point:function(ft,Rt){ft=ft.coordinates,Rt.point(ft[0],ft[1],ft[2])}
vendor: 5,665 bytes, line 20
20,MultiPoint:function(ft,Rt){for(var nr=ft.coordinates,Ht=-1,ir=nr.length;++Ht<ir;)ft=nr[Ht],Rt.point(ft[0],ft[1],ft[2])},LineString:function(ft,Rt){H(ft.coordinates,Rt,0)},MultiLineString:function(ft,Rt){for(var nr=ft.coordinates,Ht=-1,ir=nr.length;++Ht<ir;)H(nr[Ht],Rt,0)},Polygon:function(ft,Rt){V(ft.coordinates,Rt)},MultiPolygon:function(ft,Rt){for(var nr=ft.coordinates,Ht=-1,ir=nr.length;++Ht<ir;)V(nr[Ht],Rt)},GeometryCollection:function(ft,Rt){for(var nr=ft.geometries,Ht=-1,ir=nr.length;++Ht<ir;)E(nr[Ht],Rt)}};function H(ft,Rt,nr){var Ht,ir=-1,Lr=ft.length-nr;for(Rt.lineStart();++ir<Lr;)Ht=ft[ir],Rt.point(Ht[0],Ht[1],Ht[2]);Rt.lineEnd()}function V(ft,Rt){var nr=-1,Ht=ft.length;for(Rt.polygonStart();++nr<Ht;)H(ft[nr],Rt,1);Rt.polygonEnd()}function Z(ft,Rt){ft&&D.hasOwnProperty(ft.type)?D[ft.type](ft,Rt):E(ft,Rt)}var K,q,W,$,R,N=b(),U=b(),Q={point:S,lineStart:S,lineEnd:S,polygonStart:function(){N.reset(),Q.lineStart=j,Q.lineEnd=X},polygonEnd:function(){var ft=+N;U.add(ft<0?c+ft:ft),this.lineStart=this.lineEnd=this.point=S},sphere:function(){U.add(c)}};function j(){Q.point=J}function X(){re(K,q)}function J(ft,Rt){Q.point=re,K=ft,q=Rt,W=ft*=u,$=p(Rt=(Rt*=u)/2+d),R=_(Rt)}function re(ft,Rt){var nr=(ft*=u)-W,Ht=nr>=0?1:-1,ir=Ht*nr,Lr=p(Rt=(Rt*=u)/2+d),Dr=_(Rt),Yr=R*Dr,sn=$*Lr+Yr*p(ir),an=Yr*Ht*_(ir);N.add(h(an,sn)),W=ft,$=Lr,R=Dr}function ne(ft){return[h(ft[1],ft[0]),I(ft[2])]}function se(ft){var Rt=ft[0],nr=ft[1],Ht=p(nr);return[Ht*p(Rt),Ht*_(Rt),_(nr)]}function oe(ft,Rt){return ft[0]*Rt[0]+ft[1]*Rt[1]+ft[2]*Rt[2]}function pe(ft,Rt){return[ft[1]*Rt[2]-ft[2]*Rt[1],ft[2]*Rt[0]-ft[0]*Rt[2],ft[0]*Rt[1]-ft[1]*Rt[0]]}function ce(ft,Rt){ft[0]+=Rt[0],ft[1]+=Rt[1],ft[2]+=Rt[2]}function de(ft,Rt){return[ft[0]*Rt,ft[1]*Rt,ft[2]*Rt]}function xe(ft){var Rt=k(ft[0]*ft[0]+ft[1]*ft[1]+ft[2]*ft[2]);ft[0]/=Rt,ft[1]/=Rt,ft[2]/=Rt}var we,be,Ee,fe,me,Te,_e,Ae,Pe,De,Ve,Qe,Oe,Ue,Ge,Ye,tt,lt,vt,It,St,rt,et,Tt,Vt,Kt,Be=b(),qe={point:Re,lineStart:ke,lineEnd:Le,polygonStart:function(){qe.point=Ie,qe.lineStart=Ce,qe.lineEnd=Je,Be.reset(),Q.polygonStart()},polygonEnd:function(){Q.polygonEnd(),qe.point=Re,qe.lineStart=ke,qe.lineEnd=Le,N<0?(we=-(Ee=180),be=-(fe=90)):Be>t?fe=90:Be<-t&&(be=-90),De[0]=we,De[1]=Ee},sphere:function(){we=-(Ee=180),be=-(fe=90)}};function Re(ft,Rt){Pe.push(De=[we=ft,Ee=ft]),Rt<be&&(be=Rt),Rt>fe&&(fe=Rt)}function Xe(ft,Rt){var nr=se([ft*u,Rt*u]);if(Ae){var Ht=pe(Ae,nr),ir=pe([Ht[1],-Ht[0],0],Ht);xe(ir),ir=ne(ir);var Lr,Dr=ft-me,Yr=Dr>0?1:-1,sn=ir[0]*i*Yr,an=f(Dr)>180;an^(Yr*me<sn&&sn<Yr*ft)?(Lr=ir[1]*i)>fe&&(fe=Lr):an^(Yr*me<(sn=(sn+360)%360-180)&&sn<Yr*ft)?(Lr=-ir[1]*i)<be&&(be=Lr):(Rt<be&&(be=Rt),Rt>fe&&(fe=Rt)),an?ft<me?it(we,ft)>it(we,Ee)&&(Ee=ft):it(ft,Ee)>it(we,Ee)&&(we=ft):Ee>=we?(ft<we&&(we=ft),ft>Ee&&(Ee=ft)):ft>me?it(we,ft)>it(we,Ee)&&(Ee=ft):it(ft,Ee)>it(we,Ee)&&(we=ft)}else Pe.push(De=[we=ft,Ee=ft]);Rt<be&&(be=Rt),Rt>fe&&(fe=Rt),Ae=nr,me=ft}function ke(){qe.point=Xe}function Le(){De[0]=we,De[1]=Ee,qe.point=Re,Ae=null}function Ie(ft,Rt){if(Ae){var nr=ft-me;Be.add(f(nr)>180?nr+(nr>0?360:-360):nr)}else Te=ft,_e=Rt;Q.point(ft,Rt),Xe(ft,Rt)}function Ce(){Q.lineStart()}function Je(){Ie(Te,_e),Q.lineEnd(),f(Be)>t&&(we=-(Ee=180)),De[0]=we,De[1]=Ee,Ae=null}function it(ft,Rt){return(Rt-=ft)<0?Rt+360:Rt}function ht(ft,Rt){return ft[0]-Rt[0]}function ut(ft,Rt){return ft[0]<=ft[1]?ft[0]<=Rt&&Rt<=ft[1]:Rt<ft[0]||ft[1]<Rt}var kt={sphere:S,point:ot,lineStart:Et,lineEnd:Ct,polygonStart:function(){kt.lineStart=zt,kt.lineEnd=Gt},polygonEnd:function(){kt.lineStart=Et,kt.lineEnd=Ct}};function ot(ft,Rt){ft*=u;var nr=p(Rt*=u);Lt(nr*p(ft),nr*_(ft),_(Rt))}function Lt(ft,Rt,nr){++Ve,Oe+=(ft-Oe)/Ve,Ue+=(Rt-Ue)/Ve,Ge+=(nr-Ge)/Ve}function Et(){kt.point=Ze}function Ze(ft,Rt){ft*=u;var nr=p(Rt*=u);Tt=nr*p(ft),Vt=nr*_(ft),Kt=_(Rt),kt.point=pt,Lt(Tt,Vt,Kt)}function pt(ft,Rt){ft*=u;var nr=p(Rt*=u),Ht=nr*p(ft),ir=nr*_(ft),Lr=_(Rt),Dr=h(k((Dr=Vt*Lr-Kt*ir)*Dr+(Dr=Kt*Ht-Tt*Lr)*Dr+(Dr=Tt*ir-Vt*Ht)*Dr),Tt*Ht+Vt*ir+Kt*Lr);Qe+=Dr,Ye+=Dr*(Tt+(Tt=Ht)),tt+=Dr*(Vt+(Vt=ir)),lt+=Dr*(Kt+(Kt=Lr)),Lt(Tt,Vt,Kt)}function Ct(){kt.point=ot}function zt(){kt.point=ze}function Gt(){st(rt,et),kt.point=ot}function ze(ft,Rt){rt=ft,et=Rt,ft*=u,Rt*=u,kt.point=st;var nr=p(Rt);Tt=nr*p(ft),Vt=nr*_(ft),Kt=_(Rt),Lt(Tt,Vt,Kt)}function st(ft,Rt){ft*=u;var nr=p(Rt*=u),Ht=nr*p(ft),ir=nr*_(ft),Lr=_(Rt),Dr=Vt*Lr-Kt*ir,Yr=Kt*Ht-Tt*Lr,sn=Tt*ir-Vt*Ht,an=k(Dr*Dr+Yr*Yr+sn*sn),gn=I(an),Tn=an&&-gn/an;vt+=Tn*Dr,It+=Tn*Yr,St+=Tn*sn,Qe+=gn,Ye+=gn*(Tt+(Tt=Ht)),tt+=gn*(Vt+(Vt=ir)),lt+=gn*(Kt+(Kt=Lr)),Lt(Tt,Vt,Kt)}function yt(ft){return function(){return ft}}function Dt(ft,Rt){function nr(Ht,ir){return Ht=ft(Ht,ir),Rt(Ht[0],Ht[1])}return ft.invert&&Rt.invert&&(nr.invert=function(Ht,ir){return(Ht=Rt.invert(Ht,ir))&&ft.invert(Ht[0],Ht[1])}),nr}function jt(ft,Rt){return[f(ft)>o?ft+Math.round(-ft/c)*c:ft,Rt]}function or(ft,Rt,nr){return(ft%=c)?Rt||nr?Dt(Xt(ft),sr(Rt,nr)):Xt(ft):Rt||nr?sr(Rt,nr):jt}function Ut(ft){return function(Rt,nr){return[(Rt+=ft)>o?Rt-c:Rt<-o?Rt+c:Rt,nr]}}function Xt(ft){var Rt=Ut(ft);return Rt.invert=Ut(-ft),Rt}function sr(ft,Rt){var nr=p(ft),Ht=_(ft),ir=p(Rt),Lr=_(Rt);function Dr(Yr,sn){var an=p(sn),gn=p(Yr)*an,Tn=_(Yr)*an,ln=_(sn),kn=ln*nr+gn*Ht;return[h(Tn*ir-kn*Lr,gn*nr-ln*Ht),I(kn*ir+Tn*Lr)]}return Dr.invert=function(Yr,sn){var an=p(sn),gn=p(Yr)*an,Tn=_(Yr)*an,ln=_(sn),kn=ln*ir-Tn*Lr;return[h(Tn*ir+ln*Lr,gn*nr+kn*Ht),I(kn*nr-gn*Ht)]},Dr}function vr(ft){function Rt(nr){return(nr=ft(nr[0]*u,nr[1]*u))[0]*=i,nr[1]*=i,nr}return ft=or(ft[0]*u,ft[1]*u,ft.length>2?ft[2]*u:0),Rt.invert=function(nr){return(nr=ft.invert(nr[0]*u,nr[1]*u))[0]*=i,nr[1]*=i,nr},Rt}function pr(ft,Rt,nr,Ht,ir,Lr){if(nr){var Dr=p(Rt),Yr=_(Rt),sn=Ht*nr;
vendor: 7,726 bytes, line 20
20ir==null?(ir=Rt+Ht*c,Lr=Rt-sn/2):(ir=ar(Dr,ir),Lr=ar(Dr,Lr),(Ht>0?ir<Lr:ir>Lr)&&(ir+=Ht*c));for(var an,gn=ir;Ht>0?gn>Lr:gn<Lr;gn-=sn)an=ne([Dr,-Yr*p(gn),-Yr*_(gn)]),ft.point(an[0],an[1])}}function ar(ft,Rt){(Rt=se(Rt))[0]-=ft,xe(Rt);var nr=A(-Rt[1]);return((-Rt[2]<0?-nr:nr)+c-t)%c}function lr(){var ft,Rt=[];return{point:function(nr,Ht,ir){ft.push([nr,Ht,ir])},lineStart:function(){Rt.push(ft=[])},lineEnd:S,rejoin:function(){Rt.length>1&&Rt.push(Rt.pop().concat(Rt.shift()))},result:function(){var nr=Rt;return Rt=[],ft=null,nr}}}function hr(ft,Rt){return f(ft[0]-Rt[0])<t&&f(ft[1]-Rt[1])<t}function Or(ft,Rt,nr,Ht){this.x=ft,this.z=Rt,this.o=nr,this.e=Ht,this.v=!1,this.n=this.p=null}function dr(ft,Rt,nr,Ht,ir){var Lr,Dr,Yr=[],sn=[];if(ft.forEach(function(Dn){if(!((jn=Dn.length-1)<=0)){var jn,$n,Zr=Dn[0],Jn=Dn[jn];if(hr(Zr,Jn)){if(!Zr[2]&&!Jn[2]){for(ir.lineStart(),Lr=0;Lr<jn;++Lr)ir.point((Zr=Dn[Lr])[0],Zr[1]);return void ir.lineEnd()}Jn[0]+=2*t}Yr.push($n=new Or(Zr,Dn,null,!0)),sn.push($n.o=new Or(Zr,null,$n,!1)),Yr.push($n=new Or(Jn,Dn,null,!1)),sn.push($n.o=new Or(Jn,null,$n,!0))}}),Yr.length){for(sn.sort(Rt),Fr(Yr),Fr(sn),Lr=0,Dr=sn.length;Lr<Dr;++Lr)sn[Lr].e=nr=!nr;for(var an,gn,Tn=Yr[0];;){for(var ln=Tn,kn=!0;ln.v;)if((ln=ln.n)===Tn)return;an=ln.z,ir.lineStart();do{if(ln.v=ln.o.v=!0,ln.e){if(kn)for(Lr=0,Dr=an.length;Lr<Dr;++Lr)ir.point((gn=an[Lr])[0],gn[1]);else Ht(ln.x,ln.n.x,1,ir);ln=ln.n}else{if(kn)for(an=ln.p.z,Lr=an.length-1;Lr>=0;--Lr)ir.point((gn=an[Lr])[0],gn[1]);else Ht(ln.x,ln.p.x,-1,ir);ln=ln.p}an=(ln=ln.o).z,kn=!kn}while(!ln.v);ir.lineEnd()}}}function Fr(ft){if(Rt=ft.length){for(var Rt,nr,Ht=0,ir=ft[0];++Ht<Rt;)ir.n=nr=ft[Ht],nr.p=ir,ir=nr;ir.n=nr=ft[0],nr.p=ir}}jt.invert=jt;var tn=b();function rn(ft){return f(ft[0])<=o?ft[0]:T(ft[0])*((f(ft[0])+o)%c-o)}function An(ft,Rt){var nr=rn(Rt),Ht=Rt[1],ir=_(Ht),Lr=[_(nr),-p(nr),0],Dr=0,Yr=0;tn.reset(),ir===1?Ht=r+t:ir===-1&&(Ht=-r-t);for(var sn=0,an=ft.length;sn<an;++sn)if(Tn=(gn=ft[sn]).length)for(var gn,Tn,ln=gn[Tn-1],kn=rn(ln),Dn=ln[1]/2+d,jn=_(Dn),$n=p(Dn),Zr=0;Zr<Tn;++Zr,kn=Cn,jn=Xn,$n=xa,ln=Jn){var Jn=gn[Zr],Cn=rn(Jn),Bn=Jn[1]/2+d,Xn=_(Bn),xa=p(Bn),Ma=Cn-kn,Sn=Ma>=0?1:-1,La=Sn*Ma,Ta=La>o,fa=jn*Xn;if(tn.add(h(fa*Sn*_(La),$n*xa+fa*p(La))),Dr+=Ta?Ma+Sn*c:Ma,Ta^kn>=nr^Cn>=nr){var Ca=pe(se(ln),se(Jn));xe(Ca);var _a=pe(Lr,Ca);xe(_a);var Za=(Ta^Ma>=0?-1:1)*I(_a[2]);(Ht>Za||Ht===Za&&(Ca[0]||Ca[1]))&&(Yr+=Ta^Ma>=0?1:-1)}}return(Dr<-t||Dr<t&&tn<-t)^1&Yr}function Ln(ft,Rt,nr,Ht){return function(ir){var Lr,Dr,Yr,sn=Rt(ir),an=lr(),gn=Rt(an),Tn=!1,ln={point:kn,lineStart:jn,lineEnd:$n,polygonStart:function(){ln.point=Zr,ln.lineStart=Jn,ln.lineEnd=Cn,Dr=[],Lr=[]},polygonEnd:function(){ln.point=kn,ln.lineStart=jn,ln.lineEnd=$n,Dr=m.merge(Dr);var Bn=An(Lr,Ht);Dr.length?(Tn||(ir.polygonStart(),Tn=!0),dr(Dr,Vr,Bn,nr,ir)):Bn&&(Tn||(ir.polygonStart(),Tn=!0),ir.lineStart(),nr(null,null,1,ir),ir.lineEnd()),Tn&&(ir.polygonEnd(),Tn=!1),Dr=Lr=null},sphere:function(){ir.polygonStart(),ir.lineStart(),nr(null,null,1,ir),ir.lineEnd(),ir.polygonEnd()}};function kn(Bn,Xn){ft(Bn,Xn)&&ir.point(Bn,Xn)}function Dn(Bn,Xn){sn.point(Bn,Xn)}function jn(){ln.point=Dn,sn.lineStart()}function $n(){ln.point=kn,sn.lineEnd()}function Zr(Bn,Xn){Yr.push([Bn,Xn]),gn.point(Bn,Xn)}function Jn(){gn.lineStart(),Yr=[]}function Cn(){Zr(Yr[0][0],Yr[0][1]),gn.lineEnd();var Bn,Xn,xa,Ma,Sn=gn.clean(),La=an.result(),Ta=La.length;if(Yr.pop(),Lr.push(Yr),Yr=null,Ta)if(1&Sn){if((Xn=(xa=La[0]).length-1)>0){for(Tn||(ir.polygonStart(),Tn=!0),ir.lineStart(),Bn=0;Bn<Xn;++Bn)ir.point((Ma=xa[Bn])[0],Ma[1]);ir.lineEnd()}}else Ta>1&&2&Sn&&La.push(La.pop().concat(La.shift())),Dr.push(La.filter(_n))}return ln}}function _n(ft){return ft.length>1}function Vr(ft,Rt){return((ft=ft.x)[0]<0?ft[1]-r-t:r-ft[1])-((Rt=Rt.x)[0]<0?Rt[1]-r-t:r-Rt[1])}var Ir=Ln(function(){return!0},function(ft){var Rt,nr=NaN,Ht=NaN,ir=NaN;return{lineStart:function(){ft.lineStart(),Rt=1},point:function(Lr,Dr){var Yr=Lr>0?o:-o,sn=f(Lr-nr);f(sn-o)<t?(ft.point(nr,Ht=(Ht+Dr)/2>0?r:-r),ft.point(ir,Ht),ft.lineEnd(),ft.lineStart(),ft.point(Yr,Ht),ft.point(Lr,Ht),Rt=0):ir!==Yr&&sn>=o&&(f(nr-ir)<t&&(nr-=ir*t),f(Lr-Yr)<t&&(Lr-=Yr*t),Ht=function(an,gn,Tn,ln){var kn,Dn,jn=_(an-Tn);return f(jn)>t?s((_(gn)*(Dn=p(ln))*_(Tn)-_(ln)*(kn=p(gn))*_(an))/(kn*Dn*jn)):(gn+ln)/2}(nr,Ht,Lr,Dr),ft.point(ir,Ht),ft.lineEnd(),ft.lineStart(),ft.point(Yr,Ht),Rt=0),ft.point(nr=Lr,Ht=Dr),ir=Yr},lineEnd:function(){ft.lineEnd(),nr=Ht=NaN},clean:function(){return 2-Rt}}},function(ft,Rt,nr,Ht){var ir;if(ft==null)ir=nr*r,Ht.point(-o,ir),Ht.point(0,ir),Ht.point(o,ir),Ht.point(o,0),Ht.point(o,-ir),Ht.point(0,-ir),Ht.point(-o,-ir),Ht.point(-o,0),Ht.point(-o,ir);else if(f(ft[0]-Rt[0])>t){var Lr=ft[0]<Rt[0]?o:-o;ir=nr*Lr/2,Ht.point(-Lr,ir),Ht.point(0,ir),Ht.point(Lr,ir)}else Ht.point(Rt[0],Rt[1])},[-o,-r]);function xr(ft){var Rt=p(ft),nr=6*u,Ht=Rt>0,ir=f(Rt)>t;function Lr(sn,an){return p(sn)*p(an)>Rt}function Dr(sn,an,gn){var Tn=[1,0,0],ln=pe(se(sn),se(an)),kn=oe(ln,ln),Dn=ln[0],jn=kn-Dn*Dn;if(!jn)return!gn&&sn;var $n=Rt*kn/jn,Zr=-Rt*Dn/jn,Jn=pe(Tn,ln),Cn=de(Tn,$n);ce(Cn,de(ln,Zr));var Bn=Jn,Xn=oe(Cn,Bn),xa=oe(Bn,Bn),Ma=Xn*Xn-xa*(oe(Cn,Cn)-1);if(!(Ma<0)){var Sn=k(Ma),La=de(Bn,(-Xn-Sn)/xa);if(ce(La,Cn),La=ne(La),!gn)return La;var Ta,fa=sn[0],Ca=an[0],_a=sn[1],Za=an[1];Ca<fa&&(Ta=fa,fa=Ca,Ca=Ta);var Kn=Ca-fa,Va=f(Kn-o)<t;if(!Va&&Za<_a&&(Ta=_a,_a=Za,Za=Ta),Va||Kn<t?Va?_a+Za>0^La[1]<(f(La[0]-fa)<t?_a:Za):_a<=La[1]&&La[1]<=Za:Kn>o^(fa<=La[0]&&La[0]<=Ca)){var zi=de(Bn,(-Xn+Sn)/xa);return ce(zi,Cn),[La,ne(zi)]}}}function Yr(sn,an){var gn=Ht?ft:o-ft,Tn=0;return sn<-gn?Tn|=1:sn>gn&&(Tn|=2),an<-gn?Tn|=4:an>gn&&(Tn|=8),Tn}return Ln(Lr,function(sn){var an,gn,Tn,ln,kn;return{lineStart:function(){ln=Tn=!1,kn=1},point:function(Dn,jn){var $n,Zr=[Dn,jn],Jn=Lr(Dn,jn),Cn=Ht?Jn?0:Yr(Dn,jn):Jn?Yr(Dn+(Dn<0?o:-o),jn):0;if(!an&&(ln=Tn=Jn)&&sn.lineStart(),Jn!==Tn&&(!($n=Dr(an,Zr))||hr(an,$n)||hr(Zr,$n))&&(Zr[2]=1),Jn!==Tn)kn=0,Jn?(sn.lineStart(),$n=Dr(Zr,an),sn.point($n[0],$n[1])):($n=Dr(an,Zr),sn.point($n[0],$n[1],2),sn.lineEnd()),an=$n;else if(ir&&an&&Ht^Jn){var Bn;Cn&gn||!(Bn=Dr(Zr,an,!0))||(kn=0,Ht?(sn.lineStart(),sn.point(Bn[0][0],Bn[0][1]),sn.point(Bn[1][0],Bn[1][1]),sn.lineEnd()):(sn.point(Bn[1][0],Bn[1][1]),sn.lineEnd(),sn.lineStart(),sn.point(Bn[0][0],Bn[0][1],3)))}!Jn||an&&hr(an,Zr)||sn.point(Zr[0],Zr[1]),an=Zr,Tn=Jn,gn=Cn},lineEnd:function(){Tn&&sn.lineEnd(),an=null},clean:function(){return kn|(ln&&Tn)<<1}}},function(sn,an,gn,Tn){pr(Tn,ft,nr,gn,sn,an)},Ht?[0,-ft]:[-o,ft-o])}function Nr(ft,Rt,nr,Ht){function ir(an,gn){return ft<=an&&an<=nr&&Rt<=gn&&gn<=Ht}function Lr(an,gn,Tn,ln){var kn=0,Dn=0;if(an==null||(kn=Dr(an,Tn))!==(Dn=Dr(gn,Tn))||sn(an,gn)<0^Tn>0)do ln.point(kn===0||kn===3?ft:nr,kn>1?Ht:Rt);while((kn=(kn+Tn+4)%4)!==Dn);else ln.point(gn[0],gn[1])}function Dr(an,gn){return f(an[0]-ft)<t?gn>0?0:3:f(an[0]-nr)<t?gn>0?2:1:f(an[1]-Rt)<t?gn>0?1:0:gn>0?3:2}function Yr(an,gn){return sn(an.x,gn.x)}function sn(an,gn){var Tn=Dr(an,1),ln=Dr(gn,1);return Tn!==ln?Tn-ln:Tn===0?gn[1]-an[1]:Tn===1?an[0]-gn[0]:Tn===2?an[1]-gn[1]:gn[0]-an[0]}return function(an){var gn,Tn,ln,kn,Dn,jn,$n,Zr,Jn,Cn,Bn,Xn=an,xa=lr(),Ma={point:Sn,lineStart:function(){Ma.point=La,Tn&&Tn.push(ln=[]),Cn=!0,Jn=!1,$n=Zr=NaN},lineEnd:function(){gn&&(La(kn,Dn),jn&&Jn&&xa.rejoin(),gn.push(xa.result())),Ma.point=Sn,Jn&&Xn.lineEnd()},polygonStart:function(){Xn=xa,gn=[],Tn=[],Bn=!0},polygonEnd:function(){var Ta=function(){for(var _a=0,Za=0,Kn=Tn.length;Za<Kn;++Za)for(var Va,zi,Go=Tn[Za],Co=1,fo=Go.length,da=Go[0],ci=da[0],ho=da[1];Co<fo;++Co)Va=ci,zi=ho,da=Go[Co],ci=da[0],ho=da[1],zi<=Ht?ho>Ht&&(ci-Va)*(Ht-zi)>(ho-zi)*(ft-Va)&&++_a:ho<=Ht&&(ci-Va)*(Ht-zi)<(ho-zi)*(ft-Va)&&--_a;return _a}(),fa=Bn&&Ta,Ca=(gn=m.merge(gn)).length;
vendor: 11,114 bytes, line 20
20(fa||Ca)&&(an.polygonStart(),fa&&(an.lineStart(),Lr(null,null,1,an),an.lineEnd()),Ca&&dr(gn,Yr,Ta,Lr,an),an.polygonEnd()),Xn=an,gn=Tn=ln=null}};function Sn(Ta,fa){ir(Ta,fa)&&Xn.point(Ta,fa)}function La(Ta,fa){var Ca=ir(Ta,fa);if(Tn&&ln.push([Ta,fa]),Cn)kn=Ta,Dn=fa,jn=Ca,Cn=!1,Ca&&(Xn.lineStart(),Xn.point(Ta,fa));else if(Ca&&Jn)Xn.point(Ta,fa);else{var _a=[$n=Math.max(-1e9,Math.min(1e9,$n)),Zr=Math.max(-1e9,Math.min(1e9,Zr))],Za=[Ta=Math.max(-1e9,Math.min(1e9,Ta)),fa=Math.max(-1e9,Math.min(1e9,fa))];(function(Kn,Va,zi,Go,Co,fo){var da,ci=Kn[0],ho=Kn[1],Ha=0,yi=1,Ni=Va[0]-ci,Ja=Va[1]-ho;if(da=zi-ci,Ni||!(da>0)){if(da/=Ni,Ni<0){if(da<Ha)return;da<yi&&(yi=da)}else if(Ni>0){if(da>yi)return;da>Ha&&(Ha=da)}if(da=Co-ci,Ni||!(da<0)){if(da/=Ni,Ni<0){if(da>yi)return;da>Ha&&(Ha=da)}else if(Ni>0){if(da<Ha)return;da<yi&&(yi=da)}if(da=Go-ho,Ja||!(da>0)){if(da/=Ja,Ja<0){if(da<Ha)return;da<yi&&(yi=da)}else if(Ja>0){if(da>yi)return;da>Ha&&(Ha=da)}if(da=fo-ho,Ja||!(da<0)){if(da/=Ja,Ja<0){if(da>yi)return;da>Ha&&(Ha=da)}else if(Ja>0){if(da<Ha)return;da<yi&&(yi=da)}return Ha>0&&(Kn[0]=ci+Ha*Ni,Kn[1]=ho+Ha*Ja),yi<1&&(Va[0]=ci+yi*Ni,Va[1]=ho+yi*Ja),!0}}}}})(_a,Za,ft,Rt,nr,Ht)?(Jn||(Xn.lineStart(),Xn.point(_a[0],_a[1])),Xn.point(Za[0],Za[1]),Ca||Xn.lineEnd(),Bn=!1):Ca&&(Xn.lineStart(),Xn.point(Ta,fa),Bn=!1)}$n=Ta,Zr=fa,Jn=Ca}return Ma}}var en,Qr,yn,un=b(),$r={sphere:S,point:S,lineStart:function(){$r.point=Qt,$r.lineEnd=In},lineEnd:S,polygonStart:S,polygonEnd:S};function In(){$r.point=$r.lineEnd=S}function Qt(ft,Rt){en=ft*=u,Qr=_(Rt*=u),yn=p(Rt),$r.point=Pt}function Pt(ft,Rt){ft*=u;var nr=_(Rt*=u),Ht=p(Rt),ir=f(ft-en),Lr=p(ir),Dr=Ht*_(ir),Yr=yn*nr-Qr*Ht*Lr,sn=Qr*nr+yn*Ht*Lr;un.add(h(k(Dr*Dr+Yr*Yr),sn)),en=ft,Qr=nr,yn=Ht}function Yt(ft){return un.reset(),Z(ft,$r),+un}var cr=[null,null],wr={type:"LineString",coordinates:cr};function qr(ft,Rt){return cr[0]=ft,cr[1]=Rt,Yt(wr)}var Ur={Feature:function(ft,Rt){return _r(ft.geometry,Rt)},FeatureCollection:function(ft,Rt){for(var nr=ft.features,Ht=-1,ir=nr.length;++Ht<ir;)if(_r(nr[Ht].geometry,Rt))return!0;return!1}},br={Sphere:function(){return!0},Point:function(ft,Rt){return Ar(ft.coordinates,Rt)},MultiPoint:function(ft,Rt){for(var nr=ft.coordinates,Ht=-1,ir=nr.length;++Ht<ir;)if(Ar(nr[Ht],Rt))return!0;return!1},LineString:function(ft,Rt){return Mr(ft.coordinates,Rt)},MultiLineString:function(ft,Rt){for(var nr=ft.coordinates,Ht=-1,ir=nr.length;++Ht<ir;)if(Mr(nr[Ht],Rt))return!0;return!1},Polygon:function(ft,Rt){return Cr(ft.coordinates,Rt)},MultiPolygon:function(ft,Rt){for(var nr=ft.coordinates,Ht=-1,ir=nr.length;++Ht<ir;)if(Cr(nr[Ht],Rt))return!0;return!1},GeometryCollection:function(ft,Rt){for(var nr=ft.geometries,Ht=-1,ir=nr.length;++Ht<ir;)if(_r(nr[Ht],Rt))return!0;return!1}};function _r(ft,Rt){return!(!ft||!br.hasOwnProperty(ft.type))&&br[ft.type](ft,Rt)}function Ar(ft,Rt){return qr(ft,Rt)===0}function Mr(ft,Rt){for(var nr,Ht,ir,Lr=0,Dr=ft.length;Lr<Dr;Lr++){if((Ht=qr(ft[Lr],Rt))===0||Lr>0&&(ir=qr(ft[Lr],ft[Lr-1]))>0&&nr<=ir&&Ht<=ir&&(nr+Ht-ir)*(1-Math.pow((nr-Ht)/ir,2))<1e-12*ir)return!0;nr=Ht}return!1}function Cr(ft,Rt){return!!An(ft.map(Gr),cn(Rt))}function Gr(ft){return(ft=ft.map(cn)).pop(),ft}function cn(ft){return[ft[0]*u,ft[1]*u]}function wn(ft,Rt,nr){var Ht=m.range(ft,Rt-t,nr).concat(Rt);return function(ir){return Ht.map(function(Lr){return[ir,Lr]})}}function Kr(ft,Rt,nr){var Ht=m.range(ft,Rt-t,nr).concat(Rt);return function(ir){return Ht.map(function(Lr){return[Lr,ir]})}}function bn(){var ft,Rt,nr,Ht,ir,Lr,Dr,Yr,sn,an,gn,Tn,ln=10,kn=ln,Dn=90,jn=360,$n=2.5;function Zr(){return{type:"MultiLineString",coordinates:Jn()}}function Jn(){return m.range(a(Ht/Dn)*Dn,nr,Dn).map(gn).concat(m.range(a(Yr/jn)*jn,Dr,jn).map(Tn)).concat(m.range(a(Rt/ln)*ln,ft,ln).filter(function(Cn){return f(Cn%Dn)>t}).map(sn)).concat(m.range(a(Lr/kn)*kn,ir,kn).filter(function(Cn){return f(Cn%jn)>t}).map(an))}return Zr.lines=function(){return Jn().map(function(Cn){return{type:"LineString",coordinates:Cn}})},Zr.outline=function(){return{type:"Polygon",coordinates:[gn(Ht).concat(Tn(Dr).slice(1),gn(nr).reverse().slice(1),Tn(Yr).reverse().slice(1))]}},Zr.extent=function(Cn){return arguments.length?Zr.extentMajor(Cn).extentMinor(Cn):Zr.extentMinor()},Zr.extentMajor=function(Cn){return arguments.length?(Ht=+Cn[0][0],nr=+Cn[1][0],Yr=+Cn[0][1],Dr=+Cn[1][1],Ht>nr&&(Cn=Ht,Ht=nr,nr=Cn),Yr>Dr&&(Cn=Yr,Yr=Dr,Dr=Cn),Zr.precision($n)):[[Ht,Yr],[nr,Dr]]},Zr.extentMinor=function(Cn){return arguments.length?(Rt=+Cn[0][0],ft=+Cn[1][0],Lr=+Cn[0][1],ir=+Cn[1][1],Rt>ft&&(Cn=Rt,Rt=ft,ft=Cn),Lr>ir&&(Cn=Lr,Lr=ir,ir=Cn),Zr.precision($n)):[[Rt,Lr],[ft,ir]]},Zr.step=function(Cn){return arguments.length?Zr.stepMajor(Cn).stepMinor(Cn):Zr.stepMinor()},Zr.stepMajor=function(Cn){return arguments.length?(Dn=+Cn[0],jn=+Cn[1],Zr):[Dn,jn]},Zr.stepMinor=function(Cn){return arguments.length?(ln=+Cn[0],kn=+Cn[1],Zr):[ln,kn]},Zr.precision=function(Cn){return arguments.length?($n=+Cn,sn=wn(Lr,ir,90),an=Kr(Rt,ft,$n),gn=wn(Yr,Dr,90),Tn=Kr(Ht,nr,$n),Zr):$n},Zr.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function zr(ft){return ft}var Wr,mn,pn,Pn,aa=b(),qn=b(),vn={point:S,lineStart:S,lineEnd:S,polygonStart:function(){vn.lineStart=ea,vn.lineEnd=Ei},polygonEnd:function(){vn.lineStart=vn.lineEnd=vn.point=S,aa.add(f(qn)),qn.reset()},result:function(){var ft=aa/2;return aa.reset(),ft}};function ea(){vn.point=ua}function ua(ft,Rt){vn.point=Ya,Wr=pn=ft,mn=Pn=Rt}function Ya(ft,Rt){qn.add(Pn*ft-pn*Rt),pn=ft,Pn=Rt}function Ei(){Ya(Wr,mn)}var ei=1/0,gi=ei,ka=-ei,Fa=ka,so={point:function(ft,Rt){ft<ei&&(ei=ft),ft>ka&&(ka=ft),Rt<gi&&(gi=Rt),Rt>Fa&&(Fa=Rt)},lineStart:S,lineEnd:S,polygonStart:S,polygonEnd:S,result:function(){var ft=[[ei,gi],[ka,Fa]];return ka=Fa=-(gi=ei=1/0),ft}},Do,qo,Vi,Gi,Ro=0,ja=0,wo=0,lo=0,mi=0,Yi=0,co=0,xo=0,Ii=0,li={point:Hi,lineStart:gs,lineEnd:cs,polygonStart:function(){li.lineStart=Jo,li.lineEnd=bs},polygonEnd:function(){li.point=Hi,li.lineStart=gs,li.lineEnd=cs},result:function(){var ft=Ii?[co/Ii,xo/Ii]:Yi?[lo/Yi,mi/Yi]:wo?[Ro/wo,ja/wo]:[NaN,NaN];return Ro=ja=wo=lo=mi=Yi=co=xo=Ii=0,ft}};function Hi(ft,Rt){Ro+=ft,ja+=Rt,++wo}function gs(){li.point=xs}function xs(ft,Rt){li.point=Ua,Hi(Vi=ft,Gi=Rt)}function Ua(ft,Rt){var nr=ft-Vi,Ht=Rt-Gi,ir=k(nr*nr+Ht*Ht);lo+=ir*(Vi+ft)/2,mi+=ir*(Gi+Rt)/2,Yi+=ir,Hi(Vi=ft,Gi=Rt)}function cs(){li.point=Hi}function Jo(){li.point=_s}function bs(){ms(Do,qo)}function _s(ft,Rt){li.point=ms,Hi(Do=Vi=ft,qo=Gi=Rt)}function ms(ft,Rt){var nr=ft-Vi,Ht=Rt-Gi,ir=k(nr*nr+Ht*Ht);lo+=ir*(Vi+ft)/2,mi+=ir*(Gi+Rt)/2,Yi+=ir,co+=(ir=Gi*ft-Vi*Rt)*(Vi+ft),xo+=ir*(Gi+Rt),Ii+=3*ir,Hi(Vi=ft,Gi=Rt)}function ws(ft){this._context=ft}ws.prototype={_radius:4.5,pointRadius:function(ft){return this._radius=ft,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(ft,Rt){switch(this._point){case 0:this._context.moveTo(ft,Rt),this._point=1;break;case 1:this._context.lineTo(ft,Rt);break;default:this._context.moveTo(ft+this._radius,Rt),this._context.arc(ft,Rt,this._radius,0,c)}},result:S};var To,ko,Fo,Bo,No,Ko=b(),uo={point:S,lineStart:function(){uo.point=us},lineEnd:function(){To&&ao(ko,Fo),uo.point=S},polygonStart:function(){To=!0},polygonEnd:function(){To=null},result:function(){var ft=+Ko;return Ko.reset(),ft}};function us(ft,Rt){uo.point=ao,ko=Bo=ft,Fo=No=Rt}function ao(ft,Rt){Bo-=ft,No-=Rt,Ko.add(k(Bo*Bo+No*No)),Bo=ft,No=Rt}function jo(){this._string=[]}function fs(ft){return"m0,"+ft+"a"+ft+","+ft+" 0 1,1 0,"+-2*ft+"a"+ft+","+ft+" 0 1,1 0,"+2*ft+"z"}function Mo(ft){return function(Rt){var nr=new Ba;for(var Ht in ft)nr[Ht]=ft[Ht];return nr.stream=Rt,nr}}function Ba(){}function Ne(ft,Rt,nr){var Ht=ft.clipExtent&&ft.clipExtent();return ft.scale(150).translate([0,0]),Ht!=null&&ft.clipExtent(null),Z(nr,ft.stream(so)),Rt(so.result()),Ht!=null&&ft.clipExtent(Ht),ft}function He(ft,Rt,nr){return Ne(ft,function(Ht){var ir=Rt[1][0]-Rt[0][0],Lr=Rt[1][1]-Rt[0][1],Dr=Math.min(ir/(Ht[1][0]-Ht[0][0]),Lr/(Ht[1][1]-Ht[0][1])),Yr=+Rt[0][0]+(ir-Dr*(Ht[1][0]+Ht[0][0]))/2,sn=+Rt[0][1]+(Lr-Dr*(Ht[1][1]+Ht[0][1]))/2;ft.scale(150*Dr).translate([Yr,sn])},nr)}function $e(ft,Rt,nr){return He(ft,[[0,0],Rt],nr)}function at(ft,Rt,nr){return Ne(ft,function(Ht){var ir=+Rt,Lr=ir/(Ht[1][0]-Ht[0][0]),Dr=(ir-Lr*(Ht[1][0]+Ht[0][0]))/2,Yr=-Lr*Ht[0][1];ft.scale(150*Lr).translate([Dr,Yr])},nr)}function mt(ft,Rt,nr){return Ne(ft,function(Ht){var ir=+Rt,Lr=ir/(Ht[1][1]-Ht[0][1]),Dr=-Lr*Ht[0][0],Yr=(ir-Lr*(Ht[1][1]+Ht[0][1]))/2;ft.scale(150*Lr).translate([Dr,Yr])},nr)}jo.prototype={_radius:4.5,_circle:fs(4.5),pointRadius:function(ft){return(ft=+ft)!==this._radius&&(this._radius=ft,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(ft,Rt){switch(this._point){case 0:this._string.push("M",ft,",",Rt),this._point=1;break;case 1:this._string.push("L",ft,",",Rt);break;default:this._circle==null&&(this._circle=fs(this._radius)),this._string.push("M",ft,",",Rt,this._circle)}},result:function(){if(this._string.length){var ft=this._string.join("");return this._string=[],ft}return null}},Ba.prototype={constructor:Ba,point:function(ft,Rt){this.stream.point(ft,Rt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var dt=p(30*u);function Mt(ft,Rt){return+Rt?function(nr,Ht){function ir(Lr,Dr,Yr,sn,an,gn,Tn,ln,kn,Dn,jn,$n,Zr,Jn){var Cn=Tn-Lr,Bn=ln-Dr,Xn=Cn*Cn+Bn*Bn;if(Xn>4*Ht&&Zr--){var xa=sn+Dn,Ma=an+jn,Sn=gn+$n,La=k(xa*xa+Ma*Ma+Sn*Sn),Ta=I(Sn/=La),fa=f(f(Sn)-1)<t||f(Yr-kn)<t?(Yr+kn)/2:h(Ma,xa),Ca=nr(fa,Ta),_a=Ca[0],Za=Ca[1],Kn=_a-Lr,Va=Za-Dr,zi=Bn*Kn-Cn*Va;(zi*zi/Xn>Ht||f((Cn*Kn+Bn*Va)/Xn-.5)>.3||sn*Dn+an*jn+gn*$n<dt)&&(ir(Lr,Dr,Yr,sn,an,gn,_a,Za,fa,xa/=La,Ma/=La,Sn,Zr,Jn),Jn.point(_a,Za),ir(_a,Za,fa,xa,Ma,Sn,Tn,ln,kn,Dn,jn,$n,Zr,Jn))}}return function(Lr){var Dr,Yr,sn,an,gn,Tn,ln,kn,Dn,jn,$n,Zr,Jn={point:Cn,lineStart:Bn,lineEnd:xa,polygonStart:function(){Lr.polygonStart(),Jn.lineStart=Ma},polygonEnd:function(){Lr.polygonEnd(),Jn.lineStart=Bn}};function Cn(Ta,fa){Ta=nr(Ta,fa),Lr.point(Ta[0],Ta[1])}function Bn(){kn=NaN,Jn.point=Xn,Lr.lineStart()}function Xn(Ta,fa){var Ca=se([Ta,fa]),_a=nr(Ta,fa);ir(kn,Dn,ln,jn,$n,Zr,kn=_a[0],Dn=_a[1],ln=Ta,jn=Ca[0],$n=Ca[1],Zr=Ca[2],16,Lr),Lr.point(kn,Dn)}function xa(){Jn.point=Cn,Lr.lineEnd()}function Ma(){Bn(),Jn.point=Sn,Jn.lineEnd=La}function Sn(Ta,fa){Xn(Dr=Ta,fa),Yr=kn,sn=Dn,an=jn,gn=$n,Tn=Zr,Jn.point=Xn}function La(){ir(kn,Dn,ln,jn,$n,Zr,Yr,sn,Dr,an,gn,Tn,16,Lr),Jn.lineEnd=xa,xa()}return Jn}}(ft,Rt):function(nr){return Mo({point:function(Ht,ir){Ht=nr(Ht,ir),this.stream.point(Ht[0],Ht[1])}})}(ft)}var Jt=Mo({point:function(ft,Rt){this.stream.point(ft*u,Rt*u)}});function $t(ft,Rt,nr,Ht,ir){function Lr(Dr,Yr){return[Rt+ft*(Dr*=
vendor: 4,342 bytes, line 20
20Ht),nr-ft*(Yr*=ir)]}return Lr.invert=function(Dr,Yr){return[(Dr-Rt)/ft*Ht,(nr-Yr)/ft*ir]},Lr}function Wt(ft,Rt,nr,Ht,ir,Lr){var Dr=p(Lr),Yr=_(Lr),sn=Dr*ft,an=Yr*ft,gn=Dr/ft,Tn=Yr/ft,ln=(Yr*nr-Dr*Rt)/ft,kn=(Yr*Rt+Dr*nr)/ft;function Dn(jn,$n){return[sn*(jn*=Ht)-an*($n*=ir)+Rt,nr-an*jn-sn*$n]}return Dn.invert=function(jn,$n){return[Ht*(gn*jn-Tn*$n+ln),ir*(kn-Tn*jn-gn*$n)]},Dn}function tr(ft){return ur(function(){return ft})()}function ur(ft){var Rt,nr,Ht,ir,Lr,Dr,Yr,sn,an,gn,Tn=150,ln=480,kn=250,Dn=0,jn=0,$n=0,Zr=0,Jn=0,Cn=0,Bn=1,Xn=1,xa=null,Ma=Ir,Sn=null,La=zr,Ta=.5;function fa(Kn){return sn(Kn[0]*u,Kn[1]*u)}function Ca(Kn){return(Kn=sn.invert(Kn[0],Kn[1]))&&[Kn[0]*i,Kn[1]*i]}function _a(){var Kn=Wt(Tn,0,0,Bn,Xn,Cn).apply(null,Rt(Dn,jn)),Va=(Cn?Wt:$t)(Tn,ln-Kn[0],kn-Kn[1],Bn,Xn,Cn);return nr=or($n,Zr,Jn),Yr=Dt(Rt,Va),sn=Dt(nr,Yr),Dr=Mt(Yr,Ta),Za()}function Za(){return an=gn=null,fa}return fa.stream=function(Kn){return an&&gn===Kn?an:an=Jt(function(Va){return Mo({point:function(zi,Go){var Co=Va(zi,Go);return this.stream.point(Co[0],Co[1])}})}(nr)(Ma(Dr(La(gn=Kn)))))},fa.preclip=function(Kn){return arguments.length?(Ma=Kn,xa=void 0,Za()):Ma},fa.postclip=function(Kn){return arguments.length?(La=Kn,Sn=Ht=ir=Lr=null,Za()):La},fa.clipAngle=function(Kn){return arguments.length?(Ma=+Kn?xr(xa=Kn*u):(xa=null,Ir),Za()):xa*i},fa.clipExtent=function(Kn){return arguments.length?(La=Kn==null?(Sn=Ht=ir=Lr=null,zr):Nr(Sn=+Kn[0][0],Ht=+Kn[0][1],ir=+Kn[1][0],Lr=+Kn[1][1]),Za()):Sn==null?null:[[Sn,Ht],[ir,Lr]]},fa.scale=function(Kn){return arguments.length?(Tn=+Kn,_a()):Tn},fa.translate=function(Kn){return arguments.length?(ln=+Kn[0],kn=+Kn[1],_a()):[ln,kn]},fa.center=function(Kn){return arguments.length?(Dn=Kn[0]%360*u,jn=Kn[1]%360*u,_a()):[Dn*i,jn*i]},fa.rotate=function(Kn){return arguments.length?($n=Kn[0]%360*u,Zr=Kn[1]%360*u,Jn=Kn.length>2?Kn[2]%360*u:0,_a()):[$n*i,Zr*i,Jn*i]},fa.angle=function(Kn){return arguments.length?(Cn=Kn%360*u,_a()):Cn*i},fa.reflectX=function(Kn){return arguments.length?(Bn=Kn?-1:1,_a()):Bn<0},fa.reflectY=function(Kn){return arguments.length?(Xn=Kn?-1:1,_a()):Xn<0},fa.precision=function(Kn){return arguments.length?(Dr=Mt(Yr,Ta=Kn*Kn),Za()):k(Ta)},fa.fitExtent=function(Kn,Va){return He(fa,Kn,Va)},fa.fitSize=function(Kn,Va){return $e(fa,Kn,Va)},fa.fitWidth=function(Kn,Va){return at(fa,Kn,Va)},fa.fitHeight=function(Kn,Va){return mt(fa,Kn,Va)},function(){return Rt=ft.apply(this,arguments),fa.invert=Rt.invert&&Ca,_a()}}function mr(ft){var Rt=0,nr=o/3,Ht=ur(ft),ir=Ht(Rt,nr);return ir.parallels=function(Lr){return arguments.length?Ht(Rt=Lr[0]*u,nr=Lr[1]*u):[Rt*i,nr*i]},ir}function yr(ft,Rt){var nr=_(ft),Ht=(nr+_(Rt))/2;if(f(Ht)<t)return function(Yr){var sn=p(Yr);function an(gn,Tn){return[gn*sn,_(Tn)/sn]}return an.invert=function(gn,Tn){return[gn/sn,I(Tn*sn)]},an}(ft);var ir=1+nr*(2*Ht-nr),Lr=k(ir)/Ht;function Dr(Yr,sn){var an=k(ir-2*Ht*_(sn))/Ht;return[an*_(Yr*=Ht),Lr-an*p(Yr)]}return Dr.invert=function(Yr,sn){var an=Lr-sn,gn=h(Yr,f(an))*T(an);return an*Ht<0&&(gn-=o*T(Yr)*T(an)),[gn/Ht,I((ir-(Yr*Yr+an*an)*Ht*Ht)/(2*Ht))]},Dr}function Pr(){return mr(yr).scale(155.424).center([0,33.6442])}function nn(){return Pr().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function dn(ft){return function(Rt,nr){var Ht=p(Rt),ir=p(nr),Lr=ft(Ht*ir);return[Lr*ir*_(Rt),Lr*_(nr)]}}function En(ft){return function(Rt,nr){var Ht=k(Rt*Rt+nr*nr),ir=ft(Ht),Lr=_(ir),Dr=p(ir);return[h(Rt*Lr,Ht*Dr),I(Ht&&nr*Lr/Ht)]}}var On=dn(function(ft){return k(2/(1+ft))});On.invert=En(function(ft){return 2*I(ft/2)});var Un=dn(function(ft){return(ft=A(ft))&&ft/_(ft)});function zn(ft,Rt){return[ft,l(L((r+Rt)/2))]}function ha(ft){var Rt,nr,Ht,ir=tr(ft),Lr=ir.center,Dr=ir.scale,Yr=ir.translate,sn=ir.clipExtent,an=null;function gn(){var Tn=o*Dr(),ln=ir(vr(ir.rotate()).invert([0,0]));return sn(an==null?[[ln[0]-Tn,ln[1]-Tn],[ln[0]+Tn,ln[1]+Tn]]:ft===zn?[[Math.max(ln[0]-Tn,an),Rt],[Math.min(ln[0]+Tn,nr),Ht]]:[[an,Math.max(ln[1]-Tn,Rt)],[nr,Math.min(ln[1]+Tn,Ht)]])}return ir.scale=function(Tn){return arguments.length?(Dr(Tn),gn()):Dr()},ir.translate=function(Tn){return arguments.length?(Yr(Tn),gn()):Yr()},ir.center=function(Tn){return arguments.length?(Lr(Tn),gn()):Lr()},ir.clipExtent=function(Tn){return arguments.length?(Tn==null?an=Rt=nr=Ht=null:(an=+Tn[0][0],Rt=+Tn[
vendor: 25,976 bytes, line 20
200][1],nr=+Tn[1][0],Ht=+Tn[1][1]),gn()):an==null?null:[[an,Rt],[nr,Ht]]},gn()}function ba(ft){return L((r+ft)/2)}function Oa(ft,Rt){var nr=p(ft),Ht=ft===Rt?_(ft):l(nr/p(Rt))/l(ba(Rt)/ba(ft)),ir=nr*w(ba(ft),Ht)/Ht;if(!Ht)return zn;function Lr(Dr,Yr){ir>0?Yr<-r+t&&(Yr=-r+t):Yr>r-t&&(Yr=r-t);var sn=ir/w(ba(Yr),Ht);return[sn*_(Ht*Dr),ir-sn*p(Ht*Dr)]}return Lr.invert=function(Dr,Yr){var sn=ir-Yr,an=T(Ht)*k(Dr*Dr+sn*sn),gn=h(Dr,f(sn))*T(sn);return sn*Ht<0&&(gn-=o*T(Dr)*T(sn)),[gn/Ht,2*s(w(ir/an,1/Ht))-r]},Lr}function Ia(ft,Rt){return[ft,Rt]}function za(ft,Rt){var nr=p(ft),Ht=ft===Rt?_(ft):(nr-p(Rt))/(Rt-ft),ir=nr/Ht+ft;if(f(Ht)<t)return Ia;function Lr(Dr,Yr){var sn=ir-Yr,an=Ht*Dr;return[sn*_(an),ir-sn*p(an)]}return Lr.invert=function(Dr,Yr){var sn=ir-Yr,an=h(Dr,f(sn))*T(sn);return sn*Ht<0&&(an-=o*T(Dr)*T(sn)),[an/Ht,ir-T(Ht)*k(Dr*Dr+sn*sn)]},Lr}Un.invert=En(function(ft){return ft}),zn.invert=function(ft,Rt){return[ft,2*s(x(Rt))-r]},Ia.invert=Ia;var vi=1.340264,pi=-.081106,ti=893e-6,ri=.003796,di=k(3)/2;function Oi(ft,Rt){var nr=I(di*_(Rt)),Ht=nr*nr,ir=Ht*Ht*Ht;return[ft*p(nr)/(di*(vi+3*pi*Ht+ir*(7*ti+9*ri*Ht))),nr*(vi+pi*Ht+ir*(ti+ri*Ht))]}function Wi(ft,Rt){var nr=p(Rt),Ht=p(ft)*nr;return[nr*_(ft)/Ht,_(Rt)/Ht]}function Zi(ft,Rt){var nr=Rt*Rt,Ht=nr*nr;return[ft*(.8707-.131979*nr+Ht*(Ht*(.003971*nr-.001529*Ht)-.013791)),Rt*(1.007226+nr*(.015085+Ht*(.028874*nr-.044475-.005916*Ht)))]}function Xi(ft,Rt){return[p(Rt)*_(ft),_(Rt)]}function Ji(ft,Rt){var nr=p(Rt),Ht=1+p(ft)*nr;return[nr*_(ft)/Ht,_(Rt)/Ht]}function Ea(ft,Rt){return[l(L((r+Rt)/2)),-ft]}Oi.invert=function(ft,Rt){for(var nr,Ht=Rt,ir=Ht*Ht,Lr=ir*ir*ir,Dr=0;Dr<12&&(Lr=(ir=(Ht-=nr=(Ht*(vi+pi*ir+Lr*(ti+ri*ir))-Rt)/(vi+3*pi*ir+Lr*(7*ti+9*ri*ir)))*Ht)*ir*ir,!(f(nr)<1e-12));++Dr);return[di*ft*(vi+3*pi*ir+Lr*(7*ti+9*ri*ir))/p(Ht),I(_(Ht)/di)]},Wi.invert=En(s),Zi.invert=function(ft,Rt){var nr,Ht=Rt,ir=25;do{var Lr=Ht*Ht,Dr=Lr*Lr;Ht-=nr=(Ht*(1.007226+Lr*(.015085+Dr*(.028874*Lr-.044475-.005916*Dr)))-Rt)/(1.007226+Lr*(.045255+Dr*(.259866*Lr-.311325-.005916*11*Dr)))}while(f(nr)>t&&--ir>0);return[ft/(.8707+(Lr=Ht*Ht)*(Lr*(Lr*Lr*Lr*(.003971-.001529*Lr)-.013791)-.131979)),Ht]},Xi.invert=En(I),Ji.invert=En(function(ft){return 2*s(ft)}),Ea.invert=function(ft,Rt){return[-Rt,2*s(x(ft))-r]},g.geoAlbers=nn,g.geoAlbersUsa=function(){var ft,Rt,nr,Ht,ir,Lr,Dr=nn(),Yr=Pr().rotate([154,0]).center([-2,58.5]).parallels([55,65]),sn=Pr().rotate([157,0]).center([-3,19.9]).parallels([8,18]),an={point:function(ln,kn){Lr=[ln,kn]}};function gn(ln){var kn=ln[0],Dn=ln[1];return Lr=null,nr.point(kn,Dn),Lr||(Ht.point(kn,Dn),Lr)||(ir.point(kn,Dn),Lr)}function Tn(){return ft=Rt=null,gn}return gn.invert=function(ln){var kn=Dr.scale(),Dn=Dr.translate(),jn=(ln[0]-Dn[0])/kn,$n=(ln[1]-Dn[1])/kn;return($n>=.12&&$n<.234&&jn>=-.425&&jn<-.214?Yr:$n>=.166&&$n<.234&&jn>=-.214&&jn<-.115?sn:Dr).invert(ln)},gn.stream=function(ln){return ft&&Rt===ln?ft:(kn=[Dr.stream(Rt=ln),Yr.stream(ln),sn.stream(ln)],Dn=kn.length,ft={point:function(jn,$n){for(var Zr=-1;++Zr<Dn;)kn[Zr].point(jn,$n)},sphere:function(){for(var jn=-1;++jn<Dn;)kn[jn].sphere()},lineStart:function(){for(var jn=-1;++jn<Dn;)kn[jn].lineStart()},lineEnd:function(){for(var jn=-1;++jn<Dn;)kn[jn].lineEnd()},polygonStart:function(){for(var jn=-1;++jn<Dn;)kn[jn].polygonStart()},polygonEnd:function(){for(var jn=-1;++jn<Dn;)kn[jn].polygonEnd()}});var kn,Dn},gn.precision=function(ln){return arguments.length?(Dr.precision(ln),Yr.precision(ln),sn.precision(ln),Tn()):Dr.precision()},gn.scale=function(ln){return arguments.length?(Dr.scale(ln),Yr.scale(.35*ln),sn.scale(ln),gn.translate(Dr.translate())):Dr.scale()},gn.translate=function(ln){if(!arguments.length)return Dr.translate();var kn=Dr.scale(),Dn=+ln[0],jn=+ln[1];return nr=Dr.translate(ln).clipExtent([[Dn-.455*kn,jn-.238*kn],[Dn+.455*kn,jn+.238*kn]]).stream(an),Ht=Yr.translate([Dn-.307*kn,jn+.201*kn]).clipExtent([[Dn-.425*kn+t,jn+.12*kn+t],[Dn-.214*kn-t,jn+.234*kn-t]]).stream(an),ir=sn.translate([Dn-.205*kn,jn+.212*kn]).clipExtent([[Dn-.214*kn+t,jn+.166*kn+t],[Dn-.115*kn-t,jn+.234*kn-t]]).stream(an),Tn()},gn.fitExtent=function(ln,kn){return He(gn,ln,kn)},gn.fitSize=function(ln,kn){return $e(gn,ln,kn)},gn.fitWidth=function(ln,kn){return at(gn,ln,kn)},gn.fitHeight=function(ln,kn){return mt(gn,ln,kn)},gn.scale(1070)},g.geoArea=function(ft){return U.reset(),Z(ft,Q),2*U},g.geoAzimuthalEqualArea=function(){return tr(On).scale(124.75).clipAngle(179.999)},g.geoAzimuthalEqualAreaRaw=On,g.geoAzimuthalEquidistant=function(){return tr(Un).scale(79.4188).clipAngle(179.999)},g.geoAzimuthalEquidistantRaw=Un,g.geoBounds=function(ft){var Rt,nr,Ht,ir,Lr,Dr,Yr;if(fe=Ee=-(we=be=1/0),Pe=[],Z(ft,qe),nr=Pe.length){for(Pe.sort(ht),Rt=1,Lr=[Ht=Pe[0]];Rt<nr;++Rt)ut(Ht,(ir=Pe[Rt])[0])||ut(Ht,ir[1])?(it(Ht[0],ir[1])>it(Ht[0],Ht[1])&&(Ht[1]=ir[1]),it(ir[0],Ht[1])>it(Ht[0],Ht[1])&&(Ht[0]=ir[0])):Lr.push(Ht=ir);for(Dr=-1/0,Rt=0,Ht=Lr[nr=Lr.length-1];Rt<=nr;Ht=ir,++Rt)ir=Lr[Rt],(Yr=it(Ht[1],ir[0]))>Dr&&(Dr=Yr,we=ir[0],Ee=Ht[1])}return Pe=De=null,we===1/0||be===1/0?[[NaN,NaN],[NaN,NaN]]:[[we,be],[Ee,fe]]},g.geoCentroid=function(ft){Ve=Qe=Oe=Ue=Ge=Ye=tt=lt=vt=It=St=0,Z(ft,kt);var Rt=vt,nr=It,Ht=St,ir=Rt*Rt+nr*nr+Ht*Ht;return ir<1e-12&&(Rt=Ye,nr=tt,Ht=lt,Qe<t&&(Rt=Oe,nr=Ue,Ht=Ge),(ir=Rt*Rt+nr*nr+Ht*Ht)<1e-12)?[NaN,NaN]:[h(nr,Rt)*i,I(Ht/k(ir))*i]},g.geoCircle=function(){var ft,Rt,nr=yt([0,0]),Ht=yt(90),ir=yt(6),Lr={point:function(Yr,sn){ft.push(Yr=Rt(Yr,sn)),Yr[0]*=i,Yr[1]*=i}};function Dr(){var Yr=nr.apply(this,arguments),sn=Ht.apply(this,arguments)*u,an=ir.apply(this,arguments)*u;return ft=[],Rt=or(-Yr[0]*u,-Yr[1]*u,0).invert,pr(Lr,sn,an,1),Yr={type:"Polygon",coordinates:[ft]},ft=Rt=null,Yr}return Dr.center=function(Yr){return arguments.length?(nr=typeof Yr=="function"?Yr:yt([+Yr[0],+Yr[1]]),Dr):nr},Dr.radius=function(Yr){return arguments.length?(Ht=typeof Yr=="function"?Yr:yt(+Yr),Dr):Ht},Dr.precision=function(Yr){return arguments.length?(ir=typeof Yr=="function"?Yr:yt(+Yr),Dr):ir},Dr},g.geoClipAntimeridian=Ir,g.geoClipCircle=xr,g.geoClipExtent=function(){var ft,Rt,nr,Ht=0,ir=0,Lr=960,Dr=500;return nr={stream:function(Yr){return ft&&Rt===Yr?ft:ft=Nr(Ht,ir,Lr,Dr)(Rt=Yr)},extent:function(Yr){return arguments.length?(Ht=+Yr[0][0],ir=+Yr[0][1],Lr=+Yr[1][0],Dr=+Yr[1][1],ft=Rt=null,nr):[[Ht,ir],[Lr,Dr]]}}},g.geoClipRectangle=Nr,g.geoConicConformal=function(){return mr(Oa).scale(109.5).parallels([30,30])},g.geoConicConformalRaw=Oa,g.geoConicEqualArea=Pr,g.geoConicEqualAreaRaw=yr,g.geoConicEquidistant=function(){return mr(za).scale(131.154).center([0,13.9389])},g.geoConicEquidistantRaw=za,g.geoContains=function(ft,Rt){return(ft&&Ur.hasOwnProperty(ft.type)?Ur[ft.type]:_r)(ft,Rt)},g.geoDistance=qr,g.geoEqualEarth=function(){return tr(Oi).scale(177.158)},g.geoEqualEarthRaw=Oi,g.geoEquirectangular=function(){return tr(Ia).scale(152.63)},g.geoEquirectangularRaw=Ia,g.geoGnomonic=function(){return tr(Wi).scale(144.049).clipAngle(60)},g.geoGnomonicRaw=Wi,g.geoGraticule=bn,g.geoGraticule10=function(){return bn()()},g.geoIdentity=function(){var ft,Rt,nr,Ht,ir,Lr,Dr,Yr=1,sn=0,an=0,gn=1,Tn=1,ln=0,kn=null,Dn=1,jn=1,$n=Mo({point:function(Bn,Xn){var xa=Cn([Bn,Xn]);this.stream.point(xa[0],xa[1])}}),Zr=zr;function Jn(){return Dn=Yr*gn,jn=Yr*Tn,Lr=Dr=null,Cn}function Cn(Bn){var Xn=Bn[0]*Dn,xa=Bn[1]*jn;if(ln){var Ma=xa*ft-Xn*Rt;Xn=Xn*ft+xa*Rt,xa=Ma}return[Xn+sn,xa+an]}return Cn.invert=function(Bn){var Xn=Bn[0]-sn,xa=Bn[1]-an;if(ln){var Ma=xa*ft+Xn*Rt;Xn=Xn*ft-xa*Rt,xa=Ma}return[Xn/Dn,xa/jn]},Cn.stream=function(Bn){return Lr&&Dr===Bn?Lr:Lr=$n(Zr(Dr=Bn))},Cn.postclip=function(Bn){return arguments.length?(Zr=Bn,kn=nr=Ht=ir=null,Jn()):Zr},Cn.clipExtent=function(Bn){return arguments.length?(Zr=Bn==null?(kn=nr=Ht=ir=null,zr):Nr(kn=+Bn[0][0],nr=+Bn[0][1],Ht=+Bn[1][0],ir=+Bn[1][1]),Jn()):kn==null?null:[[kn,nr],[Ht,ir]]},Cn.scale=function(Bn){return arguments.length?(Yr=+Bn,Jn()):Yr},Cn.translate=function(Bn){return arguments.length?(sn=+Bn[0],an=+Bn[1],Jn()):[sn,an]},Cn.angle=function(Bn){return arguments.length?(Rt=_(ln=Bn%360*u),ft=p(ln),Jn()):ln*i},Cn.reflectX=function(Bn){return arguments.length?(gn=Bn?-1:1,Jn()):gn<0},Cn.reflectY=function(Bn){return arguments.length?(Tn=Bn?-1:1,Jn()):Tn<0},Cn.fitExtent=function(Bn,Xn){return He(Cn,Bn,Xn)},Cn.fitSize=function(Bn,Xn){return $e(Cn,Bn,Xn)},Cn.fitWidth=function(Bn,Xn){return at(Cn,Bn,Xn)},Cn.fitHeight=function(Bn,Xn){return mt(Cn,Bn,Xn)},Cn},g.geoInterpolate=function(ft,Rt){var nr=ft[0]*u,Ht=ft[1]*u,ir=Rt[0]*u,Lr=Rt[1]*u,Dr=p(Ht),Yr=_(Ht),sn=p(Lr),an=_(Lr),gn=Dr*p(nr),Tn=Dr*_(nr),ln=sn*p(ir),kn=sn*_(ir),Dn=2*I(k(P(Lr-Ht)+Dr*sn*P(ir-nr))),jn=_(Dn),$n=Dn?function(Zr){var Jn=_(Zr*=Dn)/jn,Cn=_(Dn-Zr)/jn,Bn=Cn*gn+Jn*ln,Xn=Cn*Tn+Jn*kn,xa=Cn*Yr+Jn*an;return[h(Xn,Bn)*i,h(xa,k(Bn*Bn+Xn*Xn))*i]}:function(){return[nr*i,Ht*i]};return $n.distance=Dn,$n},g.geoLength=Yt,g.geoMercator=function(){return ha(zn).scale(961/c)},g.geoMercatorRaw=zn,g.geoNaturalEarth1=function(){return tr(Zi).scale(175.295)},g.geoNaturalEarth1Raw=Zi,g.geoOrthographic=function(){return tr(Xi).scale(249.5).clipAngle(90+t)},g.geoOrthographicRaw=Xi,g.geoPath=function(ft,Rt){var nr,Ht,ir=4.5;function Lr(Dr){return Dr&&(typeof ir=="function"&&Ht.pointRadius(+ir.apply(this,arguments)),Z(Dr,nr(Ht))),Ht.result()}return Lr.area=function(Dr){return Z(Dr,nr(vn)),vn.result()},Lr.measure=function(Dr){return Z(Dr,nr(uo)),uo.result()},Lr.bounds=function(Dr){return Z(Dr,nr(so)),so.result()},Lr.centroid=function(Dr){return Z(Dr,nr(li)),li.result()},Lr.projection=function(Dr){return arguments.length?(nr=Dr==null?(ft=null,zr):(ft=Dr).stream,Lr):ft},Lr.context=function(Dr){return arguments.length?(Ht=Dr==null?(Rt=null,new jo):new ws(Rt=Dr),typeof ir!="function"&&Ht.pointRadius(ir),Lr):Rt},Lr.pointRadius=function(Dr){return arguments.length?(ir=typeof Dr=="function"?Dr:(Ht.pointRadius(+Dr),+Dr),Lr):ir},Lr.projection(ft).context(Rt)},g.geoProjection=tr,g.geoProjectionMutator=ur,g.geoRotation=vr,g.geoStereographic=function(){return tr(Ji).scale(250).clipAngle(142)},g.geoStereographicRaw=Ji,g.geoStream=Z,g.geoTransform=function(ft){return{stream:Mo(ft)}},g.geoTransverseMercator=function(){var ft=ha(Ea),Rt=ft.center,nr=ft.rotate;return ft.center=function(Ht){return arguments.length?Rt([-Ht[1],Ht[0]]):[(Ht=Rt())[1],-Ht[0]]},ft.rotate=function(Ht){return arguments.length?nr([Ht[0],Ht[1],Ht.length>2?Ht[2]+90:90]):[(Ht=nr())[0],Ht[1],Ht[2]-90]},nr([0,0,90]).scale(159.155)},g.geoTransverseMercatorRaw=Ea,Object.defineProperty(g,"__esModule",{value:!0})})},{"d3-array":107}],115:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=g||self).d3=g.d3||{})})(this,function(g){function m(oe,pe){return oe.parent===pe.parent?1:2}function b(oe,pe){return oe+pe.x}function v(oe,pe){return Math.max(oe,pe.y)}function e(oe){var pe=0,ce=oe.children,de=ce&&ce.length;if(de)for(;--de>=0;)pe+=ce[de].value;else pe=1;oe.value=pe}function n(oe,pe){var ce,de,xe,we,be,Ee=new d(oe),fe=+oe.value&&(Ee.value=oe.value),me=[Ee];for(pe==null&&(pe=t);ce=me.pop();)if(fe&&(ce.value=+ce.data.value),(xe=pe(ce.data))&&(be=xe.length))for(ce.children=new Array(be),we=be-1;we>=0;--we)me.push(de=ce.children[we]=new d(xe[we])),de.parent=ce,de.depth=ce.depth+1;return Ee.eachBefore(r)}function t(oe){return oe.children}function o(oe){oe.data=oe.data.data}function r(oe){var pe=0;do oe.height=pe;while((oe=oe.parent)&&oe.height<++pe)}function d(oe){this.data=oe,this.depth=this.height=0,this.parent=null}d.prototype=n.prototype={constructor:d,count:function(){return this.eachAfter(e)},each:function(oe){var pe,ce,de,xe,we=this,be=[we];do for(pe=be.reverse(),be=[];we=pe.pop();)if(oe(we),ce=we.children)for(de=0,xe=ce.length;de<xe;++de)be.push(ce[de]);while(be.length);return this},eachAfter:function(oe){for(var pe,ce,de,xe=this,we=[xe],be=[];xe=we.pop();)if(be.push(xe),pe=xe.children)for(ce=0,de=pe.length;ce<de;++ce)we.push(pe[ce]);for(;xe=be.pop();)oe(xe);return this},eachBefore:function(oe){for(var pe,ce,de=this,xe=[de];de=xe.pop();)if(oe(de),pe=de.children)for(ce=pe.length-1;ce>=0;--ce)xe.push(pe[ce]);return this},sum:function(oe){return this.eachAfter(function(pe){for(var ce=+oe(pe.data)||0,de=pe.children,xe=de&&de.length;--xe>=0;)ce+=de[xe].value;pe.value=ce})},sort:function(oe){return this.eachBefore(function(pe){pe.children&&pe.children.sort(oe)})},path:function(oe){for(var pe=this,ce=function(we,be){if(we===be)return we;var Ee=we.ancestors(),fe=be.ancestors(),me=null;for(we=Ee.pop(),be=fe.pop();we===be;)me=we,we=Ee.pop(),be=fe.pop();return me}(pe,oe),de=[pe];pe!==ce;)pe=pe.parent,de.push(pe);for(var xe=de.length;oe!==ce;)de.splice(xe,0,oe),oe=oe.parent;return de},ancestors:function(){for(var oe=this,pe=[oe];oe=oe.parent;)pe.push(oe);return pe},descendants:function(){var oe=[];return this.each(function(pe){oe.push(pe)}),oe},leaves:function(){var oe=[];return this.eachBefore(function(pe){pe.children||oe.push(pe)}),oe},links:function(){var oe=this,pe=[];return oe.each(function(ce){ce!==oe&&pe.push({source:ce.parent,target:ce})}),pe},copy:function(){return n(this).eachBefore(o)}};var c=Array.prototype.slice;function i(oe){for(var pe,ce,de=0,xe=(oe=function(be){for(var Ee,fe,me=be.length;me;)fe=Math.random()*me--|0,Ee=be[me],be[me]=be[fe],be[fe]=Ee;return be}(c.call(oe))).length,we=[];de<xe;)pe=oe[de],ce&&s(ce,pe)?++de:(ce=p(we=u(we,pe)),de=0);return ce}function u(oe,pe){var ce,de;if(h(pe,oe))return[pe];for(ce=0;ce<oe.length;++ce)if(f(pe,oe[ce])&&h(a(oe[ce],pe),oe))return[oe[ce],pe];for(ce=0;ce<oe.length-1;++ce)for(de=ce+1;de<oe.length;++de)if(f(a(oe[ce],oe[de]),pe)&&f(a(oe[ce],pe),oe[de])&&f(a(oe[de],pe),oe[ce])&&h(x(oe[ce],oe[de],pe),oe))return[oe[ce],oe[de],pe];throw new Error}function f(oe,pe){var ce=oe.r-pe.r,de=pe.x-oe.x,xe=pe.y-oe.y;return ce<0||ce*ce<de*de+xe*xe}function s(oe,pe){var ce=oe.r-pe.r+1e-6,de=pe.x-oe.x,xe=pe.y-oe.y;return ce>0&&ce*ce>de*de+xe*xe}function h(oe,pe){for(var ce=0;ce<pe.length;++ce)if(!s(oe,pe[ce]))return!1;return!0}function p(oe){switch(oe.length){case 1:return{x:(pe=oe[0]).x,y:pe.y,r:pe.r};case 2:return a(oe[0],oe[1]);case 3:return x(oe[0],oe[1],oe[2])}var pe}function a(oe,pe){var ce=oe.x,de=oe.y,xe=oe.r,we=pe.x,be=pe.y,Ee=pe.r,fe=we-ce,me=be-de,Te=Ee-xe,_e=Math.sqrt(fe*fe+me*me);return{x:(ce+we+fe/_e*Te)/2,y:(de+be+me/_e*Te)/2,r:(_e+xe+Ee)/2}}function x(oe,pe,ce){var de=oe.x,xe=oe.y,we=oe.r,be=pe.x,Ee=pe.y,fe=pe.r,me=ce.x,Te=ce.y,_e=ce.r,Ae=de-be,Pe=de-me,De=xe-Ee,Ve=xe-Te,Qe=fe-we,Oe=_e-we,Ue=de*de+xe*xe-we*we,Ge=Ue-be*be-Ee*Ee+fe*fe,Ye=Ue-me*me-Te*Te+_e*_e,tt=Pe*De-Ae*Ve,lt=(De*Ye-Ve*Ge)/(2*tt)-de,vt=(Ve*Qe-De*Oe)/tt,It=(Pe*Ge-Ae*Ye)/(2*tt)-xe,St=(Ae*Oe-Pe*Qe)/tt,rt=vt*vt+St*St-1,et=2*(we+lt*vt+It*St),Tt=lt*lt+It*It-we*we,Vt=-(rt?(et+Math.sqrt(et*et-4*rt*Tt))/(2*rt):Tt/et);return{x:de+lt+vt*Vt,y:xe+It+St*Vt,r:Vt}}function l(oe,pe,ce){var de,xe,we,be,Ee=oe.x-pe.x,fe=oe.y-pe.y,me=Ee*Ee+fe*fe;me?(xe=pe.r+ce.r,xe*=xe,be=oe.r+ce.r,xe>(be*=be)?(de=(me+be-xe)/(2*me),we=Math.sqrt(Math.max(0,be/me-de*de)),ce.x=oe.x-de*Ee-we*fe,ce.y=oe.y-de*fe+we*Ee):(de=(me+xe-be)/(2*me),we=Math.sqrt(Math.max(0,xe/me-de*de)),ce.x=pe.x+de*Ee-we*fe,ce.y=pe.y+de*fe+we*Ee)):(ce.x=pe.x+ce.r,ce.y=pe.y)}function w(oe,pe){var ce=oe.r+pe.r-1e-6,de=pe.x-oe.x,xe=pe.y-oe.y;return ce>0&&ce*ce>de*de+xe*xe}function _(oe){var pe=oe._,ce=oe.next._,de=pe.r+ce.r,xe=(pe.x*ce.r+ce.x*pe.r)/de,we=(pe.y*ce.r+ce.y*pe.r)/de;return xe*xe+we*we}function T(oe){this._=oe,this.next=null,this.previous=null}function k(oe){if(!(xe=oe.length))return 0;var pe,ce,de,xe,we,be,Ee,fe,me,Te,_e;if((pe=oe[0]).x=0,pe.y=0,!(xe>1))return pe.r;if(ce=oe[1],pe.x=-ce.r,ce.x=pe.r,ce.y=0,!(xe>2))return pe.r+ce.r;l(ce,pe,de=oe[2]),pe=new T(pe),ce=new T(ce),de=new T(de),pe.next=de.previous=ce,ce.next=pe.previous=de,de.next=ce.previous=pe;e:for(Ee=3;Ee<xe;++Ee){l(pe._,ce._,de=oe[Ee]),de=new T(de),fe=ce.next,me=pe.previous,Te=ce._.r,_e=pe._.r;do if(Te<=_e){if(w(fe._,de._)){ce=fe,pe.next=ce,ce.previous=pe,--Ee;continue e}Te+=fe._.r,fe=fe.next}else{if(w(me._,de._)){(pe=me).next=ce,ce.previous=pe,--Ee;continue e}_e+=me._.r,me=me.previous}while(fe!==me.next);for(de.previous=pe,de.next=ce,pe.next=ce.previous=ce=de,we=_(pe);(de=de.next)!==ce;)(be=_(de))<we&&(pe=de,we=be);ce=pe.next}for(pe=[ce._],de=ce;(de=de.next)!==ce;)pe.push(de._);for(de=i(pe),Ee=0;Ee<xe;++Ee)(pe=oe[Ee]).x-=de.x,pe.y-=de.y;return de.r}function L(oe){return oe==null?null:A(oe)}function A(oe){if(typeof oe!="function")throw new Error;return oe}function I(){return 0}function P(oe){return function(){return oe}}function S(oe){return Math.sqrt(oe.value)}function E(oe){return function(pe){pe.children||(pe.r=Math.max(0,+oe(pe)||0))}}function D(oe,pe){return function(ce){if(de=ce.children){var de,xe,we,be=de.length,Ee=oe(ce)*pe||0;if(Ee)for(xe=0;xe<be;++xe)de[xe].r+=Ee;if(we=k(de),Ee)for(xe=0;xe<be;++xe)de[xe].r-=Ee;ce.r=we+Ee}}}function F(oe){return function(pe){var ce=pe.parent;pe.r*=oe,ce&&(pe.x=ce.x+oe*pe.x,pe.y=ce.y+oe*pe.y)}}function H(oe){oe.x0=Math.round(oe.x0),oe.y0=Math.round(oe.y0),oe.x1=Math.round(oe.x1),oe.y1=Math.round(oe.y1)}function V(oe,pe,ce,de,xe){for(var we,be=oe.children,Ee=-1,fe=be.length,me=oe.value&&(de-pe)/oe.value;++Ee<fe;)(we=be[Ee]).y0=ce,we.y1=xe,we.x0=pe,we.x1=pe+=we.value*me}var Z={depth:-1},K={};function q(oe){return oe.id}function W(oe){return oe.parentId}function $(oe,pe){return oe.parent===pe.parent?1:2}function R(oe){var pe=oe.children;return pe?pe[0]:oe.t}function N(oe){var pe=oe.children;return pe?pe[pe.length-1]:oe.t}function U(oe,pe,ce){var de=ce/(pe.i-oe.i);pe.c-=de,pe.s+=ce,oe.c+=de,pe.z+=ce,pe.m+=ce}function Q(oe,pe,ce){return oe.a.parent===pe.parent?oe.a:ce}function j(oe,pe){this._=oe,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=pe}function X(oe,pe,ce,de,xe){for(var we,be=oe.children,Ee=-1,fe=be.length,me=oe.value&&(xe-ce)/oe.value;++Ee<fe;)(we=be[Ee]).x0=pe,we.x1=de,we.y0=ce,we.y1=ce+=we.value*me}j.prototype=Object.create(d.prototype);var J=(1+Math.sqrt(5))/2;function re(oe,pe,ce,de,xe,we){for(var be,Ee,fe,me,Te,_e,Ae,Pe,De,Ve,Qe,Oe=[],Ue=pe.children,Ge=0,Ye=0,tt=Ue.length,lt=pe.value;Ge<tt;){fe=xe-ce,me=we-de;do Te=Ue[Ye++].value;while(!Te&&Ye<tt);for(_e=Ae=Te,Qe=Te*Te*(Ve=Math.max(me/fe,fe/me)/(lt*oe)),De=Math.max(Ae/Qe,Qe/_e);Ye<tt;++Ye){if(Te+=Ee=Ue[Ye].value,Ee<_e&&(_e=Ee),Ee>Ae&&(Ae=Ee),Qe=Te*Te*Ve,(Pe=Math.max(Ae/Qe,Qe/_e))>De){Te-=Ee;break}De=Pe}Oe.push(be={value:Te,dice:fe<me,children:Ue.slice(Ge,Ye)}),be.dice?V(be,ce,de,xe,lt?de+=me*Te/lt:we):X(be,ce,de,lt?ce+=fe*Te/lt:xe,we),lt-=Te,Ge=Ye}return Oe}var ne=function oe(pe){function ce(de,xe,we,be,Ee){re(pe,de,xe,we,be,Ee)}return ce.ratio=function(de){return oe((de=+de)>1?de:1)},ce}(J),se=function oe(pe){function ce(de,xe,we,be,Ee){if((fe=de._squarify)&&fe.ratio===pe)for(var fe,me,Te,_e,Ae,Pe=-1,De=fe.length,Ve=de.value;++Pe<De;){for(Te=(me=fe[Pe]).children,_e=me.value=0,Ae=Te.length;_e<Ae;++_e)me.value+=Te[_e].value;me.dice?V(me,xe,we,be,we+=(Ee-we)*me.value/Ve):X(me,xe,we,xe+=(be-xe)*me.value/Ve,Ee),Ve-=me.value}else de._squarify=fe=re(pe,de,xe,we,be,Ee),fe.ratio=pe}return ce.ratio=function(de){return oe((de=+de)>1?de:1)},ce}(J);g.cluster=function(){var oe=m,pe=1,ce=1,de=!1;function xe(we){var be,Ee=0;we.eachAfter(function(Ae){var Pe=Ae.children;Pe?(Ae.x=function(De){return De.reduce(b,0)/De.length}(Pe),Ae.y=function(De){return 1+De.reduce(v,0)}(Pe)):(Ae.x=be?Ee+=oe(Ae,be):0,Ae.y=0,be=Ae)});var fe=function(Ae){for(var Pe;Pe=Ae.children;)Ae=Pe[0];return Ae}(we),me=function(Ae){for(var Pe;Pe=Ae.children;)Ae=Pe[Pe.length-1];return Ae}(we),Te=fe.x-oe(fe,me)/2,_e=me.x+oe(me,fe)/2;return we.eachAfter(de?function(Ae){Ae.x=(Ae.x-we.x)*pe,Ae.y=(we.y-Ae.y)*ce}:function(Ae){Ae.x=(Ae.x-Te)/(_e-Te)*pe,Ae.y=(1-(we.y?Ae.y/we.y:1))*ce})}return xe.separation=function(we){return arguments.length?(oe=we,xe):oe},xe.size=function(we){return arguments.length?(de=!1,pe=+we[0],ce=+we[1],xe):de?null:[pe,ce]},xe.nodeSize=function(we){return arguments.length?(de=!0,pe=+we[0],ce=+we[1],xe):de?[pe,ce]:null},xe},g.hierarchy=n,g.pack=function(){var oe=null,pe=1,ce=1,de=I;function xe(we){return we.x=pe/2,we.y=ce/2,oe?we.eachBefore(E(oe)).eachAfter(D(de,.5)).eachBefore(F(1)):we.eachBefore(E(S)).eachAfter(D(I,1)).eachAfter(D(de,we.r/Math.min(pe,ce))).eachBefore(F(Math.min(pe,ce)/(2*we.r))),we}return xe.radius=function(we){return arguments.length?(oe=L(we),xe):oe},xe.size=function(we){return arguments.length?(pe=+we[0],ce=+we[1],xe):[pe,ce]},xe.padding=function(we){return arguments.length?(de=typeof we=="function"?we:P(+we),xe):de},xe},g.packEnclose=i,g.packSiblings=function(oe){return k(oe),oe},g.partition=function(){var oe=1,pe=1,ce=0,de=!1;function xe(we){var be=we.height+1;return we.x0=we.y0=ce,we.x1=oe,we.y1=pe/be,we.eachBefore(function(Ee,fe){return function(me){me.children&&V(me,me.x0,Ee*(me.depth+1)/fe,me.x1,Ee*(me.depth+2)/fe);var Te=me.x0,_e=me.y0,Ae=me.x1-ce,Pe=me.y1-ce;Ae<Te&&(Te=Ae=(Te+Ae)/2),Pe<_e&&(_e=Pe=(_e+Pe)/2),me.x0=Te,me.y0=_e,me.x1=Ae,me.y1=Pe}}(pe,be)),de&&we.eachBefore(H),we}return xe.round=function(we){return arguments.length?(de=!!we,xe):de},xe.size=function(we){return arguments.length?(oe=+we[0],pe=+we[1],xe):[oe,pe]},xe.padding=function(we){return arguments.length?(ce=+we,xe):ce},xe},g.stratify=function(){var oe=q,pe=W;function ce(de){var xe,we,be,Ee,fe,me,Te,_e=de.length,Ae=new Array(_e),Pe={};for(we=0;we<_e;++we)xe=de[we],fe=Ae[we]=new d(xe),(me=oe(xe,we,de))!=null&&(me+="")&&(Pe[Te="$"+(fe.id=me)]=Te in Pe?K:fe);for(we=0;we<_e;++we)if(fe=Ae[we],(me=pe(de[we],we,de))!=null&&(me+="")){if(!(Ee=Pe["$"+me]))throw new Error("missing: "+me);if(Ee===K)throw new Error("ambiguous: "+me);Ee.children?Ee.children.push(fe):Ee.children=[fe],fe.parent=Ee}else{if(be)throw new Error("multiple roots");be=fe}if(!be)throw new Error("no root");if(be.parent=Z,be.eachBefore(function(De){De.depth=De.parent.depth+1,--_e}).eachBefore(r),be.parent=null,_e>0)throw new Error("cycle");return be}return ce.id=function(de){return arguments.length?(oe=A(de),ce):oe},ce.parentId=function(de){return arguments.length?(pe=A(de),ce):pe},ce},g.tree=function(){var oe=$,pe=1,ce=1,de=null;function xe(fe){var me=function(Oe){for(var Ue,Ge,Ye,tt,lt,vt=new j(Oe,0),It=[vt];Ue=It.pop();)if(Ye=Ue._.children)for(Ue.children=new Array(lt=Ye.length),tt=lt-1;tt>=0;--tt)It.push(Ge=Ue.children[tt]=new j(Ye[tt],tt)),Ge.parent=Ue;return(vt.parent=new j(null,0)).children=[vt],vt}(fe);if(me.eachAfter(we),me.parent.m=-me.z,me.eachBefore(be),de)fe.eachBefore(Ee);else{var Te=fe,_e=fe,Ae=fe;fe.eachBefore(function(Oe){Oe.x<Te.x&&(Te=Oe),Oe.x>_e.x&&(_e=Oe),Oe.depth>Ae.depth&&(Ae=Oe)});var Pe=Te===_e?1:oe(Te,_e)/2,De=Pe-Te.x,Ve=pe/(_e.x+Pe+De),Qe=ce/(Ae.depth||1);fe.eachBefore(function(Oe){Oe.x=(Oe.x+De)*Ve,Oe.y=Oe.depth*Qe})}return fe}function we(fe){var me=fe.children,Te=fe.parent.children,_e=fe.i?Te[fe.i-1]:null;if(me){(function(Pe){for(var De,Ve=0,Qe=0,Oe=Pe.children,Ue=Oe.length;--Ue>=0;)(De=Oe[Ue]).z+=Ve,De.m+=Ve,Ve+=De.s+(Qe+=De.c)})(fe);var Ae=(me[0].z+me[me.length-1].z)/2;_e?(fe.z=_e.z+oe(fe._,_e._),fe.m=fe.z-Ae):fe.z=Ae}else _e&&(fe.z=_e.z+oe(fe._,_e._));fe.parent.A=function(Pe,De,Ve){if(De){for(var Qe,Oe=Pe,Ue=Pe,Ge=De,Ye=Oe.parent.children[0],tt=Oe.m,lt=Ue.m,vt=Ge.m,It=Ye.m;Ge=N(Ge),Oe=R(Oe),Ge&&Oe;)Ye=R(Ye),(Ue=N(Ue)).a=Pe,(Qe=Ge.z+vt-Oe.z-tt+oe(Ge._,Oe._))>0&&(U(Q(Ge,Pe,Ve),Pe,Qe),tt+=Qe,lt+=Qe),vt+=Ge.m,tt+=Oe.m,It+=Ye.m,lt+=Ue.m;Ge&&!N(Ue)&&(Ue.t=Ge,Ue.m+=vt-lt),Oe&&!R(Ye)&&(Ye.t=Oe,Ye.m+=tt-It,Ve=Pe)}return Ve}(fe,_e,fe.parent.A||Te[0])}function be(fe){fe._.x=fe.z+fe.parent.m,fe.m+=fe.parent.m}function Ee(fe){fe.x*=pe,fe.y=fe.depth*ce}return xe.separation=function(fe){return arguments.length?(oe=fe,xe):oe},xe.size=function(fe){return arguments.length?(de=!1,pe=+fe[0],ce=+fe[1],xe):de?null:[pe,ce]},xe.nodeSize=function(fe){return arguments.length?(de=!0,pe=+fe[0],ce=+fe[1],xe):de?[pe,ce]:null},xe},g.treemap=function(){var oe=ne,pe=!1,ce=1,de=1,xe=[0],we=I,be=I,Ee=I,fe=I,me=I;function Te(Ae){return Ae.x0=Ae.y0=0,Ae.x1=ce,Ae.y1=de,Ae.eachBefore(_e),xe=[0],pe&&Ae.eachBefore(H),Ae}function _e(Ae){var Pe=xe[Ae.depth],De=Ae.x0+Pe,Ve=Ae.y0+Pe,Qe=Ae.x1-Pe,Oe=Ae.y1-Pe;Qe<De&&(De=Qe=(De+Qe)/2),Oe<Ve&&(Ve=Oe=(Ve+Oe)/2),Ae.x0=De,Ae.y0=Ve,Ae.x1=Qe,Ae.y1=Oe,Ae.children&&(Pe=xe[Ae.depth+1]=we(Ae)/2,De+=me(Ae)-Pe,Ve+=be(Ae)-Pe,(Qe-=Ee(Ae)-Pe)<De&&(De=Qe=(De+Qe)/2),(Oe-=fe(Ae)-Pe)<Ve&&(Ve=Oe=(Ve+Oe)/2),oe(Ae,De,Ve,Qe,Oe))}return Te.round=function(Ae){return arguments.length?(pe=!!Ae,Te):pe},Te.size=function(Ae){return arguments.length?(ce=+Ae[0],de=+Ae[1],Te):[ce,de]},Te.tile=function(Ae){return arguments.length?(oe=A(Ae),Te):oe},Te.padding=function(Ae){return arguments.length?Te.paddingInner(Ae).paddingOuter(Ae):Te.paddingInner()},Te.paddingInner=function(Ae){return arguments.length?(we=typeof Ae=="function"?Ae:P(+Ae),Te):we},Te.paddingOuter=function(Ae){return arguments.length?Te.paddingTop(Ae).paddingRight(Ae).paddingBottom(Ae).paddingLeft(Ae):Te.paddingTop()},Te.paddingTop=function(Ae){return arguments.length?(be=typeof Ae=="function"?Ae:P(+Ae),Te):be},Te.paddingRight=function(Ae){return arguments.length?(Ee=typeof Ae=="function"?Ae:P(+Ae),Te):Ee},Te.paddingBottom=function(Ae){return arguments.length?(fe=typeof Ae=="function"?Ae:P(+Ae),Te):fe},Te.paddingLeft=function(Ae){return arguments.length?(me=typeof Ae=="function"?Ae:P(+Ae),Te):me},Te},g.treemapBinary=function(oe,pe,ce,de,xe){var we,be,Ee=oe.children,fe=Ee.length,me=new Array(fe+1);for(me[0]=be=we=0;we<fe;++we)me[we+1]=be+=Ee[we].value;(function Te(_e,Ae,Pe,De,Ve,Qe,Oe){if(_e>=Ae-1){var Ue=Ee[_e];return Ue.x0=De,Ue.y0=Ve,Ue.x1=Qe,void(Ue.y1=Oe)}for(var Ge=me[_e],Ye=Pe/2+Ge,tt=_e+1,lt=Ae-1;tt<lt;){var vt=tt+lt>>>1;me[vt]<Ye?tt=vt+1:lt=vt}Ye-me[tt-1]<me[tt]-Ye&&_e+1<tt&&--tt;var It=me[tt]-Ge,St=Pe-It;if(Qe-De>Oe-Ve){var rt=(De*St+Qe*It)/Pe;Te(_e,tt,It,De,Ve,rt,Oe),Te(tt,Ae,St,rt,Ve,Qe,Oe)}else{var et=(Ve*St+Oe*It)/Pe;Te(_e,tt,It,De,Ve,Qe,et),Te(tt,Ae,St,De,et,Qe,Oe)}})(0,fe,oe.value,pe,ce,de,xe)},g.treemapDice=V,g.treemapResquarify=se,g.treemapSlice=X,g.treemapSliceDice=function(oe,pe,ce,de,xe){(1&oe.depth?X:V)(oe,pe,ce,de,xe)}
vendor: 4,739 bytes, line 20
20,g.treemapSquarify=ne,Object.defineProperty(g,"__esModule",{value:!0})})},{}],116:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?m(te,y("d3-color")):m((g=g||self).d3=g.d3||{},g.d3)})(this,function(g,m){function b(J,re,ne,se,oe){var pe=J*J,ce=pe*J;return((1-3*J+3*pe-ce)*re+(4-6*pe+3*ce)*ne+(1+3*J+3*pe-3*ce)*se+ce*oe)/6}function v(J){var re=J.length-1;return function(ne){var se=ne<=0?ne=0:ne>=1?(ne=1,re-1):Math.floor(ne*re),oe=J[se],pe=J[se+1],ce=se>0?J[se-1]:2*oe-pe,de=se<re-1?J[se+2]:2*pe-oe;return b((ne-se/re)*re,ce,oe,pe,de)}}function e(J){var re=J.length;return function(ne){var se=Math.floor(((ne%=1)<0?++ne:ne)*re),oe=J[(se+re-1)%re],pe=J[se%re],ce=J[(se+1)%re],de=J[(se+2)%re];return b((ne-se/re)*re,oe,pe,ce,de)}}function n(J){return function(){return J}}function t(J,re){return function(ne){return J+ne*re}}function o(J,re){var ne=re-J;return ne?t(J,ne>180||ne<-180?ne-360*Math.round(ne/360):ne):n(isNaN(J)?re:J)}function r(J){return(J=+J)==1?d:function(re,ne){return ne-re?function(se,oe,pe){return se=Math.pow(se,pe),oe=Math.pow(oe,pe)-se,pe=1/pe,function(ce){return Math.pow(se+ce*oe,pe)}}(re,ne,J):n(isNaN(re)?ne:re)}}function d(J,re){var ne=re-J;return ne?t(J,ne):n(isNaN(J)?re:J)}var c=function J(re){var ne=r(re);function se(oe,pe){var ce=ne((oe=m.rgb(oe)).r,(pe=m.rgb(pe)).r),de=ne(oe.g,pe.g),xe=ne(oe.b,pe.b),we=d(oe.opacity,pe.opacity);return function(be){return oe.r=ce(be),oe.g=de(be),oe.b=xe(be),oe.opacity=we(be),oe+""}}return se.gamma=J,se}(1);function i(J){return function(re){var ne,se,oe=re.length,pe=new Array(oe),ce=new Array(oe),de=new Array(oe);for(ne=0;ne<oe;++ne)se=m.rgb(re[ne]),pe[ne]=se.r||0,ce[ne]=se.g||0,de[ne]=se.b||0;return pe=J(pe),ce=J(ce),de=J(de),se.opacity=1,function(xe){return se.r=pe(xe),se.g=ce(xe),se.b=de(xe),se+""}}}var u=i(v),f=i(e);function s(J,re){re||(re=[]);var ne,se=J?Math.min(re.length,J.length):0,oe=re.slice();return function(pe){for(ne=0;ne<se;++ne)oe[ne]=J[ne]*(1-pe)+re[ne]*pe;return oe}}function h(J){return ArrayBuffer.isView(J)&&!(J instanceof DataView)}function p(J,re){var ne,se=re?re.length:0,oe=J?Math.min(se,J.length):0,pe=new Array(oe),ce=new Array(se);for(ne=0;ne<oe;++ne)pe[ne]=k(J[ne],re[ne]);for(;ne<se;++ne)ce[ne]=re[ne];return function(de){for(ne=0;ne<oe;++ne)ce[ne]=pe[ne](de);return ce}}function a(J,re){var ne=new Date;return J=+J,re=+re,function(se){return ne.setTime(J*(1-se)+re*se),ne}}function x(J,re){return J=+J,re=+re,function(ne){return J*(1-ne)+re*ne}}function l(J,re){var ne,se={},oe={};for(ne in J!==null&&typeof J=="object"||(J={}),re!==null&&typeof re=="object"||(re={}),re)ne in J?se[ne]=k(J[ne],re[ne]):oe[ne]=re[ne];return function(pe){for(ne in se)oe[ne]=se[ne](pe);return oe}}var w=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(w.source,"g");function T(J,re){var ne,se,oe,pe=w.lastIndex=_.lastIndex=0,ce=-1,de=[],xe=[];for(J+="",re+="";(ne=w.exec(J))&&(se=_.exec(re));)(oe=se.index)>pe&&(oe=re.slice(pe,oe),de[ce]?de[ce]+=oe:de[++ce]=oe),(ne=ne[0])===(se=se[0])?de[ce]?de[ce]+=se:de[++ce]=se:(de[++ce]=null,xe.push({i:ce,x:x(ne,se)})),pe=_.lastIndex;return pe<re.length&&(oe=re.slice(pe),de[ce]?de[ce]+=oe:de[++ce]=oe),de.length<2?xe[0]?function(we){return function(be){return we(be)+""}}(xe[0].x):function(we){return function(){return we}}(re):(re=xe.length,function(we){for(var be,Ee=0;Ee<re;++Ee)de[(be=xe[Ee]).i]=be.x(we);return de.join("")})}function k(J,re){var ne,se=typeof re;return re==null||se==="boolean"?n(re):(se==="number"?x:se==="string"?(ne=m.color(re))?(re=ne,c):T:re instanceof m.color?c:re instanceof Date?a:h(re)?s:Array.isArray(re)?p:typeof re.valueOf!="function"&&typeof re.toString!="function"||isNaN(re)?l:x)(J,re)}var L,A,I,P,S=180/Math.PI,E={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function D(J,re,ne,se,oe,pe){var ce,de,xe;return(ce=Math.sqrt(J*J+re*re))&&(J/=ce,re/=ce),(xe=J*ne+re*se)&&(ne-=J*xe,se-=re*xe),(de=Math.sqrt(ne*ne+se*se))&&(ne/=de,se/=de,xe/=de),J*se<re*ne&&(J=-J,re=-re,xe=-xe,ce=-ce),{translateX:oe,translateY:pe,rotate:Math.atan2(re,J)*S,skewX:Math.atan(xe)*S,scaleX:ce,scaleY:de}}function F(J,re,ne,se){function oe(pe){return pe.length?pe.pop()+" ":""}return function(pe,ce){var de=[],xe=[];return pe=J(pe),ce=J(ce),function(we,be,Ee,fe,me,Te){if(we!==Ee||be!==fe){var _e=me.push("translate(",null,re,null,ne);Te.push({i:_e-4,x:x(we,Ee)},{i:_e-2,x:x(be,fe)})}else(Ee||fe)&&me.push("translate("+Ee+re+fe+ne)}(pe.translateX,pe.translateY,ce.translateX,ce.translateY,de,xe),function(we,be,Ee,fe){we!==be?(we-be>180?be+=360:be-we>180&&(we+=360),fe.push({i:Ee.push(oe(Ee)+"rotate(",null,se)-2,x:x(we,be)})):be&&Ee.push(oe(Ee)+"rotate("+be+se)}(pe.rotate,ce.rotate,de,xe),function(we,be,Ee,fe){we!==be?fe.push({i:Ee.push(oe(Ee)+"skewX(",
20null,se)-2,x:x(we,be)}):be&&Ee.push(oe(Ee)+"skewX("+be+se)}(pe.skewX,ce.skewX,de,xe),function(we,be,Ee,fe,me,Te){if(we!==Ee||be!==fe){var _e=me.push(oe(me)+"scale(",null,",",null,")");Te.push({i:_e-4,x:x(we,Ee)},{i:_e-2,x:x(be,fe)})}else Ee===1&&fe===1||me.push(oe(me)+"scale("+Ee+","+fe+")")}(pe.scaleX,pe.scaleY,ce.scaleX,ce.scaleY,de,xe),pe=ce=null,function(we){for(var be,Ee=-1,fe=xe.length;++Ee<fe;)de[(be=xe[Ee]).i]=be.x(we);return de.join("")}}}var H=F(function(J){return J==="none"?E:(L||(L=document.createElement("DIV"),A=document.documentElement,I=document.defaultView),L.style.transform=J,J=I.getComputedStyle(A.appendChild(L),null).getPropertyValue("transform"),A.removeChild(L),D(+(J=J.slice(7,-1).split(","))[0],+J[1],+J[2],+J[3],+J[4],+J[5]))},"px, ","px)","deg)"),V=F(function(J){return J==null?E:(P||(P=document.createElementNS("http://www.w3.org/2000/svg","g")),P.setAttribute("transform",J),(J=P.transform.baseVal.consolidate())?D((J=J.matrix).a,J.b,J.c,J.d,J.e,J.f):E)},", ",")",")"),Z=Math.SQRT2;function K(J){return((J=Math.exp(J))+1/J)/2}function q(J){return function(re,ne){var se=J((re=m.hsl(re)).h,(ne=m.hsl(ne)).h),oe=d(re.s,ne.s),pe=d(re.l,ne.l),ce=d(re.opacity,ne.opacity);return function(de){return re.h=se(de),re.s=oe(de),re.l=pe(de),re.opacity=ce(de),re+""}}}var W=q(o),$=q(d);function R(J){return function(re,ne){var se=J((re=m.hcl(re)).h,(ne=m.hcl(ne)).h),oe=d(re.c,ne.c),pe=d(re.l,ne.l),ce=d(re.opacity,ne.opacity);return function(de){return re.h=se(de),re.c=oe(de),re.l=pe(de),re.opacity=ce(de),re+""}}}var N=R(o),U=R(d);function Q(J){return function re(ne){function se(oe,pe){var ce=J((oe=m.cubehelix(oe)).h,(pe=m.cubehelix(pe)).h),de=d(oe.s,pe.s),xe=d(oe.l,pe.l),we=d(oe.opacity,pe.opacity);return function(be){return oe.h=ce(be),oe.s=de(be),oe.l=xe(Math.pow(be,ne)),oe.opacity=we(be),oe+""}}return ne=+ne,se.gamma=re,se}(1)}var j=Q(o),X=Q(d);g.interpolate=k,g.interpolateArray=function(J,re){return(h(re)?s:p)(J,re)},g.interpolateBasis=v,g.interpolateBasisClosed=e,g.interpolateCubehelix=j,g.interpolateCubehelixLong=X,g.interpolateDate=a,g.interpolateDiscrete=function(J){var re=J.length;return function(ne){return J[Math.max(0,Math.min(re-1,Math.floor(ne*re)))]}},g.interpolateHcl=N,g.interpolateHclLong=U,g.interpolateHsl=W,g.interpolateHslLong=$,g.interpolateHue=function(J,re){var ne=o(+J,+re);return function(se){var oe=ne(se);return oe-360*Math.floor(oe/360)}},g.interpolateLab=function(J,re){var ne=d((J=m.lab(J)).l,(re=m.lab(re)).l),se=d(J.a,re.a),oe=d(J.b,re.b),pe=d(J.opacity,re.opacity);return function(ce){return J.l=ne(ce),J.a=se(ce),J.b=oe(ce),J.opacity=pe(ce),J+""}},g.interpolateNumber=x,g.interpolateNumberArray=s,g.interpolateObject=l,g.interpolateRgb=c,g.interpolateRgbBasis=u,g.interpolateRgbBasisClosed=f,g.interpolateRound=function(J,re){return J=+J,re=+re,function(ne){return Math.round(J*(1-ne)+re*ne)}},g.interpolateString=T,g.interpolateTransformCss=H,g.interpolateTransformSvg=V,g.interpolateZoom=function(J,re){var ne,se,oe=J[0],pe=J[1],ce=J[2],de=re[0],xe=re[1],we=re[2],be=de-oe,Ee=xe-pe,fe=be*be+Ee*Ee;if(fe<1e-12)se=Math.log(we/ce)/Z,ne=function(De){return[oe+De*be,pe+De*Ee,ce*Math.exp(Z*De*se)]};else{var me=Math.sqrt(fe),Te=(we*we-ce*ce+4*fe)/(2*ce*2*me),_e=(we*we-ce*ce-4*fe)/(2*we*2*me),Ae=Math.log(Math.sqrt(Te*Te+1)-Te),Pe=Math.log(Math.sqrt(_e*_e+1)-_e);se=(Pe-Ae)/Z,ne=function(De){var Ve,Qe=De*se,Oe=K(Ae),Ue=ce/(2*me)*(Oe*(Ve=Z*Qe+Ae,((Ve=Math.exp(2*Ve))-1)/(Ve+1))-function(Ge){return((Ge=Math.exp(Ge))-1/Ge)/2}(Ae));return[oe+Ue*be,pe+Ue*Ee,ce*Oe/K(Z*Qe+Ae)]}}return ne.duration=1e3*se,ne},g.piecewise=function(J,re){for(var ne=0,se=re.length-1,oe=re[0],pe=new Array(se<0?0:se);ne<se;)pe[ne]=J(oe,oe=re[++ne]);return function(ce){var de=Math.max(0,Math.min(se-1,Math.floor(ce*=se)));return pe[de](ce-de)}},g.quantize=function(J,re){for(var ne=new Array(re),se=0;se<re;++se)ne[se]=J(se/(re-1));return ne},Object.defineProperty(g,"__esModule",{value:!0})})},{"d3-color":109}],117:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=g||self).d3=g.d3||{})})(this,function(g){var m=Math.PI,b=2*m,v=b-1e-6;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function n(){return new e}e.prototype=n.prototype={constructor:e,moveTo:function(t,o){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+o)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,o){this._+="L"+(this._x1=+t)+","+(this._y1=+o)},quadraticCurveTo:function(t,o,r,d){this._+="Q"+ +t+","+ +o+","+(this._x1=+r)+","+(this._y1=+d)},bezierCurveTo:function(t,o,r,d,c,i){this._+="C"+ +t+","+ +o+","+ +r+","+ +d+","+(this._x1=+c)+","+(this._y1=+i)},arcTo:function(t,o,r,d,c){t=+t,o=+o,r=+r,d=+d,c=+c;var i=this._x1,u=this._y1,f=r-t,s=d-o,h=i-t,p=u-o,a=h*h+p*p;if(c<0)throw new Error("negative radius: "+c);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=o);else if(a>1e-6)if(Math.abs(p*f-s*h)>1e-6&&c){var x=r-i,l=d-u,w=f*f+s*s,_=x*x+l*l,T=Math.sqrt(w),k=Math.sqrt(a),L=c*Math.tan((m-Math.acos((w+a-_)/(2*T*k)))/2),A=L/k,I=L/T;Math.abs(A-1)>1e-6&&(this._+="L"+(t+A*h)+","+(o+A*p)),this._+="A"+c+","+c+",0,0,"+ +(p*x>h*l)+","+(this._x1=t+I*f)+","+(this._y1=o+I*s)}else this._+="L"+(this._x1=t)+","+(this._y1=o)},arc:function(t,o,r,d,c,i){t=+t,o=+o,i=!!i;var u=(r=+r)*Math.cos(d),f=r*Math.sin(d),s=t+u,h=o+f,p=1^i,a=i?d-c:c-d;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+s+","+h:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+s+","+h),r&&(a<0&&(a=a%b+b),a>v?this._+="A"+r+","+r+",0,1,"+p+","+(t-u)+","+(o-f)+"A"+r+","+r+",0,1,"+p+","+(this._x1=s)+","+(this._y1=h):a>1e-6&&(this._+="A"+r+","+r+",0,"+ +(a>=m)+","+p+","+(this._x1=t+r*Math.cos(c))+","+(this._y1=o+r*Math.sin(c))))},rect:function(t,o,r,d){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+o)+"h"+ +r+"v"+ +d+"h"+-r+"Z"},toString:function(){return this._}}
20,g.path=n,Object.defineProperty(g,"__esModule",{value:!0})})},{}],118:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=g||self).d3=g.d3||{})})(this,function(g){function m(d,c,i,u){if(isNaN(c)||isNaN(i))return d;var f,s,h,p,a,x,l,w,_,T=d._root,k={data:u},L=d._x0,A=d._y0,I=d._x1,P=d._y1;if(!T)return d._root=k,d;for(;T.length;)if((x=c>=(s=(L+I)/2))?L=s:I=s,(l=i>=(h=(A+P)/2))?A=h:P=h,f=T,!(T=T[w=l<<1|x]))return f[w]=k,d;if(p=+d._x.call(null,T.data),a=+d._y.call(null,T.data),c===p&&i===a)return k.next=T,f?f[w]=k:d._root=k,d;do f=f?f[w]=new Array(4):d._root=new Array(4),(x=c>=(s=(L+I)/2))?L=s:I=s,(l=i>=(h=(A+P)/2))?A=h:P=h;while((w=l<<1|x)==(_=(a>=h)<<1|p>=s));return f[_]=T,f[w]=k,d}function b(d,c,i,u,f){this.node=d,this.x0=c,this.y0=i,this.x1=u,this.y1=f}function v(d){return d[0]}function e(d){return d[1]}function n(d,c,i){var u=new t(c??v,i??e,NaN,NaN,NaN,NaN);return d==null?u:u.addAll(d)}function t(d,c,i,u,f,s){this._x=d,this._y=c,this._x0=i,this._y0=u,this._x1=f,this._y1=s,this._root=void 0}function o(d){for(var c={data:d.data},i=c;d=d.next;)i=i.next={data:d.data};return c}
vendor: 4,761 bytes, line 20
20var r=n.prototype=t.prototype;r.copy=function(){var d,c,i=new t(this._x,this._y,this._x0,this._y0,this._x1,this._y1),u=this._root;if(!u)return i;if(!u.length)return i._root=o(u),i;for(d=[{source:u,target:i._root=new Array(4)}];u=d.pop();)for(var f=0;f<4;++f)(c=u.source[f])&&(c.length?d.push({source:c,target:u.target[f]=new Array(4)}):u.target[f]=o(c));return i},r.add=function(d){var c=+this._x.call(null,d),i=+this._y.call(null,d);return m(this.cover(c,i),c,i,d)},r.addAll=function(d){var c,i,u,f,s=d.length,h=new Array(s),p=new Array(s),a=1/0,x=1/0,l=-1/0,w=-1/0;for(i=0;i<s;++i)isNaN(u=+this._x.call(null,c=d[i]))||isNaN(f=+this._y.call(null,c))||(h[i]=u,p[i]=f,u<a&&(a=u),u>l&&(l=u),f<x&&(x=f),f>w&&(w=f));if(a>l||x>w)return this;for(this.cover(a,x).cover(l,w),i=0;i<s;++i)m(this,h[i],p[i],d[i]);return this},r.cover=function(d,c){if(isNaN(d=+d)||isNaN(c=+c))return this;var i=this._x0,u=this._y0,f=this._x1,s=this._y1;if(isNaN(i))f=(i=Math.floor(d))+1,s=(u=Math.floor(c))+1;else{for(var h,p,a=f-i,x=this._root;i>d||d>=f||u>c||c>=s;)switch(p=(c<u)<<1|d<i,(h=new Array(4))[p]=x,x=h,a*=2,p){case 0:f=i+a,s=u+a;break;case 1:i=f-a,s=u+a;break;case 2:f=i+a,u=s-a;break;case 3:i=f-a,u=s-a}this._root&&this._root.length&&(this._root=x)}return this._x0=i,this._y0=u,this._x1=f,this._y1=s,this},r.data=function(){var d=[];return this.visit(function(c){if(!c.length)do d.push(c.data);while(c=c.next)}),d},r.extent=function(d){return arguments.length?this.cover(+d[0][0],+d[0][1]).cover(+d[1][0],+d[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},r.find=function(d,c,i){var u,f,s,h,p,a,x,l=this._x0,w=this._y0,_=this._x1,T=this._y1,k=[],L=this._root;for(L&&k.push(new b(L,l,w,_,T)),i==null?i=1/0:(l=d-i,w=c-i,_=d+i,T=c+i,i*=i);a=k.pop();)if(!(!(L=a.node)||(f=a.x0)>_||(s=a.y0)>T||(h=a.x1)<l||(p=a.y1)<w))if(L.length){var A=(f+h)/2,I=(s+p)/2;k.push(new b(L[3],A,I,h,p),new b(L[2],f,I,A,p),new b(L[1],A,s,h,I),new b(L[0],f,s,A,I)),(x=(c>=I)<<1|d>=A)&&(a=k[k.length-1],k[k.length-1]=k[k.length-1-x],k[k.length-1-x]=a)}else{var P=d-+this._x.call(null,L.data),S=c-+this._y.call(null,L.data),E=P*P+S*S;if(E<i){var D=Math.sqrt(i=E);l=d-D,w=c-D,_=d+D,T=c+D,u=L.data}}return u},r.remove=function(d){if(isNaN(s=+this._x.call(null,d))||isNaN(h=+this._y.call(null,d)))return this;var c,i,u,f,s,h,p,a,x,l,w,_,T=this._root,k=this._x0,L=this._y0,A=this._x1,I=this._y1;if(!T)return this;if(T.length)for(;;){if((x=s>=(p=(k+A)/2))?k=p:A=p,(l=h>=(a=(L+I)/2))?L=a:I=a,c=T,!(T=T[w=l<<1|x]))return this;if(!T.length)break;(c[w+1&3]||c[w+2&3]||c[w+3&3])&&(i=c,_=w)}for(;T.data!==d;)if(u=T,!(T=T.next))return this;return(f=T.next)&&delete T.next,u?(f?u.next=f:delete u.next,this):c?(f?c[w]=f:delete c[w],(T=c[0]||c[1]||c[2]||c[3])&&T===(c[3]||c[2]||c[1]||c[0])&&!T.length&&(i?i[_]=T:this._root=T),this):(this._root=f,this)},r.removeAll=function(d){for(var c=0,i=d.length;c<i;++c)this.remove(d[c]);return this},r.root=function(){return this._root},r.size=function(){var d=0;return this.visit(function(c){if(!c.length)do++d;while(c=c.next)}),d},r.visit=function(d){var c,i,u,f,s,h,p=[],a=this._root;for(a&&p.push(new b(a,this._x0,this._y0,this._x1,this._y1));c=p.pop();)if(!d(a=c.node,u=c.x0,f=c.y0,s=c.x1,h=c.y1)&&a.length){var x=(u+s)/2,l=(f+h)/2;(i=a[3])&&p.push(new b(i,x,l,s,h)),(i=a[2])&&p.push(new b(i,u,l,x,h)),(i=a[1])&&p.push(new b(i,x,f,s,l)),(i=a[0])&&p.push(new b(i,u,f,x,l))}return this},r.visitAfter=function(d){var c,i=[],u=[];for(this._root&&i.push(new b(this._root,this._x0,this._y0,this._x1,this._y1));c=i.pop();){var f=c.node;if(f.length){var s,h=c.x0,p=c.y0,a=c.x1,x=c.y1,l=(h+a)/2,w=(p+x)/2;(s=f[0])&&i.push(new b(s,h,p,l,w)),(s=f[1])&&i.push(new b(s,l,p,a,w)),(s=f[2])&&i.push(new b(s,h,w,l,x)),(s=f[3])&&i.push(new b(s,l,w,a,x))}u.push(c)}for(;c=u.pop();)d(c.node,c.x0,c.y0,c.x1,c.y1);return this},r.x=function(d){return arguments.length?(this._x=d,this):this._x},r.y=function(d){return arguments.length?(this._y=d,this):this._y},g.quadtree=n,Object.defineProperty(g,"__esModule",{value:!0})})},{}],119:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?m(te,y("d3-path")):m((g=g||self).d3=g.d3||{},g.d3)})(this,function(g,m){function b(ze){return function(){return ze}}var v=Math.abs,e=Math.atan2,n=Math.cos,t=Math.max,o=Math.min,r=Math.sin,d=Math.sqrt,c=Math.PI,i=c/2,u=2*c;function f(ze){return ze>1?0:ze<-1?c:Math.acos(ze)}function s(ze){return ze>=1?i:ze<=-1?-i:Math.asin(ze)}function h(ze){return ze.innerRadius}function p(ze){return ze.outerRadius}function a(ze){return ze.startAngle}function x(ze){return ze.endAngle}function l(ze){return ze&&ze.padAngle}function w(ze,st,yt,Dt,jt,or,Ut,Xt){var sr=yt-ze,vr=Dt-st,pr=Ut-jt,ar=Xt-or,lr=ar*sr-pr*vr;if(!(lr*lr<1e-12))return[ze+(lr=(pr*(st-or)-ar*(ze-jt))/lr)*sr,st+lr*vr]}
vendor: 15,174 bytes, line 20
20function _(ze,st,yt,Dt,jt,or,Ut){var Xt=ze-yt,sr=st-Dt,vr=(Ut?or:-or)/d(Xt*Xt+sr*sr),pr=vr*sr,ar=-vr*Xt,lr=ze+pr,hr=st+ar,Or=yt+pr,dr=Dt+ar,Fr=(lr+Or)/2,tn=(hr+dr)/2,rn=Or-lr,An=dr-hr,Ln=rn*rn+An*An,_n=jt-or,Vr=lr*dr-Or*hr,Ir=(An<0?-1:1)*d(t(0,_n*_n*Ln-Vr*Vr)),xr=(Vr*An-rn*Ir)/Ln,Nr=(-Vr*rn-An*Ir)/Ln,en=(Vr*An+rn*Ir)/Ln,Qr=(-Vr*rn+An*Ir)/Ln,yn=xr-Fr,un=Nr-tn,$r=en-Fr,In=Qr-tn;return yn*yn+un*un>$r*$r+In*In&&(xr=en,Nr=Qr),{cx:xr,cy:Nr,x01:-pr,y01:-ar,x11:xr*(jt/_n-1),y11:Nr*(jt/_n-1)}}function T(ze){this._context=ze}function k(ze){return new T(ze)}function L(ze){return ze[0]}function A(ze){return ze[1]}function I(){var ze=L,st=A,yt=b(!0),Dt=null,jt=k,or=null;function Ut(Xt){var sr,vr,pr,ar=Xt.length,lr=!1;for(Dt==null&&(or=jt(pr=m.path())),sr=0;sr<=ar;++sr)!(sr<ar&&yt(vr=Xt[sr],sr,Xt))===lr&&((lr=!lr)?or.lineStart():or.lineEnd()),lr&&or.point(+ze(vr,sr,Xt),+st(vr,sr,Xt));if(pr)return or=null,pr+""||null}return Ut.x=function(Xt){return arguments.length?(ze=typeof Xt=="function"?Xt:b(+Xt),Ut):ze},Ut.y=function(Xt){return arguments.length?(st=typeof Xt=="function"?Xt:b(+Xt),Ut):st},Ut.defined=function(Xt){return arguments.length?(yt=typeof Xt=="function"?Xt:b(!!Xt),Ut):yt},Ut.curve=function(Xt){return arguments.length?(jt=Xt,Dt!=null&&(or=jt(Dt)),Ut):jt},Ut.context=function(Xt){return arguments.length?(Xt==null?Dt=or=null:or=jt(Dt=Xt),Ut):Dt},Ut}function P(){var ze=L,st=null,yt=b(0),Dt=A,jt=b(!0),or=null,Ut=k,Xt=null;function sr(pr){var ar,lr,hr,Or,dr,Fr=pr.length,tn=!1,rn=new Array(Fr),An=new Array(Fr);for(or==null&&(Xt=Ut(dr=m.path())),ar=0;ar<=Fr;++ar){if(!(ar<Fr&&jt(Or=pr[ar],ar,pr))===tn)if(tn=!tn)lr=ar,Xt.areaStart(),Xt.lineStart();else{for(Xt.lineEnd(),Xt.lineStart(),hr=ar-1;hr>=lr;--hr)Xt.point(rn[hr],An[hr]);Xt.lineEnd(),Xt.areaEnd()}tn&&(rn[ar]=+ze(Or,ar,pr),An[ar]=+yt(Or,ar,pr),Xt.point(st?+st(Or,ar,pr):rn[ar],Dt?+Dt(Or,ar,pr):An[ar]))}if(dr)return Xt=null,dr+""||null}function vr(){return I().defined(jt).curve(Ut).context(or)}return sr.x=function(pr){return arguments.length?(ze=typeof pr=="function"?pr:b(+pr),st=null,sr):ze},sr.x0=function(pr){return arguments.length?(ze=typeof pr=="function"?pr:b(+pr),sr):ze},sr.x1=function(pr){return arguments.length?(st=pr==null?null:typeof pr=="function"?pr:b(+pr),sr):st},sr.y=function(pr){return arguments.length?(yt=typeof pr=="function"?pr:b(+pr),Dt=null,sr):yt},sr.y0=function(pr){return arguments.length?(yt=typeof pr=="function"?pr:b(+pr),sr):yt},sr.y1=function(pr){return arguments.length?(Dt=pr==null?null:typeof pr=="function"?pr:b(+pr),sr):Dt},sr.lineX0=sr.lineY0=function(){return vr().x(ze).y(yt)},sr.lineY1=function(){return vr().x(ze).y(Dt)},sr.lineX1=function(){return vr().x(st).y(yt)},sr.defined=function(pr){return arguments.length?(jt=typeof pr=="function"?pr:b(!!pr),sr):jt},sr.curve=function(pr){return arguments.length?(Ut=pr,or!=null&&(Xt=Ut(or)),sr):Ut},sr.context=function(pr){return arguments.length?(pr==null?or=Xt=null:Xt=Ut(or=pr),sr):or},sr}function S(ze,st){return st<ze?-1:st>ze?1:st>=ze?0:NaN}function E(ze){return ze}T.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ze,st){switch(ze=+ze,st=+st,this._point){case 0:this._point=1,this._line?this._context.lineTo(ze,st):this._context.moveTo(ze,st);break;case 1:this._point=2;default:this._context.lineTo(ze,st)}}};var D=H(k);function F(ze){this._curve=ze}function H(ze){function st(yt){return new F(ze(yt))}return st._curve=ze,st}function V(ze){var st=ze.curve;return ze.angle=ze.x,delete ze.x,ze.radius=ze.y,delete ze.y,ze.curve=function(yt){return arguments.length?st(H(yt)):st()._curve},ze}function Z(){return V(I().curve(D))}function K(){var ze=P().curve(D),st=ze.curve,yt=ze.lineX0,Dt=ze.lineX1,jt=ze.lineY0,or=ze.lineY1;return ze.angle=ze.x,delete ze.x,ze.startAngle=ze.x0,delete ze.x0,ze.endAngle=ze.x1,delete ze.x1,ze.radius=ze.y,delete ze.y,ze.innerRadius=ze.y0,delete ze.y0,ze.outerRadius=ze.y1,delete ze.y1,ze.lineStartAngle=function(){return V(yt())},delete ze.lineX0,ze.lineEndAngle=function(){return V(Dt())},delete ze.lineX1,ze.lineInnerRadius=function(){return V(jt())},delete ze.lineY0,ze.lineOuterRadius=function(){return V(or())},delete ze.lineY1,ze.curve=function(Ut){return arguments.length?st(H(Ut)):st()._curve},ze}function q(ze,st){return[(st=+st)*Math.cos(ze-=Math.PI/2),st*Math.sin(ze)]}F.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ze,st){this._curve.point(st*Math.sin(ze),st*-Math.cos(ze))}};var W=Array.prototype.slice;function $(ze){return ze.source}function R(ze){return ze.target}function N(ze){var st=$,yt=R,Dt=L,jt=A,or=null;function Ut(){var Xt,sr=W.call(arguments),vr=st.apply(this,sr),pr=yt.apply(this,sr);if(or||(or=Xt=m.path()),ze(or,+Dt.apply(this,(sr[0]=vr,sr)),+jt.apply(this,sr),+Dt.apply(this,(sr[0]=pr,sr)),+jt.apply(this,sr)),Xt)return or=null,Xt+""||null}return Ut.source=function(Xt){return arguments.length?(st=Xt,Ut):st},Ut.target=function(Xt){return arguments.length?(yt=Xt,Ut):yt},Ut.x=function(Xt){return arguments.length?(Dt=typeof Xt=="function"?Xt:b(+Xt),Ut):Dt},Ut.y=function(Xt){return arguments.length?(jt=typeof Xt=="function"?Xt:b(+Xt),Ut):jt},Ut.context=function(Xt){return arguments.length?(or=Xt??null,Ut):or},Ut}function U(ze,st,yt,Dt,jt){ze.moveTo(st,yt),ze.bezierCurveTo(st=(st+Dt)/2,yt,st,jt,Dt,jt)}function Q(ze,st,yt,Dt,jt){ze.moveTo(st,yt),ze.bezierCurveTo(st,yt=(yt+jt)/2,Dt,yt,Dt,jt)}function j(ze,st,yt,Dt,jt){var or=q(st,yt),Ut=q(st,yt=(yt+jt)/2),Xt=q(Dt,yt),sr=q(Dt,jt);ze.moveTo(or[0],or[1]),ze.bezierCurveTo(Ut[0],Ut[1],Xt[0],Xt[1],sr[0],sr[1])}var X={draw:function(ze,st){var yt=Math.sqrt(st/c);ze.moveTo(yt,0),ze.arc(0,0,yt,0,u)}},J={draw:function(ze,st){var yt=Math.sqrt(st/5)/2;ze.moveTo(-3*yt,-yt),ze.lineTo(-yt,-yt),ze.lineTo(-yt,-3*yt),ze.lineTo(yt,-3*yt),ze.lineTo(yt,-yt),ze.lineTo(3*yt,-yt),ze.lineTo(3*yt,yt),ze.lineTo(yt,yt),ze.lineTo(yt,3*yt),ze.lineTo(-yt,3*yt),ze.lineTo(-yt,yt),ze.lineTo(-3*yt,yt),ze.closePath()}},re=Math.sqrt(1/3),ne=2*re,se={draw:function(ze,st){var yt=Math.sqrt(st/ne),Dt=yt*re;ze.moveTo(0,-yt),ze.lineTo(Dt,0),ze.lineTo(0,yt),ze.lineTo(-Dt,0),ze.closePath()}},oe=Math.sin(c/10)/Math.sin(7*c/10),pe=Math.sin(u/10)*oe,ce=-Math.cos(u/10)*oe,de={draw:function(ze,st){var yt=Math.sqrt(.8908130915292852*st),Dt=pe*yt,jt=ce*yt;ze.moveTo(0,-yt),ze.lineTo(Dt,jt);for(var or=1;or<5;++or){var Ut=u*or/5,Xt=Math.cos(Ut),sr=Math.sin(Ut);ze.lineTo(sr*yt,-Xt*yt),ze.lineTo(Xt*Dt-sr*jt,sr*Dt+Xt*jt)}ze.closePath()}},xe={draw:function(ze,st){var yt=Math.sqrt(st),Dt=-yt/2;ze.rect(Dt,Dt,yt,yt)}},we=Math.sqrt(3),be={draw:function(ze,st){var yt=-Math.sqrt(st/(3*we));ze.moveTo(0,2*yt),ze.lineTo(-we*yt,-yt),ze.lineTo(we*yt,-yt),ze.closePath()}},Ee=-.5,fe=Math.sqrt(3)/2,me=1/Math.sqrt(12),Te=3*(me/2+1),_e={draw:function(ze,st){var yt=Math.sqrt(st/Te),Dt=yt/2,jt=yt*me,or=Dt,Ut=yt*me+yt,Xt=-or,sr=Ut;ze.moveTo(Dt,jt),ze.lineTo(or,Ut),ze.lineTo(Xt,sr),ze.lineTo(Ee*Dt-fe*jt,fe*Dt+Ee*jt),ze.lineTo(Ee*or-fe*Ut,fe*or+Ee*Ut),ze.lineTo(Ee*Xt-fe*sr,fe*Xt+Ee*sr),ze.lineTo(Ee*Dt+fe*jt,Ee*jt-fe*Dt),ze.lineTo(Ee*or+fe*Ut,Ee*Ut-fe*or),ze.lineTo(Ee*Xt+fe*sr,Ee*sr-fe*Xt),ze.closePath()}},Ae=[X,J,se,xe,de,be,_e];function Pe(){}function De(ze,st,yt){ze._context.bezierCurveTo((2*ze._x0+ze._x1)/3,(2*ze._y0+ze._y1)/3,(ze._x0+2*ze._x1)/3,(ze._y0+2*ze._y1)/3,(ze._x0+4*ze._x1+st)/6,(ze._y0+4*ze._y1+yt)/6)}function Ve(ze){this._context=ze}function Qe(ze){this._context=ze}function Oe(ze){this._context=ze}function Ue(ze,st){this._basis=new Ve(ze),this._beta=st}Ve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:De(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ze,st){switch(ze=+ze,st=+st,this._point){case 0:this._point=1,this._line?this._context.lineTo(ze,st):this._context.moveTo(ze,st);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:De(this,ze,st)}this._x0=this._x1,this._x1=ze,this._y0=this._y1,this._y1=st}},Qe.prototype={areaStart:Pe,areaEnd:Pe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(ze,st){switch(ze=+ze,st=+st,this._point){case 0:this._point=1,this._x2=ze,this._y2=st;break;case 1:this._point=2,this._x3=ze,this._y3=st;break;case 2:this._point=3,this._x4=ze,this._y4=st,this._context.moveTo((this._x0+4*this._x1+ze)/6,(this._y0+4*this._y1+st)/6);break;default:De(this,ze,st)}this._x0=this._x1,this._x1=ze,this._y0=this._y1,this._y1=st}},Oe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ze,st){switch(ze=+ze,st=+st,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var yt=(this._x0+4*this._x1+ze)/6,Dt=(this._y0+4*this._y1+st)/6;this._line?this._context.lineTo(yt,Dt):this._context.moveTo(yt,Dt);break;case 3:this._point=4;default:De(this,ze,st)}this._x0=this._x1,this._x1=ze,this._y0=this._y1,this._y1=st}},Ue.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ze=this._x,st=this._y,yt=ze.length-1;if(yt>0)for(var Dt,jt=ze[0],or=st[0],Ut=ze[yt]-jt,Xt=st[yt]-or,sr=-1;++sr<=yt;)Dt=sr/yt,this._basis.point(this._beta*ze[sr]+(1-this._beta)*(jt+Dt*Ut),this._beta*st[sr]+(1-this._beta)*(or+Dt*Xt));this._x=this._y=null,this._basis.lineEnd()},point:function(ze,st){this._x.push(+ze),this._y.push(+st)}};var Ge=function ze(st){function yt(Dt){return st===1?new Ve(Dt):new Ue(Dt,st)}return yt.beta=function(Dt){return ze(+Dt)},yt}(.85);function Ye(ze,st,yt){ze._context.bezierCurveTo(ze._x1+ze._k*(ze._x2-ze._x0),ze._y1+ze._k*(ze._y2-ze._y0),ze._x2+ze._k*(ze._x1-st),ze._y2+ze._k*(ze._y1-yt),ze._x2,ze._y2)}function tt(ze,st){this._context=ze,this._k=(1-st)/6}tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ye(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ze,st){switch(ze=+ze,st=+st,this._point){case 0:this._point=1,this._line?this._context.lineTo(ze,st):this._context.moveTo(ze,st);break;case 1:this._point=2,this._x1=ze,this._y1=st;break;case 2:this._point=3;default:Ye(this,ze,st)}this._x0=this._x1,this._x1=this._x2,this._x2=ze,this._y0=this._y1,this._y1=this._y2,this._y2=st}};var lt=function ze(st){function yt(Dt){return new tt(Dt,st)}return yt.tension=function(Dt){return ze(+Dt)},yt}(0);function vt(ze,st){this._context=ze,this._k=(1-st)/6}vt.prototype={areaStart:Pe,areaEnd:Pe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(ze,st){switch(ze=+ze,st=+st,this._point){case 0:this._point=1,this._x3=ze,this._y3=st;break;case 1:this._point=2,this._context.moveTo(this._x4=ze,this._y4=st);break;case 2:this._point=3,this._x5=ze,this._y5=st;break;default:Ye(this,ze,st)}this._x0=this._x1,this._x1=this._x2,this._x2=ze,this._y0=this._y1,this._y1=this._y2,this._y2=st}};var It=function ze(st){function yt(Dt){return new vt(Dt,st)}return yt.tension=function(Dt){return ze(+Dt)},yt}(0);function St(ze,st){this._context=ze,this._k=(1-st)/6}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ze,st){switch(ze=+ze,st=+st,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ye(this,ze,st)}this._x0=this._x1,this._x1=this._x2,this._x2=ze,this._y0=this._y1,this._y1=this._y2,this._y2=st}};var rt=function ze(st){function yt(Dt){return new St(Dt,st)}return yt.tension=function(Dt){return ze(+Dt)},yt}(0);function et(ze,st,yt){var Dt=ze._x1,jt=ze._y1,or=ze._x2,Ut=ze._y2;if(ze._l01_a>1e-12){var Xt=2*ze._l01_2a+3*ze._l01_a*ze._l12_a+ze._l12_2a,sr=3*ze._l01_a*(ze._l01_a+ze._l12_a);Dt=(Dt*Xt-ze._x0*ze._l12_2a+ze._x2*ze._l01_2a)/sr,jt=(jt*Xt-ze._y0*ze._l12_2a+ze._y2*ze._l01_2a)/sr}if(ze._l23_a>1e-12){var vr=2*ze._l23_2a+3*ze._l23_a*ze._l12_a+ze._l12_2a,pr=3*ze._l23_a*(ze._l23_a+ze._l12_a);or=(or*vr+ze._x1*ze._l23_2a-st*ze._l12_2a)/pr,Ut=(Ut*vr+ze._y1*ze._l23_2a-yt*ze._l12_2a)/pr}ze._context.bezierCurveTo(Dt,jt,or,Ut,ze._x2,ze._y2)}function Tt(ze,st){this._context=ze,this._alpha=st}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ze,st){if(ze=+ze,st=+st,this._point){var yt=this._x2-ze,Dt=this._y2-st;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(yt*yt+Dt*Dt,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ze,st):this._context.moveTo(ze,st);break;case 1:this._point=2;break;case 2:this._point=3;default:et(this,ze,st)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ze,this._y0=this._y1,this._y1=this._y2,this._y2=st}};
vendor: 3,543 bytes, line 20
20var Vt=function ze(st){function yt(Dt){return st?new Tt(Dt,st):new tt(Dt,0)}return yt.alpha=function(Dt){return ze(+Dt)},yt}(.5);function Kt(ze,st){this._context=ze,this._alpha=st}Kt.prototype={areaStart:Pe,areaEnd:Pe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(ze,st){if(ze=+ze,st=+st,this._point){var yt=this._x2-ze,Dt=this._y2-st;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(yt*yt+Dt*Dt,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ze,this._y3=st;break;case 1:this._point=2,this._context.moveTo(this._x4=ze,this._y4=st);break;case 2:this._point=3,this._x5=ze,this._y5=st;break;default:et(this,ze,st)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ze,this._y0=this._y1,this._y1=this._y2,this._y2=st}};var Be=function ze(st){function yt(Dt){return st?new Kt(Dt,st):new vt(Dt,0)}return yt.alpha=function(Dt){return ze(+Dt)},yt}(.5);function qe(ze,st){this._context=ze,this._alpha=st}qe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ze,st){if(ze=+ze,st=+st,this._point){var yt=this._x2-ze,Dt=this._y2-st;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(yt*yt+Dt*Dt,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:et(this,ze,st)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ze,this._y0=this._y1,this._y1=this._y2,this._y2=st}};var Re=function ze(st){function yt(Dt){return st?new qe(Dt,st):new St(Dt,0)}return yt.alpha=function(Dt){return ze(+Dt)},yt}(.5);function Xe(ze){this._context=ze}function ke(ze){return ze<0?-1:1}function Le(ze,st,yt){var Dt=ze._x1-ze._x0,jt=st-ze._x1,or=(ze._y1-ze._y0)/(Dt||jt<0&&-0),Ut=(yt-ze._y1)/(jt||Dt<0&&-0),Xt=(or*jt+Ut*Dt)/(Dt+jt);return(ke(or)+ke(Ut))*Math.min(Math.abs(or),Math.abs(Ut),.5*Math.abs(Xt))||0}function Ie(ze,st){var yt=ze._x1-ze._x0;return yt?(3*(ze._y1-ze._y0)/yt-st)/2:st}function Ce(ze,st,yt){var Dt=ze._x0,jt=ze._y0,or=ze._x1,Ut=ze._y1,Xt=(or-Dt)/3;ze._context.bezierCurveTo(Dt+Xt,jt+Xt*st,or-Xt,Ut-Xt*yt,or,Ut)}function Je(ze){this._context=ze}function it(ze){this._context=new ht(ze)}function ht(ze){this._context=ze}function ut(ze){this._context=ze}function kt(ze){var st,yt,Dt=ze.length-1,jt=new Array(Dt),or=new Array(Dt),Ut=new Array(Dt);for(jt[0]=0,or[0]=2,Ut[0]=ze[0]+2*ze[1],st=1;st<Dt-1;++st)jt[st]=1,or[st]=4,Ut[st]=4*ze[st]+2*ze[st+1];for(jt[Dt-1]=2,or[Dt-1]=7,Ut[Dt-1]=8*ze[Dt-1]+ze[Dt],st=1;st<Dt;++st)yt=jt[st]/or[st-1],or[st]-=yt,Ut[st]-=yt*Ut[st-1];
vendor: 8,944 bytes, line 20
20for(jt[Dt-1]=Ut[Dt-1]/or[Dt-1],st=Dt-2;st>=0;--st)jt[st]=(Ut[st]-jt[st+1])/or[st];for(or[Dt-1]=(ze[Dt]+jt[Dt-1])/2,st=0;st<Dt-1;++st)or[st]=2*ze[st+1]-jt[st+1];return[jt,or]}function ot(ze,st){this._context=ze,this._t=st}function Lt(ze,st){if((jt=ze.length)>1)for(var yt,Dt,jt,or=1,Ut=ze[st[0]],Xt=Ut.length;or<jt;++or)for(Dt=Ut,Ut=ze[st[or]],yt=0;yt<Xt;++yt)Ut[yt][1]+=Ut[yt][0]=isNaN(Dt[yt][1])?Dt[yt][0]:Dt[yt][1]}function Et(ze){for(var st=ze.length,yt=new Array(st);--st>=0;)yt[st]=st;return yt}function Ze(ze,st){return ze[st]}function pt(ze){var st=ze.map(Ct);return Et(ze).sort(function(yt,Dt){return st[yt]-st[Dt]})}function Ct(ze){for(var st,yt=-1,Dt=0,jt=ze.length,or=-1/0;++yt<jt;)(st=+ze[yt][1])>or&&(or=st,Dt=yt);return Dt}function zt(ze){var st=ze.map(Gt);return Et(ze).sort(function(yt,Dt){return st[yt]-st[Dt]})}function Gt(ze){for(var st,yt=0,Dt=-1,jt=ze.length;++Dt<jt;)(st=+ze[Dt][1])&&(yt+=st);return yt}Xe.prototype={areaStart:Pe,areaEnd:Pe,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ze,st){ze=+ze,st=+st,this._point?this._context.lineTo(ze,st):(this._point=1,this._context.moveTo(ze,st))}},Je.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ce(this,this._t0,Ie(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ze,st){var yt=NaN;if(st=+st,(ze=+ze)!==this._x1||st!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ze,st):this._context.moveTo(ze,st);break;case 1:this._point=2;break;case 2:this._point=3,Ce(this,Ie(this,yt=Le(this,ze,st)),yt);break;default:Ce(this,this._t0,yt=Le(this,ze,st))}this._x0=this._x1,this._x1=ze,this._y0=this._y1,this._y1=st,this._t0=yt}}},(it.prototype=Object.create(Je.prototype)).point=function(ze,st){Je.prototype.point.call(this,st,ze)},ht.prototype={moveTo:function(ze,st){this._context.moveTo(st,ze)},closePath:function(){this._context.closePath()},lineTo:function(ze,st){this._context.lineTo(st,ze)},bezierCurveTo:function(ze,st,yt,Dt,jt,or){this._context.bezierCurveTo(st,ze,Dt,yt,or,jt)}},ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ze=this._x,st=this._y,yt=ze.length;if(yt)if(this._line?this._context.lineTo(ze[0],st[0]):this._context.moveTo(ze[0],st[0]),yt===2)this._context.lineTo(ze[1],st[1]);else for(var Dt=kt(ze),jt=kt(st),or=0,Ut=1;Ut<yt;++or,++Ut)this._context.bezierCurveTo(Dt[0][or],jt[0][or],Dt[1][or],jt[1][or],ze[Ut],st[Ut]);(this._line||this._line!==0&&yt===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(ze,st){this._x.push(+ze),this._y.push(+st)}},ot.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ze,st){switch(ze=+ze,st=+st,this._point){case 0:this._point=1,this._line?this._context.lineTo(ze,st):this._context.moveTo(ze,st);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,st),this._context.lineTo(ze,st);else{var yt=this._x*(1-this._t)+ze*this._t;this._context.lineTo(yt,this._y),this._context.lineTo(yt,st)}}this._x=ze,this._y=st}},g.arc=function(){var ze=h,st=p,yt=b(0),Dt=null,jt=a,or=x,Ut=l,Xt=null;function sr(){var vr,pr,ar=+ze.apply(this,arguments),lr=+st.apply(this,arguments),hr=jt.apply(this,arguments)-i,Or=or.apply(this,arguments)-i,dr=v(Or-hr),Fr=Or>hr;if(Xt||(Xt=vr=m.path()),lr<ar&&(pr=lr,lr=ar,ar=pr),lr>1e-12)if(dr>u-1e-12)Xt.moveTo(lr*n(hr),lr*r(hr)),Xt.arc(0,0,lr,hr,Or,!Fr),ar>1e-12&&(Xt.moveTo(ar*n(Or),ar*r(Or)),Xt.arc(0,0,ar,Or,hr,Fr));else{var tn,rn,An=hr,Ln=Or,_n=hr,Vr=Or,Ir=dr,xr=dr,Nr=Ut.apply(this,arguments)/2,en=Nr>1e-12&&(Dt?+Dt.apply(this,arguments):d(ar*ar+lr*lr)),Qr=o(v(lr-ar)/2,+yt.apply(this,arguments)),yn=Qr,un=Qr;if(en>1e-12){var $r=s(en/ar*r(Nr)),In=s(en/lr*r(Nr));(Ir-=2*$r)>1e-12?(_n+=$r*=Fr?1:-1,Vr-=$r):(Ir=0,_n=Vr=(hr+Or)/2),(xr-=2*In)>1e-12?(An+=In*=Fr?1:-1,Ln-=In):(xr=0,An=Ln=(hr+Or)/2)}var Qt=lr*n(An),Pt=lr*r(An),Yt=ar*n(Vr),cr=ar*r(Vr);if(Qr>1e-12){var wr,qr=lr*n(Ln),Ur=lr*r(Ln),br=ar*n(_n),_r=ar*r(_n);if(dr<c&&(wr=w(Qt,Pt,br,_r,qr,Ur,Yt,cr))){var Ar=Qt-wr[0],Mr=Pt-wr[1],Cr=qr-wr[0],Gr=Ur-wr[1],cn=1/r(f((Ar*Cr+Mr*Gr)/(d(Ar*Ar+Mr*Mr)*d(Cr*Cr+Gr*Gr)))/2),wn=d(wr[0]*wr[0]+wr[1]*wr[1]);yn=o(Qr,(ar-wn)/(cn-1)),un=o(Qr,(lr-wn)/(cn+1))}}xr>1e-12?un>1e-12?(tn=_(br,_r,Qt,Pt,lr,un,Fr),rn=_(qr,Ur,Yt,cr,lr,un,Fr),Xt.moveTo(tn.cx+tn.x01,tn.cy+tn.y01),un<Qr?Xt.arc(tn.cx,tn.cy,un,e(tn.y01,tn.x01),e(rn.y01,rn.x01),!Fr):(Xt.arc(tn.cx,tn.cy,un,e(tn.y01,tn.x01),e(tn.y11,tn.x11),!Fr),Xt.arc(0,0,lr,e(tn.cy+tn.y11,tn.cx+tn.x11),e(rn.cy+rn.y11,rn.cx+rn.x11),!Fr),Xt.arc(rn.cx,rn.cy,un,e(rn.y11,rn.x11),e(rn.y01,rn.x01),!Fr))):(Xt.moveTo(Qt,Pt),Xt.arc(0,0,lr,An,Ln,!Fr)):Xt.moveTo(Qt,Pt),ar>1e-12&&Ir>1e-12?yn>1e-12?(tn=_(Yt,cr,qr,Ur,ar,-yn,Fr),rn=_(Qt,Pt,br,_r,ar,-yn,Fr),Xt.lineTo(tn.cx+tn.x01,tn.cy+tn.y01),yn<Qr?Xt.arc(tn.cx,tn.cy,yn,e(tn.y01,tn.x01),e(rn.y01,rn.x01),!Fr):(Xt.arc(tn.cx,tn.cy,yn,e(tn.y01,tn.x01),e(tn.y11,tn.x11),!Fr),Xt.arc(0,0,ar,e(tn.cy+tn.y11,tn.cx+tn.x11),e(rn.cy+rn.y11,rn.cx+rn.x11),Fr),Xt.arc(rn.cx,rn.cy,yn,e(rn.y11,rn.x11),e(rn.y01,rn.x01),!Fr))):Xt.arc(0,0,ar,Vr,_n,Fr):Xt.lineTo(Yt,cr)}else Xt.moveTo(0,0);if(Xt.closePath(),vr)return Xt=null,vr+""||null}return sr.centroid=function(){var vr=(+ze.apply(this,arguments)+ +st.apply(this,arguments))/2,pr=(+jt.apply(this,arguments)+ +or.apply(this,arguments))/2-c/2;return[n(pr)*vr,r(pr)*vr]},sr.innerRadius=function(vr){return arguments.length?(ze=typeof vr=="function"?vr:b(+vr),sr):ze},sr.outerRadius=function(vr){return arguments.length?(st=typeof vr=="function"?vr:b(+vr),sr):st},sr.cornerRadius=function(vr){return arguments.length?(yt=typeof vr=="function"?vr:b(+vr),sr):yt},sr.padRadius=function(vr){return arguments.length?(Dt=vr==null?null:typeof vr=="function"?vr:b(+vr),sr):Dt},sr.startAngle=function(vr){return arguments.length?(jt=typeof vr=="function"?vr:b(+vr),sr):jt},sr.endAngle=function(vr){return arguments.length?(or=typeof vr=="function"?vr:b(+vr),sr):or},sr.padAngle=function(vr){return arguments.length?(Ut=typeof vr=="function"?vr:b(+vr),sr):Ut},sr.context=function(vr){return arguments.length?(Xt=vr??null,sr):Xt},sr},g.area=P,g.areaRadial=K,g.curveBasis=function(ze){return new Ve(ze)},g.curveBasisClosed=function(ze){return new Qe(ze)},g.curveBasisOpen=function(ze){return new Oe(ze)},g.curveBundle=Ge,g.curveCardinal=lt,g.curveCardinalClosed=It,g.curveCardinalOpen=rt,g.curveCatmullRom=Vt,g.curveCatmullRomClosed=Be,g.curveCatmullRomOpen=Re,g.curveLinear=k,g.curveLinearClosed=function(ze){return new Xe(ze)},g.curveMonotoneX=function(ze){return new Je(ze)},g.curveMonotoneY=function(ze){return new it(ze)},g.curveNatural=function(ze){return new ut(ze)},g.curveStep=function(ze){return new ot(ze,.5)},g.curveStepAfter=function(ze){return new ot(ze,1)},g.curveStepBefore=function(ze){return new ot(ze,0)},g.line=I,g.lineRadial=Z,g.linkHorizontal=function(){return N(U)},g.linkRadial=function(){var ze=N(j);return ze.angle=ze.x,delete ze.x,ze.radius=ze.y,delete ze.y,ze},g.linkVertical=function(){return N(Q)},g.pie=function(){var ze=E,st=S,yt=null,Dt=b(0),jt=b(u),or=b(0);function Ut(Xt){var sr,vr,pr,ar,lr,hr=Xt.length,Or=0,dr=new Array(hr),Fr=new Array(hr),tn=+Dt.apply(this,arguments),rn=Math.min(u,Math.max(-u,jt.apply(this,arguments)-tn)),An=Math.min(Math.abs(rn)/hr,or.apply(this,arguments)),Ln=An*(rn<0?-1:1);for(sr=0;sr<hr;++sr)(lr=Fr[dr[sr]=sr]=+ze(Xt[sr],sr,Xt))>0&&(Or+=lr);for(st!=null?dr.sort(function(_n,Vr){return st(Fr[_n],Fr[Vr])}):yt!=null&&dr.sort(function(_n,Vr){return yt(Xt[_n],Xt[Vr])}),sr=0,pr=Or?(rn-hr*Ln)/Or:0;sr<hr;++sr,tn=ar)vr=dr[sr],ar=tn+((lr=Fr[vr])>0?lr*pr:0)+Ln,Fr[vr]={data:Xt[vr],index:sr,value:lr,startAngle:tn,endAngle:ar,padAngle:An};return Fr}return Ut.value=function(Xt){return arguments.length?(ze=typeof Xt=="function"?Xt:b(+Xt),Ut):ze},Ut.sortValues=function(Xt){return arguments.length?(st=Xt,yt=null,Ut):st},Ut.sort=function(Xt){return arguments.length?(yt=Xt,st=null,Ut):yt},Ut.startAngle=function(Xt){return arguments.length?(Dt=typeof Xt=="function"?Xt:b(+Xt),Ut):Dt},Ut.endAngle=function(Xt){return arguments.length?(jt=typeof Xt=="function"?Xt:b(+Xt),Ut):jt},Ut.padAngle=function(Xt){return arguments.length?(or=typeof Xt=="function"?Xt:b(+Xt),Ut):or},Ut},g.pointRadial=q,g.radialArea=K,g.radialLine=Z,g.stack=function(){var ze=b([]),st=Et,yt=Lt,Dt=Ze;
20function jt(or){var Ut,Xt,sr=ze.apply(this,arguments),vr=or.length,pr=sr.length,ar=new Array(pr);for(Ut=0;Ut<pr;++Ut){for(var lr,hr=sr[Ut],Or=ar[Ut]=new Array(vr),dr=0;dr<vr;++dr)Or[dr]=lr=[0,+Dt(or[dr],hr,dr,or)],lr.data=or[dr];Or.key=hr}for(Ut=0,Xt=st(ar);Ut<pr;++Ut)ar[Xt[Ut]].index=Ut;return yt(ar,Xt),ar}return jt.keys=function(or){return arguments.length?(ze=typeof or=="function"?or:b(W.call(or)),jt):ze},jt.value=function(or){return arguments.length?(Dt=typeof or=="function"?or:b(+or),jt):Dt},jt.order=function(or){return arguments.length?(st=or==null?Et:typeof or=="function"?or:b(W.call(or)),jt):st},jt.offset=function(or){return arguments.length?(yt=or??Lt,jt):yt},jt},g.stackOffsetDiverging=function(ze,st){if((Xt=ze.length)>0)for(var yt,Dt,jt,or,Ut,Xt,sr=0,vr=ze[st[0]].length;sr<vr;++sr)for(or=Ut=0,yt=0;yt<Xt;++yt)(jt=(Dt=ze[st[yt]][sr])[1]-Dt[0])>0?(Dt[0]=or,Dt[1]=or+=jt):jt<0?(Dt[1]=Ut,Dt[0]=Ut+=jt):(Dt[0]=0,Dt[1]=jt)},g.stackOffsetExpand=function(ze,st){if((Dt=ze.length)>0){for(var yt,Dt,jt,or=0,Ut=ze[0].length;or<Ut;++or){for(jt=yt=0;yt<Dt;++yt)jt+=ze[yt][or][1]||0;if(jt)for(yt=0;yt<Dt;++yt)ze[yt][or][1]/=jt}Lt(ze,st)}},g.stackOffsetNone=Lt,g.stackOffsetSilhouette=function(ze,st){if((yt=ze.length)>0){for(var yt,Dt=0,jt=ze[st[0]],or=jt.length;Dt<or;++Dt){for(var Ut=0,Xt=0;Ut<yt;++Ut)Xt+=ze[Ut][Dt][1]||0;jt[Dt][1]+=jt[Dt][0]=-Xt/2}Lt(ze,st)}},g.stackOffsetWiggle=function(ze,st){if((jt=ze.length)>0&&(Dt=(yt=ze[st[0]]).length)>0){for(var yt,Dt,jt,or=0,Ut=1;Ut<Dt;++Ut){for(var Xt=0,sr=0,vr=0;Xt<jt;++Xt){for(var pr=ze[st[Xt]],ar=pr[Ut][1]||0,lr=(ar-(pr[Ut-1][1]||0))/2,hr=0;hr<Xt;++hr){var Or=ze[st[hr]];lr+=(Or[Ut][1]||0)-(Or[Ut-1][1]||0)}sr+=ar,vr+=lr*ar}yt[Ut-1][1]+=yt[Ut-1][0]=or,sr&&(or-=vr/sr)}yt[Ut-1][1]+=yt[Ut-1][0]=or,Lt(ze,st)}},g.stackOrderAppearance=pt,g.stackOrderAscending=zt,g.stackOrderDescending=function(ze){return zt(ze).reverse()},g.stackOrderInsideOut=function(ze){var st,yt,Dt=ze.length,jt=ze.map(Gt),or=pt(ze),Ut=0,Xt=0,sr=[],vr=[];for(st=0;st<Dt;++st)yt=or[st],Ut<Xt?(Ut+=jt[yt],sr.push(yt)):(Xt+=jt[yt],vr.push(yt));return vr.reverse().concat(sr)},g.stackOrderNone=Et,g.stackOrderReverse=function(ze){return Et(ze).reverse()},g.symbol=function(){var ze=b(X),st=b(64),yt=null;function Dt(){var jt;if(yt||(yt=jt=m.path()),ze.apply(this,arguments).draw(yt,+st.apply(this,arguments)),jt)return yt=null,jt+""||null}return Dt.type=function(jt){return arguments.length?(ze=typeof jt=="function"?jt:b(jt),Dt):ze},Dt.size=function(jt){return arguments.length?(st=typeof jt=="function"?jt:b(+jt),Dt):st},Dt.context=function(jt){return arguments.length?(yt=jt??null,Dt):yt},Dt},g.symbolCircle=X,g.symbolCross=J,g.symbolDiamond=se,g.symbolSquare=xe,g.symbolStar=de,g.symbolTriangle=be,g.symbolWye=_e,g.symbols=Ae,Object.defineProperty(g,"__esModule",{value:!0})})},{"d3-path":117}],120:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?m(te,y("d3-time")):m((g=g||self).d3=g.d3||{},g.d3)})(this,function(g,m){function b(rt){if(0<=rt.y&&rt.y<100){var et=new Date(-1,rt.m,rt.d,rt.H,rt.M,rt.S,rt.L);return et.setFullYear(rt.y),et}return new Date(rt.y,rt.m,rt.d,rt.H,rt.M,rt.S,rt.L)}function v(rt){if(0<=rt.y&&rt.y<100){var et=new Date(Date.UTC(-1,rt.m,rt.d,rt.H,rt.M,rt.S,rt.L));return et.setUTCFullYear(rt.y),et}return new Date(Date.UTC(rt.y,rt.m,rt.d,rt.H,rt.M,rt.S,rt.L))}function e(rt,et,Tt){return{y:rt,m:et,d:Tt,H:0,M:0,S:0,L:0}}function n(rt){var et=rt.dateTime,Tt=rt.date,Vt=rt.time,Kt=rt.periods,Be=rt.days,qe=rt.shortDays,Re=rt.months,Xe=rt.shortMonths,ke=f(Kt),Le=s(Kt),Ie=f(Be),Ce=s(Be),Je=f(qe),it=s(qe),ht=f(Re),ut=s(Re),kt=f(Xe),ot=s(Xe),Lt={a:function(Gt){return qe[Gt.getDay()]},A:function(Gt){return Be[Gt.getDay()]},b:function(Gt){return Xe[Gt.getMonth()]},B:function(Gt){return Re[Gt.getMonth()]},c:null,d:K,e:K,f:N,H:q,I:W,j:$,L:R,m:U,M:Q,p:function(Gt){return Kt[+(Gt.getHours()>=12)]},q:function(Gt){return 1+~~(Gt.getMonth()/3)},Q:tt,s:lt,S:j,u:X,U:J,V:re,w:ne,W:se,x:null,X:null,y:oe,Y:pe,Z:ce,"%":Ye},Et={a:function(Gt){return qe[Gt.getUTCDay()]},A:function(Gt){return Be[Gt.getUTCDay()]},b:function(Gt){return Xe[Gt.getUTCMonth()]},B:function(Gt){return Re[Gt.getUTCMonth()]},c:null,d:de,e:de,f:fe,H:xe,I:we,j:be,L:Ee,m:me,M:Te,p:function(Gt){return Kt[+(Gt.getUTCHours()>=12)]},q:function(Gt){return 1+~~(Gt.getUTCMonth()/3)},Q:tt,s:lt,S:_e,u:Ae,U:Pe,V:De,w:Ve,W:Qe,x:null,X:null,y:Oe,Y:Ue,Z:Ge,"%":Ye},Ze={a:function(Gt,ze,st){var yt=Je.exec(ze.slice(st));return yt?(Gt.w=it[yt[0].toLowerCase()],st+yt[0].length):-1},A:function(Gt,ze,st){var yt=Ie.exec(ze.slice(st));return yt?(Gt.w=Ce[yt[0].toLowerCase()],st+yt[0].length):-1},b:function(Gt,ze,st){var yt=kt.exec(ze.slice(st));return yt?(Gt.m=ot[yt[0].toLowerCase()],st+yt[0].length):-1},B:function(Gt,ze,st){var yt=ht.exec(ze.slice(st));return yt?(Gt.m=ut[yt[0].toLowerCase()],st+yt[0].length):-1},c:function(Gt,ze,st){return zt(Gt,et,ze,st)}
vendor: 7,321 bytes, line 20
20,d:A,e:A,f:F,H:P,I:P,j:I,L:D,m:L,M:S,p:function(Gt,ze,st){var yt=ke.exec(ze.slice(st));return yt?(Gt.p=Le[yt[0].toLowerCase()],st+yt[0].length):-1},q:k,Q:V,s:Z,S:E,u:p,U:a,V:x,w:h,W:l,x:function(Gt,ze,st){return zt(Gt,Tt,ze,st)},X:function(Gt,ze,st){return zt(Gt,Vt,ze,st)},y:_,Y:w,Z:T,"%":H};function pt(Gt,ze){return function(st){var yt,Dt,jt,or=[],Ut=-1,Xt=0,sr=Gt.length;for(st instanceof Date||(st=new Date(+st));++Ut<sr;)Gt.charCodeAt(Ut)===37&&(or.push(Gt.slice(Xt,Ut)),(Dt=o[yt=Gt.charAt(++Ut)])!=null?yt=Gt.charAt(++Ut):Dt=yt==="e"?" ":"0",(jt=ze[yt])&&(yt=jt(st,Dt)),or.push(yt),Xt=Ut+1);return or.push(Gt.slice(Xt,Ut)),or.join("")}}function Ct(Gt,ze){return function(st){var yt,Dt,jt=e(1900,void 0,1);if(zt(jt,Gt,st+="",0)!=st.length)return null;if("Q"in jt)return new Date(jt.Q);if("s"in jt)return new Date(1e3*jt.s+("L"in jt?jt.L:0));if(ze&&!("Z"in jt)&&(jt.Z=0),"p"in jt&&(jt.H=jt.H%12+12*jt.p),jt.m===void 0&&(jt.m="q"in jt?jt.q:0),"V"in jt){if(jt.V<1||jt.V>53)return null;"w"in jt||(jt.w=1),"Z"in jt?(Dt=(yt=v(e(jt.y,0,1))).getUTCDay(),yt=Dt>4||Dt===0?m.utcMonday.ceil(yt):m.utcMonday(yt),yt=m.utcDay.offset(yt,7*(jt.V-1)),jt.y=yt.getUTCFullYear(),jt.m=yt.getUTCMonth(),jt.d=yt.getUTCDate()+(jt.w+6)%7):(Dt=(yt=b(e(jt.y,0,1))).getDay(),yt=Dt>4||Dt===0?m.timeMonday.ceil(yt):m.timeMonday(yt),yt=m.timeDay.offset(yt,7*(jt.V-1)),jt.y=yt.getFullYear(),jt.m=yt.getMonth(),jt.d=yt.getDate()+(jt.w+6)%7)}else("W"in jt||"U"in jt)&&("w"in jt||(jt.w="u"in jt?jt.u%7:"W"in jt?1:0),Dt="Z"in jt?v(e(jt.y,0,1)).getUTCDay():b(e(jt.y,0,1)).getDay(),jt.m=0,jt.d="W"in jt?(jt.w+6)%7+7*jt.W-(Dt+5)%7:jt.w+7*jt.U-(Dt+6)%7);return"Z"in jt?(jt.H+=jt.Z/100|0,jt.M+=jt.Z%100,v(jt)):b(jt)}}function zt(Gt,ze,st,yt){for(var Dt,jt,or=0,Ut=ze.length,Xt=st.length;or<Ut;){if(yt>=Xt)return-1;if((Dt=ze.charCodeAt(or++))===37){if(Dt=ze.charAt(or++),!(jt=Ze[Dt in o?ze.charAt(or++):Dt])||(yt=jt(Gt,st,yt))<0)return-1}else if(Dt!=st.charCodeAt(yt++))return-1}return yt}return Lt.x=pt(Tt,Lt),Lt.X=pt(Vt,Lt),Lt.c=pt(et,Lt),Et.x=pt(Tt,Et),Et.X=pt(Vt,Et),Et.c=pt(et,Et),{format:function(Gt){var ze=pt(Gt+="",Lt);return ze.toString=function(){return Gt},ze},parse:function(Gt){var ze=Ct(Gt+="",!1);return ze.toString=function(){return Gt},ze},utcFormat:function(Gt){var ze=pt(Gt+="",Et);return ze.toString=function(){return Gt},ze},utcParse:function(Gt){var ze=Ct(Gt+="",!0);return ze.toString=function(){return Gt},ze}}}var t,o={"-":"",_:" ",0:"0"},r=/^\s*\d+/,d=/^%/,c=/[\\^$*+?|[\]().{}]/g;function i(rt,et,Tt){var Vt=rt<0?"-":"",Kt=(Vt?-rt:rt)+"",Be=Kt.length;return Vt+(Be<Tt?new Array(Tt-Be+1).join(et)+Kt:Kt)}function u(rt){return rt.replace(c,"\\$&")}function f(rt){return new RegExp("^(?:"+rt.map(u).join("|")+")","i")}function s(rt){for(var et={},Tt=-1,Vt=rt.length;++Tt<Vt;)et[rt[Tt].toLowerCase()]=Tt;return et}function h(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+1));return Vt?(rt.w=+Vt[0],Tt+Vt[0].length):-1}function p(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+1));return Vt?(rt.u=+Vt[0],Tt+Vt[0].length):-1}function a(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.U=+Vt[0],Tt+Vt[0].length):-1}function x(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.V=+Vt[0],Tt+Vt[0].length):-1}function l(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.W=+Vt[0],Tt+Vt[0].length):-1}function w(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+4));return Vt?(rt.y=+Vt[0],Tt+Vt[0].length):-1}function _(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.y=+Vt[0]+(+Vt[0]>68?1900:2e3),Tt+Vt[0].length):-1}function T(rt,et,Tt){var Vt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Tt,Tt+6));return Vt?(rt.Z=Vt[1]?0:-(Vt[2]+(Vt[3]||"00")),Tt+Vt[0].length):-1}function k(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+1));return Vt?(rt.q=3*Vt[0]-3,Tt+Vt[0].length):-1}function L(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.m=Vt[0]-1,Tt+Vt[0].length):-1}function A(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.d=+Vt[0],Tt+Vt[0].length):-1}function I(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+3));return Vt?(rt.m=0,rt.d=+Vt[0],Tt+Vt[0].length):-1}function P(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.H=+Vt[0],Tt+Vt[0].length):-1}function S(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.M=+Vt[0],Tt+Vt[0].length):-1}function E(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+2));return Vt?(rt.S=+Vt[0],Tt+Vt[0].length):-1}function D(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+3));return Vt?(rt.L=+Vt[0],Tt+Vt[0].length):-1}function F(rt,et,Tt){var Vt=r.exec(et.slice(Tt,Tt+6));return Vt?(rt.L=Math.floor(Vt[0]/1e3),Tt+Vt[0].length):-1}function H(rt,et,Tt){var Vt=d.exec(et.slice(Tt,Tt+1));return Vt?Tt+Vt[0].length:-1}function V(rt,et,Tt){var Vt=r.exec(et.slice(Tt));return Vt?(rt.Q=+Vt[0],Tt+Vt[0].length):-1}function Z(rt,et,Tt){var Vt=r.exec(et.slice(Tt));return Vt?(rt.s=+Vt[0],Tt+Vt[0].length):-1}function K(rt,et){return i(rt.getDate(),et,2)}function q(rt,et){return i(rt.getHours(),et,2)}function W(rt,et){return i(rt.getHours()%12||12,et,2)}function $(rt,et){return i(1+m.timeDay.count(m.timeYear(rt),rt),et,3)}function R(rt,et){return i(rt.getMilliseconds(),et,3)}function N(rt,et){return R(rt,et)+"000"}function U(rt,et){return i(rt.getMonth()+1,et,2)}function Q(rt,et){return i(rt.getMinutes(),et,2)}function j(rt,et){return i(rt.getSeconds(),et,2)}function X(rt){var et=rt.getDay();return et===0?7:et}function J(rt,et){return i(m.timeSunday.count(m.timeYear(rt)-1,rt),et,2)}function re(rt,et){var Tt=rt.getDay();return rt=Tt>=4||Tt===0?m.timeThursday(rt):m.timeThursday.ceil(rt),i(m.timeThursday.count(m.timeYear(rt),rt)+(m.timeYear(rt).getDay()===4),et,2)}function ne(rt){return rt.getDay()}function se(rt,et){return i(m.timeMonday.count(m.timeYear(rt)-1,rt),et,2)}function oe(rt,et){return i(rt.getFullYear()%100,et,2)}function pe(rt,et){return i(rt.getFullYear()%1e4,et,4)}function ce(rt){var et=rt.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+i(et/60|0,"0",2)+i(et%60,"0",2)}function de(rt,et){return i(rt.getUTCDate(),et,2)}function xe(rt,et){return i(rt.getUTCHours(),et,2)}function we(rt,et){return i(rt.getUTCHours()%12||12,et,2)}function be(rt,et){return i(1+m.utcDay.count(m.utcYear(rt),rt),et,3)}function Ee(rt,et){return i(rt.getUTCMilliseconds(),et,3)}function fe(rt,et){return Ee(rt,et)+"000"}function me(rt,et){return i(rt.getUTCMonth()+1,et,2)}function Te(rt,et){return i(rt.getUTCMinutes(),et,2)}function _e(rt,et){return i(rt.getUTCSeconds(),et,2)}function Ae(rt){var et=rt.getUTCDay();return et===0?7:et}function Pe(rt,et){return i(m.utcSunday.count(m.utcYear(rt)-1,rt),et,2)}function De(rt,et){var Tt=rt.getUTCDay();return rt=Tt>=4||Tt===0?m.utcThursday(rt):m.utcThursday.ceil(rt),i(m.utcThursday.count(m.utcYear(rt),rt)+(m.utcYear(rt).getUTCDay()===4),et,2)}function Ve(rt){return rt.getUTCDay()}function Qe(rt,et){return i(m.utcMonday.count(m.utcYear(rt)-1,rt),et,2)}function Oe(rt,et){return i(rt.getUTCFullYear()%100,et,2)}function Ue(rt,et){return i(rt.getUTCFullYear()%1e4,et,4)}function Ge(){return"+0000"}function Ye(){return"%"}function tt(rt){return+rt}function lt(rt){return Math.floor(+rt/1e3)}function vt(rt){return t=n(rt),g.timeFormat=t.format,g.timeParse=t.parse,g.utcFormat=t.utcFormat,g.utcParse=t.utcParse,t}vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
20ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var It=Date.prototype.toISOString?function(rt){return rt.toISOString()}:g.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"),St=+new Date("2000-01-01T00:00:00.000Z")?function(rt){var et=new Date(rt);return isNaN(et)?null:et}:g.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");g.isoFormat=It,g.isoParse=St,g.timeFormatDefaultLocale=vt,g.timeFormatLocale=n,Object.defineProperty(g,"__esModule",{value:!0})})},{"d3-time":121}],121:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=g||self).d3=g.d3||{})})(this,function(g){var m=new Date,b=new Date;function v(me,Te,_e,Ae){function Pe(De){return me(De=arguments.length===0?new Date:new Date(+De)),De}return Pe.floor=function(De){return me(De=new Date(+De)),De},Pe.ceil=function(De){return me(De=new Date(De-1)),Te(De,1),me(De),De},Pe.round=function(De){var Ve=Pe(De),Qe=Pe.ceil(De);return De-Ve<Qe-De?Ve:Qe},Pe.offset=function(De,Ve){return Te(De=new Date(+De),Ve==null?1:Math.floor(Ve)),De},Pe.range=function(De,Ve,Qe){var Oe,Ue=[];if(De=Pe.ceil(De),Qe=Qe==null?1:Math.floor(Qe),!(De<Ve&&Qe>0))return Ue;do Ue.push(Oe=new Date(+De)),Te(De,Qe),me(De);while(Oe<De&&De<Ve);return Ue},Pe.filter=function(De){return v(function(Ve){if(Ve>=Ve)for(;me(Ve),!De(Ve);)Ve.setTime(Ve-1)},function(Ve,Qe){if(Ve>=Ve)if(Qe<0)for(;++Qe<=0;)for(;Te(Ve,-1),!De(Ve););else for(;--Qe>=0;)for(;Te(Ve,1),!De(Ve););})},_e&&(Pe.count=function(De,Ve){return m.setTime(+De),b.setTime(+Ve),me(m),me(b),Math.floor(_e(m,b))},Pe.every=function(De){return De=Math.floor(De),isFinite(De)&&De>0?De>1?Pe.filter(Ae?function(Ve){return Ae(Ve)%De==0}:function(Ve){return Pe.count(0,Ve)%De==0}):Pe:null}),Pe}var e=v(function(){},function(me,Te){me.setTime(+me+Te)},function(me,Te){return Te-me});e.every=function(me){return me=Math.floor(me),isFinite(me)&&me>0?me>1?v(function(Te){Te.setTime(Math.floor(Te/me)*me)},function(Te,_e){Te.setTime(+Te+_e*me)},function(Te,_e){return(_e-Te)/me}):e:null};var n=e.range,t=v(function(me){me.setTime(me-me.getMilliseconds())},function(me,Te){me.setTime(+me+1e3*Te)},function(me,Te){return(Te-me)/1e3},function(me){return me.getUTCSeconds()}),o=t.range,r=v(function(me){me.setTime(me-me.getMilliseconds()-1e3*me.getSeconds())},function(me,Te){me.setTime(+me+6e4*Te)},function(me,Te){return(Te-me)/6e4},function(me){return me.getMinutes()}),d=r.range,c=v(function(me){me.setTime(me-me.getMilliseconds()-1e3*me.getSeconds()-6e4*me.getMinutes())},function(me,Te){me.setTime(+me+36e5*Te)},function(me,Te){return(Te-me)/36e5},function(me){return me.getHours()}),i=c.range,u=v(function(me){me.setHours(0,0,0,0)},function(me,Te){me.setDate(me.getDate()+Te)},function(me,Te){return(Te-me-6e4*(Te.getTimezoneOffset()-me.getTimezoneOffset()))/864e5},function(me){return me.getDate()-1}),f=u.range;function s(me){return v(function(Te){Te.setDate(Te.getDate()-(Te.getDay()+7-me)%7),Te.setHours(0,0,0,0)},function(Te,_e){Te.setDate(Te.getDate()+7*_e)},function(Te,_e){return(_e-Te-6e4*(_e.getTimezoneOffset()-Te.getTimezoneOffset()))/6048e5})}var h=s(0),p=s(1),a=s(2),x=s(3),l=s(4),w=s(5),_=s(6),T=h.range,k=p.range,L=a.range,A=x.range,I=l.range,P=w.range,S=_.range,E=v(function(me){me.setDate(1),me.setHours(0,0,0,0)},function(me,Te){me.setMonth(me.getMonth()+Te)},function(me,Te){return Te.getMonth()-me.getMonth()+12*(Te.getFullYear()-me.getFullYear())},function(me){return me.getMonth()}),D=E.range,F=v(function(me){me.setMonth(0,1),me.setHours(0,0,0,0)},function(me,Te){me.setFullYear(me.getFullYear()+Te)},function(me,Te){return Te.getFullYear()-me.getFullYear()},function(me){return me.getFullYear()});F.every=function(me){return isFinite(me=Math.floor(me))&&me>0?v(function(Te){Te.setFullYear(Math.floor(Te.getFullYear()/me)*me),Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,_e){Te.setFullYear(Te.getFullYear()+_e*me)}):null};var H=F.range,V=v(function(me){me.setUTCSeconds(0,0)},function(me,Te){me.setTime(+me+6e4*Te)},function(me,Te){return(Te-me)/6e4},function(me){return me.getUTCMinutes()}),Z=V.range,K=v(function(me){me.setUTCMinutes(0,0,0)},function(me,Te){me.setTime(+me+36e5*Te)},function(me,Te){return(Te-me)/36e5},function(me){return me.getUTCHours()}),q=K.range,W=v(function(me){me.setUTCHours(0,0,0,0)},function(me,Te){me.setUTCDate(me.getUTCDate()+Te)},function(me,Te){return(Te-me)/864e5},function(me){return me.getUTCDate()-1}
20),$=W.range;function R(me){return v(function(Te){Te.setUTCDate(Te.getUTCDate()-(Te.getUTCDay()+7-me)%7),Te.setUTCHours(0,0,0,0)},function(Te,_e){Te.setUTCDate(Te.getUTCDate()+7*_e)},function(Te,_e){return(_e-Te)/6048e5})}var N=R(0),U=R(1),Q=R(2),j=R(3),X=R(4),J=R(5),re=R(6),ne=N.range,se=U.range,oe=Q.range,pe=j.range,ce=X.range,de=J.range,xe=re.range,we=v(function(me){me.setUTCDate(1),me.setUTCHours(0,0,0,0)},function(me,Te){me.setUTCMonth(me.getUTCMonth()+Te)},function(me,Te){return Te.getUTCMonth()-me.getUTCMonth()+12*(Te.getUTCFullYear()-me.getUTCFullYear())},function(me){return me.getUTCMonth()}),be=we.range,Ee=v(function(me){me.setUTCMonth(0,1),me.setUTCHours(0,0,0,0)},function(me,Te){me.setUTCFullYear(me.getUTCFullYear()+Te)},function(me,Te){return Te.getUTCFullYear()-me.getUTCFullYear()},function(me){return me.getUTCFullYear()});Ee.every=function(me){return isFinite(me=Math.floor(me))&&me>0?v(function(Te){Te.setUTCFullYear(Math.floor(Te.getUTCFullYear()/me)*me),Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,_e){Te.setUTCFullYear(Te.getUTCFullYear()+_e*me)}):null};var fe=Ee.range;g.timeDay=u,g.timeDays=f,g.timeFriday=w,g.timeFridays=P,g.timeHour=c,g.timeHours=i,g.timeInterval=v,g.timeMillisecond=e,g.timeMilliseconds=n,g.timeMinute=r,g.timeMinutes=d,g.timeMonday=p,g.timeMondays=k,g.timeMonth=E,g.timeMonths=D,g.timeSaturday=_,g.timeSaturdays=S,g.timeSecond=t,g.timeSeconds=o,g.timeSunday=h,g.timeSundays=T,g.timeThursday=l,g.timeThursdays=I,g.timeTuesday=a,g.timeTuesdays=L,g.timeWednesday=x,g.timeWednesdays=A,g.timeWeek=h,g.timeWeeks=T,g.timeYear=F,g.timeYears=H,g.utcDay=W,g.utcDays=$,g.utcFriday=J,g.utcFridays=de,g.utcHour=K,g.utcHours=q,g.utcMillisecond=e,g.utcMilliseconds=n,g.utcMinute=V,g.utcMinutes=Z,g.utcMonday=U,g.utcMondays=se,g.utcMonth=we,g.utcMonths=be,g.utcSaturday=re,g.utcSaturdays=xe,g.utcSecond=t,g.utcSeconds=o,g.utcSunday=N,g.utcSundays=ne,g.utcThursday=X,g.utcThursdays=ce,g.utcTuesday=Q,g.utcTuesdays=oe,g.utcWednesday=j,g.utcWednesdays=pe,g.utcWeek=N,g.utcWeeks=ne,g.utcYear=Ee,g.utcYears=fe,Object.defineProperty(g,"__esModule",{value:!0})})},{}],122:[function(y,ee,te){arguments[4][121][0].apply(te,arguments)},{dup:121}],123:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=g||self).d3=g.d3||{})})(this,function(g){var m,b,v=0,e=0,n=0,t=0,o=0,r=0,d=typeof performance=="object"&&performance.now?performance:Date,c=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(l){setTimeout(l,17)};function i(){return o||(c(u),o=d.now()+r)}function u(){o=0}function f(){this._call=this._time=this._next=null}function s(l,w,_){var T=new f;return T.restart(l,w,_),T}function h(){i(),++v;for(var l,w=m;w;)(l=o-w._time)>=0&&w._call.call(null,l),w=w._next;--v}function p(){o=(t=d.now())+r,v=e=0;try{h()}finally{v=0,function(){for(var l,w,_=m,T=1/0;_;)_._call?(T>_._time&&(T=_._time),l=_,_=_._next):(w=_._next,_._next=null,_=l?l._next=w:m=w);b=l,x(T)}(),o=0}}function a(){var l=d.now(),w=l-t;w>1e3&&(r-=w,t=l)}function x(l){v||(e&&(e=clearTimeout(e)),l-o>24?(l<1/0&&(e=setTimeout(p,l-d.now()-r)),n&&(n=clearInterval(n))):(n||(t=d.now(),n=setInterval(a,1e3)),v=1,c(p)))}f.prototype=s.prototype={constructor:f,restart:function(l,w,_){if(typeof l!="function")throw new TypeError("callback is not a function");_=(_==null?i():+_)+(w==null?0:+w),this._next||b===this||(b?b._next=this:m=this,b=this),this._call=l,this._time=_,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}},g.interval=function(l,w,_){var T=new f,k=w;return w==null?(T.restart(l,w,_),T):(w=+w,_=_==null?i():+_,T.restart(function L(A){A+=k,T.restart(L,k+=w,_),l(A)},w,_),T)},g.now=i,g.timeout=function(l,w,_){var T=new f;return w=w==null?0:+w,T.restart(function(k){T.stop(),l(k+w)},w,_),T},g.timer=s,g.timerFlush=h,Object.defineProperty(g,"__esModule",{value:!0})})},{}],124:[function(y,ee,te){ee.exports=function(){for(var g=0;g<arguments.length;g++)if(arguments[g]!==void 0)return arguments[g]}},{}],125:[function(y,ee,te){ee.exports=b;var g=(b.canvas=document.createElement("canvas")).getContext("2d"),m=v([32,126]);function b(e,n){Array.isArray(e)&&(e=e.join(", "));var t,o={},r=16,d=.05;n&&(n.length===2&&typeof n[0]=="number"?t=v(n):Array.isArray(n)?t=n:(n.o?t=v(n.o):n.pairs&&(t=n.pairs),n.fontSize&&(r=n.fontSize),n.threshold!=null&&(d=n.threshold))),t||(t=m),g.font=r+"px "+e;for(var c=0;c<t.length;c++){var i=t[c],u=g.measureText(i[0]).width+g.measureText(i[1]).width,f=g.measureText(i).width;if(Math.abs(u-f)>r*d){var s=(f-u)/r;o[i]=1e3*s}}return o}function v(e){for(var n=[],t=e[0];t<=e[1];t++)for(var o=String.fromCharCode(t),r=e[0];r<e[1];r++){var d=o+String.fromCharCode(r);n.push(d)}return n}b.createPairs=v,b.ascii=m},{}],126:[function(y,ee,te){var g=y("abs-svg-path"),m=y("normalize-svg-path"),b={M:"moveTo",C:"bezierCurveTo"};
20ee.exports=function(v,e){v.beginPath(),m(g(e)).forEach(function(n){var t=n[0],o=n.slice(1);v[b[t]].apply(v,o)}),v.closePath()}},{"abs-svg-path":70,"normalize-svg-path":246}],127:[function(y,ee,te){ee.exports=function(g){switch(g){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],128:[function(y,ee,te){ee.exports=function(g,m){switch(m===void 0&&(m=0),typeof g){case"number":if(g>0)return function(b,v){var e,n;for(e=new Array(b),n=0;n<b;++n)e[n]=v;return e}(0|g,m);break;case"object":if(typeof g.length=="number")return function b(v,e,n){var t=0|v[n];if(t<=0)return[];var o,r=new Array(t);if(n===v.length-1)for(o=0;o<t;++o)r[o]=e;else for(o=0;o<t;++o)r[o]=b(v,e,n+1);return r}(g,m,0)}return[]}},{}],129:[function(y,ee,te){function g(I,P,S){S=S||2;var E,D,F,H,V,Z,K,q=P&&P.length,W=q?P[0]*S:I.length,$=m(I,0,W,S,!0),R=[];if(!$||$.next===$.prev)return R;if(q&&($=function(U,Q,j,X){var J,re,ne,se,oe,pe=[];for(J=0,re=Q.length;J<re;J++)ne=Q[J]*X,se=J<re-1?Q[J+1]*X:U.length,(oe=m(U,ne,se,X,!1))===oe.next&&(oe.steiner=!0),pe.push(u(oe));for(pe.sort(r),J=0;J<pe.length;J++)d(pe[J],j),j=b(j,j.next);return j}(I,P,$,S)),I.length>80*S){E=F=I[0],D=H=I[1];for(var N=S;N<W;N+=S)(V=I[N])<E&&(E=V),(Z=I[N+1])<D&&(D=Z),V>F&&(F=V),Z>H&&(H=Z);K=(K=Math.max(F-E,H-D))!==0?1/K:0}return v($,R,S,E,D,K),R}function m(I,P,S,E,D){var F,H;if(D===A(I,P,S,E)>0)for(F=P;F<S;F+=E)H=T(F,I[F],I[F+1],H);else for(F=S-E;F>=P;F-=E)H=T(F,I[F],I[F+1],H);return H&&p(H,H.next)&&(k(H),H=H.next),H}function b(I,P){if(!I)return I;P||(P=I);var S,E=I;do if(S=!1,E.steiner||!p(E,E.next)&&h(E.prev,E,E.next)!==0)E=E.next;else{if(k(E),(E=P=E.prev)===E.next)break;S=!0}while(S||E!==P);return P}function v(I,P,S,E,D,F,H){if(I){!H&&F&&function(q,W,$,R){var N=q;do N.z===null&&(N.z=i(N.x,N.y,W,$,R)),N.prevZ=N.prev,N.nextZ=N.next,N=N.next;while(N!==q);N.prevZ.nextZ=null,N.prevZ=null,function(U){var Q,j,X,J,re,ne,se,oe,pe=1;do{for(j=U,U=null,re=null,ne=0;j;){for(ne++,X=j,se=0,Q=0;Q<pe&&(se++,X=X.nextZ);Q++);for(oe=pe;se>0||oe>0&&X;)se!==0&&(oe===0||!X||j.z<=X.z)?(J=j,j=j.nextZ,se--):(J=X,X=X.nextZ,oe--),re?re.nextZ=J:U=J,J.prevZ=re,re=J;j=X}re.nextZ=null,pe*=2}while(ne>1)}(N)}(I,E,D,F);for(var V,Z,K=I;I.prev!==I.next;)if(V=I.prev,Z=I.next,F?n(I,E,D,F):e(I))P.push(V.i/S),P.push(I.i/S),P.push(Z.i/S),k(I),I=Z.next,K=Z.next;else if((I=Z)===K){H?H===1?v(I=t(b(I),P,S),P,S,E,D,F,2):H===2&&o(I,P,S,E,D,F):v(b(I),P,S,E,D,F,1);break}}}function e(I){var P=I.prev,S=I,E=I.next;if(h(P,S,E)>=0)return!1;for(var D=I.next.next;D!==I.prev;){if(f(P.x,P.y,S.x,S.y,E.x,E.y,D.x,D.y)&&h(D.prev,D,D.next)>=0)return!1;D=D.next}return!0}function n(I,P,S,E){var D=I.prev,F=I,H=I.next;if(h(D,F,H)>=0)return!1;for(var V=D.x<F.x?D.x<H.x?D.x:H.x:F.x<H.x?F.x:H.x,Z=D.y<F.y?D.y<H.y?D.y:H.y:F.y<H.y?F.y:H.y,K=D.x>F.x?D.x>H.x?D.x:H.x:F.x>H.x?F.x:H.x,q=D.y>F.y?D.y>H.y?D.y:H.y:F.y>H.y?F.y:H.y,W=i(V,Z,P,S,E),$=i(K,q,P,S,E),R=I.prevZ,N=I.nextZ;R&&R.z>=W&&N&&N.z<=$;){if(R!==I.prev&&R!==I.next&&f(D.x,D.y,F.x,F.y,H.x,H.y,R.x,R.y)&&h(R.prev,R,R.next)>=0||(R=R.prevZ,N!==I.prev&&N!==I.next&&f(D.x,D.y,F.x,F.y,H.x,H.y,N.x,N.y)&&h(N.prev,N,N.next)>=0))return!1;N=N.nextZ}for(;R&&R.z>=W;){if(R!==I.prev&&R!==I.next&&f(D.x,D.y,F.x,F.y,H.x,H.y,R.x,R.y)&&h(R.prev,R,R.next)>=0)return!1;R=R.prevZ}for(;N&&N.z<=$;){if(N!==I.prev&&N!==I.next&&f(D.x,D.y,F.x,F.y,H.x,H.y,N.x,N.y)&&h(N.prev,N,N.next)>=0)return!1;N=N.nextZ}return!0}function t(I,P,S){var E=I;do{var D=E.prev,F=E.next.next;!p(D,F)&&a(D,E,E.next,F)&&w(D,F)&&w(F,D)&&(P.push(D.i/S),P.push(E.i/S),P.push(F.i/S),k(E),k(E.next),E=I=F),E=E.next}while(E!==I);return b(E)}function o(I,P,S,E,D,F){var H=I;do{for(var V=H.next.next;V!==H.prev;){if(H.i!==V.i&&s(H,V)){var Z=_(H,V);return H=b(H,H.next),Z=b(Z,Z.next),v(H,P,S,E,D,F),void v(Z,P,S,E,D,F)}V=V.next}H=H.next}while(H!==I)}function r(I,P){return I.x-P.x}function d(I,P){if(P=function(E,D){var F,H=D,V=E.x,Z=E.y,K=-1/0;do{if(Z<=H.y&&Z>=H.next.y&&H.next.y!==H.y){var q=H.x+(Z-H.y)*(H.next.x-H.x)/(H.next.y-H.y);if(q<=V&&q>K){if(K=q,q===V){if(Z===H.y)return H;if(Z===H.next.y)return H.next}F=H.x<H.next.x?H:H.next}}H=H.next}while(H!==D);if(!F)return null;if(V===K)return F;var W,$=F,R=F.x,N=F.y,U=1/0;H=F;do V>=H.x&&H.x>=R&&V!==H.x&&f(Z<N?V:K,Z,R,N,Z<N?K:V,Z,H.x,H.y)&&(W=Math.abs(Z-H.y)/(V-H.x),w(H,E)&&(W<U||W===U&&(H.x>F.x||H.x===F.x&&c(F,H)))&&(F=H,U=W)),H=H.next;while(H!==$);return F}(I,P)){var S=_(P,I);b(P,P.next),b(S,S.next)}}function c(I,P){return h(I.prev,I,P.prev)<0&&h(P.next,I,I.next)<0}function i(I,P,S,E,D){return(I=1431655765&((I=858993459&((I=252645135&((I=16711935&((I=32767*(I-S)*D)|I<<8))|I<<4))|I<<2))|I<<1))|(P=1431655765&((P=858993459&((P=252645135&((P=16711935&((P=32767*(P-E)*D)|P<<8))|P<<4))|P<<2))|P<<1))<<1}function u(I){var P=I,S=I;do(P.x<S.x||P.x===S.x&&P.y<S.y)&&(S=P),P=P.next;while(P!==I);return S}function f(I,P,S,E,D,F,H,V){return(D-H)*(P-V)-(I-H)*(F-V)>=0&&(I-H)*(E-V)-(S-H)*(P-V)>=0&&(S-H)*(F-V)-(D-H)*(E-V)>=0}function s(I,P){return I.next.i!==P.i&&I.prev.i!==P.i&&!function(S,E){var D=S;do{if(D.i!==S.i&&D.next.i!==S.i&&D.i!==E.i&&D.next.i!==E.i&&a(D,D.next,S,E))return!0;D=D.next}while(D!==S);return!1}(I,P)&&(w(I,P)&&w(P,I)&&function(S,E){var D=S,F=!1,H=(S.x+E.x)/2,V=(S.y+E.y)/2;do D.y>V!=D.next.y>V&&D.next.y!==D.y&&H<(D.next.x-D.x)*(V-D.y)/(D.next.y-D.y)+D.x&&(F=!F),D=D.next;while(D!==S);return F}(I,P)&&(h(I.prev,I,P.prev)||h(I,P.prev,P))||p(I,P)&&h(I.prev,I,I.next)>0&&h(P.prev,P,P.next)>0)}
20function h(I,P,S){return(P.y-I.y)*(S.x-P.x)-(P.x-I.x)*(S.y-P.y)}function p(I,P){return I.x===P.x&&I.y===P.y}function a(I,P,S,E){var D=l(h(I,P,S)),F=l(h(I,P,E)),H=l(h(S,E,I)),V=l(h(S,E,P));return D!==F&&H!==V||!(D!==0||!x(I,S,P))||!(F!==0||!x(I,E,P))||!(H!==0||!x(S,I,E))||!(V!==0||!x(S,P,E))}function x(I,P,S){return P.x<=Math.max(I.x,S.x)&&P.x>=Math.min(I.x,S.x)&&P.y<=Math.max(I.y,S.y)&&P.y>=Math.min(I.y,S.y)}function l(I){return I>0?1:I<0?-1:0}function w(I,P){return h(I.prev,I,I.next)<0?h(I,P,I.next)>=0&&h(I,I.prev,P)>=0:h(I,P,I.prev)<0||h(I,I.next,P)<0}function _(I,P){var S=new L(I.i,I.x,I.y),E=new L(P.i,P.x,P.y),D=I.next,F=P.prev;return I.next=P,P.prev=I,S.next=D,D.prev=S,E.next=S,S.prev=E,F.next=E,E.prev=F,E}function T(I,P,S,E){var D=new L(I,P,S);return E?(D.next=E.next,D.prev=E,E.next.prev=D,E.next=D):(D.prev=D,D.next=D),D}function k(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function L(I,P,S){this.i=I,this.x=P,this.y=S,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(I,P,S,E){for(var D=0,F=P,H=S-E;F<S;F+=E)D+=(I[H]-I[F])*(I[F+1]+I[H+1]),H=F;return D}ee.exports=g,ee.exports.default=g,g.deviation=function(I,P,S,E){var D=P&&P.length,F=D?P[0]*S:I.length,H=Math.abs(A(I,0,F,S));if(D)for(var V=0,Z=P.length;V<Z;V++){var K=P[V]*S,q=V<Z-1?P[V+1]*S:I.length;H-=Math.abs(A(I,K,q,S))}var W=0;for(V=0;V<E.length;V+=3){var $=E[V]*S,R=E[V+1]*S,N=E[V+2]*S;W+=Math.abs((I[$]-I[N])*(I[R+1]-I[$+1])-(I[$]-I[R])*(I[N+1]-I[$+1]))}return H===0&&W===0?0:Math.abs((W-H)/H)},g.flatten=function(I){for(var P=I[0][0].length,S={vertices:[],holes:[],dimensions:P},E=0,D=0;D<I.length;D++){for(var F=0;F<I[D].length;F++)for(var H=0;H<P;H++)S.vertices.push(I[D][F][H]);D>0&&(E+=I[D-1].length,S.holes.push(E))}return S}},{}],130:[function(y,ee,te){var g=y("strongly-connected-components");ee.exports=function(m,b){var v,e=[],n=[],t=[],o={},r=[];function d(a){var x,l,w=!1;for(n.push(a),t[a]=!0,x=0;x<r[a].length;x++)(l=r[a][x])===v?(c(v,n),w=!0):t[l]||(w=d(l));if(w)(function T(k){t[k]=!1,o.hasOwnProperty(k)&&Object.keys(o[k]).forEach(function(L){delete o[k][L],t[L]&&T(L)})})(a);else for(x=0;x<r[a].length;x++){l=r[a][x];var _=o[l];_||(_={},o[l]=_),_[l]=!0}return n.pop(),w}function c(a,x){var l=[].concat(x).concat(a);b?b(d):e.push(l)}function i(a){(function(L){for(var A=0;A<m.length;A++)A<L&&(m[A]=[]),m[A]=m[A].filter(function(I){return I>=L})})(a);for(var x,l=g(m).components.filter(function(L){return L.length>1}),w=1/0,_=0;_<l.length;_++)for(var T=0;T<l[_].length;T++)l[_][T]<w&&(w=l[_][T],x=_);var k=l[x];return!!k&&{leastVertex:w,adjList:m.map(function(L,A){return k.indexOf(A)===-1?[]:L.filter(function(I){return k.indexOf(I)!==-1})})}}v=0;for(var u=m.length;v<u;){var f=i(v);if(v=f.leastVertex,r=f.adjList){for(var s=0;s<r.length;s++)for(var h=0;h<r[s].length;h++){var p=r[s][h];t[+p]=!1,o[p]={}}d(v),v+=1}else v=u}return b?void 0:e}},{"strongly-connected-components":306}],131:[function(y,ee,te){var g=y("../../object/valid-value");ee.exports=function(){return g(this).length=0,this}},{"../../object/valid-value":162}],132:[function(y,ee,te){ee.exports=y("./is-implemented")()?Array.from:y("./shim")},{"./is-implemented":133,"./shim":134}],133:[function(y,ee,te){ee.exports=function(){var g,m,b=Array.from;return typeof b=="function"&&(m=b(g=["raz","dwa"]),!!(m&&m!==g&&m[1]==="dwa"))}},{}],134:[function(y,ee,te){var g=y("es6-symbol").iterator,m=y("../../function/is-arguments"),b=y("../../function/is-function"),v=y("../../number/to-pos-integer"),e=y("../../object/valid-callable"),n=y("../../object/valid-value"),t=y("../../object/is-value"),o=y("../../string/is-string"),r=Array.isArray,d=Function.prototype.call,c={configurable:!0,enumerable:!0,writable:!0,value:null},i=Object.defineProperty;ee.exports=function(u){var f,s,h,p,a,x,l,w,_,T,k=arguments[1],L=arguments[2];if(u=Object(n(u)),t(k)&&e(k),this&&this!==Array&&b(this))f=this;else{if(!k){if(m(u))return(a=u.length)!==1?Array.apply(null,u):((p=new Array(1))[0]=u[0],p);if(r(u)){for(p=new Array(a=u.length),s=0;s<a;++s)p[s]=u[s];return p}}p=[]}if(!r(u)){if((_=u[g])!==void 0){for(l=e(_).call(u),f&&(p=new f),w=l.next(),s=0;!w.done;)T=k?d.call(k,L,w.value,s):w.value,f?(c.value=T,i(p,s,c)):p[s]=T,w=l.next(),++s;a=s}else if(o(u)){for(a=u.length,f&&(p=new f),s=0,h=0;s<a;++s)T=u[s],s+1<a&&(x=T.charCodeAt(0))>=55296&&x<=56319&&(T+=u[++s]),T=k?d.call(k,L,T,h):T,f?(c.value=T,i(p,h,c)):p[h]=T,++h;a=h}}if(a===void 0)for(a=v(u.length),f&&(p=new f(a)),s=0;s<a;++s)T=k?d.call(k,L,u[s],s):u[s],f?(c.value=T,i(p,s,c)):p[s]=T;return f&&(c.value=null,p.length=a),p}},{"../../function/is-arguments":135,"../../function/is-function":136,"../../number/to-pos-integer":142,"../../object/is-value":151,"../../object/vali
20d-callable":160,"../../object/valid-value":162,"../../string/is-string":166,"es6-symbol":175}],135:[function(y,ee,te){var g=Object.prototype.toString,m=g.call(function(){return arguments}());ee.exports=function(b){return g.call(b)===m}},{}],136:[function(y,ee,te){var g=Object.prototype.toString,m=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);ee.exports=function(b){return typeof b=="function"&&m(g.call(b))}},{}],137:[function(y,ee,te){ee.exports=function(){}},{}],138:[function(y,ee,te){ee.exports=y("./is-implemented")()?Math.sign:y("./shim")},{"./is-implemented":139,"./shim":140}],139:[function(y,ee,te){ee.exports=function(){var g=Math.sign;return typeof g=="function"&&g(10)===1&&g(-20)===-1}},{}],140:[function(y,ee,te){ee.exports=function(g){return g=Number(g),isNaN(g)||g===0?g:g>0?1:-1}},{}],141:[function(y,ee,te){var g=y("../math/sign"),m=Math.abs,b=Math.floor;ee.exports=function(v){return isNaN(v)?0:(v=Number(v))!==0&&isFinite(v)?g(v)*b(m(v)):v}},{"../math/sign":138}],142:[function(y,ee,te){var g=y("./to-integer"),m=Math.max;ee.exports=function(b){return m(0,g(b))}},{"./to-integer":141}],143:[function(y,ee,te){var g=y("./valid-callable"),m=y("./valid-value"),b=Function.prototype.bind,v=Function.prototype.call,e=Object.keys,n=Object.prototype.propertyIsEnumerable;ee.exports=function(t,o){return function(r,d){var c,i=arguments[2],u=arguments[3];return r=Object(m(r)),g(d),c=e(r),u&&c.sort(typeof u=="function"?b.call(u,r):void 0),typeof t!="function"&&(t=c[t]),v.call(t,c,function(f,s){return n.call(r,f)?v.call(d,i,r[f],f,r,s):o})}}},{"./valid-callable":160,"./valid-value":162}],144:[function(y,ee,te){ee.exports=y("./is-implemented")()?Object.assign:y("./shim")},{"./is-implemented":145,"./shim":146}],145:[function(y,ee,te){ee.exports=function(){var g,m=Object.assign;return typeof m=="function"&&(m(g={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),g.foo+g.bar+g.trzy==="razdwatrzy")}},{}],146:[function(y,ee,te){var g=y("../keys"),m=y("../valid-value"),b=Math.max;ee.exports=function(v,e){var n,t,o,r=b(arguments.length,2);for(v=Object(m(v)),o=function(d){try{v[d]=e[d]}catch(c){n||(n=c)}},t=1;t<r;++t)g(e=arguments[t]).forEach(o);if(n!==void 0)throw n;return v}},{"../keys":152,"../valid-value":162}],147:[function(y,ee,te){var g=y("../array/from"),m=y("./assign"),b=y("./valid-value");ee.exports=function(v){var e=Object(b(v)),n=arguments[1],t=Object(arguments[2]);if(e!==v&&!n)return e;var o={};return n?g(n,function(r){(t.ensure||r in v)&&(o[r]=v[r])}):m(o,v),o}},{"../array/from":132,"./assign":144,"./valid-value":162}],148:[function(y,ee,te){var g,m,b,v,e=Object.create;y("./set-prototype-of/is-implemented")()||(g=y("./set-prototype-of/shim")),ee.exports=g?g.level!==1?e:(m={},b={},v={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){b[n]=n!=="__proto__"?v:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(m,b),Object.defineProperty(g,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:m}),function(n,t){return e(n===null?m:n,t)}):e},{"./set-prototype-of/is-implemented":158,"./set-prototype-of/shim":159}],149:[function(y,ee,te){ee.exports=y("./_iterate")("forEach")},{"./_iterate":143}],150:[function(y,ee,te){var g=y("./is-value"),m={function:!0,object:!0};ee.exports=function(b){return g(b)&&m[typeof b]||!1}},{"./is-value":151}],151:[function(y,ee,te){var g=y("../function/noop")();ee.exports=function(m){return m!==g&&m!==null}},{"../function/noop":137}],152:[function(y,ee,te){ee.exports=y("./is-implemented")()?Object.keys:y("./shim")},{"./is-implemented":153,"./shim":154}],153:[function(y,ee,te){ee.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}},{}],154:[function(y,ee,te){var g=y("../is-value"),m=Object.keys;ee.exports=function(b){return m(g(b)?Object(b):b)}},{"../is-value":151}],155:[function(y,ee,te){var g=y("./valid-callable"),m=y("./for-each"),b=Function.prototype.call;ee.exports=function(v,e){var n={},t=arguments[2];return g(e),m(v,function(o,r,d,c){n[r]=b.call(e,t,o,r,d,c)}),n}},{"./for-each":149,"./valid-callable":160}],156:[function(y,ee,te){var g=y("./is-value"),m=Array.prototype.forEach,b=Object.create,v=function(e,n){var t;for(t in e)n[t]=e[t]};ee.exports=function(e){var n=b(null);return m.call(arguments,function(t){g(t)&&v(Object(t),n)}),n}},{"./is-value":151}],157:[function(y,ee,te){ee.exports=y("./is-implemented")()?Object.setPrototypeOf:y("./shim")},{"./is-implemented":158,"./shim":159}],158:[function(y,ee,te){var g=Object.create,m=Object.getPrototypeOf,b={};ee.exports=function(){var v=Object.setPrototypeOf,e=arguments[0]||g;return typeof v=="function"&&m(v(e(null),b))===b}},{}],159:[function(y,ee,te){var g,m=y("../is-object"),b=y("../valid-value"),v=Object.prototype.isPrototypeOf,e=Object.defineProperty,n={configurable:!0,enumerable:!1,writable:!0,value:void 0};g=function(t,o){if(b(t),o===null||m(o))return t;throw new TypeError("Prototype must be null or an object")},ee.exports=function(t){var o,r;return t?(t.level===2?t.set?(r=t.set,o=function(d,c){return r.call(g(d,c),c),d}):o=function(d,c){return g(d,c).__proto__=c,d}:o=function d(c,i){var u;return g(c,i),(u=v.call(d.nullPolyfill,c))&&delete d.nullPolyfill.__proto__,i===null&&(i=d.nullPolyfill),c.__proto__=i,u&&e(d.nullPolyfill,"__proto__",n),c}
20,Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,o=Object.create(null),r={},d=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(d){try{(t=d.set).call(o,r)}catch{}if(Object.getPrototypeOf(o)===r)return{set:t,level:2}}return o.__proto__=r,Object.getPrototypeOf(o)===r?{level:2}:((o={}).__proto__=r,Object.getPrototypeOf(o)===r&&{level:1})}()),y("../create")},{"../create":148,"../is-object":150,"../valid-value":162}],160:[function(y,ee,te){ee.exports=function(g){if(typeof g!="function")throw new TypeError(g+" is not a function");return g}},{}],161:[function(y,ee,te){var g=y("./is-object");ee.exports=function(m){if(!g(m))throw new TypeError(m+" is not an Object");return m}},{"./is-object":150}],162:[function(y,ee,te){var g=y("./is-value");ee.exports=function(m){if(!g(m))throw new TypeError("Cannot use null or undefined");return m}},{"./is-value":151}],163:[function(y,ee,te){ee.exports=y("./is-implemented")()?String.prototype.contains:y("./shim")},{"./is-implemented":164,"./shim":165}],164:[function(y,ee,te){var g="razdwatrzy";ee.exports=function(){return typeof g.contains=="function"&&g.contains("dwa")===!0&&g.contains("foo")===!1}},{}],165:[function(y,ee,te){var g=String.prototype.indexOf;ee.exports=function(m){return g.call(this,m,arguments[1])>-1}},{}],166:[function(y,ee,te){var g=Object.prototype.toString,m=g.call("");ee.exports=function(b){return typeof b=="string"||b&&typeof b=="object"&&(b instanceof String||g.call(b)===m)||!1}},{}],167:[function(y,ee,te){var g=Object.create(null),m=Math.random;ee.exports=function(){var b;do b=m().toString(36).slice(2);while(g[b]);return b}},{}],168:[function(y,ee,te){var g,m=y("es5-ext/object/set-prototype-of"),b=y("es5-ext/string/#/contains"),v=y("d"),e=y("es6-symbol"),n=y("./"),t=Object.defineProperty;g=ee.exports=function(o,r){if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");n.call(this,o),r=r?b.call(r,"key+value")?"key+value":b.call(r,"key")?"key":"value":"value",t(this,"__kind__",v("",r))},m&&m(g,n),delete g.prototype.constructor,g.prototype=Object.create(n.prototype,{_resolve:v(function(o){return this.__kind__==="value"?this.__list__[o]:this.__kind__==="key+value"?[o,this.__list__[o]]:o})}),t(g.prototype,e.toStringTag,v("c","Array Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es5-ext/string/#/contains":163,"es6-symbol":175}],169:[function(y,ee,te){var g=y("es5-ext/function/is-arguments"),m=y("es5-ext/object/valid-callable"),b=y("es5-ext/string/is-string"),v=y("./get"),e=Array.isArray,n=Function.prototype.call,t=Array.prototype.some;ee.exports=function(o,r){var d,c,i,u,f,s,h,p,a=arguments[2];if(e(o)||g(o)?d="array":b(o)?d="string":o=v(o),m(r),i=function(){u=!0},d!=="array")if(d!=="string")for(c=o.next();!c.done;){if(n.call(r,a,c.value,i),u)return;c=o.next()}else for(s=o.length,f=0;f<s&&(h=o[f],f+1<s&&(p=h.charCodeAt(0))>=55296&&p<=56319&&(h+=o[++f]),n.call(r,a,h,i),!u);++f);else t.call(o,function(x){return n.call(r,a,x,i),u})}},{"./get":170,"es5-ext/function/is-arguments":135,"es5-ext/object/valid-callable":160,"es5-ext/string/is-string":166}],170:[function(y,ee,te){var g=y("es5-ext/function/is-arguments"),m=y("es5-ext/string/is-string"),b=y("./array"),v=y("./string"),e=y("./valid-iterable"),n=y("es6-symbol").iterator;ee.exports=function(t){return typeof e(t)[n]=="function"?t[n]():g(t)?new b(t):m(t)?new v(t):new b(t)}},{"./array":168,"./string":173,"./valid-iterable":174,"es5-ext/function/is-arguments":135,"es5-ext/string/is-string":166,"es6-symbol":175}],171:[function(y,ee,te){var g,m=y("es5-ext/array/#/clear"),b=y("es5-ext/object/assign"),v=y("es5-ext/object/valid-callable"),e=y("es5-ext/object/valid-value"),n=y("d"),t=y("d/auto-bind"),o=y("es6-symbol"),r=Object.defineProperty,d=Object.defineProperties;ee.exports=g=function(c,i){if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");d(this,{__list__:n("w",e(c)),__context__:n("w",i),__nextIndex__:n("w",0)}),i&&(v(i.on),i.on("_add",this._onAdd),i.on("_delete",this._onDelete),i.on("_clear",this._onClear))},delete g.prototype.constructor,d(g.prototype,b({_next:n(function(){var c;if(this.__list__)return this.__redo__&&(c=this.__redo__.shift())!==void 0?c:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:n(function(){return this._createResult(this._next())}),_createResult:n(function(c){return c===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(c)}}),_resolve:n(function(c){return this.__list__[c]}),_unBind:n(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:n(function(){return"[object "+(this[o.toStringTag]||"Object")+"]"})},t({_onAdd:n(function(c){c>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(i,u){i>=c&&(this.__redo__[u]=++i)},this),this.__redo__.push(c)):r(this,"__redo__",n("c",[c])))}),_onDelete:n(function(c){var i;c>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((i=this.__redo__.indexOf(c))!==-1&&this.__redo__.splice(i,1),this.__redo__.forEach(function(u,f){u>c&&(this.__redo__[f]=--u)},this)))}),_onClear:n(function(){this.__redo__&&m.call(this.__redo__),this.__nextIndex__=0})}))),r(g.prototype,o.iterator,n(function(){return this}))},{d:106,"d/auto-bind":105,"es5-ext/array/#/clear":131,"es5-ext/object/assign":144,"es5-ext/object/vali
20d-callable":160,"es5-ext/object/valid-value":162,"es6-symbol":175}],172:[function(y,ee,te){var g=y("es5-ext/function/is-arguments"),m=y("es5-ext/object/is-value"),b=y("es5-ext/string/is-string"),v=y("es6-symbol").iterator,e=Array.isArray;ee.exports=function(n){return!!m(n)&&(!!e(n)||!!b(n)||!!g(n)||typeof n[v]=="function")}},{"es5-ext/function/is-arguments":135,"es5-ext/object/is-value":151,"es5-ext/string/is-string":166,"es6-symbol":175}],173:[function(y,ee,te){var g,m=y("es5-ext/object/set-prototype-of"),b=y("d"),v=y("es6-symbol"),e=y("./"),n=Object.defineProperty;g=ee.exports=function(t){if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");t=String(t),e.call(this,t),n(this,"__length__",b("",t.length))},m&&m(g,e),delete g.prototype.constructor,g.prototype=Object.create(e.prototype,{_next:b(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:b(function(t){var o,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(o=r.charCodeAt(0))>=55296&&o<=56319?r+this.__list__[this.__nextIndex__++]:r})}),n(g.prototype,v.toStringTag,b("c","String Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es6-symbol":175}],174:[function(y,ee,te){var g=y("./is-iterable");ee.exports=function(m){if(!g(m))throw new TypeError(m+" is not iterable");return m}},{"./is-iterable":172}],175:[function(y,ee,te){ee.exports=y("./is-implemented")()?y("ext/global-this").Symbol:y("./polyfill")},{"./is-implemented":176,"./polyfill":181,"ext/global-this":188}],176:[function(y,ee,te){var g=y("ext/global-this"),m={object:!0,symbol:!0};ee.exports=function(){var b,v=g.Symbol;if(typeof v!="function")return!1;b=v("test symbol");try{String(b)}catch{return!1}return!!m[typeof v.iterator]&&!!m[typeof v.toPrimitive]&&!!m[typeof v.toStringTag]}},{"ext/global-this":188}],177:[function(y,ee,te){ee.exports=function(g){return!!g&&(typeof g=="symbol"||!!g.constructor&&g.constructor.name==="Symbol"&&g[g.constructor.toStringTag]==="Symbol")}},{}],178:[function(y,ee,te){var g=y("d"),m=Object.create,b=Object.defineProperty,v=Object.prototype,e=m(null);ee.exports=function(n){for(var t,o,r=0;e[n+(r||"")];)++r;return e[n+=r||""]=!0,b(v,t="@@"+n,g.gs(null,function(d){o||(o=!0,b(this,t,g(d)),o=!1)})),t}},{d:106}],179:[function(y,ee,te){var g=y("d"),m=y("ext/global-this").Symbol;ee.exports=function(b){return Object.defineProperties(b,{hasInstance:g("",m&&m.hasInstance||b("hasInstance")),isConcatSpreadable:g("",m&&m.isConcatSpreadable||b("isConcatSpreadable")),iterator:g("",m&&m.iterator||b("iterator")),match:g("",m&&m.match||b("match")),replace:g("",m&&m.replace||b("replace")),search:g("",m&&m.search||b("search")),species:g("",m&&m.species||b("species")),split:g("",m&&m.split||b("split")),toPrimitive:g("",m&&m.toPrimitive||b("toPrimitive")),toStringTag:g("",m&&m.toStringTag||b("toStringTag")),unscopables:g("",m&&m.unscopables||b("unscopables"))})}},{d:106,"ext/global-this":188}],180:[function(y,ee,te){var g=y("d"),m=y("../../../validate-symbol"),b=Object.create(null);ee.exports=function(v){return Object.defineProperties(v,{for:g(function(e){return b[e]?b[e]:b[e]=v(String(e))}),keyFor:g(function(e){var n;for(n in m(e),b)if(b[n]===e)return n})})}},{"../../../validate-symbol":182,d:106}],181:[function(y,ee,te){var g,m,b,v=y("d"),e=y("./validate-symbol"),n=y("ext/global-this").Symbol,t=y("./lib/private/generate-name"),o=y("./lib/private/setup/standard-symbols"),r=y("./lib/private/setup/symbol-registry"),d=Object.create,c=Object.defineProperties,i=Object.defineProperty;if(typeof n=="function")try{String(n()),b=!0}catch{}else n=null;m=function(u){if(this instanceof m)throw new TypeError("Symbol is not a constructor");return g(u)},ee.exports=g=function u(f){var s;if(this instanceof u)throw new TypeError("Symbol is not a constructor");return b?n(f):(s=d(m.prototype),f=f===void 0?"":String(f),c(s,{__description__:v("",f),__name__:v("",t(f))}))},o(g),r(g),c(m.prototype,{constructor:v(g),toString:v("",function(){return this.__name__})}),c(g.prototype,{toString:v(function(){return"Symbol ("+e(this).__description__+")"}
20),valueOf:v(function(){return e(this)})}),i(g.prototype,g.toPrimitive,v("",function(){var u=e(this);return typeof u=="symbol"?u:u.toString()})),i(g.prototype,g.toStringTag,v("c","Symbol")),i(m.prototype,g.toStringTag,v("c",g.prototype[g.toStringTag])),i(m.prototype,g.toPrimitive,v("c",g.prototype[g.toPrimitive]))},{"./lib/private/generate-name":178,"./lib/private/setup/standard-symbols":179,"./lib/private/setup/symbol-registry":180,"./validate-symbol":182,d:106,"ext/global-this":188}],182:[function(y,ee,te){var g=y("./is-symbol");ee.exports=function(m){if(!g(m))throw new TypeError(m+" is not a symbol");return m}},{"./is-symbol":177}],183:[function(y,ee,te){ee.exports=y("./is-implemented")()?WeakMap:y("./polyfill")},{"./is-implemented":184,"./polyfill":186}],184:[function(y,ee,te){ee.exports=function(){var g,m;if(typeof WeakMap!="function")return!1;try{g=new WeakMap([[m={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return String(g)==="[object WeakMap]"&&typeof g.set=="function"&&g.set({},1)===g&&typeof g.delete=="function"&&typeof g.has=="function"&&g.get(m)==="one"}},{}],185:[function(y,ee,te){ee.exports=typeof WeakMap=="function"&&Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"},{}],186:[function(y,ee,te){var g,m=y("es5-ext/object/is-value"),b=y("es5-ext/object/set-prototype-of"),v=y("es5-ext/object/valid-object"),e=y("es5-ext/object/valid-value"),n=y("es5-ext/string/random-uniq"),t=y("d"),o=y("es6-iterator/get"),r=y("es6-iterator/for-of"),d=y("es6-symbol").toStringTag,c=y("./is-native-implemented"),i=Array.isArray,u=Object.defineProperty,f=Object.prototype.hasOwnProperty,s=Object.getPrototypeOf;ee.exports=g=function(){var h,p=arguments[0];if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");return h=c&&b&&WeakMap!==g?b(new WeakMap,s(this)):this,m(p)&&(i(p)||(p=o(p))),u(h,"__weakMapData__",t("c","$weakMap$"+n())),p&&r(p,function(a){e(a),h.set(a[0],a[1])}),h},c&&(b&&b(g,WeakMap),g.prototype=Object.create(WeakMap.prototype,{constructor:t(g)})),Object.defineProperties(g.prototype,{delete:t(function(h){return!!f.call(v(h),this.__weakMapData__)&&(delete h[this.__weakMapData__],!0)}),get:t(function(h){if(f.call(v(h),this.__weakMapData__))return h[this.__weakMapData__]}),has:t(function(h){return f.call(v(h),this.__weakMapData__)}),set:t(function(h,p){return u(v(h),this.__weakMapData__,t("c",p)),this}),toString:t(function(){return"[object WeakMap]"})}),u(g.prototype,d,t("c","WeakMap"))},{"./is-native-implemented":185,d:106,"es5-ext/object/is-value":151,"es5-ext/object/set-prototype-of":157,"es5-ext/object/valid-object":161,"es5-ext/object/valid-value":162,"es5-ext/string/random-uniq":167,"es6-iterator/for-of":169,"es6-iterator/get":170,"es6-symbol":175}],187:[function(y,ee,te){var g=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};ee.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return g()}try{return __global__||g()}finally{delete Object.prototype.__global__}}()},{}],188:[function(y,ee,te){ee.exports=y("./is-implemented")()?globalThis:y("./implementation")},{"./implementation":187,"./is-implemented":189}],189:[function(y,ee,te){ee.exports=function(){return typeof globalThis=="object"&&!!globalThis&&globalThis.Array===Array}},{}],190:[function(y,ee,te){var g=y("is-string-blank");ee.exports=function(m){var b=typeof m;if(b==="string"){var v=m;if((m=+m)==0&&g(v))return!1}else if(b!=="number")return!1;return m-m<1}},{"is-string-blank":237}],191:[function(y,ee,te){var g=y("dtype");ee.exports=function(m,b,v){if(!m)throw new TypeError("must specify data as first parameter");if(v=0|+(v||0),Array.isArray(m)&&m[0]&&typeof m[0][0]=="number"){var e,n,t,o,r=m[0].length,d=m.length*r;b&&typeof b!="string"||(b=new(g(b||"float32"))(d+v));var c=b.length-v;if(d!==c)throw new Error("source length "+d+" ("+r+"x"+m.length+") does not match destination length "+c);for(e=0,t=v;e<m.length;e++)for(n=0;n<r;n++)b[t++]=m[e][n]===null?NaN:m[e][n]}else if(b&&typeof b!="string")b.set(m,v);else{var i=g(b||"float32");if(Array.isArray(m)||b==="array")for(b=new i(m.length+v),e=0,t=v,o=b.length;t<o;t++,e++)b[t]=m[e]===null?NaN:m[e];else v===0?b=new i(m):(b=new i(m.length+v)).set(m,v)}return b}},{dtype:127}],192:[function(y,ee,te){var g=y("css-font/stringify"),m=[32,126];ee.exports=function(b){var v=(b=b||{}).shape?b.shape:b.canvas?[b.canvas.width,b.canvas.height]:[512,512],e=b.canvas||document.createElement("canvas"),n=b.font,t=typeof b.step=="number"?[b.step,b.step]:b.step||[32,32],o=b.chars||m;
20if(n&&typeof n!="string"&&(n=g(n)),Array.isArray(o)){if(o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"){for(var r=[],d=o[0],c=0;d<=o[1];d++)r[c++]=String.fromCharCode(d);o=r}}else o=String(o).split("");v=v.slice(),e.width=v[0],e.height=v[1];var i=e.getContext("2d");i.fillStyle="#000",i.fillRect(0,0,e.width,e.height),i.font=n,i.textAlign="center",i.textBaseline="middle",i.fillStyle="#fff";var u=t[0]/2,f=t[1]/2;for(d=0;d<o.length;d++)i.fillText(o[d],u,f),(u+=t[0])>v[0]-t[0]/2&&(u=t[0]/2,f+=t[1]);return e}},{"css-font/stringify":102}],193:[function(y,ee,te){function g(e,n){n||(n={}),(typeof e=="string"||Array.isArray(e))&&(n.family=e);var t=Array.isArray(n.family)?n.family.join(", "):n.family;if(!t)throw Error("`family` must be defined");var o=n.size||n.fontSize||n.em||48,r=n.weight||n.fontWeight||"",d=(e=[n.style||n.fontStyle||"",r,o].join(" ")+"px "+t,n.origin||"top");if(g.cache[t]&&o<=g.cache[t].em)return m(g.cache[t],d);var c=n.canvas||g.canvas,i=c.getContext("2d"),u={upper:n.upper!==void 0?n.upper:"H",lower:n.lower!==void 0?n.lower:"x",descent:n.descent!==void 0?n.descent:"p",ascent:n.ascent!==void 0?n.ascent:"h",tittle:n.tittle!==void 0?n.tittle:"i",overshoot:n.overshoot!==void 0?n.overshoot:"O"},f=Math.ceil(1.5*o);c.height=f,c.width=.5*f,i.font=e;var s={top:0};i.clearRect(0,0,f,f),i.textBaseline="top",i.fillStyle="black",i.fillText("H",0,0);var h=b(i.getImageData(0,0,f,f));i.clearRect(0,0,f,f),i.textBaseline="bottom",i.fillText("H",0,f);var p=b(i.getImageData(0,0,f,f));s.lineHeight=s.bottom=f-p+h,i.clearRect(0,0,f,f),i.textBaseline="alphabetic",i.fillText("H",0,f);var a=f-b(i.getImageData(0,0,f,f))-1+h;s.baseline=s.alphabetic=a,i.clearRect(0,0,f,f),i.textBaseline="middle",i.fillText("H",0,.5*f);var x=b(i.getImageData(0,0,f,f));s.median=s.middle=f-x-1+h-.5*f,i.clearRect(0,0,f,f),i.textBaseline="hanging",i.fillText("H",0,.5*f);var l=b(i.getImageData(0,0,f,f));s.hanging=f-l-1+h-.5*f,i.clearRect(0,0,f,f),i.textBaseline="ideographic",i.fillText("H",0,f);var w=b(i.getImageData(0,0,f,f));if(s.ideographic=f-w-1+h,u.upper&&(i.clearRect(0,0,f,f),i.textBaseline="top",i.fillText(u.upper,0,0),s.upper=b(i.getImageData(0,0,f,f)),s.capHeight=s.baseline-s.upper),u.lower&&(i.clearRect(0,0,f,f),i.textBaseline="top",i.fillText(u.lower,0,0),s.lower=b(i.getImageData(0,0,f,f)),s.xHeight=s.baseline-s.lower),u.tittle&&(i.clearRect(0,0,f,f),i.textBaseline="top",i.fillText(u.tittle,0,0),s.tittle=b(i.getImageData(0,0,f,f))),u.ascent&&(i.clearRect(0,0,f,f),i.textBaseline="top",i.fillText(u.ascent,0,0),s.ascent=b(i.getImageData(0,0,f,f))),u.descent&&(i.clearRect(0,0,f,f),i.textBaseline="top",i.fillText(u.descent,0,0),s.descent=v(i.getImageData(0,0,f,f))),u.overshoot){i.clearRect(0,0,f,f),i.textBaseline="top",i.fillText(u.overshoot,0,0);var _=v(i.getImageData(0,0,f,f));s.overshoot=_-a}for(var T in s)s[T]/=o;return s.em=o,g.cache[t]=s,m(s,d)}function m(e,n){var t={};for(var o in typeof n=="string"&&(n=e[n]),e)o!=="em"&&(t[o]=e[o]-n);return t}function b(e){for(var n=e.height,t=e.data,o=3;o<t.length;o+=4)if(t[o]!==0)return Math.floor(.25*(o-3)/n)}function v(e){for(var n=e.height,t=e.data,o=t.length-1;o>0;o-=4)if(t[o]!==0)return Math.floor(.25*(o-3)/n)}ee.exports=g,g.canvas=document.createElement("canvas"),g.cache={}},{}],194:[function(y,ee,te){ee.exports=function(g,m){if(typeof g!="string")throw new TypeError("must specify type string");if(m=m||{},typeof document>"u"&&!m.canvas)return null;var b=m.canvas||document.createElement("canvas");typeof m.width=="number"&&(b.width=m.width),typeof m.height=="number"&&(b.height=m.height);var v,e=m;try{var n=[g];g.indexOf("webgl")===0&&n.push("experimental-"+g);for(var t=0;t<n.length;t++)if(v=b.getContext(n[t],e))return v}catch{v=null}return v||null}},{}],195:[function(y,ee,te){ee.exports=function(g,m){var b=m[0],v=m[1],e=m[2],n=m[3],t=m[4],o=m[5],r=m[6],d=m[7],c=m[8],i=m[9],u=m[10],f=m[11],s=m[12],h=m[13],p=m[14],a=m[15];return g[0]=o*(u*a-f*p)-i*(r*a-d*p)+h*(r*f-d*u),g[1]=-(v*(u*a-f*p)-i*(e*a-n*p)+h*(e*f-n*u)),g[2]=v*(r*a-d*p)-o*(e*a-n*p)+h*(e*d-n*r),g[3]=-(v*(r*f-d*u)-o*(e*f-n*u)+i*(e*d-n*r)),g[4]=-(t*(u*a-f*p)-c*(r*a-d*p)+s*(r*f-d*u)),g[5]=b*(u*a-f*p)-c*(e*a-n*p)+s*(e*f-n*u),g[6]=-(b*(r*a-d*p)-t*(e*a-n*p)+s*(e*d-n*r)),g[7]=b*(r*f-d*u)-t*(e*f-n*u)+c*(e*d-n*r),g[8]=t*(i*a-f*h)-c*(o*a-d*h)+s*(o*f-d*i),g[9]=-(b*(i*a-f*h)-c*(v*a-n*h)+s*(v*f-n*i)),g[10]=b*(o*a-d*h)-t*(v*a-n*h)+s*(v*d-n*o),g[11]=-(b*(o*f-d*i)-t*(v*f-n*i)+c*(v*d-n*o)),g[12]=-(t*(i*p-u*h)-c*(o*p-r*h)+s*(o*u-r*i)),g[13]=b*(i*p-u*h)-c*(v*p-e*h)+s*(v*u-e*i),g[14]=-(b*(o*p-r*h)-t*(v*p-e*h)+s*(v*r-e*o)),g[15]=b*(o*u-r*i)-t*(v*u-e*i)+c*(v*r-e*o),g}},{}],196:[function(y,ee,te){ee.exports=function(g){var m=new Float32Array(16);return m[0]=g[0],m[1]=g[1],m[2]=g[2],m[3]=g[3],m[4]=g[4],m[5]=g[5],m[6]=g[6],m[7]=g[7],m[8]=g[8],m[9]=g[9],m[10]=g[10],m[11]=g[11],m[12]=g[12],m[13]=g[13],m[14]=g[14],m[15]=g[15],m}},{}],197:[function(y,ee,te){ee.exports=function(g,m){return g[0]=m[0],g[1]=m[1],g[2]=m[2],g[3]=m[3],g[4]=m[4],g[5]=m[5],g[6]=m[6],g[7]=m[7],g[8]=m[8],g[9]=m[9],g[10]=m[10],g[11]=m[11],g[12]=m[12],g[13]=m[13],g[14]=m[14],g[15]=m[15],g}},{}],198:[function(y,ee,te){ee.exports=function(){var g=new Float32Array(16);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}},{}],199:[function(y,ee,te){ee.exports=function(g){var m=g[0],b=g[1],v=g[2],e=g[3],n=g[4],t=g[5],o=g[6],r=g[7],d=g[8],c=g[9],i=g[10
vendor: 4,341 bytes, line 20
20],u=g[11],f=g[12],s=g[13],h=g[14],p=g[15];return(m*t-b*n)*(i*p-u*h)-(m*o-v*n)*(c*p-u*s)+(m*r-e*n)*(c*h-i*s)+(b*o-v*t)*(d*p-u*f)-(b*r-e*t)*(d*h-i*f)+(v*r-e*o)*(d*s-c*f)}},{}],200:[function(y,ee,te){ee.exports=function(g,m){var b=m[0],v=m[1],e=m[2],n=m[3],t=b+b,o=v+v,r=e+e,d=b*t,c=v*t,i=v*o,u=e*t,f=e*o,s=e*r,h=n*t,p=n*o,a=n*r;return g[0]=1-i-s,g[1]=c+a,g[2]=u-p,g[3]=0,g[4]=c-a,g[5]=1-d-s,g[6]=f+h,g[7]=0,g[8]=u+p,g[9]=f-h,g[10]=1-d-i,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}},{}],201:[function(y,ee,te){ee.exports=function(g,m,b){var v,e,n,t=b[0],o=b[1],r=b[2],d=Math.sqrt(t*t+o*o+r*r);return Math.abs(d)<1e-6?null:(t*=d=1/d,o*=d,r*=d,v=Math.sin(m),e=Math.cos(m),n=1-e,g[0]=t*t*n+e,g[1]=o*t*n+r*v,g[2]=r*t*n-o*v,g[3]=0,g[4]=t*o*n-r*v,g[5]=o*o*n+e,g[6]=r*o*n+t*v,g[7]=0,g[8]=t*r*n+o*v,g[9]=o*r*n-t*v,g[10]=r*r*n+e,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g)}},{}],202:[function(y,ee,te){ee.exports=function(g,m,b){var v=m[0],e=m[1],n=m[2],t=m[3],o=v+v,r=e+e,d=n+n,c=v*o,i=v*r,u=v*d,f=e*r,s=e*d,h=n*d,p=t*o,a=t*r,x=t*d;return g[0]=1-(f+h),g[1]=i+x,g[2]=u-a,g[3]=0,g[4]=i-x,g[5]=1-(c+h),g[6]=s+p,g[7]=0,g[8]=u+a,g[9]=s-p,g[10]=1-(c+f),g[11]=0,g[12]=b[0],g[13]=b[1],g[14]=b[2],g[15]=1,g}},{}],203:[function(y,ee,te){ee.exports=function(g,m){return g[0]=m[0],g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=m[1],g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=m[2],g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}},{}],204:[function(y,ee,te){ee.exports=function(g,m){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=m[0],g[13]=m[1],g[14]=m[2],g[15]=1,g}},{}],205:[function(y,ee,te){ee.exports=function(g,m){var b=Math.sin(m),v=Math.cos(m);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=v,g[6]=b,g[7]=0,g[8]=0,g[9]=-b,g[10]=v,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}},{}],206:[function(y,ee,te){ee.exports=function(g,m){var b=Math.sin(m),v=Math.cos(m);return g[0]=v,g[1]=0,g[2]=-b,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=b,g[9]=0,g[10]=v,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}},{}],207:[function(y,ee,te){ee.exports=function(g,m){var b=Math.sin(m),v=Math.cos(m);return g[0]=v,g[1]=b,g[2]=0,g[3]=0,g[4]=-b,g[5]=v,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}},{}],208:[function(y,ee,te){ee.exports=function(g,m,b,v,e,n,t){var o=1/(b-m),r=1/(e-v),d=1/(n-t);return g[0]=2*n*o,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=2*n*r,g[6]=0,g[7]=0,g[8]=(b+m)*o,g[9]=(e+v)*r,g[10]=(t+n)*d,g[11]=-1,g[12]=0,g[13]=0,g[14]=t*n*2*d,g[15]=0,g}},{}],209:[function(y,ee,te){ee.exports=function(g){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}},{}],210:[function(y,ee,te){ee.exports={create:y("./create"),clone:y("./clone"),copy:y("./copy"),identity:y("./identity"),transpose:y("./transpose"),invert:y("./invert"),adjoint:y("./adjoint"),determinant:y("./determinant"),multiply:y("./multiply"),translate:y("./translate"),scale:y("./scale"),rotate:y("./rotate"),rotateX:y("./rotateX"),rotateY:y("./rotateY"),rotateZ:y("./rotateZ"),fromRotation:y("./fromRotation"),fromRotationTranslation:y("./fromRotationTranslation"),fromScaling:y("./fromScaling"),fromTranslation:y("./fromTranslation"),fromXRotation:y("./fromXRotation"),fromYRotation:y("./fromYRotation"),fromZRotation:y("./fromZRotation"),fromQuat:y("./fromQuat"),frustum:y("./frustum"),perspective:y("./perspective"),perspectiveFromFieldOfView:y("./perspectiveFromFieldOfView"),ortho:y("./ortho"),lookAt:y("./lookAt"),str:y("./str")}},{"./adjoint":195,"./clone":196,"./copy":197,"./create":198,"./determinant":199,"./fromQuat":200,"./fromRotation":201,"./fromRotationTranslation":202,"./fromScaling":203,"./fromTranslation":204,"./fromXRotation":205,"./fromYRotation":206,"./fromZRotation":207,"./frustum":208,"./identity":209,"./invert":211,"./lookAt":212,"./multiply":213,"./ortho":214,"./perspective":215,"./perspectiveFromFieldOfView":216,"./rotate":217,"./rotateX":218,"./rotateY":219,"./rotateZ":220,"./scale":221,"./str":222,"./translate":223,"./transpose":224}],211:[function(y,ee,te){ee.exports=function(g,m){var b=m[0],v=m[1],e=m[2],n=m[3],t=m[4],o=m[5],r=m[6],d=m[7],c=m[8],i=m[9],u=m[10],f=m[11],s=m[12],h=m[13],p=m[14],a=m[15],x=b*o-v*t,l=b*r-e*t,w=b*d-n*t,_=v*r-e*o,T=v*d-n*o,k=e*d-n*r,L=c*h-i*s,A=c*p-u*s,I=c*a-f*s,P=i*p-u*h,S=i*a-f*h,E=u*a-f*p,D=x*E-l*S+w*P+_*I-T*A+k*L;
vendor: 7,206 bytes, line 20
20return D?(D=1/D,g[0]=(o*E-r*S+d*P)*D,g[1]=(e*S-v*E-n*P)*D,g[2]=(h*k-p*T+a*_)*D,g[3]=(u*T-i*k-f*_)*D,g[4]=(r*I-t*E-d*A)*D,g[5]=(b*E-e*I+n*A)*D,g[6]=(p*w-s*k-a*l)*D,g[7]=(c*k-u*w+f*l)*D,g[8]=(t*S-o*I+d*L)*D,g[9]=(v*I-b*S-n*L)*D,g[10]=(s*T-h*w+a*x)*D,g[11]=(i*w-c*T-f*x)*D,g[12]=(o*A-t*P-r*L)*D,g[13]=(b*P-v*A+e*L)*D,g[14]=(h*l-s*_-p*x)*D,g[15]=(c*_-i*l+u*x)*D,g):null}},{}],212:[function(y,ee,te){var g=y("./identity");ee.exports=function(m,b,v,e){var n,t,o,r,d,c,i,u,f,s,h=b[0],p=b[1],a=b[2],x=e[0],l=e[1],w=e[2],_=v[0],T=v[1],k=v[2];return Math.abs(h-_)<1e-6&&Math.abs(p-T)<1e-6&&Math.abs(a-k)<1e-6?g(m):(i=h-_,u=p-T,f=a-k,s=1/Math.sqrt(i*i+u*u+f*f),n=l*(f*=s)-w*(u*=s),t=w*(i*=s)-x*f,o=x*u-l*i,(s=Math.sqrt(n*n+t*t+o*o))?(n*=s=1/s,t*=s,o*=s):(n=0,t=0,o=0),r=u*o-f*t,d=f*n-i*o,c=i*t-u*n,(s=Math.sqrt(r*r+d*d+c*c))?(r*=s=1/s,d*=s,c*=s):(r=0,d=0,c=0),m[0]=n,m[1]=r,m[2]=i,m[3]=0,m[4]=t,m[5]=d,m[6]=u,m[7]=0,m[8]=o,m[9]=c,m[10]=f,m[11]=0,m[12]=-(n*h+t*p+o*a),m[13]=-(r*h+d*p+c*a),m[14]=-(i*h+u*p+f*a),m[15]=1,m)}},{"./identity":209}],213:[function(y,ee,te){ee.exports=function(g,m,b){var v=m[0],e=m[1],n=m[2],t=m[3],o=m[4],r=m[5],d=m[6],c=m[7],i=m[8],u=m[9],f=m[10],s=m[11],h=m[12],p=m[13],a=m[14],x=m[15],l=b[0],w=b[1],_=b[2],T=b[3];return g[0]=l*v+w*o+_*i+T*h,g[1]=l*e+w*r+_*u+T*p,g[2]=l*n+w*d+_*f+T*a,g[3]=l*t+w*c+_*s+T*x,l=b[4],w=b[5],_=b[6],T=b[7],g[4]=l*v+w*o+_*i+T*h,g[5]=l*e+w*r+_*u+T*p,g[6]=l*n+w*d+_*f+T*a,g[7]=l*t+w*c+_*s+T*x,l=b[8],w=b[9],_=b[10],T=b[11],g[8]=l*v+w*o+_*i+T*h,g[9]=l*e+w*r+_*u+T*p,g[10]=l*n+w*d+_*f+T*a,g[11]=l*t+w*c+_*s+T*x,l=b[12],w=b[13],_=b[14],T=b[15],g[12]=l*v+w*o+_*i+T*h,g[13]=l*e+w*r+_*u+T*p,g[14]=l*n+w*d+_*f+T*a,g[15]=l*t+w*c+_*s+T*x,g}},{}],214:[function(y,ee,te){ee.exports=function(g,m,b,v,e,n,t){var o=1/(m-b),r=1/(v-e),d=1/(n-t);return g[0]=-2*o,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=-2*r,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=2*d,g[11]=0,g[12]=(m+b)*o,g[13]=(e+v)*r,g[14]=(t+n)*d,g[15]=1,g}},{}],215:[function(y,ee,te){ee.exports=function(g,m,b,v,e){var n=1/Math.tan(m/2),t=1/(v-e);return g[0]=n/b,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=n,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=(e+v)*t,g[11]=-1,g[12]=0,g[13]=0,g[14]=2*e*v*t,g[15]=0,g}},{}],216:[function(y,ee,te){ee.exports=function(g,m,b,v){var e=Math.tan(m.upDegrees*Math.PI/180),n=Math.tan(m.downDegrees*Math.PI/180),t=Math.tan(m.leftDegrees*Math.PI/180),o=Math.tan(m.rightDegrees*Math.PI/180),r=2/(t+o),d=2/(e+n);return g[0]=r,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=d,g[6]=0,g[7]=0,g[8]=-(t-o)*r*.5,g[9]=(e-n)*d*.5,g[10]=v/(b-v),g[11]=-1,g[12]=0,g[13]=0,g[14]=v*b/(b-v),g[15]=0,g}},{}],217:[function(y,ee,te){ee.exports=function(g,m,b,v){var e,n,t,o,r,d,c,i,u,f,s,h,p,a,x,l,w,_,T,k,L,A,I,P,S=v[0],E=v[1],D=v[2],F=Math.sqrt(S*S+E*E+D*D);return Math.abs(F)<1e-6?null:(S*=F=1/F,E*=F,D*=F,e=Math.sin(b),n=Math.cos(b),t=1-n,o=m[0],r=m[1],d=m[2],c=m[3],i=m[4],u=m[5],f=m[6],s=m[7],h=m[8],p=m[9],a=m[10],x=m[11],l=S*S*t+n,w=E*S*t+D*e,_=D*S*t-E*e,T=S*E*t-D*e,k=E*E*t+n,L=D*E*t+S*e,A=S*D*t+E*e,I=E*D*t-S*e,P=D*D*t+n,g[0]=o*l+i*w+h*_,g[1]=r*l+u*w+p*_,g[2]=d*l+f*w+a*_,g[3]=c*l+s*w+x*_,g[4]=o*T+i*k+h*L,g[5]=r*T+u*k+p*L,g[6]=d*T+f*k+a*L,g[7]=c*T+s*k+x*L,g[8]=o*A+i*I+h*P,g[9]=r*A+u*I+p*P,g[10]=d*A+f*I+a*P,g[11]=c*A+s*I+x*P,m!==g&&(g[12]=m[12],g[13]=m[13],g[14]=m[14],g[15]=m[15]),g)}},{}],218:[function(y,ee,te){ee.exports=function(g,m,b){var v=Math.sin(b),e=Math.cos(b),n=m[4],t=m[5],o=m[6],r=m[7],d=m[8],c=m[9],i=m[10],u=m[11];return m!==g&&(g[0]=m[0],g[1]=m[1],g[2]=m[2],g[3]=m[3],g[12]=m[12],g[13]=m[13],g[14]=m[14],g[15]=m[15]),g[4]=n*e+d*v,g[5]=t*e+c*v,g[6]=o*e+i*v,g[7]=r*e+u*v,g[8]=d*e-n*v,g[9]=c*e-t*v,g[10]=i*e-o*v,g[11]=u*e-r*v,g}},{}],219:[function(y,ee,te){ee.exports=function(g,m,b){var v=Math.sin(b),e=Math.cos(b),n=m[0],t=m[1],o=m[2],r=m[3],d=m[8],c=m[9],i=m[10],u=m[11];return m!==g&&(g[4]=m[4],g[5]=m[5],g[6]=m[6],g[7]=m[7],g[12]=m[12],g[13]=m[13],g[14]=m[14],g[15]=m[15]),g[0]=n*e-d*v,g[1]=t*e-c*v,g[2]=o*e-i*v,g[3]=r*e-u*v,g[8]=n*v+d*e,g[9]=t*v+c*e,g[10]=o*v+i*e,g[11]=r*v+u*e,g}},{}],220:[function(y,ee,te){ee.exports=function(g,m,b){var v=Math.sin(b),e=Math.cos(b),n=m[0],t=m[1],o=m[2],r=m[3],d=m[4],c=m[5],i=m[6],u=m[7];return m!==g&&(g[8]=m[8],g[9]=m[9],g[10]=m[10],g[11]=m[11],g[12]=m[12],g[13]=m[13],g[14]=m[14],g[15]=m[15]),g[0]=n*e+d*v,g[1]=t*e+c*v,g[2]=o*e+i*v,g[3]=r*e+u*v,g[4]=d*e-n*v,g[5]=c*e-t*v,g[6]=i*e-o*v,g[7]=u*e-r*v,g}},{}],221:[function(y,ee,te){ee.exports=function(g,m,b){var v=b[0],e=b[1],n=b[2];return g[0]=m[0]*v,g[1]=m[1]*v,g[2]=m[2]*v,g[3]=m[3]*v,g[4]=m[4]*e,g[5]=m[5]*e,g[6]=m[6]*e,g[7]=m[7]*e,g[8]=m[8]*n,g[9]=m[9]*n,g[10]=m[10]*n,g[11]=m[11]*n,g[12]=m[12],g[13]=m[13],g[14]=m[14],g[15]=m[15],g}},{}],222:[function(y,ee,te){ee.exports=function(g){return"mat4("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+", "+g[6]+", "+g[7]+", "+g[8]+", "+g[9]+", "+g[10]+", "+g[11]+", "+g[12]+", "+g[13]+", "+g[14]+", "+g[15]+")"}},{}],223:[function(y,ee,te){ee.exports=function(g,m,b){var v,e,n,t,o,r,d,c,i,u,f,s,h=b[0],p=b[1],a=b[2];return m===g?(g[12]=m[0]*h+m[4]*p+m[8]*a+m[12],g[13]=m[1]*h+m[5]*p+m[9]*a+m[13],g[14]=m[2]*h+m[6]*p+m[10]*a+m[14],g[15]=m[3]*h+m[7]*p+m[11]*a+m[15]):(v=m[0],e=m[1],n=m[2],t=m[3],o=m[4],r=m[5],d=m[6],c=m[7],i=m[8],u=m[9],f=m[10],s=m[11],g[0]=v,g[1]=e,g[2]=n,g[3]=t,g[4]=o,g[5]=r,g[6]=d,g[7]=c,g[8]=i,g[9]=u,g[10]=f,g[11]=s,g[12]=v*h+o*p+i*a+m[12],g[13]=e*h+r*p+u*a+m[13],g[14]=n*h+d*p+f*a+m[14],g[15]=t*h+c*p+s*a+m[15]),g}},{}],224:[function(y,ee,te){ee.exports=function(g,m){if(g===m){var b=m[1],v=m[2],e=m[3],n=m[6],t=m[7],o=m[11];g[1]=m[4],g[2]=m[8],g[3]=m[12],g[4]=b,g[6]=m[9],g[7]=m[13],g[8]=v,g[9]=n,g[11]=m[14],g[12]=e,g[13]=t,g[14]=o}else g[0]=m[0],g[1]=m[4],g[2]=m[8],g[3]=m[12],g[4]=m[1],g[5]=m[5],g[6]=m[9],g[7]=m[13],g[8]=m[2],g[9]=m[6],g[10]=m[10],g[11]=m[14],g[12]=m[3],g[13]=m[7],g[14]=m[11],g[15]=m[15];return g}},{}],225:[function(y,ee,te){var g=y("css-font"),m=y("pick-by-alias"),b=y("regl"),v=y("gl-util/context"),e=y("es6-weak-map"),n=y("color-normalize"),t=y("font-atlas"),o=y("typedarray-pool"),r=y("parse-rect"),d=y("is-plain-obj"),c=y("parse-unit"),i=y("to-px"),u=y("detect-kerning"),f=y("object-assign"),s=y("font-measure"),h=y("flatten-vertex-data"),p=y("bit-twiddle").nextPow2,a=new e,x=!1;if(document.body){var l=document.body.appendChild(document.createElement("div"));l.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(l).fontStretch&&(x=!0),document.body.removeChild(l)}var w=function(_){(function(T){return typeof T=="function"&&T._gl&&T.prop&&T.texture&&T.buffer})(_)?(_={regl:_},this.gl=_.regl._gl):this.gl=v(_),this.shader=a.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=_.regl||b({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),a.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(d(_)?_:{})};w.prototype.createShader=function(){var _=this.regl,T=_({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alph
20a",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:_.prop("count"),offset:_.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:_.this("sizeBuffer")},width:{offset:0,stride:8,buffer:_.this("sizeBuffer")},char:_.this("charBuffer"),position:_.this("position")},uniforms:{atlasSize:function(k,L){return[L.atlas.width,L.atlas.height]},atlasDim:function(k,L){return[L.atlas.cols,L.atlas.rows]},atlas:function(k,L){return L.atlas.texture},charStep:function(k,L){return L.atlas.step},em:function(k,L){return L.atlas.em},color:_.prop("color"),opacity:_.prop("opacity"),viewport:_.this("viewportArray"),scale:_.this("scale"),align:_.prop("align"),baseline:_.prop("baseline"),translate:_.this("translate"),positionOffset:_.prop("positionOffset")},primitive:"points",viewport:_.this("viewport"),vert:`
21			precision highp float;
22			attribute float width, charOffset, char;
23			attribute vec2 position;
24			uniform float fontSize, charStep, em, align, baseline;
25			uniform vec4 viewport;
26			uniform vec4 color;
27			uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;
28			varying vec2 charCoord, charId;
29			varying float charWidth;
30			varying vec4 fontColor;
31			void main () {
32				vec2 offset = floor(em * (vec2(align + charOffset, baseline)
33					+ vec2(positionOffset.x, -positionOffset.y)))
34					/ (viewport.zw * scale.xy);
35
36				vec2 position = (position + translate) * scale;
37				position += offset * scale;
38
39				charCoord = position * viewport.zw + viewport.xy;
40
41				gl_Position = vec4(position * 2. - 1., 0, 1);
42
43				gl_PointSize = charStep;
44
45				charId.x = mod(char, atlasDim.x);
46				charId.y = floor(char / atlasDim.x);
47
48				charWidth = width * em;
49
50				fontColor = color / 255.;
51			}`,frag:`
52			precision highp float;
53			uniform float fontSize, charStep, opacity;
54			uniform vec2 atlasSize;
55			uniform vec4 viewport;
56			uniform sampler2D atlas;
57			varying vec4 fontColor;
58			varying vec2 charCoord, charId;
59			varying float charWidth;
60
61			float lightness(vec4 color) {
62				return color.r * 0.299 + color.g * 0.587 + color.b * 0.114;
63			}
64
65			void main () {
66				vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;
67				float halfCharStep = floor(charStep * .5 + .5);
68
69				// invert y and shift by 1px (FF expecially needs that)
70				uv.y = charStep - uv.y;
71
72				// ignore points outside of character bounding box
73				float halfCharWidth = ceil(charWidth * .5);
74				if (floor(uv.x) > halfCharStep + halfCharWidth ||
75					floor(uv.x) < halfCharStep - halfCharWidth) return;
76
77				uv += charId * charStep;
78				uv = uv / atlasSize;
79
80				vec4 color = fontColor;
81				vec4 mask = texture2D(atlas, uv);
82
83				float maskY = lightness(mask);
84				// float colorY = lightness(color);
85				color.a *= maskY;
86				color.a *= opacity;
87
88				// color.a += .1;
89
90				// antialiasing, see yiq color space y-channel formula
91				// color.rgb += (1. - color.rgb) * (1. - mask.rgb);
92
93				gl_FragColor = color;
94			}`});return{regl:_,draw:T,atlas:{}}},w.prototype.update=function(_){var T=this;if(typeof _=="string")_={text:_};else if(!_)return;(_=m(_,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity!=null&&(Array.isArray(_.opacity)?this.opacity=_.opacity.map(function(me){return parseFloat(me)}):this.opacity=parseFloat(_.opacity)),_.viewport!=null&&(this.viewport=r(_.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),_.kerning!=null&&(this.kerning=_.kerning),_.offset!=null&&(typeof _.offset=="number"&&(_.offset=[_.offset,0]),this.positionOffset=h(_.offset)),_.direction&&(this.direction=_.direction),_.range&&(this.range=_.range,this.scale=[1/(_.range[2]-_.range[0]),1/(_.range[3]-_.range[1])],this.translate=[-_.range[0],-_.range[1]]),_.scale&&(this.scale=_.scale),_.translate&&(this.translate=_.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||_.font||(_.font=w.baseFontSize+"px sans-serif");var k,L=!1,A=!1;
94if(_.font&&(Array.isArray(_.font)?_.font:[_.font]).forEach(function(me,Te){if(typeof me=="string")try{me=g.parse(me)}catch{me=g.parse(w.baseFontSize+"px "+me)}else me=g.parse(g.stringify(me));var _e=g.stringify({size:w.baseFontSize,family:me.family,stretch:x?me.stretch:void 0,variant:me.variant,weight:me.weight,style:me.style}),Ae=c(me.size),Pe=Math.round(Ae[0]*i(Ae[1]));if(Pe!==T.fontSize[Te]&&(A=!0,T.fontSize[Te]=Pe),!(T.font[Te]&&_e==T.font[Te].baseString||(L=!0,T.font[Te]=w.fonts[_e],T.font[Te]))){var De=me.family.join(", "),Ve=[me.style];me.style!=me.variant&&Ve.push(me.variant),me.variant!=me.weight&&Ve.push(me.weight),x&&me.weight!=me.stretch&&Ve.push(me.stretch),T.font[Te]={baseString:_e,family:De,weight:me.weight,stretch:me.stretch,style:me.style,variant:me.variant,width:{},kerning:{},metrics:s(De,{origin:"top",fontSize:w.baseFontSize,fontStyle:Ve.join(" ")})},w.fonts[_e]=T.font[Te]}}),(L||A)&&this.font.forEach(function(me,Te){var _e=g.stringify({size:T.fontSize[Te],family:me.family,stretch:x?me.stretch:void 0,variant:me.variant,weight:me.weight,style:me.style});if(T.fontAtlas[Te]=T.shader.atlas[_e],!T.fontAtlas[Te]){var Ae=me.metrics;T.shader.atlas[_e]=T.fontAtlas[Te]={fontString:_e,step:2*Math.ceil(T.fontSize[Te]*Ae.bottom*.5),em:T.fontSize[Te],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:T.regl.texture()}}_.text==null&&(_.text=T.text)}),typeof _.text=="string"&&_.position&&_.position.length>2){for(var I=Array(.5*_.position.length),P=0;P<I.length;P++)I[P]=_.text;_.text=I}if(_.text!=null||L){if(this.textOffsets=[0],Array.isArray(_.text)){this.count=_.text[0].length,this.counts=[this.count];for(var S=1;S<_.text.length;S++)this.textOffsets[S]=this.textOffsets[S-1]+_.text[S-1].length,this.count+=_.text[S].length,this.counts.push(_.text[S].length);this.text=_.text.join("")}else this.text=_.text,this.count=this.text.length,this.counts=[this.count];k=[],this.font.forEach(function(me,Te){w.atlasContext.font=me.baseString;for(var _e=T.fontAtlas[Te],Ae=0;Ae<T.text.length;Ae++){var Pe=T.text.charAt(Ae);if(_e.ids[Pe]==null&&(_e.ids[Pe]=_e.chars.length,_e.chars.push(Pe),k.push(Pe)),me.width[Pe]==null&&(me.width[Pe]=w.atlasContext.measureText(Pe).width/w.baseFontSize,T.kerning)){var De=[];for(var Ve in me.width)De.push(Ve+Pe,Pe+Ve);f(me.kerning,u(me.family,{pairs:De}))}}})}if(_.position)if(_.position.length>2){for(var E=!_.position[0].length,D=o.mallocFloat(2*this.count),F=0,H=0;F<this.counts.length;F++){var V=this.counts[F];if(E)for(var Z=0;Z<V;Z++)D[H++]=_.position[2*F],D[H++]=_.position[2*F+1];else for(var K=0;K<V;K++)D[H++]=_.position[F][0],D[H++]=_.position[F][1]}this.position.call?this.position({type:"float",data:D}):this.position=this.regl.buffer({type:"float",data:D}),o.freeFloat(D)}else this.position.destroy&&this.position.destroy(),this.position={constant:_.position};if(_.text||L){var q=o.mallocUint8(this.count),W=o.mallocFloat(2*this.count);this.textWidth=[];for(var $=0,R=0;$<this.counts.length;$++){for(var N=this.counts[$],U=this.font[$]||this.font[0],Q=this.fontAtlas[$]||this.fontAtlas[0],j=0;j<N;j++){var X=this.text.charAt(R),J=this.text.charAt(R-1);if(q[R]=Q.ids[X],W[2*R]=U.width[X],j){var re=W[2*R-2],ne=W[2*R],se=W[2*R-1]+.5*re+.5*ne;if(this.kerning){var oe=U.kerning[J+X];oe&&(se+=.001*oe)}W[2*R+1]=se}else W[2*R+1]=.5*W[2*R];R++}this.textWidth.push(W.length?.5*W[2*R-2]+W[2*R-1]:0)}_.align||(_.align=this.align),this.charBuffer({data:q,type:"uint8",usage:"stream"}),this.sizeBuffer({data:W,type:"float",usage:"stream"}),o.freeUint8(q),o.freeFloat(W),k.length&&this.font.forEach(function(me,Te){var _e=T.fontAtlas[Te],Ae=_e.step,Pe=Math.floor(w.maxAtlasSize/Ae),De=Math.min(Pe,_e.chars.length),Ve=Math.ceil(_e.chars.length/De),Qe=p(De*Ae),Oe=p(Ve*Ae);_e.width=Qe,_e.height=Oe,_e.rows=Ve,_e.cols=De,_e.em&&_e.texture({data:t({canvas:w.atlasCanvas,font:_e.fontString,chars:_e.chars,shape:[Qe,Oe],step:[Ae,Ae]})})})}if(_.align&&(this.align=_.align,this.alignOffset=this.textWidth.map(function(me,Te){var _e=Array.isArray(T.align)?T.align.length>1?T.align[Te]:T.align[0]:T.align;if(typeof _e=="number")return _e;switch(_e){case"right":case"end":return-me;case"center":case"centre":case"middle":return .5*-me}return 0})),this.baseline==null&&_.baseline==null&&(_.baseline=0),_.baseline!=null&&(this.baseline=_.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(me,Te){var _e=(T.font[Te]||T.font[0]).metrics,Ae=0;return Ae+=.5*_e.bottom,Ae+=typeof me=="number"?me-_e.baseline:-_e[me],Ae*=-1})),_.color!=null)if(_.color||(_.color="transparent"),typeof _.color!="string"&&isNaN(_.color)){var pe;if(typeof _.color[0]=="number"&&_.color.length>this.counts.length){var ce=_.color.length;pe=o.mallocUint8(ce);for(var de=(_.color.subarray||_.color.slice).bind(_.color),xe=0;xe<ce;xe+=4)pe.set(n(de(xe,xe+4),"uint8"),xe)}else{var we=_.color.length;pe=o.mallocUint8(4*we);for(var be=0;be<we;be++)pe.set(n(_.color[be]||0,"uint8"),4*be)}this.color=pe}else this.color=n(_.color,"uint8");if(_.position||_.text||_.color||_.baseline||_.align||_.font||_.offset||_.o
94pacity)if(this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Ee=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Ee);for(var fe=0;fe<this.batch.length;fe++)this.batch[fe]={count:this.counts.length>1?this.counts[fe]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[fe]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*fe,4*fe+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[fe]:this.opacity,baseline:this.baselineOffset[fe]!=null?this.baselineOffset[fe]:this.baselineOffset[0],align:this.align?this.alignOffset[fe]!=null?this.alignOffset[fe]:this.alignOffset[0]:0,atlas:this.fontAtlas[fe]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*fe,2*fe+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},w.prototype.destroy=function(){},w.prototype.kerning=!0,w.prototype.position={constant:new Float32Array(2)},w.prototype.translate=null,w.prototype.scale=null,w.prototype.font=null,w.prototype.text="",w.prototype.positionOffset=[0,0],w.prototype.opacity=1,w.prototype.color=new Uint8Array([0,0,0,255]),w.prototype.alignOffset=[0,0],w.maxAtlasSize=1024,w.atlasCanvas=document.createElement("canvas"),w.atlasContext=w.atlasCanvas.getContext("2d",{alpha:!1}),w.baseFontSize=64,w.fonts={},ee.exports=w},{"bit-twiddle":81,"color-normalize":89,"css-font":99,"detect-kerning":125,"es6-weak-map":183,"flatten-vertex-data":191,"font-atlas":192,"font-measure":193,"gl-util/context":226,"is-plain-obj":236,"object-assign":247,"parse-rect":249,"parse-unit":251,"pick-by-alias":253,regl:283,"to-px":314,"typedarray-pool":327}],226:[function(y,ee,te){(function(g){(function(){var m=y("pick-by-alias");function b(n){if(n.container)if(n.container==document.body)document.body.style.width||(n.canvas.width=n.width||n.pixelRatio*g.innerWidth),document.body.style.height||(n.canvas.height=n.height||n.pixelRatio*g.innerHeight);else{var t=n.container.getBoundingClientRect();n.canvas.width=n.width||t.right-t.left,n.canvas.height=n.height||t.bottom-t.top}}function v(n){return typeof n.getContext=="function"&&"width"in n&&"height"in n}function e(){var n=document.createElement("canvas");return n.style.position="absolute",n.style.top=0,n.style.left=0,n}ee.exports=function(n){var t;if(n?typeof n=="string"&&(n={container:n}):n={},v(n)?n={container:n}:n=typeof(t=n).nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"?{container:n}:function(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}(n)?{gl:n}:m(n,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),n.pixelRatio||(n.pixelRatio=g.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var o=document.querySelector(n.container);if(!o)throw Error("Element "+n.container+" is not found");n.container=o}v(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),b(n))}else if(!n.canvas){if(typeof document>"u")throw Error("Not DOM environment. Use headless-gl.");n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),b(n)}return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(r){try{n.gl=n.canvas.getContext(r,n.attrs)}catch{}return n.gl}),n.gl}}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"pick-by-alias":253}],227:[function(y,ee,te){ee.exports=function(g){typeof g=="string"&&(g=[g]);
94for(var m=[].slice.call(arguments,1),b=[],v=0;v<g.length-1;v++)b.push(g[v],m[v]||"");return b.push(g[v]),b.join("")}},{}],228:[function(y,ee,te){(function(g){(function(){var m,b=y("is-browser");m=typeof g.matchMedia=="function"?!g.matchMedia("(hover: none)").matches:b,ee.exports=m}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"is-browser":232}],229:[function(y,ee,te){var g=y("is-browser");ee.exports=g&&function(){var m=!1;try{var b=Object.defineProperty({},"passive",{get:function(){m=!0}});window.addEventListener("test",null,b),window.removeEventListener("test",null,b)}catch{m=!1}return m}()},{"is-browser":232}],230:[function(y,ee,te){te.read=function(g,m,b,v,e){var n,t,o=8*e-v-1,r=(1<<o)-1,d=r>>1,c=-7,i=b?e-1:0,u=b?-1:1,f=g[m+i];for(i+=u,n=f&(1<<-c)-1,f>>=-c,c+=o;c>0;n=256*n+g[m+i],i+=u,c-=8);for(t=n&(1<<-c)-1,n>>=-c,c+=v;c>0;t=256*t+g[m+i],i+=u,c-=8);if(n===0)n=1-d;else{if(n===r)return t?NaN:1/0*(f?-1:1);t+=Math.pow(2,v),n-=d}return(f?-1:1)*t*Math.pow(2,n-v)},te.write=function(g,m,b,v,e,n){var t,o,r,d=8*n-e-1,c=(1<<d)-1,i=c>>1,u=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=v?0:n-1,s=v?1:-1,h=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(o=isNaN(m)?1:0,t=c):(t=Math.floor(Math.log(m)/Math.LN2),m*(r=Math.pow(2,-t))<1&&(t--,r*=2),(m+=t+i>=1?u/r:u*Math.pow(2,1-i))*r>=2&&(t++,r/=2),t+i>=c?(o=0,t=c):t+i>=1?(o=(m*r-1)*Math.pow(2,e),t+=i):(o=m*Math.pow(2,i-1)*Math.pow(2,e),t=0));e>=8;g[b+f]=255&o,f+=s,o/=256,e-=8);for(t=t<<e|o,d+=e;d>0;g[b+f]=255&t,f+=s,t/=256,d-=8);g[b+f-s]|=128*h}},{}],231:[function(y,ee,te){typeof Object.create=="function"?ee.exports=function(g,m){m&&(g.super_=m,g.prototype=Object.create(m.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:ee.exports=function(g,m){if(m){g.super_=m;var b=function(){};b.prototype=m.prototype,g.prototype=new b,g.prototype.constructor=g}}},{}],232:[function(y,ee,te){ee.exports=!0},{}],233:[function(y,ee,te){ee.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],234:[function(y,ee,te){ee.exports=b,ee.exports.isMobile=b,ee.exports.default=b;var g=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,m=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function b(v){v||(v={});var e=v.ua;if(e||typeof navigator>"u"||(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;var n=v.tablet?m.test(e):g.test(e);return!n&&v.tablet&&v.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(n=!0),n}},{}],235:[function(y,ee,te){ee.exports=function(g){var m=typeof g;return g!==null&&(m==="object"||m==="function")}},{}],236:[function(y,ee,te){var g=Object.prototype.toString;ee.exports=function(m){var b;return g.call(m)==="[object Object]"&&((b=Object.getPrototypeOf(m))===null||b===Object.getPrototypeOf({}))}},{}],237:[function(y,ee,te){ee.exports=function(g){for(var m,b=g.length,v=0;v<b;v++)if(((m=g.charCodeAt(v))<9||m>13)&&m!==32&&m!==133&&m!==160&&m!==5760&&m!==6158&&(m<8192||m>8205)&&m!==8232&&m!==8233&&m!==8239&&m!==8287&&m!==8288&&m!==12288&&m!==65279)return!1;return!0}},{}],238:[function(y,ee,te){ee.exports=function(g){return typeof g=="string"&&(g=g.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(g)&&/[\dz]$/i.test(g)&&g.length>4))}},{}],239:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?ee.exports=m():(g=g||self).mapboxgl=m()})(this,function(){var g,m,b;function v(e,n){if(g)if(m){var t="var sharedChunk = {}; ("+g+")(sharedChunk); ("+m+")(sharedChunk);",o={};g(o),(b=n(o)).workerUrl=window.URL.createObjectURL(new Blob([t],{type:"text/javascript"}))}else m=n;else g=n}return v(0,function(e){function n(M,O){return M(O={exports:{}},O.exports),O.exports}var t=o;function o(M,O,Y,ae){this.cx=3*M,this.bx=3*(Y-M)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*O,this.by=3*(ae-O)-this.cy,this.ay=1-this.cy-this.by,this.p1x=M,this.p1y=ae,this.p2x=Y,this.p2y=ae}o.prototype.sampleCurveX=function(M){return((this.ax*M+this.bx)*M+this.cx)*M},o.prototype.sampleCurveY=function(M){return((this.ay*M+this.by)*M+this.cy)*M},o.prototype.sampleCurveDerivativeX=function(M){return(3*this.ax*M+2*this.bx)*M+this.cx},o.prototype.solveCurveX=function(M,O){var Y,ae,he,ve,Se;for(O===void 0&&(O=1e-6),he=M,Se=0;Se<8;Se++){if(ve=this.sampleCurveX(he)-M,Math.abs(ve)<O)return he;var Fe=this.sampleCurveDerivativeX(he);
vendor: 5,210 bytes, line 94
94if(Math.abs(Fe)<1e-6)break;he-=ve/Fe}if((he=M)<(Y=0))return Y;if(he>(ae=1))return ae;for(;Y<ae;){if(ve=this.sampleCurveX(he),Math.abs(ve-M)<O)return he;M>ve?Y=he:ae=he,he=.5*(ae-Y)+Y}return he},o.prototype.solve=function(M,O){return this.sampleCurveY(this.solveCurveX(M,O))};var r=d;function d(M,O){this.x=M,this.y=O}function c(M,O,Y,ae){var he=new t(M,O,Y,ae);return function(ve){return he.solve(ve)}}d.prototype={clone:function(){return new d(this.x,this.y)},add:function(M){return this.clone()._add(M)},sub:function(M){return this.clone()._sub(M)},multByPoint:function(M){return this.clone()._multByPoint(M)},divByPoint:function(M){return this.clone()._divByPoint(M)},mult:function(M){return this.clone()._mult(M)},div:function(M){return this.clone()._div(M)},rotate:function(M){return this.clone()._rotate(M)},rotateAround:function(M,O){return this.clone()._rotateAround(M,O)},matMult:function(M){return this.clone()._matMult(M)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(M){return this.x===M.x&&this.y===M.y},dist:function(M){return Math.sqrt(this.distSqr(M))},distSqr:function(M){var O=M.x-this.x,Y=M.y-this.y;return O*O+Y*Y},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(M){return Math.atan2(this.y-M.y,this.x-M.x)},angleWith:function(M){return this.angleWithSep(M.x,M.y)},angleWithSep:function(M,O){return Math.atan2(this.x*O-this.y*M,this.x*M+this.y*O)},_matMult:function(M){var O=M[0]*this.x+M[1]*this.y,Y=M[2]*this.x+M[3]*this.y;return this.x=O,this.y=Y,this},_add:function(M){return this.x+=M.x,this.y+=M.y,this},_sub:function(M){return this.x-=M.x,this.y-=M.y,this},_mult:function(M){return this.x*=M,this.y*=M,this},_div:function(M){return this.x/=M,this.y/=M,this},_multByPoint:function(M){return this.x*=M.x,this.y*=M.y,this},_divByPoint:function(M){return this.x/=M.x,this.y/=M.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var M=this.y;return this.y=this.x,this.x=-M,this},_rotate:function(M){var O=Math.cos(M),Y=Math.sin(M),ae=O*this.x-Y*this.y,he=Y*this.x+O*this.y;return this.x=ae,this.y=he,this},_rotateAround:function(M,O){var Y=Math.cos(M),ae=Math.sin(M),he=O.x+Y*(this.x-O.x)-ae*(this.y-O.y),ve=O.y+ae*(this.x-O.x)+Y*(this.y-O.y);return this.x=he,this.y=ve,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},d.convert=function(M){return M instanceof d?M:Array.isArray(M)?new d(M[0],M[1]):M};var i=c(.25,.1,.25,1);function u(M,O,Y){return Math.min(Y,Math.max(O,M))}function f(M,O,Y){var ae=Y-O,he=((M-O)%ae+ae)%ae+O;return he===O?Y:he}function s(M){for(var O=[],Y=arguments.length-1;Y-- >0;)O[Y]=arguments[Y+1];for(var ae=0,he=O;ae<he.length;ae+=1){var ve=he[ae];for(var Se in ve)M[Se]=ve[Se]}return M}var h=1;function p(){return h++}function a(){return function M(O){return O?(O^16*Math.random()>>O/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,M)}()}function x(M){return!!M&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(M)}function l(M,O){M.forEach(function(Y){O[Y]&&(O[Y]=O[Y].bind(O))})}function w(M,O){return M.indexOf(O,M.length-O.length)!==-1}function _(M,O,Y){var ae={};for(var he in M)ae[he]=O.call(Y||this,M[he],he,M);return ae}function T(M,O,Y){var ae={};for(var he in M)O.call(Y||this,M[he],he,M)&&(ae[he]=M[he]);return ae}function k(M){return Array.isArray(M)?M.map(k):typeof M=="object"&&M?_(M,k):M}var L={};function A(M){L[M]||(typeof console<"u"&&console.warn(M),L[M]=!0)}function I(M,O,Y){return(Y.y-M.y)*(O.x-M.x)>(O.y-M.y)*(Y.x-M.x)}function P(M){for(var O=0,Y=0,ae=M.length,he=ae-1,ve=void 0,Se=void 0;Y<ae;he=Y++)ve=M[Y],O+=((Se=M[he]).x-ve.x)*(ve.y+Se.y);return O}function S(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function E(M){var O={};if(M.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(ae,he,ve,Se){var Fe=ve||Se;return O[he]=!Fe||Fe.toLowerCase(),""}),O["max-age"]){var Y=parseInt(O["max-age"],10);isNaN(Y)?delete O["max-age"]:O["max-age"]=Y}return O}var D=null;function F(M){if(D==null){var O=M.navigator?M.navigator.userAgent:null;D=!!M.safari||!(!O||!(/\b(iPad|iPhone|iPod)\b/.test(O)||O.match("Safari")&&!O.match("Chrome")))}return D}function H(M){try{var O=self[M];return O.setItem("_mapbox_test_",1),O.removeItem("_mapbox_test_"),!0}catch{return!1}}var V,Z,K,q,W=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),$=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,R=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,N={now:W,frame:function(M){var O=$(M);return{cancel:function(){return R(O)}}},getImageData:function(M,O){O===void 0&&(O=0);var Y=self.document.createElement("canvas"),ae=Y.getContext("2d");if(!ae)throw new Error("failed to create canvas 2d context");
94return Y.width=M.width,Y.height=M.height,ae.drawImage(M,0,0,M.width,M.height),ae.getImageData(-O,-O,M.width+2*O,M.height+2*O)},resolveURL:function(M){return V||(V=self.document.createElement("a")),V.href=M,V.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(Z==null&&(Z=self.matchMedia("(prefers-reduced-motion: reduce)")),Z.matches)}},U={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Q={supported:!1,testSupport:function(M){j||!q||(X?J(M):K=M)}},j=!1,X=!1;function J(M){var O=M.createTexture();M.bindTexture(M.TEXTURE_2D,O);try{if(M.texImage2D(M.TEXTURE_2D,0,M.RGBA,M.RGBA,M.UNSIGNED_BYTE,q),M.isContextLost())return;Q.supported=!0}
94catch{}M.deleteTexture(O),j=!0}self.document&&((q=self.document.createElement("img")).onload=function(){K&&J(K),K=null,X=!0},q.onerror=function(){j=!0,K=null},q.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var re="01",ne=function(M,O){this._transformRequestFn=M,this._customAccessToken=O,this._createSkuToken()};function se(M){return M.indexOf("mapbox:")===0}ne.prototype._createSkuToken=function(){var M=function(){for(var O="",Y=0;Y<10;Y++)O+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",re,O].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=M.token,this._skuTokenExpiresAt=M.tokenExpiresAt},ne.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ne.prototype.transformRequest=function(M,O){return this._transformRequestFn&&this._transformRequestFn(M,O)||{url:M}},ne.prototype.normalizeStyleURL=function(M,O){if(!se(M))return M;var Y=de(M);return Y.path="/styles/v1"+Y.path,this._makeAPIURL(Y,this._customAccessToken||O)},ne.prototype.normalizeGlyphsURL=function(M,O){if(!se(M))return M;var Y=de(M);return Y.path="/fonts/v1"+Y.path,this._makeAPIURL(Y,this._customAccessToken||O)},ne.prototype.normalizeSourceURL=function(M,O){if(!se(M))return M;var Y=de(M);return Y.path="/v4/"+Y.authority+".json",Y.params.push("secure"),this._makeAPIURL(Y,this._customAccessToken||O)},ne.prototype.normalizeSpriteURL=function(M,O,Y,ae){var he=de(M);return se(M)?(he.path="/styles/v1"+he.path+"/sprite"+O+Y,this._makeAPIURL(he,this._customAccessToken||ae)):(he.path+=""+O+Y,xe(he))},ne.prototype.normalizeTileURL=function(M,O){if(this._isSkuTokenExpired()&&this._createSkuToken(),M&&!se(M))return M;var Y=de(M),ae=N.devicePixelRatio>=2||O===512?"@2x":"",he=Q.supported?".webp":"$1";Y.path=Y.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+ae+he),Y.path=Y.path.replace(/^.+\/v4\//,"/"),Y.path="/v4"+Y.path;var ve=this._customAccessToken||function(Se){for(var Fe=0,Ke=Se;Fe<Ke.length;Fe+=1){var ct=Ke[Fe].match(/^access_token=(.*)$/);if(ct)return ct[1]}return null}(Y.params)||U.ACCESS_TOKEN;return U.REQUIRE_ACCESS_TOKEN&&ve&&this._skuToken&&Y.params.push("sku="+this._skuToken),this._makeAPIURL(Y,ve)},ne.prototype.canonicalizeTileURL=function(M,O){var Y=de(M);if(!Y.path.match(/(^\/v4\/)/)||!Y.path.match(/\.[\w]+$/))return M;var ae="mapbox://tiles/";ae+=Y.path.replace("/v4/","");var he=Y.params;return O&&(he=he.filter(function(ve){return!ve.match(/^access_token=/)})),he.length&&(ae+="?"+he.join("&")),ae},ne.prototype.canonicalizeTileset=function(M,O){for(var Y=!!O&&se(O),ae=[],he=0,ve=M.tiles||[];he<ve.length;he+=1){var Se=ve[he];pe(Se)?ae.push(this.canonicalizeTileURL(Se,Y)):ae.push(Se)}return ae},ne.prototype._makeAPIURL=function(M,O){var Y="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",ae=de(U.API_URL);if(M.protocol=ae.protocol,M.authority=ae.authority,ae.path!=="/"&&(M.path=""+ae.path+M.path),!U.REQUIRE_ACCESS_TOKEN)return xe(M);if(!(O=O||U.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+Y);if(O[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+Y);return M.params=M.params.filter(function(he){return he.indexOf("access_token")===-1}),M.params.push("access_token="+O),xe(M)};var oe=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function pe(M){return oe.test(M)}var ce=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function de(M){var O=M.match(ce);if(!O)throw new Error("Unable to parse URL object");return{protocol:O[1],authority:O[2],path:O[3]||"/",params:O[4]?O[4].split("&"):[]}}function xe(M){var O=M.params.length?"?"+M.params.join("&"):"";return M.protocol+"://"+M.authority+M.path+O}function we(M){if(!M)return null;var O,Y=M.split(".");if(!Y||Y.length!==3)return null;try{return JSON.parse((O=Y[1],decodeURIComponent(self.atob(O).split("").map(function(ae){return"%"+("00"+ae.charCodeAt(0).toString(16)).slice(-2)}).join(""))))}catch{return null}}var be=function(M){this.type=M,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};be.prototype.getStorageKey=function(M){var O,Y=we(U.ACCESS_TOKEN),ae="";return Y&&Y.u?(O=Y.u,ae=self.btoa(encodeURIComponent(O).replace(/%([0-9A-F]{2})/g,function(he,ve){return String.fromCharCode(+("0x"+ve))}
94))):ae=U.ACCESS_TOKEN||"",M?"mapbox.eventData."+M+":"+ae:"mapbox.eventData:"+ae},be.prototype.fetchEventData=function(){var M=H("localStorage"),O=this.getStorageKey(),Y=this.getStorageKey("uuid");if(M)try{var ae=self.localStorage.getItem(O);ae&&(this.eventData=JSON.parse(ae));var he=self.localStorage.getItem(Y);he&&(this.anonId=he)}catch{A("Unable to read from LocalStorage")}},be.prototype.saveEventData=function(){var M=H("localStorage"),O=this.getStorageKey(),Y=this.getStorageKey("uuid");if(M)try{self.localStorage.setItem(Y,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(O,JSON.stringify(this.eventData))}catch{A("Unable to write to LocalStorage")}},be.prototype.processRequests=function(M){},be.prototype.postEvent=function(M,O,Y,ae){var he=this;if(U.EVENTS_URL){var ve=de(U.EVENTS_URL);ve.params.push("access_token="+(ae||U.ACCESS_TOKEN||""));var Se={event:this.type,created:new Date(M).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.1",skuId:re,userId:this.anonId},Fe=O?s(Se,O):Se,Ke={url:xe(ve),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Fe])};this.pendingRequest=Vt(Ke,function(ct){he.pendingRequest=null,Y(ct),he.saveEventData(),he.processRequests(ae)})}},be.prototype.queueRequest=function(M,O){this.queue.push(M),this.processRequests(O)};var Ee,fe,me=function(M){function O(){M.call(this,"map.load"),this.success={},this.skuToken=""}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.postMapLoadEvent=function(Y,ae,he,ve){this.skuToken=he,(U.EVENTS_URL&&ve||U.ACCESS_TOKEN&&Array.isArray(Y)&&Y.some(function(Se){return se(Se)||pe(Se)}))&&this.queueRequest({id:ae,timestamp:Date.now()},ve)},O.prototype.processRequests=function(Y){var ae=this;if(!this.pendingRequest&&this.queue.length!==0){var he=this.queue.shift(),ve=he.id,Se=he.timestamp;ve&&this.success[ve]||(this.anonId||this.fetchEventData(),x(this.anonId)||(this.anonId=a()),this.postEvent(Se,{skuToken:this.skuToken},function(Fe){Fe||ve&&(ae.success[ve]=!0)},Y))}},O}(be),Te=new(function(M){function O(Y){M.call(this,"appUserTurnstile"),this._customAccessToken=Y}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.postTurnstileEvent=function(Y,ae){U.EVENTS_URL&&U.ACCESS_TOKEN&&Array.isArray(Y)&&Y.some(function(he){return se(he)||pe(he)})&&this.queueRequest(Date.now(),ae)},O.prototype.processRequests=function(Y){var ae=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var he=we(U.ACCESS_TOKEN),ve=he?he.u:U.ACCESS_TOKEN,Se=ve!==this.eventData.tokenU;x(this.anonId)||(this.anonId=a(),Se=!0);var Fe=this.queue.shift();if(this.eventData.lastSuccess){var Ke=new Date(this.eventData.lastSuccess),ct=new Date(Fe),gt=(Fe-this.eventData.lastSuccess)/864e5;Se=Se||gt>=1||gt<-1||Ke.getDate()!==ct.getDate()}else Se=!0;if(!Se)return this.processRequests();this.postEvent(Fe,{"enabled.telemetry":!1},function(Bt){Bt||(ae.eventData.lastSuccess=Fe,ae.eventData.tokenU=ve)},Y)}},O}(be)),_e=Te.postTurnstileEvent.bind(Te),Ae=new me,Pe=Ae.postMapLoadEvent.bind(Ae),De=500,Ve=50;function Qe(){self.caches&&!Ee&&(Ee=self.caches.open("mapbox-tiles"))}function Oe(M,O,Y){if(Qe(),Ee){var ae={status:O.status,statusText:O.statusText,headers:new self.Headers};O.headers.forEach(function(ve,Se){return ae.headers.set(Se,ve)});var he=E(O.headers.get("Cache-Control")||"");he["no-store"]||(he["max-age"]&&ae.headers.set("Expires",new Date(Y+1e3*he["max-age"]).toUTCString()),new Date(ae.headers.get("Expires")).getTime()-Y<42e4||function(ve,Se){if(fe===void 0)try{new Response(new ReadableStream),fe=!0}catch{fe=!1}fe?Se(ve.body):ve.blob().then(Se)}(O,function(ve){var Se=new self.Response(ve,ae);Qe(),Ee&&Ee.then(function(Fe){return Fe.put(Ue(M.url),Se)}).catch(function(Fe){return A(Fe.message)})}))}}function Ue(M){var O=M.indexOf("?");return O<0?M:M.slice(0,O)}function Ge(M,O){if(Qe(),!Ee)return O(null);var Y=Ue(M.url);Ee.then(function(ae){ae.match(Y).then(function(he){var ve=function(Se){if(!Se)return!1;var Fe=new Date(Se.headers.get("Expires")||0),Ke=E(Se.headers.get("Cache-Control")||"");return Fe>
94Date.now()&&!Ke["no-cache"]}(he);ae.delete(Y),ve&&ae.put(Y,he.clone()),O(null,he,ve)}).catch(O)}).catch(O)}var Ye,tt=1/0;function lt(){return Ye==null&&(Ye=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Ye}var vt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(vt);var It=function(M){function O(Y,ae,he){ae===401&&pe(he)&&(Y+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),M.call(this,Y),this.status=ae,this.url=he,this.name=this.constructor.name,this.message=Y}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},O}(Error),St=S()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href};function rt(M,O){var Y,ae=new self.AbortController,he=new self.Request(M.url,{method:M.method||"GET",body:M.body,credentials:M.credentials,headers:M.headers,referrer:St(),signal:ae.signal}),ve=!1,Se=!1,Fe=(Y=he.url).indexOf("sku=")>0&&pe(Y);M.type==="json"&&he.headers.set("Accept","application/json");var Ke=function(gt,Bt,Zt){if(!Se){if(gt&&gt.message!=="SecurityError"&&A(gt),Bt&&Zt)return ct(Bt);var qt=Date.now();self.fetch(he).then(function(rr){if(rr.ok){var gr=Fe?rr.clone():null;return ct(rr,gr,qt)}return O(new It(rr.statusText,rr.status,M.url))}).catch(function(rr){rr.code!==20&&O(new Error(rr.message))})}},ct=function(gt,Bt,Zt){(M.type==="arrayBuffer"?gt.arrayBuffer():M.type==="json"?gt.json():gt.text()).then(function(qt){Se||(Bt&&Zt&&Oe(he,Bt,Zt),ve=!0,O(null,qt,gt.headers.get("Cache-Control"),gt.headers.get("Expires")))}).catch(function(qt){Se||O(new Error(qt.message))})};return Fe?Ge(he,Ke):Ke(null,null),{cancel:function(){Se=!0,ve||ae.abort()}}}var et=function(M,O){if(Y=M.url,!(/^file:/.test(Y)||/^file:/.test(St())&&!/^\w+:/.test(Y))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return rt(M,O);if(S()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",M,O,void 0,!0)}var Y;return function(ae,he){var ve=new self.XMLHttpRequest;for(var Se in ve.open(ae.method||"GET",ae.url,!0),ae.type==="arrayBuffer"&&(ve.responseType="arraybuffer"),ae.headers)ve.setRequestHeader(Se,ae.headers[Se]);return ae.type==="json"&&(ve.responseType="text",ve.setRequestHeader("Accept","application/json")),ve.withCredentials=ae.credentials==="include",ve.onerror=function(){he(new Error(ve.statusText))},ve.onload=function(){if((ve.status>=200&&ve.status<300||ve.status===0)&&ve.response!==null){var Fe=ve.response;if(ae.type==="json")try{Fe=JSON.parse(ve.response)}catch(Ke){return he(Ke)}he(null,Fe,ve.getResponseHeader("Cache-Control"),ve.getResponseHeader("Expires"))}else he(new It(ve.statusText,ve.status,ae.url))},ve.send(ae.body),{cancel:function(){return ve.abort()}}}(M,O)},Tt=function(M,O){return et(s(M,{type:"arrayBuffer"}),O)},Vt=function(M,O){return et(s(M,{method:"POST"}),O)},Kt,Be;Kt=[],Be=0;var qe=function(M,O){if(Q.supported&&(M.headers||(M.headers={}),M.headers.accept="image/webp,*/*"),Be>=U.MAX_PARALLEL_IMAGE_REQUESTS){var Y={requestParameters:M,callback:O,cancelled:!1,cancel:function(){this.cancelled=!0}};return Kt.push(Y),Y}Be++;var ae=!1,he=function(){if(!ae)for(ae=!0,Be--;Kt.length&&Be<U.MAX_PARALLEL_IMAGE_REQUESTS;){var Se=Kt.shift(),Fe=Se.requestParameters,Ke=Se.callback;Se.cancelled||(Se.cancel=qe(Fe,Ke).cancel)}},ve=Tt(M,function(Se,Fe,Ke,ct){he(),Se?O(Se):Fe&&(lt()?function(gt,Bt){var Zt=new self.Blob([new Uint8Array(gt)],{type:"image/png"});self.createImageBitmap(Zt).then(function(qt){Bt(null,qt)}).catch(function(qt){Bt(new Error("Could not load image because of "+qt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}(Fe,O):function(gt,Bt,Zt,qt){var rr=new self.Image,gr=self.URL;rr.onload=function(){Bt(null,rr),gr.revokeObjectURL(rr.src)},rr.onerror=function(){return Bt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Er=new self.Blob([new Uint8Array(gt)],{type:"image/png"});rr.cacheControl=Zt,rr.expires=qt,rr.src=gt.byteLength?gr.createObjectURL(Er):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(Fe,O,Ke,ct))});return{cancel:function(){ve.cancel(),he()}}};function Re(M,O,Y){Y[M]&&Y[M].indexOf(O)!==-1||(Y[M]=Y[M]||[],Y[M].push(O))}function Xe(M,O,Y){if(Y&&Y[M]){var ae=Y[M].indexOf(O);ae!==-1&&Y[M].splice(ae,1)}}var ke=function(M,O){O===void 0&&(O={}),s(this,O),this.type=M},Le=function(M){function O(Y,ae){ae===void 0&&(ae={}),M.call(this,"error",s({error:Y},ae))}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O}(ke),Ie=function(){};Ie.prototype.on=function(M,O){return this._listeners=this._listeners||{},Re(M,O,this._listeners),this},Ie.prototype.off=function(M,O){return Xe(M,O,this._listeners),Xe(M,O,this._oneTimeListeners),this},Ie.prototype.once=function(M,O){return this._oneTimeListeners=this._oneTimeListeners||{},Re(M,O,this._oneTimeListeners),this}
vendor: 3,212 bytes, line 94
94,Ie.prototype.fire=function(M,O){typeof M=="string"&&(M=new ke(M,O||{}));var Y=M.type;if(this.listens(Y)){M.target=this;for(var ae=0,he=this._listeners&&this._listeners[Y]?this._listeners[Y].slice():[];ae<he.length;ae+=1)he[ae].call(this,M);for(var ve=0,Se=this._oneTimeListeners&&this._oneTimeListeners[Y]?this._oneTimeListeners[Y].slice():[];ve<Se.length;ve+=1){var Fe=Se[ve];Xe(Y,Fe,this._oneTimeListeners),Fe.call(this,M)}var Ke=this._eventedParent;Ke&&(s(M,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ke.fire(M))}else M instanceof Le&&console.error(M.error);return this},Ie.prototype.listens=function(M){return this._listeners&&this._listeners[M]&&this._listeners[M].length>0||this._oneTimeListeners&&this._oneTimeListeners[M]&&this._oneTimeListeners[M].length>0||this._eventedParent&&this._eventedParent.listens(M)},Ie.prototype.setEventedParent=function(M,O){return this._eventedParent=M,this._eventedParentData=O,this};var Ce={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom
vendor: 11,740 bytes, line 94
94:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},
vendor: 2,738 bytes, line 94
94expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0
vendor: 14,078 bytes, line 94
94}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}}
vendor: 1,434 bytes, line 94
94,Je=function(M,O,Y,ae){this.message=(M?M+": ":"")+Y,ae&&(this.identifier=ae),O!=null&&O.__line__&&(this.line=O.__line__)};function it(M){var O=M.key,Y=M.value;return Y?[new Je(O,Y,"constants have been deprecated as of v8")]:[]}function ht(M){for(var O=[],Y=arguments.length-1;Y-- >0;)O[Y]=arguments[Y+1];for(var ae=0,he=O;ae<he.length;ae+=1){var ve=he[ae];for(var Se in ve)M[Se]=ve[Se]}return M}function ut(M){return M instanceof Number||M instanceof String||M instanceof Boolean?M.valueOf():M}function kt(M){if(Array.isArray(M))return M.map(kt);if(M instanceof Object&&!(M instanceof Number||M instanceof String||M instanceof Boolean)){var O={};for(var Y in M)O[Y]=kt(M[Y]);return O}return ut(M)}var ot=function(M){function O(Y,ae){M.call(this,ae),this.message=ae,this.key=Y}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O}(Error),Lt=function(M,O){O===void 0&&(O=[]),this.parent=M,this.bindings={};for(var Y=0,ae=O;Y<ae.length;Y+=1){var he=ae[Y],ve=he[0],Se=he[1];this.bindings[ve]=Se}};Lt.prototype.concat=function(M){return new Lt(this,M)},Lt.prototype.get=function(M){if(this.bindings[M])return this.bindings[M];if(this.parent)return this.parent.get(M);throw new Error(M+" not found in scope.")},Lt.prototype.has=function(M){return!!this.bindings[M]||!!this.parent&&this.parent.has(M)};var Et={kind:"null"},Ze={kind:"number"},pt={kind:"string"},Ct={kind:"boolean"},zt={kind:"color"}
94,Gt={kind:"object"},ze={kind:"value"},st={kind:"collator"},yt={kind:"formatted"},Dt={kind:"resolvedImage"};function jt(M,O){return{kind:"array",itemType:M,N:O}}function or(M){if(M.kind==="array"){var O=or(M.itemType);return typeof M.N=="number"?"array<"+O+", "+M.N+">":M.itemType.kind==="value"?"array":"array<"+O+">"}return M.kind}var Ut=[Et,Ze,pt,Ct,zt,yt,Gt,jt(ze),Dt];function Xt(M,O){if(O.kind==="error")return null;if(M.kind==="array"){if(O.kind==="array"&&(O.N===0&&O.itemType.kind==="value"||!Xt(M.itemType,O.itemType))&&(typeof M.N!="number"||M.N===O.N))return null}else{if(M.kind===O.kind)return null;if(M.kind==="value"){for(var Y=0,ae=Ut;Y<ae.length;Y+=1)if(!Xt(ae[Y],O))return null}}return"Expected "+or(M)+" but found "+or(O)+" instead."}function sr(M,O){return O.some(function(Y){return Y.kind===M.kind})}function vr(M,O){return O.some(function(Y){return Y==="null"?M===null:Y==="array"?Array.isArray(M):Y==="object"?M&&!Array.isArray(M)&&typeof M=="object":Y===typeof M})}var pr=n(function(M,O){var Y={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};
94function ae(Ke){return(Ke=Math.round(Ke))<0?0:Ke>255?255:Ke}function he(Ke){return Ke<0?0:Ke>1?1:Ke}function ve(Ke){return Ke[Ke.length-1]==="%"?ae(parseFloat(Ke)/100*255):ae(parseInt(Ke))}function Se(Ke){return Ke[Ke.length-1]==="%"?he(parseFloat(Ke)/100):he(parseFloat(Ke))}function Fe(Ke,ct,gt){return gt<0?gt+=1:gt>1&&(gt-=1),6*gt<1?Ke+(ct-Ke)*gt*6:2*gt<1?ct:3*gt<2?Ke+(ct-Ke)*(2/3-gt)*6:Ke}try{O.parseCSSColor=function(Ke){var ct,gt=Ke.replace(/ /g,"").toLowerCase();if(gt in Y)return Y[gt].slice();if(gt[0]==="#")return gt.length===4?(ct=parseInt(gt.substr(1),16))>=0&&ct<=4095?[(3840&ct)>>4|(3840&ct)>>8,240&ct|(240&ct)>>4,15&ct|(15&ct)<<4,1]:null:gt.length===7&&(ct=parseInt(gt.substr(1),16))>=0&&ct<=16777215?[(16711680&ct)>>16,(65280&ct)>>8,255&ct,1]:null;var Bt=gt.indexOf("("),Zt=gt.indexOf(")");if(Bt!==-1&&Zt+1===gt.length){var qt=gt.substr(0,Bt),rr=gt.substr(Bt+1,Zt-(Bt+1)).split(","),gr=1;switch(qt){case"rgba":if(rr.length!==4)return null;gr=Se(rr.pop());case"rgb":return rr.length!==3?null:[ve(rr[0]),ve(rr[1]),ve(rr[2]),gr];case"hsla":if(rr.length!==4)return null;gr=Se(rr.pop());case"hsl":if(rr.length!==3)return null;var Er=(parseFloat(rr[0])%360+360)%360/360,Sr=Se(rr[1]),Rr=Se(rr[2]),Br=Rr<=.5?Rr*(Sr+1):Rr+Sr-Rr*Sr,Hr=2*Rr-Br;return[ae(255*Fe(Hr,Br,Er+1/3)),ae(255*Fe(Hr,Br,Er)),ae(255*Fe(Hr,Br,Er-1/3)),gr];default:return null}}return null}}catch{}}).parseCSSColor,ar=function(M,O,Y,ae){ae===void 0&&(ae=1),this.r=M,this.g=O,this.b=Y,this.a=ae};ar.parse=function(M){if(M){if(M instanceof ar)return M;if(typeof M=="string"){var O=pr(M);if(O)return new ar(O[0]/255*O[3],O[1]/255*O[3],O[2]/255*O[3],O[3])}}},ar.prototype.toString=function(){var M=this.toArray(),O=M[0],Y=M[1],ae=M[2],he=M[3];return"rgba("+Math.round(O)+","+Math.round(Y)+","+Math.round(ae)+","+he+")"},ar.prototype.toArray=function(){var M=this.r,O=this.g,Y=this.b,ae=this.a;return ae===0?[0,0,0,0]:[255*M/ae,255*O/ae,255*Y/ae,ae]},ar.black=new ar(0,0,0,1),ar.white=new ar(1,1,1,1),ar.transparent=new ar(0,0,0,0),ar.red=new ar(1,0,0,1);var lr=function(M,O,Y){this.sensitivity=M?O?"variant":"case":O?"accent":"base",this.locale=Y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};lr.prototype.compare=function(M,O){return this.collator.compare(M,O)},lr.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var hr=function(M,O,Y,ae,he){this.text=M,this.image=O,this.scale=Y,this.fontStack=ae,this.textColor=he},Or=function(M){this.sections=M};Or.fromString=function(M){return new Or([new hr(M,null,null,null,null)])},Or.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(M){return M.text.length!==0||M.image&&M.image.name.length!==0})},Or.factory=function(M){return M instanceof Or?M:Or.fromString(M)},Or.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(M){return M.text}).join("")},Or.prototype.serialize=function(){for(var M=["format"],O=0,Y=this.sections;O<Y.length;O+=1){var ae=Y[O];if(ae.image)M.push(["image",ae.image.name]);else{M.push(ae.text);var he={};ae.fontStack&&(he["text-font"]=["literal",ae.fontStack.split(",")]),ae.scale&&(he["font-scale"]=ae.scale),ae.textColor&&(he["text-color"]=["rgba"].concat(ae.textColor.toArray())),M.push(he)}}return M};var dr=function(M){this.name=M.name,this.available=M.available};function Fr(M,O,Y,ae){return typeof M=="number"&&M>=0&&M<=255&&typeof O=="number"&&O>=0&&O<=255&&typeof Y=="number"&&Y>=0&&Y<=255?ae===void 0||typeof ae=="number"&&ae>=0&&ae<=1?null:"Invalid rgba value ["+[M,O,Y,ae].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof ae=="number"?[M,O,Y,ae]:[M,O,Y]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function tn(M){if(M===null||typeof M=="string"||typeof M=="boolean"||typeof M=="number"||M instanceof ar||M instanceof lr||M instanceof Or||M instanceof dr)return!0;if(Array.isArray(M)){for(var O=0,Y=M;O<Y.length;O+=1)if(!tn(Y[O]))return!1;return!0}if(typeof M=="object"){for(var ae in M)if(!tn(M[ae]))return!1;return!0}return!1}function rn(M){if(M===null)return Et;
vendor: 5,903 bytes, line 94
94if(typeof M=="string")return pt;if(typeof M=="boolean")return Ct;if(typeof M=="number")return Ze;if(M instanceof ar)return zt;if(M instanceof lr)return st;if(M instanceof Or)return yt;if(M instanceof dr)return Dt;if(Array.isArray(M)){for(var O,Y=M.length,ae=0,he=M;ae<he.length;ae+=1){var ve=rn(he[ae]);if(O){if(O===ve)continue;O=ze;break}O=ve}return jt(O||ze,Y)}return Gt}function An(M){var O=typeof M;return M===null?"":O==="string"||O==="number"||O==="boolean"?String(M):M instanceof ar||M instanceof Or||M instanceof dr?M.toString():JSON.stringify(M)}dr.prototype.toString=function(){return this.name},dr.fromString=function(M){return M?new dr({name:M,available:!1}):null},dr.prototype.serialize=function(){return["image",this.name]};var Ln=function(M,O){this.type=M,this.value=O};Ln.parse=function(M,O){if(M.length!==2)return O.error("'literal' expression requires exactly one argument, but found "+(M.length-1)+" instead.");if(!tn(M[1]))return O.error("invalid value");var Y=M[1],ae=rn(Y),he=O.expectedType;return ae.kind!=="array"||ae.N!==0||!he||he.kind!=="array"||typeof he.N=="number"&&he.N!==0||(ae=he),new Ln(ae,Y)},Ln.prototype.evaluate=function(){return this.value},Ln.prototype.eachChild=function(){},Ln.prototype.outputDefined=function(){return!0},Ln.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof ar?["rgba"].concat(this.value.toArray()):this.value instanceof Or?this.value.serialize():this.value};var _n=function(M){this.name="ExpressionEvaluationError",this.message=M};_n.prototype.toJSON=function(){return this.message};var Vr={string:pt,number:Ze,boolean:Ct,object:Gt},Ir=function(M,O){this.type=M,this.args=O};Ir.parse=function(M,O){if(M.length<2)return O.error("Expected at least one argument.");var Y,ae=1,he=M[0];if(he==="array"){var ve,Se;if(M.length>2){var Fe=M[1];if(typeof Fe!="string"||!(Fe in Vr)||Fe==="object")return O.error('The item type argument of "array" must be one of string, number, boolean',1);ve=Vr[Fe],ae++}else ve=ze;if(M.length>3){if(M[2]!==null&&(typeof M[2]!="number"||M[2]<0||M[2]!==Math.floor(M[2])))return O.error('The length argument to "array" must be a positive integer literal',2);Se=M[2],ae++}Y=jt(ve,Se)}else Y=Vr[he];for(var Ke=[];ae<M.length;ae++){var ct=O.parse(M[ae],ae,ze);if(!ct)return null;Ke.push(ct)}return new Ir(Y,Ke)},Ir.prototype.evaluate=function(M){for(var O=0;O<this.args.length;O++){var Y=this.args[O].evaluate(M);if(!Xt(this.type,rn(Y)))return Y;if(O===this.args.length-1)throw new _n("Expected value to be of type "+or(this.type)+", but found "+or(rn(Y))+" instead.")}return null},Ir.prototype.eachChild=function(M){this.args.forEach(M)},Ir.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},Ir.prototype.serialize=function(){var M=this.type,O=[M.kind];if(M.kind==="array"){var Y=M.itemType;if(Y.kind==="string"||Y.kind==="number"||Y.kind==="boolean"){O.push(Y.kind);var ae=M.N;(typeof ae=="number"||this.args.length>1)&&O.push(ae)}}return O.concat(this.args.map(function(he){return he.serialize()}))};var xr=function(M){this.type=yt,this.sections=M};xr.parse=function(M,O){if(M.length<2)return O.error("Expected at least one argument.");var Y=M[1];if(!Array.isArray(Y)&&typeof Y=="object")return O.error("First argument must be an image or text section.");for(var ae=[],he=!1,ve=1;ve<=M.length-1;++ve){var Se=M[ve];if(he&&typeof Se=="object"&&!Array.isArray(Se)){he=!1;var Fe=null;if(Se["font-scale"]&&!(Fe=O.parse(Se["font-scale"],1,Ze)))return null;var Ke=null;if(Se["text-font"]&&!(Ke=O.parse(Se["text-font"],1,jt(pt))))return null;var ct=null;if(Se["text-color"]&&!(ct=O.parse(Se["text-color"],1,zt)))return null;var gt=ae[ae.length-1];gt.scale=Fe,gt.font=Ke,gt.textColor=ct}else{var Bt=O.parse(M[ve],1,ze);if(!Bt)return null;var Zt=Bt.type.kind;if(Zt!=="string"&&Zt!=="value"&&Zt!=="null"&&Zt!=="resolvedImage")return O.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");he=!0,ae.push({content:Bt,scale:null,font:null,textColor:null})}}return new xr(ae)},xr.prototype.evaluate=function(M){return new Or(this.sections.map(function(O){var Y=O.content.evaluate(M);return rn(Y)===Dt?new hr("",Y,null,null,null):new hr(An(Y),null,O.scale?O.scale.evaluate(M):null,O.font?O.font.evaluate(M).join(","):null,O.textColor?O.textColor.evaluate(M):null)}))},xr.prototype.eachChild=function(M){for(var O=0,Y=this.sections;O<Y.length;O+=1){var ae=Y[O];M(ae.content),ae.scale&&M(ae.scale),ae.font&&M(ae.font),ae.textColor&&M(ae.textColor)}},xr.prototype.outputDefined=function(){return!1},xr.prototype.serialize=function(){for(var M=["format"],O=0,Y=this.sections;O<Y.length;O+=1){var ae=Y[O];M.push(ae.content.serialize());var he={};ae.scale&&(he["font-scale"]=ae.scale.serialize()),ae.font&&(he["text-font"]=ae.font.serialize()),ae.textColor&&(he["text-color"]=ae.textColor.serialize()),M.push(he)}return M};var Nr=function(M){this.type=Dt,this.input=M};Nr.parse=function(M,O){if(M.length!==2)return O.error("Expected two arguments.");var Y=O.parse(M[1],1,pt);return Y?new Nr(Y):O.error("No image name provided.")},Nr.prototype.evaluate=function(M){var O=this.input.evaluate(M),Y=dr.fromString(O);return Y&&M.availableImages&&(Y.available=M.availableImages.indexOf(O)>-1),Y},Nr.prototype.eachChild=function(M){M(this.input)},Nr.prototype.outputDefined=function(){return!1},Nr.prototype.serialize=function(){return["image",this.input.serialize()]};var en={"to-boolean":Ct,"to-color":zt,"to-number":Ze,"to-string":pt},Qr=function(M,O){this.type=M,this.args=O};Qr.parse=function(M,O){if(M.length<2)return O.error("Expected at least one argument.");var Y=M[0];if((Y==="to-boolean"||Y==="to-string")&&M.length!==2)return O.error("Expected one argument.");for(var ae=en[Y],he=[],ve=1;ve<M.length;ve++){var Se=O.parse(M[ve],ve,ze);if(!Se)return null;he.push(Se)}return new Qr(ae,he)}
94,Qr.prototype.evaluate=function(M){if(this.type.kind==="boolean")return!!this.args[0].evaluate(M);if(this.type.kind==="color"){for(var O,Y,ae=0,he=this.args;ae<he.length;ae+=1){if(Y=null,(O=he[ae].evaluate(M))instanceof ar)return O;if(typeof O=="string"){var ve=M.parseColor(O);if(ve)return ve}else if(Array.isArray(O)&&!(Y=O.length<3||O.length>4?"Invalid rbga value "+JSON.stringify(O)+": expected an array containing either three or four numeric values.":Fr(O[0],O[1],O[2],O[3])))return new ar(O[0]/255,O[1]/255,O[2]/255,O[3])}throw new _n(Y||"Could not parse color from value '"+(typeof O=="string"?O:String(JSON.stringify(O)))+"'")}if(this.type.kind==="number"){for(var Se=null,Fe=0,Ke=this.args;Fe<Ke.length;Fe+=1){if((Se=Ke[Fe].evaluate(M))===null)return 0;var ct=Number(Se);if(!isNaN(ct))return ct}throw new _n("Could not convert "+JSON.stringify(Se)+" to number.")}return this.type.kind==="formatted"?Or.fromString(An(this.args[0].evaluate(M))):this.type.kind==="resolvedImage"?dr.fromString(An(this.args[0].evaluate(M))):An(this.args[0].evaluate(M))},Qr.prototype.eachChild=function(M){this.args.forEach(M)},Qr.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},Qr.prototype.serialize=function(){if(this.type.kind==="formatted")return new xr([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Nr(this.args[0]).serialize();var M=["to-"+this.type.kind];return this.eachChild(function(O){M.push(O.serialize())}),M};var yn=["Unknown","Point","LineString","Polygon"],un=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};un.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},un.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?yn[this.feature.type]:this.feature.type:null},un.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},un.prototype.canonicalID=function(){return this.canonical},un.prototype.properties=function(){return this.feature&&this.feature.properties||{}},un.prototype.parseColor=function(M){var O=this._parseColorCache[M];return O||(O=this._parseColorCache[M]=ar.parse(M)),O};var $r=function(M,O,Y,ae){this.name=M,this.type=O,this._evaluate=Y,this.args=ae};$r.prototype.evaluate=function(M){return this._evaluate(M,this.args)},$r.prototype.eachChild=function(M){this.args.forEach(M)},$r.prototype.outputDefined=function(){return!1},$r.prototype.serialize=function(){return[this.name].concat(this.args.map(function(M){return M.serialize()}))}
94,$r.parse=function(M,O){var Y,ae=M[0],he=$r.definitions[ae];if(!he)return O.error('Unknown expression "'+ae+'". If you wanted a literal array, use ["literal", [...]].',0);for(var ve=Array.isArray(he)?he[0]:he.type,Se=Array.isArray(he)?[[he[1],he[2]]]:he.overloads,Fe=Se.filter(function(ra){var Wn=ra[0];return!Array.isArray(Wn)||Wn.length===M.length-1}),Ke=null,ct=0,gt=Fe;ct<gt.length;ct+=1){var Bt=gt[ct],Zt=Bt[0],qt=Bt[1];Ke=new pn(O.registry,O.path,null,O.scope);for(var rr=[],gr=!1,Er=1;Er<M.length;Er++){var Sr=M[Er],Rr=Array.isArray(Zt)?Zt[Er-1]:Zt.type,Br=Ke.parse(Sr,1+rr.length,Rr);if(!Br){gr=!0;break}rr.push(Br)}if(!gr)if(Array.isArray(Zt)&&Zt.length!==rr.length)Ke.error("Expected "+Zt.length+" arguments, but found "+rr.length+" instead.");else{for(var Hr=0;Hr<rr.length;Hr++){var fn=Array.isArray(Zt)?Zt[Hr]:Zt.type,xn=rr[Hr];Ke.concat(Hr+1).checkSubtype(fn,xn.type)}if(Ke.errors.length===0)return new $r(ae,ve,qt,rr)}}if(Fe.length===1)(Y=O.errors).push.apply(Y,Ke.errors);else{for(var Fn=(Fe.length?Fe:Se).map(function(ra){var Wn,ca=ra[0];return Wn=ca,Array.isArray(Wn)?"("+Wn.map(or).join(", ")+")":"("+or(Wn.type)+"...)"}).join(" | "),Rn=[],Hn=1;Hn<M.length;Hn++){var ta=O.parse(M[Hn],1+Rn.length);if(!ta)return null;Rn.push(or(ta.type))}O.error("Expected arguments of type "+Fn+", but found ("+Rn.join(", ")+") instead.")}return null},$r.register=function(M,O){for(var Y in $r.definitions=O,O)M[Y]=$r};var In=function(M,O,Y){this.type=st,this.locale=Y,this.caseSensitive=M,this.diacriticSensitive=O};In.parse=function(M,O){if(M.length!==2)return O.error("Expected one argument.");var Y=M[1];if(typeof Y!="object"||Array.isArray(Y))return O.error("Collator options argument must be an object.");var ae=O.parse(Y["case-sensitive"]!==void 0&&Y["case-sensitive"],1,Ct);if(!ae)return null;var he=O.parse(Y["diacritic-sensitive"]!==void 0&&Y["diacritic-sensitive"],1,Ct);if(!he)return null;var ve=null;return Y.locale&&!(ve=O.parse(Y.locale,1,pt))?null:new In(ae,he,ve)},In.prototype.evaluate=function(M){return new lr(this.caseSensitive.evaluate(M),this.diacriticSensitive.evaluate(M),this.locale?this.locale.evaluate(M):null)},In.prototype.eachChild=function(M){M(this.caseSensitive),M(this.diacriticSensitive),this.locale&&M(this.locale)},In.prototype.outputDefined=function(){return!1},In.prototype.serialize=function(){var M={};return M["case-sensitive"]=this.caseSensitive.serialize(),M["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(M.locale=this.locale.serialize()),["collator",M]};function Qt(M,O){M[0]=Math.min(M[0],O[0]),M[1]=Math.min(M[1],O[1]),M[2]=Math.max(M[2],O[0]),M[3]=Math.max(M[3],O[1])}function Pt(M,O){return!(M[0]<=O[0])&&!(M[2]>=O[2])&&!(M[1]<=O[1])&&!(M[3]>=O[3])}function Yt(M,O){var Y,ae=(180+M[0])/360,he=(Y=M[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+Y*Math.PI/360)))/360),ve=Math.pow(2,O.z);return[Math.round(ae*ve*8192),Math.round(he*ve*8192)]}function cr(M,O,Y){return O[1]>M[1]!=Y[1]>M[1]&&M[0]<(Y[0]-O[0])*(M[1]-O[1])/(Y[1]-O[1])+O[0]}function wr(M,O){for(var Y,ae,he,ve,Se,Fe,Ke,ct=!1,gt=0,Bt=O.length;gt<Bt;gt++)for(var Zt=O[gt],qt=0,rr=Zt.length;qt<rr-1;qt++){if(Y=M,ae=Zt[qt],he=Zt[qt+1],ve=void 0,Se=void 0,Fe=void 0,Ke=void 0,ve=Y[0]-ae[0],Se=Y[1]-ae[1],Fe=Y[0]-he[0],Ke=Y[1]-he[1],ve*Ke-Fe*Se==0&&ve*Fe<=0&&Se*Ke<=0)return!1;cr(M,Zt[qt],Zt[qt+1])&&(ct=!ct)}return ct}function qr(M,O){for(var Y=0;Y<O.length;Y++)if(wr(M,O[Y]))return!0;return!1}function Ur(M,O,Y,ae){var he=M[0]-Y[0],ve=M[1]-Y[1],Se=O[0]-Y[0],Fe=O[1]-Y[1],Ke=ae[0]-Y[0],ct=ae[1]-Y[1],gt=he*ct-Ke*ve,Bt=Se*ct-Ke*Fe;return gt>0&&Bt<0||gt<0&&Bt>0}function br(M,O,Y){for(var ae=0,he=Y;ae<he.length;ae+=1)for(var ve=he[ae],Se=0;Se<ve.length-1;++Se)if(Fe=M,Ke=O,ct=ve[Se],gt=ve[Se+1],Bt=void 0,Zt=void 0,qt=void 0,rr=void 0,qt=[Ke[0]-Fe[0],Ke[1]-Fe[1]],rr=[gt[0]-ct[0],gt[1]-ct[1]],(Bt=rr)[0]*(Zt=qt)[1]-Bt[1]*Zt[0]!=0&&Ur(Fe,Ke,ct,gt)&&Ur(ct,gt,Fe,Ke))return!0;var Fe,Ke,ct,gt,Bt,Zt,qt,rr;return!1}function _r(M,O){for(var Y=0;Y<M.length;++Y)if(!wr(M[Y],O))return!1;for(var ae=0;ae<M.length-1;++ae)if(br(M[ae],M[ae+1],O))return!1;return!0}function Ar(M,O){for(var Y=0;Y<O.length;Y++)if(_r(M,O[Y]))return!0;return!1}function Mr(M,O,Y){for(var ae=[],he=0;he<M.length;he++){for(var ve=[],Se=0;Se<M[he].length;Se++){var Fe=Yt(M[he][Se],Y);Qt(O,Fe),ve.push(Fe)}ae.push(ve)}return ae}function Cr(M,O,Y){for(var ae=[],he=0;he<M.length;he++){var ve=Mr(M[he],O,Y);ae.push(ve)}return ae}function Gr(M,O,Y,ae){if(M[0]<Y[0]||M[0]>Y[2]){var he=.5*ae,ve=M[0]-Y[0]>he?-ae:Y[0]-M[0]>he?ae:0;
94ve===0&&(ve=M[0]-Y[2]>he?-ae:Y[2]-M[0]>he?ae:0),M[0]+=ve}Qt(O,M)}function cn(M,O,Y,ae){for(var he=8192*Math.pow(2,ae.z),ve=[8192*ae.x,8192*ae.y],Se=[],Fe=0,Ke=M;Fe<Ke.length;Fe+=1)for(var ct=0,gt=Ke[Fe];ct<gt.length;ct+=1){var Bt=gt[ct],Zt=[Bt.x+ve[0],Bt.y+ve[1]];Gr(Zt,O,Y,he),Se.push(Zt)}return Se}function wn(M,O,Y,ae){for(var he,ve=8192*Math.pow(2,ae.z),Se=[8192*ae.x,8192*ae.y],Fe=[],Ke=0,ct=M;Ke<ct.length;Ke+=1){for(var gt=[],Bt=0,Zt=ct[Ke];Bt<Zt.length;Bt+=1){var qt=Zt[Bt],rr=[qt.x+Se[0],qt.y+Se[1]];Qt(O,rr),gt.push(rr)}Fe.push(gt)}if(O[2]-O[0]<=ve/2){(he=O)[0]=he[1]=1/0,he[2]=he[3]=-1/0;for(var gr=0,Er=Fe;gr<Er.length;gr+=1)for(var Sr=0,Rr=Er[gr];Sr<Rr.length;Sr+=1)Gr(Rr[Sr],O,Y,ve)}return Fe}var Kr=function(M,O){this.type=Ct,this.geojson=M,this.geometries=O};function bn(M){if(M instanceof $r&&(M.name==="get"&&M.args.length===1||M.name==="feature-state"||M.name==="has"&&M.args.length===1||M.name==="properties"||M.name==="geometry-type"||M.name==="id"||/^filter-/.test(M.name))||M instanceof Kr)return!1;var O=!0;return M.eachChild(function(Y){O&&!bn(Y)&&(O=!1)}),O}function zr(M){if(M instanceof $r&&M.name==="feature-state")return!1;var O=!0;return M.eachChild(function(Y){O&&!zr(Y)&&(O=!1)}),O}function Wr(M,O){if(M instanceof $r&&O.indexOf(M.name)>=0)return!1;var Y=!0;return M.eachChild(function(ae){Y&&!Wr(ae,O)&&(Y=!1)}),Y}Kr.parse=function(M,O){if(M.length!==2)return O.error("'within' expression requires exactly one argument, but found "+(M.length-1)+" instead.");if(tn(M[1])){var Y=M[1];if(Y.type==="FeatureCollection")for(var ae=0;ae<Y.features.length;++ae){var he=Y.features[ae].geometry.type;if(he==="Polygon"||he==="MultiPolygon")return new Kr(Y,Y.features[ae].geometry)}else if(Y.type==="Feature"){var ve=Y.geometry.type;if(ve==="Polygon"||ve==="MultiPolygon")return new Kr(Y,Y.geometry)}else if(Y.type==="Polygon"||Y.type==="MultiPolygon")return new Kr(Y,Y)}return O.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Kr.prototype.evaluate=function(M){if(M.geometry()!=null&&M.canonicalID()!=null){if(M.geometryType()==="Point")return function(O,Y){var ae=[1/0,1/0,-1/0,-1/0],he=[1/0,1/0,-1/0,-1/0],ve=O.canonicalID();if(Y.type==="Polygon"){var Se=Mr(Y.coordinates,he,ve),Fe=cn(O.geometry(),ae,he,ve);if(!Pt(ae,he))return!1;for(var Ke=0,ct=Fe;Ke<ct.length;Ke+=1)if(!wr(ct[Ke],Se))return!1}if(Y.type==="MultiPolygon"){var gt=Cr(Y.coordinates,he,ve),Bt=cn(O.geometry(),ae,he,ve);if(!Pt(ae,he))return!1;for(var Zt=0,qt=Bt;Zt<qt.length;Zt+=1)if(!qr(qt[Zt],gt))return!1}return!0}(M,this.geometries);if(M.geometryType()==="LineString")return function(O,Y){var ae=[1/0,1/0,-1/0,-1/0],he=[1/0,1/0,-1/0,-1/0],ve=O.canonicalID();if(Y.type==="Polygon"){var Se=Mr(Y.coordinates,he,ve),Fe=wn(O.geometry(),ae,he,ve);if(!Pt(ae,he))return!1;for(var Ke=0,ct=Fe;Ke<ct.length;Ke+=1)if(!_r(ct[Ke],Se))return!1}if(Y.type==="MultiPolygon"){var gt=Cr(Y.coordinates,he,ve),Bt=wn(O.geometry(),ae,he,ve);if(!Pt(ae,he))return!1;for(var Zt=0,qt=Bt;Zt<qt.length;Zt+=1)if(!Ar(qt[Zt],gt))return!1}return!0}(M,this.geometries)}return!1},Kr.prototype.eachChild=function(){},Kr.prototype.outputDefined=function(){return!0},Kr.prototype.serialize=function(){return["within",this.geojson]};var mn=function(M,O){this.type=O.type,this.name=M,this.boundExpression=O};mn.parse=function(M,O){if(M.length!==2||typeof M[1]!="string")return O.error("'var' expression requires exactly one string literal argument.");var Y=M[1];return O.scope.has(Y)?new mn(Y,O.scope.get(Y)):O.error('Unknown variable "'+Y+'". Make sure "'+Y+'" has been bound in an enclosing "let" expression before using it.',1)},mn.prototype.evaluate=function(M){return this.boundExpression.evaluate(M)},mn.prototype.eachChild=function(){},mn.prototype.outputDefined=function(){return!1},mn.prototype.serialize=function(){return["var",this.name]};var pn=function(M,O,Y,ae,he){O===void 0&&(O=[]),ae===void 0&&(ae=new Lt),he===void 0&&(he=[]),this.registry=M,this.path=O,this.key=O.map(function(ve){return"["+ve+"]"}).join(""),this.scope=ae,this.errors=he,this.expectedType=Y};function Pn(M,O){for(var Y,ae,he=M.length-1,ve=0,Se=he,Fe=0;ve<=Se;)if(Y=M[Fe=Math.floor((ve+Se)/2)],ae=M[Fe+1],Y<=O){if(Fe===he||O<ae)return Fe;ve=Fe+1}else{if(!(Y>O))throw new _n("Input is not a number.");Se=Fe-1}return 0}pn.prototype.parse=function(M,O,Y,ae,he){return he===void 0&&(he={}),O?this.concat(O,Y,ae)._parse(M,he):this._parse(M,he)},pn.prototype._parse=function(M,O){function Y(ct,gt,Bt){return Bt==="assert"?new Ir(gt,[ct]):Bt==="coerce"?new Qr(gt,[ct]):ct}if(M!==null&&typeof M!="string"&&typeof M!="boolean"&&typeof M!="number"||(M=["literal",M]),Array.isArray(M)){if(M.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var ae=M[0];if(typeof ae!="string")return this.error("Expression name must be a string, but found "+typeof ae+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var he=this.registry[ae];if(he){var ve=he.parse(M,this);if(!ve)return null;if(this.expectedType){var Se=this.expectedType,Fe=ve.type;if(Se.kind!=="string"&&Se.kind!=="number"&&Se.kind!=="boolean"&&Se.kind!=="object"&&Se.kind!=="array"||Fe.kind!=="value")if(Se.kind!=="color"&&Se.kind!=="formatted"&&Se.kind!=="resolvedImage"||Fe.kind!=="value"&&Fe.kind!=="string"){if(this.checkSubtype(Se,Fe))return null}else ve=Y(ve,Se,O.typeAnnotation||"coerce");else ve=Y(ve,Se,O.typeAnnotation||"assert")}if(!(ve instanceof Ln)&&ve.type.kind!=="resolvedImage"&&function ct(gt){if(gt instanceof mn)return ct(gt.boundExpression);if(gt instanceof $r&&gt.name==="error"||gt instanceof In||gt instanceof Kr)return!1;var Bt=gt instanceof Qr||gt instanceof Ir,Zt=!0;return gt.eachChild(function(qt){Zt=Bt?Zt&&ct(qt):Zt&&qt instanceof Ln}),Zt?bn(gt)&&Wr(gt,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}(ve)){var Ke=new un;try{ve=new Ln(ve.type,ve.evaluate(Ke))}catch(ct){return this.error(ct.message),null}}return ve}return this.error('Unknown expression "'+ae+'". If you wanted a literal array, use ["literal", [...]].',0)}return M===void 0?this.error("'undefined' value invalid. Use null instead."):typeof M=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof M+" instead.")},pn.prototype.concat=function(M,O,Y){var ae=typeof M=="number"?this.path.concat(M):this.path,he=Y?this.scope.concat(Y):this.scope;return new pn(this.registry,ae,O||null,he,this.errors)},pn.prototype.error=function(M){for(var O=[],Y=arguments.length-1;Y-- >0;)O[Y]=arguments[Y+1];var ae=""+this.key+O.map(function(he){return"["+he+"]"}).join("");this.errors.push(new ot(ae,M))},pn.prototype.checkSubtype=function(M,O){var Y=Xt(M,O);return Y&&this.error(Y),Y};var aa=function(M,O,Y){this.type=M,this.input=O,this.labels=[],this.outputs=[];for(var ae=0,he=Y;ae<he.length;ae+=1){var ve=he[ae],Se=ve[0],Fe=ve[1];this.labels.push(Se),this.outputs.push(Fe)}};function qn(M,O,Y){return M*(1-Y)+O*Y}aa.parse=function(M,O){if(M.length-1<4)return O.error("Expected at least 4 arguments, but found only "+(M.length-1)+".");if((M.length-1)%2!=0)return O.error("Expected an even number of arguments.");var Y=O.parse(M[1],1,Ze);if(!Y)return null;var ae=[],he=null;O.expectedType&&O.expectedType.kind!=="value"&&(he=O.expectedType);for(var ve=1;ve<M.length;ve+=2){var Se=ve===1?-1/0:M[ve],Fe=M[ve+1],Ke=ve,ct=ve+1;if(typeof Se!="number")return O.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not c
94omputed expressions) for the input values.',Ke);if(ae.length&&ae[ae.length-1][0]>=Se)return O.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ke);var gt=O.parse(Fe,ct,he);if(!gt)return null;he=he||gt.type,ae.push([Se,gt])}return new aa(he,Y,ae)},aa.prototype.evaluate=function(M){var O=this.labels,Y=this.outputs;if(O.length===1)return Y[0].evaluate(M);var ae=this.input.evaluate(M);if(ae<=O[0])return Y[0].evaluate(M);var he=O.length;return ae>=O[he-1]?Y[he-1].evaluate(M):Y[Pn(O,ae)].evaluate(M)},aa.prototype.eachChild=function(M){M(this.input);for(var O=0,Y=this.outputs;O<Y.length;O+=1)M(Y[O])},aa.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})},aa.prototype.serialize=function(){for(var M=["step",this.input.serialize()],O=0;O<this.labels.length;O++)O>0&&M.push(this.labels[O]),M.push(this.outputs[O].serialize());return M};var vn=Object.freeze({__proto__:null,number:qn,color:function(M,O,Y){return new ar(qn(M.r,O.r,Y),qn(M.g,O.g,Y),qn(M.b,O.b,Y),qn(M.a,O.a,Y))},array:function(M,O,Y){return M.map(function(ae,he){return qn(ae,O[he],Y)})}}),ea=6/29,ua=3*ea*ea,Ya=Math.PI/180,Ei=180/Math.PI;function ei(M){return M>.008856451679035631?Math.pow(M,1/3):M/ua+4/29}function gi(M){return M>ea?M*M*M:ua*(M-4/29)}function ka(M){return 255*(M<=.0031308?12.92*M:1.055*Math.pow(M,1/2.4)-.055)}function Fa(M){return(M/=255)<=.04045?M/12.92:Math.pow((M+.055)/1.055,2.4)}function so(M){var O=Fa(M.r),Y=Fa(M.g),ae=Fa(M.b),he=ei((.4124564*O+.3575761*Y+.1804375*ae)/.95047),ve=ei((.2126729*O+.7151522*Y+.072175*ae)/1);return{l:116*ve-16,a:500*(he-ve),b:200*(ve-ei((.0193339*O+.119192*Y+.9503041*ae)/1.08883)),alpha:M.a}}function Do(M){var O=(M.l+16)/116,Y=isNaN(M.a)?O:O+M.a/500,ae=isNaN(M.b)?O:O-M.b/200;return O=1*gi(O),Y=.95047*gi(Y),ae=1.08883*gi(ae),new ar(ka(3.2404542*Y-1.5371385*O-.4985314*ae),ka(-.969266*Y+1.8760108*O+.041556*ae),ka(.0556434*Y-.2040259*O+1.0572252*ae),M.alpha)}function qo(M,O,Y){var ae=O-M;return M+Y*(ae>180||ae<-180?ae-360*Math.round(ae/360):ae)}var Vi={forward:so,reverse:Do,interpolate:function(M,O,Y){return{l:qn(M.l,O.l,Y),a:qn(M.a,O.a,Y),b:qn(M.b,O.b,Y),alpha:qn(M.alpha,O.alpha,Y)}}},Gi={forward:function(M){var O=so(M),Y=O.l,ae=O.a,he=O.b,ve=Math.atan2(he,ae)*Ei;return{h:ve<0?ve+360:ve,c:Math.sqrt(ae*ae+he*he),l:Y,alpha:M.a}},reverse:function(M){var O=M.h*Ya,Y=M.c;return Do({l:M.l,a:Math.cos(O)*Y,b:Math.sin(O)*Y,alpha:M.alpha})},interpolate:function(M,O,Y){return{h:qo(M.h,O.h,Y),c:qn(M.c,O.c,Y),l:qn(M.l,O.l,Y),alpha:qn(M.alpha,O.alpha,Y)}}},Ro=Object.freeze({__proto__:null,lab:Vi,hcl:Gi}),ja=function(M,O,Y,ae,he){this.type=M,this.operator=O,this.interpolation=Y,this.input=ae,this.labels=[],this.outputs=[];for(var ve=0,Se=he;ve<Se.length;ve+=1){var Fe=Se[ve],Ke=Fe[0],ct=Fe[1];this.labels.push(Ke),this.outputs.push(ct)}};function wo(M,O,Y,ae){var he=ae-Y,ve=M-Y;return he===0?0:O===1?ve/he:(Math.pow(O,ve)-1)/(Math.pow(O,he)-1)}ja.interpolationFactor=function(M,O,Y,ae){var he=0;if(M.name==="exponential")he=wo(O,M.base,Y,ae);else if(M.name==="linear")he=wo(O,1,Y,ae);else if(M.name==="cubic-bezier"){var ve=M.controlPoints;he=new t(ve[0],ve[1],ve[2],ve[3]).solve(wo(O,1,Y,ae))}return he},ja.parse=function(M,O){var Y=M[0],ae=M[1],he=M[2],ve=M.slice(3);if(!Array.isArray(ae)||ae.length===0)return O.error("Expected an interpolation type expression.",1);if(ae[0]==="linear")ae={name:"linear"};else if(ae[0]==="exponential"){var Se=ae[1];if(typeof Se!="number")return O.error("Exponential interpolation requires a numeric base.",1,1);ae={name:"exponential",base:Se}}else{if(ae[0]!=="cubic-bezier")return O.error("Unknown interpolation type "+String(ae[0]),1,0);var Fe=ae.slice(1);if(Fe.length!==4||Fe.some(function(Er){return typeof Er!="number"||Er<0||Er>1}))return O.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ae={name:"cubic-bezier",controlPoints:Fe}}if(M.length-1<4)return O.error("Expected at least 4 arguments, but found only "+(M.length-1)+".");if((M.length-1)%2!=0)return O.error("Expected an even number of arguments.");if(!(he=O.parse(he,2,Ze)))return null;var Ke=[],ct=null;Y==="interpolate-hcl"||Y==="interpolate-lab"?ct=zt:O.expectedType&&O.expectedType.kind!=="value"&&(ct=O.expectedType);for(var gt=0;gt<ve.length;gt+=2){var Bt=ve[gt],Zt=ve[gt+1],qt=gt+3,rr=gt+4;if(typeof Bt!="number")return O.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not c
94omputed expressions) for the input values.',qt);if(Ke.length&&Ke[Ke.length-1][0]>=Bt)return O.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',qt);var gr=O.parse(Zt,rr,ct);if(!gr)return null;ct=ct||gr.type,Ke.push([Bt,gr])}return ct.kind==="number"||ct.kind==="color"||ct.kind==="array"&&ct.itemType.kind==="number"&&typeof ct.N=="number"?new ja(ct,Y,ae,he,Ke):O.error("Type "+or(ct)+" is not interpolatable.")},ja.prototype.evaluate=function(M){var O=this.labels,Y=this.outputs;if(O.length===1)return Y[0].evaluate(M);var ae=this.input.evaluate(M);if(ae<=O[0])return Y[0].evaluate(M);var he=O.length;if(ae>=O[he-1])return Y[he-1].evaluate(M);var ve=Pn(O,ae),Se=O[ve],Fe=O[ve+1],Ke=ja.interpolationFactor(this.interpolation,ae,Se,Fe),ct=Y[ve].evaluate(M),gt=Y[ve+1].evaluate(M);return this.operator==="interpolate"?vn[this.type.kind.toLowerCase()](ct,gt,Ke):this.operator==="interpolate-hcl"?Gi.reverse(Gi.interpolate(Gi.forward(ct),Gi.forward(gt),Ke)):Vi.reverse(Vi.interpolate(Vi.forward(ct),Vi.forward(gt),Ke))},ja.prototype.eachChild=function(M){M(this.input);for(var O=0,Y=this.outputs;O<Y.length;O+=1)M(Y[O])},ja.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})},ja.prototype.serialize=function(){var M;M=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var O=[this.operator,M,this.input.serialize()],Y=0;Y<this.labels.length;Y++)O.push(this.labels[Y],this.outputs[Y].serialize());return O};var lo=function(M,O){this.type=M,this.args=O};lo.parse=function(M,O){if(M.length<2)return O.error("Expectected at least one argument.");var Y=null,ae=O.expectedType;ae&&ae.kind!=="value"&&(Y=ae);for(var he=[],ve=0,Se=M.slice(1);ve<Se.length;ve+=1){var Fe=Se[ve],Ke=O.parse(Fe,1+he.length,Y,void 0,{typeAnnotation:"omit"});if(!Ke)return null;Y=Y||Ke.type,he.push(Ke)}var ct=ae&&he.some(function(gt){return Xt(ae,gt.type)});return new lo(ct?ze:Y,he)},lo.prototype.evaluate=function(M){for(var O,Y=null,ae=0,he=0,ve=this.args;he<ve.length&&(ae++,(Y=ve[he].evaluate(M))&&Y instanceof dr&&!Y.available&&(O||(O=Y.name),Y=null,ae===this.args.length&&(Y=O)),Y===null);he+=1);return Y},lo.prototype.eachChild=function(M){this.args.forEach(M)},lo.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},lo.prototype.serialize=function(){var M=["coalesce"];return this.eachChild(function(O){M.push(O.serialize())}),M};var mi=function(M,O){this.type=O.type,this.bindings=[].concat(M),this.result=O};mi.prototype.evaluate=function(M){return this.result.evaluate(M)},mi.prototype.eachChild=function(M){for(var O=0,Y=this.bindings;O<Y.length;O+=1)M(Y[O][1]);M(this.result)},mi.parse=function(M,O){if(M.length<4)return O.error("Expected at least 3 arguments, but found "+(M.length-1)+" instead.");for(var Y=[],ae=1;ae<M.length-1;ae+=2){var he=M[ae];if(typeof he!="string")return O.error("Expected string, but found "+typeof he+" instead.",ae);if(/[^a-zA-Z0-9_]/.test(he))return O.error("Variable names must contain only alphanumeric characters or '_'.",ae);var ve=O.parse(M[ae+1],ae+1);if(!ve)return null;Y.push([he,ve])}var Se=O.parse(M[M.length-1],M.length-1,O.expectedType,Y);return Se?new mi(Y,Se):null},mi.prototype.outputDefined=function(){return this.result.outputDefined()},mi.prototype.serialize=function(){for(var M=["let"],O=0,Y=this.bindings;O<Y.length;O+=1){var ae=Y[O],he=ae[0],ve=ae[1];M.push(he,ve.serialize())}return M.push(this.result.serialize()),M};var Yi=function(M,O,Y){this.type=M,this.index=O,this.input=Y};Yi.parse=function(M,O){if(M.length!==3)return O.error("Expected 2 arguments, but found "+(M.length-1)+" instead.");var Y=O.parse(M[1],1,Ze),ae=O.parse(M[2],2,jt(O.expectedType||ze));if(!Y||!ae)return null;var he=ae.type;return new Yi(he.itemType,Y,ae)},Yi.prototype.evaluate=function(M){var O=this.index.evaluate(M),Y=this.input.evaluate(M);if(O<0)throw new _n("Array index out of bounds: "+O+" < 0.");if(O>=Y.length)throw new _n("Array index out of bounds: "+O+" > "+(Y.length-1)+".");if(O!==Math.floor(O))throw new _n("Array index must be an integer, but found "+O+" instead.");return Y[O]},Yi.prototype.eachChild=function(M){M(this.index),M(this.input)},Yi.prototype.outputDefined=function(){return!1},Yi.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var co=function(M,O){this.type=Ct,this.needle=M,this.haystack=O};co.parse=function(M,O){if(M.length!==3)return O.error("Expected 2 arguments, but found "+(M.length-1)+" instead.");var Y=O.parse(M[1],1,ze),ae=O.parse(M[2],2,ze);return Y&&ae?sr(Y.type,[Ct,pt,Ze,Et,ze])?new co(Y,ae):O.error("Expected first argument to be of type boolean, string, number or null, but found "+or(Y.type)+" instead"):null},co.prototype.evaluate=function(M){var O=this.needle.evaluate(M),Y=this.haystack.evaluate(M);if(!Y)return!1;if(!vr(O,["boolean","string","number","null"]))throw new _n("Expected first argument to be of type boolean, string, number or null, but found "+or(rn(O))+" instead.");if(!vr(Y,["string","array"]))throw new _n("Expected second argument to be of type array or string, but found "+or(rn(Y))+" instead.");return Y.indexOf(O)>=0},co.prototype.eachChild=function(M){M(this.needle),M(this.haystack)},co.prototype.outputDefined=function(){return!0},co.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xo=function(M,O,Y){this.type=Ze,this.needle=M,this.haystack=O,this.fromIndex=Y};xo.parse=function(M,O){if(M.length<=2||M.length>=5)return O.error("Expected 3 or 4 arguments, but found "+(M.length-1)+" instead.");var Y=O.parse(M[1],1,ze),ae=O.parse(M[2],2,ze);if(!Y||!ae)return null;if(!sr(Y.type,[Ct,pt,Ze,Et,ze]))return O.error("Expected first argument to be of type boolean, string, number or null, but found "+or(Y.type)+" instead");if(M.length===4){var he=O.parse(M[3],3,Ze);return he?new xo(Y,ae,he):null}return new xo(Y,ae)},xo.prototype.evaluate=function(M){var O=this.needle.evaluate(M),Y=this.haystack.evaluate(M);if(!vr(O,["boolean","string","number","null"]))throw new _n("Expected first argument to be of type boolean, string, number or null, but found "+or(rn(O))+" instead.");if(!vr(Y,["string","array"]))throw new _n("Expected second argument to be of type array or string, but found "+or(rn(Y))+" instead.");if(this.fromIndex){var ae=this.fromIndex.evaluate(M);return Y.indexOf(O,ae)}return Y.indexOf(O)},xo.prototype.eachChild=function(M){M(this.needle),M(this.haystack),this.fromIndex&&M(this.fromIndex)},xo.prototype.outputDefined=function(){return!1},xo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var M=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),M]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ii=function(M,O,Y,ae,he,ve){this.inputType=M,this.type=O,this.input=Y,this.cases=ae,this.outputs=he,this.otherwise=ve};Ii.parse=function(M,O){if(M.length<5)return O.error("Expected at least 4 arguments, but found only "+(M.length-1)+".");if(M.length%2!=1)return O.error("Expected an even number of arguments.");var Y,ae;O.expectedType&&O.expectedType.kind!=="value"&&(ae=O.expectedType);for(var he={},ve=[],Se=2;Se<M.length-1;Se+=2){var Fe=M[Se],Ke=M[Se+1];Array.isArray(Fe)||(Fe=[Fe]);var ct=O.concat(Se);if(Fe.length===0)return ct.error("Expected at least one branch label.");for(var gt=0,Bt=Fe;gt<Bt.length;gt+=1){var Zt=Bt[gt];if(typeof Zt!="number"&&typeof Zt!="string")return ct.error("Branch labels must be numbers or strings.");if(typeof Zt=="number"&&Math.abs(Zt)>Number.MAX_SAFE_INTEGER)return ct.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Zt=="number"&&Math.floor(Zt)!==Zt)return ct.error("Numeric branch labels must be integer values.");if(Y){if(ct.checkSubtype(Y,rn(Zt)))return null}else Y=rn(Zt);if(he[String(Zt)]!==void 0)return ct.error("Branch labels must be unique.");he[String(Zt)]=ve.length}var qt=O.parse(Ke,Se,ae);if(!qt)return null;ae=ae||qt.type,ve.push(qt)}var rr=O.parse(M[1],1,ze);if(!rr)return null;var gr=O.parse(M[M.length-1],M.length-1,ae);return gr?rr.type.kind!=="value"&&O.concat(1).checkSubtype(Y,rr.type)?null:new Ii(Y,ae,rr,he,ve,gr):null},Ii.prototype.evaluate=function(M){var O=this.input.evaluate(M);return(rn(O)===this.inputType&&this.outputs[this.cases[O]]||this.otherwise).evaluate(M)},Ii.prototype.eachChild=function(M){M(this.input),this.outputs.forEac
vendor: 8,984 bytes, line 94
94h(M),M(this.otherwise)},Ii.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})&&this.otherwise.outputDefined()},Ii.prototype.serialize=function(){for(var M=this,O=["match",this.input.serialize()],Y=[],ae={},he=0,ve=Object.keys(this.cases).sort();he<ve.length;he+=1){var Se=ve[he];(Bt=ae[this.cases[Se]])===void 0?(ae[this.cases[Se]]=Y.length,Y.push([this.cases[Se],[Se]])):Y[Bt][1].push(Se)}for(var Fe=function(qt){return M.inputType.kind==="number"?Number(qt):qt},Ke=0,ct=Y;Ke<ct.length;Ke+=1){var gt=ct[Ke],Bt=gt[0],Zt=gt[1];Zt.length===1?O.push(Fe(Zt[0])):O.push(Zt.map(Fe)),O.push(this.outputs[outputIndex$1].serialize())}return O.push(this.otherwise.serialize()),O};var li=function(M,O,Y){this.type=M,this.branches=O,this.otherwise=Y};li.parse=function(M,O){if(M.length<4)return O.error("Expected at least 3 arguments, but found only "+(M.length-1)+".");if(M.length%2!=0)return O.error("Expected an odd number of arguments.");var Y;O.expectedType&&O.expectedType.kind!=="value"&&(Y=O.expectedType);for(var ae=[],he=1;he<M.length-1;he+=2){var ve=O.parse(M[he],he,Ct);if(!ve)return null;var Se=O.parse(M[he+1],he+1,Y);if(!Se)return null;ae.push([ve,Se]),Y=Y||Se.type}var Fe=O.parse(M[M.length-1],M.length-1,Y);return Fe?new li(Y,ae,Fe):null},li.prototype.evaluate=function(M){for(var O=0,Y=this.branches;O<Y.length;O+=1){var ae=Y[O],he=ae[0],ve=ae[1];if(he.evaluate(M))return ve.evaluate(M)}return this.otherwise.evaluate(M)},li.prototype.eachChild=function(M){for(var O=0,Y=this.branches;O<Y.length;O+=1){var ae=Y[O],he=ae[0],ve=ae[1];M(he),M(ve)}M(this.otherwise)},li.prototype.outputDefined=function(){return this.branches.every(function(M){return M[0],M[1].outputDefined()})&&this.otherwise.outputDefined()},li.prototype.serialize=function(){var M=["case"];return this.eachChild(function(O){M.push(O.serialize())}),M};var Hi=function(M,O,Y,ae){this.type=M,this.input=O,this.beginIndex=Y,this.endIndex=ae};function gs(M,O){return M==="=="||M==="!="?O.kind==="boolean"||O.kind==="string"||O.kind==="number"||O.kind==="null"||O.kind==="value":O.kind==="string"||O.kind==="number"||O.kind==="value"}function xs(M,O,Y,ae){return ae.compare(O,Y)===0}function Ua(M,O,Y){var ae=M!=="=="&&M!=="!=";return function(){function he(ve,Se,Fe){this.type=Ct,this.lhs=ve,this.rhs=Se,this.collator=Fe,this.hasUntypedArgument=ve.type.kind==="value"||Se.type.kind==="value"}return he.parse=function(ve,Se){if(ve.length!==3&&ve.length!==4)return Se.error("Expected two or three arguments.");var Fe=ve[0],Ke=Se.parse(ve[1],1,ze);if(!Ke)return null;if(!gs(Fe,Ke.type))return Se.concat(1).error('"'+Fe+`" comparisons are not supported for type '`+or(Ke.type)+"'.");var ct=Se.parse(ve[2],2,ze);if(!ct)return null;if(!gs(Fe,ct.type))return Se.concat(2).error('"'+Fe+`" comparisons are not supported for type '`+or(ct.type)+"'.");if(Ke.type.kind!==ct.type.kind&&Ke.type.kind!=="value"&&ct.type.kind!=="value")return Se.error("Cannot compare types '"+or(Ke.type)+"' and '"+or(ct.type)+"'.");ae&&(Ke.type.kind==="value"&&ct.type.kind!=="value"?Ke=new Ir(ct.type,[Ke]):Ke.type.kind!=="value"&&ct.type.kind==="value"&&(ct=new Ir(Ke.type,[ct])));var gt=null;if(ve.length===4){if(Ke.type.kind!=="string"&&ct.type.kind!=="string"&&Ke.type.kind!=="value"&&ct.type.kind!=="value")return Se.error("Cannot use collator to compare non-string types.");if(!(gt=Se.parse(ve[3],3,st)))return null}return new he(Ke,ct,gt)},he.prototype.evaluate=function(ve){var Se=this.lhs.evaluate(ve),Fe=this.rhs.evaluate(ve);if(ae&&this.hasUntypedArgument){var Ke=rn(Se),ct=rn(Fe);if(Ke.kind!==ct.kind||Ke.kind!=="string"&&Ke.kind!=="number")throw new _n('Expected arguments for "'+M+'" to be (string, string) or (number, number), but found ('+Ke.kind+", "+ct.kind+") instead.")}if(this.collator&&!ae&&this.hasUntypedArgument){var gt=rn(Se),Bt=rn(Fe);if(gt.kind!=="string"||Bt.kind!=="string")return O(ve,Se,Fe)}return this.collator?Y(ve,Se,Fe,this.collator.evaluate(ve)):O(ve,Se,Fe)},he.prototype.eachChild=function(ve){ve(this.lhs),ve(this.rhs),this.collator&&ve(this.collator)},he.prototype.outputDefined=function(){return!0},he.prototype.serialize=function(){var ve=[M];return this.eachChild(function(Se){ve.push(Se.serialize())}),ve},he}()}Hi.parse=function(M,O){if(M.length<=2||M.length>=5)return O.error("Expected 3 or 4 arguments, but found "+(M.length-1)+" instead.");var Y=O.parse(M[1],1,ze),ae=O.parse(M[2],2,Ze);if(!Y||!ae)return null;if(!sr(Y.type,[jt(ze),pt,ze]))return O.error("Expected first argument to be of type array or string, but found "+or(Y.type)+" instead");if(M.length===4){var he=O.parse(M[3],3,Ze);return he?new Hi(Y.type,Y,ae,he):null}return new Hi(Y.type,Y,ae)},Hi.prototype.evaluate=function(M){var O=this.input.evaluate(M),Y=this.beginIndex.evaluate(M);if(!vr(O,["string","array"]))throw new _n("Expected first argument to be of type array or string, but found "+or(rn(O))+" instead.");if(this.endIndex){var ae=this.endIndex.evaluate(M);return O.slice(Y,ae)}return O.slice(Y)},Hi.prototype.eachChild=function(M){M(this.input),M(this.beginIndex),this.endIndex&&M(this.endIndex)},Hi.prototype.outputDefined=function(){return!1},Hi.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var M=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),M]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var cs=Ua("==",function(M,O,Y){return O===Y},xs),Jo=Ua("!=",function(M,O,Y){return O!==Y},function(M,O,Y,ae){return!xs(0,O,Y,ae)}),bs=Ua("<",function(M,O,Y){return O<Y},function(M,O,Y,ae){return ae.compare(O,Y)<0}),_s=Ua(">",function(M,O,Y){return O>Y},function(M,O,Y,ae){return ae.compare(O,Y)>0}),ms=Ua("<=",function(M,O,Y){return O<=Y},function(M,O,Y,ae){return ae.compare(O,Y)<=0}),ws=Ua(">=",function(M,O,Y){return O>=Y},function(M,O,Y,ae){return ae.compare(O,Y)>=0}),To=function(M,O,Y,ae,he){this.type=pt,this.number=M,this.locale=O,this.currency=Y,this.minFractionDigits=ae,this.maxFractionDigits=he};To.parse=function(M,O){if(M.length!==3)return O.error("Expected two arguments.");var Y=O.parse(M[1],1,Ze);if(!Y)return null;var ae=M[2];if(typeof ae!="object"||Array.isArray(ae))return O.error("NumberFormat options argument must be an object.");var he=null;if(ae.locale&&!(he=O.parse(ae.locale,1,pt)))return null;var ve=null;if(ae.currency&&!(ve=O.parse(ae.currency,1,pt)))return null;var Se=null;if(ae["min-fraction-digits"]&&!(Se=O.parse(ae["min-fraction-digits"],1,Ze)))return null;var Fe=null;return ae["max-fraction-digits"]&&!(Fe=O.parse(ae["max-fraction-digits"],1,Ze))?null:new To(Y,he,ve,Se,Fe)},To.prototype.evaluate=function(M){return new Intl.NumberFormat(this.locale?this.locale.evaluate(M):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(M):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(M):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(M):void 0}).format(this.number.evaluate(M))},To.prototype.eachChild=function(M){M(this.number),this.locale&&M(this.locale),this.currency&&M(this.currency),this.minFractionDigits&&M(this.minFractionDigits),this.maxFractionDigits&&M(this.maxFractionDigits)},To.prototype.outputDefined=function(){return!1},To.prototype.serialize=function(){var M={};return this.locale&&(M.locale=this.locale.serialize()),this.currency&&(M.currency=this.currency.serialize()),this.minFractionDigits&&(M["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(M["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),M]};var ko=function(M){this.type=Ze,this.input=M};ko.parse=function(M,O){if(M.length!==2)return O.error("Expected 1 argument, but found "+(M.length-1)+" instead.");var Y=O.parse(M[1],1);return Y?Y.type.kind!=="array"&&Y.type.kind!=="string"&&Y.type.kind!=="value"?O.error("Expected argument of type string or array, but found "+or(Y.type)+" instead."):new ko(Y):null},ko.prototype.evaluate=function(M){var O=this.input.evaluate(M);if(typeof O=="string"||Array.isArray(O))return O.length;throw new _n("Expected value to be of type string or array, but found "+or(rn(O))+" instead.")},ko.prototype.eachChild=function(M){M(this.input)},ko.prototype.outputDefined=function(){return!1},ko.prototype.serialize=function(){var M=["length"];return this.eachChild(function(O){M.push(O.serialize())}),M};var Fo={"==":cs,"!=":Jo,">":_s,"<":bs,">=":ws,"<=":ms,array:Ir,at:Yi,boolean:Ir,case:li,coalesce:lo,collator:In,format:xr,image:Nr,in:co,"index-of":xo,interpolate:ja,"interpolate-hcl":ja,"interpolate-lab":ja,length:ko,let:mi,literal:Ln,match:Ii,number:Ir,"number-format":To,object:Ir,slice:Hi,step:aa,string:Ir,"to-boolean":Qr,"to-color":Qr,"to-number":Qr,"to-string":Qr,var:mn,within:Kr};function Bo(M,O){var Y=O[0],ae=O[1],he=O[2],ve=O[3];Y=Y.evaluate(M),ae=ae.evaluate(M),he=he.evaluate(M);var Se=ve?ve.evaluate(M):1,Fe=Fr(Y,ae,he,Se);
94if(Fe)throw new _n(Fe);return new ar(Y/255*Se,ae/255*Se,he/255*Se,Se)}function No(M,O){return M in O}function Ko(M,O){var Y=O[M];return Y===void 0?null:Y}function uo(M){return{type:M}}function us(M){return{result:"success",value:M}}function ao(M){return{result:"error",value:M}}function jo(M){return M["property-type"]==="data-driven"||M["property-type"]==="cross-faded-data-driven"}function fs(M){return!!M.expression&&M.expression.parameters.indexOf("zoom")>-1}function Mo(M){return!!M.expression&&M.expression.interpolated}function Ba(M){return M instanceof Number?"number":M instanceof String?"string":M instanceof Boolean?"boolean":Array.isArray(M)?"array":M===null?"null":typeof M}function Ne(M){return typeof M=="object"&&M!==null&&!Array.isArray(M)}function He(M){return M}function $e(M,O,Y){return M!==void 0?M:O!==void 0?O:Y!==void 0?Y:void 0}function at(M,O,Y,ae,he){return $e(typeof Y===he?ae[Y]:void 0,M.default,O.default)}function mt(M,O,Y){if(Ba(Y)!=="number")return $e(M.default,O.default);var ae=M.stops.length;if(ae===1||Y<=M.stops[0][0])return M.stops[0][1];if(Y>=M.stops[ae-1][0])return M.stops[ae-1][1];var he=Pn(M.stops.map(function(ve){return ve[0]}),Y);return M.stops[he][1]}function dt(M,O,Y){var ae=M.base!==void 0?M.base:1;if(Ba(Y)!=="number")return $e(M.default,O.default);var he=M.stops.length;if(he===1||Y<=M.stops[0][0])return M.stops[0][1];if(Y>=M.stops[he-1][0])return M.stops[he-1][1];var ve=Pn(M.stops.map(function(Bt){return Bt[0]}),Y),Se=function(Bt,Zt,qt,rr){var gr=rr-qt,Er=Bt-qt;return gr===0?0:Zt===1?Er/gr:(Math.pow(Zt,Er)-1)/(Math.pow(Zt,gr)-1)}(Y,ae,M.stops[ve][0],M.stops[ve+1][0]),Fe=M.stops[ve][1],Ke=M.stops[ve+1][1],ct=vn[O.type]||He;if(M.colorSpace&&M.colorSpace!=="rgb"){var gt=Ro[M.colorSpace];ct=function(Bt,Zt){return gt.reverse(gt.interpolate(gt.forward(Bt),gt.forward(Zt),Se))}}return typeof Fe.evaluate=="function"?{evaluate:function(){for(var Bt=[],Zt=arguments.length;Zt--;)Bt[Zt]=arguments[Zt];var qt=Fe.evaluate.apply(void 0,Bt),rr=Ke.evaluate.apply(void 0,Bt);if(qt!==void 0&&rr!==void 0)return ct(qt,rr,Se)}}:ct(Fe,Ke,Se)}function Mt(M,O,Y){return O.type==="color"?Y=ar.parse(Y):O.type==="formatted"?Y=Or.fromString(Y.toString()):O.type==="resolvedImage"?Y=dr.fromString(Y.toString()):Ba(Y)===O.type||O.type==="enum"&&O.values[Y]||(Y=void 0),$e(Y,M.default,O.default)}$r.register(Fo,{error:[{kind:"error"},[pt],function(M,O){var Y=O[0];throw new _n(Y.evaluate(M))}],typeof:[pt,[ze],function(M,O){return or(rn(O[0].evaluate(M)))}],"to-rgba":[jt(Ze,4),[zt],function(M,O){return O[0].evaluate(M).toArray()}],rgb:[zt,[Ze,Ze,Ze],Bo],rgba:[zt,[Ze,Ze,Ze,Ze],Bo],has:{type:Ct,overloads:[[[pt],function(M,O){return No(O[0].evaluate(M),M.properties())}],[[pt,Gt],function(M,O){var Y=O[0],ae=O[1];return No(Y.evaluate(M),ae.evaluate(M))}]]},get:{type:ze,overloads:[[[pt],function(M,O){return Ko(O[0].evaluate(M),M.properties())}],[[pt,Gt],function(M,O){var Y=O[0],ae=O[1];return Ko(Y.evaluate(M),ae.evaluate(M))}]]},"feature-state":[ze,[pt],function(M,O){return Ko(O[0].evaluate(M),M.featureState||{})}],properties:[Gt,[],function(M){return M.properties()}],"geometry-type":[pt,[],function(M){return M.geometryType()}],id:[ze,[],function(M){return M.id()}],zoom:[Ze,[],function(M){return M.globals.zoom}],"heatmap-density":[Ze,[],function(M){return M.globals.heatmapDensity||0}],"line-progress":[Ze,[],function(M){return M.globals.lineProgress||0}],accumulated:[ze,[],function(M){return M.globals.accumulated===void 0?null:M.globals.accumulated}],"+":[Ze,uo(Ze),function(M,O){for(var Y=0,ae=0,he=O;ae<he.length;ae+=1)Y+=he[ae].evaluate(M);return Y}],"*":[Ze,uo(Ze),function(M,O){for(var Y=1,ae=0,he=O;ae<he.length;ae+=1)Y*=he[ae].evaluate(M);return Y}],"-":{type:Ze,overloads:[[[Ze,Ze],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)-ae.evaluate(M)}],[[Ze],function(M,O){return-O[0].evaluate(M)}]]},"/":[Ze,[Ze,Ze],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)/ae.evaluate(M)}],"%":[Ze,[Ze,Ze],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)%ae.evaluate(M)}],ln2:[Ze,[],function(){return Math.LN2}],pi:[Ze,[],function(){return Math.PI}],e:[Ze,[],function(){return Math.E}],"^":[Ze,[Ze,Ze],function(M,O){var Y=O[0],ae=O[1];return Math.pow(Y.evaluate(M),ae.evaluate(M))}],sqrt:[Ze,[Ze],function(M,O){var Y=O[0];return Math.sqrt(Y.evaluate(M))}],log10:[Ze,[Ze],function(M,O){var Y=O[0];
94return Math.log(Y.evaluate(M))/Math.LN10}],ln:[Ze,[Ze],function(M,O){var Y=O[0];return Math.log(Y.evaluate(M))}],log2:[Ze,[Ze],function(M,O){var Y=O[0];return Math.log(Y.evaluate(M))/Math.LN2}],sin:[Ze,[Ze],function(M,O){var Y=O[0];return Math.sin(Y.evaluate(M))}],cos:[Ze,[Ze],function(M,O){var Y=O[0];return Math.cos(Y.evaluate(M))}],tan:[Ze,[Ze],function(M,O){var Y=O[0];return Math.tan(Y.evaluate(M))}],asin:[Ze,[Ze],function(M,O){var Y=O[0];return Math.asin(Y.evaluate(M))}],acos:[Ze,[Ze],function(M,O){var Y=O[0];return Math.acos(Y.evaluate(M))}],atan:[Ze,[Ze],function(M,O){var Y=O[0];return Math.atan(Y.evaluate(M))}],min:[Ze,uo(Ze),function(M,O){return Math.min.apply(Math,O.map(function(Y){return Y.evaluate(M)}))}],max:[Ze,uo(Ze),function(M,O){return Math.max.apply(Math,O.map(function(Y){return Y.evaluate(M)}))}],abs:[Ze,[Ze],function(M,O){var Y=O[0];return Math.abs(Y.evaluate(M))}],round:[Ze,[Ze],function(M,O){var Y=O[0].evaluate(M);return Y<0?-Math.round(-Y):Math.round(Y)}],floor:[Ze,[Ze],function(M,O){var Y=O[0];return Math.floor(Y.evaluate(M))}],ceil:[Ze,[Ze],function(M,O){var Y=O[0];return Math.ceil(Y.evaluate(M))}],"filter-==":[Ct,[pt,ze],function(M,O){var Y=O[0],ae=O[1];return M.properties()[Y.value]===ae.value}],"filter-id-==":[Ct,[ze],function(M,O){var Y=O[0];return M.id()===Y.value}],"filter-type-==":[Ct,[pt],function(M,O){var Y=O[0];return M.geometryType()===Y.value}],"filter-<":[Ct,[pt,ze],function(M,O){var Y=O[0],ae=O[1],he=M.properties()[Y.value],ve=ae.value;return typeof he==typeof ve&&he<ve}],"filter-id-<":[Ct,[ze],function(M,O){var Y=O[0],ae=M.id(),he=Y.value;return typeof ae==typeof he&&ae<he}],"filter->":[Ct,[pt,ze],function(M,O){var Y=O[0],ae=O[1],he=M.properties()[Y.value],ve=ae.value;return typeof he==typeof ve&&he>ve}],"filter-id->":[Ct,[ze],function(M,O){var Y=O[0],ae=M.id(),he=Y.value;return typeof ae==typeof he&&ae>he}],"filter-<=":[Ct,[pt,ze],function(M,O){var Y=O[0],ae=O[1],he=M.properties()[Y.value],ve=ae.value;return typeof he==typeof ve&&he<=ve}],"filter-id-<=":[Ct,[ze],function(M,O){var Y=O[0],ae=M.id(),he=Y.value;return typeof ae==typeof he&&ae<=he}],"filter->=":[Ct,[pt,ze],function(M,O){var Y=O[0],ae=O[1],he=M.properties()[Y.value],ve=ae.value;return typeof he==typeof ve&&he>=ve}],"filter-id->=":[Ct,[ze],function(M,O){var Y=O[0],ae=M.id(),he=Y.value;return typeof ae==typeof he&&ae>=he}],"filter-has":[Ct,[ze],function(M,O){return O[0].value in M.properties()}],"filter-has-id":[Ct,[],function(M){return M.id()!==null&&M.id()!==void 0}],"filter-type-in":[Ct,[jt(pt)],function(M,O){return O[0].value.indexOf(M.geometryType())>=0}],"filter-id-in":[Ct,[jt(ze)],function(M,O){return O[0].value.indexOf(M.id())>=0}],"filter-in-small":[Ct,[pt,jt(ze)],function(M,O){var Y=O[0];return O[1].value.indexOf(M.properties()[Y.value])>=0}],"filter-in-large":[Ct,[pt,jt(ze)],function(M,O){var Y=O[0],ae=O[1];return function(he,ve,Se,Fe){for(;Se<=Fe;){var Ke=Se+Fe>>1;if(ve[Ke]===he)return!0;ve[Ke]>he?Fe=Ke-1:Se=Ke+1}return!1}(M.properties()[Y.value],ae.value,0,ae.value.length-1)}],all:{type:Ct,overloads:[[[Ct,Ct],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)&&ae.evaluate(M)}],[uo(Ct),function(M,O){for(var Y=0,ae=O;Y<ae.length;Y+=1)if(!ae[Y].evaluate(M))return!1;return!0}]]},any:{type:Ct,overloads:[[[Ct,Ct],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)||ae.evaluate(M)}],[uo(Ct),function(M,O){for(var Y=0,ae=O;Y<ae.length;Y+=1)if(ae[Y].evaluate(M))return!0;return!1}]]},"!":[Ct,[Ct],function(M,O){return!O[0].evaluate(M)}],"is-supported-script":[Ct,[pt],function(M,O){var Y=O[0],ae=M.globals&&M.globals.isSupportedScript;return!ae||ae(Y.evaluate(M))}],upcase:[pt,[pt],function(M,O){return O[0].evaluate(M).toUpperCase()}],downcase:[pt,[pt],function(M,O){return O[0].evaluate(M).toLowerCase()}],concat:[pt,uo(ze),function(M,O){return O.map(function(Y){return An(Y.evaluate(M))}).join("")}],"resolved-locale":[pt,[st],function(M,O){return O[0].evaluate(M).resolvedLocale()}]});var Jt=function(M,O){this.expression=M,this._warningHistory={},this._evaluator=new un,this._defaultValue=O?function(Y){return Y.type==="color"&&Ne(Y.default)?new ar(0,0,0,0):Y.type==="color"?ar.parse(Y.default)||null:Y.default===void 0?null:Y.default}(O):null,this._enumValues=O&&O.type==="enum"?O.values:null};function $t(M){return Array.isArray(M)&&M.length>0&&typeof M[0]=="string"&&M[0]in Fo}function Wt(M,O){var Y=new pn(Fo,[],O?function(he){var ve={color:zt,string:pt,number:Ze,enum:pt,boolean:Ct,formatted:yt,resolvedImage:Dt};return he.type==="array"?jt(ve[he.value]||ze,he.length):ve[he.type]}(O):void 0),ae=Y.parse(M,void 0,void 0,void 0,O&&O.type==="string"?{typeAnnotation:"coerce"}:void 0);return ae?us(new Jt(ae,O)):ao(Y.errors)}Jt.prototype.evaluateWithoutErrorHandling=function(M,O,Y,ae,he,ve){return this._evaluator.globals=M,this._evaluator.feature=O,this._evaluator.featureState=Y,this._evaluator.canonical=ae,this._evaluator.availableImages=he||null,this._evaluator.formattedSection=ve,this.expression.evaluate(this._evaluator)},Jt.prototype.evaluate=function(M,O,Y,ae,he,ve){this._evaluator.globals=M,this._evaluator.feature=O||null,this._evaluator.featureState=Y||null,this._evaluator.canonical=ae,this._evaluator.availableImages=he||null,this._evaluator.formattedSection=ve||null;try{var Se=this.expression.evaluate(this._evaluator);if(Se==null||typeof Se=="number"&&Se!=Se)return this._defaultValue;if(this._enumValues&&!(Se in this._enumValues))throw new _n("Expected value to be one of "+Object.keys(this._enumValues).map(function(Fe){return JSON.stringify(Fe)}).join(", ")+", but found "+JSON.stringify(Se)+" instead.");return Se}catch(Fe){return this._warningHistory[Fe.message]||(this._warningHistory[Fe.message]=!0,typeof console<"u"&&console.warn(Fe.message)),this._defaultValue}};var tr=function(M,O){this.kind=M,this._styleExpression=O,this.isStateDependent=M!=="constant"&&!zr(O.expression)};tr.prototype.evaluateWithoutErrorHandling=function(M,O,Y,ae,he,ve){return this._styleExpression.evaluateWithoutErrorHandling(M,O,Y,ae,he,ve)},tr.prototype.evaluate=function(M,O,Y,ae,he,ve){return this._styleExpression.evaluate(M,O,Y,ae,he,ve)};var ur=function(M,O,Y,ae){this.kind=M,this.zoomStops=Y,this._styleExpression=O,this.isStateDependent=M!=="camera"&&!zr(O.expression),this.interpolationType=ae};function mr(M,O){if((M=Wt(M,O)).result==="error")return M;var Y=M.value.expression,ae=bn(Y);
vendor: 16,104 bytes, line 94
94if(!ae&&!jo(O))return ao([new ot("","data expressions not supported")]);var he=Wr(Y,["zoom"]);if(!he&&!fs(O))return ao([new ot("","zoom expressions not supported")]);var ve=function Fe(Ke){var ct=null;if(Ke instanceof mi)ct=Fe(Ke.result);else if(Ke instanceof lo)for(var gt=0,Bt=Ke.args;gt<Bt.length;gt+=1){var Zt=Bt[gt];if(ct=Fe(Zt))break}else(Ke instanceof aa||Ke instanceof ja)&&Ke.input instanceof $r&&Ke.input.name==="zoom"&&(ct=Ke);return ct instanceof ot||Ke.eachChild(function(qt){var rr=Fe(qt);rr instanceof ot?ct=rr:!ct&&rr?ct=new ot("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):ct&&rr&&ct!==rr&&(ct=new ot("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),ct}(Y);if(!ve&&!he)return ao([new ot("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ve instanceof ot)return ao([ve]);if(ve instanceof ja&&!Mo(O))return ao([new ot("",'"interpolate" expressions cannot be used with this property')]);if(!ve)return us(new tr(ae?"constant":"source",M.value));var Se=ve instanceof ja?ve.interpolation:void 0;return us(new ur(ae?"camera":"composite",M.value,ve.labels,Se))}ur.prototype.evaluateWithoutErrorHandling=function(M,O,Y,ae,he,ve){return this._styleExpression.evaluateWithoutErrorHandling(M,O,Y,ae,he,ve)},ur.prototype.evaluate=function(M,O,Y,ae,he,ve){return this._styleExpression.evaluate(M,O,Y,ae,he,ve)},ur.prototype.interpolationFactor=function(M,O,Y){return this.interpolationType?ja.interpolationFactor(this.interpolationType,M,O,Y):0};var yr=function(M,O){this._parameters=M,this._specification=O,ht(this,function Y(ae,he){var ve,Se,Fe,Ke=he.type==="color",ct=ae.stops&&typeof ae.stops[0][0]=="object",gt=ct||ae.property!==void 0,Bt=ct||!gt,Zt=ae.type||(Mo(he)?"exponential":"interval");if(Ke&&((ae=ht({},ae)).stops&&(ae.stops=ae.stops.map(function(ra){return[ra[0],ar.parse(ra[1])]})),ae.default?ae.default=ar.parse(ae.default):ae.default=ar.parse(he.default)),ae.colorSpace&&ae.colorSpace!=="rgb"&&!Ro[ae.colorSpace])throw new Error("Unknown color space: "+ae.colorSpace);if(Zt==="exponential")ve=dt;else if(Zt==="interval")ve=mt;else if(Zt==="categorical"){ve=at,Se=Object.create(null);for(var qt=0,rr=ae.stops;qt<rr.length;qt+=1){var gr=rr[qt];Se[gr[0]]=gr[1]}Fe=typeof ae.stops[0][0]}else{if(Zt!=="identity")throw new Error('Unknown function type "'+Zt+'"');ve=Mt}if(ct){for(var Er={},Sr=[],Rr=0;Rr<ae.stops.length;Rr++){var Br=ae.stops[Rr],Hr=Br[0].zoom;Er[Hr]===void 0&&(Er[Hr]={zoom:Hr,type:ae.type,property:ae.property,default:ae.default,stops:[]},Sr.push(Hr)),Er[Hr].stops.push([Br[0].value,Br[1]])}for(var fn=[],xn=0,Fn=Sr;xn<Fn.length;xn+=1){var Rn=Fn[xn];fn.push([Er[Rn].zoom,Y(Er[Rn],he)])}var Hn={name:"linear"};return{kind:"composite",interpolationType:Hn,interpolationFactor:ja.interpolationFactor.bind(void 0,Hn),zoomStops:fn.map(function(ra){return ra[0]}),evaluate:function(ra,Wn){var ca=ra.zoom;return dt({stops:fn,base:ae.base},he,ca).evaluate(ca,Wn)}}}if(Bt){var ta=Zt==="exponential"?{name:"exponential",base:ae.base!==void 0?ae.base:1}:null;return{kind:"camera",interpolationType:ta,interpolationFactor:ja.interpolationFactor.bind(void 0,ta),zoomStops:ae.stops.map(function(ra){return ra[0]}),evaluate:function(ra){var Wn=ra.zoom;return ve(ae,he,Wn,Se,Fe)}}}return{kind:"source",evaluate:function(ra,Wn){var ca=Wn&&Wn.properties?Wn.properties[ae.property]:void 0;return ca===void 0?$e(ae.default,he.default):ve(ae,he,ca,Se,Fe)}}}(this._parameters,this._specification))};function Pr(M){var O=M.key,Y=M.value,ae=M.valueSpec||{},he=M.objectElementValidators||{},ve=M.style,Se=M.styleSpec,Fe=[],Ke=Ba(Y);if(Ke!=="object")return[new Je(O,Y,"object expected, "+Ke+" found")];for(var ct in Y){var gt=ct.split(".")[0],Bt=ae[gt]||ae["*"],Zt=void 0;if(he[gt])Zt=he[gt];else if(ae[gt])Zt=nr;else if(he["*"])Zt=he["*"];else{if(!ae["*"]){Fe.push(new Je(O,Y[ct],'unknown property "'+ct+'"'));continue}Zt=nr}Fe=Fe.concat(Zt({key:(O&&O+".")+ct,value:Y[ct],valueSpec:Bt,style:ve,styleSpec:Se,object:Y,objectKey:ct},Y))}for(var qt in ae)he[qt]||ae[qt].required&&ae[qt].default===void 0&&Y[qt]===void 0&&Fe.push(new Je(O,Y,'missing required property "'+qt+'"'));return Fe}function nn(M){var O=M.value,Y=M.valueSpec,ae=M.style,he=M.styleSpec,ve=M.key,Se=M.arrayElementValidator||nr;if(Ba(O)!=="array")return[new Je(ve,O,"array expected, "+Ba(O)+" found")];if(Y.length&&O.length!==Y.length)return[new Je(ve,O,"array length "+Y.length+" expected, length "+O.length+" found")];if(Y["min-length"]&&O.length<Y["min-length"])return[new Je(ve,O,"array length at least "+Y["min-length"]+" expected, length "+O.length+" found")];var Fe={type:Y.value,values:Y.values};he.$version<7&&(Fe.function=Y.function),Ba(Y.value)==="object"&&(Fe=Y.value);for(var Ke=[],ct=0;ct<O.length;ct++)Ke=Ke.concat(Se({array:O,arrayIndex:ct,value:O[ct],valueSpec:Fe,style:ae,styleSpec:he,key:ve+"["+ct+"]"}));return Ke}function dn(M){var O=M.key,Y=M.value,ae=M.valueSpec,he=Ba(Y);return he==="number"&&Y!=Y&&(he="NaN"),he!=="number"?[new Je(O,Y,"number expected, "+he+" found")]:"minimum"in ae&&Y<ae.minimum?[new Je(O,Y,Y+" is less than the minimum value "+ae.minimum)]:"maximum"in ae&&Y>ae.maximum?[new Je(O,Y,Y+" is greater than the maximum value "+ae.maximum)]:[]}function En(M){var O,Y,ae,he=M.valueSpec,ve=ut(M.value.type),Se={},Fe=ve!=="categorical"&&M.value.property===void 0,Ke=!Fe,ct=Ba(M.value.stops)==="array"&&Ba(M.value.stops[0])==="array"&&Ba(M.value.stops[0][0])==="object",gt=Pr({key:M.key,value:M.value,valueSpec:M.styleSpec.function,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{stops:function(qt){if(ve==="identity")return[new Je(qt.key,qt.value,'identity function may not have a "stops" property')];var rr=[],gr=qt.value;return rr=rr.concat(nn({key:qt.key,value:gr,valueSpec:qt.valueSpec,style:qt.style,styleSpec:qt.styleSpec,arrayElementValidator:Bt})),Ba(gr)==="array"&&gr.length===0&&rr.push(new Je(qt.key,gr,"array must have at least one stop")),rr},default:function(qt){return nr({key:qt.key,value:qt.value,valueSpec:he,style:qt.style,styleSpec:qt.styleSpec})}}});return ve==="identity"&&Fe&&gt.push(new Je(M.key,M.value,'missing required property "property"')),ve==="identity"||M.value.stops||gt.push(new Je(M.key,M.value,'missing required property "stops"')),ve==="exponential"&&M.valueSpec.expression&&!Mo(M.valueSpec)&&gt.push(new Je(M.key,M.value,"exponential functions not supported")),M.styleSpec.$version>=8&&(Ke&&!jo(M.valueSpec)?gt.push(new Je(M.key,M.value,"property functions not supported")):Fe&&!fs(M.valueSpec)&&gt.push(new Je(M.key,M.value,"zoom functions not supported"))),ve!=="categorical"&&!ct||M.value.property!==void 0||gt.push(new Je(M.key,M.value,'"property" property is required')),gt;function Bt(qt){var rr=[],gr=qt.value,Er=qt.key;if(Ba(gr)!=="array")return[new Je(Er,gr,"array expected, "+Ba(gr)+" found")];if(gr.length!==2)return[new Je(Er,gr,"array length 2 expected, length "+gr.length+" found")];if(ct){if(Ba(gr[0])!=="object")return[new Je(Er,gr,"object expected, "+Ba(gr[0])+" found")];if(gr[0].zoom===void 0)return[new Je(Er,gr,"object stop key must have zoom")];if(gr[0].value===void 0)return[new Je(Er,gr,"object stop key must have value")];if(ae&&ae>ut(gr[0].zoom))return[new Je(Er,gr[0].zoom,"stop zoom values must appear in ascending order")];ut(gr[0].zoom)!==ae&&(ae=ut(gr[0].zoom),Y=void 0,Se={}),rr=rr.concat(Pr({key:Er+"[0]",value:gr[0],valueSpec:{zoom:{}},style:qt.style,styleSpec:qt.styleSpec,objectElementValidators:{zoom:dn,value:Zt}}))}else rr=rr.concat(Zt({key:Er+"[0]",value:gr[0],valueSpec:{},style:qt.style,styleSpec:qt.styleSpec},gr));return $t(kt(gr[1]))?rr.concat([new Je(Er+"[1]",gr[1],"expressions are not allowed in function stops.")]):rr.concat(nr({key:Er+"[1]",value:gr[1],valueSpec:he,style:qt.style,styleSpec:qt.styleSpec}))}function Zt(qt,rr){var gr=Ba(qt.value),Er=ut(qt.value),Sr=qt.value!==null?qt.value:rr;if(O){if(gr!==O)return[new Je(qt.key,Sr,gr+" stop domain type must match previous stop domain type "+O)]}else O=gr;if(gr!=="number"&&gr!=="string"&&gr!=="boolean")return[new Je(qt.key,Sr,"stop domain value must be a number, string, or boolean")];if(gr!=="number"&&ve!=="categorical"){var Rr="number expected, "+gr+" found";return jo(he)&&ve===void 0&&(Rr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Je(qt.key,Sr,Rr)]}return ve!=="categorical"||gr!=="number"||isFinite(Er)&&Math.floor(Er)===Er?ve!=="categorical"&&gr==="number"&&Y!==void 0&&Er<Y?[new Je(qt.key,Sr,"stop domain values must appear in ascending order")]:(Y=Er,ve==="categorical"&&Er in Se?[new Je(qt.key,Sr,"stop domain values must be unique")]:(Se[Er]=!0,[])):[new Je(qt.key,Sr,"integer expected, found "+Er)]}}function On(M){var O=(M.expressionContext==="property"?mr:Wt)(kt(M.value),M.valueSpec);if(O.result==="error")return O.value.map(function(ae){return new Je(""+M.key+ae.key,M.value,ae.message)});var Y=O.value.expression||O.value._styleExpression.expression;if(M.expressionContext==="property"&&M.propertyKey==="text-font"&&!Y.outputDefined())return[new Je(M.key,M.value,'Invalid data expression for "'+M.propertyKey+'". Output values must be contained as literals within the expression.')];if(M.expressionContext==="property"&&M.propertyType==="layout"&&!zr(Y))return[new Je(M.key,M.value,'"feature-state" data expressions are not supported with layout properties.')];if(M.expressionContext==="filter"&&!zr(Y))return[new Je(M.key,M.value,'"feature-state" data expressions are not supported with filters.')];if(M.expressionContext&&M.expressionContext.indexOf("cluster")===0){if(!Wr(Y,["zoom","feature-state"]))return[new Je(M.key,M.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(M.expressionContext==="cluster-initial"&&!bn(Y))return[new Je(M.key,M.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Un(M){var O=M.key,Y=M.value,ae=M.valueSpec,he=[];return Array.isArray(ae.values)?ae.values.indexOf(ut(Y))===-1&&he.push(new Je(O,Y,"expected one of ["+ae.values.join(", ")+"], "+JSON.stringify(Y)+" found")):Object.keys(ae.values).indexOf(ut(Y))===-1&&he.push(new Je(O,Y,"expected one of ["+Object.keys(ae.values).join(", ")+"], "+JSON.stringify(Y)+" found")),he}function zn(M){if(M===!0||M===!1)return!0;if(!Array.isArray(M)||M.length===0)return!1;switch(M[0]){case"has":return M.length>=2&&M[1]!=="$id"&&M[1]!=="$type";case"in":return M.length>=3&&(typeof M[1]!="string"||Array.isArray(M[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return M.length!==3||Array.isArray(M[1])||Array.isArray(M[2]);case"any":case"all":for(var O=0,Y=M.slice(1);O<Y.length;O+=1){var ae=Y[O];if(!zn(ae)&&typeof ae!="boolean")return!1}return!0;default:return!0}}yr.deserialize=function(M){return new yr(M._parameters,M._specification)},yr.serialize=function(M){return{_parameters:M._parameters,_specification:M._specification}};var ha={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ba(M){if(M==null)return{filter:function(){return!0},needGeometry:!1};zn(M)||(M=Ia(M));var O=Wt(M,ha);if(O.result==="error")throw new Error(O.value.map(function(Y){return Y.key+": "+Y.message}).join(", "));return{filter:function(Y,ae,he){return O.value.evaluate(Y,ae,{},he)},needGeometry:function Y(ae){if(!Array.isArray(ae))return!1;if(ae[0]==="within")return!0;for(var he=1;he<ae.length;he++)if(Y(ae[he]))return!0;return!1}(M)}}function Oa(M,O){return M<O?-1:M>O?1:0}function Ia(M){if(!M)return!0;var O,Y=M[0];return M.length<=1?Y!=="any":Y==="=="?za(M[1],M[2],"=="):Y==="!="?ti(za(M[1],M[2],"==")):Y==="<"||Y===">"||Y==="<="||Y===">="?za(M[1],M[2],Y):Y==="any"?(O=M.slice(1),["any"].concat(O.map(Ia))):Y==="all"?["all"].concat(M.slice(1).map(Ia)):Y==="none"?["all"].concat(M.slice(1).map(Ia).map(ti)):Y==="in"?vi(M[1],M.slice(2)):Y==="!in"?ti(vi(M[1],M.slice(2))):Y==="has"?pi(M[1]):Y==="!has"?ti(pi(M[1])):Y!=="within"||M}function za(M,O,Y){switch(M){case"$type":return["filter-type-"+Y,O];case"$id":return["filter-id-"+Y,O];default:return["filter-"+Y,M,O]}}function vi(M,O){if(O.length===0)return!1;switch(M){case"$type":return["filter-type-in",["literal",O]];case"$id":return["filter-id-in",["literal",O]];default:return O.length>200&&!O.some(function(Y){return typeof Y!=typeof O[0]})?["filter-in-large",M,["literal",O.sort(Oa)]]:["filter-in-small",M,["literal",O]]}}function pi(M){switch(M){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",M]}}function ti(M){return["!",M]}function ri(M){return zn(kt(M.value))?On(ht({},M,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function O(Y){var ae=Y.value,he=Y.key;if(Ba(ae)!=="array")return[new Je(he,ae,"array expected, "+Ba(ae)+" found")];var ve,Se=Y.styleSpec,Fe=[];if(ae.length<1)return[new Je(he,ae,"filter array must have at least 1 element")];switch(Fe=Fe.concat(Un({key:he+"[0]",value:ae[0],valueSpec:Se.filter_operator,style:Y.style,styleSpec:Y.styleSpec})),ut(ae[0])){case"<":case"<=":case">":case">=":ae.length>=2&&ut(ae[1])==="$type"&&Fe.push(new Je(he,ae,'"$type" cannot be use with operator "'+ae[0]+'"'));case"==":case"!=":ae.length!==3&&Fe.push(new Je(he,ae,'filter array for operator "'+ae[0]+'" must have 3 elements'));case"in":case"!in":ae.length>=2&&(ve=Ba(ae[1]))!=="string"&&Fe.push(new Je(he+"[1]",ae[1],"string expected, "+ve+" found"));for(var Ke=2;Ke<ae.length;Ke++)ve=Ba(ae[Ke]),ut(ae[1])==="$type"?Fe=Fe.concat(Un({key:he+"["+Ke+"]",value:ae[Ke],valueSpec:Se.geometry_type,style:Y.style,styleSpec:Y.styleSpec})):ve!=="string"&&ve!=="number"&&ve!=="boolean"&&Fe.push(new Je(he+"["+Ke+"]",ae[Ke],"string, number, or boolean expected, "+ve+" found"));break;case"any":case"all":case"none":for(var ct=1;ct<ae.length;ct++)Fe=Fe.concat(O({key:he+"["+ct+"]",value:ae[ct],style:Y.style,styleSpec:Y.styleSpec}));break;case"has":case"!has":ve=Ba(ae[1]),ae.length!==2?Fe.push(new Je(he,ae,'filter array for "'+ae[0]+'" operator must have 2 elements')):ve!=="string"&&Fe.push(new Je(he+"[1]",ae[1],"string expected, "+ve+" found"));break;case"within":ve=Ba(ae[1]),ae.length!==2?Fe.push(new Je(he,ae,'filter array for "'+ae[0]+'" operator must have 2 elements')):ve!=="object"&&Fe.push(new Je(he+"[1]",ae[1],"object expected, "+ve+" found"))}return Fe}(M)}function di(M,O){var Y=M.key,ae=M.style,he=M.styleSpec,ve=M.value,Se=M.objectKey,Fe=he[O+"_"+M.layerType];if(!Fe)return[];var Ke=Se.match(/^(.*)-transition$/);if(O==="paint"&&Ke&&Fe[Ke[1]]&&Fe[Ke[1]].transition)return nr({key:Y,value:ve,valueSpec:he.transition,style:ae,styleSpec:he});var ct,gt=M.valueSpec||Fe[Se];if(!gt)return[new Je(Y,ve,'unknown property "'+Se+'"')];if(Ba(ve)==="string"&&jo(gt)&&!gt.tokens&&(ct=/^{([^}]+)}$/.exec(ve)))return[new Je(Y,ve,'"'+Se+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(ct[1])+" }`.")];var Bt=[];return M.layerType==="symbol"&&(Se==="text-field"&&ae&&!ae.glyphs&&Bt.push(new Je(Y,ve,'use of "text-field" requires a style "glyphs" property')),Se==="text-font"&&Ne(kt(ve))&&ut(ve.type)==="identity"&&Bt.push(new Je(Y,ve,'"text-font" does not support identity functions'))),Bt.concat(nr({key:M.key,value:ve,valueSpec:gt,style:ae,styleSpec:he,expressionContext:"property",propertyType:O,propertyKey:Se}))}function Oi(M){return di(M,"paint")}function Wi(M){return di(M,"layout")}function Zi(M){var O=[],Y=M.value,ae=M.key,he=M.style,ve=M.styleSpec;Y.type||Y.ref||O.push(new Je(ae,Y,'either "type" or "ref" is required'));var Se,Fe=ut(Y.type),Ke=ut(Y.ref);if(Y.id)for(var ct=ut(Y.id),gt=0;gt<M.arrayIndex;gt++){var Bt=he.layers[gt];ut(Bt.id)===ct&&O.push(new Je(ae,Y.id,'duplicate layer id "'+Y.id+'", previously used at line '+Bt.id.__line__))}if("ref"in Y)["type","source","source-layer","filter","layout"].forEach(function(rr){rr in Y&&O.push(new Je(ae,Y[rr],'"'+rr+'" is prohibited for ref layers'))}
94),he.layers.forEach(function(rr){ut(rr.id)===Ke&&(Se=rr)}),Se?Se.ref?O.push(new Je(ae,Y.ref,"ref cannot reference another ref layer")):Fe=ut(Se.type):O.push(new Je(ae,Y.ref,'ref layer "'+Ke+'" not found'));else if(Fe!=="background")if(Y.source){var Zt=he.sources&&he.sources[Y.source],qt=Zt&&ut(Zt.type);Zt?qt==="vector"&&Fe==="raster"?O.push(new Je(ae,Y.source,'layer "'+Y.id+'" requires a raster source')):qt==="raster"&&Fe!=="raster"?O.push(new Je(ae,Y.source,'layer "'+Y.id+'" requires a vector source')):qt!=="vector"||Y["source-layer"]?qt==="raster-dem"&&Fe!=="hillshade"?O.push(new Je(ae,Y.source,"raster-dem source can only be used with layer type 'hillshade'.")):Fe!=="line"||!Y.paint||!Y.paint["line-gradient"]||qt==="geojson"&&Zt.lineMetrics||O.push(new Je(ae,Y,'layer "'+Y.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):O.push(new Je(ae,Y,'layer "'+Y.id+'" must specify a "source-layer"')):O.push(new Je(ae,Y.source,'source "'+Y.source+'" not found'))}else O.push(new Je(ae,Y,'missing required property "source"'));return O=O.concat(Pr({key:ae,value:Y,valueSpec:ve.layer,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return nr({key:ae+".type",value:Y.type,valueSpec:ve.layer.type,style:M.style,styleSpec:M.styleSpec,object:Y,objectKey:"type"})},filter:ri,layout:function(rr){return Pr({layer:Y,key:rr.key,value:rr.value,style:rr.style,styleSpec:rr.styleSpec,objectElementValidators:{"*":function(gr){return Wi(ht({layerType:Fe},gr))}}})},paint:function(rr){return Pr({layer:Y,key:rr.key,value:rr.value,style:rr.style,styleSpec:rr.styleSpec,objectElementValidators:{"*":function(gr){return Oi(ht({layerType:Fe},gr))}}})}}}))}function Xi(M){var O=M.value,Y=M.key,ae=Ba(O);return ae!=="string"?[new Je(Y,O,"string expected, "+ae+" found")]:[]}var Ji={promoteId:function(M){var O=M.key,Y=M.value;if(Ba(Y)==="string")return Xi({key:O,value:Y});var ae=[];for(var he in Y)ae.push.apply(ae,Xi({key:O+"."+he,value:Y[he]}));return ae}};function Ea(M){var O=M.value,Y=M.key,ae=M.styleSpec,he=M.style;if(!O.type)return[new Je(Y,O,'"type" is required')];var ve,Se=ut(O.type);switch(Se){case"vector":case"raster":case"raster-dem":return ve=Pr({key:Y,value:O,valueSpec:ae["source_"+Se.replace("-","_")],style:M.style,styleSpec:ae,objectElementValidators:Ji});case"geojson":if(ve=Pr({key:Y,value:O,valueSpec:ae.source_geojson,style:he,styleSpec:ae,objectElementValidators:Ji}),O.cluster)for(var Fe in O.clusterProperties){var Ke=O.clusterProperties[Fe],ct=Ke[0],gt=Ke[1],Bt=typeof ct=="string"?[ct,["accumulated"],["get",Fe]]:ct;ve.push.apply(ve,On({key:Y+"."+Fe+".map",value:gt,expressionContext:"cluster-map"})),ve.push.apply(ve,On({key:Y+"."+Fe+".reduce",value:Bt,expressionContext:"cluster-reduce"}))}return ve;case"video":return Pr({key:Y,value:O,valueSpec:ae.source_video,style:he,styleSpec:ae});case"image":return Pr({key:Y,value:O,valueSpec:ae.source_image,style:he,styleSpec:ae});case"canvas":return[new Je(Y,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Un({key:Y+".type",value:O.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:he,styleSpec:ae})}}function ft(M){var O=M.value,Y=M.styleSpec,ae=Y.light,he=M.style,ve=[],Se=Ba(O);if(O===void 0)return ve;if(Se!=="object")return ve=ve.concat([new Je("light",O,"object expected, "+Se+" found")]);for(var Fe in O){var Ke=Fe.match(/^(.*)-transition$/);ve=Ke&&ae[Ke[1]]&&ae[Ke[1]].transition?ve.concat(nr({key:Fe,value:O[Fe],valueSpec:Y.transition,style:he,styleSpec:Y})):ae[Fe]?ve.concat(nr({key:Fe,value:O[Fe],valueSpec:ae[Fe],style:he,styleSpec:Y})):ve.concat([new Je(Fe,O[Fe],'unknown property "'+Fe+'"')])}return ve}var Rt={"*":function(){return[]},array:nn,boolean:function(M){var O=M.value,Y=M.key,ae=Ba(O);return ae!=="boolean"?[new Je(Y,O,"boolean expected, "+ae+" found")]:[]},number:dn,color:function(M){var O=M.key,Y=M.value,ae=Ba(Y);return ae!=="string"?[new Je(O,Y,"color expected, "+ae+" found")]:pr(Y)===null?[new Je(O,Y,'color expected, "'+Y+'" found')]:[]},constants:it,enum:Un,filter:ri,function:En,layer:Zi,object:Pr,source:Ea,light:ft,string:Xi,formatted:function(M){return Xi(M).length===0?[]:On(M)},resolvedImage:function(M){return Xi(M).length===0?[]:On(M)}};function nr(M){var O=M.value,Y=M.valueSpec,ae=M.styleSpec;return Y.expression&&Ne(ut(O))?En(M):Y.expression&&$t(kt(O))?On(M):Y.type&&Rt[Y.type]?Rt[Y.type](M):Pr(ht({},M,{valueSpec:Y.type?ae[Y.type]:Y}))}function Ht(M){var O=M.value,Y=M.key,ae=Xi(M);return ae.length||(O.indexOf("{fontstack}")===-1&&ae.push(new Je(Y,O,'"glyphs" url must include a "{fontstack}" token')),O.indexOf("{range}")===-1&&ae.push(new Je(Y,O,'"glyphs" url must include a "{range}" token'))),ae}function ir(M,O){O===void 0&&(O=Ce);var Y=[];return Y=Y.concat(nr({key:"",value:M,valueSpec:O.$root,styleSpec:O,style:M,objectElementValidators:{glyphs:Ht,"*":function(){return[]}}})),M.constants&&(Y=Y.concat(it({key:"constants",value:M.constants,style:M,styleSpec:O}))),Lr(Y)}function Lr(M){return[].concat(M).sort(function(O,Y){return O.line-Y.line})}function Dr(M){return function(){for(var O=[],Y=arguments.length;Y--;)O[Y]=arguments[Y];return Lr(M.apply(this,O))}}ir.source=Dr(Ea),ir.light=Dr(ft),ir.layer=Dr(Zi),ir.filter=Dr(ri),ir.paintProperty=Dr(Oi),ir.layoutProperty=Dr(Wi);var Yr=ir,sn=Yr.light,an=Yr.paintProperty,gn=Yr.layoutProperty;function Tn(M,O){var Y=!1;if(O&&O.length)for(var ae=0,he=O;ae<he.length;ae+=1){var ve=he[ae];M.fire(new Le(new Error(ve.message))),Y=!0}return Y}var ln=kn;function kn(M,O,Y){var ae=this.cells=[];if(M instanceof ArrayBuffer){this.arrayBuffer=M;var he=new Int32Array(this.arrayBuffer);M=he[0],O=he[1],Y=he[2],this.d=O+2*Y;for(var ve=0;ve<this.d*this.d;ve++){var Se=he[3+ve],Fe=he[3+ve+1];ae.push(Se===Fe?null:he.subarray(Se,Fe))}var Ke=he[3+ae.length],ct=he[3+ae.length+1];this.keys=he.subarray(Ke,ct),this.bboxes=he.subarray(ct),this.insert=this._insertReadonly}else{this.d=O+2*Y;for(var gt=0;gt<this.d*this.d;gt++)ae.push([]);this.keys=[],this.bboxes=[]}this.n=O,this.extent=M,this.padding=Y,this.scale=O/M,this.uid=0;var Bt=Y/O*M;this.min=-Bt,this.max=M+Bt}
vendor: 4,096 bytes, line 94
94kn.prototype.insert=function(M,O,Y,ae,he){this._forEachCell(O,Y,ae,he,this._insertCell,this.uid++),this.keys.push(M),this.bboxes.push(O),this.bboxes.push(Y),this.bboxes.push(ae),this.bboxes.push(he)},kn.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},kn.prototype._insertCell=function(M,O,Y,ae,he,ve){this.cells[he].push(ve)},kn.prototype.query=function(M,O,Y,ae,he){var ve=this.min,Se=this.max;if(M<=ve&&O<=ve&&Se<=Y&&Se<=ae&&!he)return Array.prototype.slice.call(this.keys);var Fe=[];return this._forEachCell(M,O,Y,ae,this._queryCell,Fe,{},he),Fe},kn.prototype._queryCell=function(M,O,Y,ae,he,ve,Se,Fe){var Ke=this.cells[he];if(Ke!==null)for(var ct=this.keys,gt=this.bboxes,Bt=0;Bt<Ke.length;Bt++){var Zt=Ke[Bt];if(Se[Zt]===void 0){var qt=4*Zt;(Fe?Fe(gt[qt+0],gt[qt+1],gt[qt+2],gt[qt+3]):M<=gt[qt+2]&&O<=gt[qt+3]&&Y>=gt[qt+0]&&ae>=gt[qt+1])?(Se[Zt]=!0,ve.push(ct[Zt])):Se[Zt]=!1}}},kn.prototype._forEachCell=function(M,O,Y,ae,he,ve,Se,Fe){for(var Ke=this._convertToCellCoord(M),ct=this._convertToCellCoord(O),gt=this._convertToCellCoord(Y),Bt=this._convertToCellCoord(ae),Zt=Ke;Zt<=gt;Zt++)for(var qt=ct;qt<=Bt;qt++){var rr=this.d*qt+Zt;if((!Fe||Fe(this._convertFromCellCoord(Zt),this._convertFromCellCoord(qt),this._convertFromCellCoord(Zt+1),this._convertFromCellCoord(qt+1)))&&he.call(this,M,O,Y,ae,rr,ve,Se,Fe))return}},kn.prototype._convertFromCellCoord=function(M){return(M-this.padding)/this.scale},kn.prototype._convertToCellCoord=function(M){return Math.max(0,Math.min(this.d-1,Math.floor(M*this.scale)+this.padding))},kn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var M=this.cells,O=3+this.cells.length+1+1,Y=0,ae=0;ae<this.cells.length;ae++)Y+=this.cells[ae].length;var he=new Int32Array(O+Y+this.keys.length+this.bboxes.length);he[0]=this.extent,he[1]=this.n,he[2]=this.padding;for(var ve=O,Se=0;Se<M.length;Se++){var Fe=M[Se];he[3+Se]=ve,he.set(Fe,ve),ve+=Fe.length}return he[3+M.length]=ve,he.set(this.keys,ve),ve+=this.keys.length,he[3+M.length+1]=ve,he.set(this.bboxes,ve),ve+=this.bboxes.length,he.buffer};var Dn=self.ImageData,jn=self.ImageBitmap,$n={};function Zr(M,O,Y){Y===void 0&&(Y={}),Object.defineProperty(O,"_classRegistryKey",{value:M,writeable:!1}),$n[M]={klass:O,omit:Y.omit||[],shallow:Y.shallow||[]}}for(var Jn in Zr("Object",Object),ln.serialize=function(M,O){var Y=M.toArrayBuffer();return O&&O.push(Y),{buffer:Y}},ln.deserialize=function(M){return new ln(M.buffer)},Zr("Grid",ln),Zr("Color",ar),Zr("Error",Error),Zr("ResolvedImage",dr),Zr("StylePropertyFunction",yr),Zr("StyleExpression",Jt,{omit:["_evaluator"]}),Zr("ZoomDependentExpression",ur),Zr("ZoomConstantExpression",tr),Zr("CompoundExpression",$r,{omit:["_evaluate"]}),Fo)Fo[Jn]._classRegistryKey||Zr("Expression_"+Jn,Fo[Jn]);function Cn(M){return M&&typeof ArrayBuffer<"u"&&(M instanceof ArrayBuffer||M.constructor&&M.constructor.name==="ArrayBuffer")}function Bn(M){return jn&&M instanceof jn}function Xn(M,O){if(M==null||typeof M=="boolean"||typeof M=="number"||typeof M=="string"||M instanceof Boolean||M instanceof Number||M instanceof String||M instanceof Date||M instanceof RegExp)return M;if(Cn(M)||Bn(M))return O&&O.push(M),M;if(ArrayBuffer.isView(M)){var Y=M;return O&&O.push(Y.buffer),Y}if(M instanceof Dn)return O&&O.push(M.data.buffer),M;if(Array.isArray(M)){for(var ae=[],he=0,ve=M;he<ve.length;he+=1){var Se=ve[he];ae.push(Xn(Se,O))}return ae}if(typeof M=="object"){var Fe=M.constructor,Ke=Fe._classRegistryKey;if(!Ke)throw new Error("can't serialize object of unregistered class");var ct=Fe.serialize?Fe.serialize(M,O):{};if(!Fe.serialize){for(var gt in M)if(M.hasOwnProperty(gt)&&!($n[Ke].omit.indexOf(gt)>=0)){var Bt=M[gt];ct[gt]=$n[Ke].shallow.indexOf(gt)>=0?Bt:Xn(Bt,O)}M instanceof Error&&(ct.message=M.message)}if(ct.$name)throw new Error("$name property is reserved for worker serialization logic.");return Ke!=="Object"&&(ct.$name=Ke),ct}throw new Error("can't serialize object of type "+typeof M)}function xa(M){if(M==null||typeof M=="boolean"||typeof M=="number"||typeof M=="str
94ing"||M instanceof Boolean||M instanceof Number||M instanceof String||M instanceof Date||M instanceof RegExp||Cn(M)||Bn(M)||ArrayBuffer.isView(M)||M instanceof Dn)return M;if(Array.isArray(M))return M.map(xa);if(typeof M=="object"){var O=M.$name||"Object",Y=$n[O].klass;if(!Y)throw new Error("can't deserialize unregistered class "+O);if(Y.deserialize)return Y.deserialize(M);for(var ae=Object.create(Y.prototype),he=0,ve=Object.keys(M);he<ve.length;he+=1){var Se=ve[he];if(Se!=="$name"){var Fe=M[Se];ae[Se]=$n[O].shallow.indexOf(Se)>=0?Fe:xa(Fe)}}return ae}throw new Error("can't deserialize object of type "+typeof M)}var Ma=function(){this.first=!0};Ma.prototype.update=function(M,O){var Y=Math.floor(M);return this.first?(this.first=!1,this.lastIntegerZoom=Y,this.lastIntegerZoomTime=0,this.lastZoom=M,this.lastFloorZoom=Y,!0):(this.lastFloorZoom>Y?(this.lastIntegerZoom=Y+1,this.lastIntegerZoomTime=O):this.lastFloorZoom<Y&&(this.lastIntegerZoom=Y,this.lastIntegerZoomTime=O),M!==this.lastZoom&&(this.lastZoom=M,this.lastFloorZoom=Y,!0))};var Sn={"Latin-1 Supplement":function(M){return M>=128&&M<=255},Arabic:function(M){return M>=1536&&M<=1791},"Arabic Supplement":function(M){return M>=1872&&M<=1919},"Arabic Extended-A":function(M){return M>=2208&&M<=2303},"Hangul Jamo":function(M){return M>=4352&&M<=4607},"Unified Canadian Aboriginal Syllabics":function(M){return M>=5120&&M<=5759},Khmer:function(M){return M>=6016&&M<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(M){return M>=6320&&M<=6399},"General Punctuation":function(M){return M>=8192&&M<=8303},"Letterlike Symbols":function(M){return M>=8448&&M<=8527},"Number Forms":function(M){return M>=8528&&M<=8591},"Miscellaneous Technical":function(M){return M>=8960&&M<=9215},"Control Pictures":function(M){return M>=9216&&M<=9279},"Optical Character Recognition":function(M){return M>=9280&&M<=9311},"Enclosed Alphanumerics":function(M){return M>=9312&&M<=9471},"Geometric Shapes":function(M){return M>=9632&&M<=9727},"Miscellaneous Symbols":function(M){return M>=9728&&M<=9983},"Miscellaneous Symbols and Arrows":function(M){return M>=11008&&M<=11263},"CJK Radicals Supplement":function(M){return M>=11904&&M<=12031},"Kangxi Radicals":function(M){return M>=12032&&M<=12255},"Ideographic Description Characters":function(M){return M>=12272&&M<=12287},"CJK Symbols and Punctuation":function(M){return M>=12288&&M<=12351},Hiragana:function(M){return M>=12352&&M<=12447},Katakana:function(M){return M>=12448&&M<=12543},Bopomofo:function(M){return M>=12544&&M<=12591},"Hangul Compatibility Jamo":function(M){return M>=12592&&M<=12687},Kanbun:function(M){return M>=12688&&M<=12703},"Bopomofo Extended":function(M){return M>=12704&&M<=12735},"CJK Strokes":function(M){return M>=12736&&M<=12783},"Katakana Phonetic Extensions":function(M){return M>=12784&&M<=12799},"Enclosed CJK Letters and Months":function(M){return M>=12800&&M<=13055},"CJK Compatibility":function(M){return M>=13056&&M<=13311},"CJK Unified Ideographs Extension A":function(M){return M>=13312&&M<=19903},"Yijing Hexagram Symbols":function(M){return M>=19904&&M<=19967},"CJK Unified Ideographs":function(M){return M>=19968&&M<=40959},"Yi Syllables":function(M){return M>=40960&&M<=42127},"Yi Radicals":function(M){return M>=42128&&M<=42191},"Hangul Jamo Extended-A":function(M){return M>=43360&&M<=43391},"Hangul Syllables":function(M){return M>=44032&&M<=55215},"Hangul Jamo Extended-B":function(M){return M>=55216&&M<=55295},"Private Use Area":function(M){return M>=57344&&M<=63743},"CJK Compatibility Ideographs":function(M){return M>=63744&&M<=64255},"Arabic Presentation Forms-A":function(M){return M>=64336&&M<=65023},"Vertical Forms":function(M){return M>=65040&&M<=65055},"CJK Compatibility Forms":function(M){return M>=65072&&M<=65103},"Small Form Variants":function(M){return M>=65104&&M<=65135},"Arabic Presentation Forms-B":function(M){return M>=65136&&M<=65279},"Halfwidth and Fullwidth Forms":function(M){return M>=65280&&M<=65519}};function La(M){for(var O=0,Y=M;O<Y.length;O+=1)if(fa(Y[O].charCodeAt(0)))return!0;return!1}function Ta(M){return!Sn.Arabic(M)&&!Sn["Arabic Supplement"](M)&&!Sn["Arabic Extended-A"](M)&&!Sn["Arabic Presentation Forms-A"](M)&&!Sn["Arabic Presentation Forms-B"](M)}function fa(M){return M===746||M===747||!(M<4352)&&(!!Sn["Bopomofo Extended"](M)||!!Sn.Bopomofo(M)||!(!Sn["CJK Compatibility Forms"](M)||M>=65097&&M<=65103)||!!Sn["CJK Compatibility Ideographs"](M)||!!Sn["CJK Compatibility"](M)||!!Sn["CJK Radicals Supplement"](M)||!!Sn["CJK Strokes"](M)||!(!Sn["CJK Symbols and Punctuation"](M)||M>=12296&&M<=12305||M>=12308&&M<=12319||M===12336)||!!Sn["CJK Unified Ideographs Extension A"](M)||!!Sn["CJK Unified Ideographs"](M)||!!Sn["Enclosed CJK Letters and Months"](M)||!!Sn["Hangul Compatibility Jamo"](M)||!!Sn["Hangul Jamo Extended-A"](M)||!!Sn["Hangul Jamo Extended-B"](M)||!!Sn["Hangul Jamo"](M)||!!Sn["Hangul Syllables"](M)||!!Sn.Hiragana(M)||!!Sn["Ideographic Description Characters"](M)||!!Sn.Kanbun(M)||!!Sn["Kangxi Radicals"](M)||!!Sn["Katakana Phonet
94ic Extensions"](M)||!(!Sn.Katakana(M)||M===12540)||!(!Sn["Halfwidth and Fullwidth Forms"](M)||M===65288||M===65289||M===65293||M>=65306&&M<=65310||M===65339||M===65341||M===65343||M>=65371&&M<=65503||M===65507||M>=65512&&M<=65519)||!(!Sn["Small Form Variants"](M)||M>=65112&&M<=65118||M>=65123&&M<=65126)||!!Sn["Unified Canadian Aboriginal Syllabics"](M)||!!Sn["Unified Canadian Aboriginal Syllabics Extended"](M)||!!Sn["Vertical Forms"](M)||!!Sn["Yijing Hexagram Symbols"](M)||!!Sn["Yi Syllables"](M)||!!Sn["Yi Radicals"](M))}function Ca(M){return!(fa(M)||function(O){return!(!Sn["Latin-1 Supplement"](O)||O!==167&&O!==169&&O!==174&&O!==177&&O!==188&&O!==189&&O!==190&&O!==215&&O!==247)||!(!Sn["General Punctuation"](O)||O!==8214&&O!==8224&&O!==8225&&O!==8240&&O!==8241&&O!==8251&&O!==8252&&O!==8258&&O!==8263&&O!==8264&&O!==8265&&O!==8273)||!!Sn["Letterlike Symbols"](O)||!!Sn["Number Forms"](O)||!(!Sn["Miscellaneous Technical"](O)||!(O>=8960&&O<=8967||O>=8972&&O<=8991||O>=8996&&O<=9e3||O===9003||O>=9085&&O<=9114||O>=9150&&O<=9165||O===9167||O>=9169&&O<=9179||O>=9186&&O<=9215))||!(!Sn["Control Pictures"](O)||O===9251)||!!Sn["Optical Character Recognition"](O)||!!Sn["Enclosed Alphanumerics"](O)||!!Sn["Geometric Shapes"](O)||!(!Sn["Miscellaneous Symbols"](O)||O>=9754&&O<=9759)||!(!Sn["Miscellaneous Symbols and Arrows"](O)||!(O>=11026&&O<=11055||O>=11088&&O<=11097||O>=11192&&O<=11243))||!!Sn["CJK Symbols and Punctuation"](O)||!!Sn.Katakana(O)||!!Sn["Private Use Area"](O)||!!Sn["CJK Compatibility Forms"](O)||!!Sn["Small Form Variants"](O)||!!Sn["Halfwidth and Fullwidth Forms"](O)||O===8734||O===8756||O===8757||O>=9984&&O<=10087||O>=10102&&O<=10131||O===65532||O===65533}(M))}function _a(M){return M>=1424&&M<=2303||Sn["Arabic Presentation Forms-A"](M)||Sn["Arabic Presentation Forms-B"](M)}function Za(M,O){return!(!O&&_a(M))&&!(M>=2304&&M<=3583||M>=3840&&M<=4255||Sn.Khmer(M))}function Kn(M){for(var O=0,Y=M;O<Y.length;O+=1)if(_a(Y[O].charCodeAt(0)))return!0;return!1}var Va="deferred",zi="loading",Go="loaded",Co="error",fo=null,da="unavailable",ci=null,ho=function(M){M&&typeof M=="string"&&M.indexOf("NetworkError")>-1&&(da=Co),fo&&fo(M)};function Ha(){yi.fire(new ke("pluginStateChange",{pluginStatus:da,pluginURL:ci}))}var yi=new Ie,Ni=function(){return da},Ja=function(){if(da!==Va||!ci)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");da=zi,Ha(),ci&&Tt({url:ci},function(M){M?ho(M):(da=Go,Ha())})},io={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return da===Go||io.applyArabicShaping!=null},isLoading:function(){return da===zi},setState:function(M){da=M.pluginStatus,ci=M.pluginURL},isParsed:function(){return io.applyArabicShaping!=null&&io.processBidirectionalText!=null&&io.processStyledBidirectionalText!=null},getPluginURL:function(){return ci}},Ka=function(M,O){this.zoom=M,O?(this.now=O.now,this.fadeDuration=O.fadeDuration,this.zoomHistory=O.zoomHistory,this.transition=O.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ma,this.transition={})};Ka.prototype.isSupportedScript=function(M){return function(O,Y){for(var ae=0,he=O;ae<he.length;ae+=1)if(!Za(he[ae].charCodeAt(0),Y))return!1;return!0}(M,io.isLoaded())},Ka.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ka.prototype.getCrossfadeParameters=function(){var M=this.zoom,O=M-Math.floor(M),Y=this.crossFadingFactor();return M>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:O+(1-O)*Y}:{fromScale:.5,toScale:1,t:1-(1-Y)*O}};var Ki=function(M,O){this.property=M,this.value=O,this.expression=function(Y,ae){if(Ne(Y))return new yr(Y,ae);if($t(Y)){var he=mr(Y,ae);if(he.result==="error")throw new Error(he.value.map(function(Se){return Se.key+": "+Se.message}).join(", "));return he.value}var ve=Y;return typeof Y=="string"&&ae.type==="color"&&(ve=ar.parse(Y)),{kind:"constant",evaluate:function(){return ve}}}(O===void 0?M.specification.default:O,M.specification)};Ki.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ki.prototype.possiblyEvaluate=function(M,O,Y){return this.property.possiblyEvaluate(this,M,O,Y)};var as=function(M){this.property=M,this.value=new Ki(M,void 0)};as.prototype.transitioned=function(M,O){return new zs(this.property,this.value,O,s({},M.transition,this.transition),M.now)},as.prototype.untransitioned=function(){return new zs(this.property,this.value,
94null,{},0)};var Qo=function(M){this._properties=M,this._values=Object.create(M.defaultTransitionablePropertyValues)};Qo.prototype.getValue=function(M){return k(this._values[M].value.value)},Qo.prototype.setValue=function(M,O){this._values.hasOwnProperty(M)||(this._values[M]=new as(this._values[M].property)),this._values[M].value=new Ki(this._values[M].property,O===null?void 0:k(O))},Qo.prototype.getTransition=function(M){return k(this._values[M].transition)},Qo.prototype.setTransition=function(M,O){this._values.hasOwnProperty(M)||(this._values[M]=new as(this._values[M].property)),this._values[M].transition=k(O)||void 0},Qo.prototype.serialize=function(){for(var M={},O=0,Y=Object.keys(this._values);O<Y.length;O+=1){var ae=Y[O],he=this.getValue(ae);he!==void 0&&(M[ae]=he);var ve=this.getTransition(ae);ve!==void 0&&(M[ae+"-transition"]=ve)}return M},Qo.prototype.transitioned=function(M,O){for(var Y=new Li(this._properties),ae=0,he=Object.keys(this._values);ae<he.length;ae+=1){var ve=he[ae];Y._values[ve]=this._values[ve].transitioned(M,O._values[ve])}return Y},Qo.prototype.untransitioned=function(){for(var M=new Li(this._properties),O=0,Y=Object.keys(this._values);O<Y.length;O+=1){var ae=Y[O];M._values[ae]=this._values[ae].untransitioned()}return M};var zs=function(M,O,Y,ae,he){this.property=M,this.value=O,this.begin=he+ae.delay||0,this.end=this.begin+ae.duration||0,M.specification.transition&&(ae.delay||ae.duration)&&(this.prior=Y)};zs.prototype.possiblyEvaluate=function(M,O,Y){var ae=M.now||0,he=this.value.possiblyEvaluate(M,O,Y),ve=this.prior;if(ve){if(ae>this.end)return this.prior=null,he;if(this.value.isDataDriven())return this.prior=null,he;if(ae<this.begin)return ve.possiblyEvaluate(M,O,Y);var Se=(ae-this.begin)/(this.end-this.begin);return this.property.interpolate(ve.possiblyEvaluate(M,O,Y),he,function(Fe){if(Fe<=0)return 0;if(Fe>=1)return 1;var Ke=Fe*Fe,ct=Ke*Fe;return 4*(Fe<.5?ct:3*(Fe-Ke)+ct-.75)}(Se))}return he};var Li=function(M){this._properties=M,this._values=Object.create(M.defaultTransitioningPropertyValues)};Li.prototype.possiblyEvaluate=function(M,O,Y){for(var ae=new $o(this._properties),he=0,ve=Object.keys(this._values);he<ve.length;he+=1){var Se=ve[he];ae._values[Se]=this._values[Se].possiblyEvaluate(M,O,Y)}return ae},Li.prototype.hasTransition=function(){for(var M=0,O=Object.keys(this._values);M<O.length;M+=1){var Y=O[M];if(this._values[Y].prior)return!0}return!1};var Ds=function(M){this._properties=M,this._values=Object.create(M.defaultPropertyValues)};Ds.prototype.getValue=function(M){return k(this._values[M].value)},Ds.prototype.setValue=function(M,O){this._values[M]=new Ki(this._values[M].property,O===null?void 0:k(O))},Ds.prototype.serialize=function(){for(var M={},O=0,Y=Object.keys(this._values);O<Y.length;O+=1){var ae=Y[O],he=this.getValue(ae);he!==void 0&&(M[ae]=he)}return M},Ds.prototype.possiblyEvaluate=function(M,O,Y){for(var ae=new $o(this._properties),he=0,ve=Object.keys(this._values);he<ve.length;he+=1){var Se=ve[he];ae._values[Se]=this._values[Se].possiblyEvaluate(M,O,Y)}return ae};var Ci=function(M,O,Y){this.property=M,this.value=O,this.parameters=Y};Ci.prototype.isConstant=function(){return this.value.kind==="constant"},Ci.prototype.constantOr=function(M){return this.value.kind==="constant"?this.value.value:M},Ci.prototype.evaluate=function(M,O,Y,ae){return this.property.evaluate(this.value,this.parameters,M,O,Y,ae)};var $o=function(M){this._properties=M,this._values=Object.create(M.defaultPossiblyEvaluatedValues)};$o.prototype.get=function(M){return this._values[M]};var ia=function(M){this.specification=M};ia.prototype.possiblyEvaluate=function(M,O){return M.expression.evaluate(O)},ia.prototype.interpolate=function(M,O,Y){var ae=vn[this.specification.type];return ae?ae(M,O,Y):M};var ga=function(M,O){this.specification=M,this.overrides=O};ga.prototype.possiblyEvaluate=function(M,O,Y,ae){return M.expression.kind==="constant"||M.expression.kind==="camera"?new Ci(this,{kind:"constant",value:M.expression.evaluate(O,null,{},Y,ae)},O):new Ci(this,M.expression,O)},ga.prototype.interpolate=function(M,O,Y){if(M.value.kind!=="constant"||O.value.kind!=="constant")return M;if(M.value.value===void 0||O.value.value===void 0)return new Ci(this,{kind:"constant",value:void 0},M.parameters);var ae=vn[this.specification.type];return ae?new Ci(this,{kind:"constant",value:ae(M.value.value,O.value.value,Y)},M.parameters):M},ga.prototype.evaluate=function(M,O,Y,ae,he,ve){return M.kind==="constant"?M.value:M.evaluate(O,Y,ae,he,ve)};var Rs=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.possiblyEvaluate=function(Y,ae,he,ve){if(Y.value===void 0)return new Ci(this,{kind:"constant",value:void 0},ae);if(Y.expression.kind==="constant"){var Se=Y.expression.evaluate(ae,null,{},he,ve),Fe=Y.property.specification.type==="resolvedImage"&&typeof Se!="string"?Se.name:Se,Ke=this._calculate(Fe,Fe,Fe,ae);return new Ci(this,{kind:"constant",value:Ke},ae)}if(Y.expression.kind==="camera"){var ct=this._calculate(Y.expression.evaluate({zoom:ae.zoom-1}),Y.expression.evaluate({zoom:ae.zoom}),Y.expression.evaluate({zoom:ae.zoom+1}),ae);return new Ci(this,{kind:"constant",value:ct},ae)}return new Ci(this,Y.expression,ae)},O.prototype.evaluate=function(Y,ae,he,ve,Se,Fe){if(Y.kind==="source"){var Ke=Y.evaluate(ae,he,ve,Se,Fe);return this._calculate(Ke,Ke,Ke,ae)}return Y.kind==="composite"?this._calculate(Y.evaluate({zoom:Math.floor(ae.zoom)-1},he,ve),Y.evaluate({zoom:Math.floor(ae.zoom)},he,ve),Y.evaluate({zoom:Math.floor(ae.zoom)+1},he,ve),ae):Y.value},O.prototype._calculate=function(Y,ae,he,ve){return ve.zoom>ve.zoomHistory.lastIntegerZoom?{from:Y,to:ae}:{from:he,to:ae}},O.prototype.interpolate=function(Y){return Y},O}(ga),Fs=function(M){this.specification=M};Fs.prototype.possiblyEvaluate=function(M,O,Y,ae){if(M.value!==void 0){if(M.expression.kind==="constant"){var he=M.expression.evaluate(O,null,{},Y,ae);return this._calculate(he,he,he,O)}return this._calculate(M.expression.evaluate(new Ka(Math.floor(O.zoom-1),O)),M.expression.evaluate(new Ka(Math.floor(O.zoom),O)),M.expression.evaluate(new Ka(Math.floor(O.zoom+1),O)),O)}},Fs.prototype._calculate=function(M,O,Y,ae){return ae.zoom>ae.zoomHistory.lastIntegerZoom?{from:M,to:O}:{from:Y,to:O}},Fs.prototype.interpolate=function(M){return M};var es=function(M){this.specification=M};es.prototype.possiblyEvaluate=function(M,O,Y,ae){return!!M.expression.evaluate(O,null,{},Y,ae)},es.prototype.interpolate=function(){return!1};var Ao=function(M){for(var O in this.properties=M,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],M){var Y=M[O];Y.specification.overridable&&this.overridableProperties.push(O);var ae=this.defaultPropertyValues[O]=new Ki(Y,void 0),he=this.defaultTransitionablePropertyValues[O]=new as(Y);this.defaultTransitioningPropertyValues[O]=he.untransitioned(),this.defaultPossiblyEvaluatedValues[O]=ae.possiblyEvaluate({})}};Zr("DataDrivenProperty",ga),Zr("DataConstantProperty",ia),Zr("CrossFadedDataDrivenProperty",Rs),Zr("CrossFadedProperty",Fs),Zr("ColorRampProperty",es);var Uo=function(M){function O(Y,ae){if(M.call(this),this.id=Y.id,this.type=Y.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},Y.type!=="custom"&&(Y=Y,this.metadata=Y.metadata,this.minzoom=Y.minzoom,this.maxzoom=Y.maxzoom,Y.type!=="background"&&(this.source=Y.source,this.sourceLayer=Y["source-layer"],this.filter=Y.filter),ae.layout&&(this._unevaluatedLayout=new Ds(ae.layout)),ae.paint)){for(var he in this._transitionablePaint=new Qo(ae.paint),Y.paint)this.setPaintProperty(he,Y.paint[he],{validate:!1});for(var ve in Y.layout)this.setLayoutProperty(ve,Y.layout[ve],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new $o(ae.paint)}}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},O.prototype.getLayoutProperty=function(Y){return Y==="visibility"?this.visibility:this._unevaluatedLayout.getValue(Y)},O.prototype.setLayoutProperty=function(Y,ae,he){if(he===void 0&&(he={}),ae!=null){var ve="layers."+this.id+".layout."+Y;
94if(this._validate(gn,ve,Y,ae,he))return}Y!=="visibility"?this._unevaluatedLayout.setValue(Y,ae):this.visibility=ae},O.prototype.getPaintProperty=function(Y){return w(Y,"-transition")?this._transitionablePaint.getTransition(Y.slice(0,-11)):this._transitionablePaint.getValue(Y)},O.prototype.setPaintProperty=function(Y,ae,he){if(he===void 0&&(he={}),ae!=null){var ve="layers."+this.id+".paint."+Y;if(this._validate(an,ve,Y,ae,he))return!1}if(w(Y,"-transition"))return this._transitionablePaint.setTransition(Y.slice(0,-11),ae||void 0),!1;var Se=this._transitionablePaint._values[Y],Fe=Se.property.specification["property-type"]==="cross-faded-data-driven",Ke=Se.value.isDataDriven(),ct=Se.value;this._transitionablePaint.setValue(Y,ae),this._handleSpecialPaintPropertyUpdate(Y);var gt=this._transitionablePaint._values[Y].value;return gt.isDataDriven()||Ke||Fe||this._handleOverridablePaintPropertyUpdate(Y,ct,gt)},O.prototype._handleSpecialPaintPropertyUpdate=function(Y){},O.prototype._handleOverridablePaintPropertyUpdate=function(Y,ae,he){return!1},O.prototype.isHidden=function(Y){return!!(this.minzoom&&Y<this.minzoom)||!!(this.maxzoom&&Y>=this.maxzoom)||this.visibility==="none"},O.prototype.updateTransitions=function(Y){this._transitioningPaint=this._transitionablePaint.transitioned(Y,this._transitioningPaint)},O.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},O.prototype.recalculate=function(Y,ae){Y.getCrossfadeParameters&&(this._crossfadeParameters=Y.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(Y,void 0,ae)),this.paint=this._transitioningPaint.possiblyEvaluate(Y,void 0,ae)}
vendor: 16,384 bytes, line 94
94,O.prototype.serialize=function(){var Y={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(Y.layout=Y.layout||{},Y.layout.visibility=this.visibility),T(Y,function(ae,he){return!(ae===void 0||he==="layout"&&!Object.keys(ae).length||he==="paint"&&!Object.keys(ae).length)})},O.prototype._validate=function(Y,ae,he,ve,Se){return Se===void 0&&(Se={}),(!Se||Se.validate!==!1)&&Tn(this,Y.call(Yr,{key:ae,layerType:this.type,objectKey:he,value:ve,styleSpec:Ce,style:{glyphs:!0,sprite:!0}}))},O.prototype.is3D=function(){return!1},O.prototype.isTileClipped=function(){return!1},O.prototype.hasOffscreenPass=function(){return!1},O.prototype.resize=function(){},O.prototype.isStateDependent=function(){for(var Y in this.paint._values){var ae=this.paint.get(Y);if(ae instanceof Ci&&jo(ae.property.specification)&&(ae.value.kind==="source"||ae.value.kind==="composite")&&ae.value.isStateDependent)return!0}return!1},O}(Ie),Js={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ts=function(M,O){this._structArray=M,this._pos1=O*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},qa=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Qa(M,O){O===void 0&&(O=1);var Y=0,ae=0;return{members:M.map(function(he){var ve,Se=(ve=he.type,Js[ve].BYTES_PER_ELEMENT),Fe=Y=hs(Y,Math.max(O,Se)),Ke=he.components||1;return ae=Math.max(ae,Se),Y+=Se*Ke,{name:he.name,type:he.type,components:Ke,offset:Fe}}),size:hs(Y,Math.max(ae,O)),alignment:O}}function hs(M,O){return Math.ceil(M/O)*O}qa.serialize=function(M,O){return M._trim(),O&&(M.isTransferred=!0,O.push(M.arrayBuffer)),{length:M.length,arrayBuffer:M.arrayBuffer}},qa.deserialize=function(M){var O=Object.create(this.prototype);return O.arrayBuffer=M.arrayBuffer,O.length=M.length,O.capacity=M.arrayBuffer.byteLength/O.bytesPerElement,O._refreshViews(),O},qa.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},qa.prototype.clear=function(){this.length=0},qa.prototype.resize=function(M){this.reserve(M),this.length=M},qa.prototype.reserve=function(M){if(M>this.capacity){this.capacity=Math.max(M,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var O=this.uint8;this._refreshViews(),O&&this.uint8.set(O)}},qa.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var is=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae){var he=this.length;return this.resize(he+1),this.emplace(he,Y,ae)},O.prototype.emplace=function(Y,ae,he){var ve=2*Y;return this.int16[ve+0]=ae,this.int16[ve+1]=he,Y},O}(qa);is.prototype.bytesPerElement=4,Zr("StructArrayLayout2i4",is);var Mi=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve){var Se=this.length;return this.resize(Se+1),this.emplace(Se,Y,ae,he,ve)},O.prototype.emplace=function(Y,ae,he,ve,Se){var Fe=4*Y;return this.int16[Fe+0]=ae,this.int16[Fe+1]=he,this.int16[Fe+2]=ve,this.int16[Fe+3]=Se,Y},O}(qa);Mi.prototype.bytesPerElement=8,Zr("StructArrayLayout4i8",Mi);var ps=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se,Fe){var Ke=this.length;return this.resize(Ke+1),this.emplace(Ke,Y,ae,he,ve,Se,Fe)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe,Ke){var ct=6*Y;return this.int16[ct+0]=ae,this.int16[ct+1]=he,this.int16[ct+2]=ve,this.int16[ct+3]=Se,this.int16[ct+4]=Fe,this.int16[ct+5]=Ke,Y},O}(qa);ps.prototype.bytesPerElement=12,Zr("StructArrayLayout2i4i12",ps);var ks=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se,Fe){var Ke=this.length;return this.resize(Ke+1),this.emplace(Ke,Y,ae,he,ve,Se,Fe)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe,Ke){var ct=4*Y,gt=8*Y;return this.int16[ct+0]=ae,this.int16[ct+1]=he,this.uint8[gt+4]=ve,this.uint8[gt+5]=Se,this.uint8[gt+6]=Fe,this.uint8[gt+7]=Ke,Y},O}(qa);ks.prototype.bytesPerElement=8,Zr("StructArrayLayout2i4ub8",ks);var vs=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt){var qt=9*Y,rr=18*Y;return this.uint16[qt+0]=ae,this.uint16[qt+1]=he,this.uint16[qt+2]=ve,this.uint16[qt+3]=Se,this.uint16[qt+4]=Fe,this.uint16[qt+5]=Ke,this.uint16[qt+6]=ct,this.uint16[qt+7]=gt,this.uint8[rr+16]=Bt,this.uint8[rr+17]=Zt,Y},O}(qa);vs.prototype.bytesPerElement=18,Zr("StructArrayLayout8ui2ub18",vs);var Ms=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt){var rr=this.length;return this.resize(rr+1),this.emplace(rr,Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr){var gr=12*Y;return this.int16[gr+0]=ae,this.int16[gr+1]=he,this.int16[gr+2]=ve,this.int16[gr+3]=Se,this.uint16[gr+4]=Fe,this.uint16[gr+5]=Ke,this.uint16[gr+6]=ct,this.uint16[gr+7]=gt,this.int16[gr+8]=Bt,this.int16[gr+9]=Zt,this.int16[gr+10]=qt,this.int16[gr+11]=rr,Y},O}(qa);Ms.prototype.bytesPerElement=24,Zr("StructArrayLayout4i4ui4i24",Ms);var os=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he){var ve=this.length;return this.resize(ve+1),this.emplace(ve,Y,ae,he)},O.prototype.emplace=function(Y,ae,he,ve){var Se=3*Y;return this.float32[Se+0]=ae,this.float32[Se+1]=he,this.float32[Se+2]=ve,Y},O}(qa);os.prototype.bytesPerElement=12,Zr("StructArrayLayout3f12",os);var Ks=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y){var ae=this.length;return this.resize(ae+1),this.emplace(ae,Y)},O.prototype.emplace=function(Y,ae){var he=1*Y;return this.uint32[he+0]=ae,Y},O}(qa);Ks.prototype.bytesPerElement=4,Zr("StructArrayLayout1ul4",Ks);var ol=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt){var Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,Y,ae,he,ve,Se,Fe,Ke,ct,gt)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt){var Zt=10*Y,qt=5*Y;return this.int16[Zt+0]=ae,this.int16[Zt+1]=he,this.int16[Zt+2]=ve,this.int16[Zt+3]=Se,this.int16[Zt+4]=Fe,this.int16[Zt+5]=Ke,this.uint32[qt+3]=ct,this.uint16[Zt+8]=gt,this.uint16[Zt+9]=Bt,Y},O}(qa);ol.prototype.bytesPerElement=20,Zr("StructArrayLayout6i1ul2ui20",ol);var ds=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se,Fe){var Ke=this.length;return this.resize(Ke+1),this.emplace(Ke,Y,ae,he,ve,Se,Fe)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe,Ke){var ct=6*Y;return this.int16[ct+0]=ae,this.int16[ct+1]=he,this.int16[ct+2]=ve,this.int16[ct+3]=Se,this.int16[ct+4]=Fe,this.int16[ct+5]=Ke,Y},O}(qa);ds.prototype.bytesPerElement=12,Zr("StructArrayLayout2i2i2i12",ds);var Qs=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,Y,ae,he,ve,Se)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe){var Ke=4*Y,ct=8*Y;return this.float32[Ke+0]=ae,this.float32[Ke+1]=he,this.float32[Ke+2]=ve,this.int16[ct+6]=Se,this.int16[ct+7]=Fe,Y},O}(qa);Qs.prototype.bytesPerElement=16,Zr("StructArrayLayout2f1f2i16",Qs);var As=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve){var Se=this.length;return this.resize(Se+1),this.emplace(Se,Y,ae,he,ve)},O.prototype.emplace=function(Y,ae,he,ve,Se){var Fe=12*Y,Ke=3*Y;return this.uint8[Fe+0]=ae,this.uint8[Fe+1]=he,this.float32[Ke+1]=ve,this.float32[Ke+2]=Se,Y},O}(qa);As.prototype.bytesPerElement=12,Zr("StructArrayLayout2ub2f12",As);var Qi=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he){var ve=this.length;return this.resize(ve+1),this.emplace(ve,Y,ae,he)},O.prototype.emplace=function(Y,ae,he,ve){var Se=3*Y;return this.uint16[Se+0]=ae,this.uint16[Se+1]=he,this.uint16[Se+2]=ve,Y},O}(qa);Qi.prototype.bytesPerElement=6,Zr("StructArrayLayout3ui6",Qi);var sl=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr,gr,Er,Sr,Rr){var Br=this.length;return this.resize(Br+1),this.emplace(Br,Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr,gr,Er,Sr,Rr)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr,gr,Er,Sr,Rr,Br){var Hr=24*Y,fn=12*Y,xn=48*Y;return this.int16[Hr+0]=ae,this.int16[Hr+1]=he,this.uint16[Hr+2]=ve,this.uint16[Hr+3]=Se,this.uint32[fn+2]=Fe,this.uint32[fn+3]=Ke,this.uint32[fn+4]=ct,this.uint16[Hr+10]=gt,this.uint16[Hr+11]=Bt,this.uint16[Hr+12]=Zt,this.float32[fn+7]=qt,this.float32[fn+8]=rr,this.uint8[xn+36]=gr,this.uint8[xn+37]=Er,this.uint8[xn+38]=Sr,this.uint32[fn+10]=Rr,this.int16[Hr+22]=Br,Y},O}(qa);sl.prototype.bytesPerElement=48,Zr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",sl);var ll=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr,gr,Er,Sr,Rr,Br,Hr,fn,xn,Fn,Rn,Hn,ta,ra,Wn,ca){var sa=this.length;return this.resize(sa+1),this.emplace(sa,Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr,gr,Er,Sr,Rr,Br,Hr,fn,xn,Fn,Rn,Hn,ta,ra,Wn,ca)},O.prototype.emplace=function(Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr,gr,Er,Sr,Rr,Br,Hr,fn,xn,Fn,Rn,Hn,ta,ra,Wn,ca,sa){var na=34*Y,Ga=17*Y;return this.int16[na+0]=ae,this.int16[na+1]=he,this.int16[na+2]=ve,this.int16[na+3]=Se,this.int16[na+4]=Fe,this.int16[na+5]=Ke,this.int16[na+6]=ct,this.int16[na+7]=gt,this.uint16[na+8]=Bt,this.uint16[na+9]=Zt,this.uint16[na+10]=qt,this.uint16[na+11]=rr,this.uint16[na+12]=gr,this.uint16[na+13]=Er,this.uint16[na+14]=Sr,this.uint16[na+15]=Rr,this.uint16[na+16]=Br,this.uint16[na+17]=Hr,this.uint16[na+18]=fn,this.uint16[na+19]=xn,this.uint16[na+20]=Fn,this.uint16[na+21]=Rn,this.uint16[na+22]=Hn,this.uint32[Ga+12]=ta,this.float32[Ga+13]=ra,this.float32[Ga+14]=Wn,this.float32[Ga+15]=ca,this.float32[Ga+16]=sa,Y},O}(qa);ll.prototype.bytesPerElement=68,Zr("StructArrayLayout8i15ui1ul4f68",ll);var le=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y){var ae=this.length;return this.resize(ae+1),this.emplace(ae,Y)},O.prototype.emplace=function(Y,ae){var he=1*Y;return this.float32[he+0]=ae,Y},O}(qa);le.prototype.bytesPerElement=4,Zr("StructArrayLayout1f4",le);var C=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he){var ve=this.length;return this.resize(ve+1),this.emplace(ve,Y,ae,he)},O.prototype.emplace=function(Y,ae,he,ve){var Se=3*Y;return this.int16[Se+0]=ae,this.int16[Se+1]=he,this.int16[Se+2]=ve,Y},O}(qa);C.prototype.bytesPerElement=6,Zr("StructArrayLayout3i6",C);var z=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he){var ve=this.length;return this.resize(ve+1),this.emplace(ve,Y,ae,he)},O.prototype.emplace=function(Y,ae,he,ve){var Se=2*Y,Fe=4*Y;return this.uint32[Se+0]=ae,this.uint16[Fe+2]=he,this.uint16[Fe+3]=ve,Y},O}(qa);z.prototype.bytesPerElement=8,Zr("StructArrayLayout1ul2ui8",z);var B=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae){var he=this.length;
vendor: 12,830 bytes, line 94
94return this.resize(he+1),this.emplace(he,Y,ae)},O.prototype.emplace=function(Y,ae,he){var ve=2*Y;return this.uint16[ve+0]=ae,this.uint16[ve+1]=he,Y},O}(qa);B.prototype.bytesPerElement=4,Zr("StructArrayLayout2ui4",B);var G=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y){var ae=this.length;return this.resize(ae+1),this.emplace(ae,Y)},O.prototype.emplace=function(Y,ae){var he=1*Y;return this.uint16[he+0]=ae,Y},O}(qa);G.prototype.bytesPerElement=2,Zr("StructArrayLayout1ui2",G);var ie=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae){var he=this.length;return this.resize(he+1),this.emplace(he,Y,ae)},O.prototype.emplace=function(Y,ae,he){var ve=2*Y;return this.float32[ve+0]=ae,this.float32[ve+1]=he,Y},O}(qa);ie.prototype.bytesPerElement=8,Zr("StructArrayLayout2f8",ie);var ue=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Y,ae,he,ve){var Se=this.length;return this.resize(Se+1),this.emplace(Se,Y,ae,he,ve)},O.prototype.emplace=function(Y,ae,he,ve,Se){var Fe=4*Y;return this.float32[Fe+0]=ae,this.float32[Fe+1]=he,this.float32[Fe+2]=ve,this.float32[Fe+3]=Se,Y},O}(qa);ue.prototype.bytesPerElement=16,Zr("StructArrayLayout4f16",ue);var ge=function(M){function O(){M.apply(this,arguments)}M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O;var Y={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return Y.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},Y.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},Y.x1.get=function(){return this._structArray.int16[this._pos2+2]},Y.y1.get=function(){return this._structArray.int16[this._pos2+3]},Y.x2.get=function(){return this._structArray.int16[this._pos2+4]},Y.y2.get=function(){return this._structArray.int16[this._pos2+5]},Y.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Y.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},Y.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Y.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(O.prototype,Y),O}(Ts);ge.prototype.size=20;var ye=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.get=function(Y){return new ge(this,Y)},O}(ol);Zr("CollisionBoxArray",ye);var Me=function(M){function O(){M.apply(this,arguments)}M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O;var Y={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return Y.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Y.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Y.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Y.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},Y.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},Y.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Y.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},Y.segment.get=function(){return this._structArray.uint16[this._pos2+10]},Y.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},Y.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},Y.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},Y.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},Y.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},Y.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},Y.placedOrientation.set=function(ae){this._structArray.uint8[this._pos1+37]=ae},Y.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},Y.hidden.set=function(ae){this._structArray.uint8[this._pos1+38]=ae},Y.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},Y.crossTileID.set=function(ae){this._structArray.uint32[this._pos4+10]=ae},Y.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(O.prototype,Y),O}(Ts);Me.prototype.size=48;var je=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.get=function(Y){return new Me(this,Y)},O}(sl);Zr("PlacedSymbolArray",je);var We=function(M){function O(){M.apply(this,arguments)}M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O;var Y={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return Y.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Y.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Y.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},Y.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},Y.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},Y.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},Y.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},Y.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},Y.key.get=function(){return this._structArray.uint16[this._pos2+8]},Y.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Y.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},Y.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},Y.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},Y.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},Y.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},Y.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},Y.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},Y.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},Y.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},Y.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},Y.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},Y.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},Y.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},Y.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},Y.crossTileID.set=function(ae){this._structArray.uint32[this._pos4+12]=ae},Y.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},Y.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},Y.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},Y.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(O.prototype,Y),O}(Ts);We.prototype.size=68;var nt=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.get=function(Y){return new We(this,Y)},O}(ll);Zr("SymbolInstanceArray",nt);var bt=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.getoffsetX=function(Y){return this.float32[1*Y+0]},O}(le);Zr("GlyphOffsetArray",bt);var At=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.getx=function(Y){return this.int16[3*Y+0]},O.prototype.gety=function(Y){return this.int16[3*Y+1]},O.prototype.gettileUnitDistanceFromAnchor=function(Y){return this.int16[3*Y+2]},O}(C);Zr("SymbolLineVertexArray",At);var _t=function(M){function O(){M.apply(this,arguments)}M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O;var Y={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return Y.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},Y.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Y.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(O.prototype,Y),O}(Ts);_t.prototype.size=8;var wt=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.get=function(Y){return new _t(this,Y)},O}(z);Zr("FeatureIndexArray",wt);var xt=Qa([{name:"a_pos",components:2,type:"Int16"}],4).members,Ft=function(M){M===void 0&&(M=[]),this.segments=M};function Ot(M,O){return 256*(M=u(Math.floor(M),0,255))+(O=u(Math.floor(O),0,255))}Ft.prototype.prepareSegment=function(M,O,Y,ae){var he=this.segments[this.segments.length-1];return M>Ft.MAX_VERTEX_ARRAY_LENGTH&&A("Max vertices per segment is "+Ft.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+M),(!he||he.vertexLength+M>Ft.MAX_VERTEX_ARRAY_LENGTH||he.sortKey!==ae)&&(he={vertexOffset:O.length,primitiveOffset:Y.length,vertexLength:0,primitiveLength:0},ae!==void 0&&(he.sortKey=ae),this.segments.push(he)),he},Ft.prototype.get=function(){return this.segments},Ft.prototype.destroy=function(){for(var M=0,O=this.segments;M<O.length;M+=1){var Y=O[M];for(var ae in Y.vaos)Y.vaos[ae].destroy()}},Ft.simpleSegment=function(M,O,Y,ae){return new Ft([{vertexOffset:M,primitiveOffset:O,vertexLength:Y,primitiveLength:ae,vaos:{},sortKey:0}])},Ft.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Zr("SegmentVector",Ft);var Nt=Qa([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint8"},{name:"a_pixel_ratio_to",components:1,type:"Uint8"}]),er=n(function(M){M.exports=function(O,Y){var ae,he,ve,Se,Fe,Ke,ct,gt;for(ae=3&O.length,he=O.length-ae,ve=Y,Fe=3432918353,Ke=461845907,gt=0;gt<he;)ct=255&O.charCodeAt(gt)|(255&O.charCodeAt(++gt))<<8|(255&O.charCodeAt(++gt))<<16|(255&O.charCodeAt(++gt))<<24,++gt,ve=27492+(65535&(Se=5*(65535&(ve=(ve^=ct=(65535&(ct=(ct=(65535&ct)*Fe+(((ct>>
vendor: 6,468 bytes, line 94
94>16)*Fe&65535)<<16)&4294967295)<<15|ct>>>17))*Ke+(((ct>>>16)*Ke&65535)<<16)&4294967295)<<13|ve>>>19))+((5*(ve>>>16)&65535)<<16)&4294967295))+((58964+(Se>>>16)&65535)<<16);switch(ct=0,ae){case 3:ct^=(255&O.charCodeAt(gt+2))<<16;case 2:ct^=(255&O.charCodeAt(gt+1))<<8;case 1:ve^=ct=(65535&(ct=(ct=(65535&(ct^=255&O.charCodeAt(gt)))*Fe+(((ct>>>16)*Fe&65535)<<16)&4294967295)<<15|ct>>>17))*Ke+(((ct>>>16)*Ke&65535)<<16)&4294967295}return ve^=O.length,ve=2246822507*(65535&(ve^=ve>>>16))+((2246822507*(ve>>>16)&65535)<<16)&4294967295,ve=3266489909*(65535&(ve^=ve>>>13))+((3266489909*(ve>>>16)&65535)<<16)&4294967295,(ve^=ve>>>16)>>>0}}),fr=n(function(M){M.exports=function(O,Y){for(var ae,he=O.length,ve=Y^he,Se=0;he>=4;)ae=1540483477*(65535&(ae=255&O.charCodeAt(Se)|(255&O.charCodeAt(++Se))<<8|(255&O.charCodeAt(++Se))<<16|(255&O.charCodeAt(++Se))<<24))+((1540483477*(ae>>>16)&65535)<<16),ve=1540483477*(65535&ve)+((1540483477*(ve>>>16)&65535)<<16)^(ae=1540483477*(65535&(ae^=ae>>>24))+((1540483477*(ae>>>16)&65535)<<16)),he-=4,++Se;switch(he){case 3:ve^=(255&O.charCodeAt(Se+2))<<16;case 2:ve^=(255&O.charCodeAt(Se+1))<<8;case 1:ve=1540483477*(65535&(ve^=255&O.charCodeAt(Se)))+((1540483477*(ve>>>16)&65535)<<16)}return ve=1540483477*(65535&(ve^=ve>>>13))+((1540483477*(ve>>>16)&65535)<<16),(ve^=ve>>>15)>>>0}}),kr=er,Tr=er,Jr=fr;kr.murmur3=Tr,kr.murmur2=Jr;var Xr=function(){this.ids=[],this.positions=[],this.indexed=!1};Xr.prototype.add=function(M,O,Y,ae){this.ids.push(on(M)),this.positions.push(O,Y,ae)},Xr.prototype.getPositions=function(M){for(var O=on(M),Y=0,ae=this.ids.length-1;Y<ae;){var he=Y+ae>>1;this.ids[he]>=O?ae=he:Y=he+1}for(var ve=[];this.ids[Y]===O;){var Se=this.positions[3*Y],Fe=this.positions[3*Y+1],Ke=this.positions[3*Y+2];ve.push({index:Se,start:Fe,end:Ke}),Y++}return ve},Xr.serialize=function(M,O){var Y=new Float64Array(M.ids),ae=new Uint32Array(M.positions);return function he(ve,Se,Fe,Ke){for(;Fe<Ke;){for(var ct=ve[Fe+Ke>>1],gt=Fe-1,Bt=Ke+1;;){do gt++;while(ve[gt]<ct);do Bt--;while(ve[Bt]>ct);if(gt>=Bt)break;Nn(ve,gt,Bt),Nn(Se,3*gt,3*Bt),Nn(Se,3*gt+1,3*Bt+1),Nn(Se,3*gt+2,3*Bt+2)}Bt-Fe<Ke-Bt?(he(ve,Se,Fe,Bt),Fe=Bt+1):(he(ve,Se,Bt+1,Ke),Ke=Bt)}}(Y,ae,0,Y.length-1),O&&O.push(Y.buffer,ae.buffer),{ids:Y,positions:ae}},Xr.deserialize=function(M){var O=new Xr;return O.ids=M.ids,O.positions=M.positions,O.indexed=!0,O};var hn=Math.pow(2,53)-1;function on(M){var O=+M;return!isNaN(O)&&O<=hn?O:kr(String(M))}function Nn(M,O,Y){var ae=M[O];M[O]=M[Y],M[Y]=ae}Zr("FeaturePositionMap",Xr);var Gn=function(M,O){this.gl=M.gl,this.location=O},oa=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=0}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.set=function(Y){this.current!==Y&&(this.current=Y,this.gl.uniform1i(this.location,Y))},O}(Gn),jr=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=0}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.set=function(Y){this.current!==Y&&(this.current=Y,this.gl.uniform1f(this.location,Y))},O}(Gn),Mn=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=[0,0]}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.set=function(Y){Y[0]===this.current[0]&&Y[1]===this.current[1]||(this.current=Y,this.gl.uniform2f(this.location,Y[0],Y[1]))},O}(Gn),Yn=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=[0,0,0]}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.set=function(Y){Y[0]===this.current[0]&&Y[1]===this.current[1]&&Y[2]===this.current[2]||(this.current=Y,this.gl.uniform3f(this.location,Y[0],Y[1],Y[2]))},O}(Gn),Vn=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=[0,0,0,0]}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.set=function(Y){Y[0]===this.current[0]&&Y[1]===this.current[1]&&Y[2]===this.current[2]&&Y[3]===this.current[3]||(this.current=Y,this.gl.uniform4f(this.location,Y[0],Y[1],Y[2],Y[3]))},O}(Gn),Qn=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=ar.transparent}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.set=function(Y){Y.r===this.current.r&&Y.g===this.current.g&&Y.b===this.current.b&&Y.a===this.current.a||(this.current=Y,this.gl.uniform4f(this.location,Y.r,Y.g,Y.b,Y.a))},O}(Gn),la=new Float32Array(16),wa=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=la}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.set=function(Y){if(Y[12]!==this.current[12]||Y[0]!==this.current[0])return this.current=Y,void this.gl.uniformMatrix4fv(this.location,!1,Y);for(var ae=1;ae<16;ae++)if(Y[ae]!==this.current[ae]){this.current=Y,this.gl.uniformMatrix4fv(this.location,!1,Y);break}},O}(Gn);function Zn(M){return[Ot(255*M.r,255*M.g),Ot(255*M.b,255*M.a)]}var ma=function(M,O,Y){this.value=M,this.uniformNames=O.map(function(ae){return"u_"+ae}),this.type=Y};ma.prototype.setUniform=function(M,O,Y){M.set(Y.constantOr(this.value))},ma.prototype.getBinding=function(M,O,Y){return this.type==="color"?new Qn(M,O):new jr(M,O)};var pa=function(M,O){this.uniformNames=O.map(function(Y){return"u_"+Y}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};pa.prototype.setConstantPatternPositions=function(M,O){this.pixelRatioFrom=O.pixelRatio,this.pixelRatioTo=M.pixelRatio,this.patternFrom=O.tlbr,this.patternTo=M.tlbr},pa.prototype.setUniform=function(M,O,Y,ae){var he=ae==="u_pattern_to"?this.patternTo:ae==="u_pattern_from"?this.patternFrom:ae==="u_pixel_ratio_to"?this.pixelRatioTo:ae==="u_pixel_ratio_from"?this.pixelRatioFrom:null;he&&M.set(he)},pa.prototype.getBinding=function(M,O,Y){return Y.substr(0,9)==="u_pattern"?new Vn(M,O):new jr(M,O)};var Aa=function(M,O,Y,ae){this.expression=M,this.type=Y,this.maxValue=0,this.paintVertexAttributes=O.map(function(he){return{name:"a_"+he,type:"Float32",components:Y==="color"?2:1,offset:0}}),this.paintVertexArray=new ae};Aa.prototype.populatePaintArray=function(M,O,Y,ae,he){var ve=this.paintVertexArray.length,Se=this.expression.evaluate(new Ka(0),O,{},ae,[],he);this.paintVertexArray.resize(M),this._setPaintValue(ve,M,Se)},Aa.prototype.updatePaintArray=function(M,O,Y,ae){var he=this.expression.evaluate({zoom:0},Y,ae);this._setPaintValue(M,O,he)}
94,Aa.prototype._setPaintValue=function(M,O,Y){if(this.type==="color")for(var ae=Zn(Y),he=M;he<O;he++)this.paintVertexArray.emplace(he,ae[0],ae[1]);else{for(var ve=M;ve<O;ve++)this.paintVertexArray.emplace(ve,Y);this.maxValue=Math.max(this.maxValue,Math.abs(Y))}},Aa.prototype.upload=function(M){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=M.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Aa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var va=function(M,O,Y,ae,he,ve){this.expression=M,this.uniformNames=O.map(function(Se){return"u_"+Se+"_t"}),this.type=Y,this.useIntegerZoom=ae,this.zoom=he,this.maxValue=0,this.paintVertexAttributes=O.map(function(Se){return{name:"a_"+Se,type:"Float32",components:Y==="color"?4:2,offset:0}}),this.paintVertexArray=new ve};va.prototype.populatePaintArray=function(M,O,Y,ae,he){var ve=this.expression.evaluate(new Ka(this.zoom),O,{},ae,[],he),Se=this.expression.evaluate(new Ka(this.zoom+1),O,{},ae,[],he),Fe=this.paintVertexArray.length;this.paintVertexArray.resize(M),this._setPaintValue(Fe,M,ve,Se)},va.prototype.updatePaintArray=function(M,O,Y,ae){var he=this.expression.evaluate({zoom:this.zoom},Y,ae),ve=this.expression.evaluate({zoom:this.zoom+1},Y,ae);this._setPaintValue(M,O,he,ve)},va.prototype._setPaintValue=function(M,O,Y,ae){if(this.type==="color")for(var he=Zn(Y),ve=Zn(ae),Se=M;Se<O;Se++)this.paintVertexArray.emplace(Se,he[0],he[1],ve[0],ve[1]);else{for(var Fe=M;Fe<O;Fe++)this.paintVertexArray.emplace(Fe,Y,ae);this.maxValue=Math.max(this.maxValue,Math.abs(Y),Math.abs(ae))}},va.prototype.upload=function(M){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=M.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},va.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},va.prototype.setUniform=function(M,O){var Y=this.useIntegerZoom?Math.floor(O.zoom):O.zoom,ae=u(this.expression.interpolationFactor(Y,this.zoom,this.zoom+1),0,1);M.set(ae)},va.prototype.getBinding=function(M,O,Y){return new jr(M,O)};var Sa=function(M,O,Y,ae,he,ve){this.expression=M,this.type=O,this.useIntegerZoom=Y,this.zoom=ae,this.layerId=ve,this.zoomInPaintVertexArray=new he,this.zoomOutPaintVertexArray=new he};Sa.prototype.populatePaintArray=function(M,O,Y){var ae=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(M),this.zoomOutPaintVertexArray.resize(M),this._setPaintValues(ae,M,O.patterns&&O.patterns[this.layerId],Y)},Sa.prototype.updatePaintArray=function(M,O,Y,ae,he){this._setPaintValues(M,O,Y.patterns&&Y.patterns[this.layerId],he)},Sa.prototype._setPaintValues=function(M,O,Y,ae){if(ae&&Y){var he=Y.min,ve=Y.mid,Se=Y.max,Fe=ae[he],Ke=ae[ve],ct=ae[Se];if(Fe&&Ke&&ct)for(var gt=M;gt<O;gt++)this.zoomInPaintVertexArray.emplace(gt,Ke.tl[0],Ke.tl[1],Ke.br[0],Ke.br[1],Fe.tl[0],Fe.tl[1],Fe.br[0],Fe.br[1],Ke.pixelRatio,Fe.pixelRatio),this.zoomOutPaintVertexArray.emplace(gt,Ke.tl[0],Ke.tl[1],Ke.br[0],Ke.br[1],ct.tl[0],ct.tl[1],ct.br[0],ct.br[1],Ke.pixelRatio,ct.pixelRatio)}},Sa.prototype.upload=function(M){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=M.createVertexBuffer(this.zoomInPaintVertexArray,Nt.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=M.createVertexBuffer(this.zoomOutPaintVertexArray,Nt.members,this.expression.isStateDependent))},Sa.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Da=function(M,O,Y,ae){this.binders={},this.layoutAttributes=ae,this._buffers=[];var he=[];for(var ve in M.paint._values)if(Y(ve)){var Se=M.paint.get(ve);if(Se instanceof Ci&&jo(Se.property.specification)){var Fe=Ai(ve,M.type),Ke=Se.value,ct=Se.property.specification.type,gt=Se.property.useIntegerZoom,Bt=Se.property.specification["property-type"],Zt=Bt==="cross-faded"||Bt==="cross-faded-data-driven";if(Ke.kind==="constant")this.binders[ve]=Zt?new pa(Ke.value,Fe):new ma(Ke.value,Fe,ct),he.push("/u_"+ve);else if(Ke.kind==="source"||Zt){var qt=Si(ve,ct,"source");this.binders[ve]=Zt?new Sa(Ke,ct,gt,O,qt,M.id):new Aa(Ke,Fe,ct,qt),he.push("/a_"+ve)}else{var rr=Si(ve,ct,"composite");this.binders[ve]=new va(Ke,Fe,ct,gt,O,rr),he.push("/z_"+ve)}
vendor: 4,730 bytes, line 94
94}}this.cacheKey=he.sort().join("")};Da.prototype.getMaxValue=function(M){var O=this.binders[M];return O instanceof Aa||O instanceof va?O.maxValue:0},Da.prototype.populatePaintArrays=function(M,O,Y,ae,he){for(var ve in this.binders){var Se=this.binders[ve];(Se instanceof Aa||Se instanceof va||Se instanceof Sa)&&Se.populatePaintArray(M,O,Y,ae,he)}},Da.prototype.setConstantPatternPositions=function(M,O){for(var Y in this.binders){var ae=this.binders[Y];ae instanceof pa&&ae.setConstantPatternPositions(M,O)}},Da.prototype.updatePaintArrays=function(M,O,Y,ae,he){var ve=!1;for(var Se in M)for(var Fe=0,Ke=O.getPositions(Se);Fe<Ke.length;Fe+=1){var ct=Ke[Fe],gt=Y.feature(ct.index);for(var Bt in this.binders){var Zt=this.binders[Bt];if((Zt instanceof Aa||Zt instanceof va||Zt instanceof Sa)&&Zt.expression.isStateDependent===!0){var qt=ae.paint.get(Bt);Zt.expression=qt.value,Zt.updatePaintArray(ct.start,ct.end,gt,M[Se],he),ve=!0}}}return ve},Da.prototype.defines=function(){var M=[];for(var O in this.binders){var Y=this.binders[O];(Y instanceof ma||Y instanceof pa)&&M.push.apply(M,Y.uniformNames.map(function(ae){return"#define HAS_UNIFORM_"+ae}))}return M},Da.prototype.getPaintVertexBuffers=function(){return this._buffers},Da.prototype.getUniforms=function(M,O){var Y=[];for(var ae in this.binders){var he=this.binders[ae];if(he instanceof ma||he instanceof pa||he instanceof va)for(var ve=0,Se=he.uniformNames;ve<Se.length;ve+=1){var Fe=Se[ve];if(O[Fe]){var Ke=he.getBinding(M,O[Fe],Fe);Y.push({name:Fe,property:ae,binding:Ke})}}}return Y},Da.prototype.setUniforms=function(M,O,Y,ae){for(var he=0,ve=O;he<ve.length;he+=1){var Se=ve[he],Fe=Se.name,Ke=Se.property,ct=Se.binding;this.binders[Ke].setUniform(ct,ae,Y.get(Ke),Fe)}},Da.prototype.updatePaintBuffers=function(M){for(var O in this._buffers=[],this.binders){var Y=this.binders[O];if(M&&Y instanceof Sa){var ae=M.fromScale===2?Y.zoomInPaintVertexBuffer:Y.zoomOutPaintVertexBuffer;ae&&this._buffers.push(ae)}else(Y instanceof Aa||Y instanceof va)&&Y.paintVertexBuffer&&this._buffers.push(Y.paintVertexBuffer)}},Da.prototype.upload=function(M){for(var O in this.binders){var Y=this.binders[O];(Y instanceof Aa||Y instanceof va||Y instanceof Sa)&&Y.upload(M)}this.updatePaintBuffers()},Da.prototype.destroy=function(){for(var M in this.binders){var O=this.binders[M];(O instanceof Aa||O instanceof va||O instanceof Sa)&&O.destroy()}};var ii=function(M,O,Y,ae){ae===void 0&&(ae=function(){return!0}),this.programConfigurations={};for(var he=0,ve=O;he<ve.length;he+=1){var Se=ve[he];this.programConfigurations[Se.id]=new Da(Se,Y,ae,M)}this.needsUpload=!1,this._featureMap=new Xr,this._bufferOffset=0};function Ai(M,O){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[M]||[M.replace(O+"-","").replace(/-/g,"_")]}function Si(M,O,Y){var ae={color:{source:ie,composite:ue},number:{source:le,composite:ie}},he=function(ve){return{"line-pattern":{source:vs,composite:vs},"fill-pattern":{source:vs,composite:vs},"fill-extrusion-pattern":{source:vs,composite:vs}}[ve]}(M);return he&&he[Y]||ae[O][Y]}ii.prototype.populatePaintArrays=function(M,O,Y,ae,he,ve){for(var Se in this.programConfigurations)this.programConfigurations[Se].populatePaintArrays(M,O,ae,he,ve);O.id!==void 0&&this._featureMap.add(O.id,Y,this._bufferOffset,M),this._bufferOffset=M,this.needsUpload=!0},ii.prototype.updatePaintArrays=function(M,O,Y,ae){for(var he=0,ve=Y;he<ve.length;he+=1){var Se=ve[he];this.needsUpload=this.programConfigurations[Se.id].updatePaintArrays(M,this._featureMap,O,Se,ae)||this.needsUpload}},ii.prototype.get=function(M){return this.programConfigurations[M]},ii.prototype.upload=function(M){if(this.needsUpload){for(var O in this.programConfigurations)this.programConfigurations[O].upload(M);this.needsUpload=!1}},ii.prototype.destroy=function(){for(var M in this.programConfigurations)this.programConfigurations[M].destroy()},Zr("ConstantBinder",ma),Zr("CrossFadedConstantBinder",pa),Zr("SourceExpressionBinder",Aa),Zr("CrossFadedCompositeBinder",Sa),Zr("CompositeExpressionBinder",va),Zr("ProgramConfiguration",Da,{omit:["_buffers"]}),Zr("ProgramConfigurationSet",ii);var ai,xi=(ai=15,{min:-1*Math.pow(2,ai-1),max:Math.pow(2,ai-1)-1});
94function ui(M){for(var O=8192/M.extent,Y=M.loadGeometry(),ae=0;ae<Y.length;ae++)for(var he=Y[ae],ve=0;ve<he.length;ve++){var Se=he[ve];Se.x=Math.round(Se.x*O),Se.y=Math.round(Se.y*O),(Se.x<xi.min||Se.x>xi.max||Se.y<xi.min||Se.y>xi.max)&&(A("Geometry exceeds allowed extent, reduce your vector tile buffer size"),Se.x=u(Se.x,xi.min,xi.max),Se.y=u(Se.y,xi.min,xi.max))}return Y}function po(M,O,Y,ae,he){M.emplaceBack(2*O+(ae+1)/2,2*Y+(he+1)/2)}var ji=function(M){this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(O){return O.id}),this.index=M.index,this.hasPattern=!1,this.layoutVertexArray=new is,this.indexArray=new Qi,this.segments=new Ft,this.programConfigurations=new ii(xt,M.layers,M.zoom),this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};function Po(M,O){for(var Y=0;Y<M.length;Y++)if(ts(O,M[Y]))return!0;for(var ae=0;ae<O.length;ae++)if(ts(M,O[ae]))return!0;return!!$s(M,O)}function ys(M,O,Y){return!!ts(M,O)||!!go(O,M,Y)}function Bs(M,O){if(M.length===1)return ul(O,M[0]);for(var Y=0;Y<O.length;Y++)for(var ae=O[Y],he=0;he<ae.length;he++)if(ts(M,ae[he]))return!0;for(var ve=0;ve<M.length;ve++)if(ul(O,M[ve]))return!0;for(var Se=0;Se<O.length;Se++)if($s(M,O[Se]))return!0;return!1}function cl(M,O,Y){if(M.length>1){if($s(M,O))return!0;for(var ae=0;ae<O.length;ae++)if(go(O[ae],M,Y))return!0}for(var he=0;he<M.length;he++)if(go(M[he],O,Y))return!0;return!1}function $s(M,O){if(M.length===0||O.length===0)return!1;for(var Y=0;Y<M.length-1;Y++)for(var ae=M[Y],he=M[Y+1],ve=0;ve<O.length-1;ve++)if(el(ae,he,O[ve],O[ve+1]))return!0;return!1}function el(M,O,Y,ae){return I(M,Y,ae)!==I(O,Y,ae)&&I(M,O,Y)!==I(M,O,ae)}function go(M,O,Y){var ae=Y*Y;if(O.length===1)return M.distSqr(O[0])<ae;for(var he=1;he<O.length;he++)if(Hs(M,O[he-1],O[he])<ae)return!0;return!1}function Hs(M,O,Y){var ae=O.distSqr(Y);if(ae===0)return M.distSqr(O);var he=((M.x-O.x)*(Y.x-O.x)+(M.y-O.y)*(Y.y-O.y))/ae;return he<0?M.distSqr(O):he>1?M.distSqr(Y):M.distSqr(Y.sub(O)._mult(he)._add(O))}function ul(M,O){for(var Y,ae,he,ve=!1,Se=0;Se<M.length;Se++)for(var Fe=0,Ke=(Y=M[Se]).length-1;Fe<Y.length;Ke=Fe++)ae=Y[Fe],he=Y[Ke],ae.y>O.y!=he.y>O.y&&O.x<(he.x-ae.x)*(O.y-ae.y)/(he.y-ae.y)+ae.x&&(ve=!ve);return ve}function ts(M,O){for(var Y=!1,ae=0,he=M.length-1;ae<M.length;he=ae++){var ve=M[ae],Se=M[he];ve.y>O.y!=Se.y>O.y&&O.x<(Se.x-ve.x)*(O.y-ve.y)/(Se.y-ve.y)+ve.x&&(Y=!Y)}return Y}function fl(M,O,Y){var ae=Y[0],he=Y[2];if(M.x<ae.x&&O.x<ae.x||M.x>he.x&&O.x>he.x||M.y<ae.y&&O.y<ae.y||M.y>he.y&&O.y>he.y)return!1;var ve=I(M,O,Y[0]);return ve!==I(M,O,Y[1])||ve!==I(M,O,Y[2])||ve!==I(M,O,Y[3])}function bi(M,O,Y){var ae=O.paint.get(M).value;return ae.kind==="constant"?ae.value:Y.programConfigurations.get(O.id).getMaxValue(M)}function So(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])}function Eo(M,O,Y,ae,he){if(!O[0]&&!O[1])return M;var ve=r.convert(O)._mult(he);Y==="viewport"&&ve._rotate(-ae);for(var Se=[],Fe=0;Fe<M.length;Fe++){var Ke=M[Fe];Se.push(Ke.sub(ve))}return Se}
94ji.prototype.populate=function(M,O,Y){var ae=this.layers[0],he=[],ve=null;ae.type==="circle"&&(ve=ae.layout.get("circle-sort-key"));for(var Se=0,Fe=M;Se<Fe.length;Se+=1){var Ke=Fe[Se],ct=Ke.feature,gt=Ke.id,Bt=Ke.index,Zt=Ke.sourceLayerIndex,qt=this.layers[0]._featureFilter.needGeometry,rr={type:ct.type,id:gt,properties:ct.properties,geometry:qt?ui(ct):[]};if(this.layers[0]._featureFilter.filter(new Ka(this.zoom),rr,Y)){qt||(rr.geometry=ui(ct));var gr=ve?ve.evaluate(rr,{},Y):void 0,Er={id:gt,properties:ct.properties,type:ct.type,sourceLayerIndex:Zt,index:Bt,geometry:rr.geometry,patterns:{},sortKey:gr};he.push(Er)}}ve&&he.sort(function(Hn,ta){return Hn.sortKey-ta.sortKey});for(var Sr=0,Rr=he;Sr<Rr.length;Sr+=1){var Br=Rr[Sr],Hr=Br,fn=Hr.geometry,xn=Hr.index,Fn=Hr.sourceLayerIndex,Rn=M[xn].feature;this.addFeature(Br,fn,xn,Y),O.featureIndex.insert(Rn,fn,xn,Fn,this.index)}},ji.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Y)},ji.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},ji.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ji.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,xt),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},ji.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ji.prototype.addFeature=function(M,O,Y,ae){for(var he=0,ve=O;he<ve.length;he+=1)for(var Se=0,Fe=ve[he];Se<Fe.length;Se+=1){var Ke=Fe[Se],ct=Ke.x,gt=Ke.y;if(!(ct<0||ct>=8192||gt<0||gt>=8192)){var Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,M.sortKey),Zt=Bt.vertexLength;po(this.layoutVertexArray,ct,gt,-1,-1),po(this.layoutVertexArray,ct,gt,1,-1),po(this.layoutVertexArray,ct,gt,1,1),po(this.layoutVertexArray,ct,gt,-1,1),this.indexArray.emplaceBack(Zt,Zt+1,Zt+2),this.indexArray.emplaceBack(Zt,Zt+3,Zt+2),Bt.vertexLength+=4,Bt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Y,{},ae)},Zr("CircleBucket",ji,{omit:["layers"]});var bl=new Ao({"circle-sort-key":new ga(Ce.layout_circle["circle-sort-key"])}),eu={paint:new Ao({"circle-radius":new ga(Ce.paint_circle["circle-radius"]),"circle-color":new ga(Ce.paint_circle["circle-color"]),"circle-blur":new ga(Ce.paint_circle["circle-blur"]),"circle-opacity":new ga(Ce.paint_circle["circle-opacity"]),"circle-translate":new ia(Ce.paint_circle["circle-translate"]),"circle-translate-anchor":new ia(Ce.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ia(Ce.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ia(Ce.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new ga(Ce.paint_circle["circle-stroke-width"]),"circle-stroke-color":new ga(Ce.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new ga(Ce.paint_circle["circle-stroke-opacity"])}),layout:bl},Yo=typeof Float32Array<"u"?Float32Array:Array;function Wl(M){return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function hl(M,O,Y){var ae=O[0],he=O[1],ve=O[2],Se=O[3],Fe=O[4],Ke=O[5],ct=O[6],gt=O[7],Bt=O[8],Zt=O[9],qt=O[10],rr=O[11],gr=O[12],Er=O[13],Sr=O[14],Rr=O[15],Br=Y[0],Hr=Y[1],fn=Y[2],xn=Y[3];return M[0]=Br*ae+Hr*Fe+fn*Bt+xn*gr,M[1]=Br*he+Hr*Ke+fn*Zt+xn*Er,M[2]=Br*ve+Hr*ct+fn*qt+xn*Sr,M[3]=Br*Se+Hr*gt+fn*rr+xn*Rr,Br=Y[4],Hr=Y[5],fn=Y[6],xn=Y[7],M[4]=Br*ae+Hr*Fe+fn*Bt+xn*gr,M[5]=Br*he+Hr*Ke+fn*Zt+xn*Er,M[6]=Br*ve+Hr*ct+fn*qt+xn*Sr,M[7]=Br*Se+Hr*gt+fn*rr+xn*Rr,Br=Y[8],Hr=Y[9],fn=Y[10],xn=Y[11],M[8]=Br*ae+Hr*Fe+fn*Bt+xn*gr,M[9]=Br*he+Hr*Ke+fn*Zt+xn*Er,M[10]=Br*ve+Hr*ct+fn*qt+xn*Sr,M[11]=Br*Se+Hr*gt+fn*rr+xn*Rr,Br=Y[12],Hr=Y[13],fn=Y[14],xn=Y[15],M[12]=Br*ae+Hr*Fe+fn*Bt+xn*gr,M[13]=Br*he+Hr*Ke+fn*Zt+xn*Er,M[14]=Br*ve+Hr*ct+fn*qt+xn*Sr,M[15]=Br*Se+Hr*gt+fn*rr+xn*Rr,M}Math.hypot||(Math.hypot=function(){for(var M=arguments,O=0,Y=arguments.length;Y--;)O+=M[Y]*M[Y];return Math.sqrt(O)});var tu=hl,qs,ru=function(M,O,Y){return M[0]=O[0]-Y[0],M[1]=O[1]-Y[1],M[2]=O[2]-Y[2],M};qs=new Yo(3),Yo!=Float32Array&&(qs[0]=0,qs[1]=0,qs[2]=0);function _l(M,O,Y){var ae=O[0],he=O[1],ve=O[2],Se=O[3];return M[0]=Y[0]*ae+Y[4]*he+Y[8]*ve+Y[12]*Se,M[1]=Y[1]*ae+Y[5]*he+Y[9]*ve+Y[13]*Se,M[2]=Y[2]*ae+Y[6]*he+Y[10]*ve+Y[14]*Se,M[3]=Y[3]*ae+Y[7]*he+Y[11]*ve+Y[15]*Se,M}(function(){(function(){var M=new Yo(4);return Yo!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0,M[3]=0),M})()})();
vendor: 6,150 bytes, line 94
94var Zl=function(M){var O=M[0],Y=M[1];return O*O+Y*Y},gh=(function(){(function(){var M=new Yo(2);return Yo!=Float32Array&&(M[0]=0,M[1]=0),M})()}(),function(M){function O(Y){M.call(this,Y,eu)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.createBucket=function(Y){return new ji(Y)},O.prototype.queryRadius=function(Y){var ae=Y;return bi("circle-radius",this,ae)+bi("circle-stroke-width",this,ae)+So(this.paint.get("circle-translate"))},O.prototype.queryIntersectsFeature=function(Y,ae,he,ve,Se,Fe,Ke,ct){for(var gt=Eo(Y,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Fe.angle,Ke),Bt=this.paint.get("circle-radius").evaluate(ae,he)+this.paint.get("circle-stroke-width").evaluate(ae,he),Zt=this.paint.get("circle-pitch-alignment")==="map",qt=Zt?gt:function(Fn,Rn){return Fn.map(function(Hn){return Nu(Hn,Rn)})}(gt,ct),rr=Zt?Bt*Ke:Bt,gr=0,Er=ve;gr<Er.length;gr+=1)for(var Sr=0,Rr=Er[gr];Sr<Rr.length;Sr+=1){var Br=Rr[Sr],Hr=Zt?Br:Nu(Br,ct),fn=rr,xn=_l([],[Br.x,Br.y,0,1],ct);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?fn*=xn[3]/Fe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(fn*=Fe.cameraToCenterDistance/xn[3]),ys(qt,Hr,fn))return!0}return!1},O}(Uo));function Nu(M,O){var Y=_l([],[M.x,M.y,0,1],O);return new r(Y[0]/Y[3],Y[1]/Y[3])}var ju=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O}(ji);function nu(M,O,Y,ae){var he=O.width,ve=O.height;if(ae){if(ae instanceof Uint8ClampedArray)ae=new Uint8Array(ae.buffer);else if(ae.length!==he*ve*Y)throw new RangeError("mismatched image size")}else ae=new Uint8Array(he*ve*Y);return M.width=he,M.height=ve,M.data=ae,M}function Uu(M,O,Y){var ae=O.width,he=O.height;if(ae!==M.width||he!==M.height){var ve=nu({},{width:ae,height:he},Y);au(M,ve,{x:0,y:0},{x:0,y:0},{width:Math.min(M.width,ae),height:Math.min(M.height,he)},Y),M.width=ae,M.height=he,M.data=ve.data}}function au(M,O,Y,ae,he,ve){if(he.width===0||he.height===0)return O;if(he.width>M.width||he.height>M.height||Y.x>M.width-he.width||Y.y>M.height-he.height)throw new RangeError("out of range source coordinates for image copy");if(he.width>O.width||he.height>O.height||ae.x>O.width-he.width||ae.y>O.height-he.height)throw new RangeError("out of range destination coordinates for image copy");for(var Se=M.data,Fe=O.data,Ke=0;Ke<he.height;Ke++)for(var ct=((Y.y+Ke)*M.width+Y.x)*ve,gt=((ae.y+Ke)*O.width+ae.x)*ve,Bt=0;Bt<he.width*ve;Bt++)Fe[gt+Bt]=Se[ct+Bt];return O}Zr("HeatmapBucket",ju,{omit:["layers"]});var pl=function(M,O){nu(this,M,1,O)};pl.prototype.resize=function(M){Uu(this,M,1)},pl.prototype.clone=function(){return new pl({width:this.width,height:this.height},new Uint8Array(this.data))},pl.copy=function(M,O,Y,ae,he){au(M,O,Y,ae,he,1)};var Wo=function(M,O){nu(this,M,4,O)};Wo.prototype.resize=function(M){Uu(this,M,4)},Wo.prototype.replace=function(M,O){O?this.data.set(M):M instanceof Uint8ClampedArray?this.data=new Uint8Array(M.buffer):this.data=M},Wo.prototype.clone=function(){return new Wo({width:this.width,height:this.height},new Uint8Array(this.data))},Wo.copy=function(M,O,Y,ae,he){au(M,O,Y,ae,he,4)},Zr("AlphaImage",pl),Zr("RGBAImage",Wo);var mh={paint:new Ao({"heatmap-radius":new ga(Ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new ga(Ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ia(Ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new es(Ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ia(Ce.paint_heatmap["heatmap-opacity"])})};function Vu(M,O){for(var Y=new Uint8Array(1024),ae={},he=0,ve=0;he<256;he++,ve+=4){ae[O]=he/255;var Se=M.evaluate(ae);Y[ve+0]=Math.floor(255*Se.r/Se.a),Y[ve+1]=Math.floor(255*Se.g/Se.a),Y[ve+2]=Math.floor(255*Se.b/Se.a),Y[ve+3]=Math.floor(255*Se.a)}return new Wo({width:256,height:1},Y)}var vh=function(M){function O(Y){M.call(this,Y,mh),this._updateColorRamp()}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.createBucket=function(Y){return new ju(Y)},O.prototype._handleSpecialPaintPropertyUpdate=function(Y){Y==="heatmap-color"&&this._updateColorRamp()},O.prototype._updateColorRamp=function(){var Y=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Vu(Y,"heatmapDensity"),this.colorRampTexture=null},O.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},O.prototype.queryRadius=function(){return 0},O.prototype.queryIntersectsFeature=function(){return!1},O.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},O}(Uo),yh={paint:new Ao({"hillshade-illumination-direction":new ia(Ce.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new ia(Ce.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ia(Ce.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ia(Ce.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ia(Ce.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ia(Ce.paint_hillshade["hillshade-accent-color"])})},xh=function(M){function O(Y){M.call(this,Y,yh)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},O}(Uo),Hu=Qa([{name:"a_pos",components:2,type:"Int16"}],4).members,iu=mc,bh=mc;function mc(M,O,Y){Y=Y||2;var ae,he,ve,Se,Fe,Ke,ct,gt=O&&O.length,Bt=gt?O[0]*Y:M.length,Zt=qu(M,0,Bt,Y,!0),qt=[];if(!Zt||Zt.next===Zt.prev)return qt;if(gt&&(Zt=function(gr,Er,Sr,Rr){var Br,Hr,fn,xn,Fn,Rn=[];for(Br=0,Hr=Er.length;Br<Hr;Br++)fn=Er[Br]*Rr,xn=Br<Hr-1?Er[Br+1]*Rr:gr.length,(Fn=qu(gr,fn,xn,Rr,!1))===Fn.next&&(Fn.steiner=!0),Rn.push(Eh(Fn));for(Rn.sort(Mh),Br=0;Br<Rn.length;Br++)Ah(Rn[Br],Sr),Sr=tl(Sr,Sr.next);return Sr}(M,O,Zt,Y)),M.length>
vendor: 4,195 bytes, line 94
9480*Y){ae=ve=M[0],he=Se=M[1];for(var rr=Y;rr<Bt;rr+=Y)(Fe=M[rr])<ae&&(ae=Fe),(Ke=M[rr+1])<he&&(he=Ke),Fe>ve&&(ve=Fe),Ke>Se&&(Se=Ke);ct=(ct=Math.max(ve-ae,Se-he))!==0?1/ct:0}return Xl(Zt,qt,Y,ae,he,ct),qt}function qu(M,O,Y,ae,he){var ve,Se;if(he===lu(M,O,Y,ae)>0)for(ve=O;ve<Y;ve+=ae)Se=Wu(ve,M[ve],M[ve+1],Se);else for(ve=Y-ae;ve>=O;ve-=ae)Se=Wu(ve,M[ve],M[ve+1],Se);return Se&&vc(Se,Se.next)&&(Kl(Se),Se=Se.next),Se}function tl(M,O){if(!M)return M;O||(O=M);var Y,ae=M;do if(Y=!1,ae.steiner||!vc(ae,ae.next)&&$i(ae.prev,ae,ae.next)!==0)ae=ae.next;else{if(Kl(ae),(ae=O=ae.prev)===ae.next)break;Y=!0}while(Y||ae!==O);return O}function Xl(M,O,Y,ae,he,ve,Se){if(M){!Se&&ve&&function(gt,Bt,Zt,qt){var rr=gt;do rr.z===null&&(rr.z=ou(rr.x,rr.y,Bt,Zt,qt)),rr.prevZ=rr.prev,rr.nextZ=rr.next,rr=rr.next;while(rr!==gt);rr.prevZ.nextZ=null,rr.prevZ=null,function(gr){var Er,Sr,Rr,Br,Hr,fn,xn,Fn,Rn=1;do{for(Sr=gr,gr=null,Hr=null,fn=0;Sr;){for(fn++,Rr=Sr,xn=0,Er=0;Er<Rn&&(xn++,Rr=Rr.nextZ);Er++);for(Fn=Rn;xn>0||Fn>0&&Rr;)xn!==0&&(Fn===0||!Rr||Sr.z<=Rr.z)?(Br=Sr,Sr=Sr.nextZ,xn--):(Br=Rr,Rr=Rr.nextZ,Fn--),Hr?Hr.nextZ=Br:gr=Br,Br.prevZ=Hr,Hr=Br;Sr=Rr}Hr.nextZ=null,Rn*=2}while(fn>1)}(rr)}(M,ae,he,ve);for(var Fe,Ke,ct=M;M.prev!==M.next;)if(Fe=M.prev,Ke=M.next,ve?wh(M,ae,he,ve):_h(M))O.push(Fe.i/Y),O.push(M.i/Y),O.push(Ke.i/Y),Kl(M),M=Ke.next,ct=Ke.next;else if((M=Ke)===ct){Se?Se===1?Xl(M=Th(tl(M),O,Y),O,Y,ae,he,ve,2):Se===2&&kh(M,O,Y,ae,he,ve):Xl(tl(M),O,Y,ae,he,ve,1);break}}}function _h(M){var O=M.prev,Y=M,ae=M.next;if($i(O,Y,ae)>=0)return!1;for(var he=M.next.next;he!==M.prev;){if(wl(O.x,O.y,Y.x,Y.y,ae.x,ae.y,he.x,he.y)&&$i(he.prev,he,he.next)>=0)return!1;he=he.next}return!0}function wh(M,O,Y,ae){var he=M.prev,ve=M,Se=M.next;if($i(he,ve,Se)>=0)return!1;for(var Fe=he.x<ve.x?he.x<Se.x?he.x:Se.x:ve.x<Se.x?ve.x:Se.x,Ke=he.y<ve.y?he.y<Se.y?he.y:Se.y:ve.y<Se.y?ve.y:Se.y,ct=he.x>ve.x?he.x>Se.x?he.x:Se.x:ve.x>Se.x?ve.x:Se.x,gt=he.y>ve.y?he.y>Se.y?he.y:Se.y:ve.y>Se.y?ve.y:Se.y,Bt=ou(Fe,Ke,O,Y,ae),Zt=ou(ct,gt,O,Y,ae),qt=M.prevZ,rr=M.nextZ;qt&&qt.z>=Bt&&rr&&rr.z<=Zt;){if(qt!==M.prev&&qt!==M.next&&wl(he.x,he.y,ve.x,ve.y,Se.x,Se.y,qt.x,qt.y)&&$i(qt.prev,qt,qt.next)>=0||(qt=qt.prevZ,rr!==M.prev&&rr!==M.next&&wl(he.x,he.y,ve.x,ve.y,Se.x,Se.y,rr.x,rr.y)&&$i(rr.prev,rr,rr.next)>=0))return!1;rr=rr.nextZ}for(;qt&&qt.z>=Bt;){if(qt!==M.prev&&qt!==M.next&&wl(he.x,he.y,ve.x,ve.y,Se.x,Se.y,qt.x,qt.y)&&$i(qt.prev,qt,qt.next)>=0)return!1;qt=qt.prevZ}for(;rr&&rr.z<=Zt;){if(rr!==M.prev&&rr!==M.next&&wl(he.x,he.y,ve.x,ve.y,Se.x,Se.y,rr.x,rr.y)&&$i(rr.prev,rr,rr.next)>=0)return!1;rr=rr.nextZ}return!0}function Th(M,O,Y){var ae=M;do{var he=ae.prev,ve=ae.next.next;!vc(he,ve)&&Gu(he,ae,ae.next,ve)&&Jl(he,ve)&&Jl(ve,he)&&(O.push(he.i/Y),O.push(ae.i/Y),O.push(ve.i/Y),Kl(ae),Kl(ae.next),ae=M=ve),ae=ae.next}while(ae!==M);return tl(ae)}function kh(M,O,Y,ae,he,ve){var Se=M;do{for(var Fe=Se.next.next;Fe!==Se.prev;){if(Se.i!==Fe.i&&Lh(Se,Fe)){var Ke=Yu(Se,Fe);return Se=tl(Se,Se.next),Ke=tl(Ke,Ke.next),Xl(Se,O,Y,ae,he,ve),void Xl(Ke,O,Y,ae,he,ve)}Fe=Fe.next}Se=Se.next}while(Se!==M)}function Mh(M,O){return M.x-O.x}function Ah(M,O){if(O=function(ae,he){var ve,Se=he,Fe=ae.x,Ke=ae.y,ct=-1/0;do{if(Ke<=Se.y&&Ke>=Se.next.y&&Se.next.y!==Se.y){var gt=Se.x+(Ke-Se.y)*(Se.next.x-Se.x)/(Se.next.y-Se.y);if(gt<=Fe&&gt>ct){if(ct=gt,gt===Fe){if(Ke===Se.y)return Se;if(Ke===Se.next.y)return Se.next}ve=Se.x<Se.next.x?Se:Se.next}}Se=Se.next}while(Se!==he);if(!ve)return null;if(Fe===ct)return ve;var Bt,Zt=ve,qt=ve.x,rr=ve.y,gr=1/0;Se=ve;do Fe>=Se.x&&Se.x>=qt&&Fe!==Se.x&&wl(Ke<rr?Fe:ct,Ke,qt,rr,Ke<rr?ct:Fe,Ke,Se.x,Se.y)&&(Bt=Math.abs(Ke-Se.y)/(Fe-Se.x),Jl(Se,ae)&&(Bt<gr||Bt===gr&&(Se.x>ve.x||Se.x===ve.x&&Sh(ve,Se)))&&(ve=Se,gr=Bt)),Se=Se.next;while(Se!==Zt);return ve}(M,O)){var Y=Yu(O,M);tl(O,O.next),tl(Y,Y.next)}}function Sh(M,O){return $i(M.prev,M,O.prev)<0&&$i(O.next,M,M.next)<0}function ou(M,O,Y,ae,he){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=32767*(M-Y)*he)|M<<8))|M<<4))|M<<2))|M<<1))|(O=1431655765&((O=858993459&((O=252645135&((O=16711935&((O=32767*(O-ae)*he)|O<<8))|O<<4))|O<<2))|O<<1))<<1}function Eh(M){var O=M,Y=M;do(O.x<Y.x||O.x===Y.x&&O.y<Y.y)&&(Y=O),O=O.next;while(O!==M);return Y}
vendor: 11,046 bytes, line 94
94function wl(M,O,Y,ae,he,ve,Se,Fe){return(he-Se)*(O-Fe)-(M-Se)*(ve-Fe)>=0&&(M-Se)*(ae-Fe)-(Y-Se)*(O-Fe)>=0&&(Y-Se)*(ve-Fe)-(he-Se)*(ae-Fe)>=0}function Lh(M,O){return M.next.i!==O.i&&M.prev.i!==O.i&&!function(Y,ae){var he=Y;do{if(he.i!==Y.i&&he.next.i!==Y.i&&he.i!==ae.i&&he.next.i!==ae.i&&Gu(he,he.next,Y,ae))return!0;he=he.next}while(he!==Y);return!1}(M,O)&&(Jl(M,O)&&Jl(O,M)&&function(Y,ae){var he=Y,ve=!1,Se=(Y.x+ae.x)/2,Fe=(Y.y+ae.y)/2;do he.y>Fe!=he.next.y>Fe&&he.next.y!==he.y&&Se<(he.next.x-he.x)*(Fe-he.y)/(he.next.y-he.y)+he.x&&(ve=!ve),he=he.next;while(he!==Y);return ve}(M,O)&&($i(M.prev,M,O.prev)||$i(M,O.prev,O))||vc(M,O)&&$i(M.prev,M,M.next)>0&&$i(O.prev,O,O.next)>0)}function $i(M,O,Y){return(O.y-M.y)*(Y.x-O.x)-(O.x-M.x)*(Y.y-O.y)}function vc(M,O){return M.x===O.x&&M.y===O.y}function Gu(M,O,Y,ae){var he=xc($i(M,O,Y)),ve=xc($i(M,O,ae)),Se=xc($i(Y,ae,M)),Fe=xc($i(Y,ae,O));return he!==ve&&Se!==Fe||!(he!==0||!yc(M,Y,O))||!(ve!==0||!yc(M,ae,O))||!(Se!==0||!yc(Y,M,ae))||!(Fe!==0||!yc(Y,O,ae))}function yc(M,O,Y){return O.x<=Math.max(M.x,Y.x)&&O.x>=Math.min(M.x,Y.x)&&O.y<=Math.max(M.y,Y.y)&&O.y>=Math.min(M.y,Y.y)}function xc(M){return M>0?1:M<0?-1:0}function Jl(M,O){return $i(M.prev,M,M.next)<0?$i(M,O,M.next)>=0&&$i(M,M.prev,O)>=0:$i(M,O,M.prev)<0||$i(M,M.next,O)<0}function Yu(M,O){var Y=new su(M.i,M.x,M.y),ae=new su(O.i,O.x,O.y),he=M.next,ve=O.prev;return M.next=O,O.prev=M,Y.next=he,he.prev=Y,ae.next=Y,Y.prev=ae,ve.next=ae,ae.prev=ve,ae}function Wu(M,O,Y,ae){var he=new su(M,O,Y);return ae?(he.next=ae.next,he.prev=ae,ae.next.prev=he,ae.next=he):(he.prev=he,he.next=he),he}function Kl(M){M.next.prev=M.prev,M.prev.next=M.next,M.prevZ&&(M.prevZ.nextZ=M.nextZ),M.nextZ&&(M.nextZ.prevZ=M.prevZ)}function su(M,O,Y){this.i=M,this.x=O,this.y=Y,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function lu(M,O,Y,ae){for(var he=0,ve=O,Se=Y-ae;ve<Y;ve+=ae)he+=(M[Se]-M[ve])*(M[ve+1]+M[Se+1]),Se=ve;return he}function Ch(M,O,Y,ae,he){(function ve(Se,Fe,Ke,ct,gt){for(;ct>Ke;){if(ct-Ke>600){var Bt=ct-Ke+1,Zt=Fe-Ke+1,qt=Math.log(Bt),rr=.5*Math.exp(2*qt/3),gr=.5*Math.sqrt(qt*rr*(Bt-rr)/Bt)*(Zt-Bt/2<0?-1:1),Er=Math.max(Ke,Math.floor(Fe-Zt*rr/Bt+gr)),Sr=Math.min(ct,Math.floor(Fe+(Bt-Zt)*rr/Bt+gr));ve(Se,Fe,Er,Sr,gt)}var Rr=Se[Fe],Br=Ke,Hr=ct;for(Ql(Se,Ke,Fe),gt(Se[ct],Rr)>0&&Ql(Se,Ke,ct);Br<Hr;){for(Ql(Se,Br,Hr),Br++,Hr--;gt(Se[Br],Rr)<0;)Br++;for(;gt(Se[Hr],Rr)>0;)Hr--}gt(Se[Ke],Rr)===0?Ql(Se,Ke,Hr):(Hr++,Ql(Se,Hr,ct)),Hr<=Fe&&(Ke=Hr+1),Fe<=Hr&&(ct=Hr-1)}})(M,O,Y,ae||M.length-1,he||Ph)}function Ql(M,O,Y){var ae=M[O];M[O]=M[Y],M[Y]=ae}function Ph(M,O){return M<O?-1:M>O?1:0}function cu(M,O){var Y=M.length;if(Y<=1)return[M];for(var ae,he,ve=[],Se=0;Se<Y;Se++){var Fe=P(M[Se]);Fe!==0&&(M[Se].area=Math.abs(Fe),he===void 0&&(he=Fe<0),he===Fe<0?(ae&&ve.push(ae),ae=[M[Se]]):ae.push(M[Se]))}if(ae&&ve.push(ae),O>1)for(var Ke=0;Ke<ve.length;Ke++)ve[Ke].length<=O||(Ch(ve[Ke],O,1,ve[Ke].length-1,Ih),ve[Ke]=ve[Ke].slice(0,O));return ve}function Ih(M,O){return O.area-M.area}function uu(M,O,Y){for(var ae=Y.patternDependencies,he=!1,ve=0,Se=O;ve<Se.length;ve+=1){var Fe=Se[ve].paint.get(M+"-pattern");Fe.isConstant()||(he=!0);var Ke=Fe.constantOr(null);Ke&&(he=!0,ae[Ke.to]=!0,ae[Ke.from]=!0)}return he}function fu(M,O,Y,ae,he){for(var ve=he.patternDependencies,Se=0,Fe=O;Se<Fe.length;Se+=1){var Ke=Fe[Se],ct=Ke.paint.get(M+"-pattern").value;if(ct.kind!=="constant"){var gt=ct.evaluate({zoom:ae-1},Y,{},he.availableImages),Bt=ct.evaluate({zoom:ae},Y,{},he.availableImages),Zt=ct.evaluate({zoom:ae+1},Y,{},he.availableImages);gt=gt&&gt.name?gt.name:gt,Bt=Bt&&Bt.name?Bt.name:Bt,Zt=Zt&&Zt.name?Zt.name:Zt,ve[gt]=!0,ve[Bt]=!0,ve[Zt]=!0,Y.patterns[Ke.id]={min:gt,mid:Bt,max:Zt}}}return Y}mc.deviation=function(M,O,Y,ae){var he=O&&O.length,ve=he?O[0]*Y:M.length,Se=Math.abs(lu(M,0,ve,Y));if(he)for(var Fe=0,Ke=O.length;Fe<Ke;Fe++){var ct=O[Fe]*Y,gt=Fe<Ke-1?O[Fe+1]*Y:M.length;Se-=Math.abs(lu(M,ct,gt,Y))}var Bt=0;for(Fe=0;Fe<ae.length;Fe+=3){var Zt=ae[Fe]*Y,qt=ae[Fe+1]*Y,rr=ae[Fe+2]*Y;Bt+=Math.abs((M[Zt]-M[rr])*(M[qt+1]-M[Zt+1])-(M[Zt]-M[qt])*(M[rr+1]-M[Zt+1]))}return Se===0&&Bt===0?0:Math.abs((Bt-Se)/Se)},mc.flatten=function(M){for(var O=M[0][0].length,Y={vertices:[],holes:[],dimensions:O},ae=0,he=0;he<M.length;he++){for(var ve=0;ve<M[he].length;ve++)for(var Se=0;Se<O;Se++)Y.vertices.push(M[he][ve][Se]);he>0&&(ae+=M[he-1].length,Y.holes.push(ae))}return Y},iu.default=bh;var Ss=function(M){this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(O){return O.id}),this.index=M.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new is,this.indexArray=new Qi,this.indexArray2=new B,this.programConfigurations=new ii(Hu,M.layers,M.zoom),this.segments=new Ft,this.segments2=new Ft,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};Ss.prototype.populate=function(M,O,Y){this.hasPattern=uu("fill",this.layers,O);for(var ae=this.layers[0].layout.get("fill-sort-key"),he=[],ve=0,Se=M;ve<Se.length;ve+=1){var Fe=Se[ve],Ke=Fe.feature,ct=Fe.id,gt=Fe.index,Bt=Fe.sourceLayerIndex,Zt=this.layers[0]._featureFilter.needGeometry,qt={type:Ke.type,id:ct,properties:Ke.properties,geometry:Zt?ui(Ke):[]};if(this.layers[0]._featureFilter.filter(new Ka(this.zoom),qt,Y)){Zt||(qt.geometry=ui(Ke));var rr=ae?ae.evaluate(qt,{},Y,O.availableImages):void 0,gr={id:ct,properties:Ke.properties,type:Ke.type,sourceLayerIndex:Bt,index:gt,geometry:qt.geometry,patterns:{},sortKey:rr};he.push(gr)}}ae&&he.sort(function(Hn,ta){return Hn.sortKey-ta.sortKey});for(var Er=0,Sr=he;Er<Sr.length;Er+=1){var Rr=Sr[Er],Br=Rr,Hr=Br.geometry,fn=Br.index,xn=Br.sourceLayerIndex;if(this.hasPattern){var Fn=fu("fill",this.layers,Rr,this.zoom,O);this.patternFeatures.push(Fn)}else this.addFeature(Rr,Hr,fn,Y,{});var Rn=M[fn].feature;O.featureIndex.insert(Rn,Hr,fn,xn,this.index)}},Ss.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Y)},Ss.prototype.addFeatures=function(M,O,Y){for(var ae=0,he=this.patternFeatures;ae<he.length;ae+=1){var ve=he[ae];this.addFeature(ve,ve.geometry,ve.index,O,Y)}},Ss.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ss.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ss.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,Hu),this.indexBuffer=M.createIndexBuffer(this.indexArray),this.indexBuffer2=M.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(M),this.uploaded=!0},Ss.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Ss.prototype.addFeature=function(M,O,Y,ae,he){for(var ve=0,Se=cu(O,500);ve<Se.length;ve+=1){for(var Fe=Se[ve],Ke=0,ct=0,gt=Fe;ct<gt.length;ct+=1)Ke+=gt[ct].length;for(var Bt=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray),Zt=Bt.vertexLength,qt=[],rr=[],gr=0,Er=Fe;gr<Er.length;gr+=1){var Sr=Er[gr];if(Sr.length!==0){Sr!==Fe[0]&&rr.push(qt.length/2);var Rr=this.segments2.prepareSegment(Sr.length,this.layoutVertexArray,this.indexArray2),Br=Rr.vertexLength;this.layoutVertexArray.emplaceBack(Sr[0].x,Sr[0].y),this.indexArray2.emplaceBack(Br+Sr.length-1,Br),qt.push(Sr[0].x),qt.push(Sr[0].y);for(var Hr=1;Hr<Sr.length;Hr++)this.layoutVertexArray.emplaceBack(Sr[Hr].x,Sr[Hr].y),this.indexArray2.emplaceBack(Br+Hr-1,Br+Hr),qt.push(Sr[Hr].x),qt.push(Sr[Hr].y);Rr.vertexLength+=Sr.length,Rr.primitiveLength+=Sr.length}}for(var fn=iu(qt,rr),xn=0;xn<fn.length;xn+=3)this.indexArray.emplaceBack(Zt+fn[xn],Zt+fn[xn+1],Zt+fn[xn+2]);Bt.vertexLength+=Ke,Bt.primitiveLength+=fn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Y,he,ae)},Zr("FillBucket",Ss,{omit:["layers","patternFeatures"]});var Oh=new Ao({"fill-sort-key":new ga(Ce.layout_fill["fill-sort-key"])}),zh={paint:new Ao({"fill-antialias":new ia(Ce.paint_fill["fill-antialias"]),"fill-opacity":new ga(Ce.paint_fill["fill-opacity"]),"fill-color":new ga(Ce.paint_fill["fill-color"]),"fill-outline-color":new ga(Ce.paint_fill["fill-outline-color"]),"fill-translate":new ia(Ce.paint_fill["fill-translate"]),"fill-translate-anchor":new ia(Ce.paint_fill["fill-translate-anchor"]),"fill-pattern":new Rs(Ce.paint_fill["fill-pattern"])}),layout:Oh},Dh=function(M){function O(Y){M.call(this,Y,zh)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.recalculate=function(Y,ae){M.prototype.recalculate.call(this,Y,ae);var he=this.paint._values["fill-outline-color"];he.value.kind==="constant"&&he.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},O.prototype.createBucket=function(Y){return new Ss(Y)},O.prototype.queryRadius=function(){return So(this.paint.get("fill-translate"))},O.prototype.queryIntersectsFeature=function(Y,ae,he,ve,Se,Fe,Ke){return Bs(Eo(Y,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Fe.angle,Ke),ve)},O.prototype.isTileClipped=function(){return!0},O}(Uo),Zu=Qa([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Xu=Tl;function Tl(M,O,Y,ae,he){this.properties={},this.extent=Y,this.type=0,this._pbf=M,this._geometry=-1,this._keys=ae,this._values=he,M.readFields(Rh,this,O)}function Rh(M,O,Y){M==1?O.id=Y.readVarint():M==2?function(ae,he){for(var ve=ae.readVarint()+ae.pos;ae.pos<ve;){var Se=he._keys[ae.readVarint()],Fe=he._values[ae.readVarint()];he.properties[Se]=Fe}}(Y,O):M==3?O.type=Y.readVarint():M==4&&(O._geometry=Y.pos)}function Fh(M){for(var O,Y,ae=0,he=0,ve=M.length,Se=ve-1;he<ve;Se=he++)O=M[he],ae+=((Y=M[Se]).x-O.x)*(O.y+Y.y);return ae}Tl.types=["Unknown","Point","LineString","Polygon"],Tl.prototype.loadGeometry=function(){var M=this._pbf;M.pos=this._geometry;for(var O,Y=M.readVarint()+M.pos,ae=1,he=0,ve=0,Se=0,Fe=[];M.pos<Y;){if(he<=0){var Ke=M.readVarint();ae=7&Ke,he=Ke>>3}if(he--,ae===1||ae===2)ve+=M.readSVarint(),Se+=M.readSVarint(),ae===1&&(O&&Fe.push(O),O=[]),O.push(new r(ve,Se));else{if(ae!==7)throw new Error("unknown command "+ae);O&&O.push(O[0].clone())}}return O&&Fe.push(O),Fe},Tl.prototype.bbox=function(){var M=this._pbf;M.pos=this._geometry;for(var O=M.readVarint()+M.pos,Y=1,ae=0,he=0,ve=0,Se=1/0,Fe=-1/0,Ke=1/0,ct=-1/0;M.pos<O;){if(ae<=0){var gt=M.readVarint();Y=7&gt,ae=gt>>3}if(ae--,Y===1||Y===2)(he+=M.readSVarint())<Se&&(Se=he),he>Fe&&(Fe=he),(ve+=M.readSVarint())<Ke&&(Ke=ve),ve>ct&&(ct=ve);else if(Y!==7)throw new Error("unknown command "+Y)}return[Se,Ke,Fe,ct]},Tl.prototype.toGeoJSON=function(M,O,Y){var ae,he,ve=this.extent*Math.pow(2,Y),Se=this.extent*M,Fe=this.extent*O,Ke=this.loadGeometry(),ct=Tl.types[this.type];function gt(qt){for(var rr=0;rr<qt.length;
94rr++){var gr=qt[rr],Er=180-360*(gr.y+Fe)/ve;qt[rr]=[360*(gr.x+Se)/ve-180,360/Math.PI*Math.atan(Math.exp(Er*Math.PI/180))-90]}}switch(this.type){case 1:var Bt=[];for(ae=0;ae<Ke.length;ae++)Bt[ae]=Ke[ae][0];gt(Ke=Bt);break;case 2:for(ae=0;ae<Ke.length;ae++)gt(Ke[ae]);break;case 3:for(Ke=function(qt){var rr=qt.length;if(rr<=1)return[qt];for(var gr,Er,Sr=[],Rr=0;Rr<rr;Rr++){var Br=Fh(qt[Rr]);Br!==0&&(Er===void 0&&(Er=Br<0),Er===Br<0?(gr&&Sr.push(gr),gr=[qt[Rr]]):gr.push(qt[Rr]))}return gr&&Sr.push(gr),Sr}(Ke),ae=0;ae<Ke.length;ae++)for(he=0;he<Ke[ae].length;he++)gt(Ke[ae][he])}Ke.length===1?Ke=Ke[0]:ct="Multi"+ct;var Zt={type:"Feature",geometry:{type:ct,coordinates:Ke},properties:this.properties};return"id"in this&&(Zt.id=this.id),Zt};var Ju=Ku;function Ku(M,O){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=M,this._keys=[],this._values=[],this._features=[],M.readFields(Bh,this,O),this.length=this._features.length}function Bh(M,O,Y){M===15?O.version=Y.readVarint():M===1?O.name=Y.readString():M===5?O.extent=Y.readVarint():M===2?O._features.push(Y.pos):M===3?O._keys.push(Y.readString()):M===4&&O._values.push(function(ae){for(var he=null,ve=ae.readVarint()+ae.pos;ae.pos<ve;){var Se=ae.readVarint()>>3;he=Se===1?ae.readString():Se===2?ae.readFloat():Se===3?ae.readDouble():Se===4?ae.readVarint64():Se===5?ae.readVarint():Se===6?ae.readSVarint():Se===7?ae.readBoolean():null}return he}(Y))}function Nh(M,O,Y){if(M===3){var ae=new Ju(Y,Y.readVarint()+Y.pos);ae.length&&(O[ae.name]=ae)}}Ku.prototype.feature=function(M){if(M<0||M>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[M];var O=this._pbf.readVarint()+this._pbf.pos;return new Xu(this._pbf,O,this.extent,this._keys,this._values)};var kl={VectorTile:function(M,O){this.layers=M.readFields(Nh,{},O)},VectorTileFeature:Xu,VectorTileLayer:Ju},jh=kl.VectorTileFeature.types,hu=Math.pow(2,13);function $l(M,O,Y,ae,he,ve,Se,Fe){M.emplaceBack(O,Y,2*Math.floor(ae*hu)+Se,he*hu*2,ve*hu*2,Math.round(Fe))}var Es=function(M){this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(O){return O.id}),this.index=M.index,this.hasPattern=!1,this.layoutVertexArray=new ps,this.indexArray=new Qi,this.programConfigurations=new ii(Zu,M.layers,M.zoom),this.segments=new Ft,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};function Uh(M,O){return M.x===O.x&&(M.x<0||M.x>8192)||M.y===O.y&&(M.y<0||M.y>8192)}function Vh(M){return M.every(function(O){return O.x<0})||M.every(function(O){return O.x>8192})||M.every(function(O){return O.y<0})||M.every(function(O){return O.y>8192})}Es.prototype.populate=function(M,O,Y){this.features=[],this.hasPattern=uu("fill-extrusion",this.layers,O);for(var ae=0,he=M;ae<he.length;ae+=1){var ve=he[ae],Se=ve.feature,Fe=ve.id,Ke=ve.index,ct=ve.sourceLayerIndex,gt=this.layers[0]._featureFilter.needGeometry,Bt={type:Se.type,id:Fe,properties:Se.properties,geometry:gt?ui(Se):[]};if(this.layers[0]._featureFilter.filter(new Ka(this.zoom),Bt,Y)){var Zt={id:Fe,sourceLayerIndex:ct,index:Ke,geometry:gt?Bt.geometry:ui(Se),properties:Se.properties,type:Se.type,patterns:{}};Se.id!==void 0&&(Zt.id=Se.id),this.hasPattern?this.features.push(fu("fill-extrusion",this.layers,Zt,this.zoom,O)):this.addFeature(Zt,Zt.geometry,Ke,Y,{}),O.featureIndex.insert(Se,Zt.geometry,Ke,ct,this.index,!0)}}},Es.prototype.addFeatures=function(M,O,Y){for(var ae=0,he=this.features;ae<he.length;ae+=1){var ve=he[ae],Se=ve.geometry;this.addFeature(ve,Se,ve.index,O,Y)}},Es.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Y)},Es.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Es.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Es.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,Zu),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},Es.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Es.prototype.addFeature=function(M,O,Y,ae,he){for(var ve=0,Se=cu(O,500);ve<Se.length;ve+=1){for(var Fe=Se[ve],Ke=0,ct=0,gt=Fe;ct<gt.length;ct+=1)Ke+=gt[ct].length;for(var Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),Zt=0,qt=Fe;Zt<qt.length;Zt+=1){var rr=qt[Zt];if(rr.length!==0&&!Vh(rr))for(var gr=0,Er=0;Er<rr.length;Er++){var Sr=rr[Er];if(Er>=1){var Rr=rr[Er-1];if(!Uh(Sr,Rr)){Bt.vertexLength+4>Ft.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Br=Sr.sub(Rr)._perp()._unit(),Hr=Rr.dist(Sr);gr+Hr>32768&&(gr=0),$l(this.layoutVertexArray,Sr.x,Sr.y,Br.x,Br.y,0,0,gr),$l(this.layoutVertexArray,Sr.x,Sr.y,Br.x,Br.y,0,1,gr),gr+=Hr,$l(this.layoutVertexArray,Rr.x,Rr.y,Br.x,Br.y,0,0,gr),$l(this.layoutVertexArray,Rr.x,Rr.y,Br.x,Br.y,0,1,gr);var fn=Bt.vertexLength;this.indexArray.emplaceBack(fn,fn+2,fn+1),this.indexArray.emplaceBack(fn+1,fn+2,f
vendor: 3,510 bytes, line 94
94n+3),Bt.vertexLength+=4,Bt.primitiveLength+=2}}}}if(Bt.vertexLength+Ke>Ft.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray)),jh[M.type]==="Polygon"){for(var xn=[],Fn=[],Rn=Bt.vertexLength,Hn=0,ta=Fe;Hn<ta.length;Hn+=1){var ra=ta[Hn];if(ra.length!==0){ra!==Fe[0]&&Fn.push(xn.length/2);for(var Wn=0;Wn<ra.length;Wn++){var ca=ra[Wn];$l(this.layoutVertexArray,ca.x,ca.y,0,0,1,1,0),xn.push(ca.x),xn.push(ca.y)}}}for(var sa=iu(xn,Fn),na=0;na<sa.length;na+=3)this.indexArray.emplaceBack(Rn+sa[na],Rn+sa[na+2],Rn+sa[na+1]);Bt.primitiveLength+=sa.length/3,Bt.vertexLength+=Ke}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Y,he,ae)},Zr("FillExtrusionBucket",Es,{omit:["layers","features"]});var Hh={paint:new Ao({"fill-extrusion-opacity":new ia(Ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ga(Ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ia(Ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ia(Ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Rs(Ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ga(Ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ga(Ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ia(Ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},qh=function(M){function O(Y){M.call(this,Y,Hh)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.createBucket=function(Y){return new Es(Y)},O.prototype.queryRadius=function(){return So(this.paint.get("fill-extrusion-translate"))},O.prototype.is3D=function(){return!0},O.prototype.queryIntersectsFeature=function(Y,ae,he,ve,Se,Fe,Ke,ct){var gt=Eo(Y,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Fe.angle,Ke),Bt=this.paint.get("fill-extrusion-height").evaluate(ae,he),Zt=this.paint.get("fill-extrusion-base").evaluate(ae,he),qt=function(gr,Er,Sr,Rr){for(var Br=[],Hr=0,fn=gr;Hr<fn.length;Hr+=1){var xn=fn[Hr],Fn=[xn.x,xn.y,Rr,1];_l(Fn,Fn,Er),Br.push(new r(Fn[0]/Fn[3],Fn[1]/Fn[3]))}return Br}(gt,ct,0,0),rr=function(gr,Er,Sr,Rr){for(var Br=[],Hr=[],fn=Rr[8]*Er,xn=Rr[9]*Er,Fn=Rr[10]*Er,Rn=Rr[11]*Er,Hn=Rr[8]*Sr,ta=Rr[9]*Sr,ra=Rr[10]*Sr,Wn=Rr[11]*Sr,ca=0,sa=gr;ca<sa.length;ca+=1){for(var na=sa[ca],Ga=[],Ra=[],Xa=0,ya=na;Xa<ya.length;Xa+=1){var Na=ya[Xa],hi=Na.x,oi=Na.y,wi=Rr[0]*hi+Rr[4]*oi+Rr[12],si=Rr[1]*hi+Rr[5]*oi+Rr[13],ro=Rr[2]*hi+Rr[6]*oi+Rr[14],Ti=Rr[3]*hi+Rr[7]*oi+Rr[15],Lo=ro+Fn,vo=Ti+Rn,bo=wi+Hn,Vo=si+ta,Oo=ro+ra,no=Ti+Wn,_o=new r((wi+fn)/vo,(si+xn)/vo);_o.z=Lo/vo,Ga.push(_o);var qi=new r(bo/no,Vo/no);qi.z=Oo/no,Ra.push(qi)}Br.push(Ga),Hr.push(Ra)}return[Br,Hr]}(ve,Zt,Bt,ct);return function(gr,Er,Sr){var Rr=1/0;Bs(Sr,Er)&&(Rr=Qu(Sr,Er[0]));for(var Br=0;Br<Er.length;Br++)for(var Hr=Er[Br],fn=gr[Br],xn=0;xn<Hr.length-1;xn++){var Fn=Hr[xn],Rn=Hr[xn+1],Hn=fn[xn],ta=fn[xn+1],ra=[Fn,Rn,ta,Hn,Fn];Po(Sr,ra)&&(Rr=Math.min(Rr,Qu(Sr,ra)))}return Rr!==1/0&&Rr}(rr[0],rr[1],qt)},O}(Uo);function ec(M,O){return M.x*O.x+M.y*O.y}function Qu(M,O){if(M.length===1){for(var Y,ae=0,he=O[ae++];!Y||he.equals(Y);)if(!(Y=O[ae++]))return 1/0;for(;ae<O.length;ae++){var ve=O[ae],Se=M[0],Fe=Y.sub(he),Ke=ve.sub(he),ct=Se.sub(he),gt=ec(Fe,Fe),Bt=ec(Fe,Ke),Zt=ec(Ke,Ke),qt=ec(ct,Fe),rr=ec(ct,Ke),gr=gt*Zt-
94Bt*Bt,Er=(Zt*qt-Bt*rr)/gr,Sr=(gt*rr-Bt*qt)/gr,Rr=1-Er-Sr,Br=he.z*Rr+Y.z*Er+ve.z*Sr;if(isFinite(Br))return Br}return 1/0}for(var Hr=1/0,fn=0,xn=O;fn<xn.length;fn+=1){var Fn=xn[fn];Hr=Math.min(Hr,Fn.z)}return Hr}var $u=Qa([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Gh=kl.VectorTileFeature.types,Yh=Math.cos(Math.PI/180*37.5),ef=Math.pow(2,14)/.5,Zo=function(M){this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(O){return O.id}),this.index=M.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ks,this.indexArray=new Qi,this.programConfigurations=new ii($u,M.layers,M.zoom),this.segments=new Ft,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};Zo.prototype.populate=function(M,O,Y){this.hasPattern=uu("line",this.layers,O);for(var ae=this.layers[0].layout.get("line-sort-key"),he=[],ve=0,Se=M;ve<Se.length;ve+=1){var Fe=Se[ve],Ke=Fe.feature,ct=Fe.id,gt=Fe.index,Bt=Fe.sourceLayerIndex,Zt=this.layers[0]._featureFilter.needGeometry,qt={type:Ke.type,id:ct,properties:Ke.properties,geometry:Zt?ui(Ke):[]};if(this.layers[0]._featureFilter.filter(new Ka(this.zoom),qt,Y)){Zt||(qt.geometry=ui(Ke));var rr=ae?ae.evaluate(qt,{},Y):void 0,gr={id:ct,properties:Ke.properties,type:Ke.type,sourceLayerIndex:Bt,index:gt,geometry:qt.geometry,patterns:{},sortKey:rr};he.push(gr)}}ae&&he.sort(function(Hn,ta){return Hn.sortKey-ta.sortKey});for(var Er=0,Sr=he;Er<Sr.length;Er+=1){var Rr=Sr[Er],Br=Rr,Hr=Br.geometry,fn=Br.index,xn=Br.sourceLayerIndex;if(this.hasPattern){var Fn=fu("line",this.layers,Rr,this.zoom,O);this.patternFeatures.push(Fn)}else this.addFeature(Rr,Hr,fn,Y,{});var Rn=M[fn].feature;O.featureIndex.insert(Rn,Hr,fn,xn,this.index)}},Zo.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Y)},Zo.prototype.addFeatures=function(M,O,Y){for(var ae=0,he=this.patternFeatures;ae<he.length;ae+=1){var ve=he[ae];this.addFeature(ve,ve.geometry,ve.index,O,Y)}},Zo.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Zo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Zo.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,$u),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},Zo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Zo.prototype.addFeature=function(M,O,Y,ae,he){for(var ve=this.layers[0].layout,Se=ve.get("line-join").evaluate(M,{}),Fe=ve.get("line-cap"),Ke=ve.get("line-miter-limit"),ct=ve.get("line-round-limit"),gt=0,Bt=O;gt<Bt.length;gt+=1){var Zt=Bt[gt];this.addLine(Zt,M,Se,Fe,Ke,ct)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Y,he,ae)},Zo.prototype.addLine=function(M,O,Y,ae,he,ve){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,O.properties&&O.properties.hasOwnProperty("mapbox_clip_start")&&O.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+O.properties.mapbox_clip_start,this.clipEnd=+O.properties.mapbox_clip_end;for(var Se=0;Se<M.length-1;Se++)this.totalDistance+=M[Se].dist(M[Se+1]);this.updateScaledDistance()}for(var Fe=Gh[O.type]==="Polygon",Ke=M.length;Ke>=2&&M[Ke-1].equals(M[Ke-2]);)Ke--;for(var ct=0;ct<Ke-1&&M[ct].equals(M[ct+1]);)ct++;if(!(Ke<(Fe?3:2))){Y==="bevel"&&(he=1.05);var gt,Bt=this.overscaling<=16?122880/(512*this.overscaling):0,Zt=this.segments.prepareSegment(10*Ke,this.layoutVertexArray,this.indexArray),qt=void 0,rr=void 0,gr=void 0,Er=void 0;this.e1=this.e2=-1,Fe&&(gt=M[Ke-2],Er=M[ct].sub(gt)._unit()._perp());for(var Sr=ct;Sr<Ke;Sr++)if(!(rr=Sr===Ke-1?Fe?M[ct+1]:void 0:M[Sr+1])||!M[Sr].equals(rr)){Er&&(gr=Er),gt&&(qt=gt),gt=M[Sr],Er=rr?rr.sub(gt)._unit()._perp():gr;var Rr=(gr=gr||Er).add(Er);Rr.x===0&&Rr.y===0||Rr._unit();var Br=gr.x*Er.x+gr.y*Er.y,Hr=Rr.x*Er.x+Rr.y*Er.y,fn=Hr!==0?1/Hr:1/0,xn=2*Math.sqrt(2-2*Hr),Fn=Hr<Yh&&qt&&rr,Rn=gr.x*Er.y-gr.y*Er.x>0;if(Fn&&Sr>ct){var Hn=gt.dist(qt);if(Hn>2*Bt){var ta=gt.sub(gt.sub(qt)._mult(Bt/Hn)._round());this.updateDistance(qt,ta),this.addCurrentVertex(ta,gr,0,0,Zt),qt=ta}}var ra=qt&&rr,Wn=ra?Y:Fe?"butt":ae;if(ra&&Wn==="round"&&(fn<ve?Wn="miter":fn<=2&&(Wn="fakeround")),Wn==="miter"&&fn>he&&(Wn="bevel"),Wn==="bevel"&&(fn>2&&(Wn="flipbevel"),fn<he&&(Wn="miter")),qt&&this.updateDistance(qt,gt),Wn==="miter")Rr._mult(fn),this.addCurrentVertex(gt,Rr,0,0,Zt);else if(Wn==="flipbevel"){if(fn>100)Rr=Er.mult(-1);else{var ca=fn*gr.add(Er).mag()/gr.sub(Er).mag();Rr._perp()._mult(ca*(Rn?-1:1))}this.addCurrentVertex(gt,Rr,0,0,Zt),this.addCurrentVertex(gt,Rr.mult(-1),0,0,Zt)}else if(Wn==="bevel"||Wn==="fakeround"){var sa=-Math.sqrt(fn*fn-1),na=Rn?sa:0,Ga=Rn?0:sa;if(qt&&this.addCurrentVertex(gt,gr,na,Ga,Zt),Wn==="fakeround")for(var Ra=Math.round(180*xn/Math.PI/20),Xa=1;Xa<Ra;Xa++){var ya=Xa/Ra;if(ya!==.5){var Na=ya-.5;ya+=ya*Na*(ya-1)*((1.0904+Br*(Br*(3.55645-1.43519*Br)-3.2452))*Na*Na+(.848013+Br*(.215638*Br-1.06021)))}var hi=Er.sub(gr)._mult(ya)._add(gr)._unit()._mult(Rn?-1:1);this.addHalfVertex(gt,hi.x,hi.y,!1,Rn,0,Zt)}rr&&this.addCurrentVertex(gt,Er,-na,-Ga,Zt)}else if(Wn==="butt")this.addCurrentVertex(gt,Rr,0,0,Zt);else if(Wn==="square"){var oi=qt?1:-1;this.addCurrentVertex(gt,Rr,oi,oi,Zt)}else Wn==="round"&&(qt&&(this.addCurrentVertex(gt,gr,0,0,Zt),this.addCurrentVertex(gt,gr,1,1,Zt,!0)),rr&&(this.addCurrentVertex(gt,Er,-1,-1,Zt,!0),this.addCurrentVertex(gt,Er,0,0,Zt)));if(Fn&&Sr<Ke-1){var wi=gt.dist(rr);if(wi>2*Bt){var si=gt.add(rr.sub(gt)._mult(Bt/wi)._round());this.updateDistance(gt,si),this.addCurrentVertex(si,Er,0,0,Zt),gt=si}}}}},Zo.prototype.addCurrentVertex=function(M,O,Y,ae,he,ve){ve===void 0&&(ve=!1);var Se=O.x+O.y*Y,Fe=O.y-O.x*Y,Ke=-O.x+O.y*ae,ct=-O.y-O.x*ae;this.addHalfVertex(M,Se,Fe,ve,!1,Y,he),this.addHalfVertex(M,Ke,ct,ve,!0,-ae,he),this.distance>ef/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(M,O,Y,ae,he,ve))},Zo.prototype.addHalfVertex=function(M,O,Y,ae,he,ve,Se){var Fe=M.x,Ke=M.y,ct=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((Fe<<1)+(ae?1:0),(Ke<<1)+(he?1:0),Math.round(63*O)+128,Math.round(63*Y)+128,1+(ve===0?0:ve<0?-1:1)|(63&ct)<<2,ct>>6);var gt=Se.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,gt),Se.primitiveLength++),he?this.e2=gt:this.e1=gt},Zo.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(ef-1):this.distance},Zo.prototype.updateDistance=function(M,O){this.distance+=M.dist(O),this.updateScaledDistance()},Zr("LineBucket",Zo,{omit:["layers","patternFeatures"]});var Wh=new Ao({"line-cap":new ia(Ce.layout_line["line-cap"]),"line-join":new ga(Ce.layout_line["line-join"]),"line-miter-limit":new ia(Ce.layout_line["line-miter-limit"]),"line-round-limit":new ia(Ce.layout_line["line-round-limit"]),"line-sort-key":new ga(Ce.layout_line["line-sort-key"])}),tf={paint:new Ao({"line-opacity":new ga(Ce.paint_line["line-opacity"]),"line-color":new ga(Ce.paint_line["line-color"]),"line-translate":new ia(Ce.paint_line["line-translate"]),"line-translate-anchor":new ia(Ce.paint_line["line-translate-anchor"]),"line-width":new ga(Ce.paint_line["line-width"]),"line-gap-width":new ga(Ce.paint_line["line-gap-width"]),"line-offset":new ga(Ce.paint_line["line-offset"]),"line-blur"
vendor: 7,353 bytes, line 94
94:new ga(Ce.paint_line["line-blur"]),"line-dasharray":new Fs(Ce.paint_line["line-dasharray"]),"line-pattern":new Rs(Ce.paint_line["line-pattern"]),"line-gradient":new es(Ce.paint_line["line-gradient"])}),layout:Wh},rf=new(function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.possiblyEvaluate=function(Y,ae){return ae=new Ka(Math.floor(ae.zoom),{now:ae.now,fadeDuration:ae.fadeDuration,zoomHistory:ae.zoomHistory,transition:ae.transition}),M.prototype.possiblyEvaluate.call(this,Y,ae)},O.prototype.evaluate=function(Y,ae,he,ve){return ae=s({},ae,{zoom:Math.floor(ae.zoom)}),M.prototype.evaluate.call(this,Y,ae,he,ve)},O}(ga))(tf.paint.properties["line-width"].specification);rf.useIntegerZoom=!0;var Zh=function(M){function O(Y){M.call(this,Y,tf)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype._handleSpecialPaintPropertyUpdate=function(Y){Y==="line-gradient"&&this._updateGradient()},O.prototype._updateGradient=function(){var Y=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Vu(Y,"lineProgress"),this.gradientTexture=null},O.prototype.recalculate=function(Y,ae){M.prototype.recalculate.call(this,Y,ae),this.paint._values["line-floorwidth"]=rf.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Y)},O.prototype.createBucket=function(Y){return new Zo(Y)},O.prototype.queryRadius=function(Y){var ae=Y,he=nf(bi("line-width",this,ae),bi("line-gap-width",this,ae)),ve=bi("line-offset",this,ae);return he/2+Math.abs(ve)+So(this.paint.get("line-translate"))},O.prototype.queryIntersectsFeature=function(Y,ae,he,ve,Se,Fe,Ke){var ct=Eo(Y,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Fe.angle,Ke),gt=Ke/2*nf(this.paint.get("line-width").evaluate(ae,he),this.paint.get("line-gap-width").evaluate(ae,he)),Bt=this.paint.get("line-offset").evaluate(ae,he);return Bt&&(ve=function(Zt,qt){for(var rr=[],gr=new r(0,0),Er=0;Er<Zt.length;Er++){for(var Sr=Zt[Er],Rr=[],Br=0;Br<Sr.length;Br++){var Hr=Sr[Br-1],fn=Sr[Br],xn=Sr[Br+1],Fn=Br===0?gr:fn.sub(Hr)._unit()._perp(),Rn=Br===Sr.length-1?gr:xn.sub(fn)._unit()._perp(),Hn=Fn._add(Rn)._unit(),ta=Hn.x*Rn.x+Hn.y*Rn.y;Hn._mult(1/ta),Rr.push(Hn._mult(qt)._add(fn))}rr.push(Rr)}return rr}(ve,Bt*Ke)),function(Zt,qt,rr){for(var gr=0;gr<qt.length;gr++){var Er=qt[gr];if(Zt.length>=3){for(var Sr=0;Sr<Er.length;Sr++)if(ts(Zt,Er[Sr]))return!0}if(cl(Zt,Er,rr))return!0}return!1}(ct,ve,gt)},O.prototype.isTileClipped=function(){return!0},O}(Uo);function nf(M,O){return O>0?O+2*M:M}var pu=Qa([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Xh=Qa([{name:"a_projected_pos",components:3,type:"Float32"}],4),Jh=(Qa([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Qa([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),af=(Qa([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Qa([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Kh=Qa([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Qa([{name:"triangle",components:3,type:"Uint16"}]),Qa([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Qa([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Qa([{type:"Float32",name:"offsetX"}]),Qa([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function Qh(M,O,Y){return M.sections.forEach(function(ae){ae.text=function(he,ve,Se){var Fe=ve.layout.get("text-transform").evaluate(Se,{});return Fe==="uppercase"?he=he.toLocaleUpperCase():Fe==="lowercase"&&(he=he.toLocaleLowerCase()),io.applyArabicShaping&&(he=io.applyArabicShaping(he)),he}(ae.text,O,Y)}),M}var tc={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},of=function(M,O,Y,ae,he){var ve,Se,Fe=8*he-ae-1,Ke=(1<<Fe)-1,ct=Ke>>1,gt=-7,Bt=he-1,Zt=-1,qt=M[O+Bt];for(Bt+=Zt,ve=qt&(1<<-gt)-1,qt>>=-gt,gt+=Fe;gt>0;ve=256*ve+M[O+Bt],Bt+=Zt,gt-=8);for(Se=ve&(1<<-gt)-1,ve>>=-gt,gt+=ae;gt>0;Se=256*Se+M[O+Bt],Bt+=Zt,gt-=8);if(ve===0)ve=1-ct;else{if(ve===Ke)return Se?NaN:1/0*(qt?-1:1);Se+=Math.pow(2,ae),ve-=ct}return(qt?-1:1)*Se*Math.pow(2,ve-ae)},sf=function(M,O,Y,ae,he,ve){var Se,Fe,Ke,ct=8*ve-he-1,gt=(1<<ct)-1,Bt=gt>>1,Zt=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,qt=0,rr=1,gr=O<0||O===0&&1
vendor: 10,174 bytes, line 94
94/O<0?1:0;for(O=Math.abs(O),isNaN(O)||O===1/0?(Fe=isNaN(O)?1:0,Se=gt):(Se=Math.floor(Math.log(O)/Math.LN2),O*(Ke=Math.pow(2,-Se))<1&&(Se--,Ke*=2),(O+=Se+Bt>=1?Zt/Ke:Zt*Math.pow(2,1-Bt))*Ke>=2&&(Se++,Ke/=2),Se+Bt>=gt?(Fe=0,Se=gt):Se+Bt>=1?(Fe=(O*Ke-1)*Math.pow(2,he),Se+=Bt):(Fe=O*Math.pow(2,Bt-1)*Math.pow(2,he),Se=0));he>=8;M[Y+qt]=255&Fe,qt+=rr,Fe/=256,he-=8);for(Se=Se<<he|Fe,ct+=he;ct>0;M[Y+qt]=255&Se,qt+=rr,Se/=256,ct-=8);M[Y+qt-rr]|=128*gr},bc=fi;function fi(M){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(M)?M:new Uint8Array(M||0),this.pos=0,this.type=0,this.length=this.buf.length}fi.Varint=0,fi.Fixed64=1,fi.Bytes=2,fi.Fixed32=5;var lf=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Gs(M){return M.type===fi.Bytes?M.readVarint()+M.pos:M.pos+1}function Ml(M,O,Y){return Y?4294967296*O+(M>>>0):4294967296*(O>>>0)+(M>>>0)}function cf(M,O,Y){var ae=O<=16383?1:O<=2097151?2:O<=268435455?3:Math.floor(Math.log(O)/(7*Math.LN2));Y.realloc(ae);for(var he=Y.pos-1;he>=M;he--)Y.buf[he+ae]=Y.buf[he]}function $h(M,O){for(var Y=0;Y<M.length;Y++)O.writeVarint(M[Y])}function ep(M,O){for(var Y=0;Y<M.length;Y++)O.writeSVarint(M[Y])}function tp(M,O){for(var Y=0;Y<M.length;Y++)O.writeFloat(M[Y])}function rp(M,O){for(var Y=0;Y<M.length;Y++)O.writeDouble(M[Y])}function np(M,O){for(var Y=0;Y<M.length;Y++)O.writeBoolean(M[Y])}function ap(M,O){for(var Y=0;Y<M.length;Y++)O.writeFixed32(M[Y])}function ip(M,O){for(var Y=0;Y<M.length;Y++)O.writeSFixed32(M[Y])}function op(M,O){for(var Y=0;Y<M.length;Y++)O.writeFixed64(M[Y])}function sp(M,O){for(var Y=0;Y<M.length;Y++)O.writeSFixed64(M[Y])}function _c(M,O){return(M[O]|M[O+1]<<8|M[O+2]<<16)+16777216*M[O+3]}function Al(M,O,Y){M[Y]=O,M[Y+1]=O>>>8,M[Y+2]=O>>>16,M[Y+3]=O>>>24}function uf(M,O){return(M[O]|M[O+1]<<8|M[O+2]<<16)+(M[O+3]<<24)}fi.prototype={destroy:function(){this.buf=null},readFields:function(M,O,Y){for(Y=Y||this.length;this.pos<Y;){var ae=this.readVarint(),he=ae>>3,ve=this.pos;this.type=7&ae,M(he,O,this),this.pos===ve&&this.skip(ae)}return O},readMessage:function(M,O){return this.readFields(M,O,this.readVarint()+this.pos)},readFixed32:function(){var M=_c(this.buf,this.pos);return this.pos+=4,M},readSFixed32:function(){var M=uf(this.buf,this.pos);return this.pos+=4,M},readFixed64:function(){var M=_c(this.buf,this.pos)+4294967296*_c(this.buf,this.pos+4);return this.pos+=8,M},readSFixed64:function(){var M=_c(this.buf,this.pos)+4294967296*uf(this.buf,this.pos+4);return this.pos+=8,M},readFloat:function(){var M=of(this.buf,this.pos,!0,23,4);return this.pos+=4,M},readDouble:function(){var M=of(this.buf,this.pos,!0,52,8);return this.pos+=8,M},readVarint:function(M){var O,Y,ae=this.buf;return O=127&(Y=ae[this.pos++]),Y<128?O:(O|=(127&(Y=ae[this.pos++]))<<7,Y<128?O:(O|=(127&(Y=ae[this.pos++]))<<14,Y<128?O:(O|=(127&(Y=ae[this.pos++]))<<21,Y<128?O:function(he,ve,Se){var Fe,Ke,ct=Se.buf;if(Ke=ct[Se.pos++],Fe=(112&Ke)>>4,Ke<128||(Ke=ct[Se.pos++],Fe|=(127&Ke)<<3,Ke<128)||(Ke=ct[Se.pos++],Fe|=(127&Ke)<<10,Ke<128)||(Ke=ct[Se.pos++],Fe|=(127&Ke)<<17,Ke<128)||(Ke=ct[Se.pos++],Fe|=(127&Ke)<<24,Ke<128)||(Ke=ct[Se.pos++],Fe|=(1&Ke)<<31,Ke<128))return Ml(he,Fe,ve);throw new Error("Expected varint not more than 10 bytes")}(O|=(15&(Y=ae[this.pos]))<<28,M,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var M=this.readVarint();return M%2==1?(M+1)/-2:M/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var M=this.readVarint()+this.pos,O=this.pos;return this.pos=M,M-O>=12&&lf?function(Y,ae,he){return lf.decode(Y.subarray(ae,he))}(this.buf,O,M):function(Y,ae,he){for(var ve="",Se=ae;Se<he;){var Fe,Ke,ct,gt=Y[Se],Bt=null,Zt=gt>239?4:gt>223?3:gt>191?2:1;if(Se+Zt>he)break;Zt===1?gt<128&&(Bt=gt):Zt===2?(192&(Fe=Y[Se+1]))==128&&(Bt=(31&gt)<<6|63&Fe)<=127&&(Bt=null):Zt===3?(Fe=Y[Se+1],Ke=Y[Se+2],(192&Fe)==128&&(192&Ke)==128&&((Bt=(15&gt)<<12|(63&Fe)<<6|63&Ke)<=2047||Bt>=55296&&Bt<=57343)&&(Bt=null)):Zt===4&&(Fe=Y[Se+1],Ke=Y[Se+2],ct=Y[Se+3],(192&Fe)==128&&(192&Ke)==128&&(192&ct)==128&&((Bt=(15&gt)<<18|(63&Fe)<<12|(63&Ke)<<6|63&ct)<=65535||Bt>=1114112)&&(Bt=null)),Bt===null?(Bt=65533,Zt=1):Bt>65535&&(Bt-=65536,ve+=String.fromCharCode(Bt>>>10&1023|55296),Bt=56320|1023&Bt),ve+=String.fromCharCode(Bt),Se+=Zt}return ve}(this.buf,O,M)},readBytes:function(){var M=this.readVarint()+this.pos,O=this.buf.subarray(this.pos,M);return this.pos=M,O},readPackedVarint:function(M,O){if(this.type!==fi.Bytes)return M.push(this.readVarint(O));var Y=Gs(this);for(M=M||[];this.pos<Y;)M.push(this.readVarint(O));return M},readPackedSVarint:function(M){if(this.type!==fi.Bytes)return M.push(this.readSVarint());var O=Gs(this);for(M=M||[];this.pos<O;)M.push(this.readSVarint());return M},readPackedBoolean:function(M){if(this.type!==fi.Bytes)return M.push(this.readBoolean());var O=Gs(this);for(M=M||[];this.pos<O;)M.push(this.readBoolean());return M},readPackedFloat:function(M){if(this.type!==fi.Bytes)return M.push(this.readFloat());var O=Gs(this);for(M=M||[];this.pos<O;)M.push(this.readFloat());return M},readPackedDouble:function(M){if(this.type!==fi.Bytes)return M.push(this.readDouble());var O=Gs(this);for(M=M||[];this.pos<O;)M.push(this.readDouble());return M},readPackedFixed32:function(M){if(this.type!==fi.Bytes)return M.push(this.readFixed32());var O=Gs(this);for(M=M||[];this.pos<O;)M.push(this.readFixed32());return M},readPackedSFixed32:function(M){if(this.type!==fi.Bytes)return M.push(this.readSFixed32());var O=Gs(this);for(M=M||[];this.pos<O;)M.push(this.readSFixed32());return M},readPackedFixed64:function(M){if(this.type!==fi.Bytes)return M.push(this.readFixed64());var O=Gs(this);for(M=M||[];this.pos<O;)M.push(this.readFixed64());return M},readPackedSFixed64:function(M){if(this.type!==fi.Bytes)return M.push(this.readSFixed64());var O=Gs(this);for(M=M||[];this.pos<O;)M.push(this.readSFixed64());return M},skip:function(M){var O=7&M;if(O===fi.Varint)for(;this.buf[this.pos++]>127;);else if(O===fi.Bytes)this.pos=this.readVarint()+this.pos;else if(O===fi.Fixed32)this.pos+=4;else{if(O!==fi.Fixed64)throw new Error("Unimplemented type: "+O);this.pos+=8}},writeTag:function(M,O){this.writeVarint(M<<3|O)},realloc:function(M){for(var O=this.length||16;O<this.pos+M;)O*=2;if(O!==this.length){var Y=new Uint8Array(O);Y.set(this.buf),this.buf=Y,this.length=O}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(M){this.realloc(4),Al(this.buf,M,this.pos),this.pos+=4},writeSFixed32:function(M){this.realloc(4),Al(this.buf,M,this.pos),this.pos+=4},writeFixed64:function(M){this.realloc(8),Al(this.buf,-1&M,this.pos),Al(this.buf,Math.floor(M*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(M){this.realloc(8),Al(this.buf,-1&M,this.pos),Al(this.buf,Math.floor(M*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(M){(M=+M||0)>268435455||M<0?function(O,Y){var ae,he;if(O>=0?(ae=O%4294967296|0,he=O/4294967296|0):(he=~(-O/4294967296),4294967295^(ae=~(-O%4294967296))?ae=ae+1|0:(ae=0,he=he+1|0)),O>=18446744073709552e3||O<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Y.realloc(10),function(ve,Se,Fe){Fe.buf[Fe.pos++]=127&ve|128,ve>>>=7,Fe.buf[Fe.pos++]=127&ve|128,ve>>>=7,Fe.buf[Fe.pos++]=127&ve|128,ve>>>=7,Fe.buf[Fe.pos++]=127&ve|128,ve>>>=7,Fe.buf[Fe.pos]=127&ve}(ae,0,Y),function(ve,Se){var Fe=(7&ve)<<4;Se.buf[Se.pos++]|=Fe|((ve>>>=3)?128:0),ve&&(Se.buf[Se.pos++]=127&ve|((ve>>>=7)?128:0),ve&&(Se.buf[Se.pos++]=127&ve|((ve>>>=7)?128:0),ve&&(Se.buf[Se.pos++]=127&ve|((ve>>>=7)?128:0),ve&&(Se.buf[Se.pos++]=127&ve|((ve>>>=7)?128:0),ve&&(Se.buf[Se.pos++]=127&ve)))))}(he,Y)}(M,this):(this.realloc(4),this.buf[this.pos++]=127&M|(M>127?128:0),M<=127||(this.buf[this.pos++]=127&(M>>>=7)|(M>127?128:0),M<=127||(this.buf[this.pos++]=127&(M>>>=7)|(M>127?128:0),M<=127||(this.buf[this.pos++]=M>>>7&127))))},writeSVarint:function(M){this.writeVarint(M<0?2*-M-1:2*M)},writeBoolean:function(M){this.writeVarint(!!M)},writeString:function(M){M=String(M),this.realloc(4*M.length),this.pos++;var O=this.pos;this.pos=function(ae,he,ve){for(var Se,Fe,Ke=0;Ke<he.length;Ke++){if((Se=he.charCodeAt(Ke))>55295&&Se<57344){if(!Fe){Se>56319||Ke+1===he.length?(ae[ve++]=239,ae[ve++]=191,ae[ve++]=189):Fe=Se;continue}if(Se<56320){ae[ve++]=239,ae[ve++]=191,ae[ve++]=189,Fe=Se;continue}Se=Fe-55296<<10|Se-56320|65536,Fe=null}else Fe&&(ae[ve++]=239,ae[ve++]=191,ae[ve++]=189,Fe=null);Se<128?ae[ve++]=Se:(Se<2048?ae[ve++]=Se>>6|192:(Se<65536?ae[ve++]=Se>>12|224:(ae[ve++]=Se>>18|240,ae[ve++]=Se>>12&63|128),ae[ve++]=Se>>6&63|128),ae[ve++]=63&Se|128)}return ve}(this.buf,M,this.pos);var Y=this.pos-O;Y>=128&&cf(O,Y,this),this.pos=O-1,this.writeVarint(Y),this.pos+=Y},writeFloat:function(M){this.realloc(4),sf(this.buf,M,this.pos,!0,23,4),this.pos+=4},writeDouble:function(M){this.realloc(8),sf(this.buf,M,this.pos,!0,52,8),this.pos+=8},writeBytes:function(M){var O=M.length;this.writeVarint(O),this.realloc(O);for(var Y=0;Y<O;Y++)this.buf[this.pos++]=M[Y]},writeRawMessage:function(M,O){this.pos++;var Y=this.pos;M(O,this);var ae=this.pos-Y;ae>=128&&cf(Y,ae,this),this.pos=Y-1,this.writeVarint(ae),this.pos+=ae},writeMessage:function(M,O,Y){this.writeTag(M,fi.Bytes),this.writeRawMessage(O,Y)},writePackedVarint:function(M,O){O.length&&this.writeMessage(M,$h,O)},writePackedSVarint:function(M,O){O.length&&this.writeMessage(M,ep,O)},writePackedBoolean:function(M,O){O.length&&this.writeMessage(M,np,O)},writePackedFloat:function(M,O){O.length&&this.writeMessage(M,tp,O)},writePackedDouble:function(M,O){O.length&&this.writeMessage(M,rp,O)},writePackedFixed32:function(M,O){O.length&&this.writeMessage(M,ap,O)},writePackedSFixed32:function(M,O){O.length&&this.writeMessage(M,ip,O)},writePackedFixed64:function(M,O){O.length&&this.writeMessage(M,op,O)},writePackedSFixed64:function(M,O){O.length&&this.writeMessage(M,sp,O)},writeBytesField:function(M,O){this.writeTag(M,fi.Bytes),this.writeBytes(O)},writeFixed32Field:function(M,O){this.writeTag(M,fi.Fixed32),this.writeFixed32(O)},writeSFixed32Field:function(M,O){this.writeTag(M,fi.Fixed32),this.writeSFixed32(O)},writeFixed64Field:function(M,O){this.writeTag(M,fi.Fixed64),this.writeFixed64
vendor: 11,289 bytes, line 94
94(O)},writeSFixed64Field:function(M,O){this.writeTag(M,fi.Fixed64),this.writeSFixed64(O)},writeVarintField:function(M,O){this.writeTag(M,fi.Varint),this.writeVarint(O)},writeSVarintField:function(M,O){this.writeTag(M,fi.Varint),this.writeSVarint(O)},writeStringField:function(M,O){this.writeTag(M,fi.Bytes),this.writeString(O)},writeFloatField:function(M,O){this.writeTag(M,fi.Fixed32),this.writeFloat(O)},writeDoubleField:function(M,O){this.writeTag(M,fi.Fixed64),this.writeDouble(O)},writeBooleanField:function(M,O){this.writeVarintField(M,!!O)}};function lp(M,O,Y){M===1&&Y.readMessage(cp,O)}function cp(M,O,Y){if(M===3){var ae=Y.readMessage(up,{}),he=ae.id,ve=ae.bitmap,Se=ae.width,Fe=ae.height,Ke=ae.left,ct=ae.top,gt=ae.advance;O.push({id:he,bitmap:new pl({width:Se+6,height:Fe+6},ve),metrics:{width:Se,height:Fe,left:Ke,top:ct,advance:gt}})}}function up(M,O,Y){M===1?O.id=Y.readVarint():M===2?O.bitmap=Y.readBytes():M===3?O.width=Y.readVarint():M===4?O.height=Y.readVarint():M===5?O.left=Y.readSVarint():M===6?O.top=Y.readSVarint():M===7&&(O.advance=Y.readVarint())}function ff(M){for(var O=0,Y=0,ae=0,he=M;ae<he.length;ae+=1){var ve=he[ae];O+=ve.w*ve.h,Y=Math.max(Y,ve.w)}M.sort(function(gr,Er){return Er.h-gr.h});for(var Se=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(O/.95)),Y),h:1/0}],Fe=0,Ke=0,ct=0,gt=M;ct<gt.length;ct+=1)for(var Bt=gt[ct],Zt=Se.length-1;Zt>=0;Zt--){var qt=Se[Zt];if(!(Bt.w>qt.w||Bt.h>qt.h)){if(Bt.x=qt.x,Bt.y=qt.y,Ke=Math.max(Ke,Bt.y+Bt.h),Fe=Math.max(Fe,Bt.x+Bt.w),Bt.w===qt.w&&Bt.h===qt.h){var rr=Se.pop();Zt<Se.length&&(Se[Zt]=rr)}else Bt.h===qt.h?(qt.x+=Bt.w,qt.w-=Bt.w):Bt.w===qt.w?(qt.y+=Bt.h,qt.h-=Bt.h):(Se.push({x:qt.x+Bt.w,y:qt.y,w:qt.w-Bt.w,h:Bt.h}),qt.y+=Bt.h,qt.h-=Bt.h);break}}return{w:Fe,h:Ke,fill:O/(Fe*Ke)||0}}var wc=function(M,O){var Y=O.pixelRatio,ae=O.version,he=O.stretchX,ve=O.stretchY,Se=O.content;this.paddedRect=M,this.pixelRatio=Y,this.stretchX=he,this.stretchY=ve,this.content=Se,this.version=ae},rc={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};rc.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},rc.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},rc.tlbr.get=function(){return this.tl.concat(this.br)},rc.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(wc.prototype,rc);var nc=function(M,O){var Y={},ae={};this.haveRenderCallbacks=[];var he=[];this.addImages(M,Y,he),this.addImages(O,ae,he);var ve=ff(he),Se=ve.w,Fe=ve.h,Ke=new Wo({width:Se||1,height:Fe||1});for(var ct in M){var gt=M[ct],Bt=Y[ct].paddedRect;Wo.copy(gt.data,Ke,{x:0,y:0},{x:Bt.x+1,y:Bt.y+1},gt.data)}for(var Zt in O){var qt=O[Zt],rr=ae[Zt].paddedRect,gr=rr.x+1,Er=rr.y+1,Sr=qt.data.width,Rr=qt.data.height;Wo.copy(qt.data,Ke,{x:0,y:0},{x:gr,y:Er},qt.data),Wo.copy(qt.data,Ke,{x:0,y:Rr-1},{x:gr,y:Er-1},{width:Sr,height:1}),Wo.copy(qt.data,Ke,{x:0,y:0},{x:gr,y:Er+Rr},{width:Sr,height:1}),Wo.copy(qt.data,Ke,{x:Sr-1,y:0},{x:gr-1,y:Er},{width:1,height:Rr}),Wo.copy(qt.data,Ke,{x:0,y:0},{x:gr+Sr,y:Er},{width:1,height:Rr})}this.image=Ke,this.iconPositions=Y,this.patternPositions=ae};nc.prototype.addImages=function(M,O,Y){for(var ae in M){var he=M[ae],ve={x:0,y:0,w:he.data.width+2,h:he.data.height+2};Y.push(ve),O[ae]=new wc(ve,he),he.hasRenderCallback&&this.haveRenderCallbacks.push(ae)}},nc.prototype.patchUpdatedImages=function(M,O){for(var Y in M.dispatchRenderCallbacks(this.haveRenderCallbacks),M.updatedImages)this.patchUpdatedImage(this.iconPositions[Y],M.getImage(Y),O),this.patchUpdatedImage(this.patternPositions[Y],M.getImage(Y),O)},nc.prototype.patchUpdatedImage=function(M,O,Y){if(M&&O&&M.version!==O.version){M.version=O.version;var ae=M.tl,he=ae[0],ve=ae[1];Y.update(O.data,void 0,{x:he,y:ve})}},Zr("ImagePosition",wc),Zr("ImageAtlas",nc);var ss={horizontal:1,vertical:2,horizontalOnly:3},Sl=function(){this.scale=1,this.fontStack="",this.imageName=null};Sl.forText=function(M,O){var Y=new Sl;return Y.scale=M||1,Y.fontStack=O,Y},Sl.forImage=function(M){var O=new Sl;return O.imageName=M,O};var Io=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Tc(M,O,Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr,gr){var Er,Sr=Io.fromFeature(M,he);Bt===ss.vertical&&Sr.verticalizePunctuation();var Rr=io.processBidirectionalText,Br=io.processStyledBidirectionalText;if(Rr&&Sr.sections.length===1){Er=[];for(var Hr=0,fn=Rr(Sr.toString(),du(Sr,ct,ve,O,ae,qt,rr));Hr<fn.length;Hr+=1){var xn=fn[Hr],Fn=new Io;Fn.text=xn,Fn.sections=Sr.sections;for(var Rn=0;Rn<xn.length;Rn++)Fn.sectionIndex.push(0);Er.push(Fn)}}else if(Br){Er=[];for(var Hn=0,ta=Br(Sr.text,Sr.sectionIndex,du(Sr,ct,ve,O,ae,qt,rr));Hn<ta.length;Hn+=1){var ra=ta[Hn],Wn=new Io;Wn.text=ra[0],Wn.sectionIndex=ra[1],Wn.sections=Sr.sections,Er.push(Wn)}}else Er=function(na,Ga){for(var Ra=[],Xa=na.text,ya=0,Na=0,hi=Ga;Na<hi.length;Na+=1){var oi=hi[Na];Ra.push(na.substring(ya,oi)),ya=oi}return ya<Xa.length&&Ra.push(na.substring(ya,Xa.length)),Ra}(Sr,du(Sr,ct,ve,O,ae,qt,rr));var ca=[],sa={positionedLines:ca,text:Sr.toString(),top:gt[1],bottom:gt[1],left:gt[0],right:gt[0],writingMode:Bt,iconsInText:!1,verticalizable:!1};return function(na,Ga,Ra,Xa,ya,Na,hi,oi,wi,si,ro,Ti){for(var Lo=0,vo=-17,bo=0,Vo=0,Oo=oi==="right"?1:oi==="left"?0:.5,no=0,_o=0,qi=ya;_o<qi.length;_o+=1){var oo=qi[_o];oo.trim();var Pa=oo.getMaxScale(),Wa=24*(Pa-1),Di={positionedGlyphs:[],lineOffset:0};na.positionedLines[no]=Di;var Ri=Di.positionedGlyphs,Pi=0;if(oo.length()){for(var ki=0;ki<oo.length();ki++){var $a=oo.getSection(ki),Fi=oo.getSectionIndex(ki),Ho=oo.getCharCode(ki),ns=0,zo=null,Ls=null,Zs=null,yo=24,Cs=!(wi===ss.horizontal||!ro&&!fa(Ho)||ro&&(kc[Ho]||(nl=Ho,Sn.Arabic(nl)||Sn["Arabic Supplement"](nl)||Sn["Arabic Extended-A"](nl)||Sn["Arabic Presentation Forms-A"](nl)||Sn["Arabic Presentation Forms-B"](nl))));if($a.imageName){var Ps=Xa[$a.imageName];if(!Ps)continue;Zs=$a.imageName,na.iconsInText=na.iconsInText||!0,Ls=Ps.paddedRect;var Is=Ps.displaySize;$a.scale=24*$a.scale/Ti,zo={width:Is[0],height:Is[1],left:1,top:-3,advance:Cs?Is[1]:Is[0]};var ku=24-Is[1]*$a.scale;ns=Wa+ku,yo=zo.advance;var Dl=Cs?Is[0]*$a.scale-24*Pa:Is[1]*$a.scale-24*Pa;Dl>0&&Dl>Pi&&(Pi=Dl)}else{var Oc=Ra[$a.fontStack],yl=Oc&&Oc[Ho];if(yl&&yl.rect)Ls=yl.rect,zo=yl.metrics;else{var zc=Ga[$a.fontStack],Dc=zc&&zc[Ho];if(!Dc)continue;zo=Dc.metrics}ns=24*(Pa-$a.scale)}Cs?(na.verticalizable=!0,Ri.push({glyph:Ho,imageName:Zs,x:Lo,y:vo+ns,vertical:Cs,scale:$a.scale,fontStack:$a.fontStack,sectionIndex:Fi,metrics:zo,rect:Ls}),Lo+=yo*$a.scale+si):(Ri.push({glyph:Ho,imageName:Zs,x:Lo,y:vo+ns,vertical:Cs,scale:$a.scale,fontStack:$a.fontStack,sectionIndex:Fi,metrics:zo,rect:Ls}),Lo+=zo.advance*$a.scale+si)}if(Ri.length!==0){var Rc=Lo-si;bo=Math.max(Rc,bo),hp(Ri,0,Ri.length-1,Oo,Pi)}Lo=0;var Fc=Na*Pa+Pi;Di.lineOffset=Math.max(Pi,Wa),vo+=Fc,Vo=Math.max(Fc,Vo),++no}else vo+=Na,++no}var nl,Rl=vo- -17,Bc=gu(hi),Fl=Bc.horizontalAlign,al=Bc.verticalAlign;(function(oc,Nc,jc,Uc,sc,Vc,lc,Hc,cc){var qc=(Nc-jc)*sc,Bl=0;Bl=Vc!==lc?-Hc*Uc- -17:(-Uc*cc+.5)*lc;for(var Nl=0,jl=oc;Nl<jl.length;Nl+=1)for(var Gc=jl[Nl],Ul=0,uc=Gc.positionedGlyphs;Ul<uc.length;Ul+=1){var Vl=uc[Ul];Vl.x+=qc,Vl.y+=Bl}})(na.positionedLines,Oo,Fl,al,bo,Vo,Na,Rl,ya.length),na.top+=-al*Rl,na.bottom=na.top+Rl,na.left+=-Fl*bo,na.right=na.left+bo}(sa,O,Y,ae,Er,Se,Fe,Ke,Bt,ct,Zt,gr),!function(na){for(var Ga=0,Ra=na;Ga<Ra.length;Ga+=1)if(Ra[Ga].positionedGlyphs.length!==0)return!1;return!0}(ca)&&sa}Io.fromFeature=function(M,O){for(var Y=new Io,ae=0;ae<M.sections.length;ae++){var he=M.sections[ae];he.image?Y.addImageSection(he):Y.addTextSection(he,O)}return Y},Io.prototype.length=function(){return this.text.length},Io.prototype.getSection=function(M){return this.sections[this.sectionIndex[M]]},Io.prototype.getSectionIndex=function(M){return this.sectionIndex[M]},Io.prototype.getCharCode=function(M){return this.text.charCodeAt(M)},Io.prototype.verticalizePunctuation=function(){this.text=function(M){for(var O="",Y=0;Y<M.length;Y++){var ae=M.charCodeAt(Y+1)||null,he=M.charCodeAt(Y-1)||null;(!ae||!Ca(ae)||tc[M[Y+1]])&&(!he||!Ca(he)||tc[M[Y-1]])&&tc[M[Y]]?O+=tc[M[Y]]:O+=M[Y]}return O}(this.text)},Io.prototype.trim=function(){for(var M=0,O=0;O<this.text.length&&kc[this.text.charCodeAt(O)];O++)M++;for(var Y=this.text.length,ae=this.text.length-1;ae>=0&&ae>=M&&kc[this.text.charCodeAt(ae)];ae--)Y--;this.text=this.text.substring(M,Y),this.sectionIndex=this.sectionIndex.slice(M,Y)},Io.prototype.substring=function(M,O){var Y=new Io;return Y.text=this.text.substring(M,O),Y.sectionIndex=this.sectionIndex.slice(M,O),Y.sections=this.sections,Y},Io.prototype.toString=function(){return this.text},Io.prototype.getMaxScale=function(){var M=this;return this.sectionIndex.reduce(function(O,Y){return Math.max(O,M.sections[Y].scale)},0)},Io.prototype.addTextSection=function(M,O){this.text+=M.text,this.sections.push(Sl.forText(M.scale,M.fontStack||O));for(var Y=this.sections.length-1,ae=0;ae<M.text.length;++ae)this.sectionIndex.push(Y)},Io.prototype.addImageSection=function(M){var O=M.image?M.image.name:"";if(O.length!==0){var Y=this.getNextImageSectionCharCode();Y?(this.text+=String.fromCharCode(Y),this.sections.push(Sl.forImage(O)),this.sectionIndex.push(this.sections.length-1)):A("Reached maximum number of images 6401")}else A("Can't add FormattedSection with an empty image.")},Io.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var kc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},rs={};function hf(M,O,Y,ae,he,ve){if(O.imageName){var Se=ae[O.imageName];return Se?Se.displaySize[0]*O.scale*24/ve+he:0}var Fe=Y[O.fontStack],Ke=Fe&&Fe[M];return Ke?Ke.metrics.advance*O.scale+he:0}function pf(M,O,Y,ae){var he=Math.pow(M-O,2);return ae?M<O?he/2:2*he:he+Math.abs(Y)*Y}function fp(M,O,Y){var ae=0;return M===10&&(ae-=1e4),Y&&(ae+=150),M!==40&&M!==65288||(ae+=50),O!==41&&O!==65289||(ae+=50),ae}function df(M,O,Y,ae,he,ve){for(var Se=null,Fe=pf(O,Y,he,ve),Ke=0,ct=ae;Ke<ct.length;Ke+=1){var gt=ct[Ke],Bt=pf(O-gt.x,Y,he,ve)+gt.badness;Bt<=Fe&&(Se=gt,Fe=Bt)}return{index:M,x:O,priorBreak:Se,badness:Fe}}function du(M,O,Y,ae,he,ve,Se){if(ve!=="point")return[];if(!M)return[];for(var Fe,Ke=[],ct=function(Er,Sr,Rr,Br,Hr,fn){for(var xn=0,Fn=0;Fn<Er.length();Fn++){var Rn=Er.getSection(Fn);xn+=hf(Er.getCharCode(Fn),Rn,Br,Hr,Sr,fn)}return xn/Math.max(1,Math.ceil(xn/Rr))}(M,O,Y,ae,he,Se),gt=M.text.indexOf("​")>=0,Bt=0,Zt=0;Zt<M.length();Zt++){var qt=M.getSection(Zt),rr=M.getCharCode(Zt);if(kc[rr]||(Bt+=hf(rr,qt,ae,he,O,Se)),Zt<M.length()-1){var gr=!!(!((Fe=rr)<11904)&&(Sn["Bopomofo Extended"](Fe)||Sn.Bopomofo(Fe)||Sn["CJK Compatibility Forms"](Fe)||Sn["CJK Compatibility Ideographs"](Fe)||Sn["CJK Compatibility"](Fe)||Sn["CJK Radicals Supplement"](Fe)||Sn["CJK Strokes"](Fe)||Sn["CJK Symbols and Punctuation"](Fe)||Sn["CJK Unified Ideographs Extension A"](Fe)||Sn["CJK Unified Ideographs"](Fe)||Sn["Enclosed CJK Letters and Months"](Fe)||Sn["Halfwidth and Fullwidth Forms"](Fe)||Sn.Hiragana(Fe)||Sn["Ideographic Description Characters"](Fe)||Sn["Kangxi Radicals"](Fe)||Sn["Katakana Phonet
94ic Extensions"](Fe)||Sn.Katakana(Fe)||Sn["Vertical Forms"](Fe)||Sn["Yi Radicals"](Fe)||Sn["Yi Syllables"](Fe)));(rs[rr]||gr||qt.imageName)&&Ke.push(df(Zt+1,Bt,ct,Ke,fp(rr,M.getCharCode(Zt+1),gr&&gt),!1))}}return function Er(Sr){return Sr?Er(Sr.priorBreak).concat(Sr.index):[]}(df(M.length(),Bt,ct,Ke,0,!0))}function gu(M){var O=.5,Y=.5;switch(M){case"right":case"top-right":case"bottom-right":O=1;break;case"left":case"top-left":case"bottom-left":O=0}switch(M){case"bottom":case"bottom-right":case"bottom-left":Y=1;break;case"top":case"top-right":case"top-left":Y=0}return{horizontalAlign:O,verticalAlign:Y}}function hp(M,O,Y,ae,he){if(ae||he)for(var ve=M[Y],Se=ve.metrics.advance*ve.scale,Fe=(M[Y].x+Se)*ae,Ke=O;Ke<=Y;Ke++)M[Ke].x-=Fe,M[Ke].y+=he}function gf(M,O,Y,ae,he,ve){var Se,Fe=M.image;if(Fe.content){var Ke=Fe.content,ct=Fe.pixelRatio||1;Se=[Ke[0]/ct,Ke[1]/ct,Fe.displaySize[0]-Ke[2]/ct,Fe.displaySize[1]-Ke[3]/ct]}var gt,Bt,Zt,qt,rr=O.left*ve,gr=O.right*ve;Y==="width"||Y==="both"?(qt=he[0]+rr-ae[3],Bt=he[0]+gr+ae[1]):Bt=(qt=he[0]+(rr+gr-Fe.displaySize[0])/2)+Fe.displaySize[0];var Er=O.top*ve,Sr=O.bottom*ve;return Y==="height"||Y==="both"?(gt=he[1]+Er-ae[0],Zt=he[1]+Sr+ae[2]):Zt=(gt=he[1]+(Er+Sr-Fe.displaySize[1])/2)+Fe.displaySize[1],{image:Fe,top:gt,right:Bt,bottom:Zt,left:qt,collisionPadding:Se}}rs[10]=!0,rs[32]=!0,rs[38]=!0,rs[40]=!0,rs[41]=!0,rs[43]=!0,rs[45]=!0,rs[47]=!0,rs[173]=!0,rs[183]=!0,rs[8203]=!0,rs[8208]=!0,rs[8211]=!0,rs[8231]=!0;var El=function(M){function O(Y,ae,he,ve){M.call(this,Y,ae),this.angle=he,ve!==void 0&&(this.segment=ve)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.clone=function(){return new O(this.x,this.y,this.angle,this.segment)},O}(r);Zr("Anchor",El);function mu(M,O){var Y=O.expression;if(Y.kind==="constant")return{kind:"constant",layoutSize:Y.evaluate(new Ka(M+1))};if(Y.kind==="source")return{kind:"source"};for(var ae=Y.zoomStops,he=Y.interpolationType,ve=0;ve<ae.length&&ae[ve]<=M;)ve++;for(var Se=ve=Math.max(0,ve-1);Se<ae.length&&ae[Se]<M+1;)Se++;Se=Math.min(ae.length-1,Se);var Fe=ae[ve],Ke=ae[Se];return Y.kind==="composite"?{kind:"composite",minZoom:Fe,maxZoom:Ke,interpolationType:he}:{kind:"camera",minZoom:Fe,maxZoom:Ke,minSize:Y.evaluate(new Ka(Fe)),maxSize:Y.evaluate(new Ka(Ke)),interpolationType:he}}function mf(M,O,Y){var ae=O.uSize,he=O.uSizeT,ve=Y.lowerSize,Se=Y.upperSize;return M.kind==="source"?ve/128:M.kind==="composite"?qn(ve/128,Se/128,he):ae}function vf(M,O){var Y=0,ae=0;if(M.kind==="constant")ae=M.layoutSize;else if(M.kind!=="source"){var he=M.interpolationType,ve=M.minZoom,Se=M.maxZoom,Fe=he?u(ja.interpolationFactor(he,O,ve,Se),0,1):0;M.kind==="camera"?ae=qn(M.minSize,M.maxSize,Fe):Y=Fe}return{uSizeT:Y,uSize:ae}}var pp=Object.freeze({__proto__:null,getSizeData:mu,evaluateSizeForFeature:mf,evaluateSizeForZoom:vf,SIZE_PACK_FACTOR:128});function yf(M,O,Y,ae,he){if(O.segment===void 0)return!0;for(var ve=O,Se=O.segment+1,Fe=0;Fe>-Y/2;){if(--Se<0)return!1;Fe-=M[Se].dist(ve),ve=M[Se]}Fe+=M[Se].dist(M[Se+1]),Se++;for(var Ke=[],ct=0;Fe<Y/2;){var gt=M[Se-1],Bt=M[Se],Zt=M[Se+1];if(!Zt)return!1;var qt=gt.angleTo(Bt)-Bt.angleTo(Zt);for(qt=Math.abs((qt+3*Math.PI)%(2*Math.PI)-Math.PI),Ke.push({distance:Fe,angleDelta:qt}),ct+=qt;Fe-Ke[0].distance>ae;)ct-=Ke.shift().angleDelta;if(ct>he)return!1;Se++,Fe+=Bt.dist(Zt)}return!0}function xf(M){for(var O=0,Y=0;Y<M.length-1;Y++)O+=M[Y].dist(M[Y+1]);return O}function bf(M,O,Y){return M?.6*O*Y:0}function _f(M,O){return Math.max(M?M.right-M.left:0,O?O.right-O.left:0)}function dp(M,O,Y,ae,he,ve){for(var Se=bf(Y,he,ve),Fe=_f(Y,ae)*ve,Ke=0,ct=xf(M)/2,gt=0;gt<M.length-1;gt++){var Bt=M[gt],Zt=M[gt+1],qt=Bt.dist(Zt);if(Ke+qt>ct){var rr=(ct-Ke)/qt,gr=qn(Bt.x,Zt.x,rr),Er=qn(Bt.y,Zt.y,rr),Sr=new El(gr,Er,Zt.angleTo(Bt),gt);return Sr._round(),!Se||yf(M,Sr,Fe,Se,O)?Sr:void 0}Ke+=qt}}function gp(M,O,Y,ae,he,ve,Se,Fe,Ke){var ct=bf(ae,ve,Se),gt=_f(ae,he),Bt=gt*Se,Zt=M[0].x===0||M[0].x===Ke||M[0].y===0||M[0].y===Ke;return O-Bt<O/4&&(O=Bt+O/4),function qt(rr,gr,Er,Sr,Rr,Br,Hr,fn,xn){for(var Fn=Br/2,Rn=xf(rr),Hn=0,ta=gr-Er,ra=[],Wn=0;Wn<rr.length-1;Wn++){for(var ca=rr[Wn],sa=rr[Wn+1],na=ca.dist(sa),Ga=sa.angleTo(ca);ta+Er<Hn+na;){var Ra=((ta+=Er)-Hn)/na,Xa=qn(ca.x,sa.x,Ra),ya=qn(ca.y,sa.y,Ra);if(Xa>=0&&Xa<xn&&ya>=0&&ya<xn&&ta-Fn>=0&&ta+Fn<=Rn){var Na=new El(Xa,ya,Ga,Wn);Na._round(),Sr&&!yf(rr,Na,Br,Sr,Rr)||ra.push(Na)}}Hn+=na}return fn||ra.length||Hr||(ra=qt(rr,Hn/2,Er,Sr,Rr,Br,Hr,!0,xn)),ra}(M,Zt?O/2*Fe%O:(gt/2+2*ve)*Se*Fe%O,O,ct,Y,Bt,Zt,!1,Ke)}function wf(M,O,Y,ae,he){for(var ve=[],Se=0;Se<M.length;Se++)for(var Fe=M[Se],Ke=void 0,ct=0;ct<Fe.length-1;ct++){var gt=Fe[ct],Bt=Fe[ct+1];gt.x<O&&Bt.x<O||(gt.x<O?gt=new r(O,gt.y+(Bt.y-gt.y)*((O-gt.x)/(Bt.x-gt.x)))._round():Bt.x<O&&(Bt=new r(O,gt.y+(Bt.y-gt.y)*((O-gt.x)/(Bt.x-gt.x)))._round()),gt.y<Y&&Bt.y<Y||(gt.y<Y?gt=new r(gt.x+(Bt.x-gt.x)*((Y-gt.y)/(Bt.y-gt.y)),Y)._roun
vendor: 4,895 bytes, line 94
94d():Bt.y<Y&&(Bt=new r(gt.x+(Bt.x-gt.x)*((Y-gt.y)/(Bt.y-gt.y)),Y)._round()),gt.x>=ae&&Bt.x>=ae||(gt.x>=ae?gt=new r(ae,gt.y+(Bt.y-gt.y)*((ae-gt.x)/(Bt.x-gt.x)))._round():Bt.x>=ae&&(Bt=new r(ae,gt.y+(Bt.y-gt.y)*((ae-gt.x)/(Bt.x-gt.x)))._round()),gt.y>=he&&Bt.y>=he||(gt.y>=he?gt=new r(gt.x+(Bt.x-gt.x)*((he-gt.y)/(Bt.y-gt.y)),he)._round():Bt.y>=he&&(Bt=new r(gt.x+(Bt.x-gt.x)*((he-gt.y)/(Bt.y-gt.y)),he)._round()),Ke&&gt.equals(Ke[Ke.length-1])||(Ke=[gt],ve.push(Ke)),Ke.push(Bt)))))}return ve}function Tf(M,O,Y,ae){var he=[],ve=M.image,Se=ve.pixelRatio,Fe=ve.paddedRect.w-2,Ke=ve.paddedRect.h-2,ct=M.right-M.left,gt=M.bottom-M.top,Bt=ve.stretchX||[[0,Fe]],Zt=ve.stretchY||[[0,Ke]],qt=function(Na,hi){return Na+hi[1]-hi[0]},rr=Bt.reduce(qt,0),gr=Zt.reduce(qt,0),Er=Fe-rr,Sr=Ke-gr,Rr=0,Br=rr,Hr=0,fn=gr,xn=0,Fn=Er,Rn=0,Hn=Sr;if(ve.content&&ae){var ta=ve.content;Rr=Mc(Bt,0,ta[0]),Hr=Mc(Zt,0,ta[1]),Br=Mc(Bt,ta[0],ta[2]),fn=Mc(Zt,ta[1],ta[3]),xn=ta[0]-Rr,Rn=ta[1]-Hr,Fn=ta[2]-ta[0]-Br,Hn=ta[3]-ta[1]-fn}var ra=function(Na,hi,oi,wi){var si=Ac(Na.stretch-Rr,Br,ct,M.left),ro=Sc(Na.fixed-xn,Fn,Na.stretch,rr),Ti=Ac(hi.stretch-Hr,fn,gt,M.top),Lo=Sc(hi.fixed-Rn,Hn,hi.stretch,gr),vo=Ac(oi.stretch-Rr,Br,ct,M.left),bo=Sc(oi.fixed-xn,Fn,oi.stretch,rr),Vo=Ac(wi.stretch-Hr,fn,gt,M.top),Oo=Sc(wi.fixed-Rn,Hn,wi.stretch,gr),no=new r(si,Ti),_o=new r(vo,Ti),qi=new r(vo,Vo),oo=new r(si,Vo),Pa=new r(ro/Se,Lo/Se),Wa=new r(bo/Se,Oo/Se),Di=O*Math.PI/180;if(Di){var Ri=Math.sin(Di),Pi=Math.cos(Di),ki=[Pi,-Ri,Ri,Pi];no._matMult(ki),_o._matMult(ki),oo._matMult(ki),qi._matMult(ki)}var $a=Na.stretch+Na.fixed,Fi=oi.stretch+oi.fixed,Ho=hi.stretch+hi.fixed,ns=wi.stretch+wi.fixed;return{tl:no,tr:_o,bl:oo,br:qi,tex:{x:ve.paddedRect.x+1+$a,y:ve.paddedRect.y+1+Ho,w:Fi-$a,h:ns-Ho},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Pa,pixelOffsetBR:Wa,minFontScaleX:Fn/Se/ct,minFontScaleY:Hn/Se/gt,isSDF:Y}};if(ae&&(ve.stretchX||ve.stretchY))for(var Wn=kf(Bt,Er,rr),ca=kf(Zt,Sr,gr),sa=0;sa<Wn.length-1;sa++)for(var na=Wn[sa],Ga=Wn[sa+1],Ra=0;Ra<ca.length-1;Ra++){var Xa=ca[Ra],ya=ca[Ra+1];he.push(ra(na,Xa,Ga,ya))}else he.push(ra({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Fe+1},{fixed:0,stretch:Ke+1}));return he}function Mc(M,O,Y){for(var ae=0,he=0,ve=M;he<ve.length;he+=1){var Se=ve[he];ae+=Math.max(O,Math.min(Y,Se[1]))-Math.max(O,Math.min(Y,Se[0]))}return ae}function kf(M,O,Y){for(var ae=[{fixed:-1,stretch:0}],he=0,ve=M;he<ve.length;he+=1){var Se=ve[he],Fe=Se[0],Ke=Se[1],ct=ae[ae.length-1];ae.push({fixed:Fe-ct.stretch,stretch:ct.stretch}),ae.push({fixed:Fe-ct.stretch,stretch:ct.stretch+(Ke-Fe)})}return ae.push({fixed:O+1,stretch:Y}),ae}function Ac(M,O,Y,ae){return M/O*Y+ae}function Sc(M,O,Y,ae){return M-O*Y/ae}var Ec=function(M,O,Y,ae,he,ve,Se,Fe,Ke,ct){if(this.boxStartIndex=M.length,Ke){var gt=ve.top,Bt=ve.bottom,Zt=ve.collisionPadding;Zt&&(gt-=Zt[1],Bt+=Zt[3]);var qt=Bt-gt;qt>0&&(qt=Math.max(10,qt),this.circleDiameter=qt)}else{var rr=ve.top*Se-Fe,gr=ve.bottom*Se+Fe,Er=ve.left*Se-Fe,Sr=ve.right*Se+Fe,Rr=ve.collisionPadding;if(Rr&&(Er-=Rr[0]*Se,rr-=Rr[1]*Se,Sr+=Rr[2]*Se,gr+=Rr[3]*Se),ct){var Br=new r(Er,rr),Hr=new r(Sr,rr),fn=new r(Er,gr),xn=new r(Sr,gr),Fn=ct*Math.PI/180;Br._rotate(Fn),Hr._rotate(Fn),fn._rotate(Fn),xn._rotate(Fn),Er=Math.min(Br.x,Hr.x,fn.x,xn.x),Sr=Math.max(Br.x,Hr.x,fn.x,xn.x),rr=Math.min(Br.y,Hr.y,fn.y,xn.y),gr=Math.max(Br.y,Hr.y,fn.y,xn.y)}M.emplaceBack(O.x,O.y,Er,rr,Sr,gr,Y,ae,he)}this.boxEndIndex=M.length},Ll=function(M,O){if(M===void 0&&(M=[]),O===void 0&&(O=mp),this.data=M,this.length=this.data.length,this.compare=O,this.length>0)for(var Y=(this.length>>1)-1;Y>=0;Y--)this._down(Y)};function mp(M,O){return M<O?-1:M>O?1:0}function vp(M,O,Y){Y===void 0&&(Y=!1);for(var ae=1/0,he=1/0,ve=-1/0,Se=-1/0,Fe=M[0],Ke=0;Ke<Fe.length;Ke++){var ct=Fe[Ke];(!Ke||ct.x<ae)&&(ae=ct.x),(!Ke||ct.y<he)&&(he=ct.y),(!Ke||ct.x>ve)&&(ve=ct.x),(!Ke||ct.y>Se)&&(Se=ct.y)}var gt=ve-ae,Bt=Se-he,Zt=Math.min(gt,Bt),qt=Zt/2,rr=new Ll([],yp);if(Zt===0)return new r(ae,he);for(var gr=ae;gr<ve;gr+=Zt)for(var Er=he;Er<Se;Er+=Zt)rr.push(new Cl(gr+qt,Er+qt,qt,M));for(var Sr=function(Hr){for(var fn=0,xn=0,Fn=0,Rn=Hr[0],Hn=0,ta=Rn.length,ra=ta-1;Hn<ta;ra=Hn++){var Wn=Rn[Hn],ca=Rn[ra],sa=Wn.x*ca.y-ca.x*Wn.y;xn+=(Wn.x+ca.x)*sa,Fn+=(Wn.y+ca.y)*sa,fn+=3*sa}return new Cl(xn/fn,Fn/fn,0,Hr)}(M),Rr=rr.length;rr.length;){var Br=rr.pop();(Br.d>Sr.d||!Sr.d)&&(Sr=Br,Y&&console.log("found best %d after %d probes",Math.round(1e4*Br.d)/1e4,Rr)),Br.max-Sr.d<=O||(qt=Br.h/2,rr.push(new Cl(Br.p.x-qt,Br.p.y-qt,qt,M)),rr.push(new Cl(Br.p.x+qt,Br.p.y-qt,qt,M)),rr.push(new Cl(Br.p.x-qt,Br.p.y+qt,qt,M)),rr.push(new Cl(Br.p.x+qt,Br.p.y+qt,qt,M)),Rr+=4)}return Y&&(console.log("num probes: "+Rr),console.log("best distance: "+Sr.d)),Sr.p}function yp(M,O){return O.max-M.max}function Cl(M,O,Y,ae){this.p=new r(M,O),this.h=Y,this.d=function(he,ve){for(var Se=!1,Fe=1/0,Ke=0;Ke<ve.length;
vendor: 23,464 bytes, line 94
94Ke++)for(var ct=ve[Ke],gt=0,Bt=ct.length,Zt=Bt-1;gt<Bt;Zt=gt++){var qt=ct[gt],rr=ct[Zt];qt.y>he.y!=rr.y>he.y&&he.x<(rr.x-qt.x)*(he.y-qt.y)/(rr.y-qt.y)+qt.x&&(Se=!Se),Fe=Math.min(Fe,Hs(he,qt,rr))}return(Se?1:-1)*Math.sqrt(Fe)}(this.p,ae),this.max=this.d+this.h*Math.SQRT2}Ll.prototype.push=function(M){this.data.push(M),this.length++,this._up(this.length-1)},Ll.prototype.pop=function(){if(this.length!==0){var M=this.data[0],O=this.data.pop();return this.length--,this.length>0&&(this.data[0]=O,this._down(0)),M}},Ll.prototype.peek=function(){return this.data[0]},Ll.prototype._up=function(M){for(var O=this.data,Y=this.compare,ae=O[M];M>0;){var he=M-1>>1,ve=O[he];if(Y(ae,ve)>=0)break;O[M]=ve,M=he}O[M]=ae},Ll.prototype._down=function(M){for(var O=this.data,Y=this.compare,ae=this.length>>1,he=O[M];M<ae;){var ve=1+(M<<1),Se=O[ve],Fe=ve+1;if(Fe<this.length&&Y(O[Fe],Se)<0&&(ve=Fe,Se=O[Fe]),Y(Se,he)>=0)break;O[M]=Se,M=ve}O[M]=he};var vu=Number.POSITIVE_INFINITY;function Mf(M,O){return O[1]!==vu?function(Y,ae,he){var ve=0,Se=0;switch(ae=Math.abs(ae),he=Math.abs(he),Y){case"top-right":case"top-left":case"top":Se=he-7;break;case"bottom-right":case"bottom-left":case"bottom":Se=7-he}switch(Y){case"top-right":case"bottom-right":case"right":ve=-ae;break;case"top-left":case"bottom-left":case"left":ve=ae}return[ve,Se]}(M,O[0],O[1]):function(Y,ae){var he=0,ve=0;ae<0&&(ae=0);var Se=ae/Math.sqrt(2);switch(Y){case"top-right":case"top-left":ve=Se-7;break;case"bottom-right":case"bottom-left":ve=7-Se;break;case"bottom":ve=7-ae;break;case"top":ve=ae-7}switch(Y){case"top-right":case"bottom-right":he=-Se;break;case"top-left":case"bottom-left":he=Se;break;case"left":he=ae;break;case"right":he=-ae}return[he,ve]}(M,O[0])}function yu(M){switch(M){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Af(M,O,Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr){var gr=function(Hr,fn,xn,Fn,Rn,Hn,ta,ra){for(var Wn=Fn.layout.get("text-rotate").evaluate(Hn,{})*Math.PI/180,ca=[],sa=0,na=fn.positionedLines;sa<na.length;sa+=1)for(var Ga=na[sa],Ra=0,Xa=Ga.positionedGlyphs;Ra<Xa.length;Ra+=1){var ya=Xa[Ra];if(ya.rect){var Na=ya.rect||{},hi=4,oi=!0,wi=1,si=0,ro=(Rn||ra)&&ya.vertical,Ti=ya.metrics.advance*ya.scale/2;if(ra&&fn.verticalizable){var Lo=24*(ya.scale-1),vo=(24-ya.metrics.width*ya.scale)/2;si=Ga.lineOffset/2-(ya.imageName?-vo:Lo)}if(ya.imageName){var bo=ta[ya.imageName];oi=bo.sdf,hi=1/(wi=bo.pixelRatio)}var Vo=Rn?[ya.x+Ti,ya.y]:[0,0],Oo=Rn?[0,0]:[ya.x+Ti+xn[0],ya.y+xn[1]-si],no=[0,0];ro&&(no=Oo,Oo=[0,0]);var _o=(ya.metrics.left-hi)*ya.scale-Ti+Oo[0],qi=(-ya.metrics.top-hi)*ya.scale+Oo[1],oo=_o+Na.w*ya.scale/wi,Pa=qi+Na.h*ya.scale/wi,Wa=new r(_o,qi),Di=new r(oo,qi),Ri=new r(_o,Pa),Pi=new r(oo,Pa);if(ro){var ki=new r(-Ti,Ti- -17),$a=-Math.PI/2,Fi=12-Ti,Ho=ya.imageName?Fi:0,ns=new r(22-Fi,-Ho),zo=new(Function.prototype.bind.apply(r,[null].concat(no)));Wa._rotateAround($a,ki)._add(ns)._add(zo),Di._rotateAround($a,ki)._add(ns)._add(zo),Ri._rotateAround($a,ki)._add(ns)._add(zo),Pi._rotateAround($a,ki)._add(ns)._add(zo)}if(Wn){var Ls=Math.sin(Wn),Zs=Math.cos(Wn),yo=[Zs,-Ls,Ls,Zs];Wa._matMult(yo),Di._matMult(yo),Ri._matMult(yo),Pi._matMult(yo)}var Cs=new r(0,0),Ps=new r(0,0);ca.push({tl:Wa,tr:Di,bl:Ri,br:Pi,tex:Na,writingMode:fn.writingMode,glyphOffset:Vo,sectionIndex:ya.sectionIndex,isSDF:oi,pixelOffsetTL:Cs,pixelOffsetBR:Ps,minFontScaleX:0,minFontScaleY:0})}}return ca}(0,Y,Fe,he,ve,Se,ae,M.allowVerticalPlacement),Er=M.textSizeData,Sr=null;Er.kind==="source"?(Sr=[128*he.layout.get("text-size").evaluate(Se,{})])[0]>32640&&A(M.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Er.kind==="composite"&&((Sr=[128*qt.compositeTextSizes[0].evaluate(Se,{},rr),128*qt.compositeTextSizes[1].evaluate(Se,{},rr)])[0]>32640||Sr[1]>32640)&&A(M.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),M.addSymbols(M.text,gr,Sr,Fe,ve,Se,ct,O,Ke.lineStartIndex,Ke.lineLength,Zt,rr);for(var Rr=0,Br=gt;Rr<Br.length;Rr+=1)Bt[Br[Rr]]=M.text.placedSymbolArray.length-1;return 4*gr.length}function Sf(M){for(var O in M)return M[O];return null}function xp(M,O,Y,ae){var he=M.compareText;if(O in he){for(var ve=he[O],Se=ve.length-1;Se>=0;Se--)if(ae.dist(ve[Se])<Y)return!0}else he[O]=[];return he[O].push(ae),!1}var bp=kl.VectorTileFeature.types,_p=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Lc(M,O,Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt){var qt=Fe?Math.min(32640,Math.round(Fe[0])):0,rr=Fe?Math.min(32640,Math.round(Fe[1])):0;M.emplaceBack(O,Y,Math.round(32*ae),Math.round(32*he),ve,Se,(qt<<1)+(Ke?1:0),rr,16*ct,16*gt,256*Bt,256*Zt)}function xu(M,O,Y){M.emplaceBack(O.x,O.y,Y),M.emplaceBack(O.x,O.y,Y),M.emplaceBack(O.x,O.y,Y),M.emplaceBack(O.x,O.y,Y)}function wp(M){for(var O=0,Y=M.sections;O<Y.length;O+=1)if(Kn(Y[O].text))return!0;return!1}var Pl=function(M){this.layoutVertexArray=new Ms,this.indexArray=new Qi,this.programConfigurations=M,this.segments=new Ft,this.dynamicLayoutVertexArray=new os,this.opacityVertexArray=new Ks,this.placedSymbolArray=new je};Pl.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},Pl.prototype.upload=function(M,O,Y,ae){this.isEmpty()||(Y&&(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,pu.members),this.indexBuffer=M.createIndexBuffer(this.indexArray,O),this.dynamicLayoutVertexBuffer=M.createVertexBuffer(this.dynamicLayoutVertexArray,Xh.members,!0),this.opacityVertexBuffer=M.createVertexBuffer(this.opacityVertexArray,_p,!0),this.opacityVertexBuffer.itemSize=1),(Y||ae)&&this.programConfigurations.upload(M))},Pl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Zr("SymbolBuffers",Pl);var ac=function(M,O,Y){this.layoutVertexArray=new M,this.layoutAttributes=O,this.indexArray=new Y,this.segments=new Ft,this.collisionVertexArray=new As};ac.prototype.upload=function(M){this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=M.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=M.createVertexBuffer(this.collisionVertexArray,Jh.members,!0)},ac.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Zr("CollisionBuffers",ac);var ni=function(M){this.collisionBoxArray=M.collisionBoxArray,this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(Se){return Se.id}),this.index=M.index,this.pixelRatio=M.pixelRatio,this.sourceLayerIndex=M.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Wl([]),this.placementViewportMatrix=Wl([]);var O=this.layers[0]._unevaluatedLayout._values;this.textSizeData=mu(this.zoom,O["text-size"]),this.iconSizeData=mu(this.zoom,O["icon-size"]);var Y=this.layers[0].layout,ae=Y.get("symbol-sort-key"),he=Y.get("symbol-z-order");this.sortFeaturesByKey=he!=="viewport-y"&&ae.constantOr(1)!==void 0;var ve=he==="viewport-y"||he==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=ve&&(Y.get("text-allow-overlap")||Y.get("icon-allow-overlap")||Y.get("text-ignore-placement")||Y.get("icon-ignore-placement")),Y.get("symbol-placement")==="point"&&(this.writingModes=Y.get("text-writing-mode").map(function(Se){return ss[Se]})),this.stateDependentLayerIds=this.layers.filter(function(Se){return Se.isStateDependent()}).map(function(Se){return Se.id}),this.sourceID=M.sourceID};ni.prototype.createArrays=function(){this.text=new Pl(new ii(pu.members,this.layers,this.zoom,function(M){return/^text/.test(M)})),this.icon=new Pl(new ii(pu.members,this.layers,this.zoom,function(M){return/^icon/.test(M)})),this.glyphOffsetArray=new bt,this.lineVertexArray=new At,this.symbolInstances=new nt},ni.prototype.calculateGlyphDependencies=function(M,O,Y,ae,he){for(var ve=0;ve<M.length;ve++)if(O[M.charCodeAt(ve)]=!0,(Y||ae)&&he){var Se=tc[M.charAt(ve)];Se&&(O[Se.charCodeAt(0)]=!0)}},ni.prototype.populate=function(M,O,Y){var ae=this.layers[0],he=ae.layout,ve=he.get("text-font"),Se=he.get("text-field"),Fe=he.get("icon-image"),Ke=(Se.value.kind!=="constant"||Se.value.value instanceof Or&&!Se.value.value.isEmpty()||Se.value.value.toString().length>0)&&(ve.value.kind!=="constant"||ve.value.value.length>0),ct=Fe.value.kind!=="constant"||!!Fe.value.value||Object.keys(Fe.parameters).length>0,gt=he.get("symbol-sort-key");if(this.features=[],Ke||ct){for(var Bt=O.iconDependencies,Zt=O.glyphDependencies,qt=O.availableImages,rr=new Ka(this.zoom),gr=0,Er=M;gr<Er.length;gr+=1){var Sr=Er[gr],Rr=Sr.feature,Br=Sr.id,Hr=Sr.index,fn=Sr.sourceLayerIndex,xn=ae._featureFilter.needGeometry,Fn={type:Rr.type,id:Br,properties:Rr.properties,geometry:xn?ui(Rr):[]};if(ae._featureFilter.filter(rr,Fn,Y)){xn||(Fn.geometry=ui(Rr));var Rn=void 0;if(Ke){var Hn=ae.getValueAndResolveTokens("text-field",Fn,Y,qt),ta=Or.factory(Hn);wp(ta)&&(this.hasRTLText=!0),(!this.hasRTLText||Ni()==="unavailable"||this.hasRTLText&&io.isParsed())&&(Rn=Qh(ta,ae,Fn))}var ra=void 0;if(ct){var Wn=ae.getValueAndResolveTokens("icon-image",Fn,Y,qt);ra=Wn instanceof dr?Wn:dr.fromString(Wn)}if(Rn||ra){var ca=this.sortFeaturesByKey?gt.evaluate(Fn,{},Y):void 0,sa={id:Br,text:Rn,icon:ra,index:Hr,sourceLayerIndex:fn,geometry:ui(Rr),properties:Rr.properties,type:bp[Rr.type],sortKey:ca};if(this.features.push(sa),ra&&(Bt[ra.name]=!0),Rn){var na=ve.evaluate(Fn,{},Y).join(","),Ga=he.get("text-rotation-alignment")==="map"&&he.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(ss.vertical)>=0;for(var Ra=0,Xa=Rn.sections;Ra<Xa.length;Ra+=1){var ya=Xa[Ra];if(ya.image)Bt[ya.image.name]=!0;else{var Na=La(Rn.toString()),hi=ya.fontStack||na,oi=Zt[hi]=Zt[hi]||{};this.calculateGlyphDependencies(ya.text,oi,Ga,this.allowVerticalPlacement,Na)}}}}}}he.get("symbol-placement")==="line"&&(this.features=function(wi){var si={},ro={},Ti=[],Lo=0;function vo(Pi){Ti.push(wi[Pi]),Lo++}function bo(Pi,ki,$a){var Fi=ro[Pi];return delete ro[Pi],ro[ki]=Fi,Ti[Fi].geometry[0].pop(),Ti[Fi].geometry[0]=Ti[Fi].geometry[0].concat($a[0]),Fi}function Vo(Pi,ki,$a){var Fi=si[ki];return delete si[ki],si[Pi]=Fi,Ti[Fi].geometry[0].shift(),Ti[Fi].geometry[0]=$a[0].concat(Ti[Fi].geometry[0]),Fi}function Oo(Pi,ki,$a){var Fi=$a?ki[0][ki[0].length-1]:ki[0][0];return Pi+":"+Fi.x+":"+Fi.y}for(var no=0;no<wi.length;no++){var _o=wi[no],qi=_o.geometry,oo=_o.text?_o.text.toString():null;if(oo){var Pa=Oo(oo,qi),Wa=Oo(oo,qi,!0);if(Pa in ro&&Wa in si&&ro[Pa]!==si[Wa]){var Di=Vo(Pa,Wa,qi),Ri=bo(Pa,Wa,Ti[Di].geometry);delete si[Pa],delete ro[Wa],ro[Oo(oo,Ti[Ri].geometry,!0)]=Ri,Ti[Di].geometry=null}else Pa in ro?bo(Pa,Wa,qi):Wa in si?Vo(Pa,Wa,qi):(vo(no),si[Pa]=Lo-1,ro[Wa]=Lo-1)}else vo(no)}return Ti.filter(function(Pi){return Pi.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(wi,si){return wi.sortKey-si.sortKey})}},ni.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(M,O,this.layers,Y),this.icon.programConfigurations.updatePaintArrays(M,O,this.layers,Y))},ni.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},ni.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},ni.prototype.upload=function(M){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(M),this.iconCollisionBox.upload(M)),this.text.upload(M,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(M,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},ni.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},ni.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},ni.prototype.addToLineVertexArray=function(M,O){var Y=this.lineVertexArray.length;if(M.segment!==void 0){for(var ae=M.dist(O[M.segment+1]),he=M.dist(O[M.segment]),ve={},Se=M.segment+1;Se<O.length;Se++)ve[Se]={x:O[Se].x,y:O[Se].y,tileUnitDistanceFromAnchor:ae},Se<O.length-1&&(ae+=O[Se+1].dist(O[Se]));for(var Fe=M.segment||0;Fe>=0;Fe--)ve[Fe]={x:O[Fe].x,y:O[Fe].y,tileUnitDistanceFromAnchor:he},Fe>0&&(he+=O[Fe-1].dist(O[Fe]));for(var Ke=0;Ke<O.length;Ke++){var ct=ve[Ke];this.lineVertexArray.emplaceBack(ct.x,ct.y,ct.tileUnitDistanceFromAnchor)}}return{lineStartIndex:Y,lineLength:this.lineVertexArray.length-Y}},ni.prototype.addSymbols=function(M,O,Y,ae,he,ve,Se,Fe,Ke,ct,gt,Bt){for(var Zt=M.indexArray,qt=M.layoutVertexArray,rr=M.segments.prepareSegment(4*O.length,qt,Zt,ve.sortKey),gr=this.glyphOffsetArray.length,Er=rr.vertexLength,Sr=this.allowVerticalPlacement&&Se===ss.vertical?Math.PI/2:0,Rr=ve.text&&ve.text.sections,Br=0;Br<O.length;Br++){var Hr=O[Br],fn=Hr.tl,xn=Hr.tr,Fn=Hr.bl,Rn=Hr.br,Hn=Hr.tex,ta=Hr.pixelOffsetTL,ra=Hr.pixelOffsetBR,Wn=Hr.minFontScaleX,ca=Hr.minFontScaleY,sa=Hr.glyphOffset,na=Hr.isSDF,Ga=Hr.sectionIndex,Ra=rr.vertexLength,Xa=sa[1];Lc(qt,Fe.x,Fe.y,fn.x,Xa+fn.y,Hn.x,Hn.y,Y,na,ta.x,ta.y,Wn,ca),Lc(qt,Fe.x,Fe.y,xn.x,Xa+xn.y,Hn.x+Hn.w,Hn.y,Y,na,ra.x,ta.y,Wn,ca),Lc(qt,Fe.x,Fe.y,Fn.x,Xa+Fn.y,Hn.x,Hn.y+Hn.h,Y,na,ta.x,ra.y,Wn,ca),Lc(qt,Fe.x,Fe.y,Rn.x,Xa+Rn.y,Hn.x+Hn.w,Hn.y+Hn.h,Y,na,ra.x,ra.y,Wn,ca),xu(M.dynamicLayoutVertexArray,Fe,Sr),Zt.emplaceBack(Ra,Ra+1,Ra+2),Zt.emplaceBack(Ra+1,Ra+2,Ra+3),rr.vertexLength+=4,rr.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(sa[0]),Br!==O.length-1&&Ga===O[Br+1].sectionIndex||M.programConfigurations.populatePaintArrays(qt.length,ve,ve.index,{},Bt,Rr&&Rr[Ga])}M.placedSymbolArray.emplaceBack(Fe.x,Fe.y,gr,this.glyphOffsetArray.length-gr,Er,Ke,ct,Fe.segment,Y?Y[0]:0,Y?Y[1]:0,ae[0],ae[1],Se,0,!1,0,gt)},ni.prototype._addCollisionDebugVertex=function(M,O,Y,ae,he,ve){return O.emplaceBack(0,0),M.emplaceBack(Y.x,Y.y,ae,he,Math.round(ve.x),Math.round(ve.y))},ni.prototype.addCollisionDebugVertices=function(M,O,Y,ae,he,ve,Se){var Fe=he.segments.prepareSegment(4,he.layoutVertexArray,he.indexArray),Ke=Fe.vertexLength,ct=he.layoutVertexArray,gt=he.collisionVertexArray,Bt=Se.anchorX,Zt=Se.anchorY;this._addCollisionDebugVertex(ct,gt,ve,Bt,Zt,new r(M,O)),this._addCollisionDebugVertex(ct,gt,ve,Bt,Zt,new r(Y,O)),this._addCollisionDebugVertex(ct,gt,ve,Bt,Zt,new r(Y,ae)),this._addCollisionDebugVertex(ct,gt,ve,Bt,Zt,new r(M,ae)),Fe.vertexLength+=4;var qt=he.indexArray;qt.emplaceBack(Ke,Ke+1),qt.emplaceBack(Ke+1,Ke+2),qt.emplaceBack(Ke+2,Ke+3),qt.emplaceBack(Ke+3,Ke),Fe.primitiveLength+=4},ni.prototype.addDebugCollisionBoxes=function(M,O,Y,ae){for(var he=M;he<O;he++){var ve=this.collisionBoxArray.get(he),Se=ve.x1,Fe=ve.y1,Ke=ve.x2,ct=ve.y2;this.addCollisionDebugVertices(Se,Fe,Ke,ct,ae?this.textCollisionBox:this.iconCollisionBox,ve.anchorPoint,Y)}},ni.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new ac(ds,af.members,B),this.iconCollisionBox=new ac(ds,af.members,B);for(var M=0;M<this.symbolInstances.length;M++){var O=this.symbolInstances.get(M);this.addDebugCollisionBoxes(O.textBoxStartIndex,O.textBoxEndIndex,O,!0),this.addDebugCollisionBoxes(O.verticalTextBoxStartIndex,O.verticalTextBoxEndIndex,O,!0),this.addDebugCollisionBoxes(O.iconBoxStartIndex,O.iconBoxEndIndex,O,!1),this.addDebugCollisionBoxes(O.verticalIconBoxStartIndex,O.verticalIconBoxEndIndex,O,!1)}},ni.prototype._deserializeCollisionBoxesForSymbol=function(M,O,Y,ae,he,ve,Se,Fe,Ke){for(var ct={},gt=O;gt<Y;gt++){var Bt=M.get(gt);ct.textBox={x1:Bt.x1,y1:Bt.y1,x2:Bt.x2,y2:Bt.y2,anchorPointX:Bt.anchorPointX,anchorPointY:Bt.anchorPointY},ct.textFeatureIndex=Bt.featureIndex;break}for(var Zt=ae;Zt<he;Zt++){var qt=M.get(Zt);ct.verticalTextBox={x1:qt.x1,y1:qt.y1,x2:qt.x2,y2:qt.y2,anchorPointX:qt.anchorPointX,anchorPointY:qt.anchorPointY},ct.verticalTextFeatureIndex=qt.featureIndex;break}for(var rr=ve;rr<Se;rr++){var gr=M.get(rr);ct.iconBox={x1:gr.x1,y1:gr.y1,x2:gr.x2,y2:gr.y2,anchorPointX:gr.anchorPointX,anchorPointY:gr.anchorPointY},ct.iconFeatureIndex=gr.featureIndex;break}for(var Er=Fe;Er<Ke;Er++){var Sr=M.get(Er);ct.verticalIconBox={x1:Sr.x1,y1:Sr.y1,x2:Sr.x2,y2:Sr.y2,anchorPointX:Sr.anchorPointX,anchorPointY:Sr.anchorPointY},ct.verticalIconFeatureIndex=Sr.featureIndex;break}return ct},ni.prototype.deserializeCollisionBoxes=function(M){this.collisionArrays=[];for(var O=0;O<this.symbolInstances.length;O++){var Y=this.symbolInstances.get(O);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(M,Y.textBoxStartIndex,Y.textBoxEndIndex,Y.verticalTextBoxStartIndex,Y.verticalTextBoxEndIndex,Y.iconBoxStartIndex,Y.iconBoxEndIndex,Y.verticalIconBoxStartIndex,Y.verticalIconBoxEndIndex))}},ni.prototype.hasTextData=function(){return this.text.segments.get().length>0},ni.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ni.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ni.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ni.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ni.prototype.addIndicesForPlacedSymbol=function(M,O){for(var Y=M.placedSymbolArray.get(O),ae=Y.vertexStartIndex+4*Y.numGlyphs,he=Y.vertexStartIndex;he<ae;he+=4)M.indexArray.emplaceBack(he,he+1,he+2),M.indexArray.emplaceBack(he+1,he+2,he+3)},ni.prototype.getSortedSymbolIndexes=function(M){if(this.sortedAngle===M&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var O=Math.sin(M),Y=Math.cos(M),ae=[],he=[],ve=[],Se=0;Se<this.symbolInstances.length;++Se){ve.push(Se);var Fe=this.symbolInstances.get(Se);ae.push(0|Math.round(O*Fe.anchorX+Y*Fe.anchorY)),he.push(Fe.featureIndex)}return ve.sort(function(Ke,ct){return ae[Ke]-ae[ct]||he[ct]-he[Ke]}),ve},ni.prototype.addToSortKeyRanges=function(M,O){var Y=this.sortKeyRanges[this.sortKeyRanges.length-1];Y&&Y.sortKey===O?Y.symbolInstanceEnd=M+1:this.sortKeyRanges.push({sortKey:O,symbolInstanceStart:M,symbolInstanceEnd:M+1})},ni.prototype.sortFeatures=function(M){var O=this;if(this.sortFeaturesByY&&this.sortedAngle!==M&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(M),this.sortedAngle=M,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var Y=0,ae=this.symbolInstanceIndexes;Y<ae.length;Y+=1){var he=ae[Y],ve=this.symbolInstances.get(he);this.featureSortOrder.push(ve.featureIndex),[ve.rightJustifiedTextSymbolIndex,ve.centerJustifiedTextSymbolIndex,ve.leftJustifiedTextSymbolIndex].forEach(function(Se,Fe,Ke){Se>=0&&Ke.indexOf(Se)===Fe&&O.addIndicesForPlacedSymbol(O.text,Se)}),ve.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,ve.verticalPlacedTextSymbolIndex),ve.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.placedIconSymbolIndex),ve.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Zr("SymbolBucket",ni,{omit:["layers","collisionBoxArray","features","compareText"]}),ni.MAX_GLYPHS=65535,ni.addDynamicAttributes=xu;var Tp=new Ao({"symbol-placement":new ia(Ce.layout_symbol["symbol-placement"]),"symbol-spacing":new ia(Ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ia(Ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ga(Ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ia(Ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ia(Ce.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ia(Ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new ia(Ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ia(Ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new ga(Ce.layout_symbol["icon-size"]),"icon-text-fit":new ia(Ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ia(Ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new ga(Ce.layout_symbol["icon-image"]),"icon-rotate":new ga(Ce.layout_symbol["icon-rotate"]),"icon-padding":new ia(Ce.layout_symbol["icon-padding"]),"icon-keep-upright":new ia(Ce.layout_symbol["icon-keep-upright"]),"icon-offset":new ga(Ce.layout_symbol["icon-offset"]),"icon-anchor":new ga(Ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ia(Ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ia(Ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ia(Ce.layout_symbol["text-rotation-alignment"]),"text-field":new ga(Ce.layout_symbol["text-field"]),"text-font":new ga(Ce.layout_symbol["text-font"]),"text-size":new ga(Ce.layout_symbol["text-size"]),"text-max-width":new ga(Ce.layout_symbol["text-max-width"]),"text-line-height":new ia(Ce.layout_symbol["text-line-height"]),"text-letter-spacing":new ga(Ce.layout_symbol["text-letter-spacing"]),"text-justify":new ga(Ce.layout_symbol["text-justify"]),"text-radial-offset":new ga(Ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ia(Ce.layout_symbol["text-variable-anchor"]),"text-anchor":new ga(Ce.layout_symbol["text-anchor"]),"text-max-angle":new ia(Ce.layout_symbol["text-max-angle"]),"text-writing-mode":new ia(Ce.layout_symbol["text-writing-mode"]),"text-rotate":new ga(Ce.layout_symbol["text-rotate"]),"text-padding":new ia(Ce.layout_symbol["text-padding"]),"text-keep-upright":new ia(Ce.layout_symbol["text-keep-upright"]),"text-transform":new ga(Ce.layout_symbol["text-transform"]),"text-offset":new ga(Ce.layout_symbol["text-offset"]),"text-allow-overlap":new ia(Ce.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ia(Ce.layout_symbol["text-ignore-placement"]),"text-optional":new ia(Ce.layout_symbol["text-optional"])}),bu={paint:new Ao({"icon-opacity":new ga(Ce.paint_symbol["icon-opacity"]),"icon-color":new ga(Ce.paint_symbol["icon-color"]),"icon-halo-color":new ga(Ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new ga(Ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ga(Ce.paint_symbol["icon-halo-blur"]),"icon-translate":new ia(Ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new ia(Ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new ga(Ce.paint_symbol["text-opacity"]),"text-color":new ga(Ce.paint_symbol["text-color"],{runtimeType:zt,getOverride:function(M){return M.textColor},hasOverride:function(M){return!!M.textColor}}),"text-halo-color":new ga(Ce.paint_symbol["text-halo-color"]),"text-halo-width":new ga(Ce.paint_symbol["text-halo-width"]),"text-halo-blur":new ga(Ce.paint_symbol["text-halo-blur"]),"text-translate":new ia(Ce.paint_symbol["text-translate"]),"text-translate-anchor":new ia(Ce.paint_symbol["text-translate-anchor"])}),layout:Tp},Il=function(M){this.type=M.property.overrides?M.property.overrides.runtimeType:Et,this.defaultValue=
vendor: 16,436 bytes, line 94
94M};Il.prototype.evaluate=function(M){if(M.formattedSection){var O=this.defaultValue.property.overrides;if(O&&O.hasOverride(M.formattedSection))return O.getOverride(M.formattedSection)}return M.feature&&M.featureState?this.defaultValue.evaluate(M.feature,M.featureState):this.defaultValue.property.specification.default},Il.prototype.eachChild=function(M){this.defaultValue.isConstant()||M(this.defaultValue.value._styleExpression.expression)},Il.prototype.outputDefined=function(){return!1},Il.prototype.serialize=function(){return null},Zr("FormatSectionOverride",Il,{omit:["defaultValue"]});var kp=function(M){function O(Y){M.call(this,Y,bu)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.recalculate=function(Y,ae){if(M.prototype.recalculate.call(this,Y,ae),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var he=this.layout.get("text-writing-mode");if(he){for(var ve=[],Se=0,Fe=he;Se<Fe.length;Se+=1){var Ke=Fe[Se];ve.indexOf(Ke)<0&&ve.push(Ke)}this.layout._values["text-writing-mode"]=ve}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},O.prototype.getValueAndResolveTokens=function(Y,ae,he,ve){var Se=this.layout.get(Y).evaluate(ae,{},he,ve),Fe=this._unevaluatedLayout._values[Y];return Fe.isDataDriven()||$t(Fe.value)||!Se?Se:function(Ke,ct){return ct.replace(/{([^{}]+)}/g,function(gt,Bt){return Bt in Ke?String(Ke[Bt]):""})}(ae.properties,Se)},O.prototype.createBucket=function(Y){return new ni(Y)},O.prototype.queryRadius=function(){return 0},O.prototype.queryIntersectsFeature=function(){return!1},O.prototype._setPaintOverrides=function(){for(var Y=0,ae=bu.paint.overridableProperties;Y<ae.length;Y+=1){var he=ae[Y];if(O.hasPaintOverride(this.layout,he)){var ve=this.paint.get(he),Se=new Il(ve),Fe=new Jt(Se,ve.property.specification),Ke=null;Ke=ve.value.kind==="constant"||ve.value.kind==="source"?new tr("source",Fe):new ur("composite",Fe,ve.value.zoomStops,ve.value._interpolationType),this.paint._values[he]=new Ci(ve.property,Ke,ve.parameters)}}},O.prototype._handleOverridablePaintPropertyUpdate=function(Y,ae,he){return!(!this.layout||ae.isDataDriven()||he.isDataDriven())&&O.hasPaintOverride(this.layout,Y)},O.hasPaintOverride=function(Y,ae){var he=Y.get("text-field"),ve=bu.paint.properties[ae],Se=!1,Fe=function(gt){for(var Bt=0,Zt=gt;Bt<Zt.length;Bt+=1){var qt=Zt[Bt];if(ve.overrides&&ve.overrides.hasOverride(qt))return void(Se=!0)}};if(he.value.kind==="constant"&&he.value.value instanceof Or)Fe(he.value.value.sections);else if(he.value.kind==="source"){var Ke=function(gt){if(!Se)if(gt instanceof Ln&&rn(gt.value)===yt){var Bt=gt.value;Fe(Bt.sections)}else gt instanceof xr?Fe(gt.sections):gt.eachChild(Ke)},ct=he.value;ct._styleExpression&&Ke(ct._styleExpression.expression)}return Se},O}(Uo),Mp={paint:new Ao({"background-color":new ia(Ce.paint_background["background-color"]),"background-pattern":new Fs(Ce.paint_background["background-pattern"]),"background-opacity":new ia(Ce.paint_background["background-opacity"])})},Ap=function(M){function O(Y){M.call(this,Y,Mp)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O}(Uo),Sp={paint:new Ao({"raster-opacity":new ia(Ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new ia(Ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ia(Ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ia(Ce.paint_raster["raster-brightness-max"]),"raster-saturation":new ia(Ce.paint_raster["raster-saturation"]),"raster-contrast":new ia(Ce.paint_raster["raster-contrast"]),"raster-resampling":new ia(Ce.paint_raster["raster-resampling"]),"raster-fade-duration":new ia(Ce.paint_raster["raster-fade-duration"])})},Ep=function(M){function O(Y){M.call(this,Y,Sp)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O}(Uo),Lp=function(M){function O(Y){M.call(this,Y,{}),this.implementation=Y}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},O.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},O.prototype.recalculate=function(){},O.prototype.updateTransitions=function(){},O.prototype.hasTransition=function(){},O.prototype.serialize=function(){},O.prototype.onAdd=function(Y){this.implementation.onAdd&&this.implementation.onAdd(Y,Y.painter.context.gl)},O.prototype.onRemove=function(Y){this.implementation.onRemove&&this.implementation.onRemove(Y,Y.painter.context.gl)},O}(Uo),Cp={circle:gh,heatmap:vh,hillshade:xh,fill:Dh,"fill-extrusion":qh,line:Zh,symbol:kp,background:Ap,raster:Ep},Ef=self.HTMLImageElement,Lf=self.HTMLCanvasElement,Cf=self.HTMLVideoElement,Pf=self.ImageData,Cc=self.ImageBitmap,dl=function(M,O,Y,ae){this.context=M,this.format=Y,this.texture=M.gl.createTexture(),this.update(O,ae)};dl.prototype.update=function(M,O,Y){var ae=M.width,he=M.height,ve=!(this.size&&this.size[0]===ae&&this.size[1]===he||Y),Se=this.context,Fe=Se.gl;if(this.useMipmap=!!(O&&O.useMipmap),Fe.bindTexture(Fe.TEXTURE_2D,this.texture),Se.pixelStoreUnpackFlipY.set(!1),Se.pixelStoreUnpack.set(1),Se.pixelStoreUnpackPremultiplyAlpha.set(this.format===Fe.RGBA&&(!O||O.premultiply!==!1)),ve)this.size=[ae,he],M instanceof Ef||M instanceof Lf||M instanceof Cf||M instanceof Pf||Cc&&M instanceof Cc?Fe.texImage2D(Fe.TEXTURE_2D,0,this.format,this.format,Fe.UNSIGNED_BYTE,M):Fe.texImage2D(Fe.TEXTURE_2D,0,this.format,ae,he,0,this.format,Fe.UNSIGNED_BYTE,M.data);else{var Ke=Y||{x:0,y:0},ct=Ke.x,gt=Ke.y;M instanceof Ef||M instanceof Lf||M instanceof Cf||M instanceof Pf||Cc&&M instanceof Cc?Fe.texSubImage2D(Fe.TEXTURE_2D,0,ct,gt,Fe.RGBA,Fe.UNSIGNED_BYTE,M):Fe.texSubImage2D(Fe.TEXTURE_2D,0,ct,gt,ae,he,Fe.RGBA,Fe.UNSIGNED_BYTE,M.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Fe.generateMipmap(Fe.TEXTURE_2D)},dl.prototype.bind=function(M,O,Y){var ae=this.context.gl;ae.bindTexture(ae.TEXTURE_2D,this.texture),Y!==ae.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Y=ae.LINEAR),M!==this.filter&&(ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_MAG_FILTER,M),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_MIN_FILTER,Y||M),this.filter=M),O!==this.wrap&&(ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_WRAP_S,O),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_WRAP_T,O),this.wrap=O)},dl.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},dl.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var _u=function(M){var O=this;this._callback=M,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){O._triggered=!1,O._callback()})};_u.prototype.trigger=function(){var M=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){M._triggered=!1,M._callback()},0))},_u.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Ol=function(M,O,Y){this.target=M,this.parent=O,this.mapId=Y,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},l(["receive","process"],this),this.invoker=new _u(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=S()?M:self};function If(M,O,Y){var ae=2*Math.PI*6378137/256/Math.pow(2,Y);return[M*ae-2*Math.PI*6378137/2,O*ae-2*Math.PI*6378137/2]}Ol.prototype.send=function(M,O,Y,ae,he){var ve=this;he===void 0&&(he=!1);var Se=Math.round(1e18*Math.random()).toString(36).substring(0,10);Y&&(this.callbacks[Se]=Y);var Fe=F(this.globalScope)?void 0:[];return this.target.postMessage({id:Se,type:M,hasCallback:!!Y,targetMapId:ae,mustQueue:he,sourceMapId:this.mapId,data:Xn(O,Fe)},Fe),{cancel:function(){Y&&delete ve.callbacks[Se],ve.target.postMessage({id:Se,type:"<cancel>",targetMapId:ae,sourceMapId:ve.mapId})}}},Ol.prototype.receive=function(M){var O=M.data,Y=O.id;if(Y&&(!O.targetMapId||this.mapId===O.targetMapId))if(O.type==="<cancel>"){delete this.tasks[Y];var ae=this.cancelCallbacks[Y];delete this.cancelCallbacks[Y],ae&&ae()}else S()||O.mustQueue?(this.tasks[Y]=O,this.taskQueue.push(Y),this.invoker.trigger()):this.processTask(Y,O)},Ol.prototype.process=function(){if(this.taskQueue.length){var M=this.taskQueue.shift(),O=this.tasks[M];delete this.tasks[M],this.taskQueue.length&&this.invoker.trigger(),O&&this.processTask(M,O)}},Ol.prototype.processTask=function(M,O){var Y=this;if(O.type==="<response>"){var ae=this.callbacks[M];delete this.callbacks[M],ae&&(O.error?ae(xa(O.error)):ae(null,xa(O.data)))}else{var he=!1,ve=F(this.globalScope)?void 0:[],Se=O.hasCallback?function(gt,Bt){he=!0,delete Y.cancelCallbacks[M],Y.target.postMessage({id:M,type:"<response>",sourceMapId:Y.mapId,error:gt?Xn(gt):null,data:Xn(Bt,ve)},ve)}:function(gt){he=!0},Fe=null,Ke=xa(O.data);if(this.parent[O.type])Fe=this.parent[O.type](O.sourceMapId,Ke,Se);else if(this.parent.getWorkerSource){var ct=O.type.split(".");Fe=this.parent.getWorkerSource(O.sourceMapId,ct[0],Ke.source)[ct[1]](Ke,Se)}else Se(new Error("Could not find function "+O.type));!he&&Fe&&Fe.cancel&&(this.cancelCallbacks[M]=Fe.cancel)}},Ol.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var eo=function(M,O){M&&(O?this.setSouthWest(M).setNorthEast(O):M.length===4?this.setSouthWest([M[0],M[1]]).setNorthEast([M[2],M[3]]):this.setSouthWest(M[0]).setNorthEast(M[1]))};eo.prototype.setNorthEast=function(M){return this._ne=M instanceof _i?new _i(M.lng,M.lat):_i.convert(M),this},eo.prototype.setSouthWest=function(M){return this._sw=M instanceof _i?new _i(M.lng,M.lat):_i.convert(M),this},eo.prototype.extend=function(M){var O,Y,ae=this._sw,he=this._ne;if(M instanceof _i)O=M,Y=M;else{if(!(M instanceof eo)){if(Array.isArray(M)){if(M.length===4||M.every(Array.isArray)){var ve=M;return this.extend(eo.convert(ve))}var Se=M;return this.extend(_i.convert(Se))}return this}if(O=M._sw,Y=M._ne,!O||!Y)return this}return ae||he?(ae.lng=Math.min(O.lng,ae.lng),ae.lat=Math.min(O.lat,ae.lat),he.lng=Math.max(Y.lng,he.lng),he.lat=Math.max(Y.lat,he.lat)):(this._sw=new _i(O.lng,O.lat),this._ne=new _i(Y.lng,Y.lat)),this},eo.prototype.getCenter=function(){return new _i((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},eo.prototype.getSouthWest=function(){return this._sw},eo.prototype.getNorthEast=function(){return this._ne},eo.prototype.getNorthWest=function(){return new _i(this.getWest(),this.getNorth())},eo.prototype.getSouthEast=function(){return new _i(this.getEast(),this.getSouth())},eo.prototype.getWest=function(){return this._sw.lng},eo.prototype.getSouth=function(){return this._sw.lat},eo.prototype.getEast=function(){return this._ne.lng},eo.prototype.getNorth=function(){return this._ne.lat},eo.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},eo.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},eo.prototype.isEmpty=function(){return!(this._sw&&this._ne)},eo.prototype.contains=function(M){var O=_i.convert(M),Y=O.lng,ae=O.lat,he=this._sw.lat<=ae&&ae<=this._ne.lat,ve=this._sw.lng<=Y&&Y<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ve=this._sw.lng>=Y&&Y>=this._ne.lng),he&&ve},eo.convert=function(M){return!M||M instanceof eo?M:new eo(M)};var _i=function(M,O){if(isNaN(M)||isNaN(O))throw new Error("Invalid LngLat object: ("+M+", "+O+")");if(this.lng=+M,this.lat=+O,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};_i.prototype.wrap=function(){return new _i(f(this.lng,-180,180),this.lat)},_i.prototype.toArray=function(){return[this.lng,this.lat]},_i.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},_i.prototype.distanceTo=function(M){var O=Math.PI/180,Y=this.lat*O,ae=M.lat*O,he=Math.sin(Y)*Math.sin(ae)+Math.cos(Y)*Math.cos(ae)*Math.cos((M.lng-this.lng)*O);return 63710088e-1*Math.acos(Math.min(he,1))},_i.prototype.toBounds=function(M){M===void 0&&(M=0);var O=360*M/40075017,Y=O/Math.cos(Math.PI/180*this.lat);return new eo(new _i(this.lng-Y,this.lat-O),new _i(this.lng+Y,this.lat+O))},_i.convert=function(M){if(M instanceof _i)return M;if(Array.isArray(M)&&(M.length===2||M.length===3))return new _i(Number(M[0]),Number(M[1]));if(!Array.isArray(M)&&typeof M=="object"&&M!==null)return new _i(Number("lng"in M?M.lng:M.lon),Number(M.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Of=2*Math.PI*63710088e-1;function zf(M){return Of*Math.cos(M*Math.PI/180)}function Df(M){return(180+M)/360}function Rf(M){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M*Math.PI/360)))/360}function Ff(M,O){return M/zf(O)}function wu(M){var O=180-360*M;return 360/Math.PI*Math.atan(Math.exp(O*Math.PI/180))-90}var ml=function(M,O,Y){Y===void 0&&(Y=0),this.x=+M,this.y=+O,this.z=+Y};ml.fromLngLat=function(M,O){O===void 0&&(O=0);var Y=_i.convert(M);return new ml(Df(Y.lng),Rf(Y.lat),Ff(O,Y.lat))},ml.prototype.toLngLat=function(){return new _i(360*this.x-180,wu(this.y))},ml.prototype.toAltitude=function(){return M=this.z,O=this.y,M*zf(wu(O));var M,O},ml.prototype.meterInMercatorCoordinateUnits=function(){return 1/Of*(M=wu(this.y),1/Math.cos(M*Math.PI/180));var M};var vl=function(M,O,Y){this.z=M,this.x=O,this.y=Y,this.key=ic(0,M,M,O,Y)};vl.prototype.equals=function(M){return this.z===M.z&&this.x===M.x&&this.y===M.y},vl.prototype.url=function(M,O){var Y,ae,he,ve,Se,Fe=(Y=this.x,ae=this.y,he=this.z,ve=If(256*Y,256*(ae=Math.pow(2,he)-ae-1),he),Se=If(256*(Y+1),256*(ae+1),he),ve[0]+","+ve[1]+","+Se[0]+","+Se[1]),Ke=function(ct,gt,Bt){for(var Zt,qt="",rr=ct;rr>0;rr--)qt+=(gt&(Zt=1<<rr-1)?1:0)+(Bt&Zt?2:0);return qt}(this.z,this.x,this.y);return M[(this.x+this.y)%M.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(O==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",Ke).replace("{bbox-epsg-3857}",Fe)},vl.prototype.getTilePoint=function(M){var O=Math.pow(2,this.z);return new r(8192*(M.x*O-this.x),8192*(M.y*O-this.y))},vl.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Bf=function(M,O){this.wrap=M,this.canonical=O,this.key=ic(M,O.z,O.z,O.x,O.y)},to=function(M,O,Y,ae,he){this.overscaledZ=M,this.wrap=O,this.canonical=new vl(Y,+ae,+he),this.key=ic(O,M,Y,ae,he)};function ic(M,O,Y,ae,he){(M*=2)<0&&(M=-1*M-1);var ve=1<<Y;return(ve*ve*M+ve*he+ae).toString(36)+Y.toString(36)+O.toString(36)}to.prototype.equals=function(M){return this.overscaledZ===M.overscaledZ&&this.wrap===M.wrap&&this.canonical.equals(M.canonical)},to.prototype.scaledTo=function(M){var O=this.canonical.z-M;return M>this.canonical.z?new to(M,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new to(M,this.wrap,M,this.canonical.x>>O,this.canonical.y>>O)},to.prototype.calculateScaledKey=function(M,O){var Y=this.canonical.z-M;return M>this.canonical.z?ic(this.wrap*+O,M,this.canonical.z,this.canonical.x,this.canonical.y):ic(this.wrap*+O,M,M,this.canonical.x>>Y,this.canonical.y>>Y)},to.prototype.isChildOf=function(M){if(M.wrap!==this.wrap)return!1;var O=this.canonical.z-M.canonical.z;return M.overscaledZ===0||M.overscaledZ<this.overscaledZ&&M.canonical.x===this.canonical.x>>O&&M.canonical.y===this.canonical.y>>O},to.prototype.children=function(M){if(this.overscaledZ>=M)return[new to(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var O=this.canonical.z+1,Y=2*this.canonical.x,ae=2*this.canonical.y;
vendor: 8,678 bytes, line 94
94return[new to(O,this.wrap,O,Y,ae),new to(O,this.wrap,O,Y+1,ae),new to(O,this.wrap,O,Y,ae+1),new to(O,this.wrap,O,Y+1,ae+1)]},to.prototype.isLessThan=function(M){return this.wrap<M.wrap||!(this.wrap>M.wrap)&&(this.overscaledZ<M.overscaledZ||!(this.overscaledZ>M.overscaledZ)&&(this.canonical.x<M.canonical.x||!(this.canonical.x>M.canonical.x)&&this.canonical.y<M.canonical.y))},to.prototype.wrapped=function(){return new to(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},to.prototype.unwrapTo=function(M){return new to(this.overscaledZ,M,this.canonical.z,this.canonical.x,this.canonical.y)},to.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},to.prototype.toUnwrapped=function(){return new Bf(this.wrap,this.canonical)},to.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},to.prototype.getTilePoint=function(M){return this.canonical.getTilePoint(new ml(M.x-this.wrap,M.y))},Zr("CanonicalTileID",vl),Zr("OverscaledTileID",to,{omit:["posMatrix"]});var Ys=function(M,O,Y){if(this.uid=M,O.height!==O.width)throw new RangeError("DEM tiles must be square");if(Y&&Y!=="mapbox"&&Y!=="terrarium")return A('"'+Y+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=O.height;var ae=this.dim=O.height-2;this.data=new Uint32Array(O.data.buffer),this.encoding=Y||"mapbox";for(var he=0;he<ae;he++)this.data[this._idx(-1,he)]=this.data[this._idx(0,he)],this.data[this._idx(ae,he)]=this.data[this._idx(ae-1,he)],this.data[this._idx(he,-1)]=this.data[this._idx(he,0)],this.data[this._idx(he,ae)]=this.data[this._idx(he,ae-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(ae,-1)]=this.data[this._idx(ae-1,0)],this.data[this._idx(-1,ae)]=this.data[this._idx(0,ae-1)],this.data[this._idx(ae,ae)]=this.data[this._idx(ae-1,ae-1)]};Ys.prototype.get=function(M,O){var Y=new Uint8Array(this.data.buffer),ae=4*this._idx(M,O);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(Y[ae],Y[ae+1],Y[ae+2])},Ys.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Ys.prototype._idx=function(M,O){if(M<-1||M>=this.dim+1||O<-1||O>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(O+1)*this.stride+(M+1)},Ys.prototype._unpackMapbox=function(M,O,Y){return(256*M*256+256*O+Y)/10-1e4},Ys.prototype._unpackTerrarium=function(M,O,Y){return 256*M+O+Y/256-32768},Ys.prototype.getPixels=function(){return new Wo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Ys.prototype.backfillBorder=function(M,O,Y){if(this.dim!==M.dim)throw new Error("dem dimension mismatch");var ae=O*this.dim,he=O*this.dim+this.dim,ve=Y*this.dim,Se=Y*this.dim+this.dim;switch(O){case-1:ae=he-1;break;case 1:he=ae+1}switch(Y){case-1:ve=Se-1;break;case 1:Se=ve+1}for(var Fe=-O*this.dim,Ke=-Y*this.dim,ct=ve;ct<Se;ct++)for(var gt=ae;gt<he;gt++)this.data[this._idx(gt,ct)]=M.data[this._idx(gt+Fe,ct+Ke)]},Zr("DEMData",Ys);var Pc=function(M){this._stringToNumber={},this._numberToString=[];for(var O=0;O<M.length;O++){var Y=M[O];this._stringToNumber[Y]=O,this._numberToString[O]=Y}};Pc.prototype.encode=function(M){return this._stringToNumber[M]},Pc.prototype.decode=function(M){return this._numberToString[M]};var Ic=function(M,O,Y,ae,he){this.type="Feature",this._vectorTileFeature=M,M._z=O,M._x=Y,M._y=ae,this.properties=M.properties,this.id=he},Tu={geometry:{configurable:!0}};Tu.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Tu.geometry.set=function(M){this._geometry=M},Ic.prototype.toJSON=function(){var M={geometry:this.geometry};for(var O in this)O!=="_geometry"&&O!=="_vectorTileFeature"&&(M[O]=this[O]);return M},Object.defineProperties(Ic.prototype,Tu);var zl=function(){this.state={},this.stateChanges={},this.deletedStates={}};zl.prototype.updateState=function(M,O,Y){var ae=String(O);if(this.stateChanges[M]=this.stateChanges[M]||{},this.stateChanges[M][ae]=this.stateChanges[M][ae]||{},s(this.stateChanges[M][ae],Y),this.deletedStates[M]===null)for(var he in this.deletedStates[M]={},this.state[M])he!==ae&&(this.deletedStates[M][he]=null);else if(this.deletedStates[M]&&this.deletedStates[M][ae]===null)for(var ve in this.deletedStates[M][ae]={},this.state[M][ae])Y[ve]||(this.deletedStates[M][ae][ve]=null);else for(var Se in Y)this.deletedStates[M]&&this.deletedStates[M][ae]&&this.deletedStates[M][ae][Se]===null&&delete this.deletedStates[M][ae][Se]},zl.prototype.removeFeatureState=function(M,O,Y){if(this.deletedStates[M]!==null){var ae=String(O);if(this.deletedStates[M]=this.deletedStates[M]||{},Y&&O!==void 0)this.deletedStates[M][ae]!==null&&(this.deletedStates[M][ae]=this.deletedStates[M][ae]||{},this.deletedStates[M][ae][Y]=null);else if(O!==void 0)if(this.stateChanges[M]&&this.stateChanges[M][ae])for(Y in this.deletedStates[M][ae]={},this.stateChanges[M][ae])this.deletedStates[M][ae][Y]=null;else this.deletedStates[M][ae]=null;else this.deletedStates[M]=null}},zl.prototype.getState=function(M,O){var Y=String(O),ae=this.state[M]||{},he=this.stateChanges[M]||{},ve=s({},ae[Y],he[Y]);if(this.deletedStates[M]===null)return{};if(this.deletedStates[M]){var Se=this.deletedStates[M][O];if(Se===null)return{};for(var Fe in Se)delete ve[Fe]}return ve},zl.prototype.initializeTileState=function(M,O){M.setFeatureState(this.state,O)},zl.prototype.coalesceChanges=function(M,O){var Y={};for(var ae in this.stateChanges){this.state[ae]=this.state[ae]||{};var he={};for(var ve in this.stateChanges[ae])this.state[ae][ve]||(this.state[ae][ve]={}),s(this.state[ae][ve],this.stateChanges[ae][ve]),he[ve]=this.state[ae][ve];Y[ae]=he}for(var Se in this.deletedStates){this.state[Se]=this.state[Se]||{};var Fe={};if(this.deletedStates[Se]===null)for(var Ke in this.state[Se])Fe[Ke]={},this.state[Se][Ke]={};else for(var ct in this.deletedStates[Se]){if(this.deletedStates[Se][ct]===null)this.state[Se][ct]={};else for(var gt=0,Bt=Object.keys(this.deletedStates[Se][ct]);gt<Bt.length;gt+=1){var Zt=Bt[gt];delete this.state[Se][ct][Zt]}Fe[ct]=this.state[Se][ct]}Y[Se]=Y[Se]||{},s(Y[Se],Fe)}if(this.stateChanges={},this.deletedStates={},Object.keys(Y).length!==0)for(var qt in M)M[qt].setFeatureState(Y,O)};var Ws=function(M,O){this.tileID=M,this.x=M.canonical.x,this.y=M.canonical.y,this.z=M.canonical.z,this.grid=new ln(8192,16,0),this.grid3D=new ln(8192,16,0),this.featureIndexArray=new wt,this.promoteId=O};function Nf(M,O,Y,ae,he){return _(M,function(ve,Se){var Fe=O instanceof $o?O.get(Se):null;return Fe&&Fe.evaluate?Fe.evaluate(Y,ae,he):Fe})}function jf(M){for(var O=1/0,Y=1/0,ae=-1/0,he=-1/0,ve=0,Se=M;ve<Se.length;ve+=1){var Fe=Se[ve];O=Math.min(O,Fe.x),Y=Math.min(Y,Fe.y),ae=Math.max(ae,Fe.x),he=Math.max(he,Fe.y)}return{minX:O,minY:Y,maxX:ae,maxY:he}}function Pp(M,O){return O-M}Ws.prototype.insert=function(M,O,Y,ae,he,ve){var Se=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Y,ae,he);for(var Fe=ve?this.grid3D:this.grid,Ke=0;Ke<O.length;Ke++){for(var ct=O[Ke],gt=[1/0,1/0,-1/0,-1/0],Bt=0;Bt<ct.length;Bt++){var Zt=ct[Bt];gt[0]=Math.min(gt[0],Zt.x),gt[1]=Math.min(gt[1],Zt.y),gt[2]=Math.max(gt[2],Zt.x),gt[3]=Math.max(gt[3],Zt.y)}gt[0]<8192&&gt[1]<8192&&gt[2]>=0&&gt[3]>=0&&Fe.insert(Se,gt[0],gt[1],gt[2],gt[3])}},Ws.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new kl.VectorTile(new bc(this.rawTileData)).layers,this.sourceLayerCoder=new Pc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Ws.prototype.query=function(M,O,Y,ae){var he=this;this.loadVTLayers();for(var ve=M.params||{},Se=8192/M.tileSize/M.scale,Fe=ba(ve.filter),Ke=M.queryGeometry,ct=M.queryPadding*Se,gt=jf(Ke),Bt=this.grid.query(gt.minX-ct,gt.minY-ct,gt.maxX+ct,gt.maxY+ct),Zt=jf(M.cameraQueryGeometry),qt=this.grid3D.query(Zt.minX-ct,Zt.minY-ct,Zt.maxX+ct,Zt.maxY+ct,function(fn,xn,Fn,Rn){return function(Hn,ta,ra,Wn,ca){for(var sa=0,na=Hn;sa<na.length;sa+=1){var Ga=na[sa];if(ta<=Ga.x&&ra<=Ga.y&&Wn>=Ga.x&&ca>=Ga.y)return!0}var Ra=[new r(ta,ra),new r(ta,ca),new r(Wn,ca),new r(Wn,ra)];if(Hn.length>2){for(var Xa=0,ya=Ra;Xa<ya.length;Xa+=1)if(ts(Hn,ya[Xa]))return!0}for(var Na=0;Na<Hn.length-1;Na++)if(fl(Hn[Na],Hn[Na+1],Ra))return!0;return!1}(M.cameraQueryGeometry,fn-ct,xn-ct,Fn+ct,Rn+ct)}),rr=0,gr=qt;rr<gr.length;rr+=1){var Er=gr[rr];Bt.push(Er)}Bt.sort(Pp);for(var Sr,Rr={},Br=function(fn){var xn=Bt[fn];if(xn!==Sr){Sr=xn;var Fn=he.featureIndexArray.get(xn),Rn=null;
94he.loadMatchingFeature(Rr,Fn.bucketIndex,Fn.sourceLayerIndex,Fn.featureIndex,Fe,ve.layers,ve.availableImages,O,Y,ae,function(Hn,ta,ra){return Rn||(Rn=ui(Hn)),ta.queryIntersectsFeature(Ke,Hn,ra,Rn,he.z,M.transform,Se,M.pixelPosMatrix)})}},Hr=0;Hr<Bt.length;Hr++)Br(Hr);return Rr},Ws.prototype.loadMatchingFeature=function(M,O,Y,ae,he,ve,Se,Fe,Ke,ct,gt){var Bt=this.bucketLayerIDs[O];if(!ve||function(Fn,Rn){for(var Hn=0;Hn<Fn.length;Hn++)if(Rn.indexOf(Fn[Hn])>=0)return!0;return!1}(ve,Bt)){var Zt=this.sourceLayerCoder.decode(Y),qt=this.vtLayers[Zt].feature(ae);if(he.filter(new Ka(this.tileID.overscaledZ),qt))for(var rr=this.getId(qt,Zt),gr=0;gr<Bt.length;gr++){var Er=Bt[gr];if(!(ve&&ve.indexOf(Er)<0)){var Sr=Fe[Er];if(Sr){var Rr={};rr!==void 0&&ct&&(Rr=ct.getState(Sr.sourceLayer||"_geojsonTileLayer",rr));var Br=Ke[Er];Br.paint=Nf(Br.paint,Sr.paint,qt,Rr,Se),Br.layout=Nf(Br.layout,Sr.layout,qt,Rr,Se);var Hr=!gt||gt(qt,Sr,Rr);if(Hr){var fn=new Ic(qt,this.z,this.x,this.y,rr);fn.layer=Br;var xn=M[Er];xn===void 0&&(xn=M[Er]=[]),xn.push({featureIndex:ae,feature:fn,intersectionZ:Hr})}}}}}},Ws.prototype.lookupSymbolFeatures=function(M,O,Y,ae,he,ve,Se,Fe){var Ke={};this.loadVTLayers();for(var ct=ba(he),gt=0,Bt=M;gt<Bt.length;gt+=1){var Zt=Bt[gt];this.loadMatchingFeature(Ke,Y,ae,Zt,ct,ve,Se,Fe,O)}return Ke},Ws.prototype.hasLayer=function(M){for(var O=0,Y=this.bucketLayerIDs;O<Y.length;O+=1)for(var ae=0,he=Y[O];ae<he.length;ae+=1)if(M===he[ae])return!0;return!1},Ws.prototype.getId=function(M,O){var Y=M.id;if(this.promoteId){var ae=typeof this.promoteId=="string"?this.promoteId:this.promoteId[O];typeof(Y=M.properties[ae])=="boolean"&&(Y=Number(Y))}return Y},Zr("FeatureIndex",Ws,{omit:["rawTileData","sourceLayerCoder"]});var mo=function(M,O){this.tileID=M,this.uid=p(),this.uses=0,this.tileSize=O,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};mo.prototype.registerFadeDuration=function(M){var O=M+this.timeAdded;O<N.now()||this.fadeEndTime&&O<this.fadeEndTime||(this.fadeEndTime=O)},mo.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},mo.prototype.loadVectorData=function(M,O,Y){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",M){for(var ae in M.featureIndex&&(this.latestFeatureIndex=M.featureIndex,M.rawTileData?(this.latestRawTileData=M.rawTileData,this.latestFeatureIndex.rawTileData=M.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=M.collisionBoxArray,this.buckets=function(ct,gt){var Bt={};if(!gt)return Bt;for(var Zt=function(){var gr=rr[qt],Er=gr.layerIds.map(function(Hr){return gt.getLayer(Hr)}).filter(Boolean);if(Er.length!==0){gr.layers=Er,gr.stateDependentLayerIds&&(gr.stateDependentLayers=gr.stateDependentLayerIds.map(function(Hr){return Er.filter(function(fn){return fn.id===Hr})[0]}));for(var Sr=0,Rr=Er;Sr<Rr.length;Sr+=1){var Br=Rr[Sr];Bt[Br.id]=gr}}},qt=0,rr=ct;qt<rr.length;qt+=1)Zt();return Bt}(M.buckets,O.style),this.hasSymbolBuckets=!1,this.buckets){var he=this.buckets[ae];if(he instanceof ni){if(this.hasSymbolBuckets=!0,!Y)break;he.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var ve in this.buckets){var Se=this.buckets[ve];if(Se instanceof ni&&Se.hasRTLText){this.hasRTLText=!0,io.isLoading()||io.isLoaded()||Ni()!=="deferred"||Ja();break}}for(var Fe in this.queryPadding=0,this.buckets){var Ke=this.buckets[Fe];this.queryPadding=Math.max(this.queryPadding,O.style.getLayer(Fe).queryRadius(Ke))}M.imageAtlas&&(this.imageAtlas=M.imageAtlas),M.glyphAtlasImage&&(this.glyphAtlasImage=M.glyphAtlasImage)}else this.collisionBoxArray=new ye},mo.prototype.unloadVectorData=function(){for(var M in this.buckets)this.buckets[M].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},mo.prototype.getBucket=function(M){return this.buckets[M.id]},mo.prototype.upload=function(M){for(var O in this.buckets){var Y=this.buckets[O];Y.uploadPending()&&Y.upload(M)}var ae=M.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new dl(M,this.imageAtlas.image,ae.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new dl(M,this.glyphAtlasImage,ae.ALPHA),this.glyphAtlasImage=null)},mo.prototype.prepare=function(M){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(M,this.imageAtlasTexture)},mo.prototype.queryRenderedFeatures=function(M,O,Y,ae,he,ve,Se,Fe,Ke,ct){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ae,cameraQueryGeometry:he,scale:ve,tileSize:this.tileSize,pixelPosMatrix:ct,transform:Fe,params:Se,queryPadding:this.queryPadding*Ke},M,O,Y):{}},mo.prototype.querySourceFeatures=function(M,O){var Y=this.latestFeatureIndex;if(Y&&Y.rawTileData){var ae=Y.loadVTLayers(),he=O?O.sourceLayer:"",ve=ae._geojsonTileLayer||ae[he];if(ve)for(var Se=ba(O&&O.filter),Fe=this.tileID.canonical,Ke=Fe.z,ct=Fe.x,gt=Fe.y,Bt={z:Ke,x:ct,y:gt},Zt=0;Zt<ve.length;Zt++){var qt=ve.feature(Zt);
94if(Se.filter(new Ka(this.tileID.overscaledZ),qt)){var rr=Y.getId(qt,he),gr=new Ic(qt,Ke,ct,gt,rr);gr.tile=Bt,M.push(gr)}}}},mo.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},mo.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},mo.prototype.setExpiryData=function(M){var O=this.expirationTime;if(M.cacheControl){var Y=E(M.cacheControl);Y["max-age"]&&(this.expirationTime=Date.now()+1e3*Y["max-age"])}else M.expires&&(this.expirationTime=new Date(M.expires).getTime());if(this.expirationTime){var ae=Date.now(),he=!1;if(this.expirationTime>ae)he=!1;else if(O)if(this.expirationTime<O)he=!0;else{var ve=this.expirationTime-O;ve?this.expirationTime=ae+Math.max(ve,3e4):he=!0}else he=!0;he?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},mo.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},mo.prototype.setFeatureState=function(M,O){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&Object.keys(M).length!==0){var Y=this.latestFeatureIndex.loadVTLayers();for(var ae in this.buckets)if(O.style.hasLayer(ae)){var he=this.buckets[ae],ve=he.layers[0].sourceLayer||"_geojsonTileLayer",Se=Y[ve],Fe=M[ve];if(Se&&Fe&&Object.keys(Fe).length!==0){he.update(Fe,Se,this.imageAtlas&&this.imageAtlas.patternPositions||{});var Ke=O&&O.style&&O.style.getLayer(ae);Ke&&(this.queryPadding=Math.max(this.queryPadding,Ke.queryRadius(he)))}}}},mo.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},mo.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<N.now()},mo.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},mo.prototype.setHoldDuration=function(M){this.symbolFadeHoldUntil=N.now()+M},mo.prototype.setDependencies=function(M,O){for(var Y={},ae=0,he=O;ae<he.length;ae+=1)Y[he[ae]]=!0;this.dependencies[M]=Y},mo.prototype.hasDependency=function(M,O){for(var Y=0,ae=M;Y<ae.length;Y+=1){var he=ae[Y],ve=this.dependencies[he];if(ve){for(var Se=0,Fe=O;Se<Fe.length;Se+=1)if(ve[Fe[Se]])return!0}}return!1};var rl=self.performance,Uf=function(M){this._marks={start:[M.url,"start"].join("#"),end:[M.url,"end"].join("#"),measure:M.url.toString()},rl.mark(this._marks.start)};Uf.prototype.finish=function(){rl.mark(this._marks.end);var M=rl.getEntriesByName(this._marks.measure);return M.length===0&&(rl.measure(this._marks.measure,this._marks.start,this._marks.end),M=rl.getEntriesByName(this._marks.measure),rl.clearMarks(this._marks.start),rl.clearMarks(this._marks.end),rl.clearMeasures(this._marks.measure)),M},e.Actor=Ol,e.AlphaImage=pl,e.CanonicalTileID=vl,e.CollisionBoxArray=ye,e.Color=ar,e.DEMData=Ys,e.DataConstantProperty=ia,e.DictionaryCoder=Pc,e.EXTENT=8192,e.ErrorEvent=Le,e.EvaluationParameters=Ka,e.Event=ke,e.Evented=Ie,e.FeatureIndex=Ws,e.FillBucket=Ss,e.FillExtrusionBucket=Es,e.ImageAtlas=nc,e.ImagePosition=wc,e.LineBucket=Zo,e.LngLat=_i,e.LngLatBounds=eo,e.MercatorCoordinate=ml,e.ONE_EM=24,e.OverscaledTileID=to,e.Point=r,e.Point$1=r,e.Properties=Ao,e.Protobuf=bc,e.RGBAImage=Wo,e.RequestManager=ne,e.RequestPerformance=Uf,e.ResourceType=vt,e.SegmentVector=Ft,e.SourceFeatureState=zl,e.StructArrayLayout1ui2=G,e.StructArrayLayout2f1f2i16=Qs,e.StructArrayLayout2i4=is,e.StructArrayLayout3ui6=Qi,e.StructArrayLayout4i8=Mi,e.SymbolBucket=ni,e.Texture=dl,e.Tile=mo,e.Transitionable=Qo,e.Uniform1f=jr,e.Uniform1i=oa,e.Uniform2f=Mn,e.Uniform3f=Yn,e.Uniform4f=Vn,e.UniformColor=Qn,e.UniformMatrix4f=wa,e.UnwrappedTileID=Bf,e.ValidationError=Je,e.WritingMode=ss,e.ZoomHistory=Ma,e.add=function(M,O,Y){return M[0]=O[0]+Y[0],M[1]=O[1]+Y[1],M[2]=O[2]+Y[2],M},e.addDynamicAttributes=xu,e.asyncAll=function(M,O,Y){if(!M.length)return Y(null,[]);var ae=M.length,he=new Array(M.length),ve=null;M.forEach(function(Se,Fe){O(Se,function(Ke,ct){Ke&&(ve=Ke),he[Fe]=ct,--ae==0&&Y(ve,he)})})},e.bezier=c,e.bindAll=l,e.browser=N,e.cacheEntryPossiblyAdded=function(M){++tt>Ve&&(M.getActor().send("enforceCacheSizeLimit",De),tt=0)}
vendor: 4,707 bytes, line 94
94,e.clamp=u,e.clearTileCache=function(M){var O=self.caches.delete("mapbox-tiles");M&&O.catch(M).then(function(){return M()})},e.clipLine=wf,e.clone=function(M){var O=new Yo(16);return O[0]=M[0],O[1]=M[1],O[2]=M[2],O[3]=M[3],O[4]=M[4],O[5]=M[5],O[6]=M[6],O[7]=M[7],O[8]=M[8],O[9]=M[9],O[10]=M[10],O[11]=M[11],O[12]=M[12],O[13]=M[13],O[14]=M[14],O[15]=M[15],O},e.clone$1=k,e.clone$2=function(M){var O=new Yo(3);return O[0]=M[0],O[1]=M[1],O[2]=M[2],O},e.collisionCircleLayout=Kh,e.config=U,e.create=function(){var M=new Yo(16);return Yo!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=0,M[12]=0,M[13]=0,M[14]=0),M[0]=1,M[5]=1,M[10]=1,M[15]=1,M},e.create$1=function(){var M=new Yo(9);return Yo!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[5]=0,M[6]=0,M[7]=0),M[0]=1,M[4]=1,M[8]=1,M},e.create$2=function(){var M=new Yo(4);return Yo!=Float32Array&&(M[1]=0,M[2]=0),M[0]=1,M[3]=1,M},e.createCommonjsModule=n,e.createExpression=Wt,e.createLayout=Qa,e.createStyleLayer=function(M){return M.type==="custom"?new Lp(M):new Cp[M.type](M)},e.cross=function(M,O,Y){var ae=O[0],he=O[1],ve=O[2],Se=Y[0],Fe=Y[1],Ke=Y[2];return M[0]=he*Ke-ve*Fe,M[1]=ve*Se-ae*Ke,M[2]=ae*Fe-he*Se,M},e.deepEqual=function M(O,Y){if(Array.isArray(O)){if(!Array.isArray(Y)||O.length!==Y.length)return!1;for(var ae=0;ae<O.length;ae++)if(!M(O[ae],Y[ae]))return!1;return!0}if(typeof O=="object"&&O!==null&&Y!==null){if(typeof Y!="object"||Object.keys(O).length!==Object.keys(Y).length)return!1;for(var he in O)if(!M(O[he],Y[he]))return!1;return!0}return O===Y},e.dot=function(M,O){return M[0]*O[0]+M[1]*O[1]+M[2]*O[2]},e.dot$1=function(M,O){return M[0]*O[0]+M[1]*O[1]+M[2]*O[2]+M[3]*O[3]},e.ease=i,e.emitValidationErrors=Tn,e.endsWith=w,e.enforceCacheSizeLimit=function(M){Qe(),Ee&&Ee.then(function(O){O.keys().then(function(Y){for(var ae=0;ae<Y.length-M;ae++)O.delete(Y[ae])})})},e.evaluateSizeForFeature=mf,e.evaluateSizeForZoom=vf,e.evaluateVariableOffset=Mf,e.evented=yi,e.extend=s,e.featureFilter=ba,e.filterObject=T,e.fromRotation=function(M,O){var Y=Math.sin(O),ae=Math.cos(O);return M[0]=ae,M[1]=Y,M[2]=0,M[3]=-Y,M[4]=ae,M[5]=0,M[6]=0,M[7]=0,M[8]=1,M},e.getAnchorAlignment=gu,e.getAnchorJustification=yu,e.getArrayBuffer=Tt,e.getImage=qe,e.getJSON=function(M,O){return et(s(M,{type:"json"}),O)},e.getRTLTextPluginStatus=Ni,e.getReferrer=St,e.getVideo=function(M,O){var Y,ae,he=self.document.createElement("video");he.muted=!0,he.onloadstart=function(){O(null,he)};for(var ve=0;ve<M.length;ve++){var Se=self.document.createElement("source");Y=M[ve],ae=void 0,(ae=self.document.createElement("a")).href=Y,(ae.protocol!==self.document.location.protocol||ae.host!==self.document.location.host)&&(he.crossOrigin="Anonymous"),Se.src=M[ve],he.appendChild(Se)}return{cancel:function(){}}},e.identity=Wl,e.invert=function(M,O){var Y=O[0],ae=O[1],he=O[2],ve=O[3],Se=O[4],Fe=O[5],Ke=O[6],ct=O[7],gt=O[8],Bt=O[9],Zt=O[10],qt=O[11],rr=O[12],gr=O[13],Er=O[14],Sr=O[15],Rr=Y*Fe-ae*Se,Br=Y*Ke-he*Se,Hr=Y*ct-ve*Se,fn=ae*Ke-he*Fe,xn=ae*ct-ve*Fe,Fn=he*ct-ve*Ke,Rn=gt*gr-Bt*rr,Hn=gt*Er-Zt*rr,ta=gt*Sr-qt*rr,ra=Bt*Er-Zt*gr,Wn=Bt*Sr-qt*gr,ca=Zt*Sr-qt*Er,sa=Rr*ca-Br*Wn+Hr*ra+fn*ta-xn*Hn+Fn*Rn;return sa?(sa=1/sa,M[0]=(Fe*ca-Ke*Wn+ct*ra)*sa,M[1]=(he*Wn-ae*ca-ve*ra)*sa,M[2]=(gr*Fn-Er*xn+Sr*fn)*sa,M[3]=(Zt*xn-Bt*Fn-qt*fn)*sa,M[4]=(Ke*ta-Se*ca-ct*Hn)*sa,M[5]=(Y*ca-he*ta+ve*Hn)*sa,M[6]=(Er*Hr-rr*Fn-Sr*Br)*sa,M[7]=(gt*Fn-Zt*Hr+qt*Br)*sa,M[8]=(Se*Wn-Fe*ta+ct*Rn)*sa,M[9]=(ae*ta-Y*Wn-ve*Rn)*sa,M[10]=(rr*xn-gr*Hr+Sr*Rr)*sa,M[11]=(Bt*Hr-gt*xn-qt*Rr)*sa,M[12]=(Fe*Hn-Se*ra-Ke*Rn)*sa,M[13]=(Y*ra-ae*Hn+he*Rn)*sa,M[14]=(gr*Br-rr*fn-Er*Rr)*sa,M[15]=(gt*fn-Bt*Br+Zt*Rr)*sa,M):null},e.isChar=Sn,e.isMapboxURL=se,e.keysDifference=function(M,O){var Y=[];for(var ae in M)ae in O||Y.push(ae);return Y},e.makeRequest=et,e.mapObject=_,e.mercatorXfromLng=Df,e.mercatorYfromLat=Rf,e.mercatorZfromAltitude=Ff,e.mul=tu,e.multiply=hl,e.mvt=kl,e.normalize=function(M,O){var Y=O[0],ae=O[1],he=O[2],ve=Y*Y+ae*ae+he*he;return ve>0&&(ve=1/Math.sqrt(ve)),M[0]=O[0]*ve,M[1]=O[1]*ve,M[2]=O[2]*ve,M},e.number=qn,e.offscreenCanvasSupported=lt,e.ortho=function(M,O,Y,ae,he,ve,Se){var Fe=1/(O-Y),Ke=1/(ae-he),ct=1/(ve-Se);return M[0]=-2*Fe,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*Ke,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=2*ct,M[11]=0,M[12]=(O+Y)*Fe,M[13]=(he+ae)*Ke,M[14]=(Se+ve)*ct,M[15]=1,M},e.parseGlyphPBF=function(M){return new bc(M).readFields(lp,[])},e.pbf=bc,e.performSymbolLayout=function(M,O,Y,ae,he,ve,Se){M.createArrays();var Fe=512*M.overscaling;M.tilePixelRatio=8192/Fe,M.compareText={},M.iconsNeedLinear=!1;var Ke=M.layers[0].layout,ct=M.layers[0]._unevaluatedLayout._values,gt={};if(M.textSizeData.kind==="composite"){var Bt=M.textSizeData,Zt=Bt.minZoom,qt=Bt.maxZoom;
94gt.compositeTextSizes=[ct["text-size"].possiblyEvaluate(new Ka(Zt),Se),ct["text-size"].possiblyEvaluate(new Ka(qt),Se)]}if(M.iconSizeData.kind==="composite"){var rr=M.iconSizeData,gr=rr.minZoom,Er=rr.maxZoom;gt.compositeIconSizes=[ct["icon-size"].possiblyEvaluate(new Ka(gr),Se),ct["icon-size"].possiblyEvaluate(new Ka(Er),Se)]}gt.layoutTextSize=ct["text-size"].possiblyEvaluate(new Ka(M.zoom+1),Se),gt.layoutIconSize=ct["icon-size"].possiblyEvaluate(new Ka(M.zoom+1),Se),gt.textMaxSize=ct["text-size"].possiblyEvaluate(new Ka(18));for(var Sr=24*Ke.get("text-line-height"),Rr=Ke.get("text-rotation-alignment")==="map"&&Ke.get("symbol-placement")!=="point",Br=Ke.get("text-keep-upright"),Hr=Ke.get("text-size"),fn=function(){var Rn=Fn[xn],Hn=Ke.get("text-font").evaluate(Rn,{},Se).join(","),ta=Hr.evaluate(Rn,{},Se),ra=gt.layoutTextSize.evaluate(Rn,{},Se),Wn=gt.layoutIconSize.evaluate(Rn,{},Se),ca={horizontal:{},vertical:void 0},sa=Rn.text,na=[0,0];if(sa){var Ga=sa.toString(),Ra=24*Ke.get("text-letter-spacing").evaluate(Rn,{},Se),Xa=function(Pa){for(var Wa=0,Di=Pa;Wa<Di.length;Wa+=1)if(!Ta(Di[Wa].charCodeAt(0)))return!1;return!0}(Ga)?Ra:0,ya=Ke.get("text-anchor").evaluate(Rn,{},Se),Na=Ke.get("text-variable-anchor");if(!Na){var hi=Ke.get("text-radial-offset").evaluate(Rn,{},Se);na=hi?Mf(ya,[24*hi,vu]):Ke.get("text-offset").evaluate(Rn,{},Se).map(function(Pa){return 24*Pa})}var oi=Rr?"center":Ke.get("text-justify").evaluate(Rn,{},Se),wi=Ke.get("symbol-placement"),si=wi==="point"?24*Ke.get("text-max-width").evaluate(Rn,{},Se):0,ro=function(){M.allowVerticalPlacement&&La(Ga)&&(ca.vertical=Tc(sa,O,Y,he,Hn,si,Sr,ya,"left",Xa,na,ss.vertical,!0,wi,ra,ta))};if(!Rr&&Na){for(var Ti=oi==="auto"?Na.map(function(Pa){return yu(Pa)}):[oi],Lo=!1,vo=0;vo<Ti.length;vo++){var bo=Ti[vo];if(!ca.horizontal[bo])if(Lo)ca.horizontal[bo]=ca.horizontal[0];else{var Vo=Tc(sa,O,Y,he,Hn,si,Sr,"center",bo,Xa,na,ss.horizontal,!1,wi,ra,ta);Vo&&(ca.horizontal[bo]=Vo,Lo=Vo.positionedLines.length===1)}}ro()}else{oi==="auto"&&(oi=yu(ya));var Oo=Tc(sa,O,Y,he,Hn,si,Sr,ya,oi,Xa,na,ss.horizontal,!1,wi,ra,ta);Oo&&(ca.horizontal[oi]=Oo),ro(),La(Ga)&&Rr&&Br&&(ca.vertical=Tc(sa,O,Y,he,Hn,si,Sr,ya,oi,Xa,na,ss.vertical,!1,wi,ra,ta))}}var no=void 0,_o=!1;if(Rn.icon&&Rn.icon.name){var qi=ae[Rn.icon.name];qi&&(no=function(Pa,Wa,Di){var Ri=gu(Di),Pi=Ri.horizontalAlign,ki=Ri.verticalAlign,$a=Wa[0],Fi=Wa[1],Ho=$a-Pa.displaySize[0]*Pi,ns=Ho+Pa.displaySize[0],zo=Fi-Pa.displaySize[1]*ki;return{image:Pa,top:zo,bottom:zo+Pa.displaySize[1],left:Ho,right:ns}}(he[Rn.icon.name],Ke.get("icon-offset").evaluate(Rn,{},Se),Ke.get("icon-anchor").evaluate(Rn,{},Se)),_o=qi.sdf,M.sdfIcons===void 0?M.sdfIcons=qi.sdf:M.sdfIcons!==qi.sdf&&A("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(qi.pixelRatio!==M.pixelRatio||Ke.get("icon-rotate").constantOr(1)!==0)&&(M.iconsNeedLinear=!0))}var oo=Sf(ca.horizontal)||ca.vertical;M.iconsInText=!!oo&&oo.iconsInText,(oo||no)&&function(Pa,Wa,Di,Ri,Pi,ki,$a,Fi,Ho,ns,zo){var Ls=ki.textMaxSize.evaluate(Wa,{});Ls===void 0&&(Ls=$a);var Zs,yo=Pa.layers[0].layout,Cs=yo.get("icon-offset").evaluate(Wa,{},zo),Ps=Sf(Di.horizontal),Is=$a/24,ku=Pa.tilePixelRatio*Is,Dl=Pa.tilePixelRatio*Ls/24,Oc=Pa.tilePixelRatio*Fi,yl=Pa.tilePixelRatio*yo.get("symbol-spacing"),zc=yo.get("text-padding")*Pa.tilePixelRatio,Dc=yo.get("icon-padding")*Pa.tilePixelRatio,Rc=yo.get("text-max-angle")/180*Math.PI,Fc=yo.get("text-rotation-alignment")==="map"&&yo.get("symbol-placement")!=="point",nl=yo.get("icon-rotation-alignment")==="map"&&yo.get("symbol-placement")!=="point",Rl=yo.get("symbol-placement"),Bc=yl/2,Fl=yo.get("icon-text-fit");Ri&&Fl!=="none"&&(Pa.allowVerticalPlacement&&Di.vertical&&(Zs=gf(Ri,Di.vertical,Fl,yo.get("icon-text-fit-padding"),Cs,Is)),Ps&&(Ri=gf(Ri,Ps,Fl,yo.get("icon-text-fit-padding"),Cs,Is)));var al=function(Op,fc){fc.x<0||fc.x>=8192||fc.y<0||fc.y>=8192||function(Ui,Os,zp,il,Lu,Gf,Yc,Ns,Wc,hc,Zc,Xc,Cu,Yf,pc,Wf,Zf,Xf,Jf,Kf,ls,Jc,Qf,js,Dp){var Pu,xl,Hl,ql,Gl,Yl=Ui.addToLineVertexArray(Os,zp),$f=0,eh=0,th=0,rh=0,Iu=-1,Ou=-1,Xs={},nh=kr(""),zu=0,Du=0;if(Ns._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Pu=Ns.layout.get("text-offset").evaluate(ls,{},js).map(function(gc){return 24*gc}),zu=Pu[0],Du=Pu[1]):(zu=24*Ns.layout.get("text-radial-offset").evaluate(ls,{},js),Du=vu),Ui.allowVerticalPlacement&&il.vertical){var ah=Ns.layout.get("text-rotate").evaluate(ls,{},js)+90,Rp=il.vertical;ql=new Ec(Wc,Os,hc,Zc,Xc,Rp,Cu,Yf,pc,ah),Yc&&(Gl=new Ec(Wc,Os,hc,Zc,Xc,Yc,Zf,Xf,pc,ah))}if(Lu){var Ru=Ns.layout.get("icon-rotate").evaluate(ls,{}),ih=Ns.layout.get("icon-text-fit")!=="none",oh=Tf(Lu,Ru,Qf,ih),Fu=Yc?Tf(Yc,Ru,Qf,ih):void 0;Hl=new Ec(Wc,Os,hc,Zc,Xc,Lu,Zf,Xf,!1,Ru),$f=4*oh.length;var sh=Ui.iconSizeData,dc=null;sh.kind==="source"?(dc=[128*Ns.layout.get("icon-size").evaluate(ls,{})])[0]>32640&&A(Ui.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):sh.kind==="composite"&&((dc=[128*Jc.compositeIconSizes[0].evaluate(ls,{},js),128*Jc.compositeIconSizes[1].evaluate(ls,{},js)])[0]>32640||dc[1]>32640)&&A(Ui.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Ui.addSymbols(Ui.icon,oh,dc,Kf,Jf,ls,!1,Os,Yl.lineStartIndex,Yl.lineLength,-1,js),Iu=Ui.icon.placedSymbolArray.length-1,Fu&&(eh=4*Fu.length,Ui.addSymbols(Ui.icon,Fu,dc,Kf,Jf,ls,ss.vertical,Os,Yl.lineStartIndex,Yl.lineLength,-1,js),Ou=Ui.icon.placedSymbolArray.length-1)}for(var lh in il.horizontal){var Kc=il.horizontal[lh];if(!xl){nh=kr(Kc.text);var Fp=Ns.layout.get("text-rotate").evaluate(ls,{},js);xl=new Ec(Wc,Os,hc,Zc,Xc,Kc,Cu,Yf,pc,Fp)}var ch=Kc.positionedLines.length===1;if(th+=Af(Ui,Os,Kc,Gf,Ns,pc,ls,Wf,Yl,il.vertical?ss.horizontal:ss.horizontalOnly,ch?Object.keys(il.horizontal):[lh],Xs,Iu,Jc,js),ch)break}il.vertical&&(rh+=Af(Ui,Os,il.vertical,Gf,Ns,pc,ls,Wf,Yl,ss.vertical,["vertical"],Xs,Ou,Jc,js));var Bp=xl?xl.boxStartIndex:Ui.collisionBoxArray.length,Np=xl?xl.boxEndIndex:Ui.collisionBoxArray.length,jp=ql?ql.boxStartIndex:Ui.collisionBoxArray.length,Up=ql?ql.boxEndIndex:Ui.collisionBoxArray.length,Vp=Hl?Hl.boxStartIndex:Ui.collisionBoxArray.length,Hp=Hl?Hl.boxEndIndex:Ui.collisionBoxArray.length,qp=Gl?Gl.boxStartIndex:Ui.collisionBoxArray.length,Gp=Gl?Gl.boxEndIndex:Ui.collisionBoxArray.length,Us=-1,Qc=function(gc,fh){return gc&&gc.circleDiameter?Math.max(gc.circleDiameter,fh):fh};Us=Qc(xl,Us),Us=Qc(ql,Us),Us=Qc(Hl,Us);var uh=(Us=Qc(Gl,Us))>-1?1:0;uh&&(Us*=Dp/24),Ui.glyphOffsetArray.length>=ni.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ls.sortKey!==void 0&&Ui.addToSortKey
vendor: 13,612 bytes, line 94
94Ranges(Ui.symbolInstances.length,ls.sortKey),Ui.symbolInstances.emplaceBack(Os.x,Os.y,Xs.right>=0?Xs.right:-1,Xs.center>=0?Xs.center:-1,Xs.left>=0?Xs.left:-1,Xs.vertical||-1,Iu,Ou,nh,Bp,Np,jp,Up,Vp,Hp,qp,Gp,hc,th,rh,$f,eh,uh,0,Cu,zu,Du,Us)}(Pa,fc,Op,Di,Ri,Pi,Zs,Pa.layers[0],Pa.collisionBoxArray,Wa.index,Wa.sourceLayerIndex,Pa.index,ku,zc,Fc,Ho,Oc,Dc,nl,Cs,Wa,ki,ns,zo,$a)};if(Rl==="line")for(var oc=0,Nc=wf(Wa.geometry,0,0,8192,8192);oc<Nc.length;oc+=1)for(var jc=Nc[oc],Uc=gp(jc,yl,Rc,Di.vertical||Ps,Ri,24,Dl,Pa.overscaling,8192),sc=0,Vc=Uc;sc<Vc.length;sc+=1){var lc=Vc[sc],Hc=Ps;Hc&&xp(Pa,Hc.text,Bc,lc)||al(jc,lc)}else if(Rl==="line-center")for(var cc=0,qc=Wa.geometry;cc<qc.length;cc+=1){var Bl=qc[cc];if(Bl.length>1){var Nl=dp(Bl,Rc,Di.vertical||Ps,Ri,24,Dl);Nl&&al(Bl,Nl)}}else if(Wa.type==="Polygon")for(var jl=0,Gc=cu(Wa.geometry,0);jl<Gc.length;jl+=1){var Ul=Gc[jl],uc=vp(Ul,16);al(Ul[0],new El(uc.x,uc.y,0))}else if(Wa.type==="LineString")for(var Vl=0,Vf=Wa.geometry;Vl<Vf.length;Vl+=1){var Mu=Vf[Vl];al(Mu,new El(Mu[0].x,Mu[0].y,0))}else if(Wa.type==="Point")for(var Au=0,Hf=Wa.geometry;Au<Hf.length;Au+=1)for(var Ip=Hf[Au],Su=0,qf=Ip;Su<qf.length;Su+=1){var Eu=qf[Su];al([Eu],new El(Eu.x,Eu.y,0))}}(M,Rn,ca,no,ae,gt,ra,Wn,na,_o,Se)},xn=0,Fn=M.features;xn<Fn.length;xn+=1)fn();ve&&M.generateCollisionDebugBuffers()},e.perspective=function(M,O,Y,ae,he){var ve,Se=1/Math.tan(O/2);return M[0]=Se/Y,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=Se,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=-1,M[12]=0,M[13]=0,M[15]=0,he!=null&&he!==1/0?(ve=1/(ae-he),M[10]=(he+ae)*ve,M[14]=2*he*ae*ve):(M[10]=-1,M[14]=-2*ae),M},e.pick=function(M,O){for(var Y={},ae=0;ae<O.length;ae++){var he=O[ae];he in M&&(Y[he]=M[he])}return Y},e.plugin=io,e.polygonIntersectsPolygon=Po,e.postMapLoadEvent=Pe,e.postTurnstileEvent=_e,e.potpack=ff,e.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],e.register=Zr,e.registerForPluginStateChange=function(M){return M({pluginStatus:da,pluginURL:ci}),yi.on("pluginStateChange",M),M},e.rotate=function(M,O,Y){var ae=O[0],he=O[1],ve=O[2],Se=O[3],Fe=Math.sin(Y),Ke=Math.cos(Y);return M[0]=ae*Ke+ve*Fe,M[1]=he*Ke+Se*Fe,M[2]=ae*-Fe+ve*Ke,M[3]=he*-Fe+Se*Ke,M},e.rotateX=function(M,O,Y){var ae=Math.sin(Y),he=Math.cos(Y),ve=O[4],Se=O[5],Fe=O[6],Ke=O[7],ct=O[8],gt=O[9],Bt=O[10],Zt=O[11];return O!==M&&(M[0]=O[0],M[1]=O[1],M[2]=O[2],M[3]=O[3],M[12]=O[12],M[13]=O[13],M[14]=O[14],M[15]=O[15]),M[4]=ve*he+ct*ae,M[5]=Se*he+gt*ae,M[6]=Fe*he+Bt*ae,M[7]=Ke*he+Zt*ae,M[8]=ct*he-ve*ae,M[9]=gt*he-Se*ae,M[10]=Bt*he-Fe*ae,M[11]=Zt*he-Ke*ae,M},e.rotateZ=function(M,O,Y){var ae=Math.sin(Y),he=Math.cos(Y),ve=O[0],Se=O[1],Fe=O[2],Ke=O[3],ct=O[4],gt=O[5],Bt=O[6],Zt=O[7];return O!==M&&(M[8]=O[8],M[9]=O[9],M[10]=O[10],M[11]=O[11],M[12]=O[12],M[13]=O[13],M[14]=O[14],M[15]=O[15]),M[0]=ve*he+ct*ae,M[1]=Se*he+gt*ae,M[2]=Fe*he+Bt*ae,M[3]=Ke*he+Zt*ae,M[4]=ct*he-ve*ae,M[5]=gt*he-Se*ae,M[6]=Bt*he-Fe*ae,M[7]=Zt*he-Ke*ae,M},e.scale=function(M,O,Y){var ae=Y[0],he=Y[1],ve=Y[2];return M[0]=O[0]*ae,M[1]=O[1]*ae,M[2]=O[2]*ae,M[3]=O[3]*ae,M[4]=O[4]*he,M[5]=O[5]*he,M[6]=O[6]*he,M[7]=O[7]*he,M[8]=O[8]*ve,M[9]=O[9]*ve,M[10]=O[10]*ve,M[11]=O[11]*ve,M[12]=O[12],M[13]=O[13],M[14]=O[14],M[15]=O[15],M},e.scale$1=function(M,O,Y){return M[0]=O[0]*Y,M[1]=O[1]*Y,M[2]=O[2]*Y,M[3]=O[3]*Y,M},e.scale$2=function(M,O,Y){return M[0]=O[0]*Y,M[1]=O[1]*Y,M[2]=O[2]*Y,M},e.setCacheLimits=function(M,O){De=M,Ve=O},e.setRTLTextPlugin=function(M,O,Y){if(Y===void 0&&(Y=!1),da===Va||da===zi||da===Go)throw new Error("setRTLTextPlugin cannot be called multiple times.");ci=N.resolveURL(M),da=Va,fo=O,Ha(),Y||Ja()},e.sphericalToCartesian=function(M){var O=M[0],Y=M[1],ae=M[2];return Y+=90,Y*=Math.PI/180,ae*=Math.PI/180,{x:O*Math.cos(Y)*Math.sin(ae),y:O*Math.sin(Y)*Math.sin(ae),z:O*Math.cos(ae)}},e.sqrLen=Zl,e.styleSpec=Ce,e.sub=ru,e.symbolSize=pp,e.transformMat3=function(M,O,Y){var ae=O[0],he=O[1],ve=O[2];return M[0]=ae*Y[0]+he*Y[3]+ve*Y[6],M[1]=ae*Y[1]+he*Y[4]+ve*Y[7],M[2]=ae*Y[2]+he*Y[5]+ve*Y[8],M},e.transformMat4=_l,e.translate=function(M,O,Y){var ae,he,ve,Se,Fe,Ke,ct,gt,Bt,Zt,qt,rr,gr=Y[0],Er=Y[1],Sr=Y[2];return O===M?(M[12]=O[0]*gr+O[4]*Er+O[8]*Sr+O[12],M[13]=O[1]*gr+O[5]*Er+O[9]*Sr+O[13],M[14]=O[2]*gr+O[6]*Er+O[10]*Sr+O[14],M[15]=O[3]*gr+O[7]*Er+O[11]*Sr+O[15]):(ae=O[0],he=O[1],ve=O[2],Se=O[3],Fe=O[4],Ke=O[5],ct=O[6],gt=O[7],Bt=O[8],Zt=O[9],qt=O[10],rr=O[11],M[0]=ae,M[1]=he,M[2]=ve,M[3]=Se,M[4]=Fe,M[5]=Ke,M[6]=ct,M[7]=gt,M[8]=Bt,M[9]=Zt,M[10]=qt,M[11]=rr,M[12]=ae*gr+Fe*Er+Bt*Sr+O[12],M[13]=he*gr+Ke*Er+Zt*Sr+O[13],M[14]=ve*gr+ct*Er+qt*Sr+O[14],M[15]=Se*gr+gt*Er+rr*Sr+O[15]),M},e.triggerPluginCompletionEvent=ho,e.uniqueId=p,e.validateCustomStyleLayer=function(M){var O=[],Y=M.id;return Y===void 0&&O.push({message:"layers."+Y+': missing required property "id"'}),M.render===void 0&&O.push({message:"layers."+Y+': missing required method "render"'}),M.renderingMode&&M.renderingMode!=="2d"&&M.renderingMode!=="3d"&&O.push({message:"layers."+Y+': property "renderingMode" must be either "2d" or "3d"'}),O},e.validateLight=sn,e.validateStyle=Yr,e.values=function(M){var O=[];for(var Y in M)O.push(M[Y]);return O},e.vectorTile=kl,e.version="1.10.1",e.warnOnce=A,e.webpSupported=Q,e.window=self,e.wrap=f}),v(0,function(e){function n(ke){var Le=typeof ke;if(Le==="number"||Le==="boolean"||Le==="string"||ke==null)return JSON.stringify(ke);if(Array.isArray(ke)){for(var Ie="[",Ce=0,Je=ke;Ce<Je.length;Ce+=1)Ie+=n(Je[Ce])+",";return Ie+"]"}for(var it=Object.keys(ke).sort(),ht="{",ut=0;ut<it.length;ut++)ht+=JSON.stringify(it[ut])+":"+n(ke[it[ut]])+",";return ht+"}"}function t(ke){for(var Le="",Ie=0,Ce=e.refProperties;Ie<Ce.length;Ie+=1)Le+="/"+n(ke[Ce[Ie]]);return Le}var o=function(ke){this.keyCache={},ke&&this.replace(ke)};o.prototype.replace=function(ke){this._layerConfigs={},this._layers={},this.update(ke,[])},o.prototype.update=function(ke,Le){for(var Ie=this,Ce=0,Je=ke;Ce<Je.length;Ce+=1){var it=Je[Ce];this._layerConfigs[it.id]=it;var ht=this._layers[it.id]=e.createStyleLayer(it);ht._featureFilter=e.featureFilter(ht.filter),this.keyCache[it.id]&&delete this.keyCache[it.id]}for(var ut=0,kt=Le;ut<kt.length;ut+=1){var ot=kt[ut];delete this.keyCache[ot],delete this._layerConfigs[ot],delete this._layers[ot]}this.familiesBySource={};for(var Lt=0,Et=function(st,yt){for(var Dt={},jt=0;jt<st.length;jt++){var or=yt&&yt[st[jt].id]||t(st[jt]);yt&&(yt[st[jt].id]=or);var Ut=Dt[or];Ut||(Ut=Dt[or]=[]),Ut.push(st[jt])}var Xt=[];for(var sr in Dt)Xt.push(Dt[sr]);return Xt}(e.values(this._layerConfigs),this.keyCache);Lt<Et.length;Lt+=1){var Ze=Et[Lt].map(function(st){return Ie._layers[st.id]}),pt=Ze[0];if(pt.visibility!=="none"){var Ct=pt.source||"",zt=this.familiesBySource[Ct];zt||(zt=this.familiesBySource[Ct]={});var Gt=pt.sourceLayer||"_geojsonTileLayer",ze=zt[Gt];ze||(ze=zt[Gt]=[]),ze.push(Ze)}}};var r=function(ke){var Le={},Ie=[];for(var Ce in ke){var Je=ke[Ce],it=Le[Ce]={};for(var ht in Je){var ut=Je[+ht];if(ut&&ut.bitmap.width!==0&&ut.bitmap.height!==0){var kt={x:0,y:0,w:ut.bitmap.width+2,h:ut.bitmap.height+2};Ie.push(kt),it[ht]={rect:kt,metrics:ut.metrics}}}}var ot=e.potpack(Ie),Lt=ot.w,Et=ot.h,Ze=new e.AlphaImage({width:Lt||1,height:Et||1});for(var pt in ke){var Ct=ke[pt];for(var zt in Ct){var Gt=Ct[+zt];if(Gt&&Gt.bitmap.width!==0&&Gt.bitmap.height!==0){var ze=Le[pt][zt].rect;e.AlphaImage.copy(Gt.bitmap,Ze,{x:0,y:0},{x:ze.x+1,y:ze.y+1},Gt.bitmap)}}}this.image=Ze,this.positions=Le};e.register("GlyphAtlas",r);var d=function(ke){this.tileID=new e.OverscaledTileID(ke.tileID.overscaledZ,ke.tileID.wrap,ke.tileID.canonical.z,ke.tileID.canonical.x,ke.tileID.canonical.y),this.uid=ke.uid,this.zoom=ke.zoom,this.pixelRatio=ke.pixelRatio,this.tileSize=ke.tileSize,this.source=ke.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=ke.showCollisionBoxes,this.collectResourceTiming=!!ke.collectResourceTiming,this.returnDependencies=!!ke.returnDependencies,this.promoteId=ke.promoteId};function c(ke,Le,Ie){for(var Ce=new e.EvaluationParameters(Le),Je=0,it=ke;Je<it.length;Je+=1)it[Je].recalculate(Ce,Ie)}function i(ke,Le){var Ie=e.getArrayBuffer(ke.request,function(Ce,Je,it,ht){Ce?Le(Ce):Je&&Le(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(Je)),rawData:Je,cacheControl:it,expires:ht})});return function(){Ie.cancel(),Le()}}d.prototype.parse=function(ke,Le,Ie,Ce,Je){var it=this;this.status="parsing",this.data=ke,this.collisionBoxArray=new e.CollisionBoxArray;var ht=new e.DictionaryCoder(Object.keys(ke.layers).sort()),ut=new e.FeatureIndex(this.tileID,this.promoteId);ut.bucketLayerIDs=[];var kt,ot,Lt,Et,Ze={},pt={featureIndex:ut,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ie},Ct=Le.familiesBySource[this.source];for(var zt in Ct){var Gt=ke.layers[zt];if(Gt){Gt.version===1&&e.warnOnce('Vector tile source "'+this.source+'" layer "'+zt+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var ze=ht.encode(zt),st=[],yt=0;yt<Gt.length;yt++){var Dt=Gt.feature(yt),jt=ut.getId(Dt,zt);st.push({feature:Dt,id:jt,index:yt,sourceLayerIndex:ze})}for(var or=0,Ut=Ct[zt];or<Ut.length;or+=1){var Xt=Ut[or],sr=Xt[0];sr.minzoom&&this.zoom<Math.floor(sr.minzoom)||sr.maxzoom&&this.zoom>=sr.maxzoom||sr.visibility!=="none"&&(c(Xt,this.zoom,Ie),(Ze[sr.id]=sr.createBucket({index:ut.bucketLayerIDs.length,layers:Xt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ze,sourceID:this.source})).populate(st,pt,this.tileID.canonical),ut.bucketLayerIDs.push(Xt.map(function(hr){return hr.id})))}}}var vr=e.mapObject(pt.glyphDependencies,function(hr){return Object.keys(hr).map(Number)});Object.keys(vr).length?Ce.send("getGlyphs",{uid:this.uid,stacks:vr},function(hr,Or){kt||(kt=hr,ot=Or,lr.call(it))}):ot={};var pr=Object.keys(pt.iconDependencies);pr.length?Ce.send("getImages",{icons:pr,source:this.source,tileID:this.tileID,type:"icons"},function(hr,Or){kt||(kt=hr,Lt=Or,lr.call(it))}):Lt={};var ar=Object.keys(pt.patternDependencies);function lr(){if(kt)return Je(kt);if(ot&&Lt&&Et){var hr=new r(ot),Or=new e.ImageAtlas(Lt,Et);for(var dr in Ze){var Fr=Ze[dr];Fr instanceof e.SymbolBucket?(c(Fr.layers,this.zoom,Ie),e.performSymbolLayout(Fr,ot,hr.positions,Lt,Or.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Fr.hasPattern&&(Fr instanceof e.LineBucket||Fr instanceof e.FillBucket||Fr instanceof e.FillExtrusionBucket)&&(c(Fr.layers,this.zoom,Ie),Fr.addFeatures(pt,this.tileID.canonical,Or.patternPositions))}this.status="done",Je(null,{buckets:e.values(Ze).filter(function(tn){return!tn.isEmpty()}),featureIndex:ut,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:hr.image,imageAtlas:Or,glyphMap:this.returnDependencies?ot:null,iconMap:this.returnDependencies?Lt:null,glyphPositions:this.returnDependencies?hr.positions:null})}}ar.length?Ce.send("getImages",{icons:ar,source:this.source,tileID:this.tileID,type:"patterns"},function(hr,Or){kt||(kt=hr,Et=Or,lr.call(it))}):Et={},lr.call(this)};var u=function(ke,Le,Ie,Ce){this.actor=ke,this.layerIndex=Le,this.availableImages=Ie,this.loadVectorData=Ce||i,this.loading={},this.loaded={}};u.prototype.loadTile=function(ke,Le){var Ie=this,Ce=ke.uid;this.loading||(this.loading={});var Je=!!(ke&&ke.request&&ke.request.collectResourceTiming)&&new e.RequestPerformance(ke.request),it=this.loading[Ce]=new d(ke);it.abort=this.loadVectorData(ke,function(ht,ut){if(delete Ie.loading[Ce],ht||!ut)return it.status="done",Ie.loaded[Ce]=it,Le(ht);var kt=ut.rawData,ot={};ut.expires&&(ot.expires=ut.expires),ut.cacheControl&&(ot.cacheControl=ut.cacheControl);var Lt={};if(Je){var Et=Je.finish();Et&&(Lt.resourceTiming=JSON.parse(JSON.stringify(Et)))}it.vectorTile=ut.vectorTile,it.parse(ut.vectorTile,Ie.layerIndex,Ie.availableImages,Ie.actor,function(Ze,pt){if(Ze||!pt)return Le(Ze);Le(null,e.extend({rawTileData:kt.slice(0)},pt,ot,Lt))}),Ie.loaded=Ie.loaded||{},Ie.loaded[Ce]=it})},u.prototype.reloadTile=function(ke,Le){var Ie=this,Ce=this.loaded,Je=ke.uid,it=this;if(Ce&&Ce[Je]){var ht=Ce[Je];ht.showCollisionBoxes=ke.showCollisionBoxes;var ut=function(kt,ot){var Lt=ht.reloadCallback;Lt&&(delete ht.reloadCallback,ht.parse(ht.vectorTile,it.layerIndex,Ie.availableImages,it.actor,Lt)),Le(kt,ot)};ht.status==="parsing"?ht.reloadCallback=ut:ht.status==="done"&&(ht.vectorTile?ht.parse(ht.vectorTile,this.layerIndex,this.availableImages,this.actor,ut):ut())}},u.prototype.abortTile=function(ke,Le){var Ie=this.loading,Ce=ke.uid;Ie&&Ie[Ce]&&Ie[Ce].abort&&(Ie[Ce].abort(),delete Ie[Ce]),Le()},u.prototype.removeTile=function(ke,Le){var Ie=this.loaded,Ce=ke.uid;Ie&&Ie[Ce]&&delete Ie[Ce],Le()};var f=e.window.ImageBitmap,s=function(){this.loaded={}};s.prototype.loadTile=function(ke,Le){var Ie=ke.uid,Ce=ke.encoding,Je=ke.rawImageData,it=f&&Je instanceof f?this.getImageData(Je):Je,ht=new e.DEMData(Ie,it,Ce);this.loaded=this.loaded||{},this.loaded[Ie]=ht,Le(null,ht)},s.prototype.getImageData=function(ke){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(ke.width,ke.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=ke.width,this.offscreenCanvas.height=ke.height,this.offscreenCanvasContext.drawImage(ke,0,0,ke.width,ke.height);var Le=this.offscreenCanvasContext.getImageData(-1,-1,ke.width+2,ke.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:Le.width,height:Le.height},Le.data)},s.prototype.removeTile=function(ke){var Le=this.loaded,Ie=ke.uid;Le&&Le[Ie]&&delete Le[Ie]};
94var h=function ke(Le,Ie){var Ce,Je=Le&&Le.type;if(Je==="FeatureCollection")for(Ce=0;Ce<Le.features.length;Ce++)ke(Le.features[Ce],Ie);else if(Je==="GeometryCollection")for(Ce=0;Ce<Le.geometries.length;Ce++)ke(Le.geometries[Ce],Ie);else if(Je==="Feature")ke(Le.geometry,Ie);else if(Je==="Polygon")p(Le.coordinates,Ie);else if(Je==="MultiPolygon")for(Ce=0;Ce<Le.coordinates.length;Ce++)p(Le.coordinates[Ce],Ie);return Le};function p(ke,Le){if(ke.length!==0){a(ke[0],Le);for(var Ie=1;Ie<ke.length;Ie++)a(ke[Ie],!Le)}}function a(ke,Le){for(var Ie=0,Ce=0,Je=ke.length,it=Je-1;Ce<Je;it=Ce++)Ie+=(ke[Ce][0]-ke[it][0])*(ke[it][1]+ke[Ce][1]);Ie>=0!=!!Le&&ke.reverse()}var x=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,l=function(ke){this._feature=ke,this.extent=e.EXTENT,this.type=ke.type,this.properties=ke.tags,"id"in ke&&!isNaN(ke.id)&&(this.id=parseInt(ke.id,10))};l.prototype.loadGeometry=function(){if(this._feature.type===1){for(var ke=[],Le=0,Ie=this._feature.geometry;Le<Ie.length;Le+=1){var Ce=Ie[Le];ke.push([new e.Point$1(Ce[0],Ce[1])])}return ke}for(var Je=[],it=0,ht=this._feature.geometry;it<ht.length;it+=1){for(var ut=[],kt=0,ot=ht[it];kt<ot.length;kt+=1){var Lt=ot[kt];ut.push(new e.Point$1(Lt[0],Lt[1]))}Je.push(ut)}return Je},l.prototype.toGeoJSON=function(ke,Le,Ie){return x.call(this,ke,Le,Ie)};var w=function(ke){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=ke.length,this._features=ke};w.prototype.feature=function(ke){return new l(this._features[ke])};var _=e.vectorTile.VectorTileFeature,T=k;function k(ke,Le){this.options=Le||{},this.features=ke,this.length=ke.length}function L(ke,Le){this.id=typeof ke.id=="number"?ke.id:void 0,this.type=ke.type,this.rawGeometry=ke.type===1?[ke.geometry]:ke.geometry,this.properties=ke.tags,this.extent=Le||4096}k.prototype.feature=function(ke){return new L(this.features[ke],this.options.extent)},L.prototype.loadGeometry=function(){var ke=this.rawGeometry;this.geometry=[];for(var Le=0;Le<ke.length;Le++){for(var Ie=ke[Le],Ce=[],Je=0;Je<Ie.length;Je++)Ce.push(new e.Point$1(Ie[Je][0],Ie[Je][1]));this.geometry.push(Ce)}return this.geometry},L.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var ke=this.geometry,Le=1/0,Ie=-1/0,Ce=1/0,Je=-1/0,it=0;it<ke.length;it++)for(var ht=ke[it],ut=0;ut<ht.length;ut++){var kt=ht[ut];Le=Math.min(Le,kt.x),Ie=Math.max(Ie,kt.x),Ce=Math.min(Ce,kt.y),Je=Math.max(Je,kt.y)}return[Le,Ce,Ie,Je]},L.prototype.toGeoJSON=_.prototype.toGeoJSON;var A=E,I=E,P=function(ke,Le){Le=Le||{};var Ie={};for(var Ce in ke)Ie[Ce]=new T(ke[Ce].features,Le),Ie[Ce].name=Ce,Ie[Ce].version=Le.version,Ie[Ce].extent=Le.extent;return E({layers:Ie})},S=T;function E(ke){var Le=new e.pbf;return function(Ie,Ce){for(var Je in Ie.layers)Ce.writeMessage(3,D,Ie.layers[Je])}(ke,Le),Le.finish()}function D(ke,Le){var Ie;Le.writeVarintField(15,ke.version||1),Le.writeStringField(1,ke.name||""),Le.writeVarintField(5,ke.extent||4096);var Ce={keys:[],values:[],keycache:{},valuecache:{}};for(Ie=0;Ie<ke.length;Ie++)Ce.feature=ke.feature(Ie),Le.writeMessage(2,F,Ce);var Je=Ce.keys;for(Ie=0;Ie<Je.length;Ie++)Le.writeStringField(3,Je[Ie]);var it=Ce.values;for(Ie=0;Ie<it.length;Ie++)Le.writeMessage(4,q,it[Ie])}function F(ke,Le){var Ie=ke.feature;Ie.id!==void 0&&Le.writeVarintField(1,Ie.id),Le.writeMessage(2,H,ke),Le.writeVarintField(3,Ie.type),Le.writeMessage(4,K,Ie)}function H(ke,Le){var Ie=ke.feature,Ce=ke.keys,Je=ke.values,it=ke.keycache,ht=ke.valuecache;for(var ut in Ie.properties){var kt=it[ut];kt===void 0&&(Ce.push(ut),kt=Ce.length-1,it[ut]=kt),Le.writeVarint(kt);var ot=Ie.properties[ut],Lt=typeof ot;Lt!=="string"&&Lt!=="boolean"&&Lt!=="number"&&(ot=JSON.stringify(ot));var Et=Lt+":"+ot,Ze=ht[Et];Ze===void 0&&(Je.push(ot),Ze=Je.length-1,ht[Et]=Ze),Le.writeVarint(Ze)}}function V(ke,Le){return(Le<<3)+(7&ke)}function Z(ke){return ke<<1^ke>>31}function K(ke,Le){for(var Ie=ke.loadGeometry(),Ce=ke.type,Je=0,it=0,ht=Ie.length,ut=0;ut<ht;ut++){var kt=Ie[ut],ot=1;Ce===1&&(ot=kt.length),Le.writeVarint(V(1,ot));for(var Lt=Ce===3?kt.length-1:kt.length,Et=0;Et<Lt;Et++){Et===1&&Ce!==1&&Le.writeVarint(V(2,Lt-1));var Ze=kt[Et].x-Je,pt=kt[Et].y-it;Le.writeVarint(Z(Ze)),Le.writeVarint(Z(pt)),Je+=Ze,it+=pt}Ce===3&&Le.writeVarint(V(7,1))}}function q(ke,Le){var Ie=typeof ke;Ie==="string"?Le.writeStringField(1,ke):Ie==="boolean"?Le.writeBooleanField(7,ke):Ie==="number"&&(ke%1!=0?Le.writeDoubleField(3,ke):ke<0?Le.writeSVarintField(6,ke):Le.writeVarintField(5,ke))}function W(ke,Le,Ie,Ce,Je,it){if(!(Je-Ce<=Ie)){var ht=Ce+Je>>1;(function ut(kt,ot,Lt,Et,Ze,pt){for(;Ze>Et;){if(Ze-Et>600){var Ct=Ze-Et+1,zt=Lt-Et+1,Gt=Math.log(Ct),ze=.5*Math.exp(2*Gt/3),st=.5*Math.sqrt(Gt*ze*(Ct-ze)/Ct)*(zt-Ct/2<0?-1:1),yt=Math.max(Et,Math.floor(Lt-zt*ze/Ct+st)),Dt=Math.min(Ze,Math.floor(Lt+(Ct-zt)*ze/Ct+st));ut(kt,ot,Lt,yt,Dt,pt)}var jt=ot[2*Lt+pt],or=Et,Ut=Ze;for($(kt,ot,Et,Lt),ot[2*Ze+pt]>jt&&$(kt,ot,Et,Ze);or<Ut;){for($(kt,ot,or,Ut),or++,Ut--;ot[2*or+pt]<jt;)or++;for(;ot[2*Ut+pt]>jt;)Ut--}ot[2*Et+pt]===jt?$(kt,ot,Et,Ut):(Ut++,$(kt,ot,Ut,Ze)),Ut<=Lt&&(Et=Ut+1),Lt<=Ut&&(Ze=Ut-1)}})(ke,Le,ht,Ce,Je,it%2),W(ke,Le,Ie,Ce,ht-1,it+1),W(ke,Le,Ie,ht+1,Je,it+1)}}function $(ke,Le,Ie,Ce){R(ke,Ie,Ce),R(Le,2*Ie,2*Ce),R(Le,2*Ie+1,2*Ce+1)}
vendor: 5,478 bytes, line 94
94function R(ke,Le,Ie){var Ce=ke[Le];ke[Le]=ke[Ie],ke[Ie]=Ce}function N(ke,Le,Ie,Ce){var Je=ke-Ie,it=Le-Ce;return Je*Je+it*it}A.fromVectorTileJs=I,A.fromGeojsonVt=P,A.GeoJSONWrapper=S;var U=function(ke){return ke[0]},Q=function(ke){return ke[1]},j=function(ke,Le,Ie,Ce,Je){Le===void 0&&(Le=U),Ie===void 0&&(Ie=Q),Ce===void 0&&(Ce=64),Je===void 0&&(Je=Float64Array),this.nodeSize=Ce,this.points=ke;for(var it=ke.length<65536?Uint16Array:Uint32Array,ht=this.ids=new it(ke.length),ut=this.coords=new Je(2*ke.length),kt=0;kt<ke.length;kt++)ht[kt]=kt,ut[2*kt]=Le(ke[kt]),ut[2*kt+1]=Ie(ke[kt]);W(ht,ut,Ce,0,ht.length-1,0)};j.prototype.range=function(ke,Le,Ie,Ce){return function(Je,it,ht,ut,kt,ot,Lt){for(var Et,Ze,pt=[0,Je.length-1,0],Ct=[];pt.length;){var zt=pt.pop(),Gt=pt.pop(),ze=pt.pop();if(Gt-ze<=Lt)for(var st=ze;st<=Gt;st++)Et=it[2*st],Ze=it[2*st+1],Et>=ht&&Et<=kt&&Ze>=ut&&Ze<=ot&&Ct.push(Je[st]);else{var yt=Math.floor((ze+Gt)/2);Et=it[2*yt],Ze=it[2*yt+1],Et>=ht&&Et<=kt&&Ze>=ut&&Ze<=ot&&Ct.push(Je[yt]);var Dt=(zt+1)%2;(zt===0?ht<=Et:ut<=Ze)&&(pt.push(ze),pt.push(yt-1),pt.push(Dt)),(zt===0?kt>=Et:ot>=Ze)&&(pt.push(yt+1),pt.push(Gt),pt.push(Dt))}}return Ct}(this.ids,this.coords,ke,Le,Ie,Ce,this.nodeSize)},j.prototype.within=function(ke,Le,Ie){return function(Ce,Je,it,ht,ut,kt){for(var ot=[0,Ce.length-1,0],Lt=[],Et=ut*ut;ot.length;){var Ze=ot.pop(),pt=ot.pop(),Ct=ot.pop();if(pt-Ct<=kt)for(var zt=Ct;zt<=pt;zt++)N(Je[2*zt],Je[2*zt+1],it,ht)<=Et&&Lt.push(Ce[zt]);else{var Gt=Math.floor((Ct+pt)/2),ze=Je[2*Gt],st=Je[2*Gt+1];N(ze,st,it,ht)<=Et&&Lt.push(Ce[Gt]);var yt=(Ze+1)%2;(Ze===0?it-ut<=ze:ht-ut<=st)&&(ot.push(Ct),ot.push(Gt-1),ot.push(yt)),(Ze===0?it+ut>=ze:ht+ut>=st)&&(ot.push(Gt+1),ot.push(pt),ot.push(yt))}}return Lt}(this.ids,this.coords,ke,Le,Ie,this.nodeSize)};var X={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(ke){return ke}},J=function(ke){this.options=de(Object.create(X),ke),this.trees=new Array(this.options.maxZoom+1)};function re(ke,Le,Ie,Ce,Je){return{x:ke,y:Le,zoom:1/0,id:Ie,parentId:-1,numPoints:Ce,properties:Je}}function ne(ke,Le){var Ie=ke.geometry.coordinates,Ce=Ie[0],Je=Ie[1];return{x:pe(Ce),y:ce(Je),zoom:1/0,index:Le,parentId:-1}}function se(ke){return{type:"Feature",id:ke.id,properties:oe(ke),geometry:{type:"Point",coordinates:[(Ce=ke.x,360*(Ce-.5)),(Le=ke.y,Ie=(180-360*Le)*Math.PI/180,360*Math.atan(Math.exp(Ie))/Math.PI-90)]}};var Le,Ie,Ce}function oe(ke){var Le=ke.numPoints,Ie=Le>=1e4?Math.round(Le/1e3)+"k":Le>=1e3?Math.round(Le/100)/10+"k":Le;return de(de({},ke.properties),{cluster:!0,cluster_id:ke.id,point_count:Le,point_count_abbreviated:Ie})}function pe(ke){return ke/360+.5}function ce(ke){var Le=Math.sin(ke*Math.PI/180),Ie=.5-.25*Math.log((1+Le)/(1-Le))/Math.PI;return Ie<0?0:Ie>1?1:Ie}function de(ke,Le){for(var Ie in Le)ke[Ie]=Le[Ie];return ke}function xe(ke){return ke.x}function we(ke){return ke.y}function be(ke,Le,Ie,Ce,Je,it){var ht=Je-Ie,ut=it-Ce;if(ht!==0||ut!==0){var kt=((ke-Ie)*ht+(Le-Ce)*ut)/(ht*ht+ut*ut);kt>1?(Ie=Je,Ce=it):kt>0&&(Ie+=ht*kt,Ce+=ut*kt)}return(ht=ke-Ie)*ht+(ut=Le-Ce)*ut}function Ee(ke,Le,Ie,Ce){var Je={id:ke===void 0?null:ke,type:Le,geometry:Ie,tags:Ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(it){var ht=it.geometry,ut=it.type;if(ut==="Point"||ut==="MultiPoint"||ut==="LineString")fe(it,ht);else if(ut==="Polygon"||ut==="MultiLineString")for(var kt=0;kt<ht.length;kt++)fe(it,ht[kt]);else if(ut==="MultiPolygon")for(kt=0;kt<ht.length;kt++)for(var ot=0;ot<ht[kt].length;ot++)fe(it,ht[kt][ot])}(Je),Je}function fe(ke,Le){for(var Ie=0;Ie<Le.length;Ie+=3)ke.minX=Math.min(ke.minX,Le[Ie]),ke.minY=Math.min(ke.minY,Le[Ie+1]),ke.maxX=Math.max(ke.maxX,Le[Ie]),ke.maxY=Math.max(ke.maxY,Le[Ie+1])}function me(ke,Le,Ie,Ce){if(Le.geometry){var Je=Le.geometry.coordinates,it=Le.geometry.type,ht=Math.pow(Ie.tolerance/((1<<Ie.maxZoom)*Ie.extent),2),ut=[],kt=Le.id;if(Ie.promoteId?kt=Le.properties[Ie.promoteId]:Ie.generateId&&(kt=Ce||0),it==="Point")Te(Je,ut);else if(it==="MultiPoint")for(var ot=0;ot<Je.length;ot++)Te(Je[ot],ut);else if(it==="LineString")_e(Je,ut,ht,!1);else if(it==="MultiLineString"){if(Ie.lineMetrics){for(ot=0;ot<Je.length;ot++)ut=[],_e(Je[ot],ut,ht,!1),ke.push(Ee(kt,"LineString",ut,Le.properties));return}Ae(Je,ut,ht,!1)}else if(it==="Polygon")Ae(Je,ut,ht,!0);else{if(it!=="MultiPolygon"){if(it==="GeometryCollection"){for(ot=0;ot<Le.geometry.geometries.length;ot++)me(ke,{id:kt,geometry:Le.geometry.geometries[ot],properties:Le.properties},Ie,Ce);return}throw new Error("Input data is not a valid GeoJSON object.")}for(ot=0;ot<Je.length;ot++){var Lt=[];Ae(Je[ot],Lt,ht,!0),ut.push(Lt)}}ke.push(Ee(kt,it,ut,Le.properties))}}function Te(ke,Le){Le.push(Pe(ke[0])),Le.push(De(ke[1])),Le.push(0)}function _e(ke,Le,Ie,Ce){for(var Je,it,ht=0,ut=0;ut<ke.length;ut++){var kt=Pe(ke[ut][0]),ot=De(ke[ut][1]);Le.push(kt),Le.push(ot),Le.push(0),ut>0&&(ht+=Ce?(Je*ot-kt*it)/2:Math.sqrt(Math.pow(kt-Je,2)+Math.pow(ot-it,2))),Je=kt,it=ot}var Lt=Le.length-3;Le[2]=1,function Et(Ze,pt,Ct,zt){for(var Gt,ze=zt,st=Ct-pt>>1,yt=Ct-pt,Dt=Ze[pt],jt=Ze[pt+1],or=Ze[Ct],Ut=Ze[Ct+1],Xt=pt+3;Xt<Ct;Xt+=3){var sr=be(Ze[Xt],Ze[Xt+1],Dt,jt,or,Ut);if(sr>ze)Gt=Xt,ze=sr;else if(sr===ze){var vr=Math.abs(Xt-st);vr<yt&&(Gt=Xt,yt=vr)}}ze>zt&&(Gt-pt>3&&Et(Ze,pt,Gt,zt),Ze[Gt+2]=ze,Ct-Gt>3&&Et(Ze,Gt,Ct,zt))}(Le,0,Lt,Ie),Le[Lt+2]=1,Le.size=Math.abs(ht),Le.start=0,Le.end=Le.size}function Ae(ke,Le,Ie,Ce){for(var Je=0;Je<ke.length;Je++){var it=[];
vendor: 5,489 bytes, line 94
94_e(ke[Je],it,Ie,Ce),Le.push(it)}}function Pe(ke){return ke/360+.5}function De(ke){var Le=Math.sin(ke*Math.PI/180),Ie=.5-.25*Math.log((1+Le)/(1-Le))/Math.PI;return Ie<0?0:Ie>1?1:Ie}function Ve(ke,Le,Ie,Ce,Je,it,ht,ut){if(Ce/=Le,it>=(Ie/=Le)&&ht<Ce)return ke;if(ht<Ie||it>=Ce)return null;for(var kt=[],ot=0;ot<ke.length;ot++){var Lt=ke[ot],Et=Lt.geometry,Ze=Lt.type,pt=Je===0?Lt.minX:Lt.minY,Ct=Je===0?Lt.maxX:Lt.maxY;if(pt>=Ie&&Ct<Ce)kt.push(Lt);else if(!(Ct<Ie||pt>=Ce)){var zt=[];if(Ze==="Point"||Ze==="MultiPoint")Qe(Et,zt,Ie,Ce,Je);else if(Ze==="LineString")Oe(Et,zt,Ie,Ce,Je,!1,ut.lineMetrics);else if(Ze==="MultiLineString")Ge(Et,zt,Ie,Ce,Je,!1);else if(Ze==="Polygon")Ge(Et,zt,Ie,Ce,Je,!0);else if(Ze==="MultiPolygon")for(var Gt=0;Gt<Et.length;Gt++){var ze=[];Ge(Et[Gt],ze,Ie,Ce,Je,!0),ze.length&&zt.push(ze)}if(zt.length){if(ut.lineMetrics&&Ze==="LineString"){for(Gt=0;Gt<zt.length;Gt++)kt.push(Ee(Lt.id,Ze,zt[Gt],Lt.tags));continue}Ze!=="LineString"&&Ze!=="MultiLineString"||(zt.length===1?(Ze="LineString",zt=zt[0]):Ze="MultiLineString"),Ze!=="Point"&&Ze!=="MultiPoint"||(Ze=zt.length===3?"Point":"MultiPoint"),kt.push(Ee(Lt.id,Ze,zt,Lt.tags))}}}return kt.length?kt:null}function Qe(ke,Le,Ie,Ce,Je){for(var it=0;it<ke.length;it+=3){var ht=ke[it+Je];ht>=Ie&&ht<=Ce&&(Le.push(ke[it]),Le.push(ke[it+1]),Le.push(ke[it+2]))}}function Oe(ke,Le,Ie,Ce,Je,it,ht){for(var ut,kt,ot=Ue(ke),Lt=Je===0?tt:lt,Et=ke.start,Ze=0;Ze<ke.length-3;Ze+=3){var pt=ke[Ze],Ct=ke[Ze+1],zt=ke[Ze+2],Gt=ke[Ze+3],ze=ke[Ze+4],st=Je===0?pt:Ct,yt=Je===0?Gt:ze,Dt=!1;ht&&(ut=Math.sqrt(Math.pow(pt-Gt,2)+Math.pow(Ct-ze,2))),st<Ie?yt>Ie&&(kt=Lt(ot,pt,Ct,Gt,ze,Ie),ht&&(ot.start=Et+ut*kt)):st>Ce?yt<Ce&&(kt=Lt(ot,pt,Ct,Gt,ze,Ce),ht&&(ot.start=Et+ut*kt)):Ye(ot,pt,Ct,zt),yt<Ie&&st>=Ie&&(kt=Lt(ot,pt,Ct,Gt,ze,Ie),Dt=!0),yt>Ce&&st<=Ce&&(kt=Lt(ot,pt,Ct,Gt,ze,Ce),Dt=!0),!it&&Dt&&(ht&&(ot.end=Et+ut*kt),Le.push(ot),ot=Ue(ke)),ht&&(Et+=ut)}var jt=ke.length-3;pt=ke[jt],Ct=ke[jt+1],zt=ke[jt+2],(st=Je===0?pt:Ct)>=Ie&&st<=Ce&&Ye(ot,pt,Ct,zt),jt=ot.length-3,it&&jt>=3&&(ot[jt]!==ot[0]||ot[jt+1]!==ot[1])&&Ye(ot,ot[0],ot[1],ot[2]),ot.length&&Le.push(ot)}function Ue(ke){var Le=[];return Le.size=ke.size,Le.start=ke.start,Le.end=ke.end,Le}function Ge(ke,Le,Ie,Ce,Je,it){for(var ht=0;ht<ke.length;ht++)Oe(ke[ht],Le,Ie,Ce,Je,it,!1)}function Ye(ke,Le,Ie,Ce){ke.push(Le),ke.push(Ie),ke.push(Ce)}function tt(ke,Le,Ie,Ce,Je,it){var ht=(it-Le)/(Ce-Le);return ke.push(it),ke.push(Ie+(Je-Ie)*ht),ke.push(1),ht}function lt(ke,Le,Ie,Ce,Je,it){var ht=(it-Ie)/(Je-Ie);return ke.push(Le+(Ce-Le)*ht),ke.push(it),ke.push(1),ht}function vt(ke,Le){for(var Ie=[],Ce=0;Ce<ke.length;Ce++){var Je,it=ke[Ce],ht=it.type;if(ht==="Point"||ht==="MultiPoint"||ht==="LineString")Je=It(it.geometry,Le);else if(ht==="MultiLineString"||ht==="Polygon"){Je=[];for(var ut=0;ut<it.geometry.length;ut++)Je.push(It(it.geometry[ut],Le))}else if(ht==="MultiPolygon")for(Je=[],ut=0;ut<it.geometry.length;ut++){for(var kt=[],ot=0;ot<it.geometry[ut].length;ot++)kt.push(It(it.geometry[ut][ot],Le));Je.push(kt)}Ie.push(Ee(it.id,ht,Je,it.tags))}return Ie}function It(ke,Le){var Ie=[];Ie.size=ke.size,ke.start!==void 0&&(Ie.start=ke.start,Ie.end=ke.end);for(var Ce=0;Ce<ke.length;Ce+=3)Ie.push(ke[Ce]+Le,ke[Ce+1],ke[Ce+2]);return Ie}function St(ke,Le){if(ke.transformed)return ke;var Ie,Ce,Je,it=1<<ke.z,ht=ke.x,ut=ke.y;for(Ie=0;Ie<ke.features.length;Ie++){var kt=ke.features[Ie],ot=kt.geometry,Lt=kt.type;if(kt.geometry=[],Lt===1)for(Ce=0;Ce<ot.length;Ce+=2)kt.geometry.push(rt(ot[Ce],ot[Ce+1],Le,it,ht,ut));else for(Ce=0;Ce<ot.length;Ce++){var Et=[];for(Je=0;Je<ot[Ce].length;Je+=2)Et.push(rt(ot[Ce][Je],ot[Ce][Je+1],Le,it,ht,ut));kt.geometry.push(Et)}}return ke.transformed=!0,ke}function rt(ke,Le,Ie,Ce,Je,it){return[Math.round(Ie*(ke*Ce-Je)),Math.round(Ie*(Le*Ce-it))]}function et(ke,Le,Ie,Ce,Je){for(var it=Le===Je.maxZoom?0:Je.tolerance/((1<<Le)*Je.extent),ht={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:Ie,y:Ce,z:Le,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},ut=0;ut<ke.length;ut++){ht.numFeatures++,Tt(ht,ke[ut],it,Je);var kt=ke[ut].minX,ot=ke[ut].minY,Lt=ke[ut].maxX,Et=ke[ut].maxY;kt<ht.minX&&(ht.minX=kt),ot<ht.minY&&(ht.minY=ot),Lt>ht.maxX&&(ht.maxX=Lt),Et>ht.maxY&&(ht.maxY=Et)}return ht}function Tt(ke,Le,Ie,Ce){var Je=Le.geometry,it=Le.type,ht=[];if(it==="Point"||it==="MultiPoint")for(var ut=0;ut<Je.length;ut+=3)ht.push(Je[ut]),ht.push(Je[ut+1]),ke.numPoints++,ke.numSimplified++;else if(it==="LineString")Vt(ht,Je,ke,Ie,!1,!1);else if(it==="MultiLineString"||it==="Polygon")for(ut=0;ut<Je.length;ut++)Vt(ht,Je[ut],ke,Ie,it==="Polygon",ut===0);else if(it==="MultiPolygon")for(var kt=0;kt<Je.length;kt++){var ot=Je[kt];for(ut=0;ut<ot.length;ut++)Vt(ht,ot[ut],ke,Ie,!0,ut===0)}if(ht.length){var Lt=Le.tags||null;if(it==="LineString"&&Ce.lineMetrics){for(var Et in Lt={},Le.tags)Lt[Et]=Le.tags[Et];Lt.mapbox_clip_start=Je.start/Je.size,Lt.mapbox_clip_end=Je.end/Je.size}var Ze={geometry:ht,type:it==="Polygon"||it==="MultiPolygon"?3:it==="LineString"||it==="MultiLineString"?2:1,tags:Lt};Le.id!==null&&(Ze.id=Le.id),ke.features.push(Ze)}}function Vt(ke,Le,Ie,Ce,Je,it){var ht=Ce*Ce;if(Ce>0&&Le.size<(Je?ht:Ce))Ie.numPoints+=Le.length/3;else{for(var ut=[],kt=0;kt<Le.length;kt+=3)(Ce===0||Le[kt+2]>ht)&&(Ie.numSimplified++,ut.push(Le[kt]),ut.push(Le[kt+1])),Ie.numPoints++;Je&&function(ot,Lt){for(var Et=0,Ze=0,pt=ot.length,Ct=pt-2;Ze<pt;Ct=Ze,Ze+=2)Et+=(ot[Ze]-ot[Ct])*(ot[Ze+1]+ot[Ct+1]);if(Et>0===Lt)for(Ze=0,pt=ot.length;Ze<pt/2;
vendor: 4,953 bytes, line 94
94Ze+=2){var zt=ot[Ze],Gt=ot[Ze+1];ot[Ze]=ot[pt-2-Ze],ot[Ze+1]=ot[pt-1-Ze],ot[pt-2-Ze]=zt,ot[pt-1-Ze]=Gt}}(ut,it),ke.push(ut)}}function Kt(ke,Le){var Ie=(Le=this.options=function(Je,it){for(var ht in it)Je[ht]=it[ht];return Je}(Object.create(this.options),Le)).debug;if(Ie&&console.time("preprocess data"),Le.maxZoom<0||Le.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Le.promoteId&&Le.generateId)throw new Error("promoteId and generateId cannot be used together.");var Ce=function(Je,it){var ht=[];if(Je.type==="FeatureCollection")for(var ut=0;ut<Je.features.length;ut++)me(ht,Je.features[ut],it,ut);else Je.type==="Feature"?me(ht,Je,it):me(ht,{geometry:Je},it);return ht}(ke,Le);this.tiles={},this.tileCoords=[],Ie&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Le.indexMaxZoom,Le.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(Ce=function(Je,it){var ht=it.buffer/it.extent,ut=Je,kt=Ve(Je,1,-1-ht,ht,0,-1,2,it),ot=Ve(Je,1,1-ht,2+ht,0,-1,2,it);return(kt||ot)&&(ut=Ve(Je,1,-ht,1+ht,0,-1,2,it)||[],kt&&(ut=vt(kt,1).concat(ut)),ot&&(ut=ut.concat(vt(ot,-1)))),ut}(Ce,Le)).length&&this.splitTile(Ce,0,0,0),Ie&&(Ce.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Be(ke,Le,Ie){return 32*((1<<ke)*Ie+Le)+ke}function qe(ke,Le){var Ie=ke.tileID.canonical;if(!this._geoJSONIndex)return Le(null,null);var Ce=this._geoJSONIndex.getTile(Ie.z,Ie.x,Ie.y);if(!Ce)return Le(null,null);var Je=new w(Ce.features),it=A(Je);it.byteOffset===0&&it.byteLength===it.buffer.byteLength||(it=new Uint8Array(it)),Le(null,{vectorTile:Je,rawData:it.buffer})}J.prototype.load=function(ke){var Le=this.options,Ie=Le.log,Ce=Le.minZoom,Je=Le.maxZoom,it=Le.nodeSize;Ie&&console.time("total time");var ht="prepare "+ke.length+" points";Ie&&console.time(ht),this.points=ke;for(var ut=[],kt=0;kt<ke.length;kt++)ke[kt].geometry&&ut.push(ne(ke[kt],kt));this.trees[Je+1]=new j(ut,xe,we,it,Float32Array),Ie&&console.timeEnd(ht);for(var ot=Je;ot>=Ce;ot--){var Lt=+Date.now();ut=this._cluster(ut,ot),this.trees[ot]=new j(ut,xe,we,it,Float32Array),Ie&&console.log("z%d: %d clusters in %dms",ot,ut.length,+Date.now()-Lt)}return Ie&&console.timeEnd("total time"),this},J.prototype.getClusters=function(ke,Le){var Ie=((ke[0]+180)%360+360)%360-180,Ce=Math.max(-90,Math.min(90,ke[1])),Je=ke[2]===180?180:((ke[2]+180)%360+360)%360-180,it=Math.max(-90,Math.min(90,ke[3]));if(ke[2]-ke[0]>=360)Ie=-180,Je=180;else if(Ie>Je){var ht=this.getClusters([Ie,Ce,180,it],Le),ut=this.getClusters([-180,Ce,Je,it],Le);return ht.concat(ut)}for(var kt=this.trees[this._limitZoom(Le)],ot=[],Lt=0,Et=kt.range(pe(Ie),ce(it),pe(Je),ce(Ce));Lt<Et.length;Lt+=1){var Ze=Et[Lt],pt=kt.points[Ze];ot.push(pt.numPoints?se(pt):this.points[pt.index])}return ot},J.prototype.getChildren=function(ke){var Le=this._getOriginId(ke),Ie=this._getOriginZoom(ke),Ce="No cluster with the specified id.",Je=this.trees[Ie];if(!Je)throw new Error(Ce);var it=Je.points[Le];if(!it)throw new Error(Ce);for(var ht=this.options.radius/(this.options.extent*Math.pow(2,Ie-1)),ut=[],kt=0,ot=Je.within(it.x,it.y,ht);kt<ot.length;kt+=1){var Lt=ot[kt],Et=Je.points[Lt];Et.parentId===ke&&ut.push(Et.numPoints?se(Et):this.points[Et.index])}if(ut.length===0)throw new Error(Ce);return ut},J.prototype.getLeaves=function(ke,Le,Ie){Le=Le||10,Ie=Ie||0;var Ce=[];return this._appendLeaves(Ce,ke,Le,Ie,0),Ce},J.prototype.getTile=function(ke,Le,Ie){var Ce=this.trees[this._limitZoom(ke)],Je=Math.pow(2,ke),it=this.options,ht=it.extent,ut=it.radius/ht,kt=(Ie-ut)/Je,ot=(Ie+1+ut)/Je,Lt={features:[]};return this._addTileFeatures(Ce.range((Le-ut)/Je,kt,(Le+1+ut)/Je,ot),Ce.points,Le,Ie,Je,Lt),Le===0&&this._addTileFeatures(Ce.range(1-ut/Je,kt,1,ot),Ce.points,Je,Ie,Je,Lt),Le===Je-1&&this._addTileFeatures(Ce.range(0,kt,ut/Je,ot),Ce.points,-1,Ie,Je,Lt),Lt.features.length?Lt:null},J.prototype.getClusterExpansionZoom=function(ke){for(var Le=this._getOriginZoom(ke)-1;Le<=this.options.maxZoom;){var Ie=this.getChildren(ke);if(Le++,Ie.length!==1)break;ke=Ie[0].properties.cluster_id}return Le},J.prototype._appendLeaves=function(ke,Le,Ie,Ce,Je){for(var it=0,ht=this.getChildren(Le);it<ht.length;it+=1){var ut=ht[it],kt=ut.properties;if(kt&&kt.cluster?Je+kt.point_count<=Ce?Je+=kt.point_count:Je=this._appendLeaves(ke,kt.cluster_id,Ie,Ce,Je):Je<Ce?Je++:ke.push(ut),ke.length===Ie)break}return Je},J.prototype._addTileFeatures=function(ke,Le,Ie,Ce,Je,it){for(var ht=0,ut=ke;ht<ut.length;ht+=1){var kt=Le[ut[ht]],ot=kt.numPoints,Lt={type:1,geometry:[[Math.round(this.options.extent*(kt.x*Je-Ie)),Math.round(this.options.extent*(kt.y*Je-Ce))]],tags:ot?oe(kt):this.points[kt.index].properties},Et=void 0;ot?Et=kt.id:this.options.generateId?Et=kt.index:this.points[kt.index].id&&(Et=this.points[kt.index].id),Et!==void 0&&(Lt.
vendor: 3,923 bytes, line 94
94id=Et),it.features.push(Lt)}},J.prototype._limitZoom=function(ke){return Math.max(this.options.minZoom,Math.min(ke,this.options.maxZoom+1))},J.prototype._cluster=function(ke,Le){for(var Ie=[],Ce=this.options,Je=Ce.radius,it=Ce.extent,ht=Ce.reduce,ut=Je/(it*Math.pow(2,Le)),kt=0;kt<ke.length;kt++){var ot=ke[kt];if(!(ot.zoom<=Le)){ot.zoom=Le;for(var Lt=this.trees[Le+1],Et=Lt.within(ot.x,ot.y,ut),Ze=ot.numPoints||1,pt=ot.x*Ze,Ct=ot.y*Ze,zt=ht&&Ze>1?this._map(ot,!0):null,Gt=(kt<<5)+(Le+1)+this.points.length,ze=0,st=Et;ze<st.length;ze+=1){var yt=st[ze],Dt=Lt.points[yt];if(!(Dt.zoom<=Le)){Dt.zoom=Le;var jt=Dt.numPoints||1;pt+=Dt.x*jt,Ct+=Dt.y*jt,Ze+=jt,Dt.parentId=Gt,ht&&(zt||(zt=this._map(ot,!0)),ht(zt,this._map(Dt)))}}Ze===1?Ie.push(ot):(ot.parentId=Gt,Ie.push(re(pt/Ze,Ct/Ze,Gt,Ze,zt)))}}return Ie},J.prototype._getOriginId=function(ke){return ke-this.points.length>>5},J.prototype._getOriginZoom=function(ke){return(ke-this.points.length)%32},J.prototype._map=function(ke,Le){if(ke.numPoints)return Le?de({},ke.properties):ke.properties;var Ie=this.points[ke.index].properties,Ce=this.options.map(Ie);return Le&&Ce===Ie?de({},Ce):Ce},Kt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Kt.prototype.splitTile=function(ke,Le,Ie,Ce,Je,it,ht){for(var ut=[ke,Le,Ie,Ce],kt=this.options,ot=kt.debug;ut.length;){Ce=ut.pop(),Ie=ut.pop(),Le=ut.pop(),ke=ut.pop();var Lt=1<<Le,Et=Be(Le,Ie,Ce),Ze=this.tiles[Et];if(!Ze&&(ot>1&&console.time("creation"),Ze=this.tiles[Et]=et(ke,Le,Ie,Ce,kt),this.tileCoords.push({z:Le,x:Ie,y:Ce}),ot)){ot>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Le,Ie,Ce,Ze.numFeatures,Ze.numPoints,Ze.numSimplified),console.timeEnd("creation"));var pt="z"+Le;this.stats[pt]=(this.stats[pt]||0)+1,this.total++}if(Ze.source=ke,Je){if(Le===kt.maxZoom||Le===Je)continue;var Ct=1<<Je-Le;if(Ie!==Math.floor(it/Ct)||Ce!==Math.floor(ht/Ct))continue}else if(Le===kt.indexMaxZoom||Ze.numPoints<=kt.indexMaxPoints)continue;if(Ze.source=null,ke.length!==0){ot>1&&console.time("clipping");var zt,Gt,ze,st,yt,Dt,jt=.5*kt.buffer/kt.extent,or=.5-jt,Ut=.5+jt,Xt=1+jt;zt=Gt=ze=st=null,yt=Ve(ke,Lt,Ie-jt,Ie+Ut,0,Ze.minX,Ze.maxX,kt),Dt=Ve(ke,Lt,Ie+or,Ie+Xt,0,Ze.minX,Ze.maxX,kt),ke=null,yt&&(zt=Ve(yt,Lt,Ce-jt,Ce+Ut,1,Ze.minY,Ze.maxY,kt),Gt=Ve(yt,Lt,Ce+or,Ce+Xt,1,Ze.minY,Ze.maxY,kt),yt=null),Dt&&(ze=Ve(Dt,Lt,Ce-jt,Ce+Ut,1,Ze.minY,Ze.maxY,kt),st=Ve(Dt,Lt,Ce+or,Ce+Xt,1,Ze.minY,Ze.maxY,kt),Dt=null),ot>1&&console.timeEnd("clipping"),ut.push(zt||[],Le+1,2*Ie,2*Ce),ut.push(Gt||[],Le+1,2*Ie,2*Ce+1),ut.push(ze||[],Le+1,2*Ie+1,2*Ce),ut.push(st||[],Le+1,2*Ie+1,2*Ce+1)}}},Kt.prototype.getTile=function(ke,Le,Ie){var Ce=this.options,Je=Ce.extent,it=Ce.debug;if(ke<0||ke>24)return null;var ht=1<<ke,ut=Be(ke,Le=(Le%ht+ht)%ht,Ie);if(this.tiles[ut])return St(this.tiles[ut],Je);it>1&&console.log("drilling down to z%d-%d-%d",ke,Le,Ie);for(var kt,ot=ke,Lt=Le,Et=Ie;!kt&&ot>0;)ot--,Lt=Math.floor(Lt/2),Et=Math.floor(Et/2),kt=this.tiles[Be(ot,Lt,Et)];return kt&&kt.source?(it>1&&console.log("found parent tile z%d-%d-%d",ot,Lt,Et),it>1&&console.time("drilling down"),this.splitTile(kt.source,ot,Lt,Et,ke,Le,Ie),it>1&&console.timeEnd("drilling down"),this.tiles[ut]?St(this.tiles[ut],Je):null):null};var Re=function(ke){function Le(Ie,Ce,Je,it){ke.call(this,Ie,Ce,Je,qe),it&&(this.loadGeoJSON=it)}return ke&&(Le.__proto__=ke),Le.prototype=Object.create(ke&&ke.prototype),Le.prototype.constructor=Le,Le.prototype.loadData=function(Ie,Ce){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Ce,this._pendingLoadDataParams=Ie,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Le.prototype._loadData=function(){var Ie=this;if(this._pendingCallback&&this._pendingLoadDataParams){var Ce=this._pendingCallback,Je=this._pe
vendor: 5,250 bytes, line 94
94ndingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var it=!!(Je&&Je.request&&Je.request.collectResourceTiming)&&new e.RequestPerformance(Je.request);this.loadGeoJSON(Je,function(ht,ut){if(ht||!ut)return Ce(ht);if(typeof ut!="object")return Ce(new Error("Input data given to '"+Je.source+"' is not a valid GeoJSON object."));h(ut,!0);try{Ie._geoJSONIndex=Je.cluster?new J(function(Lt){var Et=Lt.superclusterOptions,Ze=Lt.clusterProperties;if(!Ze||!Et)return Et;for(var pt={},Ct={},zt={accumulated:null,zoom:0},Gt={properties:null},ze=Object.keys(Ze),st=0,yt=ze;st<yt.length;st+=1){var Dt=yt[st],jt=Ze[Dt],or=jt[0],Ut=jt[1],Xt=e.createExpression(Ut),sr=e.createExpression(typeof or=="string"?[or,["accumulated"],["get",Dt]]:or);pt[Dt]=Xt.value,Ct[Dt]=sr.value}return Et.map=function(vr){Gt.properties=vr;for(var pr={},ar=0,lr=ze;ar<lr.length;ar+=1){var hr=lr[ar];pr[hr]=pt[hr].evaluate(zt,Gt)}return pr},Et.reduce=function(vr,pr){Gt.properties=pr;for(var ar=0,lr=ze;ar<lr.length;ar+=1){var hr=lr[ar];zt.accumulated=vr[hr],vr[hr]=Ct[hr].evaluate(zt,Gt)}},Et}(Je)).load(ut.features):function(Lt,Et){return new Kt(Lt,Et)}(ut,Je.geojsonVtOptions)}catch(Lt){return Ce(Lt)}Ie.loaded={};var kt={};if(it){var ot=it.finish();ot&&(kt.resourceTiming={},kt.resourceTiming[Je.source]=JSON.parse(JSON.stringify(ot)))}Ce(null,kt)})}},Le.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Le.prototype.reloadTile=function(Ie,Ce){var Je=this.loaded,it=Ie.uid;return Je&&Je[it]?ke.prototype.reloadTile.call(this,Ie,Ce):this.loadTile(Ie,Ce)},Le.prototype.loadGeoJSON=function(Ie,Ce){if(Ie.request)e.getJSON(Ie.request,Ce);else{if(typeof Ie.data!="string")return Ce(new Error("Input data given to '"+Ie.source+"' is not a valid GeoJSON object."));try{return Ce(null,JSON.parse(Ie.data))}catch{return Ce(new Error("Input data given to '"+Ie.source+"' is not a valid GeoJSON object."))}}},Le.prototype.removeSource=function(Ie,Ce){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Ce()},Le.prototype.getClusterExpansionZoom=function(Ie,Ce){try{Ce(null,this._geoJSONIndex.getClusterExpansionZoom(Ie.clusterId))}catch(Je){Ce(Je)}},Le.prototype.getClusterChildren=function(Ie,Ce){try{Ce(null,this._geoJSONIndex.getChildren(Ie.clusterId))}catch(Je){Ce(Je)}},Le.prototype.getClusterLeaves=function(Ie,Ce){try{Ce(null,this._geoJSONIndex.getLeaves(Ie.clusterId,Ie.limit,Ie.offset))}catch(Je){Ce(Je)}},Le}(u),Xe=function(ke){var Le=this;this.self=ke,this.actor=new e.Actor(ke,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:u,geojson:Re},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Ie,Ce){if(Le.workerSourceTypes[Ie])throw new Error('Worker source with name "'+Ie+'" already registered.');Le.workerSourceTypes[Ie]=Ce},this.self.registerRTLTextPlugin=function(Ie){if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=Ie.applyArabicShaping,e.plugin.processBidirectionalText=Ie.processBidirectionalText,e.plugin.processStyledBidirectionalText=Ie.processStyledBidirectionalText}};return Xe.prototype.setReferrer=function(ke,Le){this.referrer=Le},Xe.prototype.setImages=function(ke,Le,Ie){for(var Ce in this.availableImages[ke]=Le,this.workerSources[ke]){var Je=this.workerSources[ke][Ce];for(var it in Je)Je[it].availableImages=Le}Ie()},Xe.prototype.setLayers=function(ke,Le,Ie){this.getLayerIndex(ke).replace(Le),Ie()},Xe.prototype.updateLayers=function(ke,Le,Ie){this.getLayerIndex(ke).update(Le.layers,Le.removedIds),Ie()},Xe.prototype.loadTile=function(ke,Le,Ie){this.getWorkerSource(ke,Le.type,Le.source).loadTile(Le,Ie)},Xe.prototype.loadDEMTile=function(ke,Le,Ie){this.getDEMWorkerSource(ke,Le.source).loadTile(Le,Ie)},Xe.prototype.reloadTile=function(ke,Le,Ie){this.getWorkerSource(ke,Le.type,Le.source).reloadTile(Le,Ie)},Xe.prototype.abortTile=function(ke,Le,Ie){this.getWorkerSource(ke,Le.type,Le.source).abortTile(Le,Ie)},Xe.prototype.removeTile=function(ke,Le,Ie){this.getWorkerSource(ke,Le.type,Le.source).removeTile(Le,Ie)},Xe.prototype.removeDEMTile=function(ke,Le){this.getDEMWorkerSource(ke,Le.source).removeTile(Le)},Xe.prototype.removeSource=function(ke,Le,Ie){if(this.workerSources[ke]&&this.workerSources[ke][Le.type]&&this.workerSources[ke][Le.type][Le.source]){var Ce=this.workerSources[ke][Le.type][Le.source];delete this.workerSources[ke][Le.type][Le.source],Ce.removeSource!==void 0?Ce.removeSource(Le,Ie):Ie()}},Xe.prototype.loadWorkerSource=function(ke,Le,Ie){try{this.self.importScripts(Le.url),Ie()}catch(Ce){Ie(Ce.toString())}},Xe.prototype.syncRTLPluginState=function(ke,Le,Ie){try{e.plugin.setState(Le);var Ce=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&Ce!=null){this.self.importScripts(Ce);var Je=e.plugin.isParsed();Ie(Je?void 0:new Error("RTL Text Plugin failed to import scripts from "+Ce),Je)}}catch(it){Ie(it.toString())}},Xe.prototype.getAvailableImages=function(ke){var Le=this.availableImages[ke];return Le||(Le=[]),Le},Xe.prototype.getLayerIndex=function(ke){var Le=this.layerIndexes[ke];return Le||(Le=this.layerIndexes[ke]=new o),Le}
94,Xe.prototype.getWorkerSource=function(ke,Le,Ie){var Ce=this;if(this.workerSources[ke]||(this.workerSources[ke]={}),this.workerSources[ke][Le]||(this.workerSources[ke][Le]={}),!this.workerSources[ke][Le][Ie]){var Je={send:function(it,ht,ut){Ce.actor.send(it,ht,ut,ke)}};this.workerSources[ke][Le][Ie]=new this.workerSourceTypes[Le](Je,this.getLayerIndex(ke),this.getAvailableImages(ke))}return this.workerSources[ke][Le][Ie]},Xe.prototype.getDEMWorkerSource=function(ke,Le){return this.demWorkerSources[ke]||(this.demWorkerSources[ke]={}),this.demWorkerSources[ke][Le]||(this.demWorkerSources[ke][Le]=new s),this.demWorkerSources[ke][Le]},Xe.prototype.enforceCacheSizeLimit=function(ke,Le){e.enforceCacheSizeLimit(Le)},typeof WorkerGlobalScope<"u"&&e.window!==void 0&&e.window instanceof WorkerGlobalScope&&(e.window.worker=new Xe(e.window)),Xe}),v(0,function(e){var n=e.createCommonjsModule(function(C){function z(ie){return!B(ie)}function B(ie){return typeof window>"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var ue,ge,ye=new Blob([""],{type:"text/javascript"}),Me=URL.createObjectURL(ye);try{ge=new Worker(Me),ue=!0}catch{ue=!1}return ge&&ge.terminate(),URL.revokeObjectURL(Me),ue}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var ue=document.createElement("canvas");ue.width=ue.height=1;var ge=ue.getContext("2d");if(!ge)return!1;var ye=ge.getImageData(0,0,1,1);return ye&&ye.width===ue.width}()?function(ue){return G[ue]===void 0&&(G[ue]=function(ge){var ye=function(je){var We=document.createElement("canvas"),nt=Object.create(z.webGLContextAttributes);return nt.failIfMajorPerformanceCaveat=je,We.probablySupportsContext?We.probablySupportsContext("webgl",nt)||We.probablySupportsContext("experimental-webgl",nt):We.supportsContext?We.supportsContext("webgl",nt)||We.supportsContext("experimental-webgl",nt):We.getContext("webgl",nt)||We.getContext("experimental-webgl",nt)}(ge);if(!ye)return!1;var Me=ye.createShader(ye.VERTEX_SHADER);return!Me||ye.isContextLost()?!1:(ye.shaderSource(Me,"void main() {}"),ye.compileShader(Me),ye.getShaderParameter(Me,ye.COMPILE_STATUS)===!0)}(ue)),G[ue]}(ie&&ie.failIfMajorPerformanceCaveat)?void 0:"insufficient WebGL support":"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support"}C.exports?C.exports=z:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=z,window.mapboxgl.notSupportedReason=B);var G={};z.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),t={create:function(C,z,B){var G=e.window.document.createElement(C);return z!==void 0&&(G.className=z),B&&B.appendChild(G),G},createNS:function(C,z){return e.window.document.createElementNS(C,z)}},o=e.window.document.documentElement.style;function r(C){if(!o)return C[0];for(var z=0;z<C.length;z++)if(C[z]in o)return C[z];return C[0]}var d,c=r(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);t.disableDrag=function(){o&&c&&(d=o[c],o[c]="none")},t.enableDrag=function(){o&&c&&(o[c]=d)};var i=r(["transform","WebkitTransform"]);t.setTransform=function(C,z){C.style[i]=z};var u=!1;try{var f=Object.defineProperty({},"passive",{get:function(){u=!0}});e.window.addEventListener("test",f,f),e.window.removeEventListener("test",f,f)}catch{u=!1}t.addEventListener=function(C,z,B,G){G===void 0&&(G={}),"passive"in G&&u?C.addEventListener(z,B,G):C.addEventListener(z,B,G.capture)},t.removeEventListener=function(C,z,B,G){G===void 0&&(G={}),"passive"in G&&u?C.removeEventListener(z,B,G):C.removeEventListener(z,B,G.capture)};
vendor: 14,084 bytes, line 94
94var s=function(C){C.preventDefault(),C.stopPropagation(),e.window.removeEventListener("click",s,!0)};function h(C){var z=C.userImage;return z&&z.render&&z.render()?(C.data.replace(new Uint8Array(z.data.buffer)),!0):!1}t.suppressClick=function(){e.window.addEventListener("click",s,!0),e.window.setTimeout(function(){e.window.removeEventListener("click",s,!0)},0)},t.mousePos=function(C,z){var B=C.getBoundingClientRect();return new e.Point(z.clientX-B.left-C.clientLeft,z.clientY-B.top-C.clientTop)},t.touchPos=function(C,z){for(var B=C.getBoundingClientRect(),G=[],ie=0;ie<z.length;ie++)G.push(new e.Point(z[ie].clientX-B.left-C.clientLeft,z[ie].clientY-B.top-C.clientTop));return G},t.mouseButton=function(C){return e.window.InstallTrigger!==void 0&&C.button===2&&C.ctrlKey&&e.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:C.button},t.remove=function(C){C.parentNode&&C.parentNode.removeChild(C)};var p=function(C){function z(){C.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.isLoaded=function(){return this.loaded},z.prototype.setLoaded=function(B){if(this.loaded!==B&&(this.loaded=B,B)){for(var G=0,ie=this.requestors;G<ie.length;G+=1){var ue=ie[G],ge=ue.ids,ye=ue.callback;this._notify(ge,ye)}this.requestors=[]}},z.prototype.getImage=function(B){return this.images[B]},z.prototype.addImage=function(B,G){this._validate(B,G)&&(this.images[B]=G)},z.prototype._validate=function(B,G){var ie=!0;return this._validateStretch(G.stretchX,G.data&&G.data.width)||(this.fire(new e.ErrorEvent(new Error('Image "'+B+'" has invalid "stretchX" value'))),ie=!1),this._validateStretch(G.stretchY,G.data&&G.data.height)||(this.fire(new e.ErrorEvent(new Error('Image "'+B+'" has invalid "stretchY" value'))),ie=!1),this._validateContent(G.content,G)||(this.fire(new e.ErrorEvent(new Error('Image "'+B+'" has invalid "content" value'))),ie=!1),ie},z.prototype._validateStretch=function(B,G){if(!B)return!0;for(var ie=0,ue=0,ge=B;ue<ge.length;ue+=1){var ye=ge[ue];if(ye[0]<ie||ye[1]<ye[0]||G<ye[1])return!1;ie=ye[1]}return!0},z.prototype._validateContent=function(B,G){return!B||B.length===4&&!(B[0]<0||G.data.width<B[0])&&!(B[1]<0||G.data.height<B[1])&&!(B[2]<0||G.data.width<B[2])&&!(B[3]<0||G.data.height<B[3])&&!(B[2]<B[0])&&!(B[3]<B[1])},z.prototype.updateImage=function(B,G){var ie=this.images[B];G.version=ie.version+1,this.images[B]=G,this.updatedImages[B]=!0},z.prototype.removeImage=function(B){var G=this.images[B];delete this.images[B],delete this.patterns[B],G.userImage&&G.userImage.onRemove&&G.userImage.onRemove()},z.prototype.listImages=function(){return Object.keys(this.images)},z.prototype.getImages=function(B,G){var ie=!0;if(!this.isLoaded())for(var ue=0,ge=B;ue<ge.length;ue+=1){var ye=ge[ue];this.images[ye]||(ie=!1)}this.isLoaded()||ie?this._notify(B,G):this.requestors.push({ids:B,callback:G})},z.prototype._notify=function(B,G){for(var ie={},ue=0,ge=B;ue<ge.length;ue+=1){var ye=ge[ue];this.images[ye]||this.fire(new e.Event("styleimagemissing",{id:ye}));var Me=this.images[ye];Me?ie[ye]={data:Me.data.clone(),pixelRatio:Me.pixelRatio,sdf:Me.sdf,version:Me.version,stretchX:Me.stretchX,stretchY:Me.stretchY,content:Me.content,hasRenderCallback:!!(Me.userImage&&Me.userImage.render)}:e.warnOnce('Image "'+ye+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}G(null,ie)},z.prototype.getPixelSize=function(){var B=this.atlasImage;return{width:B.width,height:B.height}},z.prototype.getPattern=function(B){var G=this.patterns[B],ie=this.getImage(B);if(!ie)return null;if(G&&G.position.version===ie.version)return G.position;if(G)G.position.version=ie.version;else{var ue={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},ge=new e.ImagePosition(ue,ie);this.patterns[B]={bin:ue,position:ge}}return this._updatePatternAtlas(),this.patterns[B].position},z.prototype.bind=function(B){var G=B.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.Texture(B,this.atlasImage,G.RGBA),this.atlasTexture.bind(G.LINEAR,G.CLAMP_TO_EDGE)},z.prototype._updatePatternAtlas=function(){var B=[];for(var G in this.patterns)B.push(this.patterns[G].bin);var ie=e.potpack(B),ue=ie.w,ge=ie.h,ye=this.atlasImage;for(var Me in ye.resize({width:ue||1,height:ge||1}),this.patterns){var je=this.patterns[Me].bin,We=je.x+1,nt=je.y+1,bt=this.images[Me].data,At=bt.width,_t=bt.height;e.RGBAImage.copy(bt,ye,{x:0,y:0},{x:We,y:nt},{width:At,height:_t}),e.RGBAImage.copy(bt,ye,{x:0,y:_t-1},{x:We,y:nt-1},{width:At,height:1}),e.RGBAImage.copy(bt,ye,{x:0,y:0},{x:We,y:nt+_t},{width:At,height:1}),e.RGBAImage.copy(bt,ye,{x:At-1,y:0},{x:We-1,y:nt},{width:1,height:_t}),e.RGBAImage.copy(bt,ye,{x:0,y:0},{x:We+At,y:nt},{width:1,height:_t})}this.dirty=!0},z.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},z.prototype.dispatchRenderCallbacks=function(B){for(var G=0,ie=B;G<ie.length;G+=1){var ue=ie[G];if(!this.callbackDispatchedThisFrame[ue]){this.callbackDispatchedThisFrame[ue]=!0;var ge=this.images[ue];h(ge)&&this.updateImage(ue,ge)}}},z}(e.Evented),a=w,x=w,l=1e20;function w(C,z,B,G,ie,ue){this.fontSize=C||24,this.buffer=z===void 0?3:z,this.cutoff=G||.25,this.fontFamily=ie||"sans-serif",this.fontWeight=ue||"normal",this.radius=B||8;var ge=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=ge,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(ge*ge),this.gridInner=new Float64Array(ge*ge),this.f=new Float64Array(ge),this.d=new Float64Array(ge),this.z=new Float64Array(ge+1),this.v=new Int16Array(ge),this.middle=Math.round(ge/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function _(C,z,B,G,ie,ue,ge){for(var ye=0;ye<z;ye++){for(var Me=0;Me<B;Me++)G[Me]=C[Me*z+ye];for(T(G,ie,ue,ge,B),Me=0;Me<B;Me++)C[Me*z+ye]=ie[Me]}for(Me=0;Me<B;Me++){for(ye=0;ye<z;ye++)G[ye]=C[Me*z+ye];for(T(G,ie,ue,ge,z),ye=0;ye<z;ye++)C[Me*z+ye]=Math.sqrt(ie[ye])}}function T(C,z,B,G,ie){B[0]=0,G[0]=-l,G[1]=+l;for(var ue=1,ge=0;ue<ie;ue++){for(var ye=(C[ue]+ue*ue-(C[B[ge]]+B[ge]*B[ge]))/(2*ue-2*B[ge]);ye<=G[ge];)ge--,ye=(C[ue]+ue*ue-(C[B[ge]]+B[ge]*B[ge]))/(2*ue-2*B[ge]);B[++ge]=ue,G[ge]=ye,G[ge+1]=+l}for(ue=0,ge=0;ue<ie;ue++){for(;G[ge+1]<ue;)ge++;z[ue]=(ue-B[ge])*(ue-B[ge])+C[B[ge]]}}w.prototype.draw=function(C){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(C,this.buffer,this.middle);for(var z=this.ctx.getImageData(0,0,this.size,this.size),B=new Uint8ClampedArray(this.size*this.size),G=0;G<this.size*this.size;G++){var ie=z.data[4*G+3]/255;this.gridOuter[G]=ie===1?0:ie===0?l:Math.pow(Math.max(0,.5-ie),2),this.gridInner[G]=ie===1?l:ie===0?0:Math.pow(Math.max(0,ie-.5),2)}for(_(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),_(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),G=0;G<this.size*this.size;G++){var ue=this.gridOuter[G]-this.gridInner[G];B[G]=Math.max(0,Math.min(255,Math.round(255-255*(ue/this.radius+this.cutoff))))}return B},a.default=x;var k=function(C,z){this.requestManager=C,this.localIdeographFontFamily=z,this.entries={}};k.prototype.setURL=function(C){this.url=C},k.prototype.getGlyphs=function(C,z){var B=this,G=[];for(var ie in C)for(var ue=0,ge=C[ie];ue<ge.length;ue+=1){var ye=ge[ue];G.push({stack:ie,id:ye})}e.asyncAll(G,function(Me,je){var We=Me.stack,nt=Me.id,bt=B.entries[We];bt||(bt=B.entries[We]={glyphs:{},requests:{},ranges:{}});var At=bt.glyphs[nt];if(At===void 0){if(At=B._tinySDF(bt,We,nt))return bt.glyphs[nt]=At,void je(null,{stack:We,id:nt,glyph:At});var _t=Math.floor(nt/256);if(256*_t>65535)je(new Error("glyphs > 65535 not supported"));else if(bt.ranges[_t])je(null,{stack:We,id:nt,glyph:At});else{var wt=bt.requests[_t];wt||(wt=bt.requests[_t]=[],k.loadGlyphRange(We,_t,B.url,B.requestManager,function(xt,Ft){if(Ft){for(var Ot in Ft)B._doesCharSupportLocalGlyph(+Ot)||(bt.glyphs[+Ot]=Ft[+Ot]);bt.ranges[_t]=!0}for(var Nt=0,er=wt;Nt<er.length;Nt+=1)(0,er[Nt])(xt,Ft);delete bt.requests[_t]})),wt.push(function(xt,Ft){xt?je(xt):Ft&&je(null,{stack:We,id:nt,glyph:Ft[nt]||null})})}}else je(null,{stack:We,id:nt,glyph:At})},function(Me,je){if(Me)z(Me);else if(je){for(var We={},nt=0,bt=je;nt<bt.length;nt+=1){var At=bt[nt],_t=At.stack,wt=At.id,xt=At.glyph;(We[_t]||(We[_t]={}))[wt]=xt&&{id:xt.id,bitmap:xt.bitmap.clone(),metrics:xt.metrics}}z(null,We)}})},k.prototype._doesCharSupportLocalGlyph=function(C){return!!this.localIdeographFontFamily&&(e.isChar["CJK Unified Ideographs"](C)||e.isChar["Hangul Syllables"](C)||e.isChar.Hiragana(C)||e.isChar.Katakana(C))},k.prototype._tinySDF=function(C,z,B){var G=this.localIdeographFontFamily;if(G&&this._doesCharSupportLocalGlyph(B)){var ie=C.tinySDF;if(!ie){var ue="400";/bold/i.test(z)?ue="900":/medium/i.test(z)?ue="500":/light/i.test(z)&&(ue="200"),ie=C.tinySDF=new k.TinySDF(24,3,8,.25,G,ue)}return{id:B,bitmap:new e.AlphaImage({width:30,height:30},ie.draw(String.fromCharCode(B))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},k.loadGlyphRange=function(C,z,B,G,ie){var ue=256*z,ge=ue+255,ye=G.transformRequest(G.normalizeGlyphsURL(B).replace("{fontstack}",C).replace("{range}",ue+"-"+ge),e.ResourceType.Glyphs);e.getArrayBuffer(ye,function(Me,je){if(Me)ie(Me);else if(je){for(var We={},nt=0,bt=e.parseGlyphPBF(je);nt<bt.length;nt+=1){var At=bt[nt];We[At.id]=At}ie(null,We)}})},k.TinySDF=a;var L=function(){this.specification=e.styleSpec.light.position};L.prototype.possiblyEvaluate=function(C,z){return e.sphericalToCartesian(C.expression.evaluate(z))},L.prototype.interpolate=function(C,z,B){return{x:e.number(C.x,z.x,B),y:e.number(C.y,z.y,B),z:e.number(C.z,z.z,B)}};var A=new e.Properties({anchor:new e.DataConstantProperty(e.styleSpec.light.anchor),position:new L,color:new e.DataConstantProperty(e.styleSpec.light.color),intensity:new e.DataConstantProperty(e.styleSpec.light.intensity)}),I=function(C){function z(B){C.call(this),this._transitionable=new e.Transitionable(A),this.setLight(B),this._transitioning=this._transitionable.untransitioned()}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getLight=function(){return this._transitionable.serialize()},z.prototype.setLight=function(B,G){if(G===void 0&&(G={}),!this._validate(e.validateLight,B,G))for(var ie in B){var ue=B[ie];e.endsWith(ie,"-transition")?this._transitionable.setTransition(ie.slice(0,-11),ue):this._transitionable.setValue(ie,ue)}},z.prototype.updateTransitions=function(B){this._transitioning=this._transitionable.transitioned(B,this._transitioning)},z.prototype.hasTransition=function(){return this._transitioning.hasTransition()},z.prototype.recalculate=function(B){this.properties=this._transitioning.possiblyEvaluate(B)},z.prototype._validate=function(B,G,ie){return(!ie||ie.validate!==!1)&&e.emitValidationErrors(this,B.call(e.validateStyle,e.extend({value:G,style:{glyphs:!0,sprite:!0},styleSpec:e.styleSpec})))},z}(e.Evented),P=function(C,z){this.width=C,this.height=z,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};P.prototype.getDash=function(C,z){var B=C.join(",")+String(z);return this.dashEntry[B]||(this.dashEntry[B]=this.addDash(C,z)),this.dashEntry[B]},P.prototype.getDashRanges=function(C,z,B){var G=[],ie=C.length%2==1?-C[C.length-1]*B:0,ue=C[0]*B,ge=!0;G.push({left:ie,right:ue,isDash:ge,zeroLength:C[0]===0});for(var ye=C[0],Me=1;Me<C.length;Me++){ge=!ge;var je=C[Me];ie=ye*B,ue=(ye+=je)*B,G.push({left:ie,right:ue,isDash:ge,zeroLength:je===0})}return G},P.prototype.addRoundDash=function(C,z,B){for(var G=z/2,ie=-B;ie<=B;ie++)for(var ue=this.nextRow+B+ie,ge=this.width*ue,ye=0,Me=C[ye],je=0;je<this.width;je++){je/Me.right>1&&(Me=C[++ye]);var We=Math.abs(je-Me.left),nt=Math.abs(je-Me.right),bt=Math.min(We,nt),At=void 0,_t=ie/B*(G+1);if(Me.isDash){var wt=G-Math.abs(_t);At=Math.sqrt(bt*bt+wt*wt)}else At=G-Math.sqrt(bt*bt+_t*_t);this.data[ge+je]=Math.max(0,Math.min(255,At+128))}},P.prototype.addRegularDash=function(C){for(var z=C.length-1;z>=0;--z){var B=C[z],G=C[z+1];B.zeroLength?C.splice(z,1):G&&G.isDash===B.isDash&&(G.left=B.left,C.splice(z,1))}var ie=C[0],ue=C[C.length-1];ie.isDash===ue.isDash&&(ie.left=ue.left-this.width,ue.right=ie.right+this.width);for(var ge=this.width*this.nextRow,ye=0,Me=C[ye],je=0;je<this.width;je++){je/Me.right>1&&(Me=C[++ye]);var We=Math.abs(je-Me.left),nt=Math.abs(je-Me.right),bt=Math.min(We,nt),At=Me.isDash?bt:-bt;this.data[ge+je]=Math.max(0,Math.min(255,At+128))}},P.prototype.addDash=function(C,z){var B=z?7:0,G=2*B+1;if(this.nextRow+G>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var ie=0,ue=0;ue<C.length;ue++)ie+=C[ue];if(ie!==0){var ge=this.width/ie,ye=this.getDashRanges(C,this.width,ge);z?this.addRoundDash(ye,ge,B):this.addRegularDash(ye)}var Me={y:(this.nextRow+B+.5)/this.height,height:2*B/this.height,width:ie};return this.nextRow+=G,this.dirty=!0,Me},P.prototype.bind=function(C){var z=C.gl;this.texture?(z.bindTexture(z.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,z.texSubImage2D(z.TEXTURE_2D,0,0,0,this.width,this.height,z.ALPHA,z.UNSIGNED_BYTE,this.data))):(this.texture=z.createTexture(),z.bindTexture(z.TEXTURE_2D,this.texture),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.REPEAT),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.REPEAT),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,z.LINEAR),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,z.LINEAR),z.texImage2D(z.TEXTURE_2D,0,z.ALPHA,this.width,this.height,0,z.ALPHA,z.UNSIGNED_BYTE,this.data))};var S=function C(z,B){this.workerPool=z,this.actors=[],this.currentActor=0,this.id=e.uniqueId();
94for(var G=this.workerPool.acquire(this.id),ie=0;ie<G.length;ie++){var ue=G[ie],ge=new C.Actor(ue,B,this.id);ge.name="Worker "+ie,this.actors.push(ge)}};function E(C,z,B){var G=function(ie,ue){if(ie)return B(ie);if(ue){var ge=e.pick(e.extend(ue,C),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);ue.vector_layers&&(ge.vectorLayers=ue.vector_layers,ge.vectorLayerIds=ge.vectorLayers.map(function(ye){return ye.id})),ge.tiles=z.canonicalizeTileset(ge,C.url),B(null,ge)}};return C.url?e.getJSON(z.transformRequest(z.normalizeSourceURL(C.url),e.ResourceType.Source),G):e.browser.frame(function(){return G(null,C)})}S.prototype.broadcast=function(C,z,B){B=B||function(){},e.asyncAll(this.actors,function(G,ie){G.send(C,z,ie)},B)},S.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},S.prototype.remove=function(){this.actors.forEach(function(C){C.remove()}),this.actors=[],this.workerPool.release(this.id)},S.Actor=e.Actor;var D=function(C,z,B){this.bounds=e.LngLatBounds.convert(this.validateBounds(C)),this.minzoom=z||0,this.maxzoom=B||24};D.prototype.validateBounds=function(C){return Array.isArray(C)&&C.length===4?[Math.max(-180,C[0]),Math.max(-90,C[1]),Math.min(180,C[2]),Math.min(90,C[3])]:[-180,-90,180,90]},D.prototype.contains=function(C){var z=Math.pow(2,C.z),B=Math.floor(e.mercatorXfromLng(this.bounds.getWest())*z),G=Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*z),ie=Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*z),ue=Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*z);return C.x>=B&&C.x<ie&&C.y>=G&&C.y<ue};var F=function(C){function z(B,G,ie,ue){if(C.call(this),this.id=B,this.dispatcher=ie,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.extend(this,e.pick(G,["url","scheme","tileSize","promoteId"])),this._options=e.extend({type:"vector"},G),this._collectResourceTiming=G.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(ue)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.load=function(){var B=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=E(this._options,this.map._requestManager,function(G,ie){B._tileJSONRequest=null,B._loaded=!0,G?B.fire(new e.ErrorEvent(G)):ie&&(e.extend(B,ie),ie.bounds&&(B.tileBounds=new D(ie.bounds,B.minzoom,B.maxzoom)),e.postTurnstileEvent(ie.tiles,B.map._requestManager._customAccessToken),e.postMapLoadEvent(ie.tiles,B.map._getMapId(),B.map._requestManager._skuToken,B.map._requestManager._customAccessToken),B.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),B.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))})},z.prototype.loaded=function(){return this._loaded},z.prototype.hasTile=function(B){return!this.tileBounds||this.tileBounds.contains(B.canonical)},z.prototype.onAdd=function(B){this.map=B,this.load()},z.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},z.prototype.serialize=function(){return e.extend({},this._options)},z.prototype.loadTile=function(B,G){var ie=this.map._requestManager.normalizeTileURL(B.tileID.canonical.url(this.tiles,this.scheme)),ue={request:this.map._requestManager.transformRequest(ie,e.ResourceType.Tile),uid:B.uid,tileID:B.tileID,zoom:B.tileID.overscaledZ,tileSize:this.tileSize*B.tileID.overscaleFactor(),type:this.t
94ype,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function ge(ye,Me){return delete B.request,B.aborted?G(null):ye&&ye.status!==404?G(ye):(Me&&Me.resourceTiming&&(B.resourceTiming=Me.resourceTiming),this.map._refreshExpiredTiles&&Me&&B.setExpiryData(Me),B.loadVectorData(Me,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),G(null),void(B.reloadCallback&&(this.loadTile(B,B.reloadCallback),B.reloadCallback=null)))}ue.request.collectResourceTiming=this._collectResourceTiming,B.actor&&B.state!=="expired"?B.state==="loading"?B.reloadCallback=G:B.request=B.actor.send("reloadTile",ue,ge.bind(this)):(B.actor=this.dispatcher.getActor(),B.request=B.actor.send("loadTile",ue,ge.bind(this)))},z.prototype.abortTile=function(B){B.request&&(B.request.cancel(),delete B.request),B.actor&&B.actor.send("abortTile",{uid:B.uid,type:this.type,source:this.id},void 0)},z.prototype.unloadTile=function(B){B.unloadVectorData(),B.actor&&B.actor.send("removeTile",{uid:B.uid,type:this.t
vendor: 3,662 bytes, line 94
94ype,source:this.id},void 0)},z.prototype.hasTransition=function(){return!1},z}(e.Evented),H=function(C){function z(B,G,ie,ue){C.call(this),this.id=B,this.dispatcher=ie,this.setEventedParent(ue),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},G),e.extend(this,e.pick(G,["url","scheme","tileSize"]))}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.load=function(){var B=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=E(this._options,this.map._requestManager,function(G,ie){B._tileJSONRequest=null,B._loaded=!0,G?B.fire(new e.ErrorEvent(G)):ie&&(e.extend(B,ie),ie.bounds&&(B.tileBounds=new D(ie.bounds,B.minzoom,B.maxzoom)),e.postTurnstileEvent(ie.tiles),e.postMapLoadEvent(ie.tiles,B.map._getMapId(),B.map._requestManager._skuToken),B.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),B.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))})},z.prototype.loaded=function(){return this._loaded},z.prototype.onAdd=function(B){this.map=B,this.load()},z.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},z.prototype.serialize=function(){return e.extend({},this._options)},z.prototype.hasTile=function(B){return!this.tileBounds||this.tileBounds.contains(B.canonical)},z.prototype.loadTile=function(B,G){var ie=this,ue=this.map._requestManager.normalizeTileURL(B.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);B.request=e.getImage(this.map._requestManager.transformRequest(ue,e.ResourceType.Tile),function(ge,ye){if(delete B.request,B.aborted)B.state="unloaded",G(null);else if(ge)B.state="errored",G(ge);else if(ye){ie.map._refreshExpiredTiles&&B.setExpiryData(ye),delete ye.cacheControl,delete ye.expires;var Me=ie.map.painter.context,je=Me.gl;B.texture=ie.map.painter.getTileTexture(ye.width),B.texture?B.texture.update(ye,{useMipmap:!0}):(B.texture=new e.Texture(Me,ye,je.RGBA,{useMipmap:!0}),B.texture.bind(je.LINEAR,je.CLAMP_TO_EDGE,je.LINEAR_MIPMAP_NEAREST),Me.extTextureFilterAnisotropic&&je.texParameterf(je.TEXTURE_2D,Me.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Me.extTextureFilterAnisotropicMax)),B.state="loaded",e.cacheEntryPossiblyAdded(ie.dispatcher),G(null)}})},z.prototype.abortTile=function(B,G){B.request&&(B.request.cancel(),delete B.request),G()},z.prototype.unloadTile=function(B,G){B.texture&&this.map.painter.saveTileTexture(B.texture),G()},z.prototype.hasTransition=function(){return!1},z}(e.Evented),V=function(C){function z(B,G,ie,ue){C.call(this,B,G,ie,ue),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},G),this.encoding=G.encoding||"mapbox"}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},z.prototype.loadTile=function(B,G){var ie=this.map._requestManager.normalizeTileURL(B.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function ue(ge,ye){ge&&(B.state="errored",G(ge)),ye&&(B.dem=ye,B.needsHillshadePrepare=!0,B.state="loaded",G(null))}B.request=e.getImage(this.map._requestManager.transformRequest(ie,e.ResourceType.Tile),function(ge,ye){if(delete B.request,B.aborted)B.state="unloaded",G(null);else if(ge)B.state="errored",G(ge);else if(ye){this.map._refreshExpiredTiles&&B.setExpiryData(ye),delete ye.cacheControl,delete ye.expires;
94var Me=e.window.ImageBitmap&&ye instanceof e.window.ImageBitmap&&e.offscreenCanvasSupported()?ye:e.browser.getImageData(ye,1),je={uid:B.uid,coord:B.tileID,source:this.id,rawImageData:Me,encoding:this.encoding};B.actor&&B.state!=="expired"||(B.actor=this.dispatcher.getActor(),B.actor.send("loadDEMTile",je,ue.bind(this)))}}.bind(this)),B.neighboringTiles=this._getNeighboringTiles(B.tileID)},z.prototype._getNeighboringTiles=function(B){var G=B.canonical,ie=Math.pow(2,G.z),ue=(G.x-1+ie)%ie,ge=G.x===0?B.wrap-1:B.wrap,ye=(G.x+1+ie)%ie,Me=G.x+1===ie?B.wrap+1:B.wrap,je={};return je[new e.OverscaledTileID(B.overscaledZ,ge,G.z,ue,G.y).key]={backfilled:!1},je[new e.OverscaledTileID(B.overscaledZ,Me,G.z,ye,G.y).key]={backfilled:!1},G.y>0&&(je[new e.OverscaledTileID(B.overscaledZ,ge,G.z,ue,G.y-1).key]={backfilled:!1},je[new e.OverscaledTileID(B.overscaledZ,B.wrap,G.z,G.x,G.y-1).key]={backfilled:!1},je[new e.OverscaledTileID(B.overscaledZ,Me,G.z,ye,G.y-1).key]={backfilled:!1}),G.y+1<ie&&(je[new e.OverscaledTileID(B.overscaledZ,ge,G.z,ue,G.y+1).key]={backfilled:!1},je[new e.OverscaledTileID(B.overscaledZ,B.wrap,G.z,G.x,G.y+1).key]={backfilled:!1},je[new e.OverscaledTileID(B.overscaledZ,Me,G.z,ye,G.y+1).key]={backfilled:!1}),je},z.prototype.unloadTile=function(B){B.demTexture&&this.map.painter.saveTileTexture(B.demTexture),B.fbo&&(B.fbo.destroy(),delete B.fbo),B.dem&&delete B.dem,delete B.neighboringTiles,B.state="unloaded",B.actor&&B.actor.send("removeDEMTile",{uid:B.uid,source:this.id})},z}(H),Z=function(C){function z(B,G,ie,ue){C.call(this),this.id=B,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=ie.getActor(),this.setEventedParent(ue),this._data=G.data,this._options=e.extend({},G),this._collectResourceTiming=G.collectResourceTiming,this._resourceTiming=[],G.maxzoom!==void 0&&(this.maxzoom=G.maxzoom),G.type&&(this.type=G.type),G.attribution&&(this.attribution=G.attribution),this.promoteId=G.promoteId;var ge=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:G.cluster||!1,geojsonVtOptions:{buffer:(G.buffer!==void 0?G.buffer:128)*ge,tolerance:(G.tolerance!==void 0?G.tolerance:.375)*ge,extent:e.EXTENT,maxZoom:this.maxzoom,lineMetrics:G.lineMetrics||!1,generateId:G.generateId||!1},superclusterOptions:{maxZoom:G.clusterMaxZoom!==void 0?Math.min(G.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:e.EXTENT,radius:(G.clusterRadius||50)*ge,log:!1,generateId:G.generateId||!1},clusterProperties:G.clusterProperties},G.workerOptions)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.load=function(){var B=this;this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(G){if(G)B.fire(new e.ErrorEvent(G));else{var ie={dataType:"source",sourceDataType:"metadata"};B._collectResourceTiming&&B._resourceTiming&&B._resourceTiming.length>0&&(ie.resourceTiming=B._resourceTiming,B._resourceTiming=[]),B.fire(new e.Event("data",ie))}})},z.prototype.onAdd=function(B){this.map=B,this.load()},z.prototype.setData=function(B){var G=this;return this._data=B,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ie){if(ie)G.fire(new e.ErrorEvent(ie));else{var ue={dataType:"source",sourceDataType:"content"};G._collectResourceTiming&&G._resourceTiming&&G._resourceTiming.length>0&&(ue.resourceTiming=G._resourceTiming,G._resourceTiming=[]),G.fire(new e.Event("data",ue))}}),this},z.prototype.getClusterExpansionZoom=function(B,G){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:B,source:this.id},G),this},z.prototype.getClusterChildren=function(B,G){return this.actor.send("geojson.getClusterChildren",{clusterId:B,source:this.id},G),this},z.prototype.getClusterLeaves=function(B,G,ie,ue){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:B,limit:G,offset:ie},ue),this},z.prototype._updateWorkerData=function(B){var G=this;this._loaded=!1;var ie=e.extend({},this.workerOptions),ue=this._data;typeof ue=="string"?(ie.request=this.map._requestManager.transformRequest(e.browser.resolveURL(ue),e.ResourceType.Source),ie.request.collectResourceTiming=this._collectResourceTiming):ie.data=JSON.stringify(ue),this.actor.send(this.type+".loadData",ie,function(ge,ye){G._removed||ye&&ye.abandoned||(G._loaded=!0,ye&&ye.resourceTiming&&ye.resourceTiming[G.id]&&(G._resourceTiming=ye.resourceTiming[G.id].slice(0)),G.actor.send(G.type+".coalesce",{source:ie.source},null),B(ge))})},z.prototype.loaded=function(){return this._loaded},z.prototype.loadTile=function(B,G){var ie=this,ue=B.actor?"reloadTile":"loadTile";B.actor=this.actor;
94var ge={type:this.type,uid:B.uid,tileID:B.tileID,zoom:B.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};B.request=this.actor.send(ue,ge,function(ye,Me){return delete B.request,B.unloadVectorData(),B.aborted?G(null):ye?G(ye):(B.loadVectorData(Me,ie.map.painter,ue==="reloadTile"),G(null))})},z.prototype.abortTile=function(B){B.request&&(B.request.cancel(),delete B.request),B.aborted=!0},z.prototype.unloadTile=function(B){B.unloadVectorData(),this.actor.send("removeTile",{uid:B.uid,type:this.type,source:this.id})},z.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},z.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},z.prototype.hasTransition=function(){return!1},z}(e.Evented),K=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),q=function(C){function z(B,G,ie,ue){C.call(this),this.id=B,this.dispatcher=ie,this.coordinates=G.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ue),this.options=G}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.load=function(B,G){var ie=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),function(ue,ge){ie._loaded=!0,ue?ie.fire(new e.ErrorEvent(ue)):ge&&(ie.image=ge,B&&(ie.coordinates=B),G&&G(),ie._finishLoading())})},z.prototype.loaded=function(){return this._loaded},z.prototype.updateImage=function(B){var G=this;return this.image&&B.url?(this.options.url=B.url,this.load(B.coordinates,function(){G.texture=null}),this):this},z.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},z.prototype.onAdd=function(B){this.map=B,this.load()},z.prototype.setCoordinates=function(B){var G=this;this.coordinates=B;var ie=B.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(ge){for(var ye=1/0,Me=1/0,je=-1/0,We=-1/0,nt=0,bt=ge;nt<bt.length;nt+=1){var At=bt[nt];ye=Math.min(ye,At.x),Me=Math.min(Me,At.y),je=Math.max(je,At.x),We=Math.max(We,At.y)}var _t=je-ye,wt=We-Me,xt=Math.max(_t,wt),Ft=Math.max(0,Math.floor(-Math.log(xt)/Math.LN2)),Ot=Math.pow(2,Ft);return new e.CanonicalTileID(Ft,Math.floor((ye+je)/2*Ot),Math.floor((Me+We)/2*Ot))}(ie),this.minzoom=this.maxzoom=this.tileID.z;var ue=ie.map(function(ge){return G.tileID.getTilePoint(ge)._round()});return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(ue[0].x,ue[0].y,0,0),this._boundsArray.emplaceBack(ue[1].x,ue[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(ue[3].x,ue[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(ue[2].x,ue[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},z.prototype.prepare=function(){if(Object.keys(this.tiles).length!==0&&this.image){var B=this.map.painter.context,G=B.gl;for(var ie in this.boundsBuffer||(this.boundsBuffer=B.createVertexBuffer(this._boundsArray,K.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(B,this.image,G.RGBA),this.texture.bind(G.LINEAR,G.CLAMP_TO_EDGE)),this.tiles){var ue=this.tiles[ie];ue.state!=="loaded"&&(ue.state="loaded",ue.texture=this.texture)}}},z.prototype.loadTile=function(B,G){this.tileID&&this.tileID.equals(B.tileID.canonical)?(this.tiles[String(B.tileID.wrap)]=B,B.buckets={},G(null)):(B.state="errored",G(null))},z.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},z.prototype.hasTransition=function(){return!1},z}(e.Evented),W=function(C){function z(B,G,ie,ue){C.call(this,B,G,ie,ue),this.roundZoom=!0,this.type="video",this.options=G}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.load=function(){var B=this;this._loaded=!1;var G=this.options;this.urls=[];for(var ie=0,ue=G.urls;ie<ue.length;ie+=1){var ge=ue[ie];this.urls.push(this.map._requestManager.transformRequest(ge,e.ResourceType.Source).url)}e.getVideo(this.urls,function(ye,Me){B._loaded=!0,ye?B.fire(new e.ErrorEvent(ye)):Me&&(B.video=Me,B.video.loop=!0,B.video.addEventListener("playing",function(){B.map.triggerRepaint()}),B.map&&B.video.play(),B._finishLoading())})},z.prototype.pause=function(){this.video&&this.video.pause()},z.prototype.play=function(){this.video&&this.video.play()},z.prototype.seek=function(B){if(this.video){var G=this.video.seekable;B<G.start(0)||B>G.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+G.start(0)+" and "+G.end(0)+"-second mark."))):this.video.currentTime=B}},z.prototype.getVideo=function(){return this.video}
94,z.prototype.onAdd=function(B){this.map||(this.map=B,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},z.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var B=this.map.painter.context,G=B.gl;for(var ie in this.boundsBuffer||(this.boundsBuffer=B.createVertexBuffer(this._boundsArray,K.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(G.LINEAR,G.CLAMP_TO_EDGE),G.texSubImage2D(G.TEXTURE_2D,0,0,0,G.RGBA,G.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(B,this.video,G.RGBA),this.texture.bind(G.LINEAR,G.CLAMP_TO_EDGE)),this.tiles){var ue=this.tiles[ie];ue.state!=="loaded"&&(ue.state="loaded",ue.texture=this.texture)}}},z.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},z.prototype.hasTransition=function(){return this.video&&!this.video.paused},z}(q),$=function(C){function z(B,G,ie,ue){C.call(this,B,G,ie,ue),G.coordinates?Array.isArray(G.coordinates)&&G.coordinates.length===4&&!G.coordinates.some(function(ge){return!Array.isArray(ge)||ge.length!==2||ge.some(function(ye){return typeof ye!="number"})})||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+B,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+B,null,'missing required property "coordinates"'))),G.animate&&typeof G.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+B,null,'optional "animate" property must be a boolean value'))),G.canvas?typeof G.canvas=="string"||G.canvas instanceof e.
vendor: 7,297 bytes, line 94
94window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+B,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+B,null,'missing required property "canvas"'))),this.options=G,this.animate=G.animate===void 0||G.animate}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},z.prototype.getCanvas=function(){return this.canvas},z.prototype.onAdd=function(B){this.map=B,this.load(),this.canvas&&this.animate&&this.play()},z.prototype.onRemove=function(){this.pause()},z.prototype.prepare=function(){var B=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,B=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,B=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var G=this.map.painter.context,ie=G.gl;for(var ue in this.boundsBuffer||(this.boundsBuffer=G.createVertexBuffer(this._boundsArray,K.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(B||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(G,this.canvas,ie.RGBA,{premultiply:!0}),this.tiles){var ge=this.tiles[ue];ge.state!=="loaded"&&(ge.state="loaded",ge.texture=this.texture)}}},z.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},z.prototype.hasTransition=function(){return this._playing},z.prototype._hasInvalidDimensions=function(){for(var B=0,G=[this.canvas.width,this.canvas.height];B<G.length;B+=1){var ie=G[B];if(isNaN(ie)||ie<=0)return!0}return!1},z}(q),R={vector:F,raster:H,"raster-dem":V,geojson:Z,video:W,image:q,canvas:$};function N(C,z){var B=e.identity([]);return e.translate(B,B,[1,1,0]),e.scale(B,B,[.5*C.width,.5*C.height,1]),e.multiply(B,B,C.calculatePosMatrix(z.toUnwrapped()))}function U(C,z,B,G,ie,ue){var ge=function(wt,xt,Ft){if(wt)for(var Ot=0,Nt=wt;Ot<Nt.length;Ot+=1){var er=xt[Nt[Ot]];if(er&&er.source===Ft&&er.type==="fill-extrusion")return!0}else for(var fr in xt){var kr=xt[fr];if(kr.source===Ft&&kr.type==="fill-extrusion")return!0}return!1}(ie&&ie.layers,z,C.id),ye=ue.maxPitchScaleFactor(),Me=C.tilesIn(G,ye,ge);Me.sort(Q);for(var je=[],We=0,nt=Me;We<nt.length;We+=1){var bt=nt[We];je.push({wrappedTileID:bt.tileID.wrapped().key,queryResults:bt.tile.queryRenderedFeatures(z,B,C._state,bt.queryGeometry,bt.cameraQueryGeometry,bt.scale,ie,ue,ye,N(C.transform,bt.tileID))})}var At=function(wt){for(var xt={},Ft={},Ot=0,Nt=wt;Ot<Nt.length;Ot+=1){var er=Nt[Ot],fr=er.queryResults,kr=er.wrappedTileID,Tr=Ft[kr]=Ft[kr]||{};for(var Jr in fr)for(var Xr=fr[Jr],hn=Tr[Jr]=Tr[Jr]||{},on=xt[Jr]=xt[Jr]||[],Nn=0,Gn=Xr;Nn<Gn.length;Nn+=1){var oa=Gn[Nn];hn[oa.featureIndex]||(hn[oa.featureIndex]=!0,on.push(oa))}}return xt}(je);for(var _t in At)At[_t].forEach(function(wt){var xt=wt.feature,Ft=C.getFeatureState(xt.layer["source-layer"],xt.id);xt.source=xt.layer.source,xt.layer["source-layer"]&&(xt.sourceLayer=xt.layer["source-layer"]),xt.state=Ft});return At}function Q(C,z){var B=C.tileID,G=z.tileID;return B.overscaledZ-G.overscaledZ||B.canonical.y-G.canonical.y||B.wrap-G.wrap||B.canonical.x-G.canonical.x}var j=function(C,z){this.max=C,this.onRemove=z,this.reset()};j.prototype.reset=function(){for(var C in this.data)for(var z=0,B=this.data[C];z<B.length;z+=1){var G=B[z];G.timeout&&clearTimeout(G.timeout),this.onRemove(G.value)}return this.data={},this.order=[],this},j.prototype.add=function(C,z,B){var G=this,ie=C.wrapped().key;this.data[ie]===void 0&&(this.data[ie]=[]);var ue={value:z,timeout:void 0};if(B!==void 0&&(ue.timeout=setTimeout(function(){G.remove(C,ue)},B)),this.data[ie].push(ue),this.order.push(ie),this.order.length>this.max){var ge=this._getAndRemoveByKey(this.order[0]);ge&&this.onRemove(ge)}return this},j.prototype.has=function(C){return C.wrapped().key in this.data},j.prototype.getAndRemove=function(C){return this.has(C)?this._getAndRemoveByKey(C.wrapped().key):null},j.prototype._getAndRemoveByKey=function(C){var z=this.data[C].shift();return z.timeout&&clearTimeout(z.timeout),this.data[C].length===0&&delete this.data[C],this.order.splice(this.order.indexOf(C),1),z.value},j.prototype.getByKey=function(C){var z=this.data[C];return z?z[0].value:null},j.prototype.get=function(C){return this.has(C)?this.data[C.wrapped().key][0].value:null},j.prototype.remove=function(C,z){if(!this.has(C))return this;var B=C.wrapped().key,G=z===void 0?0:this.data[B].indexOf(z),ie=this.data[B][G];return this.data[B].splice(G,1),ie.timeout&&clearTimeout(ie.timeout),this.data[B].length===0&&delete this.data[B],this.onRemove(ie.value),this.order.splice(this.order.indexOf(B),1),this},j.prototype.setMaxSize=function(C){for(this.max=C;this.order.length>this.max;){var z=this._getAndRemoveByKey(this.order[0]);z&&this.onRemove(z)}return this},j.prototype.filter=function(C){var z=[];for(var B in this.data)for(var G=0,ie=this.data[B];G<ie.length;G+=1){var ue=ie[G];C(ue.value)||z.push(ue)}for(var ge=0,ye=z;ge<ye.length;ge+=1){var Me=ye[ge];this.remove(Me.value.tileID,Me)}};var X=function(C,z,B){this.context=C;var G=C.gl;this.buffer=G.createBuffer(),this.dynamicDraw=!!B,this.context.unbindVAO(),C.bindElementBuffer.set(this.buffer),G.bufferData(G.ELEMENT_ARRAY_BUFFER,z.arrayBuffer,this.dynamicDraw?G.DYNAMIC_DRAW:G.STATIC_DRAW),this.dynamicDraw||delete z.arrayBuffer};X.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},X.prototype.updateData=function(C){var z=this.context.gl;this.context.unbindVAO(),this.bind(),z.bufferSubData(z.ELEMENT_ARRAY_BUFFER,0,C.arrayBuffer)},X.prototype.destroy=function(){var C=this.context.gl;this.buffer&&(C.deleteBuffer(this.buffer),delete this.buffer)};var J={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},re=function(C,z,B,G){this.length=z.length,this.attributes=B,this.itemSize=z.bytesPerElement,this.dynamicDraw=G,this.context=C;var ie=C.gl;this.buffer=ie.createBuffer(),C.bindVertexBuffer.set(this.buffer),ie.bufferData(ie.ARRAY_BUFFER,z.arrayBuffer,this.dynamicDraw?ie.DYNAMIC_DRAW:ie.STATIC_DRAW),this.dynamicDraw||delete z.arrayBuffer};re.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},re.prototype.updateData=function(C){var z=this.context.gl;this.bind(),z.bufferSubData(z.ARRAY_BUFFER,0,C.arrayBuffer)},re.prototype.enableAttributes=function(C,z){for(var B=0;B<this.attributes.length;B++){var G=this.attributes[B],ie=z.attributes[G.name];ie!==void 0&&C.enableVertexAttribArray(ie)}},re.prototype.setVertexAttribPointers=function(C,z,B){for(var G=0;G<this.attributes.length;
vendor: 12,522 bytes, line 94
94G++){var ie=this.attributes[G],ue=z.attributes[ie.name];ue!==void 0&&C.vertexAttribPointer(ue,ie.components,C[J[ie.type]],!1,this.itemSize,ie.offset+this.itemSize*(B||0))}},re.prototype.destroy=function(){var C=this.context.gl;this.buffer&&(C.deleteBuffer(this.buffer),delete this.buffer)};var ne=function(C){this.gl=C.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};ne.prototype.get=function(){return this.current},ne.prototype.set=function(C){},ne.prototype.getDefault=function(){return this.default},ne.prototype.setDefault=function(){this.set(this.default)};var se=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return e.Color.transparent},z.prototype.set=function(B){var G=this.current;(B.r!==G.r||B.g!==G.g||B.b!==G.b||B.a!==G.a||this.dirty)&&(this.gl.clearColor(B.r,B.g,B.b,B.a),this.current=B,this.dirty=!1)},z}(ne),oe=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return 1},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.clearDepth(B),this.current=B,this.dirty=!1)},z}(ne),pe=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return 0},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.clearStencil(B),this.current=B,this.dirty=!1)},z}(ne),ce=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return[!0,!0,!0,!0]},z.prototype.set=function(B){var G=this.current;(B[0]!==G[0]||B[1]!==G[1]||B[2]!==G[2]||B[3]!==G[3]||this.dirty)&&(this.gl.colorMask(B[0],B[1],B[2],B[3]),this.current=B,this.dirty=!1)},z}(ne),de=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return!0},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.depthMask(B),this.current=B,this.dirty=!1)},z}(ne),xe=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return 255},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.stencilMask(B),this.current=B,this.dirty=!1)},z}(ne),we=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},z.prototype.set=function(B){var G=this.current;(B.func!==G.func||B.ref!==G.ref||B.mask!==G.mask||this.dirty)&&(this.gl.stencilFunc(B.func,B.ref,B.mask),this.current=B,this.dirty=!1)},z}(ne),be=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){var B=this.gl;return[B.KEEP,B.KEEP,B.KEEP]},z.prototype.set=function(B){var G=this.current;(B[0]!==G[0]||B[1]!==G[1]||B[2]!==G[2]||this.dirty)&&(this.gl.stencilOp(B[0],B[1],B[2]),this.current=B,this.dirty=!1)},z}(ne),Ee=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;B?G.enable(G.STENCIL_TEST):G.disable(G.STENCIL_TEST),this.current=B,this.dirty=!1}},z}(ne),fe=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return[0,1]},z.prototype.set=function(B){var G=this.current;(B[0]!==G[0]||B[1]!==G[1]||this.dirty)&&(this.gl.depthRange(B[0],B[1]),this.current=B,this.dirty=!1)},z}(ne),me=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;B?G.enable(G.DEPTH_TEST):G.disable(G.DEPTH_TEST),this.current=B,this.dirty=!1}},z}(ne),Te=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return this.gl.LESS},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.depthFunc(B),this.current=B,this.dirty=!1)},z}(ne),_e=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;B?G.enable(G.BLEND):G.disable(G.BLEND),this.current=B,this.dirty=!1}},z}(ne),Ae=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){var B=this.gl;return[B.ONE,B.ZERO]},z.prototype.set=function(B){var G=this.current;(B[0]!==G[0]||B[1]!==G[1]||this.dirty)&&(this.gl.blendFunc(B[0],B[1]),this.current=B,this.dirty=!1)},z}(ne),Pe=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return e.Color.transparent},z.prototype.set=function(B){var G=this.current;(B.r!==G.r||B.g!==G.g||B.b!==G.b||B.a!==G.a||this.dirty)&&(this.gl.blendColor(B.r,B.g,B.b,B.a),this.current=B,this.dirty=!1)},z}(ne),De=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return this.gl.FUNC_ADD},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.blendEquation(B),this.current=B,this.dirty=!1)},z}(ne),Ve=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;B?G.enable(G.CULL_FACE):G.disable(G.CULL_FACE),this.current=B,this.dirty=!1}},z}(ne),Qe=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return this.gl.BACK},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.cullFace(B),this.current=B,this.dirty=!1)},z}(ne),Oe=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return this.gl.CCW},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.frontFace(B),this.current=B,this.dirty=!1)},z}(ne),Ue=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.useProgram(B),this.current=B,this.dirty=!1)},z}(ne),Ge=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return this.gl.TEXTURE0},z.prototype.set=function(B){(B!==this.current||this.dirty)&&(this.gl.activeTexture(B),this.current=B,this.dirty=!1)},z}(ne),Ye=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){var B=this.gl;return[0,0,B.drawingBufferWidth,B.drawingBufferHeight]},z.prototype.set=function(B){var G=this.current;(B[0]!==G[0]||B[1]!==G[1]||B[2]!==G[2]||B[3]!==G[3]||this.dirty)&&(this.gl.viewport(B[0],B[1],B[2],B[3]),this.current=B,this.dirty=!1)},z}(ne),tt=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;G.bindFramebuffer(G.FRAMEBUFFER,B),this.current=B,this.dirty=!1}},z}(ne),lt=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;G.bindRenderbuffer(G.RENDERBUFFER,B),this.current=B,this.dirty=!1}},z}(ne),vt=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;G.bindTexture(G.TEXTURE_2D,B),this.current=B,this.dirty=!1}},z}(ne),It=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;G.bindBuffer(G.ARRAY_BUFFER,B),this.current=B,this.dirty=!1}},z}(ne),St=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},z.prototype.set=function(B){var G=this.gl;G.bindBuffer(G.ELEMENT_ARRAY_BUFFER,B),this.current=B,this.dirty=!1},z}(ne),rt=function(C){function z(B){C.call(this,B),this.vao=B.extVertexArrayObject}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},z.prototype.set=function(B){this.vao&&(B!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(B),this.current=B,this.dirty=!1)},z}(ne),et=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return 4},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;G.pixelStorei(G.UNPACK_ALIGNMENT,B),this.current=B,this.dirty=!1}},z}(ne),Tt=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;G.pixelStorei(G.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B),this.current=B,this.dirty=!1}},z}(ne),Vt=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var G=this.gl;G.pixelStorei(G.UNPACK_FLIP_Y_WEBGL,B),this.current=B,this.dirty=!1}},z}(ne),Kt=function(C){function z(B,G){C.call(this,B),this.context=B,this.parent=G}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},z}(ne),Be=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.setDirty=function(){this.dirty=!0},z.prototype.set=function(B){if(B!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var G=this.gl;G.framebufferTexture2D(G.FRAMEBUFFER,G.COLOR_ATTACHMENT0,G.TEXTURE_2D,B,0),this.current=B,this.dirty=!1}},z}(Kt),qe=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.set=function(B){if(B!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var G=this.gl;G.framebufferRenderbuffer(G.FRAMEBUFFER,G.DEPTH_ATTACHMENT,G.RENDERBUFFER,B),this.current=B,this.dirty=!1}},z}(Kt),Re=function(C,z,B,G){this.context=C,this.width=z,this.height=B;var ie=C.gl,ue=this.framebuffer=ie.createFramebuffer();
vendor: 4,882 bytes, line 94
94this.colorAttachment=new Be(C,ue),G&&(this.depthAttachment=new qe(C,ue))};Re.prototype.destroy=function(){var C=this.context.gl,z=this.colorAttachment.get();if(z&&C.deleteTexture(z),this.depthAttachment){var B=this.depthAttachment.get();B&&C.deleteRenderbuffer(B)}C.deleteFramebuffer(this.framebuffer)};var Xe=function(C,z,B){this.func=C,this.mask=z,this.range=B};Xe.ReadOnly=!1,Xe.ReadWrite=!0,Xe.disabled=new Xe(519,Xe.ReadOnly,[0,1]);var ke=function(C,z,B,G,ie,ue){this.test=C,this.ref=z,this.mask=B,this.fail=G,this.depthFail=ie,this.pass=ue};ke.disabled=new ke({func:519,mask:0},0,0,7680,7680,7680);var Le=function(C,z,B){this.blendFunction=C,this.blendColor=z,this.mask=B};Le.disabled=new Le(Le.Replace=[1,0],e.Color.transparent,[!1,!1,!1,!1]),Le.unblended=new Le(Le.Replace,e.Color.transparent,[!0,!0,!0,!0]),Le.alphaBlended=new Le([1,771],e.Color.transparent,[!0,!0,!0,!0]);var Ie=function(C,z,B){this.enable=C,this.mode=z,this.frontFace=B};Ie.disabled=new Ie(!1,1029,2305),Ie.backCCW=new Ie(!0,1029,2305);var Ce=function(C){this.gl=C,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new se(this),this.clearDepth=new oe(this),this.clearStencil=new pe(this),this.colorMask=new ce(this),this.depthMask=new de(this),this.stencilMask=new xe(this),this.stencilFunc=new we(this),this.stencilOp=new be(this),this.stencilTest=new Ee(this),this.depthRange=new fe(this),this.depthTest=new me(this),this.depthFunc=new Te(this),this.blend=new _e(this),this.blendFunc=new Ae(this),this.blendColor=new Pe(this),this.blendEquation=new De(this),this.cullFace=new Ve(this),this.cullFaceSide=new Qe(this),this.frontFace=new Oe(this),this.program=new Ue(this),this.activeTexture=new Ge(this),this.viewport=new Ye(this),this.bindFramebuffer=new tt(this),this.bindRenderbuffer=new lt(this),this.bindTexture=new vt(this),this.bindVertexBuffer=new It(this),this.bindElementBuffer=new St(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new rt(this),this.pixelStoreUnpack=new et(this),this.pixelStoreUnpackPremultiplyAlpha=new Tt(this),this.pixelStoreUnpackFlipY=new Vt(this),this.extTextureFilterAnisotropic=C.getExtension("EXT_texture_filter_anisotropic")||C.getExtension("MOZ_EXT_texture_filter_anisotropic")||C.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=C.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=C.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(C.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=C.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=C.getExtension("EXT_disjoint_timer_query")};Ce.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Ce.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Ce.prototype.createIndexBuffer=function(C,z){return new X(this,C,z)},Ce.prototype.createVertexBuffer=function(C,z,B){return new re(this,C,z,B)},Ce.prototype.createRenderbuffer=function(C,z,B){var G=this.gl,ie=G.createRenderbuffer();return this.bindRenderbuffer.set(ie),G.renderbufferStorage(G.RENDERBUFFER,C,z,B),this.bindRenderbuffer.set(null),ie},Ce.prototype.createFramebuffer=function(C,z,B){return new Re(this,C,z,B)}
94,Ce.prototype.clear=function(C){var z=C.color,B=C.depth,G=this.gl,ie=0;z&&(ie|=G.COLOR_BUFFER_BIT,this.clearColor.set(z),this.colorMask.set([!0,!0,!0,!0])),B!==void 0&&(ie|=G.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(B),this.depthMask.set(!0)),G.clear(ie)},Ce.prototype.setCullFace=function(C){C.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(C.mode),this.frontFace.set(C.frontFace))},Ce.prototype.setDepthMode=function(C){C.func!==this.gl.ALWAYS||C.mask?(this.depthTest.set(!0),this.depthFunc.set(C.func),this.depthMask.set(C.mask),this.depthRange.set(C.range)):this.depthTest.set(!1)},Ce.prototype.setStencilMode=function(C){C.test.func!==this.gl.ALWAYS||C.mask?(this.stencilTest.set(!0),this.stencilMask.set(C.mask),this.stencilOp.set([C.fail,C.depthFail,C.pass]),this.stencilFunc.set({func:C.test.func,ref:C.ref,mask:C.test.mask})):this.stencilTest.set(!1)},Ce.prototype.setColorMode=function(C){e.deepEqual(C.blendFunction,Le.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(C.blendFunction),this.blendColor.set(C.blendColor)),this.colorMask.set(C.mask)},Ce.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Je=function(C){function z(B,G,ie){var ue=this;C.call(this),this.id=B,this.dispatcher=ie,this.on("data",function(ge){ge.dataType==="source"&&ge.sourceDataType==="metadata"&&(ue._sourceLoaded=!0),ue._sourceLoaded&&!ue._paused&&ge.dataType==="source"&&ge.sourceDataType==="content"&&(ue.reload(),ue.transform&&ue.update(ue.transform))}),this.on("error",function(){ue._sourceErrored=!0}),this._source=function(ge,ye,Me,je){var We=new R[ye.type](ge,ye,Me,je);if(We.id!==ge)throw new Error("Expected Source id to be "+ge+" instead of "+We.id);return e.bindAll(["load","abort","unload","serialize","prepare"],We),We}(B,G,ie,this),this._tiles={},this._cache=new j(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new e.SourceFeatureState}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.onAdd=function(B){this.map=B,this._maxTileCacheSize=B?B._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(B)},z.prototype.onRemove=function(B){this._source&&this._source.onRemove&&this._source.onRemove(B)},z.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var B in this._tiles){var G=this._tiles[B];if(G.state!=="loaded"&&G.state!=="errored")return!1}return!0},z.prototype.getSource=function(){return this._source},z.prototype.pause=function(){this._paused=!0},z.prototype.resume=function(){if(this._paused){var B=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,B&&this.reload(),this.transform&&this.update(this.transform)}},z.prototype._loadTile=function(B,G){return this._source.loadTile(B,G)},z.prototype._unloadTile=function(B){if(this._source.unloadTile)return this._source.unloadTile(B,function(){})},z.prototype._abortTile=function(B){if(this._source.abortTile)return this._source.abortTile(B,function(){})},z.prototype.serialize=function(){return this._source.serialize()},z.prototype.prepare=function(B){for(var G in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var ie=this._tiles[G];ie.upload(B),ie.prepare(this.map.style.imageManager)}},z.prototype.getIds=function(){return e.values(this._tiles).map(function(B){return B.tileID}).sort(it).map(function(B){return B.key})},z.prototype.getRenderableIds=function(B){var G=this,ie=[];for(var ue in this._tiles)this._isIdRenderable(ue,B)&&ie.push(this._tiles[ue]);return B?ie.sort(function(ge,ye){var Me=ge.tileID,je=ye.tileID,We=new e.Point(Me.canonical.x,Me.canonical.y)._rotate(G.transform.angle),nt=new e.Point(je.canonical.x,je.canonical.y)._rotate(G.transform.angle);return Me.overscaledZ-je.overscaledZ||nt.y-We.y||nt.x-We.x}).map(function(ge){return ge.tileID.key}):ie.map(function(ge){return ge.tileID}).sort(it).map(function(ge){return ge.key})},z.prototype.hasRenderableParent=function(B){var G=this.findLoadedParent(B,0);return!!G&&this._isIdRenderable(G.tileID.key)},z.prototype._isIdRenderable=function(B,G){return this._tiles[B]&&this._tiles[B].hasData()&&!this._coveredTiles[B]&&(G||!this._tiles[B].holdingForFade())},z.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var B in this._cache.reset(),this._tiles)this._tiles[B].state!=="errored"&&this._reloadTile(B,"reloading")},z.prototype._reloadTile=function(B,G){var ie=this._tiles[B];ie&&(ie.state!=="loading"&&(ie.state=G),this._loadTile(ie,this._tileLoaded.bind(this,ie,B,G)))},z.prototype._tileLoaded=function(B,G,ie,ue){if(ue)return B.state="errored",void(ue.
94status!==404?this._source.fire(new e.ErrorEvent(ue,{tile:B})):this.update(this.transform));B.timeAdded=e.browser.now(),ie==="expired"&&(B.refreshedUponExpiration=!0),this._setTileReloadTimer(G,B),this.getSource().type==="raster-dem"&&B.dem&&this._backfillDEM(B),this._state.initializeTileState(B,this.map?this.map.painter:null),this._source.fire(new e.Event("data",{dataType:"source",tile:B,coord:B.tileID}))},z.prototype._backfillDEM=function(B){for(var G=this.getRenderableIds(),ie=0;ie<G.length;ie++){var ue=G[ie];if(B.neighboringTiles&&B.neighboringTiles[ue]){var ge=this.getTileByID(ue);ye(B,ge),ye(ge,B)}}function ye(Me,je){Me.needsHillshadePrepare=!0;var We=je.tileID.canonical.x-Me.tileID.canonical.x,nt=je.tileID.canonical.y-Me.tileID.canonical.y,bt=Math.pow(2,Me.tileID.canonical.z),At=je.tileID.key;We===0&&nt===0||Math.abs(nt)>1||(Math.abs(We)>1&&(Math.abs(We+bt)===1?We+=bt:Math.abs(We-bt)===1&&(We-=bt)),je.dem&&Me.dem&&(Me.dem.backfillBorder(je.dem,We,nt),Me.neighboringTiles&&Me.neighboringTiles[At]&&(Me.neighboringTiles[At].backfilled=!0)))}},z.prototype.getTile=function(B){return this.getTileByID(B.key)},z.prototype.getTileByID=function(B){return this._tiles[B]},z.prototype._retainLoadedChildren=function(B,G,ie,ue){for(var ge in this._tiles){var ye=this._tiles[ge];if(!(ue[ge]||!ye.hasData()||ye.tileID.overscaledZ<=G||ye.tileID.overscaledZ>ie)){for(var Me=ye.tileID;ye&&ye.tileID.overscaledZ>G+1;){var je=ye.tileID.scaledTo(ye.tileID.overscaledZ-1);(ye=this._tiles[je.key])&&ye.hasData()&&(Me=je)}for(var We=Me;We.overscaledZ>G;)if(B[(We=We.scaledTo(We.overscaledZ-1)).key]){ue[Me.key]=Me;break}}}},z.prototype.findLoadedParent=function(B,G){if(B.key in this._loadedParentTiles){var ie=this._loadedParentTiles[B.key];return ie&&ie.tileID.overscaledZ>=G?ie:null}for(var ue=B.overscaledZ-1;ue>=G;ue--){var ge=B.scaledTo(ue),ye=this._getLoadedTile(ge);if(ye)return ye}},z.prototype._getLoadedTile=function(B){var G=this._tiles[B.key];return G&&G.hasData()?G:this._cache.getByKey(B.wrapped().key)},z.prototype.updateCacheSize=function(B){var G=(Math.ceil(B.width/this._source.tileSize)+1)*(Math.ceil(B.height/this._source.tileSize)+1),ie=Math.floor(5*G),ue=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ie):ie;this._cache.setMaxSize(ue)},z.prototype.handleWrapJump=function(B){var G=(B-(this._prevLng===void 0?B:this._prevLng))/360,ie=Math.round(G);if(this._prevLng=B,ie){var ue={};for(var ge in this._tiles){var ye=this._tiles[ge];ye.tileID=ye.tileID.unwrapTo(ye.tileID.wrap+ie),ue[ye.tileID.key]=ye}for(var Me in this._tiles=ue,this._timers)clearTimeout(this._timers[Me]),delete this._timers[Me];for(var je in this._tiles){var We=this._tiles[je];this._setTileReloadTimer(je,We)}}},z.prototype.update=function(B){var G=this;if(this.transform=B,this._sourceLoaded&&!this._paused){var ie;this.updateCacheSize(B),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?ie=B.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Tr){return new e.OverscaledTileID(Tr.canonical.z,Tr.wrap,Tr.canonical.z,Tr.canonical.x,Tr.canonical.y)}):(ie=B.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(ie=ie.filter(function(Tr){return G._source.hasTile(Tr)}))):ie=[];var ue=B.coveringZoomLevel(this._source),ge=Math.max(ue-z.maxOverzooming,this._source.minzoom),ye=Math.max(ue+z.maxUnderzooming,this._source.minzoom),Me=this._updateRetainedTiles(ie,ue);if(ht(this._source.type)){for(var je={},We={},nt=0,bt=Object.keys(Me);nt<bt.length;nt+=1){var At=bt[nt],_t=Me[At],wt=this._tiles[At];if(wt&&!(wt.fadeEndTime&&wt.fadeEndTime<=e.browser.now())){var xt=this.findLoadedParent(_t,ge);xt&&(this._addTile(xt.tileID),je[xt.tileID.key]=xt.tileID),We[At]=_t}}for(var Ft in this._retainLoadedChildren(We,ue,ye,Me),je)Me[Ft]||(this._coveredTiles[Ft]=!0,Me[Ft]=je[Ft])}for(var Ot in Me)this._tiles[Ot].clearFadeHold();for(var Nt=0,er=e.keysDifference(this._tiles,Me);Nt<er.length;Nt+=1){var fr=er[Nt],kr=this._tiles[fr];kr.hasSymbolBuckets&&!kr.holdingForFade()?kr.setHoldDuration(this.map._fadeDuration):kr.hasSymbolBuckets&&!kr.symbolFadeFinished()||this._removeTile(fr)}this._updateLoadedParentTileCache()}},z.prototype.releaseSymbolFadeTiles=function(){for(var B in this._tiles)this._tiles[B].holdingForFade()&&this._removeTile(B)},z.prototype._updateRetainedTiles=function(B,G){for(var ie={},ue={},ge=Math.max(G-z.maxOverzooming,this._source.minzoom),ye=Math.max(G+z.maxUnderzooming,this._source.minzoom),Me={},je=0,We=B;je<We.length;je+=1){var nt=We[je],bt=this._addTile(nt);
vendor: 5,297 bytes, line 94
94ie[nt.key]=nt,bt.hasData()||G<this._source.maxzoom&&(Me[nt.key]=nt)}this._retainLoadedChildren(Me,G,ye,ie);for(var At=0,_t=B;At<_t.length;At+=1){var wt=_t[At],xt=this._tiles[wt.key];if(!xt.hasData()){if(G+1>this._source.maxzoom){var Ft=wt.children(this._source.maxzoom)[0],Ot=this.getTile(Ft);if(Ot&&Ot.hasData()){ie[Ft.key]=Ft;continue}}else{var Nt=wt.children(this._source.maxzoom);if(ie[Nt[0].key]&&ie[Nt[1].key]&&ie[Nt[2].key]&&ie[Nt[3].key])continue}for(var er=xt.wasRequested(),fr=wt.overscaledZ-1;fr>=ge;--fr){var kr=wt.scaledTo(fr);if(ue[kr.key]||(ue[kr.key]=!0,!(xt=this.getTile(kr))&&er&&(xt=this._addTile(kr)),xt&&(ie[kr.key]=kr,er=xt.wasRequested(),xt.hasData())))break}}}return ie},z.prototype._updateLoadedParentTileCache=function(){for(var B in this._loadedParentTiles={},this._tiles){for(var G=[],ie=void 0,ue=this._tiles[B].tileID;ue.overscaledZ>0;){if(ue.key in this._loadedParentTiles){ie=this._loadedParentTiles[ue.key];break}G.push(ue.key);var ge=ue.scaledTo(ue.overscaledZ-1);if(ie=this._getLoadedTile(ge))break;ue=ge}for(var ye=0,Me=G;ye<Me.length;ye+=1){var je=Me[ye];this._loadedParentTiles[je]=ie}}},z.prototype._addTile=function(B){var G=this._tiles[B.key];if(G)return G;(G=this._cache.getAndRemove(B))&&(this._setTileReloadTimer(B.key,G),G.tileID=B,this._state.initializeTileState(G,this.map?this.map.painter:null),this._cacheTimers[B.key]&&(clearTimeout(this._cacheTimers[B.key]),delete this._cacheTimers[B.key],this._setTileReloadTimer(B.key,G)));var ie=!!G;return ie||(G=new e.Tile(B,this._source.tileSize*B.overscaleFactor()),this._loadTile(G,this._tileLoaded.bind(this,G,B.key,G.state))),G?(G.uses++,this._tiles[B.key]=G,ie||this._source.fire(new e.Event("dataloading",{tile:G,coord:G.tileID,dataType:"source"})),G):null},z.prototype._setTileReloadTimer=function(B,G){var ie=this;B in this._timers&&(clearTimeout(this._timers[B]),delete this._timers[B]);var ue=G.getExpiryTimeout();ue&&(this._timers[B]=setTimeout(function(){ie._reloadTile(B,"expired"),delete ie._timers[B]},ue))},z.prototype._removeTile=function(B){var G=this._tiles[B];G&&(G.uses--,delete this._tiles[B],this._timers[B]&&(clearTimeout(this._timers[B]),delete this._timers[B]),G.uses>0||(G.hasData()&&G.state!=="reloading"?this._cache.add(G.tileID,G,G.getExpiryTimeout()):(G.aborted=!0,this._abortTile(G),this._unloadTile(G))))},z.prototype.clearTiles=function(){for(var B in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(B);this._cache.reset()},z.prototype.tilesIn=function(B,G,ie){var ue=this,ge=[],ye=this.transform;if(!ye)return ge;for(var Me=ie?ye.getCameraQueryGeometry(B):B,je=B.map(function(fr){return ye.pointCoordinate(fr)}),We=Me.map(function(fr){return ye.pointCoordinate(fr)}),nt=this.getIds(),bt=1/0,At=1/0,_t=-1/0,wt=-1/0,xt=0,Ft=We;xt<Ft.length;xt+=1){var Ot=Ft[xt];bt=Math.min(bt,Ot.x),At=Math.min(At,Ot.y),_t=Math.max(_t,Ot.x),wt=Math.max(wt,Ot.y)}for(var Nt=function(fr){var kr=ue._tiles[nt[fr]];if(!kr.holdingForFade()){var Tr=kr.tileID,Jr=Math.pow(2,ye.zoom-kr.tileID.overscaledZ),Xr=G*kr.queryPadding*e.EXTENT/kr.tileSize/Jr,hn=[Tr.getTilePoint(new e.MercatorCoordinate(bt,At)),Tr.getTilePoint(new e.MercatorCoordinate(_t,wt))];if(hn[0].x-Xr<e.EXTENT&&hn[0].y-Xr<e.EXTENT&&hn[1].x+Xr>=0&&hn[1].y+Xr>=0){var on=je.map(function(Gn){return Tr.getTilePoint(Gn)}),Nn=We.map(function(Gn){return Tr.getTilePoint(Gn)});ge.push({tile:kr,tileID:Tr,queryGeometry:on,cameraQueryGeometry:Nn,scale:Jr})}}},er=0;er<nt.length;er++)Nt(er);return ge},z.prototype.getVisibleCoordinates=function(B){for(var G=this,ie=this.getRenderableIds(B).map(function(Me){return G._tiles[Me].tileID}),ue=0,ge=ie;ue<ge.length;ue+=1){var ye=ge[ue];ye.posMatrix=this.transform.calculatePosMatrix(ye.toUnwrapped())}return ie},z.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(ht(this._source.type))for(var B in this._tiles){var G=this._tiles[B];if(G.fadeEndTime!==void 0&&G.fadeEndTime>=e.browser.now())return!0}return!1},z.prototype.setFeatureState=function(B,G,ie){B=B||"_geojsonTileLayer",this._state.updateState(B,G,ie)},z.prototype.removeFeatureState=function(B,G,ie){B=B||"_geojsonTileLayer",this._state.removeFeatureState(B,G,ie)},z.prototype.getFeatureState=function(B,G){return B=B||"_geojsonTileLayer",this._state.getState(B,G)},z.prototype.setDependencies=function(B,G,ie){var ue=this._tiles[B];ue&&ue.setDependencies(G,ie)},z.prototype.reloadTilesForDependencies=function(B,G){for(var ie in this._tiles)this._tiles[ie].hasDependency(B,G)&&this._reloadTile(ie,"reloading");this._cache.filter(function(ue){return!ue.hasDependency(B,G)})},z}(e.Evented);function it(C,z){var B=Math.abs(2*C.wrap)-+(C.wrap<0),G=Math.abs(2*z.wrap)-+(z.wrap<0);return C.overscaledZ-z.overscaledZ||G-B||z.canonical.y-C.canonical.y||z.canonical.x-C.canonical.x}function ht(C){return C==="raster"||C==="image"||C==="video"}function ut(){return new e.window.Worker(le.workerUrl)}Je.maxOverzooming=10,Je.maxUnderzooming=3;var kt="mapboxgl_preloaded_worker_pool",ot=function(){this.active={}};ot.prototype.acquire=function(C){if(!this.workers)for(this.workers=[];this.workers.length<ot.workerCount;)this.workers.push(new ut);return this.active[C]=!0,this.workers.slice()},ot.prototype.release=function(C){delete this.active[C],this.numActive()===0&&(this.workers.forEac
94h(function(z){z.terminate()}),this.workers=null)},ot.prototype.isPreloaded=function(){return!!this.active[kt]},ot.prototype.numActive=function(){return Object.keys(this.active).length};var Lt,Et=Math.floor(e.browser.hardwareConcurrency/2);function Ze(){return Lt||(Lt=new ot),Lt}function pt(C,z){var B={};for(var G in C)G!=="ref"&&(B[G]=C[G]);return e.refProperties.forEach(function(ie){ie in z&&(B[ie]=z[ie])}),B}function Ct(C){C=C.slice();for(var z=Object.create(null),B=0;B<C.length;B++)z[C[B].id]=C[B];for(var G=0;G<C.length;G++)"ref"in C[G]&&(C[G]=pt(C[G],z[C[G].ref]));return C}ot.workerCount=Math.max(Math.min(Et,6),1);var zt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Gt(C,z,B){B.push({command:zt.addSource,args:[C,z[C]]})}function ze(C,z,B){z.push({command:zt.removeSource,args:[C]}),B[C]=!0}function st(C,z,B,G){ze(C,B,G),Gt(C,z,B)}function yt(C,z,B){var G;for(G in C[B])if(C[B].hasOwnProperty(G)&&G!=="data"&&!e.deepEqual(C[B][G],z[B][G]))return!1;for(G in z[B])if(z[B].hasOwnProperty(G)&&G!=="data"&&!e.deepEqual(C[B][G],z[B][G]))return!1;return!0}function Dt(C,z,B,G,ie,ue){var ge;for(ge in z=z||{},C=C||{})C.hasOwnProperty(ge)&&(e.deepEqual(C[ge],z[ge])||B.push({command:ue,args:[G,ge,z[ge],ie]}));for(ge in z)z.hasOwnProperty(ge)&&!C.hasOwnProperty(ge)&&(e.deepEqual(C[ge],z[ge])||B.push({command:ue,args:[G,ge,z[ge],ie]}))}function jt(C){return C.id}function or(C,z){return C[z.id]=z,C}function Ut(C,z){if(!C)return[{command:zt.setStyle,args:[z]}];var B=[];try{if(!e.deepEqual(C.version,z.version))return[{command:zt.setStyle,args:[z]}];e.deepEqual(C.center,z.center)||B.push({command:zt.setCenter,args:[z.center]}),e.deepEqual(C.zoom,z.zoom)||B.push({command:zt.setZoom,args:[z.zoom]}),e.deepEqual(C.bearing,z.bearing)||B.push({command:zt.setBearing,args:[z.bearing]}),e.deepEqual(C.pitch,z.pitch)||B.push({command:zt.setPitch,args:[z.pitch]}),e.deepEqual(C.sprite,z.sprite)||B.push({command:zt.setSprite,args:[z.sprite]}),e.deepEqual(C.glyphs,z.glyphs)||B.push({command:zt.setGlyphs,args:[z.glyphs]}),e.deepEqual(C.transition,z.transition)||B.push({command:zt.setTransition,args:[z.transition]}),e.deepEqual(C.light,z.light)||B.push({command:zt.setLight,args:[z.light]});var G={},ie=[];(function(ge,ye,Me,je){var We;for(We in ye=ye||{},ge=ge||{})ge.hasOwnProperty(We)&&(ye.hasOwnProperty(We)||ze(We,Me,je));for(We in ye)ye.hasOwnProperty(We)&&(ge.hasOwnProperty(We)?e.deepEqual(ge[We],ye[We])||(ge[We].type==="geojson"&&ye[We].type==="geojson"&&yt(ge,ye,We)?Me.push({command:zt.setGeoJSONSourceData,args:[We,ye[We].data]}):st(We,ye,Me,je)):Gt(We,ye,Me))})(C.sources,z.sources,ie,G);var ue=[];C.layers&&C.layers.forEach(function(ge){G[ge.source]?B.push({command:zt.removeLayer,args:[ge.id]}):ue.push(ge)}),B=B.concat(ie),function(ge,ye,Me){ye=ye||[];var je,We,nt,bt,At,_t,wt,xt=(ge=ge||[]).map(jt),Ft=ye.map(jt),Ot=ge.reduce(or,{}),Nt=ye.reduce(or,{}),er=xt.slice(),fr=Object.create(null);for(je=0,We=0;je<xt.length;je++)nt=xt[je],Nt.hasOwnProperty(nt)?We++:(Me.push({command:zt.removeLayer,args:[nt]}),er.splice(er.indexOf(nt,We),1));for(je=0,We=0;je<Ft.length;je++)nt=Ft[Ft.length-1-je],er[er.length-1-je]!==nt&&(Ot.hasOwnProperty(nt)?(Me.push({command:zt.removeLayer,args:[nt]}),er.splice(er.lastIndexOf(nt,er.length-We),1)):We++,_t=er[er.length-je],Me.push({command:zt.addLayer,args:[Nt[nt],_t]}),er.splice(er.length-je,0,nt),fr[nt]=!0);for(je=0;je<Ft.length;je++)if(bt=Ot[nt=Ft[je]],At=Nt[nt],!fr[nt]&&!e.deepEqual(bt,At))if(e.deepEqual(bt.source,At.source)&&e.deepEqual(bt["source-layer"],At["source-layer"])&&e.deepEqual(bt.type,At.type)){for(wt in Dt(bt.layout,At.layout,Me,nt,null,zt.setLayoutProperty),Dt(bt.paint,At.paint,Me,nt,null,zt.setPaintProperty),e.deepEqual(bt.filter,At.filter)||Me.push({command:zt.setFilter,args:[nt,At.filter]}),e.deepEqual(bt.minzoom,At.minzoom)&&e.deepEqual(bt.maxzoom,At.maxzoom)||Me.push({command:zt.setLayerZoomRange,args:[nt,At.minzoom,At.maxzoom]}),bt)bt.hasOwnProperty(wt)&&wt!=="layout"&&wt!=="paint"&&wt!=="filter"&&wt!=="metadata"&&wt!=="minzoom"&&wt!=="maxzoom"&&(wt.
vendor: 17,371 bytes, line 94
94indexOf("paint.")===0?Dt(bt[wt],At[wt],Me,nt,wt.slice(6),zt.setPaintProperty):e.deepEqual(bt[wt],At[wt])||Me.push({command:zt.setLayerProperty,args:[nt,wt,At[wt]]}));for(wt in At)At.hasOwnProperty(wt)&&!bt.hasOwnProperty(wt)&&wt!=="layout"&&wt!=="paint"&&wt!=="filter"&&wt!=="metadata"&&wt!=="minzoom"&&wt!=="maxzoom"&&(wt.indexOf("paint.")===0?Dt(bt[wt],At[wt],Me,nt,wt.slice(6),zt.setPaintProperty):e.deepEqual(bt[wt],At[wt])||Me.push({command:zt.setLayerProperty,args:[nt,wt,At[wt]]}))}else Me.push({command:zt.removeLayer,args:[nt]}),_t=er[er.lastIndexOf(nt)+1],Me.push({command:zt.addLayer,args:[At,_t]})}(ue,z.layers,B)}catch(ge){console.warn("Unable to compute style diff:",ge),B=[{command:zt.setStyle,args:[z]}]}return B}var Xt=function(C,z){this.reset(C,z)};Xt.prototype.reset=function(C,z){this.points=C||[],this._distances=[0];for(var B=1;B<this.points.length;B++)this._distances[B]=this._distances[B-1]+this.points[B].dist(this.points[B-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(z||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Xt.prototype.lerp=function(C){if(this.points.length===1)return this.points[0];C=e.clamp(C,0,1);for(var z=1,B=this._distances[z],G=C*this.paddedLength+this.padding;B<G&&z<this._distances.length;)B=this._distances[++z];var ie=z-1,ue=this._distances[ie],ge=B-ue,ye=ge>0?(G-ue)/ge:0;return this.points[ie].mult(1-ye).add(this.points[z].mult(ye))};var sr=function(C,z,B){var G=this.boxCells=[],ie=this.circleCells=[];this.xCellCount=Math.ceil(C/B),this.yCellCount=Math.ceil(z/B);for(var ue=0;ue<this.xCellCount*this.yCellCount;ue++)G.push([]),ie.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=C,this.height=z,this.xScale=this.xCellCount/C,this.yScale=this.yCellCount/z,this.boxUid=0,this.circleUid=0};function vr(C,z,B,G,ie){var ue=e.create();return z?(e.scale(ue,ue,[1/ie,1/ie,1]),B||e.rotateZ(ue,ue,G.angle)):e.multiply(ue,G.labelPlaneMatrix,C),ue}function pr(C,z,B,G,ie){if(z){var ue=e.clone(C);return e.scale(ue,ue,[ie,ie,1]),B||e.rotateZ(ue,ue,-G.angle),ue}return G.glCoordMatrix}function ar(C,z){var B=[C.x,C.y,0,1];Vr(B,B,z);var G=B[3];return{point:new e.Point(B[0]/G,B[1]/G),signedDistanceFromCamera:G}}function lr(C,z){return .5+C/z*.5}function hr(C,z){var B=C[0]/C[3],G=C[1]/C[3];return B>=-z[0]&&B<=z[0]&&G>=-z[1]&&G<=z[1]}function Or(C,z,B,G,ie,ue,ge,ye){var Me=G?C.textSizeData:C.iconSizeData,je=e.evaluateSizeForZoom(Me,B.transform.zoom),We=[256/B.width*2+1,256/B.height*2+1],nt=G?C.text.dynamicLayoutVertexArray:C.icon.dynamicLayoutVertexArray;nt.clear();for(var bt=C.lineVertexArray,At=G?C.text.placedSymbolArray:C.icon.placedSymbolArray,_t=B.transform.width/B.transform.height,wt=!1,xt=0;xt<At.length;xt++){var Ft=At.get(xt);if(Ft.hidden||Ft.writingMode===e.WritingMode.vertical&&!wt)_n(Ft.numGlyphs,nt);else{wt=!1;var Ot=[Ft.anchorX,Ft.anchorY,0,1];if(e.transformMat4(Ot,Ot,z),hr(Ot,We)){var Nt=Ot[3],er=lr(B.transform.cameraToCenterDistance,Nt),fr=e.evaluateSizeForFeature(Me,je,Ft),kr=ge?fr/er:fr*er,Tr=new e.Point(Ft.anchorX,Ft.anchorY),Jr=ar(Tr,ie).point,Xr={},hn=tn(Ft,kr,!1,ye,z,ie,ue,C.glyphOffsetArray,bt,nt,Jr,Tr,Xr,_t);wt=hn.useVertical,(hn.notEnoughRoom||wt||hn.needsFlipping&&tn(Ft,kr,!0,ye,z,ie,ue,C.glyphOffsetArray,bt,nt,Jr,Tr,Xr,_t).notEnoughRoom)&&_n(Ft.numGlyphs,nt)}else _n(Ft.numGlyphs,nt)}}G?C.text.dynamicLayoutVertexBuffer.updateData(nt):C.icon.dynamicLayoutVertexBuffer.updateData(nt)}function dr(C,z,B,G,ie,ue,ge,ye,Me,je,We){var nt=ye.glyphStartIndex+ye.numGlyphs,bt=ye.lineStartIndex,At=ye.lineStartIndex+ye.lineLength,_t=z.getoffsetX(ye.glyphStartIndex),wt=z.getoffsetX(nt-1),xt=An(C*_t,B,G,ie,ue,ge,ye.segment,bt,At,Me,je,We);if(!xt)return null;var Ft=An(C*wt,B,G,ie,ue,ge,ye.segment,bt,At,Me,je,We);return Ft?{first:xt,last:Ft}:null}function Fr(C,z,B,G){return C===e.WritingMode.horizontal&&Math.abs(B.y-z.y)>Math.abs(B.x-z.x)*G?{useVertical:!0}:(C===e.WritingMode.vertical?z.y<B.y:z.x>B.x)?{needsFlipping:!0}:null}function tn(C,z,B,G,ie,ue,ge,ye,Me,je,We,nt,bt,At){var _t,wt=z/24,xt=C.lineOffsetX*wt,Ft=C.lineOffsetY*wt;if(C.numGlyphs>1){var Ot=C.glyphStartIndex+C.numGlyphs,Nt=C.lineStartIndex,er=C.lineStartIndex+C.lineLength,fr=dr(wt,ye,xt,Ft,B,We,nt,C,Me,ue,bt);if(!fr)return{notEnoughRoom:!0};var kr=ar(fr.first.point,ge).point,Tr=ar(fr.last.point,ge).point;if(G&&!B){var Jr=Fr(C.writingMode,kr,Tr,At);if(Jr)return Jr}_t=[fr.first];for(var Xr=C.glyphStartIndex+1;Xr<Ot-1;Xr++)_t.push(An(wt*ye.getoffsetX(Xr),xt,Ft,B,We,nt,C.segment,Nt,er,Me,ue,bt));_t.push(fr.last)}else{if(G&&!B){var hn=ar(nt,ie).point,on=C.lineStartIndex+C.segment+1,Nn=new e.Point(Me.getx(on),Me.gety(on)),Gn=ar(Nn,ie),oa=Gn.signedDistanceFromCamera>0?Gn.point:rn(nt,Nn,hn,1,ie),jr=Fr(C.writingMode,hn,oa,At);if(jr)return jr}var Mn=An(wt*ye.getoffsetX(C.glyphStartIndex),xt,Ft,B,We,nt,C.segment,C.lineStartIndex,C.lineStartIndex+C.lineLength,Me,ue,bt);if(!Mn)return{notEnoughRoom:!0};_t=[Mn]}for(var Yn=0,Vn=_t;Yn<Vn.length;Yn+=1){var Qn=Vn[Yn];e.addDynamicAttributes(je,Qn.point,Qn.angle)}return{}}function rn(C,z,B,G,ie){var ue=ar(C.add(C.sub(z)._unit()),ie).point,ge=B.sub(ue);return B.add(ge._mult(G/ge.mag()))}function An(C,z,B,G,ie,ue,ge,ye,Me,je,We,nt){var bt=G?C-z:C+z,At=bt>0?1:-1,_t=0;G&&(At*=-1,_t=Math.PI),At<0&&(_t+=Math.PI);for(var wt=At>0?ye+ge:ye+ge+1,xt=ie,Ft=ie,Ot=0,Nt=0,er=Math.abs(bt),fr=[];Ot+Nt<=er;){if((wt+=At)<ye||wt>=Me)return null;if(Ft=xt,fr.push(xt),(xt=nt[wt])===void 0){var kr=new e.Point(je.getx(wt),je.gety(wt)),Tr=ar(kr,We);if(Tr.signedDistanceFromCamera>0)xt=nt[wt]=Tr.point;else{var Jr=wt-At;xt=rn(Ot===0?ue:new e.Point(je.getx(Jr),je.gety(Jr)),kr,Ft,er-Ot+1,We)}}Ot+=Nt,Nt=Ft.dist(xt)}var Xr=(er-Ot)/Nt,hn=xt.sub(Ft),on=hn.mult(Xr)._add(Ft);on._add(hn._unit()._perp()._mult(B*At));var Nn=_t+Math.atan2(xt.y-Ft.y,xt.x-Ft.x);return fr.push(on),{point:on,angle:Nn,path:fr}}sr.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},sr.prototype.insert=function(C,z,B,G,ie){this._forEachCell(z,B,G,ie,this._insertBoxCell,this.boxUid++),this.boxKeys.push(C),this.bboxes.push(z),this.bboxes.push(B),this.bboxes.push(G),this.bboxes.push(ie)},sr.prototype.insertCircle=function(C,z,B,G){this._forEachCell(z-G,B-G,z+G,B+G,this._insertCircleCell,this.circleUid++),this.circleKeys.push(C),this.circles.push(z),this.circles.push(B),this.circles.push(G)},sr.prototype._insertBoxCell=function(C,z,B,G,ie,ue){this.boxCells[ie].push(ue)},sr.prototype._insertCircleCell=function(C,z,B,G,ie,ue){this.circleCells[ie].push(ue)},sr.prototype._query=function(C,z,B,G,ie,ue){if(B<0||C>this.width||G<0||z>this.height)return!ie&&[];var ge=[];if(C<=0&&z<=0&&this.width<=B&&this.height<=G){if(ie)return!0;for(var ye=0;ye<this.boxKeys.length;ye++)ge.push({key:this.boxKeys[ye],x1:this.bboxes[4*ye],y1:this.bboxes[4*ye+1],x2:this.bboxes[4*ye+2],y2:this.bboxes[4*ye+3]});for(var Me=0;Me<this.circleKeys.length;Me++){var je=this.circles[3*Me],We=this.circles[3*Me+1],nt=this.circles[3*Me+2];ge.push({key:this.circleKeys[Me],x1:je-nt,y1:We-nt,x2:je+nt,y2:We+nt})}return ue?ge.filter(ue):ge}var bt={hitTest:ie,seenUids:{box:{},circle:{}}};return this._forEachCell(C,z,B,G,this._queryCell,ge,bt,ue),ie?ge.length>0:ge},sr.prototype._queryCircle=function(C,z,B,G,ie){var ue=C-B,ge=C+B,ye=z-B,Me=z+B;if(ge<0||ue>this.width||Me<0||ye>this.height)return!G&&[];var je=[],We={hitTest:G,circle:{x:C,y:z,radius:B},seenUids:{box:{},circle:{}}};return this._forEachCell(ue,ye,ge,Me,this._queryCellCircle,je,We,ie),G?je.length>0:je},sr.prototype.query=function(C,z,B,G,ie){return this._query(C,z,B,G,!1,ie)},sr.prototype.hitTest=function(C,z,B,G,ie){return this._query(C,z,B,G,!0,ie)},sr.prototype.hitTestCircle=function(C,z,B,G){return this._queryCircle(C,z,B,!0,G)},sr.prototype._queryCell=function(C,z,B,G,ie,ue,ge,ye){var Me=ge.seenUids,je=this.boxCells[ie];if(je!==null)for(var We=this.bboxes,nt=0,bt=je;nt<bt.length;nt+=1){var At=bt[nt];if(!Me.box[At]){Me.box[At]=!0;var _t=4*At;if(C<=We[_t+2]&&z<=We[_t+3]&&B>=We[_t+0]&&G>=We[_t+1]&&(!ye||ye(this.boxKeys[At]))){if(ge.hitTest)return ue.push(!0),!0;ue.push({key:this.boxKeys[At],x1:We[_t],y1:We[_t+1],x2:We[_t+2],y2:We[_t+3]})}}}var wt=this.circleCells[ie];if(wt!==null)for(var xt=this.circles,Ft=0,Ot=wt;Ft<Ot.length;Ft+=1){var Nt=Ot[Ft];if(!Me.circle[Nt]){Me.circle[Nt]=!0;var er=3*Nt;if(this._circleAndRectCollide(xt[er],xt[er+1],xt[er+2],C,z,B,G)&&(!ye||ye(this.circleKeys[Nt]))){if(ge.hitTest)return ue.push(!0),!0;var fr=xt[er],kr=xt[er+1],Tr=xt[er+2];ue.push({key:this.circleKeys[Nt],x1:fr-Tr,y1:kr-Tr,x2:fr+Tr,y2:kr+Tr})}}}},sr.prototype._queryCellCircle=function(C,z,B,G,ie,ue,ge,ye){var Me=ge.circle,je=ge.seenUids,We=this.boxCells[ie];if(We!==null)for(var nt=this.bboxes,bt=0,At=We;bt<At.length;bt+=1){var _t=At[bt];if(!je.box[_t]){je.box[_t]=!0;var wt=4*_t;if(this._circleAndRectCollide(Me.x,Me.y,Me.radius,nt[wt+0],nt[wt+1],nt[wt+2],nt[wt+3])&&(!ye||ye(this.boxKeys[_t])))return ue.push(!0),!0}}var xt=this.circleCells[ie];if(xt!==null)for(var Ft=this.circles,Ot=0,Nt=xt;Ot<Nt.length;Ot+=1){var er=Nt[Ot];if(!je.circle[er]){je.circle[er]=!0;var fr=3*er;if(this._circlesCollide(Ft[fr],Ft[fr+1],Ft[fr+2],Me.x,Me.y,Me.radius)&&(!ye||ye(this.circleKeys[er])))return ue.push(!0),!0}}},sr.prototype._forEachCell=function(C,z,B,G,ie,ue,ge,ye){for(var Me=this._convertToXCellCoord(C),je=this._convertToYCellCoord(z),We=this._convertToXCellCoord(B),nt=this._convertToYCellCoord(G),bt=Me;bt<=We;bt++)for(var At=je;At<=nt;At++){var _t=this.xCellCount*At+bt;if(ie.call(this,C,z,B,G,_t,ue,ge,ye))return}},sr.prototype._convertToXCellCoord=function(C){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(C*this.xScale)))},sr.prototype._convertToYCellCoord=function(C){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(C*this.yScale)))},sr.prototype._circlesCollide=function(C,z,B,G,ie,ue){var ge=G-C,ye=ie-z,Me=B+ue;return Me*Me>ge*ge+ye*ye},sr.prototype._circleAndRectCollide=function(C,z,B,G,ie,ue,ge){var ye=(ue-G)/2,Me=Math.abs(C-(G+ye));if(Me>ye+B)return!1;var je=(ge-ie)/2,We=Math.abs(z-(ie+je));if(We>je+B)return!1;if(Me<=ye||We<=je)return!0;var nt=Me-ye,bt=We-je;return nt*nt+bt*bt<=B*B};var Ln=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _n(C,z){for(var B=0;B<C;B++){var G=z.length;z.resize(G+4),z.float32.set(Ln,3*G)}}function Vr(C,z,B){var G=z[0],ie=z[1];return C[0]=B[0]*G+B[4]*ie+B[12],C[1]=B[1]*G+B[5]*ie+B[13],C[3]=B[3]*G+B[7]*ie+B[15],C}var Ir=function(C,z,B){z===void 0&&(z=new sr(C.width+200,C.height+200,25)),B===void 0&&(B=new sr(C.width+200,C.height+200,25)),this.transform=C,this.grid=z,this.ignoredGrid=B,this.pitchfactor=Math.cos(C._pitch)*C.cameraToCenterDistance,this.screenRightBoundary=C.width+100,this.screenBottomBoundary=C.height+100,this.gridRightBoundary=C.width+200,this.gridBottomBoundary=C.height+200};function xr(C,z,B){return z*(e.EXTENT/(C.tileSize*Math.pow(2,B-C.tileID.overscaledZ)))}Ir.prototype.placeCollisionBox=function(C,z,B,G,ie){var ue=this.projectAndGetPerspectiveRatio(G,C.anchorPointX,C.anchorPointY),ge=B*ue.perspectiveRatio,ye=C.x1*ge+ue.point.x,Me=C.y1*ge+ue.point.y,je=C.x2*ge+ue.point.x,We=C.y2*ge+ue.point.y;return!this.isInsideGrid(ye,Me,je,We)||!z&&this.grid.hitTest(ye,Me,je,We,ie)?{box:[],offscreen:!1}:{box:[ye,Me,je,We],offscreen:this.isOffscreen(ye,Me,je,We)}},Ir.prototype.placeCollisionCircles=function(C,z,B,G,ie,ue,ge,ye,Me,je,We,nt,bt){var At=[],_t=new e.Point(z.anchorX,z.anchorY),wt=ar(_t,ue),xt=lr(this.transform.cameraToCenterDistance,wt.signedDistanceFromCamera),Ft=(je?ie/xt:ie*xt)/e.ONE_EM,Ot=ar(_t,ge).point,Nt=dr(Ft,G,z.lineOffsetX*Ft,z.lineOffsetY*Ft,!1,Ot,_t,z,B,ge,{}),er=!1,fr=!1,kr=!0;if(Nt){for(var Tr=.5*nt*xt+bt,Jr=new e.Point(-100,-100),Xr=new e.Point(this.screenRightBoundary,this.screenBottomBoundary),hn=new Xt,on=Nt.first,Nn=Nt.last,Gn=[],oa=on.path.length-1;oa>=1;oa--)Gn.push(on.path[oa]);for(var jr=1;jr<Nn.path.length;jr++)Gn.push(Nn.path[jr]);var Mn=2.5*Tr;if(ye){var Yn=Gn.map(function(po){return ar(po,ye)});Gn=Yn.some(function(po){return po.signedDistanceFromCamera<=0})?[]:Yn.map(function(po){return po.point})}var Vn=[];if(Gn.length>0){for(var Qn=Gn[0].clone(),la=Gn[0].clone(),wa=1;wa<Gn.length;wa++)Qn.x=Math.min(Qn.x,Gn[wa].x),Qn.y=Math.min(Qn.y,Gn[wa].y),la.x=Math.max(la.x,Gn[wa].x),la.y=Math.max(la.y,Gn[wa].y);Vn=Qn.x>=Jr.x&&la.x<=Xr.x&&Qn.y>=Jr.y&&la.y<=Xr.y?[Gn]:la.x<Jr.x||Qn.x>Xr.x||la.y<Jr.y||Qn.y>Xr.y?[]:e.clipLine([Gn],Jr.x,Jr.y,Xr.x,Xr.y)}for(var Zn=0,ma=Vn;Zn<ma.length;Zn+=1){var pa=ma[Zn];hn.reset(pa,.25*Tr);var Aa=0;Aa=hn.length<=.5*Tr?1:Math.ceil(hn.paddedLength/Mn)+1;for(var va=0;va<Aa;va++){var Sa=va/Math.max(Aa-1,1),Da=hn.lerp(Sa),ii=Da.x+100,Ai=Da.y+100;At.push(ii,Ai,Tr,0);var Si=ii-Tr,ai=Ai-Tr,xi=ii+Tr,ui=Ai+Tr;if(kr=kr&&this.isOffscreen(Si,ai,xi,ui),fr=fr||this.isInsideGrid(Si,ai,xi,ui),!C&&this.grid.hitTestCircle(ii,Ai,Tr,We)&&(er=!0,!Me))return{circles:[],offscreen:!1,collisionDetected:er}}}}return{circles:!Me&&er||!fr?[]:At,offscreen:kr,collisionDetected:er}},Ir.prototype.queryRenderedSymbols=function(C){if(C.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var z=[],B=1/0,G=1/0,ie=-1/0,ue=-1/0,ge=0,ye=C;ge<ye.length;ge+=1){var Me=ye[ge],je=new e.Point(Me.x+100,Me.y+100);B=Math.min(B,je.x),G=Math.min(G,je.y),ie=Math.max(ie,je.x),ue=Math.max(ue,je.y),z.push(je)}for(var We={},nt={},bt=0,At=this.grid.query(B,G,ie,ue).concat(this.ignoredGrid.query(B,G,ie,ue));bt<At.length;bt+=1){var _t=At[bt],wt=_t.key;if(We[wt.bucketInstanceId]===void 0&&(We[wt.bucketInstanceId]={}),!We[wt.bucketInstanceId][wt.featureIndex]){var xt=[new e.Point(_t.x1,_t.y1),new e.Point(_t.x2,_t.y1),new e.Point(_t.x2,_t.y2),new e.Point(_t.x1,_t.y2)];e.polygonIntersectsPolygon(z,xt)&&(We[wt.bucketInstanceId][wt.featureIndex]=!0,nt[wt.bucketInstanceId]===void 0&&(nt[wt.bucketInstanceId]=[]),nt[wt.bucketInstanceId].push(wt.featureIndex))}}return nt},Ir.prototype.insertCollisionBox=function(C,z,B,G,ie){var ue={bucketInstanceId:B,featureIndex:G,collisionGroupID:ie};(z?this.ignoredGrid:this.grid).insert(ue,C[0],C[1],C[2],C[3])},Ir.prototype.insertCollisionCircles=function(C,z,B,G,ie){for(var ue=z?this.ignoredGrid:this.grid,ge={bucketInstanceId:B,featureIndex:G,collisionGroupID:ie},ye=0;ye<C.length;ye+=4)ue.insertCircle(ge,C[ye],C[ye+1],C[ye+2])},Ir.prototype.projectAndGetPerspectiveRatio=function(C,z,B){var G=[z,B,0,1];return Vr(G,G,C),{point:new e.Point((G[0]/G[3]+1)/2*this.transform.width+100,(-G[1]/G[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/G[3]*.5}},Ir.prototype.isOffscreen=function(C,z,B,G){return B<100||C>=this.screenRightBoundary||G<100||z>this.screenBottomBoundary},Ir.prototype.isInsideGrid=function(C,z,B,G){return B>=0&&C<this.gridRightBoundary&&G>=0&&z<this.gridBottomBoundary},Ir.prototype.getViewportMatrix=function(){var C=e.identity([]);return e.translate(C,C,[-100,-100,0]),C};var Nr=function(C,z,B,G){this.opacity=C?Math.max(0,Math.min(1,C.opacity+(C.placed?z:-z))):G&&B?1:0,this.placed=B};Nr.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var en=function(C,z,B,G,ie){this.text=new Nr(C?C.text:null,z,B,ie),this.icon=new Nr(C?C.icon:null,z,G,ie)};en.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Qr=function(C,z,B){this.text=C,this.icon=z,this.skipFade=B},yn=function(){this.invProjMatrix=e.create(),this.viewportMatrix=e.create(),this.circles=[]},un=function(C,z,B,G,ie){this.bucketInstanceId=C,this.featureIndex=z,this.sourceLayerIndex=B,this.bucketIndex=G,this.tileID=ie},$r=function(C){this.crossSourceCollisions=C,this.maxGroupID=0,this.collisionGroups={}};function In(C,z,B,G,ie){var ue=e.getAnchorAlignment(C),ge=-(ue.horizontalAlign-.5)*z,ye=-(ue.verticalAlign-.5)*B,Me=e.evaluateVariableOffset(C,G);return new e.Point(ge+Me[0]*ie,ye+Me[1]*ie)}function Qt(C,z,B,G,ie,ue){var ge=C.x1,ye=C.x2,Me=C.y1,je=C.y2,We=C.anchorPointX,nt=C.anchorPointY,bt=new e.Point(z,B);return G&&bt._rotate(ie?ue:-ue),{x1:ge+bt.x,y1:Me+bt.y,x2:ye+bt.x,y2:je+bt.y,anchorPointX:We,anchorPointY:nt}}$r.prototype.get=function(C){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[C]){var z=++this.maxGroupID;this.collisionGroups[C]={ID:z,predicate:function(B){return B.collisionGroupID===z}}}return this.collisionGroups[C]};var Pt=function(C,z,B,G){this.transform=C.clone(),this.collisionIndex=new Ir(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=z,this.retainedQueryData={},this.collisionGroups=new $r(B),this.collisionCircleArrays={},this.prevPlacement=G,G&&(G.prevPlacement=void 0),this.placedOrientations={}};function Yt(C,z,B,G,ie){C.emplaceBack(z?1:0,B?1:0,G||0,ie||0),C.emplaceBack(z?1:0,B?1:0,G||0,ie||0),C.emplaceBack(z?1:0,B?1:0,G||0,ie||0),C.emplaceBack(z?1:0,B?1:0,G||0,ie||0)}Pt.prototype.getBucketParts=function(C,z,B,G){var ie=B.getBucket(z),ue=B.latestFeatureIndex;if(ie&&ue&&z.id===ie.layerIds[0]){var ge=B.collisionBoxArray,ye=ie.layers[0].layout,Me=Math.pow(2,this.transform.zoom-B.tileID.overscaledZ),je=B.tileSize/e.EXTENT,We=this.transform.calculatePosMatrix(B.tileID.toUnwrapped()),nt=ye.get("text-pitch-alignment")==="map",bt=ye.get("text-rotation-alignment")==="map",At=xr(B,1,this.transform.zoom),_t=vr(We,nt,bt,this.transform,At),wt=null;if(nt){var xt=pr(We,nt,bt,this.transform,At);
94wt=e.multiply([],this.transform.labelPlaneMatrix,xt)}this.retainedQueryData[ie.bucketInstanceId]=new un(ie.bucketInstanceId,ue,ie.sourceLayerIndex,ie.index,B.tileID);var Ft={bucket:ie,layout:ye,posMatrix:We,textLabelPlaneMatrix:_t,labelToScreenMatrix:wt,scale:Me,textPixelRatio:je,holdingForFade:B.holdingForFade(),collisionBoxArray:ge,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(ie.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(ie.sourceID)};if(G)for(var Ot=0,Nt=ie.sortKeyRanges;Ot<Nt.length;Ot+=1){var er=Nt[Ot],fr=er.sortKey,kr=er.symbolInstanceStart,Tr=er.symbolInstanceEnd;C.push({sortKey:fr,symbolInstanceStart:kr,symbolInstanceEnd:Tr,parameters:Ft})}else C.push({symbolInstanceStart:0,symbolInstanceEnd:ie.symbolInstances.length,parameters:Ft})}},Pt.prototype.attemptAnchorPlacement=function(C,z,B,G,ie,ue,ge,ye,Me,je,We,nt,bt,At,_t){var wt,xt=[nt.textOffset0,nt.textOffset1],Ft=In(C,B,G,xt,ie),Ot=this.collisionIndex.placeCollisionBox(Qt(z,Ft.x,Ft.y,ue,ge,this.transform.angle),We,ye,Me,je.predicate);if(!(_t&&this.collisionIndex.placeCollisionBox(Qt(_t,Ft.x,Ft.y,ue,ge,this.transform.angle),We,ye,Me,je.predicate).box.length===0)&&Ot.box.length>0)return this.prevPlacement&&this.prevPlacement.variableOffsets[nt.crossTileID]&&this.prevPlacement.placements[nt.crossTileID]&&this.prevPlacement.placements[nt.crossTileID].text&&(wt=this.prevPlacement.variableOffsets[nt.crossTileID].anchor),this.variableOffsets[nt.crossTileID]={textOffset:xt,width:B,height:G,anchor:C,textBoxScale:ie,prevAnchor:wt},this.markUsedJustification(bt,C,nt,At),bt.allowVerticalPlacement&&(this.markUsedOrientation(bt,At,nt),this.placedOrientations[nt.crossTileID]=At),{shift:Ft,placedGlyphBoxes:Ot}},Pt.prototype.placeLayerBucketPart=function(C,z,B){var G=this,ie=C.parameters,ue=ie.bucket,ge=ie.layout,ye=ie.posMatrix,Me=ie.textLabelPlaneMatrix,je=ie.labelToScreenMatrix,We=ie.textPixelRatio,nt=ie.holdingForFade,bt=ie.collisionBoxArray,At=ie.partiallyEvaluatedTextSize,_t=ie.collisionGroup,wt=ge.get("text-optional"),xt=ge.get("icon-optional"),Ft=ge.get("text-allow-overlap"),Ot=ge.get("icon-allow-overlap"),Nt=ge.get("text-rotation-alignment")==="map",er=ge.get("text-pitch-alignment")==="map",fr=ge.get("icon-text-fit")!=="none",kr=ge.get("symbol-z-order")==="viewport-y",Tr=Ft&&(Ot||!ue.hasIconData()||xt),Jr=Ot&&(Ft||!ue.hasTextData()||wt);!ue.collisionArrays&&bt&&ue.deserializeCollisionBoxes(bt);var Xr=function(jr,Mn){if(!z[jr.crossTileID])if(nt)G.placements[jr.crossTileID]=new Qr(!1,!1,!1);else{var Yn,Vn=!1,Qn=!1,la=!0,wa=null,Zn={box:null,offscreen:null},ma={box:null,offscreen:null},pa=null,Aa=null,va=0,Sa=0,Da=0;Mn.textFeatureIndex?va=Mn.textFeatureIndex:jr.useRuntimeCollisionCircles&&(va=jr.featureIndex),Mn.verticalTextFeatureIndex&&(Sa=Mn.verticalTextFeatureIndex);var ii=Mn.textBox;if(ii){var Ai=function(bi){var So=e.WritingMode.horizontal;if(ue.allowVerticalPlacement&&!bi&&G.prevPlacement){var Eo=G.prevPlacement.placedOrientations[jr.crossTileID];Eo&&(G.placedOrientations[jr.crossTileID]=Eo,So=Eo,G.markUsedOrientation(ue,So,jr))}return So},Si=function(bi,So){if(ue.allowVerticalPlacement&&jr.numVerticalGlyphVertices>0&&Mn.verticalTextBox)for(var Eo=0,bl=ue.writingModes;Eo<bl.length&&(bl[Eo]===e.WritingMode.vertical?(Zn=So(),ma=Zn):Zn=bi(),!(Zn&&Zn.box&&Zn.box.length));Eo+=1);else Zn=bi()};if(ge.get("text-variable-anchor")){var ai=ge.get("text-variable-anchor");if(G.prevPlacement&&G.prevPlacement.variableOffsets[jr.crossTileID]){var xi=G.prevPlacement.variableOffsets[jr.crossTileID];ai.indexOf(xi.anchor)>0&&(ai=ai.filter(function(bi){return bi!==xi.anchor})).unshift(xi.anchor)}var ui=function(bi,So,Eo){for(var bl=bi.x2-bi.x1,eu=bi.y2-bi.y1,Yo=jr.textBoxScale,Wl=fr&&!Ot?So:null,hl={box:[],offscreen:!1},tu=Ft?2*ai.length:ai.length,qs=0;qs<tu;++qs){var ru=ai[qs%ai.length],_l=qs>=ai.length,Zl=G.attemptAnchorPlacement(ru,bi,bl,eu,Yo,Nt,er,We,ye,_t,_l,jr,ue,Eo,Wl);if(Zl&&(hl=Zl.placedGlyphBoxes)&&hl.box&&hl.box.length){Vn=!0,wa=Zl.shift;break}}return hl};Si(function(){return ui(ii,Mn.iconBox,e.WritingMode.horizontal)},function(){var bi=Mn.verticalTextBox,So=Zn&&Zn.box&&Zn.box.length;return ue.allowVerticalPlacement&&!So&&jr.numVerticalGlyphVertices>0&&bi?ui(bi,Mn.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}}),Zn&&(Vn=Zn.box,la=Zn.offscreen);var po=Ai(Zn&&Zn.box);if(!Vn&&G.prevPlacement){var ji=G.prevPlacement.variableOffsets[jr.crossTileID];ji&&(G.variableOffsets[jr.crossTileID]=ji,G.markUsedJustification(ue,ji.anchor,
vendor: 5,238 bytes, line 94
94jr,po))}}else{var Po=function(bi,So){var Eo=G.collisionIndex.placeCollisionBox(bi,Ft,We,ye,_t.predicate);return Eo&&Eo.box&&Eo.box.length&&(G.markUsedOrientation(ue,So,jr),G.placedOrientations[jr.crossTileID]=So),Eo};Si(function(){return Po(ii,e.WritingMode.horizontal)},function(){var bi=Mn.verticalTextBox;return ue.allowVerticalPlacement&&jr.numVerticalGlyphVertices>0&&bi?Po(bi,e.WritingMode.vertical):{box:null,offscreen:null}}),Ai(Zn&&Zn.box&&Zn.box.length)}}if(Vn=(Yn=Zn)&&Yn.box&&Yn.box.length>0,la=Yn&&Yn.offscreen,jr.useRuntimeCollisionCircles){var ys=ue.text.placedSymbolArray.get(jr.centerJustifiedTextSymbolIndex),Bs=e.evaluateSizeForFeature(ue.textSizeData,At,ys),cl=ge.get("text-padding"),$s=jr.collisionCircleDiameter;pa=G.collisionIndex.placeCollisionCircles(Ft,ys,ue.lineVertexArray,ue.glyphOffsetArray,Bs,ye,Me,je,B,er,_t.predicate,$s,cl),Vn=Ft||pa.circles.length>0&&!pa.collisionDetected,la=la&&pa.offscreen}if(Mn.iconFeatureIndex&&(Da=Mn.iconFeatureIndex),Mn.iconBox){var el=function(bi){var So=fr&&wa?Qt(bi,wa.x,wa.y,Nt,er,G.transform.angle):bi;return G.collisionIndex.placeCollisionBox(So,Ot,We,ye,_t.predicate)};Qn=ma&&ma.box&&ma.box.length&&Mn.verticalIconBox?(Aa=el(Mn.verticalIconBox)).box.length>0:(Aa=el(Mn.iconBox)).box.length>0,la=la&&Aa.offscreen}var go=wt||jr.numHorizontalGlyphVertices===0&&jr.numVerticalGlyphVertices===0,Hs=xt||jr.numIconVertices===0;if(go||Hs?Hs?go||(Qn=Qn&&Vn):Vn=Qn&&Vn:Qn=Vn=Qn&&Vn,Vn&&Yn&&Yn.box&&(ma&&ma.box&&Sa?G.collisionIndex.insertCollisionBox(Yn.box,ge.get("text-ignore-placement"),ue.bucketInstanceId,Sa,_t.ID):G.collisionIndex.insertCollisionBox(Yn.box,ge.get("text-ignore-placement"),ue.bucketInstanceId,va,_t.ID)),Qn&&Aa&&G.collisionIndex.insertCollisionBox(Aa.box,ge.get("icon-ignore-placement"),ue.bucketInstanceId,Da,_t.ID),pa&&(Vn&&G.collisionIndex.insertCollisionCircles(pa.circles,ge.get("text-ignore-placement"),ue.bucketInstanceId,va,_t.ID),B)){var ul=ue.bucketInstanceId,ts=G.collisionCircleArrays[ul];ts===void 0&&(ts=G.collisionCircleArrays[ul]=new yn);for(var fl=0;fl<pa.circles.length;fl+=4)ts.circles.push(pa.circles[fl+0]),ts.circles.push(pa.circles[fl+1]),ts.circles.push(pa.circles[fl+2]),ts.circles.push(pa.collisionDetected?1:0)}G.placements[jr.crossTileID]=new Qr(Vn||Tr,Qn||Jr,la||ue.justReloaded),z[jr.crossTileID]=!0}};if(kr)for(var hn=ue.getSortedSymbolIndexes(this.transform.angle),on=hn.length-1;on>=0;--on){var Nn=hn[on];Xr(ue.symbolInstances.get(Nn),ue.collisionArrays[Nn])}else for(var Gn=C.symbolInstanceStart;Gn<C.symbolInstanceEnd;Gn++)Xr(ue.symbolInstances.get(Gn),ue.collisionArrays[Gn]);if(B&&ue.bucketInstanceId in this.collisionCircleArrays){var oa=this.collisionCircleArrays[ue.bucketInstanceId];e.invert(oa.invProjMatrix,ye),oa.viewportMatrix=this.collisionIndex.getViewportMatrix()}ue.justReloaded=!1},Pt.prototype.markUsedJustification=function(C,z,B,G){var ie,ue={left:B.leftJustifiedTextSymbolIndex,center:B.centerJustifiedTextSymbolIndex,right:B.rightJustifiedTextSymbolIndex};ie=G===e.WritingMode.vertical?B.verticalPlacedTextSymbolIndex:ue[e.getAnchorJustification(z)];for(var ge=0,ye=[B.leftJustifiedTextSymbolIndex,B.centerJustifiedTextSymbolIndex,B.rightJustifiedTextSymbolIndex,B.verticalPlacedTextSymbolIndex];ge<ye.length;ge+=1){var Me=ye[ge];Me>=0&&(C.text.placedSymbolArray.get(Me).crossTileID=ie>=0&&Me!==ie?0:B.crossTileID)}},Pt.prototype.markUsedOrientation=function(C,z,B){for(var G=z===e.WritingMode.horizontal||z===e.WritingMode.horizontalOnly?z:0,ie=z===e.WritingMode.vertical?z:0,ue=0,ge=[B.leftJustifiedTextSymbolIndex,B.centerJustifiedTextSymbolIndex,B.rightJustifiedTextSymbolIndex];ue<ge.length;ue+=1){var ye=ge[ue];C.text.placedSymbolArray.get(ye).placedOrientation=G}B.verticalPlacedTextSymbolIndex&&(C.text.placedSymbolArray.get(B.verticalPlacedTextSymbolIndex).placedOrientation=ie)},Pt.prototype.commit=function(C){this.commitTime=C,this.zoomAtLastRecencyCheck=this.transform.zoom;var z=this.prevPlacement,B=!1;this.prevZoomAdjustment=z?z.zoomAdjustment(this.transform.zoom):0;var G=z?z.symbolFadeChange(C):1,ie=z?z.opacities:{},ue=z?z.variableOffsets:{},ge=z?z.placedOrientations:{};for(var ye in this.placements){var Me=this.placements[ye],je=ie[ye];je?(this.opacities[ye]=new en(je,G,Me.text,Me.icon),B=B||Me.text!==je.text.placed||Me.icon!==je.icon.placed):(this.opacities[ye]=new en(null,G,Me.text,Me.icon,Me.skipFade),B=B||Me.text||Me.icon)}for(var We in ie){var nt=ie[We];if(!this.opacities[We]){var bt=new en(nt,G,!1,!1);bt.isHidden()||(this.opacities[We]=bt,B=B||nt.text.placed||nt.icon.placed)}}for(var At in ue)this.variableOffsets[At]||!this.opacities[At]||this.opacities[At].isHidden()||(this.variableOffsets[At]=ue[At]);for(var _t in ge)this.placedOrientations[_t]||!this.opacities[_t]||this.opacities[_t].isHidden()||(this.placedOrientations[_t]=ge[_t]);B?this.lastPlacementChangeTime=C:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=z?z.lastPlacementChangeTime:C)},Pt.prototype.updateLayerOpacities=function(C,z){for(var B={},G=0,ie=z;G<ie.length;G+=1){var ue=ie[G],ge=ue.getBucket(C);ge&&ue.latestFeatureIndex&&C.id===ge.layerIds[0]&&this.updateBucketOpacities(ge,B,ue.collisionBoxArray)}},Pt.prototype.updateBucketOpacities=function(C,z,B){var G=this;
94C.hasTextData()&&C.text.opacityVertexArray.clear(),C.hasIconData()&&C.icon.opacityVertexArray.clear(),C.hasIconCollisionBoxData()&&C.iconCollisionBox.collisionVertexArray.clear(),C.hasTextCollisionBoxData()&&C.textCollisionBox.collisionVertexArray.clear();var ie=C.layers[0].layout,ue=new en(null,0,!1,!1,!0),ge=ie.get("text-allow-overlap"),ye=ie.get("icon-allow-overlap"),Me=ie.get("text-variable-anchor"),je=ie.get("text-rotation-alignment")==="map",We=ie.get("text-pitch-alignment")==="map",nt=ie.get("icon-text-fit")!=="none",bt=new en(null,0,ge&&(ye||!C.hasIconData()||ie.get("icon-optional")),ye&&(ge||!C.hasTextData()||ie.get("text-optional")),!0);!C.collisionArrays&&B&&(C.hasIconCollisionBoxData()||C.hasTextCollisionBoxData())&&C.deserializeCollisionBoxes(B);for(var At=function(Ft,Ot,Nt){for(var er=0;er<Ot/4;er++)Ft.opacityVertexArray.emplaceBack(Nt)},_t=function(Ft){var Ot=C.symbolInstances.get(Ft),Nt=Ot.numHorizontalGlyphVertices,er=Ot.numVerticalGlyphVertices,fr=Ot.crossTileID,kr=z[fr],Tr=G.opacities[fr];kr?Tr=ue:Tr||(Tr=bt,G.opacities[fr]=Tr),z[fr]=!0;var Jr=Nt>0||er>0,Xr=Ot.numIconVertices>0,hn=G.placedOrientations[Ot.crossTileID],on=hn===e.WritingMode.vertical,Nn=hn===e.WritingMode.horizontal||hn===e.WritingMode.horizontalOnly;if(Jr){var Gn=Mr(Tr.text),oa=on?Cr:Gn;At(C.text,Nt,oa);var jr=Nn?Cr:Gn;At(C.text,er,jr);var Mn=Tr.text.isHidden();[Ot.rightJustifiedTextSymbolIndex,Ot.centerJustifiedTextSymbolIndex,Ot.leftJustifiedTextSymbolIndex].forEach(function(Da){Da>=0&&(C.text.placedSymbolArray.get(Da).hidden=Mn||on?1:0)}),Ot.verticalPlacedTextSymbolIndex>=0&&(C.text.placedSymbolArray.get(Ot.verticalPlacedTextSymbolIndex).hidden=Mn||Nn?1:0);var Yn=G.variableOffsets[Ot.crossTileID];Yn&&G.markUsedJustification(C,Yn.anchor,Ot,hn);var Vn=G.placedOrientations[Ot.crossTileID];Vn&&(G.markUsedJustification(C,"left",Ot,Vn),G.markUsedOrientation(C,Vn,Ot))}if(Xr){var Qn=Mr(Tr.icon),la=!(nt&&Ot.verticalPlacedIconSymbolIndex&&on);if(Ot.placedIconSymbolIndex>=0){var wa=la?Qn:Cr;At(C.icon,Ot.numIconVertices,wa),C.icon.placedSymbolArray.get(Ot.placedIconSymbolIndex).hidden=Tr.icon.isHidden()}if(Ot.verticalPlacedIconSymbolIndex>=0){var Zn=la?Cr:Qn;At(C.icon,Ot.numVerticalIconVertices,Zn),C.icon.placedSymbolArray.get(Ot.verticalPlacedIconSymbolIndex).hidden=Tr.icon.isHidden()}}if(C.hasIconCollisionBoxData()||C.hasTextCollisionBoxData()){var ma=C.collisionArrays[Ft];if(ma){var pa=new e.Point(0,0);if(ma.textBox||ma.verticalTextBox){var Aa=!0;if(Me){var va=G.variableOffsets[fr];va?(pa=In(va.anchor,va.width,va.height,va.textOffset,va.textBoxScale),je&&pa._rotate(We?G.transform.angle:-G.transform.angle)):Aa=!1}ma.textBox&&Yt(C.textCollisionBox.collisionVertexArray,Tr.text.placed,!Aa||on,pa.x,pa.y),ma.verticalTextBox&&Yt(C.textCollisionBox.collisionVertexArray,Tr.text.placed,!Aa||Nn,pa.x,pa.y)}var Sa=!!(!Nn&&ma.verticalIconBox);ma.iconBox&&Yt(C.iconCollisionBox.collisionVertexArray,Tr.icon.placed,Sa,nt?pa.x:0,nt?pa.y:0),ma.verticalIconBox&&Yt(C.iconCollisionBox.collisionVertexArray,Tr.icon.placed,!Sa,nt?pa.x:0,nt?pa.y:0)}}},wt=0;wt<C.symbolInstances.length;wt++)_t(wt);if(C.sortFeatures(this.transform.angle),this.retainedQueryData[C.bucketInstanceId]&&(this.retainedQueryData[C.bucketInstanceId].featureSortOrder=C.featureSortOrder),C.hasTextData()&&C.text.opacityVertexBuffer&&C.text.opacityVertexBuffer.updateData(C.text.opacityVertexArray),C.hasIconData()&&C.icon.opacityVertexBuffer&&C.icon.opacityVertexBuffer.updateData(C.icon.opacityVertexArray),C.hasIconCollisionBoxData()&&C.iconCollisionBox.collisionVertexBuffer&&C.iconCollisionBox.collisionVertexBuffer.updateData(C.iconCollisionBox.collisionVertexArray),C.hasTextCollisionBoxData()&&C.textCollisionBox.collisionVertexBuffer&&C.textCollisionBox.collisionVertexBuffer.updateData(C.textCollisionBox.collisionVertexArray),C.bucketInstanceId in this.collisionCircleArrays){var xt=this.collisionCircleArrays[C.bucketInstanceId];C.placementInvProjMatrix=xt.invProjMatrix,C.placementViewportMatrix=xt.viewportMatrix,C.collisionCircleArray=xt.circles,delete this.collisionCircleArrays[C.bucketInstanceId]}},Pt.prototype.symbolFadeChange=function(C){return this.fadeDuration===0?1:(C-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Pt.prototype.zoomAdjustment=function(C){return Math.max(0,(this.transform.zoom-C)/1.5)},Pt.prototype.hasTransitions=function(C){return this.stale||C-this.lastPlacementChangeTime<this.fadeDuration},Pt.prototype.stillRecent=function(C,z){var B=this.zoomAtLastRecencyCheck===z?1-this.zoomAdjustment(z):1;return this.zoomAtLastRecencyCheck=z,this.commitTime+this.fadeDuration*B>C},Pt.prototype.setStale=function(){this.stale=!0};var cr=Math.pow(2,25),wr=Math.pow(2,24),qr=Math.pow(2,17),Ur=Math.pow(2,16),br=Math.pow(2,9),_r=Math.pow(2,8),Ar=Math.pow(2,1);function Mr(C){if(C.opacity===0&&!C.placed)return 0;if(C.opacity===1&&C.placed)return 4294967295;var z=C.placed?1:0,B=Math.floor(127*C.opacity);return B*cr+z*wr+B*qr+z*Ur+B*br+z*_r+B*Ar+z}var Cr=0,Gr=function(C){this._sortAcrossTiles=C.layout.get("symbol-z-order")!=="viewport-y"&&C.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Gr.prototype.continuePlacement=function(C,z,B,G,ie){for(var ue=this._bucketParts;this._currentTileIndex<C.length;){var ge=C[this._currentTileIndex];if(z.getBucketParts(ue,G,ge,this._sortAcrossTiles),this._currentTileIndex++,ie())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ue.sort(function(Me,je){return Me.sortKey-je.sortKey}
vendor: 4,679 bytes, line 94
94));this._currentPartIndex<ue.length;){var ye=ue[this._currentPartIndex];if(z.placeLayerBucketPart(ye,this._seenCrossTileIDs,B),this._currentPartIndex++,ie())return!0}return!1};var cn=function(C,z,B,G,ie,ue,ge){this.placement=new Pt(C,ie,ue,ge),this._currentPlacementIndex=z.length-1,this._forceFullPlacement=B,this._showCollisionBoxes=G,this._done=!1};cn.prototype.isDone=function(){return this._done},cn.prototype.continuePlacement=function(C,z,B){for(var G=this,ie=e.browser.now(),ue=function(){var Me=e.browser.now()-ie;return!G._forceFullPlacement&&Me>2};this._currentPlacementIndex>=0;){var ge=z[C[this._currentPlacementIndex]],ye=this.placement.collisionIndex.transform.zoom;if(ge.type==="symbol"&&(!ge.minzoom||ge.minzoom<=ye)&&(!ge.maxzoom||ge.maxzoom>ye)){if(this._inProgressLayer||(this._inProgressLayer=new Gr(ge)),this._inProgressLayer.continuePlacement(B[ge.source],this.placement,this._showCollisionBoxes,ge,ue))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},cn.prototype.commit=function(C){return this.placement.commit(C),this.placement};var wn=512/e.EXTENT/2,Kr=function(C,z,B){this.tileID=C,this.indexedSymbolInstances={},this.bucketInstanceId=B;for(var G=0;G<z.length;G++){var ie=z.get(G),ue=ie.key;this.indexedSymbolInstances[ue]||(this.indexedSymbolInstances[ue]=[]),this.indexedSymbolInstances[ue].push({crossTileID:ie.crossTileID,coord:this.getScaledCoordinates(ie,C)})}};Kr.prototype.getScaledCoordinates=function(C,z){var B=z.canonical.z-this.tileID.canonical.z,G=wn/Math.pow(2,B);return{x:Math.floor((z.canonical.x*e.EXTENT+C.anchorX)*G),y:Math.floor((z.canonical.y*e.EXTENT+C.anchorY)*G)}},Kr.prototype.findMatches=function(C,z,B){for(var G=this.tileID.canonical.z<z.canonical.z?1:Math.pow(2,this.tileID.canonical.z-z.canonical.z),ie=0;ie<C.length;ie++){var ue=C.get(ie);if(!ue.crossTileID){var ge=this.indexedSymbolInstances[ue.key];if(ge)for(var ye=this.getScaledCoordinates(ue,z),Me=0,je=ge;Me<je.length;Me+=1){var We=je[Me];if(Math.abs(We.coord.x-ye.x)<=G&&Math.abs(We.coord.y-ye.y)<=G&&!B[We.crossTileID]){B[We.crossTileID]=!0,ue.crossTileID=We.crossTileID;break}}}}};var bn=function(){this.maxCrossTileID=0};bn.prototype.generate=function(){return++this.maxCrossTileID};var zr=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};zr.prototype.handleWrapJump=function(C){var z=Math.round((C-this.lng)/360);if(z!==0)for(var B in this.indexes){var G=this.indexes[B],ie={};for(var ue in G){var ge=G[ue];ge.tileID=ge.tileID.unwrapTo(ge.tileID.wrap+z),ie[ge.tileID.key]=ge}this.indexes[B]=ie}this.lng=C},zr.prototype.addBucket=function(C,z,B){if(this.indexes[C.overscaledZ]&&this.indexes[C.overscaledZ][C.key]){if(this.indexes[C.overscaledZ][C.key].bucketInstanceId===z.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(C.overscaledZ,this.indexes[C.overscaledZ][C.key])}for(var G=0;G<z.symbolInstances.length;G++)z.symbolInstances.get(G).crossTileID=0;this.usedCrossTileIDs[C.overscaledZ]||(this.usedCrossTileIDs[C.overscaledZ]={});var ie=this.usedCrossTileIDs[C.overscaledZ];for(var ue in this.indexes){var ge=this.indexes[ue];if(Number(ue)>C.overscaledZ)for(var ye in ge){var Me=ge[ye];Me.tileID.isChildOf(C)&&Me.findMatches(z.symbolInstances,C,ie)}else{var je=ge[C.scaledTo(Number(ue)).key];je&&je.findMatches(z.symbolInstances,C,ie)}}for(var We=0;We<z.symbolInstances.length;We++){var nt=z.symbolInstances.get(We);nt.crossTileID||(nt.crossTileID=B.generate(),ie[nt.crossTileID]=!0)}return this.indexes[C.overscaledZ]===void 0&&(this.indexes[C.overscaledZ]={}),this.indexes[C.overscaledZ][C.key]=new Kr(C,z.symbolInstances,z.bucketInstanceId),!0},zr.prototype.removeBucketCrossTileIDs=function(C,z){for(var B in z.indexedSymbolInstances)for(var G=0,ie=z.indexedSymbolInstances[B];G<ie.length;G+=1){var ue=ie[G];delete this.usedCrossTileIDs[C][ue.crossTileID]}},zr.prototype.removeStaleBuckets=function(C){var z=!1;for(var B in this.indexes){var G=this.indexes[B];for(var ie in G)C[G[ie].bucketInstanceId]||(this.removeBucketCrossTileIDs(B,G[ie]),delete G[ie],z=!0)}return z};var Wr=function(){this.layerIndexes={},this.crossTileIDs=new bn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Wr.prototype.addLayer=function(C,z,B){var G=this.layerIndexes[C.id];G===void 0&&(G=this.layerIndexes[C.id]=new zr);var ie=!1,ue={};G.handleWrapJump(B);for(var ge=0,ye=z;ge<ye.length;ge+=1){var Me=ye[ge],je=Me.getBucket(C);je&&C.id===je.layerIds[0]&&(je.bucketInstanceId||(je.bucketInstanceId=++this.maxBucketInstanceId),G.addBucket(Me.tileID,je,this.crossTileIDs)&&(ie=!0),ue[je.bucketInstanceId]=!0)}return G.removeStaleBuckets(ue)&&(ie=!0),ie},Wr.prototype.pruneUnusedLayers=function(C){var z={};
94for(var B in C.forEach(function(G){z[G]=!0}),this.layerIndexes)z[B]||delete this.layerIndexes[B]};var mn=function(C,z){return e.emitValidationErrors(C,z&&z.filter(function(B){return B.identifier!=="source.canvas"}))},pn=e.pick(zt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Pn=e.pick(zt,["setCenter","setZoom","setBearing","setPitch"]),aa=function(){var C={},z=e.styleSpec.$version;for(var B in e.styleSpec.$root){var G=e.styleSpec.$root[B];if(G.required){var ie=null;(ie=B==="version"?z:G.type==="array"?[]:{})!=null&&(C[B]=ie)}}return C}(),qn=function(C){function z(B,G){var ie=this;G===void 0&&(G={}),C.call(this),this.map=B,this.dispatcher=new S(Ze(),this),this.imageManager=new p,this.imageManager.setEventedParent(this),this.glyphManager=new k(B._requestManager,G.localIdeographFontFamily),this.lineAtlas=new P(256,512),this.crossTileSymbolIndex=new Wr,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());var ue=this;this._rtlTextPluginCallback=z.registerForPluginStateChange(function(ge){var ye={pluginStatus:ge.pluginStatus,pluginURL:ge.pluginURL};ue.dispatcher.broadcast("syncRTLPluginState",ye,function(Me,je){if(e.triggerPluginCompletionEvent(Me),je&&je.every(function(nt){return nt}))for(var We in ue.sourceCaches)ue.sourceCaches[We].reload()})}),this.on("data",function(ge){if(ge.dataType==="source"&&ge.sourceDataType==="metadata"){var ye=ie.sourceCaches[ge.sourceId];if(ye){var Me=ye.getSource();if(Me&&Me.vectorLayerIds)for(var je in ie._layers){var We=ie._layers[je];We.source===Me.id&&ie._validateLayer(We)}}}})}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.loadURL=function(B,G){var ie=this;G===void 0&&(G={}),this.fire(new e.Event("dataloading",{dataType:"style"}));var ue=typeof G.validate=="boolean"?G.validate:!e.isMapboxURL(B);B=this.map._requestManager.normalizeStyleURL(B,G.accessToken);var ge=this.map._requestManager.transformRequest(B,e.ResourceType.Style);this._request=e.getJSON(ge,function(ye,Me){ie._request=null,ye?ie.fire(new e.ErrorEvent(ye)):Me&&ie._load(Me,ue)})},z.prototype.loadJSON=function(B,G){var ie=this;G===void 0&&(G={}),this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.browser.frame(function(){ie._request=null,ie._load(B,G.validate!==!1)})},z.prototype.loadEmpty=function(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(aa,!1)},z.prototype._load=function(B,G){if(!G||!mn(this,e.validateStyle(B))){for(var ie in this._loaded=!0,this.stylesheet=B,B.sources)this.addSource(ie,B.sources[ie],{validate:!1});B.sprite?this._loadSprite(B.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(B.glyphs);var ue=Ct(this.stylesheet.layers);this._order=ue.map(function(je){return je.id}),this._layers={},this._serializedLayers={};for(var ge=0,ye=ue;ge<ye.length;ge+=1){var Me=ye[ge];(Me=e.createStyleLayer(Me)).setEventedParent(this,{layer:{id:Me.id}}),this._layers[Me.id]=Me,this._serializedLayers[Me.id]=Me.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new I(this.stylesheet.light),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}},z.prototype._loadSprite=function(B){var G=this;this._spriteRequest=function(ie,ue,ge){var ye,Me,je,We=e.browser.devicePixelRatio>1?"@2x":"",nt=e.getJSON(ue.transformRequest(ue.normalizeSpriteURL(ie,We,".json"),e.ResourceType.SpriteJSON),function(_t,wt){nt=null,je||(je=_t,ye=wt,At())}),bt=e.getImage(ue.transformRequest(ue.normalizeSpriteURL(ie,We,".png"),e.ResourceType.SpriteImage),function(_t,wt){bt=null,je||(je=_t,Me=wt,At())});function At(){if(je)ge(je);else if(ye&&Me){var _t=e.browser.getImageData(Me),wt={};for(var xt in ye){var Ft=ye[xt],Ot=Ft.width,Nt=Ft.height,er=Ft.x,fr=Ft.y,kr=Ft.sdf,Tr=Ft.pixelRatio,Jr=Ft.stretchX,Xr=Ft.stretchY,hn=Ft.content,on=new e.RGBAImage({width:Ot,height:Nt});e.RGBAImage.copy(_t,on,{x:er,y:fr},{x:0,y:0},{width:Ot,height:Nt}),wt[xt]={data:on,pixelRatio:Tr,sdf:kr,stretchX:Jr,stretchY:Xr,content:hn}}ge(null,wt)}}return{cancel:function(){nt&&(nt.cancel(),nt=null),bt&&(bt.cancel(),bt=null)}}}(B,this.map._requestManager,function(ie,ue){if(G._spriteRequest=null,ie)G.fire(new e.ErrorEvent(ie));else if(ue)for(var ge in ue)G.imageManager.addImage(ge,ue[ge]);G.imageManager.setLoaded(!0),G._availableImages=G.imageManager.listImages(),G.dispatcher.broadcast("setImages",G._availableImages),G.fire(new e.Event("data",{dataType:"style"}))})},z.prototype._validateLayer=function(B){var G=this.sourceCaches[B.source];if(G){var ie=B.sourceLayer;if(ie){var ue=G.getSource();(ue.type==="geojson"||ue.vectorLayerIds&&ue.vectorLayerIds.indexOf(ie)===-1)&&this.fire(new e.ErrorEvent(new Error('Source layer "'+ie+'" does not exist on source "'+ue.id+'" as specified by style layer "'+B.id+'"')))}}},z.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var B in this.sourceCaches)if(!this.sourceCaches[B].loaded())return!1;return!!this.imageManager.isLoaded()},z.prototype._serializeLayers=function(B){for(var G=[],ie=0,ue=B;ie<ue.length;ie+=1){var ge=ue[ie],ye=this._layers[ge];ye.type!=="custom"&&G.push(ye.serialize())}return G},z.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var B in this.sourceCaches)if(this.sourceCaches[B].hasTransition())return!0;for(var G in this._layers)if(this._layers[G].hasTransition())return!0;return!1},z.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},z.prototype.update=function(B){if(this._loaded){var G=this._changed;if(this._changed){var ie=Object.keys(this._updatedLayers),ue=Object.keys(this._removedLayers);for(var ge in(ie.length||ue.length)&&this._updateWorkerLayers(ie,ue),this._updatedSources){var ye=this._updatedSources[ge];ye==="reload"?this._reloadSource(ge):ye==="clear"&&this._clearSource(ge)}for(var Me in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[Me].updateTransitions(B);this.light.updateTransitions(B),this._resetUpdates()}for(var je in this.sourceCaches)this.sourceCaches[je].used=!1;for(var We=0,nt=this._order;We<nt.length;We+=1){var bt=nt[We],At=this._layers[bt];At.recalculate(B,this._availableImages),!At.isHidden(B.zoom)&&At.source&&(this.sourceCaches[At.source].used=!0)}this.light.recalculate(B),this.z=B.zoom,G&&this.fire(new e.Event("data",{dataType:"style"}))}},z.prototype._updateTilesForChangedImages=function(){var B=Object.keys(this._changedImages);if(B.length){for(var G in this.sourceCaches)this.sourceCaches[G].reloadTilesForDependencies(["icons","patterns"],B);this._changedImages={}}},z.prototype._updateWorkerLayers=function(B,G){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(B),removedIds:G})},z.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},z.prototype.setState=function(B){var G=this;if(this._checkLoaded(),mn(this,e.validateStyle(B)))return!1;(B=e.clone$1(B)).layers=Ct(B.layers);var ie=Ut(this.serialize(),B).filter(function(ge){return!(ge.command in Pn)});if(ie.length===0)return!1;var ue=ie.filter(function(ge){return!(ge.command in pn)});if(ue.length>0)throw new Error("Unimplemented: "+ue.map(function(ge){return ge.command}).join(", ")+".");return ie.forEach(function(ge){ge.command!=="setTransition"&&G[ge.command].apply(G,ge.args)}),this.stylesheet=B,!0},z.prototype.addImage=function(B,G){if(this.getImage(B))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(B,G),this._availableImages=this.imageManager.listImages(),this._changedImages[B]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},z.prototype.updateImage=function(B,G){this.imageManager.updateImage(B,G)},z.prototype.getImage=function(B){return this.imageManager.getImage(B)},z.prototype.removeImage=function(B){if(!this.getImage(B))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(B),this._availableImages=this.imageManager.listImages(),this._changedImages[B]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},z.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},z.prototype.addSource=function(B,G,ie){var ue=this;if(ie===void 0&&(ie={}),this._checkLoaded(),this.sourceCaches[B]!==void 0)throw new Error("There is already a source with this ID");if(!G.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(G).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(G.type)>
94=0)||!this._validate(e.validateStyle.source,"sources."+B,G,null,ie)){this.map&&this.map._collectResourceTiming&&(G.collectResourceTiming=!0);var ge=this.sourceCaches[B]=new Je(B,G,this.dispatcher);ge.style=this,ge.setEventedParent(this,function(){return{isSourceLoaded:ue.loaded(),source:ge.serialize(),sourceId:B}}),ge.onAdd(this.map),this._changed=!0}},z.prototype.removeSource=function(B){if(this._checkLoaded(),this.sourceCaches[B]===void 0)throw new Error("There is no source with this ID");for(var G in this._layers)if(this._layers[G].source===B)return this.fire(new e.ErrorEvent(new Error('Source "'+B+'" cannot be removed while layer "'+G+'" is using it.')));var ie=this.sourceCaches[B];delete this.sourceCaches[B],delete this._updatedSources[B],ie.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:B})),ie.setEventedParent(null),ie.clearTiles(),ie.onRemove&&ie.onRemove(this.map),this._changed=!0},z.prototype.setGeoJSONSourceData=function(B,G){this._checkLoaded(),this.sourceCaches[B].getSource().setData(G),this._changed=!0},z.prototype.getSource=function(B){return this.sourceCaches[B]&&this.sourceCaches[B].getSource()},z.prototype.addLayer=function(B,G,ie){ie===void 0&&(ie={}),this._checkLoaded();var ue=B.id;if(this.getLayer(ue))this.fire(new e.ErrorEvent(new Error('Layer with i
94d "'+ue+'" already exists on this map')));else{var ge;if(B.type==="custom"){if(mn(this,e.validateCustomStyleLayer(B)))return;ge=e.createStyleLayer(B)}else{if(typeof B.source=="object"&&(this.addSource(ue,B.source),B=e.clone$1(B),B=e.extend(B,{source:ue})),this._validate(e.validateStyle.layer,"layers."+ue,B,{arrayIndex:-1},ie))return;ge=e.createStyleLayer(B),this._validateLayer(ge),ge.setEventedParent(this,{layer:{id:ue}}),this._serializedLayers[ge.id]=ge.serialize()}var ye=G?this._order.indexOf(G):this._order.length;if(G&&ye===-1)this.fire(new e.ErrorEvent(new Error('Layer with id "'+G+'" does not exist on this map.')));else{if(this._order.splice(ye,0,ue),this._layerOrderChanged=!0,this._layers[ue]=ge,this._removedLayers[ue]&&ge.source&&ge.type!=="custom"){var Me=this._removedLayers[ue];delete this._removedLayers[ue],Me.type!==ge.type?this._updatedSources[ge.source]="clear":(this._updatedSources[ge.source]="reload",this.sourceCaches[ge.source].pause())}this._updateLayer(ge),ge.onAdd&&ge.onAdd(this.map)}}},z.prototype.moveLayer=function(B,G){if(this._checkLoaded(),this._changed=!0,this._layers[B]){if(B!==G){var ie=this._order.indexOf(B);this._order.splice(ie,1);var ue=G?this._order.indexOf(G):this._order.length;
94G&&ue===-1?this.fire(new e.ErrorEvent(new Error('Layer with id "'+G+'" does not exist on this map.'))):(this._order.splice(ue,0,B),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+B+"' does not exist in the map's style and cannot be moved.")))},z.prototype.removeLayer=function(B){this._checkLoaded();var G=this._layers[B];if(G){G.setEventedParent(null);var ie=this._order.indexOf(B);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[B]=G,delete this._layers[B],delete this._serializedLayers[B],delete this._updatedLayers[B],delete this._updatedPaintProps[B],G.onRemove&&G.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+B+"' does not exist in the map's style and cannot be removed.")))},z.prototype.getLayer=function(B){return this._layers[B]},z.prototype.hasLayer=function(B){return B in this._layers},z.prototype.setLayerZoomRange=function(B,G,ie){this._checkLoaded();var ue=this.getLayer(B);ue?ue.minzoom===G&&ue.maxzoom===ie||(G!=null&&(ue.minzoom=G),ie!=null&&(ue.maxzoom=ie),this._updateLayer(ue)):this.fire(new e.ErrorEvent(new Error("The layer '"+B+"' does not exist in the map's style and cannot have zoom extent.")))},z.prototype.setFilter=function(B,G,ie){ie===void 0&&(ie={}),this._checkLoaded();var ue=this.getLayer(B);if(ue){if(!e.deepEqual(ue.filter,G))return G==null?(ue.filter=void 0,void this._updateLayer(ue)):void(this._validate(e.validateStyle.filter,"layers."+ue.id+".filter",G,null,ie)||(ue.filter=e.clone$1(G),this._updateLayer(ue)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+B+"' does not exist in the map's style and cannot be filtered.")))},z.prototype.getFilter=function(B){return e.clone$1(this.getLayer(B).filter)},z.prototype.setLayoutProperty=function(B,G,ie,ue){ue===void 0&&(ue={}),this._checkLoaded();var ge=this.getLayer(B);ge?e.deepEqual(ge.getLayoutProperty(G),ie)||(ge.setLayoutProperty(G,ie,ue),this._updateLayer(ge)):this.fire(new e.ErrorEvent(new Error("The layer '"+B+"' does not exist in the map's style and cannot be styled.")))},z.prototype.getLayoutProperty=function(B,G){var ie=this.getLayer(B);if(ie)return ie.getLayoutProperty(G);this.fire(new e.ErrorEvent(new Error("The layer '"+B+"' does not exist in the map's style.")))},z.prototype.setPaintProperty=function(B,G,ie,ue){ue===void 0&&(ue={}),this._checkLoaded();var ge=this.getLayer(B);ge?e.deepEqual(ge.getPaintProperty(G),ie)||(ge.setPaintProperty(G,ie,ue)&&this._updateLayer(ge),this._changed=!0,this._updatedPaintProps[B]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+B+"' does not exist in the map's style and cannot be styled.")))},z.prototype.getPaintProperty=function(B,G){return this.getLayer(B).getPaintProperty(G)},z.prototype.setFeatureState=function(B,G){this._checkLoaded();var ie=B.source,ue=B.sourceLayer,ge=this.sourceCaches[ie];if(ge!==void 0){var ye=ge.getSource().type;ye==="geojson"&&ue?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ye!=="vector"||ue?(B.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),ge.setFeatureState(ue,B.id,G)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+ie+"' does not exist in the map's style.")))},z.prototype.removeFeatureState=function(B,G){this._checkLoaded();var ie=B.source,ue=this.sourceCaches[ie];if(ue!==void 0){var ge=ue.getSource().type,ye=ge==="vector"?B.sourceLayer:void 0;ge!=="vector"||ye?G&&typeof B.id!="string"&&typeof B.id!="number"?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):ue.removeFeatureState(ye,B.id,G):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+ie+"' does not exist in the map's style.")))},z.prototype.getFeatureState=function(B){this._checkLoaded();var G=B.source,ie=B.sourceLayer,ue=this.sourceCaches[G];
94if(ue!==void 0){if(ue.getSource().type!=="vector"||ie)return B.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),ue.getFeatureState(ie,B.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+G+"' does not exist in the map's style.")))},z.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},z.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,function(B){return B.serialize()}),layers:this._serializeLayers(this._order)},function(B){return B!==void 0})},z.prototype._updateLayer=function(B){this._updatedLayers[B.id]=!0,B.source&&!this._updatedSources[B.source]&&this.sourceCaches[B.source].getSource().type!=="raster"&&(this._updatedSources[B.source]="reload",this.sourceCaches[B.source].pause()),this._changed=!0},z.prototype._flattenAndSortRenderedFeatures=function(B){for(var G=this,ie=function(hn){return G._layers[hn].type==="fill-extrusion"},ue={},ge=[],ye=this._order.length-1;ye>=0;ye--){var Me=this._order[ye];if(ie(Me)){ue[Me]=ye;for(var je=0,We=B;je<We.length;je+=1){var nt=We[je][Me];if(nt)for(var bt=0,At=nt;bt<At.length;bt+=1){var _t=At[bt];ge.push(_t)}}}}ge.sort(function(hn,on){return on.intersectionZ-hn.intersectionZ});for(var wt=[],xt=this._order.length-1;xt>=0;xt--){var Ft=this._order[xt];if(ie(Ft))for(var Ot=ge.length-1;Ot>=0;Ot--){var Nt=ge[Ot].feature;if(ue[Nt.layer.id]<xt)break;wt.push(Nt),ge.pop()}else for(var er=0,fr=B;er<fr.length;er+=1){var kr=fr[er][Ft];if(kr)for(var Tr=0,Jr=kr;Tr<Jr.length;Tr+=1){var Xr=Jr[Tr];wt.push(Xr.feature)}}}return wt},z.prototype.queryRenderedFeatures=function(B,G,ie){G&&G.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",G.filter,null,G);var ue={};if(G&&G.layers){if(!Array.isArray(G.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var ge=0,ye=G.layers;ge<ye.length;ge+=1){var Me=ye[ge],je=this._layers[Me];if(!je)return this.fire(new e.ErrorEvent(new Error("The layer '"+Me+"' does not exist in the map's style and cannot be queried for features."))),[];ue[je.source]=!0}}var We=[];for(var nt in G.availableImages=this._availableImages,this.sourceCaches)G.layers&&!ue[nt]||We.push(U(this.sourceCaches[nt],this._layers,this._serializedLayers,B,G,ie));return this.placement&&We.push(function(bt,At,_t,wt,xt,Ft,Ot){for(var Nt={},er=Ft.queryRenderedSymbols(wt),fr=[],kr=0,Tr=Object.keys(er).map(Number);kr<Tr.length;
vendor: 4,975 bytes, line 94
94kr+=1){var Jr=Tr[kr];fr.push(Ot[Jr])}fr.sort(Q);for(var Xr=function(){var oa=on[hn],jr=oa.featureIndex.lookupSymbolFeatures(er[oa.bucketInstanceId],At,oa.bucketIndex,oa.sourceLayerIndex,xt.filter,xt.layers,xt.availableImages,bt);for(var Mn in jr){var Yn=Nt[Mn]=Nt[Mn]||[],Vn=jr[Mn];Vn.sort(function(Zn,ma){var pa=oa.featureSortOrder;if(pa){var Aa=pa.indexOf(Zn.featureIndex);return pa.indexOf(ma.featureIndex)-Aa}return ma.featureIndex-Zn.featureIndex});for(var Qn=0,la=Vn;Qn<la.length;Qn+=1){var wa=la[Qn];Yn.push(wa)}}},hn=0,on=fr;hn<on.length;hn+=1)Xr();var Nn=function(oa){Nt[oa].forEach(function(jr){var Mn=jr.feature,Yn=bt[oa],Vn=_t[Yn.source].getFeatureState(Mn.layer["source-layer"],Mn.id);Mn.source=Mn.layer.source,Mn.layer["source-layer"]&&(Mn.sourceLayer=Mn.layer["source-layer"]),Mn.state=Vn})};for(var Gn in Nt)Nn(Gn);return Nt}(this._layers,this._serializedLayers,this.sourceCaches,B,G,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(We)},z.prototype.querySourceFeatures=function(B,G){G&&G.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",G.filter,null,G);var ie=this.sourceCaches[B];return ie?function(ue,ge){for(var ye=ue.getRenderableIds().map(function(At){return ue.getTileByID(At)}),Me=[],je={},We=0;We<ye.length;We++){var nt=ye[We],bt=nt.tileID.canonical.key;je[bt]||(je[bt]=!0,nt.querySourceFeatures(Me,ge))}return Me}(ie,G):[]},z.prototype.addSourceType=function(B,G,ie){return z.getSourceType(B)?ie(new Error('A source type called "'+B+'" already exists.')):(z.setSourceType(B,G),G.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:B,url:G.workerSourceURL},ie):ie(null,null))},z.prototype.getLight=function(){return this.light.getLight()},z.prototype.setLight=function(B,G){G===void 0&&(G={}),this._checkLoaded();var ie=this.light.getLight(),ue=!1;for(var ge in B)if(!e.deepEqual(B[ge],ie[ge])){ue=!0;break}if(ue){var ye={now:e.browser.now(),transition:e.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(B,G),this.light.updateTransitions(ye)}},z.prototype._validate=function(B,G,ie,ue,ge){return ge===void 0&&(ge={}),(!ge||ge.validate!==!1)&&mn(this,B.call(e.validateStyle,e.extend({key:G,style:this.serialize(),value:ie,styleSpec:e.styleSpec},ue)))},z.prototype._remove=function(){for(var B in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[B].setEventedParent(null);for(var G in this.sourceCaches)this.sourceCaches[G].clearTiles(),this.sourceCaches[G].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},z.prototype._clearSource=function(B){this.sourceCaches[B].clearTiles()},z.prototype._reloadSource=function(B){this.sourceCaches[B].resume(),this.sourceCaches[B].reload()},z.prototype._updateSources=function(B){for(var G in this.sourceCaches)this.sourceCaches[G].update(B)},z.prototype._generateCollisionBoxes=function(){for(var B in this.sourceCaches)this._reloadSource(B)},z.prototype._updatePlacement=function(B,G,ie,ue,ge){ge===void 0&&(ge=!1);for(var ye=!1,Me=!1,je={},We=0,nt=this._order;We<nt.length;We+=1){var bt=nt[We],At=this._layers[bt];if(At.type==="symbol"){if(!je[At.source]){var _t=this.sourceCaches[At.source];je[At.source]=_t.getRenderableIds(!0).map(function(er){return _t.getTileByID(er)}).sort(function(er,fr){return fr.tileID.overscaledZ-er.tileID.overscaledZ||(er.tileID.isLessThan(fr.tileID)?-1:1)})}var wt=this.crossTileSymbolIndex.addLayer(At,je[At.source],B.center.lng);ye=ye||wt}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((ge=ge||this._layerOrderChanged||ie===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.browser.now(),B.zoom))&&(this.pauseablePlacement=new cn(B,this._order,ge,G,ie,ue,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,je),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.browser.now()),Me=!0),ye&&this.pauseablePlacement.placement.setStale()),Me||ye)for(var xt=0,Ft=this._order;xt<Ft.length;xt+=1){var Ot=Ft[xt],Nt=this._layers[Ot];Nt.type==="symbol"&&this.placement.updateLayerOpacities(Nt,je[Nt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.browser.now())},z.prototype._releaseSymbolFadeTiles=function(){for(var B in this.sourceCaches)this.sourceCaches[B].releaseSymbolFadeTiles()},z.prototype.getImages=function(B,G,ie){this.imageManager.getImages(G.icons,ie),this._updateTilesForChangedImages();var ue=this.sourceCaches[G.source];ue&&ue.setDependencies(G.tileID.key,G.type,G.icons)},z.prototype.getGlyphs=function(B,G,ie){this.glyphManager.getGlyphs(G.stacks,ie)}
94,z.prototype.getResource=function(B,G,ie){return e.makeRequest(G,ie)},z}(e.Evented);qn.getSourceType=function(C){return R[C]},qn.setSourceType=function(C,z){R[C]=z},qn.registerForPluginStateChange=e.registerForPluginStateChange;var vn=e.createLayout([{name:"a_pos",type:"Int16",components:2}]),ea=Ua(`#ifdef GL_ES
95precision mediump float;
96#else
97#if !defined(lowp)
98#define lowp
99#endif
100#if !defined(mediump)
101#define mediump
102#endif
103#if !defined(highp)
104#define highp
105#endif
106#endif`,`#ifdef GL_ES
107precision highp float;
108#else
109#if !defined(lowp)
110#define lowp
111#endif
112#if !defined(mediump)
113#define mediump
114#endif
115#if !defined(highp)
116#define highp
117#endif
118#endif
119vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
120);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`),ua=Ua(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
121#ifdef OVERDRAW_INSPECTOR
122gl_FragColor=vec4(1.0);
123#endif
124}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ya=Ua(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
125#ifdef OVERDRAW_INSPECTOR
126gl_FragColor=vec4(1.0);
127#endif
128}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Ei=Ua(`varying vec3 v_data;
129#pragma mapbox: define highp vec4 color
130#pragma mapbox: define mediump float radius
131#pragma mapbox: define lowp float blur
132#pragma mapbox: define lowp float opacity
133#pragma mapbox: define highp vec4 stroke_color
134#pragma mapbox: define mediump float stroke_width
135#pragma mapbox: define lowp float stroke_opacity
136void main() {
137#pragma mapbox: initialize highp vec4 color
138#pragma mapbox: initialize mediump float radius
139#pragma mapbox: initialize lowp float blur
140#pragma mapbox: initialize lowp float opacity
141#pragma mapbox: initialize highp vec4 stroke_color
142#pragma mapbox: initialize mediump float stroke_width
143#pragma mapbox: initialize lowp float stroke_opacity
144vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius
144/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
145#ifdef OVERDRAW_INSPECTOR
146gl_FragColor=vec4(1.0);
147#endif
148}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
149#pragma mapbox: define highp vec4 color
150#pragma mapbox: define mediump float radius
151#pragma mapbox: define lowp float blur
152#pragma mapbox: define lowp float opacity
153#pragma mapbox: define highp vec4 stroke_color
154#pragma mapbox: define mediump float stroke_width
155#pragma mapbox: define lowp float stroke_opacity
156void main(void) {
157#pragma mapbox: initialize highp vec4 color
158#pragma mapbox: initialize mediump float radius
159#pragma mapbox: initialize lowp float blur
160#pragma mapbox: initialize lowp float opacity
161#pragma mapbox: initialize highp vec4 stroke_color
162#pragma mapbox: initialize mediump float stroke_width
163#pragma mapbox: initialize lowp float stroke_opacity
164vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),ei=Ua("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),gi=Ua(`uniform highp float u_intensity;varying vec2 v_extrude;
165#pragma mapbox: define highp float weight
166#define GAUSS_COEF 0.3989422804014327
167void main() {
168#pragma mapbox: initialize highp float weight
169float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
170#ifdef OVERDRAW_INSPECTOR
171gl_FragColor=vec4(1.0);
172#endif
173}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
174#pragma mapbox: define highp float weight
175#pragma mapbox: define mediump float radius
176const highp float ZERO=1.0/255.0/16.0;
177#define GAUSS_COEF 0.3989422804014327
178void main(void) {
179#pragma mapbox: initialize highp float weight
180#pragma mapbox: initialize mediump float radius
181vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),ka=Ua(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
182#ifdef OVERDRAW_INSPECTOR
183gl_FragColor=vec4(0.0);
184#endif
185}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Fa=Ua("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),so=Ua("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),Do=Ua("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),qo=Ua(`#pragma mapbox: define highp vec4 color
186#pragma mapbox: define lowp float opacity
187void main() {
188#pragma mapbox: initialize highp vec4 color
189#pragma mapbox: initialize lowp float opacity
190gl_FragColor=color*opacity;
191#ifdef OVERDRAW_INSPECTOR
192gl_FragColor=vec4(1.0);
193#endif
194}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
195#pragma mapbox: define highp vec4 color
196#pragma mapbox: define lowp float opacity
197void main() {
198#pragma mapbox: initialize highp vec4 color
199#pragma mapbox: initialize lowp float opacity
200gl_Position=u_matrix*vec4(a_pos,0,1);}`),Vi=Ua(`varying vec2 v_pos;
201#pragma mapbox: define highp vec4 outline_color
202#pragma mapbox: define lowp float opacity
203void main() {
204#pragma mapbox: initialize highp vec4 outline_color
205#pragma mapbox: initialize lowp float opacity
206float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
207#ifdef OVERDRAW_INSPECTOR
208gl_FragColor=vec4(1.0);
209#endif
210}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
211#pragma mapbox: define highp vec4 outline_color
212#pragma mapbox: define lowp float opacity
213void main() {
214#pragma mapbox: initialize highp vec4 outline_color
215#pragma mapbox: initialize lowp float opacity
216gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Gi=Ua(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
217#pragma mapbox: define lowp float opacity
218#pragma mapbox: define lowp vec4 pattern_from
219#pragma mapbox: define lowp vec4 pattern_to
220void main() {
221#pragma mapbox: initialize lowp float opacity
222#pragma mapbox: initialize mediump vec4 pattern_from
223#pragma mapbox: initialize mediump vec4 pattern_to
224vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
225#ifdef OVERDRAW_INSPECTOR
226gl_FragColor=vec4(1.0);
227#endif
228}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
229#pragma mapbox: define lowp float opacity
230#pragma mapbox: define lowp vec4 pattern_from
231#pragma mapbox: define lowp vec4 pattern_to
232#pragma mapbox: define lowp float pixel_ratio_from
233#pragma mapbox: define lowp float pixel_ratio_to
234void main() {
235#pragma mapbox: initialize lowp float opacity
236#pragma mapbox: initialize mediump vec4 pattern_from
237#pragma mapbox: initialize mediump vec4 pattern_to
238#pragma mapbox: initialize lowp float pixel_ratio_from
239#pragma mapbox: initialize lowp float pixel_ratio_to
240vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Ro=Ua(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
241#pragma mapbox: define lowp float opacity
242#pragma mapbox: define lowp vec4 pattern_from
243#pragma mapbox: define lowp vec4 pattern_to
244void main() {
245#pragma mapbox: initialize lowp float opacity
246#pragma mapbox: initialize mediump vec4 pattern_from
247#pragma mapbox: initialize mediump vec4 pattern_to
248vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
249#ifdef OVERDRAW_INSPECTOR
250gl_FragColor=vec4(1.0);
251#endif
252}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
253#pragma mapbox: define lowp float opacity
254#pragma mapbox: define lowp vec4 pattern_from
255#pragma mapbox: define lowp vec4 pattern_to
256#pragma mapbox: define lowp float pixel_ratio_from
257#pragma mapbox: define lowp float pixel_ratio_to
258void main() {
259#pragma mapbox: initialize lowp float opacity
260#pragma mapbox: initialize mediump vec4 pattern_from
261#pragma mapbox: initialize mediump vec4 pattern_to
262#pragma mapbox: initialize lowp float pixel_ratio_from
263#pragma mapbox: initialize lowp float pixel_ratio_to
264vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),ja=Ua(`varying vec4 v_color;void main() {gl_FragColor=v_color;
265#ifdef OVERDRAW_INSPECTOR
266gl_FragColor=vec4(1.0);
267#endif
268}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
269#pragma mapbox: define highp float base
270#pragma mapbox: define highp float height
271#pragma mapbox: define highp vec4 color
272void main() {
273#pragma mapbox: initialize highp float base
274#pragma mapbox: initialize highp float height
275#pragma mapbox: initialize highp vec4 color
276vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),wo=Ua(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
277#pragma mapbox: define lowp float base
278#pragma mapbox: define lowp float height
279#pragma mapbox: define lowp vec4 pattern_from
280#pragma mapbox: define lowp vec4 pattern_to
281#pragma mapbox: define lowp float pixel_ratio_from
282#pragma mapbox: define lowp float pixel_ratio_to
283void main() {
284#pragma mapbox: initialize lowp float base
285#pragma mapbox: initialize lowp float height
286#pragma mapbox: initialize mediump vec4 pattern_from
287#pragma mapbox: initialize mediump vec4 pattern_to
288#pragma mapbox: initialize lowp float pixel_ratio_from
289#pragma mapbox: initialize lowp float pixel_ratio_to
290vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
291#ifdef OVERDRAW_INSPECTOR
292gl_FragColor=vec4(1.0);
293#endif
294}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
295#pragma mapbox: define lowp float base
296#pragma mapbox: define lowp float height
297#pragma mapbox: define lowp vec4 pattern_from
298#pragma mapbox: define lowp vec4 pattern_to
299#pragma mapbox: define lowp float pixel_ratio_from
300#pragma mapbox: define lowp float pixel_ratio_to
301void main() {
302#pragma mapbox: initialize lowp float base
303#pragma mapbox: initialize lowp float height
304#pragma mapbox: initialize mediump vec4 pat
304tern_from
305#pragma mapbox: initialize mediump vec4 pattern_to
306#pragma mapbox: initialize lowp float pixel_ratio_from
307#pragma mapbox: initialize lowp float pixel_ratio_to
308vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
309? a_pos
310: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),lo=Ua(`#ifdef GL_ES
311precision highp float;
312#endif
313uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
314#ifdef OVERDRAW_INSPECTOR
315gl_FragColor=vec4(1.0);
316#endif
317}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),mi=Ua(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
318#define PI 3.141592653589793
319void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
320#ifdef OVERDRAW_INSPECTOR
321gl_FragColor=vec4(1.0);
322#endif
323}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Yi=Ua(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
324#pragma mapbox: define highp vec4 color
325#pragma mapbox: define lowp float blur
326#pragma mapbox: define lowp float opacity
327void main() {
328#pragma mapbox: initialize highp vec4 color
329#pragma mapbox: initialize lowp float blur
330#pragma mapbox: initialize lowp float opacity
331float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
332#ifdef OVERDRAW_INSPECTOR
333gl_FragColor=vec4(1.0);
334#endif
335}`,`
336#define scale 0.015873016
337attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
338#pragma mapbox: define highp vec4 color
339#pragma mapbox: define lowp float blur
340#pragma mapbox: define lowp float opacity
341#pragma mapbox: define mediump float gapwidth
342#pragma mapbox: define lowp float offset
343#pragma mapbox: define mediump float width
344void main() {
345#pragma mapbox: initialize highp vec4 color
346#pragma mapbox: initialize lowp float blur
347#pragma mapbox: initialize lowp float opacity
348#pragma mapbox: initialize mediump float gapwidth
349#pragma mapbox: initialize lowp float offset
350#pragma mapbox: initialize mediump float width
351float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),co=Ua(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;
352#pragma mapbox: define lowp float blur
353#pragma mapbox: define lowp float opacity
354void main() {
355#pragma mapbox: initialize lowp float blur
356#pragma mapbox: initialize lowp float opacity
357float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);
358#ifdef OVERDRAW_INSPECTOR
359gl_FragColor=vec4(1.0);
360#endif
361}`,`
362#define MAX_LINE_DISTANCE 32767.0
363#define scale 0.015873016
364attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;
365#pragma mapbox: define lowp float blur
366#pragma mapbox: define lowp float opacity
367#pragma mapbox: define mediump float gapwidth
368#pragma mapbox: define lowp float offset
369#pragma mapbox: define mediump float width
370void main() {
371#pragma mapbox: initialize lowp float blur
372#pragma mapbox: initialize lowp float opacity
373#pragma mapbox: initialize mediump float gapwidth
374#pragma mapbox: initialize lowp float offset
375#pragma mapbox: initialize mediump float width
376float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),xo=Ua(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
377#pragma mapbox: define lowp vec4 pattern_from
378#pragma mapbox: define lowp vec4 pattern_to
379#pragma mapbox: define lowp float pixel_ratio_from
380#pragma mapbox: define lowp float pixel_ratio_to
381#pragma mapbox: define lowp float blur
382#pragma mapbox: define lowp float opacity
383void main() {
384#pragma mapbox: initialize mediump vec4 pattern_from
385#pragma mapbox: initialize mediump vec4 pattern_to
386#pragma mapbox: initialize lowp float pixel_ratio_from
387#pragma mapbox: initialize lowp float pixel_ratio_to
388#pragma mapbox: initialize lowp float blur
389#pragma mapbox: initialize lowp float opacity
390vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
391#ifdef OVERDRAW_INSPECTOR
392gl_FragColor=vec4(1.0);
393#endif
394}`,`
395#define scale 0.015873016
396#define LINE_DISTANCE_SCALE 2.0
397attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
398#pragma mapbox: define lowp float blur
399#pragma mapbox: define lowp float opacity
400#pragma mapbox: define lowp float offset
401#pragma mapbox: define mediump float gapwidth
402#pragma mapbox: define mediump float width
403#pragma mapbox: define lowp float floorwidth
404#pragma mapbox: define lowp vec4 pattern_from
405#pragma mapbox: define lowp vec4 pattern_to
406#pragma mapbox: define lowp float pixel_ratio_from
407#pragma mapbox: define lowp float pixel_ratio_to
408void main() {
409#pragma mapbox: initialize lowp float blur
410#pragma mapbox: initialize lowp float opacity
411#pragma mapbox: initialize lowp float offset
412#pragma mapbox: initialize mediump float gapwidth
413#pragma mapbox: initialize mediump float width
414#pragma mapbox: initialize lowp float floorwidth
415#pragma mapbox: initialize mediump vec4 pattern_from
416#pragma mapbox: initialize mediump vec4 pattern_to
417#pragma mapbox: initialize lowp float pixel_ratio_from
418#pragma mapbox: initialize lowp float pixel_ratio_to
419float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),Ii=Ua(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
419uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
420#pragma mapbox: define highp vec4 color
421#pragma mapbox: define lowp float blur
422#pragma mapbox: define lowp float opacity
423#pragma mapbox: define mediump float width
424#pragma mapbox: define lowp float floorwidth
425void main() {
426#pragma mapbox: initialize highp vec4 color
427#pragma mapbox: initialize lowp float blur
428#pragma mapbox: initialize lowp float opacity
429#pragma mapbox: initialize mediump float width
430#pragma mapbox: initialize lowp float floorwidth
431float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
432#ifdef OVERDRAW_INSPECTOR
433gl_FragColor=vec4(1.0);
434#endif
435}`,`
436#define scale 0.015873016
437#define LINE_DISTANCE_SCALE 2.0
438attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
439#pragma mapbox: define highp vec4 color
440#pragma mapbox: define lowp float blur
441#pragma mapbox: define lowp float opacity
442#pragma mapbox: define mediump float gapwidth
443#pragma mapbox: define lowp float offset
444#pragma mapbox: define mediump float width
445#pragma mapbox: define lowp float floorwidth
446void main() {
447#pragma mapbox: initialize highp vec4 color
448#pragma mapbox: initialize lowp float blur
449#pragma mapbox: initialize lowp float opacity
450#pragma mapbox: initialize mediump float gapwidth
451#pragma mapbox: initialize lowp float offset
452#pragma mapbox: initialize mediump float width
453#pragma mapbox: initialize lowp float floorwidth
454float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),li=Ua(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
455#ifdef OVERDRAW_INSPECTOR
456gl_FragColor=vec4(1.0);
457#endif
458}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),Hi=Ua(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
459#pragma mapbox: define lowp float opacity
460void main() {
461#pragma mapbox: initialize lowp float opacity
462lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
463#ifdef OVERDRAW_INSPECTOR
464gl_FragColor=vec4(1.0);
465#endif
466}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;
467#pragma mapbox: define lowp float opacity
468void main() {
469#pragma mapbox: initialize lowp float opacity
470vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
471camera_to_anchor_distance/u_camera_to_center_distance :
472u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),gs=Ua(`#define SDF_PX 8.0
473uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
474#pragma mapbox: define highp vec4 fill_color
475#pragma mapbox: define highp vec4 halo_color
476#pragma mapbox: define lowp float opacity
477#pragma mapbox: define lowp float halo_width
478#pragma mapbox: define lowp float halo_blur
479void main() {
480#pragma mapbox: initialize highp vec4 fill_color
481#pragma mapbox: initialize highp vec4 halo_color
482#pragma mapbox: initialize lowp float opacity
483#pragma mapbox: initialize lowp float halo_width
484#pragma mapbox: initialize lowp float halo_blur
485float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
486#ifdef OVERDRAW_INSPECTOR
487gl_FragColor=vec4(1.0);
488#endif
489}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;
490#pragma mapbox: define highp vec4 fill_color
491#pragma mapbox: define highp vec4 halo_color
492#pragma mapbox: define lowp float opacity
493#pragma mapbox: define lowp float halo_width
494#pragma mapbox: define lowp float halo_blur
495void main() {
496#pragma mapbox: initialize highp vec4 fill_color
497#pragma mapbox: initialize highp vec4 halo_color
498#pragma mapbox: initialize lowp float opacity
499#pragma mapbox: initialize lowp float halo_width
500#pragma mapbox: initialize lowp float halo_blur
501vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
502camera_to_anchor_distance/u_camera_to_center_distance :
503u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),xs=Ua(`#define SDF_PX 8.0
504#define SDF 1.0
505#define ICON 0.0
506uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
507#pragma mapbox: define highp vec4 fill_color
508#pragma mapbox: define highp vec4 halo_color
509#pragma mapbox: define lowp float opacity
510#pragma mapbox: define lowp float halo_width
511#pragma mapbox: define lowp float halo_blur
512void main() {
513#pragma mapbox: initialize highp vec4 fill_color
514#pragma mapbox: initialize highp vec4 halo_color
515#pragma mapbox: initialize lowp float opacity
516#pragma mapbox: initialize lowp float halo_width
517#pragma mapbox: initialize lowp float halo_blur
518float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
518gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
519#ifdef OVERDRAW_INSPECTOR
520gl_FragColor=vec4(1.0);
521#endif
522return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
523#ifdef OVERDRAW_INSPECTOR
524gl_FragColor=vec4(1.0);
525#endif
526}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;
527#pragma mapbox: define highp vec4 fill_color
528#pragma mapbox: define highp vec4 halo_color
529#pragma mapbox: define lowp float opacity
530#pragma mapbox: define lowp float halo_width
531#pragma mapbox: define lowp float halo_blur
532void main() {
533#pragma mapbox: initialize highp vec4 fill_color
534#pragma mapbox: initialize highp vec4 halo_color
535#pragma mapbox: initialize lowp float opacity
536#pragma mapbox: initialize lowp float halo_width
537#pragma mapbox: initialize lowp float halo_blur
538vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
539camera_to_anchor_distance/u_camera_to_center_distance :
540u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`);function Ua(C,z){var B=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,G={};return{fragmentSource:C=C.replace(B,function(ie,ue,ge,ye,Me){return G[Me]=!0,ue==="define"?`
541#ifndef HAS_UNIFORM_u_`+Me+`
542varying `+ge+" "+ye+" "+Me+`;
543#else
544uniform `+ge+" "+ye+" u_"+Me+`;
545#endif
546`:`
547#ifdef HAS_UNIFORM_u_`+Me+`
548    `+ge+" "+ye+" "+Me+" = u_"+Me+`;
549#endif
550`}),vertexSource:z=z.replace(B,function(ie,ue,ge,ye,Me){var je=ye==="float"?"vec2":"vec4",We=Me.match(/color/)?"color":je;return G[Me]?ue==="define"?`
551#ifndef HAS_UNIFORM_u_`+Me+`
552uniform lowp float u_`+Me+`_t;
553attribute `+ge+" "+je+" a_"+Me+`;
554varying `+ge+" "+ye+" "+Me+`;
555#else
556uniform `+ge+" "+ye+" u_"+Me+`;
557#endif
558`:We==="vec4"?`
559#ifndef HAS_UNIFORM_u_`+Me+`
560    `+Me+" = a_"+Me+`;
561#else
562    `+ge+" "+ye+" "+Me+" = u_"+Me+`;
563#endif
564`:`
565#ifndef HAS_UNIFORM_u_`+Me+`
566    `+Me+" = unpack_mix_"+We+"(a_"+Me+", u_"+Me+`_t);
567#else
568    `+ge+" "+ye+" "+Me+" = u_"+Me+`;
569#endif
570`:ue==="define"?`
571#ifndef HAS_UNIFORM_u_`+Me+`
572uniform lowp float u_`+Me+`_t;
573attribute `+ge+" "+je+" a_"+Me+`;
574#else
575uniform `+ge+" "+ye+" u_"+Me+`;
576#endif
577`:We==="vec4"?`
578#ifndef HAS_UNIFORM_u_`+Me+`
579    `+ge+" "+ye+" "+Me+" = a_"+Me+`;
580#else
581    `+ge+" "+ye+" "+Me+" = u_"+Me+`;
582#endif
583`:`
584#ifndef HAS_UNIFORM_u_`+Me+`
585    `+ge+" "+ye+" "+Me+" = unpack_mix_"+We+"(a_"+Me+", u_"+Me+`_t);
586#else
587    `+ge+" "+ye+" "+Me+" = u_"+Me+`;
588#endif
589`})}}var cs=Object.freeze({__proto__:null,prelude:ea,background:ua,backgroundPattern:Ya,circle:Ei,clippingMask:ei,heatmap:gi,heatmapTexture:ka,collisionBox:Fa,collisionCircle:so,debug:Do,fill:qo,fillOutline:Vi,fillOutlinePattern:Gi,fillPattern:Ro,fillExtrusion:ja,fillExtrusionPattern:wo,hillshadePrepare:lo,hillshade:mi,line:Yi,lineGradient:co,linePattern:xo,lineSDF:Ii,raster:li,symbolIcon:Hi,symbolSDF:gs,symbolTextAndIcon:xs}),Jo=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Jo.prototype.bind=function(C,z,B,G,ie,ue,ge,ye){this.context=C;for(var Me=this.boundPaintVertexBuffers.length!==G.length,je=0;!Me&&je<G.length;je++)this.boundPaintVertexBuffers[je]!==G[je]&&(Me=!0);var We=!this.vao||this.boundProgram!==z||this.boundLayoutVertexBuffer!==B||Me||this.boundIndexBuffer!==ie||this.boundVertexOffset!==ue||this.boundDynamicVertexBuffer!==ge||this.boundDynamicVertexBuffer2!==ye;!C.extVertexArrayObject||We?this.freshBind(z,B,G,ie,ue,ge,ye):(C.bindVertexArrayOES.set(this.vao),ge&&ge.bind(),ie&&ie.dynamicDraw&&ie.bind(),ye&&ye.bind())}
589,Jo.prototype.freshBind=function(C,z,B,G,ie,ue,ge){var ye,Me=C.numAttributes,je=this.context,We=je.gl;if(je.extVertexArrayObject)this.vao&&this.destroy(),this.vao=je.extVertexArrayObject.createVertexArrayOES(),je.bindVertexArrayOES.set(this.vao),ye=0,this.boundProgram=C,this.boundLayoutVertexBuffer=z,this.boundPaintVertexBuffers=B,this.boundIndexBuffer=G,this.boundVertexOffset=ie,this.boundDynamicVertexBuffer=ue,this.boundDynamicVertexBuffer2=ge;else{ye=je.currentNumAttributes||0;for(var nt=Me;nt<ye;nt++)We.disableVertexAttribArray(nt)}z.enableAttributes(We,C);for(var bt=0,At=B;bt<At.length;bt+=1)At[bt].enableAttributes(We,C);ue&&ue.enableAttributes(We,C),ge&&ge.enableAttributes(We,C),z.bind(),z.setVertexAttribPointers(We,C,ie);for(var _t=0,wt=B;_t<wt.length;_t+=1){var xt=wt[_t];xt.bind(),xt.setVertexAttribPointers(We,C,ie)}ue&&(ue.bind(),ue.setVertexAttribPointers(We,C,ie)),G&&G.bind(),ge&&(ge.bind(),ge.setVertexAttribPointers(We,C,ie)),je.currentNumAttributes=Me},Jo.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var bs=function(C,z,B,G,ie){var ue=C.gl;this.program=ue.createProgram();var ge=B?B.defines():[];ie&&ge.push("#define OVERDRAW_INSPECTOR;");var ye=ge.concat(ea.fragmentSource,z.fragmentSource).join(`
590`),Me=ge.concat(ea.vertexSource,z.vertexSource).join(`
591`),je=ue.createShader(ue.FRAGMENT_SHADER);if(ue.isContextLost())this.failedToCreate=!0;else{ue.shaderSource(je,ye),ue.compileShader(je),ue.attachShader(this.program,je);var We=ue.createShader(ue.VERTEX_SHADER);if(ue.isContextLost())this.failedToCreate=!0;else{ue.shaderSource(We,Me),ue.compileShader(We),ue.attachShader(this.program,We);for(var nt=B?B.layoutAttributes:[],bt=0;bt<nt.length;bt++)ue.bindAttribLocation(this.program,bt,nt[bt].name);ue.linkProgram(this.program),ue.deleteShader(We),ue.deleteShader(je),this.numAttributes=ue.getProgramParameter(this.program,ue.ACTIVE_ATTRIBUTES),this.attributes={};for(var At={},_t=0;_t<this.numAttributes;_t++){var wt=ue.getActiveAttrib(this.program,_t);wt&&(this.attributes[wt.name]=ue.getAttribLocation(this.program,wt.name))}for(var xt=ue.getProgramParameter(this.program,ue.ACTIVE_UNIFORMS),Ft=0;Ft<xt;Ft++){var Ot=ue.getActiveUniform(this.program,Ft);Ot&&(At[Ot.name]=ue.getUniformLocation(this.program,Ot.name))}this.fixedUniforms=G(C,At),this.binderUniforms=B?B.getUniforms(C,At):[]}}};function _s(C,z,B){var G=1/xr(B,1,z.transform.tileZoom),ie=Math.pow(2,B.tileID.overscaledZ),ue=B.tileSize*Math.pow(2,z.transform.tileZoom)/ie,ge=ue*(B.tileID.canonical.x+B.tileID.wrap*ie),ye=ue*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[G,C.fromScale,C.toScale],u_fade:C.t,u_pixel_coord_upper:[ge>>16,ye>>16],u_pixel_coord_lower:[65535&ge,65535&ye]}}bs.prototype.draw=function(C,z,B,G,ie,ue,ge,ye,Me,je,We,nt,bt,At,_t,wt){var xt,Ft=C.gl;if(!this.failedToCreate){for(var Ot in C.program.set(this.program),C.setDepthMode(B),C.setStencilMode(G),C.setColorMode(ie),C.setCullFace(ue),this.fixedUniforms)this.fixedUniforms[Ot].set(ge[Ot]);At&&At.setUniforms(C,this.binderUniforms,nt,{zoom:bt});for(var Nt=(xt={},xt[Ft.LINES]=2,xt[Ft.TRIANGLES]=3,xt[Ft.LINE_STRIP]=1,xt)[z],er=0,fr=We.get();er<fr.length;er+=1){var kr=fr[er],Tr=kr.vaos||(kr.vaos={});(Tr[ye]||(Tr[ye]=new Jo)).bind(C,this,Me,At?At.getPaintVertexBuffers():[],je,kr.vertexOffset,_t,wt),Ft.drawElements(z,kr.primitiveLength*Nt,Ft.UNSIGNED_SHORT,kr.primitiveOffset*Nt*2)}}};var ms=function(C,z,B,G){var ie=z.style.light,ue=ie.properties.get("position"),ge=[ue.x,ue.y,ue.z],ye=e.create$1();ie.properties.get("anchor")==="viewport"&&e.fromRotation(ye,-z.transform.angle),e.transformMat3(ge,ge,ye);var Me=ie.properties.get("color");return{u_matrix:C,u_lightpos:ge,u_lightintensity:ie.properties.get("intensity"),u_lightcolor:[Me.r,Me.g,Me.b],u_vertical_gradient:+B,u_opacity:G}},ws=function(C,z,B,G,ie,ue,ge){return e.extend(ms(C,z,B,G),_s(ue,z,ge),{u_height_factor:-Math.pow(2,ie.overscaledZ)/ge.tileSize/8})},To=function(C){return{u_matrix:C}},ko=function(C,z,B,G){return e.extend(To(C),_s(B,z,G))},Fo=function(C,z){return{u_matrix:C,u_world:z}},Bo=function(C,z,B,G,ie){return e.extend(ko(C,z,B,G),{u_world:ie})},No=function(C,z,B,G){var ie,ue,ge=C.transform;if(G.paint.get("circle-pitch-alignment")==="map"){var ye=xr(B,1,ge.zoom);ie=!0,ue=[ye,ye]}else ie=!1,ue=ge.pixelsToGLUnits;return{u_camera_to_center_distance:ge.cameraToCenterDistance,u_scale_with_map:+(G.paint.get("circle-pitch-scale")==="map"),u_matrix:C.translatePosMatrix(z.posMatrix,B,G.paint.get("circle-translate"),G.paint.get("circle-translate-anchor")),u_pitch_with_map:+ie,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:ue}},Ko=function(C,z,B){var G=xr(B,1,z.zoom),ie=Math.pow(2,z.zoom-B.tileID.overscaledZ
vendor: 7,137 bytes, line 591
591),ue=B.tileID.overscaleFactor();return{u_matrix:C,u_camera_to_center_distance:z.cameraToCenterDistance,u_pixels_to_tile_units:G,u_extrude_scale:[z.pixelsToGLUnits[0]/(G*ie),z.pixelsToGLUnits[1]/(G*ie)],u_overscale_factor:ue}},uo=function(C,z,B){return{u_matrix:C,u_inv_matrix:z,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}},us=function(C,z,B){return B===void 0&&(B=1),{u_matrix:C,u_color:z,u_overlay:0,u_overlay_scale:B}},ao=function(C){return{u_matrix:C}},jo=function(C,z,B,G){return{u_matrix:C,u_extrude_scale:xr(z,1,B),u_intensity:G}};function fs(C,z){var B=Math.pow(2,z.canonical.z),G=z.canonical.y;return[new e.MercatorCoordinate(0,G/B).toLngLat().lat,new e.MercatorCoordinate(0,(G+1)/B).toLngLat().lat]}var Mo=function(C,z,B){var G=C.transform;return{u_matrix:at(C,z,B),u_ratio:1/xr(z,1,G.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/G.pixelsToGLUnits[0],1/G.pixelsToGLUnits[1]]}},Ba=function(C,z,B){return e.extend(Mo(C,z,B),{u_image:0})},Ne=function(C,z,B,G){var ie=C.transform,ue=$e(z,ie);return{u_matrix:at(C,z,B),u_texsize:z.imageAtlasTexture.size,u_ratio:1/xr(z,1,ie.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[ue,G.fromScale,G.toScale],u_fade:G.t,u_units_to_pixels:[1/ie.pixelsToGLUnits[0],1/ie.pixelsToGLUnits[1]]}},He=function(C,z,B,G,ie){var ue=C.transform,ge=C.lineAtlas,ye=$e(z,ue),Me=B.layout.get("line-cap")==="round",je=ge.getDash(G.from,Me),We=ge.getDash(G.to,Me),nt=je.width*ie.fromScale,bt=We.width*ie.toScale;return e.extend(Mo(C,z,B),{u_patternscale_a:[ye/nt,-je.height/2],u_patternscale_b:[ye/bt,-We.height/2],u_sdfgamma:ge.width/(256*Math.min(nt,bt)*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:je.y,u_tex_y_b:We.y,u_mix:ie.t})};function $e(C,z){return 1/xr(C,1,z.tileZoom)}function at(C,z,B){return C.translatePosMatrix(z.tileID.posMatrix,z,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}var mt=function(C,z,B,G,ie){return{u_matrix:C,u_tl_parent:z,u_scale_parent:B,u_buffer_scale:1,u_fade_t:G.mix,u_opacity:G.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(ge=ie.paint.get("raster-saturation"),ge>0?1-1/(1.001-ge):-ge),u_contrast_factor:(ue=ie.paint.get("raster-contrast"),ue>0?1/(1-ue):1+ue),u_spin_weights:dt(ie.paint.get("raster-hue-rotate"))};var ue,ge};function dt(C){C*=Math.PI/180;var z=Math.sin(C),B=Math.cos(C);return[(2*B+1)/3,(-Math.sqrt(3)*z-B+1)/3,(Math.sqrt(3)*z-B+1)/3]}var Mt,Jt=function(C,z,B,G,ie,ue,ge,ye,Me,je){var We=ie.transform;return{u_is_size_zoom_constant:+(C==="constant"||C==="source"),u_is_size_feature_constant:+(C==="constant"||C==="camera"),u_size_t:z?z.uSizeT:0,u_size:z?z.uSize:0,u_camera_to_center_distance:We.cameraToCenterDistance,u_pitch:We.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:We.width/We.height,u_fade_change:ie.options.fadeDuration?ie.symbolFadeChange:1,u_matrix:ue,u_label_plane_matrix:ge,u_coord_matrix:ye,u_is_text:+Me,u_pitch_with_map:+G,u_texsize:je,u_texture:0}},$t=function(C,z,B,G,ie,ue,ge,ye,Me,je,We){var nt=ie.transform;return e.extend(Jt(C,z,B,G,ie,ue,ge,ye,Me,je),{u_gamma_scale:G?Math.cos(nt._pitch)*nt.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+We})},Wt=function(C,z,B,G,ie,ue,ge,ye,Me,je){return e.extend($t(C,z,B,G,ie,ue,ge,ye,!0,Me,!0),{u_texsize_icon:je,u_texture_icon:1})},tr=function(C,z,B){return{u_matrix:C,u_opacity:z,u_color:B}},ur=function(C,z,B,G,ie,ue){return e.extend(function(ge,ye,Me,je){var We=Me.imageManager.getPattern(ge.from.toString()),nt=Me.imageManager.getPattern(ge.to.toString()),bt=Me.imageManager.getPixelSize(),At=bt.width,_t=bt.height,wt=Math.pow(2,je.tileID.overscaledZ),xt=je.tileSize*Math.pow(2,Me.transform.tileZoom)/wt,Ft=xt*(je.tileID.canonical.x+je.tileID.wrap*wt),Ot=xt*je.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:We.tl,u_pattern_br_a:We.br,u_pattern_tl_b:nt.tl,u_pattern_br_b:nt.br,u_texsize:[At,_t],u_mix:ye.t,u_pattern_size_a:We.displaySize,u_pattern_size_b:nt.displaySize,u_scale_a:ye.fromScale,u_scale_b:ye.toScale,u_tile_units_to_pixels:1/xr(je,1,Me.transform.tileZoom),u_pixel_coord_upper:[Ft>>16,Ot>>16],u_pixel_coord_lower:[65535&Ft,65535&Ot]}}(G,ue,B,ie),{u_matrix:C,u_opacity:z})},mr={fillExtrusion:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_lightpos:new e.Uniform3f(C,z.u_lightpos),u_lightintensity:new e.Uniform1f(C,z.u_lightintensity),u_lightcolor:new e.Uniform3f(C,z.u_lightcolor),u_vertical_gradient:new e.Uniform1f(C,z.u_vertical_gradient),u_opacity:new e.Uniform1f(C,z.u_opacity)}},fillExtrusionPattern:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_lightpos:new e.Uniform3f(C,z.u_lightpos),u_lightintensity:new e.Uniform1f(C,z.u_lightintensity),u_lightcolor:new e.Uniform3f(C,z.u_lightcolor),u_vertical_gradient:new e.Uniform1f(C,z.u_vertical_gradient),u_height_factor:new e.Uniform1f(C,z.u_height_factor),u_image:new e.Uniform1i(C,z.u_image),u_texsize:new e.Uniform2f(C,z.u_texsize),u_pixel_coord_upper:new e.Uniform2f(C,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(C,z.u_pixel_coord_lower),u_scale:new e.Uniform3f(C,z.u_scale),u_fade:new e.Uniform1f(C,z.u_fade),u_opacity:new e.Uniform1f(C,z.u_opacity)}},fill:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix)}},fillPattern:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_image:new e.Uniform1i(C,z.u_image),u_texsize:new e.Uniform2f(C,z.u_texsize),u_pixel_coord_upper:new e.Uniform2f(C,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(C,z.u_pixel_coord_lower),u_scale:new e.Uniform3f(C,z.u_scale),u_fade:new e.Uniform1f(C,z.u_fade)}},fillOutline:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_world:new e.Uniform2f(C,z.u_world)}},fillOutlinePattern:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_world:new e.Uniform2f(C,z.u_world),u_image:new e.Uniform1i(C,z.u_image),u_texsize:new e.Uniform2f(C,z.u_texsize),u_pixel_coord_upper:new e.Uniform2f(C,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(C,z.u_pixel_coord_lower),u_scale:new e.Uniform3f(C,z.u_scale),u_fade:new e.Uniform1f(C,z.u_fade)}},circle:function(C,z){return{u_camera_to_center_distance:new e.Uniform1f(C,z.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(C,z.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(C,z.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(C,z.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(C,z.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(C,z.u_matrix)}},collisionBox:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_camera_to_center_distance:new e.Uniform1f(C,z.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(C,z.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(C,z.u_extrude_scale),u_overscale_factor:new e.Uniform1f(C,z.u_overscale_factor)}},collisionCircle:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_inv_matrix:new e.UniformMatrix4f(C,z.u_inv_matrix
591),u_camera_to_center_distance:new e.Uniform1f(C,z.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(C,z.u_viewport_size)}},debug:function(C,z){return{u_color:new e.UniformColor(C,z.u_color),u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_overlay:new e.Uniform1i(C,z.u_overlay),u_overlay_scale:new e.Uniform1f(C,z.u_overlay_scale)}},clippingMask:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix)}},heatmap:function(C,z){return{u_extrude_scale:new e.Uniform1f(C,z.u_extrude_scale),u_intensity:new e.Uniform1f(C,z.u_intensity),u_matrix:new e.UniformMatrix4f(C,z.u_matrix)}},heatmapTexture:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_world:new e.Uniform2f(C,z.u_world),u_image:new e.Uniform1i(C,z.u_image),u_color_ramp:new e.Uniform1i(C,z.u_color_ramp),u_opacity:new e.Uniform1f(C,z.u_opacity)}},hillshade:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_image:new e.Uniform1i(C,z.u_image),u_latrange:new e.Uniform2f(C,z.u_latrange),u_light:new e.Uniform2f(C,z.u_light),u_shadow:new e.UniformColor(C,z.u_shadow),u_highlight:new e.UniformColor(C,z.u_highlight),u_accent:new e.UniformColor(C,z.u_accent)}},hillshadePrepare:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_image:new e.Uniform1i(C,z.u_image),u_dimension:new e.Uniform2f(C,z.u_dimension),u_zoom:new e.Uniform1f(C,z.u_zoom),u_maxzoom:new e.Uniform1f(C,z.u_maxzoom),u_unpack:new e.Uniform4f(C,z.u_unpack)}},line:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_ratio:new e.Uniform1f(C,z.u_ratio),u_device_pixel_ratio:new e.Uniform1f(C,z.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(C,z.u_units_to_pixels)}},lineGradient:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_ratio:new e.Uniform1f(C,z.u_ratio),u_device_pixel_ratio:new e.Uniform1f(C,z.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(C,z.u_units_to_pixels),u_image:new e.Uniform1i(C,z.u_image)}},linePattern:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_texsize:new e.Uniform2f(C,z.u_texsize),u_ratio:new e.Uniform1f(C,z.u_ratio),u_device_pixel_ratio:new e.Uniform1f(C,z.u_device_pixel_ratio),u_image:new e.Uniform1i(C,z.u_image),u_units_to_pixels:new e.Uniform2f(C,z.u_units_to_pixels),u_scale:new e.Uniform3f(C,z.u_scale),u_fade:new e.Uniform1f(C,z.u_fade)}},lineSDF:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_ratio:new e.Uniform1f(C,z.u_ratio),u_device_pixel_ratio:new e.Uniform1f(C,z.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(C,z.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(C,z.u_patternscale_a),u_patternscale_b:new e.Uniform2f(C,z.u_patternscale_b),u_sdfgamma:new e.Uniform1f(C,z.u_sdfgamma),u_image:new e.Uniform1i(C,z.u_image),u_tex_y_a:new e.Uniform1f(C,z.u_tex_y_a),u_tex_y_b:new e.Uniform1f(C,z.u_tex_y_b),u_mix:new e.Uniform1f(C,z.u_mix)}},raster:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_tl_parent:new e.Uniform2f(C,z.u_tl_parent),u_scale_parent:new e.Uniform1f(C,z.u_scale_parent),u_buffer_scale:new e.Uniform1f(C,z.u_buffer_scale),u_fade_t:new e.Uniform1f(C,z.u_fade_t),u_opacity:new e.Uniform1f(C,z.u_opacity),u_image0:new e.Uniform1i(C,z.u_image0),u_image1:new e.Uniform1i(C,z.u_image1),u_brightness_low:new e.Uniform1f(C,z.u_brightness_low),u_brightness_high:new e.Uniform1f(C,z.u_brightness_high),u_saturation_factor:new e.Uniform1f(C,z.u_saturation_factor),u_contrast_factor:new e.Uniform1f(C,z.u_contrast_factor),u_spin_weights:new e.Uniform3f(C,z.u_spin_weights)}},symbolIcon:function(C,z){return{u_is_size_zoom_constant:new e.Uniform1i(C,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(C,z.u_is_size_feature_constant),u_size_t:new e.Uniform1f(C,z.u_size_t),u_size:new e.Uniform1f(C,z.u_size),u_camera_to_center_distance:new e.Uniform1f(C,z.u_camera_to_center_distance),u_pitch:new e.Uniform1f(C,z.u_pitch),u_rotate_symbol:new e.Uniform1i(C,z.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(C,z.u_aspect_ratio),u_fade_change:new e.Uniform1f(C,z.u_fade_change),u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(C,z.u_label_plane_matrix
vendor: 6,108 bytes, line 591
591),u_coord_matrix:new e.UniformMatrix4f(C,z.u_coord_matrix),u_is_text:new e.Uniform1i(C,z.u_is_text),u_pitch_with_map:new e.Uniform1i(C,z.u_pitch_with_map),u_texsize:new e.Uniform2f(C,z.u_texsize),u_texture:new e.Uniform1i(C,z.u_texture)}},symbolSDF:function(C,z){return{u_is_size_zoom_constant:new e.Uniform1i(C,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(C,z.u_is_size_feature_constant),u_size_t:new e.Uniform1f(C,z.u_size_t),u_size:new e.Uniform1f(C,z.u_size),u_camera_to_center_distance:new e.Uniform1f(C,z.u_camera_to_center_distance),u_pitch:new e.Uniform1f(C,z.u_pitch),u_rotate_symbol:new e.Uniform1i(C,z.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(C,z.u_aspect_ratio),u_fade_change:new e.Uniform1f(C,z.u_fade_change),u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(C,z.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(C,z.u_coord_matrix),u_is_text:new e.Uniform1i(C,z.u_is_text),u_pitch_with_map:new e.Uniform1i(C,z.u_pitch_with_map),u_texsize:new e.Uniform2f(C,z.u_texsize),u_texture:new e.Uniform1i(C,z.u_texture),u_gamma_scale:new e.Uniform1f(C,z.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(C,z.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(C,z.u_is_halo)}},symbolTextAndIcon:function(C,z){return{u_is_size_zoom_constant:new e.Uniform1i(C,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(C,z.u_is_size_feature_constant),u_size_t:new e.Uniform1f(C,z.u_size_t),u_size:new e.Uniform1f(C,z.u_size),u_camera_to_center_distance:new e.Uniform1f(C,z.u_camera_to_center_distance),u_pitch:new e.Uniform1f(C,z.u_pitch),u_rotate_symbol:new e.Uniform1i(C,z.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(C,z.u_aspect_ratio),u_fade_change:new e.Uniform1f(C,z.u_fade_change),u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(C,z.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(C,z.u_coord_matrix),u_is_text:new e.Uniform1i(C,z.u_is_text),u_pitch_with_map:new e.Uniform1i(C,z.u_pitch_with_map),u_texsize:new e.Uniform2f(C,z.u_texsize),u_texsize_icon:new e.Uniform2f(C,z.u_texsize_icon),u_texture:new e.Uniform1i(C,z.u_texture),u_texture_icon:new e.Uniform1i(C,z.u_texture_icon),u_gamma_scale:new e.Uniform1f(C,z.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(C,z.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(C,z.u_is_halo)}},background:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_opacity:new e.Uniform1f(C,z.u_opacity),u_color:new e.UniformColor(C,z.u_color)}},backgroundPattern:function(C,z){return{u_matrix:new e.UniformMatrix4f(C,z.u_matrix),u_opacity:new e.Uniform1f(C,z.u_opacity),u_image:new e.Uniform1i(C,z.u_image),u_pattern_tl_a:new e.Uniform2f(C,z.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(C,z.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(C,z.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(C,z.u_pattern_br_b),u_texsize:new e.Uniform2f(C,z.u_texsize),u_mix:new e.Uniform1f(C,z.u_mix),u_pattern_size_a:new e.Uniform2f(C,z.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(C,z.u_pattern_size_b),u_scale_a:new e.Uniform1f(C,z.u_scale_a),u_scale_b:new e.Uniform1f(C,z.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(C,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(C,z.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(C,z.u_tile_units_to_pixels)}}};function yr(C,z,B,G,ie,ue,ge){for(var ye=C.context,Me=ye.gl,je=C.useProgram("collisionBox"),We=[],nt=0,bt=0,At=0;At<G.length;At++){var _t=G[At],wt=z.getTile(_t),xt=wt.getBucket(B);if(xt){var Ft=_t.posMatrix;ie[0]===0&&ie[1]===0||(Ft=C.translatePosMatrix(_t.posMatrix,wt,ie,ue));var Ot=ge?xt.textCollisionBox:xt.iconCollisionBox,Nt=xt.collisionCircleArray;if(Nt.length>0){var er=e.create(),fr=Ft;e.mul(er,xt.placementInvProjMatrix,C.transform.glCoordMatrix),e.mul(er,er,xt.placementViewportMatrix),We.push({circleArray:Nt,circleOffset:bt,transform:fr,invTransform:er}),bt=nt+=Nt.length/4}Ot&&je.draw(ye,Me.LINES,Xe.disabled,ke.disabled,C.colorModeForRenderPass(),Ie.disabled,Ko(Ft,C.transform,wt),B.id,Ot.layoutVertexBuffer,Ot.indexBuffer,Ot.segments,null,C.transform.zoom,null,null,Ot.collisionVertexBuffer)}}if(ge&&We.length){var kr=C.useProgram("collisionCircle"),Tr=new e.StructArrayLayout2f1f2i16;Tr.resize(4*nt),Tr._trim();for(var Jr=0,Xr=0,hn=We;Xr<hn.length;Xr+=1)for(var on=hn[Xr],Nn=0;Nn<on.circleArray.length/4;Nn++){var Gn=4*Nn,oa=on.circleArray[Gn+0],jr=on.circleArray[Gn+1],Mn=on.circleArray[Gn+2],Yn=on.circleArray[Gn+3];Tr.emplace(Jr++,oa,jr,Mn,Yn,0),Tr.emplace(Jr++,oa,jr,Mn,Yn,1),Tr.emplace(Jr++,oa,jr,Mn,Yn,2),Tr.emplace(Jr++,oa,jr,Mn,Yn,3)}(!Mt||Mt.length<2*nt)&&(Mt=function(pa){var Aa=2*pa,va=new e.StructArrayLayout3ui6;va.resize(Aa),va._trim();for(var Sa=0;Sa<Aa;Sa++){var Da=6*Sa;va.uint16[Da+0]=4*Sa+0,va.uint16[Da+1]=4*Sa+1,va.uint16[Da+2]=4*Sa+2,va.uint16[Da+3]=4*Sa+2,va.uint16[Da+4]=4*Sa+3,va.uint16[Da+5]=4*Sa+0}return va}(nt));for(var Vn=ye.createIndexBuffer(Mt,!0),Qn=ye.createVertexBuffer(Tr,e.collisionCircleLayout.members,!0),la=0,wa=We;la<wa.length;la+=1){var Zn=wa[la],ma=uo(Zn.transform,Zn.invTransform,C.transform);kr.draw(ye,Me.TRIANGLES,Xe.disabled,ke.disabled,C.colorModeForRenderPass(),Ie.disabled,ma,B.id,Qn,Vn,e.SegmentVector.simpleSegment(0,2*Zn.circleOffset,Zn.circleArray.length,Zn.circleArray.length/2),null,C.transform.zoom,null,null,null)}Qn.destroy(),Vn.destroy()}}var Pr=e.identity(new Float32Array(16));function nn(C,z,B,G,ie,ue){var ge=e.getAnchorAlignment(C),ye=-(ge.horizontalAlign-.5)*z,Me=-(ge.verticalAlign-.5)*B,je=e.evaluateVariableOffset(C,G);return new e.Point((ye/ie+je[0])*ue,(Me/ie+je[1])*ue)}function dn(C,z,B,G,ie,ue,ge,ye,Me,je,We){var nt=C.text.placedSymbolArray,bt=C.text.dynamicLayoutVertexArray,At=C.icon.dynamicLayoutVertexArray,_t={};bt.clear();for(var wt=0;wt<nt.length;wt++){var xt=nt.get(wt),Ft=C.allowVerticalPlacement&&!xt.placedOrientation,Ot=xt.hidden||!xt.crossTileID||Ft?null:G[xt.crossTileID];if(Ot){var Nt=new e.Point(xt.anchorX,xt.anchorY),er=ar(Nt,B?ye:ge),fr=lr(ue.cameraToCenterDistance,er.signedDistanceFromCamera),kr=ie.evaluateSizeForFeature
591(C.textSizeData,je,xt)*fr/e.ONE_EM;B&&(kr*=C.tilePixelRatio/Me);for(var Tr=Ot.width,Jr=Ot.height,Xr=nn(Ot.anchor,Tr,Jr,Ot.textOffset,Ot.textBoxScale,kr),hn=B?ar(Nt.add(Xr),ge).point:er.point.add(z?Xr.rotate(-ue.angle):Xr),on=C.allowVerticalPlacement&&xt.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,Nn=0;Nn<xt.numGlyphs;Nn++)e.addDynamicAttributes(bt,hn,on);We&&xt.associatedIconIndex>=0&&(_t[xt.associatedIconIndex]={shiftedAnchor:hn,angle:on})}else _n(xt.numGlyphs,bt)}if(We){At.clear();for(var Gn=C.icon.placedSymbolArray,oa=0;oa<Gn.length;oa++){var jr=Gn.get(oa);if(jr.hidden)_n(jr.numGlyphs,At);else{var Mn=_t[oa];if(Mn)for(var Yn=0;Yn<jr.numGlyphs;Yn++)e.addDynamicAttributes(At,Mn.shiftedAnchor,Mn.angle);else _n(jr.numGlyphs,At)}}C.icon.dynamicLayoutVertexBuffer.updateData(At)}C.text.dynamicLayoutVertexBuffer.updateData(bt)}function En(C,z,B){return B.iconsInText&&z?"symbolTextAndIcon":C?"symbolSDF":"symbolIcon"}function On(C,z,B,G,ie,ue,ge,ye,Me,je,We,nt){for(var bt=C.context,At=bt.gl,_t=C.transform,wt=ye==="map",xt=Me==="map",Ft=wt&&B.layout.get("symbol-placement")!=="point",Ot=wt&&!xt&&!Ft,Nt=B.layout.get("symbol-sort-key").constantOr(1)!==void 0,er=C.depthModeForSublayer(0,Xe.ReadOnly),fr=B.layout.get("text-variable-anchor"),kr=[],Tr=0,Jr=G;Tr<Jr.length;Tr+=1){var Xr=Jr[Tr],hn=z.getTile(Xr),on=hn.getBucket(B);if(on){var Nn=ie?on.text:on.icon;if(Nn&&Nn.segments.get().length){var Gn=Nn.programConfigurations.get(B.id),oa=ie||on.sdfIcons,jr=ie?on.textSizeData:on.iconSizeData,Mn=xt||_t.pitch!==0,Yn=C.useProgram(En(oa,ie,on),Gn),Vn=e.evaluateSizeForZoom(jr,_t.zoom),Qn=void 0,la=[0,0],wa=void 0,Zn=void 0,ma=null,pa=void 0;if(ie){if(wa=hn.glyphAtlasTexture,Zn=At.LINEAR,Qn=hn.glyphAtlasTexture.size,on.iconsInText){la=hn.imageAtlasTexture.size,ma=hn.imageAtlasTexture;var Aa=jr.kind==="composite"||jr.kind==="camera";pa=Mn||C.options.rotating||C.options.zooming||Aa?At.LINEAR:At.NEAREST}}else{var va=B.layout.get("icon-size").constantOr(0)!==1||on.iconsNeedLinear;wa=hn.imageAtlasTexture,Zn=oa||C.options.rotating||C.options.zooming||va||Mn?At.LINEAR:At.NEAREST,Qn=hn.imageAtlasTexture.size}var Sa=xr(hn,1,C.transform.zoom),Da=vr(Xr.posMatrix,xt,wt,C.transform,Sa),ii=pr(Xr.posMatrix,xt,wt,C.transform,Sa),Ai=fr&&on.hasTextData(),Si=B.layout.get("icon-text-fit")!=="none"&&Ai&&on.hasIconData();Ft&&Or(on,Xr.posMatrix,C,ie,Da,ii,xt,je);var ai=C.translatePosMatrix(Xr.posMatrix,hn,ue,ge),xi=Ft||ie&&fr||Si?Pr:Da,ui=C.translatePosMatrix(ii,hn,ue,ge,!0),po=oa&&B.paint.get(ie?"text-halo-width":"icon-halo-width").constantOr(1)!==0,ji={program:Yn,buffers:Nn,uniformValues:oa?on.iconsInText?Wt(jr.kind,Vn,Ot,xt,C,ai,xi,ui,Qn,la):$t(jr.kind,Vn,Ot,xt,C,ai,xi,ui,ie,Qn,!0):Jt(jr.kind,Vn,Ot,xt,C,ai,xi,ui,ie,Qn),atlasTexture:wa,atlasTextureIcon:ma,atlasInterpolation:Zn,atlasInterpolationIcon:pa,isSDF:oa,hasHalo:po};if(Nt)for(var Po=0,ys=Nn.segments.get();Po<ys.length;Po+=1){var Bs=ys[Po];kr.push({segments:new e.SegmentVector([Bs]),sortKey:Bs.sortKey,state:ji})}else kr.push({segments:Nn.segments,sortKey:0,state:ji})}}}Nt&&kr.sort(function(ul,ts){return ul.sortKey-ts.sortKey});for(var cl=0,$s=kr;cl<$s.length;cl+=1){var el=$s[cl],go=el.state;if(bt.activeTexture.set(At.TEXTURE0),go.atlasTexture.bind(go.atlasInterpolation,At.CLAMP_TO_EDGE),go.atlasTextureIcon&&(bt.activeTexture.set(At.TEXTURE1),go.atlasTextureIcon&&go.atlasTextureIcon.bind(go.atlasInterpolationIcon,At.CLAMP_TO_EDGE)),go.isSDF){var Hs=go.uniformValues;go.hasHalo&&(Hs.u_is_halo=1,Un(go.buffers,el.segments,B,C,go.program,er,We,nt,Hs)),Hs.u_is_halo=0}Un(go.buffers,el.segments,B,C,go.program,er,We,nt,go.uniformValues)}}function Un(C,z,B,G,ie,ue,ge,ye,Me){var je=G.context,We=je.gl;ie.draw(je,We.TRIANGLES,ue,ge,ye,Ie.disabled,Me,B.id,C.layoutVertexBuffer,C.indexBuffer,z,B.paint,G.transform.zoom,C.programConfigurations.get(B.id),C.dynamicLayoutVertexBuffer,C.opacityVertexBuffer)}function zn(C,z,B,G,ie,ue,ge){var ye,Me,je,We,nt,bt=C.context.gl,At=B.paint.get("fill-pattern"),_t=At&&At.constantOr(1),wt=B.getCrossfadeParameters();ge?(Me=_t&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ye=bt.LINES):(Me=_t?"fillPattern":"fill",ye=bt.TRIANGLES);for(var xt=0,Ft=G;xt<Ft.length;xt+=1){var Ot=Ft[xt],Nt=z.getTile(Ot);if(!_t||Nt.patternsLoaded()){var er=Nt.getBucket(B);if(er){var fr=er.programConfigurations.get(B.id),kr=C.useProgram(Me,fr);_t&&(C.context.activeTexture.set(bt.TEXTURE0),Nt.imageAtlasTexture.bind(bt.LINEAR,bt.CLAMP_TO_EDGE),fr.updatePaintBuffers(wt));var Tr=At.constantOr(null);if(Tr&&Nt.imageAtlas){var Jr=Nt.imageAtlas,Xr=Jr.patternPositions[Tr.to.toString()],hn=Jr.patternPositions[Tr.from.toString()];Xr&&hn&&fr.setConstantPatternPositions(Xr,hn)}var on=C.translatePosMatrix(Ot.posMatrix,Nt,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(ge){We=er.indexBuffer2,nt=er.segments2;var Nn=[bt.drawingBufferWidth,bt.drawingBufferHeight];je=Me==="fillOutlinePattern"&&_t?Bo(on,C,wt,Nt,Nn):Fo(on,Nn)}else We=er.indexBuffer,nt=er.segments,je=_t?ko(on,C,wt,Nt):To(on);kr.draw(C.context,ye,ie,C.stencilModeForClipping(Ot),ue,Ie.disabled,je,B.id,er.layoutVertexBuffer,We,nt,B.paint,C.transform.zoom,fr)}}}}function ha(C,z,B,G,ie,ue,ge){for(var ye=C.context,Me=ye.gl,je=B.paint.get("fill-extrusion-pattern"),We=je.constantOr(1),nt=B.getCrossfadeParameters(),bt=B.paint.get("fill-extrusion-opacity"),At=0,_t=G;At<_t.length;At+=1){var wt=_t[At],xt=z.getTile(wt),Ft=xt.getBucket(B);if(Ft){var Ot=Ft.programConfigurations.get(B.id),Nt=C.useProgram(We?"fillExtrusionPattern":"fillExtrusion",Ot);
vendor: 6,941 bytes, line 591
591We&&(C.context.activeTexture.set(Me.TEXTURE0),xt.imageAtlasTexture.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),Ot.updatePaintBuffers(nt));var er=je.constantOr(null);if(er&&xt.imageAtlas){var fr=xt.imageAtlas,kr=fr.patternPositions[er.to.toString()],Tr=fr.patternPositions[er.from.toString()];kr&&Tr&&Ot.setConstantPatternPositions(kr,Tr)}var Jr=C.translatePosMatrix(wt.posMatrix,xt,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Xr=B.paint.get("fill-extrusion-vertical-gradient"),hn=We?ws(Jr,C,Xr,bt,wt,nt,xt):ms(Jr,C,Xr,bt);Nt.draw(ye,ye.gl.TRIANGLES,ie,ue,ge,Ie.backCCW,hn,B.id,Ft.layoutVertexBuffer,Ft.indexBuffer,Ft.segments,B.paint,C.transform.zoom,Ot)}}}function ba(C,z,B,G,ie,ue){var ge=C.context,ye=ge.gl,Me=z.fbo;if(Me){var je=C.useProgram("hillshade");ge.activeTexture.set(ye.TEXTURE0),ye.bindTexture(ye.TEXTURE_2D,Me.colorAttachment.get());var We=function(nt,bt,At){var _t=At.paint.get("hillshade-shadow-color"),wt=At.paint.get("hillshade-highlight-color"),xt=At.paint.get("hillshade-accent-color"),Ft=At.paint.get("hillshade-illumination-direction")*(Math.PI/180);At.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ft-=nt.transform.angle);var Ot=!nt.options.moving;return{u_matrix:nt.transform.calculatePosMatrix(bt.tileID.toUnwrapped(),Ot),u_image:0,u_latrange:fs(nt,bt.tileID),u_light:[At.paint.get("hillshade-exaggeration"),Ft],u_shadow:_t,u_highlight:wt,u_accent:xt}}(C,z,B);je.draw(ge,ye.TRIANGLES,G,ie,ue,Ie.disabled,We,B.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments)}}function Oa(C,z,B,G,ie,ue,ge){var ye=C.context,Me=ye.gl,je=z.dem;if(je&&je.data){var We=je.dim,nt=je.stride,bt=je.getPixels();if(ye.activeTexture.set(Me.TEXTURE1),ye.pixelStoreUnpackPremultiplyAlpha.set(!1),z.demTexture=z.demTexture||C.getTileTexture(nt),z.demTexture){var At=z.demTexture;At.update(bt,{premultiply:!1}),At.bind(Me.NEAREST,Me.CLAMP_TO_EDGE)}else z.demTexture=new e.Texture(ye,bt,Me.RGBA,{premultiply:!1}),z.demTexture.bind(Me.NEAREST,Me.CLAMP_TO_EDGE);ye.activeTexture.set(Me.TEXTURE0);var _t=z.fbo;if(!_t){var wt=new e.Texture(ye,{width:We,height:We,data:null},Me.RGBA);wt.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),(_t=z.fbo=ye.createFramebuffer(We,We,!0)).colorAttachment.set(wt.texture)}ye.bindFramebuffer.set(_t.framebuffer),ye.viewport.set([0,0,We,We]),C.useProgram("hillshadePrepare").draw(ye,Me.TRIANGLES,ie,ue,ge,Ie.disabled,function(xt,Ft,Ot){var Nt=Ft.stride,er=e.create();return e.ortho(er,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(er,er,[0,-e.EXTENT,0]),{u_matrix:er,u_image:1,u_dimension:[Nt,Nt],u_zoom:xt.overscaledZ,u_maxzoom:Ot,u_unpack:Ft.getUnpackVector()}}(z.tileID,je,G),B.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments),z.needsHillshadePrepare=!1}}function Ia(C,z,B,G,ie){var ue=G.paint.get("raster-fade-duration");if(ue>0){var ge=e.browser.now(),ye=(ge-C.timeAdded)/ue,Me=z?(ge-z.timeAdded)/ue:-1,je=B.getSource(),We=ie.coveringZoomLevel({tileSize:je.tileSize,roundZoom:je.roundZoom}),nt=!z||Math.abs(z.tileID.overscaledZ-We)>Math.abs(C.tileID.overscaledZ-We),bt=nt&&C.refreshedUponExpiration?1:e.clamp(nt?ye:1-Me,0,1);return C.refreshedUponExpiration&&ye>=1&&(C.refreshedUponExpiration=!1),z?{opacity:1,mix:1-bt}:{opacity:bt,mix:0}}return{opacity:1,mix:0}}var za=new e.Color(1,0,0,1),vi=new e.Color(0,1,0,1),pi=new e.Color(0,0,1,1),ti=new e.Color(1,0,1,1),ri=new e.Color(0,1,1,1);function di(C){var z=C.transform.padding;Oi(C,C.transform.height-(z.top||0),3,za),Oi(C,z.bottom||0,3,vi),Wi(C,z.left||0,3,pi),Wi(C,C.transform.width-(z.right||0),3,ti);var B=C.transform.centerPoint;(function(G,ie,ue,ge){Zi(G,ie-1,ue-10,2,20,ge),Zi(G,ie-10,ue-1,20,2,ge)})(C,B.x,C.transform.height-B.y,ri)}function Oi(C,z,B,G){Zi(C,0,z+B/2,C.transform.width,B,G)}function Wi(C,z,B,G){Zi(C,z-B/2,0,B,C.transform.height,G)}function Zi(C,z,B,G,ie,ue){var ge=C.context,ye=ge.gl;ye.enable(ye.SCISSOR_TEST),ye.scissor(z*e.browser.devicePixelRatio,B*e.browser.devicePixelRatio,G*e.browser.devicePixelRatio,ie*e.browser.devicePixelRatio),ge.clear({color:ue}),ye.disable(ye.SCISSOR_TEST)}function Xi(C,z,B){var G=C.context,ie=G.gl,ue=B.posMatrix,ge=C.useProgram("debug"),ye=Xe.disabled,Me=ke.disabled,je=C.colorModeForRenderPass();G.activeTexture.set(ie.TEXTURE0),C.emptyTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),ge.draw(G,ie.LINE_STRIP,ye,Me,je,Ie.disabled,us(ue,e.Color.red),"$debug",C.debugBuffer,C.tileBorderIndexBuffer,C.debugSegments);var We=z.getTileByID(B.key).latestRawTileData,nt=We&&We.byteLength||0,bt=Math.floor(nt/1024),At=z.getTile(B).tileSize,_t=512/Math.min(At,512)*(B.overscaledZ/C.transform.zoom)*.5,wt=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(wt+=" => "+B.overscaledZ),function(xt,Ft){xt.initDebugOverlayCanvas();var Ot=xt.debugOverlayCanvas,Nt=xt.context.gl,er=xt.debugOverlayCanvas.getContext("2d");er.clearRect(0,0,Ot.width,Ot.height),er.shadowColor="white",er.shadowBlur=2,er.lineWidth=1.5,er.strokeStyle="white",er.textBaseline="top",er.font="bold 36px Open Sans, sans-serif",er.fillText(Ft,5,5),er.strokeText(Ft,5,5),xt.debugOverlayTexture.update(Ot),xt.debugOverlayTexture.bind(Nt.LINEAR,Nt.CLAMP_TO_EDGE)}(C,wt+" "+bt+"kb"),ge.draw(G,ie.TRIANGLES,ye,Me,Le.alphaBlended,Ie.disabled,us(ue,e.Color.transparent,_t),"$debug",C.debugBuffer,C.quadTriangleIndexBuffer,C.debugSegments)}var Ji={symbol:function(C,z,B,G,ie){if(C.renderPass==="translucent"){var ue=ke.disabled,ge=C.colorModeForRenderPass();B.layout.get("text-variable-anchor")&&function(ye,Me,je,We,nt,bt,At){for(var _t=Me.transform,wt=nt==="map",xt=bt==="map",Ft=0,Ot=ye;Ft<Ot.length;Ft+=1){var Nt=Ot[Ft],er=We.getTile(Nt),fr=er.getBucket(je);if(fr&&fr.text&&fr.text.segments.get().length){var kr=fr.textSizeData,Tr=e.evaluateSizeForZoom(kr,_t.zoom),Jr=xr(er,1,Me.transform.zoom),Xr=vr(Nt.posMatrix,xt,wt,Me.transform,Jr),hn=je.layout.get("icon-text-fit")!=="none"&&fr.hasIconData();if(Tr){var on=Math.pow(2,_t.zoom-er.tileID.overscaledZ);dn(fr,wt,xt,At,e.symbolSize,_t,Xr,Nt.posMatrix,on,Tr,hn)}}}}(G,C,B,z,B.layout.get("text-rotation-alignment"),B.layout.get("text-pitch-alignment"),ie),B.paint.get("icon-opacity").constantOr(1)!==0&&On(C,z,B,G,!1,B.paint.get("icon-translate"),B.paint.get("icon-translate-anchor"),B.layout.get("icon-rotation-alignment"),B.layout.get("icon-pitch-alignment"),B.layout.get("icon-keep-upright"),ue,ge),B.paint.get("text-opacity").constantOr(1)!==0&&On(C,z,B,G,!0,B.paint.get("text-translate"),B.paint.get("text-translate-anchor"),B.layout.get("text-rotation-alignment"),B.layout.get("text-pitch-alignment"),B.layout.get("text-keep-upright"),ue,ge),z.map.showCollisionBoxes&&(yr(C,z,B,G,B.paint.get("text-translate"),B.paint.get("text-translate-anchor"),!0),yr(C,z,B,G,B.paint.get("icon-translate"),B.paint.get("icon-translate-anchor"),!1))}},circle:function(C,z,B,G){if(C.renderPass==="translucent"){var ie=B.paint.get("circle-opacity"),ue=B.paint.get("circle-stroke-width"),ge=B.paint.get("circle-stroke-opacity"),ye=B.layout.get("
591circle-sort-key").constantOr(1)!==void 0;if(ie.constantOr(1)!==0||ue.constantOr(1)!==0&&ge.constantOr(1)!==0){for(var Me=C.context,je=Me.gl,We=C.depthModeForSublayer(0,Xe.ReadOnly),nt=ke.disabled,bt=C.colorModeForRenderPass(),At=[],_t=0;_t<G.length;_t++){var wt=G[_t],xt=z.getTile(wt),Ft=xt.getBucket(B);if(Ft){var Ot=Ft.programConfigurations.get(B.id),Nt={programConfiguration:Ot,program:C.useProgram("circle",Ot),layoutVertexBuffer:Ft.layoutVertexBuffer,indexBuffer:Ft.indexBuffer,uniformValues:No(C,wt,xt,B)};if(ye)for(var er=0,fr=Ft.segments.get();er<fr.length;er+=1){var kr=fr[er];At.push({segments:new e.SegmentVector([kr]),sortKey:kr.sortKey,state:Nt})}else At.push({segments:Ft.segments,sortKey:0,state:Nt})}}ye&&At.sort(function(Yn,Vn){return Yn.sortKey-Vn.sortKey});for(var Tr=0,Jr=At;Tr<Jr.length;Tr+=1){var Xr=Jr[Tr],hn=Xr.state,on=hn.programConfiguration,Nn=hn.program,Gn=hn.layoutVertexBuffer,oa=hn.indexBuffer,jr=hn.uniformValues,Mn=Xr.segments;Nn.draw(Me,je.TRIANGLES,We,nt,bt,Ie.disabled,jr,B.id,Gn,oa,Mn,B.paint,C.transform.zoom,on)}}}},heatmap:function(C,z,B,G){if(B.paint.get("heatmap-opacity")!==0)if(C.renderPass==="offscreen"){var ie=C.context,ue=ie.gl,ge=ke.disabled,ye=new Le([ue.ONE,ue.ONE],e.Color.transparent,[!0,!0,!0,!0]);(function(wt,xt,Ft){var Ot=wt.gl;wt.activeTexture.set(Ot.TEXTURE1),wt.viewport.set([0,0,xt.width/4,xt.height/4]);var Nt=Ft.heatmapFbo;if(Nt)Ot.bindTexture(Ot.TEXTURE_2D,Nt.colorAttachment.get()),wt.bindFramebuffer.set(Nt.framebuffer);else{var er=Ot.createTexture();Ot.bindTexture(Ot.TEXTURE_2D,er),Ot.texParameteri(Ot.TEXTURE_2D,Ot.TEXTURE_WRAP_S,Ot.CLAMP_TO_EDGE),Ot.texParameteri(Ot.TEXTURE_2D,Ot.TEXTURE_WRAP_T,Ot.CLAMP_TO_EDGE),Ot.texParameteri(Ot.TEXTURE_2D,Ot.TEXTURE_MIN_FILTER,Ot.LINEAR),Ot.texParameteri(Ot.TEXTURE_2D,Ot.TEXTURE_MAG_FILTER,Ot.LINEAR),Nt=Ft.heatmapFbo=wt.createFramebuffer(xt.width/4,xt.height/4,!1),function(fr,kr,Tr,Jr){var Xr=fr.gl,hn=fr.extRenderToTextureHalfFloat?fr.extTextureHalfFloat.HALF_FLOAT_OES:Xr.UNSIGNED_BYTE;Xr.texImage2D(Xr.TEXTURE_2D,0,Xr.RGBA,kr.width/4,kr.height/4,0,Xr.RGBA,hn,null),Jr.colorAttachment.set(Tr)}(wt,xt,er,Nt)}})(ie,C,B),ie.clear({color:e.Color.transparent});for(var Me=0;Me<G.length;Me++){var je=G[Me];if(!z.hasRenderableParent(je)){var We=z.getTile(je),nt=We.getBucket(B);if(nt){var bt=nt.programConfigurations.get(B.id),At=C.useProgram("heatmap",bt),_t=C.transform.zoom;At.draw(ie,ue.TRIANGLES,Xe.disabled,ge,ye,Ie.disabled,jo(je.posMatrix,We,_t,B.paint.get("heatmap-intensity")),B.id,nt.layoutVertexBuffer,nt.indexBuffer,nt.segments,B.paint,C.transform.zoom,bt)}}}ie.viewport.set([0,0,C.width,C.height])}else C.renderPass==="translucent"&&(C.context.setColorMode(C.colorModeForRenderPass()),function(wt,xt){var Ft=wt.context,Ot=Ft.gl,Nt=xt.heatmapFbo;if(Nt){Ft.activeTexture.set(Ot.TEXTURE0),Ot.bindTexture(Ot.TEXTURE_2D,Nt.colorAttachment.get()),Ft.activeTexture.set(Ot.TEXTURE1);var er=xt.colorRampTexture;er||(er=xt.colorRampTexture=new e.Texture(Ft,xt.colorRamp,Ot.RGBA)),er.bind(Ot.LINEAR,Ot.CLAMP_TO_EDGE),wt.useProgram("heatmapTexture").draw(Ft,Ot.TRIANGLES,Xe.disabled,ke.disabled,wt.colorModeForRenderPass(),Ie.disabled,function(fr,kr,Tr,Jr){var Xr=e.create();e.ortho(Xr,0,fr.width,fr.height,0,0,1);var hn=fr.context.gl;return{u_matrix:Xr,u_world:[hn.drawingBufferWidth,hn.drawingBufferHeight],u_image:Tr,u_color_ramp:Jr,u_opacity:kr.paint.get("heatmap-opacity")}}(wt,xt,0,1),xt.id,wt.viewportBuffer,wt.quadTriangleIndexBuffer,wt.viewportSegments,xt.paint,wt.transform.zoom)}}(C,B))},line:function(C,z,B,G){if(C.renderPass==="translucent"){var ie=B.paint.get("line-opacity"),ue=B.paint.get("line-width");if(ie.constantOr(1)!==0&&ue.constantOr(1)!==0){var ge=C.depthModeForSublayer(0,Xe.ReadOnly),ye=C.colorModeForRenderPass(),Me=B.paint.get("line-dasharray"),je=B.paint.get("line-pattern"),We=je.constantOr(1),nt=B.paint.get("line-gradient"),bt=B.getCrossfadeParameters(),At=We?"linePattern":Me?"lineSDF":nt?"lineGradient":"line",_t=C.context,wt=_t.gl,xt=!0;if(nt){_t.activeTexture.set(wt.TEXTURE0);var Ft=B.gradientTexture;if(!B.gradient)return;Ft||(Ft=B.gradientTexture=new e.Texture(_t,B.gradient,wt.RGBA)),Ft.bind(wt.LINEAR,wt.CLAMP_TO_EDGE)}for(var Ot=0,Nt=G;Ot<Nt.length;Ot+=1){var er=Nt[Ot],fr=z.getTile(er);if(!We||fr.patternsLoaded()){var kr=fr.getBucket(B);if(kr){var Tr=kr.programConfigurations.get(B.id),Jr=C.context.program.get(),Xr=C.useProgram(At,Tr),hn=xt||Xr.program!==Jr,on=je.constantOr(null);if(on&&fr.imageAtlas){var Nn=fr.imageAtlas,Gn=Nn.patternPositions[on.to.toString()],oa=Nn.patternPositions[on.from.toString()];Gn&&oa&&Tr.setConstantPatternPositions(Gn,oa)}var jr=We?Ne(C,fr,B,bt):Me?He(C,fr,B,Me,bt):nt?Ba(C,fr,B):Mo(C,fr,B);We?(_t.activeTexture.set(wt.TEXTURE0),fr.imageAtlasTexture.bind(wt.LINEAR,wt.CLAMP_TO_EDGE),Tr.updatePaintBuffers(bt)):Me&&(hn||C.lineAtlas.dirty)&&(_t.activeTexture.set(wt.TEXTURE0),C.lineAtlas.bind(_t)),Xr.draw(_t,wt.TRIANGLES,ge,C.stencilModeForClipping(er),ye,Ie.disabled,jr,B.id,kr.layoutVertexBuffer,kr.indexBuffer,kr.segments,B.paint,C.transform.zoom,Tr),xt=!1}}}}}},fill:function(C,z,B,G){var ie=B.paint.get("fill-color"),ue=B.paint.get("fill-opacity");if(ue.constantOr(1)!==0){var ge=C.colorModeForRenderPass(),ye=B.paint.get("fill-pattern"),Me=C.opaquePassEnabledForLayer()&&!ye.constantOr(1)&&ie.constantOr(e.Color.transparent).a===1&&ue.constantOr(0)===1?"opaque":"translucent";if(C.renderPass===Me){var je=C.depthModeForSublayer(1,C.renderPass==="opaque"?Xe.ReadWrite:Xe.ReadOnly);zn(C,z,B,G,je,ge,!1)}if(C.renderPass==="translucent"&&B.paint.get("fill-antialias")){var We=C.depthModeForSublayer(B.getPaintProperty("fill-outline-color")?2:0,Xe.ReadOnly);zn(C,z,B,G,We,ge,!0)}}},"fill-extrusion":function(C,z,B,G){var ie=B.paint.get("fill-extrusion-opacity");if(ie!==0&&C.renderPass==="translucent"){var ue=new Xe(C.context.gl.LEQUAL,Xe.ReadWrite,C.depthRangeFor3D);if(ie!==1||B.paint.get("fill-extrusion-pattern").constantOr(1))ha(C,z,B,G,ue,ke.disabled,Le.disabled),ha(C,z,B,G,ue,C.stencilModeFor3D(),C.colorModeForRenderPass());else{var ge=C.colorModeForRenderPass();ha(C,z,B,G,ue,ke.disabled,ge)}}},hillshade:function(C,z,B,G){if(C.renderPass==="offscreen"||C.renderPass==="translucent"){for(var ie=C.context,ue=z.getSource().maxzoom,ge=C.depthModeForSublayer(0,Xe.ReadOnly),ye=C.colorModeForRenderPass(),Me=C.renderPass==="translucent"?C.stencilConfigForOverlap(G):[{},G],je=Me[0],We=0,nt=Me[1];We<nt.length;We+=1){var bt=nt[We],At=z.getTile(bt);
591At.needsHillshadePrepare&&C.renderPass==="offscreen"?Oa(C,At,B,ue,ge,ke.disabled,ye):C.renderPass==="translucent"&&ba(C,At,B,ge,je[bt.overscaledZ],ye)}ie.viewport.set([0,0,C.width,C.height])}},raster:function(C,z,B,G){if(C.renderPass==="translucent"&&B.paint.get("raster-opacity")!==0&&G.length)for(var ie=C.context,ue=ie.gl,ge=z.getSource(),ye=C.useProgram("raster"),Me=C.colorModeForRenderPass(),je=ge instanceof q?[{},G]:C.stencilConfigForOverlap(G),We=je[0],nt=je[1],bt=nt[nt.length-1].overscaledZ,At=!C.options.moving,_t=0,wt=nt;_t<wt.length;_t+=1){var xt=wt[_t],Ft=C.depthModeForSublayer(xt.overscaledZ-bt,B.paint.get("raster-opacity")===1?Xe.ReadWrite:Xe.ReadOnly,ue.LESS),Ot=z.getTile(xt),Nt=C.transform.calculatePosMatrix(xt.toUnwrapped(),At);Ot.registerFadeDuration(B.paint.get("raster-fade-duration"));var er=z.findLoadedParent(xt,0),fr=Ia(Ot,er,z,B,C.transform),kr=void 0,Tr=void 0,Jr=B.paint.get("raster-resampling")==="nearest"?ue.NEAREST:ue.LINEAR;ie.activeTexture.set(ue.TEXTURE0),Ot.texture.bind(Jr,ue.CLAMP_TO_EDGE,ue.LINEAR_MIPMAP_NEAREST),ie.activeTexture.set(ue.TEXTURE1),er?(er.texture.bind(Jr,ue.CLAMP_TO_EDGE,ue.LINEAR_MIPMAP_NEAREST),kr=Math.pow(2,er.tileID.overscaledZ-Ot.tileID.overscaledZ),Tr=[Ot.tileID.canonical.x*kr%1,Ot.tileID.canonical.y*kr%1]):Ot.texture.bind(Jr,ue.CLAMP_TO_EDGE,ue.LINEAR_MIPMAP_NEAREST);var Xr=mt(Nt,Tr||[0,0],kr||1,fr,B);ge instanceof q?ye.draw(ie,ue.TRIANGLES,Ft,ke.disabled,Me,Ie.disabled,Xr,B.id,ge.boundsBuffer,C.quadTriangleIndexBuffer,ge.boundsSegments):ye.draw(ie,ue.TRIANGLES,Ft,We[xt.overscaledZ],Me,Ie.disabled,Xr,B.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments)}},background:function(C,z,B){var G=B.paint.get("background-color"),ie=B.paint.get("background-opacity");if(ie!==0){var ue=C.context,ge=ue.gl,ye=C.transform,Me=ye.tileSize,je=B.paint.get("background-pattern");if(!C.isPatternMissing(je)){var We=!je&&G.a===1&&ie===1&&C.opaquePassEnabledForLayer()?"opaque":"translucent";if(C.renderPass===We){var nt=ke.disabled,bt=C.depthModeForSublayer(0,We==="opaque"?Xe.ReadWrite:Xe.ReadOnly),At=C.colorModeForRenderPass(),_t=C.useProgram(je?"backgroundPattern":"background"),wt=ye.coveringTiles({tileSize:Me});je&&(ue.activeTexture.set(ge.TEXTURE0),C.imageManager.bind(C.context));for(var xt=B.getCrossfadeParameters(),Ft=0,Ot=wt;Ft<Ot.length;Ft+=1){var Nt=Ot[Ft],er=C.transform.calculatePosMatrix(Nt.toUnwrapped()),fr=je?ur(er,ie,C,je,{tileID:Nt,tileSize:Me},xt):tr(er,ie,G);_t.draw(ue,ge.TRIANGLES,bt,nt,At,Ie.disabled,fr,B.id,C.tileExtentBuffer,C.quadTriangleIndexBuffer,C.tileExtentSegments)}}}}},debug:function(C,z,B){for(var G=0;G<B.length;G++)Xi(C,z,B[G])},custom:function(C,z,B){var G=C.context,ie=B.implementation;if(C.renderPass==="offscreen"){var ue=ie.prerender;ue&&(C.setCustomLayerDefaults(),G.setColorMode(C.colorModeForRenderPass()),ue.call(ie,G.gl,C.transform.customLayerMatrix()),G.setDirty(),C.setBaseState())}else if(C.renderPass==="translucent"){C.setCustomLayerDefaults(),G.setColorMode(C.colorModeForRenderPass()),G.setStencilMode(ke.disabled);var ge=ie.renderingMode==="3d"?new Xe(C.context.gl.LEQUAL,Xe.ReadWrite,C.depthRangeFor3D):C.depthModeForSublayer(0,Xe.ReadOnly);G.setDepthMode(ge),ie.render(G.gl,C.transform.customLayerMatrix()),G.setDirty(),C.setBaseState(),G.bindFramebuffer.set(null)}}},Ea=function(C,z){this.context=new Ce(C),this.transform=z,this._tileTextures={},this.setup(),this.numSublayers=Je.maxUnderzooming+Je.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Wr,this.gpuTimers={}};Ea.prototype.resize=function(C,z){if(this.width=C*e.browser.devicePixelRatio,this.height=z*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var B=0,G=this.style._order;B<G.length;B+=1){var ie=G[B];this.style._layers[ie].resize()}},Ea.prototype.setup=function(){var C=this.context,z=new e.StructArrayLayout2i4;z.emplaceBack(0,0),z.emplaceBack(e.EXTENT,0),z.emplaceBack(0,e.EXTENT),z.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=C.createVertexBuffer(z,vn.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);var B=new e.StructArrayLayout2i4;B.emplaceBack(0,0),B.emplaceBack(e.EXTENT,0),B.emplaceBack(0,e.EXTENT),B.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=C.createVertexBuffer(
vendor: 57,110 bytes, line 591
591B,vn.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);var G=new e.StructArrayLayout4i8;G.emplaceBack(0,0,0,0),G.emplaceBack(e.EXTENT,0,e.EXTENT,0),G.emplaceBack(0,e.EXTENT,0,e.EXTENT),G.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=C.createVertexBuffer(G,K.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);var ie=new e.StructArrayLayout2i4;ie.emplaceBack(0,0),ie.emplaceBack(1,0),ie.emplaceBack(0,1),ie.emplaceBack(1,1),this.viewportBuffer=C.createVertexBuffer(ie,vn.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);var ue=new e.StructArrayLayout1ui2;ue.emplaceBack(0),ue.emplaceBack(1),ue.emplaceBack(3),ue.emplaceBack(2),ue.emplaceBack(0),this.tileBorderIndexBuffer=C.createIndexBuffer(ue);var ge=new e.StructArrayLayout3ui6;ge.emplaceBack(0,1,2),ge.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=C.createIndexBuffer(ge),this.emptyTexture=new e.Texture(C,{width:1,height:1,data:new Uint8Array([0,0,0,0])},C.gl.RGBA);var ye=this.context.gl;this.stencilClearMode=new ke({func:ye.ALWAYS,mask:0},0,255,ye.ZERO,ye.ZERO,ye.ZERO)},Ea.prototype.clearStencil=function(){var C=this.context,z=C.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var B=e.create();e.ortho(B,0,this.width,this.height,0,0,1),e.scale(B,B,[z.drawingBufferWidth,z.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(C,z.TRIANGLES,Xe.disabled,this.stencilClearMode,Le.disabled,Ie.disabled,ao(B),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Ea.prototype._renderTileClippingMasks=function(C,z){if(this.currentStencilSource!==C.source&&C.isTileClipped()&&z&&z.length){this.currentStencilSource=C.source;var B=this.context,G=B.gl;this.nextStencilID+z.length>256&&this.clearStencil(),B.setColorMode(Le.disabled),B.setDepthMode(Xe.disabled);var ie=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ue=0,ge=z;ue<ge.length;ue+=1){var ye=ge[ue],Me=this._tileClippingMaskIDs[ye.key]=this.nextStencilID++;ie.draw(B,G.TRIANGLES,Xe.disabled,new ke({func:G.ALWAYS,mask:0},Me,255,G.KEEP,G.KEEP,G.REPLACE),Le.disabled,Ie.disabled,ao(ye.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Ea.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var C=this.nextStencilID++,z=this.context.gl;return new ke({func:z.NOTEQUAL,mask:255},C,255,z.KEEP,z.KEEP,z.REPLACE)},Ea.prototype.stencilModeForClipping=function(C){var z=this.context.gl;return new ke({func:z.EQUAL,mask:255},this._tileClippingMaskIDs[C.key],0,z.KEEP,z.KEEP,z.REPLACE)},Ea.prototype.stencilConfigForOverlap=function(C){var z,B=this.context.gl,G=C.sort(function(Me,je){return je.overscaledZ-Me.overscaledZ}),ie=G[G.length-1].overscaledZ,ue=G[0].overscaledZ-ie+1;if(ue>1){this.currentStencilSource=void 0,this.nextStencilID+ue>256&&this.clearStencil();for(var ge={},ye=0;ye<ue;ye++)ge[ye+ie]=new ke({func:B.GEQUAL,mask:255},ye+this.nextStencilID,255,B.KEEP,B.KEEP,B.REPLACE);return this.nextStencilID+=ue,[ge,G]}return[(z={},z[ie]=ke.disabled,z),G]},Ea.prototype.colorModeForRenderPass=function(){var C=this.context.gl;return this._showOverdrawInspector?new Le([C.CONSTANT_COLOR,C.ONE],new e.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Le.unblended:Le.alphaBlended},Ea.prototype.depthModeForSublayer=function(C,z,B){if(!this.opaquePassEnabledForLayer())return Xe.disabled;var G=1-((1+this.currentLayer)*this.numSublayers+C)*this.depthEpsilon;return new Xe(B||this.context.gl.LEQUAL,z,[G,G])},Ea.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Ea.prototype.render=function(C,z){var B=this;this.style=C,this.options=z,this.lineAtlas=C.lineAtlas,this.imageManager=C.imageManager,this.glyphManager=C.glyphManager,this.symbolFadeChange=C.placement.symbolFadeChange(e.browser.now()),this.imageManager.beginFrame();var G=this.style._order,ie=this.style.sourceCaches;for(var ue in ie){var ge=ie[ue];ge.used&&ge.prepare(this.context)}var ye,Me,je={},We={},nt={};for(var bt in ie){var At=ie[bt];je[bt]=At.getVisibleCoordinates(),We[bt]=je[bt].slice().reverse(),nt[bt]=At.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var _t=0;_t<G.length;_t++){var wt=G[_t];if(this.style._layers[wt].is3D()){this.opaquePassCutoff=_t;break}}this.renderPass="offscreen";for(var xt=0,Ft=G;xt<Ft.length;xt+=1){var Ot=Ft[xt],Nt=this.style._layers[Ot];if(Nt.hasOffscreenPass()&&!Nt.isHidden(this.transform.zoom)){var er=We[Nt.source];(Nt.type==="custom"||er.length)&&this.renderLayer(this,ie[Nt.source],Nt,er)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:z.showOverdrawInspector?e.Color.black:e.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=z.showOverdrawInspector,this.depthRangeFor3D=[0,1-(C._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=G.length-1;this.currentLayer>=0;this.currentLayer--){var fr=this.style._layers[G[this.currentLayer]],kr=ie[fr.source],Tr=je[fr.source];this._renderTileClippingMasks(fr,Tr),this.renderLayer(this,kr,fr,Tr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<G.length;this.currentLayer++){var Jr=this.style._layers[G[this.currentLayer]],Xr=ie[Jr.source],hn=(Jr.type==="symbol"?nt:We)[Jr.source];this._renderTileClippingMasks(Jr,je[Jr.source]),this.renderLayer(this,Xr,Jr,hn)}this.options.showTileBoundaries&&(e.values(this.style._layers).forEach(function(on){on.source&&!on.isHidden(B.transform.zoom)&&(on.source!==(Me&&Me.id)&&(Me=B.style.sourceCaches[on.source]),(!ye||ye.getSource().maxzoom<Me.getSource().maxzoom)&&(ye=Me))}),ye&&Ji.debug(this,ye,ye.getVisibleCoordinates())),this.options.showPadding&&di(this),this.context.setDefault()},Ea.prototype.renderLayer=function(C,z,B,G){B.isHidden(this.transform.zoom)||(B.type==="background"||B.type==="custom"||G.length)&&(this.id=B.id,this.gpuTimingStart(B),Ji[B.type](C,z,B,G,this.style.placement.variableOffsets),this.gpuTimingEnd())},Ea.prototype.gpuTimingStart=function(C){if(this.options.gpuTiming){var z=this.context.extTimerQuery,B=this.gpuTimers[C.id];B||(B=this.gpuTimers[C.id]={calls:0,cpuTime:0,query:z.createQueryEXT()}),B.calls++,z.beginQueryEXT(z.TIME_ELAPSED_EXT,B.query)}},Ea.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var C=this.context.extTimerQuery;C.endQueryEXT(C.TIME_ELAPSED_EXT)}},Ea.prototype.collectGpuTimers=function(){var C=this.gpuTimers;return this.gpuTimers={},C},Ea.prototype.queryGpuTimers=function(C){var z={};for(var B in C){var G=C[B],ie=this.context.extTimerQuery,ue=ie.getQueryObjectEXT(G.query,ie.QUERY_RESULT_EXT)/1e6;ie.deleteQueryEXT(G.query),z[B]=ue}return z},Ea.prototype.translatePosMatrix=function(C,z,B,G,ie){if(!B[0]&&!B[1])return C;var ue=ie?G==="map"?this.transform.angle:0:G==="viewport"?-this.transform.angle:0;if(ue){var ge=Math.sin(ue),ye=Math.cos(ue);B=[B[0]*ye-B[1]*ge,B[0]*ge+B[1]*ye]}var Me=[ie?B[0]:xr(z,B[0],this.transform.zoom),ie?B[1]:xr(z,B[1],this.transform.zoom),0],je=new Float32Array(16);return e.translate(je,C,Me),je},Ea.prototype.saveTileTexture=function(C){var z=this._tileTextures[C.size[0]];z?z.push(C):this._tileTextures[C.size[0]]=[C]},Ea.prototype.getTileTexture=function(C){var z=this._tileTextures[C];return z&&z.length>0?z.pop():null},Ea.prototype.isPatternMissing=function(C){if(!C)return!1;if(!C.from||!C.to)return!0;var z=this.imageManager.getPattern(C.from.toString()),B=this.imageManager.getPattern(C.to.toString());return!z||!B},Ea.prototype.useProgram=function(C,z){this.cache=this.cache||{};var B=""+C+(z?z.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[B]||(this.cache[B]=new bs(this.context,cs[C],z,mr[C],this._showOverdrawInspector)),this.cache[B]},Ea.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Ea.prototype.setBaseState=function(){var C=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(C.FUNC_ADD)},Ea.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var C=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,C.RGBA)}},Ea.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ft=function(C,z){this.points=C,this.planes=z};ft.fromInvProjectionMatrix=function(C,z,B){var G=Math.pow(2,B),ie=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(ge){return e.transformMat4([],ge,C)}).map(function(ge){return e.scale$1([],ge,1/ge[3]/z*G)}),ue=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(ge){var ye=e.sub([],ie[ge[0]],ie[ge[1]]),Me=e.sub([],ie[ge[2]],ie[ge[1]]),je=e.normalize([],e.cross([],ye,Me)),We=-e.dot(je,ie[ge[1]]);return je.concat(We)});return new ft(ie,ue)};var Rt=function(C,z){this.min=C,this.max=z,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};Rt.prototype.quadrant=function(C){for(var z=[C%2==0,C<2],B=e.clone$2(this.min),G=e.clone$2(this.max),ie=0;ie<z.length;ie++)B[ie]=z[ie]?this.min[ie]:this.center[ie],G[ie]=z[ie]?this.center[ie]:this.max[ie];return G[2]=this.max[2],new Rt(B,G)},Rt.prototype.distanceX=function(C){return Math.max(Math.min(this.max[0],C[0]),this.min[0])-C[0]},Rt.prototype.distanceY=function(C){return Math.max(Math.min(this.max[1],C[1]),this.min[1])-C[1]},Rt.prototype.intersects=function(C){for(var z=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],B=!0,G=0;G<C.planes.length;G++){for(var ie=C.planes[G],ue=0,ge=0;ge<z.length;ge++)ue+=e.dot$1(ie,z[ge])>=0;if(ue===0)return 0;ue!==z.length&&(B=!1)}if(B)return 2;for(var ye=0;ye<3;ye++){for(var Me=Number.MAX_VALUE,je=-Number.MAX_VALUE,We=0;We<C.points.length;We++){var nt=C.points[We][ye]-this.min[ye];Me=Math.min(Me,nt),je=Math.max(je,nt)}if(je<0||Me>this.max[ye]-this.min[ye])return 0}return 1};var nr=function(C,z,B,G){if(C===void 0&&(C=0),z===void 0&&(z=0),B===void 0&&(B=0),G===void 0&&(G=0),isNaN(C)||C<0||isNaN(z)||z<0||isNaN(B)||B<0||isNaN(G)||G<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=C,this.bottom=z,this.left=B,this.right=G};nr.prototype.interpolate=function(C,z,B){return z.top!=null&&C.top!=null&&(this.top=e.number(C.top,z.top,B)),z.bottom!=null&&C.bottom!=null&&(this.bottom=e.number(C.bottom,z.bottom,B)),z.left!=null&&C.left!=null&&(this.left=e.number(C.left,z.left,B)),z.right!=null&&C.right!=null&&(this.right=e.number(C.right,z.right,B)),this},nr.prototype.getCenter=function(C,z){var B=e.clamp((this.left+C-this.right)/2,0,C),G=e.clamp((this.top+z-this.bottom)/2,0,z);return new e.Point(B,G)},nr.prototype.equals=function(C){return this.top===C.top&&this.bottom===C.bottom&&this.left===C.left&&this.right===C.right},nr.prototype.clone=function(){return new nr(this.top,this.bottom,this.left,this.right)},nr.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Ht=function(C,z,B,G,ie){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=ie===void 0||ie,this._minZoom=C||0,this._maxZoom=z||22,this._minPitch=B??0,this._maxPitch=G??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new nr,this._posMatrixCache={},this._alignedPosMatrixCache={}},ir={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Ht.prototype.clone=function(){var C=new Ht(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return C.tileSize=this.tileSize,C.latRange=this.latRange,C.width=this.width,C.height=this.height,C._center=this._center,C.zoom=this.zoom,C.angle=this.angle,C._fov=this._fov,C._pitch=this._pitch,C._unmodified=this._unmodified,C._edgeInsets=this._edgeInsets.clone(),C._calcMatrices(),C},ir.minZoom.get=function(){return this._minZoom},ir.minZoom.set=function(C){this._minZoom!==C&&(this._minZoom=C,this.zoom=Math.max(this.zoom,C))},ir.maxZoom.get=function(){return this._maxZoom},ir.maxZoom.set=function(C){this._maxZoom!==C&&(this._maxZoom=C,this.zoom=Math.min(this.zoom,C))},ir.minPitch.get=function(){return this._minPitch},ir.minPitch.set=function(C){this._minPitch!==C&&(this._minPitch=C,this.pitch=Math.max(this.pitch,C))},ir.maxPitch.get=function(){return this._maxPitch},ir.maxPitch.set=function(C){this._maxPitch!==C&&(this._maxPitch=C,this.pitch=Math.min(this.pitch,C))},ir.renderWorldCopies.get=function(){return this._renderWorldCopies},ir.renderWorldCopies.set=function(C){C===void 0?C=!0:C===null&&(C=!1),this._renderWorldCopies=C},ir.worldSize.get=function(){return this.tileSize*this.scale},ir.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ir.size.get=function(){return new e.Point(this.width,this.height)},ir.bearing.get=function(){return-this.angle/Math.PI*180},ir.bearing.set=function(C){var z=-e.wrap(C,-180,180)*Math.PI/180;this.angle!==z&&(this._unmodified=!1,this.angle=z,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},ir.pitch.get=function(){return this._pitch/Math.PI*180},ir.pitch.set=function(C){var z=e.clamp(C,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==z&&(this._unmodified=!1,this._pitch=z,this._calcMatrices())},ir.fov.get=function(){return this._fov/Math.PI*180},ir.fov.set=function(C){C=Math.max(.01,Math.min(60,C)),this._fov!==C&&(this._unmodified=!1,this._fov=C/180*Math.PI,this._calcMatrices())},ir.zoom.get=function(){return this._zoom},ir.zoom.set=function(C){var z=Math.min(Math.max(C,this.minZoom),this.maxZoom);this._zoom!==z&&(this._unmodified=!1,this._zoom=z,this.scale=this.zoomScale(z),this.tileZoom=Math.floor(z),this.zoomFraction=z-this.tileZoom,this._constrain(),this._calcMatrices())},ir.center.get=function(){return this._center},ir.center.set=function(C){C.lat===this._center.lat&&C.lng===this._center.lng||(this._unmodified=!1,this._center=C,this._constrain(),this._calcMatrices())},ir.padding.get=function(){return this._edgeInsets.toJSON()},ir.padding.set=function(C){this._edgeInsets.equals(C)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,C,1),this._calcMatrices())},ir.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Ht.prototype.isPaddingEqual=function(C){return this._edgeInsets.equals(C)},Ht.prototype.interpolatePadding=function(C,z,B){this._unmodified=!1,this._edgeInsets.interpolate(C,z,B),this._constrain(),this._calcMatrices()},Ht.prototype.coveringZoomLevel=function(C){var z=(C.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/C.tileSize));return Math.max(0,z)},Ht.prototype.getVisibleUnwrappedCoordinates=function(C){var z=[new e.UnwrappedTileID(0,C)];if(this._renderWorldCopies)for(var B=this.pointCoordinate(new e.Point(0,0)),G=this.pointCoordinate(new e.Point(this.width,0)),ie=this.pointCoordinate(new e.Point(this.width,this.height)),ue=this.pointCoordinate(new e.Point(0,this.height)),ge=Math.floor(Math.min(B.x,G.x,ie.x,ue.x)),ye=Math.floor(Math.max(B.x,G.x,ie.x,ue.x)),Me=ge-1;Me<=ye+1;Me++)Me!==0&&z.push(new e.UnwrappedTileID(Me,C));return z},Ht.prototype.coveringTiles=function(C){var z=this.coveringZoomLevel(C),B=z;if(C.minzoom!==void 0&&z<C.minzoom)return[];C.maxzoom!==void 0&&z>C.maxzoom&&(z=C.maxzoom);var G=e.MercatorCoordinate.fromLngLat(this.center),ie=Math.pow(2,z),ue=[ie*G.x,ie*G.y,0],ge=ft.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,z),ye=C.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(ye=z);var Me=function(hn){return{aabb:new Rt([hn*ie,0,0],[(hn+1)*ie,ie,0]),zoom:0,x:0,y:0,wrap:hn,fullyVisible:!1}},je=[],We=[],nt=z,bt=C.reparseOverscaled?B:z;if(this._renderWorldCopies)for(var At=1;At<=3;At++)je.push(Me(-At)),je.push(Me(At));for(je.push(Me(0));je.length>0;){var _t=je.pop(),wt=_t.x,xt=_t.y,Ft=_t.fullyVisible;if(!Ft){var Ot=_t.aabb.intersects(ge);if(Ot===0)continue;Ft=Ot===2}var Nt=_t.aabb.distanceX(ue),er=_t.aabb.distanceY(ue),fr=Math.max(Math.abs(Nt),Math.abs(er)),kr=3+(1<<nt-_t.zoom)-2;if(_t.zoom===nt||fr>kr&&_t.zoom>=ye)We.push({tileID:new e.OverscaledTileID(_t.zoom===nt?bt:_t.zoom,_t.wrap,_t.zoom,wt,xt),distanceSq:e.sqrLen([ue[0]-.5-wt,ue[1]-.5-xt])});else for(var Tr=0;Tr<4;Tr++){var Jr=(wt<<1)+Tr%2,Xr=(xt<<1)+(Tr>>1);je.push({aabb:_t.aabb.quadrant(Tr),zoom:_t.zoom+1,x:Jr,y:Xr,wrap:_t.wrap,fullyVisible:Ft})}}return We.sort(function(hn,on){return hn.distanceSq-on.distanceSq}).map(function(hn){return hn.tileID})},Ht.prototype.resize=function(C,z){this.width=C,this.height=z,this.pixelsToGLUnits=[2/C,-2/z],this._constrain(),this._calcMatrices()},ir.unmodified.get=function(){return this._unmodified},Ht.prototype.zoomScale=function(C){return Math.pow(2,C)},Ht.prototype.scaleZoom=function(C){return Math.log(C)/Math.LN2},Ht.prototype.project=function(C){var z=e.clamp(C.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(C.lng)*this.worldSize,e.mercatorYfromLat(z)*this.worldSize)},Ht.prototype.unproject=function(C){return new e.MercatorCoordinate(C.x/this.worldSize,C.y/this.worldSize).toLngLat()},ir.point.get=function(){return this.project(this.center)},Ht.prototype.setLocationAtPoint=function(C,z){var B=this.pointCoordinate(z),G=this.pointCoordinate(this.centerPoint),ie=this.locationCoordinate(C),ue=new e.MercatorCoordinate(ie.x-(B.x-G.x),ie.y-(B.y-G.y));this.center=this.coordinateLocation(ue),this._renderWorldCopies&&(this.center=this.center.wrap())},Ht.prototype.locationPoint=function(C){return this.coordinatePoint(this.locationCoordinate(C))},Ht.prototype.pointLocation=function(C){return this.coordinateLocation(this.pointCoordinate(C))},Ht.prototype.locationCoordinate=function(C){return e.MercatorCoordinate.fromLngLat(C)},Ht.prototype.coordinateLocation=function(C){return C.toLngLat()},Ht.prototype.pointCoordinate=function(C){var z=[C.x,C.y,0,1],B=[C.x,C.y,1,1];e.transformMat4(z,z,this.pixelMatrixInverse),e.transformMat4(B,B,this.pixelMatrixInverse);var G=z[3],ie=B[3],ue=z[0]/G,ge=B[0]/ie,ye=z[1]/G,Me=B[1]/ie,je=z[2]/G,We=B[2]/ie,nt=je===We?0:(0-je)/(We-je);return new e.MercatorCoordinate(e.number(ue,ge,nt)/this.worldSize,e.number(ye,Me,nt)/this.worldSize)},Ht.prototype.coordinatePoint=function(C){var z=[C.x*this.worldSize,C.y*this.worldSize,0,1];return e.transformMat4(z,z,this.pixelMatrix),new e.Point(z[0]/z[3],z[1]/z[3])},Ht.prototype.getBounds=function(){return new e.LngLatBounds().extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},Ht.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Ht.prototype.setMaxBounds=function(C){C?(this.lngRange=[C.getWest(),C.getEast()],this.latRange=[C.getSouth(),C.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Ht.prototype.calculatePosMatrix=function(C,z){z===void 0&&(z=!1);var B=C.key,G=z?this._alignedPosMatrixCache:this._posMatrixCache;if(G[B])return G[B];var ie=C.canonical,ue=this.worldSize/this.zoomScale(ie.z),ge=ie.x+Math.pow(2,ie.z)*C.wrap,ye=e.identity(new Float64Array(16));return e.translate(ye,ye,[ge*ue,ie.y*ue,0]),e.scale(ye,ye,[ue/e.EXTENT,ue/e.EXTENT,1]),e.multiply(ye,z?this.alignedProjMatrix:this.projMatrix,ye),G[B]=new Float32Array(ye),G[B]},Ht.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Ht.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var C,z,B,G,ie=-90,ue=90,ge=-180,ye=180,Me=this.size,je=this._unmodified;if(this.latRange){var We=this.latRange;ie=e.mercatorYfromLat(We[1])*this.worldSize,C=(ue=e.mercatorYfromLat(We[0])*this.worldSize)-ie<Me.y?Me.y/(ue-ie):0}if(this.lngRange){var nt=this.lngRange;ge=e.mercatorXfromLng(nt[0])*this.worldSize,z=(ye=e.mercatorXfromLng(nt[1])*this.worldSize)-ge<Me.x?Me.x/(ye-ge):0}var bt=this.point,At=Math.max(z||0,C||0);if(At)return this.center=this.unproject(new e.Point(z?(ye+ge)/2:bt.x,C?(ue+ie)/2:bt.y)),this.zoom+=this.scaleZoom(At),this._unmodified=je,void(this._constraining=!1);if(this.latRange){var _t=bt.y,wt=Me.y/2;_t-wt<ie&&(G=ie+wt),_t+wt>ue&&(G=ue-wt)}if(this.lngRange){var xt=bt.x,Ft=Me.x/2;xt-Ft<ge&&(B=ge+Ft),xt+Ft>ye&&(B=ye-Ft)}B===void 0&&G===void 0||(this.center=this.unproject(new e.Point(B!==void 0?B:bt.x,G!==void 0?G:bt.y))),this._unmodified=je,this._constraining=!1}},Ht.prototype._calcMatrices=function(){if(this.height){var C=this._fov/2,z=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(C)*this.height;var B=Math.PI/2+this._pitch,G=this._fov*(.5+z.y/this.height),ie=Math.sin(G)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-B-G,.01,Math.PI-.01)),ue=this.point,ge=ue.x,ye=ue.y,Me=1.01*(Math.cos(Math.PI/2-this._pitch)*ie+this.cameraToCenterDistance),je=this.height/50,We=new Float64Array(16);e.perspective(We,this._fov,this.width/this.height,je,Me),We[8]=2*-z.x/this.width,We[9]=2*z.y/this.height,e.scale(We,We,[1,-1,1]),e.translate(We,We,[0,0,-this.cameraToCenterDistance]),e.rotateX(We,We,this._pitch),e.rotateZ(We,We,this.angle),e.translate(We,We,[-ge,-ye,0]),this.mercatorMatrix=e.scale([],We,[this.worldSize,this.worldSize,this.worldSize]),e.scale(We,We,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=We,this.invProjMatrix=e.invert([],this.projMatrix);var nt=this.width%2/2,bt=this.height%2/2,At=Math.cos(this.angle),_t=Math.sin(this.angle),wt=ge-Math.round(ge)+At*nt+_t*bt,xt=ye-Math.round(ye)+At*bt+_t*nt,Ft=new Float64Array(We);if(e.translate(Ft,Ft,[wt>.5?wt-1:wt,xt>.5?xt-1:xt,0]),this.alignedProjMatrix=Ft,We=e.create(),e.scale(We,We,[this.width/2,-this.height/2,1]),e.translate(We,We,[1,-1,0]),this.labelPlaneMatrix=We,We=e.create(),e.scale(We,We,[1,-1,1]),e.translate(We,We,[-1,-1,0]),e.scale(We,We,[2/this.width,2/this.height,1]),this.glCoordMatrix=We,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(We=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=We,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Ht.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var C=this.pointCoordinate(new e.Point(0,0)),z=[C.x*this.worldSize,C.y*this.worldSize,0,1];return e.transformMat4(z,z,this.pixelMatrix)[3]/this.cameraToCenterDistance},Ht.prototype.getCameraPoint=function(){var C=this._pitch,z=Math.tan(C)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,z))},Ht.prototype.getCameraQueryGeometry=function(C){var z=this.getCameraPoint();if(C.length===1)return[C[0],z];for(var B=z.x,G=z.y,ie=z.x,ue=z.y,ge=0,ye=C;ge<ye.length;ge+=1){var Me=ye[ge];B=Math.min(B,Me.x),G=Math.min(G,Me.y),ie=Math.max(ie,Me.x),ue=Math.max(ue,Me.y)}return[new e.Point(B,G),new e.Point(ie,G),new e.Point(ie,ue),new e.Point(B,ue),new e.Point(B,G)]},Object.defineProperties(Ht.prototype,ir);var Lr=function(C){var z,B,G,ie,ue;this._hashName=C&&encodeURIComponent(C),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(z=this._updateHashUnthrottled.bind(this),B=300,G=!1,ie=null,ue=function(){ie=null,G&&(z(),ie=setTimeout(ue,B),G=!1)},function(){return G=!0,ie||ue(),ie})};Lr.prototype.addTo=function(C){return this._map=C,e.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Lr.prototype.remove=function(){return e.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Lr.prototype.getHashString=function(C){var z=this._map.getCenter(),B=Math.round(100*this._map.getZoom())/100,G=Math.ceil((B*Math.LN2+Math.log(512/360/.5))/Math.LN10),ie=Math.pow(10,G),ue=Math.round(z.lng*ie)/ie,ge=Math.round(z.lat*ie)/ie,ye=this._map.getBearing(),Me=this._map.getPitch(),je="";if(je+=C?"/"+ue+"/"+ge+"/"+B:B+"/"+ge+"/"+ue,(ye||Me)&&(je+="/"+Math.round(10*ye)/10),Me&&(je+="/"+Math.round(Me)),this._hashName){var We=this._hashName,nt=!1,bt=e.window.location.hash.slice(1).split("&").map(function(At){var _t=At.split("=")[0];return _t===We?(nt=!0,_t+"="+je):At}).filter(function(At){return At});return nt||bt.push(We+"="+je),"#"+bt.join("&")}return"#"+je},Lr.prototype._getCurrentHash=function(){var C,z=this,B=e.window.location.hash.replace("#","");return this._hashName?(B.split("&").map(function(G){return G.split("=")}).forEach(function(G){G[0]===z._hashName&&(C=G)}),(C&&C[1]||"").split("/")):B.split("/")},Lr.prototype._onHashChange=function(){var C=this._getCurrentHash();if(C.length>=3&&!C.some(function(B){return isNaN(B)})){var z=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(C[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+C[2],+C[1]],zoom:+C[0],bearing:z,pitch:+(C[4]||0)}),!0}return!1},Lr.prototype._updateHashUnthrottled=function(){var C=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",C)}catch{}};var Dr={linearity:.3,easing:e.bezier(0,0,.3,1)},Yr=e.extend({deceleration:2500,maxSpeed:1400},Dr),sn=e.extend({deceleration:20,maxSpeed:1400},Dr),an=e.extend({deceleration:1e3,maxSpeed:360},Dr),gn=e.extend({deceleration:1e3,maxSpeed:90},Dr),Tn=function(C){this._map=C,this.clear()};function ln(C,z){(!C.duration||C.duration<z.duration)&&(C.duration=z.duration,C.easing=z.easing)}function kn(C,z,B){var G=B.maxSpeed,ie=B.linearity,ue=B.deceleration,ge=e.clamp(C*ie/(z/1e3),-G,G),ye=Math.abs(ge)/(ue*ie);return{easing:B.easing,duration:1e3*ye,amount:ge*(ye/2)}}Tn.prototype.clear=function(){this._inertiaBuffer=[]},Tn.prototype.record=function(C){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:C})},Tn.prototype._drainInertiaBuffer=function(){for(var C=this._inertiaBuffer,z=e.browser.now();C.length>0&&z-C[0].time>160;)C.shift()},Tn.prototype._onMoveEnd=function(C){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var z={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},B=0,G=this._inertiaBuffer;B<G.length;B+=1){var ie=G[B].settings;z.zoom+=ie.zoomDelta||0,z.bearing+=ie.bearingDelta||0,z.pitch+=ie.pitchDelta||0,ie.panDelta&&z.pan._add(ie.panDelta),ie.around&&(z.around=ie.around),ie.pinchAround&&(z.pinchAround=ie.pinchAround)}var ue=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ge={};if(z.pan.mag()){var ye=kn(z.pan.mag(),ue,e.extend({},Yr,C||{}));ge.offset=z.pan.mult(ye.amount/z.pan.mag()),ge.center=this._map.transform.center,ln(ge,ye)}if(z.zoom){var Me=kn(z.zoom,ue,sn);ge.zoom=this._map.transform.zoom+Me.amount,ln(ge,Me)}if(z.bearing){var je=kn(z.bearing,ue,an);ge.bearing=this._map.transform.bearing+e.clamp(je.amount,-179,179),ln(ge,je)}if(z.pitch){var We=kn(z.pitch,ue,gn);ge.pitch=this._map.transform.pitch+We.amount,ln(ge,We)}if(ge.zoom||ge.bearing){var nt=z.pinchAround===void 0?z.around:z.pinchAround;ge.around=nt?this._map.unproject(nt):this._map.getCenter()}return this.clear(),e.extend(ge,{noMoveStart:!0})}};var Dn=function(C){function z(G,ie,ue,ge){ge===void 0&&(ge={});var ye=t.mousePos(ie.getCanvasContainer(),ue),Me=ie.unproject(ye);C.call(this,G,e.extend({point:ye,lngLat:Me,originalEvent:ue},ge)),this._defaultPrevented=!1,this.target=ie}C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z;var B={defaultPrevented:{configurable:!0}};return z.prototype.preventDefault=function(){this._defaultPrevented=!0},B.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(z.prototype,B),z}(e.Event),jn=function(C){function z(G,ie,ue){var ge=G==="touchend"?ue.changedTouches:ue.touches,ye=t.touchPos(ie.getCanvasContainer(),ge),Me=ye.map(function(nt){return ie.unproject(nt)}),je=ye.reduce(function(nt,bt,At,_t){return nt.add(bt.div(_t.length))},new e.Point(0,0)),We=ie.unproject(je);C.call(this,G,{points:ye,point:je,lngLats:Me,lngLat:We,originalEvent:ue}),this._defaultPrevented=!1}C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z;var B={defaultPrevented:{configurable:!0}};return z.prototype.preventDefault=function(){this._defaultPrevented=!0},B.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(z.prototype,B),z}(e.Event),$n=function(C){function z(G,ie,ue){C.call(this,G,{originalEvent:ue}),this._defaultPrevented=!1}C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z;var B={defaultPrevented:{configurable:!0}};return z.prototype.preventDefault=function(){this._defaultPrevented=!0},B.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(z.prototype,B),z}(e.Event),Zr=function(C,z){this._map=C,this._clickTolerance=z.clickTolerance};Zr.prototype.reset=function(){delete this._mousedownPos},Zr.prototype.wheel=function(C){return this._firePreventable(new $n(C.type,this._map,C))},Zr.prototype.mousedown=function(C,z){return this._mousedownPos=z,this._firePreventable(new Dn(C.type,this._map,C))},Zr.prototype.mouseup=function(C){this._map.fire(new Dn(C.type,this._map,C))},Zr.prototype.click=function(C,z){this._mousedownPos&&this._mousedownPos.dist(z)>=this._clickTolerance||this._map.fire(new Dn(C.type,this._map,C))},Zr.prototype.dblclick=function(C){return this._firePreventable(new Dn(C.type,this._map,C))},Zr.prototype.mouseover=function(C){this._map.fire(new Dn(C.type,this._map,C))},Zr.prototype.mouseout=function(C){this._map.fire(new Dn(C.type,this._map,C))},Zr.prototype.touchstart=function(C){return this._firePreventable(new jn(C.type,this._map,C))},Zr.prototype.touchmove=function(C){this._map.fire(new jn(C.type,this._map,C))},Zr.prototype.touchend=function(C){this._map.fire(new jn(C.type,this._map,C))},Zr.prototype.touchcancel=function(C){this._map.fire(new jn(C.type,this._map,C))},Zr.prototype._firePreventable=function(C){if(this._map.fire(C),C.defaultPrevented)return{}},Zr.prototype.isEnabled=function(){return!0},Zr.prototype.isActive=function(){return!1},Zr.prototype.enable=function(){},Zr.prototype.disable=function(){};var Jn=function(C){this._map=C};Jn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Jn.prototype.mousemove=function(C){this._map.fire(new Dn(C.type,this._map,C))},Jn.prototype.mousedown=function(){this._delayContextMenu=!0},Jn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Dn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Jn.prototype.contextmenu=function(C){this._delayContextMenu?this._contextMenuEvent=C:this._map.fire(new Dn(C.type,this._map,C)),this._map.listens("contextmenu")&&C.preventDefault()},Jn.prototype.isEnabled=function(){return!0},Jn.prototype.isActive=function(){return!1},Jn.prototype.enable=function(){},Jn.prototype.disable=function(){};var Cn=function(C,z){this._map=C,this._el=C.getCanvasContainer(),this._container=C.getContainer(),this._clickTolerance=z.clickTolerance||1};function Bn(C,z){for(var B={},G=0;G<C.length;G++)B[C[G].identifier]=z[G];return B}Cn.prototype.isEnabled=function(){return!!this._enabled},Cn.prototype.isActive=function(){return!!this._active},Cn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Cn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Cn.prototype.mousedown=function(C,z){this.isEnabled()&&C.shiftKey&&C.button===0&&(t.disableDrag(),this._startPos=this._lastPos=z,this._active=!0)},Cn.prototype.mousemoveWindow=function(C,z){if(this._active){var B=z;if(!(this._lastPos.equals(B)||!this._box&&B.dist(this._startPos)<this._clickTolerance)){var G=this._startPos;this._lastPos=B,this._box||(this._box=t.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",C));var ie=Math.min(G.x,B.x),ue=Math.max(G.x,B.x),ge=Math.min(G.y,B.y),ye=Math.max(G.y,B.y);t.setTransform(this._box,"translate("+ie+"px,"+ge+"px)"),this._box.style.width=ue-ie+"px",this._box.style.height=ye-ge+"px"}}},Cn.prototype.mouseupWindow=function(C,z){var B=this;if(this._active&&C.button===0){var G=this._startPos,ie=z;if(this.reset(),t.suppressClick(),G.x!==ie.x||G.y!==ie.y)return this._map.fire(new e.Event("boxzoomend",{originalEvent:C})),{cameraAnimation:function(ue){return ue.fitScreenCoordinates(G,ie,B._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",C)}},Cn.prototype.keydown=function(C){this._active&&C.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",C))},Cn.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(t.remove(this._box),this._box=null),t.enableDrag(),delete this._startPos,delete this._lastPos},Cn.prototype._fireEvent=function(C,z){return this._map.fire(new e.Event(C,{originalEvent:z}))};var Xn=function(C){this.reset(),this.numTouches=C.numTouches};Xn.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Xn.prototype.touchstart=function(C,z,B){(this.centroid||B.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=C.timeStamp),B.length===this.numTouches&&(this.centroid=function(G){for(var ie=new e.Point(0,0),ue=0,ge=G;ue<ge.length;ue+=1){var ye=ge[ue];ie._add(ye)}return ie.div(G.length)}(z),this.touches=Bn(B,z)))},Xn.prototype.touchmove=function(C,z,B){if(!this.aborted&&this.centroid){var G=Bn(B,z);for(var ie in this.touches){var ue=this.touches[ie],ge=G[ie];(!ge||ge.dist(ue)>30)&&(this.aborted=!0)}}},Xn.prototype.touchend=function(C,z,B){if((!this.centroid||C.timeStamp-this.startTime>500)&&(this.aborted=!0),B.length===0){var G=!this.aborted&&this.centroid;if(this.reset(),G)return G}};var xa=function(C){this.singleTap=new Xn(C),this.numTaps=C.numTaps,this.reset()};xa.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},xa.prototype.touchstart=function(C,z,B){this.singleTap.touchstart(C,z,B)},xa.prototype.touchmove=function(C,z,B){this.singleTap.touchmove(C,z,B)},xa.prototype.touchend=function(C,z,B){var G=this.singleTap.touchend(C,z,B);if(G){var ie=C.timeStamp-this.lastTime<500,ue=!this.lastTap||this.lastTap.dist(G)<30;if(ie&&ue||this.reset(),this.count++,this.lastTime=C.timeStamp,this.lastTap=G,this.count===this.numTaps)return this.reset(),G}};var Ma=function(){this._zoomIn=new xa({numTouches:1,numTaps:2}),this._zoomOut=new xa({numTouches:2,numTaps:1}),this.reset()};Ma.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ma.prototype.touchstart=function(C,z,B){this._zoomIn.touchstart(C,z,B),this._zoomOut.touchstart(C,z,B)},Ma.prototype.touchmove=function(C,z,B){this._zoomIn.touchmove(C,z,B),this._zoomOut.touchmove(C,z,B)},Ma.prototype.touchend=function(C,z,B){var G=this,ie=this._zoomIn.touchend(C,z,B),ue=this._zoomOut.touchend(C,z,B);return ie?(this._active=!0,C.preventDefault(),setTimeout(function(){return G.reset()},0),{cameraAnimation:function(ge){return ge.easeTo({duration:300,zoom:ge.getZoom()+1,around:ge.unproject(ie)},{originalEvent:C})}}):ue?(this._active=!0,C.preventDefault(),setTimeout(function(){return G.reset()},0),{cameraAnimation:function(ge){return ge.easeTo({duration:300,zoom:ge.getZoom()-1,around:ge.unproject(ue)},{originalEvent:C})}}):void 0},Ma.prototype.touchcancel=function(){this.reset()},Ma.prototype.enable=function(){this._enabled=!0},Ma.prototype.disable=function(){this._enabled=!1,this.reset()},Ma.prototype.isEnabled=function(){return this._enabled},Ma.prototype.isActive=function(){return this._active};var Sn=function(C){this.reset(),this._clickTolerance=C.clickTolerance||1};Sn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Sn.prototype._correctButton=function(C,z){return!1},Sn.prototype._move=function(C,z){return{}},Sn.prototype.mousedown=function(C,z){if(!this._lastPoint){var B=t.mouseButton(C);this._correctButton(C,B)&&(this._lastPoint=z,this._eventButton=B)}},Sn.prototype.mousemoveWindow=function(C,z){var B=this._lastPoint;if(B&&(C.preventDefault(),this._moved||!(z.dist(B)<this._clickTolerance)))return this._moved=!0,this._lastPoint=z,this._move(B,z)},Sn.prototype.mouseupWindow=function(C){t.mouseButton(C)===this._eventButton&&(this._moved&&t.suppressClick(),this.reset())},Sn.prototype.enable=function(){this._enabled=!0},Sn.prototype.disable=function(){this._enabled=!1,this.reset()},Sn.prototype.isEnabled=function(){return this._enabled},Sn.prototype.isActive=function(){return this._active};var La=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.mousedown=function(B,G){C.prototype.mousedown.call(this,B,G),this._lastPoint&&(this._active=!0)},z.prototype._correctButton=function(B,G){return G===0&&!B.ctrlKey},z.prototype._move=function(B,G){return{around:G,panDelta:G.sub(B)}},z}(Sn),Ta=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype._correctButton=function(B,G){return G===0&&B.ctrlKey||G===2},z.prototype._move=function(B,G){var ie=.8*(G.x-B.x);if(ie)return this._active=!0,{bearingDelta:ie}},z.prototype.contextmenu=function(B){B.preventDefault()},z}(Sn),fa=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype._correctButton=function(B,G){return G===0&&B.ctrlKey||G===2},z.prototype._move=function(B,G){var ie=-.5*(G.y-B.y);if(ie)return this._active=!0,{pitchDelta:ie}},z.prototype.contextmenu=function(B){B.preventDefault()},z}(Sn),Ca=function(C){this._minTouches=1,this._clickTolerance=C.clickTolerance||1,this.reset()};Ca.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new e.Point(0,0)},Ca.prototype.touchstart=function(C,z,B){return this._calculateTransform(C,z,B)},Ca.prototype.touchmove=function(C,z,B){if(this._active)return C.preventDefault(),this._calculateTransform(C,z,B)},Ca.prototype.touchend=function(C,z,B){this._calculateTransform(C,z,B),this._active&&B.length<this._minTouches&&this.reset()},Ca.prototype.touchcancel=function(){this.reset()},Ca.prototype._calculateTransform=function(C,z,B){B.length>0&&(this._active=!0);var G=Bn(B,z),ie=new e.Point(0,0),ue=new e.Point(0,0),ge=0;for(var ye in G){var Me=G[ye],je=this._touches[ye];je&&(ie._add(Me),ue._add(Me.sub(je)),ge++,G[ye]=Me)}if(this._touches=G,!(ge<this._minTouches)&&ue.mag()){var We=ue.div(ge);if(this._sum._add(We),!(this._sum.mag()<this._clickTolerance))return{around:ie.div(ge),panDelta:We}}},Ca.prototype.enable=function(){this._enabled=!0},Ca.prototype.disable=function(){this._enabled=!1,this.reset()},Ca.prototype.isEnabled=function(){return this._enabled},Ca.prototype.isActive=function(){return this._active};var _a=function(){this.reset()};function Za(C,z,B){for(var G=0;G<C.length;G++)if(C[G].identifier===B)return z[G]}_a.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},_a.prototype._start=function(C){},_a.prototype._move=function(C,z,B){return{}},_a.prototype.touchstart=function(C,z,B){this._firstTwoTouches||B.length<2||(this._firstTwoTouches=[B[0].identifier,B[1].identifier],this._start([z[0],z[1]]))},_a.prototype.touchmove=function(C,z,B){if(this._firstTwoTouches){C.preventDefault();var G=this._firstTwoTouches,ie=G[0],ue=G[1],ge=Za(B,z,ie),ye=Za(B,z,ue);if(ge&&ye){var Me=this._aroundCenter?null:ge.add(ye).div(2);return this._move([ge,ye],Me,C)}}},_a.prototype.touchend=function(C,z,B){if(this._firstTwoTouches){var G=this._firstTwoTouches,ie=G[0],ue=G[1],ge=Za(B,z,ie),ye=Za(B,z,ue);ge&&ye||(this._active&&t.suppressClick(),this.reset())}},_a.prototype.touchcancel=function(){this.reset()},_a.prototype.enable=function(C){this._enabled=!0,this._aroundCenter=!!C&&C.around==="center"},_a.prototype.disable=function(){this._enabled=!1,this.reset()},_a.prototype.isEnabled=function(){return this._enabled},_a.prototype.isActive=function(){return this._active};function Kn(C,z){return Math.log(C/z)/Math.LN2}var Va=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.reset=function(){C.prototype.reset.call(this),delete this._distance,delete this._startDistance},z.prototype._start=function(B){this._startDistance=this._distance=B[0].dist(B[1])},z.prototype._move=function(B,G){var ie=this._distance;if(this._distance=B[0].dist(B[1]),this._active||!(Math.abs(Kn(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Kn(this._distance,ie),pinchAround:G}},z}(_a);function zi(C,z){return 180*C.angleWith(z)/Math.PI}var Go=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.reset=function(){C.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},z.prototype._start=function(B){this._startVector=this._vector=B[0].sub(B[1]),this._minDiameter=B[0].dist(B[1])},z.prototype._move=function(B,G){var ie=this._vector;if(this._vector=B[0].sub(B[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:zi(this._vector,ie),pinchAround:G}},z.prototype._isBelowThreshold=function(B){this._minDiameter=Math.min(this._minDiameter,B.mag());var G=25/(Math.PI*this._minDiameter)*360,ie=zi(B,this._startVector);return Math.abs(ie)<G},z}(_a);function Co(C){return Math.abs(C.y)>Math.abs(C.x)}var fo=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.reset=function(){C.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},z.prototype._start=function(B){this._lastPoints=B,Co(B[0].sub(B[1]))&&(this._valid=!1)},z.prototype._move=function(B,G,ie){var ue=B[0].sub(this._lastPoints[0]),ge=B[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ue,ge,ie.timeStamp),this._valid)return this._lastPoints=B,this._active=!0,{pitchDelta:-.5*((ue.y+ge.y)/2)}},z.prototype.gestureBeginsVertically=function(B,G,ie){if(this._valid!==void 0)return this._valid;var ue=B.mag()>=2,ge=G.mag()>=2;if(ue||ge){if(!ue||!ge)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;var ye=B.y>0==G.y>0;return Co(B)&&Co(G)&&ye}},z}(_a),da={panStep:100,bearingStep:15,pitchStep:10},ci=function(){var C=da;this._panStep=C.panStep,this._bearingStep=C.bearingStep,this._pitchStep=C.pitchStep};function ho(C){return C*(2-C)}ci.prototype.reset=function(){this._active=!1},ci.prototype.keydown=function(C){var z=this;if(!(C.altKey||C.ctrlKey||C.metaKey)){var B=0,G=0,ie=0,ue=0,ge=0;switch(C.keyCode){case 61:case 107:case 171:case 187:B=1;break;case 189:case 109:case 173:B=-1;break;case 37:C.shiftKey?G=-1:(C.preventDefault(),ue=-1);break;case 39:C.shiftKey?G=1:(C.preventDefault(),ue=1);break;case 38:C.shiftKey?ie=1:(C.preventDefault(),ge=-1);break;case 40:C.shiftKey?ie=-1:(C.preventDefault(),ge=1);break;default:return}return{cameraAnimation:function(ye){var Me=ye.getZoom();ye.easeTo({duration:300,easeId:"keyboardHandler",easing:ho,zoom:B?Math.round(Me)+B*(C.shiftKey?2:1):Me,bearing:ye.getBearing()+G*z._bearingStep,pitch:ye.getPitch()+ie*z._pitchStep,offset:[-ue*z._panStep,-ge*z._panStep],center:ye.getCenter()},{originalEvent:C})}}}},ci.prototype.enable=function(){this._enabled=!0},ci.prototype.disable=function(){this._enabled=!1,this.reset()},ci.prototype.isEnabled=function(){return this._enabled},ci.prototype.isActive=function(){return this._active};var Ha=function(C,z){this._map=C,this._el=C.getCanvasContainer(),this._handler=z,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};Ha.prototype.setZoomRate=function(C){this._defaultZoomRate=C},Ha.prototype.setWheelZoomRate=function(C){this._wheelZoomRate=C},Ha.prototype.isEnabled=function(){return!!this._enabled},Ha.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Ha.prototype.isZooming=function(){return!!this._zooming},Ha.prototype.enable=function(C){this.isEnabled()||(this._enabled=!0,this._aroundCenter=C&&C.around==="center")},Ha.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ha.prototype.wheel=function(C){if(this.isEnabled()){var z=C.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*C.deltaY:C.deltaY,B=e.browser.now(),G=B-(this._lastWheelEventTime||0);this._lastWheelEventTime=B,z!==0&&z%4.000244140625==0?this._type="wheel":z!==0&&Math.abs(z)<4?this._type="trackpad":G>400?(this._type=null,this._lastValue=z,this._timeout=setTimeout(this._onTimeout,40,C)):this._type||(this._type=Math.abs(G*z)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,z+=this._lastValue)),C.shiftKey&&z&&(z/=4),this._type&&(this._lastWheelEvent=C,this._delta-=z,this._active||this._start(C)),C.preventDefault()}},Ha.prototype._onTimeout=function(C){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(C)},Ha.prototype._start=function(C){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var z=t.mousePos(this._el,C);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(z)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Ha.prototype.renderFrame=function(){return this._onScrollFrame()},Ha.prototype._onScrollFrame=function(){var C=this;if(this._frameId&&(this._frameId=null,this.isActive())){var z=this._map.transform;if(this._delta!==0){var B=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,G=2/(1+Math.exp(-Math.abs(this._delta*B)));this._delta<0&&G!==0&&(G=1/G);var ie=typeof this._targetZoom=="number"?z.zoomScale(this._targetZoom):z.scale;this._targetZoom=Math.min(z.maxZoom,Math.max(z.minZoom,z.scaleZoom(ie*G))),this._type==="wheel"&&(this._startZoom=z.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ue,ge=typeof this._targetZoom=="number"?this._targetZoom:z.zoom,ye=this._startZoom,Me=this._easing,je=!1;if(this._type==="wheel"&&ye&&Me){var We=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),nt=Me(We);ue=e.number(ye,ge,nt),We<1?this._frameId||(this._frameId=!0):je=!0}else ue=ge,je=!0;return this._active=!0,je&&(this._active=!1,this._finishTimeout=setTimeout(function(){C._zooming=!1,C._handler._triggerRenderFrame(),delete C._targetZoom,delete C._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!je,zoomDelta:ue-z.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Ha.prototype._smoothOutEasing=function(C){var z=e.ease;if(this._prevEase){var B=this._prevEase,G=(e.browser.now()-B.start)/B.duration,ie=B.easing(G+.01)-B.easing(G),ue=.27/Math.sqrt(ie*ie+1e-4)*.01,ge=Math.sqrt(.0729-ue*ue);z=e.bezier(ue,ge,.25,1)}return this._prevEase={start:e.browser.now(),duration:C,easing:z},z},Ha.prototype.reset=function(){this._active=!1};var yi=function(C,z){this._clickZoom=C,this._tapZoom=z};yi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},yi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},yi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},yi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ni=function(){this.reset()};Ni.prototype.reset=function(){this._active=!1},Ni.prototype.dblclick=function(C,z){return C.preventDefault(),{cameraAnimation:function(B){B.easeTo({duration:300,zoom:B.getZoom()+(C.shiftKey?-1:1),around:B.unproject(z)},{originalEvent:C})}}},Ni.prototype.enable=function(){this._enabled=!0},Ni.prototype.disable=function(){this._enabled=!1,this.reset()},Ni.prototype.isEnabled=function(){return this._enabled},Ni.prototype.isActive=function(){return this._active};var Ja=function(){this._tap=new xa({numTouches:1,numTaps:1}),this.reset()};Ja.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Ja.prototype.touchstart=function(C,z,B){this._swipePoint||(this._tapTime&&C.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?B.length>0&&(this._swipePoint=z[0],this._swipeTouch=B[0].identifier):this._tap.touchstart(C,z,B))},Ja.prototype.touchmove=function(C,z,B){if(this._tapTime){if(this._swipePoint){if(B[0].identifier!==this._swipeTouch)return;var G=z[0],ie=G.y-this._swipePoint.y;return this._swipePoint=G,C.preventDefault(),this._active=!0,{zoomDelta:ie/128}}}else this._tap.touchmove(C,z,B)},Ja.prototype.touchend=function(C,z,B){this._tapTime?this._swipePoint&&B.length===0&&this.reset():this._tap.touchend(C,z,B)&&(this._tapTime=C.timeStamp)},Ja.prototype.touchcancel=function(){this.reset()},Ja.prototype.enable=function(){this._enabled=!0},Ja.prototype.disable=function(){this._enabled=!1,this.reset()},Ja.prototype.isEnabled=function(){return this._enabled},Ja.prototype.isActive=function(){return this._active};var io=function(C,z,B){this._el=C,this._mousePan=z,this._touchPan=B};io.prototype.enable=function(C){this._inertiaOptions=C||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},io.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},io.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},io.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Ka=function(C,z,B){this._pitchWithRotate=C.pitchWithRotate,this._mouseRotate=z,this._mousePitch=B};Ka.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Ka.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Ka.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Ka.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Ki=function(C,z,B,G){this._el=C,this._touchZoom=z,this._touchRotate=B,this._tapDragZoom=G,this._rotationDisabled=!1,this._enabled=!0};Ki.prototype.enable=function(C){this._touchZoom.enable(C),this._rotationDisabled||this._touchRotate.enable(C),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Ki.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Ki.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Ki.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Ki.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Ki.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var as=function(C){return C.zoom||C.drag||C.pitch||C.rotate},Qo=function(C){function z(){C.apply(this,arguments)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z}(e.Event);function zs(C){return C.panDelta&&C.panDelta.mag()||C.zoomDelta||C.bearingDelta||C.pitchDelta}var Li=function(C,z){this._map=C,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tn(C),this._bearingSnap=z.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(z),e.bindAll(["handleEvent","handleWindowEvent"],this);var B=this._el;this._listeners=[[B,"touchstart",{passive:!1}],[B,"touchmove",{passive:!1}],[B,"touchend",void 0],[B,"touchcancel",void 0],[B,"mousedown",void 0],[B,"mousemove",void 0],[B,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[B,"mouseover",void 0],[B,"mouseout",void 0],[B,"dblclick",void 0],[B,"click",void 0],[B,"keydown",{capture:!1}],[B,"keyup",void 0],[B,"wheel",{passive:!1}],[B,"contextmenu",void 0],[e.window,"blur",void 0]];for(var G=0,ie=this._listeners;G<ie.length;G+=1){var ue=ie[G],ge=ue[0],ye=ue[1],Me=ue[2];t.addEventListener(ge,ye,ge===e.window.document?this.handleWindowEvent:this.handleEvent,Me)}};Li.prototype.destroy=function(){for(var C=0,z=this._listeners;C<z.length;C+=1){var B=z[C],G=B[0],ie=B[1],ue=B[2];t.removeEventListener(G,ie,G===e.window.document?this.handleWindowEvent:this.handleEvent,ue)}},Li.prototype._addDefaultHandlers=function(C){var z=this._map,B=z.getCanvasContainer();this._add("mapEvent",new Zr(z,C));var G=z.boxZoom=new Cn(z,C);this._add("boxZoom",G);var ie=new Ma,ue=new Ni;z.doubleClickZoom=new yi(ue,ie),this._add("tapZoom",ie),this._add("clickZoom",ue);var ge=new Ja;this._add("tapDragZoom",ge);var ye=z.touchPitch=new fo;this._add("touchPitch",ye);var Me=new Ta(C),je=new fa(C);z.dragRotate=new Ka(C,Me,je),this._add("mouseRotate",Me,["mousePitch"]),this._add("mousePitch",je,["mouseRotate"]);var We=new La(C),nt=new Ca(C);z.dragPan=new io(B,We,nt),this._add("mousePan",We),this._add("touchPan",nt,["touchZoom","touchRotate"]);var bt=new Go,At=new Va;z.touchZoomRotate=new Ki(B,At,bt,ge),this._add("touchRotate",bt,["touchPan","touchZoom"]),this._add("touchZoom",At,["touchPan","touchRotate"]);var _t=z.scrollZoom=new Ha(z,this);this._add("scrollZoom",_t,["mousePan"]);var wt=z.keyboard=new ci;this._add("keyboard",wt),this._add("blockableMapEvent",new Jn(z));for(var xt=0,Ft=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];xt<Ft.length;xt+=1){var Ot=Ft[xt];C.interactive&&C[Ot]&&z[Ot].enable(C[Ot])}},Li.prototype._add=function(C,z,B){this._handlers.push({handlerName:C,handler:z,allowed:B}),this._handlersById[C]=z},Li.prototype.stop=function(){if(!this._updatingCamera){for(var C=0,z=this._handlers;C<z.length;C+=1)z[C].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},Li.prototype.isActive=function(){for(var C=0,z=this._handlers;C<z.length;C+=1)if(z[C].handler.isActive())return!0;return!1},Li.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Li.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Li.prototype.isMoving=function(){return!!as(this._eventsInProgress)||this.isZooming()},Li.prototype._blockedByActive=function(C,z,B){for(var G in C)if(G!==B&&(!z||z.indexOf(G)<0))return!0;return!1},Li.prototype.handleWindowEvent=function(C){this.handleEvent(C,C.type+"Window")},Li.prototype._getMapTouches=function(C){for(var z=[],B=0,G=C;B<G.length;B+=1){var ie=G[B],ue=ie.target;this._el.contains(ue)&&z.push(ie)}return z},Li.prototype.handleEvent=function(C,z){if(C.type!=="blur"){this._updatingCamera=!0;for(var B=C.type==="renderFrame"?void 0:C,G={needsRenderFrame:!1},ie={},ue={},ge=C.touches?this._getMapTouches(C.touches):void 0,ye=ge?t.touchPos(this._el,ge):t.mousePos(this._el,C),Me=0,je=this._handlers;Me<je.length;Me+=1){var We=je[Me],nt=We.handlerName,bt=We.handler,At=We.allowed;if(bt.isEnabled()){var _t=void 0;this._blockedByActive(ue,At,nt)?bt.reset():bt[z||C.type]&&(_t=bt[z||C.type](C,ye,ge),this.mergeHandlerResult(G,ie,_t,nt,B),_t&&_t.needsRenderFrame&&this._triggerRe
591nderFrame()),(_t||bt.isActive())&&(ue[nt]=bt)}}var wt={};for(var xt in this._previousActiveHandlers)ue[xt]||(wt[xt]=B);this._previousActiveHandlers=ue,(Object.keys(wt).length||zs(G))&&(this._changes.push([G,ie,wt]),this._triggerRenderFrame()),(Object.keys(ue).length||zs(G))&&this._map._stop(!0),this._updatingCamera=!1;var Ft=G.cameraAnimation;Ft&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],Ft(this._map))}else this.stop()},Li.prototype.mergeHandlerResult=function(C,z,B,G,ie){if(B){e.extend(C,B);var ue={handlerName:G,originalEvent:B.originalEvent||ie};B.zoomDelta!==void 0&&(z.zoom=ue),B.panDelta!==void 0&&(z.drag=ue),B.pitchDelta!==void 0&&(z.pitch=ue),B.bearingDelta!==void 0&&(z.rotate=ue)}},Li.prototype._applyChanges=function(){for(var C={},z={},B={},G=0,ie=this._changes;G<ie.length;G+=1){var ue=ie[G],ge=ue[0],ye=ue[1],Me=ue[2];ge.panDelta&&(C.panDelta=(C.panDelta||new e.Point(0,0))._add(ge.panDelta)),ge.zoomDelta&&(C.zoomDelta=(C.zoomDelta||0)+ge.zoomDelta),ge.bearingDelta&&(C.bearingDelta=(C.bearingDelta||0)+ge.bearingDelta),ge.pitchDelta&&(C.pitchDelta=(C.pitchDelta||0)+ge.pitchDelta),ge.around!==void 0&&(C.around=ge.around),ge.pinchAround!==void 0&&(C.pinchAround=ge.pinchAround),ge.noInertia&&(C.noInertia=ge.noInertia),e.extend(z,ye),e.extend(B,Me)}this._updateMapTransform(C,z,B),this._changes=[]},Li.prototype._updateMapTransform=function(C,z,B){var G=this._map,ie=G.transform;if(!zs(C))return this._fireEvents(z,B);var ue=C.panDelta,ge=C.zoomDelta,ye=C.bearingDelta,Me=C.pitchDelta,je=C.around,We=C.pinchAround;We!==void 0&&(je=We),G._stop(!0),je=je||G.transform.centerPoint;var nt=ie.pointLocation(ue?je.sub(ue):je);ye&&(ie.bearing+=ye),Me&&(ie.pitch+=Me),ge&&(ie.zoom+=ge),ie.setLocationAtPoint(nt,je),this._map._update(),C.noInertia||this._inertia.record(C),this._fireEvents(z,B)},Li.prototype._fireEvents=function(C,z){var B=this,G=as(this._eventsInProgress),ie=as(C),ue={};for(var ge in C){var ye=C[ge].originalEvent;this._eventsInProgress[ge]||(ue[ge+"start"]=ye),this._eventsInProgress[ge]=C[ge]}for(var Me in!G&&ie&&this._fireEvent("movestart",ie.originalEvent),ue)this._fireEvent(Me,ue[Me]);for(var je in C.rotate&&(this._bearingChanged=!0),ie&&this._fireEvent("move",ie.originalEvent),C){var We=C[je].originalEvent;this._fireEvent(je,We)}var nt,bt={};for(var At in this._eventsInProgress){var _t=this._eventsInProgress[At],wt=_t.handlerName,xt=_t.originalEvent;this._handlersById[wt].isActive()||(delete this._eventsInProgress[At],nt=z[wt]||xt,bt[At+"end"]=nt)}for(var Ft in bt)this._fireEvent(Ft,bt[Ft]);var Ot=as(this._eventsInProgress);if((G||ie)&&!Ot){this._updatingCamera=!0;var Nt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),er=function(fr){return fr!==0&&-B._bearingSnap<fr&&fr<B._bearingSnap};Nt?(er(Nt.bearing||this._map.getBearing())&&(Nt.bearing=0),this._map.easeTo(Nt,{originalEvent:nt})):(this._map.fire(new e.Event("moveend",{originalEvent:nt})),er(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},Li.prototype._fireEvent=function(C,z){this._map.fire(new e.Event(C,z?{originalEvent:z}:{}))},Li.prototype._triggerRenderFrame=function(){var C=this;this._frameId===void 0&&(this._frameId=this._map._requestRenderFrame(function(z){delete C._frameId,C.handleEvent(new Qo("renderFrame",{timeStamp:z})),C._applyChanges()}))};var Ds=function(C){function z(B,G){C.call(this),this._moving=!1,this._zooming=!1,this.transform=B,this._bearingSnap=G.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getCenter=function(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)},z.prototype.setCenter=function(B,G){return this.jumpTo({center:B},G)},z.prototype.panBy=function(B,G,ie){return B=e.Point.convert(B).mult(-1),this.panTo(this.transform.center,e.extend({offset:B},G),ie)},z.prototype.panTo=function(B,G,ie){return this.easeTo(e.extend({center:B},G),ie)},z.prototype.getZoom=function(){return this.transform.zoom},z.prototype.setZoom=function(B,G){return this.jumpTo({zoom:B},G),this},z.prototype.zoomTo=function(B,G,ie){return this.easeTo(e.extend({zoom:B},G),ie)},z.prototype.zoomIn=function(B,G){return this.zoomTo(this.getZoom()+1,B,G),this},z.prototype.zoomOut=function(B,G){return this.zoomTo(this.getZoom()-1,B,G),this},z.prototype.getBearing=function(){return this.transform.bearing},z.prototype.setBearing=function(B,G){return this.jumpTo({bearing:B},G),this},z.prototype.getPadding=function(){return this.transform.padding},z.prototype.setPadding=function(B,G){return this.jumpTo({padding:B},G),this},z.prototype.rotateTo=function(B,G,ie){return this.easeTo(e.extend({bearing:B},G),ie)},z.prototype.resetNorth=function(B,G){return this.rotateTo(0,e.extend({duration:1e3},B),G),this},z.prototype.resetNorthPitch=function(B,G){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},B),G),this},z.prototype.snapToNorth=function(B,G){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(B,G):this},z.prototype.getPitch=function(){return this.transform.pitch},z.prototype.setPitch=function(B,G){return this.jumpTo({pitch:B},G),this},z.prototype.cameraForBounds=function(B,G){return B=e.LngLatBounds.convert(B),this._cameraForBoxAndBearing(B.getNorthWest(),B.getSouthEast(),0,G)},z.prototype._cameraForBoxAndBearing=function(B,G,ie,ue){var ge={to
591p:0,bottom:0,right:0,left:0};if(typeof(ue=e.extend({padding:ge,offset:[0,0],maxZoom:this.transform.maxZoom},ue)).padding=="number"){var ye=ue.padding;ue.padding={top:ye,bottom:ye,right:ye,left:ye}}ue.padding=e.extend(ge,ue.padding);var Me=this.transform,je=Me.padding,We=Me.project(e.LngLat.convert(B)),nt=Me.project(e.LngLat.convert(G)),bt=We.rotate(-ie*Math.PI/180),At=nt.rotate(-ie*Math.PI/180),_t=new e.Point(Math.max(bt.x,At.x),Math.max(bt.y,At.y)),wt=new e.Point(Math.min(bt.x,At.x),Math.min(bt.y,At.y)),xt=_t.sub(wt),Ft=(Me.width-(je.left+je.right+ue.padding.left+ue.padding.right))/xt.x,Ot=(Me.height-(je.top+je.bottom+ue.padding.top+ue.padding.bottom))/xt.y;if(!(Ot<0||Ft<0)){var Nt=Math.min(Me.scaleZoom(Me.scale*Math.min(Ft,Ot)),ue.maxZoom),er=e.Point.convert(ue.offset),fr=(ue.padding.left-ue.padding.right)/2,kr=(ue.padding.top-ue.padding.bottom)/2,Tr=new e.Point(er.x+fr,er.y+kr).mult(Me.scale/Me.zoomScale(Nt));return{center:Me.unproject(We.add(nt).div(2).sub(Tr)),zoom:Nt,bearing:ie}}e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},z.prototype.fitBounds=function(B,G,ie){return this._fitInternal(this.cameraForBounds(B,G),G,ie)},z.prototype.fitScreenCoordinates=function(B,G,ie,ue,ge){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(B)),this.transform.pointLocation(e.Point.convert(G)),ie,ue),ue,ge)},z.prototype._fitInternal=function(B,G,ie){return B?(delete(G=e.extend(B,G)).padding,G.linear?this.easeTo(G,ie):this.flyTo(G,ie)):this},z.prototype.jumpTo=function(B,G){this.stop();var ie=this.transform,ue=!1,ge=!1,ye=!1;return"zoom"in B&&ie.zoom!==+B.zoom&&(ue=!0,ie.zoom=+B.zoom),B.center!==void 0&&(ie.center=e.LngLat.convert(B.center)),"bearing"in B&&ie.bearing!==+B.bearing&&(ge=!0,ie.bearing=+B.bearing),"pitch"in B&&ie.pitch!==+B.pitch&&(ye=!0,ie.pitch=+B.pitch),B.padding==null||ie.isPaddingEqual(B.padding)||(ie.padding=B.padding),this.fire(new e.Event("movestart",G)).fire(new e.Event("move",G)),ue&&this.fire(new e.Event("zoomstart",G)).fire(new e.Event("zoom",G)).fire(new e.Event("zoomend",G)),ge&&this.fire(new e.Event("rotatestart",G)).fire(new e.Event("rotate",G)).fire(new e.Event("rotateend",G)),ye&&this.fire(new e.Event("pitchstart",G)).fire(new e.Event("pitch",G)).fire(new e.Event("pitchend",G)),this.fire(new e.Event("moveend",G))},z.prototype.easeTo=function(B,G){var ie=this;this._stop(!1,B.easeId),((B=e.extend({offset:[0,0],duration:500,easing:e.ease},B)).animate===!1||!B.essential&&e.browser.prefersReducedMotion)&&(B.duration=0);var ue=this.transform,ge=this.getZoom(),ye=this.getBearing(),Me=this.getPitch(),je=this.getPadding(),We="zoom"in B?+B.zoom:ge,nt="bearing"in B?this._normalizeBearing(B.bearing,ye):ye,bt="pitch"in B?+B.pitch:Me,At="padding"in B?B.padding:ue.padding,_t=e.Point.convert(B.offset),wt=ue.centerPoint.add(_t),xt=ue.pointLocation(wt),Ft=e.LngLat.convert(B.center||xt);this._normalizeCenter(Ft);var Ot,Nt,er=ue.project(xt),fr=ue.project(Ft).sub(er),kr=ue.zoomScale(We-ge);B.around&&(Ot=e.LngLat.convert(B.around),Nt=ue.locationPoint(Ot));var Tr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||We!==ge,this._rotating=this._rotating||ye!==nt,this._pitching=this._pitching||bt!==Me,this._padding=!ue.isPaddingEqual(At),this._easeId=B.easeId,this._prepareEase(G,B.noMoveStart,Tr),clearTimeout(this._easeEndTimeoutID),this._ease(function(Jr){if(ie._zooming&&(ue.zoom=e.number(ge,We,Jr)),ie._rotating&&(ue.bearing=e.number(ye,nt,Jr)),ie._pitching&&(ue.pitch=e.number(Me,bt,Jr)),ie._padding&&(ue.interpolatePadding(je,At,Jr),wt=ue.centerPoint.add(_t)),Ot)ue.setLocationAtPoint(Ot,Nt);else{var Xr=ue.zoomScale(ue.zoom-ge),hn=We>ge?Math.min(2,kr):Math.max(.5,kr),on=Math.pow(hn,1-Jr),Nn=ue.unproject(er.add(fr.mult(Jr*on)).mult(Xr));ue.setLocationAtPoint(ue.renderWorldCopies?Nn.wrap():Nn,wt)}ie._fireMoveEvents(G)},function(Jr){ie._afterEase(G,Jr)},B),this},z.prototype._prepareEase=function(B,G,ie){ie===void 0&&(ie={}),this._moving=!0,G||ie.moving||this.fire(new e.Event("movestart",B)),this._zooming&&!ie.zooming&&this.fire(new e.Event("zoomstart",B)),this._rotating&&!ie.rotating&&this.fire(new e.Event("rotatestart",B)),this._pitching&&!ie.pitching&&this.fire(new e.Event("pitchstart",B))},z.prototype._fireMoveEvents=function(B){this.fire(new e.Event("move",B)),this._zooming&&this.fire(new e.Event("zoom",B)),this._rotating&&this.fire(new e.Event("rotate",B)),this._pitching&&this.fire(new e.Event("pitch",B))}
vendor: 9,919 bytes, line 591
591,z.prototype._afterEase=function(B,G){if(!this._easeId||!G||this._easeId!==G){delete this._easeId;var ie=this._zooming,ue=this._rotating,ge=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,ie&&this.fire(new e.Event("zoomend",B)),ue&&this.fire(new e.Event("rotateend",B)),ge&&this.fire(new e.Event("pitchend",B)),this.fire(new e.Event("moveend",B))}},z.prototype.flyTo=function(B,G){var ie=this;if(!B.essential&&e.browser.prefersReducedMotion){var ue=e.pick(B,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ue,G)}this.stop(),B=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},B);var ge=this.transform,ye=this.getZoom(),Me=this.getBearing(),je=this.getPitch(),We=this.getPadding(),nt="zoom"in B?e.clamp(+B.zoom,ge.minZoom,ge.maxZoom):ye,bt="bearing"in B?this._normalizeBearing(B.bearing,Me):Me,At="pitch"in B?+B.pitch:je,_t="padding"in B?B.padding:ge.padding,wt=ge.zoomScale(nt-ye),xt=e.Point.convert(B.offset),Ft=ge.centerPoint.add(xt),Ot=ge.pointLocation(Ft),Nt=e.LngLat.convert(B.center||Ot);this._normalizeCenter(Nt);var er=ge.project(Ot),fr=ge.project(Nt).sub(er),kr=B.curve,Tr=Math.max(ge.width,ge.height),Jr=Tr/wt,Xr=fr.mag();if("minZoom"in B){var hn=e.clamp(Math.min(B.minZoom,ye,nt),ge.minZoom,ge.maxZoom),on=Tr/ge.zoomScale(hn-ye);kr=Math.sqrt(on/Xr*2)}var Nn=kr*kr;function Gn(Zn){var ma=(Jr*Jr-Tr*Tr+(Zn?-1:1)*Nn*Nn*Xr*Xr)/(2*(Zn?Jr:Tr)*Nn*Xr);return Math.log(Math.sqrt(ma*ma+1)-ma)}function oa(Zn){return(Math.exp(Zn)-Math.exp(-Zn))/2}function jr(Zn){return(Math.exp(Zn)+Math.exp(-Zn))/2}var Mn=Gn(0),Yn=function(Zn){return jr(Mn)/jr(Mn+kr*Zn)},Vn=function(Zn){return Tr*((jr(Mn)*(oa(ma=Mn+kr*Zn)/jr(ma))-oa(Mn))/Nn)/Xr;var ma},Qn=(Gn(1)-Mn)/kr;if(Math.abs(Xr)<1e-6||!isFinite(Qn)){if(Math.abs(Tr-Jr)<1e-6)return this.easeTo(B,G);var la=Jr<Tr?-1:1;Qn=Math.abs(Math.log(Jr/Tr))/kr,Vn=function(){return 0},Yn=function(Zn){return Math.exp(la*kr*Zn)}}if("duration"in B)B.duration=+B.duration;else{var wa="screenSpeed"in B?+B.screenSpeed/kr:+B.speed;B.duration=1e3*Qn/wa}return B.maxDuration&&B.duration>B.maxDuration&&(B.duration=0),this._zooming=!0,this._rotating=Me!==bt,this._pitching=At!==je,this._padding=!ge.isPaddingEqual(_t),this._prepareEase(G,!1),this._ease(function(Zn){var ma=Zn*Qn,pa=1/Yn(ma);ge.zoom=Zn===1?nt:ye+ge.scaleZoom(pa),ie._rotating&&(ge.bearing=e.number(Me,bt,Zn)),ie._pitching&&(ge.pitch=e.number(je,At,Zn)),ie._padding&&(ge.interpolatePadding(We,_t,Zn),Ft=ge.centerPoint.add(xt));var Aa=Zn===1?Nt:ge.unproject(er.add(fr.mult(Vn(ma))).mult(pa));ge.setLocationAtPoint(ge.renderWorldCopies?Aa.wrap():Aa,Ft),ie._fireMoveEvents(G)},function(){return ie._afterEase(G)},B),this},z.prototype.isEasing=function(){return!!this._easeFrameId},z.prototype.stop=function(){return this._stop()},z.prototype._stop=function(B,G){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var ie=this._onEaseEnd;delete this._onEaseEnd,ie.call(this,G)}if(!B){var ue=this.handlers;ue&&ue.stop()}return this},z.prototype._ease=function(B,G,ie){ie.animate===!1||ie.duration===0?(B(1),G()):(this._easeStart=e.browser.now(),this._easeOptions=ie,this._onEaseFrame=B,this._onEaseEnd=G,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},z.prototype._renderFrameCallback=function(){var B=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(B)),B<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},z.prototype._normalizeBearing=function(B,G){B=e.wrap(B,-180,180);var ie=Math.abs(B-G);return Math.abs(B-360-G)<ie&&(B-=360),Math.abs(B+360-G)<ie&&(B+=360),B},z.prototype._normalizeCenter=function(B){var G=this.transform;if(G.renderWorldCopies&&!G.lngRange){var ie=B.lng-G.center.lng;B.lng+=ie>180?-360:ie<-180?360:0}},z}(e.Evented),Ci=function(C){C===void 0&&(C={}),this.options=C,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Ci.prototype.getDefaultPosition=function(){return"bottom-right"},Ci.prototype.onAdd=function(C){var z=this.options&&this.options.compact;return this._map=C,this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=t.create("div","mapboxgl-ctrl-attrib-inner",this._container),z&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),z===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ci.prototype.onRemove=function(){t.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Ci.prototype._updateEditLink=function(){var C=this._editLink;C||(C=this._editLink=this._container.querySelector(".mapbox-improve-map"));var z=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(C){var B=z.reduce(function(G,ie,ue){return ie.value&&(G+=ie.key+"="+ie.value+(ue<z.length-1?"&":"")),G},"?");C.href=e.config.FEEDBACK_URL+"/"+B+(this._map._hash?this._map._hash.getHashString(!0):""),C.rel="noopener nofollow"}},Ci.prototype._updateData=function(C){!C||C.sourceDataType!=="metadata"&&C.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},Ci.prototype._updateAttributions=function(){if(this._map.style){var C=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?C=C.concat(this.options.customAttribution.map(function(ye){return typeof ye!="string"?"":ye})):typeof this.options.customAttribution=="string"&&C.push(this.options.customAttribution)),this._map.style.stylesheet){var z=this._map.style.stylesheet;this.styleOwner=z.owner,this.styleId=z.id}var B=this._map.style.sourceCaches;for(var G in B){var ie=B[G];if(ie.used){var ue=ie.getSource();ue.attribution&&C.indexOf(ue.attribution)<0&&C.push(ue.attribution)}}C.sort(function(ye,Me){return ye.length-Me.length});var ge=(C=C.filter(function(ye,Me){for(var je=Me+1;je<C.length;je++)if(C[je].indexOf(ye)>=0)return!1;return!0})).join(" | ");ge!==this._attribHTML&&(this._attribHTML=ge,C.length?(this._innerContainer.innerHTML=ge,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ci.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var $o=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};$o.prototype.onAdd=function(C){this._map=C,this._container=t.create("div","mapboxgl-ctrl");var z=t.create("a","mapboxgl-ctrl-logo");return z.target="_blank",z.rel="noopener nofollow",z.href="https://www.mapbox.com/",z.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),z.setAttribute("rel","noopener nofollow"),this._container.appendChild(z),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},$o.prototype.onRemove=function(){t.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},$o.prototype.getDefaultPosition=function(){return"bottom-left"},$o.prototype._updateLogo=function(C){C&&C.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},$o.prototype._logoRequired=function(){if(this._map.style){var C=this._map.style.sourceCaches;for(var z in C)if(C[z].getSource().mapbox_logo)return!0;return!1}},$o.prototype._updateCompact=function(){var C=this._container.children;if(C.length){var z=C[0];this._map.getCanvasContainer().offsetWidth<250?z.classList.add("mapboxgl-compact"):z.classList.remove("mapboxgl-compact")}};var ia=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};ia.prototype.add=function(C){var z=++this._id;return this._queue.push({callback:C,id:z,cancelled:!1}),z},ia.prototype.remove=function(C){for(var z=this._currentlyRunning,B=0,G=z?this._queue.concat(z):this._queue;B<G.length;B+=1){var ie=G[B];if(ie.id===C)return void(ie.cancelled=!0)}},ia.prototype.run=function(C){C===void 0&&(C=0);var z=this._currentlyRunning=this._queue;this._queue=[];for(var B=0,G=z;B<G.length;B+=1){var ie=G[B];if(!ie.cancelled&&(ie.callback(C),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},ia.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var ga={"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},Rs=e.window.HTMLImageElement,Fs=e.window.HTMLElement,es=e.window.ImageBitmap,Ao={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileC
591acheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Uo=function(C){function z(G){var ie=this;if((G=e.extend({},Ao,G)).minZoom!=null&&G.maxZoom!=null&&G.minZoom>G.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(G.minPitch!=null&&G.maxPitch!=null&&G.minPitch>G.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(G.minPitch!=null&&G.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(G.maxPitch!=null&&G.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var ue=new Ht(G.minZoom,G.maxZoom,G.minPitch,G.maxPitch,G.renderWorldCopies);if(C.call(this,ue,G),this._interactive=G.interactive,this._maxTileCacheSize=G.maxTileCacheSize,this._failIfMajorPerformanceCaveat=G.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=G.preserveDrawingBuffer,this._antialias=G.antialias,this._trackResize=G.trackResize,this._bearingSnap=G.bearingSnap,this._refreshExpiredTiles=G.refreshExpiredTiles,this._fadeDuration=G.fadeDuration,this._crossSourceCollisions=G.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=G.collectResourceTiming,this._renderTaskQueue=new ia,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ga,G.locale),this._requestManager=new e.RequestManager(G.transformRequest,G.accessToken),typeof G.container=="string"){if(this._container=e.window.document.getElementById(G.container),!this._container)throw new Error("Container '"+G.container+"' not found.")}else{if(!(G.container instanceof Fs))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=G.container}if(G.maxBounds&&this.setMaxBounds(G.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return ie._update(!1)}),this.on("moveend",function(){return ie._update(!1)}),this.on("zoom",function(){return ie._update(!0)}),e.window!==void 0&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Li(this,G);var ge=typeof G.hash=="string"&&G.hash||void 0;this._hash=G.hash&&new Lr(ge).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:G.center,zoom:G.zoom,bearing:G.bearing,pitch:G.pitch}),G.bounds&&(this.resize(),this.fitBounds(G.bounds,e.extend({},G.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=G.localIdeographFontFamily,G.style&&this.setStyle(G.style,{localIdeographFontFamily:G.localIdeographFontFamily}),G.attributionControl&&this.addControl(new Ci({customAttribution:G.customAttribution})),this.addControl(new $o,G.logoPosition),this.on("style.load",function(){ie.transform.unmodified&&ie.jumpTo(ie.style.stylesheet)}),this.on("data",function(ye){ie._update(ye.dataType==="style"),ie.fire(new e.Event(ye.dataType+"data",ye))}),this.on("dataloading",function(ye){ie.fire(new e.Event(ye.dataType+"dataloading",ye))})}C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z;var B={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return z.prototype._getMapId=function(){return this._mapId},z.prototype.addControl=function(G,ie){if(ie===void 0&&G.getDefaultPosition&&(ie=G.getDefaultPosition()),ie===void 0&&(ie="top-right"),!G||!G.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ue=G.onAdd(this);this._controls.push(G);var ge=this._controlPositions[ie];return ie.indexOf("bottom")!==-1?ge.insertBefore(ue,ge.firstChild):ge.appendChild(ue),this},z.prototype.removeControl=function(G){if(!G||!G.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var ie=this._controls.indexOf(G);return ie>-1&&this._controls.splice(ie,1),G.onRemove(this),this},z.prototype.resize=function(G){var ie=this._containerDimensions(),ue=ie[0],ge=ie[1];this._resizeCanvas(ue,ge),this.transform.resize(ue,ge),this.painter.resize(ue,ge);var ye=!this._moving;return ye&&(this.stop(),this.fire(new e.Event("movestart",G)).fire(new e.Event("move",G))),this.fire(new e.Event("resize",G)),ye&&this.fire(new e.Event("moveend",G)),this},z.prototype.getBounds=function(){return this.transform.getBounds()},z.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},z.prototype.setMaxBounds=function(G){return this.transform.setMaxBounds(e.LngLatBounds.convert(G)),this._update()},z.prototype.setMinZoom=function(G){if((G=G??-2)>=-2&&G<=this.transform.maxZoom)return this.transform.minZoom=G,this._update(),this.getZoom()<G&&this.setZoom(G),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}
591,z.prototype.getMinZoom=function(){return this.transform.minZoom},z.prototype.setMaxZoom=function(G){if((G=G??22)>=this.transform.minZoom)return this.transform.maxZoom=G,this._update(),this.getZoom()>G&&this.setZoom(G),this;throw new Error("maxZoom must be greater than the current minZoom")},z.prototype.getMaxZoom=function(){return this.transform.maxZoom},z.prototype.setMinPitch=function(G){if((G=G??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(G>=0&&G<=this.transform.maxPitch)return this.transform.minPitch=G,this._update(),this.getPitch()<G&&this.setPitch(G),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},z.prototype.getMinPitch=function(){return this.transform.minPitch},z.prototype.setMaxPitch=function(G){if((G=G??60)>60)throw new Error("maxPitch must be less than or equal to 60");if(G>=this.transform.minPitch)return this.transform.maxPitch=G,this._update(),this.getPitch()>G&&this.setPitch(G),this;throw new Error("maxPitch must be greater than the current minPitch")},z.prototype.getMaxPitch=function(){return this.transform.maxPitch},z.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},z.prototype.setRenderWorldCopies=function(G){return this.transform.renderWorldCopies=G,this._update()},z.prototype.project=function(G){return this.transform.locationPoint(e.LngLat.convert(G))},z.prototype.unproject=function(G){return this.transform.pointLocation(e.Point.convert(G))},z.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},z.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},z.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},z.prototype._createDelegatedListener=function(G,ie,ue){var ge,ye=this;if(G==="mouseenter"||G==="mouseover"){var Me=!1;return{layer:ie,listener:ue,delegates:{mousemove:function(We){var nt=ye.getLayer(ie)?ye.queryRenderedFeatures(We.point,{layers:[ie]}):[];nt.length?Me||(Me=!0,ue.call(ye,new Dn(G,ye,We.originalEvent,{features:nt}))):Me=!1},mouseout:function(){Me=!1}}}}if(G==="mouseleave"||G==="mouseout"){var je=!1;return{layer:ie,listener:ue,delegates:{mousemove:function(We){(ye.getLayer(ie)?ye.queryRenderedFeatures(We.point,{layers:[ie]}):[]).length?je=!0:je&&(je=!1,ue.call(ye,new Dn(G,ye,We.originalEvent)))},mouseout:function(We){je&&(je=!1,ue.call(ye,new Dn(G,ye,We.originalEvent)))}}}}return{layer:ie,listener:ue,delegates:(ge={},ge[G]=function(We){var nt=ye.getLayer(ie)?ye.queryRenderedFeatures(We.point,{layers:[ie]}):[];nt.length&&(We.features=nt,ue.call(ye,We),delete We.features)},ge)}},z.prototype.on=function(G,ie,ue){if(ue===void 0)return C.prototype.on.call(this,G,ie);var ge=this._createDelegatedListener(G,ie,ue);for(var ye in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[G]=this._delegatedListeners[G]||[],this._delegatedListeners[G].push(ge),ge.delegates)this.on(ye,ge.delegates[ye]);return this},z.prototype.once=function(G,ie,ue){if(ue===void 0)return C.prototype.once.call(this,G,ie);var ge=this._createDelegatedListener(G,ie,ue);for(var ye in ge.delegates)this.once(ye,ge.delegates[ye]);return this},z.prototype.off=function(G,ie,ue){var ge=this;return ue===void 0?C.prototype.off.call(this,G,ie):(this._delegatedListeners&&this._delegatedListeners[G]&&function(ye){for(var Me=ye[G],je=0;je<Me.length;je++){var We=Me[je];if(We.layer===ie&&We.listener===ue){for(var nt in We.delegates)ge.off(nt,We.delegates[nt]);return Me.splice(je,1),ge}}}(this._delegatedListeners),this)},z.prototype.queryRenderedFeatures=function(G,ie){if(!this.style)return[];var ue;if(ie!==void 0||G===void 0||G instanceof e.Point||Array.isArray(G)||(ie=G,G=void 0),ie=ie||{},(G=G||[[0,0],[this.transform.width,this.transform.height]])instanceof e.Point||typeof G[0]=="number")ue=[e.Point.convert(G)];else{var ge=e.Point.convert(G[0]),ye=e.Point.convert(G[1]);ue=[ge,new e.Point(ye.x,ge.y),ye,new e.Point(ge.x,ye.y),ge]}return this.style.queryRenderedFeatures(ue,ie,this.transform)},z.prototype.querySourceFeatures=function(G,ie){return this.style.querySourceFeatures(G,ie)},z.prototype.setStyle=function(G,ie){return(ie=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},ie)).diff!==!1&&ie.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&G?(this._diffStyle(G,ie),this):(this._localIdeographFontFamily=ie.localIdeographFontFamily,this._updateStyle(G,ie))},z.prototype._getUIString=function(G){var ie=this._locale[G];if(ie==null)throw new Error("Missing UI string '"+G+"'");return ie},z.prototype._updateStyle=function(G,ie){return this.style&&(this.style.setEventedParent(null),this.style._remove()),G?(this.style=new qn(this,ie||{}),this.style.setEventedParent(this,{style:this.style}),typeof G=="string"?this.style.loadURL(G):this.style.loadJSON(G),this):(delete this.style,this)},z.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new qn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},z.prototype._diffStyle=function(G,ie){var ue=this;if(typeof G=="string"){var ge=this._requestManager.normalizeStyleURL(G),ye=this._requestManager.transformRequest(ge,e.ResourceType.Style);e.getJSON(ye,function(Me,je){Me?ue.fire(new e.ErrorEvent(Me)):je&&ue._updateDiff(je,ie)}
591)}else typeof G=="object"&&this._updateDiff(G,ie)},z.prototype._updateDiff=function(G,ie){try{this.style.setState(G)&&this._update(!0)}catch(ue){e.warnOnce("Unable to perform style diff: "+(ue.message||ue.error||ue)+".  Rebuilding the style from scratch."),this._updateStyle(G,ie)}},z.prototype.getStyle=function(){if(this.style)return this.style.serialize()},z.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():e.warnOnce("There is no style added to the map.")},z.prototype.addSource=function(G,ie){return this._lazyInitEmptyStyle(),this.style.addSource(G,ie),this._update(!0)},z.prototype.isSourceLoaded=function(G){var ie=this.style&&this.style.sourceCaches[G];if(ie!==void 0)return ie.loaded();this.fire(new e.ErrorEvent(new Error("There is no source with ID '"+G+"'")))},z.prototype.areTilesLoaded=function(){var G=this.style&&this.style.sourceCaches;for(var ie in G){var ue=G[ie]._tiles;for(var ge in ue){var ye=ue[ge];if(ye.state!=="loaded"&&ye.state!=="errored")return!1}}return!0},z.prototype.addSourceType=function(G,ie,ue){return this._lazyInitEmptyStyle(),this.style.addSourceType(G,ie,ue)},z.prototype.removeSource=function(G){return this.style.removeSource(G),this._update(!0)},z.prototype.getSource=function(G){return this.style.getSource(G)},z.prototype.addImage=function(G,ie,ue){ue===void 0&&(ue={});var ge=ue.pixelRatio;ge===void 0&&(ge=1);var ye=ue.sdf;ye===void 0&&(ye=!1);var Me=ue.stretchX,je=ue.stretchY,We=ue.content;if(this._lazyInitEmptyStyle(),ie instanceof Rs||es&&ie instanceof es){var nt=e.browser.getImageData(ie),bt=nt.width,At=nt.height,_t=nt.data;this.style.addImage(G,{data:new e.RGBAImage({width:bt,height:At},_t),pixelRatio:ge,stretchX:Me,stretchY:je,content:We,sdf:ye,version:0})}else{if(ie.width===void 0||ie.height===void 0)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var wt=ie.width,xt=ie.height,Ft=ie.data,Ot=ie;this.style.addImage(G,{data:new e.RGBAImage({width:wt,height:xt},new Uint8Array(Ft)),pixelRatio:ge,stretchX:Me,stretchY:je,content:We,sdf:ye,version:0,userImage:Ot}),Ot.onAdd&&Ot.onAdd(this,G)}},z.prototype.updateImage=function(G,ie){var ue=this.style.getImage(G);if(!ue)return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var ge=ie instanceof Rs||es&&ie instanceof es?e.browser.getImageData(ie):ie,ye=ge.width,Me=ge.height,je=ge.data;if(ye===void 0||Me===void 0)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ye!==ue.data.width||Me!==ue.data.height)return this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var We=!(ie instanceof Rs||es&&ie instanceof es);ue.data.replace(je,We),this.style.updateImage(G,ue)},z.prototype.hasImage=function(G){return G?!!this.style.getImage(G):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)},z.prototype.removeImage=function(G){this.style.removeImage(G)},z.prototype.loadImage=function(G,ie){e.getImage(this._requestManager.transformRequest(G,e.ResourceType.Image),ie)},z.prototype.listImages=function(){return this.style.listImages()},z.prototype.addLayer=function(G,ie){return this._lazyInitEmptyStyle(),this.style.addLayer(G,ie),this._update(!0)},z.prototype.moveLayer=function(G,ie){return this.style.moveLayer(G,ie),this._update(!0)},z.prototype.removeLayer=function(G){return this.style.removeLayer(G),this._update(!0)},z.prototype.getLayer=function(G){return this.style.getLayer(G)},z.prototype.setLayerZoomRange=function(G,ie,ue){return this.style.setLayerZoomRange(G,ie,ue),this._update(!0)},z.prototype.setFilter=function(G,ie,ue){return ue===void 0&&(ue={}),this.style.setFilter(G,ie,ue),this._update(!0)},z.prototype.getFilter=function(G){return this.style.getFilter(G)},z.prototype.setPaintProperty=function(G,ie,ue,ge){return ge===void 0&&(ge={}),this.style.setPaintProperty(G,ie,ue,ge),this._update(!0)},z.prototype.getPaintProperty=function(G,ie){return this.style.getPaintProperty(G,ie)},z.prototype.setLayoutProperty=function(G,ie,ue,ge){return ge===void 0&&(ge={}),this.style.setLayoutProperty(G,ie,ue,ge),this._update(!0)},z.prototype.getLayoutProperty=function(G,ie){return this.style.getLayoutProperty(G,ie)},z.prototype.setLight=function(G,ie){return ie===void 0&&(ie={}),this._lazyInitEmptyStyle(),this.style.setLight(G,ie),this._update(!0)},z.prototype.getLight=function(){return this.style.getLight()},z.prototype.setFeatureState=function(G,ie){return this.style.setFeatureState(G,ie),this._update()},z.prototype.removeFeatureState=function(G,ie){return this.style.removeFeatureState(G,ie),this._update()},z.prototype.getFeatureState=function(G){return this.style.getFeatureState(G)},z.prototype.getContainer=function(){return this._container},z.prototype.getCanvasContainer=function(){return this._canvasContainer},z.prototype.getCanvas=function(){return this._canvas},z.prototype._containerDimensions=function(){var G=0,ie=0;return this._container&&(G=this._container.clientWidth||400,ie=this._container.clientHeight||300),[G,ie]},z.prototype._detectMissingCSS=function(){e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&e.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described 
591in https://www.mapbox.com/mapbox-gl-js/api/.")},z.prototype._setupContainer=function(){var G=this._container;G.classList.add("mapboxgl-map"),(this._missingCSSCanary=t.create("div","mapboxgl-canary",G)).style.visibility="hidden",this._detectMissingCSS();var ie=this._canvasContainer=t.create("div","mapboxgl-canvas-container",G);this._interactive&&ie.classList.add("mapboxgl-interactive"),this._canvas=t.create("canvas","mapboxgl-canvas",ie),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var ue=this._containerDimensions();this._resizeCanvas(ue[0],ue[1]);var ge=this._controlContainer=t.create("div","mapboxgl-control-container",G),ye=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Me){ye[Me]=t.create("div","mapboxgl-ctrl-"+Me,ge)})},z.prototype._resizeCanvas=function(G,ie){var ue=e.browser.devicePixelRatio||1;this._canvas.width=ue*G,this._canvas.height=ue*ie,this._canvas.style.width=G+"px",this._canvas.style.height=ie+"px"},z.prototype._setupPainter=function(){var G=e.extend({},n.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),ie=this._canvas.getContext("webgl",G)||this._canvas.getContext("experimental-webgl",G);ie?(this.painter=new Ea(ie,this.transform),e.webpSupported.testSupport(ie)):this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")))},z.prototype._contextLost=function(G){G.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:G}))},z.prototype._contextRestored=function(G){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:G}))},z.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},z.prototype._update=function(G){return this.style?(this._styleDirty=this._styleDirty||G,this._sourcesDirty=!0,this.triggerRepaint(),this):this},z.prototype._requestRenderFrame=function(G){return this._update(),this._renderTaskQueue.add(G)},z.prototype._cancelRenderFrame=function(G){this._renderTaskQueue.remove(G)},z.prototype._render=function(G){var ie,ue=this,ge=0,ye=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(ie=ye.createQueryEXT(),ye.beginQueryEXT(ye.TIME_ELAPSED_EXT,ie),ge=e.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(G),!this._removed){var Me=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var je=this.transform.zoom,We=e.browser.now();this.style.zoomHistory.update(je,We);var nt=new e.EvaluationParameters(je,{now:We,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),bt=nt.crossFadingFactor();bt===1&&bt===this._crossFadingFactor||(Me=!0,this._crossFadingFactor=bt),this.style.update(nt)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&(this.style.hasTransitions()||Me)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var At=e.browser.now()-ge;ye.endQueryEXT(ye.TIME_ELAPSED_EXT,ie),setTimeout(function(){var wt=ye.getQueryObjectEXT(ie,ye.QUERY_RESULT_EXT)/1e6;ye.deleteQueryEXT(ie),ue.fire(new e.Event("gpu-timing-frame",{cpuTime:At,gpuTime:wt}))},50)}if(this.listens("gpu-timing-layer")){var _t=this.painter.collectGpuTimers();setTimeout(function(){var wt=ue.painter.queryGpuTimers(_t);ue.fire(new e.Event("gpu-timing-layer",{layerTimes:wt}))},50)}return this._sourcesDirty||this._styleDirty||this._placementDirty||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new e.Event("idle"))),this}},z.prototype.remove=function(){this._hash&&this._hash.remove();for(var G=0,ie=this._controls;G<ie.length;G+=1)ie[G].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),e.window!==void 0&&(e.window.removeEventListener("resize",this._onWindowResize,!1),e.window.removeEventListener("online",this._onWindowOnline,!1));var ue=this.painter.context.gl.getExtension("WEBGL_lose_context");ue&&ue.loseContext(),Js(this._canvasContainer),Js(this._controlContainer),Js(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new e.Event("remove"))},z.prototype.triggerRepaint=function(){var G=this;this.style&&!this._frame&&(this._frame=e.browser.frame(function(ie){G._frame=null,G._render(ie)}))},z.prototype._onWindowOnline=function(){this._update()},z.prototype._onWindowResize=function(G){this._trackResize&&this.resize({originalEvent:G})._update()},B.showTileBoundaries.get=function(){return!!this._showTileBoundaries},B.showTileBoundaries.set=function(G){this._showTileBoundaries!==G&&(this._showTileBoundaries=G,this._update())},B.showPadding.get=function(){return!!this._showPadding},B.showPadding.set=function(G){this._showPadding!==G&&(this._showPadding=G,this._update())},B.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},B.showCollisionBoxes.set=function(G){this._showCollisionBoxes!==G&&(this._showCollisionBoxes=G,G?this.style._generateCollisionBoxes():this._update())},B.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},B.showOverdrawInspector.set=function(G){this._showOverdrawInspector!==G&&(this._showOverdrawInspector=G,this._update())},B.repaint.get=function(){return!!this._repaint},B.repaint.set=function(G){this._repaint!==G&&(this._repaint=G,this.triggerRepaint())},B.vertices.get=function(){return!!this._vertices}
vendor: 12,804 bytes, line 591
591,B.vertices.set=function(G){this._vertices=G,this._update()},z.prototype._setCacheLimits=function(G,ie){e.setCacheLimits(G,ie)},B.version.get=function(){return e.version},Object.defineProperties(z.prototype,B),z}(Ds);function Js(C){C.parentNode&&C.parentNode.removeChild(C)}var Ts={showCompass:!0,showZoom:!0,visualizePitch:!1},qa=function(C){var z=this;this.options=e.extend({},Ts,C),this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(B){return B.preventDefault()}),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(B){return z._map.zoomIn({},{originalEvent:B})}),t.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(B){return z._map.zoomOut({},{originalEvent:B})}),t.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(B){z.options.visualizePitch?z._map.resetNorthPitch({},{originalEvent:B}):z._map.resetNorth({},{originalEvent:B})}),this._compassIcon=t.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};qa.prototype._updateZoomButtons=function(){var C=this._map.getZoom();this._zoomInButton.disabled=C===this._map.getMaxZoom(),this._zoomOutButton.disabled=C===this._map.getMinZoom()},qa.prototype._rotateCompassArrow=function(){var C=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=C},qa.prototype.onAdd=function(C){return this._map=C,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Qa(this._map,this._compass,this.options.visualizePitch)),this._container},qa.prototype.onRemove=function(){t.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},qa.prototype._createButton=function(C,z){var B=t.create("button",C,this._container);return B.type="button",B.addEventListener("click",z),B},qa.prototype._setButtonTitle=function(C,z){var B=this._map._getUIString("NavigationControl."+z);C.title=B,C.setAttribute("aria-label",B)};var Qa=function(C,z,B){B===void 0&&(B=!1),this._clickTolerance=10,this.element=z,this.mouseRotate=new Ta({clickTolerance:C.dragRotate._mouseRotate._clickTolerance}),this.map=C,B&&(this.mousePitch=new fa({clickTolerance:C.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),t.addEventListener(z,"mousedown",this.mousedown),t.addEventListener(z,"touchstart",this.touchstart,{passive:!1}),t.addEventListener(z,"touchmove",this.touchmove),t.addEventListener(z,"touchend",this.touchend),t.addEventListener(z,"touchcancel",this.reset)};function hs(C,z,B){if(C=new e.LngLat(C.lng,C.lat),z){var G=new e.LngLat(C.lng-360,C.lat),ie=new e.LngLat(C.lng+360,C.lat),ue=B.locationPoint(C).distSqr(z);B.locationPoint(G).distSqr(z)<ue?C=G:B.locationPoint(ie).distSqr(z)<ue&&(C=ie)}for(;Math.abs(C.lng-B.center.lng)>180;){var ge=B.locationPoint(C);if(ge.x>=0&&ge.y>=0&&ge.x<=B.width&&ge.y<=B.height)break;C.lng>B.center.lng?C.lng-=360:C.lng+=360}return C}Qa.prototype.down=function(C,z){this.mouseRotate.mousedown(C,z),this.mousePitch&&this.mousePitch.mousedown(C,z),t.disableDrag()},Qa.prototype.move=function(C,z){var B=this.map,G=this.mouseRotate.mousemoveWindow(C,z);if(G&&G.bearingDelta&&B.setBearing(B.getBearing()+G.bearingDelta),this.mousePitch){var ie=this.mousePitch.mousemoveWindow(C,z);ie&&ie.pitchDelta&&B.setPitch(B.getPitch()+ie.pitchDelta)}},Qa.prototype.off=function(){var C=this.element;t.removeEventListener(C,"mousedown",this.mousedown),t.removeEventListener(C,"touchstart",this.touchstart,{passive:!1}),t.removeEventListener(C,"touchmove",this.touchmove),t.removeEventListener(C,"touchend",this.touchend),t.removeEventListener(C,"touchcancel",this.reset),this.offTemp()},Qa.prototype.offTemp=function(){t.enableDrag(),t.removeEventListener(e.window,"mousemove",this.mousemove),t.removeEventListener(e.window,"mouseup",this.mouseup)},Qa.prototype.mousedown=function(C){this.down(e.extend({},C,{ctrlKey:!0,preventDefault:function(){return C.preventDefault()}}),t.mousePos(this.element,C)),t.addEventListener(e.window,"mousemove",this.mousemove),t.addEventListener(e.window,"mouseup",this.mouseup)},Qa.prototype.mousemove=function(C){this.move(C,t.mousePos(this.element,C))},Qa.prototype.mouseup=function(C){this.mouseRotate.mouseupWindow(C),this.mousePitch&&this.mousePitch.mouseupWindow(C),this.offTemp()},Qa.prototype.touchstart=function(C){C.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=t.touchPos(this.element,C.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return C.preventDefault()}},this._startPos))},Qa.prototype.touchmove=function(C){C.targetTouches.length!==1?this.reset():(this._lastPos=t.touchPos(this.element,C.targetTouches)[0],this.move({preventDefault:function(){return C.preventDefault()}},this._lastPos))},Qa.prototype.touchend=function(C){C.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Qa.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var is={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Mi(C,z,B){var G=C.classList;for(var ie in is)G.remove("mapboxgl-"+B+"-anchor-"+ie);G.add("mapboxgl-"+B+"-anchor-"+z)}var ps,ks=function(C){function z(B,G){var ie=this;if(C.call(this),(B instanceof e.window.HTMLElement||G)&&(B=e.extend({element:B},G)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=B&&B.anchor||"center",this._color=B&&B.color||"#3FB1CE",this._draggable=B&&B.draggable||!1,this._state="inactive",this._rotation=B&&B.rotation||0,this._rotationAlignment=B&&B.rotationAlignment||"auto",this._pitchAlignment=B&&B.pitchAlignment&&B.pitchAlignment!=="auto"?B.pitchAlignment:this._rotationAlignment,B&&B.element)this._element=B.element,this._offset=e.Point.convert(B&&B.offset||[0,0]);else{this._defaultMarker=!0,this._element=t.create("div"),this._element.setAttribute("aria-label","Map marker");var ue=t.createNS("http://www.w3.org/2000/svg","svg");ue.setAttributeNS(null,"display","block"),ue.setAttributeNS(null,"height","41px"),ue.setAttributeNS(null,"width","27px"),ue.setAttributeNS(null,"viewBox","0 0 27 41");var ge=t.createNS("http://www.w3.org/2000/svg","g");ge.setAttributeNS(null,"stroke","none"),ge.setAttributeNS(null,"stroke-width","1"),ge.setAttributeNS(null,"fill","none"),ge.setAttributeNS(null,"fill-rule","evenodd");var ye=t.createNS("http://www.w3.org/2000/svg","g");ye.setAttributeNS(null,"fill-rule","nonzero");var Me=t.createNS("http://www.w3.org/2000/svg","g");Me.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Me.setAttributeNS(null,"fill","#000000");for(var je=0,We=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];je<We.length;je+=1){var nt=We[je],bt=t.createNS("http://www.w3.org/2000/svg","ellipse");bt.setAttributeNS(null,"opacity","0.04"),bt.setAttributeNS(null,"cx","10.5"),bt.setAttributeNS(null,"cy","5.80029008"),bt.setAttributeNS(null,"rx",nt.rx),bt.setAttributeNS(null,"ry",nt.ry),Me.appendChild(bt)}var At=t.createNS("http://www.w3.org/2000/svg","g");At.setAttributeNS(null,"fill",this._color);var _t=t.createNS("http://www.w3.org/2000/svg","path");_t.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),At.appendChild(_t);var wt=t.createNS("http://www.w3.org/2000/svg","g");wt.setAttributeNS(null,"opacity","0.25"),wt.setAttributeNS(null,"fill","#000000");var xt=t.createNS("http://www.w3.org/2000/svg","path");xt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),wt.appendChild(xt);var Ft=t.createNS("http://www.w3.org/2000/svg","g");Ft.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ft.setAttributeNS(null,"fill","#FFFFFF");var Ot=t.createNS("http://www.w3.org/2000/svg","g");Ot.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Nt=t.createNS("http://www.w3.org/2000/svg","circle");Nt.setAttributeNS(null,"fill","#000000"),Nt.setAttributeNS(null,"opacity","0.25"),Nt.setAttributeNS(null,"cx","5.5"),Nt.setAttributeNS(null,"cy","5.5"),Nt.setAttributeNS(null,"r","5.4999962");var er=t.createNS("http://www.w3.org/2000/svg","circle");er.setAttributeNS(null,"fill","#FFFFFF"),er.setAttributeNS(null,"cx","5.5"),er.setAttributeNS(null,"cy","5.5"),er.setAttributeNS(null,"r","5.4999962"),Ot.appendChild(Nt),Ot.appendChild(er),ye.appendChild(Me),ye.appendChild(At),ye.appendChild(wt),ye.appendChild(Ft),ye.appendChild(Ot),ue.appendChild(ye),this._element.appendChild(ue),this._offset=e.Point.convert(B&&B.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(fr){fr.preventDefault()}),this._element.addEventListener("mousedown",function(fr){fr.preventDefault()}),this._element.addEventListener("focus",function(){var fr=ie._map.getContainer();fr.scrollTop=0,fr.scrollLeft=0}),Mi(this._element,this._anchor,"marker"),this._popup=null}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.addTo=function(B){return this.remove(),this._map=B,B.getCanvasContainer().appendChild(this._element),B.on("move",this._update),B.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},z.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),t.remove(this._element),this._popup&&this._popup.remove(),this},z.prototype.getLngLat=function(){return this._lngLat},z.prototype.setLngLat=function(B){return this._lngLat=e.LngLat.convert(B),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},z.prototype.getElement=function(){return this._element},z.prototype.setPopup=function(B){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),B){if(!("offset"in B.options)){var G=Math.sqrt(Math.pow(13.5,2)/2);B.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[
5910,-38.1],"bottom-left":[G,-1*(24.6+G)],"bottom-right":[-G,-1*(24.6+G)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=B,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},z.prototype._onKeyPress=function(B){var G=B.code,ie=B.charCode||B.keyCode;G!=="Space"&&G!=="Enter"&&ie!==32&&ie!==13||this.togglePopup()},z.prototype._onMapClick=function(B){var G=B.originalEvent.target,ie=this._element;this._popup&&(G===ie||ie.contains(G))&&this.togglePopup()},z.prototype.getPopup=function(){return this._popup},z.prototype.togglePopup=function(){var B=this._popup;return B?(B.isOpen()?B.remove():B.addTo(this._map),this):this},z.prototype._update=function(B){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=hs(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var G="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?G="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(G="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var ie="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ie="rotateX(0deg)":this._pitchAlignment==="map"&&(ie="rotateX("+this._map.getPitch()+"deg)"),B&&B.type!=="moveend"||(this._pos=this._pos.round()),t.setTransform(this._element,is[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+ie+" "+G)}},z.prototype.getOffset=function(){return this._offset},z.prototype.setOffset=function(B){return this._offset=e.Point.convert(B),this._update(),this},z.prototype._onMove=function(B){this._pos=B.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.Event("dragstart"))),this.fire(new e.Event("drag"))},z.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.Event("dragend")),this._state="inactive"},z.prototype._addDragHandler=function(B){this._element.contains(B.originalEvent.target)&&(B.preventDefault(),this._positionDelta=B.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},z.prototype.setDraggable=function(B){return this._draggable=!!B,this._map&&(B?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},z.prototype.isDraggable=function(){return this._draggable},z.prototype.setRotation=function(B){return this._rotation=B||0,this._update(),this},z.prototype.getRotation=function(){return this._rotation},z.prototype.setRotationAlignment=function(B){return this._rotationAlignment=B||"auto",this._update(),this},z.prototype.getRotationAlignment=function(){return this._rotationAlignment},z.prototype.setPitchAlignment=function(B){return this._pitchAlignment=B&&B!=="auto"?B:this._rotationAlignment,this._update(),this},z.prototype.getPitchAlignment=function(){return this._pitchAlignment},z}(e.Evented),vs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ms=0,os=!1,Ks=function(C){function z(B){C.call(this),this.options=e.extend({},vs,B),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.onAdd=function(B){var G;return this._map=B,this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),G=this._setupUI,ps!==void 0?G(ps):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(ie){ps=ie.state!=="denied",G(ps)}):(ps=!!e.window.navigator.geolocation,G(ps)),this._container},z.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),t.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ms=0,os=!1},z.prototype._isOutOfMapMaxBounds=function(B){var G=this._map.getMaxBounds(),ie=B.coords;return G&&(ie.longitude<G.getWest()||ie.longitude>G.getEast()||ie.latitude<G.getSouth()||ie.latitude>G.getNorth())},z.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
591RROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},z.prototype._onSuccess=function(B){if(this._map){if(this._isOutOfMapMaxBounds(B))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",B)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=B,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(B),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(B),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",B)),this._finish()}},z.prototype._updateCamera=function(B){var G=new e.LngLat(B.coords.longitude,B.coords.latitude),ie=B.coords.accuracy,ue=this._map.getBearing(),ge=e.extend({bearing:ue},this.options.fitBoundsOptions);this._map.fitBounds(G.toBounds(ie),ge,{geolocateSource:!0})},z.prototype._updateMarker=function(B){if(B){var G=new e.LngLat(B.coords.longitude,B.coords.latitude);this._accuracyCircleMarker.setLngLat(G).addTo(this._map),this._userLocationDotMarker.setLngLat(G).addTo(this._map),this._accuracy=B.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},z.prototype._updateCircleRadius=function(){var B=this._map._container.clientHeight/2,G=this._map.unproject([0,B]),ie=this._map.unproject([1,B]),ue=G.distanceTo(ie),ge=Math.ceil(2*this._accuracy/ue);this._circleElement.style.width=ge+"px",this._circleElement.style.height=ge+"px"},z.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},z.prototype._onError=function(B){if(this._map){if(this.options.trackUserLocation)if(B.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var G=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=G,this._geolocateButton.setAttribute("aria-label",G),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(B.code===3&&os)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",B)),this._finish()}},z.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},z.prototype._setupUI=function(B){var G=this;if(this._container.addEventListener("contextmenu",function(ge){return ge.preventDefault()}),this._geolocateButton=t.create("button","mapboxgl-ctrl-geolocate",this._container),t.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",B===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie)}else{var ue=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ue,this._geolocateButton.setAttribute("aria-label",ue)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
591se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=t.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new ks(this._dotElement),this._circleElement=t.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ks({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ge){var ye=ge.originalEvent&&ge.originalEvent.type==="resize";ge.geolocateSource||G._watchState!=="ACTIVE_LOCK"||ye||(G._watchState="BACKGROUND",G._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),G._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),G.fire(new e.Event("trackuserlocationend")))})},z.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ms--,os=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var B;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Ms>1?(B={maximumAge:6e5,timeout:0},os=!0):(B=this.options.positionOptions,os=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,B)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},z.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},z}(e.Evented),ol={maxWidth:100,unit:"metric"},ds=function(C){this.options=e.extend({},ol,C),e.bindAll(["_onMove","setUnit"],this)};function Qs(C,z,B){var G=B&&B.maxWidth||100,ie=C._container.clientHeight/2,ue=C.unproject([0,ie]),ge=C.unproject([G,ie]),ye=ue.distanceTo(ge);if(B&&B.unit==="imperial"){var Me=3.2808*ye;Me>5280?As(z,G,Me/5280,C._getUIString("ScaleControl.Miles")):As(z,G,Me,C._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?As(z,G,ye/1852,C._getUIString("ScaleControl.NauticalMiles")):ye>
vendor: 1,049 bytes, line 591
591=1e3?As(z,G,ye/1e3,C._getUIString("ScaleControl.Kilometers")):As(z,G,ye,C._getUIString("ScaleControl.Meters"))}function As(C,z,B,G){var ie,ue,ge,ye=(ie=B,ue=Math.pow(10,(""+Math.floor(ie)).length-1),ge=(ge=ie/ue)>=10?10:ge>=5?5:ge>=3?3:ge>=2?2:ge>=1?1:function(je){var We=Math.pow(10,Math.ceil(-Math.log(je)/Math.LN10));return Math.round(je*We)/We}(ge),ue*ge),Me=ye/B;C.style.width=z*Me+"px",C.innerHTML=ye+"&nbsp;"+G}ds.prototype.getDefaultPosition=function(){return"bottom-left"},ds.prototype._onMove=function(){Qs(this._map,this._container,this.options)},ds.prototype.onAdd=function(C){return this._map=C,this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",C.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ds.prototype.onRemove=function(){t.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ds.prototype.setUnit=function(C){this.options.unit=C,Qs(this._map,this._container,this.options)};var Qi=function(C){this._fullscreen=!1,C&&C.container&&(C.container instanceof e.
vendor: 6,171 bytes, line 591
591window.HTMLElement?this._container=C.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};Qi.prototype.onAdd=function(C){return this._map=C,this._container||(this._container=this._map.getContainer()),this._controlContainer=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Qi.prototype.onRemove=function(){t.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Qi.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Qi.prototype._setupUI=function(){var C=this._fullscreenButton=t.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);t.create("span","mapboxgl-ctrl-icon",C).setAttribute("aria-hidden",!0),C.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Qi.prototype._updateTitle=function(){var C=this._getTitle();this._fullscreenButton.setAttribute("aria-label",C),this._fullscreenButton.title=C},Qi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Qi.prototype._isFullscreen=function(){return this._fullscreen},Qi.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Qi.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var sl={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},ll=function(C){function z(B){C.call(this),this.options=e.extend(Object.create(sl),B),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.addTo=function(B){return this._map&&this.remove(),this._map=B,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},z.prototype.isOpen=function(){return!!this._map},z.prototype.remove=function(){return this._content&&t.remove(this._content),this._container&&(t.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},z.prototype.getLngLat=function(){return this._lngLat},z.prototype.setLngLat=function(B){return this._lngLat=e.LngLat.convert(B),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},z.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},z.prototype.getElement=function(){return this._container},z.prototype.setText=function(B){return this.setDOMContent(e.window.document.createTextNode(B))},z.prototype.setHTML=function(B){var G,ie=e.window.document.createDocumentFragment(),ue=e.window.document.createElement("body");for(ue.innerHTML=B;G=ue.firstChild;)ie.appendChild(G);return this.setDOMContent(ie)},z.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},z.prototype.setMaxWidth=function(B){return this.options.maxWidth=B,this._update(),this},z.prototype.setDOMContent=function(B){return this._createContent(),this._content.appendChild(B),this._update(),this},z.prototype.addClassName=function(B){this._container&&this._container.classList.add(B)},z.prototype.removeClassName=function(B){this._container&&this._container.classList.remove(B
591)},z.prototype.toggleClassName=function(B){if(this._container)return this._container.classList.toggle(B)},z.prototype._createContent=function(){this._content&&t.remove(this._content),this._content=t.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=t.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},z.prototype._onMouseUp=function(B){this._update(B.point)},z.prototype._onMouseMove=function(B){this._update(B.point)},z.prototype._onDrag=function(B){this._update(B.point)},z.prototype._update=function(B){var G=this,ie=this._lngLat||this._trackPointer;if(this._map&&ie&&this._content&&(this._container||(this._container=t.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=t.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(bt){return G._container.classList.add(bt)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=hs(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||B)){var ue=this._pos=this._trackPointer&&B?B:this._map.project(this._lngLat),ge=this.options.anchor,ye=function bt(At){if(At){if(typeof At=="number"){var _t=Math.round(Math.sqrt(.5*Math.pow(At,2)));return{center:new e.Point(0,0),top:new e.Point(0,At),"top-left":new e.Point(_t,_t),"top-right":new e.Point(-_t,_t),bottom:new e.Point(0,-At),"bottom-left":new e.Point(_t,-_t),"bottom-right":new e.Point(-_t,-_t),left:new e.Point(At,0),right:new e.Point(-At,0)}}if(At instanceof e.Point||Array.isArray(At)){var wt=e.Point.convert(At);return{center:wt,top:wt,"top-left":wt,"top-right":wt,bottom:wt,"bottom-left":wt,"bottom-right":wt,left:wt,right:wt}}return{center:e.Point.convert(At.center||[0,0]),top:e.Point.convert(At.top||[0,0]),"top-left":e.Point.convert(At["top-left"]||[0,0]),"top-right":e.Point.convert(At["top-right"]||[0,0]),bottom:e.Point.convert(At.bottom||[0,0]),"bottom-left":e.Point.convert(At["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(At["bottom-right"]||[0,0]),left:e.Point.convert(At.left||[0,0]),right:e.Point.convert(At.right||[0,0])}}return bt(new e.Point(0,0))}(this.options.offset);if(!ge){var Me,je=this._container.offsetWidth,We=this._container.offsetHeight;Me=ue.y+ye.bottom.y<We?["top"]:ue.y>this._map.transform.height-We?["bottom"]:[],ue.x<je/2?Me.push("left"):ue.x>this._map.transform.width-je/2&&Me.push("right"),ge=Me.length===0?"bottom":Me.join("-")}var nt=ue.add(ye[ge]).round();t.setTransform(this._container,is[ge]+" translate("+nt.x+"px,"+nt.y+"px)"),Mi(this._container,ge,"popup")}},z.prototype._onClose=function(){this.remove()},z}(e.Evented),le={version:e.version,supported:n,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Uo,NavigationControl:qa,GeolocateControl:Ks,AttributionControl:Ci,ScaleControl:ds,FullscreenControl:Qi,Popup:ll,Marker:ks,Style:qn,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:function(){Ze().acquire(kt)},clearPrewarmedResources:function(){var C=Lt;C&&(C.isPreloaded()&&C.numActive()===1?(C.release(kt),Lt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(C){e.config.ACCESS_TOKEN=C},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(C){e.config.API_URL=C},get workerCount(){return ot.workerCount},set workerCount(C){ot.workerCount=C},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(C){e.config.MAX_PARALLEL_IMAGE_REQUESTS=C},clearStorage:function(C){e.clearTileCache(C)},workerUrl:""};return le}),b})},{}],240:[function(y,ee,te){ee.exports=Math.log2||function(g){return Math.log(g)*Math.LOG2E}},{}],241:[function(y,ee,te){ee.exports=function(m,b){b||(b=m,m=window);var v=0,e=0,n=0,t={shift:!1,alt:!1,control:!1,meta:!1},o=!1;function r(x){var l=!1;return"altKey"in x&&(l=l||x.altKey!==t.alt,t.alt=!!x.altKey),"shiftKey"in x&&(l=l||x.shiftKey!==t.shift,t.shift=!!x.shiftKey),"ctrlKey"in x&&(l=l||x.ctrlKey!==t.control,t.control=!!x.ctrlKey),"metaKey"in x&&(l=l||x.metaKey!==t.meta,t.meta=!!x.metaKey),l}function d(x,l){var w=g.x(l),_=g.y(l);"buttons"in l&&(x=0|l.buttons),(x!==v||w!==e||_!==n||r(l))&&(v=0|x,e=w||0,n=_||0,b&&b(v,e,n,t))}function c(x){d(0,x)}function i(){(v||e||n||t.shift||t.alt||t.meta||t.control)&&(e=n=0,v=0,t.shift=t.alt=t.control=t.meta=!1,b&&b(0,0,0,t))}function u(x){r(x)&&b&&b(v,e,n,t)}function f(x){g.buttons(x)===0?d(0,x):d(v,x)}function s(x){d(v|g.buttons(x),x)}function h(x){d(v&~g.buttons(x),x)}function p(){o||(o=!0,m.addEventListener("mousemove",f),m.addEventListener("mousedown",s),m.addEventListener("mouseup",h),m.addEventListener("mouseleave",c),m.addEventListener("mouseenter",c),m.addEventListener("mouseout",c),m.addEventListener("mouseover",c),m.addEventListener("blur",i),m.addEventListener("keyup",u),m.addEventListener("keydown",u),m.addEventListener("keypress",u),m!==window&&(window.addEventListener("blur",i),window.addEventListener("keyup",u),window.addEventListener("keydown",u),window.addEventListener("keypress",u)))}p();var a={element:m};return Object.defineProperties(a,{enabled:{get:function(){return o}
591,set:function(x){x?p():function(){o&&(o=!1,m.removeEventListener("mousemove",f),m.removeEventListener("mousedown",s),m.removeEventListener("mouseup",h),m.removeEventListener("mouseleave",c),m.removeEventListener("mouseenter",c),m.removeEventListener("mouseout",c),m.removeEventListener("mouseover",c),m.removeEventListener("blur",i),m.removeEventListener("keyup",u),m.removeEventListener("keydown",u),m.removeEventListener("keypress",u),m!==window&&(window.removeEventListener("blur",i),window.removeEventListener("keyup",u),window.removeEventListener("keydown",u),window.removeEventListener("keypress",u)))}()},enumerable:!0},buttons:{get:function(){return v},enumerable:!0},x:{get:function(){return e},enumerable:!0},y:{get:function(){return n},enumerable:!0},mods:{get:function(){return t},enumerable:!0}}),a};var g=y("mouse-event")},{"mouse-event":243}],242:[function(y,ee,te){var g={left:0,top:0};ee.exports=function(m,b,v){b=b||m.currentTarget||m.srcElement,Array.isArray(v)||(v=[0,0]);var e=m.clientX||0,n=m.clientY||0,t=(o=b,o===window||o===document||o===document.body?g:o.getBoundingClientRect()),o;return v[0]=e-t.left,v[1]=n-t.top,v}},{}],243:[function(y,ee,te){function g(m){return m.target||m.srcElement||window}te.buttons=function(m){if(typeof m=="object"){if("buttons"in m)return m.buttons;if("which"in m){if((b=m.which)===2)return 4;if(b===3)return 2;if(b>0)return 1<<b-1}else if("button"in m){var b;if((b=m.button)===1)return 4;if(b===2)return 2;if(b>=0)return 1<<b}}return 0},te.element=g,te.x=function(m){if(typeof m=="object"){if("offsetX"in m)return m.offsetX;var b=g(m).getBoundingClientRect();return m.clientX-b.left}return 0},te.y=function(m){if(typeof m=="object"){if("offsetY"in m)return m.offsetY;var b=g(m).getBoundingClientRect();return m.clientY-b.top}return 0}},{}],244:[function(y,ee,te){var g=y("to-px");ee.exports=function(m,b,v){typeof m=="function"&&(v=!!b,b=m,m=window);var e=g("ex",m),n=function(t){v&&t.preventDefault();var o=t.deltaX||0,r=t.deltaY||0,d=t.deltaZ||0,c=1;switch(t.deltaMode){case 1:c=e;break;case 2:c=window.innerHeight}if(r*=c,d*=c,(o*=c)||r||d)return b(o,r,d,t)};return m.addEventListener("wheel",n),n}},{"to-px":314}],245:[function(y,ee,te){(function(g,m){(function(){/*! Native Promise Only
592    v0.8.1 (c) Kyle Simpson
593    MIT License: http://getify.mit-license.org
594*/(function(b,v,e){v[b]=v[b]||e(),ee!==void 0&&ee.exports&&(ee.exports=v[b])})("Promise",g!==void 0?g:this,function(){var b,v,e,n=Object.prototype.toString,t=m!==void 0?function(x){return m(x)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(x,l,w,_){return Object.defineProperty(x,l,{value:w,writable:!0,configurable:_!==!1})}}catch{b=function(l,w,_){return l[w]=_,l}}function o(x,l){e.add(x,l),v||(v=t(e.drain))}function r(x){var l,w=typeof x;return x==null||w!="object"&&w!="function"||(l=x.then),typeof l=="function"&&l}function d(){for(var x=0;x<this.chain.length;x++)c(this,this.state===1?this.chain[x].success:this.chain[x].failure,this.chain[x]);this.chain.length=0}function c(x,l,w){var _,T;try{l===!1?w.reject(x.msg):(_=l===!0?x.msg:l.call(void 0,x.msg))===w.promise?w.reject(TypeError("Promise-chain cycle")):(T=r(_))?T.call(_,w.resolve,w.reject):w.resolve(_)}catch(k){w.reject(k)}}function i(x){var l,w=this;if(!w.triggered){w.triggered=!0,w.def&&(w=w.def);try{(l=r(x))?o(function(){var _=new s(w);try{l.call(x,function(){i.apply(_,arguments)},function(){u.apply(_,arguments)})}catch(T){u.call(_,T)}}):(w.msg=x,w.state=1,w.chain.length>0&&o(d,w))}catch(_){u.call(new s(w),_)}}}function u(x){var l=this;l.triggered||(l.triggered=!0,l.def&&(l=l.def),l.msg=x,l.state=2,l.chain.length>0&&o(d,l))}function f(x,l,w,_){for(var T=0;T<l.length;T++)(function(k){x.resolve(l[k]).then(function(L){w(k,L)},_)})(T)}function s(x){this.def=x,this.triggered=!1}function h(x){this.promise=x,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(x){if(typeof x!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var l=new h(this);this.then=function(w,_){var T={success:typeof w!="function"||w,failure:typeof _=="function"&&_};
594return T.promise=new this.constructor(function(k,L){if(typeof k!="function"||typeof L!="function")throw TypeError("Not a function");T.resolve=k,T.reject=L}),l.chain.push(T),l.state!==0&&o(d,l),T.promise},this.catch=function(w){return this.then(void 0,w)};try{x.call(void 0,function(w){i.call(l,w)},function(w){u.call(l,w)})}catch(w){u.call(l,w)}}e=function(){var x,l,w;function _(T,k){this.fn=T,this.self=k,this.next=void 0}return{add:function(T,k){w=new _(T,k),l?l.next=w:x=w,l=w,w=void 0},drain:function(){var T=x;for(x=l=v=void 0;T;)T.fn.call(T.self),T=T.next}}}();var a=b({},"constructor",p,!1);return p.prototype=a,b(a,"__NPO__",0,!1),b(p,"resolve",function(x){return x&&typeof x=="object"&&x.__NPO__===1?x:new this(function(l,w){if(typeof l!="function"||typeof w!="function")throw TypeError("Not a function");l(x)})}),b(p,"reject",function(x){return new this(function(l,w){if(typeof l!="function"||typeof w!="function")throw TypeError("Not a function");w(x)})}),b(p,"all",function(x){var l=this;return n.call(x)!="[object Array]"?l.reject(TypeError("Not an array")):x.length===0?l.resolve([]):new l(function(w,_){if(typeof w!="function"||typeof _!="function")throw TypeError("Not a function");var T=x.length,k=Array(T),L=0;f(l,x,function(A,I){k[A]=I,++L===T&&w(k)},_)})}),b(p,"race",function(x){var l=this;return n.call(x)!="[object Array]"?l.reject(TypeError("Not an array")):new l(function(w,_){if(typeof w!="function"||typeof _!="function")throw TypeError("Not a function");f(l,x,function(T,k){w(k)},_)})}),p})}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{},y("timers").setImmediate)},{timers:311}],246:[function(y,ee,te){var g=Math.PI,m=t(120);function b(o,r,d,c){return["C",o,r,d,c,d,c]}function v(o,r,d,c,i,u){return["C",o/3+2/3*d,r/3+2/3*c,i/3+2/3*d,u/3+2/3*c,i,u]}function e(o,r,d,c,i,u,f,s,h,p){if(p)I=p[0],P=p[1],L=p[2],A=p[3];else{var a=n(o,r,-i);o=a.x,r=a.y;var x=(o-(s=(a=n(s,h,-i)).x))/2,l=(r-(h=a.y))/2,w=x*x/(d*d)+l*l/(c*c);w>1&&(d*=w=Math.sqrt(w),c*=w);var _=d*d,T=c*c,k=(u==f?-1:1)*Math.sqrt(Math.abs((_*T-_*l*l-T*x*x)/(_*l*l+T*x*x)));k==1/0&&(k=1);var L=k*d*l/c+(o+s)/2,A=k*-c*x/d+(r+h)/2,I=Math.asin(((r-A)/c).toFixed(9)),P=Math.asin(((h-A)/c).toFixed(9));(I=o<L?g-I:I)<0&&(I=2*g+I),(P=s<L?g-P:P)<0&&(P=2*g+P),f&&I>P&&(I-=2*g),!f&&P>I&&(P-=2*g)}if(Math.abs(P-I)>m){var S=P,E=s,D=h;P=I+m*(f&&P>I?1:-1);var F=e(s=L+d*Math.cos(P),h=A+c*Math.sin(P),d,c,i,0,f,E,D,[P,S,L,A])}var H=Math.tan((P-I)/4),V=4/3*d*H,Z=4/3*c*H,K=[2*o-(o+V*Math.sin(I)),2*r-(r-Z*Math.cos(I)),s+V*Math.sin(P),h-Z*Math.cos(P),s,h];if(p)return K;F&&(K=K.concat(F));for(var q=0;q<K.length;){var W=n(K[q],K[q+1],i);K[q++]=W.x,K[q++]=W.y}return K}function n(o,r,d){return{x:o*Math.cos(d)-r*Math.sin(d),y:o*Math.sin(d)+r*Math.cos(d)}}function t(o){return o*(g/180)}ee.exports=function(o){for(var r,d=[],c=0,i=0,u=0,f=0,s=null,h=null,p=0,a=0,x=0,l=o.length;x<l;x++){var w=o[x],_=w[0];switch(_){case"M":u=w[1],f=w[2];break;case"A":(w=e(p,a,w[1],w[2],t(w[3]),w[4],w[5],w[6],w[7])).unshift("C"),w.length>7&&(d.push(w.splice(0,7)),w.unshift("C"));break;case"S":var T=p,k=a;r!="C"&&r!="S"||(T+=T-c,k+=k-i),w=["C",T,k,w[1],w[2],w[3],w[4]];break;case"T":r=="Q"||r=="T"?(s=2*p-s,h=2*a-h):(s=p,h=a),w=v(p,a,s,h,w[1],w[2]);break;case"Q":s=w[1],h=w[2],w=v(p,a,w[1],w[2],w[3],w[4]);break;case"L":w=b(p,a,w[1],w[2]);break;case"H":w=b(p,a,w[1],a);break;case"V":w=b(p,a,p,w[1]);break;case"Z":w=b(p,a,u,f)}r=_,p=w[w.length-2],a=w[w.length-1],w.length>4?(c=w[w.length-4],i=w[w.length-3]):(c=p,i=a),d.push(w)}return d}},{}],247:[function(y,ee,te){var g=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;function v(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}ee.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if(Object.getOwnPropertyNames(n).map(function(r){return n[r]}).join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(r){o[r]=r}
594),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(e,n){for(var t,o,r=v(e),d=1;d<arguments.length;d++){for(var c in t=Object(arguments[d]))m.call(t,c)&&(r[c]=t[c]);if(g){o=g(t);for(var i=0;i<o.length;i++)b.call(t,o[i])&&(r[o[i]]=t[o[i]])}}return r}},{}],248:[function(y,ee,te){function g(v,e){if(typeof v!="string")return[v];var n=[v];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var t=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",r=!!e.flat;t.forEach(function(c){var i=new RegExp(["\\",c[0],"[^\\",c[0],"\\",c[1],"]*\\",c[1]].join("")),u=[];function f(s,h,p){var a=n.push(s.slice(c[0].length,-c[1].length))-1;return u.push(a),o+a+o}n.forEach(function(s,h){for(var p,a=0;s!=p;)if(p=s,s=s.replace(i,f),a++>1e4)throw Error("References have circular dependency. Please, check them.");n[h]=s}),u=u.reverse(),n=n.map(function(s){return u.forEach(function(h){s=s.replace(new RegExp("(\\"+o+h+"\\"+o+")","g"),c[0]+"$1"+c[1])}),s})});var d=new RegExp("\\"+o+"([0-9]+)\\"+o);return r?n:function c(i,u,f){for(var s,h=[],p=0;s=d.exec(i);){if(p++>1e4)throw Error("Circular references in parenthesis");h.push(i.slice(0,s.index)),h.push(c(u[s[1]],u)),i=i.slice(s.index+s[0].length)}return h.push(i),h}(n[0],n)}function m(v,e){if(e&&e.flat){var n,t=e&&e.escape||"___",o=v[0];if(!o)return"";for(var r=new RegExp("\\"+t+"([0-9]+)\\"+t),d=0;o!=n;){if(d++>1e4)throw Error("Circular references in "+v);n=o,o=o.replace(r,c)}return o}return v.reduce(function i(u,f){return Array.isArray(f)&&(f=f.reduce(i,"")),u+f},"");function c(i,u){if(v[u]==null)throw Error("Reference "+u+"is undefined");return v[u]}}function b(v,e){return Array.isArray(v)?m(v,e):g(v,e)}b.parse=g,b.stringify=m,ee.exports=b},{}],249:[function(y,ee,te){var g=y("pick-by-alias");ee.exports=function(m){var b;return arguments.length>1&&(m=arguments),typeof m=="string"?m=m.split(/\s/).map(parseFloat):typeof m=="number"&&(m=[m]),m.length&&typeof m[0]=="number"?b=m.length===1?{width:m[0],height:m[0],x:0,y:0}:m.length===2?{width:m[0],height:m[1],x:0,y:0}:{x:m[0],y:m[1],width:m[2]-m[0]||0,height:m[3]-m[1]||0}:m&&(m=g(m,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),b={x:m.left||0,y:m.top||0},m.width==null?m.right?b.width=m.right-b.x:b.width=0:b.width=m.width,m.height==null?m.bottom?b.height=m.bottom-b.y:b.height=0:b.height=m.height),b}},{"pick-by-alias":253}],250:[function(y,ee,te){ee.exports=function(v){var e=[];return v.replace(m,function(n,t,o){var r=t.toLowerCase();for(o=function(d){var c=d.match(b);return c?c.map(Number):[]}(o),r=="m"&&o.length>2&&(e.push([t].concat(o.splice(0,2))),r="l",t=t=="m"?"l":"L");;){if(o.length==g[r])return o.unshift(t),e.push(o);if(o.length<g[r])throw new Error("malformed path data");e.push([t].concat(o.splice(0,g[r])))}}),e};var g={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},m=/([astvzqmhlc])([^astvzqmhlc]*)/gi,b=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},{}],251:[function(y,ee,te){ee.exports=function(g,m){m||(m=[0,""]),g=String(g);var b=parseFloat(g,10);return m[0]=b,m[1]=g.match(/[\d.\-\+]*\s*(.*)/)[1]||"",m}},{}],252:[function(y,ee,te){(function(g){(function(){(function(){var m,b,v,e,n,t;typeof performance<"u"&&performance!==null&&performance.now?ee.exports=function(){return performance.now()}:g!=null&&g.hrtime?(ee.exports=function(){return(m()-n)/1e6},b=g.hrtime,e=(m=function(){var o;return 1e9*(o=b())[0]+o[1]})(),t=1e9*g.uptime(),n=e-t):Date.now?(ee.exports=function(){return Date.now()-v},v=Date.now()):(ee.exports=function(){return new Date().getTime()-v},v=new Date().getTime())}).call(this)}).call(this)}).call(this,y("_process"))},{_process:277}],253:[function(y,ee,te){ee.exports=function(b,v,e){var n,t,o={};if(typeof v=="string"&&(v=m(v)),Array.isArray(v)){var r={};for(t=0;t<v.length;t++)r[v[t]]=!0;v=r}for(n in v)v[n]=m(v[n]);var d={};for(n in v){var c=v[n];if(Array.isArray(c))for(t=0;t<c.length;t++){var i=c[t];if(e&&(d[i]=!0),i in b){if(o[n]=b[i],e)for(var u=t;u<c.length;u++)d[c[u]]=!0;break}}
594else n in b&&(v[n]&&(o[n]=b[n]),e&&(d[n]=!0))}if(e)for(n in b)d[n]||(o[n]=b[n]);return o};var g={};function m(b){return g[b]?g[b]:(typeof b=="string"&&(b=g[b]=b.split(/\s*,\s*|\s+/)),b)}},{}],254:[function(y,ee,te){/*
595 * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
596 * @license MIT
597 * @preserve Project Home: https://github.com/voidqk/polybooljs
598 */var g,m=y("./lib/build-log"),b=y("./lib/epsilon"),v=y("./lib/intersecter"),e=y("./lib/segment-chainer"),n=y("./lib/segment-selector"),t=y("./lib/geojson"),o=!1,r=b();function d(c,i,u){var f=g.segments(c),s=g.segments(i),h=u(g.combine(f,s));return g.polygon(h)}g={buildLog:function(c){return c===!0?o=m():c===!1&&(o=!1),o!==!1&&o.list},epsilon:function(c){return r.epsilon(c)},segments:function(c){var i=v(!0,r,o);return c.regions.forEach(i.addRegion),{segments:i.calculate(c.inverted),inverted:c.inverted}},combine:function(c,i){return{combined:v(!1,r,o).calculate(c.segments,c.inverted,i.segments,i.inverted),inverted1:c.inverted,inverted2:i.inverted}},selectUnion:function(c){return{segments:n.union(c.combined,o),inverted:c.inverted1||c.inverted2}},selectIntersect:function(c){return{segments:n.intersect(c.combined,o),inverted:c.inverted1&&c.inverted2}},selectDifference:function(c){return{segments:n.difference(c.combined,o),inverted:c.inverted1&&!c.inverted2}},selectDifferenceRev:function(c){return{segments:n.differenceRev(c.combined,o),inverted:!c.inverted1&&c.inverted2}},selectXor:function(c){return{segments:n.xor(c.combined,o),inverted:c.inverted1!==c.inverted2}},polygon:function(c){return{regions:e(c.segments,r,o),inverted:c.inverted}},polygonFromGeoJSON:function(c){return t.toPolygon(g,c)},polygonToGeoJSON:function(c){return t.fromPolygon(g,r,c)},union:function(c,i){return d(c,i,g.selectUnion)},intersect:function(c,i){return d(c,i,g.selectIntersect)},difference:function(c,i){return d(c,i,g.selectDifference)},differenceRev:function(c,i){return d(c,i,g.selectDifferenceRev)},xor:function(c,i){return d(c,i,g.selectXor)}},typeof window=="object"&&(window.PolyBool=g),ee.exports=g},{"./lib/build-log":255,"./lib/epsilon":256,"./lib/geojson":257,"./lib/intersecter":258,"./lib/segment-chainer":260,"./lib/segment-selector":261}],255:[function(y,ee,te){ee.exports=function(){var g,m=0,b=!1;function v(e,n){return g.list.push({type:e,data:n?JSON.parse(JSON.stringify(n)):void 0}),g}return g={list:[],segmentId:function(){return m++},checkIntersection:function(e,n){return v("check",{seg1:e,seg2:n})},segmentChop:function(e,n){return v("div_seg",{seg:e,pt:n}),v("chop",{seg:e,pt:n})},statusRemove:function(e){return v("pop_seg",{seg:e})},segmentUpdate:function(e){return v("seg_update",{seg:e})},segmentNew:function(e,n){return v("new_seg",{seg:e,primary:n})},segmentRemove:function(e){return v("rem_seg",{seg:e})},tempStatus:function(e,n,t){return v("temp_status",{seg:e,above:n,below:t})},rewind:function(e){return v("rewind",{seg:e})},status:function(e,n,t){return v("status",{seg:e,above:n,below:t})},vert:function(e){return e===b?g:(b=e,v("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1,"  ")),v("log",{txt:e})},reset:function(){return v("reset")},selected:function(e){return v("selected",{segs:e})},chainStart:function(e){return v("chain_start",{seg:e})},chainRemoveHead:function(e,n){return v("chain_rem_head",{index:e,pt:n})},chainRemoveTail:function(e,n){return v("chain_rem_tail",{index:e,pt:n})},chainNew:function(e,n){return v("chain_new",{pt1:e,pt2:n})},chainMatch:function(e){return v("chain_match",{index:e})},chainClose:function(e){return v("chain_close",{index:e})},chainAddHead:function(e,n){return v("chain_add_head",{index:e,pt:n})},chainAddTail:function(e,n){return v("chain_add_tail",{index:e,pt:n})},chainConnect:function(e,n){return v("chain_con",{index1:e,index2:n})},chainReverse:function(e){return v("chain_rev",{index:e})},chainJoin:function(e,n){return v("chain_join",{index1:e,index2:n})},done:function(){return v("done")}}}},{}],256:[function(y,ee,te){ee.exports=function(g){typeof g!="number"&&(g=1e-10);var m={epsilon:function(b){return typeof b=="number"&&(g=b),g},pointAboveOrOnLine:function(b,v,e){var n=v[0],t=v[1],o=e[0],r=e[1],d=b[0];return(o-n)*(b[1]-t)-(r-t)*(d-n)>=-g},pointBetween:function(b,v,e){var n=b[1]-v[1],t=e[0]-v[0],o=b[0]-v[0],r=e[1]-v[1],d=o*t+n*r;return!(d<g)&&!(d-(t*t+r*r)>-g)},pointsSameX:function(b,v){return Math.abs(b[0]-v[0])<g},pointsSameY:function(b,v){return Math.abs(b[1]-v[1])<g},pointsSame:function(b,v){return m.pointsSameX(b,v)&&m.pointsSameY(b,v)},pointsCompare:function(b,v){return m.pointsSameX(b,v)?m.pointsSameY(b,v)?0:b[1]<v[1]?-1:1:b[0]<v[0]?-1:1},pointsCollinear:function(b,v,e){var n=b[0]-v[0],t=b[1]-v[1],o=v[0]-e[0],r=v[1]-e[1];return Math.abs(n*r-o*t)<g},linesIntersect:function(b,v,e,n){var t=v[0]-b[0],o=v[1]-b[1],r=n[0]-e[0],d=n[1]-e[1],c=t*d-o*r;if(Math.abs(c)<g)return!1;var i=b[0]-e[0],u=b[1]-e[1],f=(r*u-d*i)/c,s=(t*u-o*i)/c,h={alongA:0,alongB:0,pt:[b[0]+f*t,b[1]+f*o]};return h.alongA=f<=-g?-2:f<g?-1:f-1<=-g?0:f-1<g?1:2,h.alongB=s<=-g?-2:s<g?-1:s-1<=-g?0:s-1<g?1:2,h},pointInsideRegion:function(b,v){for(var e=b[0],n=b[1],t=v[v.length-1][0],o=v[v.length-1][1],r=!1,d=0;d<v.length;d++){var c=v[d][0],i=v[d][1];i-n>g!=o-n>g&&(t-c)*(n-i)/(o-i)+c-e>g&&(r=!r),t=c,o=i}return r}};return m}},{}],257:[function(y,ee,te){var g={toPolygon:function(m,b){function v(t){if(t.length<=0)return m.segments({inverted:!1,regions:[]});function o(c){var i=c.slice(0,c.length-1);return m.segments({inverted:!1,regions:[i]})}for(var r=o(t[0]),d=1;d<t.length;d++)r=m.selectDifference(m.combine(r,o(t[d])));return r}if(b.type==="Polygon")return m.polygon(v(b.coordinates));if(b.type==="MultiPolygon"){for(var e=m.segments({inverted:!1,regions:[]}),n=0;n<b.coordinates.length;n++)e=m.selectUnion(m.combine(e,v(b.coordinates[n])));return m.polygon(e)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(m,b,v){function e(s,h){return b.pointInsideRegion([.5*(s[0][0]+s[1][0]),.5*(s[0][1]+s[1][1])],h)}function n(s){return{region:s,children:[]}}v=m.polygon(m.segments(v));var t=n(null);function o(s,h){for(var p=0;p<s.children.length;p++)if(e(h,(x=s.children[p]).region))return void o(x,h);var a=n(h);for(p=0;p<s.children.length;p++){var x;e((x=s.children[p]).region,h)&&(a.children.push(x),s.children.splice(p,1),p--)}s.children.push(a)}for(var r=0;r<v.regions.length;r++){var d=v.regions[r];d.length<3||o(t,d)}function c(s,h){for(var p=0,a=s[s.length-1][0],x=s[s.length-1][1],l=[],w=0;w<s.length;w++){var _=s[w][0],T=s[w][1];l.push([_,T]),p+=T*a-_*x,a=_,x=T}return p<0!==h&&l.reverse(),l.push([l[0][0],l[0][1]]),l}var i=[];function u(s){var h=[c(s.region,!1)];i.push(h);for(var p=0;p<s.children.length;p++)h.push(f(s.children[p]))}function f(s){for(var h=0;h<s.children.length;h++)u(s.children[h]);return c(s.region,!0)}for(r=0;r<t.children.length;r++)u(t.children[r]);return i.length<=0?{type:"Polygon",coordinates:[]}:i.length==1?{type:"Polygon",coordinates:i[0]}:{type:"MultiPolygon",coordinates:i}}};ee.exports=g},{}],258:[function(y,ee,te){var g=y("./linked-list");ee.exports=function(m,b,v){function e(c,i,u){return{id:v?v.segmentId():-1,start:c,end:i,myFill:{above:u.myFill.above,below:u.myFill.below},otherFill:null}}var n=g.create();function t(c,i){n.insertBefore(c,function(u){return function(f,s,h,p,a,x){var l=b.pointsCompare(s,a);return l!==0?l:b.pointsSame(h,x)?0:f!==p?f?1:-1:b.pointAboveOrOnLine(h,p?a:x,p?x:a)?1:-1}(c.isStart,c.pt,i,u.isStart,u.pt,u.other.pt)<0})}function o(c,i){var u=function(f,s){var h=g.node({isStart:!0,pt:f.start,seg:f,primary:s,other:null,status:null});return t(h,f.end),h}(c,i);return function(f,s,h){var p=g.node({isStart:!1,pt:s.end,seg:s,primary:h,other:f,status:null});f.other=p,t(p,f.pt)}(u,c,i),u}function r(c,i){var u=e(i,c.seg.end,c.seg);return function(f,s){v&&v.segmentChop(f.seg,s),f.other.remove(),f.seg.end=s,f.other.pt=s,t(f.other,f.pt)}(c,i),o(u,c.primary)}function d(c,i){var u=g.create();function f(A){return u.findTransition(function(I){var P,S,E,D,F,H;return P=A,S=I.ev,E=P.seg.start,D=P.seg.end,F=S.seg.start,H=S.seg.end,(b.pointsCollinear(E,F,H)?b.pointsCollinear(D,F,H)||b.pointAboveOrOnLine(D,F,H)?1:-1:b.pointAboveOrOnLine(E,F,H)?1:-1)>0})}function s(A,I){var P=A.seg,S=I.seg,E=P.start,D=P.end,F=S.start,H=S.end;v&&v.checkIntersection(P,S);var V=b.linesIntersect(E,D,F,H);if(V===!1){if(!b.pointsCollinear(E,D,F)||b.pointsSame(E,H)||b.pointsSame(D,F))return!1;var Z=b.pointsSame(E,F),K=b.pointsSame(D,H);if(Z&&K)return I;var q=!Z&&b.pointBetween(E,F,H),W=!K&&b.pointBetween(D,F,H);if(Z)return W?r(I,D):r(A,H),I;q&&(K||(W?r(I,D):r(A,H)),r(I,E))}else V.alongA===0&&(V.alongB===-1?r(A,F):V.alongB===0?r(A,V.pt):V.alongB===1&&r(A,H)),V.alongB===0&&(V.alongA===-1?r(I,E):V.alongA===0?r(I,V.pt):V.alongA===1&&r(I,D));return!1}for(var h=[];!n.isEmpty();){var p=n.getHead();if(v&&v.vert(p.pt[0]),p.isStart){let A=function(){if(x){var I=s(p,x);
598if(I)return I}return!!l&&s(p,l)};v&&v.segmentNew(p.seg,p.primary);var a=f(p),x=a.before?a.before.ev:null,l=a.after?a.after.ev:null;v&&v.tempStatus(p.seg,!!x&&x.seg,!!l&&l.seg);var w,_=A();if(_){var T;m?(T=p.seg.myFill.below===null||p.seg.myFill.above!==p.seg.myFill.below)&&(_.seg.myFill.above=!_.seg.myFill.above):_.seg.otherFill=p.seg.myFill,v&&v.segmentUpdate(_.seg),p.other.remove(),p.remove()}if(n.getHead()!==p){v&&v.rewind(p.seg);continue}m?(T=p.seg.myFill.below===null||p.seg.myFill.above!==p.seg.myFill.below,p.seg.myFill.below=l?l.seg.myFill.above:c,p.seg.myFill.above=T?!p.seg.myFill.below:p.seg.myFill.below):p.seg.otherFill===null&&(w=l?p.primary===l.primary?l.seg.otherFill.above:l.seg.myFill.above:p.primary?i:c,p.seg.otherFill={above:w,below:w}),v&&v.status(p.seg,!!x&&x.seg,!!l&&l.seg),p.other.status=a.insert(g.node({ev:p}))}else{var k=p.status;if(k===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(u.exists(k.prev)&&u.exists(k.next)&&s(k.prev.ev,k.next.ev),v&&v.statusRemove(k.ev.seg),k.remove(),!p.primary){var L=p.seg.myFill;p.seg.myFill=p.seg.otherFill,p.seg.otherFill=L}h.push(p.seg)}n.getHead().remove()}return v&&v.done(),h}return m?{addRegion:function(c){for(var i,u,f,s=c[c.length-1],h=0;h<c.length;h++){i=s,s=c[h];var p=b.pointsCompare(i,s);p!==0&&o((u=p<0?i:s,f=p<0?s:i,{id:v?v.segmentId():-1,start:u,end:f,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(c){return d(c,!1)}}:{calculate:function(c,i,u,f){return c.forEach(function(s){o(e(s.start,s.end,s),!0)}),u.forEach(function(s){o(e(s.start,s.end,s),!1)}),d(i,f)}}}},{"./linked-list":259}],259:[function(y,ee,te){ee.exports={create:function(){var g={root:{root:!0,next:null},exists:function(m){return m!==null&&m!==g.root},isEmpty:function(){return g.root.next===null},getHead:function(){return g.root.next},insertBefore:function(m,b){for(var v=g.root,e=g.root.next;e!==null;){if(b(e))return m.prev=e.prev,m.next=e,e.prev.next=m,void(e.prev=m);v=e,e=e.next}v.next=m,m.prev=v,m.next=null},findTransition:function(m){for(var b=g.root,v=g.root.next;v!==null&&!m(v);)b=v,v=v.next;return{before:b===g.root?null:b,after:v,insert:function(e){return e.prev=b,e.next=v,b.next=e,v!==null&&(v.prev=e),e}}}};return g},node:function(g){return g.prev=null,g.next=null,g.remove=function(){g.prev.next=g.next,g.next&&(g.next.prev=g.prev),g.prev=null,g.next=null},g}}},{}],260:[function(y,ee,te){ee.exports=function(g,m,b){var v=[],e=[];return g.forEach(function(n){var t=n.start,o=n.end;if(m.pointsSame(t,o))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{b&&b.chainStart(n);for(var r={index:0,matches_head:!1,matches_pt1:!1},d={index:0,matches_head:!1,matches_pt1:!1},c=r,i=0;i<v.length;i++){var u=(a=v[i])[0],f=(a[1],a[a.length-1]);if(a[a.length-2],m.pointsSame(u,t)){if(A(i,!0,!0))break}else if(m.pointsSame(u,o)){if(A(i,!0,!1))break}else if(m.pointsSame(f,t)){if(A(i,!1,!0))break}else if(m.pointsSame(f,o)&&A(i,!1,!1))break}if(c===r)return v.push([t,o]),void(b&&b.chainNew(t,o));if(c===d){b&&b.chainMatch(r.index);var s=r.index,h=r.matches_pt1?o:t,p=r.matches_head,a=v[s],x=p?a[0]:a[a.length-1],l=p?a[1]:a[a.length-2],w=p?a[a.length-1]:a[0],_=p?a[a.length-2]:a[1];return m.pointsCollinear(l,x,h)&&(p?(b&&b.chainRemoveHead(r.index,h),a.shift()):(b&&b.chainRemoveTail(r.index,h),a.pop()),x=l),m.pointsSame(w,h)?(v.splice(s,1),m.pointsCollinear(_,w,x)&&(p?(b&&b.chainRemoveTail(r.index,x),a.pop()):(b&&b.chainRemoveHead(r.index,x),a.shift())),b&&b.chainClose(r.index),void e.push(a)):void(p?(b&&b.chainAddHead(r.index,h),a.unshift(h)):(b&&b.chainAddTail(r.index,h),a.push(h)))}var T=r.index,k=d.index;b&&b.chainConnect(T,k);var L=v[T].length<v[k].length;r.matches_head?d.matches_head?L?(I(T),P(T,k)):(I(k),P(k,T)):P(k,T):d.matches_head?P(T,k):L?(I(T),P(k,T)):(I(k),P(T,k))}function A(S,E,D){return c.index=S,c.matches_head=E,c.matches_pt1=D,c===r?(c=d,!1):(c=null,!0)}function I(S){b&&b.chainReverse(S),v[S].reverse()}function P(S,E){var D=v[S],F=v[E],H=D[D.length-1],V=D[D.length-2],Z=F[0],K=F[1];m.pointsCollinear(V,H,Z)&&(b&&b.chainRemoveTail(S,H),D.pop(),H=V),m.pointsCollinear(H,Z,K)&&(b&&b.chainRemoveHead(E,Z),F.shift()),b&&b.chainJoin(S,E),v[S]=D.concat(F),v.splice(E,1)}}),e}},{}],261:[function(y,ee,te){function g(b,v,e){var n=[];return b.forEach(function(t){var o=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);v[o]!==0&&n.push({id:e?e.segmentId():-1,start:t.start,end:t.end,myFill:{above:v[o]===1,below:v[o]===2},otherFill:null})}),e&&e.selected(n),n}var m={union:function(b,v){return g(b,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],v)},intersect:function(b,v){return g(b,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],v)},difference:function(b,v){return g(b,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],v)},differenceRev:function(b,v){return g(b,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],v)},xor:function(b,v){return g(b,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],v)}};ee.exports=m},{}],262:[function(y,ee,te){var g=y("stream").Transform,m=y("stream-parser");function b(){g.call(this,{readableObjectMode:!0})}function v(e,n,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=e,n&&(this.code=n),t&&(this.statusCode=t)}b.prototype=Object.create(g.prototype),b.prototype.constructor=b,m(b.prototype),te.ParserStream=b,te.sliceEq=function(e,n,t){for(var o=n,r=0;r<t.length;)if(e[o++]!==t[r++])return!1;return!0},te.str2arr=function(e,n){var t=[],o=0;if(n&&n==="hex")for(;o<e.length;)t.push(parseInt(e.slice(o,o+2),16)),o+=2;else for(;o<e.length;o++)t.push(255&e.charCodeAt(o));return t},te.readUInt16LE=function(e,n){return e[n]|e[n+1]<<8},te.readUInt16BE=function(e,n){return e[n+1]|e[n]<<8},te.readUInt32LE=function(e,n){return e[n]|e[n+1]<<8|e[n+2]<<16|16777216*e[n+3]},te.readUInt32BE=function(e,n){return e[n+3]|e[n+2]<<8|e[n+1]<<16|16777216*e[n]},v.prototype=Object.create(Error.prototype),v.prototype.constructor=v,te.ProbeError=v},{stream:285,"stream-parser":301}],263:[function(y,ee,te){function g(v,e){var n=new Error(v);return n.code=e,n}function m(v){try{return decodeURIComponent(escape(v))}catch{return v}}function b(v,e,n){this.input=v.subarray(e,n),this.start=e;var t=String.fromCharCode.apply(null,this.input.subarray(0,4));if(t!=="II*\0"&&t!=="MM\0*")throw g("invalid TIFF signature","EBADDATA");this.big_endian=t[0]==="M"}b.prototype.each=function(v){this.aborted=!1;var e=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:e}];this.ifds_to_read.length>0&&!this.aborted;){var n=this.ifds_to_read.shift();n.offset&&this.scan_ifd(n.id,n.offset,v)}},b.prototype.read_uint16=function(v){var e=this.input;if(v+2>e.length)throw g("unexpected EOF","EBADDATA");return this.big_endian?256*e[v]+e[v+1]:e[v]+256*e[v+1]},b.prototype.read_uint32=function(v){var e=this.input;if(v+4>e.length)throw g("unexpected EOF","EBADDATA");return this.big_endian?16777216*e[v]+65536*e[v+1]+256*e[v+2]+e[v+3]:e[v]+256*e[v+1]+65536*e[v+2]+16777216*e[v+3]}
598,b.prototype.is_subifd_link=function(v,e){return v===0&&e===34665||v===0&&e===34853||v===34665&&e===40965},b.prototype.exif_format_length=function(v){switch(v){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},b.prototype.exif_format_read=function(v,e){var n;switch(v){case 1:case 2:return n=this.input[e];case 6:return(n=this.input[e])|33554430*(128&n);case 3:return n=this.read_uint16(e);case 8:return(n=this.read_uint16(e))|131070*(32768&n);case 4:return n=this.read_uint32(e);case 9:return 0|(n=this.read_uint32(e));case 5:case 10:case 11:case 12:case 7:default:return null}},b.prototype.scan_ifd=function(v,e,n){var t=this.read_uint16(e);e+=2;for(var o=0;o<t;o++){var r=this.read_uint16(e),d=this.read_uint16(e+2),c=this.read_uint32(e+4),i=this.exif_format_length(d),u=c*i,f=u<=4?e+8:this.read_uint32(e+8),s=!1;if(f+u>this.input.length)throw g("unexpected EOF","EBADDATA");for(var h=[],p=f,a=0;a<c;a++,p+=i){var x=this.exif_format_read(d,p);if(x===null){h=null;break}h.push(x)}if(Array.isArray(h)&&d===2&&(h=m(String.fromCharCode.apply(null,h)))&&h[h.length-1]==="\0"&&(h=h.slice(0,-1)),this.is_subifd_link(v,r)&&Array.isArray(h)&&Number.isInteger(h[0])&&h[0]>0&&(this.ifds_to_read.push({id:r,offset:h[0]}),s=!0),n({is_big_endian:this.big_endian,ifd:v,tag:r,format:d,count:c,entry_offset:e+this.start,data_length:u,data_offset:f+this.start,value:h,is_subifd_link:s})===!1)return void(this.aborted=!0);e+=12}v===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},ee.exports.ExifParser=b,ee.exports.get_orientation=function(v){var e=0;try{return new b(v,0,v.length).each(function(n){if(n.ifd===0&&n.tag===274&&Array.isArray(n.value))return e=n.value[0],!1}),e}catch{return-1}}},{}],264:[function(y,ee,te){var g=y("./common").readUInt16BE,m=y("./common").readUInt32BE;function b(r,d){if(r.length<4+d)return null;var c=m(r,d);return r.length<c+d||c<8?null:{boxtype:String.fromCharCode.apply(null,r.slice(d+4,d+8)),data:r.slice(d+8,d+c),end:d+c}}function v(r,d){for(var c=0;;){var i=b(r,c);if(!i)break;switch(i.boxtype){case"ispe":d.sizes.push({width:m(i.data,4),height:m(i.data,8)});break;case"irot":d.transforms.push({type:"irot",value:3&i.data[0]});break;case"imir":d.transforms.push({type:"imir",value:1&i.data[0]})}c=i.end}}function e(r,d,c){for(var i=0,u=0;u<c;u++)i=256*i+(r[d+u]||0);return i}function n(r,d){for(var c=r[4]>>4&15,i=15&r[4],u=r[5]>>4&15,f=g(r,6),s=8,h=0;h<f;h++){var p=g(r,s),a=g(r,s+=2),x=e(r,s+=2,u),l=g(r,s+=u);if(s+=2,a===0&&l===1){var w=e(r,s,c),_=e(r,s+c,i);d.item_loc[p]={length:_,offset:w+x}}s+=l*(c+i)}}function t(r,d){for(var c=g(r,4),i=6,u=0;u<c;u++){var f=b(r,i);if(!f)break;if(f.boxtype==="infe"){for(var s=g(f.data,4),h="",p=8;p<f.data.length&&f.data[p];p++)h+=String.fromCharCode(f.data[p]);d.item_inf[h]=s}i=f.end}}function o(r,d){for(var c=0;;){var i=b(r,c);if(!i)break;i.boxtype==="ipco"&&v(i.data,d),c=i.end}}ee.exports.unbox=b,ee.exports.readSizeFromMeta=function(r){var d={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(function(p,a){for(var x=4;;){var l=b(p,x);if(!l)break;l.boxtype==="iprp"&&o(l.data,a),l.boxtype==="iloc"&&n(l.data,a),l.boxtype==="iinf"&&t(l.data,a),x=l.end}}(r,d),d.sizes.length){var c,i,u,f=(c=d.sizes,i=c.reduce(function(p,a){return p.width>a.width||p.width===a.width&&p.height>a.height?p:a}),u=c.reduce(function(p,a){return p.height>a.height||p.height===a.height&&p.width>a.width?p:a}),i.width>u.height||i.width===u.height&&i.height>u.width?i:u),s=1;
598d.transforms.forEach(function(p){var a={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},x={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(p.type==="imir"&&(s=p.value===0?x[s]:a[s=a[s=x[s]]]),p.type==="irot")for(var l=0;l<p.value;l++)s=a[s]});var h=null;return d.item_inf.Exif&&(h=d.item_loc[d.item_inf.Exif]),{width:f.width,height:f.height,orientation:d.transforms.length?s:null,variants:d.sizes,exif_location:h}}},ee.exports.getMimeType=function(r){var d=String.fromCharCode.apply(null,r.slice(0,4)),c={};c[d]=!0;for(var i=8;i<r.length;i+=4)c[String.fromCharCode.apply(null,r.slice(i,i+4))]=!0;if(c.mif1||c.msf1||c.miaf)return d==="avif"||d==="avis"||d==="avio"?{type:"avif",mime:"image/avif"}:d==="heic"||d==="heix"?{type:"heic",mime:"image/heic"}:d==="hevc"||d==="hevx"?{type:"heic",mime:"image/heic-sequence"}:c.avif||c.avis?{type:"avif",mime:"image/avif"}:c.heic||c.heix||c.hevc||c.hevx||c.heis?c.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}},{"./common":262}],265:[function(y,ee,te){var g=y("../common").str2arr,m=y("../common").sliceEq,b=y("../common").readUInt32BE,v=y("../miaf_utils"),e=y("../exif_utils"),n=g("ftyp");ee.exports=function(t){if(m(t,4,n)){var o=v.unbox(t,0);if(o){var r=v.getMimeType(o.data);if(r){for(var d,c=o.end;;){var i=v.unbox(t,c);if(!i)break;if(c=i.end,i.boxtype==="mdat")return;if(i.boxtype==="meta"){d=i.data;break}}if(d){var u=v.readSizeFromMeta(d);if(u){var f={width:u.width,height:u.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(u.variants.length>1&&(f.variants=u.variants),u.orientation&&(f.orientation=u.orientation),u.exif_location&&u.exif_location.offset+u.exif_location.length<=t.length){var s=b(t,u.exif_location.offset),h=t.slice(u.exif_location.offset+s+4,u.exif_location.offset+u.exif_location.length),p=e.get_orientation(h);p>0&&(f.orientation=p)}return f}}}}}}},{"../common":262,"../exif_utils":263,"../miaf_utils":264}],266:[function(y,ee,te){var g=y("../common").str2arr,m=y("../common").sliceEq,b=y("../common").readUInt16LE,v=g("BM");ee.exports=function(e){if(!(e.length<26)&&m(e,0,v))return{width:b(e,18),height:b(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},{"../common":262}],267:[function(y,ee,te){var g=y("../common").str2arr,m=y("../common").sliceEq,b=y("../common").readUInt16LE,v=g("GIF87a"),e=g("GIF89a");ee.exports=function(n){if(!(n.length<10)&&(m(n,0,v)||m(n,0,e)))return{width:b(n,6),height:b(n,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},{"../common":262}],268:[function(y,ee,te){var g=y("../common").readUInt16LE;ee.exports=function(m){var b=g(m,0),v=g(m,2),e=g(m,4);if(b===0&&v===1&&e){for(var n=[],t={width:0,height:0},o=0;o<e;o++){var r=m[6+16*o]||256,d=m[6+16*o+1]||256,c={width:r,height:d};n.push(c),(r>t.width||d>t.height)&&(t=c)}return{width:t.width,height:t.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},{"../common":262}],269:[function(y,ee,te){var g=y("../common").readUInt16BE,m=y("../common").str2arr,b=y("../common").sliceEq,v=y("../exif_utils"),e=m("Exif\0\0");ee.exports=function(n){if(!(n.length<2)&&n[0]===255&&n[1]===216&&n[2]===255)for(var t=2;;){for(;;){if(n.length-t<2)return;if(n[t++]===255)break}for(var o,r,d=n[t++];d===255;)d=n[t++];if(208<=d&&d<=217||d===1)o=0;else{if(!(192<=d&&d<=254)||n.length-t<2)return;o=g(n,t)-2,t+=2}if(d===217||d===218)return;if(d===225&&o>=10&&b(n,t,e)&&(r=v.get_orientation(n.slice(t+6,t+o))),o>=5&&192<=d&&d<=207&&d!==196&&d!==200&&d!==204){if(n.length-t<o)return;var c={width:g(n,t+3),height:g(n,t+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return r>0&&(c.orientation=r),c}t+=o}}},{"../common":262,"../exif_utils":263}],270:[function(y,ee,te){var g=y("../common").str2arr,m=y("../common").sliceEq,b=y("../common").readUInt32BE,v=g(`‰PNG\r
599�
600`),e=g("IHDR");ee.exports=function(n){if(!(n.length<24)&&m(n,0,v)&&m(n,12,e))return{width:b(n,16),height:b(n,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},{"../common":262}],271:[function(y,ee,te){var g=y("../common").str2arr,m=y("../common").sliceEq,b=y("../common").readUInt32BE,v=g("8BPS\0�");ee.exports=function(e){if(!(e.length<22)&&m(e,0,v))return{width:b(e,18),height:b(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},{"../common":262}],272:[function(y,ee,te){function g(r){return typeof r=="number"&&isFinite(r)&&r>0}var m=/<[-_.:a-zA-Z0-9][^>]*>/,b=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,v=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,e=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,n=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,t=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function o(r){return t.test(r)?r.match(t)[0]:"px"}ee.exports=function(r){if(function(w){var _,T=0,k=w.length;for(w[0]===239&&w[1]===187&&w[2]===191&&(T=3);T<k&&((_=w[T])===32||_===9||_===13||_===10);)T++;return T!==k&&w[T]===60}(r)){for(var d="",c=0;c<r.length;c++)d+=String.fromCharCode(r[c]);var i=(d.match(m)||[""])[0];if(b.test(i)){var u=function(w){var _=w.match(v),T=w.match(e),k=w.match(n);return{width:_&&(_[1]||_[2]),height:T&&(T[1]||T[2]),viewbox:k&&(k[1]||k[2])}}(i),f=parseFloat(u.width),s=parseFloat(u.height);if(u.width&&u.height)return!g(f)||!g(s)?void 0:{width:f,height:s,type:"svg",mime:"image/svg+xml",wUnits:o(u.width),hUnits:o(u.height)};var h=(u.viewbox||"").split(" "),p={width:h[2],height:h[3]},a=parseFloat(p.width),x=parseFloat(p.height);
600if(g(a)&&g(x)&&o(p.width)===o(p.height)){var l=a/x;return u.width?g(f)?{width:f,height:f/l,type:"svg",mime:"image/svg+xml",wUnits:o(u.width),hUnits:o(u.width)}:void 0:u.height?g(s)?{width:s*l,height:s,type:"svg",mime:"image/svg+xml",wUnits:o(u.height),hUnits:o(u.height)}:void 0:{width:a,height:x,type:"svg",mime:"image/svg+xml",wUnits:o(p.width),hUnits:o(p.height)}}}}}},{}],273:[function(y,ee,te){var g=y("../common").str2arr,m=y("../common").sliceEq,b=y("../common").readUInt16LE,v=y("../common").readUInt16BE,e=y("../common").readUInt32LE,n=y("../common").readUInt32BE,t=g("II*\0"),o=g("MM\0*");function r(i,u,f){return f?v(i,u):b(i,u)}function d(i,u,f){return f?n(i,u):e(i,u)}function c(i,u,f){var s=r(i,u+2,f);return d(i,u+4,f)!==1||s!==3&&s!==4?null:s===3?r(i,u+8,f):d(i,u+8,f)}ee.exports=function(i){if(!(i.length<8)&&(m(i,0,t)||m(i,0,o))){var u=i[0]===77,f=d(i,4,u)-8;if(!(f<0)){var s=f+8;if(!(i.length-s<2)){var h=12*r(i,s+0,u);if(!(h<=0||(s+=2,i.length-s<h))){var p,a,x,l;for(p=0;p<h;p+=12)(l=r(i,s+p,u))===256?a=c(i,s+p,u):l===257&&(x=c(i,s+p,u));return a&&x?{width:a,height:x,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}:void 0}}}}}},{"../common":262}],274:[function(y,ee,te){var g=y("../common").str2arr,m=y("../common").sliceEq,b=y("../common").readUInt16LE,v=y("../common").readUInt32LE,e=y("../exif_utils"),n=g("RIFF"),t=g("WEBP");function o(c,i){if(c[i+3]===157&&c[i+4]===1&&c[i+5]===42)return{width:16383&b(c,i+6),height:16383&b(c,i+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function r(c,i){if(c[i]===47){var u=v(c,i+1);return{width:1+(16383&u),height:1+(u>>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function d(c,i){return{width:1+(c[i+6]<<16|c[i+5]<<8|c[i+4]),height:1+(c[i+9]<<i|c[i+8]<<8|c[i+7]),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}ee.exports=function(c){if(!(c.length<16)&&(m(c,0,n)||m(c,8,t))){var i=12,u=null,f=0,s=v(c,4)+8;if(!(s>c.length)){for(;i+8<s;)if(c[i]!==0){var h=String.fromCharCode.apply(null,c.slice(i,i+4)),p=v(c,i+4);h==="VP8 "&&p>=10?u=u||o(c,i+8):h==="VP8L"&&p>=9?u=u||r(c,i+8):h==="VP8X"&&p>=10?u=u||d(c,i+8):h==="EXIF"&&(f=e.get_orientation(c.slice(i+8,i+8+p)),i=1/0),i+=8+p}else i++;if(u)return f>0&&(u.orientation=f),u}}}},{"../common":262,"../exif_utils":263}],275:[function(y,ee,te){ee.exports={avif:y("./parse_sync/avif"),bmp:y("./parse_sync/bmp"),gif:y("./parse_sync/gif"),ico:y("./parse_sync/ico"),jpeg:y("./parse_sync/jpeg"),png:y("./parse_sync/png"),psd:y("./parse_sync/psd"),svg:y("./parse_sync/svg"),tiff:y("./parse_sync/tiff"),webp:y("./parse_sync/webp")}},{"./parse_sync/avif":265,"./parse_sync/bmp":266,"./parse_sync/gif":267,"./parse_sync/ico":268,"./parse_sync/jpeg":269,"./parse_sync/png":270,"./parse_sync/psd":271,"./parse_sync/svg":272,"./parse_sync/tiff":273,"./parse_sync/webp":274}],276:[function(y,ee,te){var g=y("./lib/parsers_sync");ee.exports=function(m){return function(b){for(var v=Object.keys(g),e=0;e<v.length;e++){var n=g[v[e]](b);if(n)return n}return null}(m)},ee.exports.parsers=g},{"./lib/parsers_sync":275}],277:[function(y,ee,te){var g,m,b=ee.exports={};function v(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function n(s){if(g===setTimeout)return setTimeout(s,0);if((g===v||!g)&&setTimeout)return g=setTimeout,setTimeout(s,0);try{return g(s,0)}catch{try{return g.call(null,s,0)}catch{return g.call(this,s,0)}}}(function(){try{g=typeof setTimeout=="function"?setTimeout:v}catch{g=v}try{m=typeof clearTimeout=="function"?clearTimeout:e}catch{m=e}})();var t,o=[],r=!1,d=-1;function c(){r&&t&&(r=!1,t.length?o=t.concat(o):d=-1,o.length&&i())}function i(){if(!r){var s=n(c);r=!0;for(var h=o.length;h;){for(t=o,o=[];++d<h;)t&&t[d].run();d=-1,h=o.length}t=null,r=!1,function(p){if(m===clearTimeout)return clearTimeout(p);if((m===e||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(p);try{m(p)}catch{try{return m.call(null,p)}catch{return m.call(this,p)}}}(s)}}function u(s,h){this.fun=s,this.array=h}function f(){}b.nextTick=function(s){var h=new Array(arguments.length-1);if(arguments.length>1)for(var p=1;p<arguments.length;p++)h[p-1]=arguments[p];o.push(new u(s,h)),o.length!==1||r||n(i)},u.prototype.run=function(){this.fun.apply(null,this.array)},b.title="browser",b.browser=!0,b.env={},b.argv=[],b.version="",b.versions={},b.on=f,b.addListener=f,b.once=f,b.off=f,b.removeListener=f,b.removeAllListeners=f,b.emit=f,b.prependListener=f,b.prependOnceListener=f,b.listeners=function(s){return[]},b.binding=function(s){throw new Error("process.binding is not supported")},b.cwd=function(){return"/"},b.chdir=function(s){throw new Error("process.chdir is not supported")},b.umask=function(){return 0}},{}],278:[function(y,ee,te){(function(g){(function(){for(var m=y("performance-now"),b=typeof window>"u"?g:window,v=["moz","webkit"],e="AnimationFrame",n=b["request"+e],t=b["cancel"+e]||b["cancelRequest"+e],o=0;!n&&o<v.length;o++)n=b[v[o]+"Request"+e],t=b[v[o]+"Cancel"+e]||b[v[o]+"CancelRequest"+e];
600if(!n||!t){var r=0,d=0,c=[];n=function(i){if(c.length===0){var u=m(),f=Math.max(0,1e3/60-(u-r));r=f+u,setTimeout(function(){var s=c.slice(0);c.length=0;for(var h=0;h<s.length;h++)if(!s[h].cancelled)try{s[h].callback(r)}catch(p){setTimeout(function(){throw p},0)}},Math.round(f))}return c.push({handle:++d,callback:i,cancelled:!1}),d},t=function(i){for(var u=0;u<c.length;u++)c[u].handle===i&&(c[u].cancelled=!0)}}ee.exports=function(i){return n.call(b,i)},ee.exports.cancel=function(){t.apply(b,arguments)},ee.exports.polyfill=function(i){i||(i=b),i.requestAnimationFrame=n,i.cancelAnimationFrame=t}}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"performance-now":252}],279:[function(y,ee,te){var g=y("array-bounds"),m=y("color-normalize"),b=y("update-diff"),v=y("pick-by-alias"),e=y("object-assign"),n=y("flatten-vertex-data"),t=y("to-float32"),o=t.float32,r=t.fract32;ee.exports=function(c,i){if(typeof c=="function"?(i||(i={}),i.regl=c):i=c,i.length&&(i.positions=i),!(c=i.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var u,f,s,h,p,a,x=c._gl,l={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},w=[];return h=c.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=c.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=c.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=c.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=c.buffer({usage:"static",type:"float",data:d}),L(i),u=c({vert:`
601		precision highp float;
602
603		attribute vec2 position, positionFract;
604		attribute vec4 error;
605		attribute vec4 color;
606
607		attribute vec2 direction, lineOffset, capOffset;
608
609		uniform vec4 viewport;
610		uniform float lineWidth, capSize;
611		uniform vec2 scale, scaleFract, translate, translateFract;
612
613		varying vec4 fragColor;
614
615		void main() {
616			fragColor = color / 255.;
617
618			vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;
619
620			vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;
621
622			vec2 position = position + dxy;
623
624			vec2 pos = (position + translate) * scale
625				+ (positionFract + translateFract) * scale
626				+ (position + translate) * scaleFract
627				+ (positionFract + translateFract) * scaleFract;
628
629			pos += pixelOffset / viewport.zw;
630
631			gl_Position = vec4(pos * 2. - 1., 0, 1);
632		}
633		`,frag:`
634		precision highp float;
635
636		varying vec4 fragColor;
637
638		uniform float opacity;
639
640		void main() {
641			gl_FragColor = fragColor;
642			gl_FragColor.a *= opacity;
643		}
644		`,uniforms:{range:c.prop("range"),lineWidth:c.prop("lineWidth"),capSize:c.prop("capSize"),opacity:c.prop("opacity"),scale:c.prop("scale"),translate:c.prop("translate"),scaleFract:c.prop("scaleFract"),translateFract:c.prop("translateFract"),viewport:function(I,P){return[P.viewport.x,P.viewport.y,I.viewportWidth,I.viewportHeight]}},attributes:{color:{buffer:h,offset:function(I,P){return 4*P.offset},divisor:1},position:{buffer:f,offset:function(I,P){return 8*P.offset},divisor:1},positionFract:{buffer:s,offset:function(I,P){return 8*P.offset},divisor:1},error:{buffer:p,offset:function(I,P){return 16*P.offset},divisor:1},direction:{buffer:a,stride:24,offset:0},lineOffset:{buffer:a,stride:24,offset:8},capOffset:{buffer:a,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:c.prop("viewport")},viewport:c.prop("viewport"),stencil:!1,instances:c.prop("count"),count:d.length}),e(_,{update:L,draw:T,destroy:A,regl:c,gl:x,canvas:x.canvas,groups:w}),_;function _(I){I?L(I):I===null&&A(),T()}function T(I){if(typeof I=="number")return k(I);I&&!Array.isArray(I)&&(I=[I]),c._refresh(),w.forEach(function(P,S){P&&(I&&(I[S]?P.draw=!0:P.draw=!1),P.draw?k(S):P.draw=!0)})}function k(I){typeof I=="number"&&(I=w[I]),I!=null&&I&&I.count&&I.color&&I.opacity&&I.positions&&I.positions.length>1&&(I.scaleRatio=[I.scale[0]*I.viewport.width,I.scale[1]*I.viewport.height],u(I),I.after&&I.after(I))}function L(I){if(I){I.length!=null?typeof I[0]=="number"&&(I=[{positions:I}]):Array.isArray(I)||(I=[I]);var P=0,S=0;if(_.groups=w=I.map(function(K,q){var W=w[q];return K&&(typeof K=="function"?K={after:K}:typeof K[0]=="number"&&(K={positions:K}),K=v(K,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),W||(w[q]=W={id:q,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},K=e({},l,K)),b(W,K,[{lineWidth:function($){return .5*+$},capSize:function($){return .5*+$},opacity:parseFloat,errors:function($){return $=n($),S+=$.length,$},positions:function($,R){return $=n($,"float64"),R.count=Math.floor($.length/2),R.bounds=g($,2),R.offset=P,P+=R.count,$}},{color:function($,R){var N=R.count;if($||($="transparent"),!Array.isArray($)||typeof $[0]=="number"){var U=$;$=Array(N);for(var Q=0;Q<N;Q++)$[Q]=U}if($.length<N)throw Error("Not enough colors");for(var j=new Uint8Array(4*N),X=0;X<N;X++){var J=m($[X],"uint8");j.set(J,4*X)}return j},range:function($,R,N){var U=R.bounds;return $||($=U),R.scale=[1/($[2]-$[0]),1/($[3]-$[1])],R.translate=[-$[0],-$[1]],R.scaleFract=r(R.scale),R.translateFract=r(R.translate),$},viewport:function($){var R;return Array.isArray($)?R={x:$[0],y:$[1],width:$[2]-$[0],height:$[3]-$[1]}:$?(R={x:$.x||$.left||0,y:$.y||$.top||0},$.right?R.width=$.right-R.x:R.width=$.w||$.width||0,$.bottom?R.height=$.bottom-R.y:R.height=$.h||$.height||0):R={x:0,y:0,width:x.drawingBufferWidth,height:x.drawingBufferHeight},R}}])),W}),P||S){var E=w.reduce(function(K,q,W){return K+(q?q.count:0)},0),D=new Float64Array(2*E),F=new Uint8Array(4*E),H=new Float32Array(4*E);
644w.forEach(function(K,q){if(K){var W=K.positions,$=K.count,R=K.offset,N=K.color,U=K.errors;$&&(F.set(N,4*R),H.set(U,4*R),D.set(W,2*R))}});var V=o(D);f(V);var Z=r(D,V);s(Z),h(F),p(H)}}}function A(){f.destroy(),s.destroy(),h.destroy(),p.destroy(),a.destroy()}};var d=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},{"array-bounds":71,"color-normalize":89,"flatten-vertex-data":191,"object-assign":247,"pick-by-alias":253,"to-float32":313,"update-diff":329}],280:[function(y,ee,te){var g=y("color-normalize"),m=y("array-bounds"),b=y("object-assign"),v=y("glslify"),e=y("pick-by-alias"),n=y("flatten-vertex-data"),t=y("earcut"),o=y("array-normalize"),r=y("to-float32"),d=r.float32,c=r.fract32,i=y("es6-weak-map"),u=y("parse-rect"),f=y("array-find-index");function s(h,p){if(!(this instanceof s))return new s(h,p);if(typeof h=="function"?(p||(p={}),p.regl=h):p=h,p.length&&(p.positions=p),!(h=p.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=h._gl,this.regl=h,this.passes=[],this.shaders=s.shaders.has(h)?s.shaders.get(h):s.shaders.set(h,s.createShaders(h)).get(h),this.update(p)}ee.exports=s,s.dashMult=2,s.maxPatternLength=256,s.precisionThreshold=3e6,s.maxPoints=1e4,s.maxLines=2048,s.shaders=new i,s.createShaders=function(h){var p,a=h.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),x={primitive:"triangle strip",instances:h.prop("count"),count:4,offset:0,uniforms:{miterMode:function(w,_){return _.join==="round"?2:1},miterLimit:h.prop("miterLimit"),scale:h.prop("scale"),scaleFract:h.prop("scaleFract"),translateFract:h.prop("translateFract"),translate:h.prop("translate"),thickness:h.prop("thickness"),dashTexture:h.prop("dashTexture"),opacity:h.prop("opacity"),pixelRatio:h.context("pixelRatio"),id:h.prop("id"),dashLength:h.prop("dashLength"),viewport:function(w,_){return[_.viewport.x,_.viewport.y,w.viewportWidth,w.viewportHeight]},depth:h.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(w,_){return!_.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:h.prop("viewport")},viewport:h.prop("viewport")},l=h(b({vert:v([`precision highp float;
645#define GLSLIFY 1
646
647attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;
648attribute vec4 color;
649attribute float lineEnd, lineTop;
650
651uniform vec2 scale, scaleFract, translate, translateFract;
652uniform float thickness, pixelRatio, id, depth;
653uniform vec4 viewport;
654
655varying vec4 fragColor;
656varying vec2 tangent;
657
658vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {
659	// the order is important
660	return position * scale + translate
661       + positionFract * scale + translateFract
662       + position * scaleFract
663       + positionFract * scaleFract;
664}
665
666void main() {
667	float lineStart = 1. - lineEnd;
668	float lineOffset = lineTop * 2. - 1.;
669
670	vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);
671	tangent = normalize(diff * scale * viewport.zw);
672	vec2 normal = vec2(-tangent.y, tangent.x);
673
674	vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart
675		+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd
676
677		+ thickness * normal * .5 * lineOffset / viewport.zw;
678
679	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
680
681	fragColor = color / 255.;
682}
683`]),frag:v([`precision highp float;
684#define GLSLIFY 1
685
686uniform float dashLength, pixelRatio, thickness, opacity, id;
687uniform sampler2D dashTexture;
688
689varying vec4 fragColor;
690varying vec2 tangent;
691
692void main() {
693	float alpha = 1.;
694
695	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
696	float dash = texture2D(dashTexture, vec2(t, .5)).r;
697
698	gl_FragColor = fragColor;
699	gl_FragColor.a *= alpha * opacity * dash;
700}
701`]),attributes:{lineEnd:{buffer:a,divisor:0,stride:8,offset:0},lineTop:{buffer:a,divisor:0,stride:8,offset:4},aCoord:{buffer:h.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:h.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:h.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:h.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:h.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},x));try{p=h(b({cull:{enable:!0,face:"back"},vert:v([`precision highp float;
702#define GLSLIFY 1
703
704attribute vec2 aCoord, bCoord, nextCoord, prevCoord;
705attribute vec4 aColor, bColor;
706attribute float lineEnd, lineTop;
707
708uniform vec2 scale, translate;
709uniform float thickness, pixelRatio, id, depth;
710uniform vec4 viewport;
711uniform float miterLimit, miterMode;
712
713varying vec4 fragColor;
714varying vec4 startCutoff, endCutoff;
715varying vec2 tangent;
716varying vec2 startCoord, endCoord;
717varying float enableStartMiter, enableEndMiter;
718
719const float REVERSE_THRESHOLD = -.875;
720const float MIN_DIFF = 1e-6;
721
722// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead
723// TODO: precalculate dot products, normalize things beforehead etc.
724// TODO: refactor to rectangular algorithm
725
726float distToLine(vec2 p, vec2 a, vec2 b) {
727	vec2 diff = b - a;
728	vec2 perp = normalize(vec2(-diff.y, diff.x));
729	return dot(p - a, perp);
730}
731
732bool isNaN( float val ){
733  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
734}
735
736void main() {
737	vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;
738
739  vec2 adjustedScale;
740  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;
741  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;
742
743  vec2 scaleRatio = adjustedScale * viewport.zw;
744	vec2 normalWidth = thickness / scaleRatio;
745
746	float lineStart = 1. - lineEnd;
747	float lineBot = 1. - lineTop;
748
749	fragColor = (lineStart * aColor + lineEnd * bColor) / 255.;
750
751	if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;
752
753	if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);
754	if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);
755
756	vec2 prevDiff = aCoord - prevCoord;
757	vec2 currDiff = bCoord - aCoord;
758	vec2 nextDiff = nextCoord - bCoord;
759
760	vec2 prevTangent = normalize(prevDiff * scaleRatio);
761	vec2 currTangent = normalize(currDiff * scaleRatio);
762	vec2 nextTangent = normalize(nextDiff * scaleRatio);
763
764	vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);
765	vec2 currNormal = vec2(-currTangent.y, currTangent.x);
766	vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);
767
768	vec2 startJoinDirection = normalize(prevTangent - currTangent);
769	vec2 endJoinDirection = normalize(currTangent - nextTangent);
770
771	// collapsed/unidirectional segment cases
772	// FIXME: there should be more elegant solution
773	vec2 prevTanDiff = abs(prevTangent - currTangent);
774	vec2 nextTanDiff = abs(nextTangent - currTangent);
775	if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {
776		startJoinDirection = currNormal;
777	}
778	if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {
779		endJoinDirection = currNormal;
780	}
781	if (aCoord == bCoord) {
782		endJoinDirection = startJoinDirection;
783		currNormal = prevNormal;
784		currTangent = prevTangent;
785	}
786
787	tangent = currTangent;
788
789	//calculate join shifts relative to normals
790	float startJoinShift = dot(currNormal, startJoinDirection);
791	float endJoinShift = dot(currNormal, endJoinDirection);
792
793	float startMiterRatio = abs(1. / startJoinShift);
794	float endMiterRatio = abs(1. / endJoinShift);
795
796	vec2 startJoin = startJoinDirection * startMiterRatio;
797	vec2 endJoin = endJoinDirection * endMiterRatio;
798
799	vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;
800	startTopJoin = sign(startJoinShift) * startJoin * .5;
801	startBotJoin = -startTopJoin;
802
803	endTopJoin = sign(endJoinShift) * endJoin * .5;
804	endBotJoin = -endTopJoin;
805
806	vec2 aTopCoord = aCoord + normalWidth * startTopJoin;
807	vec2 bTopCoord = bCoord + normalWidth * endTopJoin;
808	vec2 aBotCoord = aCoord + normalWidth * startBotJoin;
809	vec2 bBotCoord = bCoord + normalWidth * endBotJoin;
810
811	//miter anti-clipping
812	float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));
813	float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));
814
815	//prevent close to reverse direction switch
816	bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);
817	bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);
818
819	if (prevReverse) {
820		//make join rectangular
821		vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;
822		float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);
823		aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
824		aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
825	}
826	else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {
827		//handle miter clipping
828		bTopCoord -= normalWidth * endTopJoin;
829		bTopCoord += normalize(endTopJoin * normalWidth) * baClipping;
830	}
831
832	if (nextReverse) {
833		//make join rectangular
834		vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;
835		float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);
836		bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
837		bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
838	}
839	else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {
840		//handle miter clipping
841		aBotCoord -= normalWidth * startBotJoin;
842		aBotCoord += normalize(startBotJoin * normalWidth) * abClipping;
843	}
844
845	vec2 aTopPosition = (aTopCoord) * adjustedScale + translate;
846	vec2 aBotPosition = (aBotCoord) * adjustedScale + translate;
847
848	vec2 bTopPosition = (bTopCoord) * adjustedScale + translate;
849	vec2 bBotPosition = (bBotCoord) * adjustedScale + translate;
850
851	//position is normalized 0..1 coord on the screen
852	vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;
853
854	startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;
855	endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;
856
857	gl_Position = vec4(position  * 2.0 - 1.0, depth, 1);
858
859	enableStartMiter = step(dot(currTangent, prevTangent), .5);
860	enableEndMiter = step(dot(currTangent, nextTangent), .5);
861
862	//bevel miter cutoffs
863	if (miterMode == 1.) {
864		if (enableStartMiter == 1.) {
865			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;
866			startCutoff = vec4(aCoord, aCoord);
867			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
868			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
869			startCutoff += viewport.xyxy;
870			startCutoff += startMiterWidth.xyxy;
871		}
872
873		if (enableEndMiter == 1.) {
874			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;
875			endCutoff = vec4(bCoord, bCoord);
876			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
877			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
878			endCutoff += viewport.xyxy;
879			endCutoff += endMiterWidth.xyxy;
880		}
881	}
882
883	//round miter cutoffs
884	else if (miterMode == 2.) {
885		if (enableStartMiter == 1.) {
886			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;
887			startCutoff = vec4(aCoord, aCoord);
888			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
889			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
890			startCutoff += viewport.xyxy;
891			startCutoff += startMiterWidth.xyxy;
892		}
893
894		if (enableEndMiter == 1.) {
895			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;
896			endCutoff = vec4(bCoord, bCoord);
897			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
898			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
899			endCutoff += viewport.xyxy;
900			endCutoff += endMiterWidth.xyxy;
901		}
902	}
903}
904`]),frag:v([`precision highp float;
905#define GLSLIFY 1
906
907uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;
908uniform sampler2D dashTexture;
909
910varying vec4 fragColor;
911varying vec2 tangent;
912varying vec4 startCutoff, endCutoff;
913varying vec2 startCoord, endCoord;
914varying float enableStartMiter, enableEndMiter;
915
916float distToLine(vec2 p, vec2 a, vec2 b) {
917	vec2 diff = b - a;
918	vec2 perp = normalize(vec2(-diff.y, diff.x));
919	return dot(p - a, perp);
920}
921
922void main() {
923	float alpha = 1., distToStart, distToEnd;
924	float cutoff = thickness * .5;
925
926	//bevel miter
927	if (miterMode == 1.) {
928		if (enableStartMiter == 1.) {
929			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
930			if (distToStart < -1.) {
931				discard;
932				return;
933			}
934			alpha *= min(max(distToStart + 1., 0.), 1.);
935		}
936
937		if (enableEndMiter == 1.) {
938			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
939			if (distToEnd < -1.) {
940				discard;
941				return;
942			}
943			alpha *= min(max(distToEnd + 1., 0.), 1.);
944		}
945	}
946
947	// round miter
948	else if (miterMode == 2.) {
949		if (enableStartMiter == 1.) {
950			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
951			if (distToStart < 0.) {
952				float radius = length(gl_FragCoord.xy - startCoord);
953
954				if(radius > cutoff + .5) {
955					discard;
956					return;
957				}
958
959				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
960			}
961		}
962
963		if (enableEndMiter == 1.) {
964			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
965			if (distToEnd < 0.) {
966				float radius = length(gl_FragCoord.xy - endCoord);
967
968				if(radius > cutoff + .5) {
969					discard;
970					return;
971				}
972
973				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
974			}
975		}
976	}
977
978	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
979	float dash = texture2D(dashTexture, vec2(t, .5)).r;
980
981	gl_FragColor = fragColor;
982	gl_FragColor.a *= alpha * opacity * dash;
983}
984`]),attributes:{lineEnd:{buffer:a,divisor:0,stride:8,offset:0},lineTop:{buffer:a,divisor:0,stride:8,offset:4},aColor:{buffer:h.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:h.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:h.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:h.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:h.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:h.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},x))}catch{p=l}return{fill:h({primitive:"triangle",elements:function(w,_){return _.triangles},offset:0,vert:v([`precision highp float;
985#define GLSLIFY 1
986
987attribute vec2 position, positionFract;
988
989uniform vec4 color;
990uniform vec2 scale, scaleFract, translate, translateFract;
991uniform float pixelRatio, id;
992uniform vec4 viewport;
993uniform float opacity;
994
995varying vec4 fragColor;
996
997const float MAX_LINES = 256.;
998
999void main() {
1000	float depth = (MAX_LINES - 4. - id) / (MAX_LINES);
1001
1002	vec2 position = position * scale + translate
1003       + positionFract * scale + translateFract
1004       + position * scaleFract
1005       + positionFract * scaleFract;
1006
1007	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);
1008
1009	fragColor = color / 255.;
1010	fragColor.a *= opacity;
1011}
1012`]),frag:v([`precision highp float;
1013#define GLSLIFY 1
1014
1015varying vec4 fragColor;
1016
1017void main() {
1018	gl_FragColor = fragColor;
1019}
1020`]),uniforms:{scale:h.prop("scale"),color:h.prop("fill"),scaleFract:h.prop("scaleFract"),translateFract:h.prop("translateFract"),translate:h.prop("translate"),opacity:h.prop("opacity"),pixelRatio:h.context("pixelRatio"),id:h.prop("id"),viewport:function(w,_){return[_.viewport.x,_.viewport.y,w.viewportWidth,w.viewportHe
1020ight]}},attributes:{position:{buffer:h.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:h.prop("positionFractBuffer"),stride:8,offset:8}},blend:x.blend,depth:{enable:!1},scissor:x.scissor,stencil:x.stencil,viewport:x.viewport}),rect:l,miter:p}},s.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},s.prototype.render=function(){for(var h,p=[],a=arguments.length;a--;)p[a]=arguments[a];p.length&&(h=this).update.apply(h,p),this.draw()},s.prototype.draw=function(){for(var h=this,p=[],a=arguments.length;a--;)p[a]=arguments[a];return(p.length?p:this.passes).forEach(function(x,l){var w;if(x&&Array.isArray(x))return(w=h).draw.apply(w,x);typeof x=="number"&&(x=h.passes[x]),x&&x.count>1&&x.opacity&&(h.regl._refresh(),x.fill&&x.triangles&&x.triangles.length>2&&h.shaders.fill(x),x.thickness&&(x.scale[0]*x.viewport.width>s.precisionThreshold||x.scale[1]*x.viewport.height>s.precisionThreshold||x.join==="rect"||!x.join&&(x.thickness<=2||x.count>=s.maxPoints)?h.shaders.rect(x):h.shaders.miter(x)))}),this},s.prototype.update=function(h){var p=this;if(h){h.length!=null?typeof h[0]=="number"&&(h=[{positions:h}]):Array.isArray(h)||(h=[h]);var a=this.regl,x=this.gl;if(h.forEach(function(k,L){var A=p.passes[L];if(k!==void 0)if(k!==null){if(typeof k[0]=="number"&&(k={positions:k}),k=e(k,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),A||(p.passes[L]=A={id:L,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:a.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:a.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:a.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:a.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},k=b({},s.defaults,k)),k.thickness!=null&&(A.thickness=parseFloat(k.thickness)),k.opacity!=null&&(A.opacity=parseFloat(k.opacity)),k.miterLimit!=null&&(A.miterLimit=parseFloat(k.miterLimit)),k.overlay!=null&&(A.overlay=!!k.overlay,L<s.maxLines&&(A.depth=2*(s.maxLines-1-L%s.maxLines)/s.maxLines-1)),k.join!=null&&(A.join=k.join),k.hole!=null&&(A.hole=k.hole),k.fill!=null&&(A.fill=k.fill?g(k.fill,"uint8"):null),k.viewport!=null&&(A.viewport=u(k.viewport)),A.viewport||(A.viewport=u([x.drawingBufferWidth,x.drawingBufferHeight])),k.close!=null&&(A.close=k.close),k.positions===null&&(k.positions=[]),
1020k.positions){var I,P;if(k.positions.x&&k.positions.y){var S=k.positions.x,E=k.positions.y;P=A.count=Math.max(S.length,E.length),I=new Float64Array(2*P);for(var D=0;D<P;D++)I[2*D]=S[D],I[2*D+1]=E[D]}else I=n(k.positions,"float64"),P=A.count=Math.floor(I.length/2);var F=A.bounds=m(I,2);if(A.fill){for(var H=[],V={},Z=0,K=0,q=0,W=A.count;K<W;K++){var $=I[2*K],R=I[2*K+1];isNaN($)||isNaN(R)||$==null||R==null?($=I[2*Z],R=I[2*Z+1],V[K]=Z):Z=K,H[q++]=$,H[q++]=R}if(k.splitNull){A.count-1 in V||(V[A.count]=A.count-1);var N=Object.keys(V).map(Number).sort(function(Tt,Vt){return Tt-Vt}),U=[],Q=0,j=A.hole!=null?A.hole[0]:null;if(j!=null){var X=f(N,function(Tt){return Tt>=j});(N=N.slice(0,X)).push(j)}for(var J=function(Tt){var Vt=H.slice(2*Q,2*N[Tt]).concat(j?H.slice(2*j):[]),Kt=(A.hole||[]).map(function(qe){return qe-j+(N[Tt]-Q)}),Be=t(Vt,Kt);Be=Be.map(function(qe){return qe+Q+(qe+Q<N[Tt]?0:j-N[Tt])}),U.push.apply(U,Be),Q=N[Tt]+1},re=0;re<N.length;re++)J(re);for(var ne=0,se=U.length;ne<se;ne++)V[U[ne]]!=null&&(U[ne]=V[U[ne]]);A.triangles=U}else{for(var oe=t(H,A.hole||[]),pe=0,ce=oe.length;pe<ce;pe++)V[oe[pe]]!=null&&(oe[pe]=V[oe[pe]]);A.triangles=oe}}var de=new Float64Array(I);o(de,2,F);var xe=new Float64Array(2*P+6);A.close?I[0]===I[2*P-2]&&I[1]===I[2*P-1]?(xe[0]=de[2*P-4],xe[1]=de[2*P-3]):(xe[0]=de[2*P-2],xe[1]=de[2*P-1]):(xe[0]=de[0],xe[1]=de[1]),xe.set(de,2),A.close?I[0]===I[2*P-2]&&I[1]===I[2*P-1]?(xe[2*P+2]=de[2],xe[2*P+3]=de[3],A.count-=1):(xe[2*P+2]=de[0],xe[2*P+3]=de[1],xe[2*P+4]=de[2],xe[2*P+5]=de[3]):(xe[2*P+2]=de[2*P-2],xe[2*P+3]=de[2*P-1],xe[2*P+4]=de[2*P-2],xe[2*P+5]=de[2*P-1]);var we=d(xe);A.positionBuffer(we);var be=c(xe,we);A.positionFractBuffer(be)}if(k.range?A.range=k.range:A.range||(A.range=A.bounds),(k.range||k.positions)&&A.count){var Ee=A.bounds,fe=Ee[2]-Ee[0],me=Ee[3]-Ee[1],Te=A.range[2]-A.range[0],_e=A.range[3]-A.range[1];A.scale=[fe/Te,me/_e],A.translate=[-A.range[0]/Te+Ee[0]/Te||0,-A.range[1]/_e+Ee[1]/_e||0],A.scaleFract=c(A.scale),A.translateFract=c(A.translate)}if(k.dashes){var Ae,Pe=0;if(!k.dashes||k.dashes.length<2)Pe=1,Ae=new Uint8Array([255,255,255,255,255,255,255,255]);else{Pe=0;for(var De=0;De<k.dashes.length;++De)Pe+=k.dashes[De];Ae=new Uint8Array(Pe*s.dashMult);for(var Ve=0,Qe=255,Oe=0;Oe<2;Oe++)for(var Ue=0;Ue<k.dashes.length;++Ue){for(var Ge=0,Ye=k.dashes[Ue]*s.dashMult*.5;Ge<Ye;++Ge)Ae[Ve++]=Qe;Qe^=255}}A.dashLength=Pe,A.dashTexture({channels:1,data:Ae,width:Ae.length,height:1,mag:"linear",min:"linear"},0,0)}if(k.color){var tt=A.count,lt=k.color;lt||(lt="transparent");var vt=new Uint8Array(4*tt+4);if(Array.isArray(lt)&&typeof lt[0]!="number"){for(var It=0;It<tt;It++){var St=g(lt[It],"uint8");vt.set(St,4*It)}vt.set(g(lt[0],"uint8"),4*tt)}else for(var rt=g(lt,"uint8"),et=0;et<tt+1;et++)vt.set(rt,4*et);A.colorBuffer({usage:"dynamic",type:"uint8",data:vt})}}else p.passes[L]=null}),h.length<this.passes.length){for(var l=h.length;l<this.passes.length;l++){var w=this.passes[l];w&&(w.colorBuffer.destroy(),w.positionBuffer.destroy(),w.dashTexture.destroy())}this.passes.length=h.length}for(var _=[],T=0;T<this.passes.length;T++)this.passes[T]!==null&&_.push(this.passes[T]);return this.passes=_,this}},s.prototype.destroy=function(){return this.passes.forEach(function(h){h.colorBuffer.destroy(),h.positionBuffer.destroy(),h.dashTexture.destroy()}),this.passes.length=0,this}},{"array-bounds":71,"array-find-index":72,"array-normalize":73,"color-normalize":89,earcut:129,"es6-weak-map":183,"flatten-vertex-data":191,glslify:227,"object-assign":247,"parse-rect":249,"pick-by-alias":253,"to-float32":313}],281:[function(y,ee,te){function g(l,w){return function(_){if(Array.isArray(_))return _}(l)||function(_,T){var k=_==null?null:typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(k!=null){var L,A,I=[],P=!0,S=!1;try{for(k=k.call(_);!(P=(L=k.next()).done)&&(I.push(L.value),!T||I.length!==T);P=!0);}catch(E){S=!0,A=E}finally{try{P||k.return==null||k.return()}finally{if(S)throw A}}return I}}(l,w)||b(l,w)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1021In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function m(l){return function(w){if(Array.isArray(w))return v(w)}(l)||function(w){if(typeof Symbol<"u"&&w[Symbol.iterator]!=null||w["@@iterator"]!=null)return Array.from(w)}(l)||b(l)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1022In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function b(l,w){if(l){if(typeof l=="string")return v(l,w);var _=Object.prototype.toString.call(l).slice(8,-1);return _==="Object"&&l.constructor&&(_=l.constructor.name),_==="Map"||_==="Set"?Array.from(l):_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_)?v(l,w):void 0}}function v(l,w){(w==null||w>l.length)&&(w=l.length);for(var _=0,T=new Array(w);_<w;_++)T[_]=l[_];return T}var e=y("color-normalize"),n=y("array-bounds"),t=y("color-id"),o=y("@plotly/point-cluster"),r=y("object-assign"),d=y("glslify"),c=y("pick-by-alias"),i=y("update-diff"),u=y("flatten-vertex-data"),f=y("is-iexplorer"),s=y("to-float32"),h=y("parse-rect"),p=a;function a(l,w){var _=this;if(!(this instanceof a))return new a(l,w);typeof l=="function"?(w||(w={}),w.regl=l):(w=l,l=null),w&&w.length&&(w.positions=w);var T,k=(l=w.regl)._gl,L=[];this.tooManyColors=f,T=l.texture({data:new Uint8Array(1020),width:255,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),r(this,{regl:l,gl:k,groups:[],markerCache:[null],markerTextures:[null],palette:L,paletteIds:{},paletteTexture:T,maxColors:255,maxSize:100,canvas:k.canvas}),this.update(w);var A={uniforms:{constPointSize:!!w.constPointSize,opacity:l.prop("opacity"),paletteSize:function(S,E){return[_.tooManyColors?0:255,T.height]},pixelRatio:l.context("pixelRatio"),scale:l.prop("scale"),scaleFract:l.prop("scaleFract"),translate:l.prop("translate"),translateFract:l.prop("translateFract"),markerTexture:l.prop("markerTexture"),paletteTexture:T},attributes:{x:function(S,E){return E.xAttr||{buffer:E.positionBuffer,stride:8,offset:0}},y:function(S,E){return E.yAttr||{buffer:E.positionBuffer,stride:8,offset:4}},xFract:function(S,E){return E.xAttr?{constant:[0,0]}:{buffer:E.positionFractBuffer,stride:8,offset:0}},yFract:function(S,E){return E.yAttr?{constant:[0,0]}:{buffer:E.positionFractBuffer,stride:8,offset:4}},size:function(S,E){return E.size.length?{buffer:E.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*E.size/_.maxSize)]}},borderSize:function(S,E){return E.borderSize.length?{buffer:E.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*E.borderSize/_.maxSize)]}},colorId:function(S,E){return E.color.length?{buffer:E.colorBuffer,stride:_.tooManyColors?8:4,offset:0}:{constant:_.tooManyColors?L.slice(4*E.color,4*E.color+4):[E.color]}},borderColorId:function(S,E){return E.borderColor.length?{buffer:E.colorBuffer,stride:_.tooManyColors?8:4,offset:_.tooManyColors?4:2}:{constant:_.tooManyColors?L.slice(4*E.borderColor,4*E.borderColor+4):[E.borderColor]}},isActive:function(S,E){return E.activation===!0?{constant:[1]}:E.activation?E.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alph
1022a",dstAlpha:"one"}},scissor:{enable:!0,box:l.prop("viewport")},viewport:l.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:l.prop("elements"),count:l.prop("count"),offset:l.prop("offset"),primitive:"points"},I=r({},A);I.frag=d([`precision highp float;
1023#define GLSLIFY 1
1024
1025uniform float opacity;
1026uniform sampler2D markerTexture;
1027
1028varying vec4 fragColor, fragBorderColor;
1029varying float fragWidth, fragBorderColorLevel, fragColorLevel;
1030
1031float smoothStep(float x, float y) {
1032  return 1.0 / (1.0 + exp(50.0*(x - y)));
1033}
1034
1035void main() {
1036  float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;
1037
1038  // max-distance alpha
1039  if (dist < 0.003) discard;
1040
1041  // null-border case
1042  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {
1043    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);
1044    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);
1045  }
1046  else {
1047    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);
1048    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);
1049
1050    vec4 color = fragBorderColor;
1051    color.a *= borderColorAmt;
1052    color = mix(color, fragColor, colorAmt);
1053    color.a *= opacity;
1054
1055    gl_FragColor = color;
1056  }
1057
1058}
1059`]),I.vert=d([`precision highp float;
1060#define GLSLIFY 1
1061
1062attribute float x, y, xFract, yFract;
1063attribute float size, borderSize;
1064attribute vec4 colorId, borderColorId;
1065attribute float isActive;
1066
1067uniform bool constPointSize;
1068uniform float pixelRatio;
1069uniform vec2 scale, scaleFract, translate, translateFract, paletteSize;
1070uniform sampler2D paletteTexture;
1071
1072const float maxSize = 100.;
1073const float borderLevel = .5;
1074
1075varying vec4 fragColor, fragBorderColor;
1076varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;
1077
1078float pointSizeScale = (constPointSize) ? 2. : pixelRatio;
1079
1080bool isDirect = (paletteSize.x < 1.);
1081
1082vec4 getColor(vec4 id) {
1083  return isDirect ? id / 255. : texture2D(paletteTexture,
1084    vec2(
1085      (id.x + .5) / paletteSize.x,
1086      (id.y + .5) / paletteSize.y
1087    )
1088  );
1089}
1090
1091void main() {
1092  // ignore inactive points
1093  if (isActive == 0.) return;
1094
1095  vec2 position = vec2(x, y);
1096  vec2 positionFract = vec2(xFract, yFract);
1097
1098  vec4 color = getColor(colorId);
1099  vec4 borderColor = getColor(borderColorId);
1100
1101  float size = size * maxSize / 255.;
1102  float borderSize = borderSize * maxSize / 255.;
1103
1104  gl_PointSize = 2. * size * pointSizeScale;
1105  fragPointSize = size * pixelRatio;
1106
1107  vec2 pos = (position + translate) * scale
1108      + (positionFract + translateFract) * scale
1109      + (position + translate) * scaleFract
1110      + (positionFract + translateFract) * scaleFract;
1111
1112  gl_Position = vec4(pos * 2. - 1., 0., 1.);
1113
1114  fragColor = color;
1115  fragBorderColor = borderColor;
1116  fragWidth = 1. / gl_PointSize;
1117
1118  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);
1119  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);
1120}`]),this.drawMarker=l(I);var P=r({},A);P.frag=d([`precision highp float;
1121#define GLSLIFY 1
1122
1123varying vec4 fragColor, fragBorderColor;
1124varying float fragBorderRadius, fragWidth;
1125
1126uniform float opacity;
1127
1128float smoothStep(float edge0, float edge1, float x) {
1129	float t;
1130	t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
1131	return t * t * (3.0 - 2.0 * t);
1132}
1133
1134void main() {
1135	float radius, alpha = 1.0, delta = fragWidth;
1136
1137	radius = length(2.0 * gl_PointCoord.xy - 1.0);
1138
1139	if (radius > 1.0 + delta) {
1140		discard;
1141	}
1142
1143	alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);
1144
1145	float borderRadius = fragBorderRadius;
1146	float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);
1147	vec4 color = mix(fragColor, fragBorderColor, ratio);
1148	color.a *= alpha * opacity;
1149	gl_FragColor = color;
1150}
1151`]),P.vert=d([`precision highp float;
1152#define GLSLIFY 1
1153
1154attribute float x, y, xFract, yFract;
1155attribute float size, borderSize;
1156attribute vec4 colorId, borderColorId;
1157attribute float isActive;
1158
1159uniform bool constPointSize;
1160uniform float pixelRatio;
1161uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;
1162uniform sampler2D paletteTexture;
1163
1164const float maxSize = 100.;
1165
1166varying vec4 fragColor, fragBorderColor;
1167varying float fragBorderRadius, fragWidth;
1168
1169float pointSizeScale = (constPointSize) ? 2. : pixelRatio;
1170
1171bool isDirect = (paletteSize.x < 1.);
1172
1173vec4 getColor(vec4 id) {
1174  return isDirect ? id / 255. : texture2D(paletteTexture,
1175    vec2(
1176      (id.x + .5) / paletteSize.x,
1177      (id.y + .5) / paletteSize.y
1178    )
1179  );
1180}
1181
1182void main() {
1183  // ignore inactive points
1184  if (isActive == 0.) return;
1185
1186  vec2 position = vec2(x, y);
1187  vec2 positionFract = vec2(xFract, yFract);
1188
1189  vec4 color = getColor(colorId);
1190  vec4 borderColor = getColor(borderColorId);
1191
1192  float size = size * maxSize / 255.;
1193  float borderSize = borderSize * maxSize / 255.;
1194
1195  gl_PointSize = (size + borderSize) * pointSizeScale;
1196
1197  vec2 pos = (position + translate) * scale
1198      + (positionFract + translateFract) * scale
1199      + (position + translate) * scaleFract
1200      + (positionFract + translateFract) * scaleFract;
1201
1202  gl_Position = vec4(pos * 2. - 1., 0., 1.);
1203
1204  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);
1205  fragColor = color;
1206  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;
1207  fragWidth = 1. / gl_PointSize;
1208}
1209`]),f&&(P.frag=P.frag.replace("smoothstep","smoothStep"),I.frag=I.frag.replace("smoothstep","smoothStep")),this.drawCircle=l(P)}a.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},a.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},a.prototype.draw=function(){for(var l=this,w=arguments.length,_=new Array(w),T=0;T<w;T++)_[T]=arguments[T];var k=this.groups;if(_.length===1&&Array.isArray(_[0])&&(_[0][0]===null||Array.isArray(_[0][0]))&&(_=_[0]),this.regl._refresh(),_.length)for(var L=0;L<_.length;L++)this.drawItem(L,_[L]);else k.forEach(function(A,I){l.drawItem(I)});return this},a.prototype.drawItem=function(l,w){var _=this.groups,T=_[l];if(typeof w=="number"&&(l=w,T=_[w],w=null),T&&T.count&&T.opacity){T.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,T,w));for(var k=[],L=1;L<T.activation.length;L++)T.activation[L]&&(T.activation[L]===!0||T.activation[L].data.length)&&k.push.apply(k,m(this.getMarkerDrawOptions(L,T,w)));k.length&&this.drawMarker(k)}},a.prototype.getMarkerDrawOptions=function(l,w,_){var T=w.range,k=w.tree,L=w.viewport,A=w.activation,I=w.selectionBuffer,P=w.count;if(this.regl,!k)return _?[r({},w,{markerTexture:this.markerTextures[l],activation:A[l],count:_.length,elements:_,offset:0})]:[r({},w,{markerTexture:this.markerTextures[l],activation:A[l],offset:0})];var S=[],E=k.range(T,{lod:!0,px:[(T[2]-T[0])/L.width,(T[3]-T[1])/L.height]});if(_){for(var D=A[l].data,F=new Uint8Array(P),H=0;H<_.length;H++){var V=_[H];F[V]=D?D[V]:1}I.subdata(F)}for(var Z=E.length;Z--;){var K=g(E[Z],2),q=K[0],W=K[1];S.push(r({},w,{markerTexture:this.markerTextures[l],activation:_?I:A[l],offset:q,count:W-q}))}return S},a.prototype.update=function(){for(var l=this,w=arguments.length,_=new Array(w),T=0;T<w;T++)_[T]=arguments[T];if(_.length){_.length===1&&Array.isArray(_[0])&&(_=_[0]);var k=this.groups,L=this.gl,A=this.regl,I=this.maxSize,P=this.maxColors,S=this.palette;this.groups=k=_.map(function(E,D){var F=k[D];if(E===void 0)return F;E===null?E={positions:null}:typeof E=="function"?E={ondraw:E}:typeof E[0]=="number"&&(E={positions:E}),(E=c(E,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",boun
1209ds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"})).positions===null&&(E.positions=[]),E.tooManyColors!=null&&(l.tooManyColors=E.tooManyColors),F||(k[D]=F={id:D,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:A.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:A.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:A.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:A.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:A.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},E=r({},a.defaults,E)),E.positions&&!("marker"in E)&&(E.marker=F.marker,delete F.marker),E.marker&&!("positions"in E)&&(E.positions=F.positions,delete F.positions);var H=0,V=0;if(i(F,E,[{snap:!0,size:function(ce,de){return ce==null&&(ce=a.defaults.size),H+=ce&&ce.length?1:0,ce},borderSize:function(ce,de){return ce==null&&(ce=a.defaults.borderSize),H+=ce&&ce.length?1:0,ce},opacity:parseFloat,color:function(ce,de){return ce==null&&(ce=a.defaults.color),ce=l.updateColor(ce),V++,ce},borderColor:function(ce,de){return ce==null&&(ce=a.defaults.borderColor),ce=l.updateColor(ce),V++,ce},bounds:function(ce,de,xe){return"range"in xe||(xe.range=null),ce},positions:function(ce,de,xe){var we=de.snap,be=de.positionBuffer,Ee=de.positionFractBuffer,fe=de.selectionBuffer;if(ce.x||ce.y)return ce.x.length?de.xAttr={buffer:A.buffer(ce.x),offset:0,stride:4,count:ce.x.length}:de.xAttr={buffer:ce.x.buffer,offset:4*ce.x.offset||0,stride:4*(ce.x.stride||1),count:ce.x.count},ce.y.length?de.yAttr={buffer:A.buffer(ce.y),offset:0,stride:4,count:ce.y.length}:de.yAttr={buffer:ce.y.buffer,offset:4*ce.y.offset||0,stride:4*(ce.y.stride||1),count:ce.y.count},de.count=Math.max(de.xAttr.count,de.yAttr.count),ce;ce=u(ce,"float64");var me=de.count=Math.floor(ce.length/2),Te=de.bounds=me?n(ce,2):null;if(xe.range||de.range||(delete de.range,xe.range=Te),xe.marker||de.marker||(delete de.marker,xe.marker=null),we&&(we===!0||me>we)?de.tree=o(ce,{bounds:Te}):we&&we.length&&(de.tree=we),de.tree){var _e={primitive:"points",usage:"static",data:de.tree,type:"uint32"};de.elements?de.elements(_e):de.elements=A.elements(_e)}var Ae=s.float32(ce);return be({data:Ae,usage:"dynamic"}),Ee({data:s.fract32(ce,Ae),usage:"dynamic"}),fe({data:new Uint8Array(me),type:"uint8",usage:"stream"}),ce}},{marker:function(ce,de,xe){var we=de.activation;if(we.forEach(function(Ae){return Ae&&Ae.destroy&&Ae.destroy()}),we.length=0,ce&&typeof ce[0]!="number"){for(var be=[],Ee=0,fe=Math.min(ce.length,de.count);Ee<fe;Ee++){var me=l.addMarker(ce[Ee]);be[me]||(be[me]=new Uint8Array(de.count)),be[me][Ee]=1}for(var Te=0;Te<be.length;Te++)if(be[Te]){var _e={data:be[Te],type:"uint8",usage:"static"};we[Te]?we[Te](_e):we[Te]=A.buffer(_e),we[Te].data=be[Te]}}else we[l.addMarker(ce)]=!0;return ce},range:function(ce,de,xe){var we=de.bounds;if(we)return ce||(ce=we),de.scale=[1/(ce[2]-ce[0]),1/(ce[3]-ce[1])],de.translate=[-ce[0],-ce[1]],de.scaleFract=s.fract(de.scale),de.translateFract=s.fract(de.translate),ce},viewport:function(ce){return h(ce||[L.drawingBufferWidth,L.drawingBufferHeight])}}]),H){var Z=F,K=Z.count,q=Z.size,W=Z.borderSize,$=Z.sizeBuffer,R=new Uint8Array(2*K);if(q.length||W.length)for(var N=0;N<K;
1209N++)R[2*N]=Math.round(255*(q[N]==null?q:q[N])/I),R[2*N+1]=Math.round(255*(W[N]==null?W:W[N])/I);$({data:R,usage:"dynamic"})}if(V){var U,Q=F,j=Q.count,X=Q.color,J=Q.borderColor,re=Q.colorBuffer;if(l.tooManyColors){if(X.length||J.length){U=new Uint8Array(8*j);for(var ne=0;ne<j;ne++){var se=X[ne];U[8*ne]=S[4*se],U[8*ne+1]=S[4*se+1],U[8*ne+2]=S[4*se+2],U[8*ne+3]=S[4*se+3];var oe=J[ne];U[8*ne+4]=S[4*oe],U[8*ne+5]=S[4*oe+1],U[8*ne+6]=S[4*oe+2],U[8*ne+7]=S[4*oe+3]}}}else if(X.length||J.length){U=new Uint8Array(4*j+2);for(var pe=0;pe<j;pe++)X[pe]!=null&&(U[4*pe]=X[pe]%P,U[4*pe+1]=Math.floor(X[pe]/P)),J[pe]!=null&&(U[4*pe+2]=J[pe]%P,U[4*pe+3]=Math.floor(J[pe]/P))}re({data:U||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return F})}},a.prototype.addMarker=function(l){var w,_=this.markerTextures,T=this.regl,k=this.markerCache,L=l==null?0:k.indexOf(l);if(L>=0)return L;if(l instanceof Uint8Array||l instanceof Uint8ClampedArray)w=l;else{w=new Uint8Array(l.length);for(var A=0,I=l.length;A<I;A++)w[A]=255*l[A]}var P=Math.floor(Math.sqrt(w.length));return L=_.length,k.push(l),_.push(T.texture({channels:1,data:w,radius:P,mag:"linear",min:"linear"})),L},a.prototype.updateColor=function(l){var w=this.paletteIds,_=this.palette,T=this.maxColors;Array.isArray(l)||(l=[l]);var k=[];if(typeof l[0]=="number"){var L=[];if(Array.isArray(l))for(var A=0;A<l.length;A+=4)L.push(l.slice(A,A+4));else for(var I=0;I<l.length;I+=4)L.push(l.subarray(I,I+4));l=L}for(var P=0;P<l.length;P++){var S=l[P];S=e(S,"uint8");var E=t(S,!1);if(w[E]==null){var D=_.length;w[E]=Math.floor(D/4),_[D]=S[0],_[D+1]=S[1],_[D+2]=S[2],_[D+3]=S[3]}k[P]=w[E]}return!this.tooManyColors&&_.length>4*T&&(this.tooManyColors=!0),this.updatePalette(_),k.length===1?k[0]:k},a.prototype.updatePalette=function(l){if(!this.tooManyColors){var w=this.maxColors,_=this.paletteTexture,T=Math.ceil(.25*l.length/w);if(T>1)for(var k=.25*(l=l.slice()).length%w;k<T*w;k++)l.push(0,0,0,0);_.height<T&&_.resize(w,T),_.subimage({width:Math.min(.25*l.length,w),height:T,data:l},0,0)}},a.prototype.destroy=function(){return this.groups.forEach(function(l){l.sizeBuffer.destroy(),l.positionBuffer.destroy(),l.positionFractBuffer.destroy(),l.colorBuffer.destroy(),l.activation.forEach(function(w){return w&&w.destroy&&w.destroy()}),l.selectionBuffer.destroy(),l.elements&&l.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(l){return l&&l.destroy&&l.destroy()}),this};var x=y("object-assign");ee.exports=function(l,w){var _=new p(l,w),T=_.render.bind(_);return x(T,{render:T,update:_.update.bind(_),draw:_.draw.bind(_),destroy:_.destroy.bind(_),regl:_.regl,gl:_.gl,canvas:_.gl.canvas,groups:_.groups,markers:_.markerCache,palette:_.palette}),T}},{"@plotly/point-cluster":59,"array-bounds":71,"color-id":87,"color-normalize":89,"flatten-vertex-data":191,glslify:227,"is-iexplorer":233,"object-assign":247,"parse-rect":249,"pick-by-alias":253,"to-float32":313,"update-diff":329}],282:[function(y,ee,te){var g=y("regl-scatter2d"),m=y("pick-by-alias"),b=y("array-bounds"),v=y("raf"),e=y("array-range"),n=y("parse-rect"),t=y("flatten-vertex-data");function o(i,u){if(!(this instanceof o))return new o(i);this.traces=[],this.passes={},this.regl=i,this.scatter=g(i),this.canvas=this.scatter.canvas}function r(i,u,f){return(i.id!=null?i.id:i)<<16|(255&u)<<8|255&f}function d(i,u,f){var s,h,p,a,x=i[u],l=i[f];return x.length>2?(x[0],x[2],s=x[1],h=x[3]):x.length?(s=x[0],h=x[1]):(x.x,s=x.y,x.x+x.width,h=x.y+x.height),l.length>2?(p=l[0],a=l[2],l[1],l[3]):l.length?(p=l[0],a=l[1]):(p=l.x,l.y,a=l.x+l.width,l.y+l.height),[p,s,a,h]}
1209function c(i){if(typeof i=="number")return[i,i,i,i];if(i.length===2)return[i[0],i[1],i[0],i[1]];var u=n(i);return[u.x,u.y,u.x+u.width,u.y+u.height]}ee.exports=o,o.prototype.render=function(){for(var i,u=this,f=[],s=arguments.length;s--;)f[s]=arguments[s];return f.length&&(i=this).update.apply(i,f),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=v(function(){u.draw(),u.dirty=!0,u.planned=null})):(this.draw(),this.dirty=!0,v(function(){u.dirty=!1})),this)},o.prototype.update=function(){for(var i,u=[],f=arguments.length;f--;)u[f]=arguments[f];if(u.length){for(var s=0;s<u.length;s++)this.updateItem(s,u[s]);this.traces=this.traces.filter(Boolean);for(var h=[],p=0,a=0;a<this.traces.length;a++){for(var x=this.traces[a],l=this.traces[a].passes,w=0;w<l.length;w++)h.push(this.passes[l[w]]);x.passOffset=p,p+=x.passes.length}return(i=this.scatter).update.apply(i,h),this}},o.prototype.updateItem=function(i,u){var f=this.regl;if(u===null)return this.traces[i]=null,this;if(!u)return this;var s,h=m(u,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),p=this.traces[i]||(this.traces[i]={id:i,buffer:f.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:n([f._gl.drawingBufferWidth,f._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(h.color!=null&&(p.color=h.color),h.size!=null&&(p.size=h.size),h.marker!=null&&(p.marker=h.marker),h.borderColor!=null&&(p.borderColor=h.borderColor),h.borderSize!=null&&(p.borderSize=h.borderSize),h.opacity!=null&&(p.opacity=h.opacity),h.viewport&&(p.viewport=n(h.viewport)),h.diagonal!=null&&(p.diagonal=h.diagonal),h.upper!=null&&(p.upper=h.upper),h.lower!=null&&(p.lower=h.lower),h.data){p.buffer(t(h.data)),p.columns=h.data.length,p.count=h.data[0].length,p.bounds=[];for(var a=0;a<p.columns;a++)p.bounds[a]=b(h.data[a],1)}h.range&&(p.range=h.range,s=p.range&&typeof p.range[0]!="number"),h.domain&&(p.domain=h.domain);var x=!1;h.padding!=null&&(Array.isArray(h.padding)&&h.padding.length===p.columns&&typeof h.padding[h.padding.length-1]=="number"?(p.padding=h.padding.map(c),x=!0):p.padding=c(h.padding));var l=p.columns,w=p.count,_=p.viewport.width,T=p.viewport.height,k=p.viewport.x,L=p.viewport.y,A=_/l,I=T/l;p.passes=[];for(var P=0;P<l;P++)for(var S=0;S<l;S++)if((p.diagonal||S!==P)&&(p.upper||!(P>S))&&(p.lower||!(P<S))){var E=r(p.id,P,S),D=this.passes[E]||(this.passes[E]={});if(h.data&&(h.transpose?D.positions={x:{buffer:p.buffer,offset:S,count:w,stride:l},y:{buffer:p.buffer,offset:P,count:w,stride:l}}:D.positions={x:{buffer:p.buffer,offset:S*w,count:w},y:{buffer:p.buffer,offset:P*w,count:w}},D.bounds=d(p.bounds,P,S)),h.domain||h.viewport||h.data){var F=x?d(p.padding,P,S):p.padding;if(p.domain){var H=d(p.domain,P,S),V=H[0],Z=H[1],K=H[2],q=H[3];D.viewport=[k+V*_+F[0],L+Z*T+F[1],k+K*_-F[2],L+q*T-F[3]]}else D.viewport=[k+S*A+A*F[0],L+P*I+I*F[1],k+(S+1)*A-A*F[2],L+(P+1)*I-I*F[3]]}h.color&&(D.color=p.color),h.size&&(D.size=p.size),h.marker&&(D.marker=p.marker),h.borderSize&&(D.borderSize=p.borderSize),h.borderColor&&(D.borderColor=p.borderColor),h.opacity&&(D.opacity=p.opacity),h.range&&(D.range=s?d(p.range,P,S):p.range||D.bounds),p.passes.push(E)}return this},o.prototype.draw=function(){for(var i,u=[],f=arguments.length;f--;)u[f]=arguments[f];if(u.length){for(var s=[],h=0;h<u.length;h++)if(typeof u[h]=="number"){var p=this.traces[u[h]],a=p.passes,x=p.passOffset;s.push.apply(s,e(x,x+a.length))}else if(u[h].length){var l=u[h],w=this.traces[h],_=w.passes,T=w.passOffset;_=_.map(function(k,L){s[T+L]=l})}(i=this.scatter).draw.apply(i,s)}else this.scatter.draw();return this}
1209,o.prototype.destroy=function(){return this.traces.forEach(function(i){i.buffer&&i.buffer.destroy&&i.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}},{"array-bounds":71,"array-range":74,"flatten-vertex-data":191,"parse-rect":249,"pick-by-alias":253,raf:278,"regl-scatter2d":281}],283:[function(y,ee,te){(function(g,m){typeof te=="object"&&ee!==void 0?ee.exports=m():g.createREGL=m()})(this,function(){function g(Re,Xe){this.id=U++,this.type=Re,this.data=Xe}function m(Re){return"["+function Xe(ke){if(ke.length===0)return[];var Le=ke.charAt(0),Ie=ke.charAt(ke.length-1);if(1<ke.length&&Le===Ie&&(Le==='"'||Le==="'"))return['"'+ke.substr(1,ke.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(Le=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(ke))return Xe(ke.substr(0,Le.index)).concat(Xe(Le[1])).concat(Xe(ke.substr(Le.index+Le[0].length)));if((Le=ke.split(".")).length===1)return['"'+ke.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(ke=[],Ie=0;Ie<Le.length;++Ie)ke=ke.concat(Xe(Le[Ie]));return ke}(Re).join("][")+"]"}function b(Re){return typeof Re=="string"?Re.split():Re}function v(Re){return typeof Re=="string"?document.querySelector(Re):Re}function e(Re){var Xe,ke,Le,Ie,Ce=Re||{};Re={};var Je=[],it=[],ht=typeof window>"u"?1:window.devicePixelRatio,ut=!1,kt=function(Lt){},ot=function(){};if(typeof Ce=="string"?Xe=document.querySelector(Ce):typeof Ce=="object"&&(typeof Ce.nodeName=="string"&&typeof Ce.appendChild=="function"&&typeof Ce.getBoundingClientRect=="function"?Xe=Ce:typeof Ce.drawArrays=="function"||typeof Ce.drawElements=="function"?Le=(Ie=Ce).canvas:("gl"in Ce?Ie=Ce.gl:"canvas"in Ce?Le=v(Ce.canvas):"container"in Ce&&(ke=v(Ce.container)),"attributes"in Ce&&(Re=Ce.attributes),"extensions"in Ce&&(Je=b(Ce.extensions)),"optionalExtensions"in Ce&&(it=b(Ce.optionalExtensions)),"onDone"in Ce&&(kt=Ce.onDone),"profile"in Ce&&(ut=!!Ce.profile),"pixelRatio"in Ce&&(ht=+Ce.pixelRatio))),Xe&&(Xe.nodeName.toLowerCase()==="canvas"?Le=Xe:ke=Xe),!Ie){if(!Le){if(!(Xe=function(Lt,Et,Ze){function pt(){var Gt=window.innerWidth,ze=window.innerHeight;Lt!==document.body&&(Gt=(ze=zt.getBoundingClientRect()).right-ze.left,ze=ze.bottom-ze.top),zt.width=Ze*Gt,zt.height=Ze*ze}var Ct,zt=document.createElement("canvas");return N(zt.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),Lt.appendChild(zt),Lt===document.body&&(zt.style.position="absolute",N(Lt.style,{margin:0,padding:0})),Lt!==document.body&&typeof ResizeObserver=="function"?(Ct=new ResizeObserver(function(){setTimeout(pt)})).observe(Lt):window.addEventListener("resize",pt,!1),pt(),{canvas:zt,onDestroy:function(){Ct?Ct.disconnect():window.removeEventListener("resize",pt),Lt.removeChild(zt)}}}(ke||document.body,0,ht)))return null;Le=Xe.canvas,ot=Xe.onDestroy}Re.premultipliedAlpha===void 0&&(Re.premultipliedAlpha=!0),Ie=function(Lt,Et){function Ze(pt){try{return Lt.getContext(pt,Et)}catch{return null}}return Ze("webgl")||Ze("experimental-webgl")||Ze("webgl-experimental")}(Le,Re)}return Ie?{gl:Ie,canvas:Le,container:ke,extensions:Je,optionalExtensions:it,pixelRatio:ht,profile:ut,onDone:kt,onDestroy:ot}:(ot(),kt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function n(Re,Xe){for(var ke=Array(Re),Le=0;Le<Re;++Le)ke[Le]=Xe(Le);return ke}function t(Re){var Xe,ke;return Xe=(65535<Re)<<4,Xe|=ke=(255<(Re>>>=Xe))<<3,(Xe|=ke=(15<(Re>>>=ke))<<2)|(ke=(3<(Re>>>=ke))<<1)|Re>>>ke>>1}function o(){function Re(Le){e:{for(var Ie=16;268435456>=Ie;Ie*=16)if(Le<=Ie){Le=Ie;break e}Le=0}return 0<(Ie=ke[t(Le)>>2]).length?Ie.pop():new ArrayBuffer(Le)}function Xe(Le){ke[t(Le.byteLength)>>2].push(Le)}var ke=n(8,function(){return[]});return{alloc:Re,free:Xe,allocType:function(Le,Ie){var Ce=null;switch(Le){case 5120:Ce=new Int8Array(Re(Ie),0,Ie);break;case 5121:Ce=new Uint8Array(Re(Ie),0,Ie);break;case 5122:Ce=new Int16Array(Re(2*Ie),0,Ie);break;case 5123:Ce=new Uint16Array(Re(2*Ie),0,Ie);break;case 5124:Ce=new Int32Array(Re(4*Ie),0,Ie);break;case 5125:Ce=new Uint32Array(Re(4*Ie),0,Ie);break;case 5126:Ce=new Float32Array(Re(4*Ie),0,Ie);break;default:return null}return Ce.length!==Ie?Ce.subarray(0,Ie):Ce},freeType:function(Le){Xe(Le.buffer)}}}function r(Re){return!!Re&&typeof Re=="object"&&Array.isArray(Re.shape)&&Array.isArray(Re.stride)&&typeof Re.offset=="number"&&Re.shape.length===Re.stride.length&&(Array.isArray(Re.data)||ne(Re.data))}function d(Re,Xe,ke,Le,Ie,Ce){for(var Je=0;Je<Xe;++Je)for(var it=Re[Je],ht=0;ht<ke;++ht)for(var ut=it[ht],kt=0;kt<Le;++kt)Ie[Ce++]=ut[kt]}function c(Re){return 0|pe[Object.prototype.toString.call(Re)]}function i(Re,Xe){for(var ke=0;ke<Xe.length;++ke)Re[ke]=Xe[ke]}function u(Re,Xe,ke,Le,Ie,Ce,Je){for(var it=0,ht=0;ht<ke;++ht)for(var ut=0;ut<Le;++ut)Re[it++]=Xe[Ie*ht+Ce*ut+Je]}function f(Re,Xe,ke,Le){function Ie(ot){this.id=ht++,this.buffer=Re.createBuffer(),this.type=ot,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,ke.profile&&(this.stats={size:0})}function Ce(ot,Lt,Et){ot.byteLength=Lt.byteLength,Re.bufferData(ot.type,Lt,Et)}function Je(ot,Lt,Et,Ze,pt,Ct){if(ot.usage=Et,Array.isArray(Lt)){if(ot.dtype=Ze||5126,0<Lt.length)if(Array.isArray(Lt[0])){pt=we(Lt);for(var zt=Ze=1;zt<pt.length;++zt)Ze*=pt[zt];ot.dimension=Ze,Ce(ot,Lt=xe(Lt,pt,ot.dtype),Et),Ct?ot.persistentData=Lt:J.freeType(Lt)}else typeof Lt[0]=="number"?(ot.dimension=pt,i(pt=J.allocType(ot.dtype,Lt.length),Lt),Ce(ot,pt,Et),Ct?ot.persistentData=pt:J.freeType(pt)):ne(Lt[0])&&(ot.dimension=Lt[0].length,ot.dtype=Ze||c(Lt[0])||5126,Ce(ot,Lt=xe(Lt,[Lt.length,Lt[0].length],ot.dtype),Et),Ct?ot.persistentData=Lt:J.freeType(Lt))}else if(ne(Lt))ot.dtype=Ze||c(Lt),ot.dimension=pt,Ce(ot,Lt,Et),Ct&&(ot.persistentData=new Uint8Array(new Uint8Array(Lt.buffer)));else if(r(Lt)){pt=Lt.shape;var Gt=Lt.stride,ze=(zt=Lt.offset,0),st=0,yt=0,Dt=0;pt.length===1?(ze=pt[0],st=1,yt=Gt[0],Dt=0):pt.length===2&&(ze=pt[0],st=pt[1],yt=Gt[0],Dt=Gt[1]),ot.dtype=Ze||c(Lt.data)||5126,ot.dimension=st,u(pt=J.allocType(ot.dtype,ze*st),Lt.data,ze,st,yt,Dt,zt),Ce(ot,pt,Et),Ct?ot.persistentData=pt:J.freeType(pt)}else Lt instanceof ArrayBuffer&&(ot.dtype=5121,ot.dimension=pt,Ce(ot,Lt,Et),Ct&&(ot.persistentData=new Uint8Array(new Uint8Array(Lt))))}function it(ot){Xe.bufferCount--,Le(ot),Re.deleteBuffer(ot.buffer),ot.buffer=null,delete ut[ot.id]}var ht=0,ut={};Ie.prototype.bind=function(){Re.bindBuffer(this.type,this.buffer)},Ie.prototype.destroy=function(){it(this)};var kt=[];return ke.profile&&(Xe.getTotalBufferSize=function(){var ot=0;return Object.keys(ut).forEach(function(Lt){ot+=ut[Lt].stats.size}),ot}),{create:function(ot,Lt,Et,Ze){function pt(zt){var Gt=35044,ze=null,st=0,yt=0,Dt=1;return Array.isArray(zt)||ne(zt)||r(zt)||zt instanceof ArrayBuffer?ze=zt:typeof zt=="number"?st=0|zt:zt&&("data"in zt&&(ze=zt.data),"usage"in zt&&(Gt=de[zt.usage]),"type"in zt&&(yt=ce[zt.type]),"dimension"in zt&&(Dt=0|zt.dimension),"length"in zt&&(st=0|zt.length)),Ct.bind(),ze?Je(Ct,ze,Gt,yt,Dt,Ze):(st&&Re.bufferData(Ct.type,st,Gt),Ct.dtype=yt||5121,Ct.usage=Gt,Ct.dimension=Dt,Ct.byteLength=st),ke.profile&&(Ct.stats.size=Ct.byteLength*be[Ct.dtype]),pt}Xe.bufferCount++;var Ct=new Ie(Lt);return ut[Ct.id]=Ct,Et||pt(ot),pt._reglType="buffer",pt._buffer=Ct,pt.subdata=function(zt,Gt){var ze,st=0|(Gt||0);if(Ct.bind(),ne(zt)||zt instanceof ArrayBuffer)Re.bufferSubData(Ct.type,st,zt);else if(Array.isArray(zt)){if(0<zt.length)if(typeof zt[0]=="number"){var yt=J.allocType(Ct.dtype,zt.length);i(yt,zt),Re.bufferSubData(Ct.type,st,yt),J.freeType(yt)}else(Array.isArray(zt[0])||ne(zt[0]))&&(ze=we(zt),yt=xe(zt,ze,Ct.dtype),Re.bufferSubData(Ct.type,st,yt),J.freeType(yt))}else if(r(zt)){ze=zt.shape;var Dt=zt.stride,jt=yt=0,or=0,Ut=0;ze.length===1?(yt=ze[0],jt=1,or=Dt[0],Ut=0):ze.length===2&&(yt=ze[0],jt=ze[1],or=Dt[0],Ut=Dt[1]),ze=Array.isArray(zt.data)?Ct.dtype:c(zt.data),u(ze=J.allocType(ze,yt*jt),zt.data,yt,jt,or,Ut,zt.offset),Re.bufferSubData(Ct.type,st,ze),J.freeType(ze)}return pt},ke.profile&&(pt.stats=Ct.stats),pt.destroy=function(){it(Ct)},pt},createStream:function(ot,Lt){var Et=kt.pop();return Et||(Et=new Ie(ot)),Et.bind(),Je(Et,Lt,35040,0,1,!1),Et},destroyStream:function(ot){kt.push(ot)},clear:function(){se(ut).forEach(it),kt.forEach(it)},getBuffer:function(ot){return ot&&ot._buffer instanceof Ie?ot._buffer:null},restore:function(){se(ut).forEach(function(ot){ot.buffer=Re.createBuffer(),Re.bindBuffer(ot.type,ot.buffer),Re.bufferData(ot.type,ot.persistentData||ot.byteLength,ot.usage)})},_initBuffer:Je}}function s(Re,Xe,ke,Le){function Ie(ot){this.id=ht++,it[this.id]=this,this.buffer=ot,this.primType=4,this.type=this.vertCount=0}function Ce(ot,Lt,Et,Ze,pt,Ct,zt){var Gt;if(ot.buffer.bind(),Lt?((Gt=zt)||ne(Lt)&&(!r(Lt)||ne(Lt.data))||(Gt=Xe.oes_element_index_uint?5125:5123),ke._initBuffer(ot.buffer,Lt,Et,Gt,3)):(Re.bufferData(34963,Ct,Et),ot.buffer.dtype=Gt||5121,ot.buffer.usage=Et,ot.buffer.dimension=3,ot.buffer.byteLength=Ct),Gt=zt,!zt){switch(ot.buffer.dtype){case 5121:case 5120:Gt=5121;break;case 5123:case 5122:Gt=5123;break;case 5125:case 5124:Gt=5125}ot.buffer.dtype=Gt}ot.type=Gt,0>(Lt=pt)&&(Lt=ot.buffer.byteLength,Gt===5123?Lt>>=1:Gt===5125&&(Lt>>=2)),ot.vertCount=Lt,Lt=Ze,0>Ze&&(Lt=4,(Ze=ot.buffer.dimension)===1&&(Lt=0),Ze===2&&(Lt=1),Ze===3&&(Lt=4)),ot.primType=Lt}function Je(ot){Le.elementsCount--,delete it[ot.id],ot.buffer.destroy(),ot.buffer=null}var it={},ht=0,ut={uint8:5121,uint16:5123};Xe.oes_element_index_uint&&(ut.uint32=5125),Ie.prototype.bind=function(){this.buffer.bind()};var kt=[];return{create:function(ot,Lt){function Et(Ct){if(Ct)if(typeof Ct=="number")Ze(Ct),pt.primType=4,pt.vertCount=0|Ct,pt.type=5121;else{var zt=null,Gt=35044,ze=-1,st=-1,yt=0,Dt=0;Array.isArray(Ct)||ne(Ct)||r(Ct)?zt=Ct:("data"in Ct&&(zt=Ct.data),"usage"in Ct&&(Gt=de[Ct.usage]),"primitive"in Ct&&(ze=Ee[Ct.primitive]),"count"in Ct&&(st=0|Ct.count),"type"in Ct&&(Dt=ut[Ct.type]),"length"in Ct?yt=0|Ct.length:(yt=st,Dt===5123||Dt===5122?yt*=2:Dt!==5125&&Dt!==5124||(yt*=4))),Ce(pt,zt,Gt,ze,st,yt,Dt)}else Ze(),pt.primType=4,pt.vertCount=0,pt.type=5121;return Et}var Ze=ke.create(null,34963,!0),pt=new Ie(Ze._buffer);return Le.elementsCount++,Et(ot),Et._reglType="elements",Et._elements=pt,Et.subdata=function(Ct,zt){return Ze.subdata(Ct,zt),Et},Et.destroy=function(){Je(pt)},Et},createStream:function(ot){var Lt=kt.pop();return Lt||(Lt=new Ie(ke.create(null,34963,!0,!1)._buffer)),Ce(Lt,ot,35040,-1,-1,0,0),Lt},destroyStream:function(ot){kt.push(ot)},getElements:function(ot){return typeof ot=="function"&&ot._elements instanceof Ie?ot._elements:null},clear:function(){se(it).forEach(Je)}}}function h(Re){for(var Xe=J.allocType(5123,Re.length),ke=0;ke<Re.length;++ke)if(isNaN(Re[ke]))Xe[ke]=65535;else if(Re[ke]===1/0)Xe[ke]=31744;else if(Re[ke]===-1/0)Xe[ke]=64512;else{fe[0]=Re[ke];var Le=(Ce=me[0])>>>31<<15,Ie=(Ce<<1>>>24)-127,Ce=Ce>>13&1023;Xe[ke]=-24>Ie?Le:-14>Ie?Le+(Ce+1024>>-14-Ie):15<Ie?Le+31744:Le+(Ie+15<<10)+Ce}return Xe}function p(Re){return Array.isArray(Re)||ne(Re)}function a(Re){return"[object "+Re+"]"}function x(Re){return Array.isArray(Re)&&(Re.length===0||typeof Re[0]=="number")}function l(Re){return!(!Array.isArray(Re)||Re.length===0||!p(Re[0]))}function w(Re){return Object.prototype.toString.call(Re)}function _(Re){if(!Re)return!1;var Xe=w(Re);return 0<=Ge.indexOf(Xe)||x(Re)||l(Re)||r(Re)}function T(Re,Xe){Re.type===36193?(Re.data=h(Xe),J.freeType(Xe)):Re.data=Xe}function k(Re,Xe,ke,Le,Ie,Ce){if(Re=tt[Re]!==void 0?tt[Re]:Ae[Re]*Ye[Xe],Ce&&(Re*=6),Ie){for(Le=0;1<=ke;)Le+=Re*ke*ke,ke/=2;return Le}return Re*ke*Le}function L(Re,Xe,ke,Le,Ie,Ce,Je){function it(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace
1209=37444,this.channels=this.height=this.width=0}function ht(Qt,Pt){Qt.internalformat=Pt.internalformat,Qt.format=Pt.format,Qt.type=Pt.type,Qt.compressed=Pt.compressed,Qt.premultiplyAlpha=Pt.premultiplyAlpha,Qt.flipY=Pt.flipY,Qt.unpackAlignment=Pt.unpackAlignment,Qt.colorSpace=Pt.colorSpace,Qt.width=Pt.width,Qt.height=Pt.height,Qt.channels=Pt.channels}function ut(Qt,Pt){if(typeof Pt=="object"&&Pt){"premultiplyAlpha"in Pt&&(Qt.premultiplyAlpha=Pt.premultiplyAlpha),"flipY"in Pt&&(Qt.flipY=Pt.flipY),"alignment"in Pt&&(Qt.unpackAlignment=Pt.alignment),"colorSpace"in Pt&&(Qt.colorSpace=Or[Pt.colorSpace]),"type"in Pt&&(Qt.type=dr[Pt.type]);var Yt=Qt.width,cr=Qt.height,wr=Qt.channels,qr=!1;"shape"in Pt?(Yt=Pt.shape[0],cr=Pt.shape[1],Pt.shape.length===3&&(wr=Pt.shape[2],qr=!0)):("radius"in Pt&&(Yt=cr=Pt.radius),"width"in Pt&&(Yt=Pt.width),"height"in Pt&&(cr=Pt.height),"channels"in Pt&&(wr=Pt.channels,qr=!0)),Qt.width=0|Yt,Qt.height=0|cr,Qt.channels=0|wr,Yt=!1,"format"in Pt&&(Yt=Pt.format,cr=Qt.internalformat=Fr[Yt],Qt.format=Nr[cr],Yt in dr&&!("type"in Pt)&&(Qt.type=dr[Yt]),Yt in tn&&(Qt.compressed=!0),Yt=!0),!qr&&Yt?Qt.channels=Ae[Qt.format]:qr&&!Yt&&Qt.channels!==_e[Qt.format]&&(Qt.format=Qt.internalformat=_e[Qt.channels])}}function kt(Qt){Re.pixelStorei(37440,Qt.flipY),Re.pixelStorei(37441,Qt.premultiplyAlpha),Re.pixelStorei(37443,Qt.colorSpace),Re.pixelStorei(3317,Qt.unpackAlignment)}function ot(){it.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Lt(Qt,Pt){var Yt=null;if(_(Pt)?Yt=Pt:Pt&&(ut(Qt,Pt),"x"in Pt&&(Qt.xOffset=0|Pt.x),"y"in Pt&&(Qt.yOffset=0|Pt.y),_(Pt.data)&&(Yt=Pt.data)),Pt.copy){var cr=Ie.viewportWidth,wr=Ie.viewportHeight;Qt.width=Qt.width||cr-Qt.xOffset,Qt.height=Qt.height||wr-Qt.yOffset,Qt.needsCopy=!0}else if(Yt){if(ne(Yt))Qt.channels=Qt.channels||4,Qt.data=Yt,"type"in Pt||Qt.type!==5121||
1209(Qt.type=0|pe[Object.prototype.toString.call(Yt)]);else if(x(Yt)){switch(Qt.channels=Qt.channels||4,wr=(cr=Yt).length,Qt.type){case 5121:case 5123:case 5125:case 5126:(wr=J.allocType(Qt.type,wr)).set(cr),Qt.data=wr;break;case 36193:Qt.data=h(cr)}Qt.alignment=1,Qt.needsFree=!0}else if(r(Yt)){cr=Yt.data,Array.isArray(cr)||Qt.type!==5121||(Qt.type=0|pe[Object.prototype.toString.call(cr)]),wr=Yt.shape;var qr,Ur,br,_r,Ar=Yt.stride;wr.length===3?(br=wr[2],_r=Ar[2]):_r=br=1,qr=wr[0],Ur=wr[1],wr=Ar[0],Ar=Ar[1],Qt.alignment=1,Qt.width=qr,Qt.height=Ur,Qt.channels=br,Qt.format=Qt.internalformat=_e[br],Qt.needsFree=!0,qr=_r,Yt=Yt.offset,br=Qt.width,_r=Qt.height,Ur=Qt.channels;for(var Mr=J.allocType(Qt.type===36193?5126:Qt.type,br*_r*Ur),Cr=0,Gr=0;Gr<_r;++Gr)for(var cn=0;cn<br;++cn)for(var wn=0;wn<Ur;++wn)Mr[Cr++]=cr[wr*cn+Ar*Gr+qr*wn+Yt];T(Qt,Mr)}else if(w(Yt)===Pe||w(Yt)===De||w(Yt)===Ve)w(Yt)===Pe||w(Yt)===De?Qt.element=Yt:Qt.element=Yt.canvas,Qt.width=Qt.element.width,Qt.height=Qt.element.height,Qt.channels=4;else if(w(Yt)===Qe)Qt.element=Yt,Qt.width=Yt.width,Qt.height=Yt.height,Qt.channels=4;else if(w(Yt)===Oe)Qt.element=Yt,Qt.width=Yt.naturalWidth,Qt.height=Yt.naturalHeight,Qt.channels=4;else if(w(Yt)===Ue)Qt.element=Yt,Qt.width=Yt.videoWidth,Qt.height=Yt.videoHeight,Qt.channels=4;else if(l(Yt)){for(cr=Qt.width||Yt[0].length,wr=Qt.height||Yt.length,Ar=Qt.channels,Ar=p(Yt[0][0])?Ar||Yt[0][0].length:Ar||1,qr=oe.shape(Yt),br=1,_r=0;_r<qr.length;++_r)br*=qr[_r];br=J.allocType(Qt.type===36193?5126:Qt.type,br),oe.flatten(Yt,qr,"",br),T(Qt,br),Qt.alignment=1,Qt.width=cr,Qt.height=wr,Qt.channels=Ar,Qt.format=Qt.internalformat=_e[Ar],Qt.needsFree=!0}}else Qt.width=Qt.width||1,Qt.height=Qt.height||1,Qt.channels=Qt.channels||4}function Et(Qt,Pt,Yt,cr,wr){var qr=Qt.element,Ur=Qt.data,br=Qt.internalformat,_r=Qt.format,Ar=Qt.type,Mr=Qt.width,Cr=Qt.height;kt(Qt),qr?Re.texSubImage2D(Pt,wr,Yt,cr,_r,Ar,qr):Qt.compressed?Re.compressedTexSubImage2D(Pt,wr,Yt,cr,br,Mr,Cr,Ur):Qt.needsCopy?(Le(),Re.copyTexSubImage2D(Pt,wr,Yt,cr,Qt.xOffset,Qt.yOffset,Mr,Cr)):Re.texSubImage2D(Pt,wr,Yt,cr,Mr,Cr,_r,Ar,Ur)}function Ze(){return en.pop()||new ot}function pt(Qt){Qt.needsFree&&J.freeType(Qt.data),ot.call(Qt),en.push(Qt)}function Ct(){it.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function zt(Qt,Pt,Yt){var cr=Qt.images[0]=Ze();Qt.mipmask=1,cr.width=Qt.width=Pt,cr.height=Qt.height=Yt,cr.channels=Qt.channels=4}function Gt(Qt,Pt){var Yt=null;if(_(Pt))ht(Yt=Qt.images[0]=Ze(),Qt),Lt(Yt,Pt),Qt.mipmask=1;else if(ut(Qt,Pt),Array.isArray(Pt.mipmap))for(var cr=Pt.mipmap,wr=0;wr<cr.length;++wr)ht(Yt=Qt.images[wr]=Ze(),Qt),Yt.width>>=wr,Yt.height>>=wr,Lt(Yt,cr[wr]),Qt.mipmask|=1<<wr;else ht(Yt=Qt.images[0]=Ze(),Qt),Lt(Yt,Pt),Qt.mipmask=1;ht(Qt,Qt.images[0])}function ze(Qt,Pt){for(var Yt=Qt.images,cr=0;cr<Yt.length&&Yt[cr];++cr){var wr=Yt[cr],qr=Pt,Ur=cr,br=wr.element,_r=wr.data,Ar=wr.internalformat,Mr=wr.format,Cr=wr.type,Gr=wr.width,cn=wr.height;kt(wr),br?Re.texImage2D(qr,Ur,Mr,Mr,Cr,br):wr.compressed?Re.compressedTexImage2D(qr,Ur,Ar,Gr,cn,0,_r):wr.needsCopy?(Le(),Re.copyTexImage2D(qr,Ur,Mr,wr.xOffset,wr.yOffset,Gr,cn,0)):Re.texImage2D(qr,Ur,Mr,Gr,cn,0,Mr,Cr,_r||null)}}function st(){var Qt=Qr.pop()||new Ct;it.call(Qt);for(var Pt=Qt.mipmask=0;16>Pt;++Pt)Qt.images[Pt]=null;return Qt}function yt(Qt){for(var Pt=Qt.images,Yt=0;Yt<Pt.length;++Yt)Pt[Yt]&&pt(Pt[Yt]),Pt[Yt]=null;Qr.push(Qt)}function Dt(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function jt(Qt,Pt){"min"in Pt&&(Qt.minFilter=hr[Pt.min],0<=Te.indexOf(Qt.minFilter)&&!("faces"in Pt)&&(Qt.genMipmaps=!0)),"mag"in Pt&&(Qt.magFilter=lr[Pt.mag]);var Yt=Qt.wrapS,cr=Qt.wrapT;if("wrap"in Pt){var wr=Pt.wrap;typeof wr=="string"?Yt=cr=ar[wr]:Array.isArray(wr)&&(Yt=ar[wr[0]],cr=ar[wr[1]])}else"wrapS"in Pt&&(Yt=ar[Pt.wrapS]),"wrapT"in Pt&&(cr=ar[Pt.wrapT]);if(Qt.wrapS=Yt,Qt.wrapT=cr,"anisotropic"in Pt&&(Qt.anisotropic=Pt.anisotropic),"mipmap"in Pt){switch(Yt=!1,typeof Pt.mipmap){case"string":Qt.mipmapHint=pr[Pt.mipmap],Yt=Qt.genMipmaps=!0;break;case"boolean":Yt=Qt.genMipmaps=Pt.mipmap;break;case"object":Qt.genMipmaps=!1,Yt=!0}!Yt||"min"in Pt||(Qt.minFilter=9984)}}function or(Qt,Pt){Re.texParameteri(Pt,10241,Qt.minFilter),Re.texParameteri(Pt,10240,Qt.magFilter),Re.texParameteri(Pt,10242,Qt.wrapS),Re.texParameteri(Pt,10243,Qt.wrapT),Xe.ext_texture_filter_anisotropic&&Re.texParameteri(Pt,34046,Qt.anisotropic),Qt.genMipmaps&&(Re.hint(33170,Qt.mipmapHint),Re.generateMipmap(Pt))}function Ut(Qt){it.call(this),this.mipmask=0,this.internalformat=6408,this.id=yn++,this.refCount=1,this.target=Qt,this.texture=Re.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Dt,Je.profile&&(this.stats={size:0})}function Xt(Qt){Re.activeTexture(33984),Re.bindTexture(Qt.target,Qt.texture)}function sr(){var Qt=In[0];Qt?Re.bindTexture(Qt.target,Qt.texture):Re.bindTexture(3553,null)}function vr(Qt){var Pt=Qt.texture,Yt=Qt.unit,cr=Qt.target;0<=Yt&&(Re.activeTexture(33984+Yt),Re.bindTexture(cr,null),In[Yt]=null),Re.deleteTexture(Pt),Qt.texture=null,Qt.params=null,Qt.pixels=null,Qt.refCount=0,delete un[Qt.id],Ce.textureCount--}var pr={"don't care":4352,"dont care":4352,nice:4354,fast:4353},ar={repeat:10497,clamp:33071,mirror:33648},lr={nearest:9728,linear:9729},hr=N({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},lr),Or={none:0,browser:37444},dr={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},Fr={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},tn={};Xe.ext_srgb&&(Fr.srgb=35904,Fr.srgba=35906),Xe.oes_texture_float&&(dr.float32=dr.float=5126),Xe.oes_texture_half_float&&(dr.float16=dr["half float"]=36193),Xe.webgl_depth_texture&&(N(Fr,{depth:6402,"depth stencil":34041}),N(dr,{uint16:5123,uint32:5125,"depth stencil":34042}
1209)),Xe.webgl_compressed_texture_s3tc&&N(tn,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),Xe.webgl_compressed_texture_atc&&N(tn,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),Xe.webgl_compressed_texture_pvrtc&&N(tn,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),Xe.webgl_compressed_texture_etc1&&(tn["rgb etc1"]=36196);var rn=Array.prototype.slice.call(Re.getParameter(34467));Object.keys(tn).forEach(function(Qt){var Pt=tn[Qt];0<=rn.indexOf(Pt)&&(Fr[Qt]=Pt)});var An=Object.keys(Fr);ke.textureFormats=An;var Ln=[];Object.keys(Fr).forEach(function(Qt){Ln[Fr[Qt]]=Qt});var _n=[];Object.keys(dr).forEach(function(Qt){_n[dr[Qt]]=Qt});var Vr=[];Object.keys(lr).forEach(function(Qt){Vr[lr[Qt]]=Qt});var Ir=[];Object.keys(hr).forEach(function(Qt){Ir[hr[Qt]]=Qt});var xr=[];Object.keys(ar).forEach(function(Qt){xr[ar[Qt]]=Qt});var Nr=An.reduce(function(Qt,Pt){var Yt=Fr[Pt];return Yt===6409||Yt===6406||Yt===6409||Yt===6410||Yt===6402||Yt===34041||Xe.ext_srgb&&(Yt===35904||Yt===35906)?Qt[Yt]=Yt:Yt===32855||0<=Pt.indexOf("rgba")?Qt[Yt]=6408:Qt[Yt]=6407,Qt},{}),en=[],Qr=[],yn=0,un={},$r=ke.maxTextureUnits,In=Array($r).map(function(){return null});return N(Ut.prototype,{bind:function(){this.bindCount+=1;var Qt=this.unit;if(0>Qt){for(var Pt=0;Pt<$r;++Pt){var Yt=In[Pt];if(Yt){if(0<Yt.bindCount)continue;Yt.unit=-1}In[Pt]=this,Qt=Pt;break}Je.profile&&Ce.maxTextureUnits<Qt+1&&(Ce.maxTextureUnits=Qt+1),this.unit=Qt,Re.activeTexture(33984+Qt),Re.bindTexture(this.target,this.texture)}return Qt},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&vr(this)}}),Je.profile&&(Ce.getTotalTextureSize=function(){var Qt=0;return Object.keys(un).forEach(function(Pt){Qt+=un[Pt].stats.size}),Qt}),{create2D:function(Qt,Pt){function Yt(wr,qr){var Ur=cr.texInfo;Dt.call(Ur);var br=st();return typeof wr=="number"?zt(br,0|wr,typeof qr=="number"?0|qr:0|wr):wr?(jt(Ur,wr),Gt(br,wr)):zt(br,1,1),Ur.genMipmaps&&(br.mipmask=(br.width<<1)-1),cr.mipmask=br.mipmask,ht(cr,br),cr.internalformat=br.internalformat,Yt.width=br.width,Yt.height=br.height,Xt(cr),ze(br,3553),or(Ur,3553),sr(),yt(br),Je.profile&&(cr.stats.size=k(cr.internalformat,cr.type,br.width,br.height,Ur.genMipmaps,!1)),Yt.format=Ln[cr.internalformat],Yt.type=_n[cr.type],Yt.mag=Vr[Ur.magFilter],Yt.min=Ir[Ur.minFilter],Yt.wrapS=xr[Ur.wrapS],Yt.wrapT=xr[Ur.wrapT],Yt}var cr=new Ut(3553);return un[cr.id]=cr,Ce.textureCount++,Yt(Qt,Pt),Yt.subimage=function(wr,qr,Ur,br){qr|=0,Ur|=0,br|=0;var _r=Ze();return ht(_r,cr),_r.width=0,_r.height=0,Lt(_r,wr),_r.width=_r.width||(cr.width>>br)-qr,_r.height=_r.height||(cr.height>>br)-Ur,Xt(cr),Et(_r,3553,qr,Ur,br),sr(),pt(_r),Yt},Yt.resize=function(wr,qr){var Ur=0|wr,br=0|qr||Ur;if(Ur===cr.width&&br===cr.height)return Yt;Yt.width=cr.width=Ur,Yt.height=cr.height=br,Xt(cr);for(var _r=0;cr.mipmask>>_r;++_r){var Ar=Ur>>_r,Mr=br>>_r;if(!Ar||!Mr)break;Re.texImage2D(3553,_r,cr.format,Ar,Mr,0,cr.format,cr.type,null)}return sr(),Je.profile&&(cr.stats.size=k(cr.internalformat,cr.type,Ur,br,!1,!1)),Yt},Yt._reglType="texture2d",Yt._texture=cr,Je.profile&&(Yt.stats=cr.stats),Yt.destroy=function(){cr.decRef()},Yt},createCube:function(Qt,Pt,Yt,cr,wr,qr){function Ur(Ar,Mr,Cr,Gr,cn,wn){var Kr,bn=br.texInfo;for(Dt.call(bn),Kr=0;6>Kr;++Kr)_r[Kr]=st();if(typeof Ar!="number"&&Ar){if(typeof Ar=="object")if(Mr)Gt(_r[0],Ar),Gt(_r[1],Mr),Gt(_r[2],Cr),Gt(_r[3],Gr),Gt(_r[4],cn),Gt(_r[5],wn);else if(jt(bn,Ar),ut(br,Ar),"faces"in Ar)for(Ar=Ar.faces,Kr=0;6>Kr;++Kr)ht(_r[Kr],br),Gt(_r[Kr],Ar[Kr]);else for(Kr=0;6>Kr;++Kr)Gt(_r[Kr],Ar)}else for(Ar=0|Ar||1,Kr=0;6>Kr;++Kr)zt(_r[Kr],Ar,Ar);for(ht(br,_r[0]),br.mipmask=bn.genMipmaps?(_r[0].width<<1)-1:_r[0].mipmask,br.internalformat=_r[0].internalformat,Ur.width=_r[0].width,Ur.height=_r[0].height,Xt(br),Kr=0;6>Kr;++Kr)ze(_r[Kr],34069+Kr);for(or(bn,34067),sr(),Je.profile&&(br.stats.size=k(br.internalformat,br.type,Ur.width,Ur.height,bn.genMipmaps,!0)),Ur.format=Ln[br.internalformat],Ur.type=_n[br.type],Ur.mag=Vr[bn.magFilter],Ur.min=Ir[bn.minFilter],Ur.wrapS=xr[bn.wrapS],Ur.wrapT=xr[bn.wrapT],Kr=0;6>Kr;++Kr)yt(_r[Kr]);return Ur}var br=new Ut(34067);un[br.id]=br,Ce.cubeCount++;var _r=Array(6);return Ur(Qt,Pt,Yt,cr,wr,qr),Ur.subimage=function(Ar,Mr,Cr,Gr,cn){Cr|=0,Gr|=0,cn|=0;var wn=Ze();return ht(wn,br),wn.width=0,wn.height=0,Lt(wn,Mr),wn.width=wn.width||(br.width>>
1209cn)-Cr,wn.height=wn.height||(br.height>>cn)-Gr,Xt(br),Et(wn,34069+Ar,Cr,Gr,cn),sr(),pt(wn),Ur},Ur.resize=function(Ar){if((Ar|=0)!==br.width){Ur.width=br.width=Ar,Ur.height=br.height=Ar,Xt(br);for(var Mr=0;6>Mr;++Mr)for(var Cr=0;br.mipmask>>Cr;++Cr)Re.texImage2D(34069+Mr,Cr,br.format,Ar>>Cr,Ar>>Cr,0,br.format,br.type,null);return sr(),Je.profile&&(br.stats.size=k(br.internalformat,br.type,Ur.width,Ur.height,!1,!0)),Ur}},Ur._reglType="textureCube",Ur._texture=br,Je.profile&&(Ur.stats=br.stats),Ur.destroy=function(){br.decRef()},Ur},clear:function(){for(var Qt=0;Qt<$r;++Qt)Re.activeTexture(33984+Qt),Re.bindTexture(3553,null),In[Qt]=null;se(un).forEach(vr),Ce.cubeCount=0,Ce.textureCount=0},getTexture:function(Qt){return null},restore:function(){for(var Qt=0;Qt<$r;++Qt){var Pt=In[Qt];Pt&&(Pt.bindCount=0,Pt.unit=-1,In[Qt]=null)}se(un).forEach(function(Yt){Yt.texture=Re.createTexture(),Re.bindTexture(Yt.target,Yt.texture);for(var cr=0;32>cr;++cr)if(Yt.mipmask&1<<cr)if(Yt.target===3553)Re.texImage2D(3553,cr,Yt.internalformat,Yt.width>>cr,Yt.height>>cr,0,Yt.internalformat,Yt.type,null);else for(var wr=0;6>wr;++wr)Re.texImage2D(34069+wr,cr,Yt.internalformat,Yt.width>>cr,Yt.height>>cr,0,Yt.internalformat,Yt.type,null);or(Yt.texInfo,Yt.target)})},refresh:function(){for(var Qt=0;Qt<$r;++Qt){var Pt=In[Qt];Pt&&(Pt.bindCount=0,Pt.unit=-1,In[Qt]=null),Re.activeTexture(33984+Qt),Re.bindTexture(3553,null),Re.bindTexture(34067,null)}}}}function A(Re,Xe,ke,Le,Ie,Ce){function Je(Ut,Xt,sr){this.target=Ut,this.texture=Xt,this.renderbuffer=sr;var vr=Ut=0;Xt?(Ut=Xt.width,vr=Xt.height):sr&&(Ut=sr.width,vr=sr.height),this.width=Ut,this.height=vr}function it(Ut){Ut&&(Ut.texture&&Ut.texture._texture.decRef(),Ut.renderbuffer&&Ut.renderbuffer._renderbuffer.decRef())}function ht(Ut,Xt,sr){Ut&&(Ut.texture?Ut.texture._texture.refCount+=1:Ut.renderbuffer._renderbuffer.refCount+=1)}function ut(Ut,Xt){Xt&&(Xt.texture?Re.framebufferTexture2D(36160,Ut,Xt.target,Xt.texture._texture.texture,0):Re.framebufferRenderbuffer(36160,Ut,36161,Xt.renderbuffer._renderbuffer.renderbuffer))}function kt(Ut){var Xt=3553,sr=null,vr=null,pr=Ut;return typeof Ut=="object"&&(pr=Ut.data,"target"in Ut&&(Xt=0|Ut.target)),(Ut=pr._reglType)==="texture2d"||Ut==="textureCube"?sr=pr:Ut==="renderbuffer"&&(vr=pr,Xt=36161),new Je(Xt,sr,vr)}function ot(Ut,Xt,sr,vr,pr){return sr?((Ut=Le.create2D({width:Ut,height:Xt,format:vr,type:pr}))._texture.refCount=0,new Je(3553,Ut,null)):((Ut=Ie.create({width:Ut,height:Xt,format:vr}))._renderbuffer.refCount=0,new Je(36161,null,Ut))}function Lt(Ut){return Ut&&(Ut.texture||Ut.renderbuffer)}function Et(Ut,Xt,sr){Ut&&(Ut.texture?Ut.texture.resize(Xt,sr):Ut.renderbuffer&&Ut.renderbuffer.resize(Xt,sr),Ut.width=Xt,Ut.height=sr)}function Ze(){this.id=jt++,or[this.id]=this,this.framebuffer=Re.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function pt(Ut){Ut.colorAttachments.forEach(it),it(Ut.depthAttachment),it(Ut.stencilAttachment),it(Ut.depthStencilAttachment)}function Ct(Ut){Re.deleteFramebuffer(Ut.framebuffer),Ut.framebuffer=null,Ce.framebufferCount--,delete or[Ut.id]}function zt(Ut){var Xt;Re.bindFramebuffer(36160,Ut.framebuffer);var sr=Ut.colorAttachments;for(Xt=0;Xt<sr.length;++Xt)ut(36064+Xt,sr[Xt]);for(Xt=sr.length;Xt<ke.maxColorAttachments;++Xt)Re.framebufferTexture2D(36160,36064+Xt,3553,null,0);Re.framebufferTexture2D(36160,33306,3553,null,0),Re.framebufferTexture2D(36160,36096,3553,null,0),Re.framebufferTexture2D(36160,36128,3553,null,0),ut(36096,Ut.depthAttachment),ut(36128,Ut.stencilAttachment),ut(33306,Ut.depthStencilAttachment),Re.checkFramebufferStatus(36160),Re.isContextLost(),Re.bindFramebuffer(36160,ze.next?ze.next.framebuffer:null),ze.cur=ze.next,Re.getError()}function Gt(Ut,Xt){function sr(pr,ar){var lr,hr=0,Or=0,dr=!0,Fr=!0;lr=null;var tn=!0,rn="rgba",An="uint8",Ln=1,_n=null,Vr=null,Ir=null,xr=!1;typeof pr=="number"?(hr=0|pr,Or=0|ar||hr):pr?("shape"in pr?(hr=(Or=pr.shape)[0],Or=Or[1]):("radius"in pr&&(hr=Or=pr.radius),"width"in pr&&(hr=pr.width),"height"in pr&&(Or=pr.height)),("color"in pr||"colors"in pr)&&(lr=pr.color||pr.colors,Array.isArray(lr)),lr||("colorCount"in pr&&(Ln=0|pr.colorCount),"colorTexture"in pr&&(tn=!!pr.colorTexture,rn="rgba4"),"colorType"in pr&&(An=pr.colorType,!tn)&&(An==="half float"||An==="float16"?rn="rgba16f":An!=="float"&&An!=="float32"||(rn="rgba32f")),"colorFormat"in pr&&(rn=pr.colorFormat,0<=st.indexOf(rn)?tn=!0:0<=yt.indexOf(rn)&&(tn=!1))),("depthTexture"in pr||"depthStencilTexture"in pr)&&(xr=!(!pr.depthTexture&&!pr.depthStencilTexture)),"depth"in pr&&(typeof pr.depth=="boolean"?dr=pr.depth:(_n=pr.depth,Fr=!1)),"stencil"in pr&&(typeof pr.
1209stencil=="boolean"?Fr=pr.stencil:(Vr=pr.stencil,dr=!1)),"depthStencil"in pr&&(typeof pr.depthStencil=="boolean"?dr=Fr=pr.depthStencil:(Ir=pr.depthStencil,Fr=dr=!1))):hr=Or=1;var Nr=null,en=null,Qr=null,yn=null;if(Array.isArray(lr))Nr=lr.map(kt);else if(lr)Nr=[kt(lr)];else for(Nr=Array(Ln),lr=0;lr<Ln;++lr)Nr[lr]=ot(hr,Or,tn,rn,An);for(hr=hr||Nr[0].width,Or=Or||Nr[0].height,_n?en=kt(_n):dr&&!Fr&&(en=ot(hr,Or,xr,"depth","uint32")),Vr?Qr=kt(Vr):Fr&&!dr&&(Qr=ot(hr,Or,!1,"stencil","uint8")),Ir?yn=kt(Ir):!_n&&!Vr&&Fr&&dr&&(yn=ot(hr,Or,xr,"depth stencil","depth stencil")),dr=null,lr=0;lr<Nr.length;++lr)ht(Nr[lr]),Nr[lr]&&Nr[lr].texture&&(Fr=It[Nr[lr].texture._texture.format]*St[Nr[lr].texture._texture.type],dr===null&&(dr=Fr));return ht(en),ht(Qr),ht(yn),pt(vr),vr.width=hr,vr.height=Or,vr.colorAttachments=Nr,vr.depthAttachment=en,vr.stencilAttachment=Qr,vr.depthStencilAttachment=yn,sr.color=Nr.map(Lt),sr.depth=Lt(en),sr.stencil=Lt(Qr),sr.depthStencil=Lt(yn),sr.width=vr.width,sr.height=vr.height,zt(vr),sr}var vr=new Ze;return Ce.framebufferCount++,sr(Ut,Xt),N(sr,{resize:function(pr,ar){var lr=Math.max(0|pr,1),hr=Math.max(0|ar||lr,1);if(lr===vr.width&&hr===vr.height)return sr;for(var Or=vr.colorAttachments,dr=0;dr<Or.length;++dr)Et(Or[dr],lr,hr);return Et(vr.depthAttachment,lr,hr),Et(vr.stencilAttachment,lr,hr),Et(vr.depthStencilAttachment,lr,hr),vr.width=sr.width=lr,vr.height=sr.height=hr,zt(vr),sr},_reglType:"framebuffer",_framebuffer:vr,destroy:function(){Ct(vr),pt(vr)},use:function(pr){ze.setFBO({framebuffer:sr},pr)}})}var ze={cur:null,next:null,dirty:!1,setFBO:null},st=["rgba"],yt=["rgba4","rgb565","rgb5 a1"];Xe.ext_srgb&&yt.push("srgba"),Xe.ext_color_buffer_half_float&&yt.push("rgba16f","rgb16f"),Xe.webgl_color_buffer_float&&yt.push("rgba32f");var Dt=["uint8"];Xe.oes_texture_half_float&&Dt.push("half float","float16"),Xe.oes_texture_float&&Dt.push("float","float32");var jt=0,or={};return N(ze,{getFramebuffer:function(Ut){return typeof Ut=="function"&&Ut._reglType==="framebuffer"&&(Ut=Ut._framebuffer)instanceof Ze?Ut:null},create:Gt,createCube:function(Ut){function Xt(vr){var pr,ar={color:null},lr=0,hr=null;pr="rgba";var Or="uint8",dr=1;if(typeof vr=="number"?lr=0|vr:vr?("shape"in vr?lr=vr.shape[0]:("radius"in vr&&(lr=0|vr.radius),"width"in vr?lr=0|vr.width:"height"in vr&&(lr=0|vr.height)),("color"in vr||"colors"in vr)&&(hr=vr.color||vr.colors,Array.isArray(hr)),hr||("colorCount"in vr&&(dr=0|vr.colorCount),"colorType"in vr&&(Or=vr.colorType),"colorFormat"in vr&&(pr=vr.colorFormat)),"depth"in vr&&(ar.depth=vr.depth),"stencil"in vr&&(ar.stencil=vr.stencil),"depthStencil"in vr&&(ar.depthStencil=vr.depthStencil)):lr=1,hr)if(Array.isArray(hr))for(vr=[],pr=0;pr<hr.length;++pr)vr[pr]=hr[pr];else vr=[hr];else for(vr=Array(dr),hr={radius:lr,format:pr,type:Or},pr=0;pr<dr;++pr)vr[pr]=Le.createCube(hr);for(ar.color=Array(vr.length),pr=0;pr<vr.length;++pr)dr=vr[pr],lr=lr||dr.width,ar.color[pr]={target:34069,data:vr[pr]};for(pr=0;6>pr;++pr){for(dr=0;dr<vr.length;++dr)ar.color[dr].target=34069+pr;0<pr&&(ar.depth=sr[0].depth,ar.stencil=sr[0].stencil,ar.depthStencil=sr[0].depthStencil),sr[pr]?sr[pr](ar):sr[pr]=Gt(ar)}return N(Xt,{width:lr,height:lr,color:vr})}var sr=Array(6);return Xt(Ut),N(Xt,{faces:sr,resize:function(vr){var pr=0|vr;if(pr===Xt.width)return Xt;var ar=Xt.color;for(vr=0;vr<ar.length;++vr)ar[vr].resize(pr);for(vr=0;6>vr;++vr)sr[vr].resize(pr);return Xt.width=Xt.height=pr,Xt},_reglType:"framebufferCube",destroy:function(){sr.forEach(function(vr){vr.destroy()})}})},clear:function(){se(or).forEach(Ct)},restore:function(){ze.cur=null,ze.next=null,ze.dirty=!0,se(or).forEach(function(Ut){Ut.framebuffer=Re.createFramebuffer(),zt(Ut)})}})}function I(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function P(Re,Xe,ke,Le,Ie,Ce,Je){function it(){this.id=++kt,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var Et=Xe.oes_vertex_array_object;this.vao=Et?Et.createVertexArrayOES():null,ot[this.id]=this,this.buffers=[]}var ht=ke.maxAttributes,ut=Array(ht);for(ke=0;ke<ht;++ke)ut[ke]=new I;var kt=0,ot={},Lt={Record:I,scope:{},state:ut,currentVAO:null,targetVAO:null,restore:Xe.oes_vertex_array_object?function(){Xe.oes_vertex_array_object&&se(ot).forEach(function(Et){Et.refresh()})}:function(){},createVAO:function(Et){function Ze(Ct){var zt;Array.isArray(Ct)?(zt=Ct,pt.elements&&pt.ownsElements&&pt.elements.destroy(),pt.elements=null,pt.ownsElements=!1,pt.offset=0,pt.count=0,pt.instances=-1,pt.primitive=4):(Ct.elements?(zt=Ct.elements,pt.ownsElements?(typeof zt=="function"&&zt._reglType==="elements"?pt.elements.destroy():pt.elements(zt),pt.ownsElements=!1):Ce.getElements(Ct.elements)?(pt.elements=Ct.elements,pt.ownsElements=!1):(pt.elements=Ce.create(Ct.elements),pt.ownsElements=!0)):(pt.elements=null,pt.ownsElements=!1),zt=Ct.attributes,pt.offset=0,pt.count=-1,pt.instances=-1,pt.primitive=4,pt.elements&&(pt.count=pt.elements._elements.vertCount,pt.primitive=pt.elements._elements.primType),"offset"in Ct&&(pt.offset=0|Ct.offset),"count"in Ct&&(pt.count=0|Ct.count),"instances"in Ct&&(pt.instances=0|Ct.instances),"primitive"in Ct&&(pt.primitive=Ee[Ct.primitive])),Ct={};var Gt=pt.attributes;Gt.length=zt.length;for(var ze=0;ze<zt.length;++ze){var st,yt=zt[ze],Dt=Gt[ze]=new I,jt=yt.data||yt;Array.isArray(jt)||ne(jt)||r(jt)?(pt.buffers[ze]&&(st=pt.buffers[ze],ne(jt)&&st._buffer.byteLength>=jt.byteLength?st.subdata(jt):(st.destroy(),pt.buffers[ze]=null)),pt.buffers[ze]||(st=pt.buffers[ze]=Ie.create(yt,34962,!1,!0)),Dt.buffer=Ie.getBuffer(st),Dt.size=0|Dt.buffer.dimension,Dt.normalized=!1,Dt.type=Dt.buffer.dtype,Dt.offset=0,Dt.stride=0,Dt.divisor=0,Dt.state=1,Ct[ze]=1):Ie.getBuffer(yt)?(Dt.buffer=Ie.getBuffer(yt),Dt.size=0|Dt.buffer.dimension,Dt.normalized=!1,Dt.type=Dt.buffer.dtype,Dt.offset=0,Dt.stride=0,Dt.divisor=0,Dt.state=1):Ie.getBuffer(yt.buffer)?(Dt.buffer=Ie.getBuffer(yt.buffer),Dt.size=0|(+yt.size||Dt.buffer.dimension),Dt.normalized=!!yt.normalized||!1,Dt.type="type"in yt?ce[yt.type]:Dt.buffer.dtype,Dt.offset=0|(yt.offset||0),Dt.stride=0|(yt.stride||0),Dt.divisor=0|(yt.divisor||0),Dt.state=1):"x"in yt&&(Dt.x=+yt.x||0,Dt.y=+yt.y||0,Dt.z=+yt.z||0,Dt.w=+yt.w||0,Dt.state=2)}for(st=0;st<pt.buffers.length;++st)!Ct[st]&&pt.buffers[st]&&(pt.buffers[st].destroy(),pt.buffers[st]=null);return pt.refresh(),Ze}var pt=new it;return Le.vaoCount+=1,Ze.destroy=function(){for(var Ct=0;Ct<pt.buffers.length;++Ct)pt.buffers[Ct]&&pt.buffers[Ct].destroy();pt.buffers.length=0,pt.ownsElements&&(pt.elements.destroy(),pt.elements=null,pt.ownsElements=!1),pt.destroy()},Ze._vao=pt,Ze._reglType="vao",Ze(Et)},getVAO:function(Et){return typeof Et=="function"&&Et._vao?Et._vao:null},destroyBuffer:function(Et){for(var Ze=0;Ze<ut.length;++Ze){var pt=ut[Ze];pt.buffer===Et&&(Re.disableVertexAttribArray(Ze),pt.buffer=null)}},setVAO:Xe.oes_vertex_array_object?function(Et){if(Et!==Lt.currentVAO){var Ze=Xe.oes_vertex_array_object;Et?Ze.bindVertexArrayOES(Et.vao):Ze.bindVertexArrayOES(null),Lt.currentVAO=Et}}:function(Et){if(Et!==Lt.currentVAO){if(Et)Et.bindAttrs();else{for(var Ze=Xe.angle_instanced_arrays,pt=0;pt<ut.length;++pt){var Ct=ut[pt];Ct.buffer?(Re.enableVertexAttribArray(pt),Ct.buffer.bind(),Re.vertexAttribPointer(pt,Ct.size,Ct.type,Ct.normalized,Ct.stride,Ct.offfset),Ze&&Ct.divisor&&Ze.vertexAttribDivisorANGLE(pt,Ct.divisor)):(Re.disableVertexAttribArray(pt),Re.vertexAttrib4f(pt,Ct.x,Ct.y,Ct.z,Ct.w))}Je.elements?Re.bindBuffer(34963,Je.elements.buffer.buffer):Re.bindBuffer(34963,null)}Lt.currentVAO=Et}},clear:Xe.oes_vertex_array_object?function(){se(ot).forEach(function(Et){Et.destroy()})}:function(){}};return it.prototype.bindAttrs=function(){for(var Et=Xe.angle_instanced_arrays,Ze=this.attributes,pt=0;pt<Ze.length;++pt){var Ct=Ze[pt];Ct.buffer?(Re.enableVertexAttribArray(pt),Re.bindBuffer(34962,Ct.buffer.buffer),Re.vertexAttribPointer(pt,Ct.size,Ct.type,Ct.normalized,Ct.stride,Ct.offset),Et&&Ct.divisor&&Et.vertexAttribDivisorANGLE(pt,Ct.divisor)):(Re.disableVertexAttribArray(pt),Re.vertexAttrib4f(pt,Ct.x,Ct.y,Ct.z,Ct.w))}for(Et=Ze.length;Et<ht;++Et)Re.disableVertexAttribArray(Et);(Et=Ce.getElements(this.elements))?Re.bindBuffer(34963,Et.buffer.buffer):Re.bindBuffer(34963,null)},it.prototype.refresh=function(){var Et=Xe.oes_vertex_array_object;Et&&(Et.bindVertexArrayOES(this.vao),this.bindAttrs(),Lt.currentVAO=null,Et.bindVertexArrayOES(null))},it.prototype.destroy=function(){if(this.vao){var Et=Xe.oes_vertex_array_object;this===Lt.currentVAO&&(Lt.currentVAO=null,Et.bindVertexArrayOES(null)),Et.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),ot[this.id]&&(delete ot[this.id],--Le.vaoCount)},Lt}function S(Re,Xe,ke,Le){function Ie(Ze,pt,Ct,zt){this.name=Ze,this.id=pt,this.location=Ct,this.info=zt}function Ce(Ze,pt){for(var Ct=0;Ct<Ze.length;++Ct)if(Ze[Ct].id===pt.id)return void(Ze[Ct].location=pt.location);Ze.push(pt)}function Je(Ze,pt,Ct){if(!(Gt=(Ct=Ze===35632?ut:kt)[pt])){var zt=Xe.str(pt),Gt=Re.createShader(Ze);Re.shaderSource(Gt,zt),Re.compileShader(Gt),Ct[pt]=Gt}return Gt}function it(Ze,pt){this.id=Et++,this.fragId=Ze,this.vertId=pt,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Le.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function ht(Ze,pt,Ct){var zt;zt=Je(35632,Ze.fragId);var Gt=Je(35633,Ze.vertId);if(pt=Ze.program=Re.createProgram(),Re.attachShader(pt,zt),Re.attachShader(pt,Gt),Ct)for(zt=0;zt<Ct.length;++zt)Gt=Ct[zt],Re.bindAttribLocation(pt,Gt[0],Gt[1]);Re.linkProgram(pt),Gt=Re.getProgramParameter(pt,35718),Le.profile&&(Ze.stats.uniformsCount=Gt);var ze=Ze.uniforms;for(zt=0;zt<Gt;
1209++zt)if(Ct=Re.getActiveUniform(pt,zt)){if(1<Ct.size)for(var st=0;st<Ct.size;++st){var yt=Ct.name.replace("[0]","["+st+"]");Ce(ze,new Ie(yt,Xe.id(yt),Re.getUniformLocation(pt,yt),Ct))}st=Ct.name,1<Ct.size&&(st=st.replace("[0]","")),Ce(ze,new Ie(st,Xe.id(st),Re.getUniformLocation(pt,st),Ct))}for(Gt=Re.getProgramParameter(pt,35721),Le.profile&&(Ze.stats.attributesCount=Gt),Ze=Ze.attributes,zt=0;zt<Gt;++zt)(Ct=Re.getActiveAttrib(pt,zt))&&Ce(Ze,new Ie(Ct.name,Xe.id(Ct.name),Re.getAttribLocation(pt,Ct.name),Ct))}var ut={},kt={},ot={},Lt=[],Et=0;return Le.profile&&(ke.getMaxUniformsCount=function(){var Ze=0;return Lt.forEach(function(pt){pt.stats.uniformsCount>Ze&&(Ze=pt.stats.uniformsCount)}),Ze},ke.getMaxAttributesCount=function(){var Ze=0;return Lt.forEach(function(pt){pt.stats.attributesCount>Ze&&(Ze=pt.stats.attributesCount)}),Ze}),{clear:function(){var Ze=Re.deleteShader.bind(Re);se(ut).forEach(Ze),ut={},se(kt).forEach(Ze),kt={},Lt.forEach(function(pt){Re.deleteProgram(pt.program)}),Lt.length=0,ot={},ke.shaderCount=0},program:function(Ze,pt,Ct,zt){var Gt=ot[pt];Gt||(Gt=ot[pt]={});var ze=Gt[Ze];if(ze&&(ze.refCount++,!zt))return ze;var st=new it(pt,Ze);return ke.shaderCount++,ht(st,Ct,zt),ze||(Gt[Ze]=st),Lt.push(st),N(st,{destroy:function(){if(st.refCount--,0>=st.refCount){Re.deleteProgram(st.program);var yt=Lt.indexOf(st);Lt.splice(yt,1),ke.shaderCount--}0>=Gt[st.vertId].refCount&&(Re.deleteShader(kt[st.vertId]),delete kt[st.vertId],delete ot[st.fragId][st.vertId]),Object.keys(ot[st.fragId]).length||(Re.deleteShader(ut[st.fragId]),delete ut[st.fragId],delete ot[st.fragId])}})},restore:function(){ut={},kt={};for(var Ze=0;Ze<Lt.length;++Ze)ht(Lt[Ze],null,Lt[Ze].attributes.map(function(pt){return[pt.location,pt.name]}))},shader:Je,frag:-1,vert:-1}}function E(Re,Xe,ke,Le,Ie,Ce,Je){function it(ht){var ut;ut=Xe.next===null?5121:Xe.next.colorAttachments[0].texture._texture.type;var kt=0,ot=0,Lt=Le.framebufferWidth,Et=Le.framebufferHeight,Ze=null;return ne(ht)?Ze=ht:ht&&(kt=0|ht.x,ot=0|ht.y,Lt=0|(ht.width||Le.framebufferWidth-kt),Et=0|(ht.height||Le.framebufferHeight-ot),Ze=ht.data||null),ke(),ht=Lt*Et*4,Ze||(ut===5121?Ze=new Uint8Array(ht):ut===5126&&(Ze=Ze||new Float32Array(ht))),Re.pixelStorei(3333,4),Re.readPixels(kt,ot,Lt,Et,6408,ut,Ze),Ze}return function(ht){return ht&&"framebuffer"in ht?function(ut){var kt;return Xe.setFBO({framebuffer:ut.framebuffer},function(){kt=it(ut)}),kt}(ht):it(ht)}}function D(Re){return Array.prototype.slice.call(Re)}function F(Re){return D(Re).join("")}function H(Re){return Array.isArray(Re)||ne(Re)||r(Re)}function V(Re){return Re.sort(function(Xe,ke){return Xe==="viewport"?-1:ke==="viewport"?1:Xe<ke?-1:1})}function Z(Re,Xe,ke,Le){this.thisDep=Re,this.contextDep=Xe,this.propDep=ke,this.append=Le}function K(Re){return Re&&!(Re.thisDep||Re.contextDep||Re.propDep)}function q(Re){return new Z(!1,!1,!1,Re)}function W(Re,Xe){var ke=Re.type;if(ke===0)return new Z(!0,1<=(ke=Re.data.length),2<=ke,Xe);if(ke===4)return new Z((ke=Re.data).thisDep,ke.contextDep,ke.propDep,Xe);if(ke===5)return new Z(!1,!1,!1,Xe);if(ke===6){for(var Le=ke=!1,Ie=!1,Ce=0;Ce<Re.data.length;++Ce){var Je=Re.data[Ce];Je.type===1?Ie=!0:Je.type===2?Le=!0:Je.type===3?ke=!0:Je.type===0?(ke=!0,1<=(Je=Je.data)&&(Le=!0),2<=Je&&(Ie=!0)):Je.type===4&&(ke=ke||Je.data.thisDep,Le=Le||Je.data.contextDep,Ie=Ie||Je.data.propDep)}return new Z(ke,Le,Ie,Xe)}return new Z(ke===3,ke===2,ke===1,Xe)}function $(Re,Xe,ke,Le,Ie,Ce,Je,it,ht,ut,kt,ot,Lt,Et,Ze){function pt(Pt){return Pt.replace(".","_")}function Ct(Pt,Yt,cr){var wr=pt(Pt);Qr.push(Pt),en[wr]=Nr[wr]=!!cr,yn[wr]=Yt}function zt(Pt,Yt,cr){var wr=pt(Pt);Qr.push(Pt),Array.isArray(cr)?(Nr[wr]=cr.slice(),en[wr]=cr.slice()):Nr[wr]=en[wr]=cr,un[wr]=Yt}function Gt(){var Pt=function(){function Mr(){var zr=[],Wr=[];return N(function(){zr.push.apply(zr,D(arguments))},{def:function(){var mn="v"+Gr++;return Wr.push(mn),0<arguments.length&&(zr.push(mn,"="),zr.push.apply(zr,D(arguments)),zr.push(";")),mn},toString:function(){return F([0<Wr.length?"var "+Wr.join(",")+";":"",F(zr)])}})}function Cr(){function zr(aa,qn){mn(aa,qn,"=",Wr.def(aa,qn),";")}var Wr=Mr(),mn=Mr(),pn=Wr.toString,Pn=mn.toString;return N(function(){Wr.apply(Wr,D(arguments))},{def:Wr.def,entry:Wr,exit:mn,save:zr,set:function(aa,qn,vn){zr(aa,qn),Wr(aa,qn,"=",vn,";")},toString:function(){return pn()+Pn()}})}var Gr=0,cn=[],wn=[],Kr=Mr(),bn={};return{global:Kr,link:function(zr){for(var Wr=0;Wr<wn.length;++Wr)if(wn[Wr]===zr)return cn[Wr];return Wr="g"+Gr++,cn.push(Wr),wn.push(zr),Wr},block:Mr,proc:function(zr,Wr){function mn(){var qn="a"+pn.length;return pn.push(qn),qn}var pn=[];Wr=Wr||0;for(var Pn=0;Pn<Wr;++Pn)mn();var aa=(Pn=Cr()).toString;return bn[zr]=N(Pn,{arg:mn,toString:function(){return F(["function(",pn.join(),"){",aa(),"}"])}})},scope:Cr,cond:function(){var zr=F(arguments),Wr=Cr(),mn=Cr(),pn=Wr.toString,Pn=mn.toString;return N(Wr,{then:function(){return Wr.apply(Wr,D(arguments)),this},else:function(){return mn.apply(mn,D(arguments)),this},toString:function(){var aa=Pn();return aa&&(aa="else{"+aa+"}"),F(["if(",zr,"){",pn(),"}",aa])}})},compile:function(){var zr=['"use strict";',Kr,"return {"];
1209Object.keys(bn).forEach(function(mn){zr.push('"',mn,'":',bn[mn].toString(),",")}),zr.push("}");var Wr=F(zr).replace(/;/g,`;
1210`).replace(/}/g,`}
1211`).replace(/{/g,`{
1212`);return Function.apply(null,cn.concat(Wr)).apply(null,wn)}}}(),Yt=Pt.link,cr=Pt.global;Pt.id=Qt++,Pt.batchId="0";var wr=Yt($r),qr=Pt.shared={props:"a0"};Object.keys($r).forEach(function(Mr){qr[Mr]=cr.def(wr,".",Mr)});var Ur=Pt.next={},br=Pt.current={};Object.keys(un).forEach(function(Mr){Array.isArray(Nr[Mr])&&(Ur[Mr]=cr.def(qr.next,".",Mr),br[Mr]=cr.def(qr.current,".",Mr))});var _r=Pt.constants={};Object.keys(In).forEach(function(Mr){_r[Mr]=cr.def(JSON.stringify(In[Mr]))}),Pt.invoke=function(Mr,Cr){switch(Cr.type){case 0:var Gr=["this",qr.context,qr.props,Pt.batchId];return Mr.def(Yt(Cr.data),".call(",Gr.slice(0,Math.max(Cr.data.length+1,4)),")");case 1:return Mr.def(qr.props,Cr.data);case 2:return Mr.def(qr.context,Cr.data);case 3:return Mr.def("this",Cr.data);case 4:return Cr.data.append(Pt,Mr),Cr.data.ref;case 5:return Cr.data.toString();case 6:return Cr.data.map(function(cn){return Pt.invoke(Mr,cn)})}},Pt.attribCache={};var Ar={};return Pt.scopeAttrib=function(Mr){if((Mr=Xe.id(Mr))in Ar)return Ar[Mr];var Cr=ut.scope[Mr];return Cr||(Cr=ut.scope[Mr]=new Ln),Ar[Mr]=Yt(Cr)},Pt}function ze(Pt,Yt){var cr=Pt.static,wr=Pt.dynamic;if("framebuffer"in cr){var qr=cr.framebuffer;return qr?(qr=it.getFramebuffer(qr),q(function(br,_r){var Ar=br.link(qr),Mr=br.shared;return _r.set(Mr.framebuffer,".next",Ar),Mr=Mr.context,_r.set(Mr,".framebufferWidth",Ar+".width"),_r.set(Mr,".framebufferHeight",Ar+".height"),Ar})):q(function(br,_r){var Ar=br.shared;return _r.set(Ar.framebuffer,".next","null"),Ar=Ar.context,_r.set(Ar,".framebufferWidth",Ar+".drawingBufferWidth"),_r.set(Ar,".framebufferHeight",Ar+".drawingBufferHeight"),"null"})}if("framebuffer"in wr){var Ur=wr.framebuffer;return W(Ur,function(br,_r){var Ar=br.invoke(_r,Ur),Mr=br.shared,Cr=Mr.framebuffer;return Ar=_r.def(Cr,".getFramebuffer(",Ar,")"),_r.set(Cr,".next",Ar),Mr=Mr.context,_r.set(Mr,".framebufferWidth",Ar+"?"+Ar+".width:"+Mr+".drawingBufferWidth"),_r.set(Mr,".framebufferHeight",Ar+"?"+Ar+".height:"+Mr+".drawingBufferHeight"),Ar})}return null}function st(Pt,Yt,cr){function wr(Mr){if(Mr in qr){var Cr=Xe.id(qr[Mr]);return(Mr=q(function(){return Cr})).id=Cr,Mr}if(Mr in Ur){var Gr=Ur[Mr];return W(Gr,function(cn,wn){var Kr=cn.invoke(wn,Gr);return wn.def(cn.shared.strings,".id(",Kr,")")})}return null}var qr=Pt.static,Ur=Pt.dynamic,br=wr("frag"),_r=wr("vert"),Ar=null;return K(br)&&K(_r)?(Ar=kt.program(_r.id,br.id,null,cr),Pt=q(function(Mr,Cr){return Mr.link(Ar)})):Pt=new Z(br&&br.thisDep||_r&&_r.thisDep,br&&br.contextDep||_r&&_r.contextDep,br&&br.propDep||_r&&_r.propDep,function(Mr,Cr){var Gr,cn,wn=Mr.shared.shader;return Gr=br?br.append(Mr,Cr):Cr.def(wn,".","frag"),cn=_r?_r.append(Mr,Cr):Cr.def(wn,".","vert"),Cr.def(wn+".program("+cn+","+Gr+")")}),{frag:br,vert:_r,progVar:Pt,program:Ar}}function yt(Pt,Yt){function cr(Kr,bn){if(Kr in wr){var zr=0|wr[Kr];return bn?Ur.offset=zr:Ur.instances=zr,q(function(mn,pn){return bn&&(mn.OFFSET=zr),zr})}if(Kr in qr){var Wr=qr[Kr];return W(Wr,function(mn,pn){var Pn=mn.invoke(pn,Wr);return bn&&(mn.OFFSET=Pn),Pn})}if(bn){if(Ar)return q(function(mn,pn){return mn.OFFSET=0});if(br)return new Z(_r.thisDep,_r.contextDep,_r.propDep,function(mn,pn){return pn.def(mn.shared.vao+".currentVAO?"+mn.shared.vao+".currentVAO.offset:0")})}else if(br)return new Z(_r.thisDep,_r.contextDep,_r.propDep,function(mn,pn){return pn.def(mn.shared.vao+".currentVAO?"+mn.shared.vao+".currentVAO.instances:-1")});return null}var wr=Pt.static,qr=Pt.dynamic,Ur={},br=!1,_r=function(){if("vao"in wr){var Kr=wr.vao;return Kr!==null&&ut.getVAO(Kr)===null&&(Kr=ut.createVAO(Kr)),br=!0,Ur.vao=Kr,q(function(zr){var Wr=ut.getVAO(Kr);return Wr?zr.link(Wr):"null"})}if("vao"in qr){br=!0;var bn=qr.vao;return W(bn,function(zr,Wr){var mn=zr.invoke(Wr,bn);return Wr.def(zr.shared.vao+".getVAO("+mn+")")})}return null}(),Ar=!1,Mr=function(){if("elements"in wr){var Kr=wr.elements;if(Ur.elements=Kr,H(Kr)){var bn=Ur.elements=Ce.create(Kr,!0);Kr=Ce.getElements(bn),Ar=!0}else Kr&&(Kr=Ce.getElements(Kr),Ar=!0);return(bn=q(function(Wr,mn){if(Kr){var pn=Wr.link(Kr);return Wr.ELEMENTS=pn}return Wr.ELEMENTS=null})).value=Kr,bn}if("elements"in qr){Ar=!0;var zr=qr.elements;return W(zr,function(Wr,mn){var pn=(Pn=Wr.shared).isBufferArgs,Pn=Pn.elements,aa=Wr.invoke(mn,zr),qn=mn.def("null");return pn=mn.def(pn,"(",aa,")"),aa=Wr.cond(pn).then(qn,"=",Pn,".createStream(",aa,");").else(qn,"=",Pn,".getElements(",aa,");"),mn.entry(aa),mn.exit(Wr.cond(pn).then(Pn,".destroyStream(",qn,");")),Wr.ELEMENTS=qn})}return br?new Z(_r.thisDep,_r.contextDep,_r.propDep,function(Wr,mn){return mn.def(Wr.shared.vao+".currentVAO?"+Wr.shared.elements+".getElements("+Wr.shared.vao+".currentVAO.elements):null")}):null}(),Cr=cr("offset",!0),Gr=function(){if("primitive"in wr){var Kr=wr.primitive;return Ur.primitive=Kr,q(function(zr,Wr){return Ee[Kr]})}if("primitive"in qr){var bn=qr.primitive;return W(bn,function(zr,Wr){var mn=zr.constants.primTypes,pn=zr.invoke(Wr,bn);return Wr.def(mn,"[",pn,"]")})}return Ar?K(Mr)?Mr.value?q(function(zr,Wr){return Wr.def(zr.ELEMENTS,".primType")}):q(function(){return 4}):new Z(Mr.thisDep,Mr.contextDep,Mr.propDep,function(zr,Wr){var mn=zr.ELEMENTS;return Wr.def(mn,"?",mn,".primType:",4)}):br?new Z(_r.thisDep,_r.contextDep,_r.propDep,function(zr,Wr){return Wr.def(zr.shared.vao+".currentVAO?"+zr.shared.vao+".currentVAO.primitive:4")}):null}(),cn=function(){if("count"in wr){var Kr=0|wr.count;return Ur.count=Kr,q(function(){return Kr})}if("count"in qr){var bn=qr.count;return W(bn,function(zr,Wr){return zr.invoke(Wr,bn)})}return Ar?K(Mr)?Mr?Cr?new Z(Cr.thisDep,Cr.contextDep,Cr.propDep,function(zr,Wr){return Wr.def(zr.ELEMENTS,".vertCount-",zr.OFFSET)}):q(function(zr,Wr){return Wr.def(zr.ELEMENTS,".vertCount")}):q(function(){return-1}):new Z(Mr.thisDep||Cr.thisDep,Mr.contextDep||Cr.contextDep,Mr.propDep||Cr.propDep,function(zr,Wr){var mn=zr.ELEMENTS;return zr.OFFSET?Wr.def(mn,"?",mn,".vertCount-",zr.OFFSET,":-1"):Wr.def(mn,"?",mn,".vertCount:-1")}):br?new Z(_r.thisDep,_r.contextDep,_r.propDep,function(zr,Wr){return Wr.def(zr.shared.vao,".currentVAO?",zr.shared.vao,".currentVAO.count:-1")}):null}(),wn=cr("instances",!1);return{elements:Mr,primitive:Gr,count:cn,instances:wn,offset:Cr,vao:_r,vaoActive:br,elementsActive:Ar,static:Ur}}function Dt(Pt,Yt){var cr=Pt.static,wr=Pt.dynamic,qr={};return Object.keys(cr).forEach(function(Ur){var br=cr[Ur],_r=Xe.id(Ur),Ar=new Ln;
1212if(H(br))Ar.state=1,Ar.buffer=Ie.getBuffer(Ie.create(br,34962,!1,!0)),Ar.type=0;else if(Cr=Ie.getBuffer(br))Ar.state=1,Ar.buffer=Cr,Ar.type=0;else if("constant"in br){var Mr=br.constant;Ar.buffer="null",Ar.state=2,typeof Mr=="number"?Ar.x=Mr:rt.forEach(function(zr,Wr){Wr<Mr.length&&(Ar[zr]=Mr[Wr])})}else{var Cr=H(br.buffer)?Ie.getBuffer(Ie.create(br.buffer,34962,!1,!0)):Ie.getBuffer(br.buffer),Gr=0|br.offset,cn=0|br.stride,wn=0|br.size,Kr=!!br.normalized,bn=0;"type"in br&&(bn=ce[br.type]),br=0|br.divisor,Ar.buffer=Cr,Ar.state=1,Ar.size=wn,Ar.normalized=Kr,Ar.type=bn||Cr.dtype,Ar.offset=Gr,Ar.stride=cn,Ar.divisor=br}qr[Ur]=q(function(zr,Wr){var mn=zr.attribCache;if(_r in mn)return mn[_r];var pn={isStream:!1};return Object.keys(Ar).forEach(function(Pn){pn[Pn]=Ar[Pn]}),Ar.buffer&&(pn.buffer=zr.link(Ar.buffer),pn.type=pn.type||pn.buffer+".dtype"),mn[_r]=pn})}),Object.keys(wr).forEach(function(Ur){var br=wr[Ur];qr[Ur]=W(br,function(_r,Ar){function Mr(mn){Ar(Kr[mn],"=",Cr,".",mn,"|0;")}var Cr=_r.invoke(Ar,br),Gr=_r.shared,cn=_r.constants,wn=Gr.isBufferArgs,Kr=(Gr=Gr.buffer,{isStream:Ar.def(!1)}),bn=new Ln;bn.state=1,Object.keys(bn).forEach(function(mn){Kr[mn]=Ar.def(""+bn[mn])});var zr=Kr.buffer,Wr=Kr.type;return Ar("if(",wn,"(",Cr,")){",Kr.isStream,"=true;",zr,"=",Gr,".createStream(",34962,",",Cr,");",Wr,"=",zr,".dtype;","}else{",zr,"=",Gr,".getBuffer(",Cr,");","if(",zr,"){",Wr,"=",zr,".dtype;",'}else if("constant" in ',Cr,"){",Kr.state,"=",2,";","if(typeof "+Cr+'.constant === "number"){',Kr[rt[0]],"=",Cr,".constant;",rt.slice(1).map(function(mn){return Kr[mn]}).join("="),"=0;","}else{",rt.map(function(mn,pn){return Kr[mn]+"="+Cr+".constant.length>"+pn+"?"+Cr+".constant["+pn+"]:0;"}).join(""),"}}else{","if(",wn,"(",Cr,".buffer)){",zr,"=",Gr,".createStream(",34962,",",Cr,".buffer);","}else{",zr,"=",Gr,".getBuffer(",Cr,".buffer);","}",Wr,'="type" in ',Cr,"?",cn.glTypes,"[",Cr,".type]:",zr,".dtype;",Kr.normalized,"=!!",Cr,".normalized;"),Mr("size"),Mr("offset"),Mr("stride"),Mr("divisor"),Ar("}}"),Ar.exit("if(",Kr.isStream,"){",Gr,".destroyStream(",zr,");","}"),Kr})}),qr}function jt(Pt,Yt,cr,wr,qr){function Ur(bn){var zr=_r[bn];zr&&(Mr[bn]=zr)}var br=function(bn,zr){if(typeof(Wr=bn.static).frag=="string"&&typeof Wr.vert=="string"){if(0<Object.keys(zr.dynamic).length)return null;var Wr=zr.static,mn=Object.keys(Wr);if(0<mn.length&&typeof Wr[mn[0]]=="number"){for(var pn=[],Pn=0;Pn<mn.length;++Pn)pn.push([0|Wr[mn[Pn]],mn[Pn]]);return pn}}return null}(Pt,Yt),_r=function(bn,zr,Wr){function mn(qn){if(qn in pn){var vn=pn[qn];qn=!0;var ea,ua,Ya=0|vn.x,Ei=0|vn.y;return"width"in vn?ea=0|vn.width:qn=!1,"height"in vn?ua=0|vn.height:qn=!1,new Z(!qn&&zr&&zr.thisDep,!qn&&zr&&zr.contextDep,!qn&&zr&&zr.propDep,function(gi,ka){var Fa=gi.shared.context,so=ea;"width"in vn||(so=ka.def(Fa,".","framebufferWidth","-",Ya));var Do=ua;return"height"in vn||(Do=ka.def(Fa,".","framebufferHeight","-",Ei)),[Ya,Ei,so,Do]})}if(qn in Pn){var ei=Pn[qn];return qn=W(ei,function(gi,ka){var Fa=gi.invoke(ka,ei),so=gi.shared.context,Do=ka.def(Fa,".x|0"),qo=ka.def(Fa,".y|0");return[Do,qo,ka.def('"width" in ',Fa,"?",Fa,".width|0:","(",so,".","framebufferWidth","-",Do,")"),Fa=ka.def('"height" in ',Fa,"?",Fa,".height|0:","(",so,".","framebufferHeight","-",qo,")")]}),zr&&(qn.thisDep=qn.thisDep||zr.thisDep,qn.contextDep=qn.contextDep||zr.contextDep,qn.propDep=qn.propDep||zr.propDep),qn}return zr?new Z(zr.thisDep,zr.contextDep,zr.propDep,function(gi,ka){var Fa=gi.shared.context;return[0,0,ka.def(Fa,".","framebufferWidth"),ka.def(Fa,".","framebufferHeight")]}):null}var pn=bn.static,Pn=bn.dynamic;if(bn=mn("viewport")){var aa=bn;bn=new Z(bn.thisDep,bn.contextDep,bn.propDep,function(qn,vn){var ea=aa.append(qn,vn),ua=qn.shared.context;return vn.set(ua,".viewportWidth",ea[2]),vn.set(ua,".viewportHeight",ea[3]),ea})}return{viewport:bn,scissor_box:mn("scissor.box")}}(Pt,Gr=ze(Pt)),Ar=yt(Pt),Mr=function(bn,zr){var Wr=bn.static,mn=bn.dynamic,pn={};return Qr.forEach(function(Pn){function aa(vn,ea){if(Pn in Wr){var ua=vn(Wr[Pn]);pn[qn]=q(function(){return ua})}else if(Pn in mn){var Ya=mn[Pn];pn[qn]=W(Ya,function(Ei,ei){return ea(Ei,ei,Ei.invoke(ei,Ya))})}}var qn=pt(Pn);switch(Pn){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return aa(function(vn){return vn},function(vn,ea,ua){return ua});case"depth.func":return aa(function(vn){return Vt[vn]},function(vn,ea,ua){return ea.def(vn.constants.compareFuncs,"[",ua,"]")});case"depth.range":return aa(function(vn){return vn},function(vn,ea,ua){return[ea.def("+",ua,"[0]"),ea=ea.def("+",ua,"[1]")]});case"blend.func":return aa(function(vn){return[Tt["srcRGB"in vn?vn.srcRGB:vn.src],Tt["dstRGB"in vn?vn.dstRGB:vn.dst],Tt["
1212srcAlpha"in vn?vn.srcAlpha:vn.src],Tt["dstAlpha"in vn?vn.dstAlpha:vn.dst]]},function(vn,ea,ua){function Ya(ka,Fa){return ea.def('"',ka,Fa,'" in ',ua,"?",ua,".",ka,Fa,":",ua,".",ka)}vn=vn.constants.blendFuncs;var Ei=Ya("src","RGB"),ei=Ya("dst","RGB"),gi=(Ei=ea.def(vn,"[",Ei,"]"),ea.def(vn,"[",Ya("src","Alpha"),"]"));return[Ei,ei=ea.def(vn,"[",ei,"]"),gi,vn=ea.def(vn,"[",Ya("dst","Alpha"),"]")]});case"blend.equation":return aa(function(vn){return typeof vn=="string"?[_n[vn],_n[vn]]:typeof vn=="object"?[_n[vn.rgb],_n[vn.alpha]]:void 0},function(vn,ea,ua){var Ya=vn.constants.blendEquations,Ei=ea.def(),ei=ea.def();return(vn=vn.cond("typeof ",ua,'==="string"')).then(Ei,"=",ei,"=",Ya,"[",ua,"];"),vn.else(Ei,"=",Ya,"[",ua,".rgb];",ei,"=",Ya,"[",ua,".alpha];"),ea(vn),[Ei,ei]});case"blend.color":return aa(function(vn){return n(4,function(ea){return+vn[ea]})},function(vn,ea,ua){return n(4,function(Ya){return ea.def("+",ua,"[",Ya,"]")})});case"stencil.mask":return aa(function(vn){return 0|vn},function(vn,ea,ua){return ea.def(ua,"|0")});case"stencil.func":return aa(function(vn){return[Vt[vn.cmp||"keep"],vn.ref||0,"mask"in vn?vn.mask:-1]},function(vn,ea,ua){return[vn=ea.def('"cmp" in ',ua,"?",vn.constants.compareFuncs,"[",ua,".cmp]",":",7680),ea.def(ua,".ref|0"),ea=ea.def('"mask" in ',ua,"?",ua,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return aa(function(vn){return[Pn==="stencil.opBack"?1029:1028,Kt[vn.fail||"keep"],Kt[vn.zfail||"keep"],Kt[vn.zpass||"keep"]]},function(vn,ea,ua){function Ya(ei){return ea.def('"',ei,'" in ',ua,"?",Ei,"[",ua,".",ei,"]:",7680)}var Ei=vn.constants.stencilOps;return[Pn==="stencil.opBack"?1029:1028,Ya("fail"),Ya("zfail"),Ya("zpass")]});case"polygonOffset.offset":return aa(function(vn){return[0|vn.factor,0|vn.units]},function(vn,ea,ua){return[ea.def(ua,".factor|0"),ea=ea.def(ua,".units|0")]});case"cull.face":return aa(function(vn){var ea=0;return vn==="front"?ea=1028:vn==="back"&&(ea=1029),ea},function(vn,ea,ua){return ea.def(ua,'==="front"?',1028,":",1029)});case"lineWidth":return aa(function(vn){return vn},function(vn,ea,ua){return ua});case"frontFace":return aa(function(vn){return Be[vn]},function(vn,ea,ua){return ea.def(ua+'==="cw"?2304:2305')});case"colorMask":return aa(function(vn){return vn.map(function(ea){return!!ea})},function(vn,ea,ua){return n(4,function(Ya){return"!!"+ua+"["+Ya+"]"})});case"sample.coverage":return aa(function(vn){return["value"in vn?vn.value:1,!!vn.invert]},function(vn,ea,ua){return[ea.def('"value" in ',ua,"?+",ua,".value:1"),ea=ea.def("!!",ua,".invert")]})}}),pn}(Pt),Cr=st(Pt,0,br);Ur("viewport"),Ur(pt("scissor.box"));var Gr,cn=0<Object.keys(Mr).length;if((Gr={framebuffer:Gr,draw:Ar,shader:Cr,state:Mr,dirty:cn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}}).profile=function(bn){var zr,Wr=bn.static;if(bn=bn.dynamic,"profile"in Wr){var mn=!!Wr.profile;(zr=q(function(Pn,aa){return mn})).enable=mn}else if("profile"in bn){var pn=bn.profile;zr=W(pn,function(Pn,aa){return Pn.invoke(aa,pn)})}return zr}(Pt),Gr.uniforms=function(bn,zr){var Wr=bn.static,mn=bn.dynamic,pn={};return Object.keys(Wr).forEach(function(Pn){var aa,qn=Wr[Pn];if(typeof qn=="number"||typeof qn=="boolean")aa=q(function(){return qn});else if(typeof qn=="function"){var vn=qn._reglType;vn==="texture2d"||vn==="textureCube"?aa=q(function(ea){return ea.link(qn)}):vn!=="framebuffer"&&vn!=="framebufferCube"||(aa=q(function(ea){return ea.link(qn.color[0])}))}else p(qn)&&(aa=q(function(ea){return ea.global.def("[",n(qn.length,function(ua){return qn[ua]}),"]")}));aa.value=qn,pn[Pn]=aa}),Object.keys(mn).forEach(function(Pn){var aa=mn[Pn];pn[Pn]=W(aa,function(qn,vn){return qn.invoke(vn,aa)})}),pn}(cr),Gr.drawVAO=Gr.scopeVAO=Ar.vao,!Gr.drawVAO&&Cr.program&&!br&&ke.angle_instanced_arrays&&Ar.static.elements){var wn=!0;if(Pt=Cr.program.attributes.map(function(bn){return bn=Yt.static[bn],wn=wn&&!!bn,bn}),wn&&0<Pt.length){var Kr=ut.getVAO(ut.createVAO({attributes:Pt,elements:Ar.static.elements}));Gr.drawVAO=new Z(null,null,null,function(bn,zr){return bn.link(Kr)}),Gr.useVAO=!0}}return br?Gr.useVAO=!0:Gr.attributes=Dt(Yt),Gr.context=function(bn){var zr=bn.static,Wr=bn.dynamic,mn={};return Object.keys(zr).forEach(function(pn){var Pn=zr[pn];mn[pn]=q(function(aa,qn){return typeof Pn=="number"||typeof Pn=="boolean"?""+Pn:aa.link(Pn)})}),Object.keys(Wr).forEach(function(pn){var Pn=Wr[pn];mn[pn]=W(Pn,function(aa,qn){return aa.invoke(qn,Pn)})}),mn}(wr),Gr}function or(Pt,Yt,cr){var wr=Pt.shared.context,qr=Pt.scope();Object.keys(cr).forEach(function(Ur){Yt.save(wr,"."+Ur);var br=cr[Ur].append(Pt,Yt);
1212Array.isArray(br)?qr(wr,".",Ur,"=[",br.join(),"];"):qr(wr,".",Ur,"=",br,";")}),Yt(qr)}function Ut(Pt,Yt,cr,wr){var qr,Ur=(_r=Pt.shared).gl,br=_r.framebuffer;Ir&&(qr=Yt.def(_r.extensions,".webgl_draw_buffers"));var _r=(Ar=Pt.constants).drawBuffer,Ar=Ar.backBuffer;Pt=cr?cr.append(Pt,Yt):Yt.def(br,".next"),wr||Yt("if(",Pt,"!==",br,".cur){"),Yt("if(",Pt,"){",Ur,".bindFramebuffer(",36160,",",Pt,".framebuffer);"),Ir&&Yt(qr,".drawBuffersWEBGL(",_r,"[",Pt,".colorAttachments.length]);"),Yt("}else{",Ur,".bindFramebuffer(",36160,",null);"),Ir&&Yt(qr,".drawBuffersWEBGL(",Ar,");"),Yt("}",br,".cur=",Pt,";"),wr||Yt("}")}function Xt(Pt,Yt,cr){var wr=Pt.shared,qr=wr.gl,Ur=Pt.current,br=Pt.next,_r=wr.current,Ar=wr.next,Mr=Pt.cond(_r,".dirty");Qr.forEach(function(Cr){var Gr,cn;if(!((Cr=pt(Cr))in cr.state))if(Cr in br){Gr=br[Cr],cn=Ur[Cr];var wn=n(Nr[Cr].length,function(Kr){return Mr.def(Gr,"[",Kr,"]")});Mr(Pt.cond(wn.map(function(Kr,bn){return Kr+"!=="+cn+"["+bn+"]"}).join("||")).then(qr,".",un[Cr],"(",wn,");",wn.map(function(Kr,bn){return cn+"["+bn+"]="+Kr}).join(";"),";"))}else Gr=Mr.def(Ar,".",Cr),wn=Pt.cond(Gr,"!==",_r,".",Cr),Mr(wn),Cr in yn?wn(Pt.cond(Gr).then(qr,".enable(",yn[Cr],");").else(qr,".disable(",yn[Cr],");"),_r,".",Cr,"=",Gr,";"):wn(qr,".",un[Cr],"(",Gr,");",_r,".",Cr,"=",Gr,";")}),Object.keys(cr.state).length===0&&Mr(_r,".dirty=false;"),Yt(Mr)}function sr(Pt,Yt,cr,wr){var qr=Pt.shared,Ur=Pt.current,br=qr.current,_r=qr.gl;V(Object.keys(cr)).forEach(function(Ar){var Mr=cr[Ar];if(!wr||wr(Mr)){var Cr=Mr.append(Pt,Yt);if(yn[Ar]){var Gr=yn[Ar];K(Mr)?Yt(_r,Cr?".enable(":".disable(",Gr,");"):Yt(Pt.cond(Cr).then(_r,".enable(",Gr,");").else(_r,".disable(",Gr,");")),Yt(br,".",Ar,"=",Cr,";")}else if(p(Cr)){var cn=Ur[Ar];Yt(_r,".",un[Ar],"(",Cr,");",Cr.map(function(wn,Kr){return cn+"["+Kr+"]="+wn}).join(";"),";")}else Yt(_r,".",un[Ar],"(",Cr,");",br,".",Ar,"=",Cr,";")}})}function vr(Pt,Yt){Vr&&(Pt.instancing=Yt.def(Pt.shared.extensions,".angle_instanced_arrays"))}function pr(Pt,Yt,cr,wr,qr){function Ur(){return typeof performance>"u"?"Date.now()":"performance.now()"}function br(bn){bn(Mr=Yt.def(),"=",Ur(),";"),typeof qr=="string"?bn(cn,".count+=",qr,";"):bn(cn,".count++;"),Et&&(wr?bn(Cr=Yt.def(),"=",Kr,".getNumPendingQueries();"):bn(Kr,".beginQuery(",cn,");"))}function _r(bn){bn(cn,".cpuTime+=",Ur(),"-",Mr,";"),Et&&(wr?bn(Kr,".pushScopeStats(",Cr,",",Kr,".getNumPendingQueries(),",cn,");"):bn(Kr,".endQuery();"))}function Ar(bn){var zr=Yt.def(wn,".profile");Yt(wn,".profile=",bn,";"),Yt.exit(wn,".profile=",zr,";")}var Mr,Cr,Gr=Pt.shared,cn=Pt.stats,wn=Gr.current,Kr=Gr.timer;if(cr=cr.profile){if(K(cr))return void(cr.enable?(br(Yt),_r(Yt.exit),Ar("true")):Ar("false"));Ar(cr=cr.append(Pt,Yt))}else cr=Yt.def(wn,".profile");br(Gr=Pt.block()),Yt("if(",cr,"){",Gr,"}"),_r(Pt=Pt.block()),Yt.exit("if(",cr,"){",Pt,"}")}function ar(Pt,Yt,cr,wr,qr){function Ur(_r,Ar,Mr){function Cr(){Yt("if(!",Kr,".buffer){",cn,".enableVertexAttribArray(",wn,");}");var mn,pn=Mr.type;mn=Mr.size?Yt.def(Mr.size,"||",Ar):Ar,Yt("if(",Kr,".type!==",pn,"||",Kr,".size!==",mn,"||",Wr.map(function(Pn){return Kr+"."+Pn+"!=="+Mr[Pn]}).join("||"),"){",cn,".bindBuffer(",34962,",",bn,".buffer);",cn,".vertexAttribPointer(",[wn,mn,pn,Mr.normalized,Mr.stride,Mr.offset],");",Kr,".type=",pn,";",Kr,".size=",mn,";",Wr.map(function(Pn){return Kr+"."+Pn+"="+Mr[Pn]+";"}).join(""),"}"),Vr&&(pn=Mr.divisor,Yt("if(",Kr,".divisor!==",pn,"){",Pt.instancing,".vertexAttribDivisorANGLE(",[wn,pn],");",Kr,".divisor=",pn,";}"))}function Gr(){Yt("if(",Kr,".buffer){",cn,".disableVertexAttribArray(",wn,");",Kr,".buffer=null;","}if(",rt.map(function(mn,pn){return Kr+"."+mn+"!=="+zr[pn]}).join("||"),"){",cn,".vertexAttrib4f(",wn,",",zr,");",rt.map(function(mn,pn){return Kr+"."+mn+"="+zr[pn]+";"}).join(""),"}")}var cn=br.gl,wn=Yt.def(_r,".location"),Kr=Yt.def(br.attributes,"[",wn,"]");_r=Mr.state;var bn=Mr.buffer,zr=[Mr.x,Mr.y,Mr.z,Mr.w],Wr=["buffer","normalized","offset","stride"];_r===1?Cr():_r===2?Gr():(Yt("if(",_r,"===",1,"){"),Cr(),Yt("}else{"),Gr(),Yt("}"))}var br=Pt.shared;wr.forEach(function(_r){var Ar,Mr=_r.name,Cr=cr.attributes[Mr];if(Cr){if(!qr(Cr))return;Ar=Cr.append(Pt,Yt)}else{if(!qr(qe))return;var Gr=Pt.scopeAttrib(Mr);Ar={}
1212,Object.keys(new Ln).forEach(function(cn){Ar[cn]=Yt.def(Gr,".",cn)})}Ur(Pt.link(_r),function(cn){switch(cn){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(_r.info.type),Ar)})}function lr(Pt,Yt,cr,wr,qr,Ur){for(var br,_r=Pt.shared,Ar=_r.gl,Mr={},Cr=0;Cr<wr.length;++Cr){var Gr=(Wr=wr[Cr]).name,cn=Wr.info.type,wn=Wr.info.size,Kr=cr.uniforms[Gr];if(1<wn){if(!Kr)continue;var bn=Gr.replace("[0]","");if(Mr[bn])continue;Mr[bn]=1}var zr,Wr=Pt.link(Wr)+".location";if(Kr){if(!qr(Kr))continue;if(K(Kr)){if(Gr=Kr.value,cn===35678||cn===35680)Yt(Ar,".uniform1i(",Wr,",",(cn=Pt.link(Gr._texture||Gr.color[0]._texture))+".bind());"),Yt.exit(cn,".unbind();");else if(cn===35674||cn===35675||cn===35676)wn=Pt.global.def("new Float32Array(["+Array.prototype.slice.call(Gr)+"])"),Gr=2,cn===35675?Gr=3:cn===35676&&(Gr=4),Yt(Ar,".uniformMatrix",Gr,"fv(",Wr,",false,",wn,");");else{switch(cn){case 5126:br="1f";break;case 35664:br="2f";break;case 35665:br="3f";break;case 35666:br="4f";break;case 35670:case 5124:br="1i";break;case 35671:case 35667:br="2i";break;case 35672:case 35668:br="3i";break;case 35673:br="4i";break;case 35669:br="4i"}1<wn?(br+="v",Gr=Pt.global.def("["+Array.prototype.slice.call(Gr)+"]")):Gr=p(Gr)?Array.prototype.slice.call(Gr):Gr,Yt(Ar,".uniform",br,"(",Wr,",",Gr,");")}continue}zr=Kr.append(Pt,Yt)}else{if(!qr(qe))continue;zr=Yt.def(_r.uniforms,"[",Xe.id(Gr),"]")}switch(cn===35678?Yt("if(",zr,"&&",zr,'._reglType==="framebuffer"){',zr,"=",zr,".color[0];","}"):cn===35680&&Yt("if(",zr,"&&",zr,'._reglType==="framebufferCube"){',zr,"=",zr,".color[0];","}"),Gr=1,cn){case 35678:case 35680:cn=Yt.def(zr,"._texture"),Yt(Ar,".uniform1i(",Wr,",",cn,".bind());"),Yt.exit(cn,".unbind();");continue;case 5124:case 35670:br="1i";break;case 35667:case 35671:br="2i",Gr=2;break;case 35668:case 35672:br="3i",Gr=3;break;case 35669:case 35673:br="4i",Gr=4;break;case 5126:br="1f";break;case 35664:br="2f",Gr=2;break;case 35665:br="3f",Gr=3;break;case 35666:br="4f",Gr=4;break;case 35674:br="Matrix2fv";break;case 35675:br="Matrix3fv";break;case 35676:br="Matrix4fv"}if(br.indexOf("Matrix")===-1&&1<wn&&(br+="v",Gr=1),br.charAt(0)==="M"){Yt(Ar,".uniform",br,"(",Wr,","),Wr=Math.pow(cn-35674+2,2);var mn=Pt.global.def("new Float32Array(",Wr,")");Array.isArray(zr)?Yt("false,(",n(Wr,function(Pn){return mn+"["+Pn+"]="+zr[Pn]}),",",mn,")"):Yt("false,(Array.isArray(",zr,")||",zr," instanceof Float32Array)?",zr,":(",n(Wr,function(Pn){return mn+"["+Pn+"]="+zr+"["+Pn+"]"}),",",mn,")"),Yt(");")}else{if(1<Gr){cn=[];var pn=[];for(wn=0;wn<Gr;++wn)Array.isArray(zr)?pn.push(zr[wn]):pn.push(Yt.def(zr+"["+wn+"]")),Ur&&cn.push(Yt.def());Ur&&Yt("if(!",Pt.batchId,"||",cn.map(function(Pn,aa){return Pn+"!=="+pn[aa]}).join("||"),"){",cn.map(function(Pn,aa){return Pn+"="+pn[aa]+";"}).join("")),Yt(Ar,".uniform",br,"(",Wr,",",pn.join(","),");")}else Ur&&(cn=Yt.def(),Yt("if(!",Pt.batchId,"||",cn,"!==",zr,"){",cn,"=",zr,";")),Yt(Ar,".uniform",br,"(",Wr,",",zr,");");Ur&&Yt("}")}}}function hr(Pt,Yt,cr,wr){function qr(pn){var Pn=cn[pn];return Pn?Pn.contextDep&&wr.contextDynamic||Pn.propDep?Pn.append(Pt,cr):Pn.append(Pt,Yt):Yt.def(Gr,".",pn)}function Ur(){function pn(){cr(Ar,".drawElementsInstancedANGLE(",[Kr,zr,Wr,bn+"<<(("+Wr+"-5121)>>1)",_r],");")}function Pn(){cr(Ar,".drawArraysInstancedANGLE(",[Kr,bn,zr,_r],");")}wn&&wn!=="null"?mn?pn():(cr("if(",wn,"){"),pn(),cr("}else{"),Pn(),cr("}")):Pn()}function br(){function pn(){cr(Cr+".drawElements("+[Kr,zr,Wr,bn+"<<(("+Wr+"-5121)>>1)"]+");")}function Pn(){cr(Cr+".drawArrays("+[Kr,bn,zr]+");")}wn&&wn!=="null"?mn?pn():(cr("if(",wn,"){"),pn(),cr("}else{"),Pn(),cr("}")):Pn()}var _r,Ar,Mr=Pt.shared,Cr=Mr.gl,Gr=Mr.draw,cn=wr.draw,wn=function(){var pn=cn.elements,Pn=Yt;return pn?((pn.contextDep&&wr.contextDynamic||pn.propDep)&&(Pn=cr),pn=pn.append(Pt,Pn),cn.elementsActive&&Pn("if("+pn+")"+Cr+".bindBuffer(34963,"+pn+".buffer.buffer);")):(pn=Pn.def(),Pn(pn,"=",Gr,".","elements",";","if(",pn,"){",Cr,".bindBuffer(",34963,",",pn,".buffer.buffer);}","else if(",Mr.vao,".currentVAO){",pn,"=",Pt.shared.elements+".getElements("+Mr.vao,".currentVAO.elements);",xr?"":"if("+pn+")"+Cr+".bindBuffer(34963,"+pn+".buffer.buffer);","}")),pn}(),Kr=qr("primitive"),bn=qr("offset"),zr=function(){var pn=cn.count,Pn=Yt;return pn?((pn.contextDep&&wr.contextDynamic||pn.propDep)&&(Pn=cr),pn=pn.append(Pt,Pn)):pn=Pn.def(Gr,".","count"),pn}();if(typeof zr=="number"){if(zr===0)return}else cr("if(",zr,"){"),cr.exit("}");Vr&&(_r=qr("instances"),Ar=Pt.instancing);var Wr=wn+".type",mn=cn.elements&&K(cn.elements)&&!cn.vaoActive;Vr&&(typeof _r!="number"||0<=_r)?typeof _r=="string"?(cr("if(",_r,">0){"),Ur(),cr("}else if(",_r,"<0){"),br(),cr("}")):Ur():br()}function Or(Pt,Yt,cr,wr,qr){return qr=(Yt=Gt()).proc("body",qr),Vr&&(Yt.instancing=qr.def(Yt.shared.extensions,".angle_instanced_arrays")),Pt(Yt,qr,cr,wr),Yt.compile().body}function dr(Pt,Yt,cr,wr){vr(Pt,Yt),cr.useVAO?cr.drawVAO?Yt(Pt.shared.vao,".setVAO(",cr.drawVAO.append(Pt,Yt),");"):Yt(Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);"):(Yt(Pt.shared.vao,".setVAO(null);"),ar(Pt,Yt,cr,wr.attributes,function(){return!0})),lr(Pt,Yt,cr,wr.uniforms,function(){return!0},!1),hr(Pt,Yt,Yt,cr)}function Fr(Pt,Yt,cr,wr){function qr(){return!0}Pt.batchId="a1",vr(Pt,Yt),ar(Pt,Yt,cr,wr.attributes,qr),lr(Pt,Yt,cr,wr.uniforms,qr,!1),hr(Pt,Yt,Yt,cr)}function tn(Pt,Yt,cr,wr){function qr(Gr){return Gr.contextDep&&br||Gr.propDep}function Ur(Gr){return!qr(Gr)}vr(Pt,Yt);var br=cr.contextDep,_r=Yt.def(),Ar=Yt.def();Pt.shared.props=Ar,Pt.batchId=_r;var Mr=Pt.scope(),Cr=Pt.scope();Yt(Mr.entry,"for(",_r,"=0;",_r,"<","a1",";++",_r,"){",Ar,"=","a0","[",_r,"];",Cr,"}",Mr.exit),cr.needsContext&&or(Pt,Cr,cr.context),cr.needsFramebuffer&&Ut(Pt,Cr,cr.framebuffer),sr(Pt,Cr,cr.state,qr),cr.profile&&qr(cr.profile)&&pr(Pt,Cr,cr,!1,!0),wr?(cr.useVAO?cr.drawVAO?qr(cr.drawVAO)?Cr(Pt.shared.vao,".setVAO(",cr.drawVAO.append(Pt,Cr),");"):Mr(Pt.shared.vao,".setVAO(",cr.drawVAO.append(Pt,Mr),");"):Mr(Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);"):(Mr(Pt.shared.vao,".setVAO(null);"),ar(Pt,Mr,cr,wr.attributes,Ur),ar(Pt,Cr,cr,wr.attributes,qr)),lr(Pt,Mr,cr,wr.uniforms,Ur,!1),lr(Pt,Cr,cr,wr.uniforms,qr,!0),hr(Pt,Mr,Cr,cr)):(Yt=Pt.global.def("{}"),wr=cr.shader.progVar.append(Pt,Cr),Ar=Cr.def(wr,".id"),Mr=Cr.def(Yt,"[",Ar,"]"),Cr(Pt.shared.gl,".useProgram(",wr,".program);","if(!",Mr,"){",Mr,"=",Yt,"[",Ar,"]=",Pt.link(function(Gr){return Or(Fr,Pt,cr,Gr,2)}),"(",wr,");}",Mr,".call(this,a0[",_r,"],",_r,");"))}function rn(Pt,Yt){function cr(br){var _r=Yt.shader[br];_r&&wr.set(qr.shader,"."+br,_r.append(Pt,wr))}var wr=Pt.proc("scope",3);Pt.batchId="a2";var qr=Pt.shared,Ur=qr.current;or(Pt,wr,Yt.context),Yt.framebuffer&&Yt.framebuffer.append(Pt,wr),V(Object.keys(Yt.state)).forEac
1212h(function(br){var _r=Yt.state[br].append(Pt,wr);p(_r)?_r.forEach(function(Ar,Mr){wr.set(Pt.next[br],"["+Mr+"]",Ar)}):wr.set(qr.next,"."+br,_r)}),pr(Pt,wr,Yt,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(br){var _r=Yt.draw[br];_r&&wr.set(qr.draw,"."+br,""+_r.append(Pt,wr))}),Object.keys(Yt.uniforms).forEach(function(br){var _r=Yt.uniforms[br].append(Pt,wr);Array.isArray(_r)&&(_r="["+_r.join()+"]"),wr.set(qr.uniforms,"["+Xe.id(br)+"]",_r)}),Object.keys(Yt.attributes).forEach(function(br){var _r=Yt.attributes[br].append(Pt,wr),Ar=Pt.scopeAttrib(br);Object.keys(new Ln).forEach(function(Mr){wr.set(Ar,"."+Mr,_r[Mr])})}),Yt.scopeVAO&&wr.set(qr.vao,".targetVAO",Yt.scopeVAO.append(Pt,wr)),cr("vert"),cr("frag"),0<Object.keys(Yt.state).length&&(wr(Ur,".dirty=true;"),wr.exit(Ur,".dirty=true;")),wr("a1(",Pt.shared.context,",a0,",Pt.batchId,");")}function An(Pt,Yt,cr){var wr=Yt.static[cr];if(wr&&function(Cr){if(typeof Cr=="object"&&!p(Cr)){for(var Gr=Object.keys(Cr),cn=0;cn<Gr.length;++cn)if(Q.isDynamic(Cr[Gr[cn]]))return!0;return!1}}(wr)){var qr=Pt.global,Ur=Object.keys(wr),br=!1,_r=!1,Ar=!1,Mr=Pt.global.def("{}");Ur.forEach(function(Cr){var Gr=wr[Cr];if(Q.isDynamic(Gr))typeof Gr=="function"&&(Gr=wr[Cr]=Q.unbox(Gr)),Cr=W(Gr,null),br=br||Cr.thisDep,Ar=Ar||Cr.propDep,_r=_r||Cr.contextDep;else{switch(qr(Mr,".",Cr,"="),typeof Gr){case"number":qr(Gr);break;case"string":qr('"',Gr,'"');break;case"object":Array.isArray(Gr)&&qr("[",Gr.join(),"]");break;default:qr(Pt.link(Gr))}qr(";")}}),Yt.dynamic[cr]=new Q.DynamicVariable(4,{thisDep:br,contextDep:_r,propDep:Ar,ref:Mr,append:function(Cr,Gr){Ur.forEach(function(cn){var wn=wr[cn];Q.isDynamic(wn)&&(wn=Cr.invoke(Gr,wn),Gr(Mr,".",cn,"=",wn,";"))})}}),delete Yt.static[cr]}}var Ln=ut.Record,_n={add:32774,subtract:32778,"reverse subtract":32779};ke.ext_blend_minmax&&(_n.min=32775,_n.max=32776);var Vr=ke.angle_instanced_arrays,Ir=ke.webgl_draw_buffers,xr=ke.oes_vertex_array_object,Nr={dirty:!0,profile:Ze.profile},en={},Qr=[],yn={},un={};Ct("dither",3024),Ct("blend.enable",3042),zt("blend.color","blendColor",[0,0,0,0]),zt("blend.equation","blendEquationSeparate",[32774,32774]),zt("blend.func","blendFuncSeparate",[1,0,1,0]),Ct("depth.enable",2929,!0),zt("depth.func","depthFunc",513),zt("depth.range","depthRange",[0,1]),zt("depth.mask","depthMask",!0),zt("colorMask","colorMask",[!0,!0,!0,!0]),Ct("cull.enable",2884),zt("cull.face","cullFace",1029),zt("frontFace","frontFace",2305),zt("lineWidth","lineWidth",1),Ct("polygonOffset.enable",32823),zt("polygonOffset.offset","polygonOffset",[0,0]),Ct("sample.alpha",32926),Ct("sample.enable",32928),zt("sample.coverage","sampleCoverage",[1,!1]),Ct("stencil.enable",2960),zt("stencil.mask","stencilMask",-1),zt("stencil.func","stencilFunc",[519,0,-1]),zt("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),zt("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),Ct("scissor.enable",3089),zt("scissor.box","scissor",[0,0,Re.drawingBufferWidth,Re.drawingBufferHeight]),zt("viewport","viewport",[0,0,Re.drawingBufferWidth,Re.drawingBufferHeight]);var $r={gl:Re,context:Lt,strings:Xe,next:en,current:Nr,draw:ot,elements:Ce,buffer:Ie,shader:kt,attributes:ut.state,vao:ut,uniforms:ht,framebuffer:it,extensions:ke,timer:Et,isBufferArgs:H},In={primTypes:Ee,compareFuncs:Vt,blendFuncs:Tt,blendEquations:_n,stencilOps:Kt,glTypes:ce,orientationType:Be};Ir&&(In.backBuffer=[1029],In.drawBuffer=n(Le.maxDrawbuffers,function(Pt){return Pt===0?[0]:n(Pt,function(Yt){return 36064+Yt})}));var Qt=0;return{next:en,current:Nr,procs:function(){var Pt=Gt(),Yt=Pt.proc("poll"),cr=Pt.proc("refresh"),wr=Pt.block();Yt(wr),cr(wr);var qr,Ur=Pt.shared,br=Ur.gl,_r=Ur.next,Ar=Ur.current;wr(Ar,".dirty=false;"),Ut(Pt,Yt),Ut(Pt,cr,null,!0),Vr&&(qr=Pt.link(Vr)),ke.oes_vertex_array_object&&cr(Pt.link(ke.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var Mr=0;Mr<Le.maxAttributes;++Mr){var Cr=cr.def(Ur.attributes,"[",Mr,"]"),Gr=Pt.cond(Cr,".buffer");Gr.then(br,".enableVertexAttribArray(",Mr,");",br,".bindBuffer(",34962,",",Cr,".buffer.buffer);",br,".vertexAttribPointer(",Mr,",",Cr,".size,",Cr,".type,",Cr,".normalized,",Cr,".stride,",Cr,".offset);").else(br,".disableVertexAttribArray(",Mr,");",br,".vertexAttrib4f(",Mr,",",Cr,".x,",Cr,".y,",Cr,".z,",Cr,".w);",Cr,".buffer=null;"),cr(Gr),Vr&&cr(qr,".vertexAttribDivisorANGLE(",Mr,",",Cr,".divisor);")}return cr(Pt.shared.vao,".currentVAO=null;",Pt.shared.vao,".setVAO(",Pt.shared.vao,".targetVAO);
1212"),Object.keys(yn).forEach(function(cn){var wn=yn[cn],Kr=wr.def(_r,".",cn),bn=Pt.block();bn("if(",Kr,"){",br,".enable(",wn,")}else{",br,".disable(",wn,")}",Ar,".",cn,"=",Kr,";"),cr(bn),Yt("if(",Kr,"!==",Ar,".",cn,"){",bn,"}")}),Object.keys(un).forEach(function(cn){var wn,Kr,bn=un[cn],zr=Nr[cn],Wr=Pt.block();Wr(br,".",bn,"("),p(zr)?(bn=zr.length,wn=Pt.global.def(_r,".",cn),Kr=Pt.global.def(Ar,".",cn),Wr(n(bn,function(mn){return wn+"["+mn+"]"}),");",n(bn,function(mn){return Kr+"["+mn+"]="+wn+"["+mn+"];"}).join("")),Yt("if(",n(bn,function(mn){return wn+"["+mn+"]!=="+Kr+"["+mn+"]"}).join("||"),"){",Wr,"}")):(wn=wr.def(_r,".",cn),Kr=wr.def(Ar,".",cn),Wr(wn,");",Ar,".",cn,"=",wn,";"),Yt("if(",wn,"!==",Kr,"){",Wr,"}")),cr(Wr)}),Pt.compile()}(),compile:function(Pt,Yt,cr,wr,qr){var Ur=Gt();Ur.stats=Ur.link(qr),Object.keys(Yt.static).forEach(function(_r){An(Ur,Yt,_r)}),et.forEach(function(_r){An(Ur,Pt,_r)});var br=jt(Pt,Yt,cr,wr);return function(_r,Ar){var Mr=_r.proc("draw",1);vr(_r,Mr),or(_r,Mr,Ar.context),Ut(_r,Mr,Ar.framebuffer),Xt(_r,Mr,Ar),sr(_r,Mr,Ar.state),pr(_r,Mr,Ar,!1,!0);var Cr=Ar.shader.progVar.append(_r,Mr);if(Mr(_r.shared.gl,".useProgram(",Cr,".program);"),Ar.shader.program)dr(_r,Mr,Ar,Ar.shader.program);else{Mr(_r.shared.vao,".setVAO(null);");var Gr=_r.global.def("{}"),cn=Mr.def(Cr,".id"),wn=Mr.def(Gr,"[",cn,"]");Mr(_r.cond(wn).then(wn,".call(this,a0);").else(wn,"=",Gr,"[",cn,"]=",_r.link(function(Kr){return Or(dr,_r,Ar,Kr,1)}),"(",Cr,");",wn,".call(this,a0);"))}0<Object.keys(Ar.state).length&&Mr(_r.shared.current,".dirty=true;"),_r.shared.vao&&Mr(_r.shared.vao,".setVAO(null);")}(Ur,br),rn(Ur,br),function(_r,Ar){function Mr(zr){return zr.contextDep&&Gr||zr.propDep}var Cr=_r.proc("batch",2);_r.batchId="0",vr(_r,Cr);var Gr=!1,cn=!0;Object.keys(Ar.context).forEach(function(zr){Gr=Gr||Ar.context[zr].propDep}),Gr||(or(_r,Cr,Ar.context),cn=!1);var wn=!1;if((Kr=Ar.framebuffer)?(Kr.propDep?Gr=wn=!0:Kr.contextDep&&Gr&&(wn=!0),wn||Ut(_r,Cr,Kr)):Ut(_r,Cr,null),Ar.state.viewport&&Ar.state.viewport.propDep&&(Gr=!0),Xt(_r,Cr,Ar),sr(_r,Cr,Ar.state,function(zr){return!Mr(zr)}),Ar.profile&&Mr(Ar.profile)||pr(_r,Cr,Ar,!1,"a1"),Ar.contextDep=Gr,Ar.needsContext=cn,Ar.needsFramebuffer=wn,(cn=Ar.shader.progVar).contextDep&&Gr||cn.propDep)tn(_r,Cr,Ar,null);else if(cn=cn.append(_r,Cr),Cr(_r.shared.gl,".useProgram(",cn,".program);"),Ar.shader.program)tn(_r,Cr,Ar,Ar.shader.program);else{Cr(_r.shared.vao,".setVAO(null);");var Kr=_r.global.def("{}"),bn=(wn=Cr.def(cn,".id"),Cr.def(Kr,"[",wn,"]"));Cr(_r.cond(bn).then(bn,".call(this,a0,a1);").else(bn,"=",Kr,"[",wn,"]=",_r.link(function(zr){return Or(tn,_r,Ar,zr,2)}),"(",cn,");",bn,".call(this,a0,a1);"))}0<Object.keys(Ar.state).length&&Cr(_r.shared.current,".dirty=true;"),_r.shared.vao&&Cr(_r.shared.vao,".setVAO(null);")}(Ur,br),N(Ur.compile(),{destroy:function(){br.shader.program.destroy()}})}}}function R(Re,Xe){for(var ke=0;ke<Re.length;++ke)if(Re[ke]===Xe)return ke;return-1}var N=function(Re,Xe){for(var ke=Object.keys(Xe),Le=0;Le<ke.length;++Le)Re[ke[Le]]=Xe[ke[Le]];return Re},U=0,Q={DynamicVariable:g,define:function(Re,Xe){return new g(Re,m(Xe+""))},isDynamic:function(Re){return typeof Re=="function"&&!Re._reglType||Re instanceof g},unbox:function Re(Xe,ke){return typeof Xe=="function"?new g(0,Xe):typeof Xe=="number"||typeof Xe=="boolean"?new g(5,Xe):Array.isArray(Xe)?new g(6,Xe.map(function(Le,Ie){return Re(Le)})):Xe instanceof g?Xe:void 0},accessor:m},j={next:typeof requestAnimationFrame=="function"?function(Re){return requestAnimationFrame(Re)}:function(Re){return setTimeout(Re,16)},cancel:typeof cancelAnimationFrame=="function"?function(Re){return cancelAnimationFrame(Re)}:clearTimeout},X=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date},J=o();J.zero=o();var re=function(Re,Xe){var ke=1;Xe.ext_texture_filter_anisotropic&&(ke=Re.getParameter(34047));var Le=1,Ie=1;Xe.webgl_draw_buffers&&(Le=Re.getParameter(34852),Ie=Re.getParameter(36063));var Ce=!!Xe.oes_texture_float;if(Ce){Ce=Re.createTexture(),Re.bindTexture(3553,Ce),Re.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var Je=Re.createFramebuffer();if(Re.bindFramebuffer(36160,Je),Re.framebufferTexture2D(36160,36064,3553,Ce,0),Re.bindTexture(3553,null),Re.checkFramebufferStatus(36160)!==36053)Ce=!1;else{Re.viewport(0,0,1,1),Re.clearColor(1,0,0,1),Re.clear(16384);var it=J.allocType(5126,4);Re.readPixels(0,0,1,1,6408,5126,it),Re.getError()?Ce=!1:(Re.deleteFramebuffer(Je),Re.deleteTexture(Ce),Ce=it[0]===1),J.freeType(it)}}return it=!0,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(it=Re.createTexture(),Je=J.allocType(5121,36),Re.activeTexture(33984),Re.bindTexture(34067,it),Re.texImage2D(34069,0,6408,3,3,0,6408,5121,Je),J.freeType(Je),Re.bindTexture(34067,null),Re.deleteTexture(it),it=!Re.getError()),{colorBits:[Re.getParameter(3410),Re.getParameter(3411),Re.getParameter(3412),Re.getParameter(3413)],depthBits:Re.getParameter(3414),stencilBits:Re.getParameter(3415),subpixelBits:Re.getParameter(3408),extensions:Object.keys(Xe).filter(function(ht){return!!Xe[ht]}),maxAnisotropic:ke,maxDrawbuffers:Le,maxColorAttachments:Ie,pointSizeDims:Re.getParameter(33901),lineWidthDims:Re.getParameter(33902),maxViewportDims:Re.getParameter(3386),maxCombinedTextureUnits:Re.getParameter(35661),maxCubeMapSize:Re.getParameter(34076),maxRenderbufferSize:Re.getParameter(34024),maxTextureUnits:Re.getParameter(34930),maxTextureSize:Re.getParameter(3379),maxAttributes:Re.getParameter(34921),maxVertexUniforms:Re.getParameter(36347),maxVertexTextureUnits:Re.getParameter(35660),maxVaryingVectors:Re.getParameter(36348),maxFragmentUniforms:Re.getParameter(36349),glsl:Re.getParameter(35724),renderer:Re.getParameter(7937),vendor:Re.getParameter(7936),version:Re.getParameter(7938),readFloat:Ce,npotTextureCube:it}},ne=function(Re){return Re instanceof Uint8Array||Re instanceof Uint16Array||Re instanceof Uint32Array||Re instanceof Int8Array||Re instanceof Int16Array||Re instanceof Int32Array||Re instanceof Float32Array||Re instanceof Float64Array||Re instanceof Uint8ClampedArray},se=function(Re){return Object.keys(Re).map(function(Xe){return Re[Xe]})},oe={shape:function(Re){for(var Xe=[];Re.length;Re=Re[0])Xe.push(Re.length);return Xe},flatten:function(Re,Xe,ke,Le){var Ie=1;if(Xe.length)for(var Ce=0;Ce<Xe.length;++Ce)Ie*=Xe[Ce];else Ie=0;switch(ke=Le||J.allocType(ke,Ie),Xe.length){case 0:break;case 1:for(Le=Xe[0],Xe=0;Xe<Le;++Xe)ke[Xe]=Re[Xe];break;case 2:for(Le=Xe[0],Xe=Xe[1],Ce=Ie=0;Ce<Le;++Ce)for(var Je=Re[Ce],it=0;
1212it<Xe;++it)ke[Ie++]=Je[it];break;case 3:d(Re,Xe[0],Xe[1],Xe[2],ke,0);break;default:(function ht(ut,kt,ot,Lt,Et){for(var Ze=1,pt=ot+1;pt<kt.length;++pt)Ze*=kt[pt];var Ct=kt[ot];if(kt.length-ot==4){var zt=kt[ot+1],Gt=kt[ot+2];for(kt=kt[ot+3],pt=0;pt<Ct;++pt)d(ut[pt],zt,Gt,kt,Lt,Et),Et+=Ze}else for(pt=0;pt<Ct;++pt)ht(ut[pt],kt,ot+1,Lt,Et),Et+=Ze})(Re,Xe,0,ke,0)}return ke}},pe={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},ce={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},de={dynamic:35048,stream:35040,static:35044},xe=oe.flatten,we=oe.shape,be=[];be[5120]=1,be[5122]=2,be[5124]=4,be[5121]=1,be[5123]=2,be[5125]=4,be[5126]=4;var Ee={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},fe=new Float32Array(1),me=new Uint32Array(fe.buffer),Te=[9984,9986,9985,9987],_e=[0,6409,6410,6407,6408],Ae={};Ae[6409]=Ae[6406]=Ae[6402]=1,Ae[34041]=Ae[6410]=2,Ae[6407]=Ae[35904]=3,Ae[6408]=Ae[35906]=4;var Pe=a("HTMLCanvasElement"),De=a("OffscreenCanvas"),Ve=a("CanvasRenderingContext2D"),Qe=a("ImageBitmap"),Oe=a("HTMLImageElement"),Ue=a("HTMLVideoElement"),Ge=Object.keys(pe).concat([Pe,De,Ve,Qe,Oe,Ue]),Ye=[];Ye[5121]=1,Ye[5126]=4,Ye[36193]=2,Ye[5123]=2,Ye[5125]=4;var tt=[];tt[32854]=2,tt[32855]=2,tt[36194]=2,tt[34041]=4,tt[33776]=.5,tt[33777]=.5,tt[33778]=1,tt[33779]=1,tt[35986]=.5,tt[35987]=1,tt[34798]=1,tt[35840]=.5,tt[35841]=.25,tt[35842]=.5,tt[35843]=.25,tt[36196]=.5;var lt=[];lt[32854]=2,lt[32855]=2,lt[36194]=2,lt[33189]=2,lt[36168]=1,lt[34041]=4,lt[35907]=4,lt[34836]=16,lt[34842]=8,lt[34843]=6;var vt=function(Re,Xe,ke,Le,Ie){function Ce(ot){this.id=ut++,this.refCount=1,this.renderbuffer=ot,this.format=32854,this.height=this.width=0,Ie.profile&&(this.stats={size:0})}function Je(ot){var Lt=ot.renderbuffer;Re.bindRenderbuffer(36161,null),Re.deleteRenderbuffer(Lt),ot.renderbuffer=null,ot.refCount=0,delete kt[ot.id],Le.renderbufferCount--}var it={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};Xe.ext_srgb&&(it.srgba=35907),Xe.ext_color_buffer_half_float&&(it.rgba16f=34842,it.rgb16f=34843),Xe.webgl_color_buffer_float&&(it.rgba32f=34836);var ht=[];Object.keys(it).forEach(function(ot){ht[it[ot]]=ot});var ut=0,kt={};return Ce.prototype.decRef=function(){0>=--this.refCount&&Je(this)},Ie.profile&&(Le.getTotalRenderbufferSize=function(){var ot=0;return Object.keys(kt).forEach(function(Lt){ot+=kt[Lt].stats.size}),ot}),{create:function(ot,Lt){function Et(pt,Ct){var zt=0,Gt=0,ze=32854;if(typeof pt=="object"&&pt?("shape"in pt?(zt=0|(Gt=pt.shape)[0],Gt=0|Gt[1]):("radius"in pt&&(zt=Gt=0|pt.radius),"width"in pt&&(zt=0|pt.width),"height"in pt&&(Gt=0|pt.height)),"format"in pt&&(ze=it[pt.format])):typeof pt=="number"?(zt=0|pt,Gt=typeof Ct=="number"?0|Ct:zt):pt||(zt=Gt=1),zt!==Ze.width||Gt!==Ze.height||ze!==Ze.format)return Et.width=Ze.width=zt,Et.height=Ze.height=Gt,Ze.format=ze,Re.bindRenderbuffer(36161,Ze.renderbuffer),Re.renderbufferStorage(36161,ze,zt,Gt),Ie.profile&&(Ze.stats.size=lt[Ze.format]*Ze.width*Ze.height),Et.format=ht[Ze.format],Et}var Ze=new Ce(Re.createRenderbuffer());return kt[Ze.id]=Ze,Le.renderbufferCount++,Et(ot,Lt),Et.resize=function(pt,Ct){var zt=0|pt,Gt=0|Ct||zt;return zt===Ze.width&&Gt===Ze.height||(Et.width=Ze.width=zt,Et.height=Ze.height=Gt,Re.bindRenderbuffer(36161,Ze.renderbuffer),Re.renderbufferStorage(36161,Ze.format,zt,Gt),Ie.profile&&(Ze.stats.size=lt[Ze.format]*Ze.width*Ze.height)),Et},Et._reglType="renderbuffer",Et._renderbuffer=Ze,Ie.profile&&(Et.stats=Ze.stats),Et.destroy=function(){Ze.decRef()},Et},clear:function(){se(kt).forEach(Je)},restore:function(){se(kt).forEach(function(ot){ot.renderbuffer=Re.createRenderbuffer(),Re.bindRenderbuffer(36161,ot.renderbuffer),Re.renderbufferStorage(36161,ot.format,ot.width,ot.height)}),Re.bindRenderbuffer(36161,null)}}},It=[];It[6408]=4,It[6407]=3;var St=[];St[5121]=1,St[5126]=4,St[36193]=2;var rt=["x","y","z","w"],et="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Tt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alph
1212a":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Vt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Kt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Be={cw:2304,ccw:2305},qe=new Z(!1,!1,!1,function(){});return function(Re){function Xe(){if(Fr.length===0)ze&&ze.update(),Ln=null;else{Ln=j.next(Xe),kt();for(var Vr=Fr.length-1;0<=Vr;--Vr){var Ir=Fr[Vr];Ir&&Ir(jt,null,0)}Et.flush(),ze&&ze.update()}}function ke(){!Ln&&0<Fr.length&&(Ln=j.next(Xe))}function Le(){Ln&&(j.cancel(Xe),Ln=null)}function Ie(Vr){Vr.preventDefault(),Le(),tn.forEach(function(Ir){Ir()})}function Ce(Vr){Et.getError(),pt.restore(),vr.restore(),Ut.restore(),pr.restore(),ar.restore(),lr.restore(),sr.restore(),ze&&ze.restore(),hr.procs.refresh(),ke(),rn.forEach(function(Ir){Ir()})}function Je(Vr){function Ir(Pt,Yt){var cr={},wr={};return Object.keys(Pt).forEach(function(qr){var Ur=Pt[qr];if(Q.isDynamic(Ur))wr[qr]=Q.unbox(Ur,qr);else{if(Yt&&Array.isArray(Ur)){for(var br=0;br<Ur.length;++br)if(Q.isDynamic(Ur[br]))return void(wr[qr]=Q.unbox(Ur,qr))}cr[qr]=Ur}}),{dynamic:wr,static:cr}}var xr=Ir(Vr.context||{},!0),Nr=Ir(Vr.uniforms||{},!0),en=Ir(Vr.attributes||{},!1);Vr=Ir(function(Pt){function Yt(wr){if(wr in cr){var qr=cr[wr];delete cr[wr],Object.keys(qr).forEach(function(Ur){cr[wr+"."+Ur]=qr[Ur]})}}var cr=N({},Pt);return delete cr.uniforms,delete cr.attributes,delete cr.context,delete cr.vao,"stencil"in cr&&cr.stencil.op&&(cr.stencil.opBack=cr.stencil.opFront=cr.stencil.op,delete cr.stencil.op),Yt("blend"),Yt("depth"),Yt("cull"),Yt("stencil"),Yt("polygonOffset"),Yt("scissor"),Yt("sample"),"vao"in Pt&&(cr.vao=Pt.vao),cr}(Vr),!1);var Qr={gpuTime:0,cpuTime:0,count:0},yn=hr.compile(Vr,en,Nr,xr,Qr),un=yn.draw,$r=yn.batch,In=yn.scope,Qt=[];return N(function(Pt,Yt){var cr;if(typeof Pt=="function")return In.call(this,null,Pt,0);if(typeof Yt=="function")if(typeof Pt=="number")for(cr=0;cr<Pt;++cr)In.call(this,null,Yt,cr);else{if(!Array.isArray(Pt))return In.call(this,Pt,Yt,0);for(cr=0;cr<Pt.length;++cr)In.call(this,Pt[cr],Yt,cr)}else if(typeof Pt=="number"){if(0<Pt)return $r.call(this,function(wr){for(;Qt.length<wr;)Qt.push(null);return Qt}(0|Pt),0|Pt)}else{if(!Array.isArray(Pt))return un.call(this,Pt);if(Pt.length)return $r.call(this,Pt,Pt.length)}},{stats:Qr,destroy:function(){yn.destroy()}})}function it(Vr,Ir){var xr=0;hr.procs.poll();var Nr=Ir.color;Nr&&(Et.clearColor(+Nr[0]||0,+Nr[1]||0,+Nr[2]||0,+Nr[3]||0),xr|=16384),"depth"in Ir&&(Et.clearDepth(+Ir.depth),xr|=256),"stencil"in Ir&&(Et.clearStencil(0|Ir.stencil),xr|=1024),Et.clear(xr)}function ht(Vr){return Fr.push(Vr),ke(),{cancel:function(){var Ir=R(Fr,Vr);Fr[Ir]=function xr(){var Nr=R(Fr,xr);Fr[Nr]=Fr[Fr.length-1],--Fr.length,0>=Fr.length&&Le()}}}}function ut(){var Vr=Or.viewport,Ir=Or.scissor_box;Vr[0]=Vr[1]=Ir[0]=Ir[1]=0,jt.viewportWidth=jt.framebufferWidth=jt.drawingBufferWidth=Vr[2]=Ir[2]=Et.drawingBufferWidth,jt.viewportHeight=jt.framebufferHeight=jt.drawingBufferHeight=Vr[3]=Ir[3]=Et.drawingBufferHeight}function kt(){jt.tick+=1,jt.time=Lt(),ut(),hr.procs.poll()}function ot(){pr.refresh(),ut(),hr.procs.refresh(),ze&&ze.update()}function Lt(){return(X()-st)/1e3}if(!(Re=e(Re)))return null;var Et=Re.gl,Ze=Et.getContextAttributes();Et.isContextLost();var pt=function(Vr,Ir){function xr(yn){var un;yn=yn.toLowerCase();try{un=Nr[yn]=Vr.getExtension(yn)}catch{}return!!un}for(var Nr={},en=0;en<Ir.extensions.length;++en){var Qr=Ir.extensions[en];if(!xr(Qr))return Ir.onDestroy(),Ir.onDone('"'+Qr+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Ir.optionalExtensions.forEach(xr),{extensions:Nr,restore:function(){Object.keys(Nr).forEach(function(yn){if(Nr[yn]&&!xr(yn))throw Error("(regl): error restoring extension "+yn)})}}}(Et,Re);if(!pt)return null;var Ct=function(){var Vr={"":0},Ir=[""];return{id:function(xr){var Nr=Vr[xr];return Nr||(Nr=Vr[xr]=Ir.length,Ir.push(xr),Nr)},str:function(xr){return Ir[xr]}}}(),zt={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Gt=pt.extensions,ze=function(Vr,Ir){function xr(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function Nr(Qt,Pt,Yt){var cr=yn.pop()||new xr;cr.startQueryIndex=Qt,cr.endQueryIndex=Pt,cr.sum=0,cr.stats=Yt,un.push(cr)}if(!Ir.ext_disjoint_timer_query)return null;var en=[],Qr=[],yn=[],un=[],$r=[],In=[];return{beginQuery:function(Qt){var Pt=en.pop()||Ir.ext_disjoint_timer_query.createQueryEXT();Ir.ext_disjoint_timer_query.beginQueryEXT(35007,Pt),Qr.push(Pt),Nr(Qr.length-1,Qr.length,Qt)},endQuery:function(){Ir.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:Nr,update:function(){var Qt,Pt;if((Qt=Qr.length)!==0){In.length=Math.max(In.length,Qt+1),$r.length=Math.max($r.length,Qt+1),$r[0]=0;var Yt=In[0]=0;for(Pt=Qt=0;Pt<Qr.length;++Pt){var cr=Qr[Pt];Ir.ext_disjoint_timer_query.getQueryObjectEXT(cr,34919)?(Yt+=Ir.ext_disjoint_timer_query.getQueryObjectEXT(cr,34918),en.push(cr)):Qr[Qt++]=cr,$r[Pt+1]=Yt,In[Pt+1
1212]=Qt}for(Qr.length=Qt,Pt=Qt=0;Pt<un.length;++Pt){var wr=(Yt=un[Pt]).startQueryIndex;cr=Yt.endQueryIndex,Yt.sum+=$r[cr]-$r[wr],wr=In[wr],(cr=In[cr])===wr?(Yt.stats.gpuTime+=Yt.sum/1e6,yn.push(Yt)):(Yt.startQueryIndex=wr,Yt.endQueryIndex=cr,un[Qt++]=Yt)}un.length=Qt}},getNumPendingQueries:function(){return Qr.length},clear:function(){en.push.apply(en,Qr);for(var Qt=0;Qt<en.length;Qt++)Ir.ext_disjoint_timer_query.deleteQueryEXT(en[Qt]);Qr.length=0,en.length=0},restore:function(){Qr.length=0,en.length=0}}}(0,Gt),st=X(),yt=Et.drawingBufferWidth,Dt=Et.drawingBufferHeight,jt={tick:0,time:0,viewportWidth:yt,viewportHeight:Dt,framebufferWidth:yt,framebufferHeight:Dt,drawingBufferWidth:yt,drawingBufferHeight:Dt,pixelRatio:Re.pixelRatio},or=(yt={elements:null,primitive:4,count:-1,offset:0,instances:-1},re(Et,Gt)),Ut=f(Et,zt,Re,function(Vr){return sr.destroyBuffer(Vr)}),Xt=s(Et,Gt,Ut,zt),sr=P(Et,Gt,or,zt,Ut,Xt,yt),vr=S(Et,Ct,zt,Re),pr=L(Et,Gt,or,function(){hr.procs.poll()},jt,zt,Re),ar=vt(Et,Gt,0,zt,Re),lr=A(Et,Gt,or,pr,ar,zt),hr=$(Et,Ct,Gt,or,Ut,Xt,0,lr,{},sr,vr,yt,jt,ze,Re),Or=(Ct=E(Et,lr,hr.procs.poll,jt),hr.next),dr=Et.canvas,Fr=[],tn=[],rn=[],An=[Re.onDestroy],Ln=null;dr&&(dr.addEventListener("webglcontextlost",Ie,!1),dr.addEventListener("webglcontextrestored",Ce,!1));var _n=lr.setFBO=Je({framebuffer:Q.define.call(null,1,"framebuffer")});return ot(),Ze=N(Je,{clear:function(Vr){if("framebuffer"in Vr)if(Vr.framebuffer&&Vr.framebuffer_reglType==="framebufferCube")for(var Ir=0;6>Ir;++Ir)_n(N({framebuffer:Vr.framebuffer.faces[Ir]},Vr),it);else _n(Vr,it);else it(0,Vr)},prop:Q.define.bind(null,1),context:Q.define.bind(null,2),this:Q.define.bind(null,3),draw:Je({}),buffer:function(Vr){return Ut.create(Vr,34962,!1,!1)},elements:function(Vr){return Xt.create(Vr,!1)},texture:pr.create2D,cube:pr.createCube,renderbuffer:ar.create,framebuffer:lr.create,framebufferCube:lr.createCube,vao:sr.createVAO,attributes:Ze,frame:ht,on:function(Vr,Ir){var xr;switch(Vr){case"frame":return ht(Ir);case"lost":xr=tn;break;case"restore":xr=rn;break;case"destroy":xr=An}return xr.push(Ir),{cancel:function(){for(var Nr=0;Nr<xr.length;++Nr)if(xr[Nr]===Ir){xr[Nr]=xr[xr.length-1],xr.pop();break}}}},limits:or,hasExtension:function(Vr){return 0<=or.extensions.indexOf(Vr.toLowerCase())},read:Ct,destroy:function(){Fr.length=0,Le(),dr&&(dr.removeEventListener("webglcontextlost",Ie),dr.removeEventListener("webglcontextrestored",Ce)),vr.clear(),lr.clear(),ar.clear(),sr.clear(),pr.clear(),Xt.clear(),Ut.clear(),ze&&ze.clear(),An.forEach(function(Vr){Vr()})},_gl:Et,_refresh:ot,poll:function(){kt(),ze&&ze.update()},now:Lt,stats:zt}),Re.onDone(null,Ze),Ze}})},{}],284:[function(y,ee,te){var g=y("buffer"),m=g.Buffer;function b(e,n){for(var t in e)n[t]=e[t]}function v(e,n,t){return m(e,n,t)}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?ee.exports=g:(b(g,te),te.Buffer=v),v.prototype=Object.create(m.prototype),b(m,v),v.from=function(e,n,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return m(e,n,t)},v.alloc=function(e,n,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=m(e);return n!==void 0?typeof t=="string"?o.fill(n,t):o.fill(n):o.fill(0),o},v.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return m(e)},v.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return g.SlowBuffer(e)}},{buffer:85}],285:[function(y,ee,te){ee.exports=m;var g=y("events").EventEmitter;function m(){g.call(this)}y("inherits")(m,g),m.Readable=y("readable-stream/lib/_stream_readable.js"),m.Writable=y("readable-stream/lib/_stream_writable.js"),m.Duplex=y("readable-stream/lib/_stream_duplex.js"),m.Transform=y("readable-stream/lib/_stream_transform.js"),m.PassThrough=y("readable-stream/lib/_stream_passthrough.js"),m.finished=y("readable-stream/lib/internal/streams/end-of-stream.js"),m.pipeline=y("readable-stream/lib/internal/streams/pipeline.js"),m.Stream=m,m.prototype.pipe=function(b,v){var e=this;function n(u){b.writable&&b.write(u)===!1&&e.pause&&e.pause()}function t(){e.readable&&e.resume&&e.resume()}e.on("data",n),b.on("drain",t),b._isStdio||v&&v.end===!1||(e.on("end",r),e.on("close",d));var o=!1;function r(){o||(o=!0,b.end())}
1212function d(){o||(o=!0,typeof b.destroy=="function"&&b.destroy())}function c(u){if(i(),g.listenerCount(this,"error")===0)throw u}function i(){e.removeListener("data",n),b.removeListener("drain",t),e.removeListener("end",r),e.removeListener("close",d),e.removeListener("error",c),b.removeListener("error",c),e.removeListener("end",i),e.removeListener("close",i),b.removeListener("close",i)}return e.on("error",c),b.on("error",c),e.on("end",i),e.on("close",i),b.on("close",i),b.emit("pipe",e),b}},{events:84,inherits:231,"readable-stream/lib/_stream_duplex.js":287,"readable-stream/lib/_stream_passthrough.js":288,"readable-stream/lib/_stream_readable.js":289,"readable-stream/lib/_stream_transform.js":290,"readable-stream/lib/_stream_writable.js":291,"readable-stream/lib/internal/streams/end-of-stream.js":295,"readable-stream/lib/internal/streams/pipeline.js":297}],286:[function(y,ee,te){var g={};function m(v,e,n){n||(n=Error);var t=function(o){var r,d;function c(i,u,f){return o.call(this,function(s,h,p){return typeof e=="string"?e:e(s,h,p)}(i,u,f))||this}return d=o,(r=c).prototype=Object.create(d.prototype),r.prototype.constructor=r,r.__proto__=d,c}(n);t.prototype.name=n.name,t.prototype.code=v,g[v]=t}function b(v,e){if(Array.isArray(v)){var n=v.length;return v=v.map(function(t){return String(t)}),n>2?"one of ".concat(e," ").concat(v.slice(0,n-1).join(", "),", or ")+v[n-1]:n===2?"one of ".concat(e," ").concat(v[0]," or ").concat(v[1]):"of ".concat(e," ").concat(v[0])}return"of ".concat(e," ").concat(String(v))}m("ERR_INVALID_OPT_VALUE",function(v,e){return'The value "'+e+'" is invalid for option "'+v+'"'},TypeError),m("ERR_INVALID_ARG_TYPE",function(v,e,n){var t,o,r;if(typeof e=="string"&&(o="not ",e.substr(0,o.length)===o)?(t="must not be",e=e.replace(/^not /,"")):t="must be",function(c,i,u){return(u===void 0||u>c.length)&&(u=c.length),c.substring(u-i.length,u)===i}(v," argument"))r="The ".concat(v," ").concat(t," ").concat(b(e,"type"));else{var d=function(c,i,u){return typeof u!="number"&&(u=0),!(u+i.length>c.length)&&c.indexOf(i,u)!==-1}(v,".")?"property":"argument";r='The "'.concat(v,'" ').concat(d," ").concat(t," ").concat(b(e,"type"))}return r+=". Received type ".concat(typeof n)},TypeError),m("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),m("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),m("ERR_STREAM_PREMATURE_CLOSE","Premature close"),m("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),m("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),m("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),m("ERR_STREAM_WRITE_AFTER_END","write after end"),m("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),m("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),m("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ee.exports.codes=g},{}],287:[function(y,ee,te){(function(g){(function(){var m=Object.keys||function(c){var i=[];for(var u in c)i.push(u);return i};ee.exports=o;var b=y("./_stream_readable"),v=y("./_stream_writable");y("inherits")(o,b);for(var e=m(v.prototype),n=0;n<e.length;n++){var t=e[n];o.prototype[t]||(o.prototype[t]=v.prototype[t])}function o(c){if(!(this instanceof o))return new o(c);b.call(this,c),v.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",r)))}function r(){this._writableState.ended||g.nextTick(d,this)}function d(c){c.end()}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=c,this._writableState.destroyed=c)}})}).call(this)}).call(this,y("_process"))},{"./_stream_readable":289,"./_stream_writable":291,_process:277,inherits:231}],288:[function(y,ee,te){ee.exports=m;var g=y("./_stream_transform");function m(b){if(!(this instanceof m))return new m(b);g.call(this,b)}y("inherits")(m,g),m.prototype._transform=function(b,v,e){e(null,b)}},{"./_stream_transform":290,inherits:231}],289:[function(y,ee,te){(function(g,m){(function(){var b;ee.exports=k,k.ReadableState=T,y("events").EventEmitter;var v=function(R,N){return R.listeners(N).length}
1212,e=y("./internal/streams/stream"),n=y("buffer").Buffer,t=m.Uint8Array||function(){},o,r=y("util");o=r&&r.debuglog?r.debuglog("stream"):function(){};var d,c,i,u=y("./internal/streams/buffer_list"),f=y("./internal/streams/destroy"),s=y("./internal/streams/state").getHighWaterMark,h=y("../errors").codes,p=h.ERR_INVALID_ARG_TYPE,a=h.ERR_STREAM_PUSH_AFTER_EOF,x=h.ERR_METHOD_NOT_IMPLEMENTED,l=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;y("inherits")(k,e);var w=f.errorOrDestroy,_=["error","close","destroy","pause","resume"];function T(R,N,U){b=b||y("./_stream_duplex"),R=R||{},typeof U!="boolean"&&(U=N instanceof b),this.objectMode=!!R.objectMode,U&&(this.objectMode=this.objectMode||!!R.readableObjectMode),this.highWaterMark=s(this,R,"readableHighWaterMark",U),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.destroyed=!1,this.defaultEncoding=R.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,R.encoding&&(d||(d=y("string_decoder/").StringDecoder),this.decoder=new d(R.encoding),this.encoding=R.encoding)}function k(R){if(b=b||y("./_stream_duplex"),!(this instanceof k))return new k(R);var N=this instanceof b;this._readableState=new T(R,this,N),this.readable=!0,R&&(typeof R.read=="function"&&(this._read=R.read),typeof R.destroy=="function"&&(this._destroy=R.destroy)),e.call(this)}function L(R,N,U,Q,j){o("readableAddChunk",N);var X,J=R._readableState;if(N===null)J.reading=!1,function(re,ne){if(o("onEofChunk"),!ne.ended){if(ne.decoder){var se=ne.decoder.end();se&&se.length&&(ne.buffer.push(se),ne.length+=ne.objectMode?1:se.length)}ne.ended=!0,ne.sync?P(re):(ne.needReadable=!1,ne.emittedReadable||(ne.emittedReadable=!0,S(re)))}}(R,J);else if(j||(X=function(re,ne){var se;oe=ne,n.isBuffer(oe)||oe instanceof t||typeof ne=="string"||ne===void 0||re.objectMode||(se=new p("chunk",["string","Buffer","Uint8Array"],ne));var oe;return se}(J,N)),X)w(R,X);else if(J.objectMode||N&&N.length>0)if(typeof N=="string"||J.objectMode||Object.getPrototypeOf(N)===n.prototype||(N=function(re){return n.from(re)}(N)),Q)J.endEmitted?w(R,new l):A(R,J,N,!0);else if(J.ended)w(R,new a);else{if(J.destroyed)return!1;J.reading=!1,J.decoder&&!U?(N=J.decoder.write(N),J.objectMode||N.length!==0?A(R,J,N,!1):E(R,J)):A(R,J,N,!1)}else Q||(J.reading=!1,E(R,J));return!J.ended&&(J.length<J.highWaterMark||J.length===0)}function A(R,N,U,Q){N.flowing&&N.length===0&&!N.sync?(N.awaitDrain=0,R.emit("data",U)):(N.length+=N.objectMode?1:U.length,Q?N.buffer.unshift(U):N.buffer.push(U),N.needReadable&&P(R)),E(R,N)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(R){this._readableState&&(this._readableState.destroyed=R)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(R,N){N(R)},k.prototype.push=function(R,N){var U,Q=this._readableState;return Q.objectMode?U=!0:typeof R=="string"&&((N=N||Q.defaultEncoding)!==Q.encoding&&(R=n.from(R,N),N=""),U=!0),L(this,R,N,!1,U)},k.prototype.unshift=function(R){return L(this,R,null,!0,!1)},k.prototype.isPaused=function(){return this._readableState.flowing===!1},k.prototype.setEncoding=function(R){d||(d=y("string_decoder/").StringDecoder);var N=new d(R);this._readableState.decoder=N,this._readableState.encoding=this._readableState.decoder.encoding;for(var U=this._readableState.buffer.head,Q="";U!==null;)Q+=N.write(U.data),U=U.next;return this._readableState.buffer.clear(),Q!==""&&this._readableState.buffer.push(Q),this._readableState.length=Q.length,this};function I(R,N){return R<=0||N.length===0&&N.ended?0:N.objectMode?1:R!=R?N.flowing&&N.length?N.buffer.head.data.length:N.length:(R>N.highWaterMark&&(N.highWaterMark=function(U){return U>=1073741824?U=1073741824:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}(R)),R<=N.length?R:N.ended?N.length:(N.needReadable=!0,0))}function P(R){var N=R._readableState;o("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(o("emitReadable",N.flowing),N.emittedReadable=!0,g.nextTick(S,R))}function S(R){var N=R._readableState;o("emitReadable_",N.destroyed,N.length,N.ended),N.destroyed||!N.length&&!N.ended||(R.emit("readable"),N.emittedReadable=!1),N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,Z(R)}function E(R,N){N.readingMore||(N.readingMore=!0,g.nextTick(D,R,N))}function D(R,N){for(;!N.reading&&!N.ended&&(N.length<N.highWaterMark||N.flowing&&N.length===0);){var U=N.length;if(o("maybeReadMore read 0"),R.read(0),U===N.length)break}N.readingMore=!1}function F(R){var N=R._readableState;N.readableListening=R.listenerCount("readable")>0,N.resumeScheduled&&!N.paused?N.flowing=!0:R.listenerCount("data")>0&&R.resume()}function H(R){o("readable nexttick read 0"),R.read(0)}function V(R,N){o("resume",N.reading),N.reading||R.read(0),N.resumeScheduled=!1,R.emit("resume"),Z(R),N.flowing&&!N.reading&&R.read(0)}function Z(R){var N=R._readableState;for(o("flow",N.flowing);N.flowing&&R.read()!==null;);}function K(R,N){return N.length===0?null:(N.objectMode?U=N.buffer.shift():!R||R>=N.length?(U=N.decoder?N.buffer.join(""):N.buffer.length===1?N.buffer.first():N.buffer.concat(N.length),N.buffer.clear()):U=N.buffer.consume(R,N.decoder),U);var U}function q(R){var N=R._readableState;o("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,g.nextTick(W,N,R))}function W(R,N){if(o("endReadableNT",R.endEmitted,R.length),!R.endEmitted&&R.length===0&&(R.endEmitted=!0,N.readable=!1,N.emit("end"),R.autoDestroy)){var U=N._writableState;(!U||U.autoDestroy&&U.finished)&&N.destroy()}}function $(R,N){for(var U=0,Q=R.length;U<Q;U++)if(R[U]===N)return U;return-1}k.prototype.read=function(R){o("read",R),R=parseInt(R,10);var N=this._readableState,U=R;if(R!==0&&(N.emittedReadable=!1),R===0&&N.needReadable&&((N.highWaterMark!==0?N.length>=N.highWaterMark:N.length>0)||N.ended))return o("read: emitReadable",N.length,N.ended),N.length===0&&N.ended?q(this):P(this),null;if((R=I(R,N))===0&&N.ended)return N.length===0&&q(this),null;var Q,j=N.needReadable;return o("need readable",j),(N.length===0||N.length-R<N.highWaterMark)&&o("length less than watermark",j=!0),N.ended||N.reading?o("reading or ended",j=!1):j&&(o("do read"),N.reading=!0,N.sync=!0,N.length===0&&(N.needReadable=!0),this._read(N.highWaterMark),N.sync=!1,N.reading||(R=I(U,N))),(Q=R>0?K(R,N):null)===null?(N.needReadable=N.length<=N.highWaterMark,R=0):(N.length-=R,N.awaitDrain=0),N.length===0&&(N.ended||(N.needReadable=!0),U!==R&&N.ended&&q(this)),Q!==null&&this.emit
1212("data",Q),Q},k.prototype._read=function(R){w(this,new x("_read()"))},k.prototype.pipe=function(R,N){var U=this,Q=this._readableState;switch(Q.pipesCount){case 0:Q.pipes=R;break;case 1:Q.pipes=[Q.pipes,R];break;default:Q.pipes.push(R)}Q.pipesCount+=1,o("pipe count=%d opts=%j",Q.pipesCount,N);var j=(!N||N.end!==!1)&&R!==g.stdout&&R!==g.stderr?J:de;function X(xe,we){o("onunpipe"),xe===U&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,o("cleanup"),R.removeListener("close",pe),R.removeListener("finish",ce),R.removeListener("drain",re),R.removeListener("error",oe),R.removeListener("unpipe",X),U.removeListener("end",J),U.removeListener("end",de),U.removeListener("data",se),ne=!0,!Q.awaitDrain||R._writableState&&!R._writableState.needDrain||re())}function J(){o("onend"),R.end()}Q.endEmitted?g.nextTick(j):U.once("end",j),R.on("unpipe",X);var re=function(xe){return function(){var we=xe._readableState;o("pipeOnDrain",we.awaitDrain),we.awaitDrain&&we.awaitDrain--,we.awaitDrain===0&&v(xe,"data")&&(we.flowing=!0,Z(xe))}}(U);R.on("drain",re);var ne=!1;function se(xe){o("ondata");var we=R.write(xe);o("dest.write",we),we===!1&&((Q.pipesCount===1&&Q.pipes===R||Q.pipesCount>1&&$(Q.pipes,R)!==-1)&&!ne&&(o("false write response, pause",Q.awaitDrain),Q.awaitDrain++),U.pause())}function oe(xe){o("onerror",xe),de(),R.removeListener("error",oe),v(R,"error")===0&&w(R,xe)}function pe(){R.removeListener("finish",ce),de()}function ce(){o("onfinish"),R.removeListener("close",pe),de()}function de(){o("unpipe"),U.unpipe(R)}return U.on("data",se),function(xe,we,be){if(typeof xe.prependListener=="function")return xe.prependListener(we,be);xe._events&&xe._events[we]?Array.isArray(xe._events[we])?xe._events[we].unshift(be):xe._events[we]=[be,xe._events[we]]:xe.on(we,be)}(R,"error",oe),R.once("close",pe),R.once("finish",ce),R.emit("pipe",U),Q.flowing||(o("pipe resume"),U.resume()),R},k.prototype.unpipe=function(R){var N=this._readableState,U={hasUnpiped:!1};if(N.pipesCount===0)return this;if(N.pipesCount===1)return R&&R!==N.pipes||(R||(R=N.pipes),N.pipes=null,N.pipesCount=0,N.flowing=!1,R&&R.emit("unpipe",this,U)),this;if(!R){var Q=N.pipes,j=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var X=0;X<j;X++)Q[X].emit("unpipe",this,{hasUnpiped:!1});return this}var J=$(N.pipes,R);return J===-1||(N.pipes.splice(J,1),N.pipesCount-=1,N.pipesCount===1&&(N.pipes=N.pipes[0]),R.emit("unpipe",this,U)),this},k.prototype.on=function(R,N){var U=e.prototype.on.call(this,R,N),Q=this._readableState;return R==="data"?(Q.readableListening=this.listenerCount("readable")>0,Q.flowing!==!1&&this.resume()):R==="readable"&&(Q.endEmitted||Q.readableListening||(Q.readableListening=Q.needReadable=!0,Q.flowing=!1,Q.emittedReadable=!1,o("on readable",Q.length,Q.reading),Q.length?P(this):Q.reading||g.nextTick(H,this))),U},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(R,N){var U=e.prototype.removeListener.call(this,R,N);return R==="readable"&&g.nextTick(F,this),U},k.prototype.removeAllListeners=function(R){var N=e.prototype.removeAllListeners.apply(this,arguments);return R!=="readable"&&R!==void 0||g.nextTick(F,this),N},k.prototype.resume=function(){var R=this._readableState;return R.flowing||(o("resume"),R.flowing=!R.readableListening,function(N,U){U.resumeScheduled||(U.resumeScheduled=!0,g.nextTick(V,N,U))}(this,R)),R.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(R){var N=this,U=this._readableState,Q=!1;for(var j in R.on("end",function(){if(o("wrapped end"),U.decoder&&!U.ended){var J=U.decoder.end();J&&J.length&&N.push(J)}N.push(null)}),R.on("data",function(J){o("wrapped data"),U.decoder&&(J=U.decoder.write(J)),U.objectMode&&J==null||(U.objectMode||J&&J.length)&&(N.push(J)||(Q=!0,R.pause()))}),R)this[j]===void 0&&typeof R[j]=="function"&&(this[j]=function(J){return function(){return R[J].apply(R,arguments)}}(j));for(var X=0;X<_.length;X++)R.on(_[X],this.emit.bind(this,_[X]));return this._read=function(J){o("wrapped _read",J),Q&&(Q=!1,R.resume())},this},typeof Symbol=="function"&&(k.prototype[Symbol.asyncIterator]=function(){return c===void 0&&(c=y("./internal/stream
1212s/async_iterator")),c(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(R){this._readableState&&(this._readableState.flowing=R)}}),k._fromList=K,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(k.from=function(R,N){return i===void 0&&(i=y("./internal/streams/from")),i(k,R,N)})}).call(this)}).call(this,y("_process"),typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":286,"./_stream_duplex":287,"./internal/streams/async_iterator":292,"./internal/streams/buffer_list":293,"./internal/streams/destroy":294,"./internal/streams/from":296,"./internal/streams/state":298,"./internal/streams/stream":299,_process:277,buffer:85,events:84,inherits:231,"string_decoder/":300,util:83}],290:[function(y,ee,te){ee.exports=o;var g=y("../errors").codes,m=g.ERR_METHOD_NOT_IMPLEMENTED,b=g.ERR_MULTIPLE_CALLBACK,v=g.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=g.ERR_TRANSFORM_WITH_LENGTH_0,n=y("./_stream_duplex");function t(c,i){var u=this._transformState;u.transforming=!1;var f=u.writecb;if(f===null)return this.emit("error",new b);u.writechunk=null,u.writecb=null,i!=null&&this.push(i),f(c);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function o(c){if(!(this instanceof o))return new o(c);n.call(this,c),this._transformState={afterTransform:t.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",r)}function r(){var c=this;typeof this._flush!="function"||this._readableState.destroyed?d(this,null,null):this._flush(function(i,u){d(c,i,u)})}function d(c,i,u){if(i)return c.emit("error",i);if(u!=null&&c.push(u),c._writableState.length)throw new e;if(c._transformState.transforming)throw new v;return c.push(null)}y("inherits")(o,n),o.prototype.push=function(c,i){return this._transformState.needTransform=!1,n.prototype.push.call(this,c,i)},o.prototype._transform=function(c,i,u){u(new m("_transform()"))},o.prototype._write=function(c,i,u){var f=this._transformState;if(f.writecb=u,f.writechunk=c,f.writeencoding=i,!f.transforming){var s=this._readableState;(f.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},o.prototype._read=function(c){var i=this._transformState;i.writechunk===null||i.transforming?i.needTransform=!0:(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform))},o.prototype._destroy=function(c,i){n.prototype._destroy.call(this,c,function(u){i(u)})}},{"../errors":286,"./_stream_duplex":287,inherits:231}],291:[function(y,ee,te){(function(g,m){(function(){function b(D){var F=this;this.next=null,this.entry=null,this.finish=function(){(function(H,V,Z){var K=H.entry;for(H.entry=null;K;){var q=K.callback;V.pendingcb--,q(Z),K=K.next}V.corkedRequestsFree.next=H})(F,D)}}var v;ee.exports=k,k.WritableState=T;var e={deprecate:y("util-deprecate")},n=y("./internal/streams/stream"),t=y("buffer").Buffer,o=m.Uint8Array||function(){},r,d=y("./internal/streams/destroy"),c=y("./internal/streams/state").getHighWaterMark,i=y("../errors").codes,u=i.ERR_INVALID_ARG_TYPE,f=i.ERR_METHOD_NOT_IMPLEMENTED,s=i.ERR_MULTIPLE_CALLBACK,h=i.ERR_STREAM_CANNOT_PIPE,p=i.ERR_STREAM_DESTROYED,a=i.ERR_STREAM_NULL_VALUES,x=i.ERR_STREAM_WRITE_AFTER_END,l=i.ERR_UNKNOWN_ENCODING,w=d.errorOrDestroy;function _(){}function T(D,F,H){v=v||y("./_stream_duplex"),D=D||{},typeof H!="boolean"&&(H=F instanceof v),this.objectMode=!!D.objectMode,H&&(this.objectMode=this.objectMode||!!D.writableObjectMode),this.highWaterMark=c(this,D,"writableHighWaterMark",H),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=D.decodeStrings===!1;this.decodeStrings=!V,this.defaultEncoding=D.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z){(function(K,q){var W=K._writableState,$=W.sync,R=W.writecb;if(typeof R!="function")throw new s;if(function(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}(W),q)(function(U,Q,j,X,J){--Q.pendingcb,j?(g.nextTick(J,X),g.nextTick(E,U,Q),U._writableState.errorEmitted=!0,w(U,X)):(J(X),U._writableState.errorEmitted=!0,w(U,X),E(U,Q))})(K,W,$,q,R);else{var N=P(W)||K.destroyed;N||W.corked||W.bufferProcessing||!W.bufferedRequest||I(K,W),$?g.nextTick(A,K,W,N,R):A(K,W,N,R)}})(F,Z)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new b(this)}function k(D){var F=this instanceof(v=v||y("./_stream_duplex"));if(!F&&!r.call(k,this))return new k(D);this._writableState=new T(D,this,F),this.writable=!0,D&&(typeof D.write=="function"&&(this._write=D.write),typeof D.writev=="function"&&(this._writev=D.writev),typeof D.destroy=="function"&&(this._destroy=D.destroy),typeof D.final=="function"&&(this._final=D.final)),n.call(this)}function L(D,F,H,V,Z,K,q){F.writelen=V,F.writecb=q,F.writing=!0,F.sync=!0,F.destroyed?F.onwrite(new p("write")):H?D._writev(Z,F.onwrite):D._write(Z,K,F.onwrite),F.sync=!1}function A(D,F,H,V){H||function(Z,K){K.length===0&&K.needDrain&&(K.needDrain=!1,Z.emit("drain"))}(D,F),F.pendingcb--,V(),E(D,F)}function I(D,F){F.bufferProcessing=!0;var H=F.bufferedRequest;if(D._writev&&H&&H.next){var V=F.bufferedRequestCount,Z=new Array(V),K=F.corkedRequestsFree;K.entry=H;for(var q=0,W=!0;H;)Z[q]=H,H.isBuf||(W=!1),H=H.next,q+=1;Z.allBuffers=W,L(D,F,!0,F.length,Z,"",K.finish),F.pendingcb++,F.lastBufferedRequest=null,K.next?(F.corkedRequestsFree=K.next,K.next=null):F.corkedRequestsFree=new b(F),F.bufferedRequestCount=0}else{for(;H;){var $=H.chunk,R=H.encoding,N=H.callback;if(L(D,F,!1,F.objectMode?1:$.length,$,R,N),H=H.next,F.bufferedRequestCount--,F.writing)break}H===null&&(F.lastBufferedRequest=null)}F.bufferedRequest=H,F.bufferProcessing=!1}function P(D){return D.ending&&D.length===0&&D.bufferedRequest===null&&!D.finished&&!D.writing}function S(D,F){D._final(function(H){F.pendingcb--,H&&w(D,H),F.prefinished=!0,D.emit("prefinish"),E(D,F)})}function E(D,F){var H=P(F);if(H&&(function(Z,K){K.prefinished||K.finalCalled||(typeof Z._final!="function"||K.destroyed?(K.prefinished=!0,Z.emit("prefinish")):(K.pendingcb++,K.finalCalled=!0,g.nextTick(S,Z,K)))}(D,F),F.pendingcb===0&&(F.finished=!0,D.emit("finish"),F.autoDestroy))){var V=D._readableState;(!V||V.autoDestroy&&V.endEmitted)&&D.destroy()}return H}y("inherits")(k,n),T.prototype.getBuffer=function(){for(var D=this.bufferedRequest,F=[];D;)F.push(D),D=D.next;return F},function(){try{Object.defineProperty(T.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(r=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(D){return!!r.call(this,D)||this===k&&D&&D._writableState instanceof T}})):r=function(D){return D instanceof this},k.prototype.pipe=function(){w(this,new h)},k.prototype.write=function(D,F,H){var V,Z=this._writableState,K=!1,q=!Z.objectMode&&(V=D,t.isBuffer(V)||V instanceof o);return q&&!t.isBuffer(D)&&(D=function(W){return t.from(W)}(D)),typeof F=="function"&&(H=F,F=null),q?F="buffer":F||(F=Z.defaultEncoding),typeof H!="function"&&(H=_),Z.ending?function(W,$){var R=new x;w(W,R),g.nextTick($,R)}(this,H):(q||function(W,$,R,N){var U;
1212return R===null?U=new a:typeof R=="string"||$.objectMode||(U=new u("chunk",["string","Buffer"],R)),!U||(w(W,U),g.nextTick(N,U),!1)}(this,Z,D,H))&&(Z.pendingcb++,K=function(W,$,R,N,U,Q){if(!R){var j=function(ne,se,oe){return ne.objectMode||ne.decodeStrings===!1||typeof se!="string"||(se=t.from(se,oe)),se}($,N,U);N!==j&&(R=!0,U="buffer",N=j)}var X=$.objectMode?1:N.length;$.length+=X;var J=$.length<$.highWaterMark;if(J||($.needDrain=!0),$.writing||$.corked){var re=$.lastBufferedRequest;$.lastBufferedRequest={chunk:N,encoding:U,isBuf:R,callback:Q,next:null},re?re.next=$.lastBufferedRequest:$.bufferedRequest=$.lastBufferedRequest,$.bufferedRequestCount+=1}else L(W,$,!1,X,N,U,Q);return J}(this,Z,q,D,F,H)),K},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var D=this._writableState;D.corked&&(D.corked--,D.writing||D.corked||D.bufferProcessing||!D.bufferedRequest||I(this,D))},k.prototype.setDefaultEncoding=function(D){if(typeof D=="string"&&(D=D.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((D+"").toLowerCase())>-1))throw new l(D);return this._writableState.defaultEncoding=D,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(D,F,H){H(new f("_write()"))},k.prototype._writev=null,k.prototype.end=function(D,F,H){var V=this._writableState;return typeof D=="function"?(H=D,D=null,F=null):typeof F=="function"&&(H=F,F=null),D!=null&&this.write(D,F),V.corked&&(V.corked=1,this.uncork()),V.ending||function(Z,K,q){K.ending=!0,E(Z,K),q&&(K.finished?g.nextTick(q):Z.once("finish",q)),K.ended=!0,Z.writable=!1}(this,V,H),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(D){this._writableState&&(this._writableState.destroyed=D)}}),k.prototype.destroy=d.destroy,k.prototype._undestroy=d.undestroy,k.prototype._destroy=function(D,F){F(D)}}).call(this)}).call(this,y("_process"),typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":286,"./_stream_duplex":287,"./internal/streams/destroy":294,"./internal/streams/state":298,"./internal/streams/stream":299,_process:277,buffer:85,inherits:231,"util-deprecate":330}],292:[function(y,ee,te){(function(g){(function(){var m;function b(p,a,x){return a in p?Object.defineProperty(p,a,{value:x,enumerable:!0,configurable:!0,writable:!0}):p[a]=x,p}var v=y("./end-of-stream"),e=Symbol("lastResolve"),n=Symbol("lastReject"),t=Symbol("error"),o=Symbol("ended"),r=Symbol("lastPromise"),d=Symbol("handlePromise"),c=Symbol("stream");function i(p,a){return{value:p,done:a}}function u(p){var a=p[e];if(a!==null){var x=p[c].read();x!==null&&(p[r]=null,p[e]=null,p[n]=null,a(i(x,!1)))}}function f(p){g.nextTick(u,p)}var s=Object.getPrototypeOf(function(){}),h=Object.setPrototypeOf((b(m={get stream(){return this[c]},next:function(){var p=this,a=this[t];if(a!==null)return Promise.reject(a);if(this[o])return Promise.resolve(i(void 0,!0));if(this[c].destroyed)return new Promise(function(_,T){g.nextTick(function(){p[t]?T(p[t]):_(i(void 0,!0))})});var x,l=this[r];if(l)x=new Promise(function(_,T){return function(k,L){_.then(function(){T[o]?k(i(void 0,!0)):T[d](k,L)},L)}}(l,this));else{var w=this[c].read();if(w!==null)return Promise.resolve(i(w,!1));x=new Promise(this[d])}return this[r]=x,x}},Symbol.asyncIterator,function(){return this}),b(m,"return",function(){var p=this;return new Promise(function(a,x){p[c].destroy(null,function(l){l?x(l):a(i(void 0,!0))})})}),m),s);ee.exports=function(p){var a,x=Object.create(h,(b(a={},c,{value:p,writable:!0}),b(a,e,{value:null,writable:!0}),b(a,n,{value:null,writable:!0}),b(a,t,{value:null,writable:!0}),b(a,o,{value:p._readableState.endEmitted,writable:!0}),b(a,d,{value:function(l,w){var _=x[c].read();_?(x[r]=null,x[e]=null,x[n]=null,l(i(_,!1))):(x[e]=l,x[n]=w)},writable:!0}),a));return x[r]=null,v(p,function(l){if(l&&l.code!=="ERR_STREAM_PREMATURE_CLOSE"){var w=x[n];return w!==null&&(x[r]=null,x[e]=null,x[n]=null,w(l)),void(x[t]=l)}var _=x[e];_!==null&&(x[r]=null,x[e]=null,x[n]=null,_(i(void 0,!0))),x[o]=!0}),p.on("readable",f.bind(null,x)),x}}).call(this)}).call(this,y("_process"))},{"./end-of-stream":295,_process:277}],293:[function(y,ee,te){function g(t,o){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(t);o&&(d=d.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),r.push.apply(r,d)}return r}function m(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}function b(t,o){for(var r=0;r<o.length;r++){var d=o[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(t,d.key,d)}}var v=y("buffer").Buffer,e=y("util").inspect,n=e&&e.custom||"inspect";ee.exports=function(){function t(){(function(d,c){if(!(d instanceof c))throw new TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}var o,r;return o=t,(r=[{key:"push",value:function(d){var c={data:d,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length}},{key:"unshift",value:function(d){var c={data:d,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length}},{key:"shift",value:function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(d){if(this.length===0)return"";for(var c=this.head,i=""+c.data;c=c.next;)i+=d+c.data;return i}},{key:"concat",value:function(d){if(this.length===0)return v.alloc(0);for(var c,i,u,f=v.allocUnsafe(d>>>0),s=this.head,h=0;s;)c=s.data,i=f,u=h,v.prototype.copy.call(c,i,u),h+=s.data.length,s=s.next;return f}},{key:"consume",value:function(d,c){var i;return d<this.head.data.length?(i=this.head.data.slice(0,d),this.head.data=this.head.data.slice(d)):i=d===this.head.data.length?this.shift():c?this._getString(d):this._getBuffer(d),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(d){var c=this.head,i=1,u=c.data;for(d-=u.length;c=c.next;){var f=c.data,s=d>f.length?f.length:d;if(s===f.length?u+=f:u+=f.slice(0,d),(d-=s)==0){s===f.length?(++i,c.next?this.head=c.next:this.head=this.tail=null):(this.head=c,c.data=f.slice(s));break}++i}return this.length-=i,u}},{key:"_getBuffer",value:function(d){var c=v.allocUnsafe(d),i=this.head,u=1;for(i.data.copy(c),d-=i.data.length;i=i.next;){var f=i.data,s=d>f.length?f.length:d;if(f.copy(c,c.length-d,0,s),(d-=s)==0){s===f.length?(++u,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=f.slice(s));break}++u}return this.length-=u,c}},{key:n,value:function(d,c){return e(this,function(i){for(var u=1;u<arguments.length;u++){var f=arguments[u]!=null?arguments[u]:{};
1212u%2?g(Object(f),!0).forEach(function(s){m(i,s,f[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(f)):g(Object(f)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(f,s))})}return i}({},c,{depth:0,customInspect:!1}))}}])&&b(o.prototype,r),t}()},{buffer:85,util:83}],294:[function(y,ee,te){(function(g){(function(){function m(e,n){v(e,n),b(e)}function b(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function v(e,n){e.emit("error",n)}ee.exports={destroy:function(e,n){var t=this,o=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return o||r?(n?n(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,g.nextTick(v,this,e)):g.nextTick(v,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(d){!n&&d?t._writableState?t._writableState.errorEmitted?g.nextTick(b,t):(t._writableState.errorEmitted=!0,g.nextTick(m,t,d)):g.nextTick(m,t,d):n?(g.nextTick(b,t),n(d)):g.nextTick(b,t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,n){var t=e._readableState,o=e._writableState;t&&t.autoDestroy||o&&o.autoDestroy?e.destroy(n):e.emit("error",n)}}}).call(this)}).call(this,y("_process"))},{_process:277}],295:[function(y,ee,te){var g=y("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function m(){}ee.exports=function b(v,e,n){if(typeof e=="function")return b(v,null,e);e||(e={}),n=function(p){var a=!1;return function(){if(!a){a=!0;for(var x=arguments.length,l=new Array(x),w=0;w<x;w++)l[w]=arguments[w];p.apply(this,l)}}}(n||m);var t=e.readable||e.readable!==!1&&v.readable,o=e.writable||e.writable!==!1&&v.writable,r=function(){v.writable||c()},d=v._writableState&&v._writableState.finished,c=function(){o=!1,d=!0,t||n.call(v)},i=v._readableState&&v._readableState.endEmitted,u=function(){t=!1,i=!0,o||n.call(v)},f=function(p){n.call(v,p)},s=function(){var p;return t&&!i?(v._readableState&&v._readableState.ended||(p=new g),n.call(v,p)):o&&!d?(v._writableState&&v._writableState.ended||(p=new g),n.call(v,p)):void 0},h=function(){v.req.on("finish",c)};return function(p){return p.setHeader&&typeof p.abort=="function"}(v)?(v.on("complete",c),v.on("abort",s),v.req?h():v.on("request",h)):o&&!v._writableState&&(v.on("end",r),v.on("close",r)),v.on("end",u),v.on("finish",c),e.error!==!1&&v.on("error",f),v.on("close",s),function(){v.removeListener("complete",c),v.removeListener("abort",s),v.removeListener("request",h),v.req&&v.req.removeListener("finish",c),v.removeListener("end",r),v.removeListener("close",r),v.removeListener("finish",c),v.removeListener("end",u),v.removeListener("error",f),v.removeListener("close",s
1212)}}},{"../../../errors":286}],296:[function(y,ee,te){ee.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],297:[function(y,ee,te){var g,m=y("../../../errors").codes,b=m.ERR_MISSING_ARGS,v=m.ERR_STREAM_DESTROYED;function e(d){if(d)throw d}function n(d,c,i,u){u=function(h){var p=!1;return function(){p||(p=!0,h.apply(void 0,arguments))}}(u);var f=!1;d.on("close",function(){f=!0}),g===void 0&&(g=y("./end-of-stream")),g(d,{readable:c,writable:i},function(h){if(h)return u(h);f=!0,u()});var s=!1;return function(h){if(!f&&!s)return s=!0,function(p){return p.setHeader&&typeof p.abort=="function"}(d)?d.abort():typeof d.destroy=="function"?d.destroy():void u(h||new v("pipe"))}}function t(d){d()}function o(d,c){return d.pipe(c)}function r(d){return d.length?typeof d[d.length-1]!="function"?e:d.pop():e}ee.exports=function(){for(var d=arguments.length,c=new Array(d),i=0;i<d;i++)c[i]=arguments[i];var u,f=r(c);if(Array.isArray(c[0])&&(c=c[0]),c.length<2)throw new b("streams");var s=c.map(function(h,p){var a=p<c.length-1;return n(h,a,p>0,function(x){u||(u=x),x&&s.forEach(t),a||(s.forEach(t),f(u))})});return c.reduce(o)}},{"../../../errors":286,"./end-of-stream":295}],298:[function(y,ee,te){var g=y("../../../errors").codes.ERR_INVALID_OPT_VALUE;ee.exports={getHighWaterMark:function(m,b,v,e){var n=function(t,o,r){return t.highWaterMark!=null?t.highWaterMark:o?t[r]:null}(b,e,v);if(n!=null){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new g(e?v:"highWaterMark",n);return Math.floor(n)}return m.objectMode?16:16384}}},{"../../../errors":286}],299:[function(y,ee,te){ee.exports=y("events").EventEmitter},{events:84}],300:[function(y,ee,te){var g=y("safe-buffer").Buffer,m=g.isEncoding||function(i){switch((i=""+i)&&i.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function b(i){var u;switch(this.encoding=function(f){var s=function(h){if(!h)return"utf8";for(var p;;)switch(h){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return h;default:if(p)return;h=(""+h).toLowerCase(),p=!0}}(f);if(typeof s!="string"&&(g.isEncoding===m||!m(f)))throw new Error("Unknown encoding: "+f);return s||f}(i),this.encoding){case"utf16le":this.text=n,this.end=t,u=4;break;case"utf8":this.fillLast=e,u=4;break;case"base64":this.text=o,this.end=r,u=3;break;default:return this.write=d,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(u)}function v(i){return i<=127?0:i>>5==6?2:i>>4==14?3:i>>3==30?4:i>>6==2?-1:-2}function e(i){var u=this.lastTotal-this.lastNeed,f=function(s,h,p){if((192&h[0])!=128)return s.lastNeed=0,"�";if(s.lastNeed>1&&h.length>1){if((192&h[1])!=128)return s.lastNeed=1,"�";if(s.lastNeed>2&&h.length>2&&(192&h[2])!=128)return s.lastNeed=2,"�"}}(this,i);return f!==void 0?f:this.lastNeed<=i.length?(i.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(i.copy(this.lastChar,u,0,i.length),void(this.lastNeed-=i.length))}function n(i,u){if((i.length-u)%2==0){var f=i.toString("utf16le",u);if(f){var s=f.charCodeAt(f.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1],f.slice(0,-1)}return f}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=i[i.length-1],i.toString("utf16le",u,i.length-1)}function t(i){var u=i&&i.length?this.write(i):"";if(this.lastNeed){var f=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,f)}return u}function o(i,u){var f=(i.length-u)%3;return f===0?i.toString("base64",u):(this.lastNeed=3-f,this.lastTotal=3,f===1?this.lastChar[0]=i[i.length-1]:(this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1]),i.toString("base64",u,i.length-f))}function r(i){var u=i&&i.length?this.write(i):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function d(i){return i.toString(this.encoding)}function c(i){return i&&i.length?this.write(i):""}te.StringDecoder=b,b.prototype.write=function(i){if(i.length===0)return"";var u,f;if(this.lastNeed){if((u=this.fillLast(i))===void 0)return"";f=this.lastNeed,this.lastNeed=0}else f=0;return f<i.length?u?u+this.text(i,f):this.text(i,f):u||""},b.prototype.end=function(i){var u=i&&i.length?this.write(i):"";return this.lastNeed?u+"�":u},b.prototype.text=function(i,u){var f=function(h,p,a){var x=p.length-1;if(x<a)return 0;var l=v(p[x]);return l>=0?(l>
12120&&(h.lastNeed=l-1),l):--x<a||l===-2?0:(l=v(p[x]))>=0?(l>0&&(h.lastNeed=l-2),l):--x<a||l===-2?0:(l=v(p[x]))>=0?(l>0&&(l===2?l=0:h.lastNeed=l-3),l):0}(this,i,u);if(!this.lastNeed)return i.toString("utf8",u);this.lastTotal=f;var s=i.length-(f-this.lastNeed);return i.copy(this.lastChar,0,s),i.toString("utf8",u,s)},b.prototype.fillLast=function(i){if(this.lastNeed<=i.length)return i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,i.length),this.lastNeed-=i.length}},{"safe-buffer":284}],301:[function(y,ee,te){(function(g,m){(function(){var b=y("assert"),v=y("debug")("stream-parser");ee.exports=function(f){var s=f&&typeof f._transform=="function",h=f&&typeof f._write=="function";if(!s&&!h)throw new Error("must pass a Writable or Transform stream in");v("extending Parser into stream"),f._bytes=n,f._skipBytes=t,s&&(f._passthrough=o),s?f._transform=d:f._write=r};function e(f){v("initializing parser stream"),f._parserBytesLeft=0,f._parserBuffers=[],f._parserBuffered=0,f._parserState=-1,f._parserCallback=null,typeof f.push=="function"&&(f._parserOutput=f.push.bind(f)),f._parserInit=!0}function n(f,s){b(!this._parserCallback,'there is already a "callback" set!'),b(isFinite(f)&&f>0,'can only buffer a finite number of bytes > 0, got "'+f+'"'),this._parserInit||e(this),v("buffering %o bytes",f),this._parserBytesLeft=f,this._parserCallback=s,this._parserState=0}function t(f,s){b(!this._parserCallback,'there is already a "callback" set!'),b(f>0,'can only skip > 0 bytes, got "'+f+'"'),this._parserInit||e(this),v("skipping %o bytes",f),this._parserBytesLeft=f,this._parserCallback=s,this._parserState=1}function o(f,s){b(!this._parserCallback,'There is already a "callback" set!'),b(f>0,'can only pass through > 0 bytes, got "'+f+'"'),this._parserInit||e(this),v("passing through %o bytes",f),this._parserBytesLeft=f,this._parserCallback=s,this._parserState=2}function r(f,s,h){this._parserInit||e(this),v("write(%o bytes)",f.length),typeof s=="function"&&(h=s),i(this,f,null,h)}function d(f,s,h){this._parserInit||e(this),v("transform(%o bytes)",f.length),typeof s!="function"&&(s=this._parserOutput),i(this,f,s,h)}function c(f,s,h,p){if(f._parserBytesLeft-=s.length,v("%o bytes left for stream piece",f._parserBytesLeft),f._parserState===0?(f._parserBuffers.push(s),f._parserBuffered+=s.length):f._parserState===2&&h(s),f._parserBytesLeft!==0)return p;var a=f._parserCallback;if(a&&f._parserState===0&&f._parserBuffers.length>1&&(s=m.concat(f._parserBuffers,f._parserBuffered)),f._parserState!==0&&(s=null),f._parserCallback=null,f._parserBuffered=0,f._parserState=-1,f._parserBuffers.splice(0),a){var x=[];s&&x.push(s),h&&x.push(h);var l=a.length>x.length;l&&x.push(u(p));var w=a.apply(f,x);if(!l||p===w)return p}}var i=u(function f(s,h,p,a){return s._parserBytesLeft<=0?a(new Error("got data but not currently parsing anything")):h.length<=s._parserBytesLeft?function(){return c(s,h,p,a)}:function(){var x=h.slice(0,s._parserBytesLeft);return c(s,x,p,function(l){return l?a(l):h.length>x.length?function(){return f(s,h.slice(x.length),p,a)}:void 0})}});function u(f){return function(){for(var s=f.apply(this,arguments);typeof s=="function";)s=s();return s}}}).call(this)}).call(this,y("_process"),y("buffer").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(y,ee,te){(function(g){(function(){function m(){var b;try{b=te.storage.debug}catch{}return!b&&g!==void 0&&"env"in g&&(b=g.env.DEBUG),b}(te=ee.exports=y("./debug")).log=function(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},te.formatArgs=function(b){var v=this.useColors;if(b[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+b[0]+(v?"%c ":" ")+"+"+te.humanize(this.diff),!!v){var e="color: "+this.color;b.splice(1,0,e,"color: inherit");var n=0,t=0;b[0].replace(/%[a-zA-Z%]/g,function(o){o!=="%%"&&(n++,o==="%c"&&(t=n))}),b.splice(t,0,e)}},te.save=function(b){try{b==null?te.storage.removeItem("debug"):te.storage.debug=b}catch{}},te.load=m,te.useColors=function(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},te.storage=typeof chrome<"u"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),te.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],te.formatters.j=function(b){try{return JSON.stringify(b)}catch(v){return"[UnexpectedJSONParseError]: "+v.message}},te.enable(m())}).call(this)}).call(this,y("_process"))},{"./debug":303,_process:277}],303:[function(y,ee,te){var g;function m(b){function v(){if(v.enabled){var e=v,n=+new Date,t=n-(g||n);e.diff=t,e.prev=g,e.curr=n,g=n;for(var o=new Array(arguments.length),r=0;r<o.length;r++)o[r]=arguments[r];
1212o[0]=te.coerce(o[0]),typeof o[0]!="string"&&o.unshift("%O");var d=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(i,u){if(i==="%%")return i;d++;var f=te.formatters[u];if(typeof f=="function"){var s=o[d];i=f.call(e,s),o.splice(d,1),d--}return i}),te.formatArgs.call(e,o);var c=v.log||te.log||console.log.bind(console);c.apply(e,o)}}return v.namespace=b,v.enabled=te.enabled(b),v.useColors=te.useColors(),v.color=function(e){var n,t=0;for(n in e)t=(t<<5)-t+e.charCodeAt(n),t|=0;return te.colors[Math.abs(t)%te.colors.length]}(b),typeof te.init=="function"&&te.init(v),v}(te=ee.exports=m.debug=m.default=m).coerce=function(b){return b instanceof Error?b.stack||b.message:b},te.disable=function(){te.enable("")},te.enable=function(b){te.save(b),te.names=[],te.skips=[];for(var v=(typeof b=="string"?b:"").split(/[\s,]+/),e=v.length,n=0;n<e;n++)v[n]&&((b=v[n].replace(/\*/g,".*?"))[0]==="-"?te.skips.push(new RegExp("^"+b.substr(1)+"$")):te.names.push(new RegExp("^"+b+"$")))},te.enabled=function(b){var v,e;for(v=0,e=te.skips.length;v<e;v++)if(te.skips[v].test(b))return!1;for(v=0,e=te.names.length;v<e;v++)if(te.names[v].test(b))return!0;return!1},te.humanize=y("ms"),te.names=[],te.skips=[],te.formatters={}},{ms:304}],304:[function(y,ee,te){var g=1e3,m=6e4,b=60*m,v=24*b;function e(n,t,o){if(!(n<t))return n<1.5*t?Math.floor(n/t)+" "+o:Math.ceil(n/t)+" "+o+"s"}ee.exports=function(n,t){t=t||{};var o,r=typeof n;if(r==="string"&&n.length>0)return function(d){if(!((d=String(d)).length>100)){var c=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(d);if(c){var i=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"days":case"day":case"d":return i*v;case"hours":case"hour":case"hrs":case"hr":case"h":return i*b;case"minutes":case"minute":case"mins":case"min":case"m":return i*m;case"seconds":case"second":case"secs":case"sec":case"s":return i*g;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(n);if(r==="number"&&isNaN(n)===!1)return t.long?e(o=n,v,"day")||e(o,b,"hour")||e(o,m,"minute")||e(o,g,"second")||o+" ms":function(d){return d>=v?Math.round(d/v)+"d":d>=b?Math.round(d/b)+"h":d>=m?Math.round(d/m)+"m":d>=g?Math.round(d/g)+"s":d+"ms"}(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))}},{}],305:[function(y,ee,te){var g=y("parenthesis");ee.exports=function(m,b,v){if(m==null)throw Error("First argument should be a string");if(b==null)throw Error("Separator should be a string or a RegExp");v?(typeof v=="string"||Array.isArray(v))&&(v={ignore:v}):v={},v.escape==null&&(v.escape=!0),v.ignore==null?v.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof v.ignore=="string"&&(v.ignore=[v.ignore]),v.ignore=v.ignore.map(function(c){return c.length===1&&(c+=c),c}));var e=g.parse(m,{flat:!0,brackets:v.ignore}),n=e[0].split(b);if(v.escape){for(var t=[],o=0;o<n.length;o++){var r=n[o],d=n[o+1];r[r.length-1]==="\\"&&r[r.length-2]!=="\\"?(t.push(r+b+d),o++):t.push(r)}n=t}for(o=0;o<n.length;o++)e[0]=n[o],n[o]=g.stringify(e,{flat:!0});return n}},{parenthesis:248}],306:[function(y,ee,te){ee.exports=function(g){for(var m=g.length,b=new Array(m),v=new Array(m),e=new Array(m),n=new Array(m),t=new Array(m),o=new Array(m),r=0;r<m;++r)b[r]=-1,v[r]=0,e[r]=!1,n[r]=0,t[r]=-1,o[r]=[];var d,c=0,i=[],u=[];function f(p){var a=[p],x=[p];for(b[p]=v[p]=c,e[p]=!0,c+=1;x.length>0;){p=x[x.length-1];var l=g[p];if(n[p]<l.length){for(var w=n[p];w<l.length;++w){var _=l[w];if(b[_]<0){b[_]=v[_]=c,e[_]=!0,c+=1,a.push(_),x.push(_);break}e[_]&&(v[p]=0|Math.min(v[p],v[_])),t[_]>=0&&o[p].push(t[_])}n[p]=w}else{if(v[p]===b[p]){var T=[],k=[],L=0;for(w=a.length-1;w>=0;--w){var A=a[w];if(e[A]=!1,T.push(A),k.push(o[A]),L+=o[A].length,t[A]=i.length,A===p){a.length=w;break}}i.push(T);var I=new Array(L);for(w=0;w<k.length;w++)for(var P=0;P<k[w].length;P++)I[--L]=k[w][P];u.push(I)}x.pop()}}}for(r=0;r<m;++r)b[r]<0&&f(r);for(r=0;r<u.length;r++){var s=u[r];if(s.length!==0){s.sort(function(p,a){return p-a}),d=[s[0]];for(var h=1;h<s.length;h++)s[h]!==s[h-1]&&d.push(s[h]);u[r]=d}}return{components:i,adjacencyList:u}}},{}
1212],307:[function(y,ee,te){Object.defineProperty(te,"__esModule",{value:!0});var g=function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return function(o,r){var d=[],c=!0,i=!1,u=void 0;try{for(var f,s=o[Symbol.iterator]();!(c=(f=s.next()).done)&&(d.push(f.value),!r||d.length!==r);c=!0);}catch(h){i=!0,u=h}finally{try{!c&&s.return&&s.return()}finally{if(i)throw u}}return d}(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},m=2*Math.PI,b=function(n,t,o,r,d,c,i){var u=n.x,f=n.y;return{x:r*(u*=t)-d*(f*=o)+c,y:d*u+r*f+i}},v=function(n,t){var o=t===1.5707963267948966?.551915024494:t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),r=Math.cos(n),d=Math.sin(n),c=Math.cos(n+t),i=Math.sin(n+t);return[{x:r-d*o,y:d+r*o},{x:c+i*o,y:i-c*o},{x:c,y:i}]},e=function(n,t,o,r){var d=n*o+t*r;return d>1&&(d=1),d<-1&&(d=-1),(n*r-t*o<0?-1:1)*Math.acos(d)};te.default=function(n){var t=n.px,o=n.py,r=n.cx,d=n.cy,c=n.rx,i=n.ry,u=n.xAxisRotation,f=u===void 0?0:u,s=n.largeArcFlag,h=s===void 0?0:s,p=n.sweepFlag,a=p===void 0?0:p,x=[];if(c===0||i===0)return[];var l=Math.sin(f*m/360),w=Math.cos(f*m/360),_=w*(t-r)/2+l*(o-d)/2,T=-l*(t-r)/2+w*(o-d)/2;if(_===0&&T===0)return[];c=Math.abs(c),i=Math.abs(i);var k=Math.pow(_,2)/Math.pow(c,2)+Math.pow(T,2)/Math.pow(i,2);k>1&&(c*=Math.sqrt(k),i*=Math.sqrt(k));var L=function(V,Z,K,q,W,$,R,N,U,Q,j,X){var J=Math.pow(W,2),re=Math.pow($,2),ne=Math.pow(j,2),se=Math.pow(X,2),oe=J*re-J*se-re*ne;oe<0&&(oe=0),oe/=J*se+re*ne;var pe=(oe=Math.sqrt(oe)*(R===N?-1:1))*W/$*X,ce=oe*-$/W*j,de=Q*pe-U*ce+(V+K)/2,xe=U*pe+Q*ce+(Z+q)/2,we=(j-pe)/W,be=(X-ce)/$,Ee=(-j-pe)/W,fe=(-X-ce)/$,me=e(1,0,we,be),Te=e(we,be,Ee,fe);return N===0&&Te>0&&(Te-=m),N===1&&Te<0&&(Te+=m),[de,xe,me,Te]}(t,o,r,d,c,i,h,a,l,w,_,T),A=g(L,4),I=A[0],P=A[1],S=A[2],E=A[3],D=Math.abs(E)/(m/4);Math.abs(1-D)<1e-7&&(D=1);var F=Math.max(Math.ceil(D),1);E/=F;for(var H=0;H<F;H++)x.push(v(S,E)),S+=E;return x.map(function(V){var Z=b(V[0],c,i,w,l,I,P),K=Z.x,q=Z.y,W=b(V[1],c,i,w,l,I,P),$=W.x,R=W.y,N=b(V[2],c,i,w,l,I,P);return{x1:K,y1:q,x2:$,y2:R,x:N.x,y:N.y}})},ee.exports=te.default},{}],308:[function(y,ee,te){var g=y("parse-svg-path"),m=y("abs-svg-path"),b=y("normalize-svg-path"),v=y("is-svg-path"),e=y("assert");ee.exports=function(n){if(Array.isArray(n)&&n.length===1&&typeof n[0]=="string"&&(n=n[0]),typeof n=="string"&&(e(v(n),"String is not an SVG path."),n=g(n)),e(Array.isArray(n),"Argument should be a string or an array of path segments."),n=m(n),!(n=b(n)).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],o=0,r=n.length;o<r;o++)for(var d=n[o].slice(1),c=0;c<d.length;c+=2)d[c+0]<t[0]&&(t[0]=d[c+0]),d[c+1]<t[1]&&(t[1]=d[c+1]),d[c+0]>t[2]&&(t[2]=d[c+0]),d[c+1]>t[3]&&(t[3]=d[c+1]);return t}},{"abs-svg-path":70,assert:75,"is-svg-path":238,"normalize-svg-path":309,"parse-svg-path":250}],309:[function(y,ee,te){ee.exports=function(v){for(var e,n=[],t=0,o=0,r=0,d=0,c=null,i=null,u=0,f=0,s=0,h=v.length;s<h;s++){var p=v[s],a=p[0];switch(a){case"M":r=p[1],d=p[2];break;case"A":var x=g({px:u,py:f,cx:p[6],cy:p[7],rx:p[1],ry:p[2],xAxisRotation:p[3],largeArcFlag:p[4],sweepFlag:p[5]});if(!x.length)continue;for(var l,w=0;w<x.length;w++)l=x[w],p=["C",l.x1,l.y1,l.x2,l.y2,l.x,l.y],w<x.length-1&&n.push(p);break;case"S":var _=u,T=f;e!="C"&&e!="S"||(_+=_-t,T+=T-o),p=["C",_,T,p[1],p[2],p[3],p[4]];break;case"T":e=="Q"||e=="T"?(c=2*u-c,i=2*f-i):(c=u,i=f),p=b(u,f,c,i,p[1],p[2]);break;case"Q":c=p[1],i=p[2],p=b(u,f,p[1],p[2],p[3],p[4]);break;case"L":p=m(u,f,p[1],p[2]);break;case"H":p=m(u,f,p[1],f);break;case"V":p=m(u,f,u,p[1]);break;case"Z":p=m(u,f,r,d)}e=a,u=p[p.length-2],f=p[p.length-1],p.length>4?(t=p[p.length-4],o=p[p.length-3]):(t=u,o=f),n.push(p)}return n};var g=y("svg-arc-to-cubic-bezier");function m(v,e,n,t){return["C",v,e,n,t,n,t]}function b(v,e,n,t,o,r){return["C",v/3+2/3*n,e/3+2/3*t,o/3+2/3*n,r/3+2/3*t,o,r]}},{"svg-arc-to-cubic-bezier":307}],310:[function(y,ee,te){var g,m=y("svg-path-bounds"),b=y("parse-svg-path"),v=y("draw-svg-path"),e=y("is-svg-path"),n=y("bitmap-sdf"),t=document.createElement("canvas"),o=t.getContext("2d");ee.exports=function(r,d){if(!e(r))throw Error("Argument should be valid svg path string");d||(d={});var c,i;d.shape?(c=d.shape[0],i=d.shape[1]):(c=t.width=d.w||d.width||200,i=t.height=d.h||d.height||200);var u=Math.min(c,i),f=d.stroke||0,s=d.viewbox||d.viewBox||m(r),h=[c/(s[2]-s[0]),i/(s[3]-s[1])],p=Math.min(h[0]||0,h[1]||0)/2;if(o.fillStyle="black",o.fillRect(0,0,c,i),o.fillStyle="white",f&&(typeof f!="number"&&(f=1),o.strokeStyle=f>0?"white":"black",o.lineWidth=Math.abs(f)),o.translate(.5*c,.5*i),o.scale(p,p),function(){if(g!=null)return g;var l=document.createElement("canvas").getContext("2d");if(l.canvas.width=l.canvas.height=1,!window.Path2D)return g=!1;var w=new Path2D("M0,0h1v1h-1v-1Z");l.fillStyle="black",l.fill(w);var _=l.getImageData(0,0,1,1);return g=_&&_.data&&_.data[3]===255}()){var a=new Path2D(r);o.fill(a),f&&o.stroke(a)}else{var x=b(r);v(o,x),o.fill(),f&&o.stroke()}return o.setTransform(1,0,0,1,0,0),n(o,{cutoff:d.cutoff!=null?d.cutoff:.5,radius:d.radius!=null?d.radius:.5*u})}},{"bitmap-sdf":82,"draw-svg-path":126,"is-svg-path":238,"parse-svg-path":250,"svg-path-bounds":308}],311:[function(y,ee,te){(function(g,m){(function(){var b=y("process/browser.js").nextTick,v=Function.prototype.apply,e=Array.prototype.slice,n={},t=0;function o(r,d){this._id=r,this._clearFn=d}te.setTimeout=function(){return new o(v.call(setTimeout,window,arguments),clearTimeout)},te.setInterval=function(){return new o(v.call(setInterval,window,arguments),clearInterval)},te.clearTimeout=te.clearInterval=function(r){r.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},te.enroll=function(r,d){clearTimeout(r._idleTimeoutId),r._idleTimeout=d},te.unenroll=function(r){clearTimeout(r._idleTimeoutId),r._idleTimeout=-1},te._unrefActive=te.active=function(r){clearTimeout(r._idleTimeoutId);var d=r._idleTimeout;d>=0&&(r._idleTimeoutId=setTimeout(function(){r._onTimeout&&r._onTimeout()},d))},te.setImmediate=typeof g=="function"?g:function(r){var d=t++,c=!(arguments.length<2)&&e.call(arguments,1
1212);return n[d]=!0,b(function(){n[d]&&(c?r.apply(null,c):r.call(null),te.clearImmediate(d))}),d},te.clearImmediate=typeof m=="function"?m:function(r){delete n[r]}}).call(this)}).call(this,y("timers").setImmediate,y("timers").clearImmediate)},{"process/browser.js":277,timers:311}],312:[function(y,ee,te){(function(g){var m=/^\s+/,b=/\s+$/,v=0,e=g.round,n=g.min,t=g.max,o=g.random;function r(U,Q){if(Q=Q||{},(U=U||"")instanceof r)return U;if(!(this instanceof r))return new r(U,Q);var j=function(X){var J={r:0,g:0,b:0},re=1,ne=null,se=null,oe=null,pe=!1,ce=!1;typeof X=="string"&&(X=function(be){be=be.replace(m,"").replace(b,"").toLowerCase();var Ee,fe=!1;if(I[be])be=I[be],fe=!0;else if(be=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(Ee=R.rgb.exec(be))?{r:Ee[1],g:Ee[2],b:Ee[3]}:(Ee=R.rgba.exec(be))?{r:Ee[1],g:Ee[2],b:Ee[3],a:Ee[4]}:(Ee=R.hsl.exec(be))?{h:Ee[1],s:Ee[2],l:Ee[3]}:(Ee=R.hsla.exec(be))?{h:Ee[1],s:Ee[2],l:Ee[3],a:Ee[4]}:(Ee=R.hsv.exec(be))?{h:Ee[1],s:Ee[2],v:Ee[3]}:(Ee=R.hsva.exec(be))?{h:Ee[1],s:Ee[2],v:Ee[3],a:Ee[4]}:(Ee=R.hex8.exec(be))?{r:F(Ee[1]),g:F(Ee[2]),b:F(Ee[3]),a:K(Ee[4]),format:fe?"name":"hex8"}:(Ee=R.hex6.exec(be))?{r:F(Ee[1]),g:F(Ee[2]),b:F(Ee[3]),format:fe?"name":"hex"}:(Ee=R.hex4.exec(be))?{r:F(Ee[1]+""+Ee[1]),g:F(Ee[2]+""+Ee[2]),b:F(Ee[3]+""+Ee[3]),a:K(Ee[4]+""+Ee[4]),format:fe?"name":"hex8"}:(Ee=R.hex3.exec(be))?{r:F(Ee[1]+""+Ee[1]),g:F(Ee[2]+""+Ee[2]),b:F(Ee[3]+""+Ee[3]),format:fe?"name":"hex"}:!1}(X)),typeof X=="object"&&(N(X.r)&&N(X.g)&&N(X.b)?(de=X.r,xe=X.g,we=X.b,J={r:255*E(de,255),g:255*E(xe,255),b:255*E(we,255)},pe=!0,ce=String(X.r).substr(-1)==="%"?"prgb":"rgb"):N(X.h)&&N(X.s)&&N(X.v)?(ne=V(X.s),se=V(X.v),J=function(be,Ee,fe){be=6*E(be,360),Ee=E(Ee,100),fe=E(fe,100);var me=g.floor(be),Te=be-me,_e=fe*(1-Ee),Ae=fe*(1-Te*Ee),Pe=fe*(1-(1-Te)*Ee),De=me%6;return{r:255*[fe,Ae,_e,_e,Pe,fe][De],g:255*[Pe,fe,fe,Ae,_e,_e][De],b:255*[_e,_e,Pe,fe,fe,Ae][De]}}(X.h,ne,se),pe=!0,ce="hsv"):N(X.h)&&N(X.s)&&N(X.l)&&(ne=V(X.s),oe=V(X.l),J=function(be,Ee,fe){var me,Te,_e;function Ae(Ve,Qe,Oe){return Oe<0&&(Oe+=1),Oe>1&&(Oe-=1),Oe<1/6?Ve+6*(Qe-Ve)*Oe:Oe<.5?Qe:Oe<2/3?Ve+(Qe-Ve)*(2/3-Oe)*6:Ve}if(be=E(be,360),Ee=E(Ee,100),fe=E(fe,100),Ee===0)me=Te=_e=fe;else{var Pe=fe<.5?fe*(1+Ee):fe+Ee-fe*Ee,De=2*fe-Pe;me=Ae(De,Pe,be+1/3),Te=Ae(De,Pe,be),_e=Ae(De,Pe,be-1/3)}return{r:255*me,g:255*Te,b:255*_e}}(X.h,ne,oe),pe=!0,ce="hsl"),X.hasOwnProperty("a")&&(re=X.a));var de,xe,we;return re=S(re),{ok:pe,format:X.format||ce,r:n(255,t(J.r,0)),g:n(255,t(J.g,0)),b:n(255,t(J.b,0)),a:re}}(U);this._originalInput=U,this._r=j.r,this._g=j.g,this._b=j.b,this._a=j.a,this._roundA=e(100*this._a)/100,this._format=Q.format||j.format,this._gradientType=Q.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=j.ok,this._tc_id=v++}function d(U,Q,j){U=E(U,255),Q=E(Q,255),j=E(j,255);var X,J,re=t(U,Q,j),ne=n(U,Q,j),se=(re+ne)/2;if(re==ne)X=J=0;else{var oe=re-ne;switch(J=se>.5?oe/(2-re-ne):oe/(re+ne),re){case U:X=(Q-j)/oe+(Q<j?6:0);break;case Q:X=(j-U)/oe+2;break;case j:X=(U-Q)/oe+4}X/=6}return{h:X,s:J,l:se}}function c(U,Q,j){U=E(U,255),Q=E(Q,255),j=E(j,255);var X,J,re=t(U,Q,j),ne=n(U,Q,j),se=re,oe=re-ne;if(J=re===0?0:oe/re,re==ne)X=0;else{switch(re){case U:X=(Q-j)/oe+(Q<j?6:0);break;case Q:X=(j-U)/oe+2;break;case j:X=(U-Q)/oe+4}X/=6}return{h:X,s:J,v:se}}function i(U,Q,j,X){var J=[H(e(U).toString(16)),H(e(Q).toString(16)),H(e(j).toString(16))];return X&&J[0].charAt(0)==J[0].charAt(1)&&J[1].charAt(0)==J[1].charAt(1)&&J[2].charAt(0)==J[2].charAt(1)?J[0].charAt(0)+J[1].charAt(0)+J[2].charAt(0):J.join("")}function u(U,Q,j,X){return[H(Z(X)),H(e(U).toString(16)),H(e(Q).toString(16)),H(e(j).toString(16))].join("")}function f(U,Q){Q=Q===0?0:Q||10;var j=r(U).toHsl();return j.s-=Q/100,j.s=D(j.s),r(j)}function s(U,Q){Q=Q===0?0:Q||10;var j=r(U).toHsl();return j.s+=Q/100,j.s=D(j.s),r(j)}function h(U){return r(U).desaturate(100)}function p(U,Q){Q=Q===0?0:Q||10;var j=r(U).toHsl();return j.l+=Q/100,j.l=D(j.l),r(j)}function a(U,Q){Q=Q===0?0:Q||10;var j=r(U).toRgb();return j.r=t(0,n(255,j.r-e(-Q/100*255))),j.g=t(0,n(255,j.g-e(-Q/100*255))),j.b=t(0,n(255,j.b-e(-Q/100*255))),r(j)}function x(U,Q){Q=Q===0?0:Q||10;var j=r(U).toHsl();return j.l-=Q/100,j.l=D(j.l),r(j)}function l(U,Q){var j=r(U).toHsl(),X=(j.h+Q)%360;return j.h=X<0?360+X:X,r(j)}function w(U){var Q=r(U).toHsl();return Q.h=(Q.h+180)%360,r(Q)}function _(U){var Q=r(U).toHsl(),j=Q.h;return[r(U),r({h:(j+120)%360,s:Q.s,l:Q.l}),r({h:(j+240)%360,s:Q.s,l:Q.l})]}function T(U){var Q=r(U).toHsl(),j=Q.h;return[r(U),r({h:(j+90)%360,s:Q.s,l:Q.l}),r({h:(j+180)%360,s:Q.s,l:Q.l}),r({h:(j+270)%360,s:Q.s,l:Q.l})]}function k(U){var Q=r(U).toHsl(),j=Q.h;return[r(U),r({h:(j+72)%360,s:Q.s,l:Q.l}),r({h:(j+216)%360,s:Q.s,l:Q.l})]}function L(U,Q,j){Q=Q||6,j=j||30;var X=r(U).toHsl(),J=360/j,re=[r(U)];for(X.h=(X.h-(J*Q>>
vendor: 1,877 bytes, line 1212
12121)+720)%360;--Q;)X.h=(X.h+J)%360,re.push(r(X));return re}function A(U,Q){Q=Q||6;for(var j=r(U).toHsv(),X=j.h,J=j.s,re=j.v,ne=[],se=1/Q;Q--;)ne.push(r({h:X,s:J,v:re})),re=(re+se)%1;return ne}r.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 U=this.toRgb();return(299*U.r+587*U.g+114*U.b)/1e3},getLuminance:function(){var U,Q,j,X=this.toRgb();return U=X.r/255,Q=X.g/255,j=X.b/255,.2126*(U<=.03928?U/12.92:g.pow((U+.055)/1.055,2.4))+.7152*(Q<=.03928?Q/12.92:g.pow((Q+.055)/1.055,2.4))+.0722*(j<=.03928?j/12.92:g.pow((j+.055)/1.055,2.4))},setAlpha:function(U){return this._a=S(U),this._roundA=e(100*this._a)/100,this},toHsv:function(){var U=c(this._r,this._g,this._b);return{h:360*U.h,s:U.s,v:U.v,a:this._a}},toHsvString:function(){var U=c(this._r,this._g,this._b),Q=e(360*U.h),j=e(100*U.s),X=e(100*U.v);return this._a==1?"hsv("+Q+", "+j+"%, "+X+"%)":"hsva("+Q+", "+j+"%, "+X+"%, "+this._roundA+")"},toHsl:function(){var U=d(this._r,this._g,this._b);return{h:360*U.h,s:U.s,l:U.l,a:this._a}},toHslString:function(){var U=d(this._r,this._g,this._b),Q=e(360*U.h),j=e(100*U.s),X=e(100*U.l);return this._a==1?"hsl("+Q+", "+j+"%, "+X+"%)":"hsla("+Q+", "+j+"%, "+X+"%, "+this._roundA+")"},toHex:function(U){return i(this._r,this._g,this._b,U)},toHexString:function(U){return"#"+this.toHex(U)},toHex8:function(U){return function(Q,j,X,J,re){var ne=[H(e(Q).toString(16)),H(e(j).toString(16)),H(e(X).toString(16)),H(Z(J))];return re&&ne[0].charAt(0)==ne[0].charAt(1)&&ne[1].charAt(0)==ne[1].charAt(1)&&ne[2].charAt(0)==ne[2].charAt(1)&&ne[3].charAt(0)==ne[3].charAt(1)?ne[0].charAt(0)+ne[1].charAt(0)+ne[2].charAt(0)+ne[3].charAt(0):ne.j
1212oin("")}(this._r,this._g,this._b,this._a,U)},toHex8String:function(U){return"#"+this.toHex8(U)},toRgb:function(){return{r:e(this._r),g:e(this._g),b:e(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+e(this._r)+", "+e(this._g)+", "+e(this._b)+")":"rgba("+e(this._r)+", "+e(this._g)+", "+e(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:e(100*E(this._r,255))+"%",g:e(100*E(this._g,255))+"%",b:e(100*E(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(100*E(this._r,255))+"%, "+e(100*E(this._g,255))+"%, "+e(100*E(this._b,255))+"%)":"rgba("+e(100*E(this._r,255))+"%, "+e(100*E(this._g,255))+"%, "+e(100*E(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(P[i(this._r,this._g,this._b,!0)]||!1)},toFilter:function(U){var Q="#"+u(this._r,this._g,this._b,this._a),j=Q,X=this._gradientType?"GradientType = 1, ":"";if(U){var J=r(U);j="#"+u(J._r,J._g,J._b,J._a)}return"progid:DXImageTransform.Microsoft.gradient("+X+"startColorstr="+Q+",endColorstr="+j+")"},toString:function(U){var Q=!!U;U=U||this._format;var j=!1,X=this._a<1&&this._a>=0;return Q||!X||U!=="hex"&&U!=="hex6"&&U!=="hex3"&&U!=="hex4"&&U!=="hex8"&&U!=="name"?(U==="rgb"&&(j=this.toRgbString()),U==="prgb"&&(j=this.toPercentageRgbString()),U!=="hex"&&U!=="hex6"||(j=this.toHexString()),U==="hex3"&&(j=this.toHexString(!0)),U==="hex4"&&(j=this.toHex8String(!0)),U==="hex8"&&(j=this.toHex8String()),U==="name"&&(j=this.toName()),U==="hsl"&&(j=this.toHslString()),U==="hsv"&&(j=this.toHsvString()),j||this.toHexString()):U==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(U,Q){var j=U.apply(null,[this].concat([].slice.call(Q)));return this._r=j._r,this._g=j._g,this._b=j._b,this.setAlpha(j._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(a,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(s,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(l,arguments)},_applyCombination:function(U,Q){return U.apply(null,[this].concat([].slice.call(Q)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},r.fromRatio=function(U,Q){if(typeof U=="object"){var j={};for(var X in U)U.hasOwnProperty(X)&&(j[X]=X==="a"?U[X]:V(U[X]));U=j}return r(U,Q)},r.equals=function(U,Q){return!(!U||!Q)&&r(U).toRgbString()==r(Q).toRgbString()},r.random=function(){return r.fromRatio({r:o(),g:o(),b:o()})},r.mix=function(U,Q,j){j=j===0?0:j||50;var X=r(U).toRgb(),J=r(Q).toRgb(),re=j/100;return r({r:(J.r-X.r)*re+X.r,g:(J.g-X.g)*re+X.g,b:(J.b-X.b)*re+X.b,a:(J.a-X.a)*re+X.a})},r.readability=function(U,Q){var j=r(U),X=r(Q);return(g.max(j.getLuminance(),X.getLuminance())+.05)/(g.min(j.getLuminance(),X.getLuminance())+.05)},r.isReadable=function(U,Q,j){var X,J,re=r.readability(U,Q);switch(J=!1,(X=function(ne){var se,oe;return se=((ne=ne||{level:"AA",size:"small"}).level||"AA").toUpperCase(),oe=(ne.size||"small").toLowerCase(),se!=="AA"&&se!=="AAA"&&(se="AA"),oe!=="small"&&oe!=="large"&&(oe="small"),{level:se,size:oe}}(j)).level+X.size){case"AAsmall":case"AAAlarge":J=re>=4.5;break;case"AAlarge":J=re>=3;break;case"AAAsmall":J=re>=7}return J},r.mostReadable=function(U,Q,j){var X,J,re,ne,se=null,oe=0;J=(j=j||{}).includeFallbackColors,re=j.level,ne=j.size;for(var pe=0;pe<Q.length;pe++)(X=r.readability(U,Q[pe]))>oe&&(oe=X,se=r(Q[pe]));return r.isReadable(U,se,{level:re,size:ne})||!J?se:(j.includeFallbackColors=!1,r.mostReadable(U,["#fff","#000"],j))};var I=r.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:"90ee9
12120",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"},P=r.hexNames=function(U){var Q={};for(var j in U)U.hasOwnProperty(j)&&(Q[U[j]]=j);return Q}(I);function S(U){return U=parseFloat(U),(isNaN(U)||U<0||U>1)&&(U=1),U}function E(U,Q){(function(X){return typeof X=="string"&&X.indexOf(".")!=-1&&parseFloat(X)===1})(U)&&(U="100%");var j=function(X){return typeof X=="string"&&X.indexOf("%")!=-1}(U);return U=n(Q,t(0,parseFloat(U))),j&&(U=parseInt(U*Q,10)/100),g.abs(U-Q)<1e-6?1:U%Q/parseFloat(Q)}function D(U){return n(1,t(0,U))}function F(U){return parseInt(U,16)}function H(U){return U.length==1?"0"+U:""+U}function V(U){return U<=1&&(U=100*U+"%"),U}function Z(U){return g.round(255*parseFloat(U)).toString(16)}function K(U){return F(U)/255}var q,W,$,R=(W="[\\s|\\(]+("+(q="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",$="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+W),rgba:new RegExp("rgba"+$),hsl:new RegExp("hsl"+W),hsla:new RegExp("hsla"+$),hsv:new RegExp("hsv"+W),hsva:new RegExp("hsva"
1212+$),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 N(U){return!!R.CSS_UNIT.exec(U)}ee!==void 0&&ee.exports?ee.exports=r:window.tinycolor=r})(Math)},{}],313:[function(y,ee,te){ee.exports=m,ee.exports.float32=ee.exports.float=m,ee.exports.fract32=ee.exports.fract=function(b,v){if(b.length){if(b instanceof Float32Array)return new Float32Array(b.length);v instanceof Float32Array||(v=m(b));for(var e=0,n=v.length;e<n;e++)v[e]=b[e]-v[e];return v}return m(b-m(b))};var g=new Float32Array(1);function m(b){return b.length?b instanceof Float32Array?b:new Float32Array(b):(g[0]=b,g[0])}},{}],314:[function(y,ee,te){var g=y("parse-unit");ee.exports=b;function m(v,e){var n=g(getComputedStyle(v).getPropertyValue(e));return n[0]*b(n[1],v)}function b(v,e){switch(e=e||document.body,v=(v||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),v){case"%":return e.clientHeight/100;case"ch":case"ex":return function(n,t){var o=document.createElement("div");o.style["font-size"]="128"+n,t.appendChild(o);var r=m(o,"font-size")/128;return t.removeChild(o),r}(v,e);case"em":return m(e,"font-size");case"rem":return m(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}},{"parse-unit":251}],315:[function(y,ee,te){(function(g,m){m(typeof te=="object"&&ee!==void 0?te:(g=g||self).topojson=g.topojson||{})})(this,function(g){function m(u){return u}function b(u){if(u==null)return m;var f,s,h=u.scale[0],p=u.scale[1],a=u.translate[0],x=u.translate[1];return function(l,w){w||(f=s=0);var _=2,T=l.length,k=new Array(T);for(k[0]=(f+=l[0])*h+a,k[1]=(s+=l[1])*p+x;_<T;)k[_]=l[_],++_;return k}}function v(u){var f,s=b(u.transform),h=1/0,p=h,a=-h,x=-h;function l(_){(_=s(_))[0]<h&&(h=_[0]),_[0]>a&&(a=_[0]),_[1]<p&&(p=_[1]),_[1]>x&&(x=_[1])}function w(_){switch(_.type){case"GeometryCollection":_.geometries.forEach(w);break;case"Point":l(_.coordinates);break;case"MultiPoint":_.coordinates.forEach(l)}}for(f in u.arcs.forEach(function(_){for(var T,k=-1,L=_.length;++k<L;)(T=s(_[k],k))[0]<h&&(h=T[0]),T[0]>a&&(a=T[0]),T[1]<p&&(p=T[1]),T[1]>x&&(x=T[1])}),u.objects)w(u.objects[f]);return[h,p,a,x]}function e(u,f){var s=f.id,h=f.bbox,p=f.properties==null?{}:f.properties,a=n(u,f);return s==null&&h==null?{type:"Feature",properties:p,geometry:a}:h==null?{type:"Feature",id:s,properties:p,geometry:a}:{type:"Feature",id:s,bbox:h,properties:p,geometry:a}}function n(u,f){var s=b(u.transform),h=u.arcs;function p(_,T){T.length&&T.pop();for(var k=h[_<0?~_:_],L=0,A=k.length;L<A;++L)T.push(s(k[L],L));_<0&&function(I,P){for(var S,E=I.length,D=E-P;D<--E;)S=I[D],I[D++]=I[E],I[E]=S}(T,A)}function a(_){return s(_)}function x(_){for(var T=[],k=0,L=_.length;k<L;++k)p(_[k],T);return T.length<2&&T.push(T[0]),T}function l(_){for(var T=x(_);T.length<4;)T.push(T[0]);return T}function w(_){return _.map(l)}return function _(T){var k,L=T.type;switch(L){case"GeometryCollection":return{type:L,geometries:T.geometries.map(_)};case"Point":k=a(T.coordinates);break;case"MultiPoint":k=T.coordinates.map(a);break;case"LineString":k=x(T.arcs);break;case"MultiLineString":k=T.arcs.map(x);break;case"Polygon":k=w(T.arcs);break;case"MultiPolygon":k=T.arcs.map(w);break;default:return null}return{type:L,coordinates:k}}(f)}function t(u,f){var s={},h={},p={},a=[],x=-1;function l(w,_){for(var T in w){var k=w[T];delete _[k.start],delete k.start,delete k.end,k.forEach(function(L){s[L<0?~L:L]=1}),a.push(k)}}return f.forEach(function(w,_){var T,k=u.arcs[w<0?~w:w];k.length<3&&!k[1][0]&&!k[1][1]&&(T=f[++x],f[x]=w,f[_]=T)}),f.forEach(function(w){var _,T,k=function(S){var E,D=u.arcs[S<0?~S:S],F=D[0];return u.transform?(E=[0,0],D.forEach(function(H){E[0]+=H[0],E[1]+=H[1]})):E=D[D.length-1],S<0?[E,F]:[F,E]}(w),L=k[0],A=k[1];if(_=p[L])if(delete p[_.end],_.push(w),_.end=A,T=h[A]){delete h[T.start];var I=T===_?_:_.concat(T);h[I.start=_.start]=p[I.end=T.end]=I}else h[_.start]=p[_.end]=_;else if(_=h[A])if(delete h[_.start],_.unshift(w),_.start=L,T=p[L]){delete p[T.end];var P=T===_?_:T.concat(_);h[P.start=T.start]=p[P.end=_.end]=P}else h[_.start]=p[_.end]=_;else h[(_=[w]).start=L]=p[_.end=A]=_}),l(p,h),l(h,p),f.forEach(function(w){s[w<0?~w:w]||a.push([w])}),a}function o(u,f,s){var h,p,a;if(arguments.length>1)h=r(u,f,s);else for(p=0,h=new Array(a=u.arcs.length);p<a;++p)h[p]=p;return{type:"MultiLineString",arcs:t(u,h)}}function r(u,f,s){var h,p=[],a=[];function x(_){var T=_<0?~_:_;(a[T]||(a[T]=[])).push({i:_,g:h})}function l(_){_.forEach(x)}function w(_){_.forEach(l)}return function _(T){switch(h=T,T.type){case"GeometryCollection":T.geometries.forEac
vendor: 4,142 bytes, line 1212
1212h(_);break;case"LineString":l(T.arcs);break;case"MultiLineString":case"Polygon":w(T.arcs);break;case"MultiPolygon":(function(k){k.forEach(w)})(T.arcs)}}(f),a.forEach(s==null?function(_){p.push(_[0].i)}:function(_){s(_[0].g,_[_.length-1].g)&&p.push(_[0].i)}),p}function d(u,f){var s={},h=[],p=[];function a(l){l.forEach(function(w){w.forEach(function(_){(s[_=_<0?~_:_]||(s[_]=[])).push(l)})}),h.push(l)}function x(l){return function(w){for(var _,T=-1,k=w.length,L=w[k-1],A=0;++T<k;)_=L,L=w[T],A+=_[0]*L[1]-_[1]*L[0];return Math.abs(A)}(n(u,{type:"Polygon",arcs:[l]}).coordinates[0])}return f.forEach(function l(w){switch(w.type){case"GeometryCollection":w.geometries.forEach(l);break;case"Polygon":a(w.arcs);break;case"MultiPolygon":w.arcs.forEach(a)}}),h.forEach(function(l){if(!l._){var w=[],_=[l];for(l._=1,p.push(w);l=_.pop();)w.push(l),l.forEach(function(T){T.forEach(function(k){s[k<0?~k:k].forEach(function(L){L._||(L._=1,_.push(L))})})})}}),h.forEach(function(l){delete l._}),{type:"MultiPolygon",arcs:p.map(function(l){var w,_=[];if(l.forEach(function(I){I.forEach(function(P){P.forEach(function(S){s[S<0?~S:S].length<2&&_.push(S)})})}),(w=(_=t(u,_)).length)>1)for(var T,k,L=1,A=x(_[0]);L<w;++L)(T=x(_[L]))>A&&(k=_[0],_[0]=_[L],_[L]=k,A=T);return _}).filter(function(l){return l.length>0})}}function c(u,f){for(var s=0,h=u.length;s<h;){var p=s+h>>>1;u[p]<f?s=p+1:h=p}return s}function i(u){if(u==null)return m;var f,s,h=u.scale[0],p=u.scale[1],a=u.translate[0],x=u.translate[1];return function(l,w){w||(f=s=0);var _=2,T=l.length,k=new Array(T),L=Math.round((l[0]-a)/h),A=Math.round((l[1]-x)/p);for(k[0]=L-f,f=L,k[1]=A-s,s=A;_<T;)k[_]=l[_],++_;return k}}g.bbox=v,g.feature=function(u,f){return typeof f=="string"&&(f=u.objects[f]),f.type==="GeometryCollection"?{type:"FeatureCollection",features:f.geometries.map(function(s){return e(u,s)})}:e(u,f)},g.merge=function(u){return n(u,d.apply(this,arguments))},g.mergeArcs=d,g.mesh=function(u){return n(u,o.apply(this,arguments))},g.meshArcs=o,g.neighbors=function(u){var f={},s=u.map(function(){return[]});function h(I,P){I.forEach(function(S){S<0&&(S=~S);var E=f[S];E?E.push(P):f[S]=[P]})}function p(I,P){I.forEach(function(S){h(S,P)})}var a={LineString:h,MultiLineString:p,Polygon:p,MultiPolygon:function(I,P){I.forEach(function(S){p(S,P)})}};for(var x in u.forEach(function I(P,S){P.type==="GeometryCollection"?P.geometries.forEach(function(E){I(E,S)}):P.type in a&&a[P.type](P.arcs,S)}),f)for(var l=f[x],w=l.length,_=0;_<w;++_)for(var T=_+1;T<w;++T){var k,L=l[_],A=l[T];(k=s[L])[x=c(k,A)]!==A&&k.splice(x,0,A),(k=s[A])[x=c(k,L)]!==L&&k.splice(x,0,L)}return s},g.quantize=function(u,f){if(u.transform)throw new Error("already quantized");if(f&&f.scale)l=u.bbox;else{if(!((s=Math.floor(f))>=2))throw new Error("n must be ≥2");var s,h=(l=u.bbox||v(u))[0],p=l[1],a=l[2],x=l[3];f={scale:[a-h?(a-h)/(s-1):1,x-p?(x-p)/(s-1):1],translate:[h,p]}}var l,w,_=i(f),T=u.objects,k={};function L(I){return _(I)}function A(I){var P;switch(I.type){case"GeometryCollection":P={type:"GeometryCollection",geometries:I.geometries.map(A)};break;case"Point":P={type:"Point",coordinates:L(I.coordinates)};break;case"MultiPoint":P={type:"MultiPoint",coordinates:I.coordinates.map(L)};break;default:return I}return I.id!=null&&(P.id=I.id),I.bbox!=null&&(P.bbox=I.bbox),I.properties!=null&&(P.properties=I.properties),P}for(w in T)k[w]=A(T[w]);return{type:"Topology",bbox:l,transform:f,objects:k,arcs:u.arcs.map(function(I){var P,S=0,E=1,D=I.length,F=new Array(D);for(F[0]=_(I[0],0);++S<D;)((P=_(I[S],S))[0]||P[1])&&(F[E++]=P);return E===1&&(F[E++]=[0,0]),F.length=E,F})}},g.transform=b,g.untransform=i,Object.defineProperty(g,"__esModule",{value:!0})})},{}],316:[function(y,ee,te){var g=y("../prototype/is");ee.exports=function(m){if(typeof m!="function"||!hasOwnProperty.call(m,"length"))return!1;try{if(typeof m.length!="number"||typeof m.call!="function"||typeof m.apply!="function")return!1}catch{return!1}return!g(m)}},{"../prototype/is":323}],317:[function(y,ee,te){var g=y("../value/is"),m=y("../object/is"),b=y("../string/coerce"),v=y("./to-short-string"),e=function(n,t){return n.replace("%v",v(t))};
1212ee.exports=function(n,t,o){if(!m(o))throw new TypeError(e(t,n));if(!g(n)){if("default"in o)return o.default;if(o.isOptional)return null}var r=b(o.errorMessage);throw g(r)||(r=t),new TypeError(e(r,n))}},{"../object/is":320,"../string/coerce":324,"../value/is":326,"./to-short-string":319}],318:[function(y,ee,te){ee.exports=function(g){try{return g.toString()}catch{try{return String(g)}catch{return null}}}},{}],319:[function(y,ee,te){var g=y("./safe-to-string"),m=/[\n\r\u2028\u2029]/g;ee.exports=function(b){var v=g(b);return v===null?"<Non-coercible to string value>":(v.length>100&&(v=v.slice(0,99)+"…"),v=v.replace(m,function(e){switch(e){case`
1213`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},{"./safe-to-string":318}],320:[function(y,ee,te){var g=y("../value/is"),m={object:!0,function:!0,undefined:!0};ee.exports=function(b){return!!g(b)&&hasOwnProperty.call(m,typeof b)}},{"../value/is":326}],321:[function(y,ee,te){var g=y("../lib/resolve-exception"),m=y("./is");ee.exports=function(b){return m(b)?b:g(b,"%v is not a plain function",arguments[1])}},{"../lib/resolve-exception":317,"./is":322}],322:[function(y,ee,te){var g=y("../function/is"),m=/^\s*class[\s{/}]/,b=Function.prototype.toString;ee.exports=function(v){return!!g(v)&&!m.test(b.call(v))}},{"../function/is":316}],323:[function(y,ee,te){var g=y("../object/is");ee.exports=function(m){if(!g(m))return!1;try{return!!m.constructor&&m.constructor.prototype===m}catch{return!1}}},{"../object/is":320}],324:[function(y,ee,te){var g=y("../value/is"),m=y("../object/is"),b=Object.prototype.toString;ee.exports=function(v){if(!g(v))return null;if(m(v)){var e=v.toString;if(typeof e!="function"||e===b)return null}try{return""+v}catch{return null}}},{"../object/is":320,"../value/is":326}],325:[function(y,ee,te){var g=y("../lib/resolve-exception"),m=y("./is");ee.exports=function(b){return m(b)?b:g(b,"Cannot use %v",arguments[1])}},{"../lib/resolve-exception":317,"./is":326}],326:[function(y,ee,te){ee.exports=function(g){return g!=null}},{}],327:[function(y,ee,te){(function(g){(function(){var m=y("bit-twiddle"),b=y("dup"),v=y("buffer").Buffer;g.__TYPEDARRAY_POOL||(g.__TYPEDARRAY_POOL={UINT8:b([32,0]),UINT16:b([32,0]),UINT32:b([32,0]),BIGUINT64:b([32,0]),INT8:b([32,0]),INT16:b([32,0]),INT32:b([32,0]),BIGINT64:b([32,0]),FLOAT:b([32,0]),DOUBLE:b([32,0]),DATA:b([32,0]),UINT8C:b([32,0]),BUFFER:b([32,0])});var e=typeof Uint8ClampedArray<"u",n=typeof BigUint64Array<"u",t=typeof BigInt64Array<"u",o=g.__TYPEDARRAY_POOL;o.UINT8C||(o.UINT8C=b([32,0])),o.BIGUINT64||(o.BIGUINT64=b([32,0])),o.BIGINT64||(o.BIGINT64=b([32,0])),o.BUFFER||(o.BUFFER=b([32,0]));var r=o.DATA,d=o.BUFFER;function c(A){if(A){var I=A.length||A.byteLength,P=m.log2(I);r[P].push(A)}}function i(A){A=m.nextPow2(A);var I=m.log2(A),P=r[I];return P.length>0?P.pop():new ArrayBuffer(A)}function u(A){return new Uint8Array(i(A),0,A)}function f(A){return new Uint16Array(i(2*A),0,A)}function s(A){return new Uint32Array(i(4*A),0,A)}function h(A){return new Int8Array(i(A),0,A)}function p(A){return new Int16Array(i(2*A),0,A)}function a(A){return new Int32Array(i(4*A),0,A)}function x(A){return new Float32Array(i(4*A),0,A)}function l(A){return new Float64Array(i(8*A),0,A)}function w(A){return e?new Uint8ClampedArray(i(A),0,A):u(A)}function _(A){return n?new BigUint64Array(i(8*A),0,A):null}function T(A){return t?new BigInt64Array(i(8*A),0,A):null}function k(A){return new DataView(i(A),0,A)}function L(A){A=m.nextPow2(A);var I=m.log2(A),P=d[I];return P.length>0?P.pop():new v(A)}te.free=function(A){if(v.isBuffer(A))d[m.log2(A.length)].push(A);else{if(Object.prototype.toString.call(A)!=="[object ArrayBuffer]"&&(A=A.buffer),!A)return;var I=A.length||A.byteLength,P=0|m.log2(I);r[P].push(A)}},te.freeUint8=te.freeUint16=te.freeUint32=te.freeBigUint64=te.freeInt8=te.freeInt16=te.freeInt32=te.freeBigInt64=te.freeFloat32=te.freeFloat=te.freeFloat64=te.freeDouble=te.freeUint8Clamped=te.freeDataView=function(A){c(A.buffer)},te.freeArrayBuffer=c,te.freeBuffer=function(A){d[m.log2(A.length)].push(A)},te.malloc=function(A,I){if(I===void 0||I==="arraybuffer")return i(A);switch(I){case"uint8":return u(A);case"uint16":return f(A);case"uint32":return s(A);case"int8":return h(A);case"int16":return p(A);case"int32":return a(A);case"float":case"float32":return x(A);case"double":case"float64":return l(A);case"uint8_clamped":return w(A);case"bigint64":return T(A);case"biguint64":return _(A);case"buffer":return L(A);case"data":case"dataview":return k(A);default:return null}return null},te.mallocArrayBuffer=i,te.mallocUint8=u,te.mallocUint16=f,te.mallocUint32=s,te.mallocInt8=h,te.mallocInt16=p,te.mallocInt32=a,te.mallocFloat32=te.mallocFloat=x,te.mallocFloat64=te.mallocDouble=l,te.mallocUint8Clamped=w,te.mallocBigUint64=_,te.mallocBigInt64=T,te.mallocDataView=k,te.mallocBuffer=L,te.clearCache=function(){for(var A=0;A<32;++A)o.UINT8[A].length=0,o.UINT16[A].length=0,o.UINT32[A].length=0,o.INT8[A].length=0,o.INT16[A].length=0,o.INT32[A].length=0,o.FLOAT[A].length=0,o.DOUBLE[A].length=0,o.BIGUINT64[A].length=0,o.BIGINT64[A].length=0,o.UINT8C[A].length=0,r[A].length=0,d[A].length=0}}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"bit-twiddle":81,buffer:85,dup:128}],328:[function(y,ee,te){var g=/[\'\"]/;ee.exports=function(m){return m?(g.test(m.charAt(0))&&(m=m.substr(1)),g.test(m.charAt(m.length-1))&&(m=m.substr(0,m.length-1)),m):""}},{}],329:[function(y,ee,te){ee.exports=function(g,m,b){Array.isArray(b)||(b=[].slice.call(arguments,2));for(var v=0,e=b.length;v<e;v++){var n=b[v];for(var t in n)if((m[t]===void 0||Array.isArray(m[t])||g[t]!==m[t])&&t in m){var o;if(n[t]===!0)o=m[t];else if(n[t]===!1||typeof n[t]=="function"&&(o=n[t](m[t],g,m))===void 0)continue;g[t]=o}}return g}},{}],330:[function(y,ee,te){(function(g){(function(){function m(b){try{if(!g.localStorage)return!1}catch{return!1}var v=g.localStorage[b];return v!=null&&String(v).toLowerCase()==="true"}ee.exports=function(b,v){if(m("noDeprecation"))return b;var e=!1;return function(){if(!e){if(m("throwDeprecation"))throw new Error(v);m("traceDeprecation")?console.trace(v):console.warn(v),e=!0}return b.apply(this,arguments)}}}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],331:[function(y,ee,te){var g=y("get-canvas-context");ee.exports=function(m){return g("webgl",m)}},{"get-canvas-context":194}],332:[function(y,ee,te){var g=y("../main"),m=y("object-assign"),b=g.instance();function v(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}v.prototype=new g.baseCalendar,m(v.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(c,i){if(typeof c=="string"){var u=c.match(n);return u?u[0]:""}
1213var f=this._validateYear(c),s=c.month(),h=""+this.toChineseMonth(f,s);return i&&h.length<2&&(h="0"+h),this.isIntercalaryMonth(f,s)&&(h+="i"),h},monthNames:function(c){if(typeof c=="string"){var i=c.match(t);return i?i[0]:""}var u=this._validateYear(c),f=c.month(),s=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(u,f)-1];return this.isIntercalaryMonth(u,f)&&(s="闰"+s),s},monthNamesShort:function(c){if(typeof c=="string"){var i=c.match(o);return i?i[0]:""}var u=this._validateYear(c),f=c.month(),s=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(u,f)-1];return this.isIntercalaryMonth(u,f)&&(s="闰"+s),s},parseMonth:function(c,i){c=this._validateYear(c);var u,f=parseInt(i);if(isNaN(f))i[0]==="闰"&&(u=!0,i=i.substring(1)),i[i.length-1]==="月"&&(i=i.substring(0,i.length-1)),f=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(i);else{var s=i[i.length-1];u=s==="i"||s==="I"}return this.toMonthIndex(c,f,u)},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(c,i){if(c.year&&(c=c.year()),typeof c!="number"||c<1888||c>2111)throw i.replace(/\{0\}/,this.local.name);return c},toMonthIndex:function(c,i,u){var f=this.intercalaryMonth(c);if(u&&i!==f||i<1||i>12)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);return f?!u&&i<=f?i-1:i:i-1},toChineseMonth:function(c,i){c.year&&(i=(c=c.year()).month());var u=this.intercalaryMonth(c);if(i<0||i>(u?12:11))throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);return u?i<u?i+1:i:i+1},intercalaryMonth:function(c){return c=this._validateYear(c),r[c-r[0]]>>13},isIntercalaryMonth:function(c,i){c.year&&(i=(c=c.year()).month());var u=this.intercalaryMonth(c);return!!u&&u===i},leapYear:function(c){return this.intercalaryMonth(c)!==0},weekOfYear:function(c,i,u){var f,s=this._validateYear(c,g.local.invalidyear),h=d[s-d[0]],p=h>>9&4095,a=h>>5&15,x=31&h;(f=b.newDate(p,a,x)).add(4-(f.dayOfWeek()||7),"d");var l=this.toJD(c,i,u)-f.toJD();return 1+Math.floor(l/7)},monthsInYear:function(c){return this.leapYear(c)?13:12},daysInMonth:function(c,i){c.year&&(i=c.month(),c=c.year()),c=this._validateYear(c);var u=r[c-r[0]];if(i>(u>>13?12:11))throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);return u&1<<12-i?30:29},weekDay:function(c,i,u){return(this.dayOfWeek(c,i,u)||7)<6},toJD:function(c,i,u){var f=this._validate(c,h,u,g.local.invalidDate);c=this._validateYear(f.year()),i=f.month(),u=f.day();var s=this.isIntercalaryMonth(c,i),h=this.toChineseMonth(c,i),p=function(a,x,l,w,_){var T,k,L;if(typeof a=="object")k=a,T=x||{};else{var A;if(!(typeof a=="number"&&a>=1888&&a<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof x=="number"&&x>=1&&x<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof l=="number"&&l>=1&&l<=30))throw new Error("Lunar day outside range 1 - 30");typeof w=="object"?(A=!1,T=w):(A=!!w,T={}),k={year:a,month:x,day:l,isIntercalary:A}}L=k.day-1;var I,P=r[k.year-r[0]],S=P>>
121313;I=S&&(k.month>S||k.isIntercalary)?k.month:k.month-1;for(var E=0;E<I;E++)L+=P&1<<12-E?30:29;var D=d[k.year-d[0]],F=new Date(D>>9&4095,(D>>5&15)-1,(31&D)+L);return T.year=F.getFullYear(),T.month=1+F.getMonth(),T.day=F.getDate(),T}(c,h,u,s);return b.toJD(p.year,p.month,p.day)},fromJD:function(c){var i=b.fromJD(c),u=function(s,h,p,a){var x,l;if(typeof s=="object")x=s,l=h||{};else{if(!(typeof s=="number"&&s>=1888&&s<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof h=="number"&&h>=1&&h<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof p=="number"&&p>=1&&p<=31))throw new Error("Solar day outside range 1 - 31");x={year:s,month:h,day:p},l={}}var w=d[x.year-d[0]],_=x.year<<9|x.month<<5|x.day;l.year=_>=w?x.year:x.year-1,w=d[l.year-d[0]];var T,k=new Date(w>>9&4095,(w>>5&15)-1,31&w),L=new Date(x.year,x.month-1,x.day);T=Math.round((L-k)/864e5);var A,I=r[l.year-r[0]];for(A=0;A<13;A++){var P=I&1<<12-A?30:29;if(T<P)break;T-=P}var S=I>>13;return!S||A<S?(l.isIntercalary=!1,l.month=1+A):A===S?(l.isIntercalary=!0,l.month=A):(l.isIntercalary=!1,l.month=A),l.day=1+T,l}(i.year(),i.month(),i.day()),f=this.toMonthIndex(u.year,u.month,u.isIntercalary);return this.newDate(u.year,f,u.day)}
vendor: 4,219 bytes, line 1213
1213,fromString:function(c){var i=c.match(e),u=this._validateYear(+i[1]),f=+i[2],s=!!i[3],h=this.toMonthIndex(u,f,s),p=+i[4];return this.newDate(u,h,p)},add:function(c,i,u){var f=c.year(),s=c.month(),h=this.isIntercalaryMonth(f,s),p=this.toChineseMonth(f,s),a=Object.getPrototypeOf(v.prototype).add.call(this,c,i,u);if(u==="y"){var x=a.year(),l=a.month(),w=this.isIntercalaryMonth(x,p),_=h&&w?this.toMonthIndex(x,p,!0):this.toMonthIndex(x,p,!1);_!==l&&a.month(_)}return a}});var e=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,n=/^\d?\d[iI]?/m,t=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,o=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;g.calendars.chinese=v;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],d=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":346,"object-assign":247}],333:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}b.prototype=new g.baseCalendar,m(b.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","P
1213i Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var e=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear);return(v=e.year()+(e.year()<0?1:0))%4==3||v%4==-1},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(v,e,n){var t=this.newDate(v,e,n);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(v,e){var n=this._validate(v,e,this.minDay,g.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===13&&this.leapYear(n.year())?1:0)},weekDay:function(v,e,n){return(this.dayOfWeek(v,e,n)||7)<6},toJD:function(v,e,n){var t=this._validate(v,e,n,g.local.invalidDate);return(v=t.year())<0&&v++,t.day()+30*(t.month()-1)+365*(v-1)+Math.floor(v/4)+this.jdEpoch-1},fromJD:function(v){var e=Math.floor(v)+.5-this.jdEpoch,n=Math.floor((e-Math.floor((e+366)/1461))/365)+1;n<=0&&n--,e=Math.floor(v)+.5-this.newDate(n,1,1).toJD();var t=Math.floor(e/30)+1,o=e-30*(t-1)+1;return this.newDate(n,t,o)}}),g.calendars.coptic=b},{"../main":346,"object-assign":247}],334:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}b.prototype=new g.baseCalendar,m(b.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),400},weekOfYear:function(e,n,t){var o=this.newDate(e,n,t);return o.add(-o.dayOfWeek(),"d"),Math.floor((o.dayOfYear()-1)/8)+1},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,g.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,n,t){return(this._validate(e,n,t,g.local.invalidDate).day()+1)%8},weekDay:function(e,n,t){var o=this.dayOfWeek(e,n,t);return o>=2&&o<=6},extraInfo:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidDate);return{century:v[Math.floor((o.year()-1)/100)+1]||""}},toJD:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidDate);
1213return e=o.year()+(o.year()<0?1:0),n=o.month(),(t=o.day())+(n>1?16:0)+(n>2?32*(n-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var n=Math.floor(e/400)+1;e-=400*(n-1),e+=e>15?16:0;var t=Math.floor(e/32)+1,o=e-32*(t-1)+1;return this.newDate(n<=0?n-1:n,t,o)}});var v={20:"Fruitbat",21:"Anchovy"};g.calendars.discworld=b},{"../main":346,"object-assign":247}],335:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}b.prototype=new g.baseCalendar,m(b.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,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}}
1213,leapYear:function(v){var e=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear);return(v=e.year()+(e.year()<0?1:0))%4==3||v%4==-1},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(v,e,n){var t=this.newDate(v,e,n);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(v,e){var n=this._validate(v,e,this.minDay,g.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===13&&this.leapYear(n.year())?1:0)},weekDay:function(v,e,n){return(this.dayOfWeek(v,e,n)||7)<6},toJD:function(v,e,n){var t=this._validate(v,e,n,g.local.invalidDate);return(v=t.year())<0&&v++,t.day()+30*(t.month()-1)+365*(v-1)+Math.floor(v/4)+this.jdEpoch-1},fromJD:function(v){var e=Math.floor(v)+.5-this.jdEpoch,n=Math.floor((e-Math.floor((e+366)/1461))/365)+1;n<=0&&n--,e=Math.floor(v)+.5-this.newDate(n,1,1).toJD();var t=Math.floor(e/30)+1,o=e-30*(t-1)+1;return this.newDate(n,t,o)}}),g.calendars.ethiopian=b},{"../main":346,"object-assign":247}],336:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function v(e,n){return e-n*Math.floor(e/n)}b.prototype=new g.baseCalendar,m(b.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var n=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear);return this._leapYear(n.year())},_leapYear:function(e){return v(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,n,t){var o=this.newDate(e,n,t);return o.add(-o.dayOfWeek(),"d"),Math.floor((o.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear).year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,n){return e.year&&(n=e.month(),e=e.year()),this._validate(e,n,this.minDay,g.local.invalidMonth),n===12&&this.leapYear(e)||n===8&&v(this.daysInYear(e),10)===5?30:n===9&&v(this.daysInYear(e),10)===3?29:this.daysPerMonth[n-1]},weekDay:function(e,n,t){return this.dayOfWeek(e,n,t)!==6},extraInfo:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidDate);return{yearType:(this.leapYear(o)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(o)%10-3]}},toJD:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidDate);e=o.year(),n=o.month(),t=o.day();var r=e<=0?e+1:e,d=this.jdEpoch+this._delay1(r)+this._delay2(r)+t+1;if(n<7){for(var c=7;c<=this.monthsInYear(e);c++)d+=this.daysInMonth(e,c);for(c=1;c<n;c++)d+=this.daysInMonth(e,c)}else for(c=7;c<n;c++)d+=this.daysInMonth(e,c);return d},_delay1:function(e){var n=Math.floor((235*e-234)/19),t=12084+13753*n,o=29*n+Math.floor(t/25920);return v(3*(o+1),7)<3&&o++,o},_delay2:function(e){var n=this._delay1(e-1),t=this._delay1(e);return this._delay1(e+1)-t==356?2:t-n==382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var n=Math.floor(98496*(e-this.jdEpoch)/35975351)-1;e>=this.toJD(n===-1?1:n+1,7,1);)n++;for(var t=e<this.toJD(n,1,1)?7:1;e>this.toJD(n,t,this.daysInMonth(n,t));)t++;var o=e-this.toJD(n,t,1)+1;return this.newDate(n,t,o)}}),g.calendars.hebrew=b},{"../main":346,"object-assign":247}],337:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}b.prototype=new g.baseCalendar,m(b.prototype,{name:"Islamic",jdEpoch:19484395e-1,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}}
1213,leapYear:function(v){return(11*this._validate(v,this.minMonth,this.minDay,g.local.invalidYear).year()+14)%30<11},weekOfYear:function(v,e,n){var t=this.newDate(v,e,n);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(v){return this.leapYear(v)?355:354},daysInMonth:function(v,e){var n=this._validate(v,e,this.minDay,g.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===12&&this.leapYear(n.year())?1:0)},weekDay:function(v,e,n){return this.dayOfWeek(v,e,n)!==5},toJD:function(v,e,n){var t=this._validate(v,e,n,g.local.invalidDate);return v=t.year(),e=t.month(),v=v<=0?v+1:v,(n=t.day())+Math.ceil(29.5*(e-1))+354*(v-1)+Math.floor((3+11*v)/30)+this.jdEpoch-1},fromJD:function(v){v=Math.floor(v)+.5;var e=Math.floor((30*(v-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var n=Math.min(12,Math.ceil((v-29-this.toJD(e,1,1))/29.5)+1),t=v-this.toJD(e,n,1)+1;return this.newDate(e,n,t)}}),g.calendars.islamic=b},{"../main":346,"object-assign":247}],338:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}b.prototype=new g.baseCalendar,m(b.prototype,{name:"Julian",jdEpoch:17214235e-1,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}}
1213,leapYear:function(v){var e=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear);return(v=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(v,e,n){var t=this.newDate(v,e,n);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(v,e){var n=this._validate(v,e,this.minDay,g.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===2&&this.leapYear(n.year())?1:0)},weekDay:function(v,e,n){return(this.dayOfWeek(v,e,n)||7)<6},toJD:function(v,e,n){var t=this._validate(v,e,n,g.local.invalidDate);return v=t.year(),e=t.month(),n=t.day(),v<0&&v++,e<=2&&(v--,e+=12),Math.floor(365.25*(v+4716))+Math.floor(30.6001*(e+1))+n-1524.5},fromJD:function(v){var e=Math.floor(v+.5)+1524,n=Math.floor((e-122.1)/365.25),t=Math.floor(365.25*n),o=Math.floor((e-t)/30.6001),r=o-Math.floor(o<14?1:13),d=n-Math.floor(r>2?4716:4715),c=e-t-Math.floor(30.6001*o);return d<=0&&d--,this.newDate(d,r,c)}}),g.calendars.julian=b},{"../main":346,"object-assign":247}],339:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}function v(n,t){return n-t*Math.floor(n/t)}function e(n,t){return v(n-1,t)+1}b.prototype=new g.baseCalendar,m(b.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(n){return this._validate(n,this.minMonth,this.minDay,g.local.invalidYear),!1},formatYear:function(n){n=this._validate(n,this.minMonth,this.minDay,g.local.invalidYear).year();var t=Math.floor(n/400);return n%=400,n+=n<0?400:0,t+"."+Math.floor(n/20)+"."+n%20},forYear:function(n){if((n=n.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,o=0;o<n.length;o++){var r=parseInt(n[o],10);if(Math.abs(r)>19||o>0&&r<0)throw"Invalid Mayan year";t=20*t+r}return t},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,g.local.invalidYear),18},weekOfYear:function(n,t,o){return this._validate(n,t,o,g.local.invalidDate),0},daysInYear:function(n){return this._validate(n,this.minMonth,this.minDay,g.local.invalidYear),360},daysInMonth:function(n,t){return this._validate(n,t,this.minDay,g.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(n,t,o){return this._validate(n,t,o,g.local.invalidDate).day()},weekDay:function(n,t,o){return this._validate(n,t,o,g.local.invalidDate),!0},extraInfo:function(n,t,o){var r=this._validate(n,t,o,g.local.invalidDate).toJD(),d=this._toHaab(r),c=this._toTzolkin(r);return{haabMonthName:this.local.haabMonths[d[0]-1],haabMonth:d[0],haabDay:d[1],tzolkinDayName:this.local.tzolkinMonths[c[0]-1],tzolkinDay:c[0],tzolkinTrecena:c[1]}},_toHaab:function(n){var t=v((n-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,v(t,20)]},_toTzolkin:function(n){return[e((n-=this.jdEpoch)+20,20),e(n+4,13)]},toJD:function(n,t,o){var r=this._validate(n,t,o,g.local.invalidDate);return r.day()+20*r.month()+360*r.year()+this.jdEpoch},fromJD:function(n){n=Math.floor(n)+.5-this.jdEpoch;var t=Math.floor(n/360);n%=360,n+=n<0?360:0;var o=Math.floor(n/20),r=n%20;return this.newDate(t,o,r)}}),g.calendars.mayan=b},{"../main":346,"object-assign":247}],340:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}b.prototype=new g.baseCalendar;var v=g.instance("gregorian");
vendor: 6,115 bytes, line 1213
1213m(b.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var n=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return v.leapYear(n.year()+(n.year()<1?1:0)+1469)},weekOfYear:function(e,n,t){var o=this.newDate(e,n,t);return o.add(1-(o.dayOfWeek()||7),"d"),Math.floor((o.dayOfYear()-1)/7)+1},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,g.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,n,t){return(this.dayOfWeek(e,n,t)||7)<6},toJD:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidMonth);(e=o.year())<0&&e++;for(var r=o.day(),d=1;d<o.month();d++)r+=this.daysPerMonth[d-1];return r+v.toJD(e+1468,3,13)},fromJD:function(e){e=Math.floor(e+.5);for(var n=Math.floor((e-(this.jdEpoch-1))/366);e>=this.toJD(n+1,1,1);)n++;for(var t=e-Math.floor(this.toJD(n,1,1)+.5)+1,o=1;t>this.daysInMonth(n,o);)t-=this.daysInMonth(n,o),o++;return this.newDate(n,o,t)}}),g.calendars.nanakshahi=b},{"../main":346,"object-assign":247}],341:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}b.prototype=new g.baseCalendar,m(b.prototype,{name:"Nepali",jdEpoch:17007095e-1,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(v){return this.daysInYear(v)!==this.daysPerYear},weekOfYear:function(v,e,n){var t=this.newDate(v,e,n);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(v){if(v=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[v]===void 0)return this.daysPerYear;for(var e=0,n=this.minMonth;n<=12;n++)e+=this.NEPALI_CALENDAR_DATA[v][n];return e},daysInMonth:function(v,e){return v.year&&(e=v.month(),v=v.year()),this._validate(v,e,this.minDay,g.local.invalidMonth),this.NEPALI_CALENDAR_DATA[v]===void 0?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[v][e]},weekDay:function(v,e,n){return this.dayOfWeek(v,e,n)!==6},toJD:function(v,e,n){var t=this._validate(v,e,n,g.local.invalidDate);v=t.year(),e=t.month(),n=t.day();var o=g.instance(),r=0,d=e,c=v;this._createMissingCalendarData(v);var i=v-(d>9||d===9&&n>=this.NEPALI_CALENDAR_DATA[c][0]?56:57);for(e!==9&&(r=n,d--);d!==9;)d<=0&&(d=12,c--),r+=this.NEPALI_CALENDAR_DATA[c][d],d--;return e===9?(r+=n-this.NEPALI_CALENDAR_DATA[c][0])<0&&(r+=o.daysInYear(i)):r+=this.NEPALI_CALENDAR_DATA[c][9]-this.NEPALI_CALENDAR_DATA[c][0],o.newDate(i,1,1).add(r,"d").toJD()},fromJD:function(v){var e=g.instance().fromJD(v),n=e.year(),t=e.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var r=9,d=this.NEPALI_CALENDAR_DATA[o][0],c=this.NEPALI_CALENDAR_DATA[o][r]-d+1;t>c;)++r>12&&(r=1,o++),c+=this.NEPALI_CALENDAR_DATA[o][r];var i=this.NEPALI_CALENDAR_DATA[o][r]-(c-t);return this.newDate(o,r,i)},_createMissingCalendarData:function(v){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var n=v-1;n<v+2;n++)this.NEPALI_CALENDAR_DATA[n]===void 0&&(this.NEPALI_CALENDAR_DATA[n]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[
121318,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),g.calendars.nepali=b},{"../main":346,"object-assign":247}],342:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function v(e,n){return e-n*Math.floor(e/n)}b.prototype=new g.baseCalendar,m(b.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}}
1213,leapYear:function(e){var n=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear);return 682*((n.year()-(n.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,n,t){var o=this.newDate(e,n,t);return o.add(-(o.dayOfWeek()+1)%7,"d"),Math.floor((o.dayOfYear()-1)/7)+1},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,g.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,n,t){return this.dayOfWeek(e,n,t)!==5},toJD:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidDate);e=o.year(),n=o.month(),t=o.day();var r=e-(e>=0?474:473),d=474+v(r,2820);return t+(n<=7?31*(n-1):30*(n-1)+6)+Math.floor((682*d-110)/2816)+365*(d-1)+1029983*Math.floor(r/2820)+this.jdEpoch-1},fromJD:function(e){var n=(e=Math.floor(e)+.5)-this.toJD(475,1,1),t=Math.floor(n/1029983),o=v(n,1029983),r=2820;if(o!==1029982){var d=Math.floor(o/366),c=v(o,366);r=Math.floor((2134*d+2816*c+2815)/1028522)+d+1}var i=r+2820*t+474;i=i<=0?i-1:i;var u=e-this.toJD(i,1,1)+1,f=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),s=e-this.toJD(i,f,1)+1;return this.newDate(i,f,s)}}),g.calendars.persian=b,g.calendars.jalali=b},{"../main":346,"object-assign":247}],343:[function(y,ee,te){var g=y("../main"),m=y("object-assign"),b=g.instance();function v(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}v.prototype=new g.baseCalendar,m(v.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var n=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear);return e=this._t2gYear(n.year()),b.leapYear(e)},weekOfYear:function(e,n,t){var o=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear);return e=this._t2gYear(o.year()),b.weekOfYear(e,o.month(),o.day())},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,g.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,n,t){return(this.dayOfWeek(e,n,t)||7)<6},toJD:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidDate);return e=this._t2gYear(o.year()),b.toJD(e,o.month(),o.day())},fromJD:function(e){var n=b.fromJD(e),t=this._g2tYear(n.year());return this.newDate(t,n.month(),n.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),g.calendars.taiwan=v},{"../main":346,"object-assign":247}],344:[function(y,ee,te){var g=y("../main"),m=y("object-assign"),b=g.instance();function v(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}v.prototype=new g.baseCalendar,m(v.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var n=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear);return e=this._t2gYear(n.year()),b.leapYear(e)}
1213,weekOfYear:function(e,n,t){var o=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear);return e=this._t2gYear(o.year()),b.weekOfYear(e,o.month(),o.day())},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,g.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,n,t){return(this.dayOfWeek(e,n,t)||7)<6},toJD:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidDate);return e=this._t2gYear(o.year()),b.toJD(e,o.month(),o.day())},fromJD:function(e){var n=b.fromJD(e),t=this._g2tYear(n.year());return this.newDate(t,n.month(),n.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),g.calendars.thai=v},{"../main":346,"object-assign":247}],345:[function(y,ee,te){var g=y("../main"),m=y("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}b.prototype=new g.baseCalendar,m(b.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var n=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear);return this.daysInYear(n.year())===355},weekOfYear:function(e,n,t){var o=this.newDate(e,n,t);return o.add(-o.dayOfWeek(),"d"),Math.floor((o.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var n=0,t=1;t<=12;t++)n+=this.daysInMonth(e,t);return n},daysInMonth:function(e,n){for(var t=this._validate(e,n,this.minDay,g.local.invalidMonth).toJD()-24e5+.5,o=0,r=0;r<v.length;r++){if(v[r]>t)return v[o]-v[o-1];o++}return 30},weekDay:function(e,n,t){return this.dayOfWeek(e,n,t)!==5},toJD:function(e,n,t){var o=this._validate(e,n,t,g.local.invalidDate),r=12*(o.year()-1)+o.month()-15292;return o.day()+v[r-1]-1+24e5-.5},fromJD:function(e){for(var n=e-24e5+.5,t=0,o=0;o<v.length&&!(v[o]>n);o++)t++;var r=t+15292,d=Math.floor((r-1)/12),c=d+1,i=r-12*d,u=n-v[t-1]+1;return this.newDate(c,i,u)},isValid:function(e,n,t){var o=g.baseCalendar.prototype.isValid.apply(this,arguments);return o&&(o=(e=e.year!=null?e.year:e)>=1276&&e<=1500),o},_validate:function(e,n,t,o){var r=g.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw o.replace(/\{0\}/,this.local.name);return r}}),g.calendars.ummalqura=b;var v
vendor: 15,881 bytes, line 1213
1213=[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]}
1213,{"../main":346,"object-assign":247}],346:[function(y,ee,te){var g=y("object-assign");function m(){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 b(o,r,d,c){if(this._calendar=o,this._year=r,this._month=d,this._day=c,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function v(o,r){return"000000".substring(0,r-(o=""+o).length)+o}function e(){this.shortYearCutoff="+10"}function n(o){this.local=this.regionalOptions[o]||this.regionalOptions[""]}g(m.prototype,{instance:function(o,r){o=(o||"gregorian").toLowerCase(),r=r||"";var d=this._localCals[o+"-"+r];if(!d&&this.calendars[o]&&(d=new this.calendars[o](r),this._localCals[o+"-"+r]=d),!d)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return d},newDate:function(o,r,d,c,i){return(c=(o!=null&&o.year?o.calendar(
vendor: 8,640 bytes, line 1213
1213):typeof c=="string"?this.instance(c,i):c)||this.instance()).newDate(o,r,d)},substituteDigits:function(o){return function(r){return(r+"").replace(/[0-9]/g,function(d){return o[d]})}},substituteChineseDigits:function(o,r){return function(d){for(var c="",i=0;d>0;){var u=d%10;c=(u===0?"":o[u]+r[i])+c,i++,d=Math.floor(d/10)}return c.indexOf(o[1]+r[1])===0&&(c=c.substr(1)),c||o[0]}}}),g(b.prototype,{newDate:function(o,r,d){return this._calendar.newDate(o??this,r,d)},year:function(o){return arguments.length===0?this._year:this.set(o,"y")},month:function(o){return arguments.length===0?this._month:this.set(o,"m")},day:function(o){return arguments.length===0?this._day:this.set(o,"d")},date:function(o,r,d){if(!this._calendar.isValid(o,r,d))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=r,this._day=d,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(o,r){return this._calendar.add(this,o,r)},set:function(o,r){return this._calendar.set(this,o,r)},compareTo:function(o){if(this._calendar.name!==o._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,o._calendar.local.name);var r=this._year!==o._year?this._year-o._year:this._month!==o._month?this.monthOfYear()-o.monthOfYear():this._day-o._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(o){return this._calendar.fromJD(o)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(o){return this._calendar.fromJSDate(o)},toString:function(){return(this.year()<0?"-":"")+v(Math.abs(this.year()),4)+"-"+v(this.month(),2)+"-"+v(this.day(),2)}}),g(e.prototype,{_validateLevel:0,newDate:function(o,r,d){return o==null?this.today():(o.year&&(this._validate(o,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate),d=o.day(),r=o.month(),o=o.year()),new b(this,o,r,d))},today:function(){return this.fromJSDate(new Date)},epoch:function(o){return this._validate(o,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(o){var r=this._validate(o,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+v(Math.abs(r.year()),4)},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(o,r){var d=this._validate(o,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(d.month()+this.monthsInYear(d)-this.firstMonth)%this.monthsInYear(d)+this.minMonth},fromMonthOfYear:function(o,r){var d=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,d,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),d},daysInYear:function(o){var r=this._validate(o,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(o,r,d){var c=this._validate(o,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate);return c.toJD()-this.newDate(c.year(),this.fromMonthOfYear(c.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,r,d){var c=this._validate(o,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(c))+2)%this.daysInWeek()},extraInfo:function(o,r,d){return this._validate(o,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(o,r,d){return this._validate(o,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,r,d),r,d)},_add:function(o,r,d){if(this._validateLevel++,d==="d"||d==="w"){var c=o.toJD()+r*(d==="w"?this.daysInWeek():1),i=o.calendar().fromJD(c);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var u=o.year()+(d==="y"?r:0),f=o.monthOfYear()+(d==="m"?r:0);i=o.day(),d==="y"?(o.month()!==this.fromMonthOfYear(u,f)&&(f=this.newDate(u,o.month(),this.minDay).monthOfYear()),f=Math.min(f,this.monthsInYear(u)),i=Math.min(i,this.daysInMonth(u,this.fromMonthOfYear(u,f)))):d==="m"&&(function(h){for(;f<h.minMonth;)u--,f+=h.monthsInYear(u);for(var p=h.monthsInYear(u);f>p-1+h.minMonth;)u++,f-=p,p=h.monthsInYear(u)}(this),i=Math.min(i,this.daysInMonth(u,this.fromMonthOfYear(u,f))));var s=[u,this.fromMonthOfYear(u,f),i];return this._validateLevel--,s}catch(h){throw this._validateLevel--,h}},_correctAdd:function(o,r,d,c){if(!(this.hasYearZero||c!=="y"&&c!=="m"||r[0]!==0&&o.year()>0==r[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[c],u=d<0?-1:1;r=this._add(o,d*i[0]+u*i[1],i[2])}return o.date(r[0],r[1],r[2])},set:function(o,r,d){this._validate(o,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var c=d==="y"?r:o.year(),i=d==="m"?r:o.month(),u=d==="d"?r:o.day();return d!=="y"&&d!=="m"||(u=Math.min(u,this.daysInMonth(c,i))),o.date(c,i,u)},isValid:function(o,r,d){this._validateLevel++;var c=this.hasYearZero||o!==0;if(c){var i=this.newDate(o,r,this.minDay);c=r>=this.minMonth&&r-this.minMonth<this.monthsInYear(i)&&d>=this.minDay&&d-this.minDay<this.daysInMonth(i)}return this._validateLevel--,c},toJSDate:function(o,r,d){var c=this._validate(o,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate);return t.instance().fromJD(this.toJD(c)).toJSDate()},fromJSDate:function(o){return this.fromJD(t.instance().fromJSDate(o).toJD())},_validate:function(o,r,d,c){if(o.year){if(this._validateLevel===0&&this.name!==o.calendar().name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,o.calendar().local.name);return o}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(o,r,d))throw c.replace(/\{0\}/,this.local.name);var i=this.newDate(o,r,d);return this._validateLevel--,i}catch(u){throw this._validateLevel--,u}}}),n.prototype=new e,g(n.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],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(o){var r=this._validate(o,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(o=r.year()+(r.year()<0?1:0))%4==0&&(o%100!=0||o%400==0)},weekOfYear:function(o,r,d){var c=this.newDate(o,r,d);return c.add(4-(c.dayOfWeek()||7),"d"),Math.floor((c.dayOfYear()-1)/7)+1},daysInMonth:function(o,r){var d=this._validate(o,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===2&&this.leapYear(d.year())?1:0)},weekDay:function(o,r,d){return(this.dayOfWeek(o,r,d)||7)<6},toJD:function(o,r,d){var c=this._validate(o,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate);o=c.year(),r=c.month(),d=c.day(),o<0&&o++,r<3&&(r+=12,o--);var i=Math.floor(o/100),u=2-i+Math.floor(i/4);return Math.floor(365.25*(o+4716))+Math.floor(30.6001*(r+1))+d+u-1524.5},fromJD:function(o){var r=Math.floor(o+.5),d=Math.floor((r-186721625e-2)/36524.25),c=(d=r+1+d-Math.floor(d/4))+1524,i=Math.floor((c-122.1)/365.25),u=Math.floor(365.25*i),f=Math.floor((c-u)/30.6001),s=c-u-Math.floor(30.6001*f),h=f-(f>13.5?13:1),p=i-(h>2.5?4716:4715);return p<=0&&p--,this.newDate(p,h,s)}
1213,toJSDate:function(o,r,d){var c=this._validate(o,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate),i=new Date(c.year(),c.month()-1,c.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(o){return this.newDate(o.getFullYear(),o.getMonth()+1,o.getDate())}});var t=ee.exports=new m;t.cdate=b,t.baseCalendar=e,t.calendars.gregorian=n},{"object-assign":247}],347:[function(y,ee,te){var g=y("object-assign"),m=y("./main");g(m.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"}),m.local=m.regionalOptions[""],g(m.cdate.prototype,{formatDate:function(b,v){return typeof b!="string"&&(v=b,b=""),this._calendar.formatDate(b||"",this,v)}}),g(m.baseCalendar.prototype,{UNIX_EPOCH:m.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:m.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(b,v,e){if(typeof b!="string"&&(e=v,v=b,b=""),!v)return"";if(v.calendar()!==this)throw m.local.invalidFormat||m.regionalOptions[""].invalidFormat;b=b||this.local.dateFormat;for(var n,t,o,r,d=(e=e||{}).dayNamesShort||this.local.dayNamesShort,c=e.dayNames||this.local.dayNames,i=e.monthNumbers||this.local.monthNumbers,u=e.monthNamesShort||this.local.monthNamesShort,f=e.monthNames||this.local.monthNames,s=(e.calculateWeek||this.local.calculateWeek,function(L,A){for(var I=1;k+I<b.length&&b.charAt(k+I)===L;)I++;return k+=I-1,Math.floor(I/(A||1))>1}),h=function(L,A,I,P){var S=""+A;if(s(L,P))for(;S.length<I;)S="0"+S;return S},p=this,a=function(L){return typeof i=="function"?i.call(p,L,s("m")):w(h("m",L.month(),2))},x=function(L,A){return A?typeof f=="function"?f.call(p,L):f[L.month()-p.minMonth]:typeof u=="function"?u.call(p,L):u[L.month()-p.minMonth]},l=this.local.digits,w=function(L){return e.localNumbers&&l?l(L):L},_="",T=!1,k=0;k<b.length;k++)if(T)b.charAt(k)!=="'"||s("'")?_+=b.charAt(k):T=!1;else switch(b.charAt(k)){case"d":_+=w(h("d",v.day(),2));break;case"D":_+=(n="D",t=v.dayOfWeek(),o=d,r=c,s(n)?r[t]:o[t]);break;case"o":_+=h("o",v.dayOfYear(),3);break;case"w":_+=h("w",v.weekOfYear(),2);break;case"m":_+=a(v);break;case"M":_+=x(v,s("M"));break;case"y":_+=s("y",2)?v.year():(v.year()%100<10?"0":"")+v.year()%100;break;case"Y":s("Y",2),_+=v.formatYear();break;case"J":_+=v.toJD();break;case"@":_+=(v.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":_+=(v.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":s("'")?_+="'":T=!0;break;default:_+=b.charAt(k)}return _},parseDate:function(b,v,e){if(v==null)throw m.local.invalidArguments||m.regi
vendor: 7,021 bytes, line 1213
1213onalOptions[""].invalidArguments;if((v=typeof v=="object"?v.toString():v+"")==="")return null;b=b||this.local.dateFormat;var n=(e=e||{}).shortYearCutoff||this.shortYearCutoff;n=typeof n!="string"?n:this.today().year()%100+parseInt(n,10);for(var t=e.dayNamesShort||this.local.dayNamesShort,o=e.dayNames||this.local.dayNames,r=e.parseMonth||this.local.parseMonth,d=e.monthNumbers||this.local.monthNumbers,c=e.monthNamesShort||this.local.monthNamesShort,i=e.monthNames||this.local.monthNames,u=-1,f=-1,s=-1,h=-1,p=-1,a=!1,x=!1,l=function(D,F){for(var H=1;P+H<b.length&&b.charAt(P+H)===D;)H++;return P+=H-1,Math.floor(H/(F||1))>1},w=function(D,F){var H=l(D,F),V=[2,3,H?4:2,H?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],Z=new RegExp("^-?\\d{1,"+V+"}"),K=v.substring(I).match(Z);if(!K)throw(m.local.missingNumberAt||m.regionalOptions[""].missingNumberAt).replace(/\{0\}/,I);return I+=K[0].length,parseInt(K[0],10)},_=this,T=function(){if(typeof d=="function"){l("m");var D=d.call(_,v.substring(I));return I+=D.length,D}return w("m")},k=function(D,F,H,V){for(var Z=l(D,V)?H:F,K=0;K<Z.length;K++)if(v.substr(I,Z[K].length).toLowerCase()===Z[K].toLowerCase())return I+=Z[K].length,K+_.minMonth;throw(m.local.unknownNameAt||m.regionalOptions[""].unknownNameAt).replace(/\{0\}/,I)},L=function(){if(typeof i=="function"){var D=l("M")?i.call(_,v.substring(I)):c.call(_,v.substring(I));return I+=D.length,D}return k("M",c,i)},A=function(){if(v.charAt(I)!==b.charAt(P))throw(m.local.unexpectedLiteralAt||m.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,I);I++},I=0,P=0;P<b.length;P++)if(x)b.charAt(P)!=="'"||l("'")?A():x=!1;else switch(b.charAt(P)){case"d":h=w("d");break;case"D":k("D",t,o);break;case"o":p=w("o");break;case"w":w("w");break;case"m":s=T();break;case"M":s=L();break;case"y":var S=P;a=!l("y",2),P=S,f=w("y",2);break;case"Y":f=w("Y",2);break;case"J":u=w("J")+.5,v.charAt(I)==="."&&(I++,w("J"));break;case"@":u=w("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":u=w("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":I=v.length;break;case"'":l("'")?A():x=!0;break;default:A()}if(I<v.length)throw m.local.unexpectedText||m.regionalOptions[""].unexpectedText;if(f===-1?f=this.today().year():f<100&&a&&(f+=n===-1?1900:this.today().year()-this.today().year()%100-(f<=n?0:100)),typeof s=="string"&&(s=r.call(this,f,s)),p>-1){s=1,h=p;for(var E=this.daysInMonth(f,s);h>E;E=this.daysInMonth(f,s))s++,h-=E}return u>-1?this.fromJD(u):this.newDate(f,s,h)},determineDate:function(b,v,e,n,t){e&&typeof e!="object"&&(t=n,n=e,e=null),typeof n!="string"&&(t=n,n="");var o=this;return v=v?v.newDate():null,b=b==null?v:typeof b=="string"?function(r){try{return o.parseDate(n,r,t)}catch{}for(var d=((r=r.toLowerCase()).match(/^c/)&&e?e.newDate():null)||o.today(),c=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=c.exec(r);i;)d.add(parseInt(i[1],10),i[2]||"d"),i=c.exec(r);return d}(b):typeof b=="number"?isNaN(b)||b===1/0||b===-1/0?v:o.today().add(b,"d"):o.newDate(b)}})},{"./main":346,"object-assign":247}],348:[function(y,ee,te){ee.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}]},{}],349:[function(y,ee,te){var g=y("./arrow_paths"),m=y("../../plots/font_attributes"),b=y("../../plots/cartesian/constants"),v=y("../../plot_api/plot_template").templatedArray;y("../../constants/axis_placeable_objects"),ee.exports=v("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:m({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:g.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:g.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",b.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",b.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",b.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",b.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:m({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../constants/axis_placeable_objects":472,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561,"../../plots/font_attributes":585,"./arrow_paths":348}],350:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("./draw").draw;function v(n){var t=n._fullLayout;
1213g.filterVisible(t.annotations).forEach(function(o){var r=m.getFromId(n,o.xref),d=m.getFromId(n,o.yref),c=m.getRefType(o.xref),i=m.getRefType(o.yref);o._extremes={},c==="range"&&e(o,r),i==="range"&&e(o,d)})}function e(n,t){var o,r=t._id,d=r.charAt(0),c=n[d],i=n["a"+d],u=n[d+"ref"],f=n["a"+d+"ref"],s=n["_"+d+"padplus"],h=n["_"+d+"padminus"],p={x:1,y:-1}[d]*n[d+"shift"],a=3*n.arrowsize*n.arrowwidth||0,x=a+p,l=a-p,w=3*n.startarrowsize*n.arrowwidth||0,_=w+p,T=w-p;if(f===u){var k=m.findExtremes(t,[t.r2c(c)],{ppadplus:x,ppadminus:l}),L=m.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(s,_),ppadminus:Math.max(h,T)});o={min:[k.min[0],L.min[0]],max:[k.max[0],L.max[0]]}}else _=i?_+i:_,T=i?T-i:T,o=m.findExtremes(t,[t.r2c(c)],{ppadplus:Math.max(s,x,_),ppadminus:Math.max(h,l,T)});n._extremes[r]=o}ee.exports=function(n){var t=n._fullLayout;if(g.filterVisible(t.annotations).length&&n._fullData.length)return g.syncOrAsync([b,v],n)}},{"../../lib":503,"../../plots/cartesian/axes":554,"./draw":355}],351:[function(y,ee,te){var g=y("../../lib"),m=y("../../registry"),b=y("../../plot_api/plot_template").arrayEditor;function v(n,t){var o,r,d,c,i,u,f,s=n._fullLayout.annotations,h=[],p=[],a=[],x=(t||[]).length;for(o=0;o<s.length;o++)if(c=(d=s[o]).clicktoshow){for(r=0;r<x;r++)if(u=(i=t[r]).xaxis,f=i.yaxis,u._id===d.xref&&f._id===d.yref&&u.d2r(i.x)===e(d._xclick,u)&&f.d2r(i.y)===e(d._yclick,f)){(d.visible?c==="onout"?p:a:h).push(o);break}r===x&&d.visible&&c==="onout"&&p.push(o)}return{on:h,off:p,explicitOff:a}}function e(n,t){return t.type==="log"?t.l2r(n):t.d2r(n)}ee.exports={hasClickToShow:function(n,t){var o=v(n,t);return o.on.length>0||o.explicitOff.length>0},onClick:function(n,t){var o,r,d=v(n,t),c=d.on,i=d.off.concat(d.explicitOff),u={},f=n._fullLayout.annotations;if(!(!c.length&&!i.length)){for(o=0;o<c.length;o++)(r=b(n.layout,"annotations",f[c[o]])).modifyItem("visible",!0),g.extendFlat(u,r.getUpdateObj());for(o=0;o<i.length;o++)(r=b(n.layout,"annotations",f[i[o]])).modifyItem("visible",!1),g.extendFlat(u,r.getUpdateObj());return m.call("update",n,{},u)}}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../registry":638}],352:[function(y,ee,te){var g=y("../../lib"),m=y("../color");ee.exports=function(b,v,e,n){n("opacity");var t=n("bgcolor"),o=n("bordercolor"),r=m.opacity(o);n("borderpad");var d=n("borderwidth"),c=n("showarrow");if(n("text",c?" ":e._dfltTitle.annotation),n("textangle"),g.coerceFont(n,"font",e.font),n("width"),n("align"),n("height")&&n("valign"),c){var i,u,f=n("arrowside");f.indexOf("end")!==-1&&(i=n("arrowhead"),u=n("arrowsize")),f.indexOf("start")!==-1&&(n("startarrowhead",i),n("startarrowsize",u)),n("arrowcolor",r?v.bordercolor:m.defaultLine),n("arrowwidth",2*(r&&d||1)),n("standoff"),n("startstandoff")}var s=n("hovertext"),h=e.hoverlabel||{};if(s){var p=n("hoverlabel.bgcolor",h.bgcolor||(m.opacity(t)?m.rgb(t):m.defaultLine)),a=n("hoverlabel.bordercolor",h.bordercolor||m.contrast(p));g.coerceFont(n,"hoverlabel.font",{family:h.font.family,size:h.font.size,color:h.font.color||a})}n("captureevents",!!s)}},{"../../lib":503,"../color":366}],353:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib/to_log_range");ee.exports=function(b,v,e,n){v=v||{};var t=e==="log"&&v.type==="linear",o=e==="linear"&&v.type==="log";if(t||o)for(var r,d,c=b._fullLayout.annotations,i=v._id.charAt(0),u=0;u<c.length;u++)r=c[u],d="annotations["+u+"].",r[i+"ref"]===v._id&&f(i),r["a"+i+"ref"]===v._id&&f("a"+i);function f(s){var h=r[s],p=null;p=t?m(h,v.range):Math.pow(10,h),g(p)||(p=null),n(d+s,p)}}},{"../../lib/to_log_range":531,"fast-isnumeric":190}],354:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("../../plots/array_container_defaults"),v=y("./common_defaults"),e=y("./attributes");function n(t,o,r){function d(L,A){return g.coerce(t,o,e,L,A)}var c=d("visible"),i=d("clicktoshow");if(c||i){v(t,o,r,d);for(var u=o.showarrow,f=["x","y"],s=[-10,-30],h={_fullLayout:r},p=0;p<2;p++){var a=f[p],x=m.coerceRef(t,o,h,a,"","paper");if(x!=="paper"&&m.getFromId(h,x)._annIndices.push(o._index),m.coercePosition(o,h,d,x,a,.5),u){var l="a"+a,w=m.coerceRef(t,o,h,l,"pixel",["pixel","paper"]);w!=="pixel"&&w!==x&&(w=o[l]="pixel");var _=w==="pixel"?s[p]:.4;m.coercePosition(o,h,d,w,l,_)}d(a+"anchor"),d(a+"shift")}if(g.noneOrAll(t,o,["x","y"]),u&&g.noneOrAll(t,o,["ax","ay"]),i){var T=d("xclick"),k=d("yclick");o._xclick=T===void 0?o.x:m.cleanPosition(T,h,o.xref),o._yclick=k===void 0?o.y:m.cleanPosition(k,h,o.yref)}}}ee.exports=function(t,o){b(t,o,{name:"annotations",handleItemDefaults:n})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"./attributes":349,"./common_defaults":352}],355:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../registry"),b=y("../../plots/plots"),v=y("../../lib"),e=v.strTranslate,n=y("../../plots/cartesian/axes"),t=y("../color"),o=y("../drawing"),r=y("../fx"),d=y("../../lib/svg_text_utils"),c=y("../../lib/setcursor"),i=y("../dragelement"),u=y("../../plot_api/plot_template").arrayEditor,f=y("./draw_arrow_head");function s(a,x){var l=a._fullLayout.annotations[x]||{},w=n.getFromId(a,l.xref),_=n.getFromId(a,l.yref);w&&w.setScale(),_&&_.setScale(),p(a,l,x,!1,w,_)}function h(a,x,l,w,_){var T=_[l],k=_[l+"ref"],L=l.indexOf("y")!==-1,A=n.getRefType(k)==="domain",I=L?w.h:w.w;return a?A?T+(L?-x:x)/a._length:a.p2r(a.r2p(T)+x):T+(L?-x:x)/I}function p(a,x,l,w,_,T){var k,L,A=a._fullLayout,I=a._fullLayout._size,P=a._context.edits;w?(k="annotation-"+w,L=w+".annotations"):(k="annotation",L="annotations");var S=u(a.layout,L,x),E=S.modifyBase,D=S.modifyItem,F=S.getUpdateObj;A._infolayer.selectAll("."+k+'[data-index="'+l+'"]').remove();var H="clip"+A._uid+"_ann"+l;if(x._input&&x.visible!==!1){var V={x:{},y:{}},Z=+x.textangle||0,K=A._infolayer.append("g").classed(k,!0).attr("data-index",String(l)).style("opacity",x.opacity),q=K.append("g").classed("annotation-text-g",!0),W=P[x.showarrow?"annotationTail":"annotationPosition"],$=x.captureevents||P.annotationText||W,R=q.append("g").style("pointer-events",$?"all":null).call(c,"pointer").on("click",function(){a._dragging=!1,a.emit("plotly_clickannotation",oe(g.event))});x.hovertext&&R.on("mouseover",function(){var de=x.hoverlabel,xe=de.font,we=this.getBoundingClientRect(),be=a.getBoundingClientRect();r.loneHover({x0:we.left-be.left,x1:we.right-be.left,y:(we.top+we.bottom)/2-be.top,text:x.hovertext,color:de.bgcolor,borderColor:de.bordercolor,fontFamily:xe.family,fontSize:xe.size,fontColor:xe.color},{container:A._hoverlayer.node(),outerContainer:A._paper.node(),gd:a})}).on("mouseout",function(){r.loneUnhover(A._hoverlayer.node())});var N=x.borderwidth,U=x.borderpad,Q=N+U,j=R.append("rect").attr("class","bg").style("stroke-width",N+"px").call(t.stroke,x.bordercolor).call(t.fill,x.bgcolor),X=x.width||x.height,J=A._topclips.selectAll("#"+H).data(X?[0]:[]);J.enter().append("clipPath").classed("annclip",!0).attr("id",H).append("rect"),J.exit().remove();var re=x.font,ne=A._meta?v.templateString(x.text,A._meta):x.text,se=R.append("text").classed("annotation-text",!0).text(ne);P.annotationText?se.call(d.makeEditable,{delegate:R,gd:a}).call(pe).on("edit",function(de){x.text=de,this.call(pe),D("text",de),_&&_.autorange&&E(_._name+".autorange",!0),T&&T.autorange&&E(T._name+".autorange",!0),m.call("_guiRelayout",a,F())}):se.call(pe)}else g.selectAll("#"+H).remove();function oe(de){var xe={index:l,annotation:x._input,fullAnnotation:x,event:de};return w&&(xe.subplotId=w),xe}function pe(de){return de.call(o.font,re).attr({"text-anchor":{left:"start",right:"end"}[x.align]||"middle"}),d.convertToTspans(de,a,ce),de}function ce(){var de=se.selectAll("a");de.size()===1&&de.text()===se.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":de.attr("xlink:href"),"xlink:xlink:show":de.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(j.node());var xe=R.select(".annotation-text-math-group"),we=!xe.empty(),be=o.bBox((we?xe:se).node()),Ee=be.width,fe=be.height,me=x.width||Ee,Te=x.height||fe,_e=Math.round(me+2*Q),Ae=Math.round(Te+2*Q);
vendor: 5,812 bytes, line 1213
1213function Pe(Ze,pt){return pt==="auto"&&(pt=Ze<1/3?"left":Ze>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[pt]}for(var De=!1,Ve=["x","y"],Qe=0;Qe<Ve.length;Qe++){var Oe,Ue,Ge,Ye,tt,lt=Ve[Qe],vt=x[lt+"ref"]||lt,It=x["a"+lt+"ref"],St={x:_,y:T}[lt],rt=(Z+(lt==="x"?0:-90))*Math.PI/180,et=_e*Math.cos(rt),Tt=Ae*Math.sin(rt),Vt=Math.abs(et)+Math.abs(Tt),Kt=x[lt+"anchor"],Be=x[lt+"shift"]*(lt==="x"?1:-1),qe=V[lt],Re=n.getRefType(vt);if(St&&Re!=="domain"){var Xe=St.r2fraction(x[lt]);(Xe<0||Xe>1)&&(It===vt?((Xe=St.r2fraction(x["a"+lt]))<0||Xe>1)&&(De=!0):De=!0),Oe=St._offset+St.r2p(x[lt]),Ye=.5}else{var ke=Re==="domain";lt==="x"?(Ge=x[lt],Oe=ke?St._offset+St._length*Ge:Oe=I.l+I.w*Ge):(Ge=1-x[lt],Oe=ke?St._offset+St._length*Ge:Oe=I.t+I.h*Ge),Ye=x.showarrow?.5:Ge}if(x.showarrow){qe.head=Oe;var Le=x["a"+lt];if(tt=et*Pe(.5,x.xanchor)-Tt*Pe(.5,x.yanchor),It===vt){var Ie=n.getRefType(It);Ie==="domain"?(lt==="y"&&(Le=1-Le),qe.tail=St._offset+St._length*Le):Ie==="paper"?lt==="y"?(Le=1-Le,qe.tail=I.t+I.h*Le):qe.tail=I.l+I.w*Le:qe.tail=St._offset+St.r2p(Le),Ue=tt}else qe.tail=Oe+Le,Ue=tt+Le;qe.text=qe.tail+tt;var Ce=A[lt==="x"?"width":"height"];if(vt==="paper"&&(qe.head=v.constrain(qe.head,1,Ce-1)),It==="pixel"){var Je=-Math.max(qe.tail-3,qe.text),it=Math.min(qe.tail+3,qe.text)-Ce;Je>0?(qe.tail+=Je,qe.text+=Je):it>0&&(qe.tail-=it,qe.text-=it)}qe.tail+=Be,qe.head+=Be}else Ue=tt=Vt*Pe(Ye,Kt),qe.text=Oe+tt;qe.text+=Be,tt+=Be,Ue+=Be,x["_"+lt+"padplus"]=Vt/2+Ue,x["_"+lt+"padminus"]=Vt/2-Ue,x["_"+lt+"size"]=Vt,x["_"+lt+"shift"]=tt}if(De)R.remove();else{var ht=0,ut=0;if(x.align!=="left"&&(ht=(me-Ee)*(x.align==="center"?.5:1)),x.valign!=="top"&&(ut=(Te-fe)*(x.valign==="middle"?.5:1)),we)xe.select("svg").attr({x:Q+ht-1,y:Q+ut}).call(o.setClipUrl,X?H:null,a);else{var kt=Q+ut-be.top,ot=Q+ht-be.left;se.call(d.positionText,ot,kt).call(o.setClipUrl,X?H:null,a)}J.select("rect").call(o.setRect,Q,Q,me,Te),j.call(o.setRect,N/2,N/2,_e-N,Ae-N),R.call(o.setTranslate,Math.round(V.x.text-_e/2),Math.round(V.y.text-Ae/2)),q.attr({transform:"rotate("+Z+","+V.x.text+","+V.y.text+")"});var Lt,Et=function(Ze,pt){K.selectAll(".annotation-arrow-g").remove();var Ct=V.x.head,zt=V.y.head,Gt=V.x.tail+Ze,ze=V.y.tail+pt,st=V.x.text+Ze,yt=V.y.text+pt,Dt=v.rotationXYMatrix(Z,st,yt),jt=v.apply2DTransform(Dt),or=v.apply2DTransform2(Dt),Ut=+j.attr("width"),Xt=+j.attr("height"),sr=st-.5*Ut,vr=sr+Ut,pr=yt-.5*Xt,ar=pr+Xt,lr=[[sr,pr,sr,ar],[sr,ar,vr,ar],[vr,ar,vr,pr],[vr,pr,sr,pr]].map(or);if(!lr.reduce(function(xr,Nr){return xr^!!v.segmentsIntersect(Ct,zt,Ct+1e6,zt+1e6,Nr[0],Nr[1],Nr[2],Nr[3])},!1)){lr.forEach(function(xr){var Nr=v.segmentsIntersect(Gt,ze,Ct,zt,xr[0],xr[1],xr[2],xr[3]);Nr&&(Gt=Nr.x,ze=Nr.y)});var hr=x.arrowwidth,Or=x.arrowcolor,dr=x.arrowside,Fr=K.append("g").style({opacity:t.opacity(Or)}).classed("annotation-arrow-g",!0),tn=Fr.append("path").attr("d","M"+Gt+","+ze+"L"+Ct+","+zt).style("stroke-width",hr+"px").call(t.stroke,t.rgb(Or));if(f(tn,dr,x),P.annotationPosition&&tn.node().parentNode&&!w){var rn=Ct,An=zt;if(x.standoff){var Ln=Math.sqrt(Math.pow(Ct-Gt,2)+Math.pow(zt-ze,2));rn+=x.standoff*(Gt-Ct)/Ln,An+=x.standoff*(ze-zt)/Ln}var _n,Vr,Ir=Fr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Gt-rn)+","+(ze-An),transform:e(rn,An)}).style("stroke-width",hr+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)");i.init({element:Ir.node(),gd:a,prepFn:function(){var xr=o.getTranslate(R);_n=xr.x,Vr=xr.y,_&&_.autorange&&E(_._name+".autorange",!0),T&&T.autorange&&E(T._name+".autorange",!0)},moveFn:function(xr,Nr){var en=jt(_n,Vr),Qr=en[0]+xr,yn=en[1]+Nr;R.call(o.setTranslate,Qr,yn),D("x",h(_,xr,"x",I,x)),D("y",h(T,Nr,"y",I,x)),x.axref===x.xref&&D("ax",h(_,xr,"ax",I,x)),x.ayref===x.yref&&D("ay",h(T,Nr,"ay",I,x)),Fr.attr("transform",e(xr,Nr)),q.attr({transform:"rotate("+Z+","+Qr+","+yn+")"})},doneFn:function(){m.call("_guiRelayout",a,F());var xr=document.querySelector(".js-notes-box-panel");xr&&xr.redraw(xr.selectedObj)}})}}};x.showarrow&&Et(0,0),W&&i.init({element:R.node(),gd:a,prepFn:function(){Lt=q.attr("transform")},moveFn:function(Ze,pt){var Ct="pointer";if(x.showarrow)x.axref===x.xref?D("ax",h(_,Ze,"ax",I,x)):D("ax",x.ax+Ze),x.ayref===x.yref?D("ay",h(T,pt,"ay",I.w,x)):D("ay",x.ay+pt),Et(Ze,pt);else{if(w)return;var zt,Gt;if(_)zt=h(_,Ze,"x",I,x);else{var ze=x._xsize/I.w,st=x.x+(x._xshift-x.xshift)/I.w-ze/2;zt=i.align(st+Ze/I.w,ze,0,1,x.xanchor)}if(T)Gt=h(T,pt,"y",I,x);else{var yt=x._ysize/I.h,Dt=x.y-(x._yshift+x.yshift)/I.h-yt/2;Gt=i.align(Dt-pt/I.h,yt,0,1,x.yanchor)}D("x",zt),D("y",Gt),_&&T||(Ct=i.getCursor(_?.5:zt,T?.5:Gt,x.xanchor,x.yanchor))}q.attr({transform:e(Ze,pt)+Lt}),c(R,Ct)},clickFn:function(Ze,pt){x.captureevents&&a.emit("plotly_clickannotation",oe(pt))},doneFn:function(){c(R),m.call("_guiRelayout",a,F());var Ze=document.querySelector(".js-notes-box-panel");Ze&&Ze.redraw(Ze.selectedObj)}})}}}ee.exports={draw:function(a){var x=a._fullLayout;x._infolayer.selectAll(".annotation").remove();for(var l=0;l<x.annotations.length;l++)x.annotations[l].visible&&s(a,l);return b.previousPromises(a)},drawOne:s,drawRaw:p}},{"../../lib":503,"../../lib/setcursor":524,"../../lib/svg_text_utils":529,"../../plot_api/plot_template":543,"../../plots/cartesian/axes":554,"../../plots/plots":619,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"../fx":406,"./draw_arrow_head":356,"@plotly/d3":58}],356:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../color"),b=y("./arrow_paths"),v=y("../../lib"),e=v.strScale,n=v.strRotate,t=v.strTranslate;ee.exports=function(o,r,d){var c,i,u,f,s=o.node(),h=b[d.arrowhead||0],p=b[d.startarrowhead||0],a=(d.arrowwidth||1)*(d.arrowsize||1),x=(d.arrowwidth||1)*(d.startarrowsize||1),l=r.indexOf("start")>
1213=0,w=r.indexOf("end")>=0,_=h.backoff*a+d.standoff,T=p.backoff*x+d.startstandoff;if(s.nodeName==="line"){c={x:+o.attr("x1"),y:+o.attr("y1")},i={x:+o.attr("x2"),y:+o.attr("y2")};var k=c.x-i.x,L=c.y-i.y;if(f=(u=Math.atan2(L,k))+Math.PI,_&&T&&_+T>Math.sqrt(k*k+L*L))return void K();if(_){if(_*_>k*k+L*L)return void K();var A=_*Math.cos(u),I=_*Math.sin(u);i.x+=A,i.y+=I,o.attr({x2:i.x,y2:i.y})}if(T){if(T*T>k*k+L*L)return void K();var P=T*Math.cos(u),S=T*Math.sin(u);c.x-=P,c.y-=S,o.attr({x1:c.x,y1:c.y})}}else if(s.nodeName==="path"){var E=s.getTotalLength(),D="";if(E<_+T)return void K();var F=s.getPointAtLength(0),H=s.getPointAtLength(.1);u=Math.atan2(F.y-H.y,F.x-H.x),c=s.getPointAtLength(Math.min(T,E)),D="0px,"+T+"px,";var V=s.getPointAtLength(E),Z=s.getPointAtLength(E-.1);f=Math.atan2(V.y-Z.y,V.x-Z.x),i=s.getPointAtLength(Math.max(0,E-_)),D+=E-(D?T+_:_)+"px,"+E+"px",o.style("stroke-dasharray",D)}function K(){o.style("stroke-dasharray","0px,100px")}function q(W,$,R,N){W.path&&(W.noRotate&&(R=0),g.select(s.parentNode).append("path").attr({class:o.attr("class"),d:W.path,transform:t($.x,$.y)+n(180*R/Math.PI)+e(N)}).style({fill:m.rgb(d.arrowcolor),"stroke-width":0}))}l&&q(p,c,u,x),w&&q(h,i,f,a)}},{"../../lib":503,"../color":366,"./arrow_paths":348,"@plotly/d3":58}],357:[function(y,ee,te){var g=y("./draw"),m=y("./click");ee.exports={moduleType:"component",name:"annotations",layoutAttributes:y("./attributes"),supplyLayoutDefaults:y("./defaults"),includeBasePlot:y("../../plots/cartesian/include_components")("annotations"),calcAutorange:y("./calc_autorange"),draw:g.draw,drawOne:g.drawOne,drawRaw:g.drawRaw,hasClickToShow:m.hasClickToShow,onClick:m.onClick,convertCoords:y("./convert_coords")}},{"../../plots/cartesian/include_components":567,"./attributes":349,"./calc_autorange":350,"./click":351,"./convert_coords":353,"./defaults":354,"./draw":355}],358:[function(y,ee,te){var g=y("../annotations/attributes"),m=y("../../plot_api/edit_types").overrideAll,b=y("../../plot_api/plot_template").templatedArray;ee.exports=m(b("annotation",{visible:g.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:g.xanchor,xshift:g.xshift,yanchor:g.yanchor,yshift:g.yshift,text:g.text,textangle:g.textangle,font:g.font,width:g.width,height:g.height,opacity:g.opacity,align:g.align,valign:g.valign,bgcolor:g.bgcolor,bordercolor:g.bordercolor,borderpad:g.borderpad,borderwidth:g.borderwidth,showarrow:g.showarrow,arrowcolor:g.arrowcolor,arrowhead:g.arrowhead,startarrowhead:g.startarrowhead,arrowside:g.arrowside,arrowsize:g.arrowsize,startarrowsize:g.startarrowsize,arrowwidth:g.arrowwidth,standoff:g.standoff,startstandoff:g.startstandoff,hovertext:g.hovertext,hoverlabel:g.hoverlabel,captureevents:g.captureevents}),"calc","from-root")},{"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../annotations/attributes":349}],359:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes");function b(v,e){var n=e.fullSceneLayout.domain,t=e.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};v._xa={},g.extendFlat(v._xa,o),m.setConvert(v._xa),v._xa._offset=t.l+n.x[0]*t.w,v._xa.l2p=function(){return .5*(1+v._pdata[0]/v._pdata[3])*t.w*(n.x[1]-n.x[0])},v._ya={},g.extendFlat(v._ya,o),m.setConvert(v._ya),v._ya._offset=t.t+(1-n.y[1])*t.h,v._ya.l2p=function(){return .5*(1-v._pdata[1]/v._pdata[3])*t.h*(n.y[1]-n.y[0])}}ee.exports=function(v){for(var e=v.fullSceneLayout.annotations,n=0;n<e.length;n++)b(e[n],v);v.fullLayout._infolayer.selectAll(".annotation-"+v.id).remove()}},{"../../lib":503,"../../plots/cartesian/axes":554}],360:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("../../plots/array_container_defaults"),v=y("../annotations/common_defaults"),e=y("./attributes");function n(t,o,r,d){function c(u,f){return g.coerce(t,o,e,u,f)}function i(u){var f=u+"axis",s={_fullLayout:{}};return s._fullLayout[f]=r[f],m.coercePosition(o,s,c,u,u,.5)}c("visible")&&(v(t,o,d.fullLayout,c),i("x"),i("y"),i("z"),g.noneOrAll(t,o,["x","y","z"]),o.xref="x",o.yref="y",o.zref="z",c("xanchor"),c("yanchor"),c("xshift"),c("yshift"),o.showarrow&&(o.axref="pixel",o.ayref="pixel",c("ax",-10),c("ay",-30),g.noneOrAll(t,o,["ax","ay"])))}ee.exports=function(t,o,r){b(t,o,{name:"annotations",handleItemDefaults:n,fullLayout:r.fullLayout})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"../annotations/common_defaults":352,"./attributes":358}],361:[function(y,ee,te){var g=y("../annotations/draw").drawRaw,m=y("../../plots/gl3d/project"),b=["x","y","z"];ee.exports=function(v){for(var e=v.fullSceneLayout,n=v.dataScale,t=e.annotations,o=0;o<t.length;o++){for(var r=t[o],d=!1,c=0;c<3;c++){var i=b[c],u=r[i],f=e[i+"axis"].r2fraction(u);if(f<0||f>1){d=!0;break}}d?v.fullLayout._infolayer.select(".annotation-"+v.id+'[data-index="'+o+'"]').remove():(r._pdata=m(v.glplot.cameraParams,[e.xa
1213xis.r2l(r.x)*n[0],e.yaxis.r2l(r.y)*n[1],e.zaxis.r2l(r.z)*n[2]]),g(v.graphDiv,r,o,v.id,r._xa,r._ya))}}},{"../../plots/gl3d/project":607,"../annotations/draw":355}],362:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib");ee.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:y("./attributes")}}},layoutAttributes:y("./attributes"),handleDefaults:y("./defaults"),includeBasePlot:function(b,v){var e=g.subplotsRegistry.gl3d;if(e)for(var n=e.attrRegex,t=Object.keys(b),o=0;o<t.length;o++){var r=t[o];n.test(r)&&(b[r].annotations||[]).length&&(m.pushUnique(v._basePlotModules,e),m.pushUnique(v._subplots.gl3d,r))}},convert:y("./convert"),draw:y("./draw")}},{"../../lib":503,"../../registry":638,"./attributes":358,"./convert":359,"./defaults":360,"./draw":361}],363:[function(y,ee,te){ee.exports=y("world-calendars/dist/main"),y("world-calendars/dist/plus"),y("world-calendars/dist/calendars/chinese"),y("world-calendars/dist/calendars/coptic"),y("world-calendars/dist/calendars/discworld"),y("world-calendars/dist/calendars/ethiopian"),y("world-calendars/dist/calendars/hebrew"),y("world-calendars/dist/calendars/islamic"),y("world-calendars/dist/calendars/julian"),y("world-calendars/dist/calendars/mayan"),y("world-calendars/dist/calendars/nanakshahi"),y("world-calendars/dist/calendars/nepali"),y("world-calendars/dist/calendars/persian"),y("world-calendars/dist/calendars/taiwan"),y("world-calendars/dist/calendars/thai"),y("world-calendars/dist/calendars/ummalqura")},{"world-calendars/dist/calendars/chinese":332,"world-calendars/dist/calendars/coptic":333,"world-calendars/dist/calendars/discworld":334,"world-calendars/dist/calendars/ethiopian":335,"world-calendars/dist/calendars/hebrew":336,"world-calendars/dist/calendars/islamic":337,"world-calendars/dist/calendars/julian":338,"world-calendars/dist/calendars/mayan":339,"world-calendars/dist/calendars/nanakshahi":340,"world-calendars/dist/calendars/nepali":341,"world-calendars/dist/calendars/persian":342,"world-calendars/dist/calendars/taiwan":343,"world-calendars/dist/calendars/thai":344,"world-calendars/dist/calendars/ummalqura":345,"world-calendars/dist/main":346,"world-calendars/dist/plus":347}],364:[function(y,ee,te){var g=y("./calendars"),m=y("../../lib"),b=y("../../constants/numerical"),v=b.EPOCHJD,e=b.ONEDAY,n={valType:"enumerated",values:m.sortObjectKeys(g.calendars),editType:"calc",dflt:"gregorian"},t=function(p,a,x,l){var w={};return w[x]=n,m.coerce(p,a,w,x,l)},o={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:"##",w:"##",c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},r={};function d(p){var a=r[p];return a||(a=r[p]=g.instance(p))}function c(p){return m.extendFlat({},n,{description:p})}function i(p){return"Sets the calendar system to use with `"+p+"` date data."}var u={xcalendar:c(i("x"))},f=m.extendFlat({},u,{ycalendar:c(i("y"))}),s=m.extendFlat({},f,{zcalendar:c(i("z"))}),h=c(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));ee.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:f,bar:f,box:f,heatmap:f,contour:f,histogram:f,histogram2d:f,histogram2dcontour:f,scatter3d:s,surface:s,mesh3d:s,scattergl:f,ohlc:u,candlestick:u},layout:{calendar:c(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:h},yaxis:{calendar:h},scene:{xaxis:{calendar:h},yaxis:{calendar:h},zaxis:{calendar:h}},polar:{radialaxis:{calendar:h}}},transforms:{filter:{valuecalendar:c(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:c(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:n,handleDefaults:t,handleTraceDefaults:function(p,a,x,l){for(var w=0;w<x.length;w++)t(p,a,x[w]+"calendar",l.calendar)},CANONICAL_SUNDAY:{chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},CANONICAL_TICK:{chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},DFLTRANGE:{chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},getCal:d,worldCalFmt:function(p,a,x){for(var l,w,_,T,k,L=Math.floor((a+.05)/e)+v,A=d(x).fromJD(L),I=0;(I=p.indexOf("%",I))!==-1;)(l=p.charAt(I+1))==="0"||l==="-"||l==="_"?(_=3,w=p.charAt(I+2),l==="_"&&(l="-")):(w=l,l="0",_=2),(T=o[w])?(k=T==="##"?"##":A.formatDate(T[l]),p=p.substr(0,I)+k+p.substr(I+_),I+=k.length):I+=_;return p}}},{"../../constants/numerical":479,"../../lib":503,"./calendars":363}],365:[function(y,ee,te){te.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],te.defaultLine="#444",te.lightLine="#eee",te.background="#fff",te.borderLine="#BEC8D9",te.lightFraction=1e3/11},{}],366:[function(y,ee,te){var g=y("tinycolor2"),m=y("fast-isnumeric"),b=y("../../lib/array").isTypedArray,v=ee.exports={},e=y("./attributes");v.defaults=e.defaults;var n=v.defaultLine=e.defaultLine;v.lightLine=e.lightLine;var t=v.background=e.background;function o(r){if(m(r)||typeof r!="string")return r;var d=r.trim();if(d.substr(0,3)!=="rgb")return r;var c=d.match(/^rgba?\s*\(([^()]*)\)$/);if(!c)return r;var i=c[1].trim().split(/\s*[\s,]\s*/),u=d.charAt(3)==="a"&&i.length===4;if(!u&&i.length!==3)return r;for(var f=0;f<i.length;f++){if(!i[f].length||(i[f]=Number(i[f]),!(i[f]>=0)))return r;if(f===3)i[f]>1&&(i[f]=1);else if(i[f]>=1)return r}
1213var s=Math.round(255*i[0])+", "+Math.round(255*i[1])+", "+Math.round(255*i[2]);return u?"rgba("+s+", "+i[3]+")":"rgb("+s+")"}v.tinyRGB=function(r){var d=r.toRgb();return"rgb("+Math.round(d.r)+", "+Math.round(d.g)+", "+Math.round(d.b)+")"},v.rgb=function(r){return v.tinyRGB(g(r))},v.opacity=function(r){return r?g(r).getAlpha():0},v.addOpacity=function(r,d){var c=g(r).toRgb();return"rgba("+Math.round(c.r)+", "+Math.round(c.g)+", "+Math.round(c.b)+", "+d+")"},v.combine=function(r,d){var c=g(r).toRgb();if(c.a===1)return g(r).toRgbString();var i=g(d||t).toRgb(),u=i.a===1?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},f={r:u.r*(1-c.a)+c.r*c.a,g:u.g*(1-c.a)+c.g*c.a,b:u.b*(1-c.a)+c.b*c.a};return g(f).toRgbString()},v.contrast=function(r,d,c){var i=g(r);return i.getAlpha()!==1&&(i=g(v.combine(r,t))),(i.isDark()?d?i.lighten(d):t:c?i.darken(c):n).toString()},v.stroke=function(r,d){var c=g(d);r.style({stroke:v.tinyRGB(c),"stroke-opacity":c.getAlpha()})},v.fill=function(r,d){var c=g(d);r.style({fill:v.tinyRGB(c),"fill-opacity":c.getAlpha()})},v.clean=function(r){if(r&&typeof r=="object"){var d,c,i,u,f=Object.keys(r);for(d=0;d<f.length;d++)if(u=r[i=f[d]],i.substr(i.length-5)==="color")if(Array.isArray(u))for(c=0;c<u.length;c++)u[c]=o(u[c]);else r[i]=o(u);else if(i.substr(i.length-10)==="colorscale"&&Array.isArray(u))for(c=0;c<u.length;c++)Array.isArray(u[c])&&(u[c][1]=o(u[c][1]));else if(Array.isArray(u)){var s=u[0];if(!Array.isArray(s)&&s&&typeof s=="object")for(c=0;c<u.length;c++)v.clean(u[c])}else u&&typeof u=="object"&&!b(u)&&v.clean(u)}}},{"../../lib/array":485,"./attributes":365,"fast-isnumeric":190,tinycolor2:312}],367:[function(y,ee,te){var g=y("../../plots/cartesian/layout_attributes"),m=y("../../plots/font_attributes"),b=y("../../lib/extend").extendFlat,v=y("../../plot_api/edit_types").overrideAll;ee.exports=v({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:g.linecolor,outlinewidth:g.linewidth,bordercolor:g.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:g.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:b({},g.ticks,{dflt:""}),ticklabeloverflow:b({},g.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,tickfont:m({}),tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,separatethousands:g.separatethousands,exponentformat:g.exponentformat,minexponent:g.minexponent,showexponent:g.showexponent,title:{text:{valType:"string"},font:m({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:m({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},{"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/cartesian/layout_attributes":569,"../../plots/font_attributes":585}],368:[function(y,ee,te){ee.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},{}],369:[function(y,ee,te){var g=y("../../lib"),m=y("../../plot_api/plot_template"),b=y("../../plots/cartesian/tick_value_defaults"),v=y("../../plots/cartesian/tick_mark_defaults"),e=y("../../plots/cartesian/tick_label_defaults"),n=y("../../plots/cartesian/prefix_suffix_defaults"),t=y("./attributes");ee.exports=function(o,r,d){var c=m.newContainer(r,"colorbar"),i=o.colorbar||{};function u(L,A){return g.coerce(i,c,t,L,A)}var f=d.margin||{t:0,b:0,l:0,r:0},s=d.width-f.l-f.r,h=d.height-f.t-f.b,p=u("orientation")==="v",a=u("thicknessmode");u("thickness",a==="fraction"?30/(p?s:h):30);var x=u("lenmode");u("len",x==="fraction"?1:p?h:s),u("x",p?1.02:.5),u("xanchor",p?"left":"center"),u("xpad"),u("y",p?.5:1.02),u("yanchor",p?"middle":"bottom"),u("ypad"),g.noneOrAll(i,c,["x","y"]),u("outlinecolor"),u("outlinewidth"),u("bordercolor"),u("borderwidth"),u("bgcolor");var l=g.coerce(i,c,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:p?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");u("ticklabeloverflow",l.indexOf("inside")!==-1?"hide past domain":"hide past div"),b(i,
1213c,u,"linear");var w=d.font,_={outerTicks:!1,font:w};l.indexOf("inside")!==-1&&(_.bgColor="black"),n(i,c,u,"linear",_),e(i,c,u,"linear",_),v(i,c,u,"linear",_),u("title.text",d._dfltTitle.colorbar);var T=c.tickfont,k=g.extendFlat({},T,{color:w.color,size:g.bigFont(T.size)});g.coerceFont(u,"title.font",k),u("title.side",p?"top":"right")}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/cartesian/prefix_suffix_defaults":573,"../../plots/cartesian/tick_label_defaults":578,"../../plots/cartesian/tick_mark_defaults":579,"../../plots/cartesian/tick_value_defaults":580,"./attributes":367}],370:[function(y,ee,te){var g=y("@plotly/d3"),m=y("tinycolor2"),b=y("../../plots/plots"),v=y("../../registry"),e=y("../../plots/cartesian/axes"),n=y("../dragelement"),t=y("../../lib"),o=t.strTranslate,r=y("../../lib/extend").extendFlat,d=y("../../lib/setcursor"),c=y("../drawing"),i=y("../color"),u=y("../titles"),f=y("../../lib/svg_text_utils"),s=y("../colorscale/helpers").flipScale,h=y("../../plots/cartesian/axis_defaults"),p=y("../../plots/cartesian/position_defaults"),a=y("../../plots/cartesian/layout_attributes"),x=y("../../constants/alignment"),l=x.LINE_SPACING,w=x.FROM_TL,_=x.FROM_BR,T=y("./constants").cn;ee.exports={draw:function(k){var L=k._fullLayout._infolayer.selectAll("g."+T.colorbar).data(function(A){var I,P,S,E,D=A._fullLayout,F=A.calcdata,H=[];function V(X){return r(X,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function Z(){typeof E.calc=="function"?E.calc(A,S,I):(I._fillgradient=P.reversescale?s(P.colorscale):P.colorscale,I._zrange=[P[E.min],P[E.max]])}for(var K=0;K<F.length;K++){var q=F[K],W=(S=q[0].trace)._module.colorbar;if(S.visible===!0&&W)for(var $=Array.isArray(W),R=$?W:[W],N=0;N<R.length;N++){var U=(E=R[N]).container;(P=U?S[U]:S)&&P.showscale&&((I=V(P.colorbar))._id="cb"+S.uid+($&&U?"-"+U:""),I._traceIndex=S.index,I._propPrefix=(U?U+".":"")+"colorbar.",I._meta=S._meta,Z(),H.push(I))}}for(var Q in D._colorAxes)if((P=D[Q]).showscale){var j=D._colorAxes[Q];(I=V(P.colorbar))._id="cb"+Q,I._propPrefix=Q+".colorbar.",I._meta=D._meta,E={min:"cmin",max:"cmax"},j[0]!=="heatmap"&&(S=j[1],E.calc=S._module.colorbar.calc),Z(),H.push(I)}return H}(k),function(A){return A._id});L.enter().append("g").attr("class",function(A){return A._id}).classed(T.colorbar,!0),L.each(function(A){var I=g.select(this);t.ensureSingle(I,"rect",T.cbbg),t.ensureSingle(I,"g",T.cbfills),t.ensureSingle(I,"g",T.cblines),t.ensureSingle(I,"g",T.cbaxis,function(S){S.classed(T.crisp,!0)}),t.ensureSingle(I,"g",T.cbtitleunshift,function(S){S.append("g").classed(T.cbtitle,!0)}),t.ensureSingle(I,"rect",T.cboutline);var P=function(S,E,D){var F=E.orientation==="v",H=E.len,V=E.lenmode,Z=E.thickness,K=E.thicknessmode,q=E.outlinewidth,W=E.borderwidth,$=E.bgcolor,R=E.xanchor,N=E.yanchor,U=E.xpad,Q=E.ypad,j=E.x,X=F?E.y:1-E.y,J=D._fullLayout,re=J._size,ne=E._fillcolor,se=E._line,oe=E.title,pe=oe.side,ce=E._zrange||g.extent((typeof ne=="function"?ne:se.color).domain()),de=typeof se.color=="function"?se.color:function(){return se.color},xe=typeof ne=="function"?ne:function(){return ne},we=E._levels,be=function(Re,Xe,ke){var Le,Ie,Ce=Xe._levels,Je=[],it=[],ht=Ce.end+Ce.size/100,ut=Ce.size,kt=1.001*ke[0]-.001*ke[1],ot=1.001*ke[1]-.001*ke[0];for(Ie=0;Ie<1e5&&(Le=Ce.start+Ie*ut,!(ut>0?Le>=ht:Le<=ht));Ie++)Le>kt&&Le<ot&&Je.push(Le);if(Xe._fillgradient)it=[0];else if(typeof Xe._fillcolor=="function"){var Lt=Xe._filllevels;if(Lt)for(ht=Lt.end+Lt.size/100,ut=Lt.size,Ie=0;Ie<1e5&&(Le=Lt.start+Ie*ut,!(ut>0?Le>=ht:Le<=ht));Ie++)Le>ke[0]&&Le<ke[1]&&it.push(Le);else(it=Je.map(function(Et){return Et-Ce.size/2})).push(it[it.length-1]+Ce.size)}else Xe._fillcolor&&typeof Xe._fillcolor=="string"&&(it=[0]);return Ce.size<0&&(Je.reverse(),it.reverse()),{line:Je,fill:it}}(0,E,ce),Ee=be.fill,fe=be.line,me=Math.round(Z*(K==="fraction"?F?re.w:re.h:1)),Te=me/(F?re.w:re.h),_e=Math.round(H*(V==="fraction"?F?re.h:re.w:1)),Ae=_e/(F?re.h:re.w),Pe=Math.round(F?j*re.w+U:X*re.h+Q),De={center:.5,right:1}[R]||0,Ve={top:1,middle:.5}[N]||0,Qe=F?j-De*Te:X-Ve*Te,Oe=F?X-Ve*Ae:j-De*Ae,Ue=Math.round(F?re.h*(1-Oe):re.w*Oe);E._lenFrac=Ae,E._thickFrac=Te,E._uFrac=Qe,E._vFrac=Oe;var Ge=E._axis=function(Re,Xe,ke){var Le=Re._fullLayout,Ie=Xe.orientation==="v",Ce={type:"linear",range:ke,tickmode:Xe.tickmode,nticks:Xe.nticks,tick0:Xe.tick0,dtick:Xe.dtick,tickvals:Xe.tickvals,ticktext:Xe.ticktext,ticks:Xe.ticks,ticklen:Xe.ticklen,tickwidth:Xe.tickwidth,tickcolor:Xe.tickcolor,showticklabels:Xe.showticklabels,ticklabelposition:Xe.ticklabelposition,ticklabeloverflow:Xe.ticklabeloverflow,ticklabelstep:Xe.ticklabelstep,tickfont:Xe.tickfont,tickangle:Xe.tickangle,tickformat:Xe.tickformat,exponentformat:Xe.exponentformat,minexponent:Xe.minexponent,separatethousands:Xe.separatethousands,showexponent:Xe.showexponent,showtickprefix:Xe.showtickprefix,tickprefix:Xe.tickprefix,showticksuffix:Xe.showticksuffix,ticksuffix:Xe.ticksuffix,title:Xe.title,showline:!0,anchor:"free",side:Ie?"right":"bottom",position:1},Je=Ie?"y":"x",it={type:"linear",_id:Je+Xe._id},ht={letter:Je,font:Le.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:Le.calendar};function ut(kt,ot){return t.coerce(Ce,it,a,kt,ot)}return h(Ce,it,ut,ht,Le),p(Ce,it,ut,ht),it}(D,E,ce);Ge.position=Te+(F?j+U/re.w:X+Q/re.h);var Ye=["top","bottom"].indexOf(pe)!==-1;if(F&&Ye&&(Ge.title.side=pe,Ge.titlex=j+U/re.w,Ge.titley=Oe+(oe.side==="top"?Ae-Q/re.h:Q/re.h)),F||Ye||(Ge.title.side=pe,Ge.titley=X+Q/re.h,Ge.titlex=Oe+U/re.w),se.color&&E.tickmode==="auto"){Ge.tickmode="linear",Ge.tick0=we.start;var tt=we.size,lt=t.constrain(_e/50,4,15)+1,vt=(ce[1]-ce[0])/((E.nticks||lt)*tt);if(vt>1){var It=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));tt*=It*t.roundUp(vt/It,[2,5,10]),(Math.abs(we.start)/we.size+1e-6)%1<2e-6&&(Ge.tick0=0)}Ge.dtick=tt}
1213Ge.domain=F?[Oe+Q/re.h,Oe+Ae-Q/re.h]:[Oe+U/re.w,Oe+Ae-U/re.w],Ge.setScale(),S.attr("transform",o(Math.round(re.l),Math.round(re.t)));var St,rt=S.select("."+T.cbtitleunshift).attr("transform",o(-Math.round(re.l),-Math.round(re.t))),et=Ge.ticklabelposition,Tt=Ge.title.font.size,Vt=S.select("."+T.cbaxis),Kt=0,Be=0;function qe(Re,Xe){var ke={propContainer:Ge,propName:E._propPrefix+"title",traceIndex:E._traceIndex,_meta:E._meta,placeholder:J._dfltTitle.colorbar,containerGroup:S.select("."+T.cbtitle)},Le=Re.charAt(0)==="h"?Re.substr(1):"h"+Re;S.selectAll("."+Le+",."+Le+"-math-group").remove(),u.draw(D,Re,r(ke,Xe||{}))}return t.syncOrAsync([b.previousPromises,function(){var Re,Xe;(F&&Ye||!F&&!Ye)&&(pe==="top"&&(Re=U+re.l+re.w*j,Xe=Q+re.t+re.h*(1-Oe-Ae)+3+.75*Tt),pe==="bottom"&&(Re=U+re.l+re.w*j,Xe=Q+re.t+re.h*(1-Oe)-3-.25*Tt),pe==="right"&&(Xe=Q+re.t+re.h*X+3+.75*Tt,Re=U+re.l+re.w*Oe),qe(Ge._id+"title",{attributes:{x:Re,y:Xe,"text-anchor":F?"start":"middle"}}))},function(){if(!F&&!Ye||F&&Ye){var Re,Xe=S.select("."+T.cbtitle),ke=Xe.select("text"),Le=[-q/2,q/2],Ie=Xe.select(".h"+Ge._id+"title-math-group").node(),Ce=15.6;if(ke.node()&&(Ce=parseInt(ke.node().style.fontSize,10)*l),Ie?(Re=c.bBox(Ie),Be=Re.width,(Kt=Re.height)>Ce&&(Le[1]-=(Kt-Ce)/2)):ke.node()&&!ke.classed(T.jsPlaceholder)&&(Re=c.bBox(ke.node()),Be=Re.width,Kt=Re.height),F){if(Kt){if(Kt+=5,pe==="top")Ge.domain[1]-=Kt/re.h,Le[1]*=-1;else{Ge.domain[0]+=Kt/re.h;var Je=f.lineCount(ke);Le[1]+=(1-Je)*Ce}Xe.attr("transform",o(Le[0],Le[1])),Ge.setScale()}}else Be&&(pe==="right"&&(Ge.domain[0]+=(Be+Tt/2)/re.w),Xe.attr("transform",o(Le[0],Le[1])),Ge.setScale())}S.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",F?o(0,Math.round(re.h*(1-Ge.domain[1]))):o(Math.round(re.w*Ge.domain[0]),0)),Vt.attr("transform",F?o(0,Math.round(-re.t)):o(Math.round(-re.l),0));var it=S.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(Ee);it.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),it.exit().remove();var ht=ce.map(Ge.c2p).map(Math.round).sort(function(Et,Ze){return Et-Ze});it.each(function(Et,Ze){var pt=[Ze===0?ce[0]:(Ee[Ze]+Ee[Ze-1])/2,Ze===Ee.length-1?ce[1]:(Ee[Ze]+Ee[Ze+1])/2].map(Ge.c2p).map(Math.round);F&&(pt[1]=t.constrain(pt[1]+(pt[1]>pt[0])?1:-1,ht[0],ht[1]));var Ct=g.select(this).attr(F?"x":"y",Pe).attr(F?"y":"x",g.min(pt)).attr(F?"width":"height",Math.max(me,2)).attr(F?"height":"width",Math.max(g.max(pt)-g.min(pt),2));if(E._fillgradient)c.gradient(Ct,D,E._id,F?"vertical":"horizontalreversed",E._fillgradient,"fill");else{var zt=xe(Et).replace("e-","");Ct.attr("fill",m(zt).toHexString())}});var ut=S.select("."+T.cblines).selectAll("path."+T.cbline).data(se.color&&se.width?fe:[]);ut.enter().append("path").classed(T.cbline,!0),ut.exit().remove(),ut.each(function(Et){var Ze=Pe,pt=Math.round(Ge.c2p(Et))+se.width/2%1;g.select(this).attr("d","M"+(F?Ze+","+pt:pt+","+Ze)+(F?"h":"v")+me).call(c.lineGroupStyle,se.width,de(Et),se.dash)}),Vt.selectAll("g."+Ge._id+"tick,path").remove();var kt=Pe+me+(q||0)/2-(E.ticks==="outside"?1:0),ot=e.calcTicks(Ge),Lt=e.getTickSigns(Ge)[2];return e.drawTicks(D,Ge,{vals:Ge.ticks==="inside"?e.clipEnds(Ge,ot):ot,layer:Vt,path:e.makeTickPath(Ge,kt,Lt),transFn:e.makeTransTickFn(Ge)}),e.drawLabels(D,Ge,{vals:ot,layer:Vt,transFn:e.makeTransTickLabelFn(Ge),labelFns:e.makeLabelFns(Ge,kt)})},function(){if(F&&!Ye||!F&&Ye){var Re,Xe,ke=Ge.position||0,Le=Ge._offset+Ge._length/2;if(pe==="right")Xe=Le,Re=re.l+re.w*ke+10+Tt*(Ge.showticklabels?1:.5);else if(Re=Le,pe==="bottom"&&(Xe=re.t+re.h*ke+10+(et.indexOf("inside")===-1?Ge.tickfont.size:0)+(Ge.ticks!=="intside"&&E.ticklen||0)),pe==="top"){var Ie=oe.text.split("<br>").length;Xe=re.t+re.h*ke+10-me-l*Tt*Ie}qe((F?"h":"v")+Ge._id+"title",{avoid:{selection:g.select(D).selectAll("g."+Ge._id+"tick"),side:pe,offsetTop:F?0:re.t,offsetLeft:F?re.l:0,maxShift:F?J.width:J.height},attributes:{x:Re,y:Xe,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}},b.previousPromises,function(){var Re,Xe=me+q/2;et.indexOf("inside")===-1&&(Re=c.bBox(Vt.node()),Xe+=F?Re.width:Re.height),St=rt.select("text");var ke=0,Le=F&&pe==="top",Ie=!F&&pe==="right",Ce=0;if(St.node()&&!St.classed(T.jsPlaceholder)){var Je,it=rt.select(".h"+Ge._id+"title-math-group").node();it&&(F&&Ye||!F&&!Ye)?(ke=(Re=c.bBox(it)).width,Je=Re.height):(ke=(Re=c.bBox(rt.node())).right-re.l-(F?Pe:Ue),Je=Re.bottom-re.t-(F?Ue:Pe),F||pe!=="top"||(Xe+=Re.height,Ce=Re.height)),Ie&&(St.attr("transform",o(ke/2+Tt/2,0)),ke*=2),Xe=Math.max(Xe,F?ke:Je)}var ht=2*(F?U:Q)+Xe+W+q/2,ut=0;!F&&oe.text&&N==="bottom"&&X<=0&&(ht+=ut=ht/2,Ce+=ut),J._hColorbarMoveTitle=ut,J._hColorbarMoveCBTitle=Ce;var kt=W+q;S.select("."+T.cbbg).attr("x",(F?Pe:Ue)-kt/2-(F?U:0)).attr("y",(F?Ue:Pe)-(F?_e:Q+Ce-ut)).attr(F?"width":"height",Math.max(ht-ut,2)).attr(F?"height":"width",Math.max(_e+kt,2)).call(i.fill,$).call(i.stroke,E.bordercolor).style("stroke-width",W);var ot=Ie?Math.max(ke-10,0):0;if(S.selectAll("."+T.cboutline).attr("x",(F?Pe:Ue+U)+ot).attr("y",(F?Ue+Q-_e:Pe)+(Le?Kt:0)).attr(F?"width":"height",Math.max(me,2)).attr(F?"height":"width",Math.max(_e-(F?2*Q+Kt:2*U+ot),2)).call(i.stroke,E.outlinecolor).style({fill:"none","stroke-width":q}),S.attr("transform",o(re.l-(F?De*ht:0),re.t-(F?0:(1-Ve)*ht-Ce))),!F&&(W||m($).getAlpha()&&!m.equals(J.paper_bgcolor,$))){var Lt=Vt.selectAll("text"),Et=Lt[0].length,Ze=S.select("."+T.cbbg).node(),pt=c.bBox(Ze),Ct=c.getTranslate(S);Lt.each(function(jt,or){var Ut=Et-1;if(or===0||or===Ut){var Xt,sr=c.bBox(this),vr=c.getTranslate(this);if(or===Ut){var pr=sr.right+vr.x;(Xt=pt.right+Ct.x+Ue-W-2+j-pr)>0&&(Xt=0)}else if(or===0){var ar=sr.left+vr.x;(Xt=pt.left+Ct.x+Ue+W+2-ar)<0&&(Xt=0)}Xt&&(Et<3?this.setAttribute("transform","translate("+Xt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var zt={},Gt=w[R],ze=_[R],st=w[N],yt=_[N],Dt=ht-me;F?(V==="pixels"?(zt.y=X,zt.t=_e*st,zt.b=_e*yt):(zt.t=zt.b=0,zt.yt=X+H*st,zt.yb=X-H*yt),K==="pixels"?(zt.x=j,zt.l=ht*Gt,zt.r=ht*ze):(zt.l=Dt*Gt,zt.r=Dt*ze,zt.xl=j-Z*Gt,zt.xr=j+Z*ze)):(V==="pixels"?(zt.x=j,zt.l=_e*Gt,zt.r=_e*ze):(zt.l=zt.r=0,zt.xl=j+H*Gt,zt.xr=j-H*ze),K==="pixels"?(zt.y=1-X,zt.t
1213=ht*st,zt.b=ht*yt):(zt.t=Dt*st,zt.b=Dt*yt,zt.yt=X-Z*st,zt.yb=X+Z*yt)),b.autoMargin(D,E._id,zt)}],D)}(I,A,k);P&&P.then&&(k._promises||[]).push(P),k._context.edits.colorbarPosition&&function(S,E,D){var F,H,V,Z=E.orientation==="v",K=D._fullLayout._size;n.init({element:S.node(),gd:D,prepFn:function(){F=S.attr("transform"),d(S)},moveFn:function(q,W){S.attr("transform",F+o(q,W)),H=n.align((Z?E._uFrac:E._vFrac)+q/K.w,Z?E._thickFrac:E._lenFrac,0,1,E.xanchor),V=n.align((Z?E._vFrac:1-E._uFrac)-W/K.h,Z?E._lenFrac:E._thickFrac,0,1,E.yanchor);var $=n.getCursor(H,V,E.xanchor,E.yanchor);d(S,$)},doneFn:function(){if(d(S),H!==void 0&&V!==void 0){var q={};q[E._propPrefix+"x"]=H,q[E._propPrefix+"y"]=V,E._traceIndex!==void 0?v.call("_guiRestyle",D,q,E._traceIndex):v.call("_guiRelayout",D,q)}}})}(I,A,k)}),L.exit().each(function(A){b.autoMargin(k,A._id)}).remove(),L.order()}}},{"../../constants/alignment":471,"../../lib":503,"../../lib/extend":493,"../../lib/setcursor":524,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_defaults":556,"../../plots/cartesian/layout_attributes":569,"../../plots/cartesian/position_defaults":572,"../../plots/plots":619,"../../registry":638,"../color":366,"../colorscale/helpers":377,"../dragelement":385,"../drawing":388,"../titles":464,"./constants":368,"@plotly/d3":58,tinycolor2:312}],371:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m){return g.isPlainObject(m.colorbar)}},{"../../lib":503}],372:[function(y,ee,te){ee.exports={moduleType:"component",name:"colorbar",attributes:y("./attributes"),supplyDefaults:y("./defaults"),draw:y("./draw").draw,hasColorbar:y("./has_colorbar")}},{"./attributes":367,"./defaults":369,"./draw":370,"./has_colorbar":371}],373:[function(y,ee,te){var g=y("../colorbar/attributes"),m=y("../../lib/regex").counter,b=y("../../lib/sort_object_keys"),v=y("./scales.js").scales;b(v);function e(n){return"`"+n+"`"}ee.exports=function(n,t){n=n||"";var o,r=(t=t||{}).cLetter||"c",d=("onlyIfNumerical"in t&&t.onlyIfNumerical,"noScale"in t?t.noScale:n==="marker.line"),c="showScaleDflt"in t?t.showScaleDflt:r==="z",i=typeof t.colorscaleDflt=="string"?v[t.colorscaleDflt]:null,u=t.editTypeOverride||"",f=n?n+".":"";"colorAttr"in t?(o=t.colorAttr,t.colorAttr):e(f+(o={z:"z",c:"color"}[r]));var s=r+"auto",h=r+"min",p=r+"max",a=r+"mid",x={};x[h]=x[p]=void 0;var l={};l[s]=!1;var w={};return o==="color"&&(w.color={valType:"color",arrayOk:!0,editType:u||"style"},t.anim&&(w.color.anim=!0)),w[s]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:x},w[h]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:l},w[p]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:l},w[a]={valType:"number",dflt:null,editType:"calc",impliedEdits:x},w.colorscale={valType:"colorscale",editType:"calc",dflt:i,impliedEdits:{autocolorscale:!1}},w.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},w.reversescale={valType:"boolean",dflt:!1,editType:"plot"},d||(w.showscale={valType:"boolean",dflt:c,editType:"calc"},w.colorbar=g),t.noColorAxis||(w.coloraxis={valType:"subplotid",regex:m("coloraxis"),dflt:null,editType:"calc"}),w}},{"../../lib/regex":520,"../../lib/sort_object_keys":526,"../colorbar/attributes":367,"./scales.js":381}],374:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("./helpers").extractOpts;ee.exports=function(v,e,n){var t,o=v._fullLayout,r=n.vals,d=n.containerStr,c=d?m.nestedProperty(e,d).get():e,i=b(c),u=i.auto!==!1,f=i.min,s=i.max,h=i.mid,p=function(){return m.aggNums(Math.min,null,r)},a=function(){return m.aggNums(Math.max,null,r)};f===void 0?f=p():u&&(f=c._colorAx&&g(f)?Math.min(f,p()):p()),s===void 0?s=a():u&&(s=c._colorAx&&g(s)?Math.max(s,a()):a()),u&&h!==void 0&&(s-h>h-f?f=h-(s-h):s-h<h-f&&(s=h+(h-f))),f===s&&(f-=.5,s+=.5),i._sync("min",f),i._sync("max",s),i.autocolorscale&&(t=f*s<0?o.colorscale.diverging:f>=0?o.colorscale.sequential:o.colorscale.sequentialminus,i._sync("colorscale",t))}},{"../../lib":503,"./helpers":377,"fast-isnumeric":190}],375:[function(y,ee,te){var g=y("../../lib"),m=y("./helpers").hasColorscale,b=y("./helpers").extractOpts;ee.exports=function(v,e){function n(u,f){var s=u["_"+f];s!==void 0&&(u[f]=s)}function t(u,f){var s=f.container?g.nestedProperty(u,f.container).get():u;if(s)if(s.coloraxis)s._colorAx=e[s.coloraxis];else{var h=b(s),p=h.auto;(p||h.min===void 0)&&n(s,f.min),(p||h.max===void 0)&&n(s,f.max),h.autocolorscale&&n(s,"colorscale")}}for(var o=0;o<v.length;o++){var r=v[o],d=r._module.colorbar;if(d)if(Array.isArray(d))for(var c=0;c<d.length;c++)t(r,d[c]);else t(r,d);m(r,"marker.line")&&t(r,{container:"marker.line",min:"cmin",max:"cmax"})}for(var i in e._colorAxes)t(e[i],{min:"cmin",max:"cmax"})}},{"../../lib":503,"./helpers":377}],376:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../colorbar/has_colorbar"),v=y("../colorbar/defaults"),e=y("./scales").isValid,n=y("../../registry").traceIs;function t(o,r){var d=r.slice(0,r.length-1);return r?m.nestedProperty(o,d).get()||{}:o}ee.exports=function o(r,d,c,i,u){var f=u.prefix,s=u.cLetter,h="_module"in d,p=t(r,f),a=t(d,f),x=t(d._template||{},f)||{},l=function(){return delete r.coloraxis,delete d.coloraxis,o(r,d,c,i,u)};if(h){var w=c._colorAxes||{},_=i(f+"coloraxis");if(_){var T=n(d,"contour")&&m.nestedProperty(d,"contours.coloring").get()||"heatmap",k=w[_];return void(k?(k[2].push(l),k[0]!==T&&(k[0]=!1,m.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):w[_]=[T,d,[l]])}}var L=p[s+"min"],A=p[s+"max"],I=g(L)&&g(A)&&L<A;i(f+s+"auto",!I)?i(f+s+"mid"):(i(f+s+"min"),i(f+s+"max"));var P,S,E=p.colorscale,D=x.colorscale;E!==void 0&&(P=!e(E)),D!==void 0&&(P=!e(D)),i(f+"autocolorscale",P),i(f+"colorscale"),i(f+"reversescale"),f!=="marker.line."&&(f&&h&&(S=b(p)),i(f+"showscale",
1213S)&&(f&&x&&(a._template=x),v(p,a,c)))}},{"../../lib":503,"../../registry":638,"../colorbar/defaults":369,"../colorbar/has_colorbar":371,"./scales":381,"fast-isnumeric":190}],377:[function(y,ee,te){var g=y("@plotly/d3"),m=y("tinycolor2"),b=y("fast-isnumeric"),v=y("../../lib"),e=y("../color"),n=y("./scales").isValid,t=["showscale","autocolorscale","colorscale","reversescale","colorbar"],o=["min","max","mid","auto"];function r(f){var s,h,p,a=f._colorAx,x=a||f,l={};for(h=0;h<t.length;h++)l[p=t[h]]=x[p];if(a)for(s="c",h=0;h<o.length;h++)l[p=o[h]]=x["c"+p];else{var w;for(h=0;h<o.length;h++)((w="c"+(p=o[h]))in x||(w="z"+p)in x)&&(l[p]=x[w]);s=w.charAt(0)}return l._sync=function(_,T){var k=o.indexOf(_)!==-1?s+_:_;x[k]=x["_"+k]=T},l}function d(f){for(var s=r(f),h=s.min,p=s.max,a=s.reversescale?c(s.colorscale):s.colorscale,x=a.length,l=new Array(x),w=new Array(x),_=0;_<x;_++){var T=a[_];l[_]=h+T[0]*(p-h),w[_]=T[1]}return{domain:l,range:w}}function c(f){for(var s=f.length,h=new Array(s),p=s-1,a=0;p>=0;p--,a++){var x=f[p];h[a]=[1-x[0],x[1]]}return h}function i(f,s){s=s||{};for(var h=f.domain,p=f.range,a=p.length,x=new Array(a),l=0;l<a;l++){var w=m(p[l]).toRgb();x[l]=[w.r,w.g,w.b,w.a]}var _,T=g.scale.linear().domain(h).range(x).clamp(!0),k=s.noNumericCheck,L=s.returnArray;return(_=k&&L?T:k?function(A){return u(T(A))}:L?function(A){return b(A)?T(A):m(A).isValid()?A:e.defaultLine}:function(A){return b(A)?u(T(A)):m(A).isValid()?A:e.defaultLine}).domain=T.domain,_.range=function(){return p},_}function u(f){var s={r:f[0],g:f[1],b:f[2],a:f[3]};return m(s).toRgbString()}ee.exports={hasColorscale:function(f,s,h){var p=s?v.nestedProperty(f,s).get()||{}:f,a=p[h||"color"],x=!1;if(v.isArrayOrTypedArray(a)){for(var l=0;l<a.length;l++)if(b(a[l])){x=!0;break}}return v.isPlainObject(p)&&(x||p.showscale===!0||b(p.cmin)&&b(p.cmax)||n(p.colorscale)||v.isPlainObject(p.colorbar))},extractOpts:r,extractScale:d,flipScale:c,makeColorScaleFunc:i,makeColorScaleFuncFromTrace:function(f,s){return i(d(f),s)}}},{"../../lib":503,"../color":366,"./scales":381,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],378:[function(y,ee,te){var g=y("./scales"),m=y("./helpers");ee.exports={moduleType:"component",name:"colorscale",attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyLayoutDefaults:y("./layout_defaults"),handleDefaults:y("./defaults"),crossTraceDefaults:y("./cross_trace_defaults"),calc:y("./calc"),scales:g.scales,defaultScale:g.defaultScale,getScale:g.get,isValidScale:g.isValid,hasColorscale:m.hasColorscale,extractOpts:m.extractOpts,extractScale:m.extractScale,flipScale:m.flipScale,makeColorScaleFunc:m.makeColorScaleFunc,makeColorScaleFuncFromTrace:m.makeColorScaleFuncFromTrace}},{"./attributes":373,"./calc":374,"./cross_trace_defaults":375,"./defaults":376,"./helpers":377,"./layout_attributes":379,"./layout_defaults":380,"./scales":381}],379:[function(y,ee,te){var g=y("../../lib/extend").extendFlat,m=y("./attributes"),b=y("./scales").scales;ee.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:b.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:b.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:b.RdBu,editType:"calc"}},coloraxis:g({_isSubplotObj:!0,editType:"calc"},m("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},{"../../lib/extend":493,"./attributes":373,"./scales":381}],380:[function(y,ee,te){var g=y("../../lib"),m=y("../../plot_api/plot_template"),b=y("./layout_attributes"),v=y("./defaults");ee.exports=function(e,n){function t(s,h){return g.coerce(e,n,b,s,h)}t("colorscale.sequential"),t("colorscale.sequentialminus"),t("colorscale.diverging");var o,r,d=n._colorAxes;function c(s,h){return g.coerce(o,r,b.coloraxis,s,h)}for(var i in d){var u=d[i];if(u[0])o=e[i]||{},(r=m.newContainer(n,i,"coloraxis"))._name=i,v(o,r,n,c,{prefix:"",cLetter:"c"});else{for(var f=0;f<u[2].length;f++)u[2][f]();delete n._colorAxes[i]}}}},{"../../lib":503,"../../plot_api/plot_template":543,"./defaults":376,"./layout_attributes":379}],381:[function(y,ee,te){var g=y("tinycolor2"),m={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,
1213105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},b=m.RdBu;function v(e){var n=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var t=0;t<e.length;t++){var o=e[t];if(o.length!==2||+o[0]<n||!g(o[1]).isValid())return!1;n=+o[0]}return!0}ee.exports={scales:m,defaultScale:b,get:function(e,n){if(n||(n=b),!e)return n;function t(){try{e=m[e]||JSON.parse(e)}catch{e=n}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),v(e)?e:n},isValid:function(e){return m[e]!==void 0||v(e)}}},{tinycolor2:312}],382:[function(y,ee,te){ee.exports=function(g,m,b,v,e){var n=(g-b)/(v-b),t=n+m/(v-b),o=(n+t)/2;return e==="left"||e==="bottom"?n:e==="center"||e==="middle"?o:e==="right"||e==="top"?t:n<2/3-o?n:t>4/3-o?t:o}},{}],383:[function(y,ee,te){var g=y("../../lib"),m=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];ee.exports=function(b,v,e,n){return b=e==="left"?0:e==="center"?1:e==="right"?2:g.constrain(Math.floor(3*b),0,2),v=n==="bottom"?0:n==="middle"?1:n==="top"?2:g.constrain(Math.floor(3*v),0,2),m[v][b]}},{"../../lib":503}],384:[function(y,ee,te){te.selectMode=function(g){return g==="lasso"||g==="select"},te.drawMode=function(g){return g==="drawclosedpath"||g==="drawopenpath"||g==="drawline"||g==="drawrect"||g==="drawcircle"},te.openMode=function(g){return g==="drawline"||g==="drawopenpath"},te.rectMode=function(g){return g==="select"||g==="drawline"||g==="drawrect"||g==="drawcircle"},te.freeMode=function(g){return g==="lasso"||g==="drawclosedpath"||g==="drawopenpath"},te.selectingOrDrawing=function(g){return te.freeMode(g)||te.rectMode(g)}},{}],385:[function(y,ee,te){var g=y("mouse-event-offset"),m=y("has-hover"),b=y("has-passive-events"),v=y("../../lib").removeElement,e=y("../../plots/cartesian/constants"),n=ee.exports={};n.align=y("./align"),n.getCursor=y("./cursor");var t=y("./unhover");function o(){var d=document.createElement("div");d.className="dragcover";var c=d.style;return c.position="fixed",c.left=0,c.right=0,c.top=0,c.bottom=0,c.zIndex=999999999,c.background="none",document.body.appendChild(d),d}function r(d){return g(d.changedTouches?d.changedTouches[0]:d,document.body)}n.unhover=t.wrapped,n.unhoverRaw=t.raw,n.init=function(d){var c,i,u,f,s,h,p,a,x=d.gd,l=1,w=x._context.doubleClickDelay,_=d.element;x._mouseDownTime||(x._mouseDownTime=0),_.style.pointerEvents="all",_.onmousedown=k,b?(_._ontouchstart&&_.removeEventListener("touchstart",_._ontouchstart),_._ontouchstart=k,_.addEventListener("touchstart",k,{passive:!1})):_.ontouchstart=k;
1213var T=d.clampFn||function(I,P,S){return Math.abs(I)<S&&(I=0),Math.abs(P)<S&&(P=0),[I,P]};function k(I){x._dragged=!1,x._dragging=!0;var P=r(I);c=P[0],i=P[1],p=I.target,h=I,a=I.buttons===2||I.ctrlKey,I.clientX===void 0&&I.clientY===void 0&&(I.clientX=c,I.clientY=i),(u=new Date().getTime())-x._mouseDownTime<w?l+=1:(l=1,x._mouseDownTime=u),d.prepFn&&d.prepFn(I,c,i),m&&!a?(s=o()).style.cursor=window.getComputedStyle(_).cursor:m||(s=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(_).cursor),document.addEventListener("mouseup",A),document.addEventListener("touchend",A),d.dragmode!==!1&&(I.preventDefault(),document.addEventListener("mousemove",L),document.addEventListener("touchmove",L,{passive:!1}))}function L(I){I.preventDefault();var P=r(I),S=d.minDrag||e.MINDRAG,E=T(P[0]-c,P[1]-i,S),D=E[0],F=E[1];(D||F)&&(x._dragged=!0,n.unhover(x,I)),x._dragged&&d.moveFn&&!a&&(x._dragdata={element:_,dx:D,dy:F},d.moveFn(D,F))}function A(I){if(delete x._dragdata,d.dragmode!==!1&&(I.preventDefault(),document.removeEventListener("mousemove",L),document.removeEventListener("touchmove",L)),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A),m?v(s):f&&(s.documentElement.style.cursor=f,f=null),x._dragging){if(x._dragging=!1,new Date().getTime()-x._mouseDownTime>w&&(l=Math.max(l-1,1)),x._dragged)d.doneFn&&d.doneFn();
1213else if(d.clickFn&&d.clickFn(l,h),!a){var P;try{P=new MouseEvent("click",I)}catch{var S=r(I);(P=document.createEvent("MouseEvents")).initMouseEvent("click",I.bubbles,I.cancelable,I.view,I.detail,I.screenX,I.screenY,S[0],S[1],I.ctrlKey,I.altKey,I.shiftKey,I.metaKey,I.button,I.relatedTarget)}p.dispatchEvent(P)}x._dragging=!1,x._dragged=!1}else x._dragged=!1}},n.coverSlip=o},{"../../lib":503,"../../plots/cartesian/constants":561,"./align":382,"./cursor":383,"./unhover":386,"has-hover":228,"has-passive-events":229,"mouse-event-offset":242}],386:[function(y,ee,te){var g=y("../../lib/events"),m=y("../../lib/throttle"),b=y("../../lib/dom").getGraphDiv,v=y("../fx/constants"),e=ee.exports={};e.wrapped=function(n,t,o){(n=b(n))._fullLayout&&m.clear(n._fullLayout._uid+v.HOVERID),e.raw(n,t,o)},e.raw=function(n,t){var o=n._fullLayout,r=n._hoverdata;t||(t={}),t.target&&!n._dragged&&g.triggerHandler(n,"plotly_beforehover",t)===!1||(o._hoverlayer.selectAll("g").remove(),o._hoverlayer.selectAll("line").remove(),o._hoverlayer.selectAll("circle").remove(),n._hoverdata=void 0,t.target&&r&&n.emit("plotly_unhover",{event:t,points:r}))}},{"../../lib/dom":491,"../../lib/events":492,"../../lib/throttle":530,"../fx/constants":400}],387:[function(y,ee,te){te.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},te.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},{}],388:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=m.numberFormat,v=y("fast-isnumeric"),e=y("tinycolor2"),n=y("../../registry"),t=y("../color"),o=y("../colorscale"),r=m.strTranslate,d=y("../../lib/svg_text_utils"),c=y("../../constants/xmlns_namespaces"),i=y("../../constants/alignment").LINE_SPACING,u=y("../../constants/interactions").DESELECTDIM,f=y("../../traces/scatter/subtypes"),s=y("../../traces/scatter/make_bubble_size_func"),h=y("../../components/fx/helpers").appendArrayPointValue,p=ee.exports={};function a(q,W,$){var R=W.fillpattern,N=R&&p.getPatternAttr(R.shape,0,"");if(N){var U=p.getPatternAttr(R.bgcolor,0,null),Q=p.getPatternAttr(R.fgcolor,0,null),j=R.fgo
1213pacity,X=p.getPatternAttr(R.size,0,8),J=p.getPatternAttr(R.solidity,0,.3),re=W.uid;p.pattern(q,"point",$,re,N,X,J,void 0,R.fillmode,U,Q,j)}else W.fillcolor&&q.call(t.fill,W.fillcolor)}p.font=function(q,W,$,R){m.isPlainObject(W)&&(R=W.color,$=W.size,W=W.family),W&&q.style("font-family",W),$+1&&q.style("font-size",$+"px"),R&&q.call(t.fill,R)},p.setPosition=function(q,W,$){q.attr("x",W).attr("y",$)},p.setSize=function(q,W,$){q.attr("width",W).attr("height",$)},p.setRect=function(q,W,$,R,N){q.call(p.setPosition,W,$).call(p.setSize,R,N)},p.translatePoint=function(q,W,$,R){var N=$.c2p(q.x),U=R.c2p(q.y);return!!(v(N)&&v(U)&&W.node())&&(W.node().nodeName==="text"?W.attr("x",N).attr("y",U):W.attr("transform",r(N,U)),!0)},p.translatePoints=function(q,W,$){q.each(function(R){var N=g.select(this);p.translatePoint(R,N,W,$)})},p.hideOutsideRangePoint=function(q,W,$,R,N,U){W.attr("display",$.isPtWithinRange(q,N)&&R.isPtWithinRange(q,U)?null:"none")},p.hideOutsideRangePoints=function(q,W){if(W._hasClipOnAxisFalse){var $=W.xaxis,R=W.yaxis;q.each(function(N){var U=N[0].trace,Q=U.xcalendar,j=U.ycalendar,X=n.traceIs(U,"bar-like")?".bartext":".point,.textpoint";q.selectAll(X).each(function(J){p.hideOutsideRangePoint(J,g.select(this),$,R,Q,j)})})}},p.crispRound=function(q,W,$){return W&&v(W)?q._context.staticPlot?W:W<1?1:Math.round(W):$||0},p.singleLineStyle=function(q,W,$,R,N){W.style("fill","none");var U=(((q||[])[0]||{}).trace||{}).line||{},Q=$||U.width||0,j=N||U.dash||"";t.stroke(W,R||U.color),p.dashLine(W,j,Q)},p.lineGroupStyle=function(q,W,$,R){q.style("fill","none").each(function(N){var U=(((N||[])[0]||{}).trace||{}).line||{},Q=W||U.width||0,j=R||U.dash||"";g.select(this).call(t.stroke,$||U.color).call(p.dashLine,j,Q)})},p.dashLine=function(q,W,$){$=+$||0,W=p.dashStyle(W,$),q.style({"stroke-dasharray":W,"stroke-width":$+"px"})},p.dashStyle=function(q,W){W=+W||1;var $=Math.max(W,3);return q==="solid"?q="":q==="dot"?q=$+"px,"+$+"px":q==="dash"?q=3*$+"px,"+3*$+"px":q==="longdash"?q=5*$+"px,"+5*$+"px":q==="dashdot"?q=3*$+"px,"+$+"px,"+$+"px,"+$+"px":q==="longdashdot"&&(q=5*$+"px,"+2*$+"px,"+$+"px,"+2*$+"px"),q},p.singleFillStyle=function(q,W){var $=g.select(q.node());a(q,(($.data()[0]||[])[0]||{}).trace||{},W)},p.fillGroupStyle=function(q,W){q.style("stroke-width",0).each(function($){var R=g.select(this);$[0].trace&&a(R,$[0].trace,W)})};var x=y("./symbol_defs");p.symbolNames=[],p.symbolFuncs=[],p.symbolNeedLines={},p.symbolNoDot={},p.symbolNoFill={},p.symbolList=[],Object.keys(x).forEach(function(q){var W=x[q],$=W.n;p.symbolList.push($,String($),q,$+100,String($+100),q+"-open"),p.symbolNames[$]=q,p.symbolFuncs[$]=W.f,W.needLine&&(p.symbolNeedLines[$]=!0),W.noDot?p.symbolNoDot[$]=!0:p.symbolList.push($+200,String($+200),q+"-dot",$+300,String($+300),q+"-open-dot"),W.noFill&&(p.symbolNoFill[$]=!0)});var l=p.symbolNames.length;function w(q,W){var $=q%100;return p.symbolFuncs[$](W)+(q>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}p.symbolNumber=function(q){if(v(q))q=+q;else if(typeof q=="string"){var W=0;q.indexOf("-open")>0&&(W=100,q=q.replace("-open","")),q.indexOf("-dot")>0&&(W+=200,q=q.replace("-dot","")),(q=p.symbolNames.indexOf(q))>=0&&(q+=W)}return q%100>=l||q>=400?0:Math.floor(Math.max(q,0))};var _={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0},k=b("~f"),L={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:_},horizontalreversed:{node:"linearGradient",attrs:_,reversed:!0},vertical:{node:"linearGradient",attrs:T},verticalreversed:{node:"linearGradient",attrs:T,reversed:!0}};p.gradient=function(q,W,$,R,N,U){for(var Q=N.length,j=L[R],X=new Array(Q),J=0;J<Q;J++)j.reversed?X[Q-1-J]=[k(100*(1-N[J][0])),N[J][1]]:X[J]=[k(100*N[J][0]),N[J][1]];var re=W._fullLayout,ne="g"+re._uid+"-"+$,se=re._defs.select(".gradients").selectAll("#"+ne).data([R+X.join(";")],m.identity);se.exit().remove(),se.enter().append(j.node).each(function(){var oe=g.select(this);j.attrs&&oe.attr(j.attrs),oe.attr("id",ne);var pe=oe.selectAll("stop").data(X);pe.exit().remove(),pe.enter().append("stop"),pe.each(function(ce){var de=e(ce[1]);g.select(this).attr({offset:ce[0]+"%","stop-color":t.tinyRGB(de),"stop-opacity":de.getAlpha()})})}),q.style(U,V(ne,W)).style(U+"-opacity",null),q.classed("gradient_filled",!0)},p.pattern=function(q,W,$,R,N,U,Q,j,X,J,re,ne){var se=W==="legend";
1213j&&(X==="overlay"?(J=j,re=t.contrast(J)):(J=void 0,re=j));var oe,pe,ce,de,xe,we,be,Ee,fe,me,Te,_e=$._fullLayout,Ae="p"+_e._uid+"-"+R,Pe={};switch(N){case"/":oe=U*Math.sqrt(2),pe=U*Math.sqrt(2),we="path",Pe={d:ce="M-"+oe/4+","+pe/4+"l"+oe/2+",-"+pe/2+"M0,"+pe+"L"+oe+",0M"+oe/4*3+","+pe/4*5+"l"+oe/2+",-"+pe/2,opacity:ne,stroke:re,"stroke-width":(de=Q*U)+"px"};break;case"\\":oe=U*Math.sqrt(2),pe=U*Math.sqrt(2),we="path",Pe={d:ce="M"+oe/4*3+",-"+pe/4+"l"+oe/2+","+pe/2+"M0,0L"+oe+","+pe+"M-"+oe/4+","+pe/4*3+"l"+oe/2+","+pe/2,opacity:ne,stroke:re,"stroke-width":(de=Q*U)+"px"};break;case"x":oe=U*Math.sqrt(2),pe=U*Math.sqrt(2),ce="M-"+oe/4+","+pe/4+"l"+oe/2+",-"+pe/2+"M0,"+pe+"L"+oe+",0M"+oe/4*3+","+pe/4*5+"l"+oe/2+",-"+pe/2+"M"+oe/4*3+",-"+pe/4+"l"+oe/2+","+pe/2+"M0,0L"+oe+","+pe+"M-"+oe/4+","+pe/4*3+"l"+oe/2+","+pe/2,de=U-U*Math.sqrt(1-Q),we="path",Pe={d:ce,opacity:ne,stroke:re,"stroke-width":de+"px"};break;case"|":we="path",we="path",Pe={d:ce="M"+(oe=U)/2+",0L"+oe/2+","+(pe=U),opacity:ne,stroke:re,"stroke-width":(de=Q*U)+"px"};break;case"-":we="path",we="path",Pe={d:ce="M0,"+(pe=U)/2+"L"+(oe=U)+","+pe/2,opacity:ne,stroke:re,"stroke-width":(de=Q*U)+"px"};break;case"+":we="path",ce="M"+(oe=U)/2+",0L"+oe/2+","+(pe=U)+"M0,"+pe/2+"L"+oe+","+pe/2,de=U-U*Math.sqrt(1-Q),we="path",Pe={d:ce,opacity:ne,stroke:re,"stroke-width":de+"px"};break;case".":oe=U,pe=U,Q<Math.PI/4?xe=Math.sqrt(Q*U*U/Math.PI):(be=Q,Ee=Math.PI/4,fe=1,me=U/2,Te=U/Math.sqrt(2),xe=me+(Te-me)*(be-Ee)/(fe-Ee)),we="circle",Pe={cx:oe/2,cy:pe/2,r:xe,opacity:ne,fill:re}}var De=[N||"noSh",J||"noBg",re||"noFg",U,Q].join(";"),Ve=_e._defs.select(".patterns").selectAll("#"+Ae).data([De],m.identity);Ve.exit().remove(),Ve.enter().append("pattern").each(function(){var Qe=g.select(this);if(Qe.attr({id:Ae,width:oe+"px",height:pe+"px",patternUnits:"userSpaceOnUse",patternTransform:se?"scale(0.8)":""}),J){var Oe=Qe.selectAll("rect").data([0]);Oe.exit().remove(),Oe.enter().append("rect").attr({width:oe+"px",height:pe+"px",fill:J})}var Ue=Qe.selectAll(we).data([0]);Ue.exit().remove(),Ue.enter().append(we).attr(Pe)}),q.style("fill",V(Ae,$)).style("fill-opacity",null),q.classed("pattern_filled",!0)},p.initGradients=function(q){var W=q._fullLayout;m.ensureSingle(W._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),g.select(q).selectAll(".gradient_filled").classed("gradient_filled",!1)},p.initPatterns=function(q){var W=q._fullLayout;m.ensureSingle(W._defs,"g","patterns").selectAll("pattern").remove(),g.select(q).selectAll(".pattern_filled").classed("pattern_filled",!1)},p.getPatternAttr=function(q,W,$){return q&&m.isArrayOrTypedArray(q)?W<q.length?q[W]:$:q},p.pointStyle=function(q,W,$){if(q.size()){var R=p.makePointStyleFns(W);q.each(function(N){p.singlePointStyle(N,g.select(this),W,R,$)})}},p.singlePointStyle=function(q,W,$,R,N){var U=$.marker,Q=U.line;if(W.style("opacity",R.selectedOpacityFn?R.selectedOpacityFn(q):q.mo===void 0?U.opacity:q.mo),R.ms2mrc){var j;j=q.ms==="various"||U.size==="various"?3:R.ms2mrc(q.ms),q.mrc=j,R.selectedSizeFn&&(j=q.mrc=R.selectedSizeFn(q));var X=p.symbolNumber(q.mx||U.symbol)||0;q.om=X%200>=100,W.attr("d",w(X,j))}var J,re,ne,se=!1;if(q.so)ne=Q.outlierwidth,re=Q.outliercolor,J=U.outliercolor;else{var oe=(Q||{}).width;ne=(q.mlw+1||oe+1||(q.trace?(q.trace.marker.line||{}).width:0)+1)-1||0,re="mlc"in q?q.mlcc=R.lineScale(q.mlc):m.isArrayOrTypedArray(Q.color)?t.defaultLine:Q.color,m.isArrayOrTypedArray(U.color)&&(J=t.defaultLine,se=!0),J="mc"in q?q.mcc=R.markerScale(q.mc):U.color||"rgba(0,0,0,0)",R.selectedColorFn&&(J=R.selectedColorFn(q))}if(q.om)W.call(t.stroke,J).style({"stroke-width":(ne||1)+"px",fill:"none"});else{W.style("stroke-width",(q.isBlank?0:ne)+"px");var pe=U.gradient,ce=q.mgt;ce?se=!0:ce=pe&&pe.type,m.isArrayOrTypedArray(ce)&&(ce=ce[0],L[ce]||(ce=0));var de=U.pattern,xe=de&&p.getPatternAttr(de.shape,q.i,"");if(ce&&ce!=="none"){var we=q.mgc;
1213we?se=!0:we=pe.color;var be=$.uid;se&&(be+="-"+q.i),p.gradient(W,N,be,ce,[[0,we],[1,J]],"fill")}else if(xe){var Ee=p.getPatternAttr(de.bgcolor,q.i,null),fe=p.getPatternAttr(de.fgcolor,q.i,null),me=de.fgopacity,Te=p.getPatternAttr(de.size,q.i,8),_e=p.getPatternAttr(de.solidity,q.i,.3),Ae=q.mcc||m.isArrayOrTypedArray(de.shape)||m.isArrayOrTypedArray(de.bgcolor)||m.isArrayOrTypedArray(de.size)||m.isArrayOrTypedArray(de.solidity),Pe=$.uid;Ae&&(Pe+="-"+q.i),p.pattern(W,"point",N,Pe,xe,Te,_e,q.mcc,de.fillmode,Ee,fe,me)}else t.fill(W,J);ne&&t.stroke(W,re)}},p.makePointStyleFns=function(q){var W={},$=q.marker;return W.markerScale=p.tryColorscale($,""),W.lineScale=p.tryColorscale($,"line"),n.traceIs(q,"symbols")&&(W.ms2mrc=f.isBubble(q)?s(q):function(){return($.size||6)/2}),q.selectedpoints&&m.extendFlat(W,p.makeSelectedPointStyleFns(q)),W},p.makeSelectedPointStyleFns=function(q){var W={},$=q.selected||{},R=q.unselected||{},N=q.marker||{},U=$.marker||{},Q=R.marker||{},j=N.opacity,X=U.opacity,J=Q.opacity,re=X!==void 0,ne=J!==void 0;(m.isArrayOrTypedArray(j)||re||ne)&&(W.selectedOpacityFn=function(Ee){var fe=Ee.mo===void 0?N.opacity:Ee.mo;return Ee.selected?re?X:fe:ne?J:u*fe});var se=N.color,oe=U.color,pe=Q.color;(oe||pe)&&(W.selectedColorFn=function(Ee){var fe=Ee.mcc||se;return Ee.selected?oe||fe:pe||fe});var ce=N.size,de=U.size,xe=Q.size,we=de!==void 0,be=xe!==void 0;return n.traceIs(q,"symbols")&&(we||be)&&(W.selectedSizeFn=function(Ee){var fe=Ee.mrc||ce/2;return Ee.selected?we?de/2:fe:be?xe/2:fe}),W},p.makeSelectedTextStyleFns=function(q){var W={},$=q.selected||{},R=q.unselected||{},N=q.textfont||{},U=$.textfont||{},Q=R.textfont||{},j=N.color,X=U.color,J=Q.color;return W.selectedTextColorFn=function(re){var ne=re.tc||j;return re.selected?X||ne:J||(X?ne:t.addOpacity(ne,u))},W},p.selectedPointStyle=function(q,W){if(q.size()&&W.selectedpoints){var $=p.makeSelectedPointStyleFns(W),R=W.marker||{},N=[];$.selectedOpacityFn&&N.push(function(U,Q){U.style("opacity",$.selectedOpacityFn(Q))}),$.selectedColorFn&&N.push(function(U,Q){t.fill(U,$.selectedColorFn(Q))}),$.selectedSizeFn&&N.push(function(U,Q){var j=Q.mx||R.symbol||0,X=$.selectedSizeFn(Q);U.attr("d",w(p.symbolNumber(j),X)),Q.mrc2=X}),N.length&&q.each(function(U){for(var Q=g.select(this),j=0;j<N.length;j++)N[j](Q,U)})}},p.tryColorscale=function(q,W){var $=W?m.nestedProperty(q,W).get():q;if($){var R=$.color;if(($.colorscale||$._colorAx)&&m.isArrayOrTypedArray(R))return o.makeColorScaleFuncFromTrace($)}return m.identity};var A={start:1,end:-1,middle:0,bottom:1,top:-1};function I(q,W,$,R,N){var U=g.select(q.node().parentNode),Q=W.indexOf("top")!==-1?"top":W.indexOf("bottom")!==-1?"bottom":"middle",j=W.indexOf("left")!==-1?"end":W.indexOf("right")!==-1?"start":"middle",X=R?R/.8+1:0,J=(d.lineCount(q)-1)*i+1,re=A[j]*X,ne=.75*$+A[Q]*X+(A[Q]-1)*J*$/2;q.attr("text-anchor",j),N||U.attr("transform",r(re,ne))}function P(q,W){var $=q.ts||W.textfont.size;return v($)&&$>0?$:0}p.textPointStyle=function(q,W,$){if(q.size()){var R;if(W.selectedpoints){var N=p.makeSelectedTextStyleFns(W);R=N.selectedTextColorFn}var U=W.texttemplate,Q=$._fullLayout;q.each(function(j){var X=g.select(this),J=U?m.extractOption(j,W,"txt","texttemplate"):m.extractOption(j,W,"tx","text");if(J||J===0){if(U){var re=W._module.formatLabels,ne=re?re(j,W,Q):{},se={};h(se,W,j.i);var oe=W._meta||{};J=m.texttemplateString(J,ne,Q._d3locale,se,j,oe)}var pe=j.tp||W.textposition,ce=P(j,W),de=R?R(j):j.tc||W.textfont.color;X.call(p.font,j.tf||W.textfont.family,ce,de).text(J).call(d.convertToTspans,$).call(I,pe,ce,j.mrc)}else X.remove()})}},p.selectedTextStyle=function(q,W){if(q.size()&&W.selectedpoints){var $=p.makeSelectedTextStyleFns(W);q.each(function(R){var N=g.select(this),U=$.selectedTextColorFn(R),Q=R.tp||W.textposition,j=P(R,W);t.fill(N,U);var X=n.traceIs(W,"bar-like");I(N,Q,j,R.mrc2||R.mrc,X)})}};function S(q,W,$,R){var N=q[0]-W[0],U=q[1]-W[1],Q=$[0]-W[0],j=$[1]-W[1],X=Math.pow(N*N+U*U,.25),J=Math.pow(Q*Q+j*j,.25),re=(J*J*N-X*X*Q)*R,ne=(J*J*U-X*X*j)*R,se=3*J*(X+J),oe=3*X*(X+J);return[[g.round(W[0]+(se&&re/se),2),g.round(W[1]+(se&&ne/se),2)],[g.round(W[0]-(oe&&re/oe),2),g.round(W[1]-(oe&&ne/oe),2)]]}p.smoothopen=function(q,W){if(q.length<3)return"M"+q.join("L");var $,R="M"+q[0],N=[];for($=1;$<q.length-1;$++)N.push(S(q[$-1],q[$],q[$+1],W));for(R+="Q"+N[0][0]+" "+q[1],$=2;$<q.length-1;$++)R+="C"+N[$-2][1]+" "+N[$-1][0]+" "+q[$];return R+="Q"+N[q.length-3][1]+" "+q[q.length-1]},p.smoothclosed=function(q,W){if(q.length<3)return"M"+q.join("L")+"Z";var $,R="M"+q[0],N=q.length-1,U=[S(q[N],q[0],q[1],W)];for($=1;$<N;$++)U.push(S(q[$-1],q[$],q[$+1],W));for(U.push(S(q[N-1],q[N],q[0],W)),$=1;$<=N;$++)R+="C"+U[$-1][1]+" "+U[$][0]+" "+q[$];return R+="C"+U[N][1]+" "+U[0][0]+" "+q[0]+"Z"};var E={hv:function(q,W){return"H"+g.round(W[0],2)+"V"+g.round(W[1],2)},vh:function(q,W){return"V"+g.round(W[1],2)+"H"+g.round(W[0],2)},hvh:function(q,W){return"H"+g.round((q[0]+W[0])/2,2)+"V"+g.round(W[1],2)+"H"+g.round(W[0],2)},vhv:function(q,W){return"V"+g.round((q[1]+W[1])/2,2)+"H"+g.round(W[0],2)+"V"+g.round(W[1],2)}},D=function(q,W){return"L"+g.round(W[0],2)+","+g.round(W[1],2)};p.steps=function(q){var W=E[q]||D;return function($){for(var R="M"+g.round($[0][0],2)+","+g.round($[0][1],2),N=1;N<$.length;N++)R+=W($[N-1],$[N]);return R}},p.makeTester=function(){var q=m.ensureSingleById(g.select("body"),"svg","js-plotly-tester",function($){$.attr(c.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),W=m.ensureSingle(q,"path","js-reference-point",function($){$.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});p.tester=q,p.testref=W},p.savedBBoxes={};var F=0;function H(q){var W=q.getAttribute("data-unformatted");if(W!==null)return W+q.getAttribute("data-math")+q.getAttribute("text-anchor")+q.getAttribute("style")}function V(q,W){if(!q)return null;var $=W._context,R=$._exportedPlot?"":$._baseUrl||"";return R?"url('"+R+"#"+q+"')":"url(#"+q+")"}p.bBox=function(q,W,$){var R,N,U;if($||($=H(q)),$){if(R=p.savedBBoxes[$])return m.extendFlat({},R)}else if(q.childNodes.length===1){var Q=q.childNodes[0];if($=H(Q)){var j=+Q.getAttribute("x")||0,X=+Q.getAttribute("y")||0,J=Q.getAttribute("transform");if(!J){var re=p.bBox(Q,!1,$);return j&&(re.left+=j,re.right+=j),X&&(re.top+=X,re.bottom+=X),re}if($+="~"+j+"~"+X+"~"+J,R=p.savedBBoxes[$])return m.extendFlat({},R)}}W?N=q:(U=p.tester.node(),N=q.cloneNode(!0),U.appendChild(N)),g.select(N).attr("transform",null).call(
1213d.positionText,0,0);var ne=N.getBoundingClientRect(),se=p.testref.node().getBoundingClientRect();W||U.removeChild(N);var oe={height:ne.height,width:ne.width,left:ne.left-se.left,top:ne.top-se.top,right:ne.right-se.left,bottom:ne.bottom-se.top};return F>=1e4&&(p.savedBBoxes={},F=0),$&&(p.savedBBoxes[$]=oe),F++,m.extendFlat({},oe)},p.setClipUrl=function(q,W,$){q.attr("clip-path",V(W,$))},p.getTranslate=function(q){var W=(q[q.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function($,R,N){return[R,N].join(" ")}).split(" ");return{x:+W[0]||0,y:+W[1]||0}},p.setTranslate=function(q,W,$){var R=q.attr?"attr":"getAttribute",N=q.attr?"attr":"setAttribute",U=q[R]("transform")||"";return W=W||0,$=$||0,U=U.replace(/(\btranslate\(.*?\);?)/,"").trim(),U=(U+=r(W,$)).trim(),q[N]("transform",U),U},p.getScale=function(q){var W=(q[q.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function($,R,N){return[R,N].join(" ")}).split(" ");return{x:+W[0]||1,y:+W[1]||1}},p.setScale=function(q,W,$){var R=q.attr?"attr":"getAttribute",N=q.attr?"attr":"setAttribute",U=q[R]("transform")||"";return W=W||1,$=$||1,U=U.replace(/(\bscale\(.*?\);?)/,"").trim(),U=(U+="scale("+W+","+$+")").trim(),q[N]("transform",U),U};var Z=/\s*sc.*/;p.setPointGroupScale=function(q,W,$){if(W=W||1,$=$||1,q){var R=W===1&&$===1?"":"scale("+W+","+$+")";q.each(function(){var N=(this.getAttribute("transform")||"").replace(Z,"");N=(N+=R).trim(),this.setAttribute("transform",N)})}};var K=/translate\([^)]*\)\s*$/;p.setTextPointsScale=function(q,W,$){q&&q.each(function(){var R,N=g.select(this),U=N.select("text");if(U.node()){var Q=parseFloat(U.attr("x")||0),j=parseFloat(U.attr("y")||0),X=(N.attr("transform")||"").match(K);R=W===1&&$===1?[]:[r(Q,j),"scale("+W+","+$+")",r(-Q,-j)],X&&R.push(X),N.attr("transform",R.join(""))}})}},{"../../components/fx/helpers":402,"../../constants/alignment":471,"../../constants/interactions":478,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../lib/svg_text_utils":529,"../../registry":638,"../../traces/scatter/make_bubble_size_func":943,"../../traces/scatter/subtypes":951,"../color":366,"../colorscale":378,"./symbol_defs":389,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],389:[function(y,ee,te){var g=y("@plotly/d3");ee.exports={circle:{n:0,f:function(m){var b=g.round(m,2);return"M"+b+",0A"+b+","+b+" 0 1,1 0,-"+b+"A"+b+","+b+" 0 0,1 "+b+",0Z"}},square:{n:1,f:function(m){var b=g.round(m,2);return"M"+b+","+b+"H-"+b+"V-"+b+"H"+b+"Z"}},diamond:{n:2,f:function(m){var b=g.round(1.3*m,2);return"M"+b+",0L0,"+b+"L-"+b+",0L0,-"+b+"Z"}},cross:{n:3,f:function(m){var b=g.round(.4*m,2),v=g.round(1.2*m,2);return"M"+v+","+b+"H"+b+"V"+v+"H-"+b+"V"+b+"H-"+v+"V-"+b+"H-"+b+"V-"+v+"H"+b+"V-"+b+"H"+v+"Z"}},x:{n:4,f:function(m){var b=g.round(.8*m/Math.sqrt(2),2),v="l"+b+","+b,e="l"+b+",-"+b,n="l-"+b+",-"+b,t="l-"+b+","+b;return"M0,"+b+v+e+n+e+n+t+n+t+v+t+v+"Z"}},"triangle-up":{n:5,f:function(m){var b=g.round(2*m/Math.sqrt(3),2);return"M-"+b+","+g.round(m/2,2)+"H"+b+"L0,-"+g.round(m,2)+"Z"}},"triangle-down":{n:6,f:function(m){var b=g.round(2*m/Math.sqrt(3),2);return"M-"+b+",-"+g.round(m/2,2)+"H"+b+"L0,"+g.round(m,2)+"Z"}},"triangle-left":{n:7,f:function(m){var b=g.round(2*m/Math.sqrt(3),2);return"M"+g.round(m/2,2)+",-"+b+"V"+b+"L-"+g.round(m,2)+",0Z"}},"triangle-right":{n:8,f:function(m){var b=g.round(2*m/Math.sqrt(3),2);return"M-"+g.round(m/2,2)+",-"+b+"V"+b+"L"+g.round(m,2)+",0Z"}},"triangle-ne":{n:9,f:function(m){var b=g.round(.6*m,2),v=g.round(1.2*m,2);return"M-"+v+",-"+b+"H"+b+"V"+v+"Z"}},"triangle-se":{n:10,f:function(m){var b=g.round(.6*m,2),v=g.round(1.2*m,2);return"M"+b+",-"+v+"V"+b+"H-"+v+"Z"}},"triangle-sw":{n:11,f:function(m){var b=g.round(.6*m,2),v=g.round(1.2*m,2);return"M"+v+","+b+"H-"+b+"V-"+v+"Z"}},"triangle-nw":{n:12,f:function(m){var b=g.round(.6*m,2),v=g.round(1.2*m,2);return"M-"+b+","+v+"V-"+b+"H"+v+"Z"}},pentagon:{n:13,f:function(m){var b=g.round(.951*m,2),v=g.round(.588*m,2),e=g.round(-m,2),n=g.round(-.309*m,2);return"M"+b+","+n+"L"+v+","+g.round(.809*m,2)+"H-"+v+"L-"+b+","+n+"L0,"+e+"Z"}},hexagon:{n:14,f:function(m){var b=g.round(m,2),v=g.round(m/2,2),e=g.round(m*Math.sqrt(3)/2,2);return"M"+e+",-"+v+"V"+v+"L0,"+b+"L-"+e+","+v+"V-"+v+"L0,-"+b+"Z"}},hexagon2:{n:15,f:function(m){var b=g.round(m,2),v=g.round(m/2,2),e=g.round(m*Math.sqrt(3)/2,2);return"M-"+v+","+e+"H"+v+"L"+b+",0L"+v+",-"+e+"H-"+v+"L-"+b+",0Z"}},octagon:{n:16,f:function(m){var b=g.round(.924*m,2),v=g.round(.383*m,2);return"M-"+v+",-"+b+"H"+v+"L"+b+",-"+v+"V"+v+"L"+v+","+b+"H-"+v+"L-"+b+","+v+"V-"+v+"Z"}},star:{n:17,f:function(m){var b=1.4*m,v=g.round(.225*b,2),e=g.round(.951*b,2),n=g.round(.363*b,2),t=g.round(.588*b,2),o=g.round(-b,2),r=g.round(-.309*b,2),d=g.round(.118*b,2),c=g.round(.809*b,2);return"M"+v+","+r+"H"+e+"L"+n+","+d+"L"+t+","+c+"L0,"+g.round(.382*b,2)+"L-"+t+","+c+"L-"+n+","+d+"L-"+e+","+r+"H-"+v+"L0,"+o+"Z"}},hexagram:{n:18,f:function(m){var b=g.round(.66*m,2),v=g.round(.38*m,2),e=g.round(.76*m,2);return"M-"+e+",0l-"+v+",-"+b+"h"+e+"l"+v+",-"+b+"l"+v+","+b+"h"+e+"l-"+v+","+b+"l"+v+","+b+"h-"+e+"l-"+v+","+b+"l-"+v+",-"+b+"h-"+e+"Z"}},"star-triangle-up":{n:19,f:function(m){var b=g.round(m*Math.sqrt(3)*.8,2),v=g.round(.8*m,2),e=g.round(1.6*m,2),n=g.round(4*m,2),t="A "+n+","+n+" 0 0 1 ";return"M-"+b+","+v+t+b+","+v+t+"0,-"+e+t+"-"+b+","+v+"Z"}},"star-triangle-down":{n:20,f:function(m){var b=g.round(m*Math.sqrt(3)*.8,2),v=g.round(.8*m,2),e=g.round(1.6*m,2),n=g.round(4*m,2),t="A "+n+","+n+" 0 0 1 ";return"M"+b+",-"+v+t+"-"+b+",-"+v+t+"0,"+e+t+b+",-"+v+"Z"}},"star-square":{n:21,f:function(m){var b=g.round(1.1*m,2),v=g.round(2*m,2),e="A "+v+","+v+" 0 0 1 ";return"M-"+b+",-"+b+e+"-"+b+","+b+e+b+","+b+e+b+",-"+b+e+"-"+b+",-"+b+"Z"}},"star-diamond":{n:22,f:function(m){var b=g.round(1.4*m,2),v=g.round(1.9*m,2),e="A "+v+","+v+" 0 0 1 ";return"M-"+b+",0"+e+"0,"+b+e+b+",0"+e+"0,-"+b+e+"-"+b+",0Z"}},"diamond-tall":{n:23,f:function(m){var b=g.round(.7*m,2),v=g.round(1.4*m,2);return"M0,"+v+"L"+b+",0L0,-"+v+"L-"+b+",0Z"}},"diamond-wide":{n:24,f:function(m){var b=g.round(1.4*m,2),v=g.round(.7*m,2);return"M0,"+v+"L"+b+",0L0,-"+v+"L-"+b+",0Z"}},hourglass:{n:25,f:function(m){var b=g.round(m,2);return"M"+b+","+b+"H-"+b+"L"+b+",-"+b+"H-"+b+"Z"},noDot:!0},bowtie:{n:26,f:function(m){var b=g.round(m,2);return"M"+b+","+b+"V-"+b+"L-"+b+","+b+"V-"+b+"Z"},noDot:!0},"circle-cross":{n:27,f:function(m){var b=g.round(m,2);return"M0,"+b+"V-"+b+"M"+b+",0H-"+b+"M"+b+",0A"+b+","+b+" 0 1,1 0,-"+b+"A"+b+","+b+" 0 0,1 "+b+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(m){var b=g.round(m,2),v=g.round(m/Math.sqrt(2),2);return"M"+v+","+v+"L-"+v+",-"+v+"M"+v+",-"+v+"L-"+v+","+v+"M"+b+",0A"+b+","+b+" 0 1,1 0,-"+b+"A"+b+","+b+" 0 0,1 "+b+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(m){var b=g.round(m,2);return"M0,"+b+"V-"+b+"M"+b+",0H-"+b+"M"+b+","+b+"H-"+b+"V-"+b+"H"+b+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(m){var b=g.round(m,2);return"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+b+","+b+"H-"+b+"V-"+b+"H"+b+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(m){var b=g.round(1.3*m,2);
1213return"M"+b+",0L0,"+b+"L-"+b+",0L0,-"+b+"ZM0,-"+b+"V"+b+"M-"+b+",0H"+b},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(m){var b=g.round(1.3*m,2),v=g.round(.65*m,2);return"M"+b+",0L0,"+b+"L-"+b+",0L0,-"+b+"ZM-"+v+",-"+v+"L"+v+","+v+"M-"+v+","+v+"L"+v+",-"+v},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(m){var b=g.round(1.4*m,2);return"M0,"+b+"V-"+b+"M"+b+",0H-"+b},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(m){var b=g.round(m,2);return"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(m){var b=g.round(1.2*m,2),v=g.round(.85*m,2);return"M0,"+b+"V-"+b+"M"+b+",0H-"+b+"M"+v+","+v+"L-"+v+",-"+v+"M"+v+",-"+v+"L-"+v+","+v},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(m){var b=g.round(m/2,2),v=g.round(m,2);return"M"+b+","+v+"V-"+v+"m-"+v+",0V"+v+"M"+v+","+b+"H-"+v+"m0,-"+v+"H"+v},needLine:!0,noFill:!0},"y-up":{n:37,f:function(m){var b=g.round(1.2*m,2),v=g.round(1.6*m,2),e=g.round(.8*m,2);return"M-"+b+","+e+"L0,0M"+b+","+e+"L0,0M0,-"+v+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(m){var b=g.round(1.2*m,2),v=g.round(1.6*m,2),e=g.round(.8*m,2);return"M-"+b+",-"+e+"L0,0M"+b+",-"+e+"L0,0M0,"+v+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(m){var b=g.round(1.2*m,2),v=g.round(1.6*m,2),e=g.round(.8*m,2);return"M"+e+","+b+"L0,0M"+e+",-"+b+"L0,0M-"+v+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(m){var b=g.round(1.2*m,2),v=g.round(1.6*m,2),e=g.round(.8*m,2);return"M-"+e+","+b+"L0,0M-"+e+",-"+b+"L0,0M"+v+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(m){var b=g.round(1.4*m,2);return"M"+b+",0H-"+b},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(m){var b=g.round(1.4*m,2);return"M0,"+b+"V-"+b},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(m){var b=g.round(m,2);return"M"+b+",-"+b+"L-"+b+","+b},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(m){var b=g.round(m,2);return"M"+b+","+b+"L-"+b+",-"+b},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(m){var b=g.round(m,2);return"M0,0L-"+b+","+g.round(2*m,2)+"H"+b+"Z"},noDot:!0},"arrow-down":{n:46,f:function(m){var b=g.round(m,2);return"M0,0L-"+b+",-"+g.round(2*m,2)+"H"+b+"Z"},noDot:!0},"arrow-left":{n:47,f:function(m){var b=g.round(2*m,2),v=g.round(m,2);return"M0,0L"+b+",-"+v+"V"+v+"Z"},noDot:!0},"arrow-right":{n:48,f:function(m){var b=g.round(2*m,2),v=g.round(m,2);return"M0,0L-"+b+",-"+v+"V"+v+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(m){var b=g.round(m,2);return"M-"+b+",0H"+b+"M0,0L-"+b+","+g.round(2*m,2)+"H"+b+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(m){var b=g.round(m,2);return"M-"+b+",0H"+b+"M0,0L-"+b+",-"+g.round(2*m,2)+"H"+b+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(m){var b=g.round(2*m,2),v=g.round(m,2);return"M0,-"+v+"V"+v+"M0,0L"+b+",-"+v+"V"+v+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(m){var b=g.round(2*m,2),v=g.round(m,2);return"M0,-"+v+"V"+v+"M0,0L-"+b+",-"+v+"V"+v+"Z"},needLine:!0,noDot:!0}}},{"@plotly/d3":58}],390:[function(y,ee,te){ee.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"}}}},{}],391:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../registry"),b=y("../../plots/cartesian/axes"),v=y("../../lib"),e=y("./compute_error");function n(t,o,r,d){var c=o["error_"+d]||{},i=[];if(c.visible&&["linear","log"].indexOf(r.type)!==-1){for(var u=e(c),f=0;f<t.length;f++){var s=t[f],h=s.i;if(h===void 0)h=f;else if(h===null)continue;var p=s[d];if(g(r.c2l(p))){var a=u(p,h);if(g(a[0])&&g(a[1])){var x=s[d+"s"]=p-a[0],l=s[d+"h"]=p+a[1];i.push(x,l)}}}var w=r._id,_=o._extremes[w],T=b.findExtremes(r,i,v.extendFlat({tozero:_.opts.tozero},{padded:!0}));_.min=_.min.concat(T.min),_.max=_.max.concat(T.max)}}ee.exports=function(t){for(var o=t.calcdata,r=0;r<o.length;r++){var d=o[r],c=d[0].trace;if(c.visible===!0&&m.traceIs(c,"errorBarsOK")){var i=b.getFromId(t,c.xaxis),u=b.getFromId(t,c.yaxis);n(d,c,i,"x"),n(d,c,u,"y")}}}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./compute_error":392,"fast-isnumeric":190}],392:[function(y,ee,te){function g(m,b){return m==="percent"?function(v){return Math.abs(v*b/100)}:m==="constant"?function(){return Math.abs(b)}:m==="sqrt"?function(v){return Math.sqrt(Math.abs(v))}:void 0}ee.exports=function(m){var b=m.type,v=m.symmetric;if(b==="data"){var e=m.array||[];if(v)return function(r,d){var c=+e[d];return[c,c]};var n=m.arrayminus||[];return function(r,d){var c=+e[d],i=+n[d];return isNaN(c)&&isNaN(i)?[NaN,NaN]:[i||0,c||0]}}var t=g(b,m.value),o=g(b,m.valueminus);return v||m.valueminus===void 0?function(r){var d=t(r);return[d,d]}:function(r){return[o(r),t(r)]}}},{}],393:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../registry"),b=y("../../lib"),v=y("../../plot_api/plot_template"),e=y("./attributes");ee.exports=function(n,t,o,r){var d="error_"+r.axis,c=v.newContainer(t,d),i=n[d]||{};function u(p,a){return b.coerce(i,c,e,p,a)}if(u("visible",i.array!==void 0||i.value!==void 0||i.type==="sqrt")!==!1){var f=u("type","array"in i?"data":"percent"),s=!0;f!=="sqrt"&&(s=u("symmetric",!((f==="data"?"arrayminus":"valueminus")in i))),f==="data"?(u("array"),u("traceref"),s||(u("arrayminus"),u("tracerefminus"))):f!=="percent"&&f!=="constant"||(u("value"),s||u("valueminus"));var h="copy_"+r.inherit+"style";r.inherit&&(t["error_"+r.inherit]||{}).visible&&u(h,!(i.color||g(i.thickness)||g(i.width))),r.inherit&&c[h]||(u("color",o),u("thickness"),u("width",m.traceIs(t,"gl3d")?0:4))}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../registry":638,"./attributes":390,"fast-isnumeric":190}],394:[function(y,ee,te){var g=y("../../lib"),m=y("../../plot_api/edit_types").overrideAll,b=y("./attributes"),v={error_x:g.extendFlat({},b),error_y:g.extendFlat({},b)};delete v.error_x.copy_zstyle,delete v.error_y.copy_zstyle,delete v.error_y.copy_ystyle;var e={error_x:g.extendFlat({},b),error_y:g.extendFlat({},b),error_z:g.extendFlat({},b)};delete e.error_x.copy_ystyle,delete e.error_y.copy_ystyle,delete e.error_z.copy_ystyle,delete e.error_z.copy_zstyle,ee.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:v,bar:v,histogram:v,scatter3d:m(e,"calc","nested"),scattergl:m(v,"calc","nested")}},supplyDefaults:y("./defaults"),calc:y("./calc"),makeComputeError:y("./compute_error"),plot:y("./plot"),style:y("./style"),hoverInfo:function(n,t,o){(t.error_y||{}).visible&&(o.yerr=n.yh-n.y,t.error_y.symmetric||(o.yerrneg=n.y-n.ys)),(t.error_x||{}).visible&&(o.xerr=n.xh-n.x,t.error_x.symmetric||(o.xerrneg=n.x-n.xs))}}},{"../../lib":503,"../../plot_api/edit_types":536,"./attributes":390,"./calc":391,"./compute_error":392,"./defaults":393,"./plot":395,"./style":396}],395:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("../drawing"),v=y("../../traces/scatter/subtypes");
1213ee.exports=function(e,n,t,o){var r=t.xaxis,d=t.yaxis,c=o&&o.duration>0;n.each(function(i){var u,f=i[0].trace,s=f.error_x||{},h=f.error_y||{};f.ids&&(u=function(l){return l.id});var p=v.hasMarkers(f)&&f.marker.maxdisplayed>0;h.visible||s.visible||(i=[]);var a=g.select(this).selectAll("g.errorbar").data(i,u);if(a.exit().remove(),i.length){s.visible||a.selectAll("path.xerror").remove(),h.visible||a.selectAll("path.yerror").remove(),a.style("opacity",1);var x=a.enter().append("g").classed("errorbar",!0);c&&x.style("opacity",0).transition().duration(o.duration).style("opacity",1),b.setClipUrl(a,t.layerClipId,e),a.each(function(l){var w=g.select(this),_=function(P,S,E){var D={x:S.c2p(P.x),y:E.c2p(P.y)};return P.yh!==void 0&&(D.yh=E.c2p(P.yh),D.ys=E.c2p(P.ys),m(D.ys)||(D.noYS=!0,D.ys=E.c2p(P.ys,!0))),P.xh!==void 0&&(D.xh=S.c2p(P.xh),D.xs=S.c2p(P.xs),m(D.xs)||(D.noXS=!0,D.xs=S.c2p(P.xs,!0))),D}(l,r,d);if(!p||l.vis){var T,k=w.select("path.yerror");if(h.visible&&m(_.x)&&m(_.yh)&&m(_.ys)){var L=h.width;T="M"+(_.x-L)+","+_.yh+"h"+2*L+"m-"+L+",0V"+_.ys,_.noYS||(T+="m-"+L+",0h"+2*L),k.size()?c&&(k=k.transition().duration(o.duration).ease(o.easing)):k=w.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),k.attr("d",T)}else k.remove();var A=w.select("path.xerror");if(s.visible&&m(_.y)&&m(_.xh)&&m(_.xs)){var I=(s.copy_ystyle?h:s).width;T="M"+_.xh+","+(_.y-I)+"v"+2*I+"m0,-"+I+"H"+_.xs,_.noXS||(T+="m0,-"+I+"v"+2*I),A.size()?c&&(A=A.transition().duration(o.duration).ease(o.easing)):A=w.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),A.attr("d",T)}else A.remove()}})}})}},{"../../traces/scatter/subtypes":951,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],396:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../color");ee.exports=function(b){b.each(function(v){var e=v[0].trace,n=e.error_y||{},t=e.error_x||{},o=g.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(m.stroke,n.color),t.copy_ystyle&&(t=n),o.selectAll("path.xerror").style("stroke-width",t.thickness+"px").call(m.stroke,t.color)})}},{"../color":366,"@plotly/d3":58}],397:[function(y,ee,te){var g=y("../../plots/font_attributes"),m=y("./layout_attributes").hoverlabel,b=y("../../lib/extend").extendFlat;ee.exports={hoverlabel:{bgcolor:b({},m.bgcolor,{arrayOk:!0}),bordercolor:b({},m.bordercolor,{arrayOk:!0}),font:g({arrayOk:!0,editType:"none"}),align:b({},m.align,{arrayOk:!0}),namelength:b({},m.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":493,"../../plots/font_attributes":585,"./layout_attributes":407}],398:[function(y,ee,te){var g=y("../../lib"),m=y("../../registry");function b(v,e,n,t){t=t||g.identity,Array.isArray(v)&&(e[0][n]=t(v))}ee.exports=function(v){var e=v.calcdata,n=v._fullLayout;function t(i){return function(u){return g.coerceHoverinfo({hoverinfo:u},{_module:i._module},n)}}for(var o=0;o<e.length;o++){var r=e[o],d=r[0].trace;if(!m.traceIs(d,"pie-like")){var c=m.traceIs(d,"2dMap")?b:g.fillArray;c(d.hoverinfo,r,"hi",t(d)),d.hovertemplate&&c(d.hovertemplate,r,"ht"),d.hoverlabel&&(c(d.hoverlabel.bgcolor,r,"hbg"),c(d.hoverlabel.bordercolor,r,"hbc"),c(d.hoverlabel.font.size,r,"hts"),c(d.hoverlabel.font.color,r,"htc"),c(d.hoverlabel.font.family,r,"htf"),c(d.hoverlabel.namelength,r,"hnl"),c(d.hoverlabel.align,r,"hta"))}}}},{"../../lib":503,"../../registry":638}],399:[function(y,ee,te){var g=y("../../registry"),m=y("./hover").hover;ee.exports=function(b,v,e){var n=g.getComponentMethod("annotations","onClick")(b,b._hoverdata);function t(){b.emit("plotly_click",{points:b._hoverdata,event:v})}e!==void 0&&m(b,v,e,!0),b._hoverdata&&v&&v.target&&(n&&n.then?n.then(t):t(),v.stopImmediatePropagation&&v.stopImmediatePropagation())}},{"../../registry":638,"./hover":403}],400:[function(y,ee,te){ee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},{}],401:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("./hoverlabel_defaults");ee.exports=function(v,e,n,t){var o=g.extendFlat({},t.hoverlabel);e.hovertemplate&&(o.namelength=-1),b(v,e,function(r,d){return g.coerce(v,e,m,r,d)},o)}},{"../../lib":503,"./attributes":397,"./hoverlabel_defaults":404}],402:[function(y,ee,te){var g=y("../../lib");te.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},te.isTraceInSubplots=function(t,o){if(t.type==="splom"){for(var r=t.xa
1213xes||[],d=t.yaxes||[],c=0;c<r.length;c++)for(var i=0;i<d.length;i++)if(o.indexOf(r[c]+d[i])!==-1)return!0;return!1}return o.indexOf(te.getSubplot(t))!==-1},te.flat=function(t,o){for(var r=new Array(t.length),d=0;d<t.length;d++)r[d]=o;return r},te.p2c=function(t,o){for(var r=new Array(t.length),d=0;d<t.length;d++)r[d]=t[d].p2c(o);return r},te.getDistanceFunction=function(t,o,r,d){return t==="closest"?d||te.quadrature(o,r):t.charAt(0)==="x"?o:r},te.getClosest=function(t,o,r){if(r.index!==!1)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var d=0;d<t.length;d++){var c=o(t[d]);c<=r.distance&&(r.index=d,r.distance=c)}return r},te.inbox=function(t,o,r){return t*o<0||t===0?r:1/0},te.quadrature=function(t,o){return function(r){var d=t(r),c=o(r);return Math.sqrt(d*d+c*c)}},te.makeEventData=function(t,o,r){var d="index"in t?t.index:t.pointNumber,c={data:o._input,fullData:o,curveNumber:o.index,pointNumber:d};if(o._indexToPoints){var i=o._indexToPoints[d];i.length===1?c.pointIndex=i[0]:c.pointIndices=i}else c.pointIndex=d;return o._module.eventData?c=o._module.eventData(c,t,o,r,d):("xVal"in t?c.x=t.xVal:"x"in t&&(c.x=t.x),"yVal"in t?c.y=t.yVal:"y"in t&&(c.y=t.y),t.xa&&(c.xaxis=t.xa),t.ya&&(c.yaxis=t.ya),t.zLabelVal!==void 0&&(c.z=t.zLabelVal)),te.appendArrayPointValue(c,o,d),c},te.appendArrayPointValue=function(t,o,r){var d=o._arrayAttrs;if(d)for(var c=0;c<d.length;c++){var i=d[c],u=b(i);if(t[u]===void 0){var f=v(g.nestedProperty(o,i).get(),r);f!==void 0&&(t[u]=f)}}},te.appendArrayMultiPointValues=function(t,o,r){var d=o._arrayAttrs;if(d)for(var c=0;c<d.length;c++){var i=d[c],u=b(i);if(t[u]===void 0){for(var f=g.nestedProperty(o,i).get(),s=new Array(r.length),h=0;h<r.length;h++)s[h]=v(f,r[h]);t[u]=s}}};var m={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function b(t){return m[t]||t}function v(t,o){return Array.isArray(o)?Array.isArray(t)&&Array.isArray(t[o[0]])?t[o[0]][o[1]]:void 0:t[o]}var e={x:!0,y:!0},n={"x unified":!0,"y unified":!0};te.isUnifiedHover=function(t){return typeof t=="string"&&!!n[t]},te.isXYhover=function(t){return typeof t=="string"&&!!e[t]}},{"../../lib":503}],403:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("tinycolor2"),v=y("../../lib"),e=v.strTranslate,n=v.strRotate,t=y("../../lib/events"),o=y("../../lib/svg_text_utils"),r=y("../../lib/override_cursor"),d=y("../drawing"),c=y("../color"),i=y("../dragelement"),u=y("../../plots/cartesian/axes"),f=y("../../registry"),s=y("./helpers"),h=y("./constants"),p=y("../legend/defaults"),a=y("../legend/draw"),x=h.YANGLE,l=Math.PI*x/180,w=1/Math.sin(l),_=Math.cos(l),T=Math.sin(l),k=h.HOVERARROWSIZE,L=h.HOVERTEXTPAD,A={box:!0,ohlc:!0,violin:!0,candlestick:!0},I={scatter:!0,scattergl:!0,splom:!0};function P(N){return[N.trace.index,N.index,N.x0,N.y0,N.name,N.attr,N.xa?N.xa._id:"",N.ya?N.ya._id:""].join(",")}te.hover=function(N,U,Q,j){N=v.getGraphDiv(N);var X=U.target;v.throttle(N._fullLayout._uid+h.HOVERID,h.HOVERMINTIME,function(){(function(J,re,ne,se,oe){ne||(ne="xy");var pe=Array.isArray(ne)?ne:[ne],ce=J._fullLayout,de=ce._plots||[],xe=de[ne],we=ce._has("cartesian");if(xe){var be=xe.overlays.map(function(en){return en.id});pe=pe.concat(be)}for(var Ee=pe.length,fe=new Array(Ee),me=new Array(Ee),Te=!1,_e=0;_e<Ee;_e++){var Ae=pe[_e];if(de[Ae])Te=!0,fe[_e]=de[Ae].xaxis,me[_e]=de[Ae].yaxis;else{if(!ce[Ae]||!ce[Ae]._subplot)return void v.warn("Unrecognized subplot: "+Ae);var Pe=ce[Ae]._subplot;fe[_e]=Pe.xaxis,me[_e]=Pe.yaxis}}var De=re.hovermode||ce.hovermode;if(De&&!Te&&(De="closest"),["x","y","closest","x unified","y unified"].indexOf(De)===-1||!J.calcdata||J.querySelector(".zoombox")||J._dragging)return i.unhoverRaw(J,re);var Ve=ce.hoverdistance;Ve===-1&&(Ve=1/0);var Qe=ce.spikedistance;Qe===-1&&(Qe=1/0);var Oe,Ue,Ge,Ye,tt,lt,vt,It,St,rt,et,Tt,Vt,Kt=[],Be=[],qe={hLinePoint:null,vLinePoint:null},Re=!1;if(Array.isArray(re))for(De="array",Ge=0;Ge<re.length;Ge++)(tt=J.calcdata[re[Ge].curveNumber||0])&&(lt=tt[0].trace,tt[0].trace.hoverinfo!=="skip"&&(Be.push(tt),lt.orientation==="h"&&(Re=!0)));else{for(Ye=0;Ye<J.calcdata.length;Ye++)tt=J.calcdata[Ye],(lt=tt[0].trace).hoverinfo!=="skip"&&s.isTraceInSubplots(lt,pe)&&(Be.push(tt),lt.orientation==="h"&&(Re=!0));var Xe,ke;if(!oe)Xe="xpx"in re?re.xpx:fe[0]._length/2,ke="ypx"in re?re.ypx:me[0]._length/2;else{if(t.triggerHandler(J,"plotly_beforehover",re)===!1)return;var Le=oe.getBoundingClientRect();Xe=re.clientX-Le.left,ke=re.clientY-Le.top,ce._calcInverseTransform(J);var Ie=v.apply3DTransform(ce._invTransform)(Xe,ke);
1213if(Xe=Ie[0],ke=Ie[1],Xe<0||Xe>fe[0]._length||ke<0||ke>me[0]._length)return i.unhoverRaw(J,re)}if(re.pointerX=Xe+fe[0]._offset,re.pointerY=ke+me[0]._offset,Oe="xval"in re?s.flat(pe,re.xval):s.p2c(fe,Xe),Ue="yval"in re?s.flat(pe,re.yval):s.p2c(me,ke),!m(Oe[0])||!m(Ue[0]))return v.warn("Fx.hover failed",re,J),i.unhoverRaw(J,re)}var Ce=1/0;function Je(en,Qr){for(Ye=0;Ye<Be.length;Ye++)if((tt=Be[Ye])&&tt[0]&&tt[0].trace&&(lt=tt[0].trace).visible===!0&&lt._length!==0&&["carpet","contourcarpet"].indexOf(lt._module.name)===-1){if(lt.type==="splom"?vt=pe[It=0]:(vt=s.getSubplot(lt),It=pe.indexOf(vt)),St=De,s.isUnifiedHover(St)&&(St=St.charAt(0)),Tt={cd:tt,trace:lt,xa:fe[It],ya:me[It],maxHoverDistance:Ve,maxSpikeDistance:Qe,index:!1,distance:Math.min(Ce,Ve),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:c.defaultLine,name:lt.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},ce[vt]&&(Tt.subplot=ce[vt]._subplot),ce._splomScenes&&ce._splomScenes[lt.uid]&&(Tt.scene=ce._splomScenes[lt.uid]),Vt=Kt.length,St==="array"){var yn=re[Ye];"pointNumber"in yn?(Tt.index=yn.pointNumber,St="closest"):(St="","xval"in yn&&(rt=yn.xval,St="x"),"yval"in yn&&(et=yn.yval,St=St?"closest":"y"))}else en!==void 0&&Qr!==void 0?(rt=en,et=Qr):(rt=Oe[It],et=Ue[It]);if(Ve!==0)if(lt._module&&lt._module.hoverPoints){var un=lt._module.hoverPoints(Tt,rt,et,St,{finiteRange:!0,hoverLayer:ce._hoverlayer});if(un)for(var $r,In=0;In<un.length;In++)$r=un[In],m($r.x0)&&m($r.y0)&&Kt.push(H($r,De))}else v.log("Unrecognized trace type in hover:",lt);if(De==="closest"&&Kt.length>Vt&&(Kt.splice(0,Vt),Ce=Kt[0].distance),we&&Qe!==0&&Kt.length===0){Tt.distance=Qe,Tt.index=!1;var Qt=lt._module.hoverPoints(Tt,rt,et,"closest",{hoverLayer:ce._hoverlayer});if(Qt&&(Qt=Qt.filter(function(Ur){return Ur.spikeDistance<=Qe})),Qt&&Qt.length){var Pt,Yt=Qt.filter(function(Ur){return Ur.xa.showspikes&&Ur.xa.spikesnap!=="hovered data"});if(Yt.length){var cr=Yt[0];m(cr.x0)&&m(cr.y0)&&(Pt=ht(cr),(!qe.vLinePoint||qe.vLinePoint.spikeDistance>Pt.spikeDistance)&&(qe.vLinePoint=Pt))}var wr=Qt.filter(function(Ur){return Ur.ya.showspikes&&Ur.ya.spikesnap!=="hovered data"});if(wr.length){var qr=wr[0];m(qr.x0)&&m(qr.y0)&&(Pt=ht(qr),(!qe.hLinePoint||qe.hLinePoint.spikeDistance>Pt.spikeDistance)&&(qe.hLinePoint=Pt))}}}}}function it(en,Qr,yn){for(var un,$r=null,In=1/0,Qt=0;Qt<en.length;Qt++)un=en[Qt].spikeDistance,yn&&Qt===0&&(un=-1/0),un<=In&&un<=Qr&&($r=en[Qt],In=un);return $r}function ht(en){return en?{xa:en.xa,ya:en.ya,x:en.xSpike!==void 0?en.xSpike:(en.x0+en.x1)/2,y:en.ySpike!==void 0?en.ySpike:(en.y0+en.y1)/2,distance:en.distance,spikeDistance:en.spikeDistance,curveNumber:en.trace.index,color:en.color,pointNumber:en.index}:null}Je();var ut={fullLayout:ce,container:ce._hoverlayer,event:re};J._spikepoints;var kt={vLinePoint:qe.vLinePoint,hLinePoint:qe.hLinePoint};J._spikepoints=kt;var ot=function(){Kt.sort(function(en,Qr){return en.distance-Qr.distance}),Kt=function(en,Qr){for(var yn=Qr.charAt(0),un=[],$r=[],In=[],Qt=0;Qt<en.length;Qt++){var Pt=en[Qt];f.traceIs(Pt.trace,"bar-like")||f.traceIs(Pt.trace,"box-violin")?In.push(Pt):Pt.trace[yn+"period"]?$r.push(Pt):un.push(Pt)}return un.concat($r).concat(In)}(Kt,De)};ot();var Lt=De.charAt(0),Et=(Lt==="x"||Lt==="y")&&Kt[0]&&I[Kt[0].trace.type];if(we&&Qe!==0&&Kt.length!==0){var Ze=it(Kt.filter(function(en){return en.ya.showspikes}),Qe,Et);qe.hLinePoint=ht(Ze);var pt=it(Kt.filter(function(en){return en.xa.showspikes}),Qe,Et);qe.vLinePoint=ht(pt)}if(Kt.length===0){var Ct=i.unhoverRaw(J,re);return!we||qe.hLinePoint===null&&qe.vLinePoint===null||V(J,qe,ut),Ct}if(we&&Z()&&V(J,qe,ut),s.isXYhover(St)&&Kt[0].length!==0&&Kt[0].trace.type!=="splom"){var zt=Kt[0],Gt=(Kt=A[zt.trace.type]?Kt.filter(function(en){return en.trace.index===zt.trace.index}):[zt]).length,ze=q("x",zt,ce),st=q("y",zt,ce);Je(ze,st);var yt,Dt=[],jt={},or=0,Ut=function(en){var Qr=A[en.trace.type]?P(en):en.trace.index;if(jt[Qr]){var yn=jt[Qr]-1,un=Dt[yn];yn>0&&Math.abs(en.distance)<Math.abs(un.distance)&&(Dt[yn]=en)}else or++,jt[Qr]=or,Dt.push(en)};for(yt=0;yt<Gt;yt++)Ut(Kt[yt]);for(yt=Kt.length-1;yt>Gt-1;yt--)Ut(Kt[yt]);Kt=Dt,ot()}var Xt=J._hoverdata,sr=[],vr=W(J),pr=$(J);for(Ge=0;Ge<Kt.length;Ge++){var ar=Kt[Ge],lr=s.makeEventData(ar,ar.trace,ar.cd);if(ar.hovertemplate!==!1){var hr=!1;ar.cd[ar.index]&&ar.cd[ar.index].ht&&(hr=ar.cd[ar.index].ht),ar.hovertemplate=hr||ar.trace.hovertemplate||!1}
1213if(ar.xa&&ar.ya){var Or=ar.x0+ar.xa._offset,dr=ar.x1+ar.xa._offset,Fr=ar.y0+ar.ya._offset,tn=ar.y1+ar.ya._offset,rn=Math.min(Or,dr),An=Math.max(Or,dr),Ln=Math.min(Fr,tn),_n=Math.max(Fr,tn);lr.bbox={x0:rn+pr,x1:An+pr,y0:Ln+vr,y1:_n+vr}}ar.eventData=[lr],sr.push(lr)}J._hoverdata=sr;var Vr=De==="y"&&(Be.length>1||Kt.length>1)||De==="closest"&&Re&&Kt.length>1,Ir=c.combine(ce.plot_bgcolor||c.background,ce.paper_bgcolor),xr=E(Kt,{gd:J,hovermode:De,rotateLabels:Vr,bgColor:Ir,container:ce._hoverlayer,outerContainer:ce._paper.node(),commonLabelOpts:ce.hoverlabel,hoverdistance:ce.hoverdistance});if(s.isUnifiedHover(De)||(function(en,Qr,yn){var un,$r,In,Qt,Pt,Yt,cr,wr=0,qr=1,Ur=en.size(),br=new Array(Ur),_r=0;function Ar(zr){var Wr=zr[0],mn=zr[zr.length-1];if($r=Wr.pmin-Wr.pos-Wr.dp+Wr.size,In=mn.pos+mn.dp+mn.size-Wr.pmax,$r>.01){for(Pt=zr.length-1;Pt>=0;Pt--)zr[Pt].dp+=$r;un=!1}if(!(In<.01)){if($r<-.01){for(Pt=zr.length-1;Pt>=0;Pt--)zr[Pt].dp-=In;un=!1}if(un){var pn=0;for(Qt=0;Qt<zr.length;Qt++)(Yt=zr[Qt]).pos+Yt.dp+Yt.size>Wr.pmax&&pn++;for(Qt=zr.length-1;Qt>=0&&!(pn<=0);Qt--)(Yt=zr[Qt]).pos>Wr.pmax-1&&(Yt.del=!0,pn--);for(Qt=0;Qt<zr.length&&!(pn<=0);Qt++)if((Yt=zr[Qt]).pos<Wr.pmin+1)for(Yt.del=!0,pn--,In=2*Yt.size,Pt=zr.length-1;Pt>=0;Pt--)zr[Pt].dp-=In;for(Qt=zr.length-1;Qt>=0&&!(pn<=0);Qt--)(Yt=zr[Qt]).pos+Yt.dp+Yt.size>Wr.pmax&&(Yt.del=!0,pn--)}}}for(en.each(function(zr){var Wr=zr[Qr],mn=Wr._id.charAt(0)==="x",pn=Wr.range;_r===0&&pn&&pn[0]>pn[1]!==mn&&(qr=-1),br[_r++]=[{datum:zr,traceIndex:zr.trace.index,dp:0,pos:zr.pos,posref:zr.posref,size:zr.by*(mn?w:1)/2,pmin:0,pmax:mn?yn.width:yn.height}]}),br.sort(function(zr,Wr){return zr[0].posref-Wr[0].posref||qr*(Wr[0].traceIndex-zr[0].traceIndex)});!un&&wr<=Ur;){for(wr++,un=!0,Qt=0;Qt<br.length-1;){var Mr=br[Qt],Cr=br[Qt+1],Gr=Mr[Mr.length-1],cn=Cr[0];if(($r=Gr.pos+Gr.dp+Gr.size-cn.pos-cn.dp+cn.size)>.01&&Gr.pmin===cn.pmin&&Gr.pmax===cn.pmax){for(Pt=Cr.length-1;Pt>=0;Pt--)Cr[Pt].dp+=$r;for(Mr.push.apply(Mr,Cr),br.splice(Qt+1,1),cr=0,Pt=Mr.length-1;Pt>=0;Pt--)cr+=Mr[Pt].dp;for(In=cr/Mr.length,Pt=Mr.length-1;Pt>=0;Pt--)Mr[Pt].dp-=In;un=!1}else Qt++}br.forEach(Ar)}for(Qt=br.length-1;Qt>=0;Qt--){var wn=br[Qt];for(Pt=wn.length-1;Pt>=0;Pt--){var Kr=wn[Pt],bn=Kr.datum;bn.offset=Kr.dp,bn.del=Kr.del}}}(xr,Vr?"xa":"ya",ce),F(xr,Vr,ce._invScaleX,ce._invScaleY)),oe&&oe.tagName){var Nr=f.getComponentMethod("annotations","hasClickToShow")(J,sr);r(g.select(oe),Nr?"pointer":"")}!oe||se||!function(en,Qr,yn){if(!yn||yn.length!==en._hoverdata.length)return!0;for(var un=yn.length-1;un>=0;un--){var $r=yn[un],In=en._hoverdata[un];if($r.curveNumber!==In.curveNumber||String($r.pointNumber)!==String(In.pointNumber)||String($r.pointNumbers)!==String(In.pointNumbers))return!0}return!1}(J,0,Xt)||(Xt&&J.emit("plotly_unhover",{event:re,points:Xt}),J.emit("plotly_hover",{event:re,points:J._hoverdata,xaxes:fe,yaxes:me,xvals:Oe,yvals:Ue}))})(N,U,Q,j,X)})},te.loneHover=function(N,U){var Q=!0;Array.isArray(N)||(Q=!1,N=[N]);var j=U.gd,X=W(j),J=$(j),re=E(N.map(function(oe){var pe=oe._x0||oe.x0||oe.x||0,ce=oe._x1||oe.x1||oe.x||0,de=oe._y0||oe.y0||oe.y||0,xe=oe._y1||oe.y1||oe.y||0,we=oe.eventData;if(we){var be=Math.min(pe,ce),Ee=Math.max(pe,ce),fe=Math.min(de,xe),me=Math.max(de,xe),Te=oe.trace;if(f.traceIs(Te,"gl3d")){var _e=j._fullLayout[Te.scene]._scene.container,Ae=_e.offsetLeft,Pe=_e.offsetTop;be+=Ae,Ee+=Ae,fe+=Pe,me+=Pe}we.bbox={x0:be+J,x1:Ee+J,y0:fe+X,y1:me+X},U.inOut_bbox&&U.inOut_bbox.push(we.bbox)}else we=!1;return{color:oe.color||c.defaultLine,x0:oe.x0||oe.x||0,x1:oe.x1||oe.x||0,y0:oe.y0||oe.y||0,y1:oe.y1||oe.y||0,xLabel:oe.xLabel,yLabel:oe.yLabel,zLabel:oe.zLabel,text:oe.text,name:oe.name,idealAlign:oe.idealAlign,borderColor:oe.borderColor,fontFamily:oe.fontFamily,fontSize:oe.fontSize,fontColor:oe.fontColor,nameLength:oe.nameLength,textAlign:oe.textAlign,trace:oe.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:oe.hovertemplate||!1,hovertemplateLabels:oe.hovertemplateLabels||!1,eventData:we}}),{gd:j,hovermode:"closest",rotateLabels:!1,bgColor:U.bgColor||c.background,container:g.select(U.container),outerContainer:U.outerContainer||U.container}),ne=0,se=0;return re.sort(function(oe,pe){return oe.y0-pe.y0}).each(function(oe,pe){var ce=oe.y0-oe.by/2;oe.offset=ce-5<ne?ne-ce+5:0,ne=ce+oe.by+oe.offset,pe===U.anchorIndex&&(se=oe.offset)}).each(function(oe){oe.offset-=se}),F(re,!1,j._fullLayout._invScaleX,j._fullLayout._invScaleY),Q?re:re.node()};var S=/<extra>([\s\S]*)<\/extra>/;function E(N,U){var Q=U.gd,j=Q._fullLayout,X=U.hovermode,J=U.rotateLabels,re=U.bgColor,ne=U.container,se=U.outerContainer,oe=U.commonLabelOpts||{};if(N.length===0)return[[]];var pe=U.fontFamily||h.HOVERFONT,ce=U.fontSize||h.HOVERFONTSIZE,de=N[0],xe=de.xa,we=de.ya,be=X.charAt(0),Ee=de[be+"Label"],fe=R(Q,se),me=fe.top,Te=fe.width,_e=fe.height,Ae=Ee!==void 0&&de.distance<=U.hoverdistance&&(X==="x"||X==="y");if(Ae){var Pe,De,Ve=!0;for(Pe=0;Pe<N.length;Pe++)if(Ve&&N[Pe].zLabel===void 0&&(Ve=!1),De=N[Pe].hoverinfo||N[Pe].trace.hoverinfo){var Qe=Array.isArray(De)?De:De.split("+");if(Qe.indexOf("all")===-1&&Qe.indexOf(X)===-1){Ae=!1;break}}Ve&&(Ae=!1)}var Oe=ne.selectAll("g.axistext").data(Ae?[0]:[]);if(Oe.enter().append("g").classed("axistext",!0),Oe.exit().remove(),Oe.each(function(){var Ze=g.select(this),pt=v.ensureSingle(Ze,"path","",function(Fr){Fr.style({"stroke-width":"1px"})}),Ct=v.ensureSingle(Ze,"text","",function(Fr){Fr.attr("data-notex",1)}),zt=oe.bgcolor||c.defaultLine,Gt=oe.bordercolor||c.contrast(zt),ze=c.contrast(zt),st={family:oe.font.family||pe,size:oe.font.size||ce,color:oe.font.color||ze};pt.style({fill:zt,stroke:Gt}
1213),Ct.text(Ee).call(d.font,st).call(o.positionText,0,0).call(o.convertToTspans,Q),Ze.attr("transform","");var yt,Dt,jt=R(Q,Ct.node());if(X==="x"){var or=xe.side==="top"?"-":"";Ct.attr("text-anchor","middle").call(o.positionText,0,xe.side==="top"?me-jt.bottom-k-L:me-jt.top+k+L),yt=xe._offset+(de.x0+de.x1)/2,Dt=we._offset+(xe.side==="top"?0:we._length);var Ut=jt.width/2+L;yt<Ut?(yt=Ut,pt.attr("d","M-"+(Ut-k)+",0L-"+(Ut-2*k)+","+or+k+"H"+(L+jt.width/2)+"v"+or+(2*L+jt.height)+"H-"+Ut+"V"+or+k+"Z")):yt>j.width-Ut?(yt=j.width-Ut,pt.attr("d","M"+(Ut-k)+",0L"+Ut+","+or+k+"v"+or+(2*L+jt.height)+"H-"+Ut+"V"+or+k+"H"+(Ut-2*k)+"Z")):pt.attr("d","M0,0L"+k+","+or+k+"H"+(L+jt.width/2)+"v"+or+(2*L+jt.height)+"H-"+(L+jt.width/2)+"V"+or+k+"H-"+k+"Z")}else{var Xt,sr,vr;we.side==="right"?(Xt="start",sr=1,vr="",yt=xe._offset+xe._length):(Xt="end",sr=-1,vr="-",yt=xe._offset),Dt=we._offset+(de.y0+de.y1)/2,Ct.attr("text-anchor",Xt),pt.attr("d","M0,0L"+vr+k+","+k+"V"+(L+jt.height/2)+"h"+vr+(2*L+jt.width)+"V-"+(L+jt.height/2)+"H"+vr+k+"V-"+k+"Z");var pr,ar=jt.height/2,lr=me-jt.top-ar,hr="clip"+j._uid+"commonlabel"+we._id;if(yt<jt.width+2*L+k){pr="M-"+(k+L)+"-"+ar+"h-"+(jt.width-L)+"V"+ar+"h"+(jt.width-L)+"Z";var Or=jt.width-yt+L;o.positionText(Ct,Or,lr),Xt==="end"&&Ct.selectAll("tspan").each(function(){var Fr=g.select(this),tn=d.tester.append("text").text(Fr.text()).call(d.font,st),rn=R(Q,tn.node());Math.round(rn.width)<Math.round(jt.width)&&Fr.attr("x",Or-rn.width),tn.remove()})}else o.positionText(Ct,sr*(L+k),lr),pr=null;var dr=j._topclips.selectAll("#"+hr).data(pr?[0]:[]);dr.enter().append("clipPath").attr("id",hr).append("path"),dr.exit().remove(),dr.select("path").attr("d",pr),d.setClipUrl(Ct,pr?hr:null,Q)}Ze.attr("transform",e(yt,Dt))}),s.isUnifiedHover(X)){ne.selectAll("g.hovertext").remove();var Ue=N.filter(function(Ze){return Ze.hoverinfo!=="none"});if(Ue.length===0)return;var Ge=j.hoverlabel,Ye=Ge.font,tt={showlegend:!0,legend:{title:{text:Ee,font:Ye},font:Ye,bgcolor:Ge.bgcolor,bordercolor:Ge.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:j.legend?j.legend.traceorder:void 0,orientation:"v"}},lt={font:Ye};p(tt,lt,Q._fullData);var vt=lt.legend;vt.entries=[];for(var It=0;It<Ue.length;It++){var St=Ue[It];if(St.hoverinfo!=="none"){var rt=D(St,!0,X,j,Ee),et=rt[0],Tt=rt[1];St.name=Tt,St.text=Tt!==""?Tt+" : "+et:et;var Vt=St.cd[St.index];Vt&&(Vt.mc&&(St.mc=Vt.mc),Vt.mcc&&(St.mc=Vt.mcc),Vt.mlc&&(St.mlc=Vt.mlc),Vt.mlcc&&(St.mlc=Vt.mlcc),Vt.mlw&&(St.mlw=Vt.mlw),Vt.mrc&&(St.mrc=Vt.mrc),Vt.dir&&(St.dir=Vt.dir)),St._distinct=!0,vt.entries.push([St])}}vt.entries.sort(function(Ze,pt){return Ze[0].trace.index-pt[0].trace.index}),vt.layer=ne,vt._inHover=!0,vt._groupTitleFont=Ge.grouptitlefont,a(Q,vt);var Kt,Be,qe,Re,Xe=ne.select("g.legend"),ke=R(Q,Xe.node()),Le=ke.width+2*L,Ie=ke.height+2*L,Ce=Ue[0],Je=(Ce.x0+Ce.x1)/2,it=(Ce.y0+Ce.y1)/2,ht=!(f.traceIs(Ce.trace,"bar-like")||f.traceIs(Ce.trace,"box-violin"));be==="y"?ht?(Be=it-L,Kt=it+L):(Be=Math.min.apply(null,Ue.map(function(Ze){return Math.min(Ze.y0,Ze.y1)})),Kt=Math.max.apply(null,Ue.map(function(Ze){return Math.max(Ze.y0,Ze.y1)}))):Be=Kt=v.mean(Ue.map(function(Ze){return(Ze.y0+Ze.y1)/2}))-Ie/2,be==="x"?ht?(qe=Je+L,Re=Je-L):(qe=Math.max.apply(null,Ue.map(function(Ze){return Math.max(Ze.x0,Ze.x1)})),Re=Math.min.apply(null,Ue.map(function(Ze){return Math.min(Ze.x0,Ze.x1)}))):qe=Re=v.mean(Ue.map(function(Ze){return(Ze.x0+Ze.x1)/2}))-Le/2;var ut,kt,ot=xe._offset,Lt=we._offset;return Re+=ot-Le,Be+=Lt-Ie,ut=(qe+=ot)+Le<Te&&qe>=0?qe:Re+Le<Te&&Re>=0?Re:ot+Le<Te?ot:qe-Je<Je-Re+Le?Te-Le:0,ut+=L,kt=(Kt+=Lt)+Ie<_e&&Kt>=0?Kt:Be+Ie<_e&&Be>=0?Be:Lt+Ie<_e?Lt:Kt-it<it-Be+Ie?_e-Ie:0,kt+=L,Xe.attr("transform",e(ut-1,kt-1)),Xe}var Et=ne.selectAll("g.hovertext").data(N,function(Ze){return P(Ze)});return Et.enter().append("g").classed("hovertext",!0).each(function(){var Ze=g.select(this);Ze.append("rect").call(c.fill,c.addOpacity(re,.8)),Ze.append("text").classed("name",!0),Ze.append("path").style("stroke-width","1px"),Ze.append("text").classed("nums",!0).call(d.font,pe,ce)}),Et.exit().remove(),Et.each(function(Ze){var pt=g.select(this).attr("transform",""),Ct=Ze.color;Array.isArray(Ct)&&(Ct=Ct[Ze.eventData[0].pointNumber]);var zt=Ze.bgcolor||Ct,Gt=c.combine(c.opacity(zt)?zt:c.defaultLine,re),ze=c.combine(c.opacity(Ct)?Ct:c.defaultLine,re),st=Ze.borderColor||c.contrast(Gt),yt=D(Ze,Ae,X,j,Ee,pt),Dt=yt[0],jt=yt[1],or=pt.select("text.nums").call(
1213d.font,Ze.fontFamily||pe,Ze.fontSize||ce,Ze.fontColor||st).text(Dt).attr("data-notex",1).call(o.positionText,0,0).call(o.convertToTspans,Q),Ut=pt.select("text.name"),Xt=0,sr=0;if(jt&&jt!==Dt){Ut.call(d.font,Ze.fontFamily||pe,Ze.fontSize||ce,ze).text(jt).attr("data-notex",1).call(o.positionText,0,0).call(o.convertToTspans,Q);var vr=R(Q,Ut.node());Xt=vr.width+2*L,sr=vr.height+2*L}else Ut.remove(),pt.select("rect").remove();pt.select("path").style({fill:Gt,stroke:st});var pr=Ze.xa._offset+(Ze.x0+Ze.x1)/2,ar=Ze.ya._offset+(Ze.y0+Ze.y1)/2,lr=Math.abs(Ze.x1-Ze.x0),hr=Math.abs(Ze.y1-Ze.y0),Or=R(Q,or.node()),dr=Or.width/j._invScaleX,Fr=Or.height/j._invScaleY;Ze.ty0=(me-Or.top)/j._invScaleY,Ze.bx=dr+2*L,Ze.by=Math.max(Fr+2*L,sr),Ze.anchor="start",Ze.txwidth=dr,Ze.tx2width=Xt,Ze.offset=0;var tn,rn,An=(dr+k+L+Xt)*j._invScaleX;if(J)Ze.pos=pr,tn=ar+hr/2+An<=_e,rn=ar-hr/2-An>=0,Ze.idealAlign!=="top"&&tn||!rn?tn?(ar+=hr/2,Ze.anchor="start"):Ze.anchor="middle":(ar-=hr/2,Ze.anchor="end");else if(Ze.pos=ar,tn=pr+lr/2+An<=Te,rn=pr-lr/2-An>=0,Ze.idealAlign!=="left"&&tn||!rn)if(tn)pr+=lr/2,Ze.anchor="start";else{Ze.anchor="middle";var Ln=An/2,_n=pr+Ln-Te,Vr=pr-Ln;_n>0&&(pr-=_n),Vr<0&&(pr+=-Vr)}else pr-=lr/2,Ze.anchor="end";or.attr("text-anchor",Ze.anchor),Xt&&Ut.attr("text-anchor",Ze.anchor),pt.attr("transform",e(pr,ar)+(J?n(x):""))}),Et}function D(N,U,Q,j,X,J){var re="",ne="";N.nameOverride!==void 0&&(N.name=N.nameOverride),N.name&&(N.trace._meta&&(N.name=v.templateString(N.name,N.trace._meta)),re=K(N.name,N.nameLength));var se=Q.charAt(0),oe=se==="x"?"y":"x";N.zLabel!==void 0?(N.xLabel!==void 0&&(ne+="x: "+N.xLabel+"<br>"),N.yLabel!==void 0&&(ne+="y: "+N.yLabel+"<br>"),N.trace.type!=="choropleth"&&N.trace.type!=="choroplethmapbox"&&(ne+=(ne?"z: ":"")+N.zLabel)):U&&N[se+"Label"]===X?ne=N[oe+"Label"]||"":N.xLabel===void 0?N.yLabel!==void 0&&N.trace.type!=="scattercarpet"&&(ne=N.yLabel):ne=N.yLabel===void 0?N.xLabel:"("+N.xLabel+", "+N.yLabel+")",!N.text&&N.text!==0||Array.isArray(N.text)||(ne+=(ne?"<br>":"")+N.text),N.extraText!==void 0&&(ne+=(ne?"<br>":"")+N.extraText),J&&ne===""&&!N.hovertemplate&&(re===""&&J.remove(),ne=re);var pe=N.hovertemplate||!1;if(pe){var ce=N.hovertemplateLabels||N;N[se+"Label"]!==X&&(ce[se+"other"]=ce[se+"Val"],ce[se+"otherLabel"]=ce[se+"Label"]),ne=(ne=v.hovertemplateString(pe,ce,j._d3locale,N.eventData[0]||{},N.trace._meta)).replace(S,function(de,xe){return re=K(xe,N.nameLength),""})}return[ne,re]}function F(N,U,Q,j){var X=function(re){return re*Q},J=function(re){return re*j};N.each(function(re){var ne=g.select(this);if(re.del)return ne.remove();var se=ne.select("text.nums"),oe=re.anchor,pe=oe==="end"?-1:1,ce={start:1,end:-1,middle:0}[oe],de=ce*(k+L),xe=de+ce*(re.txwidth+L),we=0,be=re.offset,Ee=oe==="middle";Ee&&(de-=re.tx2width/2,xe+=re.txwidth/2+L),U&&(be*=-T,we=re.offset*_),ne.select("path").attr("d",Ee?"M-"+X(re.bx/2+re.tx2width/2)+","+J(be-re.by/2)+"h"+X(re.bx)+"v"+J(re.by)+"h-"+X(re.bx)+"Z":"M0,0L"+X(pe*k+we)+","+J(k+be)+"v"+J(re.by/2-k)+"h"+X(pe*re.bx)+"v-"+J(re.by)+"H"+X(pe*k+we)+"V"+J(be-k)+"Z");var fe=we+de,me=be+re.ty0-re.by/2+L,Te=re.textAlign||"auto";Te!=="auto"&&(Te==="left"&&oe!=="start"?(se.attr("text-anchor","start"),fe=Ee?-re.bx/2-re.tx2width/2+L:-re.bx-L):Te==="right"&&oe!=="end"&&(se.attr("text-anchor","end"),fe=Ee?re.bx/2-re.tx2width/2-L:re.bx+L)),se.call(o.positionText,X(fe),J(me)),re.tx2width&&(ne.select("text.name").call(o.positionText,X(xe+ce*L+we),J(be+re.ty0-re.by/2+L)),ne.select("rect").call(d.setRect,X(xe+(ce-1)*re.tx2width/2+we),J(be-re.by/2-1),X(re.tx2width),J(re.by+2)))})}function H(N,U){var Q=N.index,j=N.trace||{},X=N.cd[0],J=N.cd[Q]||{};function re(de){return de||m(de)&&de===0}var ne=Array.isArray(Q)?function(de,xe){var we=v.castOption(X,Q,de);return re(we)?we:v.extractOption({},j,"",xe)}:function(de,xe){return v.extractOption(J,j,de,xe)};function se(de,xe,we){var be=ne(xe,we);re(be)&&(N[de]=be)}if(se("hoverinfo","hi","hoverinfo"),se("bgcolor","hbg","hoverlabel.bgcolor"),se("borderColor","hbc","hoverlabel.bordercolor"),se("fontFamily","htf","hoverlabel.font.family"),se("fontSize","hts","hoverlabel.font.size"),se("fontColor","htc","hoverlabel.font.color"),se("nameLength","hnl","hoverlabel.namelength"),se("textAlign","hta","hoverlabel.align"),N.posref=U==="y"||U==="closest"&&j.orientation==="h"?N.xa._offset+(N.x0+N.x1)/2:N.ya._offset+(N.y0+N.y1)/2,N.x0=v.constrain(N.x0,0,N.xa._length),N.x1=v.constrain(N.x1,0,N.xa._length),N.y0=v.constrain(N.y0,0,N.ya._length),N.y1=v.constrain(N.y1,0,N.ya._length),N.xLabelVal!==void 0&&(N.xLabel="xLabel"in N?N.xLabel:u.hoverLabelText(N.xa,N.xLabelVal,j.xhoverformat),N.xVal=N.xa.c2d(N.xLabelVal)),N.yLabelVal!==void 0&&(N.yLabel="yLabel"in N?N.yLabel:u.hoverLabelText(N.ya,N.yLabelVal,j.yhoverformat),N.yVal=N.ya.c2d(N.yLabelVal)),N.zLabelVal!==void 0&&N.zLabel===void 0&&(N.zLabel=String(N.zLabelVal)),!(isNaN(N.xerr)||N.xa.type==="log"&&N.xerr<=0)){var oe=u.tickText(N.xa,N.xa.c2l(N.xerr),"hover").text;N.xerrneg!==void 0?N.xLabel+=" +"+oe+" / -"+u.tickText(N.xa,N.xa.c2l(N.xerrneg),"hover").text:N.xLabel+=" ± "+oe,U==="x"&&(N.distance+=1)}if(!(isNaN(N.yerr)||N.ya.type==="log"&&N.yerr<=0)){var pe=u.tickText(N.ya,N.ya.c2l(N.yerr),"hover").text;N.yerrneg!==void 0?N.yLabel+=" +"+pe+" / -"+u.tickText(N.ya,N.ya.c2l(N.yerrneg),"hover").text:N.yLabel+=" ± "+pe,U==="y"&&(N.distance+=1)}var ce=N.hoverinfo||N.trace.hoverinfo;return ce&&ce!=="all"&&((ce=Array.isArray(ce)?ce:ce.split("+")).indexOf("x")===-1&&(N.xLabel=void 0),ce.indexOf("y")===-1&&(N.yLabel=void 0),ce.indexOf("z")===-1&&(N.zLabel=void 0),ce.indexOf("text")===-1&&(N.text=void 0),ce.indexOf("name")===-1&&(N.name=void 0)),N}function V(N,U,Q){var j,X,J=Q.container,re=Q.fullLayout,ne=re._size,se=Q.event,oe
1213=!!U.hLinePoint,pe=!!U.vLinePoint;if(J.selectAll(".spikeline").remove(),pe||oe){var ce=c.combine(re.plot_bgcolor,re.paper_bgcolor);if(oe){var de,xe,we=U.hLinePoint;j=we&&we.xa,(X=we&&we.ya).spikesnap==="cursor"?(de=se.pointerX,xe=se.pointerY):(de=j._offset+we.x,xe=X._offset+we.y);var be,Ee,fe=b.readability(we.color,ce)<1.5?c.contrast(ce):we.color,me=X.spikemode,Te=X.spikethickness,_e=X.spikecolor||fe,Ae=u.getPxPosition(N,X);if(me.indexOf("toaxis")!==-1||me.indexOf("across")!==-1){if(me.indexOf("toaxis")!==-1&&(be=Ae,Ee=de),me.indexOf("across")!==-1){var Pe=X._counterDomainMin,De=X._counterDomainMax;X.anchor==="free"&&(Pe=Math.min(Pe,X.position),De=Math.max(De,X.position)),be=ne.l+Pe*ne.w,Ee=ne.l+De*ne.w}J.insert("line",":first-child").attr({x1:be,x2:Ee,y1:xe,y2:xe,"stroke-width":Te,stroke:_e,"stroke-dasharray":d.dashStyle(X.spikedash,Te)}).classed("spikeline",!0).classed("crisp",!0),J.insert("line",":first-child").attr({x1:be,x2:Ee,y1:xe,y2:xe,"stroke-width":Te+2,stroke:ce}).classed("spikeline",!0).classed("crisp",!0)}me.indexOf("marker")!==-1&&J.insert("circle",":first-child").attr({cx:Ae+(X.side!=="right"?Te:-Te),cy:xe,r:Te,fill:_e}).classed("spikeline",!0)}if(pe){var Ve,Qe,Oe=U.vLinePoint;j=Oe&&Oe.xa,X=Oe&&Oe.ya,j.spikesnap==="cursor"?(Ve=se.pointerX,Qe=se.pointerY):(Ve=j._offset+Oe.x,Qe=X._offset+Oe.y);var Ue,Ge,Ye=b.readability(Oe.color,ce)<1.5?c.contrast(ce):Oe.color,tt=j.spikemode,lt=j.spikethickness,vt=j.spikecolor||Ye,It=u.getPxPosition(N,j);if(tt.indexOf("toaxis")!==-1||tt.indexOf("across")!==-1){if(tt.indexOf("toaxis")!==-1&&(Ue=It,Ge=Qe),tt.indexOf("across")!==-1){var St=j._counterDomainMin,rt=j._counterDomainMax;j.anchor==="free"&&(St=Math.min(St,j.position),rt=Math.max(rt,j.position)),Ue=ne.t+(1-rt)*ne.h,Ge=ne.t+(1-St)*ne.h}J.insert("line",":first-child").attr({x1:Ve,x2:Ve,y1:Ue,y2:Ge,"stroke-width":lt,stroke:vt,"stroke-dasharray":d.dashStyle(j.spikedash,lt)}).classed("spikeline",!0).classed("crisp",!0),J.insert("line",":first-child").attr({x1:Ve,x2:Ve,y1:Ue,y2:Ge,"stroke-width":lt+2,stroke:ce}).classed("spikeline",!0).classed("crisp",!0)}tt.indexOf("marker")!==-1&&J.insert("circle",":first-child").attr({cx:Ve,cy:It-(j.side!=="top"?lt:-lt),r:lt,fill:vt}).classed("spikeline",!0)}}}function Z(N,U){return!U}function K(N,U){return o.plainText(N||"",{len:U,allowedTags:["br","sub","sup","b","i","em"]})}function q(N,U,Q){var j=U[N+"a"],X=U[N+"Val"],J=U.cd[0];if(j.type==="category")X=j._categoriesMap[X];else if(j.type==="date"){var re=U.trace[N+"periodalignment"];if(re){var ne=U.cd[U.index],se=ne[N+"Start"];se===void 0&&(se=ne[N]);var oe=ne[N+"End"];oe===void 0&&(oe=ne[N]);var pe=oe-se;re==="end"?X+=pe:re==="middle"&&(X+=pe/2)}X=j.d2c(X)}return J&&J.t&&J.t.posLetter===j._id&&(Q.boxmode!=="group"&&Q.violinmode!=="group"||(X+=J.t.dPos)),X}function W(N){return N.offsetTop+N.clientTop}function $(N){return N.offsetLeft+N.clientLeft}function R(N,U){var Q=N._fullLayout,j=U.getBoundingClientRect(),X=j.x,J=j.y,re=X+j.width,ne=J+j.height,se=v.apply3DTransform(Q._invTransform)(X,J),oe=v.apply3DTransform(Q._invTransform)(re,ne),pe=se[0],ce=se[1],de=oe[0],xe=oe[1];return{x:pe,y:ce,width:de-pe,height:xe-ce,top:Math.min(ce,xe),left:Math.min(pe,de),right:Math.max(pe,de),bottom:Math.max(ce,xe)}}},{"../../lib":503,"../../lib/events":492,"../../lib/override_cursor":514,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"../legend/defaults":418,"../legend/draw":419,"./constants":400,"./helpers":402,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],404:[function(y,ee,te){var g=y("../../lib"),m=y("../color"),b=y("./helpers").isUnifiedHover;ee.exports=function(v,e,n,t){t=t||{};var o=e.legend;function r(d){t.font[d]||(t.font[d]=o?e.legend.font[d]:e.font[d])}e&&b(e.hovermode)&&(t.font||(t.font={}),r("size"),r("family"),r("color"),o?(t.bgcolor||(t.bgcolor=m.combine(e.legend.bgcolor,e.paper_bgcolor)),t.bordercolor||(t.bordercolor=e.legend.bordercolor)):t.bgcolor||(t.bgcolor=e.paper_bgcolor)),n("hoverlabel.bgcolor",t.bgcolor),n("hoverlabel.bordercolor",t.bordercolor),n("hoverlabel.namelength",t.namelength),g.coerceFont(n,"hoverlabel.font",t.font),n("hoverlabel.align",t.align)}},{"../../lib":503,"../color":366,"./helpers":402}],405:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v){function e(n,t){return v[n]!==void 0?v[n]:g.coerce(b,v,m,n,t)}return e("clickmode"),e("hovermode")}},{"../../lib":503,"./layout_attributes":407}],406:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../dragelement"),v=y("./helpers"),e=y("./layout_attributes"),n=y("./hover");ee.exports={moduleType:"component",name:"fx",constants:y("./constants"),schema:{layout:e},attributes:y("./attributes"),layoutAttributes:e,supplyLayoutGlobalDefaults:y("./layout_global_defaults"),supplyDefaults:y("./defaults"),supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc"),getDistanceFunction:v.getDistanceFunction,getClosest:v.getClosest,inbox:v.inbox,quadrature:v.quadrature,appendArrayPointValue:v.appendArrayPointValue,castHoverOption:function(t,o,r){return m.castOption(t,o,"hoverlabel."+r)},castHoverinfo:function(t,o,r){return m.castOption(t,r,"hoverinfo",function(d){return m.coerceHoverinfo({hoverinfo:d},{_module:t._module},o)})},hover:n.hover,unhover:b.unhover,loneHover:n.loneHover,loneUnhover:function(t){var o=m.isD3Selection(t)?t:g.select(t);o.selectAll("g.hovertext").remove(),o.selectAll(".spikeline").remove()}
1213,click:y("./click")}},{"../../lib":503,"../dragelement":385,"./attributes":397,"./calc":398,"./click":399,"./constants":400,"./defaults":401,"./helpers":402,"./hover":403,"./layout_attributes":407,"./layout_defaults":408,"./layout_global_defaults":409,"@plotly/d3":58}],407:[function(y,ee,te){var g=y("./constants"),m=y("../../plots/font_attributes"),b=m({editType:"none"});b.family.dflt=g.HOVERFONT,b.size.dflt=g.HOVERFONTSIZE,ee.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:b,grouptitlefont:m({editType:"none"}),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":585,"./constants":400}],408:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes"),b=y("./hovermode_defaults"),v=y("./hoverlabel_defaults");ee.exports=function(e,n){function t(c,i){return g.coerce(e,n,m,c,i)}b(e,n)&&(t("hoverdistance"),t("spikedistance")),t("dragmode")==="select"&&t("selectdirection");var o=n._has("mapbox"),r=n._has("geo"),d=n._basePlotModules.length;n.dragmode==="zoom"&&((o||r)&&d===1||o&&r&&d===2)&&(n.dragmode="pan"),v(e,n,t),g.coerceFont(t,"hoverlabel.grouptitlefont",n.hoverlabel.font)}},{"../../lib":503,"./hoverlabel_defaults":404,"./hovermode_defaults":405,"./layout_attributes":407}],409:[function(y,ee,te){var g=y("../../lib"),m=y("./hoverlabel_defaults"),b=y("./layout_attributes");ee.exports=function(v,e){m(v,e,function(n,t){return g.coerce(v,e,b,n,t)})}},{"../../lib":503,"./hoverlabel_defaults":404,"./layout_attributes":407}],410:[function(y,ee,te){var g=y("../../lib"),m=y("../../lib/regex").counter,b=y("../../plots/domain").attributes,v=y("../../plots/cartesian/constants").idRegex,e=y("../../plot_api/plot_template"),n={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[m("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[v.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[v.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:b({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function t(d,c,i){var u=c[i+"axes"],f=Object.keys((d._splomAxes||{})[i]||{});return Array.isArray(u)?u:f.length?f:void 0}function o(d,c,i,u,f,s){var h=c(d+"gap",i),p=c("domain."+d);c(d+"side",u);
1213for(var a=new Array(f),x=p[0],l=(p[1]-x)/(f-h),w=l*(1-h),_=0;_<f;_++){var T=x+l*_;a[s?f-1-_:_]=[T,T+w]}return a}function r(d,c,i,u,f){var s,h=new Array(i);function p(a,x){c.indexOf(x)!==-1&&u[x]===void 0?(h[a]=x,u[x]=a):h[a]=""}if(Array.isArray(d))for(s=0;s<i;s++)p(s,d[s]);else for(p(0,f),s=1;s<i;s++)p(s,f+(s+1));return h}ee.exports={moduleType:"component",name:"grid",schema:{layout:{grid:n}},layoutAttributes:n,sizeDefaults:function(d,c){var i=d.grid||{},u=t(c,i,"x"),f=t(c,i,"y");if(d.grid||u||f){var s,h,p=Array.isArray(i.subplots)&&Array.isArray(i.subplots[0]),a=Array.isArray(u),x=Array.isArray(f),l=a&&u!==i.xaxes&&x&&f!==i.yaxes;p?(s=i.subplots.length,h=i.subplots[0].length):(x&&(s=f.length),a&&(h=u.length));var w=e.newContainer(c,"grid"),_=S("rows",s),T=S("columns",h);if(_*T>1){!p&&!a&&!x&&S("pattern")==="independent"&&(p=!0),w._hasSubplotGrid=p;var k,L,A=S("roworder")==="top to bottom",I=p?.2:.1,P=p?.3:.1;l&&c._splomGridDflt&&(k=c._splomGridDflt.xside,L=c._splomGridDflt.yside),w._domains={x:o("x",S,I,k,T),y:o("y",S,P,L,_,A)}}else delete c.grid}function S(E,D){return g.coerce(i,w,n,E,D)}},contentDefaults:function(d,c){var i=c.grid;if(i&&i._domains){var u,f,s,h,p,a,x,l=d.grid||{},w=c._subplots,_=i._hasSubplotGrid,T=i.rows,k=i.columns,L=i.pattern==="independent",A=i._axisMap={};if(_){var I=l.subplots||[];a=i.subplots=new Array(T);var P=1;for(u=0;u<T;u++){var S=a[u]=new Array(k),E=I[u]||[];for(f=0;f<k;f++)if(L?(p=P===1?"xy":"x"+P+"y"+P,P++):p=E[f],S[f]="",w.cartesian.indexOf(p)!==-1){if(x=p.indexOf("y"),s=p.slice(0,x),h=p.slice(x),A[s]!==void 0&&A[s]!==f||A[h]!==void 0&&A[h]!==u)continue;S[f]=p,A[s]=f,A[h]=u}}}else{var D=t(c,l,"x"),F=t(c,l,"y");i.xaxes=r(D,w.xaxis,k,A,"x"),i.yaxes=r(F,w.yaxis,T,A,"y")}var H=i._anchors={},V=i.roworder==="top to bottom";for(var Z in A){var K,q,W,$=Z.charAt(0),R=i[$+"side"];if(R.length<8)H[Z]="free";else if($==="x"){if(R.charAt(0)==="t"===V?(K=0,q=1,W=T):(K=T-1,q=-1,W=-1),_){var N=A[Z];for(u=K;u!==W;u+=q)if((p=a[u][N])&&(x=p.indexOf("y"),p.slice(0,x)===Z)){H[Z]=p.slice(x);break}}else for(u=K;u!==W;u+=q)if(h=i.yaxes[u],w.cartesian.indexOf(Z+h)!==-1){H[Z]=h;break}}else if(R.charAt(0)==="l"?(K=0,q=1,W=k):(K=k-1,q=-1,W=-1),_){var U=A[Z];for(u=K;u!==W;u+=q)if((p=a[U][u])&&(x=p.indexOf("y"),p.slice(x)===Z)){H[Z]=p.slice(0,x);break}}else for(u=K;u!==W;u+=q)if(s=i.xaxes[u],w.cartesian.indexOf(s+Z)!==-1){H[Z]=s;break}}}}}},{"../../lib":503,"../../lib/regex":520,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561,"../../plots/domain":584}],411:[function(y,ee,te){var g=y("../../plots/cartesian/constants"),m=y("../../plot_api/plot_template").templatedArray;y("../../constants/axis_placeable_objects"),ee.exports=m("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",g.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",g.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},{"../../constants/axis_placeable_objects":472,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561}],412:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib/to_log_range");ee.exports=function(b,v,e,n){v=v||{};var t=e==="log"&&v.type==="linear",o=e==="linear"&&v.type==="log";if(t||o){for(var r,d,c=b._fullLayout.images,i=v._id.charAt(0),u=0;u<c.length;u++)if(d="images["+u+"].",(r=c[u])[i+"ref"]===v._id){var f=r[i],s=r["size"+i],h=null,p=null;if(t){h=m(f,v.range);var a=s/Math.pow(10,h)/2;p=2*Math.log(a+Math.sqrt(1+a*a))/Math.LN10}else p=(h=Math.pow(10,f))*(Math.pow(10,s/2)-Math.pow(10,-s/2));g(h)?g(p)||(p=null):(h=null,p=null),n(d+i,h),n(d+"size"+i,p)}}}},{"../../lib/to_log_range":531,"fast-isnumeric":190}],413:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("../../plots/array_container_defaults"),v=y("./attributes");function e(n,t,o){function r(h,p){return g.coerce(n,t,v,h,p)}var d=r("source");if(!r("visible",!!d))return t;r("layer"),r("xanchor"),r("yanchor"),r("sizex"),r("sizey"),r("sizing"),r("opacity");for(var c={_fullLayout:o},i=["x","y"],u=0;u<2;u++){var f=i[u],s=m.coerceRef(n,t,c,f,"paper",void 0);s!=="paper"&&m.getFromId(c,s)._imgIndices.push(t._index),m.coercePosition(t,c,r,s,f,0)}return t}ee.exports=function(n,t){b(n,t,{name:"images",handleItemDefaults:e})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"./attributes":411}],414:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../drawing"),b=y("../../plots/cartesian/axes"),v=y("../../plots/cartesian/axis_ids"),e=y("../../constants/xmlns_namespaces");ee.exports=function(n){var t,o,r=n._fullLayout,d=[],c={},i=[];for(o=0;o<r.images.length;o++){var u=r.images[o];if(u.visible)if(u.layer==="below"&&u.xref!=="paper"&&u.yref!=="paper"){t=v.ref2id(u.xref)+v.ref2id(u.yref);var f=r._plots[t];if(!f){i.push(u);continue}f.mainplot&&(t=f.mainplot.id),c[t]||(c[t]=[]),c[t].push(u)}else u.layer==="above"?d.push(u):i.push(u)}var s={left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},h={top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}};function p(k){var L=g.select(this);if(this._imgSrc!==k.source)if(L.attr("xmlns",e.svg),k.source&&k.source.slice(0,5)==="data:")L.attr("xlink:href",k.source),this._imgSrc=k.source;else{var A=new Promise(function(I){var P=new Image;function S(){L.remove(),I()}this.img=P,P.setAttribute("crossOrigin","anonymous"),P.onerror=S,P.onload=function(){var E=document.createElement("canvas");E.width=this.width,E.height=this.height,E.getContext("2d").drawImage(this,0,0);var D=E.toDataURL("image/png");L.attr("xlink:href",D),I()},L.on("error",S),P.src=k.source,this._imgSrc=k.source}.bind(this));n._promises.push(A)}}function a(k){var L,A,I=g.select(this),P=b.getFromId(n,k.xref),S=b.getFromId(n,k.yref),E=b.getRefType(k.xref)==="domain",D=b.getRefType(k.yref)==="domain",F=r._size;L=P!==void 0?typeof k.xref=="string"&&E?P._length*k.sizex:Math.abs(P.l2p(k.sizex)-P.l2p(0)):k.sizex*F.w,A=S!==void 0?typeof k.yref=="string"&&D?S._length*k.sizey:Math.abs(S.l2p(k.sizey)-S.l2p(0)):k.sizey*F.h;var H,V,Z=L*s[k.xanchor].offset,K=A*h[k.yanchor].offset,q=s[k.xanchor].sizing+h[k.yanchor].sizing;
1213switch(H=P!==void 0?typeof k.xref=="string"&&E?P._length*k.x+P._offset:P.r2p(k.x)+P._offset:k.x*F.w+F.l,H+=Z,V=S!==void 0?typeof k.yref=="string"&&D?S._length*(1-k.y)+S._offset:S.r2p(k.y)+S._offset:F.h-k.y*F.h+F.t,V+=K,k.sizing){case"fill":q+=" slice";break;case"stretch":q="none"}I.attr({x:H,y:V,width:L,height:A,preserveAspectRatio:q,opacity:k.opacity});var W=(P&&b.getRefType(k.xref)!=="domain"?P._id:"")+(S&&b.getRefType(k.yref)!=="domain"?S._id:"");m.setClipUrl(I,W?"clip"+r._uid+W:null,n)}var x=r._imageLowerLayer.selectAll("image").data(i),l=r._imageUpperLayer.selectAll("image").data(d);x.enter().append("image"),l.enter().append("image"),x.exit().remove(),l.exit().remove(),x.each(function(k){p.bind(this)(k),a.bind(this)(k)}),l.each(function(k){p.bind(this)(k),a.bind(this)(k)});var w=Object.keys(r._plots);for(o=0;o<w.length;o++){t=w[o];var _=r._plots[t];if(_.imagelayer){var T=_.imagelayer.selectAll("image").data(c[t]||[]);T.enter().append("image"),T.exit().remove(),T.each(function(k){p.bind(this)(k),a.bind(this)(k)})}}}},{"../../constants/xmlns_namespaces":480,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_ids":558,"../drawing":388,"@plotly/d3":58}],415:[function(y,ee,te){ee.exports={moduleType:"component",name:"images",layoutAttributes:y("./attributes"),supplyLayoutDefaults:y("./defaults"),includeBasePlot:y("../../plots/cartesian/include_components")("images"),draw:y("./draw"),convertCoords:y("./convert_coords")}},{"../../plots/cartesian/include_components":567,"./attributes":411,"./convert_coords":412,"./defaults":413,"./draw":414}],416:[function(y,ee,te){var g=y("../../plots/font_attributes"),m=y("../color/attributes");ee.exports={bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:m.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:g({editType:"legend"}),grouptitlefont:g({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",min:-2,max:3,editType:"legend"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",min:-2,max:3,editType:"legend"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:g({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend"},editType:"legend"},editType:"legend"}},{"../../plots/font_attributes":585,"../color/attributes":365}],417:[function(y,ee,te){ee.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},{}],418:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("../../plot_api/plot_template"),v=y("../../plots/attributes"),e=y("./attributes"),n=y("../../plots/layout_attributes"),t=y("./helpers");ee.exports=function(o,r,d){var c,i=o.legend||{},u=b.newContainer(r,"legend");function f(S,E){return m.coerce(i,u,e,S,E)}for(var s=function(S,E){var D=c._input,F=c;return m.coerce(D,F,v,S,E)},h=r.font||{},p=m.coerceFont(f,"grouptitlefont",m.extendFlat({},h,{size:Math.round(1.1*h.size)})),a=0,x=!1,l="normal",w=0;w<d.length;w++)(c=d[w]).visible&&((c.showlegend||c._dfltShowLegend&&!(c._module&&c._module.attributes&&c._module.attributes.showlegend&&c._module.attributes.showlegend.dflt===!1))&&(a++,c.showlegend&&(x=!0,(g.traceIs(c,"pie-like")||c._input.showlegend===!0)&&a++),m.coerceFont(s,"legendgrouptitle.font",p)),(g.traceIs(c,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(c.fill)!==-1)&&(l=t.isGrouped({traceorder:l})?"grouped+reversed":"reversed"),c.legendgroup!==void 0&&c.legendgroup!==""&&(l=t.isReversed({traceorder:l})?"reversed+grouped":"grouped"));var _=m.coerce(o,r,n,"showlegend",x&&a>1);if(_===!1&&(r.legend=void 0),(_!==!1||i.uirevision)&&(f("uirevision",r.uirevision),_!==!1)){f("bgcolor",r.paper_bgcolor),f("bordercolor"),f("borderwidth");var T,k,L,A=m.coerceFont(f,"font",r.font),I=f("orientation")==="h";if(I?(T=0,g.getComponentMethod("rangeslider","isVisible")(o.xaxis)?(k=1.1,L="bottom"):(k=-.1,L="top")):(T=1.02,k=1,L="auto"),f("traceorder",l),t.isGrouped(r.legend)&&f("tracegroupgap"),f("itemsizing"),f("itemwidth"),f("itemclick"),f("itemdoubleclick"),f("groupclick"),f("x",T),f("xanchor"),f("y",k),f("yanchor",L),f("valign"),m.noneOrAll(i,u,["x","y"]),f("title.text")){f("title.side",I?"left":"top");var P=m.extendFlat({},A,{size:m.bigFont(A.size)});m.coerceFont(f,"title.font",P)}}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/attributes":550,"../../plots/layout_attributes":610,"../../registry":638,"./attributes":416,"./helpers":422}],419:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../plots/plots"),v=y("../../registry"),e=y("../../lib/events"),n=y("../dragelement"),t=y("../drawing"),o=y("../color"),r=y("../../lib/svg_text_utils"),d=y("./handle_click"),c=y("./constants"),i=y("../../constants/alignment"),u=i.LINE_SPACING,f=i.FROM_TL,s=i.FROM_BR,h=y("./get_legend_data"),p=y("./style"),a=y("./helpers");function x(A,I,P,S,E){var D=P.data()[0][0].trace,F={event:E,node:P.node(),curveNumber:D.index,exp
1213andedIndex:D._expandedIndex,data:A.data,layout:A.layout,frames:A._transitionData._frames,config:A._context,fullData:A._fullData,fullLayout:A._fullLayout};D._group&&(F.group=D._group),v.traceIs(D,"pie-like")&&(F.label=P.datum()[0].label),e.triggerHandler(A,"plotly_legendclick",F)!==!1&&(S===1?I._clickTimeout=setTimeout(function(){A._fullLayout&&d(P,A,S)},A._context.doubleClickDelay):S===2&&(I._clickTimeout&&clearTimeout(I._clickTimeout),A._legendMouseDownTime=0,e.triggerHandler(A,"plotly_legenddoubleclick",F)!==!1&&d(P,A,S)))}function l(A,I,P){var S,E,D=A.data()[0][0],F=D.trace,H=v.traceIs(F,"pie-like"),V=!P._inHover&&I._context.edits.legendText&&!H,Z=P._maxNameLength;D.groupTitle?(S=D.groupTitle.text,E=D.groupTitle.font):(E=P.font,P.entries?S=D.text:(S=H?D.label:F.name,F._meta&&(S=m.templateString(S,F._meta))));var K=m.ensureSingle(A,"text","legendtext");K.attr("text-anchor","start").call(t.font,E).text(V?w(S,Z):S);var q=P.itemwidth+2*c.itemGap;r.positionText(K,q,0),V?K.call(r.makeEditable,{gd:I,text:S}).call(T,A,I,P).on("edit",function(W){this.text(w(W,Z)).call(T,A,I,P);var $=D.trace._fullInput||{},R={};if(v.hasTransform($,"groupby")){var N=v.getTransformIndices($,"groupby"),U=N[N.length-1],Q=m.keyedContainer($,"transforms["+U+"].styles","target","value.name");Q.set(D.trace._group,W),R=Q.constructUpdate()}else R.name=W;return v.call("_guiRestyle",I,R,F.index)}):T(K,A,I,P)}function w(A,I){var P=Math.max(4,I);if(A&&A.trim().length>=P/2)return A;for(var S=P-(A=A||"").length;S>0;S--)A+=" ";return A}function _(A,I){var P,S=I._context.doubleClickDelay,E=1,D=m.ensureSingle(A,"rect","legendtoggle",function(F){I._context.staticPlot||F.style("cursor","pointer").attr("pointer-events","all"),F.call(o.fill,"rgba(0,0,0,0)")});I._context.staticPlot||(D.on("mousedown",function(){(P=new Date().getTime())-I._legendMouseDownTime<S?E+=1:(E=1,I._legendMouseDownTime=P)}),D.on("mouseup",function(){if(!I._dragged&&!I._editing){var F=I._fullLayout.legend;new Date().getTime()-I._legendMouseDownTime>S&&(E=Math.max(E-1,1)),x(I,F,A,E,g.event)}}))}function T(A,I,P,S,E){S._inHover&&A.attr("data-notex",!0),r.convertToTspans(A,P,function(){(function(D,F,H,V){var Z=D.data()[0][0];if(!H._inHover&&Z&&!Z.trace.showlegend)return void D.remove();var K=D.select("g[class*=math-group]"),q=K.node();H||(H=F._fullLayout.legend);var W,$=H.borderwidth;W=V===1?H.title.font:Z.groupTitle?Z.groupTitle.font:H.font;var R,N,U=W.size*u;if(q){var Q=t.bBox(q);R=Q.height,N=Q.width,V===1?t.setTranslate(K,$,$+.75*R):t.setTranslate(K,0,.25*R)}else{var j=D.select(V===1?".legendtitletext":".legendtext"),X=r.lineCount(j),J=j.node();if(R=U*X,N=J?t.bBox(J).width:0,V===1)H.title.side==="left"&&(N+=2*c.itemGap),r.positionText(j,$+c.titlePad,$+U);else{var re=2*c.itemGap+H.itemwidth;Z.groupTitle&&(re=c.itemGap,N-=H.itemwidth),r.positionText(j,re,-U*((X-1)/2-.3))}}V===1?(H._titleWidth=N,H._titleHeight=R):(Z.lineHeight=U,Z.height=Math.max(R,16)+3,Z.width=N)})(I,P,S,E)})}function k(A){return m.isRightAnchor(A)?"right":m.isCenterAnchor(A)?"center":"left"}function L(A){return m.isBottomAnchor(A)?"bottom":m.isMiddleAnchor(A)?"middle":"top"}ee.exports=function(A,I){return I||(I=A._fullLayout.legend||{}),function(P,S){var E,D,F=P._fullLayout,H="legend"+F._uid,V=S._inHover;if(V?(E=S.layer,H+="-hover"):E=F._infolayer,!!E){if(P._legendMouseDownTime||(P._legendMouseDownTime=0),V){if(!S.entries)return;D=h(S.entries,S)}else{if(!P.calcdata)return;D=F.showlegend&&h(P.calcdata,S)}var Z=F.hiddenlabels||[];if(!(V||F.showlegend&&D.length))return E.selectAll(".legend").remove(),F._topdefs.select("#"+H).remove(),b.autoMargin(P,"legend");var K=m.ensureSingle(E,"g","legend",function(X){V||X.attr("pointer-events","all")}),q=m.ensureSingleById(F._topdefs,"clipPath",H,function(X){X.append("rect")}),W=m.ensureSingle(K,"rect","bg",function(X){X.attr("shape-rendering","crispEdges")});W.call(o.stroke,S.bordercolor).call(o.fill,S.bgcolor).style("stroke-width",S.borderwidth+"px");var $=m.ensureSingle(K,"g","scrollbox"),R=S.title;if(S._titleWidth=0,S._titleHeight=0,R.text){var N=m.ensureSingle($,"text","legendtitletext");N.attr("text-anchor","start").call(t.font,R.font).text(R.text),T(N,$,P,S,1)}else $.selectAll(".legendtitletext").remove();var U=m.ensureSingle(K,"rect","scrollbar",function(X){X.attr(c.scrollBarEnterAttrs).call(o.fill,c.scrollBarColor)}),Q=$.selectAll("g.groups").data(D);Q.enter().append("g").attr("class","groups"),Q.exit().remove();var j=Q.selectAll("g.traces").data(m.identity);j.enter().append("g").attr("class","traces"),j.exit().remove(),j.style("opacity",function(X){var J=X[0].trace;return v.traceIs(J,"pie-like")?Z.indexOf(X[0].label)!==-1?.5:1:J.visible==="legendonly"?.5:1}).each(function(){g.select(this).call(l,P,S)}).call(p,P,S).each(function(){V||g.select(this).call(_,P)}),m.syncOrAsync([b.previousPromises,function(){return function(X,J,re,ne){var se=X._fullLayout;ne||(ne=se.legend);var oe=se._size,pe=a.isVertical(ne),ce=a.isGrouped(ne),de=ne.borderwidth,xe=2*de,we=c.itemGap,be=ne.itemwidth+2*we,Ee=2*(de+we),fe=L(ne),me=ne.y<0||ne.y===0&&fe==="top",Te=ne.y>1||ne.y===1&&fe==="bottom",_e=ne.tracegroupgap;ne._maxHeight=Math.max(me||Te?se.height/2:oe.h,30);var Ae=0;ne._width=0,ne._height=0;var Pe=function(Re){var Xe=0,ke=0,Le=Re.title.side;return Le&&(Le.indexOf("left")!==-1&&(Xe=Re._titleWidth),Le.indexOf("top")!==-1&&(ke=Re._titleHeight)),[Xe,ke]}(ne);if(pe)re.each(function(Re){var Xe=Re[0].height;t.setTranslate(this,de+Pe[0],de+Pe[1]+ne._height+Xe/2+we),ne._height+=Xe,ne._width=Math.max(ne._width,Re[0].width)}),Ae=be+ne._width,ne._width+=we+be+xe,ne._height+=Ee,ce&&(J.each(function(Re,Xe){t.setTranslate(this,0,Xe*ne.tracegroupgap)}),ne._height+=(ne._lgroupsLength-1)*ne.tracegroupgap);else{var De=k(ne),Ve=ne.x<0||ne.x===0&&De==="right",Qe=ne.x>1||ne.x===1&&De==="left",Oe=Te||me,Ue=se.width/2;ne._maxWidth=Math.max(Ve?Oe&&De==="left"?oe.l+oe.w:Ue:Qe?Oe&&De==="right"?oe.r+oe.w:Ue:oe.w,2*be);var Ge=0,Ye=0;re.each(function(Re){var Xe=Re[0].width+be;Ge=Math.max(Ge,Xe),Ye+=Xe}),Ae=null;var tt=0;if(ce){var lt=0,vt=0,It=0;J.each(function(){var Re=0,Xe=0;g.select(this).selectAll("g.traces").each(function(Le){var Ie=Le[0].width,Ce=Le[0].height;t.setTranslate(this,Pe[0],Pe[1]+de+we+Ce/2+Xe),Xe+=Ce,Re=Math.max(Re,be+Ie)});var ke=Re+we;vt>0&&ke+de+vt>ne._maxWidth?(tt=Math.max(tt,vt),vt=0,It+=lt+_e,lt=Xe):lt=Math.max(lt,Xe),t.setTranslate(this,vt,It),vt+=ke}),ne._width=Math.max(tt,vt)+de,ne._height=It+lt+Ee}else{var St=re.size(),rt=Ye+xe+(St-1)*we<ne._maxWidth,et=0,Tt=0,Vt=0,Kt=0;re.each(function(Re){var Xe=Re[0].height,ke=be+Re[0].width,Le=(rt?ke:Ge)+we;Le+de+Tt-we>=ne._maxWidth&&(tt=Math.max(tt,Kt),Tt=0,Vt+=et,ne._height+=et,et=0),t.setTranslate(this,Pe[0]+de+Tt,Pe[1]+de+Vt+Xe/2+we),Kt=Tt+ke+we,Tt+=Le,et=Math.max(et,Xe)}),rt?(ne._width=Tt+xe,ne._height=et+Ee):(ne._width=Math.max(tt,Kt)+xe,ne._height+=et+Ee)}}ne._width=Math.ceil(Math.max(ne._width+Pe[0],ne._titleWidth+2*(de+c.titlePad))),ne._height=Math.ceil(Math.max(ne._height+Pe[1],ne._titleHeight+2*(de+c.itemGap))),ne._effHeight=Math.min(ne._height,ne._maxHeight);
1213var Be=X._context.edits,qe=Be.legendText||Be.legendPosition;re.each(function(Re){var Xe=g.select(this).select(".legendtoggle"),ke=Re[0].height,Le=qe?be:Ae||be+Re[0].width;pe||(Le+=we/2),t.setRect(Xe,0,-ke/2,Le,ke)})}(P,Q,j,S)},function(){var X,J,re,ne,se=F._size,oe=S.borderwidth;if(!V){if(function(Oe){var Ue=Oe._fullLayout.legend,Ge=k(Ue),Ye=L(Ue);return b.autoMargin(Oe,"legend",{x:Ue.x,y:Ue.y,l:Ue._width*f[Ge],r:Ue._width*s[Ge],b:Ue._effHeight*s[Ye],t:Ue._effHeight*f[Ye]})}(P))return;var pe=se.l+se.w*S.x-f[k(S)]*S._width,ce=se.t+se.h*(1-S.y)-f[L(S)]*S._effHeight;if(F.margin.autoexpand){var de=pe,xe=ce;pe=m.constrain(pe,0,F.width-S._width),ce=m.constrain(ce,0,F.height-S._effHeight),pe!==de&&m.log("Constrain legend.x to make legend fit inside graph"),ce!==xe&&m.log("Constrain legend.y to make legend fit inside graph")}t.setTranslate(K,pe,ce)}if(U.on(".drag",null),K.on("wheel",null),V||S._height<=S._maxHeight||P._context.staticPlot){var we=S._effHeight;V&&(we=S._height),W.attr({width:S._width-oe,height:we-oe,x:oe/2,y:oe/2}),t.setTranslate($,0,0),q.select("rect").attr({width:S._width-2*oe,height:we-2*oe,x:oe,y:oe}),t.setClipUrl($,H,P),t.setRect(U,0,0,0,0),delete S._scrollY}else{var be,Ee,fe,me=Math.max(c.scrollBarMinHeight,S._effHeight*S._effHeight/S._height),Te=S._effHeight-me-2*c.scrollBarMargin,_e=S._height-S._effHeight,Ae=Te/_e,Pe=Math.min(S._scrollY||0,_e);W.attr({width:S._width-2*oe+c.scrollBarWidth+c.scrollBarMargin,height:S._effHeight-oe,x:oe/2,y:oe/2}),q.select("rect").attr({width:S._width-2*oe+c.scrollBarWidth+c.scrollBarMargin,height:S._effHeight-2*oe,x:oe,y:oe+Pe}),t.setClipUrl($,H,P),Qe(Pe,me,Ae),K.on("wheel",function(){Qe(Pe=m.constrain(S._scrollY+g.event.deltaY/Te*_e,0,_e),me,Ae),Pe!==0&&Pe!==_e&&g.event.preventDefault()});var De=g.behavior.drag().on("dragstart",function(){var Oe=g.event.sourceEvent;be=Oe.type==="touchstart"?Oe.changedTouches[0].clientY:Oe.clientY,fe=Pe}).on("drag",function(){var Oe=g.event.sourceEvent;Oe.buttons===2||Oe.ctrlKey||(Ee=Oe.type==="touchmove"?Oe.changedTouches[0].clientY:Oe.clientY,Qe(Pe=function(Ue,Ge,Ye){var tt=(Ye-Ge)/Ae+Ue;return m.constrain(tt,0,_e)}(fe,be,Ee),me,Ae))});U.call(De);var Ve=g.behavior.drag().on("dragstart",function(){var Oe=g.event.sourceEvent;Oe.type==="touchstart"&&(be=Oe.changedTouches[0].clientY,fe=Pe)}).on("drag",function(){var Oe=g.event.sourceEvent;Oe.type==="touchmove"&&(Ee=Oe.changedTouches[0].clientY,Qe(Pe=function(Ue,Ge,Ye){var tt=(Ge-Ye)/Ae+Ue;return m.constrain(tt,0,_e)}(fe,be,Ee),me,Ae))});$.call(Ve)}function Qe(Oe,Ue,Ge){S._scrollY=P._fullLayout.legend._scrollY=Oe,t.setTranslate($,0,-Oe),t.setRect(U,S._width,c.scrollBarMargin+Oe*Ge,c.scrollBarWidth,Ue),q.select("rect").attr("y",oe+Oe)}P._context.edits.legendPosition&&(K.classed("cursor-move",!0),n.init({element:K.node(),gd:P,prepFn:function(){var Oe=t.getTranslate(K);re=Oe.x,ne=Oe.y},moveFn:function(Oe,Ue){var Ge=re+Oe,Ye=ne+Ue;t.setTranslate(K,Ge,Ye),X=n.align(Ge,0,se.l,se.l+se.w,S.xanchor),J=n.align(Ye,0,se.t+se.h,se.t,S.yanchor)},doneFn:function(){X!==void 0&&J!==void 0&&v.call("_guiRelayout",P,{"legend.x":X,"legend.y":J})},clickFn:function(Oe,Ue){var Ge=E.selectAll("g.traces").filter(function(){var Ye=this.getBoundingClientRect();return Ue.clientX>=Ye.left&&Ue.clientX<=Ye.right&&Ue.clientY>=Ye.top&&Ue.clientY<=Ye.bottom});Ge.size()>0&&x(P,K,Ge,Oe,Ue)}}))}],P)}}(A,I)}},{"../../constants/alignment":471,"../../lib":503,"../../lib/events":492,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"./constants":417,"./get_legend_data":420,"./handle_click":421,"./helpers":422,"./style":424,"@plotly/d3":58}],420:[function(y,ee,te){var g=y("../../registry"),m=y("./helpers");ee.exports=function(b,v){var e,n,t=v._inHover,o=m.isGrouped(v),r=m.isReversed(v),d={},c=[],i=!1,u={},f=0,s=0;function h(F,H){if(F!==""&&m.isGrouped(v))c.indexOf(F)===-1?(c.push(F),i=!0,d[F]=[H]):d[F].push(H);else{var V="~~i"+f;c.push(V),d[V]=[H],f++}}for(e=0;e<b.length;e++){var p=b[e],a=p[0],x=a.trace,l=x.legendgroup;if(t||x.visible&&x.showlegend)if(g.traceIs(x,"pie-like"))for(u[l]||(u[l]={}),n=0;n<p.length;n++){var w=p[n].label;u[l][w]||(h(l,{label:w,color:p[n].color,i:p[n].i,trace:x,pts:p[n].pts}),u[l][w]=!0,s=Math.max(s,(w||"").length))}else h(l,a),s=Math.max(s,(x.name||"").length)}if(!c.length)return[];var _=!i||!o,T=[];for(e=0;e<c.length;e++){var k=d[c[e]];_?T.push(k[0]):T.push(k)}for(_&&(T=[T]),e=0;e<T.length;e++){var L=1/0;for(n=0;n<T[e].length;n++){var A=T[e][n].trace.legendrank;L>A&&(L=A)}T[e][0]._groupMinRank=L,T[e][0]._preGroupSort=e}var I=function(F,H){return F.trace.legendrank-H.trace.legendrank||F._preSort-H._preSort};for(T.forEach(function(F,H){F[0]._preGroupSort=H}),T.sort(function(F,H){return F[0]._groupMinRank-H[0]._groupMinRank||F[0]._preGroupSort-H[0]._preGroupSort}),e=0;e<T.length;e++){T[e].forEach(function(F,H){F._preSort=H}),T[e].sort(I);var P=T[e][0].trace,S=null;for(n=0;n<T[e].length;n++){var E=T[e][n].trace.legendgrouptitle;if(E&&E.text){S=E,t&&(E.font=v._groupTitleFont);break}}if(r&&T[e].reverse(),S){var D=!1;for(n=0;n<T[e].length;n++)if(g.traceIs(T[e][n].trace,"pie-like")){D=!0;break}T[e].unshift({i:-1,groupTitle:S,noClick:D,trace:{showlegend:P.showlegend,legendgroup:P.legendgroup,visible:v.groupclick==="toggleitem"||P.visible}})}for(n=0;n<T[e].length;n++)T[e][n]=[T[e][n]]}return v._lgroupsLength=T.length,v._maxNameLength=s,T}},{"../../registry":638,"./helpers":422}],421:[function(y,ee,te){var g=y("../../lib"),m=y("../../registry"),b=!0;ee.exports=function(v,e,n){var t=e._fullLayout;if(!e._dragged&&!e._editing){var o,r=t.legend.itemclick,d=t.legend.itemdoubleclick,c=t.legend.groupclick;if(n===1&&r==="toggle"&&d==="toggleothers"&&b&&e.data&&e._context.showTips&&g.notifier(g._(e,"Double-click on legend to isolate one trace"),"long"),b=!1,n===1?o=r:n===2&&(o=d),o){var i=c==="togglegroup",u=t.hiddenlabels?t.hiddenlabels.slice():[],f=v.data()[0][0];if(!f.groupTitle||!f.noClick){var s,h,p,a,x,l=e._fullData,w=f.trace,_=w.legendgroup,T={},k=[],L=[],A=[];
1213if(m.traceIs(w,"pie-like")){var I=f.label,P=u.indexOf(I);o==="toggle"?P===-1?u.push(I):u.splice(P,1):o==="toggleothers"&&(u=[],e.calcdata[0].forEach(function(U){I!==U.label&&u.push(U.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===u.length&&P===-1&&(u=[])),m.call("_guiRelayout",e,"hiddenlabels",u)}else{var S,E=_&&_.length,D=[];if(E)for(s=0;s<l.length;s++)(S=l[s]).visible&&S.legendgroup===_&&D.push(s);if(o==="toggle"){var F;switch(w.visible){case!0:F="legendonly";break;case!1:F=!1;break;case"legendonly":F=!0}if(E)if(i)for(s=0;s<l.length;s++)l[s].visible!==!1&&l[s].legendgroup===_&&N(l[s],F);else N(w,F);else N(w,F)}else if(o==="toggleothers"){var H,V,Z,K,q=!0;for(s=0;s<l.length;s++)if(H=l[s]===w,Z=l[s].showlegend!==!0,!(H||Z||(V=E&&l[s].legendgroup===_)||l[s].visible!==!0||m.traceIs(l[s],"notLegendIsolatable"))){q=!1;break}for(s=0;s<l.length;s++)if(l[s].visible!==!1&&!m.traceIs(l[s],"notLegendIsolatable"))switch(w.visible){case"legendonly":N(l[s],!0);break;case!0:K=!!q||"legendonly",H=l[s]===w,Z=l[s].showlegend!==!0&&!l[s].legendgroup,V=H||E&&l[s].legendgroup===_,N(l[s],!(!V&&!Z)||K)}}for(s=0;s<L.length;s++)if(p=L[s]){var W=p.constructUpdate(),$=Object.keys(W);for(h=0;h<$.length;h++)a=$[h],(T[a]=T[a]||[])[A[s]]=W[a]}for(x=Object.keys(T),s=0;s<x.length;s++)for(a=x[s],h=0;h<k.length;h++)T[a].hasOwnProperty(h)||(T[a][h]=void 0);m.call("_guiRestyle",e,T,k)}}}}function R(U,Q,j){var X=k.indexOf(U),J=T[Q];return J||(J=T[Q]=[]),k.indexOf(U)===-1&&(k.push(U),X=k.length-1),J[X]=j,X}function N(U,Q){if(!f.groupTitle||i){var j=U._fullInput;if(m.hasTransform(j,"groupby")){var X=L[j.index];if(!X){var J=m.getTransformIndices(j,"groupby"),re=J[J.length-1];X=g.keyedContainer(j,"transforms["+re+"].styles","target","value.visible"),L[j.index]=X}var ne=X.get(U._group);ne===void 0&&(ne=!0),ne!==!1&&X.set(U._group,Q),A[j.index]=R(j.index,"visible",j.visible!==!1)}else{var se=j.visible!==!1&&Q;R(j.index,"visible",se)}}}}},{"../../lib":503,"../../registry":638}],422:[function(y,ee,te){te.isGrouped=function(g){return(g.traceorder||"").indexOf("grouped")!==-1},te.isVertical=function(g){return g.orientation!=="h"},te.isReversed=function(g){return(g.traceorder||"").indexOf("reversed")!==-1}},{}],423:[function(y,ee,te){ee.exports={moduleType:"component",name:"legend",layoutAttributes:y("./attributes"),supplyLayoutDefaults:y("./defaults"),draw:y("./draw"),style:y("./style")}},{"./attributes":416,"./defaults":418,"./draw":419,"./style":424}],424:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../registry"),b=y("../../lib"),v=b.strTranslate,e=y("../drawing"),n=y("../color"),t=y("../colorscale/helpers").extractOpts,o=y("../../traces/scatter/subtypes"),r=y("../../traces/pie/style_one"),d=y("../../traces/pie/helpers").castOption,c=y("./constants");function i(s,h){return(h?"radial":"horizontal")+(s?"":"reversed")}function u(s){var h=s[0].trace,p=h.contours,a=o.hasLines(h),x=o.hasMarkers(h),l=h.visible&&h.fill&&h.fill!=="none",w=!1,_=!1;if(p){var T=p.coloring;T==="lines"?w=!0:a=T==="none"||T==="heatmap"||p.showlines,p.type==="constraint"?l=p._operation!=="=":T!=="fill"&&T!=="heatmap"||(_=!0)}return{showMarker:x,showLine:a,showFill:l,showGradientLine:w,showGradientFill:_,anyLine:a||w,anyFill:l||_}}function f(s,h,p){return s&&b.isArrayOrTypedArray(s)?h:s>p?p:s}ee.exports=function(s,h,p){var a=h._fullLayout;p||(p=a.legend);var x=p.itemsizing==="constant",l=p.itemwidth,w=(l+2*c.itemGap)/2,_=v(w,0),T=function(A,I,P,S){var E;if(A+1)E=A;else{if(!(I&&I.width>0))return 0;E=I.width}return x?S:Math.min(E,P)};function k(A,I,P){var S=A[0].trace,E=S.marker||{},D=E.line||{},F=P?S.visible&&S.type===P:m.traceIs(S,"bar"),H=g.select(I).select("g.legendpoints").selectAll("path.legend"+P).data(F?[A]:[]);H.enter().append("path").classed("legend"+P,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),H.exit().remove(),H.each(function(V){var Z=g.select(this),K=V[0],q=T(K.mlw,E.line,5,2);Z.style("stroke-width",q+"px");var W=K.mcc;if(!p._inHover&&"mc"in K){var $=t(E),R=$.mid;R===void 0&&(R=($.max+$.min)/2),W=e.tryColorscale(E,"")(R)}var N=W||K.mc||E.color,U=E.pattern,Q=U&&e.getPatternAttr(U.shape,0,"");if(Q){var j=e.getPatternAttr(U.bgcolor,0,null),X=e.getPatternAttr(U.fgcolor,0,null),J=U.fgopacity,re=f(U.size,8,10),ne=f(U.solidity,.5,1),se="legend-"+S.uid;Z.call(e.pattern,"legend",h,se,Q,re,ne,W,U.fillmode,j,X,J)}
1213else Z.call(n.fill,N);q&&n.stroke(Z,K.mlc||D.color)})}function L(A,I,P){var S=A[0],E=S.trace,D=P?E.visible&&E.type===P:m.traceIs(E,P),F=g.select(I).select("g.legendpoints").selectAll("path.legend"+P).data(D?[A]:[]);if(F.enter().append("path").classed("legend"+P,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),F.exit().remove(),F.size()){var H=(E.marker||{}).line,V=T(d(H.width,S.pts),H,5,2),Z=b.minExtend(E,{marker:{line:{width:V}}});Z.marker.line.color=H.color;var K=b.minExtend(S,{trace:Z});r(F,K,Z)}}s.each(function(A){var I=g.select(this),P=b.ensureSingle(I,"g","layers");P.style("opacity",A[0].trace.opacity);var S=p.valign,E=A[0].lineHeight,D=A[0].height;if(S!=="middle"&&E&&D){var F={top:1,bottom:-1}[S]*(.5*(E-D+3));P.attr("transform",v(0,F))}else P.attr("transform",null);P.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),P.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var H=P.selectAll("g.legendsymbols").data([A]);H.enter().append("g").classed("legendsymbols",!0),H.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var I,P=A[0].trace,S=[];if(P.visible)switch(P.type){case"histogram2d":case"heatmap":S=[["M-15,-2V4H15V-2Z"]],I=!0;break;case"choropleth":case"choroplethmapbox":S=[["M-6,-6V6H6V-6Z"]],I=!0;break;case"densitymapbox":S=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],I="radial";break;case"cone":S=[["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"]],I=!1;break;case"streamtube":S=[["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"]],I=!1;break;case"surface":S=[["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"]],I=!0;break;case"mesh3d":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],I=!1;break;case"volume":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],I=!0;break;case"isosurface":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],I=!1}var E=g.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(S);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(D,F){var H,V=g.select(this),Z=t(P),K=Z.colorscale,q=Z.reversescale;if(K){if(!I){var W=K.length;H=F===0?K[q?W-1:0][1]:F===1?K[q?0:W-1][1]:K[Math.floor((W-1)/2)][1]}}else{var $=P.vertexcolor||P.facecolor||P.color;H=b.isArrayOrTypedArray($)?$[F]||$[0]:$}V.attr("d",D[0]),H?V.call(n.fill,H):V.call(function(R){if(R.size()){var N="legendfill-"+P.uid;e.gradient(R,h,N,i(q,I==="radial"),K,"fill")}})})}).each(function(A){var I=A[0].trace,P=I.type==="waterfall";if(A[0]._distinct&&P){var S=A[0].trace[A[0].dir].marker;return A[0].mc=S.color,A[0].mlw=S.line.width,A[0].mlc=S.line.color,k(A,this,"waterfall")}var E=[];I.visible&&P&&(E=A[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 D=g.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);D.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(F){var H=g.select(this),V=I[F[0]].marker,Z=T(void 0,V.line,5,2);H.attr("d",F[1]).style("stroke-width",Z+"px").call(n.fill,V.color),Z&&H.call(n.stroke,V.line.color)})}).each(function(A){k(A,this,"funnel")}).each(function(A){k(A,this)}).each(function(A){var I=A[0].trace,P=g.select(this).select("g.legendpoints").selectAll("path.legendbox").data(I.visible&&m.traceIs(I,"box-violin")?[A]:[]);P.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),P.exit().remove(),P.each(function(){var S=g.select(this);if(I.boxpoints!=="all"&&I.points!=="all"||n.opacity(I.fillcolor)!==0||n.opacity((I.line||{}).color)!==0){var E=T(void 0,I.line,5,2);S.style("stroke-width",E+"px").call(n.fill,I.fillcolor),E&&n.stroke(S,I.line.color)}else{var D=b.minExtend(I,{marker:{size:x?12:b.constrain(I.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});P.call(e.pointStyle,D,h)}})}).each(function(A){L(A,this,"funnelarea")}).each(function(A){L(A,this,"pie")}
1213).each(function(A){var I,P,S=u(A),E=S.showFill,D=S.showLine,F=S.showGradientLine,H=S.showGradientFill,V=S.anyFill,Z=S.anyLine,K=A[0],q=K.trace,W=t(q),$=W.colorscale,R=W.reversescale,N=o.hasMarkers(q)||!V?"M5,0":Z?"M5,-2":"M5,-3",U=g.select(this),Q=U.select(".legendfill").selectAll("path").data(E||H?[A]:[]);if(Q.enter().append("path").classed("js-fill",!0),Q.exit().remove(),Q.attr("d",N+"h"+l+"v6h-"+l+"z").call(function(J){if(J.size())if(E)e.fillGroupStyle(J,h);else{var re="legendfill-"+q.uid;e.gradient(J,h,re,i(R),$,"fill")}}),D||F){var j=T(void 0,q.line,10,5);P=b.minExtend(q,{line:{width:j}}),I=[b.minExtend(K,{trace:P})]}var X=U.select(".legendlines").selectAll("path").data(D||F?[I]:[]);X.enter().append("path").classed("js-line",!0),X.exit().remove(),X.attr("d",N+(F?"l"+l+",0.0001":"h"+l)).call(D?e.lineGroupStyle:function(J){if(J.size()){var re="legendline-"+q.uid;e.lineGroupStyle(J),e.gradient(J,h,re,i(R),$,"stroke")}})}).each(function(A){var I,P,S=u(A),E=S.anyFill,D=S.anyLine,F=S.showLine,H=S.showMarker,V=A[0],Z=V.trace,K=!H&&!D&&!E&&o.hasText(Z);function q(X,J,re,ne){var se=b.nestedProperty(Z,X).get(),oe=b.isArrayOrTypedArray(se)&&J?J(se):se;if(x&&oe&&ne!==void 0&&(oe=ne),re){if(oe<re[0])return re[0];if(oe>re[1])return re[1]}return oe}function W(X){return V._distinct&&V.index&&X[V.index]?X[V.index]:X[0]}if(H||K||F){var $={},R={};if(H){$.mc=q("marker.color",W),$.mx=q("marker.symbol",W),$.mo=q("marker.opacity",b.mean,[.2,1]),$.mlc=q("marker.line.color",W),$.mlw=q("marker.line.width",b.mean,[0,5],2),R.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var N=q("marker.size",b.mean,[2,16],12);$.ms=N,R.marker.size=N}F&&(R.line={width:q("line.width",W,[0,10],5)}),K&&($.tx="Aa",$.tp=q("textposition",W),$.ts=10,$.tc=q("textfont.color",W),$.tf=q("textfont.family",W)),I=[b.minExtend(V,$)],(P=b.minExtend(Z,R)).selectedpoints=null,P.texttemplate=null}var U=g.select(this).select("g.legendpoints"),Q=U.selectAll("path.scatterpts").data(H?I:[]);Q.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),Q.exit().remove(),Q.call(e.pointStyle,P,h),H&&(I[0].mrc=3);var j=U.selectAll("g.pointtext").data(K?I:[]);j.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),j.exit().remove(),j.selectAll("text").call(e.textPointStyle,P,h)}).each(function(A){var I=A[0].trace,P=g.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(I.visible&&I.type==="candlestick"?[A,A]:[]);P.enter().append("path").classed("legendcandle",!0).attr("d",function(S,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",_).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(S,E){var D=g.select(this),F=I[E?"increasing":"decreasing"],H=T(void 0,F.line,5,2);D.style("stroke-width",H+"px").call(n.fill,F.fillcolor),H&&n.stroke(D,F.line.color)})}).each(function(A){var I=A[0].trace,P=g.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(I.visible&&I.type==="ohlc"?[A,A]:[]);P.enter().append("path").classed("legendohlc",!0).attr("d",function(S,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",_).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(S,E){var D=g.select(this),F=I[E?"increasing":"decreasing"],H=T(void 0,F.line,5,2);D.style("fill","none").call(e.dashLine,F.line.dash,H),H&&n.stroke(D,F.line.color)})})}},{"../../lib":503,"../../registry":638,"../../traces/pie/helpers":905,"../../traces/pie/style_one":911,"../../traces/scatter/subtypes":951,"../color":366,"../colorscale/helpers":377,"../drawing":388,"./constants":417,"@plotly/d3":58}],425:[function(y,ee,te){y("./constants"),ee.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},{"./constants":427}],426:[function(y,ee,te){var g=y("../../registry"),m=y("../../plots/plots"),b=y("../../plots/cartesian/axis_ids"),v=y("../../fonts/ploticon"),e=y("../shapes/draw").eraseActiveShape,n=y("../../lib"),t=n._,o=ee.exports={};function r(a,x){var l,w,_=x.currentTarget,T=_.getAttribute("data-attr"),k=_.getAttribute("data-val")||!0,L=a._fullLayout,A={},I=b.list(a,null,!0),P=L._cartesianSpikesEnabled;if(T==="zoom"){var S,E=k==="in"?.5:2,D=(1+E)/2,F=(1-E)/2;for(w=0;w<I.length;w++)if(!(l=I[w]).fixedrange)if(S=l._name,k==="auto")A[S+".autorange"]=!0;else if(k==="reset"){if(l._rangeInitial===void 0)A[S+".autorange"]=!0;else{var H=l._rangeInitial.slice();
1213A[S+".range[0]"]=H[0],A[S+".range[1]"]=H[1]}l._showSpikeInitial!==void 0&&(A[S+".showspikes"]=l._showSpikeInitial,P!=="on"||l._showSpikeInitial||(P="off"))}else{var V=[l.r2l(l.range[0]),l.r2l(l.range[1])],Z=[D*V[0]+F*V[1],D*V[1]+F*V[0]];A[S+".range[0]"]=l.l2r(Z[0]),A[S+".range[1]"]=l.l2r(Z[1])}}else T!=="hovermode"||k!=="x"&&k!=="y"||(k=L._isHoriz?"y":"x",_.setAttribute("data-val",k)),A[T]=k;L._cartesianSpikesEnabled=P,g.call("_guiRelayout",a,A)}function d(a,x){for(var l=x.currentTarget,w=l.getAttribute("data-attr"),_=l.getAttribute("data-val")||!0,T=a._fullLayout._subplots.gl3d||[],k={},L=w.split("."),A=0;A<T.length;A++)k[T[A]+"."+L[1]]=_;var I=_==="pan"?_:"zoom";k.dragmode=I,g.call("_guiRelayout",a,k)}function c(a,x){for(var l=x.currentTarget.getAttribute("data-attr"),w=l==="resetLastSave",_=l==="resetDefault",T=a._fullLayout,k=T._subplots.gl3d||[],L={},A=0;A<k.length;A++){var I,P=k[A],S=P+".camera",E=P+".aspectratio",D=P+".aspectmode",F=T[P]._scene;w?(L[S+".up"]=F.viewInitial.up,L[S+".eye"]=F.viewInitial.eye,L[S+".center"]=F.viewInitial.center,I=!0):_&&(L[S+".up"]=null,L[S+".eye"]=null,
1213L[S+".center"]=null,I=!0),I&&(L[E+".x"]=F.viewInitial.aspectratio.x,L[E+".y"]=F.viewInitial.aspectratio.y,L[E+".z"]=F.viewInitial.aspectratio.z,L[D]=F.viewInitial.aspectmode)}g.call("_guiRelayout",a,L)}function i(a,x){var l=x.currentTarget,w=l._previousVal,_=a._fullLayout,T=_._subplots.gl3d||[],k=["xaxis","yaxis","zaxis"],L={},A={};if(w)A=w,l._previousVal=null;else{for(var I=0;I<T.length;I++){var P=T[I],S=_[P],E=P+".hovermode";L[E]=S.hovermode,A[E]=!1;for(var D=0;D<3;D++){var F=k[D],H=P+"."+F+".showspikes";A[H]=!1,L[H]=S[F].showspikes}}l._previousVal=L}return A}function u(a,x){for(var l=x.currentTarget,w=l.getAttribute("data-attr"),_=l.getAttribute("data-val")||!0,T=a._fullLayout,k=T._subplots.geo||[],L=0;L<k.length;L++){var A=k[L],I=T[A];if(w==="zoom"){var P=I.projection.scale,S=_==="in"?2*P:.5*P;g.call("_guiRelayout",a,A+".projection.scale",S)}}w==="reset"&&p(a,"geo")}function f(a){var x=a._fullLayout;return!x.hovermode&&(x._has("cartesian")?x._isHoriz?"y":"x":"closest")}function s(a){var x=f(a);g.call("_guiRelayout",a,"hovermode",x)}function h(a,x){for(var l=x.currentTarget.getAttribute("data-val"),w=a._fullLayout,_=w._subplots.mapbox||[],T={},k=0;k<_.length;k++){var L=_[k],A=w[L].zoom,I=l==="in"?1.05*A:A/1.05;T[L+".zoom"]=I}g.call("_guiRelayout",a,T)}function p(a,x){for(var l=a._fullLayout,w=l._subplots[x]||[],_={},T=0;T<w.length;T++)for(var k=w[T],L=l[k]._subplot.viewInitial,A=Object.keys(L),I=0;I<A.length;I++){var P=A[I];_[k+"."+P]=L[P]}g.call("_guiRelayout",a,_)}o.toImage={name:"toImage",title:function(a){var x=(a._context.toImageButtonOptions||{}).format||"png";return t(a,x==="png"?"Download plot as a png":"Download plot")},icon:v.camera,click:function(a){var x=a._context.toImageButtonOptions,l={format:x.format||"png"};n.notifier(t(a,"Taking snapshot - this may take a few seconds"),"long"),l.format!=="svg"&&n.isIE()&&(n.notifier(t(a,"IE only supports svg.  Changing format to svg."),"long"),l.format="svg"),["filename","width","height","scale"].forEach(function(w){w in x&&(l[w]=x[w])}),g.call("downloadImage",a,l).then(function(w){n.notifier(t(a,"Snapshot succeeded")+" - "+w,"long")}).catch(function(){n.notifier(t(a,"Sorry, there was a problem downloading your snapshot!"),"long")})}},o.sendDataToCloud={name:"sendDataToCloud",title:function(a){return t(a,"Edit in Chart Studio")},icon:v.disk,click:function(a){m.sendDataToCloud(a)}},o.editInChartStudio={name:"editInChartStudio",title:function(a){return t(a,"Edit in Chart Studio")},icon:v.pencil,click:function(a){m.sendDataToCloud(a)}},o.zoom2d={name:"zoom2d",_cat:"zoom",title:function(a){return t(a,"Zoom")},attr:"dragmode",val:"zoom",icon:v.zoombox,click:r},o.pan2d={name:"pan2d",_cat:"pan",title:function(a){return t(a,"Pan")},attr:"dragmode",val:"pan",icon:v.pan,click:r},o.select2d={name:"select2d",_cat:"select",title:function(a){return t(a,"Box Select")},attr:"dragmode",val:"select",icon:v.selectbox,click:r},o.lasso2d={name:"lasso2d",_cat:"lasso",title:function(a){return t(a,"Lasso Select")},attr:"dragmode",val:"lasso",icon:v.lasso,click:r},o.drawclosedpath={name:"drawclosedpath",title:function(a){return t(a,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:v.drawclosedpath,click:r},o.drawopenpath={name:"drawopenpath",title:function(a){return t(a,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:v.drawopenpath,click:r},o.drawline={name:"drawline",title:function(a){return t(a,"Draw line")},attr:"dragmode",val:"drawline",icon:v.drawline,click:r},o.drawrect={name:"drawrect",title:function(a){return t(a,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:v.drawrect,click:r},o.drawcircle={name:"drawcircle",title:function(a){return t(a,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:v.drawcircle,click:r},o.eraseshape={name:"eraseshape",title:function(a){return t(a,"Erase active shape")},icon:v.eraseshape,click:e},o.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(a){return t(a,"Zoom in")},attr:"zoom",val:"in",icon:v.zoom_plus,click:r},o.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(a){return t(a,"Zoom out")},attr:"zoom",val:"out",icon:v.zoom_minus,click:r},o.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(a){return t(a,"Autoscale")},attr:"zoom",val:"auto",icon:v.autoscale,click:r},o.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(a){return t(a,"Reset axes")},attr:"zoom",val:"reset",icon:v.home,click:r},o.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(a){return t(a,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:v.tooltip_basic,gravity:"ne",click:r},o.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(a){return t(a,"Compare data on hover")},attr:"hovermode",val:function(a){return a._fullLayout._isHoriz?"y":"x"},icon:v.tooltip_compare,gravity:"ne",click:r},o.zoom3d={name:"zoom3d",_cat:"zoom",title:function(a){return t(a,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:v.zoombox,click:d},o.pan3d={name:"pan3d",_cat:"pan",title:function(a){return t(a,"Pan")},attr:"scene.dragmode",val:"pan",icon:v.pan,click:d},o.orbitRotation={name:"orbitRotation",title:function(a){return t(a,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:v["3d_rotate"],click:d},o.tableRotation={name:"tableRotation",title:function(a){return t(a,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:v["z-axis"],click:d},o.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(a){return t(a,"Reset camera to default")},attr:"resetDefault",icon:v.home,click:c},o.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(a){return t(a,"Reset camera to last save")},attr:"resetLastSave",icon:v.movie,click:c},o.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(a){return t(a,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:v.tooltip_basic,gravity:"ne",click:function(a,x){var l=i(a,x);g.call("_guiRelayout",a,l)}},o.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(a){return t(a,"Zoom in")},attr:"zoom",val:"in",icon:v.zoom_plus,click:u},o.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(a){return t(a,"Zoom out")},attr:"zoom",val:"out",icon:v.zoom_minus,click:u},o.resetGeo={name:"resetGeo",_cat:"reset",title:function(a){return t(a,"Reset")},attr:"reset",val:null,icon:v.autoscale,click:u},o.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(a){return t(a,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:v.tooltip_basic,gravity:"ne",click:s},o.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(a){return t(a,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:v.tooltip_basic,gravity:"ne",click:s},o.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(a){return t(a,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:v.tooltip_basic,gravity:"ne",click:s},o.resetViewSankey={name:"resetSankeyGroup",title:function(a){return t(a,"Reset view")},icon:v.home,click:function(a){for(var x={"node.groups":[],"node.x":[],"node.y":[]},l=0;l<a._fullData.length;l++){var w=a._fullData[l]._viewInitial;x["node.groups"].push(w.node.groups.slice()),x["node.x"].push(w.node.x.slice()),x["node.y"].push(w.node.y.slice())}g.call("restyle",a,x)}},o.toggleHover={name:"toggleHover",title:function(a){return t(a,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:v.tooltip_basic,gravity:"ne",click:function(a,x){var l=i(a,x);l.hovermode=f(a),g.call("_guiRelayout",a,l)}},o.resetViews={name:"resetViews",title:function(a){return t(a,"Reset views")},icon:v.home,click:function(a,x){var l=x.currentTarget;l.setAttribute("data-attr","zoom"),l.setAttribute("data-val","reset"),r(a,x),l.setAttribute("data-attr","resetLastSave"),c(a,x),p(a,"geo"),p(a,"mapbox")}},o.toggleSpikelines={name:"toggleSpikelines",title:function(a){return t(a,"Toggle Spike Lines")},icon:v.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(a){var x=a._fullLayout,l=x._c
1213artesianSpikesEnabled;x._cartesianSpikesEnabled=l==="on"?"off":"on",g.call("_guiRelayout",a,function(w){for(var _=w._fullLayout._cartesianSpikesEnabled==="on",T=b.list(w,null,!0),k={},L=0;L<T.length;L++){var A=T[L];k[A._name+".showspikes"]=!!_||A._showSpikeInitial}return k}(a))}},o.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(a){return t(a,"Reset view")},attr:"reset",icon:v.home,click:function(a){p(a,"mapbox")}},o.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(a){return t(a,"Zoom in")},attr:"zoom",val:"in",icon:v.zoom_plus,click:h},o.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(a){return t(a,"Zoom out")},attr:"zoom",val:"out",icon:v.zoom_minus,click:h}},{"../../fonts/ploticon":482,"../../lib":503,"../../plots/cartesian/axis_ids":558,"../../plots/plots":619,"../../registry":638,"../shapes/draw":450}],427:[function(y,ee,te){var g=y("./buttons"),m=Object.keys(g),b=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],v=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(b),e=[];m.forEach(function(n){(function(t){if(v.indexOf(t._cat||t.name)===-1){var o=t.name,r=(t._cat||t.name).toLowerCase();e.indexOf(o)===-1&&e.push(o),e.indexOf(r)===-1&&e.push(r)}})(g[n])}),e.sort(),ee.exports={DRAW_MODES:b,backButtons:v,foreButtons:e}},{"./buttons":426}],428:[function(y,ee,te){var g=y("../../lib"),m=y("../color"),b=y("../../plot_api/plot_template"),v=y("./attributes");ee.exports=function(e,n){var t=e.modebar||{},o=b.newContainer(n,"modebar");function r(c,i){return g.coerce(t,o,v,c,i)}r("orientation"),r("bgcolor",m.addOpacity(n.paper_bgcolor,.5));var d=m.contrast(m.rgb(n.modebar.bgcolor));r("color",m.addOpacity(d,.3)),r("activecolor",m.addOpacity(d,.7)),r("uirevision",n.uirevision),r("add"),r("remove")}},{"../../lib":503,"../../plot_api/plot_template":543,"../color":366,"./attributes":425}],429:[function(y,ee,te){ee.exports={moduleType:"component",name:"modebar",layoutAttributes:y("./attributes"),supplyLayoutDefaults:y("./defaults"),manage:y("./manage")}},{"./attributes":425,"./defaults":428,"./manage":430}],430:[function(y,ee,te){var g=y("../../plots/cartesian/axis_ids"),m=y("../../traces/scatter/subtypes"),b=y("../../registry"),v=y("../fx/helpers").isUnifiedHover,e=y("./modebar"),n=y("./buttons"),t=y("./constants").DRAW_MODES;ee.exports=function(o){var r=o._fullLayout,d=o._context,c=r._modeBar;if(d.displayModeBar||d.watermark){if(!Array.isArray(d.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(d.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i,u=d.modeBarButtons;i=Array.isArray(u)&&u.length?function(f){for(var s=0;s<f.length;s++)for(var h=f[s],p=0;p<h.length;p++){var a=h[p];if(typeof a=="string"){if(n[a]===void 0)throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));f[s][p]=n[a]}}return f}(u):!d.displayModeBar&&d.watermark?[]:function(f){var s=f._fullLayout,h=f._fullData,p=f._context;function a(ne,se){if(typeof se=="string"){if(se.toLowerCase()===ne.toLowerCase())return!0}else{var oe=se.name,pe=se._cat||se.name;if(oe===ne||pe===ne.toLowerCase())return!0}return!1}var x=s.modebar.add;typeof x=="string"&&(x=[x]);var l=s.modebar.remove;typeof l=="string"&&(l=[l]);var w=p.modeBarButtonsToAdd.concat(x.filter(function(ne){for(var se=0;se<p.modeBarButtonsToRemove.length;se++)if(a(ne,p.modeBarButtonsToRemove[se]))return!1;return!0})),_=p.modeBarButtonsToRemove.concat(l.filter(function(ne){for(var se=0;se<p.modeBarButtonsToAdd.length;se++)if(a(ne,p.modeBarButtonsToAdd[se]))return!1;return!0})),T=s._has("cartesian"),k=s._has("gl3d"),L=s._has("geo"),A=s._has("pie"),I=s._has("funnelarea"),P=s._has("gl2d"),S=s._has("ternary"),E=s._has("mapbox"),D=s._has("polar"),F=s._has("smith"),H=s._has("sankey"),V=function(ne){for(var se=g.list({_fullLayout:ne},null,!0),oe=0;oe<se.length;oe++)if(!se[oe].fixedrange)return!1;return!0}(s),Z=v(s.hovermode),K=[];function q(ne){if(ne.length){for(var se=[],oe=0;oe<ne.length;oe++){for(var pe=ne[oe],ce=n[pe],de=ce.name.toLowerCase(),xe=(ce._cat||ce.name).toLowerCase(),we=!1,be=0;be<_.length;be++){var Ee=_[be].toLowerCase();if(Ee===de||Ee===xe){we=!0;break}}we||se.push(n[pe])}K.push(se)}}var W=["toImage"];p.showEditInChartStudio?W.push("editInChartStudio"):p.showSendToCloud&&W.push("sendDataToCloud"),q(W);var $=[],R=[],N=[],U=[];(T||P||A||I||S)+L+k+E+D+F>1?(R=["toggleHover"],N=["resetViews"]):L?($=["zoomInGeo","zoomOutGeo"],R=["hoverClosestGeo"],N=["resetGeo"]):k?(R=["hoverClosest3d"],N=["resetCameraDefault3d","resetCameraLastSave3d"]):E?($=["zoomInMapbox","zoomOutMapbox"],R=["toggleHover"],N=["resetViewMapbox"]):P?R=["hoverClosestGl2d"]:A?R=["hoverClosestPie"]:H?(R=["hoverClosestCartesian","hoverCompareCartesian"],N=["resetViewSankey"]):R=["toggleHover"],T&&(R=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(ne){for(var se=0;se<ne.length;se++)if(!b.traceIs(ne[se],"noHover"))return!1;return!0}(h)||Z)&&(R=[]),!T&&!P||V||($=["zoomIn2d","zoomOut2d","autoScale2d"],N[0]!=="resetViews"&&(N=["resetScale2d"])),k?U=["zoom3d","pan3d","orbitRotation","tableRotation"]:(T||P)&&!V||S?U=["zoom2d","pan2d"]:E||L?U=["pan2d"]:D&&(U=["zoom2d"]),function(ne){for(var se=!1,oe=0;oe<ne.length&&!se;oe++){var pe=ne[oe];pe._module&&pe._module.selectPoints&&(b.traceIs(pe,"scatter-like")?(m.hasMarkers(pe)||m.hasText(pe))&&(se=!0):b.traceIs(pe,"box-violin")&&pe.boxpoints!=="all"&&pe.points!=="all"||(se=!0))}return se}(h)&&U.push("select2d","lasso2d");var Q=[],j=function(ne){Q.indexOf(ne)===-1&&R.indexOf(ne)!==-1&&Q.push(ne)};if(Array.isArray(w)){for(var X=[],J=0;J<w.length;J++){var re=w[J];typeof re=="string"?(re=re.toLowerCase(),t.indexOf(re)!==-1?(s._has("mapbox")||s._has("cartesian"))&&U.push(re):re==="togglespikelines"?j("toggleSpikelines"):re==="togglehover"?j("toggleHover"):re==="hovercompare"?j("hoverCompareCartesian"):re==="hoverclosest"?(j("hoverClosestCartesian"),j("hoverClosestGeo"),j("hoverClosest3d"),j("hoverClosestGl2d"),j("hoverClosestPie")):re==="v1hovermode"&&(j("toggleHover"),j("hoverClosestCartesian"),j("hoverCompareCartesian"),j("hoverClosestGeo"),j("hoverClosest3d"),j("hoverClosestGl2d"),j("hoverClosestPie"))):X.push(re)}w=X}return q(U),q($.concat(N)),q(Q),function(ne,se){if(se.length)if(Array.isArray(se[0]))for(var oe=0;oe<se.length;oe++)ne.push(se[oe]);else ne.push(se);return ne}(K,w)}(o),c?c.update(o,i):r._modeBar=e(o,i)}else c&&(c.destroy(),delete r._modeBar)}},{"../../plots/cartesian/axis_ids":558,"../../registry":638,"../../traces/scatter/subtypes":951,"../fx/helpers":402,"./buttons":426,"./constants":427,"./modebar":431}],431:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("../../lib"),v=y("../../fonts/ploticon"),e=y("../../version").version,n=new DOMParser;function t(r){this.container=r.container,this.element=document.createElement("div"),this.update(r.graphInfo,r.buttons),this.container.appendChild(this.element)}var o=t.prototype;o.update=function(r,d){this.graphInfo=r;var c=this.graphInfo._context,i=this.graphInfo._fullLayout,u="modebar-"+i._uid;this.element.setAttribute("id",u),this._uid=u,this.element.className="modebar",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),i.modebar.orientation==="v"&&(this.element.className+=" vertical",d=d.reverse());var f=i.modebar,s=c.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";b.deleteRelatedStyleRule(u),b.addRelatedStyleRule(u,s+"#"+u+" .modebar-group","background-color: "+f.bgcolor),b.addRelatedStyleRule(u,"#"+u+" .modebar-btn .icon path","fill: "+f.color),b.addRelatedStyleRule(u,"#"+u+" .modebar-btn:hover .icon path","fill: "+f.activecolor),b.addRelatedStyleRule(u,"#"+u+" .modebar-btn.active .icon path","fill: "+f.activecolor);var h=!this.hasButtons(d),p=this.hasLogo!==c.displaylogo,a=this.locale!==c.locale;if(this.locale=c.locale,(h||p||a)&&(this.removeAllButtons(),this.updateButtons(d),c.watermark||c.displaylogo)){var x=this.getLogo();c.watermark&&(x.className=x.className+" watermark"),i.modebar.orientation==="v"?this.element.insertBefore(x,this.element.childNodes[0]):this.element.appendChild(x),this.hasLogo=!0}this.updateActiveButton()},o.updateButtons=function(r){var d=this;this.buttons=r,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var i=d.createGroup();
1213c.forEach(function(u){var f=u.name;if(!f)throw new Error("must provide button 'name' in button config");if(d.buttonsNames.indexOf(f)!==-1)throw new Error("button name '"+f+"' is taken");d.buttonsNames.push(f);var s=d.createButton(u);d.buttonElements.push(s),i.appendChild(s)}),d.element.appendChild(i)})},o.createGroup=function(){var r=document.createElement("div");return r.className="modebar-group",r},o.createButton=function(r){var d=this,c=document.createElement("a");c.setAttribute("rel","tooltip"),c.className="modebar-btn";var i=r.title;i===void 0?i=r.name:typeof i=="function"&&(i=i(this.graphInfo)),(i||i===0)&&c.setAttribute("data-title",i),r.attr!==void 0&&c.setAttribute("data-attr",r.attr);var u=r.val;if(u!==void 0&&(typeof u=="function"&&(u=u(this.graphInfo)),c.setAttribute("data-val",u)),typeof r.click!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(s){r.click(d.graphInfo,s),d.updateActiveButton(s.currentTarget)}),c.setAttribute("data-toggle",r.toggle||!1),r.toggle&&g.select(c).classed("active",!0);var f=r.icon;return typeof f=="function"?c.appendChild(f()):c.appendChild(this.createIcon(f||v.question)),c.setAttribute("data-gravity",r.gravity||"n"),c},o.createIcon=function(r){var d,c=m(r.height)?Number(r.height):r.ascent-r.descent,i="http://www.w3.org/2000/svg";if(r.path){(d=document.createElementNS(i,"svg")).setAttribute("viewBox",[0,0,r.width,c].join(" ")),d.setAttribute("class","icon");var u=document.createElementNS(i,"path");u.setAttribute("d",r.path),r.transform?u.setAttribute("transform",r.transform):r.ascent!==void 0&&u.setAttribute("transform","matrix(1 0 0 -1 0 "+r.ascent+")"),d.appendChild(u)}return r.svg&&(d=n.parseFromString(r.svg,"application/xml").childNodes[0]),d.setAttribute("height","1em"),d.setAttribute("width","1em"),d},o.updateActiveButton=function(r){var d=this.graphInfo._fullLayout,c=r!==void 0?r.getAttribute("data-attr"):null;this.buttonElements.forEach(function(i){var u=i.getAttribute("data-val")||!0,f=i.getAttribute("data-attr"),s=i.getAttribute("data-toggle")==="true",h=g.select(i);if(s)f===c&&h.classed("active",!h.classed("active"));else{var p=f===null?f:b.nestedProperty(d,f).get();h.classed("active",p===u)}})},o.hasButtons=function(r){var d=this.buttons;if(!d||r.length!==d.length)return!1;for(var c=0;c<r.length;++c){if(r[c].length!==d[c].length)return!1;for(var i=0;i<r[c].length;i++)if(r[c][i].name!==d[c][i].name)return!1}return!0},o.getLogo=function(){var r=this.createGroup(),d=document.createElement("a");return d.href="https://plotly.com/",d.target="_blank",d.setAttribute("data-title",b._(this.graphInfo,"Produced with Plotly.js")+" (v"+e+")"),d.className="modebar-btn plotlyjsicon modebar-btn--logo",d.appendChild(this.createIcon(v.newplotlylogo)),r.appendChild(d),r},o.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},o.destroy=function(){b.removeElement(this.container.querySelector(".modebar")),b.deleteRelatedStyleRule(this._uid)},ee.exports=function(r,d){var c=r._fullLayout,i=new t({graphInfo:r,container:c._modebardiv.node(),buttons:d});return c._privateplot&&g.select(i.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),i}},{"../../fonts/ploticon":482,"../../lib":503,"../../version":1119,"@plotly/d3":58,"fast-isnumeric":190}],432:[function(y,ee,te){var g=y("../../plots/font_attributes"),m=y("../color/attributes"),b=(0,y("../../plot_api/plot_template").templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});ee.exports={visible:{valType:"boolean",editType:"plot"},buttons:b,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:g({editType:"plot"}),bgcolor:{valType:"color",dflt:m.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:m.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},{"../../plot_api/plot_template":543,"../../plots/font_attributes":585,"../color/attributes":365}],433:[function(y,ee,te){ee.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],434:[function(y,ee,te){var g=y("../../lib"),m=y("../color"),b=y("../../plot_api/plot_template"),v=y("../../plots/array_container_defaults"),e=y("./attributes"),n=y("./constants");function t(o,r,d,c){var i=c.calendar;function u(s,h){return g.coerce(o,r,e.buttons,s,h)}if(u("visible")){var f=u("step");f!=="all"&&(!i||i==="gregorian"||f!=="month"&&f!=="year"?u("stepmode"):r.stepmode="backward",u("count")),u("label")}}ee.exports=function(o,r,d,c,i){var u=o.rangeselector||{},f=b.newContainer(r,"rangeselector");function s(a,x){return g.coerce(u,f,e,a,x)}if(s("visible",v(u,f,{name:"buttons",handleItemDefaults:t,calendar:i}).length>0)){var h=function(a,x,l){for(var w=l.filter(function(L){return x[L].anchor===a._id}),_=0,T=0;T<w.length;T++){var k=x[w[T]].domain;k&&(_=Math.max(k[1],_))}return[a.domain[0],_+n.yPad]}(r,d,c);s("x",h[0]),s("y",h[1]),g.noneOrAll(o,r,["x","y"]),s("xanchor"),s("yanchor"),g.coerceFont(s,"font",d.font);var p=s("bgcolor");s("activecolor",m.contrast(p,n.lightAmount,n.darkAmount)),s("bordercolor"),s("borderwidth")}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../color":366,"./attributes":432,"./constants":433}],435:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../registry"),b=y("../../plots/plots"),v=y("../color"),e=y("../drawing"),n=y("../../lib"),t=n.strTranslate,o=y("../../lib/svg_text_utils"),r=y("../../plots/cartesian/axis_ids"),d=y("../../constants/alignment"),c=d.LINE_SPACING,i=d.FROM_TL,u=d.FROM_BR,f=y("./constants"),s=y("./get_update_object");function h(x){return x._id}function p(x,l,w){var _=n.ensureSingle(x,"rect","selector-rect",function(T){T.attr("shape-rendering","crispEdges")});_.attr({rx:f.rx,ry:f.ry}),_.call(v.stroke,l.bordercolor).call(v.fill,function(T,k){return k._isActive||k._isHovered?T.activecolor:T.bgcolor}(l,w)).style("stroke-width",l.borderwidth+"px")}function a(x,l,w,_){n.ensureSingle(x,"text","selector-text",function(T){T.attr("text-anchor","middle")}).call(e.font,l.font).text(function(T,k){return T.label?k?n.templateString(T.label,k):T.label:T.step==="all"?"all":T.count+T.step.charAt(0)}(w,_._fullLayout._meta)).call(function(T){o.convertToTspans(T,_)})}ee.exports=function(x){var l=x._fullLayout._infolayer.selectAll(".rangeselector").data(function(w){for(var _=r.list(w,"x",!0),T=[],k=0;k<_.length;k++){var L=_[k];L.rangeselector&&L.rangeselector.visible&&T.push(L)}return T}(x),h);l.enter().append("g").classed("rangeselector",!0),l.exit().remove(),l.style({cursor:"pointer","pointer-events":"all"}),l.each(function(w){var _=g.select(this),T=w,k=T.rangeselector,L=_.selectAll("g.button").data(n.filterVisible(k.buttons));L.enter().append("g").classed("button",!0),L.exit().remove(),L.each(function(A){var I=g.select(this),P=s(T,A);A._isActive=function(S,E,D){if(E.step==="all")return S.autorange===!0;var F=Object.keys(D);return S.range[0]===D[F[0]]&&S.range[1]===D[F[1]]}(T,A,P),I.call(p,k,A),I.call(a,k,A,x),I.on("click",function(){x._dragged||m.call("_guiRelayout",x,P)}),I.on("mouseover",function(){A._isHovered=!0,I.call(p,k,A)}),I.on("mouseout",function(){A._isHovered=!1,I.call(p,k,A)})}),function(A,I,P,S,E){var D=0,F=0,H=P.borderwidth;I.each(function(){var $=g.select(this).select(".selector-text"),R=P.font.size*c,N=Math.max(R*o.lineCount($),16)+3;F=Math.max(F,N)}),I.each(function(){var $=g.select(this),R=$.select(".selector-rect"),N=$.select(".selector-text"),U=N.node()&&e.bBox(N.node()).width,Q=P.font.size*c,j=o.lineCount(N),X=Math.max(U+10,f.minButtonWidth);$.attr("transform",t(H+D,H)),R.attr({x:0,y:0,width:X,height:F}),o.positionText(N,X/2,F/2-(j-1)*Q/2+3),D+=X+5});var V=A._fullLayout._size,Z=V.l+V.w*P.x,K=V.t+V.h*(1-P.y),q="left";n.isRightAnchor(P)&&(Z-=D,q="right"),n.isCenterAnchor(P)&&(Z-=D/2,q="center");var W="top";n.isBottomAnchor(P)&&(K-=F,W="bottom"),n.isMiddleAnchor(P)&&(K-=F/2,W="middle"),D=Math.ceil(D),F=Math.ceil(F),Z=Math.round(Z),K=Math.round(K),b.autoMargin(A,S+"-range-selector",{x:P.x,y:P.y,l:D*i[q],r:D*u[q],b:F*u[W],t:F*i[W]}),E.attr("transform",t(Z,K))}(x,L,k,T._name,_)})}},{"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axis_ids":558,"../../plots/plots":619,"../../registry":638,"../color":366,"../drawing":388,"./constants":433,"./get_update_object":436,"@plotly/d3":58}],436:[function(y,ee,te){var g=y("d3-time"),m=y("../../lib").titleCase;ee.exports=function(b,v){var e=b._name,n={};if(v.step==="all")n[e+".autorange"]=!0;else{var t=function(o,r){var d,c=o.range,i=new Date(o.r2l(c[1])),u=r.step,f=g["utc"+m(u)],s=r.count;switch(r.stepmode){case"backward":d=o.l2r(+f.offset(i,-s));break;case"todate":var h=f.offset(i,-s);d=o.l2r(+f.ceil(h))}var p=c[1];
1213return[d,p]}(b,v);n[e+".range[0]"]=t[0],n[e+".range[1]"]=t[1]}return n}},{"../../lib":503,"d3-time":122}],437:[function(y,ee,te){ee.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:y("./attributes")}}},layoutAttributes:y("./attributes"),handleDefaults:y("./defaults"),draw:y("./draw")}},{"./attributes":432,"./defaults":434,"./draw":435}],438:[function(y,ee,te){var g=y("../color/attributes");ee.exports={bgcolor:{valType:"color",dflt:g.background,editType:"plot"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},{"../color/attributes":365}],439:[function(y,ee,te){var g=y("../../plots/cartesian/axis_ids").list,m=y("../../plots/cartesian/autorange").getAutoRange,b=y("./constants");ee.exports=function(v){for(var e=g(v,"x",!0),n=0;n<e.length;n++){var t=e[n],o=t[b.name];o&&o.visible&&o.autorange&&(o._input.autorange=!0,o._input.range=o.range=m(v,t))}}},{"../../plots/cartesian/autorange":553,"../../plots/cartesian/axis_ids":558,"./constants":440}],440:[function(y,ee,te){ee.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],441:[function(y,ee,te){var g=y("../../lib"),m=y("../../plot_api/plot_template"),b=y("../../plots/cartesian/axis_ids"),v=y("./attributes"),e=y("./oppaxis_attributes");ee.exports=function(n,t,o){var r=n[o],d=t[o];if(r.rangeslider||t._requestRangeslider[d._id]){g.isPlainObject(r.rangeslider)||(r.rangeslider={});var c,i,u=r.rangeslider,f=m.newContainer(d,"rangeslider");if(_("visible")){_("bgcolor",t.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!d.isValidRange(u.range)),_("range");var s=t._subplots;if(s)for(var h=s.cartesian.filter(function(k){return k.substr(0,k.indexOf("y"))===b.name2id(o)}).map(function(k){return k.substr(k.indexOf("y"),k.length)}),p=g.simpleMap(h,b.id2name),a=0;a<p.length;a++){var x=p[a];c=u[x]||{},i=m.newContainer(f,x,"yaxis");var l,w=t[x];c.range&&w.isValidRange(c.range)&&(l="fixed"),T("rangemode",l)!=="match"&&T("range",w.range.slice())}f._input=u}}function _(k,L){return g.coerce(u,f,v,k,L)}function T(k,L){return g.coerce(c,i,e,k,L)}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_ids":558,"./attributes":438,"./oppaxis_attributes":445}],442:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../registry"),b=y("../../plots/plots"),v=y("../../lib"),e=v.strTranslate,n=y("../drawing"),t=y("../color"),o=y("../titles"),r=y("../../plots/cartesian"),d=y("../../plots/cartesian/axis_ids"),c=y("../dragelement"),i=y("../../lib/setcursor"),u=y("./constants");function f(l,w,_,T){var k=v.ensureSingle(l,"rect",u.bgClassName,function(P){P.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),L=T.borderwidth%2==0?T.borderwidth:T.borderwidth-1,A=-T._offsetShift,I=n.crispRound(w,T.borderwidth);k.attr({width:T._width+L,height:T._height+L,transform:e(A,A),fill:T.bgcolor,stroke:T.bordercolor,"stroke-width":I})}function s(l,w,_,T){var k=w._fullLayout;v.ensureSingleById(k._topdefs,"clipPath",T._clipId,function(L){L.append("rect").attr({x:0,y:0})}).select("rect").attr({width:T._width,height:T._height})}function h(l,w,_,T){var k,L=w.calcdata,A=l.selectAll("g."+u.rangePlotClassName).data(_._subplotsWith,v.identity);A.enter().append("g").attr("class",function(I){return u.rangePlotClassName+" "+I}).call(n.setClipUrl,T._clipId,w),A.order(),A.exit().remove(),A.each(function(I,P){var S=g.select(this),E=P===0,D=d.getFromId(w,I,"y"),F=D._name,H=T[F],V={data:[],layout:{xaxis:{type:_.type,domain:[0,1],range:T.range.slice(),calendar:_.calendar},width:T._width,height:T._height,margin:{t:0,b:0,l:0,r:0}},_context:w._context};_.rangebreaks&&(V.layout.xaxis.rangebreaks=_.rangebreaks),V.layout[F]={type:D.type,domain:[0,1],range:H.rangemode!=="match"?H.range.slice():D.range.slice(),calendar:D.calendar},D.rangebreaks&&(V.layout[F].rangebreaks=D.rangebreaks),b.supplyDefaults(V);var Z=V._fullLayout.xaxis,K=V._fullLayout[F];Z.clearCalc(),Z.setScale(),K.clearCalc(),K.setScale();var q={id:I,plotgroup:S,xaxis:Z,yaxis:K,isRangePlot:!0};E?k=q:(q.mainplot="xy",q.mainplotinfo=k),r.rangePlot(w,q,function(W,$){for(var R=[],N=0;N<W.length;N++){var U=W[N],Q=U[0].trace;Q.xaxis+Q.yaxis===$&&R.push(U)}return R}(L,I))})}function p(l,w,_,T,k){v.ensureSingle(l,"rect",u.maskMinClassName,function(L){L.attr({x:0,y:0,"shape-rendering":"crispEdges"})}).attr("height",T._height).call(t.fill,u.maskColor),v.ensureSingle(l,"rect",u.maskMaxClassName,function(L){L.attr({y:0,"shape-rendering":"crispEdges"})}).attr("height",T._height).call(t.fill,u.maskColor),k.rangemode!=="match"&&(v.ensureSingle(l,"rect",u.maskMinOppAxisClassName,function(L){L.attr({y:0,"shape-rendering":"crispEdges"})}).attr("width",T._width).call(t.fill,u.maskOppAxisColor),v.ensureSingle(l,"rect",u.maskMaxOppAxisClassName,function(L){L.attr({y:0,"shape-rendering":"crispEdges"})}).attr("width",T._width).style("border-top",u.maskOppBorder).call(t.fill,u.maskOppAxisColor))}function a(l,w,_,T){w._context.staticPlot||v.ensureSingle(l,"rect",u.slideBoxClassName,function(k){k.attr({y:0,cursor:u.slideBoxCursor,"shape-rendering":"crispEdges"})}).attr({height:T._height,fill:u.slideBoxFill})}function x(l,w,_,T){var k=v.ensureSingle(l,"g",u.grabberMinClassName),L=v.ensureSingle(l,"g",u.grabberMaxClassName),A={x:0,width:u.handleWidth,rx:u.handleRadius,fill:t.background,stroke:t.defaultLine,"stroke-width":u.handleStrokeWidth,"shape-rendering":"crispEdges"},I={y:Math.round(T._height/4),height:Math.round(T._height/2)};v.ensureSingle(k,"rect",u.handleMinClassName,function(S){S.attr(A)}).attr(I),v.ensureSingle(L,"rect",u.handleMaxClassName,function(S){S.attr(A)}).attr(I);var P={width:u.grabAreaWidth,x:0,y:0,fill:u.grabAreaFill,cursor:w._context.staticPlot?void 0:u.grabAreaCursor};v.ensureSingle(k,"rect",u.grabAreaMinClassName,function(S){S.attr(P)}).attr("height",T._height),v.ensureSingle(L,"rect",u.grabAreaMaxClassName,function(S){S.attr(P)}).attr("height",T._height)}ee.exports=function(l){for(var w=l._fullLayout,_=w._rangeSliderData,T=0;T<_.length;T++){var k=_[T][u.name];k._clipId=k._id+"-"+w._uid}var L=w._infolayer.selectAll("g."+u.containerClassName).data(_,function(A){return A._name});
1213L.exit().each(function(A){var I=A[u.name];w._topdefs.select("#"+I._clipId).remove()}).remove(),_.length!==0&&(L.enter().append("g").classed(u.containerClassName,!0).attr("pointer-events","all"),L.each(function(A){var I=g.select(this),P=A[u.name],S=w[d.id2name(A.anchor)],E=P[d.id2name(A.anchor)];if(P.range){var D,F=v.simpleMap(P.range,A.r2l),H=v.simpleMap(A.range,A.r2l);D=H[0]<H[1]?[Math.min(F[0],H[0]),Math.max(F[1],H[1])]:[Math.max(F[0],H[0]),Math.min(F[1],H[1])],P.range=P._input.range=v.simpleMap(D,A.l2r)}A.cleanRange("rangeslider.range");var V=w._size,Z=A.domain;P._width=V.w*(Z[1]-Z[0]);var K=Math.round(V.l+V.w*Z[0]),q=Math.round(V.t+V.h*(1-A._counterDomainMin)+(A.side==="bottom"?A._depth:0)+P._offsetShift+u.extraPad);I.attr("transform",e(K,q)),P._rl=v.simpleMap(P.range,A.r2l);var W=P._rl[0],$=P._rl[1],R=$-W;if(P.p2d=function(se){return se/P._width*R+W},P.d2p=function(se){return(se-W)/R*P._width},A.rangebreaks){var N=A.locateBreaks(W,$);if(N.length){var U,Q,j=0;for(U=0;U<N.length;U++)j+=(Q=N[U]).max-Q.min;var X=P._width/($-W-j),J=[-X*W];for(U=0;U<N.length;U++)Q=N[U],J.push(J[J.length-1]-X*(Q.max-Q.min));for(P.d2p=function(se){for(var oe=J[0],pe=0;pe<N.length;pe++){var ce=N[pe];if(se>=ce.max)oe=J[pe+1];else if(se<ce.min)break}return oe+X*se},U=0;U<N.length;U++)(Q=N[U]).pmin=P.d2p(Q.min),Q.pmax=P.d2p(Q.max);P.p2d=function(se){for(var oe=J[0],pe=0;pe<N.length;pe++){var ce=N[pe];if(se>=ce.pmax)oe=J[pe+1];else if(se<ce.pmin)break}return(se-oe)/X}}}if(E.rangemode!=="match"){var re=S.r2l(E.range[0]),ne=S.r2l(E.range[1])-re;P.d2pOppAxis=function(se){return(se-re)/ne*P._height}}I.call(f,l,A,P).call(s,l,A,P).call(h,l,A,P).call(p,l,A,P,E).call(a,l,A,P).call(x,l,A,P),function(se,oe,pe,ce){if(oe._context.staticPlot)return;var de=se.select("rect."+u.slideBoxClassName).node(),xe=se.select("rect."+u.grabAreaMinClassName).node(),we=se.select("rect."+u.grabAreaMaxClassName).node();function be(){var Ee=g.event,fe=Ee.target,me=Ee.clientX||Ee.touches[0].clientX,Te=me-se.node().getBoundingClientRect().left,_e=ce.d2p(pe._rl[0]),Ae=ce.d2p(pe._rl[1]),Pe=c.coverSlip();function De(Qe){var Oe,Ue,Ge,Ye=+(Qe.clientX||Qe.touches[0].clientX)-me;switch(fe){case de:Ge="ew-resize",Oe=_e+Ye,Ue=Ae+Ye;break;case xe:Ge="col-resize",Oe=_e+Ye,Ue=Ae;break;case we:Ge="col-resize",Oe=_e,Ue=Ae+Ye;break;default:Ge="ew-resize",Oe=Te,Ue=Te+Ye}if(Ue<Oe){var tt=Ue;Ue=Oe,Oe=tt}ce._pixelMin=Oe,ce._pixelMax=Ue,i(g.select(Pe),Ge),function(lt,vt,It,St){function rt(Vt){return It.l2r(v.constrain(Vt,St._rl[0],St._rl[1]))}var et=rt(St.p2d(St._pixelMin)),Tt=rt(St.p2d(St._pixelMax));window.requestAnimationFrame(function(){m.call("_guiRelayout",vt,It._name+".range",[et,Tt])})}(0,oe,pe,ce)}function Ve(){Pe.removeEventListener("mousemove",De),Pe.removeEventListener("mouseup",Ve),this.removeEventListener("touchmove",De),this.removeEventListener("touchend",Ve),v.removeElement(Pe)}this.addEventListener("touchmove",De),this.addEventListener("touchend",Ve),Pe.addEventListener("mousemove",De),Pe.addEventListener("mouseup",Ve)}se.on("mousedown",be),se.on("touchstart",be)}(I,l,A,P),function(se,oe,pe,ce,de,xe){var we=u.handleWidth/2;function be(Ve){return v.constrain(Ve,0,ce._width)}function Ee(Ve){return v.constrain(Ve,0,ce._height)}function fe(Ve){return v.constrain(Ve,-we,ce._width+we)}var me=be(ce.d2p(pe._rl[0])),Te=be(ce.d2p(pe._rl[1]));if(se.select("rect."+u.slideBoxClassName).attr("x",me).attr("width",Te-me),se.select("rect."+u.maskMinClassName).attr("width",me),se.select("rect."+u.maskMaxClassName).attr("x",Te).attr("width",ce._width-Te),xe.rangemode!=="match"){var _e=ce._height-Ee(ce.d2pOppAxis(de._rl[1])),Ae=ce._height-Ee(ce.d2pOppAxis(de._rl[0]));se.select("rect."+u.maskMinOppAxisClassName).attr("x",me).attr("height",_e).attr("width",Te-me),se.select("rect."+u.maskMaxOppAxisClassName).attr("x",me).attr("y",Ae).attr("height",ce._height-Ae).attr("width",Te-me),se.select("rect."+u.slideBoxClassName).attr("y",_e).attr("height",Ae-_e)}var Pe=Math.round(fe(me-we))-.5,De=Math.round(fe(Te-we))+.5;se.select("g."+u.grabberMinClassName).attr("transform",e(Pe,.5)),se.select("g."+u.grabberMaxClassName).attr("transform",e(De,.5))}(I,0,A,P,S,E),A.side==="bottom"&&o.draw(l,A._id+"title",{propContainer:A,propName:A._name+".title",placeholder:w._dfltTitle.x,attributes:{x:A._offset+A._length/2,y:q+P._height+P._offsetShift+10+1.5*A.title.font.size,"text-anchor":"middle"}})}))}},{"../../lib":503,"../../lib/setcursor":524,"../../plots/cartesian":568,"../../plots/cartesian/axis_ids":558,"../../plots/plots":619,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"../titles":464,"./constants":440,"@plotly/d3":58}],443:[function(y,ee,te){var g=y("../../plots/cartesian/axis_ids"),m=y("../../lib/svg_text_utils"),b=y("./constants"),v=y("../../constants/alignment").LINE_SPACING,e=b.name;function n(t){var o=t&&t[e];return o&&o.visible}te.isVisible=n,te.makeData=function(t){var o=g.list({_fullLayout:t},"x",!0),r=t.margin,d=[];if(!t._has("gl2d"))for(var c=0;c<o.length;c++){var i=o[c];if(n(i)){d.push(i);var u=i[e];u._id=e+i._id,u._height=(t.height-r.b-r.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}t._rangeSliderData=d},te.autoMarginOpts=function(t,o){var r=t._fullLayout,d=o[e],c=o._id.charAt(0),i=0,u=0;return o.side==="bottom"&&(i=o._depth,o.title.text!==r._dfltTitle[c]&&(u=1.5*o.title.font.size+10+d._offsetShift,u+=(o.title.text.match(m.BR_TAG_ALL)||[]).length*o.title.font.size*v)),{x:0,y:o._counterDomainMin,l:0,r:0,t:0,b:d._height+i+Math.max(r.margin.b,u),pad:b.extraPad+2*d._offsetShift}}},{"../../constants/alignment":471,"../../lib/svg_text_utils":529,"../../plots/cartesian/axis_ids":558,"./constants":440}],444:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("./oppaxis_attributes"),v=y("./helpers");ee.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:g.extendFlat({},m,{yaxis:b})}}},layoutAttributes:y("./attributes"),handleDefaults:y("./defaults"),calcAutorange:y("./calc_autorange"),draw:y("./draw"),isVisible:v.isVisible,makeData:v.makeData,autoMarginOpts:v.autoMarginOpts}},{"../../lib":503,"./attributes":438,"./calc_autorange":439,"./defaults":441,"./draw":442,"./helpers":443,"./oppaxis_attributes":445}],445:[function(y,ee,te){ee.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},{}],446:[function(y,ee,te){var g=y("../annotations/attributes"),m=y("../../traces/scatter/attributes").line,b=y("../drawing/attributes").dash,v=y("../../lib/extend").extendFlat,e=y("../../plot_api/plot_template").templatedArray;y("../../constants/axis_placeable_objects"),ee.exports=e("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:v({},g.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:v({},g.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"}
1213,opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:v({},m.color,{editType:"arraydraw"}),width:v({},m.width,{editType:"calc+arraydraw"}),dash:v({},b,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},editType:"arraydraw"})},{"../../constants/axis_placeable_objects":472,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../traces/scatter/attributes":926,"../annotations/attributes":349,"../drawing/attributes":387}],447:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("./constants"),v=y("./helpers");function e(r){return t(r.line.width,r.xsizemode,r.x0,r.x1,r.path,!1)}function n(r){return t(r.line.width,r.ysizemode,r.y0,r.y1,r.path,!0)}function t(r,d,c,i,u,f){var s=r/2,h=f;if(d==="pixel"){var p=u?v.extractPathCoords(u,f?b.paramIsY:b.paramIsX):[c,i],a=g.aggNums(Math.max,null,p),x=g.aggNums(Math.min,null,p),l=x<0?Math.abs(x)+s:s,w=a>0?a+s:s;return{ppad:s,ppadplus:h?l:w,ppadminus:h?w:l}}return{ppad:s}}function o(r,d,c,i,u){var f=r.type==="category"||r.type==="multicategory"?r.r2c:r.d2c;if(d!==void 0)return[f(d),f(c)];if(i){var s,h,p,a,x=1/0,l=-1/0,w=i.match(b.segmentRE);for(r.type==="date"&&(f=v.decodeDate(f)),s=0;s<w.length;s++)(h=u[w[s].charAt(0)].drawn)!==void 0&&(!(p=w[s].substr(1).match(b.paramRE))||p.length<h||((a=f(p[h]))<x&&(x=a),a>l&&(l=a)));return l>=x?[x,l]:void 0}}ee.exports=function(r){var d=r._fullLayout,c=g.filterVisible(d.shapes);if(c.length&&r._fullData.length)for(var i=0;i<c.length;i++){var u,f,s=c[i];s._extremes={};var h=m.getRefType(s.xref),p=m.getRefType(s.yref);if(s.xref!=="paper"&&h!=="domain"){var a=s.xsizemode==="pixel"?s.xanchor:s.x0,x=s.xsizemode==="pixel"?s.xanchor:s.x1;(f=o(u=m.getFromId(r,s.xref),a,x,s.path,b.paramIsX))&&(s._extremes[u._id]=m.findExtremes(u,f,e(s)))}if(s.yref!=="paper"&&p!=="domain"){var l=s.ysizemode==="pixel"?s.yanchor:s.y0,w=s.ysizemode==="pixel"?s.yanchor:s.y1;(f=o(u=m.getFromId(r,s.yref),l,w,s.path,b.paramIsY))&&(s._extremes[u._id]=m.findExtremes(u,f,n(s)))}}}},{"../../lib":503,"../../plots/cartesian/axes":554,"./constants":448,"./helpers":457}],448:[function(y,ee,te){ee.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],449:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("../../plots/array_container_defaults"),v=y("./attributes"),e=y("./helpers");function n(t,o,r){function d(E,D){return g.coerce(t,o,v,E,D)}if(d("visible")){var c=d("path"),i=d("type",c?"path":"rect");o.type!=="path"&&delete o.path,d("editable"),d("layer"),d("opacity"),d("fillcolor"),d("fillrule"),d("line.width")&&(
1213d("line.color"),d("line.dash"));for(var u=d("xsizemode"),f=d("ysizemode"),s=["x","y"],h=0;h<2;h++){var p,a,x,l=s[h],w=l+"anchor",_=l==="x"?u:f,T={_fullLayout:r},k=m.coerceRef(t,o,T,l,void 0,"paper");if(m.getRefType(k)==="range"?((p=m.getFromId(T,k))._shapeIndices.push(o._index),x=e.rangeToShapePosition(p),a=e.shapePositionToRange(p)):a=x=g.identity,i!=="path"){var L=l+"0",A=l+"1",I=t[L],P=t[A];t[L]=a(t[L],!0),t[A]=a(t[A],!0),_==="pixel"?(d(L,0),d(A,10)):(m.coercePosition(o,T,d,k,L,.25),m.coercePosition(o,T,d,k,A,.75)),o[L]=x(o[L]),o[A]=x(o[A]),t[L]=I,t[A]=P}if(_==="pixel"){var S=t[w];t[w]=a(t[w],!0),m.coercePosition(o,T,d,k,w,.25),o[w]=x(o[w]),t[w]=S}}i==="path"?d("path"):g.noneOrAll(t,o,["x0","x1","y0","y1"])}}ee.exports=function(t,o){b(t,o,{name:"shapes",handleItemDefaults:n})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"./attributes":446,"./helpers":457}],450:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("../../plots/cartesian/axes"),v=y("./draw_newshape/helpers").readPaths,e=y("./draw_newshape/display_outlines"),n=y("../../plots/cartesian/handle_outline").clearOutlineControllers,t=y("../color"),o=y("../drawing"),r=y("../../plot_api/plot_template").arrayEditor,d=y("../dragelement"),c=y("../../lib/setcursor"),i=y("./constants"),u=y("./helpers");function f(_){var T=_._fullLayout;for(var k in T._shapeUpperLayer.selectAll("path").remove(),T._shapeLowerLayer.selectAll("path").remove(),T._plots){var L=T._plots[k].shapelayer;L&&L.selectAll("path").remove()}for(var A=0;A<T.shapes.length;A++)T.shapes[A].visible&&p(_,A)}function s(_){return!!_._fullLayout._drawing}function h(_){return!_._context.edits.shapePosition}function p(_,T){_._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+T+'"]').remove();var k=u.makeOptionsAndPlotinfo(_,T),L=k.options,A=k.plotinfo;L._input&&L.visible!==!1&&(L.layer!=="below"?I(_._fullLayout._shapeUpperLayer):L.xref==="paper"||L.yref==="paper"?I(_._fullLayout._shapeLowerLayer):A._hadPlotinfo?I((A.mainplotinfo||A).shapelayer):I(_._fullLayout._shapeLowerLayer));function I(P){var S=x(_,L),E={"data-index":T,"fill-rule":L.fillrule,d:S},D=L.opacity,F=L.fillcolor,H=L.line.width?L.line.color:"rgba(0,0,0,0)",V=L.line.width,Z=L.line.dash;V||L.editable!==!0||(V=5,Z="solid");var K=S[S.length-1]!=="Z",q=h(_)&&L.editable&&_._fullLayout._activeShapeIndex===T;q&&(F=K?"rgba(0,0,0,0)":_._fullLayout.activeshape.fillcolor,D=_._fullLayout.activeshape.opacity);var W,$=P.append("path").attr(E).style("opacity",D).call(t.stroke,H).call(t.fill,F).call(o.dashLine,Z,V);if(a($,_,L),(q||_._context.edits.shapePosition)&&(W=r(_.layout,"shapes",L)),q){$.style({cursor:"move"});var R={element:$.node(),plotinfo:A,gd:_,editHelpers:W,isActiveShape:!0},N=v(S,_);e(N,$,R)}else _._context.edits.shapePosition?function(U,Q,j,X,J,re){var ne,se,oe,pe,ce,de,xe,we,be,Ee,fe,me,Te,_e,Ae,Pe,De=j.xsizemode==="pixel",Ve=j.ysizemode==="pixel",Qe=j.type==="line",Oe=j.type==="path",Ue=re.modifyItem,Ge=b.getFromId(U,j.xref),Ye=b.getRefType(j.xref),tt=b.getFromId(U,j.yref),lt=b.getRefType(j.yref),vt=u.getDataToPixel(U,Ge,!1,Ye),It=u.getDataToPixel(U,tt,!0,lt),St=u.getPixelToData(U,Ge,!1,Ye),rt=u.getPixelToData(U,tt,!0,lt),et=Qe?function(){var Xe=Math.max(j.line.width,10),ke=J.append("g").attr("data-index",X);ke.append("path").attr("d",Q.attr("d")).style({cursor:"move","stroke-width":Xe,"stroke-opacity":"0"});var Le={"fill-opacity":"0"},Ie=Math.max(Xe/2,10);return ke.append("circle").attr({"data-line-point":"start-point",cx:De?vt(j.xanchor)+j.x0:vt(j.x0),cy:Ve?It(j.yanchor)-j.y0:It(j.y0),r:Ie}).style(Le).classed("cursor-grab",!0),ke.append("circle").attr({"data-line-point":"end-point",cx:De?vt(j.xanchor)+j.x1:vt(j.x1),cy:Ve?It(j.yanchor)-j.y1:It(j.y1),r:Ie}).style(Le).classed("cursor-grab",!0),ke}():Q,Tt={element:et.node(),gd:U,prepFn:function(Xe){s(U)||(De&&(ce=vt(j.xanchor)),Ve&&(de=It(j.yanchor)),j.type==="path"?Ae=j.path:(ne=De?j.x0:vt(j.x0),se=Ve?j.y0:It(j.y0),oe=De?j.x1:vt(j.x1),pe=Ve?j.y1:It(j.y1)),ne<oe?(be=ne,Te="x0",Ee=oe,_e="x1"):(be=oe,Te="x1",Ee=ne,_e="x0"),!Ve&&se<pe||Ve&&se>pe?(xe=se,fe="y0",we=pe,me="y1"):(xe=pe,fe="y1",we=se,me="y0"),Vt(Xe),qe(J,j),function(ke,Le,Ie){var 
1213Ce=Le.xref,Je=Le.yref,it=b.getFromId(Ie,Ce),ht=b.getFromId(Ie,Je),ut="";Ce==="paper"||it.autorange||(ut+=Ce),Je==="paper"||ht.autorange||(ut+=Je),o.setClipUrl(ke,ut?"clip"+Ie._fullLayout._uid+ut:null,Ie)}(Q,j,U),Tt.moveFn=Pe==="move"?Kt:Be,Tt.altKey=Xe.altKey)},doneFn:function(){s(U)||(c(Q),Re(J),a(Q,U,j),g.call("_guiRelayout",U,re.getUpdateObj()))},clickFn:function(){s(U)||Re(J)}};function Vt(Xe){if(s(U))Pe=null;else if(Qe)Pe=Xe.target.tagName==="path"?"move":Xe.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ke=Tt.element.getBoundingClientRect(),Le=ke.right-ke.left,Ie=ke.bottom-ke.top,Ce=Xe.clientX-ke.left,Je=Xe.clientY-ke.top,it=!Oe&&Le>10&&Ie>10&&!Xe.shiftKey?d.getCursor(Ce/Le,1-Je/Ie):"move";c(Q,it),Pe=it.split("-")[0]}}function Kt(Xe,ke){if(j.type==="path"){var Le=function(Je){return Je},Ie=Le,Ce=Le;De?Ue("xanchor",j.xanchor=St(ce+Xe)):(Ie=function(Je){return St(vt(Je)+Xe)},Ge&&Ge.type==="date"&&(Ie=u.encodeDate(Ie))),Ve?Ue("yanchor",j.yanchor=rt(de+ke)):(Ce=function(Je){return rt(It(Je)+ke)},tt&&tt.type==="date"&&(Ce=u.encodeDate(Ce))),Ue("path",j.path=l(Ae,Ie,Ce))}else De?Ue("xanchor",j.xanchor=St(ce+Xe)):(Ue("x0",j.x0=St(ne+Xe)),Ue("x1",j.x1=St(oe+Xe))),Ve?Ue("yanchor",j.yanchor=rt(de+ke)):(Ue("y0",j.y0=rt(se+ke)),Ue("y1",j.y1=rt(pe+ke)));Q.attr("d",x(U,j)),qe(J,j)}function Be(Xe,ke){if(Oe){var Le=function(ze){return ze},Ie=Le,Ce=Le;De?Ue("xanchor",j.xanchor=St(ce+Xe)):(Ie=function(ze){return St(vt(ze)+Xe)},Ge&&Ge.type==="date"&&(Ie=u.encodeDate(Ie))),Ve?Ue("yanchor",j.yanchor=rt(de+ke)):(Ce=function(ze){return rt(It(ze)+ke)},tt&&tt.type==="date"&&(Ce=u.encodeDate(Ce))),Ue("path",j.path=l(Ae,Ie,Ce))}else if(Qe){if(Pe==="resize-over-start-point"){var Je=ne+Xe,it=Ve?se-ke:se+ke;Ue("x0",j.x0=De?Je:St(Je)),Ue("y0",j.y0=Ve?it:rt(it))}else if(Pe==="resize-over-end-point"){var ht=oe+Xe,ut=Ve?pe-ke:pe+ke;Ue("x1",j.x1=De?ht:St(ht)),Ue("y1",j.y1=Ve?ut:rt(ut))}}else{var kt=function(ze){return Pe.indexOf(ze)!==-1},ot=kt("n"),Lt=kt("s"),Et=kt("w"),Ze=kt("e"),pt=ot?xe+ke:xe,Ct=Lt?we+ke:we,zt=Et?be+Xe:be,Gt=Ze?Ee+Xe:Ee;Ve&&(ot&&(pt=xe-ke),Lt&&(Ct=we-ke)),(!Ve&&Ct-pt>10||Ve&&pt-Ct>10)&&(Ue(fe,j[fe]=Ve?pt:rt(pt)),Ue(me,j[me]=Ve?Ct:rt(Ct))),Gt-zt>10&&(Ue(Te,j[Te]=De?zt:St(zt)),Ue(_e,j[_e]=De?Gt:St(Gt)))}Q.attr("d",x(U,j)),qe(J,j)}function qe(Xe,ke){(De||Ve)&&function(){var Le=ke.type!=="path",Ie=Xe.selectAll(".visual-cue").data([0]);Ie.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var Ce=vt(De?ke.xanchor:m.midRange(Le?[ke.x0,ke.x1]:u.extractPathCoords(ke.path,i.paramIsX))),Je=It(Ve?ke.yanchor:m.midRange(Le?[ke.y0,ke.y1]:u.extractPathCoords(ke.path,i.paramIsY)));if(Ce=u.roundPositionForSharpStrokeRendering(Ce,1),Je=u.roundPositionForSharpStrokeRendering(Je,1),De&&Ve){var it="M"+(Ce-1-1)+","+(Je-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ie.attr("d",it)}else if(De){var ht="M"+(Ce-1-1)+","+(Je-9-1)+"v18 h2 v-18 Z";Ie.attr("d",ht)}else{var ut="M"+(Ce-9-1)+","+(Je-1-1)+"h18 v2 h-18 Z";Ie.attr("d",ut)}}()}function Re(Xe){Xe.selectAll(".visual-cue").remove()}d.init(Tt),et.node().onmousemove=Vt}(_,$,L,T,P,W):L.editable===!0&&$.style("pointer-events",K||t.opacity(F)*D<=.5?"stroke":"all");$.node().addEventListener("click",function(){return function(U,Q){if(h(U)){var j=+Q.node().getAttribute("data-index");if(j>=0){if(j===U._fullLayout._activeShapeIndex)return void w(U);U._fullLayout._activeShapeIndex=j,U._fullLayout._deactivateShape=w,f(U)}}}(_,$)})}}function a(_,T,k){var L=(k.xref+k.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");o.setClipUrl(_,L?"clip"+T._fullLayout._uid+L:null,T)}function x(_,T){var k,L,A,I,P,S,E,D,F=T.type,H=b.getRefType(T.xref),V=b.getRefType(T.yref),Z=b.getFromId(_,T.xref),K=b.getFromId(_,T.yref),q=_._fullLayout._size;if(Z?H==="domain"?L=function(J){return Z._offset+Z._length*J}:(k=u.shapePositionToRange(Z),L=function(J){return Z._offset+Z.r2p(k(J,!0))}):L=function(J){return q.l+q.w*J},K?V==="domain"?I=function(J){return K._offset+K._length*(1-J)}:(A=u.shapePositionToRange(K),I=function(J){return K._offset+K.r2p(A(J,!0))}):I=function(J){return q.t+q.h*(1-J)},F==="path")return Z&&Z.type==="date"&&(L=u.decodeDate(L)),K&&K.type==="date"&&(I=u.decodeDate(I)),function(J,re,ne){var se=J.path,oe=J.xsizemode,pe=J.ysizemode,ce=J.xanchor,de=J.yanchor;return se.replace(i.segmentRE,function(xe){var we=0,be=xe.charAt(0),Ee=i.paramIsX[be],fe=i.paramIsY[be],me=i.numParam
1213s[be],Te=xe.substr(1).replace(i.paramRE,function(_e){return Ee[we]?_e=oe==="pixel"?re(ce)+Number(_e):re(_e):fe[we]&&(_e=pe==="pixel"?ne(de)-Number(_e):ne(_e)),++we>me&&(_e="X"),_e});return we>me&&(Te=Te.replace(/[\s,]*X.*/,""),m.log("Ignoring extra params in segment "+xe)),be+Te})}(T,L,I);if(T.xsizemode==="pixel"){var W=L(T.xanchor);P=W+T.x0,S=W+T.x1}else P=L(T.x0),S=L(T.x1);if(T.ysizemode==="pixel"){var $=I(T.yanchor);E=$-T.y0,D=$-T.y1}else E=I(T.y0),D=I(T.y1);if(F==="line")return"M"+P+","+E+"L"+S+","+D;if(F==="rect")return"M"+P+","+E+"H"+S+"V"+D+"H"+P+"Z";var R=(P+S)/2,N=(E+D)/2,U=Math.abs(R-P),Q=Math.abs(N-E),j="A"+U+","+Q,X=R+U+","+N;return"M"+X+j+" 0 1,1 "+(R+","+(N-Q))+j+" 0 0,1 "+X+"Z"}function l(_,T,k){return _.replace(i.segmentRE,function(L){var A=0,I=L.charAt(0),P=i.paramIsX[I],S=i.paramIsY[I],E=i.numParams[I];return I+L.substr(1).replace(i.paramRE,function(D){return A>=E||(P[A]?D=T(D):S[A]&&(D=k(D)),A++),D})})}function w(_){h(_)&&_._fullLayout._activeShapeIndex>=0&&(n(_),delete _._fullLayout._activeShapeIndex,f(_))}ee.exports={draw:f,drawOne:p,eraseActiveShape:function(_){if(h(_)){n(_);var T=_._fullLayout._activeShapeIndex,k=(_.layout||{}).shapes||[];if(T<k.length){for(var L=[],A=0;A<k.length;A++)A!==T&&L.push(k[A]);delete _._fullLayout._activeShapeIndex,g.call("_guiRelayout",_,{shapes:L})}}}}},{"../../lib":503,"../../lib/setcursor":524,"../../plot_api/plot_template":543,"../../plots/cartesian/axes":554,"../../plots/cartesian/handle_outline":565,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"./constants":448,"./draw_newshape/display_outlines":454,"./draw_newshape/helpers":455,"./helpers":457}],451:[function(y,ee,te){var g=y("../../drawing/attributes").dash,m=y("../../../lib/extend").extendFlat;ee.exports={newshape:{line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:0,dflt:4,editType:"none"},dash:m({},g,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none"},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},{"../../../lib/extend":493,"../../drawing/attributes":387}],452:[function(y,ee,te){ee.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},{}],453:[function(y,ee,te){var g=y("../../color");ee.exports=function(m,b,v){if(v("newshape.drawdirection"),v("newshape.layer"),v("newshape.fillcolor"),v("newshape.fillrule"),v("newshape.opacity"),v("newshape.line.width")){var e=(m||{}).plot_bgcolor||"#FFF";v("newshape.line.color",g.contrast(e)),v("newshape.line.dash")}v("activeshape.fillcolor"),v("activeshape.opacity")}},{"../../color":366}],454:[function(y,ee,te){var g=y("../../dragelement"),m=y("../../dragelement/helpers").drawMode,b=y("../../../registry"),v=y("./constants"),e=v.i000,n=v.i090,t=v.i180,o=v.i270,r=y("../../../plots/cartesian/handle_outline").clearOutlineControllers,d=y("./helpers"),c=d.pointsShapeRectangle,i=d.pointsShapeEllipse,u=d.writePaths,f=y("./newshapes");ee.exports=function s(h,p,a,x){x||(x=0);var l=a.gd;function w(){s(h,p,a,x++),i(h[0])&&_({redrawing:!0})}function _(W){a.isActiveShape=!1;var $=f(p,a);Object.keys($).length&&b.call((W||{}).redrawing?"relayout":"_guiRelayout",l,$)}var T,k,L,A,I,P=a.isActiveShape,S=l._fullLayout._zoomlayer,E=a.dragmode;m(E)?l._fullLayout._drawing=!0:l._fullLayout._activeShapeIndex>=0&&r(l),p.attr("d",u(h)),P&&!x&&(I=function(W,$){for(var R=0;R<$.length;R++){var N=$[R];W[R]=[];for(var U=0;U<N.length;U++){W[R][U]=[];for(var Q=0;Q<N[U].length;Q++)W[R][U][Q]=N[U][Q]}}return W}([],h),function(W){T=[];for(var $=0;$<h.length;$++){var R=h[$],N=!c(R)&&i(R);T[$]=[];for(var U=0;U<R.length;U++)if(R[U][0]!=="Z"&&(!N||U===e||U===n||U===t||U===o)){var Q=R[U][1],j=R[U][2],X=W.append("circle").classed("cursor-grab",!0).attr("data-i",$).attr("data-j",U).attr("cx",Q).attr("cy",j).attr("r",4).style({"mix-blend-mode":"luminosity",fill:"black",stroke:"white","stroke-width":1});T[$][U]={element:X.node(),gd:l,prepFn:D,doneFn:H,clickFn:V},g.init(T[$][U])}}}(S.append("g").attr("class","outline-controllers")),function(){k=[],h.length&&(k[0]={element:p[0][0],gd:l,prepFn:K,doneFn:q},g.init(k[0]))}());function D(W){L=+W.srcElement.getAttribute("data-i"),A=+W.srcElement.getAttribute("data-j"),T[L][A].moveFn=F}function F(W,$){if(h.length){var R=I[L][A][1],N=I[L][A][2],U=h[L],Q=U.length;if(c(U)){for(var j=0;j<Q;j++)if(j!==A){var X=U[j];X[1]===U[A][1]&&(X[1]=R+W),X[2]===U[A][2]&&(X[2]=N+$)}if(U[A][1]=R+W,U[A][2]=N+$,!c(U))for(var J=0;J<Q;J++)for(var re=0;re<U[J].length;re++)U[J][re]=I[L][J][re]}else U[A][1]=R+W,U[A][2]=N+$;w()}}function H(){_()}function V(W,$){if(W===2){L=+$.srcElement.getAttribute("data-i"),A=+$.srcElement.getAttribute("data-j");var R=h[L];c(R)||i(R)||function(){if(h.length&&h[L]&&h[L].length){for(var N=[],U=0;U<h[L].length;U++)U!==A&&N.push(h[L][U]);N.length>1&&(N.length!==2||N[1][0]!=="Z")&&(A===0&&(N[0][0]="M"),h[L]=N,w(),_())}}()}}
1213function Z(W,$){(function(R,N){if(h.length)for(var U=0;U<h.length;U++)for(var Q=0;Q<h[U].length;Q++)for(var j=0;j+2<h[U][Q].length;j+=2)h[U][Q][j+1]=I[U][Q][j+1]+R,h[U][Q][j+2]=I[U][Q][j+2]+N})(W,$),w()}function K(W){(L=+W.srcElement.getAttribute("data-i"))||(L=0),k[L].moveFn=Z}function q(){_()}}},{"../../../plots/cartesian/handle_outline":565,"../../../registry":638,"../../dragelement":385,"../../dragelement/helpers":384,"./constants":452,"./helpers":455,"./newshapes":456}],455:[function(y,ee,te){var g=y("parse-svg-path"),m=y("./constants"),b=m.CIRCLE_SIDES,v=m.SQRT2,e=y("../../../plots/cartesian/helpers"),n=e.p2r,t=e.r2p,o=[0,3,4,5,6,1,2],r=[0,3,4,1,2];function d(i,u){return Math.abs(i-u)<=1e-6}function c(i,u){var f=u[1]-i[1],s=u[2]-i[2];return Math.sqrt(f*f+s*s)}te.writePaths=function(i){var u=i.length;if(!u)return"M0,0Z";for(var f="",s=0;s<u;s++)for(var h=i[s].length,p=0;p<h;p++){var a=i[s][p][0];if(a==="Z")f+="Z";else for(var x=i[s][p].length,l=0;l<x;l++){var w=l;a==="Q"||a==="S"?w=r[l]:a==="C"&&(w=o[l]),f+=i[s][p][w],l>0&&l<x-1&&(f+=",")}}return f},te.readPaths=function(i,u,f,s){var h,p,a,x=g(i),l=[],w=-1,_=0,T=0,k=function(){p=_,a=T};k();for(var L=0;L<x.length;L++){var A,I,P,S,E=[],D=x[L][0],F=D;switch(D){case"M":w++,l[w]=[],_=+x[L][1],T=+x[L][2],E.push([F,_,T]),k();break;case"Q":case"S":A=+x[L][1],P=+x[L][2],_=+x[L][3],T=+x[L][4],E.push([F,_,T,A,P]);break;case"C":A=+x[L][1],P=+x[L][2],I=+x[L][3],S=+x[L][4],_=+x[L][5],T=+x[L][6],E.push([F,_,T,A,P,I,S]);break;case"T":case"L":_=+x[L][1],T=+x[L][2],E.push([F,_,T]);break;case"H":F="L",_=+x[L][1],E.push([F,_,T]);break;case"V":F="L",T=+x[L][1],E.push([F,_,T]);break;case"A":F="L";var H=+x[L][1],V=+x[L][2];+x[L][4]||(H=-H,V=-V);var Z=_-H,K=T;for(h=1;h<=b/2;h++){var q=2*Math.PI*h/b;E.push([F,Z+H*Math.cos(q),K+V*Math.sin(q)])}break;case"Z":_===p&&T===a||(_=p,T=a,E.push([F,_,T]))}for(var W=(f||{}).domain,$=u._fullLayout._size,R=f&&f.xsizemode==="pixel",N=f&&f.ysizemode==="pixel",U=s===!1,Q=0;Q<E.length;Q++){for(h=0;h+2<7;h+=2){var j=E[Q][h+1],X=E[Q][h+2];j!==void 0&&X!==void 0&&(_=j,T=X,f&&(f.xaxis&&f.xaxis.p2r?(U&&(j-=f.xaxis._offset),j=R?t(f.xaxis,f.xanchor)+j:n(f.xaxis,j)):(U&&(j-=$.l),W?j=W.x[0]+j/$.w:j/=$.
1213w),f.yaxis&&f.yaxis.p2r?(U&&(X-=f.yaxis._offset),X=N?t(f.yaxis,f.yanchor)-X:n(f.yaxis,X)):(U&&(X-=$.t),X=W?W.y[1]-X/$.h:1-X/$.h)),E[Q][h+1]=j,E[Q][h+2]=X)}l[w].push(E[Q].slice())}}return l},te.pointsShapeRectangle=function(i){if(i.length!==5)return!1;for(var u=1;u<3;u++)if(!d(i[0][u]-i[1][u],i[3][u]-i[2][u])||!d(i[0][u]-i[3][u],i[1][u]-i[2][u]))return!1;return!(!d(i[0][1],i[1][1])&&!d(i[0][1],i[3][1]))&&!!(c(i[0],i[1])*c(i[0],i[3]))},te.pointsShapeEllipse=function(i){var u=i.length;if(u!==b+1)return!1;u=b;for(var f=0;f<u;f++){var s=(2*u-f)%u,h=(u/2+s)%u,p=(u/2+f)%u;if(!d(c(i[f],i[p]),c(i[s],i[h])))return!1}return!0},te.handleEllipse=function(i,u,f){if(!i)return[u,f];var s=te.ellipseOver({x0:u[0],y0:u[1],x1:f[0],y1:f[1]}),h=(s.x1+s.x0)/2,p=(s.y1+s.y0)/2,a=(s.x1-s.x0)/2,x=(s.y1-s.y0)/2;a||(a=x/=v),x||(x=a/=v);for(var l=[],w=0;w<b;w++){var _=2*w*Math.PI/b;l.push([h+a*Math.cos(_),p+x*Math.sin(_)])}return l},te.ellipseOver=function(i){var u=i.x0,f=i.y0,s=i.x1,h=i.y1,p=s-u,a=h-f,x=((u-=p)+s)/2,l=((f-=a)+h)/2;return{x0:x-(p*=v),y0:l-(a*=v),x1:x+p,y1:l+a}}},{"../../../plots/cartesian/helpers":566,"./constants":452,"parse-svg-path":250}],456:[function(y,ee,te){var g=y("../../dragelement/helpers"),m=g.drawMode,b=g.openMode,v=y("./constants"),e=v.i000,n=v.i090,t=v.i180,o=v.i270,r=v.cos45,d=v.sin45,c=y("../../../plots/cartesian/helpers"),i=c.p2r,u=c.r2p,f=y("../../../plots/cartesian/handle_outline").clearSelect,s=y("./helpers"),h=s.readPaths,p=s.writePaths,a=s.ellipseOver;ee.exports=function(x,l){if(x.length){var w=x[0][0];if(w){var _=w.getAttribute("d"),T=l.gd,k=T._fullLayout.newshape,L=l.plotinfo,A=L.xaxis,I=L.yaxis,P=!!L.domain||!L.xaxis,S=!!L.domain||!L.yaxis,E=l.isActiveShape,D=l.dragmode,F=(T.layout||{}).shapes||[];if(!m(D)&&E!==void 0){var H=T._fullLayout._activeShapeIndex;if(H<F.length)switch(T._fullLayout.shapes[H].type){case"rect":D="drawrect";break;case"circle":D="drawcircle";break;case"line":D="drawline";break;case"path":var V=F[H].path||"";D=V[V.length-1]==="Z"?"drawclosedpath":"drawopenpath"}}var Z,K=b(D),q=h(_,T,L,E),W={editable:!0,xref:P?"paper":A._id,yref:S?"paper":I._id,layer:k.layer,opacity:k.opacity,line:{color:k.line.color,width:k.line.width,dash:k.line.dash}};if(K||(W.fillcolor=k.fillcolor,W.fillrule=k.fillrule),q.length===1&&(Z=q[0]),Z&&D==="drawrect")W.type="rect",W.x0=Z[0][1],W.y0=Z[0][2],W.x1=Z[2][1],W.y1=Z[2][2];else if(Z&&D==="drawline")W.type="line",W.x0=Z[0][1],W.y0=Z[0][2],W.x1=Z[1][1],W.y1=Z[1][2];else if(Z&&D==="drawcircle"){W.type="circle";var $=Z[e][1],R=Z[n][1],N=Z[t][1],U=Z[o][1],Q=Z[e][2],j=Z[n][2],X=Z[t][2],J=Z[o][2],re=L.xaxis&&(L.xaxis.type==="date"||L.xaxis.type==="log"),ne=L.yaxis&&(L.yaxis.type==="date"||L.yaxis.type==="log");re&&($=u(L.xaxis,$),R=u(L.xaxis,R),N=u(L.xaxis,N),U=u(L.xaxis,U)),ne&&(Q=u(L.yaxis,Q),j=u(L.yaxis,j),X=u(L.yaxis,X),J=u(L.yaxis,J));var se=(R+U)/2,oe=(Q+X)/2,pe=a({x0:se,y0:oe,x1:se+(U-R+N-$)/2*r,y1:oe+(J-j+X-Q)/2*d});re&&(pe.x0=i(L.xaxis,pe.x0),pe.x1=i(L.xaxis,pe.x1)),ne&&(pe.y0=i(L.yaxis,pe.y0),pe.y1=i(L.yaxis,pe.y1)),W.x0=pe.x0,W.y0=pe.y0,W.x1=pe.x1,W.y1=pe.y1}else W.type="path",A&&I&&function(fe,me,Te){var _e=me.type==="date",Ae=Te.type==="date";if(!_e&&!Ae)return fe;for(var Pe=0;Pe<fe.length;Pe++)for(var De=0;De<fe[Pe].length;De++)for(var Ve=0;Ve+2<fe[Pe][De].length;Ve+=2)_e&&(fe[Pe][De][Ve+1]=fe[Pe][De][Ve+1].replace(" ","_")),Ae&&(fe[Pe][De][Ve+2]=fe[Pe][De][Ve+2].replace(" ","_"))}(q,A,I),W.path=p(q),Z=null;f(T);for(var ce=l.editHelpers,de=(ce||{}).modifyItem,xe=[],we=0;we<F.length;we++){var be=T._fullLayout.shapes[we];if(xe[we]=be._input,E!==void 0&&we===T._fullLayout._activeShapeIndex){var Ee=W;switch(be.type){case"line":case"rect":case"circle":de("x0",Ee.x0),de("x1",Ee.x1),de("y0",Ee.y0),de("y1",Ee.y1);break;case"path":de("path",Ee.path)}}}return E===void 0?(xe.push(W),xe):ce?ce.getUpdateObj():{}}}}},{"../../../plots/cartesian/handle_outline":565,"../../../plots/cartesian/helpers":566,"../../dragelement/helpers":384,"./constants":452,"./helpers":455}],457:[function(y,ee,te){var g=y("./constants"),m=y("../../lib");te.rangeToShapePosition=function(b){return b.type==="log"?b.r2d:function(v){return v}},te.shapePositionToRange=function(b){return b.type==="log"?b.d2r:function(v){return v}},te.decodeDate=function(b){return function(v){return v.replace&&(v=v.replace("_"," ")),b(v)}},te.encodeDate=function(b){return function(v){return b(v).replace(" ","_")}},te.extractPathCoords=function(b,v){var e=[];
1213return b.match(g.segmentRE).forEach(function(n){var t=v[n.charAt(0)].drawn;if(t!==void 0){var o=n.substr(1).match(g.paramRE);!o||o.length<t||e.push(m.cleanNumber(o[t]))}}),e},te.getDataToPixel=function(b,v,e,n){var t,o=b._fullLayout._size;if(v)if(n==="domain")t=function(d){return v._length*(e?1-d:d)+v._offset};else{var r=te.shapePositionToRange(v);t=function(d){return v._offset+v.r2p(r(d,!0))},v.type==="date"&&(t=te.decodeDate(t))}else t=e?function(d){return o.t+o.h*(1-d)}:function(d){return o.l+o.w*d};return t},te.getPixelToData=function(b,v,e,n){var t,o=b._fullLayout._size;if(v)if(n==="domain")t=function(d){var c=(d-v._offset)/v._length;return e?1-c:c};else{var r=te.rangeToShapePosition(v);t=function(d){return r(v.p2r(d-v._offset))}}else t=e?function(d){return 1-(d-o.t)/o.h}:function(d){return(d-o.l)/o.w};return t},te.roundPositionForSharpStrokeRendering=function(b,v){var e=Math.round(v%2)===1,n=Math.round(b);return e?n+.5:n},te.makeOptionsAndPlotinfo=function(b,v){var e=b._fullLayout.shapes[v]||{},n=b._fullLayout._plots[e.xref+e.yref];return n?n._hadPlotinfo=!0:(n={},e.xref&&e.xref!=="paper"&&(n.xaxis=b._fullLayout[e.xref+"axis"]),e.yref&&e.yref!=="paper"&&(n.yaxis=b._fullLayout[e.yref+"axis"])),n.xsizemode=e.xsizemode,n.ysizemode=e.ysizemode,n.xanchor=e.xanchor,n.yanchor=e.yanchor,{options:e,plotinfo:n}}},{"../../lib":503,"./constants":448}],458:[function(y,ee,te){var g=y("./draw");ee.exports={moduleType:"component",name:"shapes",layoutAttributes:y("./attributes"),supplyLayoutDefaults:y("./defaults"),supplyDrawNewShapeDefaults:y("./draw_newshape/defaults"),includeBasePlot:y("../../plots/cartesian/include_components")("shapes"),calcAutorange:y("./calc_autorange"),draw:g.draw,drawOne:g.drawOne}},{"../../plots/cartesian/include_components":567,"./attributes":446,"./calc_autorange":447,"./defaults":449,"./draw":450,"./draw_newshape/defaults":453}],459:[function(y,ee,te){var g=y("../../plots/font_attributes"),m=y("../../plots/pad_attributes"),b=y("../../lib/extend").extendDeepAll,v=y("../../plot_api/edit_types").overrideAll,e=y("../../plots/animation_attributes"),n=y("../../plot_api/plot_template").templatedArray,t=y("./constants"),o=n("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});ee.exports=v(n("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:o,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:b(m({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:e.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:g({})},font:g({}),activebgcolor:{valType:"color",dflt:t.gripBgActiveColor},bgcolor:{valType:"color",dflt:t.railBgColor},bordercolor:{valType:"color",dflt:t.railBorderColor},borderwidth:{valType:"number",min:0,dflt:t.railBorderWidth},ticklen:{valType:"number",min:0,dflt:t.tickLength},tickcolor:{valType:"color",dflt:t.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:t.minorTickLength}}),"arraydraw","from-root")},{"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/animation_attributes":548,"../../plots/font_attributes":585,"../../plots/pad_attributes":618,"./constants":460}],460:[function(y,ee,te){ee.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],461:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/array_container_defaults"),b=y("./attributes"),v=y("./constants").name,e=b.steps;function n(o,r,d){function c(h,p){return g.coerce(o,r,b,h,p)}for(var i=m(o,r,{name:"steps",handleItemDefaults:t}),u=0,f=0;f<i.length;f++)i[f].visible&&u++;if(u<2?r.visible=!1:c("visible")){r._stepCount=u;var s=r._visibleSteps=g.filterVisible(i);(i[c("active")]||{}).visible||(r.active=s[0]._index),c("x"),c("y"),g.noneOrAll(o,r,["x","y"]),c("xanchor"),c("yanchor"),c("len"),c("lenmode"),c("pad.t"),c("pad.r"),c("pad.b"),c("pad.l"),g.coerceFont(c,"font",d.font),c("currentvalue.visible")&&(c("currentvalue.xanchor"),c("currentvalue.prefix"),c("currentvalue.suffix"),c("currentvalue.offset"),g.coerceFont(c,"currentvalue.font",r.font)),c("transition.duration"),c("transition.easing"),c("bgcolor"),c("activebgcolor"),c("bordercolor"),c("borderwidth"),c("ticklen"),c("tickwidth"),c("tickcolor"),c("minorticklen")}}function t(o,r){function d(i,u){return g.coerce(o,r,e,i,u)}if(o.method==="skip"||Array.isArray(o.args)?d("visible"):r.visible=!1){d("method"),d("args");var c=d("label","step-"+r._index);d("value",c),d("execute")}}ee.exports=function(o,r){m(o,r,{name:v,handleItemDefaults:n})}},{"../../lib":503,"../../plots/array_container_defaults":549,"./attributes":459,"./constants":460}],462:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../plots/plots"),b=y("../color"),v=y("../drawing"),e=y("../../lib"),n=e.strTranslate,t=y("../../lib/svg_text_utils"),o=y("../../plot_api/plot_template").arrayEditor,r=y("./constants"),d=y("../../constants/alignment"),c=d.LINE_SPACING,i=d.FROM_TL,u=d.FROM_BR;function f(E){return r.autoMarginIdRoot+E._index}function s(E){return E._index}function h(E,D){var F=v.tester.selectAll("g."+r.labelGroupClass).data(D._visibleSteps);F.enter().append("g").classed(r.labelGroupClass,!0);var H=0,V=0;F.each(function(Q){var j=x(g.select(this),{step:Q},D).node();if(j){var X=v.bBox(j);V=Math.max(V,X.height),H=Math.max(H,X.width)}}),F.remove();var Z=D._dims={};Z.inputAreaWidth=Math.max(r.railWidth,r.gripHeight);var K=E._fullLayout._size;Z.lx=K.l+K.w*D.x,Z.ly=K.t+K.h*(1-D.y),D.lenmode==="fraction"?Z.outerLength=Math.round(K.w*D.len):Z.outerLength=D.len,Z.inputAreaStart=0,Z.inputAreaLength=Math.round(Z.outerLength-D.pad.l-D.pad.r);var q=(Z.inputAreaLength-2*r.stepInset)/(D._stepCount-1),W=H+r.labelPadding;if(Z.labelStride=Math.max(1,Math.ceil(W/q)),Z.labelHeight=V,Z.currentValueMaxWidth=0,Z.currentValueHeight=0,Z.currentValueTotalHeight=0,Z.currentValueMaxLines=1,D.currentvalue.visible){var $=v.tester.append("g");F.each(function(Q){var j=p($,D,Q.label),X=j.node()&&v.bBox(j.node())||{width:0,height:0},J=t.lineCount(j);Z.currentValueMaxWidth=Math.max(Z.currentValueMaxWidth,Math.ceil(X.width)),Z.currentValueHeight=Math.max(Z.currentValueHeight,Math.ceil(X.height)),Z.currentValueMaxLines=Math.max(Z.currentValueMaxLines,J)}),Z.currentValueTotalHeight=Z.currentValueHeight+D.currentvalue.offset,$.remove()}Z.height=Z.currentValueTotalHeight+r.tickOffset+D.ticklen+r.labelOffset+Z.labelHeight+D.pad.t+D.pad.b;var R="left";e.isRightAnchor(D)&&(Z.lx-=Z.outerLength,R="right"),e.isCenterAnchor(D)&&(Z.lx-=Z.outerLength/2,R="center");var N="top";e.isBottomAnchor(D)&&(Z.ly-=Z.height,N="bottom"),e.isMiddleAnchor(D)&&(Z.ly-=Z.height/2,N="middle"),Z.outerLength=Math.ceil(Z.outerLength),Z.height=Math.ceil(Z.height),Z.lx=Math.round(Z.lx),Z.ly=Math.round(Z.ly);var U={y:D.y,b:Z.height*u[N],t:Z.height*i[N]};
vendor: 6,097 bytes, line 1213
1213D.lenmode==="fraction"?(U.l=0,U.xl=D.x-D.len*i[R],U.r=0,U.xr=D.x+D.len*u[R]):(U.x=D.x,U.l=Z.outerLength*i[R],U.r=Z.outerLength*u[R]),m.autoMargin(E,f(D),U)}function p(E,D,F){if(D.currentvalue.visible){var H,V,Z=D._dims;switch(D.currentvalue.xanchor){case"right":H=Z.inputAreaLength-r.currentValueInset-Z.currentValueMaxWidth,V="left";break;case"center":H=.5*Z.inputAreaLength,V="middle";break;default:H=r.currentValueInset,V="left"}var K=e.ensureSingle(E,"text",r.labelClass,function(U){U.attr({"text-anchor":V,"data-notex":1})}),q=D.currentvalue.prefix?D.currentvalue.prefix:"";if(typeof F=="string")q+=F;else{var W=D.steps[D.active].label,$=D._gd._fullLayout._meta;$&&(W=e.templateString(W,$)),q+=W}D.currentvalue.suffix&&(q+=D.currentvalue.suffix),K.call(v.font,D.currentvalue.font).text(q).call(t.convertToTspans,D._gd);var R=t.lineCount(K),N=(Z.currentValueMaxLines+1-R)*D.currentvalue.font.size*c;return t.positionText(K,H,N),K}}function a(E,D,F){e.ensureSingle(E,"rect",r.gripRectClass,function(H){H.call(T,D,E,F).style("pointer-events","all")}).attr({width:r.gripWidth,height:r.gripHeight,rx:r.gripRadius,ry:r.gripRadius}).call(b.stroke,F.bordercolor).call(b.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px")}function x(E,D,F){var H=e.ensureSingle(E,"text",r.labelClass,function(K){K.attr({"text-anchor":"middle","data-notex":1})}),V=D.step.label,Z=F._gd._fullLayout._meta;return Z&&(V=e.templateString(V,Z)),H.call(v.font,F.font).text(V).call(t.convertToTspans,F._gd),H}function l(E,D){var F=e.ensureSingle(E,"g",r.labelsClass),H=D._dims,V=F.selectAll("g."+r.labelGroupClass).data(H.labelSteps);V.enter().append("g").classed(r.labelGroupClass,!0),V.exit().remove(),V.each(function(Z){var K=g.select(this);K.call(x,Z,D),v.setTranslate(K,A(D,Z.fraction),r.tickOffset+D.ticklen+D.font.size*c+r.labelOffset+H.currentValueTotalHeight)})}function w(E,D,F,H,V){var Z=Math.round(H*(F._stepCount-1)),K=F._visibleSteps[Z]._index;K!==F.active&&_(E,D,F,K,!0,V)}function _(E,D,F,H,V,Z){var K=F.active;F.active=H,o(E.layout,r.name,F).applyUpdate("active",H);var q=F.steps[F.active];D.call(L,F,Z),D.call(p,F),E.emit("plotly_sliderchange",{slider:F,step:F.steps[F.active],interaction:V,previousActive:K}),q&&q.method&&V&&(D._nextMethod?(D._nextMethod.step=q,D._nextMethod.doCallback=V,D._nextMethod.doTransition=Z):(D._nextMethod={step:q,doCallback:V,doTransition:Z},D._nextMethodRaf=window.requestAnimationFrame(function(){var W=D._nextMethod.step;W.method&&(W.execute&&m.executeAPICommand(E,W.method,W.args),D._nextMethod=null,D._nextMethodRaf=null)})))}function T(E,D,F){var H=F.node(),V=g.select(D);function Z(){return F.data()[0]}function K(){var q=Z();D.emit("plotly_sliderstart",{slider:q});var W=F.select("."+r.gripRectClass);g.event.stopPropagation(),g.event.preventDefault(),W.call(b.fill,q.activebgcolor);var $=I(q,g.mouse(H)[0]);function R(){var U=Z(),Q=I(U,g.mouse(H)[0]);w(D,F,U,Q,!1)}function N(){var U=Z();U._dragging=!1,W.call(b.fill,U.bgcolor),V.on("mouseup",null),V.on("mousemove",null),V.on("touchend",null),V.on("touchmove",null),D.emit("plotly_sliderend",{slider:U,step:U.steps[U.active]})}w(D,F,q,$,!0),q._dragging=!0,V.on("mousemove",R),V.on("touchmove",R),V.on("mouseup",N),V.on("touchend",N)}E.on("mousedown",K),E.on("touchstart",K)}function k(E,D){var F=E.selectAll("rect."+r.tickRectClass).data(D._visibleSteps),H=D._dims;F.enter().append("rect").classed(r.tickRectClass,!0),F.exit().remove(),F.attr({width:D.tickwidth+"px","shape-rendering":"crispEdges"}),F.each(function(V,Z){var K=Z%H.labelStride==0,q=g.select(this);q.attr({height:K?D.ticklen:D.minorticklen}).call(b.fill,D.tickcolor),v.setTranslate(q,A(D,Z/(D._stepCount-1))-.5*D.tickwidth,(K?r.tickOffset:r.minorTickOffset)+H.currentValueTotalHeight)})}function L(E,D,F){for(var H=E.select("rect."+r.gripRectClass),V=0,Z=0;Z<D._stepCount;Z++)if(D._visibleSteps[Z]._index===D.active){V=Z;break}var K=A(D,V/(D._stepCount-1));if(!D._invokingCommand){var q=H;F&&D.transition.duration>0&&(q=q.transition().duration(D.transition.duration).ease(D.transition.easing)),q.attr("transform",n(K-.5*r.gripWidth,D._dims.currentValueTotalHeight))}}function A(E,D){var F=E._dims;return F.inputAreaStart+r.stepInset+(F.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,D))}function I(E,D){var F=E._dims;return Math.min(1,Math.max(0,(D-r.stepInset-F.inputAreaStart)/(F.inputAreaLength-2*r.stepInset-2*F.inputAreaStart)))}function P(E,D,F){var H=F._dims,V=e.ensureSingle(E,"rect",r.railTouchRectClass,function(Z){Z.call(T,D,E,F).style("pointer-events","all")});V.attr({width:H.inputAreaLength,height:Math.max(H.inputAreaWidth,r.tickOffset+F.ticklen+H.labelHeight)}).call(b.fill,F.bgcolor).attr("opacity",0),v.setTranslate(V,0,H.currentValueTotalHeight)}function S(E,D){var F=D._dims,H=F.inputAreaLength-2*r.railInset,V=e.ensureSingle(E,"rect",r.railRectClass);V.attr({width:H,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(b.stroke,D.bordercolor).call(b.fill,D.bgcolor).style("stroke-width",D.borderwidth+"px"),v.setTranslate(V,r.railInset,.5*(F.inputAreaWidth-r.railWidth)+F.currentValueTotalHeight)}ee.exports=function(E){var D=E._fullLayout,F=function(W,$){for(var R=W[r.name],N=[],U=0;U<R.length;U++){var Q=R[U];Q.visible&&(Q._gd=$,N.push(Q))}return N}(D,E),H=D._infolayer.selectAll("g."+r.containerClassName).data(F.length>0?[0]:[]);function V(W){W._commandObserver&&(W._commandObserver.remove(),delete W._commandObserver),m.autoMargin(E,f(W))}if(H.enter().append("g").classed(r.containerClassName,!0).style("cursor","ew-resize"),H.exit().each(function(){g.select(this).selectAll("g."+r.groupClassName).each(V)}).remove(),F.length!==0){var Z=H.selectAll("g."+r.groupClassName).data(F,s);Z.enter().append("g").classed(r.groupClassName,!0),Z.exit().each(V).remove();for(var K=0;K<F.length;K++){var q=F[K];h(E,q)}Z.each(function(W){var $=g.select(this);(function(R){var N=R._dims;N.labelSteps=[];for(var U=R._stepCount,Q=0;Q<U;Q+=N.labelStride)N.labelSteps.push({fraction:Q/(U-1),step:R._visibleSteps[Q]})})(W),m.manageCommandObserver(E,W,W._visibleSteps,function(R){var N=$.data()[0];
1213N.active!==R.index&&(N._dragging||_(E,$,N,R.index,!1,!0))}),function(R,N,U){(U.steps[U.active]||{}).visible||(U.active=U._visibleSteps[0]._index),N.call(p,U).call(S,U).call(l,U).call(k,U).call(P,R,U).call(a,R,U);var Q=U._dims;v.setTranslate(N,Q.lx+U.pad.l,Q.ly+U.pad.t),N.call(L,U,!1),N.call(p,U)}(E,g.select(this),W)})}}},{"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plot_api/plot_template":543,"../../plots/plots":619,"../color":366,"../drawing":388,"./constants":460,"@plotly/d3":58}],463:[function(y,ee,te){var g=y("./constants");ee.exports={moduleType:"component",name:g.name,layoutAttributes:y("./attributes"),supplyLayoutDefaults:y("./defaults"),draw:y("./draw")}},{"./attributes":459,"./constants":460,"./defaults":461,"./draw":462}],464:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("../../plots/plots"),v=y("../../registry"),e=y("../../lib"),n=e.strTranslate,t=y("../drawing"),o=y("../color"),r=y("../../lib/svg_text_utils"),d=y("../../constants/interactions"),c=y("../../constants/alignment").OPPOSITE_SIDE,i=/ [XY][0-9]* /;ee.exports={draw:function(u,f,s){var h,p=s.propContainer,a=s.propName,x=s.placeholder,l=s.traceIndex,w=s.avoid||{},_=s.attributes,T=s.transform,k=s.containerGroup,L=u._fullLayout,A=1,I=!1,P=p.title,S=(P&&P.text?P.text:"").trim(),E=P&&P.font?P.font:{},D=E.family,F=E.size,H=E.color;a==="title.text"?h="titleText":a.indexOf("axis")!==-1?h="axisTitleText":a.indexOf(!0)&&(h="colorbarTitleText");var V=u._context.edits[h];S===""?A=0:S.replace(i," % ")===x.replace(i," % ")&&(A=.2,I=!0,V||(S="")),s._meta?S=e.templateString(S,s._meta):L._meta&&(S=e.templateString(S,L._meta));var Z,K=S||V;k||(k=e.ensureSingle(L._infolayer,"g","g-"+f),Z=L._hColorbarMoveTitle);var q=k.selectAll("text").data(K?[0]:[]);if(q.enter().append("text"),q.text(S).attr("class",f),q.exit().remove(),!K)return k;function W(N){e.syncOrAsync([$,R],N)}function $(N){var U;return!T&&Z&&(T={}),T?(U="",T.rotate&&(U+="rotate("+[T.rotate,_.x,_.y]+")"),(T.offset||Z)&&(U+=n(0,(T.offset||0)-(Z||0)))):U=null,N.attr("transform",U),N.style({"font-family":D,"font-size":g.round(F,2)+"px",fill:o.rgb(H),opacity:A*o.opacity(H),"font-weight":b.fontWeight}).attr(_).call(r.convertToTspans,u),b.previousPromises(u)}function R(N){var U=g.select(N.node().parentNode);if(w&&w.selection&&w.side&&S){U.attr("transform",null);var Q=c[w.side],j=w.side==="left"||w.side==="top"?-1:1,X=m(w.pad)?w.pad:2,J=t.bBox(U.node()),re={left:0,top:0,right:L.width,bottom:L.height},ne=w.maxShift||j*(re[w.side]-J[w.side]),se=0;if(ne<0)se=ne;else{var oe=w.offsetLeft||0,pe=w.offsetTop||0;J.left-=oe,J.right-=oe,J.top-=pe,J.bottom-=pe,w.selection.each(function(){var de=t.bBox(this);e.bBoxIntersect(J,de,X)&&(se=Math.max(se,j*(de[w.side]-J[Q])+X))}),se=Math.min(ne,se)}if(se>0||ne<0){var ce={left:[-se,0],right:[se,0],top:[0,-se],bottom:[0,se]}[w.side];U.attr("transform",n(ce[0],ce[1]))}}}return q.call(W),V&&(S?q.on(".opacity",null):(A=0,I=!0,q.text(x).on("mouseover.opacity",function(){g.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){g.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)})),q.call(r.makeEditable,{gd:u}).on("edit",function(N){l!==void 0?v.call("_guiRestyle",u,a,N,l):v.call("_guiRelayout",u,a,N)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(W)}).on("input",function(N){this.text(N||" ").call(r.positionText,_.x,_.y)})),q.classed("js-placeholder",I),k}}},{"../../constants/alignment":471,"../../constants/interactions":478,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"../color":366,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],465:[function(y,ee,te){var g=y("../../plots/font_attributes"),m=y("../color/attributes"),b=y("../../lib/extend").extendFlat,v=y("../../plot_api/edit_types").overrideAll,e=y("../../plots/pad_attributes"),n=y("../../plot_api/plot_template").templatedArray,t=n("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}});ee.exports=v(n("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:t,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:b(e({editType:"arraydraw"}),{}),font:g({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:m.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/font_attributes":585,"../../plots/pad_attributes":618,"../color/attributes":365}],466:[function(y,ee,te){ee.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:"▼"}}},{}],467:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/array_container_defaults"),b=y("./attributes"),v=y("./constants").name,e=b.buttons;function n(o,r,d){function c(i,u){return g.coerce(o,r,b,i,u)}c("visible",m(o,r,{name:"buttons",handleItemDefaults:t}).length>0)&&(c("active"),c("direction"),c("type"),c("showactive"),c("x"),c("y"),g.noneOrAll(o,r,["x","y"]),c("xanchor"),c("yanchor"),c("pad.t"),c("pad.r"),c("pad.b"),c("pad.l"),g.coerceFont(c,"font",d.font),c("bgcolor",d.paper_bgcolor),c("bordercolor"),c("borderwidth"))}function t(o,r){function d(c,i){return g.coerce(o,r,e,c,i)}
vendor: 5,796 bytes, line 1213
1213d("visible",o.method==="skip"||Array.isArray(o.args))&&(d("method"),d("args"),d("args2"),d("label"),d("execute"))}ee.exports=function(o,r){m(o,r,{name:v,handleItemDefaults:n})}},{"../../lib":503,"../../plots/array_container_defaults":549,"./attributes":465,"./constants":466}],468:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../plots/plots"),b=y("../color"),v=y("../drawing"),e=y("../../lib"),n=y("../../lib/svg_text_utils"),t=y("../../plot_api/plot_template").arrayEditor,o=y("../../constants/alignment").LINE_SPACING,r=y("./constants"),d=y("./scrollbox");function c(A){return A._index}function i(A,I){return+A.attr(r.menuIndexAttrName)===I._index}function u(A,I,P,S,E,D,F,H){I.active=F,t(A.layout,r.name,I).applyUpdate("active",F),I.type==="buttons"?s(A,S,null,null,I):I.type==="dropdown"&&(E.attr(r.menuIndexAttrName,"-1"),f(A,S,E,D,I),H||s(A,S,E,D,I))}function f(A,I,P,S,E){var D=e.ensureSingle(I,"g",r.headerClassName,function(q){q.style("pointer-events","all")}),F=E._dims,H=E.active,V=E.buttons[H]||r.blankHeaderOpts,Z={y:E.pad.t,yPad:0,x:E.pad.l,xPad:0,index:0},K={width:F.headerWidth,height:F.headerHeight};D.call(h,E,V,A).call(k,E,Z,K),e.ensureSingle(I,"text",r.headerArrowClassName,function(q){q.attr("text-anchor","end").call(v.font,E.font).text(r.arrowSymbol[E.direction])}).attr({x:F.headerWidth-r.arrowOffsetX+E.pad.l,y:F.headerHeight/2+r.textOffsetY+E.pad.t}),D.on("click",function(){P.call(L,String(i(P,E)?-1:E._index)),s(A,I,P,S,E)}),D.on("mouseover",function(){D.call(l)}),D.on("mouseout",function(){D.call(w,E)}),v.setTranslate(I,F.lx,F.ly)}function s(A,I,P,S,E){P||(P=I).attr("pointer-events","all");var D=function(U){return+U.attr(r.menuIndexAttrName)==-1}(P)&&E.type!=="buttons"?[]:E.buttons,F=E.type==="dropdown"?r.dropdownButtonClassName:r.buttonClassName,H=P.selectAll("g."+F).data(e.filterVisible(D)),V=H.enter().append("g").classed(F,!0),Z=H.exit();E.type==="dropdown"?(V.attr("opacity","0").transition().attr("opacity","1"),Z.transition().attr("opacity","0").remove()):Z.remove();var K=0,q=0,W=E._dims,$=["up","down"].indexOf(E.direction)!==-1;E.type==="dropdown"&&($?q=W.headerHeight+r.gapButtonHeader:K=W.headerWidth+r.gapButtonHeader),E.type==="dropdown"&&E.direction==="up"&&(q=-r.gapButtonHeader+r.gapButton-W.openHeight),E.type==="dropdown"&&E.direction==="left"&&(K=-r.gapButtonHeader+r.gapButton-W.openWidth);var R={x:W.lx+K+E.pad.l,y:W.ly+q+E.pad.t,yPad:r.gapButton,xPad:r.gapButton,index:0},N={l:R.x+E.borderwidth,t:R.y+E.borderwidth};H.each(function(U,Q){var j=g.select(this);j.call(h,E,U,A).call(k,E,R),j.on("click",function(){g.event.defaultPrevented||(U.execute&&(U.args2&&E.active===Q?(u(A,E,0,I,P,S,-1),m.executeAPICommand(A,U.method,U.args2)):(u(A,E,0,I,P,S,Q),m.executeAPICommand(A,U.method,U.args))),A.emit("plotly_buttonclicked",{menu:E,button:U,active:E.active}))}),j.on("mouseover",function(){j.call(l)}),j.on("mouseout",function(){j.call(w,E),H.call(x,E)})}),H.call(x,E),$?(N.w=Math.max(W.openWidth,W.headerWidth),N.h=R.y-N.t):(N.w=R.x-N.l,N.h=Math.max(W.openHeight,W.headerHeight)),N.direction=E.direction,S&&(H.size()?function(U,Q,j,X,J,re){var ne,se,oe,pe=J.direction,ce=pe==="up"||pe==="down",de=J._dims,xe=J.active;if(ce)for(se=0,oe=0;oe<xe;oe++)se+=de.heights[oe]+r.gapButton;else for(ne=0,oe=0;oe<xe;oe++)ne+=de.widths[oe]+r.gapButton;X.enable(re,ne,se),X.hbar&&X.hbar.attr("opacity","0").transition().attr("opacity","1"),X.vbar&&X.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,S,E,N):function(U){var Q=!!U.hbar,j=!!U.vbar;Q&&U.hbar.transition().attr("opacity","0").each("end",function(){Q=!1,j||U.disable()}),j&&U.vbar.transition().attr("opacity","0").each("end",function(){j=!1,Q||U.disable()})}(S))}function h(A,I,P,S){A.call(p,I).call(a,I,P,S)}function p(A,I){e.ensureSingle(A,"rect",r.itemRectClassName,function(P){P.attr({rx:r.rx,ry:r.ry,"shape-rendering":"crispEdges"})}).call(b.stroke,I.bordercolor).call(b.fill,I.bgcolor).style("stroke-width",I.borderwidth+"px")}function a(A,I,P,S){var E=e.ensureSingle(A,"text",r.itemTextClassName,function(H){H.attr({"text-anchor":"start","data-notex":1})}),D=P.label,F=S._fullLayout._meta;F&&(D=e.templateString(D,F)),E.call(v.font,I.font).text(D).call(n.convertToTspans,S)}function x(A,I){var P=I.active;A.each(function(S,E){var D=g.select(this);E===P&&I.showactive&&D.select("rect."+r.itemRectClassName).call(b.fill,r.activeColor)})}function l(A){A.select("rect."+r.itemRectClassName).call(b.fill,r.hoverColor)}function w(A,I){A.select("rect."+r.itemRectClassName).call(b.fill,I.bgcolor)}function _(A,I){var P=I._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},S=v.tester.selectAll("g."+r.dropdownButtonClassName).data(e.filterVisible(I.buttons));S.enter().append("g").classed(r.dropdownButtonClassName,!0);var E=["up","down"].indexOf(I.direction)!==-1;S.each(function(K,q){var W=g.select(this);W.call(h,I,K,A);var $=W.select("."+r.itemTextClassName),R=$.node()&&v.bBox($.node()).width,N=Math.max(R+r.textPadX,r.minWidth),U=I.font.size*o,Q=n.lineCount($),j=Math.max(U*Q,r.minHeight)+r.textOffsetY;j=Math.ceil(j),N=Math.ceil(N),P.widths[q]=N,P.heights[q]=j,P.height1=Math.max(P.height1,j),P.width1=Math.max(P.width1,N),E?(P.totalWidth=Math.max(P.totalWidth,N),P.openWidth=P.totalWidth,P.totalHeight+=j+r.gapButton,P.openHeight+=j+r.gapButton):(P.totalWidth+=N+r.gapButton,P.openWidth+=N+r.gapButton,P.totalHeight=Math.max(P.totalHeight,j),P.openHeight=P.totalHeight)}),E?P.totalHeight-=r.gapButton:P.totalWidth-=r.gapButton,P.headerWidth=P.width1+r.arrowPadX,P.headerHeight=P.height1,I.type==="dropdown"&&(E?(P.width1+=r.arrowPadX,P.totalHeight=P.height1):P.totalWidth=P.width1,P.totalWidth+=r.arrowPadX),S.remove();var D=P.totalWidth+I.pad.l+I.pad.r,F=P.totalHeight+I.pad.t+I.pad.b,H=A._fullLayout._size;
1213P.lx=H.l+H.w*I.x,P.ly=H.t+H.h*(1-I.y);var V="left";e.isRightAnchor(I)&&(P.lx-=D,V="right"),e.isCenterAnchor(I)&&(P.lx-=D/2,V="center");var Z="top";e.isBottomAnchor(I)&&(P.ly-=F,Z="bottom"),e.isMiddleAnchor(I)&&(P.ly-=F/2,Z="middle"),P.totalWidth=Math.ceil(P.totalWidth),P.totalHeight=Math.ceil(P.totalHeight),P.lx=Math.round(P.lx),P.ly=Math.round(P.ly),m.autoMargin(A,T(I),{x:I.x,y:I.y,l:D*({right:1,center:.5}[V]||0),r:D*({left:1,center:.5}[V]||0),b:F*({top:1,middle:.5}[Z]||0),t:F*({bottom:1,middle:.5}[Z]||0)})}function T(A){return r.autoMarginIdRoot+A._index}function k(A,I,P,S){S=S||{};var E=A.select("."+r.itemRectClassName),D=A.select("."+r.itemTextClassName),F=I.borderwidth,H=P.index,V=I._dims;v.setTranslate(A,F+P.x,F+P.y);var Z=["up","down"].indexOf(I.direction)!==-1,K=S.height||(Z?V.heights[H]:V.height1);E.attr({x:0,y:0,width:S.width||(Z?V.width1:V.widths[H]),height:K});var q=I.font.size*o,W=(n.lineCount(D)-1)*q/2;n.positionText(D,r.textOffsetX,K/2-W+r.textOffsetY),Z?P.y+=V.heights[H]+P.yPad:P.x+=V.widths[H]+P.xPad,P.index++}function L(A,I){A.attr(r.menuIndexAttrName,I||"-1").selectAll("g."+r.dropdownButtonClassName).remove()}ee.exports=function(A){var I=A._fullLayout,P=e.filterVisible(I[r.name]);function S(q){m.autoMargin(A,T(q))}var E=I._menulayer.selectAll("g."+r.containerClassName).data(P.length>0?[0]:[]);if(E.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),E.exit().each(function(){g.select(this).selectAll("g."+r.headerGroupClassName).each(S)}).remove(),P.length!==0){var D=E.selectAll("g."+r.headerGroupClassName).data(P,c);D.enter().append("g").classed(r.headerGroupClassName,!0);for(var F=e.ensureSingle(E,"g",r.dropdownButtonGroupClassName,function(q){q.style("pointer-events","all")}),H=0;H<P.length;H++){var V=P[H];_(A,V)}var Z="updatemenus"+I._uid,K=new d(A,F,Z);D.enter().size()&&(F.node().parentNode.appendChild(F.node()),F.call(L)),D.exit().each(function(q){F.call(L),S(q)}).remove(),D.each(function(q){var W=g.select(this),$=q.type==="dropdown"?F:null;m.manageCommandObserver(A,q,q.buttons,function(R){u(A,q,q.buttons[R.index],W,$,K,R.index,!0)}),q.type==="dropdown"?(f(A,W,F,K,q),i(F,q)&&s(A,W,F,K,q)):s(A,W,null,null,q)})}}},{"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plot_api/plot_template":543,"../../plots/plots":619,"../color":366,"../drawing":388,"./constants":466,"./scrollbox":470,"@plotly/d3":58}],469:[function(y,ee,te){arguments[4][463][0].apply(te,arguments)},{"./attributes":465,"./constants":466,"./defaults":467,"./draw":468,dup:463}],470:[function(y,ee,te){ee.exports=e;var g=y("@plotly/d3"),m=y("../color"),b=y("../drawing"),v=y("../../lib");function e(n,t,o){this.gd=n,this.container=t,this.id=o,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}e.barWidth=2,e.barLength=20,e.barRadius=2,e.barPad=1,e.barColor="#808BA4",e.prototype.enable=function(n,t,o){var r=this.gd._fullLayout,d=r.width,c=r.height;this.position=n;var i,u,f,s,h=this.position.l,p=this.position.w,a=this.position.t,x=this.position.h,l=this.position.direction,w=l==="down",_=l==="left",T=l==="up",k=p,L=x;w||_||l==="right"||T||(this.position.direction="down",w=!0),w||T?(u=(i=h)+k,w?(f=a,L=(s=Math.min(f+L,c))-f):L=(s=a+L)-(f=Math.max(s-L,0))):(s=(f=a)+L,_?k=(u=h+k)-(i=Math.max(u-k,0)):(i=h,k=(u=Math.min(i+k,d))-i)),this._box={l:i,t:f,
vendor: 5,685 bytes, line 1213
1213w:k,h:L};var A=p>k,I=e.barLength+2*e.barPad,P=e.barWidth+2*e.barPad,S=h,E=a+x;E+P>c&&(E=c-P);var D=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-horizontal",!0).call(m.fill,e.barColor),A?(this.hbar=D.attr({rx:e.barRadius,ry:e.barRadius,x:S,y:E,width:I,height:P}),this._hbarXMin=S+I/2,this._hbarTranslateMax=k-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var F=x>L,H=e.barWidth+2*e.barPad,V=e.barLength+2*e.barPad,Z=h+p,K=a;Z+H>d&&(Z=d-H);var q=this.container.selectAll("rect.scrollbar-vertical").data(F?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-vertical",!0).call(m.fill,e.barColor),F?(this.vbar=q.attr({rx:e.barRadius,ry:e.barRadius,x:Z,y:K,width:H,height:V}),this._vbarYMin=K+V/2,this._vbarTranslateMax=L-V):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var W=this.id,$=i-.5,R=F?u+H+.5:u+.5,N=f-.5,U=A?s+P+.5:s+.5,Q=r._topdefs.selectAll("#"+W).data(A||F?[0]:[]);if(Q.exit().remove(),Q.enter().append("clipPath").attr("id",W).append("rect"),A||F?(this._clipRect=Q.select("rect").attr({x:Math.floor($),y:Math.floor(N),width:Math.ceil(R)-Math.floor($),height:Math.ceil(U)-Math.floor(N)}),this.container.call(b.setClipUrl,W,this.gd),this.bg.attr({x:h,y:a,width:p,height:x})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(b.setClipUrl,null),delete this._clipRect),A||F){var j=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(j);var X=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault(),g.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(X),F&&this.vbar.on(".drag",null).call(X)}this.setTranslate(t,o)},e.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(b.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)},e.prototype._onBoxDrag=function(){var n=this.translateX,t=this.translateY;this.hbar&&(n-=g.event.dx),this.vbar&&(t-=g.event.dy),this.setTranslate(n,t)},e.prototype._onBoxWheel=function(){var n=this.translateX,t=this.translateY;this.hbar&&(n+=g.event.deltaY),this.vbar&&(t+=g.event.deltaY),this.setTranslate(n,t)},e.prototype._onBarDrag=function(){var n=this.translateX,t=this.translateY;if(this.hbar){var o=n+this._hbarXMin,r=o+this._hbarTranslateMax;n=(v.constrain(g.event.x,o,r)-o)/(r-o)*(this.position.w-this._box.w)}if(this.vbar){var d=t+this._vbarYMin,c=d+this._vbarTranslateMax;t=(v.constrain(g.event.y,d,c)-d)/(c-d)*(this.position.h-this._box.h)}this.setTranslate(n,t)},e.prototype.setTranslate=function(n,t){var o=this.position.w-this._box.w,r=this.position.h-this._box.h;if(n=v.constrain(n||0,0,o),t=v.constrain(t||0,0,r),this.translateX=n,this.translateY=t,this.container.call(b.setTranslate,this._box.l-this.position.l-n,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+n-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var d=n/o;this.hbar.call(b.setTranslate,n+d*this._hbarTranslateMax,t)}if(this.vbar){var c=t/r;this.vbar.call(b.setTranslate,n,t+c*this._vbarTranslateMax)}}},{"../../lib":503,"../color":366,"../drawing":388,"@plotly/d3":58}],471:[function(y,ee,te){ee.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"}}},{}],472:[function(y,ee,te){ee.exports={axisRefDescription:function(g,m,b){return["If set to a",g,"axis id (e.g. *"+g+"* or","*"+g+"2*), the `"+g+"` position refers to a",g,"coordinate. If set to *paper*, the `"+g+"`","position refers to the distance from the",m,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",m,"("+b+"). If set to a",g,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",m,"of the domain of that axis: e.g.,","*"+g+"2 domain* refers to the domain of the second",g," axis and a",g,"position of 0.5 refers to the","point between the",m,"and the",b,"of the domain of the","second",g,"axis."].join(" ")}}},{}],473:[function(y,ee,te){ee.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},{}],474:[function(y,ee,te){ee.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},{}],475:[function(y,ee,te){ee.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],476:[function(y,ee,te){ee.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]}},{}
1213],477:[function(y,ee,te){ee.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},{}],478:[function(y,ee,te){ee.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(y,ee,te){ee.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},{}],480:[function(y,ee,te){te.xmlns="http://www.w3.org/2000/xmlns/",te.svg="http://www.w3.org/2000/svg",te.xlink="http://www.w3.org/1999/xlink",te.svgAttrs={xmlns:te.svg,"xmlns:xlink":te.xlink}},{}],481:[function(y,ee,te){te.version=y("./version").version,y("native-promise-only"),y("../build/plotcss");for(var g=y("./registry"),m=te.register=g.register,b=y("./plot_api"),v=Object.keys(b),e=0;e<v.length;e++){var n=v[e];n.charAt(0)!=="_"&&(te[n]=b[n]),m({moduleType:"apiMethod",name:n,fn:b[n]})}m(y("./traces/scatter")),m([y("./components/legend"),y("./components/fx"),y("./components/annotations"),y("./components/annotations3d"),y("./components/shapes"),y("./components/images"),y("./components/updatemenus"),y("./components/sliders"),y("./components/rangeslider"),y("./components/rangeselector"),y("./components/grid"),y("./components/errorbars"),y("./components/colorscale"),y("./components/colorbar"),y("./components/modebar")]),m([y("./locale-en"),y("./locale-en-us")]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(m(window.PlotlyLocales),delete window.PlotlyLocales),te.Icons=y("./fonts/ploticon");var t=y("./components/fx"),o=y("./plots/plots");te.Plots={resize:o.resize,graphJson:o.graphJson,sendDataToCloud:o.sendDataToCloud},te.Fx={hover:t.hover,unhover:t.unhover,loneHover:t.loneHover,loneUnhover:t.loneUnhover},te.Snapshot=y("./snapshot"),te.PlotSchema=y("./plot_api/plot_schema")},{"../build/plotcss":1,"./components/annotations":357,"./components/annotations3d":362,"./components/colorbar":372,"./components/colorscale":378,"./components/errorbars":394,"./components/fx":406,"./components/grid":410,"./components/images":415,"./components/legend":423,"./components/modebar":429,"./components/rangeselector":437,"./components/rangeslider":444,"./components/shapes":458,"./components/sliders":463,"./components/updatemenus":469,"./fonts/ploticon":482,"./locale-en":534,"./locale-en-us":533,"./plot_api":538,"./plot_api/plot_schema":542,"./plots/plots":619,"./registry":638,"./snapshot":643,"./traces/scatter":938,"./version":1119,"native-promise-only":245}],482:[function(y,ee,te){ee.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"}
1213,"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.
121364,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'><defs><style>.cls-1 {fill: #3f4f75;} .cls-2 {fill: #80cfbe;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' cx='54' cy='30' r='6'/><circle class='cls-2' cx='30' cy='30' r='6'/><circle class='cls-2' cx='30' cy='54' r='6'/><path class='cls-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>"}}},{}],483:[function(y,ee,te){te.isLeftAnchor=function(g){return g.xanchor==="left"||g.xanchor==="auto"&&g.x<=1/3},te.isCenterAnchor=function(g){return g.xanchor==="center"||g.xanchor==="auto"&&g.x>1/3&&g.x<2/3},te.isRightAnchor=function(g){return g.xanchor==="right"||g.xanchor==="auto"&&g.x>=2/3},te.isTopAnchor=function(g){return g.yanchor==="top"||g.yanchor==="auto"&&g.y>=2/3},te.isMiddleAnchor=function(g){return g.yanchor==="middle"||g.yanchor==="auto"&&g.y>1/3&&g.y<2/3},te.isBottomAnchor=function(g){return g.yanchor==="bottom"||g.yanchor==="auto"&&g.y<=1/3}},{}],484:[function(y,ee,te){var g=y("./mod"),m=g.mod,b=g.modHalf,v=Math.PI,e=2*v;function n(d){return Math.abs(d[1]-d[0])>e-1e-14}function t(d,c){return b(c-d,e)}function o(d,c){if(n(c))return!0;var i,u;c[0]<c[1]?(i=c[0],u=c[1]):(i=c[1],u=c[0]),(i=m(i,e))>(u=m(u,e))&&(u+=e);var f=m(d,e),s=f+e;return f>=i&&f<=u||s>=i&&s<=u}function r(d,c,i,u,f,s,h){f=f||0,s=s||0;var p,a,x,l,w,_=n([i,u]);function T(I,P){return[I*Math.cos(P)+f,s-I*Math.sin(P)]}_?(p=0,a=v,x=e):i<u?(p=i,x=u):(p=u,x=i),d<c?(l=d,w=c):(l=c,w=d);var k,L=Math.abs(x-p)<=v?0:1;function A(I,P,S){return"A"+[I,I]+" "+[0,L,S]+" "+T(I,P)}return _?k=l===null?"M"+T(w,p)+A(w,a,0)+A(w,x,0)+"Z":"M"+T(l,p)+A(l,a,0)+A(l,x,0)+"ZM"+T(w,p)+A(w,a,1)+A(w,x,1)+"Z":l===null?(k="M"+T(w,p)+A(w,x,0),h&&(k+="L0,0Z")):k="M"+T(l,p)+"L"+T(w,p)+A(w,x,0)+"L"+T(l,x)+A(l,p,1)+"Z",k}ee.exports={deg2rad:function(d){return d/180*v},rad2deg:function(d){return d/v*180},angleDelta:t,angleDist:function(d,c){return Math.abs(t(d,c))},isFullCircle:n,isAngleInsideSector:o,isPtInsideSector:function(d,c,i,u){return!!o(c,u)&&(i[0]<i[1]?(f=i[0],s=i[1]):(f=i[1],s=i[0]),d>=f&&d<=s);var f,s},pathArc:function(d,c,i,u,f){return r(null,d,c,i,u,f,0)},pathSector:function(d,c,i,u,f){return r(null,d,c,i,u,f,1)},pathAnnulus:function(d,c,i,u,f,s){return r(d,c,i,u,f,s,1)}}},{"./mod":510}],485:[function(y,ee,te){var g=Array.isArray,m=ArrayBuffer,b=DataView;function v(t){return m.isView(t)&&!(t instanceof b)}function e(t){return g(t)||v(t)}function n(t,o,r){if(e(t)){if(e(t[0])){for(var d=r,c=0;c<t.length;c++)d=o(d,t[c].length);return d}return t.length}return 0}te.isTypedArray=v,te.isArrayOrTypedArray=e,te.isArray1D=function(t){return!e(t[0])},te.ensureArray=function(t,o){return g(t)||(t=[]),t.length=o,t},te.concat=function(){var t,o,r,d,c,i,u,f,s=[],h=!0,p=0;for(r=0;r<arguments.length;r++)(i=(d=arguments[r]).length)&&(o?s.push(d):(o=d,c=i),g(d)?t=!1:(h=!1,p?t!==d.constructor&&(t=!1):t=d.constructor),p+=i);if(!p)return[];if(!s.length)return o;if(h)return o.concat.apply(o,s);if(t){for((u=new t(p)).set(o),r=0;r<s.length;r++)d=s[r],u.set(d,c),c+=d.length;return u}for(u=new Array(p),f=0;f<o.length;f++)u[f]=o[f];for(r=0;r<s.length;r++){for(d=s[r],f=0;f<d.length;f++)u[c+f]=d[f];c+=f}return u},te.maxRowLength=function(t){return n(t,Math.max,0)},te.minRowLength=function(t){return n(t,Math.min,1/0)}},{}],486:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../constants/numerical").BADNUM,b=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;ee.exports=function(v){return typeof v=="string"&&(v=v.replace(b,"")),g(v)?Number(v):m}},{"../constants/numerical":479,"fast-isnumeric":190}],487:[function(y,ee,te){ee.exports=function(g){var m=g._fullLayout;m._glcanvas&&m._glcanvas.size()&&m._glcanvas.each(function(b){b.regl&&b.regl.clear({color:!0,depth:!0})})}},{}],488:[function(y,ee,te){ee.exports=function(g){g._responsiveChartHandler&&(window.removeEventListener("resize",g._responsiveChartHandler),delete g._responsiveChartHandler)}},{}],489:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("tinycolor2"),b=y("../plots/attributes"),v=y("../components/colorscale/scales"),e=y("../components/color"),n=y("../constants/interactions").DESELECTDIM,t=y("./nested_property"),o=y("./regex").counter,r=y("./mod").modHalf,d=y("./array").isArrayOrTypedArray;function c(i,u){var f=te.valObjectMeta[u.valType];if(u.arrayOk&&d(i))return!0;
1213if(f.validateFunction)return f.validateFunction(i,u);var s={},h=s,p={set:function(a){h=a}};return f.coerceFunction(i,p,s,u),h!==s}te.valObjectMeta={data_array:{coerceFunction:function(i,u,f){d(i)?u.set(i):f!==void 0&&u.set(f)}},enumerated:{coerceFunction:function(i,u,f,s){s.coerceNumber&&(i=+i),s.values.indexOf(i)===-1?u.set(f):u.set(i)},validateFunction:function(i,u){u.coerceNumber&&(i=+i);for(var f=u.values,s=0;s<f.length;s++){var h=String(f[s]);if(h.charAt(0)==="/"&&h.charAt(h.length-1)==="/"){if(new RegExp(h.substr(1,h.length-2)).test(i))return!0}else if(i===f[s])return!0}return!1}},boolean:{coerceFunction:function(i,u,f){i===!0||i===!1?u.set(i):u.set(f)}},number:{coerceFunction:function(i,u,f,s){!g(i)||s.min!==void 0&&i<s.min||s.max!==void 0&&i>s.max?u.set(f):u.set(+i)}},integer:{coerceFunction:function(i,u,f,s){i%1||!g(i)||s.min!==void 0&&i<s.min||s.max!==void 0&&i>s.max?u.set(f):u.set(+i)}},string:{coerceFunction:function(i,u,f,s){if(typeof i!="string"){var h=typeof i=="number";s.strict!==!0&&h?u.set(String(i)):u.set(f)}else s.noBlank&&!i?u.set(f):u.set(i)}},color:{coerceFunction:function(i,u,f){m(i).isValid()?u.set(i):u.set(f)}},colorlist:{coerceFunction:function(i,u,f){Array.isArray(i)&&i.length&&i.every(function(s){return m(s).isValid()})?u.set(i):u.set(f)}},colorscale:{coerceFunction:function(i,u,f){u.set(v.get(i,f))}},angle:{coerceFunction:function(i,u,f){i==="auto"?u.set("auto"):g(i)?u.set(r(+i,360)):u.set(f)}},subplotid:{coerceFunction:function(i,u,f,s){var h=s.regex||o(f);typeof i=="string"&&h.test(i)?u.set(i):u.set(f)},validateFunction:function(i,u){var f=u.dflt;return i===f||typeof i=="string"&&!!o(f).test(i)}},flaglist:{coerceFunction:function(i,u,f,s){if(typeof i=="string")if((s.extras||[]).indexOf(i)===-1){for(var h=i.split("+"),p=0;p<h.length;){var a=h[p];s.flags.indexOf(a)===-1||h.indexOf(a)<p?h.splice(p,1):p++}h.length?u.set(h.join("+")):u.set(f)}else u.set(i);else u.set(f)}},any:{coerceFunction:function(i,u,f){i===void 0?u.set(f):u.set(i)}},info_array:{coerceFunction:function(i,u,f,s){function h(E,D,F){var H,V={set:function(Z){H=Z}};return F===void 0&&(F=D.dflt),te.valObjectMeta[D.valType].coerceFunction(E,V,F,D),H}var p=s.dimensions===2||s.dimensions==="1-2"&&Array.isArray(i)&&Array.isArray(i[0]);if(Array.isArray(i)){var a,x,l,w,_,T,k=s.items,L=[],A=Array.isArray(k),I=A&&p&&Array.isArray(k[0]),P=p&&A&&!I,S=A&&!P?k.length:i.length;if(f=Array.isArray(f)?f:[],p)for(a=0;a<S;a++)for(L[a]=[],l=Array.isArray(i[a])?i[a]:[],_=P?k.length:A?k[a].length:l.length,x=0;x<_;x++)w=P?k[x]:A?k[a][x]:k,(T=h(l[x],w,(f[a]||[])[x]))!==void 0&&(L[a][x]=T);else for(a=0;a<S;a++)(T=h(i[a],A?k[a]:k,f[a]))!==void 0&&(L[a]=T);u.set(L)}else u.set(f)},validateFunction:function(i,u){if(!Array.isArray(i))return!1;var f=u.items,s=Array.isArray(f),h=u.dimensions===2;if(!u.freeLength&&i.length!==f.length)return!1;for(var p=0;p<i.length;p++)if(h){if(!Array.isArray(i[p])||!u.freeLength&&i[p].length!==f[p].length)return!1;for(var a=0;a<i[p].length;a++)if(!c(i[p][a],s?f[p][a]:f))return!1}else if(!c(i[p],s?f[p]:f))return!1;return!0}}},te.coerce=function(i,u,f,s,h){var p=t(f,s).get(),a=t(i,s),x=t(u,s),l=a.get(),w=u._template;if(l===void 0&&w&&(l=t(w,s).get(),w=0),h===void 0&&(h=p.dflt),p.arrayOk&&d(l))return x.set(l),l;var _=te.valObjectMeta[p.valType].coerceFunction;_(l,x,h,p);var T=x.get();return w&&T===h&&!c(l,p)&&(_(l=t(w,s).get(),x,h,p),T=x.get()),T},te.coerce2=function(i,u,f,s,h){var p=t(i,s),a=te.coerce(i,u,f,s,h),x=p.get();return x!=null&&a},te.coerceFont=function(i,u,f){var s={};return f=f||{},s.family=i(u+".family",f.family),s.size=i(u+".size",f.size),s.color=i(u+".color",f.color),s},te.coercePattern=function(i,u,f,s){if(i(u+".shape")){i(u+".solidity"),i(u+".size");var h=i(u+".fillmode")==="overlay";if(!s){var p=i(u+".bgcolor",h?f:void 0);i(u+".fgcolor",h?e.contrast(p):f)}i(u+".fgopacity",h?.5:1)}},te.coerceHoverinfo=function(i,u,f){var s,h=u._module.attributes,p=h.hoverinfo?h:b,a=p.hoverinfo;if(f._dataLength===1){var x=a.dflt==="all"?a.flags.slice():a.dflt.split("+");x.splice(x.indexOf("name"),1),s=x.join("+")}return te.coerce(i,u,p,"hoverinfo",s)},te.coerceSelectionMarkerOpacity=function(i,u){if(i.marker){var f,s,h=i.marker.opacity;h!==void 0&&(d(h)||i.selected||i.unselected||(f=h,s=n*h),u("selected.marker.opacity",f),u("unselected.marker.opacity",s))}},te.validate=c},{"../components/color":366,"../components/colorscale/scales":381,"../constants/interactions":478,"../plots/attributes":550,"./array":485,"./mod":510,"./nested_property":511,"./regex":520,"fast-isnumeric":190,tinycolor2:312}],490:[function(y,ee,te){var g,m,b=y("d3-time-format").timeFormat,v=y("fast-isnumeric"),e=y("./loggers"),n=y("./mod").mod,t=y("../constants/numerical"),o=t.BADNUM,r=t.ONEDAY,d=t.ONEHOUR,c=t.ONEMIN,i=t.ONESEC,u=t.EPOCHJD,f=y("../registry"),s=y("d3-time-format").utcFormat,h=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,p=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,a=new Date().getFullYear()-70;function x(D){return D&&f.componentsRegistry.calendars&&typeof D=="str
1213ing"&&D!=="gregorian"}function l(D,F){return String(D+Math.pow(10,F)).substr(1)}te.dateTick0=function(D,F){var H=function(Z,K){return x(Z)?K?f.getComponentMethod("calendars","CANONICAL_SUNDAY")[Z]:f.getComponentMethod("calendars","CANONICAL_TICK")[Z]:K?"2000-01-02":"2000-01-01"}(D,!!F);if(F<2)return H;var V=te.dateTime2ms(H,D);return V+=r*(F-1),te.ms2DateTime(V,0,D)},te.dfltRange=function(D){return x(D)?f.getComponentMethod("calendars","DFLTRANGE")[D]:["2000-01-01","2001-01-01"]},te.isJSDate=function(D){return typeof D=="object"&&D!==null&&typeof D.getTime=="function"},te.dateTime2ms=function(D,F){if(te.isJSDate(D)){var H=D.getTimezoneOffset()*c,V=(D.getUTCMinutes()-D.getMinutes())*c+(D.getUTCSeconds()-D.getSeconds())*i+(D.getUTCMilliseconds()-D.getMilliseconds());if(V){var Z=3*c;H=H-Z/2+n(V-H+Z/2,Z)}return(D=Number(D)-H)>=g&&D<=m?D:o}if(typeof D!="string"&&typeof D!="number")return o;D=String(D);var K=x(F),q=D.charAt(0);!K||q!=="G"&&q!=="g"||(D=D.substr(1),F="");var W=K&&F.substr(0,7)==="chinese",$=D.match(W?p:h);if(!$)return o;var R=$[1],N=$[3]||"1",U=Number($[5]||1),Q=Number($[7]||0),j=Number($[9]||0),X=Number($[11]||0);if(K){if(R.length===2)return o;var J;R=Number(R);try{var re=f.getComponentMethod("calendars","getCal")(F);if(W){var ne=N.charAt(N.length-1)==="i";N=parseInt(N,10),J=re.newDate(R,re.toMonthIndex(R,N,ne),U)}else J=re.newDate(R,Number(N),U)}catch{return o}return J?(J.toJD()-u)*r+Q*d+j*c+X*i:o}R=R.length===2?(Number(R)+2e3-a)%100+a:Number(R),N-=1;var se=new Date(Date.UTC(2e3,N,U,Q,j));return se.setUTCFullYear(R),se.getUTCMonth()!==N||se.getUTCDate()!==U?o:se.getTime()+X*i},g=te.MIN_MS=te.dateTime2ms("-9999"),m=te.MAX_MS=te.dateTime2ms("9999-12-31 23:59:59.9999"),te.isDateTime=function(D,F){return te.dateTime2ms(D,F)!==o};var w=90*r,_=3*d,T=5*c;function k(D,F,H,V,Z){if((F||H||V||Z)&&(D+=" "+l(F,2)+":"+l(H,2),(V||Z)&&(D+=":"+l(V,2),Z))){for(var K=4;Z%10==0;)K-=1,Z/=10;D+="."+l(Z,K)}return D}te.ms2DateTime=function(D,F,H){if(typeof D!="number"||!(D>=g&&D<=m))return o;F||(F=0);var V,Z,K,q,W,$,R=Math.floor(10*n(D+.05,1)),N=Math.round(D-R/10);if(x(H)){var U=Math.floor(N/r)+u,Q=Math.floor(n(D,r));try{V=f.getComponentMethod("calendars","getCal")(H).fromJD(U).formatDate("yyyy-mm-dd")}catch{V=s("G%Y-%m-%d")(new Date(N))}if(V.charAt(0)==="-")for(;V.length<11;)V="-0"+V.substr(1);else for(;V.length<10;)V="0"+V;Z=F<w?Math.floor(Q/d):0,K=F<w?Math.floor(Q%d/c):0,q=F<_?Math.floor(Q%c/i):0,W=F<T?Q%i*10+R:0}else $=new Date(N),V=s("%Y-%m-%d")($),Z=F<w?$.getUTCHours():0,K=F<w?$.getUTCMinutes():0,q=F<_?$.getUTCSeconds():0,W=F<T?10*$.getUTCMilliseconds()+R:0;return k(V,Z,K,q,W)},te.ms2DateTimeLocal=function(D){if(!(D>=g+r&&D<=m-r))return o;var F=Math.floor(10*n(D+.05,1)),H=new Date(Math.round(D-F/10));return k(b("%Y-%m-%d")(H),H.getHours(),H.getMinutes(),H.getSeconds(),10*H.getUTCMilliseconds()+F)},te.cleanDate=function(D,F,H){if(D===o)return F;if(te.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(x(H))return e.error("JS Dates and milliseconds are incompatible with world calendars",D),F;if(!(D=te.ms2DateTimeLocal(+D))&&F!==void 0)return F}else if(!te.isDateTime(D,H))return e.error("unrecognized date",D),F;return D};var L=/%\d?f/g,A=/%h/g,I={1:"1",2:"1",3:"2",4:"2"};function P(D,F,H,V){D=D.replace(L,function(K){var q=Math.min(+K.charAt(1)||6,6);return(F/1e3%1+2).toFixed(q).substr(2).replace(/0+$/,"")||"0"});var Z=new Date(Math.floor(F+.05));if(D=D.replace(A,function(){return I[H("%q")(Z)]}),x(V))try{D=f.getComponentMethod("calendars","worldCalFmt")(D,F,V)}catch{return"Invalid"}return H(D)(Z)}var S=[59,59.9,59.99,59.999,59.9999];te.formatDate=function(D,F,H,V,Z,K){if(Z=x(Z)&&Z,!F)if(H==="y")F=K.year;else if(H==="m")F=K.month;else{if(H!=="d")return function(q,W){var $=n(q+.05,r),R=l(Math.floor($/d),2)+":"+l(n(Math.floor($/c),60),2);if(W!=="M"){v(W)||(W=0);var N=(100+Math.min(n(q/i,60),S[W])).toFixed(W).substr(1);W>0&&(N=N.replace(/0+$/,"").replace(/[\.]$/,"")),R+=":"+N}return R}(D,H)+`
1214`+P(K.dayMonthYear,D,V,Z);F=K.dayMonth+`
1215`+K.year}return P(F,D,V,Z)};var E=3*r;te.incrementMonth=function(D,F,H){H=x(H)&&H;var V=n(D,r);if(D=Math.round(D-V),H)try{var Z=Math.round(D/r)+u,K=f.getComponentMethod("calendars","getCal")(H),q=K.fromJD(Z);return F%12?K.add(q,F,"m"):K.add(q,F/12,"y"),(q.toJD()-u)*r+V}catch{e.error("invalid ms "+D+" in calendar "+H)}var W=new Date(D+E);return W.setUTCMonth(W.getUTCMonth()+F)+V-E},te.findExactDates=function(D,F){for(var H,V,Z=0,K=0,q=0,W=0,$=x(F)&&f.getComponentMethod("calendars","getCal")(F),R=0;R<D.length;R++)if(V=D[R],v(V)){if(!(V%r))if($)try{(H=$.fromJD(V/r+u)).day()===1?H.month()===1?Z++:K++:q++}catch{}else(H=new Date(V)).getUTCDate()===1?H.getUTCMonth()===0?Z++:K++:q++}else W++;q+=K+=Z;var N=D.length-W;return{exactYears:Z/N,exactMonths:K/N,exactDays:q/N}}},{"../constants/numerical":479,"../registry":638,"./loggers":507,"./mod":510,"d3-time-format":120,"fast-isnumeric":190}],491:[function(y,ee,te){var g=y("@plotly/d3"),m=y("./loggers"),b=y("./matrix"),v=y("gl-mat4");function e(d){var c=d&&d.parentNode;c&&c.removeChild(d)}function n(d,c,i){var u="plotly.js-style-"+d,f=document.getElementById(u);f||((f=document.createElement("style")).setAttribute("id",u),f.appendChild(document.createTextNode("")),document.head.appendChild(f));var s=f.sheet;s.insertRule?s.insertRule(c+"{"+i+"}",0):s.addRule?s.addRule(c,i,0):m.warn("addStyleRule failed")}function t(d){var c=window.getComputedStyle(d,null),i=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("-moz-transform")||c.getPropertyValue("-ms-transform")||c.getPropertyValue("-o-transform")||c.getPropertyValue("transform");return i==="none"?null:i.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(u){return+u})}function o(d){for(var c=[];r(d);)c.push(d),d=d.parentNode;return c}function r(d){return d&&(d instanceof Element||d instanceof HTMLElement)}ee.exports={getGraphDiv:function(d){var c;
1215if(typeof d=="string"){if((c=document.getElementById(d))===null)throw new Error("No DOM element with id '"+d+"' exists on the page.");return c}if(d==null)throw new Error("DOM element provided is null or undefined");return d},isPlotDiv:function(d){var c=g.select(d);return c.node()instanceof HTMLElement&&c.size()&&c.classed("js-plotly-plot")},removeElement:e,addStyleRule:function(d,c){n("global",d,c)},addRelatedStyleRule:n,deleteRelatedStyleRule:function(d){var c="plotly.js-style-"+d,i=document.getElementById(c);i&&e(i)},getFullTransformMatrix:function(d){var c=o(d),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return c.forEach(function(u){var f=t(u);if(f){var s=b.convertCssMatrix(f);i=v.multiply(i,i,s)}}),i},getElementTransformMatrix:t,getElementAndAncestors:o,equalDomRects:function(d,c){return d&&c&&d.x===c.x&&d.y===c.y&&d.top===c.top&&d.left===c.left&&d.right===c.right&&d.bottom===c.bottom}}},{"./loggers":507,"./matrix":509,"@plotly/d3":58,"gl-mat4":210}],492:[function(y,ee,te){var g=y("events").EventEmitter,m={init:function(b){if(b._ev instanceof g)return b;var v=new g,e=new g;return b._ev=v,b._internalEv=e,b.on=v.on.bind(v),b.once=v.once.bind(v),b.removeListener=v.removeListener.bind(v),b.removeAllListeners=v.removeAllListeners.bind(v),b._internalOn=e.on.bind(e),b._internalOnce=e.once.bind(e),b._removeInternalListener=e.removeListener.bind(e),b._removeAllInternalListeners=e.removeAllListeners.bind(e),b.emit=function(n,t){typeof jQuery<"u"&&jQuery(b).trigger(n,t),v.emit(n,t),e.emit(n,t)},b},triggerHandler:function(b,v,e){var n,t;typeof jQuery<"u"&&(n=jQuery(b).triggerHandler(v,e));var o=b._ev;if(!o)return n;var r,d=o._events[v];if(!d)return n;function c(i){return i.listener?(o.removeListener(v,i.listener),i.fired?void 0:(i.fired=!0,i.listener.apply(o,[e]))):i.apply(o,[e])}for(d=Array.isArray(d)?d:[d],r=0;r<d.length-1;r++)c(d[r]);return t=c(d[r]),n!==void 0?n:t},purge:function(b){return delete b._ev,delete b.on,delete b.once,delete b.removeListener,delete b.removeAllListeners,delete b.emit,delete b._ev,delete b._internalEv,delete b._internalOn,delete b._internalOnce,delete b._removeInternalListener,delete b._removeAllInternalListeners,b}};ee.exports=m},{events:84}],493:[function(y,ee,te){var g=y("./is_plain_object.js"),m=Array.isArray;function b(v,e,n,t){var o,r,d,c,i,u,f=v[0],s=v.length;if(s===2&&m(f)&&m(v[1])&&f.length===0){if(function(p,a){var x,l;for(x=0;x<p.length;x++){if((l=p[x])!==null&&typeof l=="object")return!1;l!==void 0&&(a[x]=l)}return!0}(v[1],f))return f;f.splice(0,f.length)}for(var h=1;h<s;h++)for(r in o=v[h])d=f[r],c=o[r],t&&m(c)?f[r]=c:e&&c&&(g(c)||(i=m(c)))?(i?(i=!1,u=d&&m(d)?d:[]):u=d&&g(d)?d:{},f[r]=b([u,c],e,n,t)):(c!==void 0||n)&&(f[r]=c);return f}te.extendFlat=function(){return b(arguments,!1,!1,!1)},te.extendDeep=function(){return b(arguments,!0,!1,!1)},te.extendDeepAll=function(){return b(arguments,!0,!0,!1)},te.extendDeepNoArrays=function(){return b(arguments,!0,!1,!0)}},{"./is_plain_object.js":504}],494:[function(y,ee,te){ee.exports=function(g){for(var m={},b=[],v=0,e=0;e<g.length;e++){var n=g[e];m[n]!==1&&(m[n]=1,b[v++]=n)}return b}},{}],495:[function(y,ee,te){function g(b){return b.visible===!0}function m(b){var v=b[0].trace;return v.visible===!0&&v._length!==0}ee.exports=function(b){for(var v,e=(v=b,Array.isArray(v)&&Array.isArray(v[0])&&v[0][0]&&v[0][0].trace?m:g),n=[],t=0;t<b.length;t++){var o=b[t];e(o)&&n.push(o)}return n}},{}],496:[function(y,ee,te){var g=y("@plotly/d3"),m=y("country-regex"),b=y("@turf/area"),v=y("@turf/centroid"),e=y("@turf/bbox"),n=y("./identity"),t=y("./loggers"),o=y("./is_plain_object"),r=y("./nested_property"),d=y("./polygon"),c=Object.keys(m),i={"ISO-3":n,"USA-states":n,"country names":function(f){for(var s=0;s<c.length;s++){var h=c[s];if(new RegExp(m[h]).test(f.trim().toLowerCase()))return h}return t.log("Unrecognized country name: "+f+"."),!1}};function u(f){var s=f.geojson,h=window.PlotlyGeoAssets||{},p=typeof s=="string"?h[s]:s;return o(p)?p:(t.error("Oops ... something went wrong when fetching "+s),!1)}ee.exports={locationToFeature:function(f,s,h){if(!s||typeof s!="str
1215ing")return!1;var p,a,x,l=i[f](s);if(l){if(f==="USA-states")for(p=[],x=0;x<h.length;x++)(a=h[x]).properties&&a.properties.gu&&a.properties.gu==="USA"&&p.push(a);else p=h;for(x=0;x<p.length;x++)if((a=p[x]).id===l)return a;t.log(["Location with id",l,"does not have a matching topojson feature at this resolution."].join(" "))}return!1},feature2polygons:function(f){var s,h,p,a,x=f.geometry,l=x.coordinates,w=f.id,_=[];function T(k){for(var L=0;L<k.length-1;L++)if(k[L][0]>0&&k[L+1][0]<0)return L;return null}switch(s=w==="RUS"||w==="FJI"?function(k){var L;if(T(k)===null)L=k;else for(L=new Array(k.length),a=0;a<k.length;a++)L[a]=[k[a][0]<0?k[a][0]+360:k[a][0],k[a][1]];_.push(d.tester(L))}:w==="ATA"?function(k){var L=T(k);if(L===null)return _.push(d.tester(k));var A=new Array(k.length+1),I=0;for(a=0;a<k.length;a++)a>L?A[I++]=[k[a][0]+360,k[a][1]]:a===L?(A[I++]=k[a],A[I++]=[k[a][0],-90]):A[I++]=k[a];var P=d.tester(A);P.pts.pop(),_.push(P)}:function(k){_.push(d.tester(k))},x.type){case"MultiPolygon":for(h=0;h<l.length;h++)for(p=0;p<l[h].length;p++)s(l[h][p]);break;case"Polygon":for(h=0;h<l.length;h++)s(l[h])}return _},getTraceGeojson:u,extractTraceFeature:function(f){var s=f[0].trace,h=u(s);if(!h)return!1;var p,a={},x=[];for(p=0;p<s._length;p++){var l=f[p];(l.loc||l.loc===0)&&(a[l.loc]=l)}function w(k){var L=r(k,s.featureidkey||"id").get(),A=a[L];if(A){var I=k.geometry;if(I.type==="Polygon"||I.type==="MultiPolygon"){var P={type:"Feature",id:L,geometry:I,properties:{}};P.properties.ct=function(S){var E,D=S.geometry;if(D.type==="MultiPolygon")for(var F=D.coordinates,H=0,V=0;V<F.length;V++){var Z={type:"Polygon",coordinates:F[V]},K=b.default(Z);K>H&&(H=K,E=Z)}else E=D;return v.default(E).geometry.coordinates}(P),A.fIn=k,A.fOut=P,x.push(P)}else t.log(["Location",A.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete a[L]}switch(h.type){case"FeatureCollection":var _=h.features;for(p=0;p<_.length;p++)w(_[p]);break;case"Feature":w(h);break;default:return t.warn(["Invalid GeoJSON type",(h.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var T in a)t.log(["Location *"+T+"*","does not have a matching feature with id-key","*"+s.featureidkey+"*."].join(" "));return x},fetchTraceGeoData:function(f){var s=window.PlotlyGeoAssets||{},h=[];function p(w){return new Promise(function(_,T){g.json(w,function(k,L){if(k){delete s[w];var A=k.status===404?'GeoJSON at URL "'+w+'" does not exist.':"Unexpected error while fetching from "+w;return T(new Error(A))}return s[w]=L,_(L)})})}function a(w){return new Promise(function(_,T){var k=0,L=setInterval(function(){return s[w]&&s[w]!=="pending"?(clearInterval(L),_(s[w])):k>100?(clearInterval(L),T("Unexpected error while fetching from "+w)):void k++},50)})}for(var x=0;x<f.length;x++){var l=f[x][0].trace.geojson;typeof l=="string"&&(s[l]?s[l]==="pending"&&h.push(a(l)):(s[l]="pending",h.push(p(l))))}return h},computeBbox:function(f){return e.default(f)}}},{"./identity":501,"./is_plain_object":504,"./loggers":507,"./nested_property":511,"./polygon":515,"@plotly/d3":58,"@turf/area":61,"@turf/bbox":64,"@turf/centroid":67,"country-regex":94}],497:[function(y,ee,te){var g=y("../constants/numerical").BADNUM;te.calcTraceToLineCoords=function(m){for(var b=m[0].trace.connectgaps,v=[],e=[],n=0;n<m.length;n++){var t=m[n].lonlat;t[0]!==g?e.push(t):!b&&e.length>0&&(v.push(e),e=[])}return e.length>0&&v.push(e),v},te.makeLine=function(m){return m.length===1?{type:"LineString",coordinates:m[0]}:{type:"MultiLineString",coordinates:m}},te.makePolygon=function(m){if(m.length===1)return{type:"Polygon",coordinates:m};for(var b=new Array(m.length),v=0;v<m.length;v++)b[v]=[m[v]];return{type:"MultiPolygon",coordinates:b}},te.makeBlank=function(){return{type:"Point",coordinates:[]}}},{"../constants/numerical":479}],498:[function(y,ee,te){var g,m,b,v=y("./mod").mod;function e(t,o,r,d,c,i,u,f){var s=r-t,h=c-t,p=u-c,a=d-o,x=i-o,l=f-i,w=s*l-p*a;if(w===0)return null;
1215var _=(h*l-p*x)/w,T=(h*a-s*x)/w;return T<0||T>1||_<0||_>1?null:{x:t+s*_,y:o+a*_}}function n(t,o,r,d,c){var i=d*t+c*o;if(i<0)return d*d+c*c;if(i>r){var u=d-t,f=c-o;return u*u+f*f}var s=d*o-c*t;return s*s/r}te.segmentsIntersect=e,te.segmentDistance=function(t,o,r,d,c,i,u,f){if(e(t,o,r,d,c,i,u,f))return 0;var s=r-t,h=d-o,p=u-c,a=f-i,x=s*s+h*h,l=p*p+a*a,w=Math.min(n(s,h,x,c-t,i-o),n(s,h,x,u-t,f-o),n(p,a,l,t-c,o-i),n(p,a,l,r-c,d-i));return Math.sqrt(w)},te.getTextLocation=function(t,o,r,d){if(t===m&&d===b||(g={},m=t,b=d),g[r])return g[r];var c=t.getPointAtLength(v(r-d/2,o)),i=t.getPointAtLength(v(r+d/2,o)),u=Math.atan((i.y-c.y)/(i.x-c.x)),f=t.getPointAtLength(v(r,o)),s={x:(4*f.x+c.x+i.x)/6,y:(4*f.y+c.y+i.y)/6,theta:u};return g[r]=s,s},te.clearLocationCache=function(){m=null},te.getVisibleSegment=function(t,o,r){var d,c,i=o.left,u=o.right,f=o.top,s=o.bottom,h=0,p=t.getTotalLength(),a=p;function x(w){var _=t.getPointAtLength(w);w===0?d=_:w===p&&(c=_);var T=_.x<i?i-_.x:_.x>u?_.x-u:0,k=_.y<f?f-_.y:_.y>s?_.y-s:0;return Math.sqrt(T*T+k*k)}for(var l=x(h);l;){if((h+=l+r)>a)return;l=x(h)}for(l=x(a);l;){if(h>(a-=l+r))return;l=x(a)}return{min:h,max:a,len:a-h,total:p,isClosed:h===0&&a===p&&Math.abs(d.x-c.x)<.1&&Math.abs(d.y-c.y)<.1}},te.findPointOnPath=function(t,o,r,d){for(var c,i,u,f=(d=d||{}).pathLength||t.getTotalLength(),s=d.tolerance||.001,h=d.iterationLimit||30,p=t.getPointAtLength(0)[r]>t.getPointAtLength(f)[r]?-1:1,a=0,x=0,l=f;a<h;){if(c=(x+l)/2,u=(i=t.getPointAtLength(c))[r]-o,Math.abs(u)<s)return i;p*u>0?l=c:x=c,a++}return i}},{"./mod":510}],499:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("tinycolor2"),b=y("color-normalize"),v=y("../components/colorscale"),e=y("../components/color/attributes").defaultLine,n=y("./array").isArrayOrTypedArray,t=b(e);function o(c,i){var u=c;return u[3]*=i,u}function r(c){if(g(c))return t;var i=b(c);return i.length?i:t}function d(c){return g(c)?c:1}ee.exports={formatColor:function(c,i,u){var f,s,h,p,a,x=c.color,l=n(x),w=n(i),_=v.extractOpts(c),T=[];if(f=_.colorscale!==void 0?v.makeColorScaleFuncFromTrace(c):r,s=l?function(L,A){return L[A]===void 0?t:b(f(L[A]))}:r,h=w?function(L,A){return L[A]===void 0?1:d(L[A])}:d,l||w)for(var k=0;k<u;k++)p=s(x,k),a=h(i,k),T[k]=o(p,a);else T=o(b(x),i);return T},parseColorScale:function(c){var i=v.extractOpts(c),u=i.colorscale;return i.reversescale&&(u=v.flipScale(i.colorscale)),u.map(function(f){var s=f[0],h=m(f[1]).toRgb();return{index:s,rgb:[h.r,h.g,h.b,h.a]}})}}},{"../components/color/attributes":365,"../components/colorscale":378,"./array":485,"color-normalize":89,"fast-isnumeric":190,tinycolor2:312}],500:[function(y,ee,te){var g=y("./identity");function m(b){return[b]}ee.exports={keyFun:function(b){return b.key},repeat:m,descend:g,wrap:m,unwrap:function(b){return b[0]}}},{"./identity":501}],501:[function(y,ee,te){ee.exports=function(g){return g}},{}],502:[function(y,ee,te){ee.exports=function(g,m){if(!m)return g;var b=1/Math.abs(m),v=b>1?(b*g+b*m)/b:g+m,e=String(v).length;if(e>16){var n=String(m).length;if(e>=String(g).length+n){var t=parseFloat(v).toPrecision(12);t.indexOf("e+")===-1&&(v=+t)}}return v}},{}],503:[function(y,ee,te){var g=y("@plotly/d3"),m=y("d3-time-format").utcFormat,b=y("d3-format").format,v=y("fast-isnumeric"),e=y("../constants/numerical"),n=e.FP_SAFE,t=-n,o=e.BADNUM,r=ee.exports={};r.adjustFormat=function(R){return!R||/^\d[.]\df/.test(R)||/[.]\d%/.test(R)?R:R==="0.f"?"~f":/^\d%/.test(R)?"~%":/^\ds/.test(R)?"~s":!/^[~,.0$]/.test(R)&&/[&fps]/.test(R)?"~"+R:R};var d={};r.warnBadFormat=function(R){var N=String(R);d[N]||(d[N]=1,r.warn('encountered bad format: "'+N+'"'))},r.noFormat=function(R){return String(R)},r.numberFormat=function(R){var N;try{N=b(r.adjustFormat(R))}catch{return r.warnBadFormat(R),r.noFormat}return N},r.nestedProperty=y("./nested_property"),r.keyedContainer=y("./keyed_container"),r.relativeAttr=y("./relative_attr"),r.isPlainObject=y("./is_plain_object"),r.toLogRange=y("./to_log_range"),r.relinkPrivateKeys=y("./relink_private");var c=y("./array");r.isTypedArray=c.isTypedArray,r.isArrayOrTypedArray=c.isArrayOrTypedArray,r.isArray1D=c.isArray1D,r.ensureArray=c.ensureArray,r.concat=c.concat,r.maxRowLength=c.maxRowLength,r.minRowLength=c.minRowLength;var i=y("./mod");r.mod=i.mod,r.modHalf=i.modHalf;var u=y("./coerce");r.valObjectMeta=u.valObjectMeta,r.coerce=u.coerce,r.coerce2=u.coerce2,r.coerceFont=u.coerceFont,r.coercePattern=u.coercePattern,r.coerceHoverinfo=u.coerceHoverinfo,r.coerceSelectionMarkerOpacity=u.coerceSelectionMarkerOpacity,r.validate=u.validate;var f=y("./dates");r.dateTime2ms=f.dateTime2ms,r.isDateTime=f.isDateTime,r.ms2DateTime=f.ms2DateTime,r.ms2DateTimeLocal=f.ms2DateTimeLocal,r.cleanDate=f.cleanDate,r.isJSDate=f.isJSDate,r.formatDate=f.formatDate,r.incrementMonth=f.incrementMonth,r.dateTick0=f.dateTick0,r.dfltRange=f.dfltRange,r.findExactDates=f.findExactDates,r.MIN_MS=f.MIN_MS,r.MAX_MS=f.MAX_MS;var s=y("./search");r.findBin=s.findBin,r.sorterAsc=s.sorterAsc,r.sorterDes=s.sorterDes,r.distinctVals=s.distinctVals,r.roundUp=s.roundUp,r.s
1215ort=s.sort,r.findIndexOfMin=s.findIndexOfMin,r.sortObjectKeys=y("./sort_object_keys");var h=y("./stats");r.aggNums=h.aggNums,r.len=h.len,r.mean=h.mean,r.median=h.median,r.midRange=h.midRange,r.variance=h.variance,r.stdev=h.stdev,r.interp=h.interp;var p=y("./matrix");r.init2dArray=p.init2dArray,r.transposeRagged=p.transposeRagged,r.dot=p.dot,r.translationMatrix=p.translationMatrix,r.rotationMatrix=p.rotationMatrix,r.rotationXYMatrix=p.rotationXYMatrix,r.apply3DTransform=p.apply3DTransform,r.apply2DTransform=p.apply2DTransform,r.apply2DTransform2=p.apply2DTransform2,r.convertCssMatrix=p.convertCssMatrix,r.inverseTransformMatrix=p.inverseTransformMatrix;var a=y("./angles");r.deg2rad=a.deg2rad,r.rad2deg=a.rad2deg,r.angleDelta=a.angleDelta,r.angleDist=a.angleDist,r.isFullCircle=a.isFullCircle,r.isAngleInsideSector=a.isAngleInsideSector,r.isPtInsideSector=a.isPtInsideSector,r.pathArc=a.pathArc,r.pathSector=a.pathSector,r.pathAnnulus=a.pathAnnulus;var x=y("./anchor_utils");r.isLeftAnchor=x.isLeftAnchor,r.isCenterAnchor=x.isCenterAnchor,r.isRightAnchor=x.isRightAnchor,r.isTopAnchor=x.isTopAnchor,r.isMiddleAnchor=x.isMiddleAnchor,r.isBottomAnchor=x.isBottomAnchor;var l=y("./geometry2d");r.segmentsIntersect=l.segmentsIntersect,r.segmentDistance=l.segmentDistance,r.getTextLocation=l.getTextLocation,r.clearLocationCache=l.clearLocationCache,r.getVisibleSegment=l.getVisibleSegment,r.findPointOnPath=l.findPointOnPath;var w=y("./extend");r.extendFlat=w.extendFlat,r.extendDeep=w.extendDeep,r.extendDeepAll=w.extendDeepAll,r.extendDeepNoArrays=w.extendDeepNoArrays;var _=y("./loggers");r.log=_.log,r.warn=_.warn,r.error=_.error;var T=y("./regex");r.counterRegex=T.counter;var k=y("./throttle");r.throttle=k.throttle,r.throttleDone=k.done,r.clearThrottle=k.clear;var L=y("./dom");function A(R){var N={};for(var U in R)for(var Q=R[U],j=0;j<Q.length;j++)N[Q[j]]=+U;return N}r.getGraphDiv=L.getGraphDiv,r.isPlotDiv=L.isPlotDiv,r.removeElement=L.removeElement,r.addStyleRule=L.addStyleRule,r.addRelatedStyleRule=L.addRelatedStyleRule,r.deleteRelatedStyleRule=L.deleteRelatedStyleRule,r.getFullTransformMatrix=L.getFullTransformMatrix,r.getElementTransformMatrix=L.getElementTransformMatrix,r.getElementAndAncestors=L.getElementAndAncestors,r.equalDomRects=L.equalDomRects,r.clearResponsive=y("./clear_responsive"),r.preserveDrawingBuffer=y("./preserve_drawing_buffer"),r.makeTraceGroups=y("./make_trace_groups"),r._=y("./localize"),r.notifier=y("./notifier"),r.filterUnique=y("./filter_unique"),r.filterVisible=y("./filter_visible"),r.pushUnique=y("./push_unique"),r.increment=y("./increment"),r.cleanNumber=y("./clean_number"),r.ensureNumber=function(R){return v(R)?(R=Number(R))>n||R<t?o:R:o},r.isIndex=function(R,N){return!(N!==void 0&&R>=N)&&v(R)&&R>=0&&R%1==0},r.noop=y("./noop"),r.identity=y("./identity"),r.repeat=function(R,N){for(var U=new Array(N),Q=0;Q<N;Q++)U[Q]=R;return U},r.swapAttrs=function(R,N,U,Q){U||(U="x"),Q||(Q="y");for(var j=0;j<N.length;j++){var X=N[j],J=r.nestedProperty(R,X.replace("?",U)),re=r.nestedProperty(R,X.replace("?",Q)),ne=J.get();J.set(re.get()),re.set(ne)}},r.raiseToTop=function(R){R.parentNode.appendChild(R)},r.cancelTransition=function(R){return R.transition().duration(0)},r.constrain=function(R,N,U){return N>U?Math.max(U,Math.min(N,R)):Math.max(N,Math.min(U,R))},r.bBoxIntersect=function(R,N,U){return U=U||0,R.left<=N.right+U&&N.left<=R.right+U&&R.top<=N.bottom+U&&N.top<=R.bottom+U},r.simpleMap=function(R,N,U,Q,j){for(var X=R.length,J=new Array(X),re=0;re<X;re++)J[re]=N(R[re],U,Q,j);return J},r.randstr=function R(N,U,Q,j){if(Q||(Q=16),U===void 0&&(U=24),U<=0)return"0";var X,J,re=Math.log(Math.pow(2,U))/Math.log(Q),ne="";for(X=2;re===1/0;X*=2)re=Math.log(Math.pow(2,U/X))/Math.log(Q)*X;var se=re-Math.floor(re);for(X=0;X<Math.floor(re);X++)ne=Math.floor(Math.random()*Q).toString(Q)+ne;se&&(J=Math.pow(Q,se),ne=Math.floor(Math.random()*J).toString(Q)+ne);var oe=parseInt(ne,Q);return N&&N[ne]||oe!==1/0&&oe>=Math.pow(2,U)?j>10?(r.warn("randstr failed uniqueness"),ne):R(N,U,Q,(j||0)+1):ne},r.OptionControl=function(R,N){R||(R={}),N||(N="opt");var U={optionList:[],_newoption:function(Q){Q[N]=R,U[Q.name]=Q,U.optionList.push(Q)}};return U["_"+N]=R,U}
1215,r.smooth=function(R,N){if((N=Math.round(N)||0)<2)return R;var U,Q,j,X,J=R.length,re=2*J,ne=2*N-1,se=new Array(ne),oe=new Array(J);for(U=0;U<ne;U++)se[U]=(1-Math.cos(Math.PI*(U+1)/N))/(2*N);for(U=0;U<J;U++){for(X=0,Q=0;Q<ne;Q++)(j=U+Q+1-N)<-J?j-=re*Math.round(j/re):j>=re&&(j-=re*Math.floor(j/re)),j<0?j=-1-j:j>=J&&(j=re-1-j),X+=R[j]*se[Q];oe[U]=X}return oe},r.syncOrAsync=function(R,N,U){var Q;function j(){return r.syncOrAsync(R,N,U)}for(;R.length;)if((Q=(0,R.splice(0,1)[0])(N))&&Q.then)return Q.then(j);return U&&U(N)},r.stripTrailingSlash=function(R){return R.substr(-1)==="/"?R.substr(0,R.length-1):R},r.noneOrAll=function(R,N,U){if(R){var Q,j=!1,X=!0;for(Q=0;Q<U.length;Q++)R[U[Q]]!=null?j=!0:X=!1;if(j&&!X)for(Q=0;Q<U.length;Q++)R[U[Q]]=N[U[Q]]}},r.mergeArray=function(R,N,U,Q){var j=typeof Q=="function";if(r.isArrayOrTypedArray(R))for(var X=Math.min(R.length,N.length),J=0;J<X;J++){var re=R[J];N[J][U]=j?Q(re):re}},r.mergeArrayCastPositive=function(R,N,U){return r.mergeArray(R,N,U,function(Q){var j=+Q;return isFinite(j)&&j>0?j:0})},r.fillArray=function(R,N,U,Q){if(Q=Q||r.identity,r.isArrayOrTypedArray(R))for(var j=0;j<N.length;j++)N[j][U]=Q(R[j])},r.castOption=function(R,N,U,Q){Q=Q||r.identity;var j=r.nestedProperty(R,U).get();return r.isArrayOrTypedArray(j)?Array.isArray(N)&&r.isArrayOrTypedArray(j[N[0]])?Q(j[N[0]][N[1]]):Q(j[N]):j},r.extractOption=function(R,N,U,Q){if(U in R)return R[U];var j=r.nestedProperty(N,Q).get();return Array.isArray(j)?void 0:j},r.tagSelected=function(R,N,U){var Q,j,X=N.selectedpoints,J=N._indexToPoints;J&&(Q=A(J));for(var re=0;re<X.length;re++){var ne=X[re];if(r.isIndex(ne)||r.isArrayOrTypedArray(ne)&&r.isIndex(ne[0])&&r.isIndex(ne[1])){var se=Q?Q[ne]:ne,oe=U?U[se]:se;(j=oe)!==void 0&&j<R.length&&(R[oe].selected=1)}}},r.selIndices2selPoints=function(R){var N=R.selectedpoints,U=R._indexToPoints;if(U){for(var Q=A(U),j=[],X=0;X<N.length;X++){var J=N[X];if(r.isIndex(J)){var re=Q[J];r.isIndex(re)&&j.push(re)}}return j}return N},r.getTargetArray=function(R,N){var U=N.target;if(typeof U=="string"&&U){var Q=r.nestedProperty(R,U).get();return!!Array.isArray(Q)&&Q}return!!Array.isArray(U)&&U},r.minExtend=function(R,N){var U={};typeof N!="object"&&(N={});var Q,j,X,J=Object.keys(R);for(Q=0;Q<J.length;Q++)X=R[j=J[Q]],j.charAt(0)!=="_"&&typeof X!="function"&&(j==="module"?U[j]=X:Array.isArray(X)?U[j]=j==="colorscale"?X.slice():X.slice(0,3):r.isTypedArray(X)?U[j]=X.subarray(0,3):U[j]=X&&typeof X=="object"?r.minExtend(R[j],N[j]):X);for(J=Object.keys(N),Q=0;Q<J.length;Q++)typeof(X=N[j=J[Q]])=="object"&&j in U&&typeof U[j]=="object"||(U[j]=X);return U},r.titleCase=function(R){return R.charAt(0).toUpperCase()+R.substr(1)},r.containsAny=function(R,N){for(var U=0;U<N.length;U++)if(R.indexOf(N[U])!==-1)return!0;return!1},r.isIE=function(){return window.navigator.msSaveBlob!==void 0};var I=/Version\/[\d\.]+.*Safari/;r.isSafari=function(){return I.test(window.navigator.userAgent)};var P=/iPad|iPhone|iPod/;r.isIOS=function(){return P.test(window.navigator.userAgent)};var S=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var R=S.exec(window.navigator.userAgent);if(R&&R.length===2){var N=parseInt(R[1]);if(!isNaN(N))return N}return null},r.isD3Selection=function(R){return R instanceof g.selection},r.ensureSingle=function(R,N,U,Q){var j=R.select(N+(U?"."+U:""));if(j.size())return j;var X=R.append(N);return U&&X.classed(U,!0),Q&&X.call(Q),X},r.ensureSingleById=function(R,N,U,Q){var j=R.select(N+"#"+U);if(j.size())return j;var X=R.append(N).attr("id",U);return Q&&X.call(Q),X},r.objectFromPath=function(R,N){for(var U,Q=R.split("."),j=U={},X=0;X<Q.length;X++){var J=Q[X],re=null,ne=Q[X].match(/(.*)\[([0-9]+)\]/);ne?(J=ne[1],re=ne[2],U=U[J]=[],X===Q.length-1?U[re]=N:U[re]={},U=U[re]):(X===Q.length-1?U[J]=N:U[J]={},U=U[J])}return j};var E=/^([^\[\.]+)\.(.+)?/,D=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;r.expandObjectPaths=function(R){var N,U,Q,j,X,J,re;if(typeof R=="object"&&!Array.isArray(R))for(U in R)R.hasOwnProperty(U)&&((N=U.match(E))?(j=R[U],Q=N[1],delete R[U],R[Q]=r.extendDeepNoArrays(R[Q]||{},r.objectFromPath(U,r.expandObjectPaths(j))[Q])):(N=U.match(D))?(j=R[U],Q=N[1],X=parseInt(N[2]),delete R[U],R[Q
1215]=R[Q]||[],N[3]==="."?(re=N[4],J=R[Q][X]=R[Q][X]||{},r.extendDeepNoArrays(J,r.objectFromPath(re,r.expandObjectPaths(j)))):R[Q][X]=r.expandObjectPaths(j)):R[U]=r.expandObjectPaths(R[U]));return R},r.numSeparate=function(R,N,U){if(U||(U=!1),typeof N!="string"||N.length===0)throw new Error("Separator string required for formatting!");typeof R=="number"&&(R=String(R));var Q=/(\d+)(\d{3})/,j=N.charAt(0),X=N.charAt(1),J=R.split("."),re=J[0],ne=J.length>1?j+J[1]:"";if(X&&(J.length>1||re.length>4||U))for(;Q.test(re);)re=re.replace(Q,"$1"+X+"$2");return re+ne},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(R,N){var U={};return R.replace(r.TEMPLATE_STRING_REGEX,function(Q,j){var X;return F.test(j)?X=N[j]:(U[j]=U[j]||r.nestedProperty(N,j).get,X=U[j]()),r.isValidTextValue(X)?X:""})};var H={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=function(){return K.apply(H,arguments)};var V={max:10,count:0,name:"texttemplate"};r.texttemplateString=function(){return K.apply(V,arguments)};var Z=/^[:|\|]/;function K(R,N,U){var Q=this,j=arguments;N||(N={});var X={};return R.replace(r.TEMPLATE_STRING_REGEX,function(J,re,ne){var se,oe,pe,ce=re==="_xother"||re==="_yother",de=re==="_xother_"||re==="_yother_",xe=re==="xother_"||re==="yother_",we=re==="xother"||re==="yother"||ce||xe||de,be=re;if((ce||de)&&(be=be.substring(1)),(xe||de)&&(be=be.substring(0,be.length-1)),we){if((se=N[be])===void 0)return""}else for(pe=3;pe<j.length;pe++)if(oe=j[pe]){if(oe.hasOwnProperty(be)){se=oe[be];break}if(F.test(be)||(se=r.nestedProperty(oe,be).get(),(se=X[be]||r.nestedProperty(oe,be).get())&&(X[be]=se)),se!==void 0)break}if(se===void 0&&Q)return Q.count<Q.max&&(r.warn("Variable '"+be+"' in "+Q.name+" could not be found!"),se=J),Q.count===Q.max&&r.warn("Too many "+Q.name+" warnings - additional warnings will be suppressed"),Q.count++,J;if(ne){var Ee;if(ne[0]===":"&&(se=(Ee=U?U.numberFormat:r.numberFormat)(ne.replace(Z,""))(se)),ne[0]==="|"){Ee=U?U.timeFormat:m;var fe=r.dateTime2ms(se);se=r.formatDate(fe,ne.replace(Z,""),!1,Ee)}}else{var me=be+"Label";N.hasOwnProperty(me)&&(se=N[me])}return we&&(se="("+se+")",(ce||de)&&(se=" "+se),(xe||de)&&(se+=" ")),se})}r.subplotSort=function(R,N){for(var U=Math.min(R.length,N.length)+1,Q=0,j=0,X=0;X<U;X++){var J=R.charCodeAt(X)||0,re=N.charCodeAt(X)||0,ne=J>=48&&J<=57,se=re>=48&&re<=57;if(ne&&(Q=10*Q+J-48),se&&(j=10*j+re-48),!ne||!se){if(Q!==j)return Q-j;if(J!==re)return J-re}}return j-Q};var q=2e9;r.seedPseudoRandom=function(){q=2e9},r.pseudoRandom=function(){var R=q;return q=(69069*q+1)%4294967296,Math.abs(q-R)<429496729?r.pseudoRandom():q/4294967296},r.fillText=function(R,N,U){var Q=Array.isArray(U)?function(J){U.push(J)}:function(J){U.text=J},j=r.extractOption(R,N,"htx","hovertext");if(r.isValidTextValue(j))return Q(j);var X=r.extractOption(R,N,"tx","text");return r.isValidTextValue(X)?Q(X):void 0},r.isValidTextValue=function(R){return R||R===0},r.formatPercent=function(R,N){N=N||0;for(var U=(Math.round(100*R*Math.pow(10,N))*Math.pow(.1,N)).toFixed(N)+"%",Q=0;Q<N;Q++)U.indexOf(".")!==-1&&(U=(U=U.replace("0%","%")).replace(".%","%"));return U},r.isHidden=function(R){var N=window.getComputedStyle(R).display;return!N||N==="none"},r.strTranslate=function(R,N){return R||N?"translate("+R+","+N+")":""},r.strRotate=function(R){return R?"rotate("+R+")":""},r.strScale=function(R){return R!==1?"scale("+R+")":""},r.getTextTransform=function(R){var N=R.noCenter,U=R.textX,Q=R.textY,j=R.targetX,X=R.targetY,J=R.anchorX||0,re=R.anchorY||0,ne=R.rotate,se=R.scale;return se?se>1&&(se=1):se=0,r.strTranslate(j-se*(U+J),X-se*(Q+re))+r.strScale(se)+(ne?"rotate("+ne+(N?"":" "+U+" "+Q)+")":"")},r.ensureUniformFontSize=function(R,N){var U=r.extendFlat({},N);return U.size=Math.max(N.size,R._fullLayout.uniformtext.minsize||0),U},r.join2=function(R,N,U){var Q=R.length;return Q>1?R.slice(0,-1).join(N)+U+R[Q-1]:R.join(N)},r.bigFont=function(R){return Math.round(1.2*R)};var W=r.getFirefoxVersion(),$=W!==null&&W<86;r.getPositionFromD3Event=function(){return $?[g.event.layerX,g.event.layerY]:[g.event.offsetX,g.event.offsetY]}},{"../constants/numerical":479,"./anchor_utils":483,"./angles":484,"./array":485,"./clean_number":486,"./clear_responsive":488,"./coerce":489,"./dates":490,"./dom":491,"./extend":493,"./filter_unique":494,"./filter_visible":495,"./geometry2d":498,"./identity":501,"./increment":502,"./is_plain_object":504,"./keyed_container":505,"./localize":506,"./loggers":507,"./make_trace_groups":508,"./matrix":509,"./mod":510,"./nested_property":511,"./noop":512,"./notifier":513,"./preserve_drawing_buffer":517,"./push_unique":518,"./regex":520,"./relative_attr":521,"./relink_private":522,"./search":523,"./sort_object_keys":526,"./stats":527,"./throttle":530,"./to_log_range":531,"@plotly/d3":58,"d3-format":112,"d3-time-format":120,"fast-isnumeric":190}],504:[function(y,ee,te){ee.exports=function(g){return window&&window.process&&window.process.versions?Object.prototype.toString.call(g)==="[object Object]":Object.prototype.toString.call(g)==="[object Object]"&&Object.getPrototypeOf(g).hasOwnProperty("hasOwnProperty")}},{}],505:[function(y,ee,te){var g=y("./nested_property"),m=/^\w*$/;ee.exports=function(b,v,e,n){var t,o,r;e=e||"name",n=n||"value";var d={};v&&v.length?(r=g(b,v),o=r.get()):o=b,v=v||"";var c={};if(o)for(t=0;t<o.length;t++)c[o[t][e]]=t;var i=m.test(n),u={set:function(f,s){var h=s===null?4:0;if(!o){if(!r||h===4)return;o=[],r.set(o)}var p=c[f];if(p===void 0){if(h===4)return;h|=3,p=o.length,c[f]=p}else s!==(i?o[p][n]:g(o[p],n).get())&&(h|=2);var a=o[p]=o[p]||{};return a[e]=f,i?a[n]=s:g(a,n).set(s),s!==null&&(h&=-5),d[p]=d[p]|h,u},get:function(f){if(o){var s=c[f];return s===void 0?void 0:i?o[s][n]:g(o[s],n).get()}},rename:function(f,s){var h=c[f];return h===void 0||(d[h]=1|d[h],c[s]=h,delete c[f],o[h][e]=s),u},remove:function(f){var s=c[f];if(s===void 0)return u;var h=o[s];if(Object.keys(h).length>2)return d[s]=2|d[s],u.set(f,null);if(i){for(t=s;t<o.length;t++)d[t]=3|d[t];for(t=s;t<o.length;t++)c[o[t][e]]--;o.splice(s,1),delete c[f]}else g(h,n).set(null),d[s]=6|d[s];return u},constructUpdate:function(){for(var f,s,h={},p=Object.keys(d),a=0;a<p.length;a++)s=p[a],f=v+"["+s+"]",o[s]?(1&d[s]&&(h[f+"."+e]=o[s][e]),2&d[s]&&(h[f+"."+n]=i?4&d[s]?null:o[s][n]:4&d[s]?null:g(o[s],n).get())):h[f]=null;return h}};return u}},{"./nested_property":511}],506:[function(y,ee,te){var g=y("../registry");ee.exports=function(m,b){for(var v=m._context.locale,e=0;e<2;e++){for(var n=m._context.locales,t=0;t<2;t++){var o=(n[v]||{}).dictionary;if(o){var r=o[b];if(r)return r}n=g.localeRegistry}var d=v.split("-")[0];if(d===v)break;v=d}return b}},{"../registry":638}],507:[function(y,ee,te){var g=y("../plot_api/plot_config").dfltConfig,m=y("./notifier"),b=ee.exports={};b.log=function(){var v;if(g.logging>1){var e=["LOG:"];for(v=0;v<arguments.length;v++)e.push(arguments[v]);console.trace.apply(console,e)}if(g.notifyOnLogging>1){var n=[];for(v=0;v<arguments.length;v++)n.push(arguments[v]);m(n.join("<br>"),"long")}},b.warn=function(){var v;if(g.logging>0){var e=["WARN:"];for(v=0;v<arguments.length;v++)e.push(arguments[v]);console.trace.apply(console,e)}if(g.notifyOnLogging>0){var n=[];for(v=0;v<arguments.length;v++)n.push(arguments[v]);m(n.join("<br>"),"stick")}},b.error=function(){var v;if(g.logging>0){var e=["ERROR:"];for(v=0;v<arguments.length;v++)e.push(arguments[v]);console.error.apply(console,e)}if(g.notifyOnLogging>0){var n=[];for(v=0;v<arguments.length;v++)n.push(arguments[v]);m(n.join("<br>"),"stick")}}},{"../plot_api/plot_config":541,"./notifier":513}],508:[function(y,ee,te){var g=y("@plotly/d3");ee.exports=function(m,b,v){var e=m.selectAll("g."+v.replace(/\s/g,".")).data(b,function(t){return t[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",v),e.order();var n=m.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(t){t[0][n]=g.select(this)}),e}},{"@plotly/d3":58}],509:[function(y,ee,te){var g=y("gl-mat4");te.init2dArray=function(m,b){for(var v=new Array(m),e=0;e<m;e++)v[e]=new Array(b);return v},te.transposeRagged=function(m){var b,v,e=0,n=m.length;for(b=0;b<n;b++)e=Math.max(e,m[b].length);var t=new Array(e);for(b=0;b<e;b++)for(t[b]=new Array(n),v=0;v<n;v++)t[b][v]=m[v][b];return t},te.dot=function(m,b){if(!m.length||!b.length||m.length!==b.length)return null;var v,e,n=m.length;if(m[0].length)for(v=new Array(n),e=0;e<n;e++)v[e]=te.dot(m[e],b);else if(b[0].length){var t=te.transposeRagged(b);for(v=new Array(t.length),e=0;e<t.length;e++)v[e]=te.dot(m,t[e])}else for(v=0,e=0;e<n;e++)v+=m[e]*b[e];return v},te.translationMatrix=function(m,b){return[[1,0,m],[0,1,b],[0,0,1]]},te.rotationMatrix=function(m){var b=m*Math.PI/180;
1215return[[Math.cos(b),-Math.sin(b),0],[Math.sin(b),Math.cos(b),0],[0,0,1]]},te.rotationXYMatrix=function(m,b,v){return te.dot(te.dot(te.translationMatrix(b,v),te.rotationMatrix(m)),te.translationMatrix(-b,-v))},te.apply3DTransform=function(m){return function(){var b=arguments,v=arguments.length===1?b[0]:[b[0],b[1],b[2]||0];return te.dot(m,[v[0],v[1],v[2],1]).slice(0,3)}},te.apply2DTransform=function(m){return function(){var b=arguments;b.length===3&&(b=b[0]);var v=arguments.length===1?b[0]:[b[0],b[1]];return te.dot(m,[v[0],v[1],1]).slice(0,2)}},te.apply2DTransform2=function(m){var b=te.apply2DTransform(m);return function(v){return b(v.slice(0,2)).concat(b(v.slice(2,4)))}},te.convertCssMatrix=function(m){if(m){var b=m.length;if(b===16)return m;if(b===6)return[m[0],m[1],0,0,m[2],m[3],0,0,0,0,1,0,m[4],m[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},te.inverseTransformMatrix=function(m){var b=[];return g.invert(b,m),[[b[0],b[1],b[2],b[3]],[b[4],b[5],b[6],b[7]],[b[8],b[9],b[10],b[11]],[b[12],b[13],b[14],b[15]]]}},{"gl-mat4":210}],510:[function(y,ee,te){ee.exports={mod:function(g,m){var b=g%m;return b<0?b+m:b},modHalf:function(g,m){return Math.abs(g)>m/2?g-Math.round(g/m)*m:g}}},{}],511:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("./array").isArrayOrTypedArray;function b(d,c){return function(){var i,u,f,s,h,p=d;for(s=0;s<c.length-1;s++){if((i=c[s])===-1){for(u=!0,f=[],h=0;h<p.length;h++)f[h]=b(p[h],c.slice(s+1))(),f[h]!==f[0]&&(u=!1);return u?f[0]:f}if(typeof i=="number"&&!m(p)||typeof(p=p[i])!="object"||p===null)return}if(typeof p=="object"&&p!==null&&(f=p[c[s]])!==null)return f}}ee.exports=function(d,c){if(g(c))c=String(c);else if(typeof c!="string"||c.substr(c.length-4)==="[-1]")throw"bad property string";for(var i,u,f,s=0,h=c.split(".");s<h.length;){if(i=String(h[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(i[1])h[s]=i[1];else{if(s!==0)throw"bad property string";h.splice(0,1)}for(u=i[2].substr(1,i[2].length-2).split("]["),f=0;f<u.length;f++)s++,h.splice(s,0,Number(u[f]))}s++}return typeof d!="object"?function(p,a,x){return{set:function(){throw"bad container"},get:function(){},astr:a,parts:x,obj:p}}(d,c,h):{set:n(d,h,c),get:b(d,h),astr:c,parts:h,obj:d}};var v=/(^|\.)args\[/;function e(d,c){return d===void 0||d===null&&!c.match(v)}function n(d,c,i){return function(u){var f,s,h=d,p="",a=e(u,i);for(s=0;s<c.length-1;s++){if(typeof(f=c[s])=="number"&&!m(h))throw"array index but container is not an array";if(f===-1){if(a=!o(h,c.slice(s+1),u,i))break;return}if(!r(h,f,c[s+1],a))break;if(typeof(h=h[f])!="object"||h===null)throw"container is not an object";p=t(p,f)}if(a){if(s===c.length-1&&(delete h[c[s]],Array.isArray(h)&&+c[s]==h.length-1))for(;h.length&&h[h.length-1]===void 0;)h.pop()}else h[c[s]]=u}}function t(d,c){var i=c;return g(c)?i="["+c+"]":d&&(i="."+c),d+i}function o(d,c,i,u){var f,s=m(i),h=!0,p=i,a=u.replace("-1",0),x=!s&&e(i,a),l=c[0];for(f=0;f<d.length;f++)a=u.replace("-1",f),s&&(x=e(p=i[f%i.length],a)),x&&(h=!1),r(d,f,l,x)&&n(d[f],c,u.replace("-1",f))(p);return h}function r(d,c,i,u){if(d[c]===void 0){if(u)return!1;d[c]=typeof i=="number"?[]:{}}return!0}},{"./array":485,"fast-isnumeric":190}],512:[function(y,ee,te){ee.exports=function(){}},{}],513:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=[];ee.exports=function(v,e){if(b.indexOf(v)===-1){b.push(v);var n=1e3;m(e)?n=e:e==="long"&&(n=3e3);var t=g.select("body").selectAll(".plotly-notifier").data([0]);t.enter().append("div").classed("plotly-notifier",!0),t.selectAll(".notifier-note").data(b).enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(r){var d=g.select(this);d.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){d.transition().call(o)});for(var c=d.append("p"),i=r.split(/<br\s*\/?>/g),u=0;u<i.length;u++)u&&c.append("br"),c.append("span").text(i[u]);e==="stick"?d.transition().duration(350).style("opacity",1):d.transition().duration(700).style("opacity",1).transition().delay(n).call(o)})}function o(r){r.duration(700).style("opacity",0).each("end",function(d){var c=b.indexOf(d);c!==-1&&b.splice(c,1),g.select(this).remove()})}}},{"@plotly/d3":58,"fast-isnumeric":190}],514:[function(y,ee,te){var g=y("./setcursor"),m="data-savedcursor";ee.exports=function(b,v){var e=b.attr(m);
1215if(v){if(!e){for(var n=(b.attr("class")||"").split(" "),t=0;t<n.length;t++){var o=n[t];o.indexOf("cursor-")===0&&b.attr(m,o.substr(7)).classed(o,!1)}b.attr(m)||b.attr(m,"!!")}g(b,v)}else e&&(b.attr(m,null),e==="!!"?g(b):g(b,e))}},{"./setcursor":524}],515:[function(y,ee,te){var g=y("./matrix").dot,m=y("../constants/numerical").BADNUM,b=ee.exports={};b.tester=function(v){var e,n=v.slice(),t=n[0][0],o=t,r=n[0][1],d=r;for(n.push(n[0]),e=1;e<n.length;e++)t=Math.min(t,n[e][0]),o=Math.max(o,n[e][0]),r=Math.min(r,n[e][1]),d=Math.max(d,n[e][1]);var c,i=!1;n.length===5&&(n[0][0]===n[1][0]?n[2][0]===n[3][0]&&n[0][1]===n[3][1]&&n[1][1]===n[2][1]&&(i=!0,c=function(s){return s[0]===n[0][0]}):n[0][1]===n[1][1]&&n[2][1]===n[3][1]&&n[0][0]===n[3][0]&&n[1][0]===n[2][0]&&(i=!0,c=function(s){return s[1]===n[0][1]}));var u=!0,f=n[0];for(e=1;e<n.length;e++)if(f[0]!==n[e][0]||f[1]!==n[e][1]){u=!1;break}return{xmin:t,xmax:o,ymin:r,ymax:d,pts:n,contains:i?function(s,h){var p=s[0],a=s[1];return!(p===m||p<t||p>o||a===m||a<r||a>d)&&(!h||!c(s))}:function(s,h){var p=s[0],a=s[1];if(p===m||p<t||p>o||a===m||a<r||a>d)return!1;var x,l,w,_,T,k=n.length,L=n[0][0],A=n[0][1],I=0;for(x=1;x<k;x++)if(l=L,w=A,L=n[x][0],A=n[x][1],!(p<(_=Math.min(l,L))||p>Math.max(l,L)||a>Math.max(w,A)))if(a<Math.min(w,A))p!==_&&I++;else{if(a===(T=L===l?a:w+(p-l)*(A-w)/(L-l)))return x!==1||!h;a<=T&&p!==_&&I++}return I%2==1},isRect:i,degenerate:u}},b.isSegmentBent=function(v,e,n,t){var o,r,d,c=v[e],i=[v[n][0]-c[0],v[n][1]-c[1]],u=g(i,i),f=Math.sqrt(u),s=[-i[1]/f,i[0]/f];for(o=e+1;o<n;o++)if(r=[v[o][0]-c[0],v[o][1]-c[1]],(d=g(r,i))<0||d>u||Math.abs(g(r,s))>t)return!0;return!1},b.filter=function(v,e){var n=[v[0]],t=0,o=0;function r(d){v.push(d);var c=n.length,i=t;n.splice(o+1);for(var u=i+1;u<v.length;u++)(u===v.length-1||b.isSegmentBent(v,i,u+1,e))&&(n.push(v[u]),n.length<c-2&&(t=u,o=n.length-1),i=u)}return v.length>1&&r(v.pop()),{addPt:r,raw:v,filtered:n}}},{"../constants/numerical":479,"./matrix":509}],516:[function(y,ee,te){(function(g){(function(){var m=y("./show_no_webgl_msg"),b=y("regl");ee.exports=function(v,e){var n=v._fullLayout,t=!0;return n._glcanvas.each(function(o){if(!o.regl&&(!o.pick||n._has("parcoords"))){try{o.regl=b({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:v._context.plotGlPixelRatio||g.devicePixelRatio,extensions:e||[]})}catch{t=!1}o.regl||(t=!1),t&&this.addEventListener("webglcontextlost",function(r){v&&v.emit&&v.emit("plotly_webglcontextlost",{event:r,layer:o.key})},!1)}}),t||m({container:n._glcontainer.node()}),t}}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{"./show_no_webgl_msg":525,regl:283}],517:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("is-mobile");ee.exports=function(b){var v;if(typeof(v=b&&b.hasOwnProperty("userAgent")?b.userAgent:function(){var c;return typeof navigator<"u"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),c}())!="string")return!0;var e=m({ua:{headers:{"user-agent":v}},tablet:!0,featureDetect:!1});if(!e){for(var n=v.split(" "),t=1;t<n.length;t++)if(n[t].indexOf("Safari")!==-1)for(var o=t-1;o>-1;o--){var r=n[o];if(r.substr(0,8)==="Version/"){var d=r.substr(8).split(".")[0];if(g(d)&&(d=+d),d>=13)return!0}}}return e}},{"fast-isnumeric":190,"is-mobile":234}],518:[function(y,ee,te){ee.exports=function(g,m){if(m instanceof RegExp){for(var b=m.toString(),v=0;v<g.length;v++)if(g[v]instanceof RegExp&&g[v].toString()===b)return g;g.push(m)}else!m&&m!==0||g.indexOf(m)!==-1||g.push(m);return g}},{}],519:[function(y,ee,te){var g=y("../lib"),m=y("../plot_api/plot_config").dfltConfig,b={add:function(v,e,n,t,o){var r,d;v.undoQueue=v.undoQueue||{index:0,queue:[],sequence:!1},d=v.undoQueue.index,v.autoplay?v.undoQueue.inSequence||(v.autoplay=!1):(!v.undoQueue.sequence||v.undoQueue.beginSequence?(r={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},v.undoQueue.queue.splice(d,v.undoQueue.queue.length-d,r),v.undoQueue.index+=1):r=v.undoQueue.queue[d-1],v.undoQueue.beginSequence=!1,r&&(r.undo.calls.unshift(e),r.undo.args.unshift(n),r.redo.calls.push(t),r.redo.args.push(o)),v.undoQueue.queue.length>m.queueLength&&(v.undoQueue.queue.shift(),v.undoQueue.index--))},startSequence:function(v){v.undoQueue=v.undoQueue||{index:0,queue:[],sequence:!1},v.undoQueue.sequence=!0,v.undoQueue.beginSequence=!0},stopSequence:function(v){v.undoQueue=v.undoQueue||{index:0,queue:[],sequence:!1},v.undoQueue.sequence=!1,v.undoQueue.beginSequence=!1},undo:function(v){var e,n;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index<=0)){for(v.undoQueue.index--,e=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,n=0;n<e.undo.calls.length;n++)b.plotDo(v,e.undo.calls[n],e.undo.args[n]);v.undoQueue.inSequence=!1,v.autoplay=!1}},redo:function(v){var e,n;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index>=v.undoQueue.queue.length)){for(e=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,n=0;n<e.redo.calls.length;n++)b.plotDo(v,e.redo.calls[n],e.redo.args[n]);v.undoQueue.inSequence=!1,v.autoplay=!1,v.undoQueue.index++}}};b.plotDo=function(v,e,n){v.autoplay=!0,n=function(t,o){for(var r,d=[],c=0;c<o.length;c++)r=o[c],d[c]=r===t?r:typeof r=="object"?Array.isArray(r)?g.extendDeep([],r):g.extendDeepAll({},r):r;return d}(v,n),e.apply(null,n)},ee.exports=b},{"../lib":503,"../plot_api/plot_config":541}],520:[function(y,ee,te){te.counter=function(g,m,b,v){var e=(m||"")+(b?"":"$"),n=v===!1?"":"^";return g==="xy"?new RegExp(n+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+e):new RegExp(n+g+"([2-9]|[1-9][0-9]+)?"+e)}},{}],521:[function(y,ee,te){var g=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,m=/^[^\.\[\]]+$/;ee.exports=function(b,v){for(;v;){var e=b.match(g);if(e)b=e[1];else{if(!b.match(m))throw new Error("bad relativeAttr call:"+[b,v]);b=""}if(v.charAt(0)!=="^")break;v=v.slice(1)}return b&&v.charAt(0)!=="["?b+"."+v:b+v}},{}],522:[function(y,ee,te){var g=y("./array").isArrayOrTypedArray,m=y("./is_plain_object");ee.exports=function b(v,e){for(var n in e){var t=e[n],o=v[n];if(o!==t)if(n.charAt(0)==="_"||typeof t=="function"){if(n in v)continue;v[n]=t}
1215else if(g(t)&&g(o)&&m(t[0])){if(n==="customdata"||n==="ids")continue;for(var r=Math.min(t.length,o.length),d=0;d<r;d++)o[d]!==t[d]&&m(t[d])&&m(o[d])&&b(o[d],t[d])}else m(t)&&m(o)&&(b(o,t),Object.keys(o).length||delete v[n])}}},{"./array":485,"./is_plain_object":504}],523:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("./loggers"),b=y("./identity"),v=y("../constants/numerical").BADNUM;function e(r,d){return r<d}function n(r,d){return r<=d}function t(r,d){return r>d}function o(r,d){return r>=d}te.findBin=function(r,d,c){if(g(d.start))return c?Math.ceil((r-d.start)/d.size-1e-9)-1:Math.floor((r-d.start)/d.size+1e-9);var i,u,f=0,s=d.length,h=0,p=s>1?(d[s-1]-d[0])/(s-1):1;for(u=p>=0?c?e:n:c?o:t,r+=1e-9*p*(c?-1:1)*(p>=0?1:-1);f<s&&h++<100;)u(d[i=Math.floor((f+s)/2)],r)?f=i+1:s=i;return h>90&&m.log("Long binary search..."),f-1},te.sorterAsc=function(r,d){return r-d},te.sorterDes=function(r,d){return d-r},te.distinctVals=function(r){var d,c=r.slice();for(c.sort(te.sorterAsc),d=c.length-1;d>-1&&c[d]===v;d--);for(var i,u=c[d]-c[0]||1,f=u/(d||1)/1e4,s=[],h=0;h<=d;h++){var p=c[h],a=p-i;i===void 0?(s.push(p),i=p):a>f&&(u=Math.min(u,a),s.push(p),i=p)}return{vals:s,minDiff:u}},te.roundUp=function(r,d,c){for(var i,u=0,f=d.length-1,s=0,h=c?0:1,p=c?1:0,a=c?Math.ceil:Math.floor;u<f&&s++<100;)d[i=a((u+f)/2)]<=r?u=i+h:f=i-p;return d[u]},te.sort=function(r,d){for(var c=0,i=0,u=1;u<r.length;u++){var f=d(r[u],r[u-1]);if(f<0?c=1:f>0&&(i=1),c&&i)return r.sort(d)}return i?r:r.reverse()},te.findIndexOfMin=function(r,d){d=d||b;for(var c,i=1/0,u=0;u<r.length;u++){var f=d(r[u]);f<i&&(i=f,c=u)}return c}},{"../constants/numerical":479,"./identity":501,"./loggers":507,"fast-isnumeric":190}],524:[function(y,ee,te){ee.exports=function(g,m){(g.attr("class")||"").split(" ").forEach(function(b){b.indexOf("cursor-")===0&&g.classed(b,!1)}),m&&g.classed("cursor-"+m,!0)}},{}],525:[function(y,ee,te){var g=y("../components/color"),m=function(){};ee.exports=function(b){for(var v in b)typeof b[v]=="function"&&(b[v]=m);b.destroy=function(){b.container.parentNode.removeChild(b.container)};var e=document.createElement("div");e.className="no-webgl",e.style.cursor="pointer",e.style.fontSize="24px",e.style.color=g.defaults[0],e.style.position="absolute",e.style.left=e.style.top="0px",e.style.width=e.style.height="100%",e.style["background-color"]=g.lightLine,e.style["z-index"]=30;var n=document.createElement("p");return n.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",n.style.position="relative",n.style.top="50%",n.style.left="50%",n.style.height="30%",n.style.width="50%",n.style.margin="-15% 0 0 -25%",e.appendChild(n),b.container.appendChild(e),b.container.style.background="#FFFFFF",b.container.onclick=function(){window.open("https://get.webgl.org")},!1}},{"../components/color":366}],526:[function(y,ee,te){ee.exports=function(g){return Object.keys(g).sort()}},{}],527:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("./array").isArrayOrTypedArray;te.aggNums=function(b,v,e,n){var t,o;if((!n||n>e.length)&&(n=e.length),g(v)||(v=!1),m(e[0])){for(o=new Array(n),t=0;t<n;t++)o[t]=te.aggNums(b,v,e[t]);e=o}for(t=0;t<n;t++)g(v)?g(e[t])&&(v=b(+v,+e[t])):v=e[t];return v},te.len=function(b){return te.aggNums(function(v){return v+1},0,b)},te.mean=function(b,v){return v||(v=te.len(b)),te.aggNums(function(e,n){return e+n},0,b)/v},te.midRange=function(b){if(b!==void 0&&b.length!==0)return(te.aggNums(Math.max,null,b)+te.aggNums(Math.min,null,b))/2},te.variance=function(b,v,e){return v||(v=te.len(b)),g(e)||(e=te.mean(b,v)),te.aggNums(function(n,t){return n+Math.pow(t-e,2)},0,b)/v},te.stdev=function(b,v,e){return Math.sqrt(te.variance(b,v,e))},te.median=function(b){var v=b.slice().sort();return te.interp(v,.5)},te.interp=function(b,v){if(!g(v))throw"n should be a finite number";if((v=v*b.length-.5)<0)return b[0];if(v>b.length-1)return b[b.length-1];var e=v%1;return e*b[Math.ceil(v)]+(1-e)*b[Math.floor(v)]}},{"./array":485,"fast-isnumeric":190}],528:[function(y,ee,te){var g=y("color-normalize");ee.exports=function(m){return m?g(m):[0,0,0,1]}},{"color-normalize":89}],529:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../lib"),b=m.strTranslate,v=y("../constants/xmlns_namespaces"),e=y("../constants/alignment").LINE_SPACING,n=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;te.convertToTspans=function(S,E,D){var F=S.text(),H=!S.attr("data-notex")&&E&&E._context.typesetMath&&t
1215ypeof MathJax<"u"&&F.match(n),V=g.select(S.node().parentNode);if(!V.empty()){var Z=S.attr("class")?S.attr("class").split(" ")[0]:"text";return Z+="-math",V.selectAll("svg."+Z).remove(),V.selectAll("g."+Z+"-group").remove(),S.style("display",null).attr({"data-unformatted":F,"data-math":"N"}),H?(E&&E._promises||[]).push(new Promise(function(q){S.style("display","none");var W=parseInt(S.node().style.fontSize,10),$={fontSize:W};(function(R,N,U){var Q,j,X,J,re=parseInt((MathJax.version||"").split(".")[0]);if(re!==2&&re!==3)return void m.warn("No MathJax version:",MathJax.version);var ne=function(){var oe="math-output-"+m.randstr({},64),pe=(J=g.select("body").append("div").attr({id:oe}).style({visibility:"hidden",position:"absolute","font-size":N.fontSize+"px"}).text(R.replace(t,"\\lt ").replace(o,"\\gt "))).node();return re===2?MathJax.Hub.Typeset(pe):MathJax.typeset([pe])},se=function(){var oe=J.select(re===2?".MathJax_SVG":".MathJax"),pe=!oe.empty()&&J.select("svg").node();if(pe){var ce,de=pe.getBoundingClientRect();ce=re===2?g.select("body").select("#MathJax_SVG_glyphs"):oe.select("defs"),U(oe,ce,de)}else m.log("There was an error in the tex syntax.",R),U();J.remove()};re===2?MathJax.Hub.Queue(function(){return j=m.extendDeepAll({},MathJax.Hub.config),X=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:r},displayAlign:"left"})},function(){if((Q=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},ne,se,function(){if(Q!=="SVG")return MathJax.Hub.setRenderer(Q)},function(){return X!==void 0&&(MathJax.Hub.processSectionDelay=X),MathJax.Hub.Config(j)}):re===3&&(j=m.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=r,(Q=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ne(),se(),Q!=="svg"&&(MathJax.config.startup.output=Q),MathJax.config=j}))})(H[2],$,function(R,N,U){V.selectAll("svg."+Z).remove(),V.selectAll("g."+Z+"-group").remove();var Q=R&&R.select("svg");if(!Q||!Q.node())return K(),void q();var j=V.append("g").classed(Z+"-group",!0).attr({"pointer-events":"none","data-unformatted":F,"data-math":"Y"});j.node().appendChild(Q.node()),N&&N.node()&&Q.node().insertBefore(N.node().cloneNode(!0),Q.node().firstChild);var X=U.width,J=U.height;Q.attr({class:Z,height:J,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var re=S.node().style.fill||"black",ne=Q.select("g");ne.attr({fill:re,stroke:re});var se=ne.node().getBoundingClientRect(),oe=se.width,pe=se.height;(oe>X||pe>J)&&(Q.style("overflow","hidden"),oe=(se=Q.node().getBoundingClientRect()).width,pe=se.height);var ce=+S.attr("x"),de=+S.attr("y"),xe=-(W||S.node().getBoundingClientRect().height)/4;if(Z[0]==="y")j.attr({transform:"rotate("+[-90,ce,de]+")"+b(-oe/2,xe-pe/2)});else if(Z[0]==="l")de=xe-pe/2;else if(Z[0]==="a"&&Z.indexOf("atitle")!==0)ce=0,de=xe;else{var we=S.attr("text-anchor");ce-=oe*(we==="middle"?.5:we==="end"?1:0),de=de+xe-pe/2}Q.attr({x:ce,y:de}),D&&D.call(S,j),q(j)})})):K(),S}function K(){V.empty()||(Z=S.attr("class")+"-math",V.select("svg."+Z).remove()),S.text("").style("white-space","pre"),function(q,W){W=W.replace(f," ");var $,R=!1,N=[],U=-1;function Q(){U++;var fe=document.createElementNS(v.svg,"tspan");g.select(fe).attr({class:"line",dy:U*e+"em"}),q.appendChild(fe),$=fe;var me=N;if(N=[{node:fe}],me.length>1)for(var Te=1;Te<me.length;Te++)j(me[Te])}function j(fe){var me,Te=fe.type,_e={};if(Te==="a"){me="a";var Ae=fe.target,Pe=fe.href,De=fe.popup;Pe&&(_e={"xlink:xlink:show":Ae==="_blank"||Ae.charAt(0)!=="_"?"new":"replace",target:Ae,"xlink:xlink:href":Pe},De&&(_e.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+De+'");return false;'))}else me="tspan";fe.style&&(_e.style=fe.style);var Ve=document.createElementNS(v.svg,me);if(Te==="sup"||Te==="sub"){X($,"​"),$.appendChild(Ve);var Qe=document.createElementNS(v.svg,"tspan");X(Qe,"​"),g.select(Qe).attr("dy",i[Te]),_e.dy=c[Te],$.appendChild(Ve),$.appendChild(Qe)}else $.appendChild(Ve);g.select(Ve).attr(_e),$=fe.node=Ve,N.push(fe)}function X(fe,me){fe.appendChild(document.createTextNode(me))}function J(fe){if(N.length!==1){var me=N.pop();fe!==me.type&&m.log("Start tag <"+me.type+"> doesnt match end tag <"+fe+">. Pretending it did match.",W),$=N[N.length-1].node}else m.log("Ignoring unexpected end tag </"+fe+">.",W)}p.test(W)?Q():($=q,N=[{node:q}]);for(var re=W.split(s),ne=0;ne<re.length;ne++){var se=re[ne],oe=se.match(h),pe=oe&&oe[2].toLowerCase(),ce=d[pe];if(pe==="br")Q();else if(ce===void 0)X($,A(se));else if(oe[1])J(pe);else{var de=oe[4],xe={type:pe},we=_(de,a);if(we?(we=we.replace(T,"$1 fill:"),ce&&(we+=";"+ce)):ce&&(we=ce),we&&(xe.style=we),pe==="a"){R=!0;var be=_(de,x);if(be){var Ee=I(be);Ee&&(xe.href=Ee,xe.target=_(de,l)||"_blank",xe.popup=_(de,w))}}j(xe)}}return R}(S.node(),F)&&S.style("pointer-events","all"),te.positionText(S),D&&D.call(S)}};var t=/(<|&lt;|&#60;)/g,o=/(>|&gt;|&#62;)/g,r=[["$","$"],["\\(","\\)"]],d={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},c={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},u=["http:","https:","mailto:","",void 0,":"],f=te.NEWLINES=/(\r\n?|\n)/g,s=/(<[^<>]*>)/,h=/<(\/?)([^ >]*)(\s+(.*))?>/i,p=/<br(\s+.*)?>/i;te.BR_TAG_ALL=/<br(\s+.*)?>/gi;var a=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,l=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,w=/(^|[\s"'])popup\s*=\s
1215*("([\w=,]*)"|'([\w=,]*)')/i;function _(S,E){if(!S)return null;var D=S.match(E),F=D&&(D[3]||D[4]);return F&&A(F)}var T=/(^|;)\s*color:/;te.plainText=function(S,E){for(var D=(E=E||{}).len!==void 0&&E.len!==-1?E.len:1/0,F=E.allowedTags!==void 0?E.allowedTags:["br"],H=3,V=S.split(s),Z=[],K="",q=0,W=0;W<V.length;W++){var $=V[W],R=$.match(h),N=R&&R[2].toLowerCase();if(N)F.indexOf(N)!==-1&&(Z.push($),K=N);else{var U=$.length;if(q+U<D)Z.push($),q+=U;else if(q<D){var Q=D-q;K&&(K!=="br"||Q<=H||U<=H)&&Z.pop(),D>H?Z.push($.substr(0,Q-H)+"..."):Z.push($.substr(0,Q));break}K=""}}return Z.join("")};var k={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function A(S){return S.replace(L,function(E,D){return(D.charAt(0)==="#"?function(F){if(!(F>1114111)){var H=String.fromCodePoint;if(H)return H(F);var V=String.fromCharCode;return F<=65535?V(F):V(55232+(F>>10),F%1024+56320)}}(D.charAt(1)==="x"?parseInt(D.substr(2),16):parseInt(D.substr(1),10)):k[D])||E})}function I(S){var E=encodeURI(decodeURI(S)),D=document.createElement("a"),F=document.createElement("a");D.href=S,F.href=E;var H=D.protocol,V=F.protocol;return u.indexOf(H)!==-1&&u.indexOf(V)!==-1?E:""}function P(S,E,D){var F,H,V,Z=D.horizontalAlign,K=D.verticalAlign||"top",q=S.node().getBoundingClientRect(),W=E.node().getBoundingClientRect();return H=K==="bottom"?function(){return q.bottom-F.height}:K==="middle"?function(){return q.top+(q.height-F.height)/2}:function(){return q.top},V=Z==="right"?function(){return q.right-F.width}:Z==="center"?function(){return q.left+(q.width-F.width)/2}:function(){return q.left},function(){F=this.node().getBoundingClientRect();var $=V()-W.left,R=H()-W.top,N=D.gd||{};if(D.gd){N._fullLayout._calcInverseTransform(N);var U=m.apply3DTransform(N._fullLayout._invTransform)($,R);$=U[0],R=U[1]}return this.style({top:R+"px",left:$+"px","z-index":1e3}),this}}te.convertEntities=A,te.sanitizeHTML=function(S){S=S.replace(f," ");for(var E=document.createElement("p"),D=E,F=[],H=S.split(s),V=0;V<H.length;V++){var Z=H[V],K=Z.match(h),q=K&&K[2].toLowerCase();if(q in d)if(K[1])F.length&&(D=F.pop());else{var W=K[4],$=_(W,a),R=$?{style:$}:{};if(q==="a"){var N=_(W,x);if(N){var U=I(N);if(U){R.href=U;var Q=_(W,l);Q&&(R.target=Q)}}}var j=document.createElement(q);D.appendChild(j),g.select(j).attr(R),D=j,F.push(j)}else D.appendChild(document.createTextNode(A(Z)))}return E.innerHTML},te.lineCount=function(S){return S.selectAll("tspan.line").size()||1},te.positionText=function(S,E,D){return S.each(function(){var F=g.select(this);function H(K,q){return q===void 0?(q=F.attr(K))===null&&(F.attr(K,0),q=0):F.attr(K,q),q}var V=H("x",E),Z=H("y",D);this.nodeName==="text"&&F.selectAll("tspan.line").attr({x:V,y:Z})})},te.makeTextShadow=function(S){var E="1px ",D="1px ",F="1px ";return E+D+F+S+", -"+E+"-"+D+F+S+", "+E+"-"+D+F+S+", -"+E+D+F+S},te.makeEditable=function(S,E){var D=E.gd,F=E.delegate,H=g.dispatch("edit","input","cancel"),V=F||S;if(S.style({"pointer-events":F?"none":"all"}),S.size()!==1)throw new Error("boo");function Z(){(function(){var $=g.select(D).select(".svg-container"),R=$.append("div"),N=S.node().style,U=parseFloat(N.fontSize||12),Q=E.text;Q===void 0&&(Q=S.attr("data-unformatted")),R.classed("plugin-editable editable",!0).style({position:"absolute","font-family":N.fontFamily||"Arial","font-size":U,color:E.fill||N.fill||"black",opacity:1,"background-color":E.background||"transparent",outline:"#ffffff33 1px solid",margin:[-U/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(Q).call(P(S,$,E)).on("blur",function(){D._editing=!1,S.text(this.textContent).style({opacity:1});var j,X=g.select(this).attr("class");(j=X?"."+X.split(" ")[0]+"-math-group":"[class*=-math-group]")&&g.select(S.node().parentNode).select(j).style({opacity:0}
1215);var J=this.textContent;g.select(this).transition().duration(0).remove(),g.select(document).on("mouseup",null),H.edit.call(S,J)}).on("focus",function(){var j=this;D._editing=!0,g.select(document).on("mouseup",function(){if(g.event.target===j)return!1;document.activeElement===R.node()&&R.node().blur()})}).on("keyup",function(){g.event.which===27?(D._editing=!1,S.style({opacity:1}),g.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),H.cancel.call(S,this.textContent)):(H.input.call(S,this.textContent),g.select(this).call(P(S,$,E)))}).on("keydown",function(){g.event.which===13&&this.blur()}).call(K)})(),S.style({opacity:0});var q,W=V.attr("class");(q=W?"."+W.split(" ")[0]+"-math-group":"[class*=-math-group]")&&g.select(S.node().parentNode).select(q).style({opacity:0})}function K(q){var W=q.node(),$=document.createRange();$.selectNodeContents(W);var R=window.getSelection();R.removeAllRanges(),R.addRange($),W.focus()}return E.immediate?Z():V.on("click",Z),g.rebind(S,H,"on")}},{"../constants/alignment":471,"../constants/xmlns_namespaces":480,"../lib":503,"@plotly/d3":58}],530:[function(y,ee,te){var g={};function m(b){b&&b.timer!==null&&(clearTimeout(b.timer),b.timer=null)}te.throttle=function(b,v,e){var n=g[b],t=Date.now();if(!n){for(var o in g)g[o].ts<t-6e4&&delete g[o];n=g[b]={ts:0,timer:null}}function r(){e(),n.ts=Date.now(),n.onDone&&(n.onDone(),n.onDone=null)}m(n),t>n.ts+v?r():n.timer=setTimeout(function(){r(),n.timer=null},v)},te.done=function(b){var v=g[b];return v&&v.timer?new Promise(function(e){var n=v.onDone;v.onDone=function(){n&&n(),e(),v.onDone=null}}):Promise.resolve()},te.clear=function(b){if(b)m(g[b]),delete g[b];else for(var v in g)te.clear(v)}},{}],531:[function(y,ee,te){var g=y("fast-isnumeric");ee.exports=function(m,b){if(m>0)return Math.log(m)/Math.LN10;var v=Math.log(Math.min(b[0],b[1]))/Math.LN10;return g(v)||(v=Math.log(Math.max(b[0],b[1]))/Math.LN10-6),v}},{"fast-isnumeric":190}],532:[function(y,ee,te){var g=ee.exports={},m=y("../plots/geo/constants").locationmodeToLayer,b=y("topojson-client").feature;g.getTopojsonName=function(v){return[v.scope.replace(/ /g,"-"),"_",v.resolution.toString(),"m"].join("")},g.getTopojsonPath=function(v,e){return v+e+".json"},g.getTopojsonFeatures=function(v,e){var n=m[v.locationmode],t=e.objects[n];return b(e,t).features}},{"../plots/geo/constants":587,"topojson-client":315}],533:[function(y,ee,te){ee.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],534:[function(y,ee,te){ee.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},{}],535:[function(y,ee,te){var g=y("../registry");ee.exports=function(m){for(var b,v,e=g.layoutArrayContainers,n=g.layoutArrayRegexes,t=m.split("[")[0],o=0;o<n.length;o++)if((v=m.match(n[o]))&&v.index===0){b=v[0];break}if(b||(b=e[e.indexOf(t)]),!b)return!1;var r=m.substr(b.length);return r?!!(v=r.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:b,index:Number(v[1]),property:v[3]||""}:{array:b,index:"",property:""}}},{"../registry":638}],536:[function(y,ee,te){var g=y("../lib"),m=g.extendFlat,b=g.isPlainObject,v={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},e={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},n=v.flags.slice().concat(["fullReplot"]),t=e.flags.slice().concat("layoutReplot");function o(c){for(var i={},u=0;u<c.length;u++)i[c[u]]=!1;return i}function r(c,i,u){var f=m({},c);for(var s in f){var h=f[s];b(h)&&(f[s]=d(h,i,u,s))}return u==="from-root"&&(f.editType=i),f}function d(c,i,u,f){if(c.valType){var s=m({},c);if(s.editType=i,Array.isArray(c.items)){s.items=new Array(c.items.length);for(var h=0;h<c.items.length;h++)s.items[h]=d(c.items[h],i)}return s}return r(c,i,f.charAt(0)==="_"?"nested":"from-root")}ee.exports={traces:v,layout:e,traceFlags:function(){return o(n)},layoutFlags:function(){return o(t)},update:function(c,i){var u=i.editType;if(u&&u!=="none")for(var f=u.split("+"),s=0;s<f.length;s++)c[f[s]]=!0},overrideAll:r}},{"../lib":503}],537:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("gl-mat4/fromQuat"),b=y("../registry"),v=y("../lib"),e=y("../plots/plots"),n=y("../plots/cartesian/axis_ids"),t=y("../components/color"),o=n.cleanId,r=n.getFromTrace,d=b.traceIs;function c(l,w){var _=l[w],T=w.charAt(0);_&&_!=="paper"&&(l[w]=o(_,T,!0))}function i(l){function w(_,T){var k=l[_],L=l.title&&l.title[T];k&&!L&&(l.title||(l.title={}
1215),l.title[T]=l[_],delete l[_])}l&&(typeof l.title!="string"&&typeof l.title!="number"||(l.title={text:l.title}),w("titlefont","font"),w("titleposition","position"),w("titleside","side"),w("titleoffset","offset"))}function u(l){if(!v.isPlainObject(l))return!1;var w=l.name;return delete l.name,delete l.showlegend,(typeof w=="string"||typeof w=="number")&&String(w)}function f(l,w,_,T){if(_&&!T)return l;if(T&&!_||!l.trim())return w;if(!w.trim())return l;var k,L=Math.min(l.length,w.length);for(k=0;k<L&&l.charAt(k)===w.charAt(k);k++);return l.substr(0,k).trim()}function s(l){var w="middle",_="center";return typeof l=="string"&&(l.indexOf("top")!==-1?w="top":l.indexOf("bottom")!==-1&&(w="bottom"),l.indexOf("left")!==-1?_="left":l.indexOf("right")!==-1&&(_="right")),w+" "+_}function h(l,w){return w in l&&typeof l[w]=="object"&&Object.keys(l[w]).length===0}te.clearPromiseQueue=function(l){Array.isArray(l._promises)&&l._promises.length>0&&v.log("Clearing previous rejected promises from queue."),l._promises=[]},te.cleanLayout=function(l){var w,_;l||(l={}),l.xaxis1&&(l.xaxis||(l.xaxis=l.xaxis1),delete l.xaxis1),l.yaxis1&&(l.yaxis||(l.yaxis=l.yaxis1),delete l.yaxis1),l.scene1&&(l.scene||(l.scene=l.scene1),delete l.scene1);var T=(e.subplotsRegistry.cartesian||{}).attrRegex,k=(e.subplotsRegistry.polar||{}).attrRegex,L=(e.subplotsRegistry.ternary||{}).attrRegex,A=(e.subplotsRegistry.gl3d||{}).attrRegex,I=Object.keys(l);for(w=0;w<I.length;w++){var P=I[w];if(T&&T.test(P)){var S=l[P];S.anchor&&S.anchor!=="free"&&(S.anchor=o(S.anchor)),S.overlaying&&(S.overlaying=o(S.overlaying)),S.type||(S.isdate?S.type="date":S.islog?S.type="log":S.isdate===!1&&S.islog===!1&&(S.type="linear")),S.autorange!=="withzero"&&S.autorange!=="tozero"||(S.autorange=!0,S.rangemode="tozero"),delete S.islog,delete S.isdate,delete S.categories,h(S,"domain")&&delete S.domain,S.autotick!==void 0&&(S.tickmode===void 0&&(S.tickmode=S.autotick?"auto":"linear"),delete S.autotick),i(S)}else if(k&&k.test(P))i(l[P].radialaxis);else if(L&&L.test(P)){var E=l[P];i(E.aaxis),i(E.baxis),i(E.caxis)}else if(A&&A.test(P)){var D=l[P],F=D.cameraposition;if(Array.isArray(F)&&F[0].length===4){var H=F[0],V=F[1],Z=F[2],K=m([],H),q=[];for(_=0;_<3;++_)q[_]=V[_]+Z*K[2+4*_];D.camera={eye:{x:q[0],y:q[1],z:q[2]},center:{x:V[0],y:V[1],z:V[2]},up:{x:0,y:0,z:1}},delete D.cameraposition}i(D.xaxis),i(D.yaxis),i(D.zaxis)}}var W=Array.isArray(l.annotations)?l.annotations.length:0;for(w=0;w<W;w++){var $=l.annotations[w];v.isPlainObject($)&&($.ref&&($.ref==="paper"?($.xref="paper",$.yref="paper"):$.ref==="data"&&($.xref="x",$.yref="y"),delete $.ref),c($,"xref"),c($,"yref"))}var R=Array.isArray(l.shapes)?l.shapes.length:0;for(w=0;w<R;w++){var N=l.shapes[w];v.isPlainObject(N)&&(c(N,"xref"),c(N,"yref"))}var U=Array.isArray(l.images)?l.images.length:0;for(w=0;w<U;w++){var Q=l.images[w];v.isPlainObject(Q)&&(c(Q,"xref"),c(Q,"yref"))}var j=l.legend;return j&&(j.x>3?(j.x=1.02,j.xanchor="left"):j.x<-2&&(j.x=-.02,j.xanchor="right"),j.y>3?(j.y=1.02,j.yanchor="bottom"):j.y<-2&&(j.y=-.02,j.yanchor="top")),i(l),l.dragmode==="rotate"&&(l.dragmode="orbit"),t.clean(l),l.template&&l.template.layout&&te.cleanLayout(l.template.layout),l},te.cleanData=function(l){for(var w=0;w<l.length;w++){var _,T=l[w];if(T.type==="histogramy"&&"xbins"in T&&!("ybins"in T)&&(T.ybins=T.xbins,delete T.xbins),T.error_y&&"opacity"in T.error_y){var k=t.defaults,L=T.error_y.color||(d(T,"bar")?t.defaultLine:k[w%k.length]);T.error_y.color=t.addOpacity(t.rgb(L),t.opacity(L)*T.error_y.opacity),delete T.error_y.opacity}if("bardir"in T&&(T.bardir!=="h"||!d(T,"bar")&&T.type.substr(0,9)!=="histogram"||(T.orientation="h",te.swapXYData(T)),delete T.bardir),T.type==="histogramy"&&te.swapXYData(T),T.type!=="histogramx"&&T.type!=="histogramy"||(T.type="histogram"),"scl"in T&&!("colorscale"in T)&&(T.colorscale=T.scl,delete T.scl),"reversescl"in T&&!("reversescale"in T)&&(T.reversescale=T.reversescl,delete T.reversescl),T.xaxis&&(T.xaxis=o(T.xaxis,"x")),T.yaxis&&(T.yaxis=o(T.yaxis,"y")),d(T,"gl3d")&&T.scene&&(T.scene=e.subplotsRegistry.gl3d.cleanId(T.scene)),!d(T,"pie-like")&&!d(T,"bar-like"))if(Array.isArray(T.textposition))for(_=0;_<T.textposition.length;_++)T.textposition[_]=s(T.textposition[_]);else T.textposition&&(T.textposition=s(T.textposition));var A=b.getModule(T);if(A&&A.colorbar){var I=A.colorbar.container,P=I?T[I]:T;P&&P.colorscale&&(P.colorscale==="YIGnBu"&&(P.colorscale="YlGnBu"),P.colorscale==="YIOrRd"&&(P.colorscale="YlOrRd"))}if(T.type==="surface"&&v.isPlainObject(T.contours)){var S=["x","y","z"];for(_=0;_<S.length;_++){var E=T.contours[S[_]];v.isPlainObject(E)&&(E.highlightColor&&(E.highlightcolor=E.highlightColor,delete E.highlightColor),E.highlightWidth&&(E.highlightwidth=E.highlightWidth,delete E.highlightWidth))}}if(T.type==="candlestick"||T.type==="ohlc"){var D=(T.increasing||{}).showlegend!==!1,F=(T.decreasing||{}).showlegend!==!1,H=u(T.increasing),V=u(T.decreasing);if(H!==!1&&V!==!1){var Z=f(H,V,D,F);Z&&(T.name=Z)}else!H&&!V||T.name||(T.name=H||V)}if(Array.isArray(T.transforms)){var K=T.transforms;for(_=0;_<K.length;_++){var q=K[_];if(v.isPlainObject(q))switch(q.type){case"filter":q.filtersrc&&(q.target=q.filtersrc,delete q.filtersrc),q.calendar&&(q.valuecalendar||(q.valuecalendar=q.calendar),delete q.calendar);break;
1215case"groupby":if(q.styles=q.styles||q.style,q.styles&&!Array.isArray(q.styles)){var W=q.styles,$=Object.keys(W);q.styles=[];for(var R=0;R<$.length;R++)q.styles.push({target:$[R],value:W[$[R]]})}}}}h(T,"line")&&delete T.line,"marker"in T&&(h(T.marker,"line")&&delete T.marker.line,h(T,"marker")&&delete T.marker),t.clean(T),T.autobinx&&(delete T.autobinx,delete T.xbins),T.autobiny&&(delete T.autobiny,delete T.ybins),i(T),T.colorbar&&i(T.colorbar),T.marker&&T.marker.colorbar&&i(T.marker.colorbar),T.line&&T.line.colorbar&&i(T.line.colorbar),T.aaxis&&i(T.aaxis),T.baxis&&i(T.baxis)}},te.swapXYData=function(l){var w;if(v.swapAttrs(l,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(l.z)&&Array.isArray(l.z[0])&&(l.transpose?delete l.transpose:l.transpose=!0),l.error_x&&l.error_y){var _=l.error_y,T="copy_ystyle"in _?_.copy_ystyle:!(_.color||_.thickness||_.width);v.swapAttrs(l,["error_?.copy_ystyle"]),T&&v.swapAttrs(l,["error_?.color","error_?.thickness","error_?.width"])}if(typeof l.hoverinfo=="string"){var k=l.hoverinfo.split("+");for(w=0;w<k.length;w++)k[w]==="x"?k[w]="y":k[w]==="y"&&(k[w]="x");l.hoverinfo=k.join("+")}},te.coerceTraceIndices=function(l,w){if(g(w))return[w];if(!Array.isArray(w)||!w.length)return l.data.map(function(k,L){return L});if(Array.isArray(w)){for(var _=[],T=0;T<w.length;T++)v.isIndex(w[T],l.data.length)?_.push(w[T]):v.warn("trace index (",w[T],") is not a number or is out of bounds");return _}return w},te.manageArrayContainers=function(l,w,_){var T=l.obj,k=l.parts,L=k.length,A=k[L-1],I=g(A);if(I&&w===null){var P=k.slice(0,L-1).join(".");v.nestedProperty(T,P).get().splice(A,1)}else I&&l.get()===void 0&&l.get()===void 0&&(_[l.astr]=null),l.set(w)};var p=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function a(l){var w=l.search(p);if(w>0)return l.substr(0,w)}te.hasParent=function(l,w){for(var _=a(w);_;){if(_ in l)return!0;_=a(_)}return!1};var x=["x","y","z"];te.clearAxisTypes=function(l,w,_){for(var T=0;T<w.length;T++)for(var k=l._fullData[T],L=0;L<3;L++){var A=r(l,k,x[L]);if(A&&A.type!=="log"){var I=A._name,P=A._id.substr(1);if(P.substr(0,5)==="scene"){if(_[P]!==void 0)continue;I=P+"."+I}var S=I+".type";_[I]===void 0&&_[S]===void 0&&v.nestedProperty(l.layout,S).set(null)}}}},{"../components/color":366,"../lib":503,"../plots/cartesian/axis_ids":558,"../plots/plots":619,"../registry":638,"fast-isnumeric":190,"gl-mat4/fromQuat":200}],538:[function(y,ee,te){var g=y("./plot_api");te._doPlot=g._doPlot,te.newPlot=g.newPlot,te.restyle=g.restyle,te.relayout=g.relayout,te.redraw=g.redraw,te.update=g.update,te._guiRestyle=g._guiRestyle,te._guiRelayout=g._guiRelayout,te._guiUpdate=g._guiUpdate,te._storeDirectGUIEdit=g._storeDirectGUIEdit,te.react=g.react,te.extendTraces=g.extendTraces,te.prependTraces=g.prependTraces,te.addTraces=g.addTraces,te.deleteTraces=g.deleteTraces,te.moveTraces=g.moveTraces,te.purge=g.purge,te.addFrames=g.addFrames,te.deleteFrames=g.deleteFrames,te.animate=g.animate,te.setPlotConfig=g.setPlotConfig,te.toImage=y("./to_image"),te.validate=y("./validate"),te.downloadImage=y("../snapshot/download");var m=y("./template_api");te.makeTemplate=m.makeTemplate,te.validateTemplate=m.validateTemplate},{"../snapshot/download":640,"./plot_api":540,"./template_api":545,"./to_image":546,"./validate":547}],539:[function(y,ee,te){var g=y("../lib/is_plain_object"),m=y("../lib/noop"),b=y("../lib/loggers"),v=y("../lib/search").sorterAsc,e=y("../registry");te.containerArrayMatch=y("./container_array_match");var n=te.isAddVal=function(o){return o==="add"||g(o)},t=te.isRemoveVal=function(o){return o===null||o==="remove"};te.applyContainerArrayChanges=function(o,r,d,c,i){var u=r.astr,f=e.getComponentMethod(u,"supplyLayoutDefaults"),s=e.getComponentMethod(u,"draw"),h=e.getComponentMethod(u,"drawOne"),p=c.replot||c.recalc||f===m||s===m,a=o.layout,x=o._fullLayout;if(d[""]){Object.keys(d).length>1&&b.warn("Full array edits are incompatible with other edits",u);var l=d[""][""];if(t(l))r.set(null);else{if(!Array.isArray(l))return b.warn("Unrecognized full array edit value",u,l),!0;r.set(l)}return!p&&(f(a,x),s(o),!0)}var w,_,T,k,L,A,I,P,S=Object.keys(d).map(Number).sort(v),E=r.get(),D=E||[],F=i(x,u).get(),H=[],V=-1,Z=D.length;for(w=0;w<S.length;w++)if(k=d[T=S[w]],L=Object.keys(k),A=k[""],I=n(A),T<0||T>D.length-(I?0:1))b.warn("index out of range",u,T);else if(A!==void 0)L.length>1&&b.warn("Insertion & removal are incompatible with edits to the same index.",u,T),t(A)?H.push(T):I?(A==="add"&&(A={}),D.splice(T,0,A),F&&F.splice(T,0,{})):b.warn("Unrecognized full object edit value",u,T,A),V===-1&&(V=T);else for(_=0;_<L.length;_++)P=u+"["+T+"].",i(D[T],L[_],P).set(k[L[_]]);for(w=H.length-1;w>=0;w--)D.splice(H[w],1),F&&F.splice(H[w],1);if(D.length?E||r.set(D):r.set(null),p)return!1;if(f(a,x),h!==m){var K;if(V===-1)K=S;else{for(Z=Math.max(D.length,Z),K=[],w=0;w<S.length&&!((T=S[w])>=V);w++)K.push(T);for(w=V;w<Z;w++)K.push(w)}for(w=0;w<K.length;w++)h(o,K[w])}else s(o);return!0}},{"../lib/is_plain_object":504,"../lib/loggers":507,"../lib/noop":512,"../lib/search":523,"../registry":638,"./container_array_match":535}],540:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("has-hover"),v=y("../lib"),e=v.nestedProperty,n=y("../lib/events"),t=y("../lib/queue"),o=y("../registry"),r=y("./plot_schema"),d=y("../plots/plots"),c=y("../plots/cartesian/axes"),i=y("../components/drawing"),u=y("../components/color"),f=y("../plots/cartesian/gra
1215ph_interact").initInteractions,s=y("../constants/xmlns_namespaces"),h=y("../plots/cartesian/select").clearSelect,p=y("./plot_config").dfltConfig,a=y("./manage_arrays"),x=y("./helpers"),l=y("./subroutines"),w=y("./edit_types"),_=y("../plots/cartesian/constants").AX_NAME_PATTERN,T=0;function k(fe){var me=fe._fullLayout;me._redrawFromAutoMarginCount?me._redrawFromAutoMarginCount--:fe.emit("plotly_afterplot")}function L(fe,me){try{fe._fullLayout._paper.style("background",me)}catch(Te){v.error(Te)}}function A(fe,me){L(fe,u.combine(me,"white"))}function I(fe,me){if(!fe._context){fe._context=v.extendDeep({},p);var Te=g.select("base");fe._context._baseUrl=Te.size()&&Te.attr("href")?window.location.href.split("#")[0]:""}var _e,Ae,Pe,De=fe._context;if(me){for(Ae=Object.keys(me),_e=0;_e<Ae.length;_e++)(Pe=Ae[_e])!=="editable"&&Pe!=="edits"&&Pe in De&&(Pe==="setBackground"&&me[Pe]==="opaque"?De[Pe]=A:De[Pe]=me[Pe]);me.plot3dPixelRatio&&!De.plotGlPixelRatio&&(De.plotGlPixelRatio=De.plot3dPixelRatio);var Ve=me.editable;if(Ve!==void 0)for(De.editable=Ve,Ae=Object.keys(De.edits),_e=0;_e<Ae.length;_e++)De.edits[Ae[_e]]=Ve;if(me.edits)for(Ae=Object.keys(me.edits),_e=0;_e<Ae.length;_e++)(Pe=Ae[_e])in De.edits&&(De.edits[Pe]=me.edits[Pe]);De._exportedPlot=me._exportedPlot}De.staticPlot&&(De.editable=!1,De.edits={},De.autosizable=!1,De.scrollZoom=!1,De.doubleClick=!1,De.showTips=!1,De.showLink=!1,De.displayModeBar=!1),De.displayModeBar!=="hover"||b||(De.displayModeBar=!0),De.setBackground!=="transparent"&&typeof De.setBackground=="function"||(De.setBackground=L),De._hasZeroHeight=De._hasZeroHeight||fe.clientHeight===0,De._hasZeroWidth=De._hasZeroWidth||fe.clientWidth===0;var Qe=De.scrollZoom,Oe=De._scrollZoom={};if(Qe===!0)Oe.cartesian=1,Oe.gl3d=1,Oe.geo=1,Oe.mapbox=1;else if(typeof Qe=="string"){var Ue=Qe.split("+");for(_e=0;_e<Ue.length;_e++)Oe[Ue[_e]]=1}else Qe!==!1&&(Oe.gl3d=1,Oe.geo=1,Oe.mapbox=1)}function P(fe,me){var Te,_e,Ae=me+1,Pe=[];for(Te=0;Te<fe.length;Te++)(_e=fe[Te])<0?Pe.push(Ae+_e):Pe.push(_e);return Pe}function S(fe,me,Te){var _e,Ae;for(_e=0;_e<me.length;_e++){if((Ae=me[_e])!==parseInt(Ae,10))throw new Error("all values in "+Te+" must be integers");if(Ae>=fe.data.length||Ae<-fe.data.length)throw new Error(Te+" must be valid indices for gd.data.");if(me.indexOf(Ae,_e+1)>-1||Ae>=0&&me.indexOf(-fe.data.length+Ae)>-1||Ae<0&&me.indexOf(fe.data.length+Ae)>-1)throw new Error("each index in "+Te+" must be unique.")}}function E(fe,me,Te){if(!Array.isArray(fe.data))throw new Error("gd.data must be an array.");if(me===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(me)||(me=[me]),S(fe,me,"currentIndices"),Te===void 0||Array.isArray(Te)||(Te=[Te]),Te!==void 0&&S(fe,Te,"newIndices"),Te!==void 0&&me.length!==Te.length)throw new Error("current and new indices must be of equal length.")}function D(fe,me,Te,_e,Ae){(function(Ye,tt,lt,vt){var It=v.isPlainObject(vt);if(!Array.isArray(Ye.data))throw new Error("gd.data must be an array");if(!v.isPlainObject(tt))throw new Error("update must be a key:value object");if(lt===void 0)throw new Error("indices must be an integer or array of integers");for(var St in S(Ye,lt,"indices"),tt){if(!Array.isArray(tt[St])||tt[St].length!==lt.length)throw new Error("attribute "+St+" must be an array of length equal to indices array length");if(It&&(!(St in vt)||!Array.isArray(vt[St])||vt[St].length!==tt[St].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}})(fe,me,Te,_e);for(var Pe=function(Ye,tt,lt,vt){var It,St,rt,et,Tt,Vt=v.isPlainObject(vt),Kt=[];for(var Be in Array.isArray(lt)||(lt=[lt]),lt=P(lt,Ye.data.length-1),tt)for(var qe=0;qe<lt.length;qe++){if(It=Ye.data[lt[qe]],St=(rt=e(It,Be)).get(),et=tt[Be][qe],!v.isArrayOrTypedArray(et))throw new Error("attribute: "+Be+" index: "+qe+" must be an array");if(!v.isArrayOrTypedArray(St))throw new Error("cannot extend missing or non-array attribute: "+Be);if(St.constructor!==et.constructor)throw new Error("cannot extend array with an array of a different type: "+Be);Tt=Vt?vt[Be][qe]:vt,m(Tt)||(Tt=-1),Kt.push({prop:rt,target:St,insert:et,maxp:Math.floor(Tt)})}return Kt}(fe,me,Te,_e),De={},Ve={},Qe=0;Qe<Pe.length;Qe++){var Oe=Pe[Qe].prop,Ue=Pe[Qe].maxp,Ge=Ae(Pe[Qe].target,Pe[Qe].insert,Ue);Oe.set(Ge[0]),Array.isArray(De[Oe.astr])||(De[Oe.astr]=[]),De[Oe.astr].push(Ge[1]),Array.isArray(Ve[Oe.astr])||(Ve[Oe.astr]=[]),Ve[Oe.astr].push(Pe[Qe].target.length)}return{update:De,maxPoints:Ve}}function F(fe,me){var Te=new fe.constructor(fe.length+me.length);return Te.set(fe),Te.set(me,fe.length),Te}function H(fe,me,Te,_e){fe=v.getGraphDiv(fe),x.clearPromiseQueue(fe);var Ae={};if(typeof me=="string")Ae[me]=Te;else{if(!v.isPlainObject(me))return v.warn("Restyle fail.",me,Te,_e),Promise.reject();Ae=v.extendFlat({},me),_e===void 0&&(_e=Te)}Object.keys(Ae).length&&(fe.changed=!0);var Pe=x.coerceTraceIndices(fe,_e),De=q(fe,Ae,Pe),Ve=De.flags;Ve.calc&&(fe.calcdata=void 0),Ve.clearAxisTypes&&x.clearAxisTypes(fe,Pe,{});var Qe=[];Ve.fullReplot?Qe.push(te._doPlot):(Qe.push(d.previousPromises),d.supplyDefaults(fe),Ve.markerSize&&(d.doCalcdata(fe),N(Qe)),Ve.style&&Qe.push(l.doTraceStyle),Ve.colorbars&&Qe.push(l.doColorBars),Qe.push(k)),Qe.push(d.rehover,d.redrag),t.add(fe,H,[fe,De.undoit,De.traces],H,[fe,De.redoit,De.traces]);var Oe=v.syncOrAsync(Qe,fe);return Oe&&Oe.then||(Oe=Promise.resolve()),Oe.then(function(){return fe.emit("plotly_restyle",De.eventData),fe})}function V(fe){return fe===void 0?null:fe}function Z(fe,me){return me?function(Te,_e,Ae){var Pe=e(Te,_e),De=Pe.set;return Pe.set=function(Ve){K((Ae||"")+_e,Pe.get(),Ve,fe),De(Ve)},Pe}:e}function K(fe,me,Te,_e){if(Array.isArray(me)||Array.isArray(Te))for(var Ae=Array.isArray(me)?me:[],Pe=Array.isArray(Te)?Te:[],De=Math.max(Ae.length,Pe.length),Ve=0;Ve<De;Ve++)K(fe+"["+Ve+"]",Ae[Ve],Pe[Ve],_e);else if(v.isPlainObject(me)||v.isPlainObject(Te)){var Qe=v.isPlainObject(me)?me:{},Oe=v.isPlainObject(Te)?Te:{},Ue=v.extendFlat({},Qe,Oe);for(var Ge in Ue)K(fe+"."+Ge,Qe[Ge],Oe[Ge],_e)}else _e[fe]===void 0&&(_e[fe]=V(me))}function q(fe,me,Te){var _e,Ae=fe._fullLayout,Pe=fe._fullData,De=fe.data,Ve=Ae._guiEditing,Qe=Z(Ae._preGUI,Ve),Oe=v.extendDeepAll({},me);W(me);var Ue,Ge=w.traceFlags(),Ye={},tt={};function lt(){return Te.map(function(){})}function vt(yt){var Dt=c.id2name(yt);Ue.indexOf(Dt)===-1&&Ue.push(Dt)}function It(yt){return"LAYOUT"+yt+".autorange"}function St(yt){return"LAYOUT"+yt+".range"}function rt(yt){for(var Dt=yt;Dt<Pe.length;Dt++)if(Pe[Dt]._input===De[yt])return Pe[Dt]}function et(yt,Dt,jt){if(Array.isArray(yt))yt.forEach(function(Xt){et(Xt,Dt,jt)});else if(!(yt in me)&&!x.hasParent(me,yt)){var or;if(yt.substr(0,6)==="LAYOUT")or=Qe(fe.layout,yt.replace("LAYOUT",""));else{var Ut=Te[jt];or=Z(Ae._tracePreGUI[rt(Ut)._fullInput.uid],Ve)(De[Ut],yt)}yt in tt||(tt[yt]=lt()),tt[yt][jt]===void 0&&(tt[yt][jt]=V(or.get())),Dt!==void 0&&or.set(Dt)}}function Tt(yt){return function(Dt){return Pe[Dt][yt]}}function Vt(yt){return function(Dt,jt){return Dt===!1?Pe[Te[jt]][yt]:null}}for(var Kt in me){if(x.hasParent(me,Kt))throw new Error("cannot set "+Kt+" and a parent attribute simultaneously");var Be,qe,Re,Xe,ke,Le,Ie=me[Kt];if(Kt!=="autobinx"&&Kt!=="autobiny"||(Kt=Kt.charAt(Kt.length-1)+"bins",Ie=Array.isArray(Ie)?Ie.map(Vt(Kt)):Ie===!1?Te.map(Tt(Kt)):null),Ye[Kt]=Ie,Kt.substr(0,6)!=="LAYOUT"){for(tt[Kt]=lt(),_e=0;_e<Te.length;_e++)if(Be=De[Te[_e]],qe=rt(Te[_e]),Xe=(Re=Z(Ae._tracePreGUI[qe._fullInput.uid],Ve)(Be,Kt)).get(),(ke=Array.isArray(Ie)?Ie[_e%Ie.length]:Ie)!==void 0){var Ce=Re.parts[Re.parts.length-1],Je=Kt.substr(0,Kt.length-Ce.length-1),it=Je?Je+"."
1215:"",ht=Je?e(qe,Je).get():qe;if((Le=r.getTraceValObject(qe,Re.parts))&&Le.impliedEdits&&ke!==null)for(var ut in Le.impliedEdits)et(v.relativeAttr(Kt,ut),Le.impliedEdits[ut],_e);else if(Ce!=="thicknessmode"&&Ce!=="lenmode"||Xe===ke||ke!=="fraction"&&ke!=="pixels"||!ht){if(Kt==="type"&&(ke==="pie"!=(Xe==="pie")||ke==="funnelarea"!=(Xe==="funnelarea"))){var kt="x",ot="y";ke!=="bar"&&Xe!=="bar"||Be.orientation!=="h"||(kt="y",ot="x"),v.swapAttrs(Be,["?","?src"],"labels",kt),v.swapAttrs(Be,["d?","?0"],"label",kt),v.swapAttrs(Be,["?","?src"],"values",ot),Xe==="pie"||Xe==="funnelarea"?(e(Be,"marker.color").set(e(Be,"marker.colors").get()),Ae._pielayer.selectAll("g.trace").remove()):o.traceIs(Be,"cartesian")&&e(Be,"marker.colors").set(e(Be,"marker.color").get())}}else{var Lt=Ae._size,Et=ht.orient,Ze=Et==="top"||Et==="bottom";if(Ce==="thicknessmode"){var pt=Ze?Lt.h:Lt.w;et(it+"thickness",ht.thickness*(ke==="fraction"?1/pt:pt),_e)}else{var Ct=Ze?Lt.w:Lt.h;et(it+"len",ht.len*(ke==="fraction"?1/Ct:Ct),_e)}}if(tt[Kt][_e]=V(Xe),["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(Kt)!==-1){if(Kt==="orientation"){Re.set(ke);var zt=Be.x&&!Be.y?"h":"v";if((Re.get()||zt)===qe.orientation)continue}else Kt==="orientationaxes"&&(Be.orientation={v:"h",h:"v"}[qe.orientation]);x.swapXYData(Be),Ge.calc=Ge.clearAxisTypes=!0}else d.dataArrayContainers.indexOf(Re.parts[0])!==-1?(x.manageArrayContainers(Re,ke,tt),Ge.calc=!0):(Le?Le.arrayOk&&!o.traceIs(qe,"regl")&&(v.isArrayOrTypedArray(ke)||v.isArrayOrTypedArray(Xe))?Ge.calc=!0:w.update(Ge,Le):Ge.calc=!0,Re.set(ke))}if(["swapxyaxes","orientationaxes"].indexOf(Kt)!==-1&&c.swap(fe,Te),Kt==="orientationaxes"){var Gt=e(fe.layout,"hovermode"),ze=Gt.get();ze==="x"?Gt.set("y"):ze==="y"?Gt.set("x"):ze==="x unified"?Gt.set("y unified"):ze==="y unified"&&Gt.set("x unified")}if(["orientation","type"].indexOf(Kt)!==-1){for(Ue=[],_e=0;_e<Te.length;_e++){var st=De[Te[_e]];o.traceIs(st,"cartesian")&&(vt(st.xaxis||"x"),vt(st.yaxis||"y"))}et(Ue.map(It),!0,0),et(Ue.map(St),[0,1],0)}}else Re=Qe(fe.layout,Kt.replace("LAYOUT","")),tt[Kt]=[V(Re.get())],Re.set(Array.isArray(Ie)?Ie[0]:Ie),Ge.calc=!0}return(Ge.calc||Ge.plot)&&(Ge.fullReplot=!0),{flags:Ge,undoit:tt,redoit:Ye,traces:Te,eventData:v.extendDeepNoArrays([],[Oe,Te])}}function W(fe){var me,Te,_e,Ae=v.counterRegex("axis",".title",!1,!1),Pe=/colorbar\.title$/,De=Object.keys(fe);for(me=0;me<De.length;me++)Te=De[me],_e=fe[Te],Te!=="title"&&!Ae.test(Te)&&!Pe.test(Te)||typeof _e!="string"&&typeof _e!="number"?Te.indexOf("titlefont")>-1&&Te.indexOf("grouptitlefont")===-1?Ve(Te,Te.replace("titlefont","title.font")):Te.indexOf("titleposition")>-1?Ve(Te,Te.replace("titleposition","title.position")):Te.indexOf("titleside")>-1?Ve(Te,Te.replace("titleside","title.side")):Te.indexOf("titleoffset")>-1&&Ve(Te,Te.replace("titleoffset","title.offset")):Ve(Te,Te.replace("title","title.text"));function Ve(Qe,Oe){fe[Oe]=fe[Qe],delete fe[Qe]}}function $(fe,me,Te){fe=v.getGraphDiv(fe),x.clearPromiseQueue(fe);var _e={};if(typeof me=="string")_e[me]=Te;else{if(!v.isPlainObject(me))return v.warn("Relayout fail.",me,Te),Promise.reject();_e=v.extendFlat({},me)}Object.keys(_e).length&&(fe.changed=!0);var Ae=X(fe,_e),Pe=Ae.flags;Pe.calc&&(fe.calcdata=void 0);var De=[d.previousPromises];Pe.layoutReplot?De.push(l.layoutReplot):Object.keys(_e).length&&(R(fe,Pe,Ae)||d.supplyDefaults(fe),Pe.legend&&De.push(l.doLegend),Pe.layoutstyle&&De.push(l.layoutStyles),Pe.axrange&&N(De,Ae.rangesAltered),Pe.ticks&&De.push(l.doTicksRelayout),Pe.modebar&&De.push(l.doModeBar),Pe.camera&&De.push(l.doCamera),Pe.colorbars&&De.push(l.doColorBars),De.push(k)),De.push(d.rehover,d.redrag),t.add(fe,$,[fe,Ae.undoit],$,[fe,Ae.redoit]);var Ve=v.syncOrAsync(De,fe);return Ve&&Ve.then||(Ve=Promise.resolve(fe)),Ve.then(function(){return fe.emit("plotly_relayout",Ae.eventData),fe})}function R(fe,me,Te){var _e=fe._fullLayout;if(!me.axrange)return!1;for(var Ae in me)if(Ae!=="axrange"&&me[Ae])return!1;for(var Pe in Te.rangesAltered){var De=c.id2name(Pe),Ve=fe.layout[De],Qe=_e[De];if(Qe.autorange=Ve.autorange,Ve.range&&(Qe.range=Ve.range.slice()),Qe.cleanRange(),Qe._matchGroup){for(var Oe in Qe._matchGroup)if(Oe!==Pe){var Ue=_e[c.id2name(Oe)];Ue.autorange=Qe.autorange,Ue.range=Qe.range.slice(),Ue._input.range=Qe.range.slice()}}}return!0}function N(fe,me){var Te=me?function(_e){var Ae=[],Pe=!0;for(var De in me){var Ve=c.getFromId(_e,De);if(Ae.push(De),(Ve.ticklabelposition||"").indexOf("inside")!==-1&&Ve._anchorAxis&&Ae.push(Ve._anchorAxis._id),Ve._matchGroup)for(var Qe in Ve._matchGroup)me[Qe]||Ae.push(Qe);Ve.automargin&&(Pe=!1)}return c.draw(_e,Ae,{skipTitle:Pe})}:function(_e){return c.draw(_e,"redraw")};fe.push(h,l.doAutoRangeAndConstraints,Te,l.drawData,l.finalDraw)}var U=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Q=/^[xyz]axis[0-9]*\.autorange$/,j=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;
vendor: 3,754 bytes, line 1215
1215function X(fe,me){var Te,_e,Ae,Pe=fe.layout,De=fe._fullLayout,Ve=De._guiEditing,Qe=Z(De._preGUI,Ve),Oe=Object.keys(me),Ue=c.list(fe),Ge=v.extendDeepAll({},me),Ye={};for(W(me),Oe=Object.keys(me),_e=0;_e<Oe.length;_e++)if(Oe[_e].indexOf("allaxes")===0){for(Ae=0;Ae<Ue.length;Ae++){var tt=Ue[Ae]._id.substr(1),lt=tt.indexOf("scene")!==-1?tt+".":"",vt=Oe[_e].replace("allaxes",lt+Ue[Ae]._name);me[vt]||(me[vt]=me[Oe[_e]])}delete me[Oe[_e]]}var It=w.layoutFlags(),St={},rt={};function et(Ut,Xt){if(Array.isArray(Ut))Ut.forEach(function(vr){et(vr,Xt)});else if(!(Ut in me)&&!x.hasParent(me,Ut)){var sr=Qe(Pe,Ut);Ut in rt||(rt[Ut]=V(sr.get())),Xt!==void 0&&sr.set(Xt)}}var Tt,Vt={};function Kt(Ut){var Xt=c.name2id(Ut.split(".")[0]);return Vt[Xt]=1,Xt}for(var Be in me){if(x.hasParent(me,Be))throw new Error("cannot set "+Be+" and a parent attribute simultaneously");for(var qe=Qe(Pe,Be),Re=me[Be],Xe=qe.parts.length-1;Xe>0&&typeof qe.parts[Xe]!="string";)Xe--;var ke=qe.parts[Xe],Le=qe.parts[Xe-1]+"."+ke,Ie=qe.parts.slice(0,Xe).join("."),Ce=e(fe.layout,Ie).get(),Je=e(De,Ie).get(),it=qe.get();if(Re!==void 0){St[Be]=Re,rt[Be]=ke==="reverse"?Re:V(it);var ht=r.getLayoutValObject(De,qe.parts);if(ht&&ht.impliedEdits&&Re!==null)for(var ut in ht.impliedEdits)et(v.relativeAttr(Be,ut),ht.impliedEdits[ut]);if(["width","height"].indexOf(Be)!==-1)if(Re){et("autosize",null);var kt=Be==="height"?"width":"height";et(kt,De[kt])}else De[Be]=fe._initialAutoSize[Be];else if(Be==="autosize")et("width",Re?null:De.width),et("height",Re?null:De.height);else if(Le.match(U))Kt(Le),e(De,Ie+"._inputRange").set(null);else if(Le.match(Q)){Kt(Le),e(De,Ie+"._inputRange").set(null);var ot=e(De,Ie).get();ot._inputDomain&&(ot._input.domain=ot._inputDomain.slice())}else Le.match(j)&&e(De,Ie+"._inputDomain").set(null);if(ke==="type"){Tt=Ce;var Lt=Je.type==="linear"&&Re==="log",Et=Je.type==="log"&&Re==="linear";if(Lt||Et){if(Tt&&Tt.range)if(Je.autorange)Lt&&(Tt.range=Tt.range[1]>Tt.range[0]?[1,2]:[2,1]);else{var Ze=Tt.range[0],pt=Tt.range[1];Lt?(Ze<=0&&pt<=0&&et(Ie+".autorange",!0),Ze<=0?Ze=pt/1e6:pt<=0&&(pt=Ze/1e6),et(Ie+".range[0]",Math.log(Ze)/Math.LN10),et(Ie+".range[1]",Math.log(pt)/Math.LN10)):(et(Ie+".range[0]",Math.pow(10,Ze)),et(Ie+".range[1]",Math.pow(10,pt)))}else et(Ie+".autorange",!0);Array.isArray(De._subplots.polar)&&De._subplots.polar.length&&De[qe.parts[0]]&&qe.parts[1]==="radialaxis"&&delete De[qe.parts[0]]._subplot.viewInitial["radialaxis.range"],o.getComponentMethod("annotations","convertCoords")(fe,Je,Re,et),o.getComponentMethod("images","convertCoords")(fe,Je,Re,et)}else et(Ie+".autorange",!0),et(Ie+".range",null);e(De,Ie+"._inputRange").set(null)}else if(ke.match(_)){var Ct=e(De,Be).get(),zt=(Re||{}).type;zt&&zt!=="-"||(zt="linear"),o.getComponentMethod("annotations","convertCoords")(fe,Ct,zt,et),o.getComponentMethod("images","convertCoords")(fe,Ct,zt,et)}var Gt=a.containerArrayMatch(Be);if(Gt){Te=Gt.array,_e=Gt.index;var ze=Gt.property,st=ht||{editType:"calc"};_e!==""&&ze===""&&(a.isAddVal(Re)?rt[Be]=null:a.isRemoveVal(Re)?rt[Be]=(e(Pe,Te).get()||[])[_e]:v.warn("unrecognized full object value",me)),w.update(It,st),Ye[Te]||(Ye[Te]={});var yt=Ye[Te][_e];yt||(yt=Ye[Te][_e]={}),yt[ze]=Re,delete me[Be]}else ke==="reverse"?(Ce.range?Ce.range.reverse():(et(Ie+".autorange",!0),Ce.range=[1,0]),Je.autorange?It.calc=!0:It.plot=!0):(De._has("scatter-like")&&De._has("regl")&&Be==="dragmode"&&(Re==="lasso"||Re==="select")&&it!=="lasso"&&it!=="select"||De._has("gl2d")?It.plot=!0:ht?w.update(It,ht):It.calc=!0,qe.set(Re))}}for(Te in Ye)a.applyContainerArrayChanges(fe,Qe(Pe,Te),Ye[Te],It,Qe)||(It.plot=!0);for(var Dt in Vt){var jt=(Tt=c.getFromId(fe,Dt))&&Tt._constraintGroup;if(jt)for(var or in It.calc=!0,jt)Vt[or]||(c.getFromId(fe,or)._c
1215onstraintShrinkable=!0)}return(J(fe)||me.height||me.width)&&(It.plot=!0),(It.plot||It.calc)&&(It.layoutReplot=!0),{flags:It,rangesAltered:Vt,undoit:rt,redoit:St,eventData:Ge}}function J(fe){var me=fe._fullLayout,Te=me.width,_e=me.height;return fe.layout.autosize&&d.plotAutoSize(fe,fe.layout,me),me.width!==Te||me.height!==_e}function re(fe,me,Te,_e){fe=v.getGraphDiv(fe),x.clearPromiseQueue(fe),v.isPlainObject(me)||(me={}),v.isPlainObject(Te)||(Te={}),Object.keys(me).length&&(fe.changed=!0),Object.keys(Te).length&&(fe.changed=!0);var Ae=x.coerceTraceIndices(fe,_e),Pe=q(fe,v.extendFlat({},me),Ae),De=Pe.flags,Ve=X(fe,v.extendFlat({},Te)),Qe=Ve.flags;(De.calc||Qe.calc)&&(fe.calcdata=void 0),De.clearAxisTypes&&x.clearAxisTypes(fe,Ae,Te);var Oe=[];Qe.layoutReplot?Oe.push(l.layoutReplot):De.fullReplot?Oe.push(te._doPlot):(Oe.push(d.previousPromises),R(fe,Qe,Ve)||d.supplyDefaults(fe),De.style&&Oe.push(l.doTraceStyle),(De.colorbars||Qe.colorbars)&&Oe.push(l.doColorBars),Qe.legend&&Oe.push(l.doLegend),Qe.layoutstyle&&Oe.push(l.layoutStyles),Qe.axrange&&N(Oe,Ve.rangesAltered),Qe.ticks&&Oe.push(l.doTicksRelayout),Qe.modebar&&Oe.push(l.doModeBar),Qe.camera&&Oe.push(l.doCamera),Oe.push(k)),Oe.push(d.rehover,d.redrag),t.add(fe,re,[fe,Pe.undoit,Ve.undoit,Pe.traces],re,[fe,Pe.redoit,Ve.redoit,Pe.traces]);var Ue=v.syncOrAsync(Oe,fe);return Ue&&Ue.then||(Ue=Promise.resolve(fe)),Ue.then(function(){return fe.emit("plotly_update",{data:Pe.eventData,layout:Ve.eventData}),fe})}function ne(fe){return function(me){me._fullLayout._guiEditing=!0;var Te=fe.apply(null,arguments);return me._fullLayout._guiEditing=!1,Te}}var se=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],oe=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function pe(fe,me){for(var Te=0;Te<me.length;Te++){var _e=me[Te],Ae=fe.match(_e.pattern);if(Ae){var Pe=Ae[1]||"";return{head:Pe,tail:fe.substr(Pe.length+1),attr:_e.attr}}}}function ce(fe,me){var Te=e(me,fe).get();if(Te!==void 0)return Te;var _e=fe.split(".");for(_e.pop();_e.length>1;)if(_e.pop(),(Te=e(me,_e.join(".")+".uirevision").get())!==void 0)return Te;return me.uirevision}function de(fe,me){for(var Te=0;Te<me.length;Te++)if(me[Te]._fullInput.uid===fe)return Te;return-1}function xe(fe,me,Te){for(var _e=0;_e<me.length;_e++)if(me[_e].uid===fe)return _e;return!me[Te]||me[Te].uid?-1:Te}function we(fe,me){var Te=v.isPlainObject(fe),_e=Array.isArray(fe);return Te||_e?(Te&&v.isPlainObject(me)||_e&&Array.isArray(me))&&JSON.stringify(fe)===JSON.stringify(me):fe===me}function be(fe,me,Te,_e){var Ae,Pe,De,Ve=_e.getValObject,Qe=_e.flags,Oe=_e.immutable,Ue=_e.inArray,Ge=_e.arrayIndex;function Ye(){var Ce=Ae.editType;Ue&&Ce.indexOf("arraydraw")!==-1?v.pushUnique(Qe.arrays[Ue],Ge):(w.update(Qe,Ae),Ce!=="none"&&Qe.nChanges++,_e.transition&&Ae.anim&&Qe.nChangesAnim++,(U.test(De)||Q.test(De))&&(Qe.rangesAltered[Te[0]]=1),j.test(De)&&e(me,"_inputDomain").set(null),Pe==="datarevision"&&(Qe.newDataRevision=1))}function tt(Ce){return Ce.valType==="data_array"||Ce.arrayOk}for(Pe in fe){if(Qe.calc&&!_e.transition)return;var lt=fe[Pe],vt=me[Pe],It=Te.concat(Pe);if(De=It.join("."),Pe.charAt(0)!=="_"&&typeof lt!="function"&&lt!==vt){if((Pe==="tick0"||Pe==="dtick")&&Te[0]!=="geo"){var St=me.tickmode;if(St==="auto"||St==="array"||!St)continue}if((Pe!=="range"||!me.autorange)&&(Pe!=="zmin"&&Pe!=="zmax"||me.type!=="contourcarpet")&&(Ae=Ve(It))&&(!Ae._compareAsJSON||JSON.stringify(lt)!==JSON.stringify(vt))){var rt,et=Ae.valType,Tt=tt(Ae),Vt=Array.isArray(lt),Kt=Array.isArray(vt);if(Vt&&Kt){var Be="_input_"+Pe,qe=fe[Be],Re=me[Be];if(Array.isArray(qe)&&qe===Re)continue}if(vt===void 0)Tt&&Vt?Qe.calc=!0:Ye();else if(Ae._isLinkedToArray){var Xe=[],ke=!1;Ue||(Qe.arrays[Pe]=Xe);var Le=Math.min(lt.length,vt.length),Ie=Math.max(lt.length,vt.length);if(Le!==Ie){if(Ae.editType!=="arraydraw"){Ye();continue}ke=!0}for(rt=0;rt<Le;rt++)be(lt[rt],vt[rt],It.concat(rt),v.extendFlat({inArray:Pe,arrayIndex:rt},_e));if(ke)for(rt=Le;rt<Ie;rt++)Xe.push(rt)}else!et&&v.isPlainObject(lt)?be(lt,vt,It,_e):Tt?Vt&&Kt?(Oe&&(Qe.calc=!0),(Oe||_e.newDataRevision)&&Ye()):Vt!==Kt?Qe.calc=!0:Ye():Vt&&Kt&&lt.length===vt.length&&String(lt)===String(vt)||Ye()}}}for(Pe in me)if(!(Pe in fe)&&Pe.charAt(0)!=="_"&&typeof me[Pe]!="function"){if(tt(Ae=Ve(Te.concat(Pe)))&&Array.isArray(me[Pe]))return void(Qe.calc=!0);Ye()}}function Ee(fe){var me=fe._fullLayout,Te=fe.getBoundingClientRect();if(!v.equalDomRects(Te,me._lastBBox)){var _e=me._invTransform=v.inverseTransformMatrix(v.getFullTransformMatrix(fe));me._invScaleX=Math.sqrt(_e[0][0]*_e[0][0]+_e[0][1]*_e[0][1]+_e[0][2]*_e[0][2]),me._invScaleY=Math.sqrt(_e[1][0]*_e[1][0]+_e[1][1]*_e[1][1]+_e[1][2]*_e[1][2]),me._lastBBox=Te}}te.animate=function(fe,me,Te){if(fe=v.getGraphDiv(fe),!v.isPlotDiv(fe))throw new Error("This element is not a Plotly plot: "+fe+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var _e=fe._transitionData;_e._frameQueue||(_e._frameQueue=[]);var Ae=(Te=d.supplyAnimationDefaults(Te)).transition,Pe=Te.frame;function De(Oe){return Array.isArray(Ae)?Oe>=Ae.length?Ae[0]:Ae[Oe]:Ae}function Ve(Oe){return Array.isArray(Pe)?Oe>=Pe.length?Pe[0]:Pe[Oe]:Pe}function Qe(Oe,Ue){var Ge=0;return function(){if(Oe&&++Ge===Ue)return Oe()}}return _e._frameWaitingCnt===void 0&&(_e._frameWaitingCnt=0),new Promise(function(Oe,Ue){function Ge(){_e._currentFrame&&_e._currentFrame.onComplete&&_e._currentFrame.onComplete();var qe=_e._currentFrame=_e._frameQueue.shift();if(qe){var Re=qe.name?qe.name.toString():null;fe._fullLayout._currentFrame=Re,_e._lastFrameAt=Date.now(),_e._timeToNext=qe.frameOpts.duration,d.transition(fe,qe.frame.data,qe.frame.layout,x.coerceTraceIndices(fe,qe.frame.traces),qe.frameOpts,qe.transitionOpts).then(function(){qe.onComplete&&qe.onComplete()}),fe.emit("plotly_animatingframe",{name:Re,frame:qe.frame,animation:{frame:qe.frameOpts,transition:qe.transitionOpts}})}else fe.emit("plotly_animated"),window.cancelAnimationFrame(_e._animationRaf),_e._animationRaf=null}function Ye(){fe.emit("plotly_animating"),_e._lastFrameAt=-1/0,_e._timeToNext=0,_e._runningTransitions=0,_e._currentFrame=null;var qe=function(){_e._animationRaf=window.requestAnimationFrame(qe),Date.now()-_e._lastFrameAt>_e._timeToNext&&Ge()};qe()}var tt,lt,vt=0;function It(qe){return Array.isArray(Ae)?vt>=Ae.length?qe.transitionOpts=Ae[vt]:qe.transitionOpts=Ae[0]:qe.transitionOpts=Ae,vt++,qe}var St=[],rt=me==null,et=Array.isArray(me);if(!rt&&!et&&v.isPlainObject(me))St.push({type:"object",data:It(v.extendFlat({},me))});else if(rt||["string","number"].indexOf(typeof me)!==-1)for(tt=0;tt<_e._frames.length;tt++)(lt=_e._frames[tt])&&(rt||String(lt.group)===String(me))&&St.push({type:"byname",name:String(lt.name),data:It({name:lt.name})});else if(et)for(tt=0;tt<me.length;tt++){var Tt=me[tt];["number","string"].indexOf(typeof Tt)!==-1?(Tt=String(Tt),St.push({type:"byname",name:Tt,data:It({name:Tt})})):v.isPlainObject(Tt)&&St.push({type:"object",data:It(v.extendFlat({},Tt))})}for(tt=0;tt<St.length;tt++)if((lt=St[tt]).type==="byname"&&!_e._frameHash[lt.data.name])return v.warn('animate failure: frame not found: "'+lt.data.name+'"'),void Ue();["next","immediate"].indexOf(Te.mode)!==-1&&function(){if(_e._frameQueue.length!==0){for(;_e._frameQueue.length;){var qe=_e._frameQueue.pop();qe.onInterrupt&&qe.onInterrupt()}fe.emit("plotly_animationinterrupted",[])}}(),Te.direction==="reverse"&&St.reverse();var Vt=fe._fullLayout._currentFrame;if(Vt&&Te.fromcurrent){var Kt=-1;for(tt=0;tt<St.length;tt++)if((lt=St[tt]).type==="byname"&&lt.name===Vt){Kt=tt;break}if(Kt>0&&Kt<St.length-1){var Be=[];for(tt=0;tt<St.length;tt++)lt=St[tt],(St[tt].type!=="byname"||tt>Kt)&&Be.push(lt);St=Be}}St.length>0?function(qe){if(qe.length!==0){for(var Re=0;Re<qe.length;Re++){var Xe;Xe=qe[Re].type==="byname"?d.computeFrame(fe,qe[Re].name):qe[Re].data;var ke=Ve(Re),Le=De(Re);Le.duration=Math.min(Le.duration,ke.duration);var Ie={frame:Xe,name:qe[Re].name,frameOpts:ke,transitionOpts:Le};Re===qe.length-1&&(Ie.onComplete=Qe(Oe,2),Ie.onInterrupt=Ue),_e._frameQueue.push(Ie)}Te.mode==="immediate"&&(_e._lastFrameAt=-1/0),_e._animationRaf||Ye()}}(St):(fe.emit("plotly_animated"),Oe())})},te.addFrames=function(fe,me,Te){if(fe=v.getGraphDiv(fe),me==null)return Promise.resolve();if(!v.isPlotDiv(fe))throw new Error("This element is not a Plotly plot: "+fe+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var _e,Ae,Pe,De,Ve=fe._transitionData._frames,Qe=fe._transitionData._frameHash;if(!Array.isArray(me))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+me);var Oe=Ve.length+2*me.length,Ue=[],Ge={};for(_e=me.length-1;_e>=0;_e--)if(v.isPlainObject(me[_e])){var Ye=me[_e].name,tt=(Qe[Ye]||Ge[Ye]||{}).name,lt=me[_e].name,vt=Qe[tt]||Ge[tt];tt&&lt&&typeof lt=="number"&&vt&&T<5&&(T++,v.warn('addFrames: overwriting frame "'+(Qe[tt]||Ge[tt]).name+'" with a frame whose name of type "number" also equates to "'+tt+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),T===5&&v.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Ge[Ye]={name:Ye},Ue.push({frame:d.supplyFrameDefaults(me[_e]),index:Te&&Te[_e]!==void 0&&Te[_e]!==null?Te[_e]:Oe+_e})}Ue.sort(function(Be,qe){return Be.index>
1215qe.index?-1:Be.index<qe.index?1:0});var It=[],St=[],rt=Ve.length;for(_e=Ue.length-1;_e>=0;_e--){if(typeof(Ae=Ue[_e].frame).name=="number"&&v.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ae.name)for(;Qe[Ae.name="frame "+fe._transitionData._counter++];);if(Qe[Ae.name]){for(Pe=0;Pe<Ve.length&&(Ve[Pe]||{}).name!==Ae.name;Pe++);It.push({type:"replace",index:Pe,value:Ae}),St.unshift({type:"replace",index:Pe,value:Ve[Pe]})}else De=Math.max(0,Math.min(Ue[_e].index,rt)),It.push({type:"insert",index:De,value:Ae}),St.unshift({type:"delete",index:De}),rt++}var et=d.modifyFrames,Tt=d.modifyFrames,Vt=[fe,St],Kt=[fe,It];return t&&t.add(fe,et,Vt,Tt,Kt),d.modifyFrames(fe,It)},te.deleteFrames=function(fe,me){if(fe=v.getGraphDiv(fe),!v.isPlotDiv(fe))throw new Error("This element is not a Plotly plot: "+fe);var Te,_e,Ae=fe._transitionData._frames,Pe=[],De=[];if(!me)for(me=[],Te=0;Te<Ae.length;Te++)me.push(Te);for((me=me.slice()).sort(),Te=me.length-1;Te>=0;Te--)_e=me[Te],Pe.push({type:"delete",index:_e}),De.unshift({type:"insert",index:_e,value:Ae[_e]});var Ve=d.modifyFrames,Qe=d.modifyFrames,Oe=[fe,De],Ue=[fe,Pe];return t&&t.add(fe,Ve,Oe,Qe,Ue),d.modifyFrames(fe,Pe)},te.addTraces=function fe(me,Te,_e){me=v.getGraphDiv(me);var Ae,Pe,De=[],Ve=te.deleteTraces,Qe=fe,Oe=[me,De],Ue=[me,Te];for(function(Ge,Ye,tt){var lt,vt;if(!Array.isArray(Ge.data))throw new Error("gd.data must be an array.");if(Ye===void 0)throw new Error("traces must be defined.");for(Array.isArray(Ye)||(Ye=[Ye]),lt=0;lt<Ye.length;lt++)if(typeof(vt=Ye[lt])!="object"||Array.isArray(vt)||vt===null)throw new Error("all values in traces array must be non-array objects");if(tt===void 0||Array.isArray(tt)||(tt=[tt]),tt!==void 0&&tt.length!==Ye.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(me,Te,_e),Array.isArray(Te)||(Te=[Te]),Te=Te.map(function(Ge){return v.extendFlat({},Ge)}),x.cleanData(Te),Ae=0;Ae<Te.length;Ae++)me.data.push(Te[Ae]);for(Ae=0;Ae<Te.length;Ae++)De.push(-Te.length+Ae);if(_e===void 0)return Pe=te.redraw(me),t.add(me,Ve,Oe,Qe,Ue),Pe;Array.isArray(_e)||(_e=[_e]);try{E(me,De,_e)}catch(Ge){throw me.data.splice(me.data.length-Te.length,Te.length),Ge}return t.startSequence(me),t.add(me,Ve,Oe,Qe,Ue),Pe=te.moveTraces(me,De,_e),t.stopSequence(me),Pe},te.deleteTraces=function fe(me,Te){me=v.getGraphDiv(me);var _e,Ae,Pe=[],De=te.addTraces,Ve=fe,Qe=[me,Pe,Te],Oe=[me,Te];if(Te===void 0)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Te)||(Te=[Te]),S(me,Te,"indices"),(Te=P(Te,me.data.length-1)).sort(v.sorterDes),_e=0;_e<Te.length;_e+=1)Ae=me.data.splice(Te[_e],1)[0],Pe.push(Ae);var Ue=te.redraw(me);return t.add(me,De,Qe,Ve,Oe),Ue},te.extendTraces=function fe(me,Te,_e,Ae){function Pe(Oe,Ue,Ge){var Ye,tt;if(v.isTypedArray(Oe))if(Ge<0){var lt=new Oe.constructor(0),vt=F(Oe,Ue);Ge<0?(Ye=vt,tt=lt):(Ye=lt,tt=vt)}else if(Ye=new Oe.constructor(Ge),tt=new Oe.constructor(Oe.length+Ue.length-Ge),Ge===Ue.length)Ye.set(Ue),tt.set(Oe);else if(Ge<Ue.length){var It=Ue.length-Ge;Ye.set(Ue.subarray(It)),tt.set(Oe),tt.set(Ue.subarray(0,It),Oe.length)}else{var St=Ge-Ue.length,rt=Oe.length-St;Ye.set(Oe.subarray(rt)),Ye.set(Ue,St),tt.set(Oe.subarray(0,rt))}else Ye=Oe.concat(Ue),tt=Ge>=0&&Ge<Ye.length?Ye.splice(0,Ye.length-Ge):[];return[Ye,tt]}var De=D(me=v.getGraphDiv(me),Te,_e,Ae,Pe),Ve=te.redraw(me),Qe=[me,De.update,_e,De.maxPoints];return t.add(me,te.prependTraces,Qe,fe,arguments),Ve},te.moveTraces=function fe(me,Te,_e){var Ae,Pe=[],De=[],Ve=fe,Qe=fe,Oe=[me=v.getGraphDiv(me),_e,Te],Ue=[me,Te,_e];if(E(me,Te,_e),Te=Array.isArray(Te)?Te:[Te],_e===void 0)for(_e=[],Ae=0;Ae<Te.length;Ae++)_e.push(-Te.length+Ae);for(_e=Array.isArray(_e)?_e:[_e],Te=P(Te,me.data.length-1),_e=P(_e,me.data.length-1),Ae=0;Ae<me.data.length;Ae++)Te.indexOf(Ae)===-1&&Pe.push(me.data[Ae]);for(Ae=0;Ae<Te.length;Ae++)De.push({newIndex:_e[Ae],trace:me.data[Te[Ae]]});for(De.sort(function(Ye,tt){return Ye.newIndex-tt.newIndex}),Ae=0;Ae<De.length;Ae+=1)Pe.splice(De[Ae].newIndex,0,De[Ae].trace);me.data=Pe;var Ge=te.redraw(me);return t.add(me,Ve,Oe,Qe,Ue),Ge}
1215,te.prependTraces=function fe(me,Te,_e,Ae){function Pe(Oe,Ue,Ge){var Ye,tt;if(v.isTypedArray(Oe))if(Ge<=0){var lt=new Oe.constructor(0),vt=F(Ue,Oe);Ge<0?(Ye=vt,tt=lt):(Ye=lt,tt=vt)}else if(Ye=new Oe.constructor(Ge),tt=new Oe.constructor(Oe.length+Ue.length-Ge),Ge===Ue.length)Ye.set(Ue),tt.set(Oe);else if(Ge<Ue.length){var It=Ue.length-Ge;Ye.set(Ue.subarray(0,It)),tt.set(Ue.subarray(It)),tt.set(Oe,It)}else{var St=Ge-Ue.length;Ye.set(Ue),Ye.set(Oe.subarray(0,St),Ue.length),tt.set(Oe.subarray(St))}else Ye=Ue.concat(Oe),tt=Ge>=0&&Ge<Ye.length?Ye.splice(Ge,Ye.length):[];return[Ye,tt]}var De=D(me=v.getGraphDiv(me),Te,_e,Ae,Pe),Ve=te.redraw(me),Qe=[me,De.update,_e,De.maxPoints];return t.add(me,te.extendTraces,Qe,fe,arguments),Ve},te.newPlot=function(fe,me,Te,_e){return fe=v.getGraphDiv(fe),d.cleanPlot([],{},fe._fullData||[],fe._fullLayout||{}),d.purge(fe),te._doPlot(fe,me,Te,_e)},te._doPlot=function(fe,me,Te,_e){var Ae;if(fe=v.getGraphDiv(fe),n.init(fe),v.isPlainObject(me)){var Pe=me;me=Pe.data,Te=Pe.layout,_e=Pe.config,Ae=Pe.frames}if(n.triggerHandler(fe,"plotly_beforeplot",[me,Te,_e])===!1)return Promise.reject();me||Te||v.isPlotDiv(fe)||v.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",fe),I(fe,_e),Te||(Te={}),g.select(fe).classed("js-plotly-plot",!0),i.makeTester(),Array.isArray(fe._promises)||(fe._promises=[]);var De=(fe.data||[]).length===0&&Array.isArray(me);Array.isArray(me)&&(x.cleanData(me),De?fe.data=me:fe.data.push.apply(fe.data,me),fe.empty=!1),fe.layout&&!De||(fe.layout=x.cleanLayout(Te)),d.supplyDefaults(fe);var Ve=fe._fullLayout,Qe=Ve._has("cartesian");Ve._replotting=!0,(De||Ve._shouldCreateBgLayer)&&(function(St){var rt=g.select(St),et=St._fullLayout;if(et._calcInverseTransform=Ee,et._calcInverseTransform(St),et._container=rt.selectAll(".plot-container").data([0]),et._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),et._paperdiv=et._container.selectAll(".svg-container").data([0]),et._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),et._glcontainer=et._paperdiv.selectAll(".gl-container").data([{}]),et._glcontainer.enter().append("div").classed("gl-container",!0),et._paperdiv.selectAll(".main-svg").remove(),et._paperdiv.select(".modebar-container").remove(),et._paper=et._paperdiv.insert("svg",":first-child").classed("main-svg",!0),et._toppaper=et._paperdiv.append("svg").classed("main-svg",!0),et._modebardiv=et._paperdiv.append("div"),delete et._modeBar,et._hoverpaper=et._paperdiv.append("svg").classed("main-svg",!0),!et._uid){var Tt={};g.selectAll("defs").each(function(){this.id&&(Tt[this.id.split("-")[1]]=1)}),et._uid=v.randstr(Tt)}et._paperdiv.selectAll(".main-svg").attr(s.svgAttrs),et._defs=et._paper.append("defs").attr("id","defs-"+et._uid),et._clips=et._defs.append("g").classed("clips",!0),et._topdefs=et._toppaper.append("defs").attr("id","topdefs-"+et._uid),et._topclips=et._topdefs.append("g").classed("clips",!0),et._bgLayer=et._paper.append("g").classed("bglayer",!0),et._draggers=et._paper.append("g").classed("draglayer",!0);var Vt=et._paper.append("g").classed("layer-below",!0);et._imageLowerLayer=Vt.append("g").classed("imagelayer",!0),et._shapeLowerLayer=Vt.append("g").classed("shapelayer",!0),et._cartesianlayer=et._paper.append("g").classed("cartesianlayer",!0),et._polarlayer=et._paper.append("g").classed("polarlayer",!0),et._smithlayer=et._paper.append("g").classed("smithlayer",!0),et._ternarylayer=et._paper.append("g").classed("ternarylayer",!0),et._geolayer=et._paper.append("g").classed("geolayer",!0),et._funnelarealayer=et._paper.append("g").classed("funnelarealayer",!0),et._pielayer=et._paper.append("g").classed("pielayer",!0),et._iciclelayer=et._paper.append("g").classed("iciclelayer",!0),et._treemaplayer=et._paper.append("g").classed("treemaplayer",!0),et._sunburstlayer=et._paper.append("g").classed("sunburstlayer",!0),et._indicatorlayer=et._toppaper.append("g").classed("indicatorlayer",!0),et._glimages=et._paper.append("g").classed("glimages",!0);var Kt=et._toppaper.append("g").classed("layer-above",!0);et._imageUpperLayer=Kt.append("g").classed("imagelayer",!0),et._shapeUpperLayer=Kt.append("g").classed("shapelayer",!0),et._infolayer=et._toppaper.append("g").classed("infolayer",!0),et._menulayer=et._toppaper.append("g").classed("menulayer",!0),et._zoomlayer=et._toppaper.append("g").classed("zoomlayer",!0),et._hoverlayer=et._hoverpaper.append("g").classed("hoverlayer",!0),et._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),St.emit("plotly_framework")}(fe),Ve._shouldCreateBgLayer&&delete Ve._shouldCreateBgLayer),i.initGradients(fe),i.initPatterns(fe),De&&c.saveShowSpikeInitial(fe);var Oe=!fe.calcdata||fe.calcdata.length!==(fe._fullData||[]).length;Oe&&d.doCalcdata(fe);for(var Ue=0;Ue<fe.calcdata.length;Ue++)fe.calcdata[Ue][0].trace=fe._fullData[Ue];fe._context.responsive?fe._responsiveChartHandler||(fe._responsiveChartHandler=function(){v.isHidden(fe)||d.resize(fe)},window.addEventListener("resize",fe._responsiveChartHandler)):v.clearResponsive(fe);var Ge=v.extendFlat({},Ve._size),Ye=0;function tt(){if(d.clearAutoMarginIds(fe),l.drawMarginPushers(fe),c.allowAutoMargin(fe),Ve._has("pie"))for(var St=fe._fullData,rt=0;rt<St.length;rt++){var et=St[rt];et.type==="pie"&&et.automargin&&d.allowAutoMargin(fe,"pie."+et.uid+".automargin")}return d.doAutoMargin(fe),d.previousPromises(fe)}function lt(){fe._transitioning||(l.doAutoRangeAndConstraints(fe),De&&c.saveRangeInitial(fe),o.getComponentMethod("rangeslider","calcAutorange")(fe))}var vt=[d.previousPromises,function(){if(Ae)return te.addFrames(fe,Ae)},function St(){for(var rt=Ve._basePlotModules,et=0;et<rt.length;et++)rt[et].drawFramework&&rt[et].drawFramework(fe);!Ve._glcanvas&&Ve._has("gl")&&(Ve._glcanvas=Ve._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Be){return Be.key}),Ve._glcanvas.enter().append("canvas").attr("class",function(Be){return"gl-canvas gl-canvas-"+Be.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Tt=fe._context.plotGlPixelRatio;if(Ve._glcanvas){Ve._glcanvas.attr("width",Ve.width*Tt).attr("height",Ve.height*Tt).style("width",Ve.width+"px").style("height",Ve.height+"px");var Vt=Ve._glcanvas.data()[0].regl;if(Vt&&(Math.floor(Ve.width*Tt)!==Vt._gl.drawingBufferWidth||Math.floor(Ve.height*Tt)!==Vt._gl.drawingBufferHeight)){var Kt="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!Ye)return v.log(Kt+" Clearing graph and plotting again."),d.cleanPlot([],{},fe._fullData,Ve),d.supplyDefaults(fe),Ve=fe._fullLayout,d.doCalcdata(fe),Ye++,St();v.error(Kt)}}return Ve.modebar.orientation==="h"?Ve._modebardiv.style("height",null).style("width","100%"):Ve._modebardiv.style("width",null).style("height",Ve.height+"px"),d.previousPromises(fe)},tt,function(){if(d.didMarginChange(Ge,Ve._size))return v.syncOrAsync([tt,l.layoutStyles],fe)}];Qe&&vt.push(function(){if(Oe)return v.syncOrAsync([o.getComponentMethod("shapes","calcAutorange"),o.getComponentMethod("annotations","calcAutorange"),lt],fe);lt()}),vt.push(l.layoutStyles),Qe&&vt.push(function(){return c.draw(fe,De?"":"redraw")},function(St){St._fullLayout._insideTickLabelsAutorange&&$(St,St._fullLayout._insideTickLabelsAutorange).then(function(){St._fullLayout._insideTickLabelsAutorange=void 0})}),vt.push(l.drawData,l.finalDraw,f,d.addLinks,d.rehover,d.redrag,d.doAutoMargin,function(St){St._fullLayout._insideTickLabelsAutorange&&De&&c.saveRangeInitial(St,!0)},d.previousPromises);var It=v.syncOrAsync(vt,fe);return It&&It.then||(It=Promise.resolve()),It.then(function(){return k(fe),fe})},te.purge=function(fe){var me=(fe=v.getGraphDiv(fe))._fullLayout||{},Te=fe._fullData||[];return d.cleanPlot([],{},Te,me),d.purge(fe),n.purge(fe),me._container&&me._container.remove(),delete fe._context,fe},te.react=function(fe,me,Te,_e){var Ae,Pe;fe=v.getGraphDiv(fe),x.clearPromiseQueue(fe);var De=fe._fullData,Ve=fe._fullLayout;if(v.isPlotDiv(fe)&&De&&Ve){if(v.isPlainObject(me)){var Qe=me;me=Qe.data,Te=Qe.layout,_e=Qe.config,Ae=Qe.frames}var Oe=!1;if(_e){var Ue=v.extendDeep({},fe._context);fe._context=void 0,I(fe,_e),Oe=function Ie(Ce,Je){var it;for(it in Ce)if(it.charAt(0)!=="_"){var ht=Ce[it],ut=Je[it];if(ht!==ut)if(v.isPlainObject(ht)&&v.isPlainObject(ut)){if(Ie(ht,ut))return!0}else{if(!Array.isArray(ht)||!Array.isArray(ut)||ht.length!==ut.length)return!0;for(var kt=0;kt<ht.length;
1215kt++)if(ht[kt]!==ut[kt]&&(!v.isPlainObject(ht[kt])||!v.isPlainObject(ut[kt])||Ie(ht[kt],ut[kt])))return!0}}}(Ue,fe._context)}fe.data=me||[],x.cleanData(fe.data),fe.layout=Te||{},x.cleanLayout(fe.layout),function(Ie,Ce,Je,it){var ht,ut,kt,ot,Lt,Et,Ze,pt,Ct,zt,Gt=it._preGUI,ze=[],st={},yt={};for(ht in Gt){if(Lt=pe(ht,se)){if(Ct=Lt.head,zt=Lt.tail,ut=Lt.attr||Ct+".uirevision",(ot=(kt=e(it,ut).get())&&ce(ut,Ce))&&ot===kt){if((Et=Gt[ht])===null&&(Et=void 0),we(pt=(Ze=e(Ce,ht)).get(),Et)){pt===void 0&&zt==="autorange"&&ze.push(Ct),Ze.set(V(e(it,ht).get()));continue}if(zt==="autorange"||zt.substr(0,6)==="range["){var Dt=Gt[Ct+".range[0]"],jt=Gt[Ct+".range[1]"],or=Gt[Ct+".autorange"];if(or||or===null&&Dt===null&&jt===null){if(!(Ct in st)){var Ut=e(Ce,Ct).get();st[Ct]=Ut&&(Ut.autorange||Ut.autorange!==!1&&(!Ut.range||Ut.range.length!==2))}if(st[Ct]){Ze.set(V(e(it,ht).get()));continue}}}}}else v.warn("unrecognized GUI edit: "+ht);delete Gt[ht],Lt&&Lt.tail.substr(0,6)==="range["&&(yt[Lt.head]=1)}for(var Xt=0;Xt<ze.length;Xt++){var sr=ze[Xt];if(yt[sr]){var vr=e(Ce,sr).get();vr&&delete vr.autorange}}var pr=it._tracePreGUI;for(var ar in pr){var lr,hr=pr[ar],Or=null;for(ht in hr){if(!Or){var dr=de(ar,Je);if(dr<0){delete pr[ar];break}var Fr=xe(ar,Ie,(lr=Je[dr]._fullInput).index);if(Fr<0){delete pr[ar];break}Or=Ie[Fr]}if(Lt=pe(ht,oe)){if(Lt.attr?ot=(kt=e(it,Lt.attr).get())&&ce(Lt.attr,Ce):(kt=lr.uirevision,(ot=Or.uirevision)===void 0&&(ot=Ce.uirevision)),ot&&ot===kt&&((Et=hr[ht])===null&&(Et=void 0),we(pt=(Ze=e(Or,ht)).get(),Et))){Ze.set(V(e(lr,ht).get()));continue}}else v.warn("unrecognized GUI edit: "+ht+" in trace uid "+ar);delete hr[ht]}}}(fe.data,fe.layout,De,Ve),d.supplyDefaults(fe,{skipUpdateCalc:!0});var Ge=fe._fullData,Ye=fe._fullLayout,tt=Ye.datarevision===void 0,lt=Ye.transition,vt=function(Ie,Ce,Je,it,ht){var ut=w.layoutFlags();function kt(ot){return r.getLayoutValObject(Je,ot)}return ut.arrays={},ut.rangesAltered={},ut.nChanges=0,ut.nChangesAnim=0,be(Ce,Je,[],{getValObject:kt,flags:ut,immutable:it,transition:ht,gd:Ie}),(ut.plot||ut.calc)&&(ut.layoutReplot=!0),ht&&ut.nChanges&&ut.nChangesAnim&&(ut.anim=ut.nChanges===ut.nChangesAnim?"all":"some"),ut}(fe,Ve,Ye,tt,lt),It=vt.newDataRevision,St=function(Ie,Ce,Je,it,ht,ut){var kt=Ce.length===Je.length;if(!ht&&!kt)return{fullReplot:!0,calc:!0};var ot,Lt,Et=w.traceFlags();Et.arrays={},Et.nChanges=0,Et.nChangesAnim=0;var Ze={getValObject:function(Ct){var zt=r.getTraceValObject(Lt,Ct);return!Lt._module.animatable&&zt.anim&&(zt.anim=!1),zt},flags:Et,immutable:it,transition:ht,newDataRevision:ut,gd:Ie},pt={};for(ot=0;ot<Ce.length;ot++)if(Je[ot]){if(Lt=Je[ot]._fullInput,d.hasMakesDataTransform(Lt)&&(Lt=Je[ot]),pt[Lt.uid])continue;pt[Lt.uid]=1,be(Ce[ot]._fullInput,Lt,[],Ze)}return(Et.calc||Et.plot)&&(Et.fullReplot=!0),ht&&Et.nChanges&&Et.nChangesAnim&&(Et.anim=Et.nChanges===Et.nChangesAnim&&kt?"all":"some"),Et}(fe,De,Ge,tt,lt,It);if(J(fe)&&(vt.layoutReplot=!0),St.calc||vt.calc){fe.calcdata=void 0;for(var rt=Object.getOwnPropertyNames(Ye),et=0;et<rt.length;et++){var Tt=rt[et],Vt=Tt.substring(0,5);if(Vt==="xaxis"||Vt==="yaxis"){var Kt=Ye[Tt]._emptyCategories;Kt&&Kt()}}}else d.supplyDefaultsUpdateCalc(fe.calcdata,Ge);var Be=[];if(Ae&&(fe._transitionData={},d.createTransitionData(fe),Be.push(function(){return te.addFrames(fe,Ae)})),Ye.transition&&!Oe&&(St.anim||vt.anim))vt.ticks&&Be.push(l.doTicksRelayout),d.doCalcdata(fe),l.doAutoRangeAndConstraints(fe),Be.push(function(){return d.transitionFromReact(fe,St,vt,Ve)});else if(St.fullReplot||vt.layoutReplot||Oe)fe._fullLayout._skipDefaults=!0,Be.push(te._doPlot);else{for(var qe in vt.arrays){var Re=vt.arrays[qe];if(Re.length){var Xe=o.getComponentMethod(qe,"drawOne");if(Xe!==v.noop)for(var ke=0;ke<Re.length;ke++)Xe(fe,Re[ke]);else{var Le=o.getComponentMethod(qe,"draw");if(Le===v.noop)throw new Error("cannot draw components: "+qe);Le(fe)}}}Be.push(d.previousPromises),St.style&&Be.push(l.doTraceStyle),(St.colorbars||vt.colorbars)&&Be.push(l.doColorBars),vt.legend&&Be.push(l.doLegend),vt.layoutstyle&&Be.push(l.layoutStyles),vt.axrange&&N(Be),vt.ticks&&Be.push(l.doTicksRelayout),vt.modebar&&Be.push(l.doModeBar),vt.camera&&Be.push(l.doCamera),Be.push(k)}Be.push(d.rehover,d.redrag),(Pe=v.syncOrAsync(Be,fe))&&Pe.then||(Pe=Promise.resolve(fe))}else Pe=te.newPlot(fe,me,Te,_e);return Pe.then(function(){return fe.emit("plotly_react",{data:me,layout:Te}),fe})},te.redraw=function(fe){if(fe=v.getGraphDiv(fe),!v.isPlotDiv(fe))throw new Error("This element is not a Plotly plot: "+fe);return x.cleanData(fe.data),x.cleanLayout(fe.layout),fe.calcdata=void 0,te._doPlot(fe).then(function(){return fe.emit("plotly_redraw"),fe})},te.relayout=$,te.restyle=H,te.setPlotConfig=function(fe){return v.extendFlat(p,fe)}
1215,te.update=re,te._guiRelayout=ne($),te._guiRestyle=ne(H),te._guiUpdate=ne(re),te._storeDirectGUIEdit=function(fe,me,Te){for(var _e in Te)K(_e,e(fe,_e).get(),Te[_e],me)}},{"../components/color":366,"../components/drawing":388,"../constants/xmlns_namespaces":480,"../lib":503,"../lib/events":492,"../lib/queue":519,"../plots/cartesian/axes":554,"../plots/cartesian/constants":561,"../plots/cartesian/graph_interact":564,"../plots/cartesian/select":575,"../plots/plots":619,"../registry":638,"./edit_types":536,"./helpers":537,"./manage_arrays":539,"./plot_config":541,"./plot_schema":542,"./subroutines":544,"@plotly/d3":58,"fast-isnumeric":190,"has-hover":228}],541:[function(y,ee,te){var g={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},m={};(function b(v,e){for(var n in v){var t=v[n];t.valType?e[n]=t.dflt:(e[n]||(e[n]={}),b(t,e[n]))}})(g,m),ee.exports={configAttributes:g,dfltConfig:m}},{}],542:[function(y,ee,te){var g=y("../registry"),m=y("../lib"),b=y("../plots/attributes"),v=y("../plots/layout_attributes"),e=y("../plots/frame_attributes"),n=y("../plots/animation_attributes"),t=y("./plot_config").configAttributes,o=y("./edit_types"),r=m.extendDeepAll,d=m.isPlainObject,c=m.isArrayOrTypedArray,i=m.nestedProperty,u=m.valObjectMeta,f=["_isSubplotObj","_isLinkedToArray","_arrayAttrRegexps","_deprecated"];function s(_,T,k){if(!_)return!1;if(_._isLinkedToArray){if(h(T[k]))k++;else if(k<T.length)return!1}for(;k<T.length;k++){var L=_[T[k]];if(!d(L)||(_=L,k===T.length-1))break;if(_._isLinkedToArray){if(!h(T[++k]))return!1}else if(_.valType==="info_array"){var A=T[++k];if(!h(A))return!1;var I=_.items;if(Array.isArray(I)){if(A>=I.length)return!1;if(_.dimensions===2){if(k++,T.length===k)return _;var P=T[k];if(!h(P))return!1;_=I[A][P]}else _=I[A]}else _=I}}return _}function h(_){return _===Math.round(_)&&_>=0}function p(){var _,T,k={};for(_ in r(k,v),g.subplotsRegistry)if((T=g.subplotsRegistry[_]).layoutAttributes)if(Array.isArray(T.attr))for(var L=0;L<T.attr.length;L++)l(k,T,T.attr[L]);else l(k,T,T.attr==="subplot"?T.name:T.attr);for(_ in g.componentsRegistry){var A=(T=g.componentsRegistry[_]).schema;if(A&&(A.subplots||A.layout)){var I=A.subplots;if(I&&I.xaxis&&!I.yaxis)for(var P in I.xaxis)delete k.yaxis[P]}else T.name==="colorscale"?r(k,T.layoutAttributes):T.layoutAttributes&&w(k,T.layoutAttributes,T.name)}return{layoutAttributes:x(k)}}function a(){var _={frames:r({},e)};return x(_),_.frames}function x(_){return function(T){te.crawl(T,function(k,L,A){te.isValObject(k)?k.arrayOk!==!0&&k.valType!=="data_array"||(A[L+"src"]={valType:"string",editType:"none"}):d(k)&&(k.role="object")})}(_),function(T){te.crawl(T,function(k,L,A){if(k){var I=k._isLinkedToArray;I&&(delete k._isLinkedToArray,A[L]={items:{}},A[L].items[I]=k,A[L].role="object")}})}(_),function(T){(function k(L){for(var A in L)if(d(L[A]))k(L[A]);else if(Array.isArray(L[A]))for(var I=0;I<L[A].length;I++)k(L[A][I]);else L[A]instanceof RegExp&&(L[A]=L[A].toString())})(T)}(_),_}function l(_,T,k){var L=i(_,k),A=r({},T.layoutAttributes);A._isSubplotObj=!0,L.set(A)}function w(_,T,k){var L=i(_,k);L.set(r(L.get()||{},T))}te.IS_SUBPLOT_OBJ="_isSubplotObj",te.IS_LINKED_TO_ARRAY="_isLinkedToArray",te.DEPRECATED="_deprecated",te.UNDERSCORE_ATTRS=f,te.get=function(){var _={};
1215g.allTypes.forEach(function(k){_[k]=function(L){var A,I;A=g.modules[L]._module,I=A.basePlotModule;var P={type:null},S=r({},b),E=r({},A.attributes);te.crawl(E,function(H,V,Z,K,q){i(S,q).set(void 0),H===void 0&&i(E,q).set(void 0)}),r(P,S),g.traceIs(L,"noOpacity")&&delete P.opacity,g.traceIs(L,"showLegend")||(delete P.showlegend,delete P.legendgroup),g.traceIs(L,"noHover")&&(delete P.hoverinfo,delete P.hoverlabel),A.selectPoints||delete P.selectedpoints,r(P,E),I.attributes&&r(P,I.attributes),P.type=L;var D={meta:A.meta||{},categories:A.categories||{},animatable:!!A.animatable,type:L,attributes:x(P)};if(A.layoutAttributes){var F={};r(F,A.layoutAttributes),D.layoutAttributes=x(F)}return A.animatable||te.crawl(D,function(H){te.isValObject(H)&&"anim"in H&&delete H.anim}),D}(k)});var T={};return Object.keys(g.transformsRegistry).forEach(function(k){T[k]=function(L){var A=g.transformsRegistry[L],I=r({},A.attributes);return Object.keys(g.componentsRegistry).forEach(function(P){var S=g.componentsRegistry[P];S.schema&&S.schema.transforms&&S.schema.transforms[L]&&Object.keys(S.schema.transforms[L]).forEach(function(E){w(I,S.schema.transforms[L][E],E)})}),{attributes:x(I)}}(k)}),{defs:{valObjects:u,metaKeys:f.concat(["description","role","editType","impliedEdits"]),editType:{traces:o.traces,layout:o.layout},impliedEdits:{}},traces:_,layout:p(),transforms:T,frames:a(),animation:x(n),config:x(t)}},te.crawl=function(_,T,k,L){var A=k||0;L=L||"",Object.keys(_).forEach(function(I){var P=_[I];if(f.indexOf(I)===-1){var S=(L?L+".":"")+I;T(P,I,_,A,S),te.isValObject(P)||d(P)&&I!=="impliedEdits"&&te.crawl(P,T,A+1,S)}})},te.isValObject=function(_){return _&&_.valType!==void 0},te.findArrayAttributes=function(_){var T,k,L=[],A=[],I=[];function P(H,V,Z,K){A=A.slice(0,K).concat([V]),I=I.slice(0,K).concat([H&&H._isLinkedToArray]),H&&(H.valType==="data_array"||H.arrayOk===!0)&&!(A[K-1]==="colorbar"&&(V==="ticktext"||V==="tickvals"))&&function q(W,$,R){var N=W[A[$]],U=R+A[$];if($===A.length-1)c(N)&&L.push(k+U);else if(I[$]){if(Array.isArray(N))for(var Q=0;Q<N.length;Q++)d(N[Q])&&q(N[Q],$+1,U+"["+Q+"].")}else d(N)&&q(N,$+1,U+".")}(T,0,"")}T=_,k="",te.crawl(b,P),_._module&&_._module.attributes&&te.crawl(_._module.attributes,P);var S=_.transforms;if(S)for(var E=0;E<S.length;E++){var D=S[E],F=D._module;F&&(k="transforms["+E+"].",T=D,te.crawl(F.attributes,P))}return L},te.getTraceValObject=function(_,T){var k,L,A=T[0],I=1;if(A==="transforms"){if(T.length===1)return b.transforms;var P=_.transforms;if(!Array.isArray(P)||!P.length)return!1;var S=T[1];if(!h(S)||S>=P.length)return!1;L=(k=(g.transformsRegistry[P[S].type]||{}).attributes)&&k[T[2]],I=3}else{var E=_._module;if(E||(E=(g.modules[_.type||b.type.dflt]||{})._module),!E)return!1;if(!(L=(k=E.attributes)&&k[A])){var D=E.basePlotModule;D&&D.attributes&&(L=D.attributes[A])}L||(L=b[A])}return s(L,T,I)},te.getLayoutValObject=function(_,T){return s(function(k,L){var A,I,P,S,E=k._basePlotModules;if(E){var D;for(A=0;A<E.length;A++){if((P=E[A]).attrRegex&&P.attrRegex.test(L)){if(P.layoutAttrOverrides)return P.layoutAttrOverrides;!D&&P.layoutAttributes&&(D=P.layoutAttributes)}var F=P.baseLayoutAttrOverrides;if(F&&L in F)return F[L]}if(D)return D}var H=k._modules;if(H){for(A=0;A<H.length;A++)if((S=H[A].layoutAttributes)&&L in S)return S[L]}for(I in g.componentsRegistry){if((P=g.componentsRegistry[I]).name==="colorscale"&&L.indexOf("coloraxis")===0)return P.layoutAttributes[L];if(!P.schema&&L===P.name)return P.layoutAttributes}return L in v&&v[L]}(_,T[0]),T,1)}},{"../lib":503,"../plots/animation_attributes":548,"../plots/attributes":550,"../plots/frame_attributes":586,"../plots/layout_attributes":610,"../registry":638,"./edit_types":536,"./plot_config":541}],543:[function(y,ee,te){var g=y("../lib"),m=y("../plots/attributes"),b={name:{valType:"string",editType:"none"}};function v(n){return n&&typeof n=="string"}function e(n){var t=n.length-1;return n.charAt(t)!=="s"&&g.warn("bad argument to arrayDefaultKey: "+n),n.substr(0,n.length-1)+"defaults"}b.templateitemname={valType:"string",editType:"calc"},te.templatedArray=function(n,t){return t._isLinkedToArray=n,t.name=b.name,t.templateitemname=b.templateitemname,t},te.traceTemplater=function(n){var t,o,r={};for(t in n)o=n[t],Array.isArray(o)&&o.length&&(r[t]=0);return{newTrace:function(d){var c={type:t=g.coerce(d,{},m,"type"),_template:null};if(t in r){o=n[t];var i=r[t]%o.length;r[t]++,c._template=o[i]}return c}}},te.newContainer=function(n,t,o){var r=n._template,d=r&&(r[t]||o&&r[o]);return g.isPlainObject(d)||(d=null),n[t]={_template:d}},te.arrayTemplater=function(n,t,o){var r=n._template,d=r&&r[e(t)],c=r&&r[t];Array.isArray(c)&&c.length||(c=[]);var i={};return{newItem:function(u){var f={name:u.name,_input:u},s=f.templateitemname=u.templateitemname;if(!v(s))return f._template=d,f;for(var h=0;h<c.length;h++){var p=c[h];if(p.name===s)return i[s]=1,f._template=p,f}return f[o]=u[o]||!1,f._template=!1,f},defaultItems:function(){for(var u=[],f=0;f<c.length;f++){var s=c[f],h=s.name;if(v(h)&&!i[h]){var p={_template:s,name:h,_input:{_templateitemname:h}};p.templateitemname=s.templateitemname,u.push(p),i[h]=1}}return u}}},te.arrayDefaultKey=e,te.arrayEditor=function(n,t,o){var r=(g.nestedProperty(n,t).get()||[]).length,d=o._index,c=d>=r&&(o._input||{})._templateitemname;c&&(d=r);var i,u=t+"["+d+"]";function f(){i={},c&&(i[u]={},i[u].templateitemname=c)}function s(p,a){c?g.nestedProperty(i[u],p).set(a):i[u+"."+p]=a}function h(){var p=i;return f(),p}return f(),{modifyBase:function(p,a){i[p]=a},modifyItem:s,getUpdateObj:h,applyUpdate:function(p,a){p&&s(p,a);var x=h();for(var l in x)g.nestedProperty(n,l).set(x[l])}}}},{"../lib":503,"../plots/attributes":550}],544:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../registry"),b=y("../plots/plots"),v=y("../lib"),e=y("../lib/clear_gl_canvase
1215s"),n=y("../components/color"),t=y("../components/drawing"),o=y("../components/titles"),r=y("../components/modebar"),d=y("../plots/cartesian/axes"),c=y("../constants/alignment"),i=y("../plots/cartesian/constraints"),u=i.enforce,f=i.clean,s=y("../plots/cartesian/autorange").doAutoRange;function h(T,k,L){for(var A=0;A<L.length;A++){var I=L[A][0],P=L[A][1];if(!(I[0]>=T[1]||I[1]<=T[0])&&P[0]<k[1]&&P[1]>k[0])return!0}return!1}function p(T){var k,L,A,I,P,S,E=T._fullLayout,D=E._size,F=D.p,H=d.list(T,"",!0);if(E._paperdiv.style({width:T._context.responsive&&E.autosize&&!T._context._hasZeroWidth&&!T.layout.width?"100%":E.width+"px",height:T._context.responsive&&E.autosize&&!T._context._hasZeroHeight&&!T.layout.height?"100%":E.height+"px"}).selectAll(".main-svg").call(t.setSize,E.width,E.height),T._context.setBackground(T,E.paper_bgcolor),te.drawMainTitle(T),r.manage(T),!E._has("cartesian"))return b.previousPromises(T);function V(Ye,tt,lt){var vt=Ye._lw/2;return Ye._id.charAt(0)==="x"?tt?lt==="top"?tt._offset-F-vt:tt._offset+tt._length+F+vt:D.t+D.h*(1-(Ye.position||0))+vt%1:tt?lt==="right"?tt._offset+tt._length+F+vt:tt._offset-F-vt:D.l+D.w*(Ye.position||0)+vt%1}for(k=0;k<H.length;k++){var Z=(I=H[k])._anchorAxis;I._linepositions={},I._lw=t.crispRound(T,I.linewidth,1),I._mainLinePosition=V(I,Z,I.side),I._mainMirrorPosition=I.mirror&&Z?V(I,Z,c.OPPOSITE_SIDE[I.side]):null}var K=[],q=[],W=[],$=n.opacity(E.paper_bgcolor)===1&&n.opacity(E.plot_bgcolor)===1&&E.paper_bgcolor===E.plot_bgcolor;for(L in E._plots)if((A=E._plots[L]).mainplot)A.bg&&A.bg.remove(),A.bg=void 0;else{var R=A.xaxis.domain,N=A.yaxis.domain,U=A.plotgroup;if(h(R,N,W)){var Q=U.node(),j=A.bg=v.ensureSingle(U,"rect","bg");Q.insertBefore(j.node(),Q.childNodes[0]),q.push(L)}else U.select("rect.bg").remove(),W.push([R,N]),$||(K.push(L),q.push(L))}var X,J,re,ne,se,oe,pe,ce,de,xe,we,be,Ee,fe=E._bgLayer.selectAll(".bg").data(K);for(fe.enter().append("rect").classed("bg",!0),fe.exit().remove(),fe.each(function(Ye){E._plots[Ye].bg=g.select(this)}),k=0;k<q.length;k++)A=E._plots[q[k]],P=A.xaxis,S=A.yaxis,A.bg&&P._offset!==void 0&&S._offset!==void 0&&A.bg.call(t.setRect,P._offset-F,S._offset-F,P._length+2*F,S._length+2*F).call(n.fill,E.plot_bgcolor).style("stroke-width",0);if(!E._hasOnlyLargeSploms)for(L in E._plots){A=E._plots[L],P=A.xaxis,S=A.yaxis;var me,Te,_e=A.clipId="clip"+E._uid+L+"plot",Ae=v.ensureSingleById(E._clips,"clipPath",_e,function(Ye){Ye.classed("plotclip",!0).append("rect")});A.clipRect=Ae.select("rect").attr({width:P._length,height:S._length}
1215),t.setTranslate(A.plot,P._offset,S._offset),A._hasClipOnAxisFalse?(me=null,Te=_e):(me=_e,Te=null),t.setClipUrl(A.plot,me,T),A.layerClipId=Te}function Pe(Ye){return"M"+X+","+Ye+"H"+J}function De(Ye){return"M"+P._offset+","+Ye+"h"+P._length}function Ve(Ye){return"M"+Ye+","+ce+"V"+pe}function Qe(Ye){return"M"+Ye+","+S._offset+"v"+S._length}function Oe(Ye,tt,lt){if(!Ye.showline||L!==Ye._mainSubplot)return"";if(!Ye._anchorAxis)return lt(Ye._mainLinePosition);var vt=tt(Ye._mainLinePosition);return Ye.mirror&&(vt+=tt(Ye._mainMirrorPosition)),vt}for(L in E._plots){A=E._plots[L],P=A.xaxis,S=A.yaxis;var Ue="M0,0";a(P,L)&&(se=l(P,"left",S,H),X=P._offset-(se?F+se:0),oe=l(P,"right",S,H),J=P._offset+P._length+(oe?F+oe:0),re=V(P,S,"bottom"),ne=V(P,S,"top"),!(Ee=!P._anchorAxis||L!==P._mainSubplot)||P.mirror!=="allticks"&&P.mirror!=="all"||(P._linepositions[L]=[re,ne]),Ue=Oe(P,Pe,De),Ee&&P.showline&&(P.mirror==="all"||P.mirror==="allticks")&&(Ue+=Pe(re)+Pe(ne)),A.xlines.style("stroke-width",P._lw+"px").call(n.stroke,P.showline?P.linecolor:"rgba(0,0,0,0)")),A.xlines.attr("d",Ue);var Ge="M0,0";a(S,L)&&(we=l(S,"bottom",P,H),pe=S._offset+S._length+(we?F:0),be=l(S,"top",P,H),ce=S._offset-(be?F:0),de=V(S,P,"left"),xe=V(S,P,"right"),!(Ee=!S._anchorAxis||L!==S._mainSubplot)||S.mirror!=="allticks"&&S.mirror!=="all"||(S._linepositions[L]=[de,xe]),Ge=Oe(S,Ve,Qe),Ee&&S.showline&&(S.mirror==="all"||S.mirror==="allticks")&&(Ge+=Ve(de)+Ve(xe)),A.ylines.style("stroke-width",S._lw+"px").call(n.stroke,S.showline?S.linecolor:"rgba(0,0,0,0)")),A.ylines.attr("d",Ge)}return d.makeClipPaths(T),b.previousPromises(T)}function a(T,k){return(T.ticks||T.showline)&&(k===T._mainSubplot||T.mirror==="all"||T.mirror==="allticks")}function x(T,k,L){if(!L.showline||!L._lw)return!1;if(L.mirror==="all"||L.mirror==="allticks")return!0;var A=L._anchorAxis;if(!A)return!1;var I=c.FROM_BL[k];return L.side===k?A.domain[I]===T.domain[I]:L.mirror&&A.domain[1-I]===T.domain[1-I]}function l(T,k,L,A){if(x(T,k,L))return L._lw;for(var I=0;I<A.length;I++){var P=A[I];if(P._mainAxis===L._mainAxis&&x(T,k,P))return P._lw}return 0}function w(T,k){var L=T.title,A=T._size,I=0;switch(k==="start"?I=L.pad.l:k==="end"&&(I=-L.pad.r),L.xref){case"paper":return A.l+A.w*L.x+I;case"container":default:return T.width*L.x+I}}function _(T,k){var L=T.title,A=T._size,I=0;if(k!=="0em"&&k?k===c.CAP_SHIFT+"em"&&(I=L.pad.t):I=-L.pad.b,L.y==="auto")return A.t/2;switch(L.yref){case"paper":return A.t+A.h-A.h*L.y+I;case"container":default:return T.height-T.height*L.y+I}}te.layoutStyles=function(T){return v.syncOrAsync([b.doAutoMargin,p],T)},te.drawMainTitle=function(T){var k=T._fullLayout,L=function(I){var P=I.title,S="middle";return v.isRightAnchor(P)?S="end":v.isLeftAnchor(P)&&(S="start"),S}(k),A=function(I){var P=I.title,S="0em";return v.isTopAnchor(P)?S=c.CAP_SHIFT+"em":v.isMiddleAnchor(P)&&(S=c.MID_SHIFT+"em"),S}(k);o.draw(T,"gtitle",{propContainer:k,propName:"title.text",placeholder:k._dfltTitle.plot,attributes:{x:w(k,L),y:_(k,A),"text-anchor":L,dy:A}})},te.doTraceStyle=function(T){var k,L=T.calcdata,A=[];for(k=0;k<L.length;k++){var I=L[k],P=I[0]||{},S=P.trace||{},E=S._module||{},D=E.arraysToCalcdata;D&&D(I,S);var F=E.editStyle;F&&A.push({fn:F,cd0:P})}if(A.length){for(k=0;k<A.length;k++){var H=A[k];H.fn(T,H.cd0)}e(T),te.redrawReglTraces(T)}return b.style(T),m.getComponentMethod("legend","draw")(T),b.previousPromises(T)},te.doColorBars=function(T){return m.getComponentMethod("colorbar","draw")(T),b.previousPromises(T)},te.layoutReplot=function(T){var k=T.layout;return T.layout=void 0,m.call("_doPlot",T,"",k)},te.doLegend=function(T){return m.getComponentMethod("legend","draw")(T),b.previousPromises(T)},te.doTicksRelayout=function(T){return d.draw(T,"redraw"),T._fullLayout._hasOnlyLargeSploms&&(m.subplotsRegistry.splom.updateGrid(T),e(T),te.redrawReglTraces(T)),te.drawMainTitle(T),b.previousPromises(T)},te.doModeBar=function(T){var k=T._fullLayout;r.manage(T);for(var L=0;L<k._basePlotModules.length;L++){var A=k._basePlotModules[L].updateFx;A&&A(T)}return b.previousPromises(T)},te.doCamera=function(T){for(var k=T._fullLayout,L=k._subplots.gl3d,A=0;A<L.length;A++){var I=k[L[A]];I._scene.setViewport(I)}},te.drawData=function(T){var k=T._fullLayout;e(T);for(var L=k._basePlotModules,A=0;A<L.length;A++)L[A].plot(T);return te.redrawReglTraces(T),b.style(T),m.getComponentMethod("shapes","draw")(T),m.getComponentMethod("annotations","draw")(T),m.getComponentMethod("images","draw")(T),k._replotting=!1,b.previousPromises(T)},te.redrawReglTraces=function(T){var k=T._fullLayout;if(k._has("regl")){var L,A,I=T._fullData,P=[],S=[];for(k._hasOnlyLargeSploms&&k._splomGrid.draw(),L=0;L<I.length;L++){var E=I[L];E.visible===!0&&E._length!==0&&(E.type==="splom"?k._splomScenes[E.uid].draw():E.type==="scattergl"?v.pushUnique(P,E.xaxis+E.yaxis):E.type==="scatterpolargl"&&v.pushUnique(S,E.subplot))}for(L=0;L<P.length;L++)(A=k._plots[P[L]])._scene&&A._scene.draw();for(L=0;L<S.length;L++)(A=k[S[L]]._subplot)._scene&&A._scene.draw()}},te.doAutoRangeAndConstraints=function(T){for(var k,L=d.list(T,"",!0),A={},I=0;I<L.length;I++)if(!A[(k=L[I])._id]){A[k._id]=1,f(T,k),s(T,k);var P=k._matchGroup;if(P)for(var S in P){var E=d.getFromId(T,S);s(T,E,k.range),A[S]=1}}u(T)},te.finalDraw=function(T){m.getComponentMethod("rangeslider","draw")(T),m.getComponentMethod("rangeselector","draw")(T)},te.drawMarginPushers=function(T){m.getComponentMethod("legend","draw")(T),m.getComponentMethod("rangeselector","draw")(T),m.getComponentMethod("sliders","draw")(T),m.getComponentMethod("updatemenus","draw")(T),m.getComponentMethod("colorbar","draw")(T)}},{"../components/color":366,"../components/drawing":388,"../components/modebar":429,"../components/titles":464,"../constants/alignment":471,"../lib":503,"../lib/clear_gl_canvase
1215s":487,"../plots/cartesian/autorange":553,"../plots/cartesian/axes":554,"../plots/cartesian/constraints":562,"../plots/plots":619,"../registry":638,"@plotly/d3":58}],545:[function(y,ee,te){var g=y("../lib"),m=g.isPlainObject,b=y("./plot_schema"),v=y("../plots/plots"),e=y("../plots/attributes"),n=y("./plot_template"),t=y("./plot_config").dfltConfig;function o(h,p){h=g.extendDeep({},h);var a,x,l=Object.keys(h).sort();function w(A,I,P){if(m(I)&&m(A))o(A,I);else if(Array.isArray(I)&&Array.isArray(A)){var S=n.arrayTemplater({_template:h},P);for(x=0;x<I.length;x++){var E=I[x],D=S.newItem(E)._template;D&&o(D,E)}var F=S.defaultItems();for(x=0;x<F.length;x++)I.push(F[x]._template);for(x=0;x<I.length;x++)delete I[x].templateitemname}}for(a=0;a<l.length;a++){var _=l[a],T=h[_];if(_ in p?w(T,p[_],_):p[_]=T,r(_)===_)for(var k in p){var L=r(k);k===L||L!==_||k in h||w(T,p[k],_)}}}function r(h){return h.replace(/[0-9]+$/,"")}function d(h,p,a,x,l){var w=l&&a(l);for(var _ in h){var T=h[_],k=u(h,_,x),L=u(h,_,l),A=a(L);if(!A){var I=r(_);I!==_&&(A=a(L=u(h,I,l)))}if((!w||w!==A)&&!(!A||A._noTemplating||A.valType==="data_array"||A.arrayOk&&Array.isArray(T)))if(!A.valType&&m(T))d(T,p,a,k,L);else if(A._isLinkedToArray&&Array.isArray(T))for(var P=!1,S=0,E={},D=0;D<T.length;D++){var F=T[D];if(m(F)){var H=F.name;if(H)E[H]||(d(F,p,a,u(T,S,k),u(T,S,L)),S++,E[H]=1);else if(!P){var V=u(h,n.arrayDefaultKey(_),x),Z=u(T,S,k);d(F,p,a,Z,u(T,S,L));var K=g.nestedProperty(p,Z);g.nestedProperty(p,V).set(K.get()),K.set(null),P=!0}}}else g.nestedProperty(p,k).set(T)}}function c(h,p){return b.getLayoutValObject(h,g.nestedProperty({},p).parts)}function i(h,p){return b.getTraceValObject(h,g.nestedProperty({},p).parts)}function u(h,p,a){return a?Array.isArray(h)?a+"["+p+"]":a+"."+p:p}function f(h){for(var p=0;p<h.length;p++)if(m(h[p]))return!0}function s(h){var p;switch(h.code){case"data":p="The template has no key data.";break;case"layout":p="The template has no key layout.";break;case"missing":p=h.path?"There are no templates for item "+h.path+" with name "+h.templateitemname:"There are no templates for trace "+h.index+", of type "+h.traceType+".";break;case"unused":p=h.path?"The template item at "+h.path+" was not used in constructing the plot.":h.dataCount?"Some of the templates of type "+h.traceType+" were not used. The template has "+h.templateCount+" traces, the data only has "+h.dataCount+" of this type.":"The template has "+h.templateCount+" traces of type "+h.traceType+" but there are none in the data.";break;case"reused":p="Some of the templates of type "+h.traceType+" were used more than once. The template has "+h.templateCount+" traces, the data has "+h.dataCount+" of this type."}return h.msg=p,h}te.makeTemplate=function(h){h=g.isPlainObject(h)?h:g.getGraphDiv(h),h=g.extendDeep({_context:t},{data:h.data,layout:h.layout}),v.supplyDefaults(h);var p=h.data||[],a=h.layout||{};a._basePlotModules=h._fullLayout._basePlotModules,a._modules=h._fullLayout._modules;var x={data:{},layout:{}};p.forEach(function(S){var E={};d(S,E,i.bind(null,S));var D=g.coerce(S,{},e,"type"),F=x.data[D];F||(F=x.data[D]=[]),F.push(E)}),d(a,x.layout,c.bind(null,a)),delete x.layout.template;var l=a.template;if(m(l)){var w,_,T,k,L,A,I=l.layout;m(I)&&o(I,x.layout);var P=l.data;if(m(P)){for(_ in x.data)if(T=P[_],Array.isArray(T)){for(A=(L=x.data[_]).length,k=T.length,w=0;w<A;w++)o(T[w%k],L[w]);for(w=A;w<k;w++)L.push(g.extendDeep({},T[w]))}for(_ in P)_ in x.data||(x.data[_]=g.extendDeep([],P[_]))}}return x},te.validateTemplate=function(h,p){var a=g.extendDeep({},{_context:t,data:h.data,layout:h.layout}),x=a.layout||{};m(p)||(p=x.template||{});var l=p.layout,w=p.data,_=[];a.layout=x,a.layout.template=p,v.supplyDefaults(a);var T=a._fullLayout,k=a._fullData,L={};if(m(l)?(function F(H,V){for(var Z in H)if(Z.charAt(0)!=="_"&&m(H[Z])){var K,q=r(Z),W=[];for(K=0;K<V.length;K++)W.push(u(H,Z,V[K])),q!==Z&&W.push(u(H,q,V[K]));for(K=0;K<W.length;K++)L[W[K]]=1;F(H[Z],W)}}(T,["layout"]),function F(H,V){for(var Z in H)if(Z.indexOf("defaults")===-1&&m(H[Z])){var K=u(H,Z,V);L[K]?F(H[Z],K):_.push({code:"unused",path:K})}}(l,"layout")):_.push({code:"layout"}),m(w)){for(var A,I={},P=0;P<k.length;P++){var S=k[P];I[A=S.type]=(I[A]||0)+1,S._fullInput._template||_.push({code:"missing",index:S._fullInput.index,traceType:A})}for(A in w){var E=w[A].length,D=I[A]||0;E>D?_.push({code:"unused",traceType:A,templateCount:E,dataCount:D}):D>E&&_.push({code:"reused",traceType:A,templateCount:E,dataCount:D})}}else _.push({code:"data"});if(function F(H,V){for(var Z in H)if(Z.charAt(0)!=="_"){var K=H[Z],q=u(H,Z,V);m(K)?(Array.isArray(H)&&K._template===!1&&K.templateitemname&&_.push({code:"missing",path:q,templateitemname:K.templateitemname}),F(K,q)):Array.isArray(K)&&f(K)&&F(K,q)}}({data:k,layout:T},""),_.length)return _.map(s)}},{"../lib":503,"../plots/attributes":550,"../plots/plots":619,"./plot_config":541,"./plot_schema":542,"./plot_template":543}],546:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("./plot_api"),b=y("../plots/plots"),v=y("../lib"),e=y("../snapshot/helpers"),n=y("../snapshot/tosvg"),t=y("../snapshot/svgtoimg"),o=y("../version").version,r={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1}
1215,setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};ee.exports=function(d,c){var i,u,f,s;function h(D){return!(D in c)||v.validate(c[D],r[D])}if(c=c||{},v.isPlainObject(d)?(i=d.data||[],u=d.layout||{},f=d.config||{},s={}):(d=v.getGraphDiv(d),i=v.extendDeep([],d.data),u=v.extendDeep({},d.layout),f=d._context,s=d._fullLayout||{}),!h("width")&&c.width!==null||!h("height")&&c.height!==null)throw new Error("Height and width should be pixel values.");if(!h("format"))throw new Error("Export format is not "+v.join2(r.format.values,", "," or ")+".");var p={};function a(D,F){return v.coerce(c,p,r,D,F)}var x=a("format"),l=a("width"),w=a("height"),_=a("scale"),T=a("setBackground"),k=a("imageDataOnly"),L=document.createElement("div");L.style.position="absolute",L.style.left="-5000px",document.body.appendChild(L);var A=v.extendFlat({},u);l?A.width=l:c.width===null&&g(s.width)&&(A.width=s.width),w?A.height=w:c.height===null&&g(s.height)&&(A.height=s.height);var I=v.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:T}),P=e.getRedrawFunc(L);function S(){return new Promise(function(D){setTimeout(D,e.getDelay(L._fullLayout))})}function E(){return new Promise(function(D,F){var H=n(L,x,_),V=L._fullLayout.width,Z=L._fullLayout.height;function K(){m.purge(L),document.body.removeChild(L)}if(x==="full-json"){var q=b.graphJson(L,!1,"keepdata","object",!0,!0);return q.version=o,q=JSON.stringify(q),K(),D(k?q:e.encodeJSON(q))}if(K(),x==="svg")return D(k?H:e.encodeSVG(H));var W=document.createElement("canvas");W.id=v.randstr(),t({format:x,width:V,height:Z,scale:_,canvas:W,svg:H,promise:!0}).then(D).catch(F)})}return new Promise(function(D,F){m.newPlot(L,i,A,I).then(P).then(S).then(E).then(function(H){D(function(V){return k?V.replace(e.IMAGE_URL_PREFIX,""):V}(H))}).catch(function(H){F(H)})})}},{"../lib":503,"../plots/plots":619,"../snapshot/helpers":642,"../snapshot/svgtoimg":644,"../snapshot/tosvg":646,"../version":1119,"./plot_api":540,"fast-isnumeric":190}],547:[function(y,ee,te){var g=y("../lib"),m=y("../plots/plots"),b=y("./plot_schema"),v=y("./plot_config").dfltConfig,e=g.isPlainObject,n=Array.isArray,t=g.isArrayOrTypedArray;function o(p,a,x,l,w,_){_=_||[];for(var T=Object.keys(p),k=0;k<T.length;k++){var L=T[k];if(L!=="transforms"){var A=_.slice();A.push(L);var I=p[L],P=a[L],S=f(x,L),E=(S||{}).valType,D=E==="info_array",F=E==="colorscale",H=(S||{}).items;if(u(x,L))if(e(I)&&e(P)&&E!=="any")o(I,P,S,l,w,A);else if(D&&n(I)){I.length>P.length&&l.push(i("unused",w,A.concat(P.length)));var V,Z,K,q,W,$=P.length,R=Array.isArray(H);if(R&&($=Math.min($,H.length)),S.dimensions===2)for(Z=0;Z<$;Z++)if(n(I[Z])){I[Z].length>P[Z].length&&l.push(i("unused",w,A.concat(Z,P[Z].length)));var N=P[Z].length;for(V=0;V<(R?Math.min(N,H[Z].length):N);V++)K=R?H[Z][V]:H,q=I[Z][V],W=P[Z][V],g.validate(q,K)?W!==q&&W!==+q&&l.push(i("dynamic",w,A.concat(Z,V),q,W)):l.push(i("value",w,A.concat(Z,V),q))}else l.push(i("array",w,A.concat(Z),I[Z]));else for(Z=0;Z<$;Z++)K=R?H[Z]:H,q=I[Z],W=P[Z],g.validate(q,K)?W!==q&&W!==+q&&l.push(i("dynamic",w,A.concat(Z),q,W)):l.push(i("value",w,A.concat(Z),q))}else if(S.items&&!D&&n(I)){var U,Q,j=H[Object.keys(H)[0]],X=[];for(U=0;U<P.length;U++){var J=P[U]._index||U;if((Q=A.slice()).push(J),e(I[J])&&e(P[U])){X.push(J);var re=I[J],ne=P[U];e(re)&&re.visible!==!1&&ne.visible===!1?l.push(i("invisible",w,Q)):o(re,ne,j,l,w,Q)}}for(U=0;U<I.length;U++)(Q=A.slice()).push(U),e(I[U])?X.indexOf(U)===-1&&l.push(i("unused",w,Q)):l.push(i("object",w,Q,I[U]))}else!e(I)&&e(P)?l.push(i("object",w,A,I)):t(I)||!t(P)||D||F?L in a?g.validate(I,S)?S.valType==="enumerated"&&(S.coerceNumber&&I!==+P||I!==P)&&l.push(i("dynamic",w,A,I,P)):l.push(i("value",w,A,I)):l.push(i("unused",w,A,I)):l.push(i("array",w,A,I));else l.push(i("schema",w,A))}}return l}function r(p,a){for(var x=p.layout.layoutAttributes,l=0;l<a.length;l++){var w=a[l],_=p.traces[w.type],T=_.layoutAttributes;T&&(w.subplot?g.extendFlat(x[_.attributes.subplot.dflt],T):g.extendFlat(x,T))}return x}ee.exports=function(p,a){p===void 0&&(p=[]),a===void 0&&(a={});var x,l,w=b.get(),_=[],T={_context:g.extendFlat({},v)};n(p)?(T.data=g.extendDeep([],p),x=p):(T.data=[],x=[],_.push(i("array","data"))),e(a)?(T.layout=g.extendDeep({},a),l=a):(T.layout={},l={},arguments.length>1&&_.push(i("object","layout"))),m.supplyDefaults(T);for(var k=T._fullData,L=x.length,A=0;A<L;A++){var I=x[A],P=["data",A];if(e(I)){var S=k[A],E=S.type,D=w.traces[E].attributes;D.type={valType:"enumerated",values:[E]},S.visible===!1&&I.visible!==!1&&_.push(i("invisible",P)),o(I,S,D,_,P);var F=I.transforms,H=S.transforms;if(F){n(F)||_.push(i("array",P,["transforms"])),P.push("transforms");for(var V=0;V<F.length;V++){var Z=["transforms",V],K=F[V].type;if(e(F[V])){var q=w.transforms[K]?w.transforms[K].attributes:{};q.type={valType:"enumerated",values:Object.keys(w.transforms)},o(F[V],H[V],q,_,P,Z)}else _.push(i("object",P,Z))}}}else _.push(i("object",P))}var W=T._fullLayout,$=r(w,k);return o(l,W,$,_,"layout"),_.length===0?void 0:_};var d={object:function(p,a){return(p==="layout"&&a===""?"The layout argument":p[0]==="data"&&a===""?"Trace "+p[1]+" in the data argument":c(p)+"key "+a)+" must be linked to an object c
1215ontainer"},array:function(p,a){return(p==="data"?"The data argument":c(p)+"key "+a)+" must be linked to an array container"},schema:function(p,a){return c(p)+"key "+a+" is not part of the schema"},unused:function(p,a,x){var l=e(x)?"container":"key";return c(p)+l+" "+a+" did not get coerced"},dynamic:function(p,a,x,l){return[c(p)+"key",a,"(set to '"+x+"')","got reset to","'"+l+"'","during defaults."].join(" ")},invisible:function(p,a){return(a?c(p)+"item "+a:"Trace "+p[1])+" got defaulted to be not visible"},value:function(p,a,x){return[c(p)+"key "+a,"is set to an invalid value ("+x+")"].join(" ")}};function c(p){return n(p)?"In data trace "+p[1]+", ":"In "+p+", "}function i(p,a,x,l,w){var _,T;x=x||"",n(a)?(_=a[0],T=a[1]):(_=a,T=null);var k=function(A){if(!n(A))return String(A);for(var I="",P=0;P<A.length;P++){var S=A[P];typeof S=="number"?I=I.substr(0,I.length-1)+"["+S+"]":I+=S,P<A.length-1&&(I+=".")}return I}(x),L=d[p](a,k,l,w);return g.log(L),{code:p,container:_,trace:T,path:x,astr:k,msg:L}}function u(p,a){var x=h(a),l=x.keyMinusId,w=x.id;return!!(l in p&&p[l]._isSubplotObj&&w)||a in p}function f(p,a){return a in p?p[a]:p[h(a).keyMinusId]}var s=g.counterRegex("([a-z]+)");function h(p){var a=p.match(s);return{keyMinusId:a&&a[1],id:a&&a[2]}}},{"../lib":503,"../plots/plots":619,"./plot_config":541,"./plot_schema":542}],548:[function(y,ee,te){ee.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},{}],549:[function(y,ee,te){var g=y("../lib"),m=y("../plot_api/plot_template");ee.exports=function(b,v,e){var n,t,o=e.name,r=e.inclusionAttr||"visible",d=v[o],c=g.isArrayOrTypedArray(b[o])?b[o]:[],i=v[o]=[],u=m.arrayTemplater(v,o,r);for(n=0;n<c.length;n++){var f=c[n];g.isPlainObject(f)?t=u.newItem(f):(t=u.newItem({}))[r]=!1,t._index=n,t[r]!==!1&&e.handleItemDefaults(f,t,v,e),i.push(t)}var s=u.defaultItems();for(n=0;n<s.length;n++)(t=s[n])._index=i.length,e.handleItemDefaults({},t,v,e,{}),i.push(t);if(g.isArrayOrTypedArray(d)){var h=Math.min(d.length,i.length);for(n=0;n<h;n++)g.relinkPrivateKeys(i[n],d[n])}return i}},{"../lib":503,"../plot_api/plot_template":543}],550:[function(y,ee,te){var g=y("./font_attributes"),m=y("../components/fx/attributes");ee.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:g({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:m.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},{"../components/fx/attributes":397,"./font_attributes":585}],551:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=m.dateTime2ms,v=m.incrementMonth,e=y("../../constants/numerical").ONEAVGMONTH;ee.exports=function(n,t,o,r){if(t.type!=="date")return{vals:r};var d=n[o+"periodalignment"];if(!d)return{vals:r};var c,i=n[o+"period"];
1215if(g(i)){if((i=+i)<=0)return{vals:r}}else if(typeof i=="string"&&i.charAt(0)==="M"){var u=+i.substring(1);if(!(u>0&&Math.round(u)===u))return{vals:r};c=u}for(var f=t.calendar,s=d==="start",h=d==="end",p=n[o+"period0"],a=b(p,f)||0,x=[],l=[],w=[],_=r.length,T=0;T<_;T++){var k,L,A,I=r[T];if(c){for(k=Math.round((I-a)/(c*e)),A=v(a,c*k,f);A>I;)A=v(A,-c,f);for(;A<=I;)A=v(A,c,f);L=v(A,-c,f)}else{for(A=a+(k=Math.round((I-a)/i))*i;A>I;)A-=i;for(;A<=I;)A+=i;L=A-i}x[T]=s?L:h?A:(L+A)/2,l[T]=L,w[T]=A}return{vals:x,starts:l,ends:w}}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],552:[function(y,ee,te){ee.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],553:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("../../lib"),v=y("../../constants/numerical").FP_SAFE,e=y("../../registry"),n=y("../../components/drawing"),t=y("./axis_ids"),o=t.getFromId,r=t.isLinked;function d(l,w){var _,T,k=[],L=l._fullLayout,A=i(L,w,0),I=i(L,w,1),P=u(l,w),S=P.min,E=P.max;if(S.length===0||E.length===0)return b.simpleMap(w.range,w.r2l);var D=S[0].val,F=E[0].val;for(_=1;_<S.length&&D===F;_++)D=Math.min(D,S[_].val);for(_=1;_<E.length&&D===F;_++)F=Math.max(F,E[_].val);var H=!1;if(w.range){var V=b.simpleMap(w.range,w.r2l);H=V[1]<V[0]}w.autorange==="reversed"&&(H=!0,w.autorange=!0);var Z,K,q,W,$,R,N=w.rangemode,U=N==="tozero",Q=N==="nonnegative",j=w._length,X=j/10,J=0;for(_=0;_<S.length;_++)for(Z=S[_],T=0;T<E.length;T++)(R=(K=E[T]).val-Z.val-c(w,Z.val,K.val))>0&&(($=j-A(Z)-I(K))>X?R/$>J&&(q=Z,W=K,J=R/$):R/j>J&&(q={val:Z.val,nopad:1},W={val:K.val,nopad:1},J=R/j));if(D===F){var re=D-1,ne=D+1;if(U)if(D===0)k=[0,1];else{var se=(D>0?E:S).reduce(function(pe,ce){return Math.max(pe,I(ce))},0),oe=D/(1-Math.min(.5,se/j));k=D>0?[0,oe]:[oe,0]}else k=Q?[Math.max(0,re),Math.max(1,ne)]:[re,ne]}else U?(q.val>=0&&(q={val:0,nopad:1}),W.val<=0&&(W={val:0,nopad:1})):Q&&(q.val-J*A(q)<0&&(q={val:0,nopad:1}),W.val<=0&&(W={val:1,nopad:1})),J=(W.val-q.val-c(w,Z.val,K.val))/(j-A(q)-I(W)),k=[q.val-J*A(q),W.val+J*I(W)];return H&&k.reverse(),b.simpleMap(k,w.l2r||Number)}function c(l,w,_){var T=0;if(l.rangebreaks)for(var k=l.locateBreaks(w,_),L=0;L<k.length;L++){var A=k[L];T+=A.max-A.min}return T}function i(l,w,_){var T=.05*w._length,k=w._anchorAxis||{};if((w.ticklabelposition||"").indexOf("inside")!==-1||(k.ticklabelposition||"").indexOf("inside")!==-1){var L=w.autorange==="reversed";if(!L){var A=b.simpleMap(w.range,w.r2l);L=A[1]<A[0]}L&&(_=!_)}var I=0;return r(l,w._id)||(I=function(P,S,E){var D=0,F=S._id.charAt(0)==="x";for(var H in P._plots){var V=P._plots[H];if(S._id===V.xaxis._id||S._id===V.yaxis._id){var Z=(F?V.yaxis:V.xaxis)||{};if((Z.ticklabelposition||"").indexOf("inside")!==-1&&(!E&&(Z.side==="left"||Z.side==="bottom")||E&&(Z.side==="top"||Z.side==="right"))){if(Z._vals){var K=b.deg2rad(Z._tickAngles[Z._id+"tick"]||0),q=Math.abs(Math.cos(K)),W=Math.abs(Math.sin(K));if(!Z._vals[0].bb){var $=Z._id+"tick";Z._selections[$].each(function(j){var X=g.select(this);X.select(".text-math-group").empty()&&(j.bb=n.bBox(X.node()))})}for(var R=0;R<Z._vals.length;R++){var N=Z._vals[R].bb;if(N){var U=6+N.width,Q=6+N.height;D=Math.max(D,F?Math.max(U*q,Q*W):Math.max(Q*q,U*W))}}}Z.ticks==="inside"&&Z.ticklabelposition==="inside"&&(D+=Z.ticklen||0)}}}return D}(l,w,_)),T=Math.max(I,T),w.constrain==="domain"&&w._inputDomain&&(T*=(w._inputDomain[1]-w._inputDomain[0])/(w.domain[1]-w.domain[0])),function(P){return P.nopad?0:P.pad+(P.extrapad?T:I)}}ee.exports={getAutoRange:d,makePadFn:i,doAutoRange:function(l,w,_){if(w.setScale(),w.autorange){w.range=_?_.slice():d(l,w),w._r=w.range.slice(),w._rl=b.simpleMap(w._r,w.r2l);var T=w._input,k={};k[w._attr+".range"]=w.range,k[w._attr+".autorange"]=w.autorange,e.call("_storeDirectGUIEdit",l.layout,l._fullLayout._preGUI,k),T.range=w.range.slice(),T.autorange=w.autorange}var L=w._anchorAxis;if(L&&L.rangeslider){var A=L.rangeslider[w._name];A&&A.rangemode==="auto"&&(A.range=d(l,w)),L._input.rangeslider[w._name]=b.extendFlat({},A)}},findExtremes:function(l,w,_){_||(_={}),l._m||l.setScale();var T,k,L,A,I,P,S,E,D,F=[],H=[],V=w.length,Z=_.padded||!1,K=_.tozero&&(l.type==="linear"||l.type==="-"),q=l.type==="log",W=!1,$=_.vpadLinearized||!1;function R(ne){if(Array.isArray(ne))return W=!0,function(oe){return Math.max(Number(ne[oe]||0),0)};var se=Math.max(Number(ne||0),0);return function(){return se}}var N=R((l._m>
vendor: 4,210 bytes, line 1215
12150?_.ppadplus:_.ppadminus)||_.ppad||0),U=R((l._m>0?_.ppadminus:_.ppadplus)||_.ppad||0),Q=R(_.vpadplus||_.vpad),j=R(_.vpadminus||_.vpad);if(!W){if(E=1/0,D=-1/0,q)for(T=0;T<V;T++)(k=w[T])<E&&k>0&&(E=k),k>D&&k<v&&(D=k);else for(T=0;T<V;T++)(k=w[T])<E&&k>-v&&(E=k),k>D&&k<v&&(D=k);w=[E,D],V=2}var X={tozero:K,extrapad:Z};function J(ne){L=w[ne],m(L)&&(P=N(ne),S=U(ne),$?(A=l.c2l(L)-j(ne),I=l.c2l(L)+Q(ne)):(E=L-j(ne),D=L+Q(ne),q&&E<D/10&&(E=D/10),A=l.c2l(E),I=l.c2l(D)),K&&(A=Math.min(0,A),I=Math.max(0,I)),p(A)&&f(F,A,S,X),p(I)&&s(H,I,P,X))}var re=Math.min(6,V);for(T=0;T<re;T++)J(T);for(T=V-1;T>=re;T--)J(T);return{min:F,max:H,opts:_}},concatExtremes:u};function u(l,w,_){var T,k,L,A=w._id,I=l._fullData,P=l._fullLayout,S=[],E=[];function D(K,q){for(T=0;T<q.length;T++){var W=K[q[T]],$=(W._extremes||{})[A];if(W.visible===!0&&$){for(k=0;k<$.min.length;k++)L=$.min[k],f(S,L.val,L.pad,{extrapad:L.extrapad});for(k=0;k<$.max.length;k++)L=$.max[k],s(E,L.val,L.pad,{extrapad:L.extrapad})}}}if(D(I,w._traceIndices),D(P.annotations||[],w._annIndices||[]),D(P.shapes||[],w._shapeIndices||[]),w._matchGroup&&!_){for(var F in w._matchGroup)if(F!==w._id){var H=o(l,F),V=u(l,H,!0),Z=w._length/H._length;for(k=0;k<V.min.length;k++)L=V.min[k],f(S,L.val,L.pad*Z,{extrapad:L.extrapad});for(k=0;k<V.max.length;k++)L=V.max[k],s(E,L.val,L.pad*Z,{extrapad:L.extrapad})}}return{min:S,max:E}}function f(l,w,_,T){h(l,w,_,T,a)}function s(l,w,_,T){h(l,w,_,T,x)}function h(l,w,_,T,k){for(var L=T.tozero,A=T.extrapad,I=!0,P=0;P<l.length&&I;P++){var S=l[P];if(k(S.val,w)&&S.pad>=_&&(S.extrapad||!A)){I=!1;break}k(w,S.val)&&S.pad<=_&&(A||!S.extrapad)&&(l.splice(P,1),P--)}if(I){var E=L&&w===0;l.push({val:w,pad:E?0:_,extrapad:!E&&A})}}function p(l){return m(l)&&Math.abs(l)<v}function a(l,w){return l<=w}function x(l,w){return l>=w}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../../registry":638,"./axis_ids":558,"@plotly/d3":58,"fast-isnumeric":190}],554:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("../../plots/plots"),v=y("../../registry"),e=y("../../lib"),n=e.strTranslate,t=y("../../lib/svg_text_utils"),o=y("../../components/titles"),r=y("../../components/color"),d=y("../../components/drawing"),c=y("./layout_attributes"),i=y("./clean_ticks"),u=y("../../constants/numerical"),f=u.ONEMAXYEAR,s=u.ONEAVGYEAR,h=u.ONEMINYEAR,p=u.ONEMAXQUARTER,a=u.ONEAVGQUARTER,x=u.ONEMINQUARTER,l=u.ONEMAXMONTH,w=u.ONEAVGMONTH,_=u.ONEMINMONTH,T=u.ONEWEEK,k=u.ONEDAY,L=k/2,A=u.ONEHOUR,I=u.ONEMIN,P=u.ONESEC,S=u.MINUS_SIGN,E=u.BADNUM,D={K:"zeroline"},F={K:"gridline",L:"path"},H={K:"tick",L:"path"},V={K:"tick",L:"text"},Z=y("../../constants/alignment"),K=Z.MID_SHIFT,q=Z.CAP_SHIFT,W=Z.LINE_SPACING,$=Z.OPPOSITE_SIDE,R=ee.exports={};R.setConvert=y("./set_convert");var N=y("./axis_autotype"),U=y("./axis_ids"),Q=U.idSort,j=U.isLinked;R.id2name=U.id2name,R.name2id=U.name2id,R.cleanId=U.cleanId,R.list=U.list,R.listIds=U.listIds,R.getFromId=U.getFromId,R.getFromTrace=U.getFromTrace;var X=y("./autorange");R.getAutoRange=X.getAutoRange,R.findExtremes=X.findExtremes;function J(Be){var qe=1e-4*(Be[1]-Be[0]);return[Be[0]-qe,Be[1]+qe]}R.coerceRef=function(Be,qe,Re,Xe,ke,Le){var Ie=Xe.charAt(Xe.length-1),Ce=Re._fullLayout._subplots[Ie+"axis"],Je=Xe+"ref",it={};return ke||(ke=Ce[0]||(typeof Le=="string"?Le:Le[0])),Le||(Le=ke),Ce=Ce.concat(Ce.map(function(ht){return ht+" domain"})),it[Je]={valType:"enumerated",values:Ce.concat(Le?typeof Le=="string"?[Le]:Le:[]),dflt:ke},e.coerce(Be,qe,it,Je)},R.getRefType=function(Be){return Be===void 0?Be:Be==="paper"?"paper":Be==="pixel"?"pixel":/( domain)$/.test(Be)?"domain":"range"},R.coercePosition=function(Be,qe,Re,Xe,ke,Le){var Ie,Ce;if(R.getRefType(Xe)!=="range")Ie=e.ensureNumber,Ce=Re(ke,Le);else{var Je=R.getFromId(qe,Xe);Ce=Re(ke,Le=Je.fraction2r(Le)),Ie=Je.cleanPos}Be[ke]=Ie(Ce)},R.cleanPosition=function(Be,qe,Re){return(Re==="paper"||Re==="pixel"?e.ensureNumber:R.getFromId(qe,Re).cleanPos)(Be)},R.redrawComponents=function(Be,qe){qe=qe||R.listIds(Be);var Re=Be._fullLayout;function Xe(ke,Le,Ie,Ce){for(var Je=v.getComponentMethod(ke,Le),it={},ht=0;ht<qe.length;ht++)for(var ut=Re[R.id2name(qe[ht])][Ie],kt=0;kt<ut.length;kt++){var ot=ut[kt];
1215if(!it[ot]&&(Je(Be,ot),it[ot]=1,Ce))return}}Xe("annotations","drawOne","_annIndices"),Xe("shapes","drawOne","_shapeIndices"),Xe("images","draw","_imgIndices",!0)};var re=R.getDataConversions=function(Be,qe,Re,Xe){var ke,Le=Re==="x"||Re==="y"||Re==="z"?Re:Xe;if(Array.isArray(Le)){if(ke={type:N(Xe,void 0,{autotypenumbers:Be._fullLayout.autotypenumbers}),_categories:[]},R.setConvert(ke),ke.type==="category")for(var Ie=0;Ie<Xe.length;Ie++)ke.d2c(Xe[Ie])}else ke=R.getFromTrace(Be,qe,Le);return ke?{d2c:ke.d2c,c2d:ke.c2d}:Le==="ids"?{d2c:se,c2d:se}:{d2c:ne,c2d:ne}};function ne(Be){return+Be}function se(Be){return String(Be)}function oe(Be){return+Be.substring(1)}R.getDataToCoordFunc=function(Be,qe,Re,Xe){return re(Be,qe,Re,Xe).d2c},R.counterLetter=function(Be){var qe=Be.charAt(0);return qe==="x"?"y":qe==="y"?"x":void 0},R.minDtick=function(Be,qe,Re,Xe){["log","category","multicategory"].indexOf(Be.type)===-1&&Xe?Be._minDtick===void 0?(Be._minDtick=qe,Be._forceTick0=Re):Be._minDtick&&((Be._minDtick/qe+1e-6)%1<2e-6&&((Re-Be._forceTick0)/qe%1+1.000001)%1<2e-6?(Be._minDtick=qe,Be._forceTick0=Re):((qe/Be._minDtick+1e-6)%1>2e-6||((Re-Be._forceTick0)/Be._minDtick%1+1.000001)%1>2e-6)&&(Be._minDtick=0)):Be._minDtick=0},R.saveRangeInitial=function(Be,qe){for(var Re=R.list(Be,"",!0),Xe=!1,ke=0;ke<Re.length;ke++){var Le=Re[ke],Ie=Le._rangeInitial===void 0,Ce=Ie||!(Le.range[0]===Le._rangeInitial[0]&&Le.range[1]===Le._rangeInitial[1]);(Ie&&Le.autorange===!1||qe&&Ce)&&(Le._rangeInitial=Le.range.slice(),Xe=!0)}return Xe},R.saveShowSpikeInitial=function(Be,qe){for(var Re=R.list(Be,"",!0),Xe=!1,ke="on",Le=0;Le<Re.length;Le++){var Ie=Re[Le],Ce=Ie._showSpikeInitial===void 0,Je=Ce||Ie.showspikes!==Ie._showspikes;(Ce||qe&&Je)&&(Ie._showSpikeInitial=Ie.showspikes,Xe=!0),ke!=="on"||Ie.showspikes||(ke="off")}return Be._fullLayout._cartesianSpikesEnabled=ke,Xe},R.autoBin=function(Be,qe,Re,Xe,ke,Le){var Ie,Ce=e.aggNums(Math.min,null,Be),Je=e.aggNums(Math.max,null,Be);if(qe.type==="category"||qe.type==="multicategory")return{start:Ce-.5,end:Je+.5,size:Math.max(1,Math.round(Le)||1),_dataSpan:Je-Ce};if(ke||(ke=qe.calendar),Ie=qe.type==="log"?{type:"linear",range:[Ce,Je]}:{type:qe.type,range:e.simpleMap([Ce,Je],qe.c2r,0,ke),calendar:ke}
1215,R.setConvert(Ie),Le=Le&&i.dtick(Le,Ie.type))Ie.dtick=Le,Ie.tick0=i.tick0(void 0,Ie.type,ke);else{var it;if(Re)it=(Je-Ce)/Re;else{var ht=e.distinctVals(Be),ut=Math.pow(10,Math.floor(Math.log(ht.minDiff)/Math.LN10)),kt=ut*e.roundUp(ht.minDiff/ut,[.9,1.9,4.9,9.9],!0);it=Math.max(kt,2*e.stdev(Be)/Math.pow(Be.length,Xe?.25:.4)),m(it)||(it=1)}R.autoTicks(Ie,it)}var ot,Lt=Ie.dtick,Et=R.tickIncrement(R.tickFirst(Ie),Lt,"reverse",ke);if(typeof Lt=="number")ot=(Et=function(Ze,pt,Ct,zt,Gt){var ze=0,st=0,yt=0,Dt=0;function jt(sr){return(1+100*(sr-Ze)/Ct.dtick)%100<2}for(var or=0;or<pt.length;or++)pt[or]%1==0?yt++:m(pt[or])||Dt++,jt(pt[or])&&ze++,jt(pt[or]+Ct.dtick/2)&&st++;var Ut=pt.length-Dt;if(yt===Ut&&Ct.type!=="date")Ct.dtick<1?Ze=zt-.5*Ct.dtick:(Ze-=.5)+Ct.dtick<zt&&(Ze+=Ct.dtick);else if(st<.1*Ut&&(ze>.3*Ut||jt(zt)||jt(Gt))){var Xt=Ct.dtick/2;Ze+=Ze+Xt<zt?Xt:-Xt}return Ze}(Et,Be,Ie,Ce,Je))+(1+Math.floor((Je-Et)/Lt))*Lt;else for(Ie.dtick.charAt(0)==="M"&&(Et=function(Ze,pt,Ct,zt,Gt){var ze=e.findExactDates(pt,Gt);if(ze.exactDays>.8){var st=Number(Ct.substr(1));ze.exactYears>.8&&st%12==0?Ze=R.tickIncrement(Ze,"M6","reverse")+1.5*k:ze.exactMonths>.8?Ze=R.tickIncrement(Ze,"M1","reverse")+15.5*k:Ze-=L;var yt=R.tickIncrement(Ze,Ct);if(yt<=zt)return yt}return Ze}(Et,Be,Lt,Ce,ke)),ot=Et,0;ot<=Je;)ot=R.tickIncrement(ot,Lt,!1,ke);return{start:qe.c2r(Et,0,ke),end:qe.c2r(ot,0,ke),size:Lt,_dataSpan:Je-Ce}},R.prepTicks=function(Be,qe){var Re=e.simpleMap(Be.range,Be.r2l,void 0,void 0,qe);if(Be._dtickInit=Be.dtick,Be._tick0Init=Be.tick0,Be.tickmode==="auto"||!Be.dtick){var Xe,ke=Be.nticks;ke||(Be.type==="category"||Be.type==="multicategory"?(Xe=Be.tickfont?e.bigFont(Be.tickfont.size||12):15,ke=Be._length/Xe):(Xe=Be._id.charAt(0)==="y"?40:80,ke=e.constrain(Be._length/Xe,4,9)+1),Be._name==="radialaxis"&&(ke*=2)),Be.tickmode==="array"&&(ke*=100),Be._roughDTick=Math.abs(Re[1]-Re[0])/ke,R.autoTicks(Be,Be._roughDTick),Be._minDtick>0&&Be.dtick<2*Be._minDtick&&(Be.dtick=Be._minDtick,Be.tick0=Be.l2r(Be._forceTick0))}Be.ticklabelmode==="period"&&function(Le){var Ie;function Ce(){return!(m(Le.dtick)||Le.dtick.charAt(0)!=="M")}var Je=Ce(),it=R.getTickFormat(Le);if(it){var ht=Le._dtickInit!==Le.dtick;/%[fLQsSMX]/.test(it)||(/%[HI]/.test(it)?(Ie=A,ht&&!Je&&Le.dtick<A&&(Le.dtick=A)):/%p/.test(it)?(Ie=L,ht&&!Je&&Le.dtick<L&&(Le.dtick=L)):/%[Aadejuwx]/.test(it)?(Ie=k,ht&&!Je&&Le.dtick<k&&(Le.dtick=k)):/%[UVW]/.test(it)?(Ie=T,ht&&!Je&&Le.dtick<T&&(Le.dtick=T)):/%[Bbm]/.test(it)?(Ie=w,ht&&(Je?oe(Le.dtick)<1:Le.dtick<_)&&(Le.dtick="M1")):/%[q]/.test(it)?(Ie=a,ht&&(Je?oe(Le.dtick)<3:Le.dtick<x)&&(Le.dtick="M3")):/%[Yy]/.test(it)&&(Ie=s,ht&&(Je?oe(Le.dtick)<12:Le.dtick<h)&&(Le.dtick="M12")))}(Je=Ce())&&Le.tick0===Le._dowTick0&&(Le.tick0=Le._rawTick0),Le._definedDelta=Ie}(Be),Be.tick0||(Be.tick0=Be.type==="date"?"2000-01-01":0),Be.type==="date"&&Be.dtick<.1&&(Be.dtick=.1),me(Be)},R.calcTicks=function(Be,qe){R.prepTicks(Be,qe);var Re=e.simpleMap(Be.range,Be.r2l,void 0,void 0,qe);if(Be.tickmode==="array")return function(lr){var hr=lr.tickvals,Or=lr.ticktext,dr=new Array(hr.length),Fr=J(e.simpleMap(lr.range,lr.r2l)),tn=Math.min(Fr[0],Fr[1]),rn=Math.max(Fr[0],Fr[1]),An=0;Array.isArray(Or)||(Or=[]);var Ln=lr.type==="category"?lr.d2l_noadd:lr.d2l;lr.type==="log"&&String(lr.dtick).charAt(0)!=="L"&&(lr.dtick="L"+Math.pow(10,Math.floor(Math.min(lr.range[0],lr.range[1]))-1));for(var _n=0;_n<hr.length;_n++){var Vr=Ln(hr[_n]);Vr>tn&&Vr<rn&&(Or[_n]===void 0?dr[An]=R.tickText(lr,Vr):dr[An]=Te(lr,Vr,String(Or[_n])),An++)}return An<hr.length&&dr.splice(An,hr.length-An),lr.rangebreaks&&(dr=dr.filter(function(Ir){return lr.maskBreaks(Ir.x)!==E})),dr}(Be);var Xe=J(Re),ke=Xe[0],Le=Xe[1],Ie=Re[1]<Re[0],Ce=Math.min(Re[0],Re[1]),Je=Math.max(Re[0],Re[1]),it=m(Be.dtick),ht=Be.type==="log"&&!(it||Be.dtick.charAt(0)==="L"),ut=Be.ticklabelmode==="period";if(Be._tmin=R.tickFirst(Be,qe),Be._tmin<ke!==Ie)return[];Be.type!=="category"&&Be.type!=="multicategory"||(Le=Ie?Math.max(-.5,Le):Math.min(Be._categories.length-.5,Le));var kt=Be._tmin;Be.rangebreaks&&Be._tick0Init!==Be.tick0&&(kt=Tt(kt,Be),Ie||(kt=R.tickIncrement(kt,Be.dtick,!Ie,Be.calendar))),ut&&(kt=R.tickIncrement(kt,Be.dtick,!Ie,Be.calendar));var ot,Lt=Be.ticklabelstep,Et=Math.max(1e3,Be._length||0),Ze=[],pt=null;
1215it?ot=Be.dtick:Be.type==="date"?typeof Be.dtick=="string"&&Be.dtick.charAt(0)==="M"&&(ot=w*Be.dtick.substring(1)):ot=Be._roughDTick;for(var Ct,zt,Gt=Math.round((Be.r2l(kt)-Be.r2l(Be.tick0))/ot)-1;Ie?kt>=Le:kt<=Le;kt=R.tickIncrement(kt,Be.dtick,Ie,Be.calendar)){if(Gt++,Be.rangebreaks&&!Ie){if(kt<ke)continue;if(Be.maskBreaks(kt)===E&&Tt(kt,Be)>=Je)break}if(Ze.length>Et||kt===pt)break;pt=kt;var ze=!1;ht&&kt!==(0|kt)&&(ze=!0);var st={minor:ze,value:kt};Lt>1&&Gt%Lt&&(st.skipLabel=!0),Ze.push(st)}if(ut&&function(lr,hr,Or){for(var dr=0;dr<lr.length;dr++){var Fr=lr[dr].value,tn=dr,rn=dr+1;dr<lr.length-1?(tn=dr,rn=dr+1):dr>0?(tn=dr-1,rn=dr):(tn=dr,rn=dr);var An,Ln=lr[tn].value,_n=lr[rn].value,Vr=Math.abs(_n-Ln),Ir=Or||Vr,xr=0;Ir>=h?xr=Vr>=h&&Vr<=f?Vr:s:Or===a&&Ir>=x?xr=Vr>=x&&Vr<=p?Vr:a:Ir>=_?xr=Vr>=_&&Vr<=l?Vr:w:Or===T&&Ir>=T?xr=T:Ir>=k?xr=k:Or===L&&Ir>=L?xr=L:Or===A&&Ir>=A&&(xr=A),xr>=Vr&&(xr=Vr,An=!0);var Nr=Fr+xr;if(hr.rangebreaks&&xr>0){for(var en=0,Qr=0;Qr<84;Qr++){var yn=(Qr+.5)/84;hr.maskBreaks(Fr*(1-yn)+yn*Nr)!==E&&en++}(xr*=en/84)||(lr[dr].drop=!0),An&&Vr>T&&(xr=Vr)}(xr>0||dr===0)&&(lr[dr].periodX=Fr+xr/2)}}(Ze,Be,Be._definedDelta),Be.rangebreaks){var yt=Be._id.charAt(0)==="y",Dt=1;Be.tickmode==="auto"&&(Dt=Be.tickfont?Be.tickfont.size:12);var jt=NaN;for(Ct=Ze.length-1;Ct>-1;Ct--)if(Ze[Ct].drop)Ze.splice(Ct,1);else{Ze[Ct].value=Tt(Ze[Ct].value,Be);var or=Be.c2p(Ze[Ct].value);(yt?jt>or-Dt:jt<or+Dt)?Ze.splice(Ie?Ct+1:Ct,1):jt=or}}et(Be)&&Math.abs(Re[1]-Re[0])===360&&Ze.pop(),Be._tmax=(Ze[Ze.length-1]||{}).value,Be._prevDateHead="",Be._inCalcTicks=!0;var Ut,Xt,sr=function(lr){lr.text=" ",Be._prevDateHead=zt},vr=[];for(Ct=0;Ct<Ze.length;Ct++){var pr=Ze[Ct].minor,ar=Ze[Ct].value;zt=Be._prevDateHead,Ut=R.tickText(Be,ar,!1,pr),(Xt=Ze[Ct].periodX)!==void 0&&(Ut.periodX=Xt,(Xt>Je||Xt<Ce)&&(Xt>Je&&(Ut.periodX=Je),Xt<Ce&&(Ut.periodX=Ce),sr(Ut))),Ze[Ct].skipLabel&&sr(Ut),vr.push(Ut)}return Be._inCalcTicks=!1,vr};var pe=[2,5,10],ce=[1,2,3,6,12],de=[1,2,5,10,15,30],xe=[1,2,3,7,14],we=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],be=[-.301,0,.301,.699,1],Ee=[15,30,45,90,180];function fe(Be,qe,Re){return qe*e.roundUp(Be/qe,Re)}function me(Be){var qe=Be.dtick;if(Be._tickexponent=0,m(qe)||typeof qe=="string"||(qe=1),Be.type!=="category"&&Be.type!=="multicategory"||(Be._tickround=null),Be.type==="date"){var Re=Be.r2l(Be.tick0),Xe=Be.l2r(Re).replace(/(^-|i)/g,""),ke=Xe.length;if(String(qe).charAt(0)==="M")ke>10||Xe.substr(5)!=="01-01"?Be._tickround="d":Be._tickround=+qe.substr(1)%12==0?"y":"m";else if(qe>=k&&ke<=10||qe>=15*k)Be._tickround="d";else if(qe>=I&&ke<=16||qe>=A)Be._tickround="M";else if(qe>=P&&ke<=19||qe>=I)Be._tickround="S";else{var Le=Be.l2r(Re+qe).replace(/^-/,"").length;Be._tickround=Math.max(ke,Le)-20,Be._tickround<0&&(Be._tickround=4)}}else if(m(qe)||qe.charAt(0)==="L"){var Ie=Be.range.map(Be.r2d||Number);m(qe)||(qe=Number(qe.substr(1))),Be._tickround=2-Math.floor(Math.log(qe)/Math.LN10+.01);var Ce=Math.max(Math.abs(Ie[0]),Math.abs(Ie[1])),Je=Math.floor(Math.log(Ce)/Math.LN10+.01),it=Be.minexponent===void 0?3:Be.minexponent;Math.abs(Je)>it&&(Ae(Be.exponentformat)&&!Pe(Je)?Be._tickexponent=3*Math.round((Je-1)/3):Be._tickexponent=Je)}else Be._tickround=null}function Te(Be,qe,Re){var Xe=Be.tickfont||{};return{x:qe,dx:0,dy:0,text:Re||"",fontSize:Xe.size,font:Xe.family,fontColor:Xe.color}}R.autoTicks=function(Be,qe){var Re;function Xe(ht){return Math.pow(ht,Math.floor(Math.log(qe)/Math.LN10))}if(Be.type==="date"){Be.tick0=e.dateTick0(Be.calendar,0);var ke=2*qe;if(ke>s)qe/=s,Re=Xe(10),Be.dtick="M"+12*fe(qe,Re,pe);else if(ke>w)qe/=w,Be.dtick="M"+fe(qe,1,ce);else if(ke>k){Be.dtick=fe(qe,k,Be._hasDayOfWeekBreaks?[1,2,7,14]:xe);var Le=R.getTickFormat(Be),Ie=Be.ticklabelmode==="period";Ie&&(Be._rawTick0=Be.tick0),/%[uVW]/.test(Le)?Be.tick0=e.dateTick0(Be.calendar,2):Be.tick0=e.dateTick0(Be.calendar,1),Ie&&(Be._dowTick0=Be.tick0)}else ke>A?Be.dtick=fe(qe,A,ce):ke>I?Be.dtick=fe(qe,I,de):ke>P?Be.dtick=fe(qe,P,de):(Re=Xe(10),Be.dtick=fe(qe,Re,pe))}else if(Be.type==="log"){Be.tick0=0;var Ce=e.simpleMap(Be.range,Be.r2l);if(qe>.7)Be.dtick=Math.ceil(qe);else if(Math.abs(Ce[1]-Ce[0])<1){var Je=1.5*Math.abs((Ce[1]-Ce[0])/qe);qe=Math.abs(Math.pow(10,Ce[1])-Math.pow(10,Ce[0]))/Je,Re=Xe(10),Be.dtick="L"+fe(qe,Re,pe)}else Be.dtick=qe>.3?"D2":"D1"}else Be.type==="category"||Be.type==="multicategory"?(Be.tick0=0,Be.dtick=Math.ceil(Math.max(qe,1))):et(Be)?(Be.tick0=0,Re=1,Be.dtick=fe(qe,Re,Ee)):(Be.tick0=0,Re=Xe(10),Be.dtick=fe(qe,Re,pe));if(Be.dtick===0&&(Be.dtick=1),!m(Be.dtick)&&typeof Be.dtick!="string"){var it=Be.dtick;throw Be.dtick=1,"ax.dtick error: "+String(it)}},R.tickIncrement=function(Be,qe,Re,Xe){var ke=Re?-1:1;if(m(qe))return e.increment(Be,ke*qe);var Le=qe.charAt(0),Ie=ke*Number(qe.substr(1));if(Le==="M")return e.incrementMonth(Be,Ie,Xe);if(Le==="L")return Math.log(Math.pow(10,Be)+Ie)/Math.LN10;if(Le==="D"){var Ce=qe==="D2"?be:we,Je=Be+.01*ke,it=e.roundUp(e.mod(Je,1),Ce,Re);return Math.floor(Je)+Math.log(g.round(Math.pow(10,it),1))/Math.LN10}throw"unrecognized dtick "+String(qe)},R.tickFirst=function(Be,qe){var Re=Be.r2l||Number,Xe=e.simpleMap(Be.range,Re,void 0,void 0,qe),ke=Xe[1]<Xe[0],Le=ke?Math.floor:Math.ceil,Ie=J(Xe)[0],Ce=Be.dtick,Je=Re(Be.tick0);if(m(Ce)){var it=Le((Ie-Je)/Ce)*Ce+Je;return Be.type!=="category"&&Be.type!=="multicategory"||(it=e.constrain(it,0,Be._categories.length-1)),it}var ht=Ce.charAt(0),ut=Number(Ce.substr(1));if(ht==="M"){for(var kt,ot,Lt,Et=0,Ze=Je;Et<10;){if(((kt=R.tickIncrement(Ze,Ce,ke,Be.calendar))-Ie)*(Ze-Ie)<=0)return ke?Math.min(Ze,kt):Math.max(Ze,kt);ot=(Ie-(Ze+kt)/2)/(kt-Ze),Lt=ht+(Math.abs(Math.round(ot))||1)*ut,Ze=R.tickIncrement(Ze,Lt,ot<0?!ke
1215:ke,Be.calendar),Et++}return e.error("tickFirst did not converge",Be),Ze}if(ht==="L")return Math.log(Le((Math.pow(10,Ie)-Je)/ut)*ut+Je)/Math.LN10;if(ht==="D"){var pt=Ce==="D2"?be:we,Ct=e.roundUp(e.mod(Ie,1),pt,ke);return Math.floor(Ie)+Math.log(g.round(Math.pow(10,Ct),1))/Math.LN10}throw"unrecognized dtick "+String(Ce)},R.tickText=function(Be,qe,Re,Xe){var ke,Le=Te(Be,qe),Ie=Be.tickmode==="array",Ce=Re||Ie,Je=Be.type,it=Je==="category"?Be.d2l_noadd:Be.d2l;if(Ie&&Array.isArray(Be.ticktext)){var ht=e.simpleMap(Be.range,Be.r2l),ut=(Math.abs(ht[1]-ht[0])-(Be._lBreaks||0))/1e4;for(ke=0;ke<Be.ticktext.length&&!(Math.abs(qe-it(Be.tickvals[ke]))<ut);ke++);if(ke<Be.ticktext.length)return Le.text=String(Be.ticktext[ke]),Le}function kt(Et){if(Et===void 0)return!0;if(Re)return Et==="none";var Ze={first:Be._tmin,last:Be._tmax}[Et];return Et!=="all"&&qe!==Ze}var ot=Re?"never":Be.exponentformat!=="none"&&kt(Be.showexponent)?"hide":"";if(Je==="date"?function(Et,Ze,pt,Ct){var zt=Et._tickround,Gt=pt&&Et.hoverformat||R.getTickFormat(Et);Ct&&(zt=m(zt)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[zt]);var ze,st=e.formatDate(Ze.x,Gt,zt,Et._dateFormat,Et.calendar,Et._extraFormat),yt=st.indexOf(`
1216`);if(yt!==-1&&(ze=st.substr(yt+1),st=st.substr(0,yt)),Ct&&(st==="00:00:00"||st==="00:00"?(st=ze,ze=""):st.length===8&&(st=st.replace(/:00$/,""))),ze)if(pt)zt==="d"?st+=", "+ze:st=ze+(st?", "+st:"");else if(Et._inCalcTicks&&Et._prevDateHead===ze){var Dt=Vt(Et),jt=Et._trueSide||Et.side;(!Dt&&jt==="top"||Dt&&jt==="bottom")&&(st+="<br> ")}else Et._prevDateHead=ze,st+="<br>"+ze;Ze.text=st}(Be,Le,Re,Ce):Je==="log"?function(Et,Ze,pt,Ct,zt){var Gt=Et.dtick,ze=Ze.x,st=Et.tickformat,yt=typeof Gt=="string"&&Gt.charAt(0);if(zt==="never"&&(zt=""),Ct&&yt!=="L"&&(Gt="L3",yt="L"),st||yt==="L")Ze.text=De(Math.pow(10,ze),Et,zt,Ct);else if(m(Gt)||yt==="D"&&e.mod(ze+.01,1)<.1){var Dt=Math.round(ze),jt=Math.abs(Dt),or=Et.exponentformat;or==="power"||Ae(or)&&Pe(Dt)?(Ze.text=Dt===0?1:Dt===1?"10":"10<sup>"+(Dt>1?"":S)+jt+"</sup>",Ze.fontSize*=1.25):(or==="e"||or==="E")&&jt>2?Ze.text="1"+or+(Dt>0?"+":S)+jt:(Ze.text=De(Math.pow(10,ze),Et,"","fakehover"),Gt==="D1"&&Et._id.charAt(0)==="y"&&(Ze.dy-=Ze.fontSize/6))}else{if(yt!=="D")throw"unrecognized dtick "+String(Gt);Ze.text=String(Math.round(Math.pow(10,e.mod(ze,1)))),Ze.fontSize*=.75}if(Et.dtick==="D1"){var Ut=String(Ze.text).charAt(0);Ut!=="0"&&Ut!=="1"||(Et._id.charAt(0)==="y"?Ze.dx-=Ze.fontSize/4:(Ze.dy+=Ze.fontSize/2,Ze.dx+=(Et.range[1]>Et.range[0]?1:-1)*Ze.fontSize*(ze<0?.5:.25)))}}(Be,Le,0,Ce,ot):Je==="category"?function(Et,Ze){var pt=Et._categories[Math.round(Ze.x)];pt===void 0&&(pt=""),Ze.text=String(pt)}(Be,Le):Je==="multicategory"?function(Et,Ze,pt){var Ct=Math.round(Ze.x),zt=Et._categories[Ct]||[],Gt=zt[1]===void 0?"":String(zt[1]),ze=zt[0]===void 0?"":String(zt[0]);pt?Ze.text=ze+" - "+Gt:(Ze.text=Gt,Ze.text2=ze)}(Be,Le,Re):et(Be)?function(Et,Ze,pt,Ct,zt){if(Et.thetaunit!=="radians"||pt)Ze.text=De(Ze.x,Et,zt,Ct);else{var Gt=Ze.x/180;if(Gt===0)Ze.text="0";else{var ze=function(yt){function Dt(Xt,sr){return Math.abs(Xt-sr)<=1e-6}var jt=function(Xt){for(var sr=1;!Dt(Math.round(Xt*sr)/sr,Xt);)sr*=10;return sr}(yt),or=yt*jt,Ut=Math.abs(function Xt(sr,vr){return Dt(vr,0)?sr:Xt(vr,sr%vr)}(or,jt));return[Math.round(or/Ut),Math.round(jt/Ut)]}(Gt);if(ze[1]>=100)Ze.text=De(e.deg2rad(Ze.x),Et,zt,Ct);else{var st=Ze.x<0;ze[1]===1?ze[0]===1?Ze.text="π":Ze.text=ze[0]+"π":Ze.text=["<sup>",ze[0],"</sup>","⁄","<sub>",ze[1],"</sub>","π"].join(""),st&&(Ze.text=S+Ze.text)}}}}(Be,Le,Re,Ce,ot):function(Et,Ze,pt,Ct,zt){zt==="never"?zt="":Et.showexponent==="all"&&Math.abs(Ze.x/Et.dtick)<1e-6&&(zt="hide"),Ze.text=De(Ze.x,Et,zt,Ct)}(Be,Le,0,Ce,ot),Xe||(Be.tickprefix&&!kt(Be.showtickprefix)&&(Le.text=Be.tickprefix+Le.text),Be.ticksuffix&&!kt(Be.showticksuffix)&&(Le.text+=Be.ticksuffix)),Be.tickson==="boundaries"||Be.showdividers){var Lt=function(Et){var Ze=Be.l2p(Et);return Ze>=0&&Ze<=Be._length?Et:null};Le.xbnd=[Lt(Le.x-.5),Lt(Le.x+Be.dtick-.5)]}return Le},R.hoverLabelText=function(Be,qe,Re){Re&&(Be=e.extendFlat({},Be,{hoverformat:Re}));var Xe=Array.isArray(qe)?qe[0]:qe,ke=Array.isArray(qe)?qe[1]:void 0;if(ke!==void 0&&ke!==Xe)return R.hoverLabelText(Be,Xe,Re)+" - "+R.hoverLabelText(Be,ke,Re);var Le=Be.type==="log"&&Xe<=0,Ie=R.tickText(Be,Be.c2l(Le?-Xe:Xe),"hover").text;return Le?Xe===0?"0":S+Ie:Ie};var _e=["f","p","n","μ","m","","k","M","G","T"];function Ae(Be){return Be==="SI"||Be==="B"}function Pe(Be){return Be>14||Be<-15}function De(Be,qe,Re,Xe){var ke=Be<0,Le=qe._tickround,Ie=Re||qe.exponentformat||"B",Ce=qe._tickexponent,Je=R.getTickFormat(qe),it=qe.separatethousands;
1216if(Xe){var ht={exponentformat:Ie,minexponent:qe.minexponent,dtick:qe.showexponent==="none"?qe.dtick:m(Be)&&Math.abs(Be)||1,range:qe.showexponent==="none"?qe.range.map(qe.r2d):[0,Be||1]};me(ht),Le=(Number(ht._tickround)||0)+4,Ce=ht._tickexponent,qe.hoverformat&&(Je=qe.hoverformat)}if(Je)return qe._numFormat(Je)(Be).replace(/-/g,S);var ut,kt=Math.pow(10,-Le)/2;if(Ie==="none"&&(Ce=0),(Be=Math.abs(Be))<kt)Be="0",ke=!1;else{if(Be+=kt,Ce&&(Be*=Math.pow(10,-Ce),Le+=Ce),Le===0)Be=String(Math.floor(Be));else if(Le<0){Be=(Be=String(Math.round(Be))).substr(0,Be.length+Le);for(var ot=Le;ot<0;ot++)Be+="0"}else{var Lt=(Be=String(Be)).indexOf(".")+1;Lt&&(Be=Be.substr(0,Lt+Le).replace(/\.?0+$/,""))}Be=e.numSeparate(Be,qe._separators,it)}return Ce&&Ie!=="hide"&&(Ae(Ie)&&Pe(Ce)&&(Ie="power"),ut=Ce<0?S+-Ce:Ie!=="power"?"+"+Ce:String(Ce),Ie==="e"||Ie==="E"?Be+=Ie+ut:Ie==="power"?Be+="×10<sup>"+ut+"</sup>":Ie==="B"&&Ce===9?Be+="B":Ae(Ie)&&(Be+=_e[Ce/3+5])),ke?S+Be:Be}function Ve(Be,qe){for(var Re=[],Xe={},ke=0;ke<qe.length;ke++){var Le=qe[ke];Xe[Le.text2]?Xe[Le.text2].push(Le.x):Xe[Le.text2]=[Le.x]}for(var Ie in Xe)Re.push(Te(Be,e.interp(Xe[Ie],.5),Ie));return Re}function Qe(Be){return Be.periodX!==void 0?Be.periodX:Be.x}function Oe(Be){return[Be.text,Be.x,Be.axInfo,Be.font,Be.fontSize,Be.fontColor].join("_")}function Ue(Be){var qe=Be.title.font.size,Re=(Be.title.text.match(t.BR_TAG_ALL)||[]).length;return Be.title.hasOwnProperty("standoff")?Re?qe*(q+Re*W):qe*q:Re?qe*(Re+1)*W:qe}function Ge(Be,qe){var Re=Be.l2p(qe);return Re>1&&Re<Be._length-1}function Ye(Be){var qe=g.select(Be),Re=qe.select(".text-math-group");return Re.empty()?qe.select("text"):Re}function tt(Be){return Be._id+".automargin"}function lt(Be){return tt(Be)+".mirror"}function vt(Be){return Be._id+".rangeslider"}function It(Be,qe){for(var Re=0;Re<qe.length;Re++)Be.indexOf(qe[Re])===-1&&Be.push(qe[Re])}function St(Be,qe,Re){var Xe,ke,Le=[],Ie=[],Ce=Be.layout;for(Xe=0;Xe<qe.length;Xe++)Le.push(R.getFromId(Be,qe[Xe]));for(Xe=0;Xe<Re.length;Xe++)Ie.push(R.getFromId(Be,Re[Xe]));var Je=Object.keys(c),it=["anchor","domain","overlaying","position","side","tickangle","editType"],ht=["linear","log"];for(Xe=0;Xe<Je.length;Xe++){var ut=Je[Xe],kt=Le[0][ut],ot=Ie[0][ut],Lt=!0,Et=!1,Ze=!1;if(ut.charAt(0)!=="_"&&typeof kt!="function"&&it.indexOf(ut)===-1){for(ke=1;ke<Le.length&&Lt;ke++){var pt=Le[ke][ut];ut==="type"&&ht.indexOf(kt)!==-1&&ht.indexOf(pt)!==-1&&kt!==pt?Et=!0:pt!==kt&&(Lt=!1)}for(ke=1;ke<Ie.length&&Lt;ke++){var Ct=Ie[ke][ut];ut==="type"&&ht.indexOf(ot)!==-1&&ht.indexOf(Ct)!==-1&&ot!==Ct?Ze=!0:Ie[ke][ut]!==ot&&(Lt=!1)}Lt&&(Et&&(Ce[Le[0]._name].type="linear"),Ze&&(Ce[Ie[0]._name].type="linear"),rt(Ce,ut,Le,Ie,Be._fullLayout._dfltTitle))}}for(Xe=0;Xe<Be._fullLayout.annotations.length;Xe++){var zt=Be._fullLayout.annotations[Xe];qe.indexOf(zt.xref)!==-1&&Re.indexOf(zt.yref)!==-1&&e.swapAttrs(Ce.annotations[Xe],["?"])}}function rt(Be,qe,Re,Xe,ke){var Le,Ie=e.nestedProperty,Ce=Ie(Be[Re[0]._name],qe).get(),Je=Ie(Be[Xe[0]._name],qe).get();for(qe==="title"&&(Ce&&Ce.text===ke.x&&(Ce.text=ke.y),Je&&Je.text===ke.y&&(Je.text=ke.x)),Le=0;Le<Re.length;Le++)Ie(Be,Re[Le]._name+"."+qe).set(Je);for(Le=0;Le<Xe.length;Le++)Ie(Be,Xe[Le]._name+"."+qe).set(Ce)}function et(Be){return Be._id==="angularaxis"}function Tt(Be,qe){for(var Re=qe._rangebreaks.length,Xe=0;Xe<Re;Xe++){var ke=qe._rangebreaks[Xe];if(Be>=ke.min&&Be<ke.max)return ke.max}return Be}function Vt(Be){return(Be.ticklabelposition||"").indexOf("inside")!==-1}function Kt(Be,qe){Vt(Be._anchorAxis||{})&&Be._hideCounterAxisInsideTickLabels&&Be._hideCounterAxisInsideTickLabels(qe)}R.getTickFormat=function(Be){var qe,Re,Xe,ke,Le,Ie,Ce,Je;function it(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*w}function ht(kt,ot){var Lt=["L","D"];if(typeof kt==typeof ot){if(typeof kt=="number")return kt-ot;var Et=Lt.indexOf(kt.charAt(0)),Ze=Lt.indexOf(ot.charAt(0));return Et===Ze?Number(kt.replace(/(L|D)/g,""))-Number(ot.replace(/(L|D)/g,"")):Et-Ze}return typeof kt=="number"?1:-1}function ut(kt,ot){var Lt=ot[0]===null,Et=ot[1]===null,Ze=ht(kt,ot[0])>=0,pt=ht(kt,ot[1])<=0;return(Lt||Ze)&&(Et||pt)}if(Be.tickformatstops&&Be.tickformatstops.length>0)switch(Be.type){case"date":case"linear":for(qe=0;qe<Be.tickformatstops.length;qe++)if((Xe=Be.tickformatstops[qe]).enabled&&(ke=Be.dtick,Le=Xe.dtickrange,Ie=void 0,Ce=void 0,Je=void 0,Ie=it||function(kt){return kt},Ce=Le[0],Je=Le[1],(!Ce&&typeof Ce!="number"||Ie(Ce)<=Ie(ke))&&(!Je&&typeof Je!="number"||Ie(Je)>=Ie(ke)))){Re=Xe;break}break;case"log":for(qe=0;qe<Be.tickformatstops.length;qe++)if((Xe=Be.tickformatstops[qe]).enabled&&ut(Be.dtick,Xe.dtickrange)){Re=Xe;break}}return Re?Re.value:Be.tickformat},R.getSubplots=function(Be,qe){var Re=Be._fullLayout._subplots,Xe=Re.cartesian.concat(Re.gl2d||[]),ke=qe?R.findSubplotsWithAxis(Xe,qe):Xe;
1216return ke.sort(function(Le,Ie){var Ce=Le.substr(1).split("y"),Je=Ie.substr(1).split("y");return Ce[0]===Je[0]?+Ce[1]-+Je[1]:+Ce[0]-+Je[0]}),ke},R.findSubplotsWithAxis=function(Be,qe){for(var Re=new RegExp(qe._id.charAt(0)==="x"?"^"+qe._id+"y":qe._id+"$"),Xe=[],ke=0;ke<Be.length;ke++){var Le=Be[ke];Re.test(Le)&&Xe.push(Le)}return Xe},R.makeClipPaths=function(Be){var qe=Be._fullLayout;if(!qe._hasOnlyLargeSploms){var Re,Xe,ke={_offset:0,_length:qe.width,_id:""},Le={_offset:0,_length:qe.height,_id:""},Ie=R.list(Be,"x",!0),Ce=R.list(Be,"y",!0),Je=[];for(Re=0;Re<Ie.length;Re++)for(Je.push({x:Ie[Re],y:Le}),Xe=0;Xe<Ce.length;Xe++)Re===0&&Je.push({x:ke,y:Ce[Xe]}),Je.push({x:Ie[Re],y:Ce[Xe]});var it=qe._clips.selectAll(".axesclip").data(Je,function(ht){return ht.x._id+ht.y._id});it.enter().append("clipPath").classed("axesclip",!0).attr("id",function(ht){return"clip"+qe._uid+ht.x._id+ht.y._id}).append("rect"),it.exit().remove(),it.each(function(ht){g.select(this).select("rect").attr({x:ht.x._offset||0,y:ht.y._offset||0,width:ht.x._length||1,height:ht.y._length||1})})}},R.draw=function(Be,qe,Re){var Xe=Be._fullLayout;qe==="redraw"&&Xe._paper.selectAll("g.subplot").each(function(Le){var Ie=Le[0],Ce=Xe._plots[Ie];if(Ce){var Je=Ce.xaxis,it=Ce.yaxis;Ce.xaxislayer.selectAll("."+Je._id+"tick").remove(),Ce.yaxislayer.selectAll("."+it._id+"tick").remove(),Ce.xaxislayer.selectAll("."+Je._id+"tick2").remove(),Ce.yaxislayer.selectAll("."+it._id+"tick2").remove(),Ce.xaxislayer.selectAll("."+Je._id+"divider").remove(),Ce.yaxislayer.selectAll("."+it._id+"divider").remove(),Ce.gridlayer&&Ce.gridlayer.selectAll("path").remove(),Ce.zerolinelayer&&Ce.zerolinelayer.selectAll("path").remove(),Xe._infolayer.select(".g-"+Je._id+"title").remove(),Xe._infolayer.select(".g-"+it._id+"title").remove()}});var ke=qe&&qe!=="redraw"?qe:R.listIds(Be);return e.syncOrAsync(ke.map(function(Le){return function(){if(Le){var Ie=R.getFromId(Be,Le),Ce=R.drawOne(Be,Ie,Re);return Ie._r=Ie.range.slice(),Ie._rl=e.simpleMap(Ie._r,Ie.r2l),Ce}}}))},R.drawOne=function(Be,qe,Re){var Xe,ke,Le;Re=Re||{},qe.setScale();var Ie=Be._fullLayout,Ce=qe._id,Je=Ce.charAt(0),it=R.counterLetter(Ce),ht=Ie._plots[qe._mainSubplot];if(ht){var ut=ht[Je+"axislayer"],kt=qe._mainLinePosition,ot=qe._mainMirrorPosition,Lt=qe._vals=R.calcTicks(qe),Et=[qe.mirror,kt,ot].join("_");for(Xe=0;Xe<Lt.length;Xe++)Lt[Xe].axInfo=Et;qe._selections={},qe._tickAngles&&(qe._prevTickAngles=qe._tickAngles),qe._tickAngles={},qe._depth=null;var Ze={};if(qe.visible){var pt,Ct,zt=R.makeTransTickFn(qe),Gt=R.makeTransTickLabelFn(qe),ze=qe.ticks==="inside",st=qe.ticks==="outside";if(qe.tickson==="boundaries"){var yt=function(Ir,xr){var Nr,en=[],Qr=function(yn,un){var $r=yn.xbnd[un];$r!==null&&en.push(e.extendFlat({},yn,{x:$r}))};if(xr.length){for(Nr=0;Nr<xr.length;Nr++)Qr(xr[Nr],0);Qr(xr[Nr-1],1)}return en}(0,Lt);Ct=R.clipEnds(qe,yt),pt=ze?Ct:yt}else Ct=R.clipEnds(qe,Lt),pt=ze&&qe.ticklabelmode!=="period"?Ct:Lt;var Dt=qe._gridVals=Ct,jt=function(Ir,xr){var Nr,en,Qr=[],yn=xr.length&&xr[xr.length-1].x<xr[0].x,un=function(In,Qt){var Pt=In.xbnd[Qt];Pt!==null&&Qr.push(e.extendFlat({},In,{x:Pt}))};if(Ir.showdividers&&xr.length){for(Nr=0;Nr<xr.length;Nr++){var $r=xr[Nr];$r.text2!==en&&un($r,yn?1:0),en=$r.text2}un(xr[Nr-1],yn?0:1)}return Qr}(qe,Lt);if(!Ie._hasOnlyLargeSploms){var or=qe._subplotsWith,Ut={};for(Xe=0;Xe<or.length;Xe++){ke=or[Xe];var Xt=(Le=Ie._plots[ke])[it+"axis"],sr=Xt._mainAxis._id;if(!Ut[sr]){Ut[sr]=1;var vr=Je==="x"?"M0,"+Xt._offset+"v"+Xt._length:"M"+Xt._offset+",0h"+Xt._length;R.drawGrid(Be,qe,{vals:Dt,counterAxis:Xt,layer:Le.gridlayer.select("."+Ce),path:vr,transFn:zt}),R.drawZeroLine(Be,qe,{counterAxis:Xt,layer:Le.zerolinelayer,path:vr,transFn:zt})}}}var pr=R.getTickSigns(qe),ar=[];if(qe.ticks){var lr,hr,Or,dr=R.makeTickPath(qe,kt,pr[2]);if(qe._anchorAxis&&qe.mirror&&qe.mirror!==!0?(lr=R.makeTickPath(qe,ot,pr[3]),hr=dr+lr):(lr="",hr=dr),qe.showdividers&&st&&qe.tickson==="boundaries"){var Fr={};for(Xe=0;Xe<jt.length;Xe++)Fr[jt[Xe].x]=1;Or=function(Ir){return Fr[Ir.x]?lr:hr}}else Or=hr;R.drawTicks(Be,qe,{vals:pt,layer:ut,path:Or,transFn:zt}),qe.mirror==="allticks"&&(ar=Object.keys(qe._linepositions||{}))}for(Xe=0;Xe<ar.length;Xe++){ke=ar[Xe],Le=Ie._plots[ke];var tn=qe._linepositions[ke]||[],rn=R.makeTickPath(qe,tn[0],pr[0])+R.makeTickPath(qe,tn[1],pr[1]);R.drawTicks(Be,qe,{vals:pt,layer:Le[Je+"axislayer"],path:rn,transFn:zt})}var An=[];if(An.push(function(){return R.drawLabels(Be,qe,{vals:Lt,layer:ut,plotinfo:Le,transFn:Gt,labelFns:R.makeLabelFns(qe,kt)})}),qe.type==="multicategory"){var Ln={x:2,y:10}[Je];An.push(function(){var Ir={x:"height",y:"width"}[Je],xr=Vr()[Ir]+Ln+(qe._tickAngles[Ce+"tick"]?qe.tickfont.size*W:0);return R.drawLabels(Be,qe,{vals:Ve(qe,Lt),layer:ut,cls:Ce+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:zt,labelFns:R.makeLabelFns(qe,kt+xr*pr[4])})}),An.push(function(){return qe._depth=pr[4]*(Vr("tick2")[qe.side]-kt),function(Ir,xr,Nr){var en=xr._id+"divider",Qr=Nr.vals,yn=Nr.layer.selectAll("path."+en).data(Qr,Oe);yn.exit().remove(),yn.enter().insert("path",":first-child").classed(en,1).classed("crisp",1).call(r.stroke,xr.dividercolor).style("stroke-width",d.crispRound(Ir,xr.dividerwidth,1)+"px"),yn.attr("transform",Nr.transFn).attr("d",Nr.path)}(Be,qe,{vals:jt,layer:ut,path:R.makeTickPath(qe,kt,pr[4],qe._depth),transFn:zt})})}else qe.title.hasOwnProperty("standoff")&&An.push(function(){qe._depth=pr[4]*(Vr()[qe.side]-kt)});var _n=v.getComponentMethod("rangeslider","isVisible")(qe);return An.push(function(){var Ir,xr,Nr,en,Qr=qe.side.charAt(0),yn=$[qe.side].charAt(0),un=R.getPxPosition(Be,qe),$r=st?qe.ticklen:0;if((qe.automargin||_n)&&(qe.type==="multicategory"?Ir=Vr("tick2"):(Ir=Vr(),Je==="x"&&Qr==="b"&&(qe._depth=Math.max(Ir.width>0?Ir.bottom-un:0,$r)))),qe.automargin){xr={x:0,y:0,r:0,l:0,t:0,b:0};var In=[0,1];if(Je==="x"){if(Qr==="b"?xr[Qr]=qe._depth:(xr[Qr]=qe._depth=Math.max(Ir.width>0?un-Ir.top:0,$r),In.reverse()),Ir.width>0){var Qt=Ir.right-(qe._offset+qe._length);Qt>0&&(xr.xr=1,xr.r=Qt);var Pt=qe._offset-Ir.left;Pt>0&&(xr.xl=0,xr.l=Pt)}}else if(Qr==="l"?xr[Qr]=qe._depth=Math.max(Ir.height>0?un-Ir.left:0,$r):(xr[Qr]=qe._depth=Math.max(Ir.height>0?Ir.right-un:0,$r),In.reverse()),Ir.height>0){var Yt=Ir.bottom-(qe._offset+qe._length);Yt>0&&(xr.yb=0,xr.b=Yt);var cr=qe._offset-Ir.top;cr>0&&(xr.yt=1,xr.t=cr)}xr[it]=qe.anchor==="free"?qe.position:qe._anchorAxis.domain[In[0]],qe.title.text!==Ie._dfltTitle[Je]&&(xr[Qr]+=Ue(qe)+(qe.title.standoff||0)),qe.mirror&&qe.anchor!=="free"&&((Nr={x:0,y:0,r:0,l:0,t:0,b:0})[yn]=qe.linewidth,qe.mirror&&qe.mirror!==!0&&(Nr[yn]+=$r),qe.mirror===!0||qe.mirror==="ticks"?Nr[it]=qe._anchorAxis.domain[In[1]]:qe.mirror!=="all"&&qe.mirror!=="allticks"||(Nr[it]=[qe._counterDomainMin,qe._counterDomainMax][In[1]]))}_n&&(en=v.getComponentMethod("rangeslider","autoMarginOpts")(Be,qe)),b.autoMargin(Be,tt(qe),xr),b.autoMargin(Be,lt(qe),Nr),b.autoMargin(Be,vt(qe),en)}),Re.skipTitle||_n&&qe.side==="bottom"||An.push(function(){return function(Ir,xr){var Nr,en=Ir._fullLayout,Qr=xr._id,yn=Qr.charAt(0),un=xr.title.font.size;if(xr.title.hasOwnProperty("standoff"))Nr=xr._depth+xr.title.standoff+Ue(xr);else{var $r=Vt(xr);if(xr.type==="multicategory")Nr=xr._depth;else{var In=1.5*un;
1216$r&&(In=.5*un,xr.ticks==="outside"&&(In+=xr.ticklen)),Nr=10+In+(xr.linewidth?xr.linewidth-1:0)}$r||(Nr+=yn==="x"?xr.side==="top"?un*(xr.showticklabels?1:0):un*(xr.showticklabels?1.5:.5):xr.side==="right"?un*(xr.showticklabels?1:.5):un*(xr.showticklabels?.5:0))}var Qt,Pt,Yt,cr,wr=R.getPxPosition(Ir,xr);if(yn==="x"?(Pt=xr._offset+xr._length/2,Yt=xr.side==="top"?wr-Nr:wr+Nr):(Yt=xr._offset+xr._length/2,Pt=xr.side==="right"?wr+Nr:wr-Nr,Qt={rotate:"-90",offset:0}),xr.type!=="multicategory"){var qr=xr._selections[xr._id+"tick"];if(cr={selection:qr,side:xr.side},qr&&qr.node()&&qr.node().parentNode){var Ur=d.getTranslate(qr.node().parentNode);cr.offsetLeft=Ur.x,cr.offsetTop=Ur.y}xr.title.hasOwnProperty("standoff")&&(cr.pad=0)}return o.draw(Ir,Qr+"title",{propContainer:xr,propName:xr._name+".title.text",placeholder:en._dfltTitle[yn],avoid:cr,transform:Qt,attributes:{x:Pt,y:Yt,"text-anchor":"middle"}})}(Be,qe)}),e.syncOrAsync(An)}}function Vr(Ir){var xr=Ce+(Ir||"tick");return Ze[xr]||(Ze[xr]=function(Nr,en){var Qr,yn,un,$r;return Nr._selections[en].size()?(Qr=1/0,yn=-1/0,un=1/0,$r=-1/0,Nr._selections[en].each(function(){var In=Ye(this),Qt=d.bBox(In.node().parentNode);Qr=Math.min(Qr,Qt.top),yn=Math.max(yn,Qt.bottom),un=Math.min(un,Qt.left),$r=Math.max($r,Qt.right)})):(Qr=0,yn=0,un=0,$r=0),{top:Qr,bottom:yn,left:un,right:$r,height:yn-Qr,width:$r-un}}(qe,xr)),Ze[xr]}},R.getTickSigns=function(Be){var qe=Be._id.charAt(0),Re={x:"top",y:"right"}[qe],Xe=Be.side===Re?1:-1,ke=[-1,1,Xe,-Xe];return Be.ticks!=="inside"==(qe==="x")&&(ke=ke.map(function(Le){return-Le})),Be.side&&ke.push({l:-1,t:-1,r:1,b:1}[Be.side.charAt(0)]),ke},R.makeTransTickFn=function(Be){return Be._id.charAt(0)==="x"?function(qe){return n(Be._offset+Be.l2p(qe.x),0)}:function(qe){return n(0,Be._offset+Be.l2p(qe.x))}},R.makeTransTickLabelFn=function(Be){var qe=function(ke){var Le=ke.ticklabelposition||"",Ie=function(pt){return Le.indexOf(pt)!==-1},Ce=Ie("top"),Je=Ie("left"),it=Ie("right"),ht=Ie("bottom"),ut=Ie("inside"),kt=ht||Je||Ce||it;if(!kt&&!ut)return[0,0];var ot=ke.side,Lt=kt?(ke.tickwidth||0)/2:0,Et=3,Ze=ke.tickfont?ke.tickfont.size:12;return(ht||Ce)&&(Lt+=Ze*q,Et+=(ke.linewidth||0)/2),(Je||it)&&(Lt+=(ke.linewidth||0)/2,Et+=3),ut&&ot==="top"&&(Et-=Ze*(1-q)),(Je||Ce)&&(Lt=-Lt),ot!=="bottom"&&ot!=="right"||(Et=-Et),[kt?Lt:0,ut?Et:0]}(Be),Re=qe[0],Xe=qe[1];return Be._id.charAt(0)==="x"?function(ke){return n(Re+Be._offset+Be.l2p(Qe(ke)),Xe)}:function(ke){return n(Xe,Re+Be._offset+Be.l2p(Qe(ke)))}},R.makeTickPath=function(Be,qe,Re,Xe){Xe=Xe!==void 0?Xe:Be.ticklen;var ke=Be._id.charAt(0),Le=(Be.linewidth||1)/2;return ke==="x"?"M0,"+(qe+Le*Re)+"v"+Xe*Re:"M"+(qe+Le*Re)+",0h"+Xe*Re},R.makeLabelFns=function(Be,qe,Re){var Xe=Be.ticklabelposition||"",ke=function(Ut){return Xe.indexOf(Ut)!==-1},Le=ke("top"),Ie=ke("left"),Ce=ke("right"),Je=ke("bottom")||Ie||Le||Ce,it=ke("inside"),ht=Xe==="inside"&&Be.ticks==="inside"||!it&&Be.ticks==="outside"&&Be.tickson!=="boundaries",ut=0,kt=0,ot=ht?Be.ticklen:0;if(it?ot*=-1:Je&&(ot=0),ht&&(ut+=ot,Re)){var Lt=e.deg2rad(Re);ut=ot*Math.cos(Lt)+1,kt=ot*Math.sin(Lt)}Be.showticklabels&&(ht||Be.showline)&&(ut+=.2*Be.tickfont.size);var Et,Ze,pt,Ct,zt,Gt={labelStandoff:ut+=(Be.linewidth||1)/2*(it?-1:1),labelShift:kt},ze=0,st=Be.side,yt=Be._id.charAt(0),Dt=Be.tickangle;if(yt==="x")Ct=(zt=!it&&st==="bottom"||it&&st==="top")?1:-1,it&&(Ct*=-1),Et=kt*Ct,Ze=qe+ut*Ct,pt=zt?1:-.2,Math.abs(Dt)===90&&(it?pt+=K:pt=Dt===-90&&st==="bottom"?q:Dt===90&&st==="top"?K:.5,ze=K/2*(Dt/90)),Gt.xFn=function(Ut){return Ut.dx+Et+ze*Ut.fontSize},Gt.yFn=function(Ut){return Ut.dy+Ze+Ut.fontSize*pt},Gt.anchorFn=function(Ut,Xt){if(Je){if(Ie)return"end";if(Ce)return"start"}return m(Xt)&&Xt!==0&&Xt!==180?Xt*Ct<0!==it?"end":"start":"middle"},Gt.heightFn=function(Ut,Xt,sr){return Xt<-60||Xt>60?-.5*sr:Be.side==="top"!==it?-sr:0};else if(yt==="y"){if(Ct=(zt=!it&&st==="left"||it&&st==="right")?1:-1,it&&(Ct*=-1),Et=ut,Ze=kt*Ct,pt=0,it||Math.abs(Dt)!==90||(pt=Dt===-90&&st==="left"||Dt===90&&st==="right"?q:.5),it){var jt=m(Dt)?+Dt:0;if(jt!==0){var or=e.deg2rad(jt);ze=Math.abs(Math.sin(or))*q*Ct,pt=0}}Gt.xFn=function(Ut){return Ut.dx+qe-(Et+Ut.fontSize*pt)*Ct+ze*Ut.fontSize},Gt.yFn=function(Ut){return Ut.dy+Ze+Ut.fontSize*K},Gt.anchorFn=function(Ut,Xt){return m(Xt)&&Math.abs(Xt)===90?"middle":zt?"end":"start"},Gt.heightFn=function(Ut,Xt,sr){return Be.side==="right"&&(Xt*=-1),Xt<-30?-sr:Xt<30?-.5*sr:0}}return Gt},R.drawTicks=function(Be,qe,Re){Re=Re||{};var Xe=qe._id+"tick",ke=Re.vals;qe.ticklabelmode==="period"&&(ke=ke.slice()).shift();var Le=Re.layer.selectAll("path."+Xe).data(qe.ticks?ke:[],Oe);Le.exit().remove(),Le.enter().append("path").classed(Xe,1).classed("ticks",1).classed("crisp",Re.crisp!==!1).call(r.stroke,qe.tickcolor).style("stroke-width",d.crispRound(Be,qe.tickwidth,1)+"px").attr("d",Re.path).style("display",null),Kt(qe,[H]),Le.attr("transform",Re.transFn)}
1216,R.drawGrid=function(Be,qe,Re){Re=Re||{};var Xe=qe._id+"grid",ke=Re.vals,Le=Re.counterAxis;if(qe.showgrid===!1)ke=[];else if(Le&&R.shouldShowZeroLine(Be,qe,Le))for(var Ie=qe.tickmode==="array",Ce=0;Ce<ke.length;Ce++){var Je=ke[Ce].x;if(Ie?!Je:Math.abs(Je)<qe.dtick/100){if(ke=ke.slice(0,Ce).concat(ke.slice(Ce+1)),!Ie)break;Ce--}}var it=Re.layer.selectAll("path."+Xe).data(ke,Oe);it.exit().remove(),it.enter().append("path").classed(Xe,1).classed("crisp",Re.crisp!==!1),qe._gw=d.crispRound(Be,qe.gridwidth,1),it.attr("transform",Re.transFn).attr("d",Re.path).call(r.stroke,qe.gridcolor||"#ddd").style("stroke-width",qe._gw+"px").style("display",null),Kt(qe,[F]),typeof Re.path=="function"&&it.attr("d",Re.path)},R.drawZeroLine=function(Be,qe,Re){Re=Re||Re;var Xe=qe._id+"zl",ke=R.shouldShowZeroLine(Be,qe,Re.counterAxis),Le=Re.layer.selectAll("path."+Xe).data(ke?[{x:0,id:qe._id}]:[]);Le.exit().remove(),Le.enter().append("path").classed(Xe,1).classed("zl",1).classed("crisp",Re.crisp!==!1).each(function(){Re.layer.selectAll("path").sort(function(Ie,Ce){return Q(Ie.id,Ce.id)})}),Le.attr("transform",Re.transFn).attr("d",Re.path).call(r.stroke,qe.zerolinecolor||r.defaultLine).style("stroke-width",d.crispRound(Be,qe.zerolinewidth,qe._gw||1)+"px").style("display",null),Kt(qe,[D])},R.drawLabels=function(Be,qe,Re){Re=Re||{};var Xe=Be._fullLayout,ke=qe._id,Le=ke.charAt(0),Ie=Re.cls||ke+"tick",Ce=Re.vals,Je=Re.labelFns,it=Re.secondary?0:qe.tickangle,ht=(qe._prevTickAngles||{})[Ie],ut=Re.layer.selectAll("g."+Ie).data(qe.showticklabels?Ce:[],Oe),kt=[];function ot(Ct,zt){Ct.each(function(Gt){var ze=g.select(this),st=ze.select(".text-math-group"),yt=Je.anchorFn(Gt,zt),Dt=Re.transFn.call(ze.node(),Gt)+(m(zt)&&+zt!=0?" rotate("+zt+","+Je.xFn(Gt)+","+(Je.yFn(Gt)-Gt.fontSize/2)+")":""),jt=t.lineCount(ze),or=W*Gt.fontSize,Ut=Je.heightFn(Gt,m(zt)?+zt:0,(jt-1)*or);if(Ut&&(Dt+=n(0,Ut)),st.empty()){var Xt=ze.select("text");Xt.attr({transform:Dt,"text-anchor":yt}),Xt.style("opacity",1),qe._adjustTickLabelsOverflow&&qe._adjustTickLabelsOverflow()}else{var sr=d.bBox(st.node()).width*{end:-.5,start:.5}[yt];st.attr("transform",Dt+n(sr,0))}})}ut.enter().append("g").classed(Ie,1).append("text").attr("text-anchor","middle").each(function(Ct){var zt=g.select(this),Gt=Be._promises.length;zt.call(t.positionText,Je.xFn(Ct),Je.yFn(Ct)).call(d.font,Ct.font,Ct.fontSize,Ct.fontColor).text(Ct.text).call(t.convertToTspans,Be),Be._promises[Gt]?kt.push(Be._promises.pop().then(function(){ot(zt,it)})):ot(zt,it)}),Kt(qe,[V]),ut.exit().remove(),Re.repositionOnUpdate&&ut.each(function(Ct){g.select(this).select("text").call(t.positionText,Je.xFn(Ct),Je.yFn(Ct))}),qe._adjustTickLabelsOverflow=function(){var Ct=qe.ticklabeloverflow;if(Ct&&Ct!=="allow"){var zt=Ct.indexOf("hide")!==-1,Gt=qe._id.charAt(0)==="x",ze=0,st=Gt?Be._fullLayout.width:Be._fullLayout.height;if(Ct.indexOf("domain")!==-1){var yt=e.simpleMap(qe.range,qe.r2l);ze=qe.l2p(yt[0])+qe._offset,st=qe.l2p(yt[1])+qe._offset}var Dt=Math.min(ze,st),jt=Math.max(ze,st),or=qe.side,Ut=1/0,Xt=-1/0;for(var sr in ut.each(function(ar){var lr=g.select(this);if(lr.select(".text-math-group").empty()){var hr=d.bBox(lr.node()),Or=0;Gt?(hr.right>jt||hr.left<Dt)&&(Or=1):(hr.bottom>jt||hr.top+(qe.tickangle?0:ar.fontSize/4)<Dt)&&(Or=1);var dr=lr.select("text");Or?zt&&dr.style("opacity",0):(dr.style("opacity",1),Ut=or==="bottom"||or==="right"?Math.min(Ut,Gt?hr.top:hr.left):-1/0,Xt=or==="top"||or==="left"?Math.max(Xt,Gt?hr.bottom:hr.right):1/0)}}),Xe._plots){var vr=Xe._plots[sr];if(qe._id===vr.xaxis._id||qe._id===vr.yaxis._id){var pr=Gt?vr.yaxis:vr.xaxis;pr&&(pr["_visibleLabelMin_"+qe._id]=Ut,pr["_visibleLabelMax_"+qe._id]=Xt)}}}},qe._hideCounterAxisInsideTickLabels=function(Ct){var zt=qe._id.charAt(0)==="x",Gt=[];for(var ze in Xe._plots){var st=Xe._plots[ze];qe._id!==st.xaxis._id&&qe._id!==st.yaxis._id||Gt.push(zt?st.yaxis:st.xaxis)}Gt.forEach(function(yt,Dt){yt&&Vt(yt)&&(Ct||[D,F,H,V]).forEach(function(jt){var or=jt.K==="tick"&&jt.L==="text"&&qe.ticklabelmode==="period",Ut=Xe._plots[qe._mainSubplot];(jt.K===D.K?Ut.zerolinelayer.selectAll("."+qe._id+"zl"):jt.K===F.K?Ut.gridlayer.selectAll("."+qe._id):Ut[qe._id.charAt(0)+"axislayer"]).each(function(){var Xt=g.select(this);jt.L&&(Xt=Xt.selectAll(jt.L)),Xt.each(function(sr){var vr=qe.l2p(or?Qe(sr):sr.x)+qe._offset,pr=g.select(this);vr<qe["_visibleLabelMax_"+yt._id]&&vr>qe["_visibleLabelMin_"+yt._id]?pr.style("display","none"):jt.K!=="tick"||Dt||pr.style("display",null)})})})})},ot(ut,ht+1?ht:it);var Lt=null;qe._selections&&(qe._selections[Ie]=ut);var Et=[function(){return kt.length&&Promise.all(kt)}];qe.automargin&&Xe._redrawFromAutoMarginCount&&ht===90?(Lt=90,Et.push(function(){ot(ut,ht)})):Et.push(function(){if(ot(ut,it),Ce.length&&Le==="x"&&!m(it)&&(qe.type!=="log"||String(qe.dtick).charAt(0)!=="D")){Lt=0;var Ct,zt=0,Gt=[];if(ut.each(function(lr){zt=Math.max(zt,lr.fontSize);var hr=qe.l2p(lr.x),Or=Ye(this),dr=d.bBox(Or.node());Gt.push({top:0,bottom:10,height:10,left:hr-dr.width/2,right:hr+dr.width/2+2,width:dr.width+2})}),qe.tickson!=="boundaries"&&!qe.showdividers||Re.secondary){var ze=Ce.length,st=Math.abs((Ce[ze-1].x-Ce[0].x)*qe._m)/(ze-1),yt=qe.ticklabelposition||"",Dt=function(lr){return yt.indexOf(lr)!==-1},jt=Dt("top"),or=Dt("left"),Ut=Dt("right"),Xt=Dt("bottom")||or||jt||Ut?(qe.tickwidth||0)+6:0,sr=st<2.5*zt||qe.type==="multicategory"||qe._name==="realaxis";
1216for(Ct=0;Ct<Gt.length-1;Ct++)if(e.bBoxIntersect(Gt[Ct],Gt[Ct+1],Xt)){Lt=sr?90:30;break}}else{var vr=2;for(qe.ticks&&(vr+=qe.tickwidth/2),Ct=0;Ct<Gt.length;Ct++){var pr=Ce[Ct].xbnd,ar=Gt[Ct];if(pr[0]!==null&&ar.left-qe.l2p(pr[0])<vr||pr[1]!==null&&qe.l2p(pr[1])-ar.right<vr){Lt=90;break}}}Lt&&ot(ut,Lt)}}),qe._tickAngles&&Et.push(function(){qe._tickAngles[Ie]=Lt===null?m(it)?it:0:Lt});var Ze=qe._anchorAxis;Ze&&Ze.autorange&&Vt(qe)&&!j(Xe,qe._id)&&(Xe._insideTickLabelsAutorange||(Xe._insideTickLabelsAutorange={}),Xe._insideTickLabelsAutorange[Ze._name+".autorange"]=Ze.autorange,Et.push(function(){ut.each(function(Ct,zt){var Gt=Ye(this);Gt.select(".text-math-group").empty()&&(qe._vals[zt].bb=d.bBox(Gt.node()))})}));var pt=e.syncOrAsync(Et);return pt&&pt.then&&Be._promises.push(pt),pt},R.getPxPosition=function(Be,qe){var Re,Xe=Be._fullLayout._size,ke=qe._id.charAt(0),Le=qe.side;return qe.anchor!=="free"?Re=qe._anchorAxis:ke==="x"?Re={_offset:Xe.t+(1-(qe.position||0))*Xe.h,_length:0}:ke==="y"&&(Re={_offset:Xe.l+(qe.position||0)*Xe.w,_length:0}),Le==="top"||Le==="left"?Re._offset:Le==="bottom"||Le==="right"?Re._offset+Re._length:void 0},R.shouldShowZeroLine=function(Be,qe,Re){var Xe=e.simpleMap(qe.range,qe.r2l);return Xe[0]*Xe[1]<=0&&qe.zeroline&&(qe.type==="linear"||qe.type==="-")&&!(qe.rangebreaks&&qe.maskBreaks(0)===E)&&(Ge(qe,0)||!function(ke,Le,Ie,Ce){var Je=Ie._mainAxis;if(!Je)return;var it=ke._fullLayout,ht=Le._id.charAt(0),ut=R.counterLetter(Le._id),kt=Le._offset+(Math.abs(Ce[0])<Math.abs(Ce[1])==(ht==="x")?0:Le._length);function ot(Ct){if(!Ct.showline||!Ct.linewidth)return!1;var zt=Math.max((Ct.linewidth+Le.zerolinewidth)/2,1);function Gt(yt){return typeof yt=="number"&&Math.abs(yt-kt)<zt}if(Gt(Ct._mainLinePosition)||Gt(Ct._mainMirrorPosition))return!0;var ze=Ct._linepositions||{};for(var st in ze)if(Gt(ze[st][0])||Gt(ze[st][1]))return!0}var Lt=it._plots[Ie._mainSubplot];if(!(Lt.mainplotinfo||Lt).overlays.length)return ot(Ie);for(var Et=R.list(ke,ut),Ze=0;Ze<Et.length;Ze++){var pt=Et[Ze];if(pt._mainAxis===Je&&ot(pt))return!0}}(Be,qe,Re,Xe)||function(ke,Le){for(var Ie=ke._fullData,Ce=Le._mainSubplot,Je=Le._id.charAt(0),it=0;it<Ie.length;it++){var ht=Ie[it];if(ht.visible===!0&&ht.xaxis+ht.yaxis===Ce&&(v.traceIs(ht,"bar-like")&&ht.orientation==={x:"h",y:"v"}[Je]||ht.fill&&ht.fill.charAt(ht.fill.length-1)===Je))return!0}return!1}(Be,qe))},R.clipEnds=function(Be,qe){return qe.filter(function(Re){return Ge(Be,Re.x)})},R.allowAutoMargin=function(Be){for(var qe=R.list(Be,"",!0),Re=0;Re<qe.length;Re++){var Xe=qe[Re];Xe.automargin&&(b.allowAutoMargin(Be,tt(Xe)),Xe.mirror&&b.allowAutoMargin(Be,lt(Xe))),v.getComponentMethod("rangeslider","isVisible")(Xe)&&b.allowAutoMargin(Be,vt(Xe))}},R.swap=function(Be,qe){for(var Re=function(ke,Le){var Ie,Ce,Je=[];for(Ie=0;Ie<Le.length;Ie++){var it=[],ht=ke._fullData[Le[Ie]].xaxis,ut=ke._fullData[Le[Ie]].yaxis;if(ht&&ut){for(Ce=0;Ce<Je.length;Ce++)Je[Ce].x.indexOf(ht)===-1&&Je[Ce].y.indexOf(ut)===-1||it.push(Ce);if(it.length){var kt,ot=Je[it[0]];if(it.length>1)for(Ce=1;Ce<it.length;Ce++)kt=Je[it[Ce]],It(ot.x,kt.x),It(ot.y,kt.y);It(ot.x,[ht]),It(ot.y,[ut])}else Je.push({x:[ht],y:[ut]})}}return Je}(Be,qe),Xe=0;Xe<Re.length;Xe++)St(Be,Re[Xe].x,Re[Xe].y)}},{"../../components/color":366,"../../components/drawing":388,"../../components/titles":464,"../../constants/alignment":471,"../../constants/numerical":479,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"./autorange":553,"./axis_autotype":555,"./axis_ids":558,"./clean_ticks":560,"./layout_attributes":569,"./set_convert":576,"@plotly/d3":58,"fast-isnumeric":190}],555:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../constants/numerical").BADNUM,v=m.isArrayOrTypedArray,e=m.isDateTime,n=m.cleanNumber,t=Math.round;function o(d,c){return c?g(d):typeof d=="number"}function r(d){return Math.max(1,(d-1)/1e3)}ee.exports=function(d,c,i){var u=d,f=i.noMultiCategory;if(v(u)&&!u.length)return"-";if(!f&&function(x){return v(x[0])&&v(x[1])}(u))return"multicategory";if(f&&Array.isArray(u[0])){for(var s=[],h=0;h<u.length;h++)if(v(u[h]))for(var p=0;p<u[h].length;p++)s.push(u[h][p]);u=s}if(function(x,l){for(var w=x.length,_=r(w),T=0,k=0,L={},A=0;A<w;A+=_){var I=t(A),P=x[I],S=String(P);L[S]||(L[S]=1,e(P,l)&&T++,g(P)&&k++)}return T>2*k}(u,c))return"date";var a=i.autotypenumbers!=="strict";return function(x,l){for(var w=x.length,_=r(w),T=0,k=0,L={},A=0;A<w;A+=_){var I=t(A),P=x[I],S=String(P);if(!L[S]){L[S]=1;var E=typeof P;E==="boolean"?k++:(l?n(P)!==b:E==="number")?T++:E==="string"&&k++}}return k>2*T}(u,a)?"category":function(x,l){for(var w=x.length,_=0;_<w;_++)if(o(x[_],l))return!0;return!1}(u,a)?"linear":"-"}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],556:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../registry"),b=y("../../lib"),v=y("../array_container_defaults"),e=y("./layout_attributes"),n=y("./tick_value_defaults"),t=y("./tick_mark_defaults"),o=y("./tick_label_defaults"),r=y("./prefix_suffix_defaults"),d=y("./category_order_defaults"),c=y("./line_grid_defaults"),i=y("./set_convert"),u=y("./constants").WEEKDAY_PATTERN,f=y("./constants").HOUR_PATTERN;function s(a,x,l){function w(S,E){return b.coerce(a,x,e.rangebreaks,S,E)}if(w("enabled")){var _=w("bounds");if(_&&_.length>=2){var T,k,L="";if(_.length===2){for(T=0;T<2;T++)if(k=p(_[T])){L=u;break}}var A=w("pattern",L);if(A===u)for(T=0;T<2;T++)(k=p(_[T]))&&(x.bounds[T]=_[T]=k-1);if(A)for(T=0;T<2;T++)switch(k=_[T],A){case u:if(!g(k)||(k=+k)!==Math.floor(k)||k<0||k>=7)return void(x.enabled=!1);x.bounds[T]=_[T]=k;break;case f:if(!g(k)||(k=+k)<0||k>24)return void(x.enabled=!1);x.bounds[T]=_[T]=k}if(l.autorange===!1){var I=l.range;
1216if(I[0]<I[1]){if(_[0]<I[0]&&_[1]>I[1])return void(x.enabled=!1)}else if(_[0]>I[0]&&_[1]<I[1])return void(x.enabled=!1)}}else{var P=w("values");if(!P||!P.length)return void(x.enabled=!1);w("dvalue")}}}ee.exports=function(a,x,l,w,_){var T,k=w.letter,L=w.font||{},A=w.splomStash||{},I=l("visible",!w.visibleDflt),P=x._template||{},S=x.type||P.type||"-";S==="date"&&(m.getComponentMethod("calendars","handleDefaults")(a,x,"calendar",w.calendar),w.noTicklabelmode||(T=l("ticklabelmode")));var E="";w.noTicklabelposition&&S!=="multicategory"||(E=b.coerce(a,x,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:T==="period"?["outside","inside"]:k==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),w.noTicklabeloverflow||l("ticklabeloverflow",E.indexOf("inside")!==-1?"hide past domain":S==="category"||S==="multicategory"?"allow":"hide past div"),i(x,_);var D=!x.isValidRange(a.range);D&&w.reverseDflt&&(D="reversed"),!l("autorange",D)||S!=="linear"&&S!=="-"||l("rangemode"),l("range"),x.cleanRange(),d(a,x,l,w),S==="category"||w.noHover||l("hoverformat");var F=l("color"),H=F!==e.color.dflt?F:L.color,V=A.label||_._dfltTitle[k];if(r(a,x,l,S,w),!I)return x;l("title.text",V),b.coerceFont(l,"title.font",{family:L.family,size:b.bigFont(L.size),color:H}),n(a,x,l,S),o(a,x,l,S,w),t(a,x,l,w),c(a,x,l,{dfltColor:F,bgColor:w.bgColor,showGrid:w.showGrid,attributes:e}),(x.showline||x.ticks)&&l("mirror"),w.automargin&&l("automargin");var Z,K=S==="multicategory";if(w.noTickson||S!=="category"&&!K||!x.ticks&&!x.showgrid||(K&&(Z="boundaries"),l("tickson",Z)==="boundaries"&&delete x.ticklabelposition),K&&l("showdividers")&&(l("dividercolor"),l("dividerwidth")),S==="date")if(v(a,x,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:s}),x.rangebreaks.length){for(var q=0;q<x.rangebreaks.length;q++)if(x.rangebreaks[q].pattern===u){x._hasDayOfWeekBreaks=!0;break}if(i(x,_),_._has("scattergl")||_._has("splom"))for(var W=0;W<w.data.length;W++){var $=w.data[W];$.type!=="scattergl"&&$.type!=="splom"||($.visible=!1,b.warn($.type+" traces do not work on axes with rangebreaks. Setting trace "+$.index+" to `visible: false`."))}}else delete x.rangebreaks;return x};var h={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};
1216function p(a){if(typeof a=="string")return h[a.substr(0,3).toLowerCase()]}},{"../../lib":503,"../../registry":638,"../array_container_defaults":549,"./category_order_defaults":559,"./constants":561,"./layout_attributes":569,"./line_grid_defaults":571,"./prefix_suffix_defaults":573,"./set_convert":576,"./tick_label_defaults":578,"./tick_mark_defaults":579,"./tick_value_defaults":580,"fast-isnumeric":190}],557:[function(y,ee,te){var g=y("../../constants/docs"),m=g.FORMAT_LINK,b=g.DATE_FORMAT_LINK;function v(n,t){return["Sets the "+n+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+m+"."].join(" ")}function e(n,t){return v(n,t)+[" And for dates see: "+b+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}ee.exports={axisHoverFormat:function(n,t){return{valType:"string",dflt:"",editType:"none",description:(t?v:e)("hover text",n)+["By default the values are formatted using "+(t?"generic number format":"`"+n+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:v,descriptionWithDates:e}},{"../../constants/docs":474}],558:[function(y,ee,te){var g=y("../../registry"),m=y("./constants");function b(v,e){if(e&&e.length){for(var n=0;n<e.length;n++)if(e[n][v])return!0}return!1}te.id2name=function(v){if(typeof v=="string"&&v.match(m.AX_ID_PATTERN)){var e=v.split(" ")[0].substr(1);return e==="1"&&(e=""),v.charAt(0)+"axis"+e}},te.name2id=function(v){if(v.match(m.AX_NAME_PATTERN)){var e=v.substr(5);return e==="1"&&(e=""),v.charAt(0)+e}},te.cleanId=function(v,e,n){var t=/( domain)$/.test(v);if(typeof v=="string"&&v.match(m.AX_ID_PATTERN)&&(!e||v.charAt(0)===e)&&(!t||n)){var o=v.split(" ")[0].substr(1).replace(/^0+/,"");return o==="1"&&(o=""),v.charAt(0)+o+(t&&n?" domain":"")}},te.list=function(v,e,n){var t=v._fullLayout;if(!t)return[];var o,r=te.listIds(v,e),d=new Array(r.length);for(o=0;o<r.length;o++){var c=r[o];d[o]=t[c.charAt(0)+"axis"+c.substr(1)]}if(!n){var i=t._subplots.gl3d||[];for(o=0;o<i.length;o++){var u=t[i[o]];e?d.push(u[e+"axis"]):d.push(u.xaxis,u.yaxis,u.zaxis)}}return d},te.listIds=function(v,e){var n=v._fullLayout;if(!n)return[];var t=n._subplots;return e?t[e+"axis"]:t.xaxis.concat(t.yaxis)},te.getFromId=function(v,e,n){var t=v._fullLayout;return e=e===void 0||typeof e!="string"?e:e.replace(" domain",""),n==="x"?e=e.replace(/y[0-9]*/,""):n==="y"&&(e=e.replace(/x[0-9]*/,"")),t[te.id2name(e)]},te.getFromTrace=function(v,e,n){var t=v._fullLayout,o=null;if(g.traceIs(e,"gl3d")){var r=e.scene;r.substr(0,5)==="scene"&&(o=t[r][n+"axis"])}else o=te.getFromId(v,e[n+"axis"]||n);return o},te.idSort=function(v,e){var n=v.charAt(0),t=e.charAt(0);return n!==t?n>t?1:-1:+(v.substr(1)||1)-+(e.substr(1)||1)},te.ref2id=function(v){return!!/^[xyz]/.test(v)&&v.split(" ")[0]},te.isLinked=function(v,e){return b(e,v._axisMatchGroups)||b(e,v._axisConstraintGroups)}},{"../../registry":638,"./constants":561}],559:[function(y,ee,te){ee.exports=function(g,m,b,v){if(m.type==="category"){var e,n=g.categoryarray,t=Array.isArray(n)&&n.length>0;t&&(e="array");var o,r=b("categoryorder",e);r==="array"&&(o=b("categoryarray")),t||r!=="array"||(r=m.categoryorder="trace"),r==="trace"?m._initialCategories=[]:r==="array"?m._initialCategories=o.slice():(o=function(d,c){var i,u,f,s=c.dataAttr||d._id.charAt(0),h={};if(c.axData)i=c.axData;else for(i=[],u=0;u<c.data.length;u++){var p=c.data[u];p[s+"axis"]===d._id&&i.push(p)}for(u=0;u<i.length;u++){var a=i[u][s];for(f=0;f<a.length;f++){var x=a[f];x!=null&&(h[x]=1)}}return Object.keys(h)}(m,v).sort(),r==="category ascending"?m._initialCategories=o:r==="category descending"&&(m._initialCategories=o.reverse()))}}},{}],560:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../constants/numerical"),v=b.ONEDAY,e=b.ONEWEEK;te.dtick=function(n,t){var o=t==="log",r=t==="date",d=t==="category",c=r?v:1;if(!n)return c;if(g(n))return(n=Number(n))<=0?c:d?Math.max(1,Math.round(n)):r?Math.max(.1,n):n;
1216if(typeof n!="string"||!r&&!o)return c;var i=n.charAt(0),u=n.substr(1);return(u=g(u)?Number(u):0)<=0||!(r&&i==="M"&&u===Math.round(u)||o&&i==="L"||o&&i==="D"&&(u===1||u===2))?c:n},te.tick0=function(n,t,o,r){return t==="date"?m.cleanDate(n,m.dateTick0(o,r%e==0?1:0)):r!=="D1"&&r!=="D2"?g(n)?Number(n):0:void 0}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],561:[function(y,ee,te){var g=y("../../lib/regex").counter;ee.exports={idRegex:{x:g("x","( domain)?"),y:g("y","( domain)?")},attrRegex:g("[xy]axis"),xAxisMatch:g("xaxis"),yAxisMatch:g("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:"-select",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},{"../../lib/regex":520}],562:[function(y,ee,te){var g=y("../../lib"),m=y("./autorange"),b=y("./axis_ids").id2name,v=y("./layout_attributes"),e=y("./scale_zoom"),n=y("./set_convert"),t=y("../../constants/numerical").ALMOST_EQUAL,o=y("../../constants/alignment").FROM_BL;function r(h,p,a){var x=a.axIds,l=a.layoutOut,w=a.hasImage,_=l._axisConstraintGroups,T=l._axisMatchGroups,k=p._id,L=k.charAt(0),A=((l._splomAxes||{})[L]||{})[k]||{},I=p._id,P=I.charAt(0)==="x";function S(Q,j){return g.coerce(h,p,v,Q,j)}p._matchGroup=null,p._constraintGroup=null,S("constrain",w?"domain":"range"),g.coerce(h,p,{constraintoward:{valType:"enumerated",values:P?["left","center","right"]:["bottom","middle","top"],dflt:P?"center":"middle"}},"constraintoward");var E,D,F=p.type,H=[];for(E=0;E<x.length;E++)(D=x[E])!==I&&l[b(D)].type===F&&H.push(D);var V=c(_,I);if(V){var Z=[];for(E=0;E<H.length;E++)V[D=H[E]]||Z.push(D);H=Z}var K,q,W=H.length;W&&(h.matches||A.matches)&&(K=g.coerce(h,p,{matches:{valType:"enumerated",values:H,dflt:H.indexOf(A.matches)!==-1?A.matches:void 0}},"matches"));var $=w&&!P?p.anchor:void 0;if(W&&!K&&(h.scaleanchor||$)&&(q=g.coerce(h,p,{scaleanchor:{valType:"enumerated",values:H}},"scaleanchor",$)),K){p._matchGroup=i(T,I,K,1);var R=l[b(K)],N=d(l,p)/d(l,R);P!==(K.charAt(0)==="x")&&(N=(P?"x":"y")+N),i(_,I,K,N)}else h.matches&&x.indexOf(h.matches)!==-1&&g.warn("ignored "+p._name+'.matches: "'+h.matches+'" to avoid an infinite loop');if(q){var U=S("scaleratio");U||(U=p.scaleratio=1),i(_,I,q,U)}else h.scaleanchor&&x.indexOf(h.scaleanchor)!==-1&&g.warn("ignored "+p._name+'.scaleanchor: "'+h.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function d(h,p){var a=p.domain;return a||(a=h[b(p.overlaying)].domain),a[1]-a[0]}function c(h,p){for(var a=0;a<h.length;a++)if(h[a][p])return h[a];return null}function i(h,p,a,x){var l,w,_,T,k,L=c(h,p);L===null?((L={})[p]=1,k=h.length,h.push(L)):k=h.indexOf(L);var A=Object.keys(L);for(l=0;l<h.length;l++)if(_=h[l],l!==k&&_[a]){var I=_[a];for(w=0;w<A.length;w++)_[T=A[w]]=u(I,u(x,L[T]));return void h.splice(k,1)}if(x!==1)for(w=0;w<A.length;w++){var P=A[w];L[P]=u(x,L[P])}L[a]=1}function u(h,p){var a,x,l="",w="";typeof h=="string"&&(a=(l=h.match(/^[xy]*/)[0]).length,h=+h.substr(a)),typeof p=="string"&&(x=(w=p.match(/^[xy]*/)[0]).length,p=+p.substr(x));var _=h*p;return a||x?a&&x&&l.charAt(0)!==w.charAt(0)?a===x?_:(a>x?l.substr(x):w.substr(a))+_:l+w+h*p:_}function f(h,p){for(var a=p._size,x=a.h/a.w,l={},w=Object.keys(h),_=0;_<w.length;_++){var T=w[_],k=h[T];if(typeof k=="string"){var L=k.match(/^[xy]*/)[0],A=L.length;k=+k.substr(A);for(var I=L.charAt(0)==="y"?x:1/x,P=0;P<A;P++)k*=I}l[T]=k}return l}function s(h,p){var a=h._inputDomain,x=o[h.constraintoward],l=a[0]+(a[1]-a[0])*x;h.domain=h._input.domain=[l+(a[0]-l)/p,l+(a[1]-l)/p],h.setScale()}te.handleDefaults=function(h,p,a){var x,l,w,_,T,k,L,A,I=a.axIds,P=a.axHasImage,S=p._axisConstraintGroups=[],E=p._axisMatchGroups=[];for(x=0;x<I.length;x++)r(T=h[_=b(I[x])],k=p[_],{axIds:I,layoutOut:p,hasImage:P[_]});function D(R,N){for(x=0;x<R.length;x++)for(w in l=R[x])p[b(w)][N]=l}for(D(E,"_matchGroup"),x=0;x<S.length;x++)for(w in l=S[x])if((k=p[b(w)]).fixedrange){for(var F in l){var H=b(F);(h[H]||{}
1216).fixedrange===!1&&g.warn("fixedrange was specified as false for axis "+H+" but was overridden because another axis in its constraint group has fixedrange true"),p[H].fixedrange=!0}break}for(x=0;x<S.length;){for(w in l=S[x]){(k=p[b(w)])._matchGroup&&Object.keys(k._matchGroup).length===Object.keys(l).length&&(S.splice(x,1),x--);break}x++}D(S,"_constraintGroup");var V=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],Z=!1,K=!1;function q(){A=k[L],L==="rangebreaks"&&(K=k._hasDayOfWeekBreaks)}for(x=0;x<E.length;x++){l=E[x];for(var W=0;W<V.length;W++){var $;for(w in L=V[W],A=null,l)if(T=h[_=b(w)],k=p[_],L in k){if(!k.matches&&($=k,L in T)){q();break}A===null&&L in T&&q()}if(L==="range"&&A&&(Z=!0),L==="autorange"&&A===null&&Z&&(A=!1),A===null&&L in $&&(A=$[L]),A!==null)for(w in l)(k=p[b(w)])[L]=L==="range"?A.slice():A,L==="rangebreaks"&&(k._hasDayOfWeekBreaks=K,n(k,p))}}},te.enforce=function(h){var p,a,x,l,w,_,T,k,L=h._fullLayout,A=L._axisConstraintGroups||[];for(p=0;p<A.length;p++){x=f(A[p],L);var I=Object.keys(x),P=1/0,S=0,E=1/0,D={},F={},H=!1;for(a=0;a<I.length;a++)F[l=I[a]]=w=L[b(l)],w._inputDomain?w.domain=w._inputDomain.slice():w._inputDomain=w.domain.slice(),w._inputRange||(w._inputRange=w.range.slice()),w.setScale(),D[l]=_=Math.abs(w._m)/x[l],P=Math.min(P,_),w.constrain!=="domain"&&w._constraintShrinkable||(E=Math.min(E,_)),delete w._constraintShrinkable,S=Math.max(S,_),w.constrain==="domain"&&(H=!0);if(!(P>t*S)||H){for(a=0;a<I.length;a++)if(_=D[l=I[a]],T=(w=F[l]).constrain,_!==E||T==="domain")if(k=_/E,T==="range")e(w,k);else{var V=w._inputDomain,Z=(w.domain[1]-w.domain[0])/(V[1]-V[0]),K=(w.r2l(w.range[1])-w.r2l(w.range[0]))/(w.r2l(w._inputRange[1])-w.r2l(w._inputRange[0]));if((k/=Z)*K<1){w.domain=w._input.domain=V.slice(),e(w,k);continue}if(K<1&&(w.range=w._input.range=w._inputRange.slice(),k*=K),w.autorange){var q=w.r2l(w.range[0]),W=w.r2l(w.range[1]),$=(q+W)/2,R=$,N=$,U=Math.abs(W-$),Q=$-U*k*1.0001,j=$+U*k*1.0001,X=m.makePadFn(L,w,0),J=m.makePadFn(L,w,1);s(w,k);var re,ne,se=Math.abs(w._m),oe=m.concatExtremes(h,w),pe=oe.min,ce=oe.max;for(ne=0;ne<pe.length;ne++)(re=pe[ne].val-X(pe[ne])/se)>Q&&re<R&&(R=re);for(ne=0;ne<ce.length;ne++)(re=ce[ne].val+J(ce[ne])/se)<j&&re>N&&(N=re);k/=(N-R)/(2*U),R=w.l2r(R),N=w.l2r(N),w.range=w._input.range=q<W?[R,N]:[N,R]}s(w,k)}}}},te.getAxisGroup=function(h,p){for(var a=h._axisMatchGroups,x=0;x<a.length;x++)if(a[x][p])return"g"+x;return p},te.clean=function(h,p){if(p._inputDomain){for(var a=!1,x=p._id,l=h._fullLayout._axisConstraintGroups,w=0;w<l.length;w++)if(l[w][x]){a=!0;break}a&&p.constrain==="domain"||(p._input.domain=p.domain=p._inputDomain,delete p._inputDomain)}}},{"../../constants/alignment":471,"../../constants/numerical":479,"../../lib":503,"./autorange":553,"./axis_ids":558,"./layout_attributes":569,"./scale_zoom":574,"./set_convert":576}],563:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=m.numberFormat,v=y("tinycolor2"),e=y("has-passive-events"),n=y("../../registry"),t=m.strTranslate,o=y("../../lib/svg_text_utils"),r=y("../../components/color"),d=y("../../components/drawing"),c=y("../../components/fx"),i=y("./axes"),u=y("../../lib/setcursor"),f=y("../../components/dragelement"),s=y("../../components/dragelement/helpers"),h=s.selectingOrDrawing,p=s.freeMode,a=y("../../constants/alignment").FROM_TL,x=y("../../lib/clear_gl_canvases"),l=y("../../plot_api/subroutines").redrawReglTraces,w=y("../plots"),_=y("./axis_ids").getFromId,T=y("./select").prepSelect,k=y("./select").clearSelect,L=y("./select").selectOnClick,A=y("./scale_zoom"),I=y("./constants"),P=I.MINDRAG,S=I.MINZOOM,E=!0;function D(re,ne,se,oe){var pe=m.ensureSingle(re.draglayer,ne,se,function(ce){ce.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",re.id)});return pe.call(u,oe),pe.node()}function F(re,ne,se,oe,pe,ce,de){var xe=D(re,"rect",ne,se);return g.select(xe).call(d.setRect,oe,pe,ce,de),xe}function H(re,ne){for(var se=0;se<re.length;se++)if(!re[se].fixedrange)return ne;return""}function V(re,ne,se,oe,pe){for(var ce=0;ce<re.length;ce++){var de=re[ce];
vendor: 6,917 bytes, line 1216
1216if(!de.fixedrange)if(de.rangebreaks){var xe=de._id.charAt(0)==="y",we=xe?1-ne:ne,be=xe?1-se:se;oe[de._name+".range[0]"]=de.l2r(de.p2l(we*de._length)),oe[de._name+".range[1]"]=de.l2r(de.p2l(be*de._length))}else{var Ee=de._rl[0],fe=de._rl[1]-Ee;oe[de._name+".range[0]"]=de.l2r(Ee+fe*ne),oe[de._name+".range[1]"]=de.l2r(Ee+fe*se)}}if(pe&&pe.length){var me=(ne+(1-se))/2;V(pe,me,1-me,oe,[])}}function Z(re,ne){for(var se=0;se<re.length;se++){var oe=re[se];if(!oe.fixedrange)if(oe.rangebreaks){var pe=oe._length,ce=(oe.p2l(0+ne)-oe.p2l(0)+(oe.p2l(pe+ne)-oe.p2l(pe)))/2;oe.range=[oe.l2r(oe._rl[0]-ce),oe.l2r(oe._rl[1]-ce)]}else oe.range=[oe.l2r(oe._rl[0]-ne/oe._m),oe.l2r(oe._rl[1]-ne/oe._m)]}}function K(re){return 1-(re>=0?Math.min(re,.9):1/(1/Math.max(re,-.3)+3.222))}function q(re,ne,se,oe,pe){return re.append("path").attr("class","zoombox").style({fill:ne>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",t(se,oe)).attr("d",pe+"Z")}function W(re,ne,se){return re.append("path").attr("class","zoombox-corners").style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("transform",t(ne,se)).attr("d","M0,0Z")}function $(re,ne,se,oe,pe,ce){re.attr("d",oe+"M"+se.l+","+se.t+"v"+se.h+"h"+se.w+"v-"+se.h+"h-"+se.w+"Z"),R(re,ne,pe,ce)}function R(re,ne,se,oe){se||(re.transition().style("fill",oe>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ne.transition().style("opacity",1).duration(200))}function N(re){g.select(re).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function U(re){E&&re.data&&re._context.showTips&&(m.notifier(m._(re,"Double-click to zoom back out"),"long"),E=!1)}function Q(re){var ne=Math.floor(Math.min(re.b-re.t,re.r-re.l,S)/2);return"M"+(re.l-3.5)+","+(re.t-.5+ne)+"h3v"+-ne+"h"+ne+"v-3h-"+(ne+3)+"ZM"+(re.r+3.5)+","+(re.t-.5+ne)+"h-3v"+-ne+"h"+-ne+"v-3h"+(ne+3)+"ZM"+(re.r+3.5)+","+(re.b+.5-ne)+"h-3v"+ne+"h"+-ne+"v3h"+(ne+3)+"ZM"+(re.l-3.5)+","+(re.b+.5-ne)+"h3v"+ne+"h"+ne+"v3h-"+(ne+3)+"Z"}function j(re,ne,se,oe,pe){for(var ce,de,xe,we,be=!1,Ee={},fe={},me=(pe||{}).xaHash,Te=(pe||{}).yaHash,_e=0;_e<ne.length;_e++){var Ae=ne[_e];for(ce in se)if(Ae[ce]){for(xe in Ae)pe&&(me[xe]||Te[xe])||(xe.charAt(0)==="x"?se:oe)[xe]||(Ee[xe]=ce);for(de in oe)pe&&(me[de]||Te[de])||!Ae[de]||(be=!0)}for(de in oe)if(Ae[de])for(we in Ae)pe&&(me[we]||Te[we])||(we.charAt(0)==="x"?se:oe)[we]||(fe[we]=de)}be&&(m.extendFlat(Ee,fe),fe={});var Pe={},De=[];for(xe in Ee){var Ve=_(re,xe);De.push(Ve),Pe[Ve._id]=Ve}var Qe={},Oe=[];for(we in fe){var Ue=_(re,we);Oe.push(Ue),Qe[Ue._id]=Ue}return{xaHash:Pe,yaHash:Qe,xaxes:De,yaxes:Oe,xLinks:Ee,yLinks:fe,isSubplotConstrained:be}}function X(re,ne){if(e){var se=re.onwheel!==void 0?"wheel":"mousewheel";re._onwheel&&re.removeEventListener(se,re._onwheel),re._onwheel=ne,re.addEventListener(se,ne,{passive:!1})}else re.onwheel!==void 0?re.onwheel=ne:re.onmousewheel!==void 0?re.onmousewheel=ne:re.isAddedWheelEvent||(re.isAddedWheelEvent=!0,re.addEventListener("wheel",ne,{passive:!1}))}function J(re){var ne=[];for(var se in re)ne.push(re[se]);return ne}ee.exports={makeDragBox:function(re,ne,se,oe,pe,ce,de,xe){var we,be,Ee,fe,me,Te,_e,Ae,Pe,De,Ve,Qe,Oe,Ue,Ge,Ye,tt,lt,vt,It,St,rt,et,Tt=re._fullLayout._zoomlayer,Vt=de+xe==="nsew",Kt=(de+xe).length===1;function Be(){if(we=ne.xaxis,be=ne.yaxis,Pe=we._length,De=be._length,_e=we._offset,Ae=be._offset,(Ee={})[we._id]=we,(fe={})[be._id]=be,de&&xe)for(var ar=ne.overlays,lr=0;lr<ar.length;lr++){var hr=ar[lr].xaxis;Ee[hr._id]=hr;var Or=ar[lr].yaxis;fe[Or._id]=Or}me=J(Ee),Te=J(fe),Oe=H(me,xe),Ue=H(Te,de),Ge=!Ue&&!Oe,Qe=j(re,re._fullLayout._axisMatchGroups,Ee,fe);var dr=(Ve=j(re,re._fullLayout._axisConstraintGroups,Ee,fe,Qe)).isSubplotConstrained||Qe.isSubplotConstrained;Ye=xe||dr,tt=de||dr;var Fr=re._fullLayout;lt=Fr._has("scattergl"),vt=Fr._has("splom"),It=Fr._has("svg")}Be();var qe=function(ar,lr,hr){return ar?ar==="nsew"?hr?"":lr==="pan"?"move":"crosshair":ar.toLowerCase()+"-resize":"pointer"}(Ue+Oe,re._fullLayout.dragmode,Vt),Re=F(ne,de+xe+"drag",qe,se,oe,pe,ce);if(Ge&&!Vt)return Re.onmousedown=null,Re.style.pointerEvents="none",Re;var Xe,ke,Le,Ie,Ce,Je,it,ht,ut,kt,ot={element:Re,gd:re,plotinfo:ne};function Lt(){ot.plotinfo.selection=!1,k(re)}function Et(ar,lr){var hr=ot.gd;if(hr._fullLayout._activeShapeIndex>=0)hr._fullLayout._deactivateShape(hr);else{var Or=hr._fullLayout.clickmode;if(N(hr),ar!==2||Kt||or(),Vt)Or.indexOf("select")>-1&&L(lr,hr,me,Te,ne.id,ot),Or.indexOf("event")>-1&&c.click(hr,lr,ne.id);else if(ar===1&&Kt){var dr=de?be:we,Fr=de==="s"||xe==="w"?0:1,tn=dr._name+".range["+Fr+"]",rn=function(_n,Vr){var Ir,xr=_n.range[Vr],Nr=Math.abs(xr-_n.range[1-Vr]);return _n.type==="date"?xr:_n.type==="log"?(Ir=Math.ceil(Math.max(0,-Math.log(Nr)/Math.LN10))+3,b("."+Ir+"g")(Math.pow(10,xr))):(Ir=Math.floor(Math.log(Math.abs(xr))/Math.LN10)-Math.floor(Math.log(Nr)/Math.LN10)+4,b("."+String(Ir)+"g")(xr))}(dr,Fr),An="left",Ln="middle";if(dr.fixedrange)return;de?(Ln=de==="n"?"top":"bottom",dr.side==="right"&&(An="right")):xe==="e"&&(An="right"),hr._context.showAxisRangeEntryBoxes&&g.select(Re).call(o.makeEditable,{gd:hr,immediate:!0,background:hr._fullLayout.paper_bgcolor,text:String(rn),fill:dr.tickfont?dr.tickfont.color:"#444",horizontalAlign:An,verticalAlign:Ln}).on("edit",function(_n){var Vr=dr.d2r(_n);Vr!==void 0&&n.call("_guiRelayout",hr,tn,Vr)})}}}function Ze(ar,lr){if(re._transitioningWithDuration)return!1;var hr=Math.max(0,Math.min(Pe,rt*ar+Xe)),Or=Math.max(0,Math.min(De,et*lr+ke)),dr=Math.abs(hr-Xe),Fr=Math.abs(Or-ke);function tn(){it="",Le.r=Le.l,Le.t=Le.b,ut.attr("d","M0,0Z")}if(Le.l=Math.min(Xe,hr),Le.r=Math.max(Xe,hr),Le.t=Math.min(ke,Or),Le.b=Math.max(ke,Or),Ve.isSubplotConstrained)dr>S||Fr>S?(it="xy",dr/Pe>Fr/De?(Fr=dr*De/Pe,ke>Or?Le.t=ke-Fr:Le.b=ke+Fr):(dr=Fr*Pe/De,Xe>hr?Le.l=Xe-dr:Le.r=Xe+dr),ut.attr("d",Q(Le))):tn();else if(Qe.isSubplotConstrained)if(dr>S||Fr>S){it="xy";var rn=Math.min(Le.l/Pe,(De-Le.b)/De),An=Math.max(Le.r/Pe,(De-Le.t)/De);Le.l=rn*Pe,Le.r=An*Pe,Le.b=(1-rn)*De,Le.t=(1-An)*De,ut.attr("d",Q(Le))}else tn();else!Ue||Fr<Math.min(Math.max(.6*dr,P),S)?dr<P||!Oe?tn():(Le.t=0,Le.b=De,it="x",ut.attr("d",function(Ln,_n){return"M"+(Ln.l-.5)+","+(_n-S-.5)+"h-3v"+(2*S+1)+"h3ZM"+(Ln.r+.5)+","+(_n-S-.5)+"h3v"+(2*S+1)+"h-3Z"}(Le,ke))):!Oe||dr<Math.min(.6*Fr,S)?(Le.l=0,Le.r=Pe,it="y",ut.attr("d",function(Ln,_n){return"M"+(_n-S-.5)+","+(Ln.t-.5)+"v-3h"+(2*S+1)+"v3ZM"+(_n-S-.5)+","+(Ln.b+.5)+"v3h"+(2*S+1)+"v-3Z"}(Le,Xe))):(it="xy",ut.attr("d",Q(Le)));Le.w=Le.r-Le.l,Le.h=Le.b-Le.t,it&&(kt=!0),re._dragged=kt,$(ht,ut,Le,Ce,Je,Ie),pt(),re.emit("plotly_relayouting",St),Je=!0}function pt(){St={},it!=="xy"&&it!=="x"||(V(me,Le.l/Pe,Le.r/Pe,St,Ve.xaxes),Dt("x",St)),it!=="xy"&&it!=="y"||(V(Te,(De-Le.b)/De,(De-Le.t)/De,St,Ve.yaxes),Dt("y",St))}function Ct(){pt(),N(re),Ut(),U(re)}ot.prepFn=function(ar,lr,hr){var Or=ot.dragmode,dr=re._fullLayout.dragmode;
1216dr!==Or&&(ot.dragmode=dr),Be(),rt=re._fullLayout._invScaleX,et=re._fullLayout._invScaleY,Ge||(Vt?ar.shiftKey?dr==="pan"?dr="zoom":h(dr)||(dr="pan"):ar.ctrlKey&&(dr="pan"):dr="pan"),p(dr)?ot.minDrag=1:ot.minDrag=void 0,h(dr)?(ot.xaxes=me,ot.yaxes=Te,T(ar,lr,hr,ot,dr)):(ot.clickFn=Et,h(Or)&&Lt(),Ge||(dr==="zoom"?(ot.moveFn=Ze,ot.doneFn=Ct,ot.minDrag=1,function(Fr,tn,rn){var An=Re.getBoundingClientRect();Xe=tn-An.left,ke=rn-An.top,re._fullLayout._calcInverseTransform(re);var Ln=m.apply3DTransform(re._fullLayout._invTransform)(Xe,ke);Xe=Ln[0],ke=Ln[1],Le={l:Xe,r:Xe,w:0,t:ke,b:ke,h:0},Ie=re._hmpixcount?re._hmlumcount/re._hmpixcount:v(re._fullLayout.plot_bgcolor).getLuminance(),Je=!1,it="xy",kt=!1,ht=q(Tt,Ie,_e,Ae,Ce="M0,0H"+Pe+"V"+De+"H0V0"),ut=W(Tt,_e,Ae)}(0,lr,hr)):dr==="pan"&&(ot.moveFn=yt,ot.doneFn=Ut))),re._fullLayout._redrag=function(){var Fr=re._dragdata;if(Fr&&Fr.element===Re){var tn=re._fullLayout.dragmode;h(tn)||(Be(),Xt([0,0,Pe,De]),ot.moveFn(Fr.dx,Fr.dy))}}},f.init(ot);var zt=[0,0,Pe,De],Gt=null,ze=I.REDRAWDELAY,st=ne.mainplot?re._fullLayout._plots[ne.mainplot]:ne;function yt(ar,lr){if(ar*=rt,lr*=et,!re._transitioningWithDuration){if(re._fullLayout._replotting=!0,Oe==="ew"||Ue==="ns"){var hr=Oe?-ar:0,Or=Ue?-lr:0;if(Qe.isSubplotConstrained){if(Oe&&Ue){var dr=(ar/Pe-lr/De)/2;hr=-(ar=dr*Pe),Or=-(lr=-dr*De)}Ue?hr=-Or*Pe/De:Or=-hr*De/Pe}return Oe&&(Z(me,ar),Dt("x")),Ue&&(Z(Te,lr),Dt("y")),Xt([hr,Or,Pe,De]),jt(),void re.emit("plotly_relayouting",St)}var Fr,tn,rn=Oe==="w"==(Ue==="n")?1:-1;if(Oe&&Ue&&(Ve.isSubplotConstrained||Qe.isSubplotConstrained)){var An=(ar/Pe+rn*lr/De)/2;ar=An*Pe,lr=rn*An*De}if(Oe==="w"?ar=Ir(me,0,ar):Oe==="e"?ar=Ir(me,1,-ar):Oe||(ar=0),Ue==="n"?lr=Ir(Te,1,lr):Ue==="s"?lr=Ir(Te,0,-lr):Ue||(lr=0),Fr=Oe==="w"?ar:0,tn=Ue==="n"?lr:0,Ve.isSubplotConstrained&&!Qe.isSubplotConstrained||Qe.isSubplotConstrained&&Oe&&Ue&&rn>0){var Ln;if(Qe.isSubplotConstrained||!Oe&&Ue.length===1){for(Ln=0;Ln<me.length;Ln++)me[Ln].range=me[Ln]._r.slice(),A(me[Ln],1-lr/De);Fr=(ar=lr*Pe/De)/2}if(Qe.isSubplotConstrained||!Ue&&Oe.length===1){for(Ln=0;Ln<Te.length;Ln++)Te[Ln].range=Te[Ln]._r.slice(),A(Te[Ln],1-ar/Pe);tn=(lr=ar*De/Pe)/2}}Qe.isSubplotConstrained&&Ue||Dt("x"),Qe.isSubplotConstrained&&Oe||Dt("y");var _n=Pe-ar,Vr=De-lr;!Qe.isSubplotConstrained||Oe&&Ue||(Oe?(tn=Fr?0:ar*De/Pe,Vr=_n*De/Pe):(Fr=tn?0:lr*Pe/De,_n=Vr*Pe/De)),Xt([Fr,tn,_n,Vr]),jt(),re.emit("plotly_relayouting",St)}function Ir(xr,Nr,en){for(var Qr,yn,un=1-Nr,$r=0;$r<xr.length;$r++){var In=xr[$r];if(!In.fixedrange){Qr=In,yn=In._rl[un]+(In._rl[Nr]-In._rl[un])/K(en/In._length);var Qt=In.l2r(yn);Qt!==!1&&Qt!==void 0&&(In.range[Nr]=Qt)}}return Qr._length*(Qr._rl[Nr]-yn)/(Qr._rl[Nr]-Qr._rl[un])}}function Dt(ar,lr){for(var hr=Qe.isSubplotConstrained?{x:Te,y:me}[ar]:Qe[ar+"axes"],Or=Qe.isSubplotConstrained?{x:me,y:Te}[ar]:[],dr=0;dr<hr.length;dr++){var Fr=hr[dr],tn=Fr._id,rn=Qe.xLinks[tn]||Qe.yLinks[tn],An=Or[0]||Ee[rn]||fe[rn];An&&(lr?(lr[Fr._name+".range[0]"]=lr[An._name+".range[0]"],lr[Fr._name+".range[1]"]=lr[An._name+".range[1]"]):Fr.range=An.range.slice())}}function jt(){var ar,lr=[];function hr(Fr){for(ar=0;ar<Fr.length;ar++)Fr[ar].fixedrange||lr.push(Fr[ar]._id)}for(Ye&&(hr(me),hr(Ve.xaxes),hr(Qe.xaxes)),tt&&(hr(Te),hr(Ve.yaxes),hr(Qe.yaxes)),St={},ar=0;ar<lr.length;ar++){var Or=lr[ar],dr=_(re,Or);i.drawOne(re,dr,{skipTitle:!0}),St[dr._name+".range[0]"]=dr.range[0],St[dr._name+".range[1]"]=dr.range[1]}i.redrawComponents(re,lr)}function or(){if(!re._transitioningWithDuration){var ar=re._context.doubleClick,lr=[];Oe&&(lr=lr.concat(me)),Ue&&(lr=lr.concat(Te)),Qe.xaxes&&(lr=lr.concat(Qe.xaxes)),Qe.yaxes&&(lr=lr.concat(Qe.yaxes));var hr,Or,dr,Fr={};if(ar==="reset+autosize"){for(ar="autosize",Or=0;Or<lr.length;Or++)if((hr=lr[Or])._rangeInitial&&(hr.range[0]!==hr._rangeInitial[0]||hr.range[1]!==hr._rangeInitial[1])||!hr._rangeInitial&&!hr.autorange){ar="reset";break}}if(ar==="autosize")for(Or=0;Or<lr.length;Or++)(hr=lr[Or]).fixedrange||(Fr[hr._name+".autorange"]=!0);else if(ar==="reset")for((Oe||Ve.isSubplotConstrained)&&(lr=lr.concat(Ve.xaxes)),Ue&&!Ve.isSubplotConstrained&&(lr=lr.concat(Ve.yaxes)),Ve.isSubplotConstrained&&(Oe?Ue||(lr=lr.concat(Te)):lr=lr.concat(me)),Or=0;Or<lr.length;Or++)(hr=lr[Or]).fixedrange||(hr._rangeInitial?(dr=hr._rangeInitial,Fr[hr._name+".range[0]"]=dr[0],Fr[hr._name+".range[1]"]=dr[1]):Fr[hr._name+".autorange"]=!0);re.emit("plotly_doubleclick",null),n.call("_guiRelayout",re,Fr)}}function Ut(){Xt([0,0,Pe,De]),m.syncOrAsync([w.previousPromises,function(){re._fullLayout._replotting=!1,n.call("_guiRelayout",re,St)}
1216],re)}function Xt(ar){var lr,hr,Or,dr,Fr=re._fullLayout,tn=Fr._plots,rn=Fr._subplots.cartesian;if(vt&&n.subplotsRegistry.splom.drag(re),lt){for(lr=0;lr<rn.length;lr++)if(Or=(hr=tn[rn[lr]]).xaxis,dr=hr.yaxis,hr._scene){var An=m.simpleMap(Or.range,Or.r2l),Ln=m.simpleMap(dr.range,dr.r2l);hr._scene.update({range:[An[0],Ln[0],An[1],Ln[1]]})}}if((vt||lt)&&(x(re),l(re)),It){var _n=ar[2]/we._length,Vr=ar[3]/be._length;for(lr=0;lr<rn.length;lr++){Or=(hr=tn[rn[lr]]).xaxis,dr=hr.yaxis;var Ir,xr,Nr,en,Qr=(Ye||Qe.isSubplotConstrained)&&!Or.fixedrange&&Ee[Or._id],yn=(tt||Qe.isSubplotConstrained)&&!dr.fixedrange&&fe[dr._id];if(Qr?(Ir=_n,Nr=xe||Qe.isSubplotConstrained?ar[0]:pr(Or,Ir)):Qe.xaHash[Or._id]?(Ir=_n,Nr=ar[0]*Or._length/we._length):Qe.yaHash[Or._id]?(Ir=Vr,Nr=Ue==="ns"?-ar[1]*Or._length/be._length:pr(Or,Ir,{n:"top",s:"bottom"}[Ue])):Nr=vr(Or,Ir=sr(Or,_n,Vr)),yn?(xr=Vr,en=de||Qe.isSubplotConstrained?ar[1]:pr(dr,xr)):Qe.yaHash[dr._id]?(xr=Vr,en=ar[1]*dr._length/be._length):Qe.xaHash[dr._id]?(xr=_n,en=Oe==="ew"?-ar[0]*dr._length/we._length:pr(dr,xr,{e:"right",w:"left"}[Oe])):en=vr(dr,xr=sr(dr,_n,Vr)),Ir||xr){Ir||(Ir=1),xr||(xr=1);var un=Or._offset-Nr/Ir,$r=dr._offset-en/xr;hr.clipRect.call(d.setTranslate,Nr,en).call(d.setScale,Ir,xr),hr.plot.call(d.setTranslate,un,$r).call(d.setScale,1/Ir,1/xr),Ir===hr.xScaleFactor&&xr===hr.yScaleFactor||(d.setPointGroupScale(hr.zoomScalePts,Ir,xr),d.setTextPointsScale(hr.zoomScaleTxt,Ir,xr)),d.hideOutsideRangePoints(hr.clipOnAxisFalseTraces,hr),hr.xScaleFactor=Ir,hr.yScaleFactor=xr}}}}function sr(ar,lr,hr){return ar.fixedrange?0:Ye&&Ve.xaHash[ar._id]?lr:tt&&(Ve.isSubplotConstrained?Ve.xaHash:Ve.yaHash)[ar._id]?hr:0}function vr(ar,lr){return lr?(ar.range=ar._r.slice(),A(ar,lr),pr(ar,lr)):0}function pr(ar,lr,hr){return ar._length*(1-lr)*a[hr||ar.constraintoward||"middle"]}return de.length*xe.length!=1&&X(Re,function(ar){if(re._context._scrollZoom.cartesian||re._fullLayout._enablescrollzoom){if(Lt(),re._transitioningWithDuration)return ar.preventDefault(),void ar.stopPropagation();Be(),clearTimeout(Gt);var lr=-ar.deltaY;if(isFinite(lr)||(lr=ar.wheelDelta/10),isFinite(lr)){var hr,Or=Math.exp(-Math.min(Math.max(lr,-20),20)/200),dr=st.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Fr=(ar.clientX-dr.left)/dr.width,tn=(dr.bottom-ar.clientY)/dr.height;if(Ye){for(xe||(Fr=.5),hr=0;hr<me.length;hr++)rn(me[hr],Fr,Or);Dt("x"),zt[2]*=Or,zt[0]+=zt[2]*Fr*(1/Or-1)}if(tt){for(de||(tn=.5),hr=0;hr<Te.length;hr++)rn(Te[hr],tn,Or);Dt("y"),zt[3]*=Or,zt[1]+=zt[3]*(1-tn)*(1/Or-1)}Xt(zt),jt(),re.emit("plotly_relayouting",St),Gt=setTimeout(function(){re._fullLayout&&(zt=[0,0,Pe,De],Ut())},ze),ar.preventDefault()}else m.log("Did not find wheel motion attributes: ",ar)}function rn(An,Ln,_n){if(!An.fixedrange){var Vr=m.simpleMap(An.range,An.r2l),Ir=Vr[0]+(Vr[1]-Vr[0])*Ln;An.range=Vr.map(function(xr){return An.l2r(Ir+(xr-Ir)*_n)})}}}),Re},makeDragger:D,makeRectDragger:F,makeZoombox:q,makeCorners:W,updateZoombox:$,xyCorners:Q,transitionZoombox:R,removeZoombox:N,showDoubleClickNotifier:U,attachWheelEventHandler:X}},{"../../components/color":366,"../../components/dragelement":385,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../constants/alignment":471,"../../lib":503,"../../lib/clear_gl_canvases":487,"../../lib/setcursor":524,"../../lib/svg_text_utils":529,"../../plot_api/subroutines":544,"../../registry":638,"../plots":619,"./axes":554,"./axis_ids":558,"./constants":561,"./scale_zoom":574,"./select":575,"@plotly/d3":58,"has-passive-events":229,tinycolor2:312}],564:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/fx"),b=y("../../components/dragelement"),v=y("../../lib/setcursor"),e=y("./dragbox").makeDragBox,n=y("./constants").DRAGGERSIZE;te.initInteractions=function(t){var o=t._fullLayout;if(t._context.staticPlot)g.select(t).selectAll(".drag").remove();else if(o._has("cartesian")||o._has("splom")){Object.keys(o._plots||{}).sort(function(d,c){if((o._plots[d].mainplot&&!0)===(o._plots[c].mainplot&&!0)){var i=d.split("y"),u=c.split("y");return i[0]===u[0]?Number(i[1]||1)-Number(u[1]||1):Number(i[0]||1)-Number(u[0]||1)}return o._plots[d].mainplot?1:-1}
1216).forEach(function(d){var c=o._plots[d],i=c.xaxis,u=c.yaxis;if(!c.mainplot){var f=e(t,c,i._offset,u._offset,i._length,u._length,"ns","ew");f.onmousemove=function(p){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===d&&t._fullLayout._plots[d]&&m.hover(t,p,d)},m.hover(t,p,d),t._fullLayout._lasthover=f,t._fullLayout._hoversubplot=d},f.onmouseout=function(p){t._dragging||(t._fullLayout._hoversubplot=null,b.unhover(t,p))},t._context.showAxisDragHandles&&(e(t,c,i._offset-n,u._offset-n,n,n,"n","w"),e(t,c,i._offset+i._length,u._offset-n,n,n,"n","e"),e(t,c,i._offset-n,u._offset+u._length,n,n,"s","w"),e(t,c,i._offset+i._length,u._offset+u._length,n,n,"s","e"))}if(t._context.showAxisDragHandles){if(d===i._mainSubplot){var s=i._mainLinePosition;i.side==="top"&&(s-=n),e(t,c,i._offset+.1*i._length,s,.8*i._length,n,"","ew"),e(t,c,i._offset,s,.1*i._length,n,"","w"),e(t,c,i._offset+.9*i._length,s,.1*i._length,n,"","e")}if(d===u._mainSubplot){var h=u._mainLinePosition;u.side!=="right"&&(h-=n),e(t,c,h,u._offset+.1*u._length,n,.8*u._length,"ns",""),e(t,c,h,u._offset+.9*u._length,n,.1*u._length,"s",""),e(t,c,h,u._offset,n,.1*u._length,"n","")}}});var r=o._hoverlayer.node();r.onmousemove=function(d){d.target=t._fullLayout._lasthover,m.hover(t,d,o._hoversubplot)},r.onclick=function(d){d.target=t._fullLayout._lasthover,m.click(t,d)},r.onmousedown=function(d){t._fullLayout._lasthover.onmousedown(d)},te.updateFx(t)}},te.updateFx=function(t){var o=t._fullLayout,r=o.dragmode==="pan"?"move":"crosshair";v(o._draggers,r)}},{"../../components/dragelement":385,"../../components/fx":406,"../../lib/setcursor":524,"./constants":561,"./dragbox":563,"@plotly/d3":58}],565:[function(y,ee,te){ee.exports={clearOutlineControllers:function(g){var m=g._fullLayout._zoomlayer;m&&m.selectAll(".outline-controllers").remove()},clearSelect:function(g){var m=g._fullLayout._zoomlayer;m&&m.selectAll(".select-outline").remove(),g._fullLayout._drawing=!1}}},{}],566:[function(y,ee,te){var g=y("../../lib").strTranslate;function m(b,v){switch(b.type){case"log":return b.p2d(v);case"date":return b.p2r(v,0,b.calendar);default:return b.p2r(v)}}ee.exports={p2r:m,r2p:function(b,v){switch(b.type){case"log":return b.d2p(v);case"date":return b.r2p(v,0,b.calendar);default:return b.r2p(v)}},axValue:function(b){var v=b._id.charAt(0)==="y"?1:0;return function(e){return m(b,e[v])}},getTransform:function(b){return g(b.xaxis._offset,b.yaxis._offset)}}},{"../../lib":503}],567:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("./axis_ids");ee.exports=function(v){return function(e,n){var t=e[v];if(Array.isArray(t))for(var o=g.subplotsRegistry.cartesian,r=o.idRegex,d=n._subplots,c=d.xaxis,i=d.yaxis,u=d.cartesian,f=n._has("cartesian")||n._has("gl2d"),s=0;s<t.length;s++){var h=t[s];if(m.isPlainObject(h)){var p=b.cleanId(h.xref,"x",!1),a=b.cleanId(h.yref,"y",!1),x=r.x.test(p),l=r.y.test(a);if(x||l){f||m.pushUnique(n._basePlotModules,o);var w=!1;x&&c.indexOf(p)===-1&&(c.push(p),w=!0),l&&i.indexOf(a)===-1&&(i.push(a),w=!0),w&&x&&l&&u.push(p+a)}}}}}},{"../../lib":503,"../../registry":638,"./axis_ids":558}],568:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../registry"),b=y("../../lib"),v=y("../plots"),e=y("../../components/drawing"),n=y("../get_data").getModuleCalcData,t=y("./axis_ids"),o=y("./constants"),r=y("../../constants/xmlns_namespaces"),d=b.ensureSingle;function c(h,p,a){return b.ensureSingle(h,p,a,function(x){x.datum(a)})}function i(h,p,a,x,l){for(var w,_,T,k=o.traceLayerClasses,L=h._fullLayout,A=L._modules,I=[],P=[],S=0;S<A.length;S++){var E=(w=A[S]).name,D=m.modules[E].categories;if(D.svg){var F=w.layerName||E+"layer",H=w.plot;T=(_=n(a,H))[0],a=_[1],T.length&&I.push({i:k.indexOf(F),className:F,plotMethod:H,cdModule:T}),D.zoomScale&&P.push("."+F)}}I.sort(function(K,q){return K.i-q.i});var V=p.plot.selectAll("g.mlayer").data(I,function(K){return K.className});if(V.enter().append("g").attr("class",function(K){return K.className}).classed("mlayer",!0).classed("rangeplot",p.isRangePlot),V.exit().remove(),V.order(),V.each(function(K){var q=g.select(this),W=K.className;K.plotMethod(h,p,K.cdModule,q,x,l),o.clipOnAxisFalseQuery.indexOf("."+W)===-1&&e.setClipUrl(q,p.layerClipId,h)}),L._has("scattergl")&&(w=m.getModule("scattergl"),T=n(a,w)[0],w.plot(h,p,T)),!h._context.staticPlot&&(p._hasClipOnAxisFalse&&(p.clipOnAxisFalseTraces=p.plot.selectAll(
1216o.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),P.length)){var Z=p.plot.selectAll(P.join(",")).selectAll(".trace");p.zoomScalePts=Z.selectAll("path.point"),p.zoomScaleTxt=Z.selectAll(".textpoint")}}function u(h,p){var a=p.plotgroup,x=p.id,l=o.layerValue2layerClass[p.xaxis.layer],w=o.layerValue2layerClass[p.yaxis.layer],_=h._fullLayout._hasOnlyLargeSploms;if(p.mainplot){var T=p.mainplotinfo,k=T.plotgroup,L=x+"-x",A=x+"-y";p.gridlayer=T.gridlayer,p.zerolinelayer=T.zerolinelayer,d(T.overlinesBelow,"path",L),d(T.overlinesBelow,"path",A),d(T.overaxesBelow,"g",L),d(T.overaxesBelow,"g",A),p.plot=d(T.overplot,"g",x),d(T.overlinesAbove,"path",L),d(T.overlinesAbove,"path",A),d(T.overaxesAbove,"g",L),d(T.overaxesAbove,"g",A),p.xlines=k.select(".overlines-"+l).select("."+L),p.ylines=k.select(".overlines-"+w).select("."+A),p.xaxislayer=k.select(".overaxes-"+l).select("."+L),p.yaxislayer=k.select(".overaxes-"+w).select("."+A)}else if(_)p.xlines=d(a,"path","xlines-above"),p.ylines=d(a,"path","ylines-above"),p.xaxislayer=d(a,"g","xaxislayer-above"),p.yaxislayer=d(a,"g","yaxislayer-above");else{var I=d(a,"g","layer-subplot");p.shapelayer=d(I,"g","shapelayer"),p.imagelayer=d(I,"g","imagelayer"),p.gridlayer=d(a,"g","gridlayer"),p.zerolinelayer=d(a,"g","zerolinelayer"),d(a,"path","xlines-below"),d(a,"path","ylines-below"),p.overlinesBelow=d(a,"g","overlines-below"),d(a,"g","xaxislayer-below"),d(a,"g","yaxislayer-below"),p.overaxesBelow=d(a,"g","overaxes-below"),p.plot=d(a,"g","plot"),p.overplot=d(a,"g","overplot"),p.xlines=d(a,"path","xlines-above"),p.ylines=d(a,"path","ylines-above"),p.overlinesAbove=d(a,"g","overlines-above"),d(a,"g","xaxislayer-above"),d(a,"g","yaxislayer-above"),p.overaxesAbove=d(a,"g","overaxes-above"),p.xlines=a.select(".xlines-"+l),p.ylines=a.select(".ylines-"+w),p.xaxislayer=a.select(".xaxislayer-"+l),p.yaxislayer=a.select(".yaxislayer-"+w)}_||(c(p.gridlayer,"g",p.xaxis._id),c(p.gridlayer,"g",p.yaxis._id),p.gridlayer.selectAll("g").map(function(P){return P[0]}).sort(t.idSort)),p.xlines.style("fill","none").classed("crisp",!0),p.ylines.style("fill","none").classed("crisp",!0)}function f(h,p){if(h){var a={};for(var x in h.each(function(T){var k=T[0];g.select(this).remove(),s(k,p),a[k]=!0}),p._plots)for(var l=p._plots[x].overlays||[],w=0;w<l.length;w++){var _=l[w];a[_.id]&&_.plot.selectAll(".trace").remove()}}}function s(h,p){p._draggers.selectAll("g."+h).remove(),p._defs.select("#clip"+p._uid+h+"plot").remove()}te.name="cartesian",te.attr=["xaxis","yaxis"],te.idRoot=["x","y"],te.idRegex=o.idRegex,te.attrRegex=o.attrRegex,te.attributes=y("./attributes"),te.layoutAttributes=y("./layout_attributes"),te.supplyLayoutDefaults=y("./layout_defaults"),te.transitionAxes=y("./transition_axes"),te.finalizeSubplots=function(h,p){var a,x,l,w=p._subplots,_=w.xaxis,T=w.yaxis,k=w.cartesian,L=k.concat(w.gl2d||[]),A={},I={};for(a=0;a<L.length;a++){var P=L[a].split("y");A[P[0]]=1,I["y"+P[1]]=1}for(a=0;a<_.length;a++)A[x=_[a]]||(l=(h[t.id2name(x)]||{}).anchor,o.idRegex.y.test(l)||(l="y"),k.push(x+l),L.push(x+l),I[l]||(I[l]=1,b.pushUnique(T,l)));for(a=0;a<T.length;a++)I[l=T[a]]||(x=(h[t.id2name(l)]||{}).anchor,o.idRegex.x.test(x)||(x="x"),k.push(x+l),L.push(x+l),A[x]||(A[x]=1,b.pushUnique(_,x)));if(!L.length){for(var S in x="",l="",h)o.attrRegex.test(S)&&(S.charAt(0)==="x"?(!x||+S.substr(5)<+x.substr(5))&&(x=S):(!l||+S.substr(5)<+l.substr(5))&&(l=S));x=x?t.name2id(x):"x",l=l?t.name2id(l):"y",_.push(x),T.push(l),k.push(x+l)}},te.plot=function(h,p,a,x){var l,w=h._fullLayout,_=w._subplots.cartesian,T=h.calcdata;if(!Array.isArray(p))for(p=[],l=0;l<T.length;l++)p.push(l);for(l=0;l<_.length;l++){for(var k,L=_[l],A=w._plots[L],I=[],P=0;P<T.length;P++){var S=T[P],E=S[0].trace;E.xaxis+E.yaxis===L&&((p.indexOf(E.index)!==-1||E.carpet)&&(k&&k[0].trace.xaxis+k[0].trace.yaxis===L&&["tonextx","tonexty","tonext"].indexOf(E.fill)!==-1&&I.indexOf(k)===-1&&I.push(k),I.push(S)),k=S)}i(h,A,I,a,x)}},te.clean=function(h,p,a,x){var l,w,_,T=x._plots||{},k=p._plots||{},L=x._subplots||{};if(x._hasOnlyLargeSploms&&!p._hasOnlyLargeSploms)for(_ in T)(l=T[_]).plotgroup&&l.plotgroup.remove();var A=x._has&&x._has("gl"),I=p._has&&p._has("gl");if(A&&!I)for(_ in T)(l=T[_])._scene&&l._scene.destroy();if(L.xaxis&&L.yaxis){var P=t.listIds({_fullLayout:x});for(w=0;w<P.length;w++){var S=P[w];p[t.id2name(S)]||x._infolayer.selectAll(".g-"+S+"title").remove()}}var E=x._has&&x._has("cartesian"),D=p._has&&p._has("cartesian");if(E&&!D)f(x._cartesianlayer.selectAll(".subplot"),x),x._defs.selectAll(".axesclip").remove(),delete x._axisConstraintGroups,delete x._axisMatchGroups;else if(L.cartesian)for(w=0;w<L.cartesian.length;w++){var F=L.cartesian[w];if(!k[F]){var H="."+F+",."+F+"-x,."+F+"-y";x._cartesianlayer.selectAll(H).remove(),s(F,x)}}},te.drawFramework=function(h){var p=h._fullLayout,a=function(l){var w,_,T,k,L,A,I=l._fullLayout,P=I._subplots.cartesian,S=P.length,E=[],D=[];for(w=0;w<S;w++){T=P[w],k=I._plots[T],L=k.xaxis,A=k.yaxis;var F=L._mainAxis,H=A._mainAxis,V=F._id+H._id,Z=I._plots[V];k.overlays=[],V!==T&&Z?(k.mainplot=V,k.mainplotinfo=Z,D.push(T)):(k.mainplot=void 0,k.mainplotinfo=void 0,E.push(T))}for(w=0;w<D.length;w++)T=D[w],(k=I._plots[T]).mainplotinfo.overlays.push(k);
1216var K=E.concat(D),q=new Array(S);for(w=0;w<S;w++){T=K[w],k=I._plots[T],L=k.xaxis,A=k.yaxis;var W=[T,L.layer,A.layer,L.overlaying||"",A.overlaying||""];for(_=0;_<k.overlays.length;_++)W.push(k.overlays[_].id);q[w]=W}return q}(h),x=p._cartesianlayer.selectAll(".subplot").data(a,String);x.enter().append("g").attr("class",function(l){return"subplot "+l[0]}),x.order(),x.exit().call(f,p),x.each(function(l){var w=l[0],_=p._plots[w];_.plotgroup=g.select(this),u(h,_),_.draglayer=d(p._draggers,"g",w)})},te.rangePlot=function(h,p,a){u(h,p),i(h,p,a),v.style(h)},te.toSVG=function(h){var p=h._fullLayout._glimages,a=g.select(h).selectAll(".svg-container");a.filter(function(x,l){return l===a.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var x=this.toDataURL("image/png");p.append("svg:image").attr({xmlns:r.svg,"xlink:href":x,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})})},te.updateFx=y("./graph_interact").updateFx},{"../../components/drawing":388,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../registry":638,"../get_data":593,"../plots":619,"./attributes":552,"./axis_ids":558,"./constants":561,"./graph_interact":564,"./layout_attributes":569,"./layout_defaults":570,"./transition_axes":581,"@plotly/d3":58}],569:[function(y,ee,te){var g=y("../font_attributes"),m=y("../../components/color/attributes"),b=y("../../components/drawing/attributes").dash,v=y("../../lib/extend").extendFlat,e=y("../../plot_api/plot_template").templatedArray,n=y("../../plots/cartesian/axis_format_attributes").descriptionWithDates,t=y("../../constants/numerical").ONEDAY,o=y("./constants"),r=o.HOUR_PATTERN,d=o.WEEKDAY_PATTERN;ee.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:m.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:g({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},scaleanchor:{valType:"enumerated",values:[o.idRegex.x.toString(),o.idRegex.y.toString()],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[o.idRegex.x.toString(),o.idRegex.y.toString()],editType:"calc"},rangebreaks:e("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[d,r,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:t},editType:"calc"}),tickmode:{valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:"integer",min:0,dflt:0,editType:"ticks"},tick0:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},dtick:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:{valType:"data_array",editType:"ticks"},ticktext:{valType:"data_array",editType:"ticks"},ticks:{valType:"enumerated",values:["outside","inside",""],editType:"ticks"}
1216,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:{valType:"number",min:0,dflt:5,editType:"ticks"},tickwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},tickcolor:{valType:"color",dflt:m.defaultLine,editType:"ticks"},showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},automargin:{valType:"boolean",dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:v({},b,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:g({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:n("tick label")},tickformatstops:e("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:n("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:m.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:{valType:"boolean",editType:"ticks"},gridcolor:{valType:"color",dflt:m.lightLine,editType:"ticks"},gridwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:m.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:m.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",o.idRegex.x.toString(),o.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",o.idRegex.x.toString(),o.idRegex.y.toString()],editType:"plot"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:g({editType:"ticks"})}}},{"../../components/color/attributes":365,"../../components/drawing/attributes":387,"../../constants/numerical":479,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_format_attributes":557,"../font_attributes":585,"./constants":561}],570:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color"),b=y("../../components/fx/helpers").isUnifiedHover,v=y("../../components/fx/hovermode_defaults"),e=y("../../plot_api/plot_template"),n=y("../layout_attributes"),t=y("./layout_attributes"),o=y("./type_defaults"),r=y("./axis_defaults"),d=y("./constraints"),c=y("./position_defaults"),i=y("./axis_ids"),u=i.id2name,f=i.name2id,s=y("./constants").AX_ID_PATTERN,h=y("../../registry"),p=h.traceIs,a=h.getComponentMethod;function x(l,w,_){Array.isArray(l[w])?l[w].push(_):l[w]=[_]}ee.exports=function(l,w,_){var T,k,L=w.autotypenumbers,A={},I={},P={},S={},E={},D={},F={},H={},V={},Z={};for(T=0;T<_.length;T++){var K=_[T];if(p(K,"cartesian")||p(K,"gl2d")){var q,W;if(K.xaxis)q=u(K.xaxis),x(A,q,K);else if(K.xaxes)for(k=0;k<K.xaxes.length;k++)x(A,u(K.xaxes[k]),K);if(K.yaxis)W=u(K.yaxis),x(A,W,K);else if(K.yaxes)for(k=0;k<K.yaxes.length;k++)x(A,u(K.yaxes[k]),K);K.type==="funnel"?K.orientation==="h"?(q&&(I[q]=!0),W&&(F[W]=!0)):W&&(P[W]=!0):K.type==="image"?(W&&(H[W]=!0),q&&(H[q]=!0)):(W&&(E[W]=!0,D[W]=!0),p(K,"carpet")&&(K.type!=="carpet"||K._cheater)||q&&(S[q]=!0)),K.type==="carpet"&&K._cheater&&q&&(I[q]=!0),p(K,"2dMap")&&(V[q]=!0,V[W]=!0),p(K,"oriented")&&(Z[K.orientation==="h"?W:q]=!0)}}var $=w._subplots,R=$.xaxis,N=$.yaxis,U=g.simpleMap(R,u),Q=g.simpleMap(N,u),j=U.concat(Q),X=m.background;R.length&&N.length&&(X=g.coerce(l,w,n,"plot_bgcolor"));var J,re,ne,se,oe,pe=m.combine(X,w.paper_bgcolor);function ce(){var et=A[J]||[];oe._traceIndices=et.map(function(Tt){return Tt._expandedIndex}),oe._annIndices=[],oe._shapeIndices=[],oe._imgIndices=[],oe._subplotsWith=[],oe._counterAxes=[],oe._name=oe._attr=J,oe._id=re}function de(et,Tt){return g.coerce(se,oe,t,et,Tt)}function xe(et,Tt){return g.coerce2(se,oe,t,et,Tt)}function we(et){return et==="x"?N:R}function be(et,Tt){for(var Vt=et==="x"?U:Q,Kt=[],Be=0;Be<Vt.length;Be++){var qe=Vt[Be];qe===Tt||(l[qe]||{}).overlaying||Kt.push(f(qe))}return Kt}var Ee={x:we("x"),y:we("y")},fe=Ee.x.concat(Ee.y),me={},Te=[];function _e(){var et=se.matches;s.test(et)&&fe.indexOf(et)===-1&&(me[et]=se.type,Te=Object.keys(me))}var Ae=v(l,w),Pe=b(Ae);for(T=0;T<j.length;T++){J=j[T],re=f(J),ne=J.charAt(0),g.isPlainObject(l[J])||(l[J]={}),se=l[J],oe=e.newContainer(w,J,ne+"axis"),ce();var De=ne==="x"&&!S[J]&&I[J]||ne==="y"&&!E[J]&&P[J],Ve=ne==="y"&&(!D[J]&&F[J]||H[J]),Qe={letter:ne,font:w.font,outerTicks:V[J],showGrid:!Z[J],data:A[J]||[],bgColor:pe,calendar:w.calendar,automargin:!0,visibleDflt:De,reverseDflt:Ve,autotypenumbersDflt:L,splomStash:((w._splomAxes||{})[ne]||{})[re]};de("uirevision",w.uirevision),o(se,oe,de,Qe),r(se,oe,de,Qe,w);var Oe=Pe&&ne===Ae.charAt(0),Ue=xe("spikecolor",Pe?oe.color:void 0),Ge=xe("spikethickness",Pe?1.5:void 0),Ye=xe("spikedash",Pe?"dot":void 0),tt=xe("spikemode",Pe?"across":void 0),lt=xe("spikesnap");de("showspikes",!!(Oe||Ue||Ge||Ye||tt||lt))||(delete oe.spikecolor,delete oe.spikethickness,delete oe.spikedash,delete oe.spikemode,delete oe.spikesnap),c(se,oe,de,{letter:ne,counterAxes:Ee[ne],overlayableAxes:be(ne,J),grid:w.grid}),de("title.standoff"),_e(),oe._input=se}for(T=0;T<Te.length;){re=Te[T++],ne=(J=u(re)).charAt(0),g.isPlainObject(l[J])||(l[J]={}),se=l[J],oe=e.newContainer(w,J,ne+"axis"),ce();var vt={letter:ne,font:w.font,outerTicks:V[J],showGrid:!Z[J],data:[],bgColor:pe,calendar:w.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:L,splomStash:((w._splomAxes||{})[ne]||{})[re]};de("uirevision",w.uirevision),oe.type=me[re]||"linear",r(se,oe,de,vt,w),c(se,oe,de,{letter:ne,counterAxes:Ee[ne],overlayableAxes:be(ne,J),grid:w.grid}),de("fixedrange"),_e(),oe._input=se}var It=a("rangeslider","handleDefaults"),St=a("rangeselector","handleDefaults");for(T=0;T<U.length;T++)J=U[T],se=l[J],oe=w[J],It(l,w,J),oe.type==="date"&&St(se,oe,w,Q,oe.calendar),de("fixedrange");for(T=0;T<Q.length;T++){J=Q[T],se=l[J],oe=w[J];var rt=w[u(oe.anchor)];de("fixedrange",a("rangeslider","isVisible")(rt))}d.handleDefaults(l,w,{axIds:fe.concat(Te).sort(i.idSort),axHasImage:H})}},{"../../components/color":366,"../../components/fx/helpers":402,"../../components/fx/hovermode_defaults":405,"../../lib":503,"../../plot_api/plot_template":543,"../../registry":638,"../layout_attributes":610,"./axis_defaults":556,"./axis_ids":558,"./constants":561,"./constraints":562,"./layout_attributes":569,"./position_defaults":572,"./type_defaults":582}],571:[function(y,ee,te){var g=y("tinycolor2").mix,m=y("../../components/color/attributes").lightFraction,b=y("../../lib");ee.exports=function(v,e,n,t){var o=(t=t||{}).dfltColor;function r(h,p){return b.coerce2(v,e,t.attributes,h,p)}var d=r("linecolor",o),c=r("linewidth");n("showline",t.showLine||!!d||!!c)||(delete e.linecolor,delete e.linewidth);var i=r("gridcolor",g(o,t.bgColor,t.blend||m).toRgbString()),u=r("gridwidth");if(n("showgrid",t.showGrid||!!i||!!u)||(delete e.gridcolor,delete e.gridwidth),!t.noZeroLine){var f=r("zerolinecolor",o),s=r("zerolinewidth");n("zeroline",t.showGrid||!!f||!!s)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},{"../../components/color/attributes":365,"../../lib":503,tinycolor2:312}],572:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib");
1216ee.exports=function(b,v,e,n){var t,o,r,d,c=n.counterAxes||[],i=n.overlayableAxes||[],u=n.letter,f=n.grid;f&&(o=f._domains[u][f._axisMap[v._id]],t=f._anchors[v._id],o&&(r=f[u+"side"].split(" ")[0],d=f.domain[u][r==="right"||r==="top"?1:0])),o=o||[0,1],t=t||(g(b.position)?"free":c[0]||"free"),r=r||(u==="x"?"bottom":"left"),d=d||0,m.coerce(b,v,{anchor:{valType:"enumerated",values:["free"].concat(c),dflt:t}},"anchor")==="free"&&e("position",d),m.coerce(b,v,{side:{valType:"enumerated",values:u==="x"?["bottom","top"]:["left","right"],dflt:r}},"side");var s=!1;if(i.length&&(s=m.coerce(b,v,{overlaying:{valType:"enumerated",values:[!1].concat(i),dflt:!1}},"overlaying")),!s){var h=e("domain",o);h[0]>h[1]-1/4096&&(v.domain=o),m.noneOrAll(b.domain,v.domain,o)}return e("layer"),v}},{"../../lib":503,"fast-isnumeric":190}],573:[function(y,ee,te){var g=y("./show_dflt");ee.exports=function(m,b,v,e,n){n||(n={});var t=n.tickSuffixDflt,o=g(m);v("tickprefix")&&v("showtickprefix",o),v("ticksuffix",t)&&v("showticksuffix",o)}},{"./show_dflt":577}],574:[function(y,ee,te){var g=y("../../constants/alignment").FROM_BL;ee.exports=function(m,b,v){v===void 0&&(v=g[m.constraintoward||"center"]);var e=[m.r2l(m.range[0]),m.r2l(m.range[1])],n=e[0]+(e[1]-e[0])*v;m.range=m._input.range=[m.l2r(n+(e[0]-n)*b),m.l2r(n+(e[1]-n)*b)],m.setScale()}},{"../../constants/alignment":471}],575:[function(y,ee,te){var g=y("polybooljs"),m=y("../../registry"),b=y("../../components/drawing").dashStyle,v=y("../../components/color"),e=y("../../components/fx"),n=y("../../components/fx/helpers").makeEventData,t=y("../../components/dragelement/helpers"),o=t.freeMode,r=t.rectMode,d=t.drawMode,c=t.openMode,i=t.selectMode,u=y("../../components/shapes/draw_newshape/display_outlines"),f=y("../../components/shapes/draw_newshape/helpers").handleEllipse,s=y("../../components/shapes/draw_newshape/newshapes"),h=y("../../lib"),p=y("../../lib/polygon"),a=y("../../lib/throttle"),x=y("./axis_ids").getFromId,l=y("../../lib/clear_gl_canvases"),w=y("../../plot_api/subroutines").redrawReglTraces,_=y("./constants"),T=_.MINSELECT,k=p.filter,L=p.tester,A=y("./handle_outline").clearSelect,I=y("./helpers"),P=I.p2r,S=I.axValue,E=I.getTransform;function D(U,Q,j,X,J,re,ne){var se,oe,pe,ce,de,xe,we,be,Ee,fe=Q._hoverdata,me=Q._fullLayout.clickmode.indexOf("event")>-1,Te=[];if(function(Ve){return Ve&&Array.isArray(Ve)&&Ve[0].hoverOnBox!==!0}(fe)){Z(U,Q,re);var _e=function(Ve,Qe){var Oe,Ue,Ge=Ve[0],Ye=-1,tt=[];for(Ue=0;Ue<Qe.length;Ue++)if(Oe=Qe[Ue],Ge.fullData._expandedIndex===Oe.cd[0].trace._expandedIndex){if(Ge.hoverOnBox===!0)break;Ge.pointNumber!==void 0?Ye=Ge.pointNumber:Ge.binNumber!==void 0&&(Ye=Ge.binNumber,tt=Ge.pointNumbers);break}return{pointNumber:Ye,pointNumbers:tt,searchInfo:Oe}}(fe,se=q(Q,j,X,J));if(_e.pointNumbers.length>0?function(Ve,Qe){var Oe,Ue,Ge,Ye=[];for(Ge=0;Ge<Ve.length;Ge++)(Oe=Ve[Ge]).cd[0].trace.selectedpoints&&Oe.cd[0].trace.selectedpoints.length>0&&Ye.push(Oe);if(Ye.length===1&&Ye[0]===Qe.searchInfo&&(Ue=Qe.searchInfo.cd[0].trace).selectedpoints.length===Qe.pointNumbers.length){for(Ge=0;Ge<Qe.pointNumbers.length;Ge++)if(Ue.selectedpoints.indexOf(Qe.pointNumbers[Ge])<0)return!1;return!0}return!1}(se,_e):function(Ve){var Qe,Oe,Ue,Ge=0;for(Ue=0;Ue<Ve.length;Ue++)if(Qe=Ve[Ue],(Oe=Qe.cd[0].trace).selectedpoints&&(Oe.selectedpoints.length>1||(Ge+=Oe.selectedpoints.length)>1))return!1;return Ge===1}(se)&&(xe=W(_e))){for(ne&&ne.remove(),Ee=0;Ee<se.length;Ee++)(oe=se[Ee])._module.selectPoints(oe,!1);$(Q,se),K(re),me&&Q.emit("plotly_deselect",null)}else{for(we=U.shiftKey&&(xe!==void 0?xe:W(_e)),pe=function(Ve,Qe,Oe){return{pointNumber:Ve,searchInfo:Qe,subtract:Oe}}(_e.pointNumber,_e.searchInfo,we),ce=V(re.selectionDefs.concat([pe])),Ee=0;Ee<se.length;Ee++)if(de=R(se[Ee]._module.selectPoints(se[Ee],ce),se[Ee]),Te.length)for(var Ae=0;Ae<de.length;Ae++)Te.push(de[Ae]);else Te=de;if($(Q,se,be={points:Te}),pe&&re&&re.selectionDefs.push(pe),ne){var Pe=re.mergedPolygons,De=c(re.dragmode);u(N(Pe,De),ne,re)}me&&Q.emit("plotly_selected",be)}}}function F(U){return"pointNumber"in U&&"searchInfo"in U}function H(U){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Q,j,X,J){var re=U.searchInfo.cd[0].trace._expandedIndex;return J.cd[0].trace._expandedIndex===re&&X===U.pointNumber},isRect:!1,degenerate:!1,subtract:U.subtract}}function V(U){for(var Q=[],j=F(U[0])?0:U[0][0][0],X=j,J=F(U[0])?0:U[0][0][1],re=J,ne=0;ne<U.length;ne++)if(F(U[ne]))Q.push(H(U[ne]));else{var se=p.tester(U[ne]);se.subtract=U[ne].subtract,Q.push(se),j=Math.min(j,se.xmin),X=Math.max(X,se.xmax),J=Math.min(J,se.ymin),re=Math.max(re,
1216se.ymax)}return{xmin:j,xmax:X,ymin:J,ymax:re,pts:[],contains:function(oe,pe,ce,de){for(var xe=!1,we=0;we<Q.length;we++)Q[we].contains(oe,pe,ce,de)&&(xe=Q[we].subtract===!1);return xe},isRect:!1,degenerate:!1}}function Z(U,Q,j){Q._fullLayout._drawing=!1;var X=Q._fullLayout,J=j.plotinfo,re=j.dragmode,ne=X._lastSelectedSubplot&&X._lastSelectedSubplot===J.id,se=(U.shiftKey||U.altKey)&&!(d(re)&&c(re));ne&&se&&J.selection&&J.selection.selectionDefs&&!j.selectionDefs?(j.selectionDefs=J.selection.selectionDefs,j.mergedPolygons=J.selection.mergedPolygons):se&&J.selection||K(j),ne||(A(Q),X._lastSelectedSubplot=J.id)}function K(U){var Q=U.dragmode,j=U.plotinfo,X=U.gd;if(X._fullLayout._activeShapeIndex>=0&&X._fullLayout._deactivateShape(X),d(Q)){var J=X._fullLayout._zoomlayer.selectAll(".select-outline-"+j.id);if(J&&X._fullLayout._drawing){var re=s(J,U);re&&m.call("_guiRelayout",X,{shapes:re}),X._fullLayout._drawing=!1}}j.selection={},j.selection.selectionDefs=U.selectionDefs=[],j.selection.mergedPolygons=U.mergedPolygons=[]}function q(U,Q,j,X){var J,re,ne,se=[],oe=Q.map(function(we){return we._id}),pe=j.map(function(we){return we._id});for(ne=0;ne<U.calcdata.length;ne++)if((re=(J=U.calcdata[ne])[0].trace).visible===!0&&re._module&&re._module.selectPoints)if(!X||re.subplot!==X&&re.geo!==X)if(re.type==="splom"&&re._xaxes[oe[0]]&&re._yaxes[pe[0]]){var ce=xe(re._module,J,Q[0],j[0]);ce.scene=U._fullLayout._splomScenes[re.uid],se.push(ce)}else if(re.type==="sankey"){var de=xe(re._module,J,Q[0],j[0]);se.push(de)}else{if(oe.indexOf(re.xaxis)===-1||pe.indexOf(re.yaxis)===-1)continue;se.push(xe(re._module,J,x(U,re.xaxis),x(U,re.yaxis)))}else se.push(xe(re._module,J,Q[0],j[0]));return se;function xe(we,be,Ee,fe){return{_module:we,cd:be,xaxis:Ee,yaxis:fe}}}function W(U){var Q=U.searchInfo.cd[0].trace,j=U.pointNumber,X=U.pointNumbers,J=X.length>0?X[0]:j;return!!Q.selectedpoints&&Q.selectedpoints.indexOf(J)>-1}function $(U,Q,j){var X,J,re,ne;for(X=0;X<Q.length;X++){var se=Q[X].cd[0].trace._fullInput,oe=U._fullLayout._tracePreGUI[se.uid]||{};oe.selectedpoints===void 0&&(oe.selectedpoints=se._input.selectedpoints||null)}if(j){var pe=j.points||[];for(X=0;X<Q.length;X++)(ne=Q[X].cd[0].trace)._input.selectedpoints=ne._fullInput.selectedpoints=[],ne._fullInput!==ne&&(ne.selectedpoints=[]);for(X=0;X<pe.length;X++){var ce=pe[X],de=ce.data,xe=ce.fullData;ce.pointIndices?([].push.apply(de.selectedpoints,ce.pointIndices),ne._fullInput!==ne&&[].push.apply(xe.selectedpoints,ce.pointIndices)):(de.selectedpoints.push(ce.pointIndex),ne._fullInput!==ne&&xe.selectedpoints.push(ce.pointIndex))}}else for(X=0;X<Q.length;X++)delete(ne=Q[X].cd[0].trace).selectedpoints,delete ne._input.selectedpoints,ne._fullInput!==ne&&delete ne._fullInput.selectedpoints;var we=!1;for(X=0;X<Q.length;X++){ne=(re=(J=Q[X]).cd)[0].trace,m.traceIs(ne,"regl")&&(we=!0);var be=J._module,Ee=be.styleOnSelect||be.style;Ee&&(Ee(U,re,re[0].node3),re[0].nodeRangePlot3&&Ee(U,re,re[0].nodeRangePlot3))}we&&(l(U),w(U))}function R(U,Q){if(Array.isArray(U))for(var j=Q.cd,X=Q.cd[0].trace,J=0;J<U.length;J++)U[J]=n(U[J],X,j);return U}function N(U,Q){for(var j=[],X=0;X<U.length;X++){j[X]=[];for(var J=0;J<U[X].length;J++){j[X][J]=[],j[X][J][0]=J?"L":"M";for(var re=0;re<U[X][J].length;re++)j[X][J].push(U[X][J][re])}Q||j[X].push(["Z",j[X][0][1],j[X][0][2]])}return j}ee.exports={prepSelect:function(U,Q,j,X,J){var re=o(J),ne=r(J),se=c(J),oe=d(J),pe=i(J),ce=J==="drawcircle",de=J==="drawline"||ce,xe=X.gd,we=xe._fullLayout,be=we._zoomlayer,Ee=X.element.getBoundingClientRect(),fe=X.plotinfo,me=E(fe),Te=Q-Ee.left,_e=j-Ee.top;we._calcInverseTransform(xe);var Ae=h.apply3DTransform(we._invTransform)(Te,_e);Te=Ae[0],_e=Ae[1];var Pe,De,Ve,Qe,Oe,Ue,Ge,Ye=we._invScaleX,tt=we._invScaleY,lt=Te,vt=_e,It="M"+Te+","+_e,St=X.xaxes[0]._length,rt=X.yaxes[0]._length,et=X.xaxes.concat(X.yaxes),Tt=U.altKey&&!(d(J)&&se);Z(U,xe,X),re&&(Pe=k([[Te,_e]],_.BENDPX));var Vt=be.selectAll("path.select-outline-"+fe.id).data(oe?[0]:[1,2]),Kt=we.newshape;Vt.enter().append("path").attr("class",function(Ie){return"select-outline select-outline-"+Ie+" select-outline-"+fe.id}).style(oe?{opacity:Kt.opacity/2,fill:se?void 0:Kt.fillcolor,stroke:Kt.line.color,"stroke-dasharray":b(Kt.line.dash,Kt.line.width),"stroke-width":Kt.line.width+"px"}:{}).attr("fill-rule",Kt.fillrule).classed("cursor-move",!!oe).attr("transform",me).attr("d",It+"Z");var Be,qe=be.append("path").attr("class","zoombox-corners").style({fill:v.background,stroke:v.defaultLine,"stroke-width":1}).attr("transform",me).attr("d","M0,0Z"),Re=we._uid+_.SELECTID,Xe=[],ke=q(xe,X.xaxes,X.yaxes,X.subplot);function Le(Ie,Ce){return Ie-Ce}Be=fe.fillRangeItems?fe.fillRangeItems:ne?function(Ie,Ce){var Je=Ie.range={};for(Oe=0;Oe<et.length;Oe++){var it=et[Oe],ht=it._id.charAt(0);Je[it._id]=[P(it,Ce[ht+"min"]),P(it,Ce[ht+"max"])].sort(Le)}}:function(Ie,Ce,Je){var it=Ie.lassoPoints={};for(Oe=0;Oe<et.length;Oe++){var ht=et[Oe];it[ht._id]=Je.filtered.map(S(ht))}},X.moveFn=function(Ie,Ce){lt=Math.max(0,Math.min(St,Ye*Ie+Te)),vt=Math.max(0,Math.min(rt,tt*Ce+_e));var Je=Math.abs(lt-Te),it=Math.abs(vt-_e);if(ne){var ht,ut,kt;if(pe){var ot=we.selectdirection;
1216switch(ht=ot==="any"?it<Math.min(.6*Je,T)?"h":Je<Math.min(.6*it,T)?"v":"d":ot){case"h":ut=ce?rt/2:0,kt=rt;break;case"v":ut=ce?St/2:0,kt=St}}if(oe)switch(we.newshape.drawdirection){case"vertical":ht="h",ut=ce?rt/2:0,kt=rt;break;case"horizontal":ht="v",ut=ce?St/2:0,kt=St;break;case"ortho":Je<it?(ht="h",ut=_e,kt=vt):(ht="v",ut=Te,kt=lt);break;default:ht="d"}ht==="h"?((Qe=de?f(ce,[lt,ut],[lt,kt]):[[Te,ut],[Te,kt],[lt,kt],[lt,ut]]).xmin=de?lt:Math.min(Te,lt),Qe.xmax=de?lt:Math.max(Te,lt),Qe.ymin=Math.min(ut,kt),Qe.ymax=Math.max(ut,kt),qe.attr("d","M"+Qe.xmin+","+(_e-T)+"h-4v"+2*T+"h4ZM"+(Qe.xmax-1)+","+(_e-T)+"h4v"+2*T+"h-4Z")):ht==="v"?((Qe=de?f(ce,[ut,vt],[kt,vt]):[[ut,_e],[ut,vt],[kt,vt],[kt,_e]]).xmin=Math.min(ut,kt),Qe.xmax=Math.max(ut,kt),Qe.ymin=de?vt:Math.min(_e,vt),Qe.ymax=de?vt:Math.max(_e,vt),qe.attr("d","M"+(Te-T)+","+Qe.ymin+"v-4h"+2*T+"v4ZM"+(Te-T)+","+(Qe.ymax-1)+"v4h"+2*T+"v-4Z")):ht==="d"&&((Qe=de?f(ce,[Te,_e],[lt,vt]):[[Te,_e],[Te,vt],[lt,vt],[lt,_e]]).xmin=Math.min(Te,lt),Qe.xmax=Math.max(Te,lt),Qe.ymin=Math.min(_e,vt),Qe.ymax=Math.max(_e,vt),qe.attr("d","M0,0Z"))}else re&&(Pe.addPt([lt,vt]),Qe=Pe.filtered);X.selectionDefs&&X.selectionDefs.length?(Ve=function(Lt,Et,Ze){return Ze?g.difference({regions:Lt,inverted:!1},{regions:[Et],inverted:!1}).regions:g.union({regions:Lt,inverted:!1},{regions:[Et],inverted:!1}).regions}(X.mergedPolygons,Qe,Tt),Qe.subtract=Tt,De=V(X.selectionDefs.concat([Qe]))):(Ve=[Qe],De=L(Qe)),u(N(Ve,se),Vt,X),pe&&a.throttle(Re,_.SELECTDELAY,function(){var Lt;Xe=[];var Et;for(Oe=0;Oe<ke.length;Oe++)if(Et=(Ue=ke[Oe])._module.selectPoints(Ue,De),Lt=R(Et,Ue),Xe.length)for(var Ze=0;Ze<Lt.length;Ze++)Xe.push(Lt[Ze]);else Xe=Lt;$(xe,ke,Ge={points:Xe}),Be(Ge,Qe,Pe),X.gd.emit("plotly_selecting",Ge)})},X.clickFn=function(Ie,Ce){if(qe.remove(),xe._fullLayout._activeShapeIndex>=0)xe._fullLayout._deactivateShape(xe);else if(!oe){var Je=we.clickmode;a.done(Re).then(function(){if(a.clear(Re),Ie===2){for(Vt.remove(),Oe=0;Oe<ke.length;Oe++)(Ue=ke[Oe])._module.selectPoints(Ue,!1);$(xe,ke),K(X),xe.emit("plotly_deselect",null)}else Je.indexOf("select")>-1&&D(Ce,xe,X.xaxes,X.yaxes,X.subplot,X,Vt),Je==="event"&&xe.emit("plotly_selected",void 0);e.click(xe,Ce)}).catch(h.error)}},X.doneFn=function(){qe.remove(),a.done(Re).then(function(){a.clear(Re),X.gd.emit("plotly_selected",Ge),Qe&&X.selectionDefs&&(Qe.subtract=Tt,X.selectionDefs.push(Qe),X.mergedPolygons.length=0,[].push.apply(X.mergedPolygons,Ve)),X.doneFnCompleted&&X.doneFnCompleted(Xe)}).catch(h.error),oe&&K(X)}},clearSelect:A,clearSelectionsCache:K,selectOnClick:D}},{"../../components/color":366,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../components/fx/helpers":402,"../../components/shapes/draw_newshape/display_outlines":454,"../../components/shapes/draw_newshape/helpers":455,"../../components/shapes/draw_newshape/newshapes":456,"../../lib":503,"../../lib/clear_gl_canvases":487,"../../lib/polygon":515,"../../lib/throttle":530,"../../plot_api/subroutines":544,"../../registry":638,"./axis_ids":558,"./constants":561,"./handle_outline":565,"./helpers":566,polybooljs:254}],576:[function(y,ee,te){var g=y("@plotly/d3"),m=y("d3-time-format").utcFormat,b=y("../../lib"),v=b.numberFormat,e=y("fast-isnumeric"),n=b.cleanNumber,t=b.ms2DateTime,o=b.dateTime2ms,r=b.ensureNumber,d=b.isArrayOrTypedArray,c=y("../../constants/numerical"),i=c.FP_SAFE,u=c.BADNUM,f=c.LOG_CLIP,s=c.ONEWEEK,h=c.ONEDAY,p=c.ONEHOUR,a=c.ONEMIN,x=c.ONESEC,l=y("./axis_ids"),w=y("./constants"),_=w.HOUR_PATTERN,T=w.WEEKDAY_PATTERN;function k(A){return Math.pow(10,A)}function L(A){return A!=null}ee.exports=function(A,I){I=I||{};var P=A._id||"x",S=P.charAt(0);function E(j,X){if(j>0)return Math.log(j)/Math.LN10;if(j<=0&&X&&A.range&&A.range.length===2){var J=A.range[0],re=A.range[1];return .5*(J+re-2*f*Math.abs(J-re))}return u}function D(j,X,J,re){if((re||{}).msUTC&&e(j))return+j;var ne=o(j,J||A.calendar);if(ne===u){if(!e(j))return u;j=+j;var se=Math.floor(10*b.mod(j+.05,1)),oe=Math.round(j-se/10);ne=o(new Date(oe))+se/10}return ne}function F(j,X,J){return t(j,X,J||A.calendar)}function H(j){return A._categories[Math.round(j)]}
vendor: 4,607 bytes, line 1216
1216function V(j){if(L(j)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[j]!==void 0)return A._categoriesMap[j];A._categories.push(typeof j=="number"?String(j):j);var X=A._categories.length-1;return A._categoriesMap[j]=X,X}return u}function Z(j){if(A._categoriesMap)return A._categoriesMap[j]}function K(j){var X=Z(j);return X!==void 0?X:e(j)?+j:void 0}function q(j){return e(j)?+j:Z(j)}function W(j,X,J){return g.round(J+X*j,2)}function $(j,X,J){return(j-J)/X}var R=function(j){return e(j)?W(j,A._m,A._b):u},N=function(j){return $(j,A._m,A._b)};if(A.rangebreaks){var U=S==="y";R=function(j){if(!e(j))return u;var X=A._rangebreaks.length;if(!X)return W(j,A._m,A._b);var J=U;A.range[0]>A.range[1]&&(J=!J);for(var re=J?-1:1,ne=re*j,se=0,oe=0;oe<X;oe++){var pe=re*A._rangebreaks[oe].min,ce=re*A._rangebreaks[oe].max;if(ne<pe)break;if(!(ne>ce)){se=ne<(pe+ce)/2?oe:oe+1;break}se=oe+1}var de=A._B[se]||0;return isFinite(de)?W(j,A._m2,de):0},N=function(j){var X=A._rangebreaks.length;if(!X)return $(j,A._m,A._b);for(var J=0,re=0;re<X&&!(j<A._rangebreaks[re].pmin);re++)j>A._rangebreaks[re].pmax&&(J=re+1);return $(j,A._m2,A._B[J])}}A.c2l=A.type==="log"?E:r,A.l2c=A.type==="log"?k:r,A.l2p=R,A.p2l=N,A.c2p=A.type==="log"?function(j,X){return R(E(j,X))}:R,A.p2c=A.type==="log"?function(j){return k(N(j))}:N,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=n,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(j){return A.l2p(n(j))},A.p2d=A.p2r=N,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(j,X){return E(n(j),X)},A.r2d=A.r2c=function(j){return k(n(j))},A.d2c=A.r2l=n,A.c2d=A.l2r=r,A.c2r=E,A.l2d=k,A.d2p=function(j,X){return A.l2p(A.d2r(j,X))},A.p2d=function(j){return k(N(j))},A.r2p=function(j){return A.l2p(n(j))},A.p2r=N,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=b.identity,A.d2c=A.r2c=A.d2l=A.r2l=D,A.c2d=A.c2r=A.l2d=A.l2r=F,A.d2p=A.r2p=function(j,X,J){return A.l2p(D(j,0,J))},A.p2d=A.p2r=function(j,X,J){return F(N(j),X,J)},A.cleanPos=function(j){return b.cleanDate(j,u,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=V,A.r2d=A.c2d=A.l2d=H,A.d2r=A.d2l_noadd=K,A.r2c=function(j){var X=q(j);return X!==void 0?X:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=q,A.d2p=function(j){return A.l2p(A.r2c(j))},A.p2d=function(j){return H(N(j))},A.r2p=A.d2p,A.p2r=N,A.cleanPos=function(j){return typeof j=="string"&&j!==""?j:r(j)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=H,A.d2r=A.d2l_noadd=K,A.r2c=function(j){var X=K(j);return X!==void 0?X:A.fraction2r(.5)},A.r2c_just_indices=Z,A.l2r=A.c2r=r,A.r2l=K,A.d2p=function(j){return A.l2p(A.r2c(j))},A.p2d=function(j){return H(N(j))},A.r2p=A.d2p,A.p2r=N,A.cleanPos=function(j){return Array.isArray(j)||typeof j=="string"&&j!==""?j:r(j)},A.setupMultiCategory=function(j){var X,J,re=A._traceIndices,ne=A._matchGroup;if(ne&&A._categories.length===0){for(var se in ne)if(se!==P){var oe=I[l.id2name(se)];re=re.concat(oe._traceIndices)}}var pe=[[0,{}],[0,{}]],ce=[];for(X=0;X<re.length;X++){var de=j[re[X]];if(S in de){var xe=de[S],we=de._length||b.minRowLength(xe);if(d(xe[0])&&d(xe[1]))for(J=0;J<we;J++){var be=xe[0][J],Ee=xe[1][J];L(be)&&L(Ee)&&(ce.push([be,Ee]),be in pe[0][1]||(pe[0][1][be]=pe[0][0]++),Ee in pe[1][1]||(pe[1][1][Ee]=pe[1][0]++))}}}for(ce.sort(function(fe,me){var Te=pe[0][1],_e=Te[fe[0]]-Te[me[0]];if(_e)return _e;var Ae=pe[1][1];return Ae[fe[1]]-Ae[me[1]]}),X=0;X<ce.length;X++)V(ce[X])}),A.fraction2r=function(j){var X=A.r2l(A.range[0]),J=A.r2l(A.range[1]);return A.l2r(X+j*(J-X))},A.r2fraction=function(j){var X=A.r2l(A.range[0]),J=A.r2l(A.range[1]);return(A.r2l(j)-X)/(J-X)},A.cleanRange=function(j,X){X||(X={}),j||(j="range");var J,re,ne=b.nestedProperty(A,j).get();if(re=(re=A.type==="date"?b.dfltRange(A.calendar):S==="y"?w.DFLTRANGEY:A._name==="realaxis"?[0,1]:X.dfltRange||w.DFLTRANGEX).slice(),A.rangemode!=="tozero"&&A.rangemode!=="nonnegative"||(re[0]=0),ne&&ne.length===2)for(A.type!=="date"||A.autorange||(ne[0]=b.cleanDate(ne[0],u,A.calendar),ne[1]=b.cleanDate(ne[1],u,A.calendar)),J=0;J<2;J++)if(A.type==="date"){if(!b.isDateTime(ne[J],A.calendar)){A[j]=re;break}if(A.r2l(ne[0])===A.r2l(ne[1])){var se=b.constrain(A.r2l(ne[0]),b.MIN_MS+1e3,b.MAX_MS-1e3);ne[0]=A.l2r(se-1e3),ne[1]=A.l2r(se+1e3);break}}else{if(!e(ne[J])){if(!e(ne[1-J])){A[j]=re;break}ne[J]=ne[1-J]*(J?10:.1)}if(ne[J]<-i?ne[J]=-i:ne[J]>i&&(ne[J]=i),ne[0]===ne[1]){var oe=Math.max(1,Math.abs(1e-6*ne[0]));ne[0]-=oe,ne[1]+=oe}}else b.nestedProperty(A,j).set(re)},A.setScale=function(j){var X=I._size;if(A.overlaying){var J=l.getFromId({_fullLayout:I},A.overlaying);A.domain=J.domain}var re=j&&A._r?"_r":"range",ne=A.calendar;A.cleanRange(re);
1216var se,oe,pe=A.r2l(A[re][0],ne),ce=A.r2l(A[re][1],ne),de=S==="y";if(de?(A._offset=X.t+(1-A.domain[1])*X.h,A._length=X.h*(A.domain[1]-A.domain[0]),A._m=A._length/(pe-ce),A._b=-A._m*ce):(A._offset=X.l+A.domain[0]*X.w,A._length=X.w*(A.domain[1]-A.domain[0]),A._m=A._length/(ce-pe),A._b=-A._m*pe),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks&&(A._rangebreaks=A.locateBreaks(Math.min(pe,ce),Math.max(pe,ce)),A._rangebreaks.length)){for(se=0;se<A._rangebreaks.length;se++)oe=A._rangebreaks[se],A._lBreaks+=Math.abs(oe.max-oe.min);var xe=de;pe>ce&&(xe=!xe),xe&&A._rangebreaks.reverse();var we=xe?-1:1;for(A._m2=we*A._length/(Math.abs(ce-pe)-A._lBreaks),A._B.push(-A._m2*(de?ce:pe)),se=0;se<A._rangebreaks.length;se++)oe=A._rangebreaks[se],A._B.push(A._B[A._B.length-1]-we*A._m2*(oe.max-oe.min));for(se=0;se<A._rangebreaks.length;se++)(oe=A._rangebreaks[se]).pmin=R(oe.min),oe.pmax=R(oe.max)}if(!isFinite(A._m)||!isFinite(A._b)||A._length<0)throw I._replotting=!1,new Error("Something went wrong with axis scaling")},A.maskBreaks=function(j){var X,J,re,ne,se,oe=A.rangebreaks||[];oe._cachedPatterns||(oe._cachedPatterns=oe.map(function(be){return be.enabled&&be.bounds?b.simpleMap(be.bounds,be.pattern?n:A.d2c):null})),oe._cachedValues||(oe._cachedValues=oe.map(function(be){return be.enabled&&be.values?b.simpleMap(be.values,A.d2c).sort(b.sorterAsc):null}));for(var pe=0;pe<oe.length;pe++){var ce=oe[pe];if(ce.enabled){if(ce.bounds){var de=ce.pattern;switch(J=(X=oe._cachedPatterns[pe])[0],re=X[1],de){case T:ne=(se=new Date(j)).getUTCDay(),J>re&&(re+=7,ne<J&&(ne+=7));break;case _:ne=(se=new Date(j)).getUTCHours()+(se.getUTCMinutes()/60+se.getUTCSeconds()/3600+se.getUTCMilliseconds()/36e5),J>re&&(re+=24,ne<J&&(ne+=24));break;case"":ne=j}if(ne>=J&&ne<re)return u}else for(var xe=oe._cachedValues[pe],we=0;we<xe.length;we++)if(re=(J=xe[we])+ce.dvalue,j>=J&&j<re)return u}}return j},A.locateBreaks=function(j,X){var J,re,ne,se,oe=[];if(!A.rangebreaks)return oe;var pe=A.rangebreaks.slice().sort(function(Ae,Pe){return Ae.pattern===T&&Pe.pattern===_?-1:Pe.pattern===T&&Ae.pattern===_?1:0}),ce=function(Ae,Pe){if((Ae=b.constrain(Ae,j,X))!==(Pe=b.constrain(Pe,j,X))){for(var De=!0,Ve=0;Ve<oe.length;Ve++){var Qe=oe[Ve];Ae<Qe.max&&Pe>=Qe.min&&(Ae<Qe.min&&(Qe.min=Ae),Pe>Qe.max&&(Qe.max=Pe),De=!1)}De&&oe.push({min:Ae,max:Pe})}};for(J=0;J<pe.length;J++){var de=pe[J];if(de.enabled)if(de.bounds){var xe=j,we=X;de.pattern&&(xe=Math.floor(xe)),ne=(re=b.simpleMap(de.bounds,de.pattern?n:A.r2l))[0],se=re[1];var be,Ee,fe=new Date(xe);switch(de.pattern){case T:Ee=s,be=(se-ne+(se<ne?7:0))*h,xe+=ne*h-(fe.getUTCDay()*h+fe.getUTCHours()*p+fe.getUTCMinutes()*a+fe.getUTCSeconds()*x+fe.getUTCMilliseconds());break;case _:Ee=h,be=(se-ne+(se<ne?24:0))*p,xe+=ne*p-(fe.getUTCHours()*p+fe.getUTCMinutes()*a+fe.getUTCSeconds()*x+fe.getUTCMilliseconds());break;default:xe=Math.min(re[0],re[1]),be=Ee=(we=Math.max(re[0],re[1]))-xe}for(var me=xe;me<we;me+=Ee)ce(me,me+be)}else for(var Te=b.simpleMap(de.values,A.d2c),_e=0;_e<Te.length;_e++)ce(ne=Te[_e],se=ne+de.dvalue)}return oe.sort(function(Ae,Pe){return Ae.min-Pe.min}),oe},A.makeCalcdata=function(j,X,J){var re,ne,se,oe,pe=A.type,ce=pe==="date"&&j[X+"calendar"];if(X in j){if(re=j[X],oe=j._length||b.minRowLength(re),b.isTypedArray(re)&&(pe==="linear"||pe==="log")){if(oe===re.length)return re;if(re.subarray)return re.subarray(0,oe)}if(pe==="multicategory")return function(we,be){for(var Ee=new Array(be),fe=0;fe<be;fe++){var me=(we[0]||[])[fe],Te=(we[1]||[])[fe];Ee[fe]=Z([me,Te])}return Ee}(re,oe);for(ne=new Array(oe),se=0;se<oe;se++)ne[se]=A.d2c(re[se],0,ce,J)}else{var de=X+"0"in j?A.d2c(j[X+"0"],0,ce):0,xe=j["d"+X]?Number(j["d"+X]):1;for(re=j[{x:"y",y:"x"}[X]],oe=j._length||re.length,ne=new Array(oe),se=0;se<oe;se++)ne[se]=de+se*xe}if(A.rangebreaks)for(se=0;se<oe;se++)ne[se]=A.maskBreaks(ne[se]);return ne},A.isValidRange=function(j){return Array.isArray(j)&&j.length===2&&e(A.r2l(j[0]))&&e(A.r2l(j[1]))},A.isPtWithinRange=function(j,X){var J=A.c2l(j[S],null,X),re=A.r2l(A.range[0]),ne=A.r2l(A.range[1]);return re<ne?re<=J&&J<=ne:ne<=J&&J<=re},A._emptyCategories=function(){A._categories=[],A._categoriesMap={}},A.clearCalc=function(){var j=A._matchGroup;if(j){var X=null,J=null;for(var re in j){var ne=I[l.id2name(re)];if(ne._categories){X=ne._categories,J=ne._categoriesMap;break}}X&&J?(A._categories=X,A._categoriesMap=J):A._emptyCategories()}else A._emptyCategories();if(A._initialCategories)for(var se=0;se<A._initialCategories.length;se++)V(A._initialCategories[se])},A.sortByInitialCategories=function(){var j=[];if(A._emptyCategories(),A._initialCategories)for(var X=0;X<A._initialCategories.length;X++)V(A._initialCategories[X]);j=j.concat(A._traceIndices);var J=A._matchGroup;for(var re in J)if(P!==re){var ne=I[l.id2name(re)];ne._categories=A._categories,ne._categoriesMap=A._categoriesMap,j=j.concat(ne._traceIndices)}return j};var Q=I._d3locale;A.type==="date"&&(A._dateFormat=Q?Q.timeFormat:m,A._extraFormat=I._extraFormat),A._separators=I.separators,A._numFormat=Q?Q.numberFormat:v,delete A._minDtick,delete A._forceTick0}},{"../../constants/numerical":479,"../../lib":503,"./axis_ids":558,"./constants":561,"@plotly/d3":58,"d3-time-format":120,"fast-isnumeric":190}],577:[function(y,ee,te){ee.exports=function(g){var m=["showexponent","showtickprefix","showticksuffix"].filter(function(b){return g[b]!==void 0});if(m.every(function(b){return g[b]===g[m[0]]})||m.length===1)return g[m[0]]}},{}],578:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color").contrast,b=y("./layout_attributes"),v=y("./show_dflt"),e=y("../array_container_defaults");function n(t,o){function r(d,c){return g.coerce(t,o,b.tickformatstops,d,c)}r("enabled")&&(r("dtickrange"),r("value"))}ee.exports=function(t,o,r,d,c){c||(c={});var i=v(t);if(r("showticklabels")){var u=c.font||{},f=o.color,s=(o.ticklabelposition||"").indexOf("inside")!==-1?m(c.bgColor):f&&f!==b.color.dflt?f:u.color;if(g.coerceFont(r,"tickfont",{family:u.family,size:u.size,color:s}),c.noTicklabelstep||d==="multicategory"||d==="log"||r("ticklabelstep"),c.noAng||r("tickangle"),d!=="category"){var h=r("tickformat");e(t,o,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:n}),o.tickformatstops.length||delete o.tickformatstops,c.noExp||h||d==="date"||(r("showexponent",i),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},{"../../components/color":366,"../../lib":503,"../array_container_defaults":549,"./layout_attributes":569,"./show_dflt":577}],579:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v,e,n){var t=g.coerce2(b,v,m,"ticklen"),o=g.coerce2(b,v,m,"tickwidth"),r=g.coerce2(b,v,m,"tickcolor",v.color);e("ticks",n.outerTicks||t||o||r?"outside":"")||(delete v.ticklen,delete v.tickwidth,delete v.tickcolor)}},{"../../lib":503,"./layout_attributes":569}],580:[function(y,ee,te){var g=y("./clean_ticks"),m=y("../../lib").isArrayOrTypedArray;ee.exports=function(b,v,e,n){function t(u){var f=b[u];return f!==void 0?f:(v._template||{})[u]}var o=t("tick0"),r=t("dtick"),d=t("tickvals"),c=e("tickmode",m(d)?"array":r?"linear":"auto");if(c==="auto")e("nticks");else if(c==="linear"){var i=v.dtick=g.dtick(r,n);v.tick0=g.tick0(o,n,v.calendar,i)}else n!=="multicategory"&&(e("tickvals")===void 0?v.tickmode="auto":e("ticktext"))}},{"../../lib":503,"./clean_ticks":560}],581:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../registry"),b=y("../../lib"),v=y("../../components/drawing"),e=y("./axes");ee.exports=function(n,t,o,r){var d=n._fullLayout;if(t.length!==0){var c,i,u,f;r&&(c=r());var s=g.ease(o.easing);return n._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(f),f=null,function(){for(var a={},x=0;x<t.length;x++){var l=t[x],w=l.plotinfo.xaxis,_=l.plotinfo.yaxis;l.xr0&&(a[w._name+".range"]=l.xr0.slice()),l.yr0&&(a[_._name+".range"]=l.
1216yr0.slice())}return m.call("relayout",n,a).then(function(){for(var T=0;T<t.length;T++)h(t[T].plotinfo)})}()}),i=Date.now(),f=window.requestAnimationFrame(function a(){u=Date.now();for(var x=Math.min(1,(u-i)/o.duration),l=s(x),w=0;w<t.length;w++)p(t[w],l);u-i>o.duration?(function(){for(var _={},T=0;T<t.length;T++){var k=t[T],L=k.plotinfo.xaxis,A=k.plotinfo.yaxis;k.xr1&&(_[L._name+".range"]=k.xr1.slice()),k.yr1&&(_[A._name+".range"]=k.yr1.slice())}c&&c(),m.call("relayout",n,_).then(function(){for(var I=0;I<t.length;I++)h(t[I].plotinfo)})}(),f=window.cancelAnimationFrame(a)):f=window.requestAnimationFrame(a)}),Promise.resolve()}function h(a){var x=a.xaxis,l=a.yaxis;d._defs.select("#"+a.clipId+"> rect").call(v.setTranslate,0,0).call(v.setScale,1,1),a.plot.call(v.setTranslate,x._offset,l._offset).call(v.setScale,1,1);var w=a.plot.selectAll(".scatterlayer .trace");w.selectAll(".point").call(v.setPointGroupScale,1,1),w.selectAll(".textpoint").call(v.setTextPointsScale,1,1),w.call(v.hideOutsideRangePoints,a)}function p(a,x){var l=a.plotinfo,w=l.xaxis,_=l.yaxis,T=w._length,k=_._length,L=!!a.xr1,A=!!a.yr1,I=[];if(L){var P=b.simpleMap(a.xr0,w.r2l),S=b.simpleMap(a.xr1,w.r2l),E=P[1]-P[0],D=S[1]-S[0];I[0]=(P[0]*(1-x)+x*S[0]-P[0])/(P[1]-P[0])*T,I[2]=T*(1-x+x*D/E),w.range[0]=w.l2r(P[0]*(1-x)+x*S[0]),w.range[1]=w.l2r(P[1]*(1-x)+x*S[1])}else I[0]=0,I[2]=T;if(A){var F=b.simpleMap(a.yr0,_.r2l),H=b.simpleMap(a.yr1,_.r2l),V=F[1]-F[0],Z=H[1]-H[0];I[1]=(F[1]*(1-x)+x*H[1]-F[1])/(F[0]-F[1])*k,I[3]=k*(1-x+x*Z/V),_.range[0]=w.l2r(F[0]*(1-x)+x*H[0]),_.range[1]=_.l2r(F[1]*(1-x)+x*H[1])}else I[1]=0,I[3]=k;e.drawOne(n,w,{skipTitle:!0}),e.drawOne(n,_,{skipTitle:!0}),e.redrawComponents(n,[w._id,_._id]);var K=L?T/I[2]:1,q=A?k/I[3]:1,W=L?I[0]:0,$=A?I[1]:0,R=L?I[0]/I[2]*T:0,N=A?I[1]/I[3]*k:0,U=w._offset-R,Q=_._offset-N;l.clipRect.call(v.setTranslate,W,$).call(v.setScale,1/K,1/q),l.plot.call(v.setTranslate,U,Q).call(v.setScale,K,q),v.setPointGroupScale(l.zoomScalePts,1/K,1/q),v.setTextPointsScale(l.zoomScaleTxt,1/K,1/q)}e.redrawComponents(n)}},{"../../components/drawing":388,"../../lib":503,"../../registry":638,"./axes":554,"@plotly/d3":58}],582:[function(y,ee,te){var g=y("../../registry").traceIs,m=y("./axis_autotype");function b(e){return{v:"x",h:"y"}[e.orientation||"v"]}function v(e,n){var t=b(e),o=g(e,"box-violin"),r=g(e._fullInput||{},"candlestick");return o&&!r&&n===t&&e[t]===void 0&&e[t+"0"]===void 0}ee.exports=function(e,n,t,o){t("autotypenumbers",o.autotypenumbersDflt),t("type",(o.splomStash||{}).type)==="-"&&(function(r,d){if(r.type==="-"){var c,i=r._id,u=i.charAt(0);i.indexOf("scene")!==-1&&(i=u);var f=function(_,T,k){for(var L=0;L<_.length;L++){var A=_[L];if(A.type==="splom"&&A._length>0&&(A["_"+k+"axes"]||{})[T]||(A[k+"axis"]||k)===T&&(v(A,k)||(A[k]||[]).length||A[k+"0"]))return A}}(d,i,u);if(f){if(f.type==="histogram"&&u==={v:"y",h:"x"}[f.orientation||"v"])return void(r.type="linear");var s=u+"calendar",h=f[s],p={noMultiCategory:!g(f,"cartesian")||g(f,"noMultiCategory")};if(f.type==="box"&&f._hasPreCompStats&&u==={h:"x",v:"y"}[f.orientation||"v"]&&(p.noMultiCategory=!0),p.autotypenumbers=r.autotypenumbers,v(f,u)){var a=b(f),x=[];for(c=0;c<d.length;c++){var l=d[c];g(l,"box-violin")&&(l[u+"axis"]||u)===i&&(l[a]!==void 0?x.push(l[a][0]):l.name!==void 0?x.push(l.name):x.push("text"),l[s]!==h&&(h=void 0))}r.type=m(x,h,p)}else if(f.type==="splom"){var w=f.dimensions[f._axesDim[i]];w.visible&&(r.type=m(w.values,h,p))}else r.type=m(f[u]||[f[u+"0"]],h,p)}}}(n,o.data),n.type==="-"?n.type="linear":e.type=n.type)}},{"../../registry":638,"./axis_autotype":555}],583:[function(y,ee,te){var g=y("../registry"),m=y("../lib");function b(t,o,r){var d,c,i,u=!1;if(o.type==="data")d=t._fullData[o.traces!==null?o.traces[0]:0];else{if(o.type!=="layout")return!1;d=t._fullLayout}return c=m.nestedProperty(d,o.prop).get(),(i=r[o.type]=r[o.type]||{}).hasOwnProperty(o.prop)&&i[o.prop]!==c&&(u=!0),i[o.prop]=c,{changed:u,value:c}}function v(t,o){var r=[],d=o[0],c={};if(typeof d=="string")c[d]=o[1];else{if(!m.isPlainObject(d))return r;c=d}return n(c,function(i,u,f){r.push({type:"layout",prop:i,value:f})},"",0),r}function e(t,o){var r,d,c,i,u=[];
1216if(d=o[0],c=o[1],r=o[2],i={},typeof d=="string")i[d]=c;else{if(!m.isPlainObject(d))return u;i=d,r===void 0&&(r=c)}return r===void 0&&(r=null),n(i,function(f,s,h){var p,a;if(Array.isArray(h)){a=h.slice();var x=Math.min(a.length,t.data.length);r&&(x=Math.min(x,r.length)),p=[];for(var l=0;l<x;l++)p[l]=r?r[l]:l}else a=h,p=r?r.slice():null;if(p===null)Array.isArray(a)&&(a=a[0]);else if(Array.isArray(p)){if(!Array.isArray(a)){var w=a;a=[];for(var _=0;_<p.length;_++)a[_]=w}a.length=Math.min(p.length,a.length)}u.push({type:"data",prop:f,traces:p,value:a})},"",0),u}function n(t,o,r,d){Object.keys(t).forEach(function(c){var i=t[c];if(c[0]!=="_"){var u=r+(d>0?".":"")+c;m.isPlainObject(i)?n(i,o,u,d+1):o(u,c,i)}})}te.manageCommandObserver=function(t,o,r,d){var c={},i=!0;o&&o._commandObserver&&(c=o._commandObserver),c.cache||(c.cache={}),c.lookupTable={};var u=te.hasSimpleAPICommandBindings(t,r,c.lookupTable);if(o&&o._commandObserver){if(u)return c;if(o._commandObserver.remove)return o._commandObserver.remove(),o._commandObserver=null,c}if(u){b(t,u,c.cache),c.check=function(){if(i){var h=b(t,u,c.cache);return h.changed&&d&&c.lookupTable[h.value]!==void 0&&(c.disable(),Promise.resolve(d({value:h.value,type:u.type,prop:u.prop,traces:u.traces,index:c.lookupTable[h.value]})).then(c.enable,c.enable)),h.changed}};for(var f=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s<f.length;s++)t._internalOn(f[s],c.check);c.remove=function(){for(var h=0;h<f.length;h++)t._removeInternalListener(f[h],c.check)}}else m.log("Unable to automatically bind plot updates to API command"),c.lookupTable={},c.remove=function(){};return c.disable=function(){i=!1},c.enable=function(){i=!0},o&&(o._commandObserver=c),c},te.hasSimpleAPICommandBindings=function(t,o,r){var d,c,i=o.length;for(d=0;d<i;d++){var u,f=o[d],s=f.method,h=f.args;if(Array.isArray(h)||(h=[]),!s)return!1;var p=te.computeAPICommandBindings(t,s,h);if(p.length!==1)return!1;if(c){if((u=p[0]).type!==c.type||u.prop!==c.prop)return!1;if(Array.isArray(c.traces)){if(!Array.isArray(u.traces))return!1;u.traces.sort();for(var a=0;a<c.traces.length;a++)if(c.traces[a]!==u.traces[a])return!1}else if(u.prop!==c.prop)return!1}else c=p[0],Array.isArray(c.traces)&&c.traces.sort();var x=(u=p[0]).value;if(Array.isArray(x)){if(x.length!==1)return!1;x=x[0]}r&&(r[x]=d)}return c},te.executeAPICommand=function(t,o,r){if(o==="skip")return Promise.resolve();var d=g.apiMethodRegistry[o],c=[t];Array.isArray(r)||(r=[]);for(var i=0;i<r.length;i++)c.push(r[i]);return d.apply(null,c).catch(function(u){return m.warn("API call to Plotly."+o+" rejected.",u),Promise.reject(u)})},te.computeAPICommandBindings=function(t,o,r){var d;switch(Array.isArray(r)||(r=[]),o){case"restyle":d=e(t,r);break;case"relayout":d=v(t,r);break;case"update":d=e(t,[r[0],r[2]]).concat(v(t,[r[1]]));break;case"animate":d=function(c,i){return Array.isArray(i[0])&&i[0].length===1&&["string","number"].indexOf(typeof i[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:i[0][0].toString()}]:[]}(0,r);break;default:d=[]}return d}},{"../lib":503,"../registry":638}],584:[function(y,ee,te){var g=y("../lib/extend").extendFlat;te.attributes=function(m,b){b=b||{};var v={valType:"info_array",editType:(m=m||{}).editType,items:[{valType:"number",min:0,max:1,editType:m.editType},{valType:"number",min:0,max:1,editType:m.editType}],dflt:[0,1]},e=(m.name&&m.name,m.trace,b.description&&b.description,{x:g({},v,{}),y:g({},v,{}),editType:m.editType});return m.noGridCell||(e.row={valType:"integer",min:0,dflt:0,editType:m.editType},e.column={valType:"integer",min:0,dflt:0,editType:m.editType}),e},te.defaults=function(m,b,v,e){var n=e&&e.x||[0,1],t=e&&e.y||[0,1],o=b.grid;if(o){var r=v("domain.column");r!==void 0&&(r<o.columns?n=o._domains.x[r]:delete m.domain.column);var d=v("domain.row");d!==void 0&&(d<o.rows?t=o._domains.y[d]:delete m.domain.row)}var c=v("domain.x",n),i=v("domain.y",t);c[0]<c[1]||(m.domain.x=n.slice()),i[0]<i[1]||(m.domain.y=t.slice())}},{"../lib/extend":493}],585:[function(y,ee,te){ee.exports=function(g){var m=g.editType,b=g.colorEditType;b===void 0&&(b=m);var v={family:{valType:"string",noBlank:!0,strict:!0,editType:m},size:{valType:"number",min:1,editType:m},color:{valType:"color",editType:b},editType:m};return g.autoSize&&(v.size.dflt="auto"),g.autoColor&&(v.color.dflt="auto"),g.arrayOk&&(v.family.arrayOk=!0,v.size.arrayOk=!0,v.color.arrayOk=!0),v}},{}],586:[function(y,ee,te){ee.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},{}],587:[function(y,ee,te){te.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",e
1216ckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},te.axesNames=["lonaxis","lataxis"],te.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},te.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},te.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]}},te.clipPad=.001,te.precision=.1,te.landColor="#F0DC82",te.waterColor="#3399FF",te.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},te.sphereSVG={type:"Sphere"},te.fillLayers={ocean:1,land:1,lakes:1},te.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},te.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],te.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],te.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},{}],588:[function(y,ee,te){var g=y("@plotly/d3"),m=y("d3-geo"),b=m.geoPath,v=m.geoDistance,e=y("d3-geo-projection"),n=y("../../registry"),t=y("../../lib"),o=t.strTranslate,r=y("../../components/color"),d=y("../../components/drawing"),c=y("../../components/fx"),i=y("../plots"),u=y("../cartesian/axes"),f=y("../cartesian/autorange").getAutoRange,s=y("../../components/dragelement"),h=y("../cartesian/select").prepSelect,p=y("../cartesian/select").clearSelect,a=y("../cartesian/select").selectOnClick,x=y("./zoom"),l=y("./constants"),w=y("../../lib/geo_location_utils"),_=y("../../lib/topojson_utils"),T=y("topojson-client").feature;function k(I){this.id=I.id,this.graphDiv=I.graphDiv,this.container=I.container,this.topojsonURL=I.topojsonURL,this.isStatic=I.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var L=k.prototype;function A(I,P){var S=l.clipPad,E=I[0]+S,D=I[1]-S,F=P[0]+S,H=P[1]-S;E>0&&D<0&&(D+=360);var V=(D-E)/4;return{type:"Polygon",coordinates:[[[E,F],[E,H],[E+V,H],[E+2*V,H],[E+3*V,H],[D,H],[D,F],[D-V,F],[D-2*V,F],[D-3*V,F],[E,F]]]}}ee.exports=function(I){return new k(I)}
1216,L.plot=function(I,P,S){var E=this,D=P[this.id],F=[],H=!1;for(var V in l.layerNameToAdjective)if(V!=="frame"&&D["show"+V]){H=!0;break}for(var Z=0;Z<I.length;Z++)if(I[0][0].trace.locationmode){H=!0;break}if(H){var K=_.getTopojsonName(D);E.topojson!==null&&K===E.topojsonName||(E.topojsonName=K,PlotlyGeoAssets.topojson[E.topojsonName]===void 0&&F.push(E.fetchTopojson()))}F=F.concat(w.fetchTraceGeoData(I)),S.push(new Promise(function(q,W){Promise.all(F).then(function(){E.topojson=PlotlyGeoAssets.topojson[E.topojsonName],E.update(I,P),q()}).catch(W)}))},L.fetchTopojson=function(){var I=this,P=_.getTopojsonPath(I.topojsonURL,I.topojsonName);return new Promise(function(S,E){g.json(P,function(D,F){if(D)return D.status===404?E(new Error(["plotly.js could not find topojson file at",P,".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):E(new Error(["unexpected error while fetching topojson file at",P].join(" ")));PlotlyGeoAssets.topojson[I.topojsonName]=F,S()})})},L.update=function(I,P){var S=P[this.id];this.hasChoropleth=!1;for(var E=0;E<I.length;E++){var D=I[E],F=D[0].trace;F.type==="choropleth"&&(this.hasChoropleth=!0),F.visible===!0&&F._length>0&&F._module.calcGeoJSON(D,P)}if(!this.updateProjection(I,P)){this.viewInitial&&this.scope===S.scope||this.saveViewInitial(S),this.scope=S.scope,this.updateBaseLayers(P,S),this.updateDims(P,S),this.updateFx(P,S),i.generalUpdatePerTraceModule(this.graphDiv,this,I,S);var H=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=H.selectAll(".point"),this.dataPoints.text=H.selectAll("text"),this.dataPaths.line=H.selectAll(".js-line");var V=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=V.selectAll("path"),this.render()}},L.updateProjection=function(I,P){var S=this.graphDiv,E=P[this.id],D=P._size,F=E.domain,H=E.projection,V=E.lonaxis,Z=E.lataxis,K=V._ax,q=Z._ax,W=this.projection=function(fe){var me=fe.projection,Te=me.type,_e=l.projNames[Te];_e="geo"+t.titleCase(_e);for(var Ae=(m[_e]||e[_e])(),Pe=fe._isSatellite?180*Math.acos(1/me.distance)/Math.PI:fe._isClipped?l.lonaxisSpan[Te]/2:null,De=["center","rotate","parallels","clipExtent"],Ve=function(Ue){return Ue?Ae:[]},Qe=0;Qe<De.length;Qe++){var Oe=De[Qe];typeof Ae[Oe]!="function"&&(Ae[Oe]=Ve)}return Ae.isLonLatOverEdges=function(Ue){if(Ae(Ue)===null)return!0;if(Pe){var Ge=Ae.rotate();return v(Ue,[-Ge[0],-Ge[1]])>Pe*Math.PI/180}return!1},Ae.getPath=function(){return b().projection(Ae)},Ae.getBounds=function(Ue){return Ae.getPath().bounds(Ue)},Ae.precision(l.precision),fe._isSatellite&&Ae.tilt(me.tilt).distance(me.distance),Pe&&Ae.clipAngle(Pe-l.clipPad),Ae}(E),$=[[D.l+D.w*F.x[0],D.t+D.h*(1-F.y[1])],[D.l+D.w*F.x[1],D.t+D.h*(1-F.y[0])]],R=E.center||{},N=H.rotation||{},U=V.range||[],Q=Z.range||[];if(E.fitbounds){K._length=$[1][0]-$[0][0],q._length=$[1][1]-$[0][1],K.range=f(S,K),q.range=f(S,q);var j=(K.range[0]+K.range[1])/2,X=(q.range[0]+q.range[1])/2;if(E._isScoped)R={lon:j,lat:X};else if(E._isClipped){R={lon:j,lat:X},N={lon:j,lat:X,roll:N.roll};var J=H.type,re=l.lonaxisSpan[J]/2||180,ne=l.lataxisSpan[J]/2||90;U=[j-re,j+re],Q=[X-ne,X+ne]}else R={lon:j,lat:X},N={lon:j,lat:N.lat,roll:N.roll}}W.center([R.lon-N.lon,R.lat-N.lat]).rotate([-N.lon,-N.lat,N.roll]).parallels(H.parallels);var se=A(U,Q);W.fitExtent($,se);var oe=this.bounds=W.getBounds(se),pe=this.fitScale=W.scale(),ce=W.translate();if(E.fitbounds){var de=W.getBounds(A(K.range,q.range)),xe=Math.min((oe[1][0]-oe[0][0])/(de[1][0]-de[0][0]),(oe[1][1]-oe[0][1])/(de[1][1]-de[0][1]));isFinite(xe)?W.scale(xe*pe):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else W.scale(H.scale*pe);var we=this.midPt=[(oe[0][0]+oe[1][0])/2,(oe[0][1]+oe[1][1])/2];if(W.translate([ce[0]+(we[0]-ce[0]),ce[1]+(we[1]-ce[1])]).clipExtent(oe),E._isAlbersUsa){var be=W([R.lon,R.lat]),Ee=W.translate();W.translate([Ee[0]-(be[0]-Ee[0]),Ee[1]-(be[1]-Ee[1])])}},L.updateBaseLayers=function(I,P){var S=this,E=S.topojson,D=S.layers,F=S.basePaths;function H(W){return W==="lonaxis"||W==="lataxis"}function V(W){return!!l.lineLayers[W]}function Z(W){return!!l.fillLayers[W]}
1216var K=(this.hasChoropleth?l.layersForChoropleth:l.layers).filter(function(W){return V(W)||Z(W)?P["show"+W]:!H(W)||P[W].showgrid}),q=S.framework.selectAll(".layer").data(K,String);q.exit().each(function(W){delete D[W],delete F[W],g.select(this).remove()}),q.enter().append("g").attr("class",function(W){return"layer "+W}).each(function(W){var $=D[W]=g.select(this);W==="bg"?S.bgRect=$.append("rect").style("pointer-events","all"):H(W)?F[W]=$.append("path").style("fill","none"):W==="backplot"?$.append("g").classed("choroplethlayer",!0):W==="frontplot"?$.append("g").classed("scatterlayer",!0):V(W)?F[W]=$.append("path").style("fill","none").style("stroke-miterlimit",2):Z(W)&&(F[W]=$.append("path").style("stroke","none"))}),q.order(),q.each(function(W){var $=F[W],R=l.layerNameToAdjective[W];W==="frame"?$.datum(l.sphereSVG):V(W)||Z(W)?$.datum(T(E,E.objects[W])):H(W)&&$.datum(function(N,U,Q){var j,X,J,re=U[N],ne=l.scopeDefaults[U.scope];N==="lonaxis"?(j=ne.lonaxisRange,X=ne.lataxisRange,J=function(Ee,fe){return[Ee,fe]}):N==="lataxis"&&(j=ne.lataxisRange,X=ne.lonaxisRange,J=function(Ee,fe){return[fe,Ee]});var se={type:"linear",range:[j[0],j[1]-1e-6],tick0:re.tick0,dtick:re.dtick};u.setConvert(se,Q);var oe=u.calcTicks(se);U.isScoped||N!=="lonaxis"||oe.pop();for(var pe=oe.length,ce=new Array(pe),de=0;de<pe;de++)for(var xe=oe[de].x,we=ce[de]=[],be=X[0];be<X[1]+2.5;be+=2.5)we.push(J(xe,be));return{type:"MultiLineString",coordinates:ce}}(W,P,I)).call(r.stroke,P[W].gridcolor).call(d.dashLine,"",P[W].gridwidth),V(W)?$.call(r.stroke,P[R+"color"]).call(d.dashLine,"",P[R+"width"]):Z(W)&&$.call(r.fill,P[R+"color"])})},L.updateDims=function(I,P){var S=this.bounds,E=(P.framewidth||0)/2,D=S[0][0]-E,F=S[0][1]-E,H=S[1][0]-D+E,V=S[1][1]-F+E;d.setRect(this.clipRect,D,F,H,V),this.bgRect.call(d.setRect,D,F,H,V).call(r.fill,P.bgcolor),this.xaxis._offset=D,this.xaxis._length=H,this.yaxis._offset=F,this.yaxis._length=V},L.updateFx=function(I,P){var S=this,E=S.graphDiv,D=S.bgRect,F=I.dragmode,H=I.clickmode;if(!S.isStatic){var V;F==="select"?V=function(q,W){(q.range={})[S.id]=[K([W.xmin,W.ymin]),K([W.xmax,W.ymax])]}:F==="lasso"&&(V=function(q,W,$){(q.lassoPoints={})[S.id]=$.filtered.map(K)});var Z={element:S.bgRect.node(),gd:E,plotinfo:{id:S.id,xaxis:S.xaxis,yaxis:S.yaxis,fillRangeItems:V},xaxes:[S.xaxis],yaxes:[S.yaxis],subplot:S.id,clickFn:function(q){q===2&&p(E)}};F==="pan"?(D.node().onmousedown=null,D.call(x(S,P)),D.on("dblclick.zoom",function(){var q=S.viewInitial,W={};for(var $ in q)W[S.id+"."+$]=q[$];n.call("_guiRelayout",E,W),E.emit("plotly_doubleclick",null)}),E._context._scrollZoom.geo||D.on("wheel.zoom",null)):F!=="select"&&F!=="lasso"||(D.on(".zoom",null),Z.prepFn=function(q,W,$){h(q,W,$,Z,F)},s.init(Z)),D.on("mousemove",function(){var q=S.projection.invert(t.getPositionFromD3Event());if(!q)return s.unhover(E,g.event);S.xaxis.p2c=function(){return q[0]},S.yaxis.p2c=function(){return q[1]},c.hover(E,g.event,S.id)}),D.on("mouseout",function(){E._dragging||s.unhover(E,g.event)}),D.on("click",function(){F!=="select"&&F!=="lasso"&&(H.indexOf("select")>-1&&a(g.event,E,[S.xaxis],[S.yaxis],S.id,Z),H.indexOf("event")>-1&&c.click(E,g.event))})}function K(q){return S.projection.invert([q[0]+S.xaxis._offset,q[1]+S.yaxis._offset])}},L.makeFramework=function(){var I=this,P=I.graphDiv,S=P._fullLayout,E="clip"+S._uid+I.id;I.clipDef=S._clips.append("clipPath").attr("id",E),I.clipRect=I.clipDef.append("rect"),I.framework=g.select(I.container).append("g").attr("class","geo "+I.id).call(d.setClipUrl,E,P),I.project=function(D){var F=I.projection(D);return F?[F[0]-I.xaxis._offset,F[1]-I.yaxis._offset]:[null,null]},I.xaxis={_id:"x",c2p:function(D){return I.project(D)[0]}},I.yaxis={_id:"y",c2p:function(D){return I.project(D)[1]}},I.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},u.setConvert(I.mockAxis,S)},L.saveViewInitial=function(I){var P,S=I.center||{},E=I.projection,D=E.rotation||{};this.viewInitial={fitbounds:I.fitbounds,"projection.scale":E.scale},P=I._isScoped?{"center.lon":S.lon,"center.lat":S.lat}:I._isClipped?{"projection.rotation.lon":D.lon,"projection.rotation.lat":D.lat}:{"center.lon":S.lon,"center.lat":S.lat,"projection.rotation.lon":D.lon},t.extendFlat(this.viewInitial,P)},L.render=function(){var I,P=this.projection,S=P.getPath();function E(F){var H=P(F.lonlat);return H?o(H[0],H[1]):null}function D(F){return P.isLonLatOverEdges(F.lonlat)?"none":null}for(I in this.basePaths)this.basePaths[I].attr("d",S);for(I in this.dataPaths)this.dataPaths[I].attr("d",function(F){return S(F.geojson)});for(I in this.dataPoints)this.dataPoints[I].attr("display",D).attr("transform",E)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/topojson_utils":532,"../../registry":638,"../cartesian/autorange":553,"../cartesian/axes":554,"../cartesian/select":575,"../plots":619,"./constants":587,"./zoom":592,"@plotly/d3":58,"d3-geo":114,"d3-geo-projection":113,"to
1216pojson-client":315}],589:[function(y,ee,te){var g=y("../../plots/get_data").getSubplotCalcData,m=y("../../lib").counterRegex,b=y("./geo"),v="geo",e=m(v),n={};n.geo={valType:"subplotid",dflt:v,editType:"calc"},ee.exports={attr:v,name:v,idRoot:v,idRegex:e,attrRegex:e,attributes:n,layoutAttributes:y("./layout_attributes"),supplyLayoutDefaults:y("./layout_defaults"),plot:function(t){for(var o=t._fullLayout,r=t.calcdata,d=o._subplots.geo,c=0;c<d.length;c++){var i=d[c],u=g(r,v,i),f=o[i]._subplot;f||(f=b({id:i,graphDiv:t,container:o._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),o[i]._subplot=f),f.plot(u,o,t._promises)}},updateFx:function(t){for(var o=t._fullLayout,r=o._subplots.geo,d=0;d<r.length;d++){var c=o[r[d]];c._subplot.updateFx(o,c)}},clean:function(t,o,r,d){for(var c=d._subplots.geo||[],i=0;i<c.length;i++){var u=c[i],f=d[u]._subplot;!o[u]&&f&&(f.framework.remove(),f.clipDef.remove())}}}},{"../../lib":503,"../../plots/get_data":593,"./geo":588,"./layout_attributes":590,"./layout_defaults":591}],590:[function(y,ee,te){var g=y("../../components/color/attributes"),m=y("../domain").attributes,b=y("./constants"),v=y("../../plot_api/edit_types").overrideAll,e=y("../../lib/sort_object_keys"),n={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:g.lightLine},gridwidth:{valType:"number",min:0,dflt:1}};(ee.exports=v({domain:m({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:e(b.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:e(b.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:g.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:b.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:b.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:b.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:b.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:g.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:g.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:g.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:g.background},lonaxis:n,lataxis:n},"plot","from-root")).uirevision={valType:"any",editType:"none"}},{"../../components/color/attributes":365,"../../lib/sort_object_keys":526,"../../plot_api/edit_types":536,"../domain":584,"./constants":587}],591:[function(y,ee,te){var g=y("../../lib"),m=y("../subplot_defaults"),b=y("../get_data").getSubplotData,v=y("./constants"),e=y("./layout_attributes"),n=v.axesNames;function t(o,r,d,c){var i=b(c.fullData,"geo",c.id).map(function(N){return N._expandedIndex}),u=d("resolution"),f=d("scope"),s=v.scopeDefaults[f],h=d("projection.type",s.projType),p=r._isAlbersUsa=h==="albers usa";p&&(f=r.scope="usa");var a=r._isScoped=f!=="world",x=r._isSatellite=h==="satellite",l=r._isConic=h.indexOf("conic")!==-1||h==="albers",w=r._isClipped=!!v.lonaxisSpan[h];if(o.visible===!1){var _=g.extendDeep({},r._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),r._template=_}for(var T=d("visible"),k=0;k<n.length;k++){var L,A=n[k],I=[30,10][k];if(a)L=s[A+"Range"];else{var P=v[A+"Span"],S=(P[h]||P["*"])/2,E=d("projection.rotation."+A.substr(0,3),s.projRotate[k]);L=[E-S,E+S]}var D=d(A+".range",L);d(A+".tick0"),d(A+".dtick",I),d(A+".showgrid",!!T&&void 0)&&(d(A+".gridcolor"),d(A+".gridwidth")),r[A]._ax={type:"linear",_id:A.slice(0,3),_traceIndices:i,setScale:g.identity,c2l:g.identity,r2l:g.identity,autorange:!0,range:D.slice(),_m:1,_input
1216:{}}}var F=r.lonaxis.range,H=r.lataxis.range,V=F[0],Z=F[1];V>0&&Z<0&&(Z+=360);var K,q,W,$=(V+Z)/2;if(!p){var R=a?s.projRotate:[$,0,0];K=d("projection.rotation.lon",R[0]),d("projection.rotation.lat",R[1]),d("projection.rotation.roll",R[2]),d("showcoastlines",!a&&T)&&(d("coastlinecolor"),d("coastlinewidth")),d("showocean",!!T&&void 0)&&d("oceancolor")}p?(q=-96.6,W=38.7):(q=a?$:K,W=(H[0]+H[1])/2),d("center.lon",q),d("center.lat",W),x&&(d("projection.tilt"),d("projection.distance")),l&&d("projection.parallels",s.projParallels||[0,60]),d("projection.scale"),d("showland",!!T&&void 0)&&d("landcolor"),d("showlakes",!!T&&void 0)&&d("lakecolor"),d("showrivers",!!T&&void 0)&&(d("rivercolor"),d("riverwidth")),d("showcountries",a&&f!=="usa"&&T)&&(d("countrycolor"),d("countrywidth")),(f==="usa"||f==="north america"&&u===50)&&(d("showsubunits",T),d("subunitcolor"),d("subunitwidth")),a||d("showframe",T)&&(d("framecolor"),d("framewidth")),d("bgcolor"),d("fitbounds")&&(delete r.projection.scale,a?(delete r.center.lon,delete r.center.lat):w?(delete r.center.lon,delete r.center.lat,delete r.projection.rotation.lon,delete r.projection.rotation.lat,delete r.lonaxis.range,delete r.lataxis.range):(delete r.center.lon,delete r.center.lat,delete r.projection.rotation.lon))}ee.exports=function(o,r,d){m(o,r,d,{type:"geo",attributes:e,handleDefaults:t,fullData:d,partition:"y"})}},{"../../lib":503,"../get_data":593,"../subplot_defaults":632,"./constants":587,"./layout_attributes":590}],592:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../registry"),v=Math.PI/180,e=180/Math.PI,n={cursor:"pointer"},t={cursor:"auto"};function o(T,k){return g.behavior.zoom().translate(k.translate()).scale(k.scale())}function r(T,k,L){var A=T.id,I=T.graphDiv,P=I.layout,S=P[A],E=I._fullLayout,D=E[A],F={},H={};function V(Z,K){F[A+"."+Z]=m.nestedProperty(S,Z).get(),b.call("_storeDirectGUIEdit",P,E._preGUI,F);var q=m.nestedProperty(D,Z);q.get()!==K&&(q.set(K),m.nestedProperty(S,Z).set(K),H[A+"."+Z]=K)}L(V),V("projection.scale",k.scale()/T.fitScale),V("fitbounds",!1),I.emit("plotly_relayout",H)}function d(T,k){var L=o(0,k);function A(I){var P=k.invert(T.midPt);I("center.lon",P[0]),I("center.lat",P[1])}return L.on("zoomstart",function(){g.select(this).style(n)}).on("zoom",function(){k.scale(g.event.scale).translate(g.event.translate),T.render();var I=k.invert(T.midPt);T.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":k.scale()/T.fitScale,"geo.center.lon":I[0],"geo.center.lat":I[1]})}).on("zoomend",function(){g.select(this).style(t),r(T,k,A)}),L}function c(T,k){var L,A,I,P,S,E,D,F,H,V=o(0,k);function Z(q){return k.invert(q)}function K(q){var W=k.rotate(),$=k.invert(T.midPt);q("projection.rotation.lon",-W[0]),q("center.lon",$[0]),q("center.lat",$[1])}return V.on("zoomstart",function(){g.select(this).style(n),L=g.mouse(this),A=k.rotate(),I=k.translate(),P=A,S=Z(L)}).on("zoom",function(){if(E=g.mouse(this),function($){var R=Z($);if(!R)return!0;var N=k(R);return Math.abs(N[0]-$[0])>2||Math.abs(N[1]-$[1])>2}(L))return V.scale(k.scale()),void V.translate(k.translate());k.scale(g.event.scale),k.translate([I[0],g.event.translate[1]]),S?Z(E)&&(F=Z(E),D=[P[0]+(F[0]-S[0]),A[1],A[2]],k.rotate(D),P=D):S=Z(L=E),H=!0,T.render();var q=k.rotate(),W=k.invert(T.midPt);T.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":k.scale()/T.fitScale,"geo.center.lon":W[0],"geo.center.lat":W[1],"geo.projection.rotation.lon":-q[0]})}).on("zoomend",function(){g.select(this).style(t),H&&r(T,k,K)}),V}function i(T,k){var L;k.rotate(),k.scale();var A=o(0,k),I=function(V){for(var Z=0,K=arguments.length,q=[];++Z<K;)q.push(arguments[Z]);var W=g.dispatch.apply(null,q);return W.of=function($,R){return function(N){var U;try{U=N.sourceEvent=g.event,N.target=V,g.event=N,W[N.type].apply($,R)}finally{g.event=U}}},W}(A,"zoomstart","zoom","zoomend"),P=0,S=A.on;function E(V){P++||V({type:"zoomstart"})}function D(V){V({type:"zoom"})}function F(V){--P||V({type:"zoomend"})}function H(V){var Z=k.rotate();V("projection.rotation.lon",-Z[0]),V("projection.rotation.lat",-Z[1])}return A.on("zoomstart",function(){g.select(this).style(n);var V=g.mouse(this),Z=k.rotate(),K=Z,q=k.translate(),W=f(Z);L=u(k,V),S.call(A,"zoom",function(){var $=g.mouse(this);
1216if(k.scale(g.event.scale),L){if(u(k,$)){k.rotate(Z).translate(q);var R=u(k,$),N=h(L,R),U=w(s(W,N)),Q=p(U,L,K);isFinite(Q[0])&&isFinite(Q[1])&&isFinite(Q[2])||(Q=K),k.rotate(Q),K=Q}}else L=u(k,V=$);D(I.of(this,arguments))}),E(I.of(this,arguments))}).on("zoomend",function(){g.select(this).style(t),S.call(A,"zoom",null),F(I.of(this,arguments)),r(T,k,H)}).on("zoom.redraw",function(){T.render();var V=k.rotate();T.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":k.scale()/T.fitScale,"geo.projection.rotation.lon":-V[0],"geo.projection.rotation.lat":-V[1]})}),g.rebind(A,I,"on")}function u(T,k){var L=T.invert(k);return L&&isFinite(L[0])&&isFinite(L[1])&&function(A){var I=A[0]*v,P=A[1]*v,S=Math.cos(P);return[S*Math.cos(I),S*Math.sin(I),Math.sin(P)]}(L)}function f(T){var k=.5*T[0]*v,L=.5*T[1]*v,A=.5*T[2]*v,I=Math.sin(k),P=Math.cos(k),S=Math.sin(L),E=Math.cos(L),D=Math.sin(A),F=Math.cos(A);return[P*E*F+I*S*D,I*E*F-P*S*D,P*S*F+I*E*D,P*E*D-I*S*F]}function s(T,k){var L=T[0],A=T[1],I=T[2],P=T[3],S=k[0],E=k[1],D=k[2],F=k[3];return[L*S-A*E-I*D-P*F,L*E+A*S+I*F-P*D,L*D-A*F+I*S+P*E,L*F+A*D-I*E+P*S]}function h(T,k){if(T&&k){var L=function(S,E){return[S[1]*E[2]-S[2]*E[1],S[2]*E[0]-S[0]*E[2],S[0]*E[1]-S[1]*E[0]]}(T,k),A=Math.sqrt(_(L,L)),I=.5*Math.acos(Math.max(-1,Math.min(1,_(T,k)))),P=Math.sin(I)/A;return A&&[Math.cos(I),L[2]*P,-L[1]*P,L[0]*P]}}function p(T,k,L){var A=l(k,2,T[0]);A=l(A,1,T[1]),A=l(A,0,T[2]-L[2]);var I,P,S=k[0],E=k[1],D=k[2],F=A[0],H=A[1],V=A[2],Z=Math.atan2(E,S)*e,K=Math.sqrt(S*S+E*E);Math.abs(H)>K?(P=(H>0?90:-90)-Z,I=0):(P=Math.asin(H/K)*e-Z,I=Math.sqrt(K*K-H*H));var q=180-P-2*Z,W=(Math.atan2(V,F)-Math.atan2(D,I))*e,$=(Math.atan2(V,F)-Math.atan2(D,-I))*e;return a(L[0],L[1],P,W)<=a(L[0],L[1],q,$)?[P,W,L[2]]:[q,$,L[2]]}function a(T,k,L,A){var I=x(L-T),P=x(A-k);return Math.sqrt(I*I+P*P)}function x(T){return(T%360+540)%360-180}function l(T,k,L){var A=L*v,I=T.slice(),P=k===0?1:0,S=k===2?1:2,E=Math.cos(A),D=Math.sin(A);return I[P]=T[P]*E-T[S]*D,I[S]=T[S]*E+T[P]*D,I}function w(T){return[Math.atan2(2*(T[0]*T[1]+T[2]*T[3]),1-2*(T[1]*T[1]+T[2]*T[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(T[0]*T[2]-T[3]*T[1]))))*e,Math.atan2(2*(T[0]*T[3]+T[1]*T[2]),1-2*(T[2]*T[2]+T[3]*T[3]))*e]}function _(T,k){for(var L=0,A=0,I=T.length;A<I;++A)L+=T[A]*k[A];return L}ee.exports=function(T,k){var L=T.projection;return(k._isScoped?d:k._isClipped?i:c)(T,L)}},{"../../lib":503,"../../registry":638,"@plotly/d3":58}],593:[function(y,ee,te){var g=y("../registry"),m=y("./cartesian/constants").SUBPLOT_PATTERN;te.getSubplotCalcData=function(b,v,e){var n=g.subplotsRegistry[v];if(!n)return[];for(var t=n.attr,o=[],r=0;r<b.length;r++){var d=b[r];d[0].trace[t]===e&&o.push(d)}return o},te.getModuleCalcData=function(b,v){var e,n=[],t=[];if(!(e=typeof v=="string"?g.getModule(v).plot:typeof v=="function"?v:v.plot))return[n,b];for(var o=0;o<b.length;o++){var r=b[o],d=r[0].trace;d.visible===!0&&d._length!==0&&(d._module.plot===e?n.push(r):t.push(r))}return[n,t]},te.getSubplotData=function(b,v,e){if(!g.subplotsRegistry[v])return[];var n,t,o,r=g.subplotsRegistry[v].attr,d=[];if(v==="gl2d"){var c=e.match(m);t="x"+c[1],o="y"+c[2]}for(var i=0;i<b.length;i++)n=b[i],v==="gl2d"&&g.traceIs(n,"gl2d")?n[r[0]]===t&&n[r[1]]===o&&d.push(n):n[r]===e&&d.push(n);return d}},{"../registry":638,"./cartesian/constants":561}],594:[function(y,ee,te){var g=y("mouse-change"),m=y("mouse-wheel"),b=y("mouse-event-offset"),v=y("../cartesian/constants"),e=y("has-passive-events");function n(t,o){this.element=t,this.plot=o,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}ee.exports=function(t){var o=t.mouseContainer,r=t.glplot,d=new n(o,r);function c(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function i(u,f,s){var h,p,a=t.calcDataBox(),x=r.viewBox,l=d.lastPos[0],w=d.lastPos[1],_=v.MINDRAG*r.pixelRatio,T=v.MINZOOM*r.pixelRatio;function k(E,D,F){var H=Math.min(D,F),V=Math.max(D,F);H!==V?(a[E]=H,a[E+2]=V,d.dataBox=a,t.setRanges(a)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(f*=r.pixelRatio,s*=r.pixelRatio,s=x[3]-x[1]-s,t.fullLayout.dragmode){case"zoom":if(u){var L=f/(x[2]-x[0])*(a[2]-a[0])+a[0],A=s/(x[3]-x[1])*(a[3]-a[1])+a[1];d.boxInited||(d.boxStart[0]=L,d.boxStart[1]=A,d.dragStart[0]=f,d.dragStart[1]=s),d.boxEnd[0]=L,d.boxEnd[1]=A,d.boxInited=!0,d.boxEnabled||d.boxStart[0]===d.boxEnd[0]&&d.boxStart[1]===d.boxEnd[1]||(d.boxEnabled=!0);var I=Math.abs(d.dragStart[0]-f)<T,P=Math.abs(d.dragStart[1]-s)<T;if(!function(){for(var E=t.graphDiv._fullLayout._axisConstraintGroups,D=t.xaxis._id,F=t.yaxis._id,H=0;H<E.length;H++)if(E[H][D]!==-1){if(E[H][F]!==-1)return!0;break}return!1}()||I&&P)I&&(d.boxEnd[0]=d.boxStart[0]),P&&(d.boxEnd[1]=d.boxStart[1]);else{h=d.boxEnd[0]-d.boxStart[0],p=d.boxEnd[1]-d.boxStart[1];var S=(a[3]-a[1])/(a[2]-a[0]);Math.abs(h*S)>Math.abs(p)?(d.boxEnd[1]=d.boxStart[1]+Math.abs(h)*S*(p>=0?1:-1),d.boxEnd[1]<a[1]?(d.boxEnd[1]=a[1],d.boxEnd[0]=d.boxStart[0]+(a[1]-d.boxStart[1])/Math.abs(S)):d.boxEnd[1]>a[3]&&(d.boxEnd[1]=a[3],d.boxEnd[0]=d.boxStart[0]+(a[3]-d.boxStart[1])/Math.abs(S))):(d.boxEnd[0]=d.boxStart[0]+Math.abs(p)/S*(h>=0?1:-1),d.boxEnd[0]<a[0]?(d.boxEnd[0]=a[0],d.boxEnd[1]=d.boxStart[1]+(a[0]-d.boxStart[0])*Math.abs(S)):d.boxEnd[0]>a[2]&&(d.boxEnd[0]=a[2],d.boxEnd[1]=d.boxStart[1]+(a[2]-d.boxStart[0])*Math.abs(S)))}}else d.boxEnabled?(h=d.boxStart[0]!==d.boxEnd[0],p=d.boxStart[1]!==d.boxEnd[1],h||p?(h&&(k(0,d.boxStart[0],d.boxEnd[0]),t.xaxis.autorange=!1),p&&(k(1,d.boxStart[1],d.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),d.boxEnabled=!1,d.boxInited=!1):d.boxInited&&(d.boxInited=!1);break;case"pan":d.boxEnabled=!1,d.boxInited=!1,u?(d.panning||(d.dragStart[0]=f,d.dragStart[1]=s),Math.abs(d.dragStart[0]-f)<_&&(f=d.dragStart[0]),Math.abs(d.dragStart[1]-s)<_&&(s=d.dragStart[1]),h=(l-f)*(a[2]-a[0])/(r.viewBox[2]-r.viewBox[0]),p=(w-s)*(a[3]-a[1])/(r.viewBox[3]-r.viewBox[1]),a[0]+=h,a[2]+=h,a[1]+=p,a[3]+=p,t.setRanges(a),d.panning=!0,d.lastInputTime=Date.now(),c(),t.cameraChanged(),t.handleAnnotations()):d.panning&&(d.panning=!1,t.relayoutCallback())}d.lastPos[0]=f,d.lastPos[1]=s}return d.mouseListener=g(o,i),o.addEventListener("touchstart",function(u){var f=b(u.changedTouches[0],o);i(0,f[0],f[1]),i(1,f[0],f[1]),u.preventDefault()},!!e&&{passive:!1}),o.addEventListener("touchmove",function(u){u.preventDefault();var f=b(u.changedTouches[0],o);i(1,f[0],f[1]),u.preventDefault()},!!e&&{passive:!1}),o.addEventListener("touchend",function(u){i(0,d.lastPos[0],d.lastPos[1]),u.preventDefault()},!!e&&{passive:!1}),d.wheelListener=m(o,function(u,f){if(!t.scrollZoom)return!1;var s=t.calcDataBox(),h=r.viewBox,p=d.lastPos[0],a=d.lastPos[1],x=Math.exp(5*f/(h[3]-h[1])),l=p/(h[2]-h[0])*(s[2]-s[0])+s[0],w=a/(h[3]-h[1])*(s[3]-s[1])+s[1];return s[0]=(s[0]-l)*x+l,s[2]=(s[2]-l)*x+l,s[1]=(s[1]-w)*x+w,s[3]=(s[3]-w)*x+w,t.setRanges(s),d.lastInputTime=Date.now(),c(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0},!0),d}},{"../cartesian/constants":561,"has-passive-events":229,"mouse-change":241,"mouse-event-offset":242,"mouse-wheel":244}],595:[function(y,ee,te){var g=y("../cartesian/axes"),m=y("../../lib/str2rgbarray");function b(n){this.scene=n,this.gl=n.gl,this.pixelRatio=n.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,
1216!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=["x","y"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=["sans-serif","sans-serif"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title="",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont="sans-serif",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var v=b.prototype,e=["xaxis","yaxis"];v.merge=function(n){var t,o,r,d,c,i,u,f,s,h,p;for(this.titleEnable=!1,this.backgroundColor=m(n.plot_bgcolor),h=0;h<2;++h){var a=(t=e[h]).charAt(0);for(r=(o=n[this.scene[t]._name]).title.text===this.scene.fullLayout._dfltTitle[a]?"":o.title.text,p=0;p<=2;p+=2)this.labelEnable[h+p]=!1,this.labels[h+p]=r,this.labelColor[h+p]=m(o.title.font.color),this.labelFont[h+p]=o.title.font.family,this.labelSize[h+p]=o.title.font.size,this.labelPad[h+p]=this.getLabelPad(t,o),this.tickEnable[h+p]=!1,this.tickColor[h+p]=m((o.tickfont||{}).color),this.tickAngle[h+p]=o.tickangle==="auto"?0:Math.PI*-o.tickangle/180,this.tickPad[h+p]=this.getTickPad(o),this.tickMarkLength[h+p]=0,this.tickMarkWidth[h+p]=o.tickwidth||0,this.tickMarkColor[h+p]=m(o.tickcolor),this.borderLineEnable[h+p]=!1,this.borderLineColor[h+p]=m(o.linecolor),this.borderLineWidth[h+p]=o.linewidth||0;u=this.hasSharedAxis(o),c=this.hasAxisInDfltPos(t,o)&&!u,i=this.hasAxisInAltrPos(t,o)&&!u,d=o.mirror||!1,f=u?String(d).indexOf("all")!==-1:!!d,s=u?d==="allticks":String(d).indexOf("ticks")!==-1,c?this.labelEnable[h]=!0:i&&(this.labelEnable[h+2]=!0),c?this.tickEnable[h]=o.showticklabels:i&&(this.tickEnable[h+2]=o.showticklabels),(c||f)&&(this.borderLineEnable[h]=o.showline),(i||f)&&(this.borderLineEnable[h+2]=o.showline),(c||s)&&(this.tickMarkLength[h]=this.getTickMarkLength(o)),(i||s)&&(this.tickMarkLength[h+2]=this.getTickMarkLength(o)),this.gridLineEnable[h]=o.showgrid,this.gridLineColor[h]=m(o.gridcolor),this.gridLineWidth[h]=o.gridwidth,this.zeroLineEnable[h]=o.zeroline,this.zeroLineColor[h]=m(o.zerolinecolor),this.zeroLineWidth[h]=o.zerolinewidth}},v.hasSharedAxis=function(n){var t=this.scene,o=t.fullLayout._subplots.gl2d;return g.findSubplotsWithAxis(o,n).indexOf(t.id)!==0},v.hasAxisInDfltPos=function(n,t){var o=t.side;return n==="xaxis"?o==="bottom":n==="yaxis"?o==="left":void 0},v.hasAxisInAltrPos=function(n,t){var o=t.side;return n==="xaxis"?o==="top":n==="yaxis"?o==="right":void 0},v.getLabelPad=function(n,t){var o=t.title.font.size,r=t.showticklabels;return n==="xaxis"?t.side==="top"?o*(1.5+(r?1:0))-10:o*(1.5+(r?.5:0))-10:n==="yaxis"?t.side==="right"?10+o*(1.5+(r?1:.5)):10+o*(1.5+(r?.5:0)):void 0},v.getTickPad=function(n){return n.ticks==="outside"?10+n.ticklen:15},v.getTickMarkLength=function(n){if(!n.ticks)return 0;var t=n.ticklen;return n.ticks==="inside"?-t:t},ee.exports=function(n){return new b(n)}},{"../../lib/str2rgbarray":528,"../cartesian/axes":554}],596:[function(y,ee,te){var g=y("../../plot_api/edit_types").overrideAll,m=y("./scene2d"),b=y("../layout_attributes"),v=y("../../constants/xmlns_namespaces"),e=y("../cartesian/constants"),n=y("../cartesian"),t=y("../../components/fx/layout_attributes"),o=y("../get_data").getSubplotData;te.name="gl2d",te.attr=["xaxis","yaxis"],te.idRoot=["x","y"],te.idRegex=e.idRegex,te.attrRegex=e.attrRegex,te.attributes=y("../cartesian/attributes"),te.supplyLayoutDefaults=function(r,d,c){d._has("cartesian")||n.supplyLayoutDefaults(r,d,c)},te.layoutAttrOverrides=g(n.layoutAttributes,"plot","from-root"),te.baseLayoutAttrOverrides=g({plot_bgcolor:b.plot_bgcolor,hoverlabel:t.hoverlabel},"plot","nested"),te.plot=function(r){for(var d=r._fullLayout,c=r._fullData,i=d._subplots.gl2d,u=0;u<i.length;u++){var f=i[u],s=d._plots[f],h=o(c,"gl2d",f),p=s._scene2d;p===void 0&&(p=new m({id:f,graphDiv:r,container:r.querySelector(".gl-container"),staticPlot:r._context.staticPlot,plotGlPixelRatio:r._context.plotGlPixelRatio},d),s._scene2d=p),p.plot(h,r.calcdata,d,r.layout)}},te.clean=function(r,d,c,i){for(var u=i._subplots.gl2d||[],f=0;f<u.length;f++){var s=u[f],h=i._plots[s];if(h._scene2d){var p=o(r,"gl2d",s);p.length===0&&(h._scene2d.destroy(),delete i._plots[s])}}n.clean.apply(this,arguments)},te.drawFramework=function(r){r._context.staticPlot||n.drawFramework(r)},te.toSVG=function(r){for(var d=r._fullLayout,c=d._subplots.gl2d,i=0;i<c.length;i++){var u=d._plots[c[i]]._scene2d,f=u.toImage("png");d._glimages.append("svg:image").attr({xmlns:v.svg,"xlink:href":f,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),u.destroy()}},te.updateFx=function(r){for(var d=r._fullLayout,c=d._subplots.gl2d,i=0;i<c.length;i++)d._plots[c[i]]._scene2d.updateFx(d.dragmode)}},{"../../components/fx/layout_attributes":407,"../../constants/xmlns_namespaces":480,"../../plot_api/edit_types":536,"../cartesian":568,"../cartesian/attributes":552,"../cartesian/constants":561,"../get_data":593,"../layout_attributes":610,"./scene2d":597}],597:[function(y,ee,te){var g,m,b=y("../../registry"),v=y("../../plots/cartesian/axes"),e=y("../../components/fx"),n=y("../../../stackgl_modules").gl_plot2d,t=y("../../../stackgl_modules").gl_spikes2d,o=y("../../../stackgl_modules").gl_select_box,r=y("webgl-context"),d=y("./convert"),c=y("./camera"),i=y("../../lib/show_no_webgl_msg"),u=y("../cartesian/constraints"),f=u.enforce,s=u.clean,h=y("../cartesian/autorange").doAutoRange,p=y("../../components/dragelement/helpers"),a=p.drawMode,x=p.selectMode,l=["xaxis","yaxis"],w=y("../cartesian/constants").SUBPLOT_PATTERN;function _(k,L){this.container=k.container,this.graphDiv=k.graphDiv,this.pixelRatio=k.plotGlPixelRatio||window.devicePixelRatio,this.id=k.id,this.staticPlot=!!k.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(L),this.makeFramework(),this.stopped||(this.glplotOptions=d(this),this.glplotOptions.merge
1216(L),this.glplot=n(this.glplotOptions),this.camera=c(this),this.traces={},this.spikes=t(this.glplot),this.selectBox=o(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}ee.exports=_;var T=_.prototype;T.makeFramework=function(){if(this.staticPlot){if(!(m||(g=document.createElement("canvas"),m=r({canvas:g,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error("Error creating static canvas/context for image server");this.canvas=g,this.gl=m}else{var k=this.container.querySelector(".gl-canvas-focus"),L=r({canvas:k,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!L)return i(this),void(this.stopped=!0);this.canvas=k,this.gl=L}var A=this.canvas;A.style.width="100%",A.style.height="100%",A.style.position="absolute",A.style.top="0px",A.style.left="0px",A.style["pointer-events"]="none",this.updateSize(A);var I=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");I.style.position="absolute",I.style.top=I.style.left="0px",I.style.width=I.style.height="100%",I.style["z-index"]=20,I.style["pointer-events"]="none";var P=this.mouseContainer=document.createElement("div");P.style.position="absolute",P.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var S=this.container;S.appendChild(I),S.appendChild(P);var E=this;P.addEventListener("mouseout",function(){E.isMouseOver=!1,E.unhover()}),P.addEventListener("mouseover",function(){E.isMouseOver=!0})},T.toImage=function(k){k||(k="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(g),this.updateSize(this.canvas);var L=this.glplot.gl,A=L.drawingBufferWidth,I=L.drawingBufferHeight;L.clearColor(1,1,1,0),L.clear(L.COLOR_BUFFER_BIT|L.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),L.bindFramebuffer(L.FRAMEBUFFER,null);var P=new Uint8Array(A*I*4);L.readPixels(0,0,A,I,L.RGBA,L.UNSIGNED_BYTE,P);for(var S=0,E=I-1;S<E;++S,--E)for(var D=0;D<A;++D)for(var F=0;F<4;++F){var H=P[4*(A*S+D)+F];P[4*(A*S+D)+F]=P[4*(A*E+D)+F],P[4*(A*E+D)+F]=H}var V=document.createElement("canvas");V.width=A,V.height=I;var Z,K=V.getContext("2d"),q=K.createImageData(A,I);switch(q.data.set(P),K.putImageData(q,0,0),k){case"jpeg":Z=V.toDataURL("image/jpeg");break;case"webp":Z=V.toDataURL("image/webp");break;default:Z=V.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(g),Z},T.updateSize=function(k){k||(k=this.canvas);var L=this.pixelRatio,A=this.fullLayout,I=A.width,P=A.height,S=0|Math.ceil(L*I),E=0|Math.ceil(L*P);return k.width===S&&k.height===E||(k.width=S,k.height=E),k},T.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var k=[v.calcTicks(this.xaxis),v.calcTicks(this.yaxis)],L=0;L<2;++L)for(var A=0;A<k[L].length;++A)k[L][A].text=k[L][A].text+"";return k},T.updateRefs=function(k){this.fullLayout=k;var L=this.id.match(w),A="xaxis"+L[1],I="yaxis"+L[2];this.xaxis=this.fullLayout[A],this.yaxis=this.fullLayout[I]},T.relayoutCallback=function(){var k=this.graphDiv,L=this.xaxis,A=this.yaxis,I=k.layout,P={},S=P[L._name+".range"]=L.range.slice(),E=P[A._name+".range"]=A.range.slice();P[L._name+".autorange"]=L.autorange,P[A._name+".autorange"]=A.autorange,b.call("_storeDirectGUIEdit",k.layout,k._fullLayout._preGUI,P);var D=I[L._name];D.range=S,D.autorange=L.autorange;var F=I[A._name];F.range=E,F.autorange=A.autorange,P.lastInputTime=this.camera.lastInputTime,k.emit("plotly_relayout",P)},T.cameraChanged=function(){var k=this.camera;this.glplot.setDataBox(this.calcDataBox());var L=this.computeTickMarks();(function(A,I){for(var P=0;P<2;++P){var S=A[P],E=I[P];if(S.length!==E.length)return!0;for(var D=0;D<S.length;++D)if(S[D].x!==E[D].x)return!0}return!1})(L,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=L,this.glplotOptions.dataBox=k.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},T.handleAnnotations=function(){for(var k=this.graphDiv,L=this.fullLayout.annotations,A=0;A<L.length;A++){var I=L[A];I.xref===this.xaxis._id&&I.yref===this.yaxis._id&&b.getComponentMethod("annotations","drawOne")(k,A)}},T.destroy=function(){if(this.glplot){var k=this.traces;k&&Object.keys(k).map(function(L){k[L].dispose(),delete k[L]}),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener("wheel",this.camera.wheelListener),this.camera=null}},T.plot=function(k,L,A){var I=this.glplot;this.updateRefs(A),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(k,L),this.updateFx(A.dragmode);var P=A.width,S=A.height;this.updateSize(this.canvas);var E=this.glplotOptions;E.merge(A),E.screenBox=[0,0,P,S];var D={_fullLayout:{_axisConstraintGroups:A._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:A._size}};s(D,this.xaxis),s(D,this.yaxis);var F,H,V=A._size,Z=this.xaxis.domain,K=this.yaxis.domain;for(E.viewBox=[V.l+Z[0]*V.w,V.b+K[0]*V.h,P-V.r-(1-Z[1])*V.w,S-V.t-(1-K[1])*V.h],this.mouseContainer.style.width=V.w*(Z[1]-Z[0])+"px",this.mouseContainer.style.height=V.h*(K[1]-K[0])+"px",this.mouseContainer.height=V.h*(K[1]-K[0]),this.mouseContainer.style.left=V.l+Z[0]*V.w+"px",this.mouseContainer.style.top=V.t+(1-K[1])*V.h+"px",H=0;H<2;++H)(F=this[l[H]])._length=E.viewBox[H+2]-E.viewBox[H],h(this.graphDiv,F),F.setScale();f(D),E.ticks=this.computeTickMarks(),E.dataBox=this.calcDataBox(),E.merge(A),I.update(E),this.glplot.draw()},T.calcDataBox=function(){var k=this.xaxis,L=this.yaxis,A=k.range,I=L.range,P=k.r2l,S=L.r2l;return[P(A[0]),S(I[0]),P(A[1]),S(I[1])]},T.setRanges=function(k){var L=this.xaxis,A=this.yaxis,I=L.l2r,P=A.l2r;L.range=[I(k[0]),I(k[2])],A.range=[P(k[1]),P(k[3])]},T.updateTraces=function(k,L){var A,I,P,S=Object.keys(this.traces);this.fullData=k;e:for(A=0;A<S.length;A++){var E=S[A],D=this.traces[E];for(I=0;I<k.length;I++)if((P=k[I]).uid===E&&P.type===D.type)continue e;D.dispose(),delete this.traces[E]}for(A=0;A<k.length;A++){P=k[A];var F=L[A],H=this.traces[P.uid];H?H.update(P,F):(H=P._module.plot(this,P,F),this.traces[P.uid]=H)}this.glplot.objects.sort(function(V,Z){return V._trace.index-Z._trace.index})},T.updateFx=function(k){x(k)||a(k)?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),this.mouseContainer.style.cursor=k==="pan"?"move":k==="zoom"?"crosshair":null},T.emitPointAction=function(k,L){for(var A,I=k.trace.uid,P=k.pointIndex,S=0;S<this.fullData.length;S++)this.fullData[S].uid===I&&(A=this.fullData[S]);var E={x:k.traceCoord[0],y:k.traceCoord[1],curveNumber:A.index,pointNumber:P,data:A._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};e.appendArrayPointValue(E,A,P),this.graphDiv.emit(L,{points:[E]})},T.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var k=this.glplot,L=this.camera,A=L.mouseListener,I=this.lastButtonState===1&&A.buttons===0,P=this.fullLayout;this.lastButtonState=A.buttons,this.cameraChanged();var S,E=A.x*k.pixelRatio,D=this.canvas.height-k.pixelRatio*A.y;if(L.boxEnabled&&P.dragmode==="zoom"){this.selectBox.enabled=!0;for(var F=this.selectBox.selectBox=[Math.min(L.boxStart[0],L.boxEnd[0]),Math.min(L.boxStart[1],L.boxEnd[1]),Math.max(L.boxStart[0],L.boxEnd[0]),Math.max(L.boxStart[1],L.boxEnd[1])],H=0;H<2;H++)L.boxStart[H]===L.boxEnd[H]&&(F[H]=k.dataBox[H],F[H+2]=k.dataBox[H+2]);k.setDirty()}else if(!L.panning&&this.isMouseOver){this.selectBox.enabled=!1;var V=P._size,Z=this.xaxis.domain,K=this.yaxis.domain,q=(S=k.pick(E/k.pixelRatio+V.l+Z[0]*V.w,D/k.pixelRatio-(V.t+(1-K[1])*V.h)))&&S.object._trace.handlePick(S);if(q&&I&&this.emitPointAction(q,"plotly_click"),S&&S.object._trace.hoverinfo!=="skip"&&P.hovermode&&q&&(!this.lastPickResult||this.lastPickResult.traceUid!==q.trace.uid||this.lastPickResult.dataCoord[0]!==q.dataCoord[0]||this.lastPickResult.dataCoord[1]!==q.dataCoord[1])){var W=q;this.lastPickResult={traceUid:q.trace?q.trace.uid:null,dataCoord:q.dataCoord.slice()},this.spikes.update({center:S.dataCoord}),W.screenCoord=[((k.viewBox[2]-k.viewBox[0])*(S.dataCoord[0]-k.dataBox[0])/(k.dataBox[2]-k.dataBox[0])+k.viewBox[0])/k.pixelRatio,(this.canvas.height-(k.viewBox[3]-k.viewBox[1])*(S.dataCoord[1]-k.dataBox[1])/(k.dataBox[3]-k.dataBox[1])-k.viewBox[1])/k.pixelRatio],this.emitPointAction(q,"plotly_hover");var $=this.fullData[W.trace.index]||{},R=W.pointIndex,N=e.castHoverinfo($,P,R);if(N&&N!=="all"){var U=N.split("+");U.indexOf("x")===-1&&(W.traceCoord[0]=void 0),U.indexOf("y")===-1&&(W.traceCoord[1]=void 0),U.indexOf("z")===-1&&(W.traceCoord[2]=void 0),U.indexOf("text")===-1&&(W.textLabel=void 0),U.indexOf("name")===-1&&(W.name=void 0)}e.loneHover({x:W.screenCoord[0],y:W.screenCoord[1],xLabel:this.hoverFormatter("xaxis",W.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",W.traceCoord[1]),zLabel:W.traceCoord[2],text:W.textLabel,name:W.name,color:e.castHoverOption($,R,"bgcolor")||W.color,borderColor:e.castHoverOption($,R,"bordercolor"),fontFamily:e.castHoverOption($,R,"font.family"),fontSize:e.castHoverOption($,R,"font.size"),fontColor:e.castHoverOption($,R,"font.color"),nameLength:e.castHoverOption($,R,"namelength"),textAlign:e.castHoverOption($,R,"align")},{container:this.svgContainer,gd:this.graphDiv})}}S||this.unhover(),k.draw()}},T.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),e.loneUnhover(this.svgContainer))}
1216,T.hoverFormatter=function(k,L){if(L!==void 0){var A=this[k];return v.tickText(A,A.c2l(L),"hover").text}}},{"../../../stackgl_modules":1120,"../../components/dragelement/helpers":384,"../../components/fx":406,"../../lib/show_no_webgl_msg":525,"../../plots/cartesian/axes":554,"../../registry":638,"../cartesian/autorange":553,"../cartesian/constants":561,"../cartesian/constraints":562,"./camera":594,"./convert":595,"webgl-context":331}],598:[function(y,ee,te){var g=y("../../plot_api/edit_types").overrideAll,m=y("../../components/fx/layout_attributes"),b=y("./scene"),v=y("../get_data").getSubplotData,e=y("../../lib"),n=y("../../constants/xmlns_namespaces");te.name="gl3d",te.attr="scene",te.idRoot="scene",te.idRegex=te.attrRegex=e.counterRegex("scene"),te.attributes=y("./layout/attributes"),te.layoutAttributes=y("./layout/layout_attributes"),te.baseLayoutAttrOverrides=g({hoverlabel:m.hoverlabel},"plot","nested"),te.supplyLayoutDefaults=y("./layout/defaults"),te.plot=function(t){for(var o=t._fullLayout,r=t._fullData,d=o._subplots.gl3d,c=0;c<d.length;c++){var i=d[c],u=v(r,"gl3d",i),f=o[i],s=f.camera,h=f._scene;h||(h=new b({id:i,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:s},o),f._scene=h),h.viewInitial||(h.viewInitial={up:{x:s.up.x,y:s.up.y,z:s.up.z},eye:{x:s.eye.x,y:s.eye.y,z:s.eye.z},center:{x:s.center.x,y:s.center.y,z:s.center.z}}),h.plot(u,o,t.layout)}},te.clean=function(t,o,r,d){for(var c=d._subplots.gl3d||[],i=0;i<c.length;i++){var u=c[i];!o[u]&&d[u]._scene&&(d[u]._scene.destroy(),d._infolayer&&d._infolayer.selectAll(".annotation-"+u).remove())}},te.toSVG=function(t){for(var o=t._fullLayout,r=o._subplots.gl3d,d=o._size,c=0;c<r.length;c++){var i=o[r[c]],u=i.domain,f=i._scene,s=f.toImage("png");o._glimages.append("svg:image").attr({xmlns:n.svg,"xlink:href":s,x:d.l+d.w*u.x[0],y:d.t+d.h*(1-u.y[1]),width:d.w*(u.x[1]-u.x[0]),height:d.h*(u.y[1]-u.y[0]),preserveAspectRatio:"none"}),f.destroy()}},te.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var o=t.substr(5);return o==="1"&&(o=""),"scene"+o}},te.updateFx=function(t){for(var o=t._fullLayout,r=o._subplots.gl3d,d=0;d<r.length;d++)o[r[d]]._scene.updateFx(o.dragmode,o.hovermode)}},{"../../components/fx/layout_attributes":407,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../plot_api/edit_types":536,"../get_data":593,"./layout/attributes":599,"./layout/defaults":603,"./layout/layout_attributes":604,"./scene":608}],599:[function(y,ee,te){ee.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},{}],600:[function(y,ee,te){var g=y("../../../components/color"),m=y("../../cartesian/layout_attributes"),b=y("../../../lib/extend").extendFlat,v=y("../../../plot_api/edit_types").overrideAll;ee.exports=v({visible:m.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:g.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:m.color,categoryorder:m.categoryorder,categoryarray:m.categoryarray,title:{text:m.title.text,font:m.title.font},type:b({},m.type,{values:["-","linear","log","date","category"]}),autotypenumbers:m.autotypenumbers,autorange:m.autorange,rangemode:m.rangemode,range:b({},m.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:m.tickmode,nticks:m.nticks,tick0:m.tick0,dtick:m.dtick,tickvals:m.tickvals,ticktext:m.ticktext,ticks:m.ticks,mirror:m.mirror,ticklen:m.ticklen,tickwidth:m.tickwidth,tickcolor:m.tickcolor,showticklabels:m.showticklabels,tickfont:m.tickfont,tickangle:m.tickangle,tickprefix:m.tickprefix,showtickprefix:m.showtickprefix,ticksuffix:m.ticksuffix,showticksuffix:m.showticksuffix,showexponent:m.showexponent,exponentformat:m.exponentformat,minexponent:m.minexponent,separatethousands:m.separatethousands,tickformat:m.tickformat,tickformatstops:m.tickformatstops,hoverformat:m.hoverformat,showline:m.showline,linecolor:m.linecolor,linewidth:m.linewidth,showgrid:m.showgrid,gridcolor:b({},m.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:m.gridwidth,zeroline:m.zeroline,zerolinecolor:m.zerolinecolor,zerolinewidth:m.zerolinewidth,_deprecated:{title:m._deprecated.title,titlefont:m._deprecated.titlefont}},"plot","from-root")},{"../../../components/color":366,"../../../lib/extend":493,"../../../plot_api/edit_types":536,"../../cartesian/layout_attributes":569}],601:[function(y,ee,te){var g=y("tinycolor2").mix,m=y("../../../lib"),b=y("../../../plot_api/plot_template"),v=y("./axis_attributes"),e=y("../../cartesian/type_defaults"),n=y("../../cartesian/axis_defaults"),t=["xaxis","yaxis","zaxis"];ee.exports=function(o,r,d){var c,i;function u(h,p){return m.coerce(c,i,v,h,p)}for(var f=0;f<t.length;f++){var s=t[f];c=o[s]||{},(i=b.newContainer(r,s))._id=s[0]+d.scene,i._name=s,e(c,i,u,d),n(c,i,u,{font:d.font,letter:s[0],data:d.data,showGrid:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,bgColor:d.bgColor,calendar:d.calendar},d.fullLayout),u("gridcolor",g(i.color,d.bgColor,13600/187).toRgbString()),u("title.text",s[0]),i.setScale=m.noop,u("showspikes")&&(u("spikesides"),u("spikethickness"),u("spikecolor",i.color)),u("showaxeslabels"),u("showbackground")&&u("backgroundcolor")}}},{"../../../lib":503,"../../../plot_api/plot_template":543,"../../cartesian/axis_defaults":556,"../../cartesian/type_defaults":582,"./axis_attributes":600,tinycolor2:312}],602:[function(y,ee,te){var g=y("../../../lib/str2rgbarray"),m=y("../../../lib"),b=["xaxis","yaxis","zaxis"];function v(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWi
1216dth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}v.prototype.merge=function(e,n){for(var t=0;t<3;++t){var o=n[b[t]];o.visible?(this.labels[t]=e._meta?m.templateString(o.title.text,e._meta):o.title.text,"font"in o.title&&(o.title.font.color&&(this.labelColor[t]=g(o.title.font.color)),o.title.font.family&&(this.labelFont[t]=o.title.font.family),o.title.font.size&&(this.labelSize[t]=o.title.font.size)),"showline"in o&&(this.lineEnable[t]=o.showline),"linecolor"in o&&(this.lineColor[t]=g(o.linecolor)),"linewidth"in o&&(this.lineWidth[t]=o.linewidth),"showgrid"in o&&(this.gridEnable[t]=o.showgrid),"gridcolor"in o&&(this.gridColor[t]=g(o.gridcolor)),"gridwidth"in o&&(this.gridWidth[t]=o.gridwidth),o.type==="log"?this.zeroEnable[t]=!1:"zeroline"in o&&(this.zeroEnable[t]=o.zeroline),"zerolinecolor"in o&&(this.zeroLineColor[t]=g(o.zerolinecolor)),"zerolinewidth"in o&&(this.zeroLineWidth[t]=o.zerolinewidth),"ticks"in o&&o.ticks?this.lineTickEnable[t]=!0:this.lineTickEnable[t]=!1,"ticklen"in o&&(this.lineTickLength[t]=this._defaultLineTickLength[t]=o.ticklen),"tickcolor"in o&&(this.lineTickColor[t]=g(o.tickcolor)),"tickwidth"in o&&(this.lineTickWidth[t]=o.tickwidth),"tickangle"in o&&(this.tickAngle[t]=o.tickangle==="auto"?-3600:Math.PI*-o.tickangle/180),"showticklabels"in o&&(this.tickEnable[t]=o.showticklabels),"tickfont"in o&&(o.tickfont.color&&(this.tickColor[t]=g(o.tickfont.color)),o.tickfont.family&&(this.tickFont[t]=o.tickfont.family),o.tickfont.size&&(this.tickSize[t]=o.tickfont.size)),"mirror"in o?["ticks","all","allticks"].indexOf(o.mirror)!==-1?(this.lineTickMirror[t]=!0,this.lineMirror[t]=!0):o.mirror===!0?(this.lineTickMirror[t]=!1,this.lineMirror[t]=!0):(this.lineTickMirror[t]=!1,this.lineMirror[t]=!1):this.lineMirror[t]=!1,"showbackground"in o&&o.showbackground!==!1?(this.backgroundEnable[t]=!0,this.backgroundColor[t]=g(o.backgroundcolor)):this.backgroundEnable[t]=!1):(this.tickEnable[t]=!1,this.labelEnable[t]=!1,this.lineEnable[t]=!1,this.lineTickEnable[t]=!1,this.gridEnable[t]=!1,this.zeroEnable[t]=!1,this.backgroundEnable[t]=!1)}},ee.exports=function(e,n){var t=new v;return t.merge(e,n),t}},{"../../../lib":503,"../../../lib/str2rgbarray":528}],603:[function(y,ee,te){var g=y("../../../lib"),m=y("../../../components/color"),b=y("../../../registry"),v=y("../../subplot_defaults"),e=y("./axis_defaults"),n=y("./layout_attributes"),t=y("../../get_data").getSubplotData;function o(r,d,c,i){for(var u=c("bgcolor"),f=m.combine(u,i.paper_bgcolor),s=["up","center","eye"],h=0;h<s.length;h++)c("camera."+s[h]+".x"),c("camera."+s[h]+".y"),c("camera."+s[h]+".z");c("camera.projection.type");var p=!!c("aspectratio.x")&&!!c("aspectratio.y")&&!!c("aspectratio.z"),a=c("aspectmode",p?"manual":"auto");p||(r.aspectratio=d.aspectratio={x:1,y:1,z:1},a==="manual"&&(d.aspectmode="auto"),r.aspectmode=d.aspectmode);var x=t(i.fullData,"gl3d",i.id);e(r,d,{font:i.font,scene:i.id,data:x,bgColor:f,calendar:i.calendar,autotypenumbersDflt:i.autotypenumbersDflt,fullLayout:i.fullLayout}),b.getComponentMethod("annotations3d","handleDefaults")(r,d,i);var l=i.getDfltFromLayout("dragmode");if(l!==!1&&!l)if(l="orbit",r.camera&&r.camera.up){var w=r.camera.up.x,_=r.camera.up.y,T=r.camera.up.z;T!==0&&(w&&_&&T?T/Math.sqrt(w*w+_*_+T*T)>.999&&(l="turntable"):l="turntable")}else l="turntable";c("dragmode",l),c("hovermode",i.getDfltFromLayout("hovermode"))}ee.exports=function(r,d,c){var i=d._basePlotModules.length>1;v(r,d,c,{type:"gl3d",attributes:n,handleDefaults:o,fullLayout:d,font:d.font,fullData:c,getDfltFromLayout:function(u){if(!i)return g.validate(r[u],n[u])?r[u]:void 0},autotypenumbersDflt:d.autotypenumbers,paper_bgcolor:d.paper_bgcolor,calendar:d.calendar})}},{"../../../components/color":366,"../../../lib":503,"../../../registry":638,"../../get_data":593,"../../subplot_defaults":632,"./axis_defaults":601,"./layout_attributes":604}],604:[function(y,ee,te){var g=y("./axis_attributes"),m=y("../../domain").attributes,b=y("../../../lib/extend").extendFlat,v=y("../../../lib").counterRegex;function e(n,t,o){return{x:{valType:"number",dflt:n,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:o,editType:"camera"},editType:"camera"}}ee.exports={_arrayAttrRegexps:[v("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:b(e(0,0,1),{}),center:b(e(0,0,0),{}),eye:b(e(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:m({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:g,yaxis:g,zaxis:g,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},{"../../../lib":503,"../../../lib/extend":493,"../../domain":584,"./axis_attributes":600}],605:[function(y,ee,te){var g=y("../../../lib/str2rgbarray"),m=["xaxis","yaxis","zaxis"];function b(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}b.prototype.merge=function(v){for(var e=0;e<3;++e){var n=v[m[e]];n.visible?(this.enabled[e]=n.showspikes,this.colors[e]=g(n.spikecolor),this.drawSides[e]=n.spikesides,this.lineWidth[e]=n.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},ee.exports=function(v){var e=new b;return e.merge(v),e}},{"../../../lib/str2rgbarray":528}],606:[function(y,ee,te){ee.exports=function(e){for(var n=e.axesOptions,t=e.glplot.axesPixels,o=e.fullSceneLayout,r=[[],[],[]],d=0;d<3;++d){var c=o[b[d]];if(c._length=(t[d].hi-t[d].lo)*t[d].pixelsPerDataUnit/e.dataScale[d],Math.abs(c._length)===1/0||isNaN(c._length))r[d]=[];else{c._input_range=c.range.slice(),c.range[0]=t[d].lo/e.dataScale[d],c.range[1]=t[d].hi/e.dataScale[d],c._m=1/(e.dataScale[d]*t[d].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var i=c.tickmode;if(c.tickmode==="auto"){c.tickmode="linear";var u=c.nticks||m.constrain(c._length/40,4,9);g.autoTicks(c,Math.abs(c.range[1]-c.range[0])/u)}for(var f=g.calcTicks(c,{msUTC:!0}),s=0;s<f.length;++s)f[s].x=f[s].x*e.dataScale[d],c.type==="date"&&(f[s].text=f[s].text.replace(/\<br\>/g," "));r[d]=f,c.tickmode=i}}for(n.ticks=r,d=0;d<3;++d)for(v[d]=.5*(e.glplot.bounds[0][d]+e.glplot.bounds[1][d]),s=0;s<2;++s)n.bounds[s][d]=e.glplot.bounds[s][d];e.contourLevels=function(h){for(var p=new Array(3),a=0;a<3;++a){for(var x=h[a],l=new Array(x.length),w=0;w<x.length;++w)l[w]=x[w].x;p[a]=l}return p}(r)};var g=y("../../cartesian/axes"),m=y("../../../lib"),b=["xaxis","yaxis","zaxis"],v=[0,0,0]},{"../../../lib":503,"../../cartesian/axes":554}],607:[function(y,ee,te){function g(m,b){var v,e,n=[0,0,0,0];for(v=0;v<4;++v)for(e=0;e<4;++e)n[e]+=m[4*v+e]*b[v];return n}ee.exports=function(m,b){return g(m.projection,g(m.view,g(m.model,[b[0],b[1],b[2],1])))}},{}],608:[function(y,ee,te){var g,m,b=y("../../../stackgl_modules").gl_plot3d,v=b.createCamera,e=b.createScene,n=y("webgl-context"),t=y("has-passive-events"),o=y("../../registry"),r=y("../../lib"),d=r.preserveDrawingBuffer(),c=y("../../plots/cartesian/axes"),i=y("../../components/fx"),u=y("../../lib/str2rgbarray"),f=y("../../lib/show_no_webgl_msg"),s=y("./project"),h=y("./layout/convert"),p=y("./layout/spikes"),a=y("./layout/tick_marks");function x(k,L){var A=document.createElement("div"),I=k.container;this.graphDiv=k.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",A.appendChild(P),this.svgContainer=P,A.id=k.id,A.style.position="absolute",A.style.top=A.style.left="0px",A.style.width=A.style.height="100%",I.appendChild(A),this.fullLayout=L,this.id=k.id||"scene",this.fullSceneLayout=L[this.id],this.plotArg
1216s=[[],{},{}],this.axesOptions=h(L,L[this.id]),this.spikeOptions=p(L[this.id]),this.container=A,this.staticMode=!!k.staticPlot,this.pixelRatio=this.pixelRatio||k.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=o.getComponentMethod("annotations3d","convert"),this.drawAnnotations=o.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var l=x.prototype;l.prepareOptions=function(){var k={canvas:this.canvas,gl:this.gl,glOptions:{preserveDrawingBuffer:d,premultipliedAlpha:!0,antialias:!0},container:this.container,axes:this.axesOptions,spikes:this.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:this.camera,pixelRatio:this.pixelRatio};if(this.staticMode){if(!(m||(g=document.createElement("canvas"),m=n({canvas:g,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");k.gl=m,k.canvas=g}return k};var w=!0;l.tryCreatePlot=function(){var k=this.prepareOptions(),L=!0;try{this.glplot=e(k)}catch{if(this.staticMode||!w||d)L=!1;
vendor: 5,422 bytes, line 1216
1216else{r.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{d=k.glOptions.preserveDrawingBuffer=!0,this.glplot=e(k)}catch{d=k.glOptions.preserveDrawingBuffer=!1,L=!1}}}return w=!1,L},l.initializeGLCamera=function(){var k=this.fullSceneLayout.camera,L=k.projection.type==="orthographic";this.camera=v(this.container,{center:[k.center.x,k.center.y,k.center.z],eye:[k.eye.x,k.eye.y,k.eye.z],up:[k.up.x,k.up.y,k.up.z],_ortho:L,zoomMin:.01,zoomMax:100,mode:"orbit"})},l.initializeGLPlot=function(){var k=this;if(k.initializeGLCamera(),!k.tryCreatePlot())return f(k);k.traces={},k.make4thDimension();var L=k.graphDiv,A=L.layout,I=function(){var S={};return k.isCameraChanged(A)&&(S[k.id+".camera"]=k.getCamera()),k.isAspectChanged(A)&&(S[k.id+".aspectratio"]=k.glplot.getAspectratio(),A[k.id].aspectmode!=="manual"&&(k.fullSceneLayout.aspectmode=A[k.id].aspectmode=S[k.id+".aspectmode"]="manual")),S},P=function(S){if(S.fullSceneLayout.dragmode!==!1){var E=I();S.saveLayout(A),S.graphDiv.emit("plotly_relayout",E)}};return k.glplot.canvas&&(k.glplot.canvas.addEventListener("mouseup",function(){P(k)}),k.glplot.canvas.addEventListener("wheel",function(S){if(L._context._scrollZoom.gl3d){if(k.camera._ortho){var E=S.deltaX>S.deltaY?1.1:.9090909090909091,D=k.glplot.getAspectratio();k.glplot.setAspectratio({x:E*D.x,y:E*D.y,z:E*D.z})}P(k)}},!!t&&{passive:!1}),k.glplot.canvas.addEventListener("mousemove",function(){if(k.fullSceneLayout.dragmode!==!1&&k.camera.mouseListener.buttons!==0){var S=I();k.graphDiv.emit("plotly_relayouting",S)}}),k.staticMode||k.glplot.canvas.addEventListener("webglcontextlost",function(S){L&&L.emit&&L.emit("plotly_webglcontextlost",{event:S,layer:k.id})},!1)),k.glplot.oncontextloss=function(){k.recoverContext()},k.glplot.onrender=function(){k.render()},!0},l.render=function(){var k,L=this,A=L.graphDiv,I=L.svgContainer,P=L.container.getBoundingClientRect();A._fullLayout._calcInverseTransform(A);var S=A._fullLayout._invScaleX,E=A._fullLayout._invScaleY,D=P.width*S,F=P.height*E;I.setAttributeNS(null,"viewBox","0 0 "+D+" "+F),I.setAttributeNS(null,"width",D),I.setAttributeNS(null,"height",F),a(L),L.glplot.axes.update(L.axesOptions);for(var H=Object.keys(L.traces),V=null,Z=L.glplot.selection,K=0;K<H.length;++K)(k=L.traces[H[K]]).data.hoverinfo!=="skip"&&k.handlePick(Z)&&(V=k),k.setContourLevels&&k.setContourLevels();function q(oe,pe,ce){var de=L.fullSceneLayout[oe+"axis"];return de.type!=="log"&&(pe=de.d2l(pe)),c.hoverLabelText(de,pe,ce)}if(V!==null){var W=s(L.glplot.cameraParams,Z.dataCoordinate);k=V.data;var $,R=A._fullData[k.index],N=Z.index,U={xLabel:q("x",Z.traceCoordinate[0],k.xhoverformat),yLabel:q("y",Z.traceCoordinate[1],k.yhoverformat),zLabel:q("z",Z.traceCoordinate[2],k.zhoverformat)},Q=i.castHoverinfo(R,L.fullLayout,N),j=(Q||"").split("+"),X=Q&&Q==="all";R.hovertemplate||X||(j.indexOf("x")===-1&&(U.xLabel=void 0),j.indexOf("y")===-1&&(U.yLabel=void 0),j.indexOf("z")===-1&&(U.zLabel=void 0),j.indexOf("text")===-1&&(Z.textLabel=void 0),j.indexOf("name")===-1&&(V.name=void 0));var J=[];k.type==="cone"||k.type==="streamtube"?(U.uLabel=q("x",Z.traceCoordinate[3],k.uhoverformat),(X||j.indexOf("u")!==-1)&&J.push("u: "+U.uLabel),U.vLabel=q("y",Z.traceCoordinate[4],k.vhoverformat),(X||j.indexOf("v")!==-1)&&J.push("v: "+U.vLabel),U.wLabel=q("z",Z.traceCoordinate[5],k.whoverformat),(X||j.indexOf("w")!==-1)&&J.push("w: "+U.wLabel),U.normLabel=Z.traceCoordinate[6].toPrecision(3),(X||j.indexOf("norm")!==-1)&&J.push("norm: "+U.normLabel),k.type==="streamtube"&&(U.divergenceLabel=Z.traceCoordinate[7].toPrecision(3),(X||j.indexOf("divergence")!==-1)&&J.push("divergence: "+U.divergenceLabel)),Z.textLabel&&J.push(Z.textLabel),$=J.join("<br>")):k.type==="isosurface"||k.type==="volume"?(U.valueLabel=c.hoverLabelText(L._mockAxis,L._mockAxis.d2l(Z.traceCoordinate[3]),k.valuehoverformat),J.push("value: "+U.valueLabel),Z.textLabel&&J.push(Z.textLabel),$=J.join("<br>")):$=Z.textLabel;var re={x:Z.traceCoordinate[0],y:Z.traceCoordinate[1],z:Z.traceCoordinate[2],data:R._input,fullData:R,curveNumber:R.index,pointNumber:N};i.appendArrayPointValue(re,R,N),k._module.eventData&&(re=R._module.eventData(re,Z,R,{},N));var ne={points:[re]};if(L.fullSceneLayout.hovermode){var se=[];i.loneHover({trace:R,x:(.5+.5*W[0]/W[3])*D,y:(.5-.5*W[1]/W[3])*F,xLabel:U.xLabel,yLabel:U.yLabel,zLabel:U.zLabel,text:$,name:V.name,color:i.castHoverOption(R,N,"bgcolor")||V.color,borderColor:i.castHoverOption(R,N,"bordercolor"),fontFamily:i.castHoverOption(R,N,"font.family"),fontSize:i.castHoverOption(R,N,"font.size"),fontColor:i.castHoverOption(R,N,"font.color"),nameLength:i.castHoverOption(R,N,"namelength"),textAlign:i.castHoverOption(R,N,"align"),hovertemplate:r.castOption(R,N,"hovertemplate"),hovertemplateLabels:r.extendFlat({},re,U),eventData:[re]},{container:I,gd:A,inOut_bbox:se}),re.bbox=se[0]}Z.buttons&&Z.distance<5?A.emit("plotly_click",ne):A.emit("plotly_hover",ne),this.oldEventData=ne}else i.loneUnhover(I),this.oldEventData&&A.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;L.drawAnnotations(L)},l.recoverContext=function(){var k=this;k.glplot.dispose();var L=function(){k.glplot.gl.isContextLost()?requestAnimationFrame(L):k.initializeGLPlot()?k.plot.apply(k,k.plotArg
1216s):r.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(L)};var _=["xaxis","yaxis","zaxis"];function T(k,L,A){for(var I=k.fullSceneLayout,P=0;P<3;P++){var S=_[P],E=S.charAt(0),D=I[S],F=L[E],H=L[E+"calendar"],V=L["_"+E+"length"];if(r.isArrayOrTypedArray(F))for(var Z,K=0;K<(V||F.length);K++)if(r.isArrayOrTypedArray(F[K]))for(var q=0;q<F[K].length;++q)Z=D.d2l(F[K][q],0,H),!isNaN(Z)&&isFinite(Z)&&(A[0][P]=Math.min(A[0][P],Z),A[1][P]=Math.max(A[1][P],Z));else Z=D.d2l(F[K],0,H),!isNaN(Z)&&isFinite(Z)&&(A[0][P]=Math.min(A[0][P],Z),A[1][P]=Math.max(A[1][P],Z));else A[0][P]=Math.min(A[0][P],0),A[1][P]=Math.max(A[1][P],V-1)}}l.plot=function(k,L,A){if(this.plotArgs=[k,L,A],!this.glplot.contextLost){var I,P,S,E,D,F,H=L[this.id],V=A[this.id];this.fullLayout=L,this.fullSceneLayout=H,this.axesOptions.merge(L,H),this.spikeOptions.merge(H),this.setViewport(H),this.updateFx(H.dragmode,H.hovermode),this.camera.enableWheel=this.graphDiv._context._scrollZoom.gl3d,this.glplot.setClearColor(u(H.bgcolor)),this.setConvert(D),k?Array.isArray(k)||(k=[k]):k=[];var Z=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(S=0;S<k.length;++S)(I=k[S]).visible===!0&&I._length!==0&&T(this,I,Z);(function(Te,_e){for(var Ae=Te.fullSceneLayout,Pe=Ae.annotations||[],De=0;De<3;De++)for(var Ve=_[De],Qe=Ve.charAt(0),Oe=Ae[Ve],Ue=0;Ue<Pe.length;Ue++){var Ge=Pe[Ue];if(Ge.visible){var Ye=Oe.r2l(Ge[Qe]);!isNaN(Ye)&&isFinite(Ye)&&(_e[0][De]=Math.min(_e[0][De],Ye),_e[1][De]=Math.max(_e[1][De],Ye))}}})(this,Z);var K=[1,1,1];for(E=0;E<3;++E)Z[1][E]===Z[0][E]?K[E]=1:K[E]=1/(Z[1][E]-Z[0][E]);for(this.dataScale=K,this.convertAnnotations(this),S=0;S<k.length;++S)(I=k[S]).visible===!0&&I._length!==0&&((P=this.traces[I.uid])?P.data.type===I.type?P.update(I):(P.dispose(),P=I._module.plot(this,I),this.traces[I.uid]=P):(P=I._module.plot(this,I),this.traces[I.uid]=P),P.name=I.name);var q=Object.keys(this.traces);e:for(S=0;S<q.length;++S){for(E=0;E<k.length;++E)if(k[E].uid===q[S]&&k[E].visible===!0&&k[E]._length!==0)continue e;(P=this.traces[q[S]]).dispose(),delete this.traces[q[S]]}this.glplot.objects.sort(function(Te,_e){return Te._trace.data.index-_e._trace.data.index});var W,$=[[0,0,0],[0,0,0]],R=[],N={};for(S=0;S<3;++S){if((F=(D=H[_[S]]).type)in N?(N[F].acc*=K[S],N[F].count+=1):N[F]={acc:K[S],count:1},D.autorange){$[0][S]=1/0,$[1][S]=-1/0;var U=this.glplot.objects,Q=this.fullSceneLayout.annotations||[],j=D._name.charAt(0);for(E=0;E<U.length;E++){var X=U[E],J=X.bounds,re=X._trace.data._pad||0;X.constructor.name==="ErrorBars"&&D._lowerLogErrorBound?$[0][S]=Math.min($[0][S],D._lowerLogErrorBound):$[0][S]=Math.min($[0][S],J[0][S]/K[S]-re),$[1][S]=Math.max($[1][S],J[1][S]/K[S]+re)}for(E=0;E<Q.length;E++){var ne=Q[E];if(ne.visible){var se=D.r2l(ne[j]);$[0][S]=Math.min($[0][S],se),$[1][S]=Math.max($[1][S],se)}}if("rangemode"in D&&D.rangemode==="tozero"&&($[0][S]=Math.min($[0][S],0),$[1][S]=Math.max($[1][S],0)),$[0][S]>$[1][S])$[0][S]=-1,$[1][S]=1;else{var oe=$[1][S]-$[0][S];$[0][S]-=oe/32,$[1][S]+=oe/32}if(D.autorange==="reversed"){var pe=$[0][S];$[0][S]=$[1][S],$[1][S]=pe}}else{var ce=D.range;$[0][S]=D.r2l(ce[0]),$[1][S]=D.r2l(ce[1])}$[0][S]===$[1][S]&&($[0][S]-=1,$[1][S]+=1),R[S]=$[1][S]-$[0][S],this.glplot.setBounds(S,{min:$[0][S]*K[S],max:$[1][S]*K[S]})}var de=H.aspectmode;if(de==="cube")W=[1,1,1];else if(de==="manual"){var xe=H.aspectratio;W=[xe.x,xe.y,xe.z]}else{if(de!=="auto"&&de!=="data")throw new Error("scene.js aspectRatio was not one of the enumerated types");var we=[1,1,1];for(S=0;S<3;++S){var be=N[F=(D=H[_[S]]).type];we[S]=Math.pow(be.acc,1/be.count)/K[S]}W=de==="data"||Math.max.apply(null,we)/Math.min.apply(null,we)<=4?we:[1,1,1]}H.aspectratio.x=V.aspectratio.x=W[0],H.aspectratio.y=V.aspectratio.y=W[1],H.aspectratio.z=V.aspectratio.z=W[2],this.glplot.setAspectratio(H.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:H.aspectratio.x,y:H.aspectratio.y,z:H.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=H.aspectmode);var Ee=H.domain||null,fe=L._size||null;if(Ee&&fe){var me=this.container.style;
1216me.position="absolute",me.left=fe.l+Ee.x[0]*fe.w+"px",me.top=fe.t+(1-Ee.y[1])*fe.h+"px",me.width=fe.w*(Ee.x[1]-Ee.x[0])+"px",me.height=fe.h*(Ee.y[1]-Ee.y[0])+"px"}this.glplot.redraw()}},l.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},l.getCamera=function(){var k;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(k=this.camera).up[0],y:k.up[1],z:k.up[2]},center:{x:k.center[0],y:k.center[1],z:k.center[2]},eye:{x:k.eye[0],y:k.eye[1],z:k.eye[2]},projection:{type:k._ortho===!0?"orthographic":"perspective"}}},l.setViewport=function(k){var L,A=k.camera;this.camera.lookAt.apply(this,[[(L=A).eye.x,L.eye.y,L.eye.z],[L.center.x,L.center.y,L.center.z],[L.up.x,L.up.y,L.up.z]]),this.glplot.setAspectratio(k.aspectratio),A.projection.type==="orthographic"!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},l.isCameraChanged=function(k){var L=this.getCamera(),A=r.nestedProperty(k,this.id+".camera").get();function I(D,F,H,V){var Z=["up","center","eye"],K=["x","y","z"];return F[Z[H]]&&D[Z[H]][K[V]]===F[Z[H]][K[V]]}var P=!1;if(A===void 0)P=!0;else{for(var S=0;S<3;S++)for(var E=0;E<3;E++)if(!I(L,A,S,E)){P=!0;break}(!A.projection||L.projection&&L.projection.type!==A.projection.type)&&(P=!0)}return P},l.isAspectChanged=function(k){var L=this.glplot.getAspectratio(),A=r.nestedProperty(k,this.id+".aspectratio").get();return A===void 0||A.x!==L.x||A.y!==L.y||A.z!==L.z},l.saveLayout=function(k){var L,A,I,P,S,E,D=this.fullLayout,F=this.isCameraChanged(k),H=this.isAspectChanged(k),V=F||H;if(V){var Z={};F&&(L=this.getCamera(),I=(A=r.nestedProperty(k,this.id+".camera")).get(),Z[this.id+".camera"]=I),H&&(P=this.glplot.getAspectratio(),E=(S=r.nestedProperty(k,this.id+".aspectratio")).get(),Z[this.id+".aspectratio"]=E),o.call("_storeDirectGUIEdit",k,D._preGUI,Z),F&&(A.set(L),r.nestedProperty(D,this.id+".camera").set(L)),H&&(S.set(P),r.nestedProperty(D,this.id+".aspectratio").set(P),this.glplot.redraw())}return V},l.updateFx=function(k,L){var A=this.camera;if(A)if(k==="orbit")A.mode="orbit",A.keyBindingMode="rotate";else if(k==="turntable"){A.up=[0,0,1],A.mode="turntable",A.keyBindingMode="rotate";var I=this.graphDiv,P=I._fullLayout,S=this.fullSceneLayout.camera,E=S.up.x,D=S.up.y,F=S.up.z;if(F/Math.sqrt(E*E+D*D+F*F)<.999){var H=this.id+".camera.up",V={x:0,y:0,z:1},Z={};Z[H]=V;var K=I.layout;o.call("_storeDirectGUIEdit",K,P._preGUI,Z),S.up=V,r.nestedProperty(K,H).set(V)}}else A.keyBindingMode=k;this.fullSceneLayout.hovermode=L},l.toImage=function(k){k||(k="png"),this.staticMode&&this.container.appendChild(g),this.glplot.redraw();var L=this.glplot.gl,A=L.drawingBufferWidth,I=L.drawingBufferHeight;L.bindFramebuffer(L.FRAMEBUFFER,null);var P=new Uint8Array(A*I*4);L.readPixels(0,0,A,I,L.RGBA,L.UNSIGNED_BYTE,P),function(H,V,Z){for(var K=0,q=Z-1;K<q;++K,--q)for(var W=0;W<V;++W)for(var $=0;$<4;++$){var R=4*(V*K+W)+$,N=4*(V*q+W)+$,U=H[R];H[R]=H[N],H[N]=U}}(P,A,I),function(H,V,Z){for(var K=0;K<Z;++K)for(var q=0;q<V;++q){var W=4*(V*K+q),$=H[W+3];if($>0)for(var R=255/$,N=0;N<3;++N)H[W+N]=Math.min(R*H[W+N],255)}}(P,A,I);var S=document.createElement("canvas");S.width=A,S.height=I;var E,D=S.getContext("2d"),F=D.createImageData(A,I);switch(F.data.set(P),D.putImageData(F,0,0),k){case"jpeg":E=S.toDataURL("image/jpeg");break;case"webp":E=S.toDataURL("image/webp");break;default:E=S.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(g),E},l.setConvert=function(){for(var k=0;k<3;k++){var L=this.fullSceneLayout[_[k]];c.setConvert(L,this.fullLayout),L.setScale=r.noop}},l.make4thDimension=function(){var k=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(this._mockAxis,k)},ee.exports=x},{"../../../stackgl_modules":1120,"../../components/fx":406,"../../lib":503,"../../lib/show_no_webgl_msg":525,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554,"../../registry":638,"./layout/convert":602,"./layout/spikes":605,"./layout/tick_marks":606,"./project":607,"has-passive-events":229,"webgl-context":331}],609:[function(y,ee,te){ee.exports=function(g,m,b,v){v=v||g.length;for(var e=new Array(v),n=0;n<v;n++)e[n]=[g[n],m[n],b[n]];return e}},{}],610:[function(y,ee,te){var g=y("./font_attributes"),m=y("./animation_attributes"),b=y("../components/color/attributes"),v=y("../components/shapes/draw_newshape/attributes"),e=y("./pad_attributes"),n=y("../lib/extend").extendFlat,t=g({editType:"calc"});t.family.dflt='"Open Sans", verdana, arial, sans-serif',t.size.dflt=12,t.color.dflt=b.defaultLine,ee.exports={font:t,title:{text:{valType:"string",editType:"layoutstyle"},font:g({editType:"layoutstyle"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:n(e({editType:"layoutstyle"}),{}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:b.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:b.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:b.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"}
1216,newshape:v.newshape,activeshape:v.activeshape,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:n({},m.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:g({editType:"layoutstyle"})}}},{"../components/color/attributes":365,"../components/shapes/draw_newshape/attributes":451,"../lib/extend":493,"./animation_attributes":548,"./font_attributes":585,"./pad_attributes":618}],611:[function(y,ee,te){var g=y("../../lib/sort_object_keys"),m='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',b=['© <a target="_blank" href="https://carto.com/">Carto</a>',m].join(" "),v=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),e={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:m,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:b,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:b,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:v,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:v,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},n=g(e);ee.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:e,styleValuesNonMapbox:n,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install [email protected]."].join(`
1217`),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:","  Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(`
1218`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",n.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(`
1219`),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(`
1220`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,
12206 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},{"../../lib/sort_object_keys":526}],612:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b){var v=m.split(" "),e=v[0],n=v[1],t=g.isArrayOrTypedArray(b)?g.mean(b):b,o=.5+t/100,r=1.5+t/100,d=["",""],c=[0,0];switch(e){case"top":d[0]="top",c[1]=-r;break;case"bottom":d[0]="bottom",c[1]=r}switch(n){case"left":d[1]="right",c[0]=-o;break;case"right":d[1]="left",c[0]=o}return{anchor:d[0]&&d[1]?d.join("-"):d[0]?d[0]:d[1]?d[1]:"center",offset:c}}},{"../../lib":503}],613:[function(y,ee,te){var g=y("mapbox-gl/dist/mapbox-gl-unminified"),m=y("../../lib"),b=m.strTranslate,v=m.strScale,e=y("../../plots/get_data").getSubplotCalcData,n=y("../../constants/xmlns_namespaces"),t=y("@plotly/d3"),o=y("../../components/drawing"),r=y("../../lib/svg_text_utils"),d=y("./mapbox"),c=te.constants=y("./constants");function i(u){return typeof u=="string"&&(c.styleValuesMapbox.indexOf(u)!==-1||u.indexOf("mapbox://")===0)}te.name="mapbox",te.attr="subplot",te.idRoot="mapbox",te.idRegex=te.attrRegex=m.counterRegex("mapbox"),te.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},te.layoutAttributes=y("./layout_attributes"),te.supplyLayoutDefaults=y("./layout_defaults"),te.plot=function(u){var f=u._fullLayout,s=u.calcdata,h=f._subplots.mapbox;if(g.version!==c.requiredVersion)throw new Error(c.wrongVersionErrorMsg);var p=function(T,k){var L=T._fullLayout;if(T._context.mapboxAccessToken==="")return"";for(var A=[],I=[],P=!1,S=!1,E=0;E<k.length;E++){var D=L[k[E]],F=D.accesstoken;i(D.style)&&(F?m.pushUnique(A,F):(i(D._input.style)&&(m.error("Uses Mapbox map style, but did not set an access token."),P=!0),S=!0)),F&&m.pushUnique(I,F)}if(S){var H=P?c.noAccessTokenErrorMsg:c.missingStyleErrorMsg;throw m.error(H),new Error(H)}return A.length?(A.length>1&&m.warn(c.multipleTokensErrorMsg),A[0]):(I.length&&m.log(["Listed mapbox access token(s)",I.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(u,h);g.accessToken=p;for(var a=0;a<h.length;a++){var x=h[a],l=e(s,"mapbox",x),w=f[x],_=w._subplot;_||(_=new d(u,x),f[x]._subplot=_),_.viewInitial||(_.viewInitial={center:m.extendFlat({},w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),_.plot(l,f,u._promises)}},te.clean=function(u,f,s,h){for(var p=h._subplots.mapbox||[],a=0;a<p.length;a++){var x=p[a];!f[x]&&h[x]._subplot&&h[x]._subplot.destroy()}},te.toSVG=function(u){for(var f=u._fullLayout,s=f._subplots.mapbox,h=f._size,p=0;p<s.length;p++){var a=f[s[p]],x=a.domain,l=a._subplot.toImage("png");f._glimages.append("svg:image").attr({xmlns:n.svg,"xlink:href":l,x:h.l+h.w*x.x[0],y:h.t+h.h*(1-x.y[1]),width:h.w*(x.x[1]-x.x[0]),height:h.h*(x.y[1]-x.y[0]),preserveAspectRatio:"none"});var w=t.select(a._subplot.div);if(w.select(".mapboxgl-ctrl-logo").node().offsetParent!==null){var _=f._glimages.append("g");_.attr("transform",b(h.l+h.w*x.x[0]+10,h.t+h.h*(1-x.y[0])-31)),_.append("path").attr("d",c.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),_.append("path").attr("d",c.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),_.a
1220ppend("path").attr("d",c.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),_.append("polygon").attr("points",c.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var T=w.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),k=f._glimages.append("g"),L=k.append("text");L.text(T).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":T});var A=o.bBox(L.node()),I=h.w*(x.x[1]-x.x[0]);if(A.width>I/2){var P=T.split("|").join("<br>");L.text(P).attr("data-unformatted",P).call(r.convertToTspans,u),A=o.bBox(L.node())}L.attr("transform",b(-3,8-A.height)),k.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var S=1;A.width+6>I&&(S=I/(A.width+6));var E=[h.l+h.w*x.x[1],h.t+h.h*(1-x.y[0])];k.attr("transform",b(E[0],E[1])+v(S))}},te.updateFx=function(u){for(var f=u._fullLayout,s=f._subplots.mapbox,h=0;h<s.length;h++)f[s[h]]._subplot.updateFx(f)}},{"../../components/drawing":388,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/get_data":593,"./constants":611,"./layout_attributes":615,"./layout_defaults":616,"./mapbox":617,"@plotly/d3":58,"mapbox-gl/dist/mapbox-gl-unminified":239}],614:[function(y,ee,te){var g=y("../../lib"),m=y("../../lib/svg_text_utils").sanitizeHTML,b=y("./convert_text_opts"),v=y("./constants");function e(r,d){this.subplot=r,this.uid=r.uid+"-"+d,this.index=d,this.idSource="source-"+this.uid,this.idLayer=v.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var n=e.prototype;function t(r){if(!r.visible)return!1;var d=r.source;if(Array.isArray(d)&&d.length>0){for(var c=0;c<d.length;
1220c++)if(typeof d[c]!="string"||d[c].length===0)return!1;return!0}return g.isPlainObject(d)||typeof d=="string"&&d.length>0}function o(r){var d={},c={};switch(r.type){case"circle":g.extendFlat(c,{"circle-radius":r.circle.radius,"circle-color":r.color,"circle-opacity":r.opacity});break;case"line":g.extendFlat(c,{"line-width":r.line.width,"line-color":r.color,"line-opacity":r.opacity,"line-dasharray":r.line.dash});break;case"fill":g.extendFlat(c,{"fill-color":r.color,"fill-outline-color":r.fill.outlinecolor,"fill-opacity":r.opacity});break;case"symbol":var i=r.symbol,u=b(i.textposition,i.iconsize);g.extendFlat(d,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":u.anchor,"text-offset":u.offset,"symbol-placement":i.placement}),g.extendFlat(c,{"icon-color":r.color,"text-color":i.textfont.color,"text-opacity":r.opacity});break;case"raster":g.extendFlat(c,{"raster-fade-duration":0,"raster-opacity":r.opacity})}return{layout:d,paint:c}}n.update=function(r){this.visible?this.needsNewImage(r)?this.updateImage(r):this.needsNewSource(r)?(this.removeLayer(),this.updateSource(r),this.updateLayer(r)):this.needsNewLayer(r)?this.updateLayer(r):this.updateStyle(r):(this.updateSource(r),this.updateLayer(r)),this.visible=t(r)},n.needsNewImage=function(r){return this.subplot.map.getSource(this.idSource)&&this.sourceType==="image"&&r.sourcetype==="image"&&(this.source!==r.source||JSON.stringify(this.coordinates)!==JSON.stringify(r.coordinates))},n.needsNewSource=function(r){return this.sourceType!==r.sourcetype||JSON.stringify(this.source)!==JSON.stringify(r.source)||this.layerType!==r.type},n.needsNewLayer=function(r){return this.layerType!==r.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},n.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},n.updateImage=function(r){this.subplot.map.getSource(this.idSource).updateImage({url:r.source,coordinates:r.coordinates});var d=this.findFollowingMapboxLayerId(this.lookupBelow());d!==null&&this.subplot.map.moveLayer(this.idLayer,d)},n.updateSource=function(r){var d=this.subplot.map;if(d.getSource(this.idSource)&&d.removeSource(this.idSource),this.sourceType=r.sourcetype,this.source=r.source,t(r)){var c=function(i){var u,f=i.sourcetype,s=i.source,h={type:f};return f==="geojson"?u="data":f==="vector"?u=typeof s=="string"?"url":"tiles":f==="raster"?(u="tiles",h.tileSize=256):f==="image"&&(u="url",h.coordinates=i.coordinates),h[u]=s,i.sourceattribution&&(h.attribution=m(i.sourceattribution)),h}(r);d.addSource(this.idSource,c)}},n.findFollowingMapboxLayerId=function(r){if(r==="traces")for(var d=this.subplot.getMapLayers(),c=0;c<d.length;c++){var i=d[c].id;if(typeof i=="string"&&i.indexOf(v.traceLayerPrefix)===0){r=i;break}}return r},n.updateLayer=function(r){var d=this.subplot,c=o(r),i=this.lookupBelow(),u=this.findFollowingMapboxLayerId(i);this.removeLayer(),t(r)&&d.addLayer({id:this.idLayer,source:this.idSource,"source-layer":r.sourcelayer||"",type:r.type,minzoom:r.minzoom,maxzoom:r.maxzoom,layout:c.layout,paint:c.paint},u),this.layerType=r.type,this.below=i},n.updateStyle=function(r){if(t(r)){var d=o(r);this.subplot.setOptions(this.idLayer,"setLayoutProperty",d.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",d.paint)}},n.removeLayer=function(){var r=this.subplot.map;r.getLayer(this.idLayer)&&r.removeLayer(this.idLayer)},n.dispose=function(){var r=this.subplot.map;r.getLayer(this.idLayer)&&r.removeLayer(this.idLayer),r.getSource(this.idSource)&&r.removeSource(this.idSource)},ee.exports=function(r,d,c){var i=new e(r,d);return i.update(c),i}},{"../../lib":503,"../../lib/svg_text_utils":529,"./constants":611,"./convert_text_opts":612}],615:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color").defaultLine,b=y("../domain").attributes,v=y("../font_attributes"),e=y("../../traces/scatter/attributes").textposition,n=y("../../plot_api/edit_types").overrideAll,t=y("../../plot_api/plot_template").templatedArray,o=y("./constants"),r=v({});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(ee.exports=n({_arrayAttrRegexps:[g.counterRegex("mapbox",".layers",!0)],domain:b({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:o.styleValuesMapbox.concat(o.styleValuesNonMapbox),dflt:o.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:m},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:m}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:g.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}},{"../../components/color":366,"../../lib":503,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../traces/scatter/attributes":926,"../domain":584,"../font_attributes":585,"./constants":611}],616:[function(y,ee,te){var g=y("../../lib"),m=y("../subplot_defaults"),b=y("../array_container_defaults"),v=y("./layout_attributes");function e(t,o,r,d){r("accesstoken",d.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),b(t,o,{name:"layers",handleItemDefaults:n}),o._input=t}function n(t,o){function r(f,s){return g.coerce(t,o,v.layers,f,s)}if(r("visible")){var d,c=r("sourcetype"),i=c==="raster"||c==="image";r("source"),r("sourceattribution"),c==="vector"&&r("sourcelayer"),c==="image"&&r("coordinates"),i&&(d="raster");var u=r("type",d);i&&u!=="raster"&&(u=o.type="raster",g.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),u==="circle"&&r("circle.radius"),u==="line"&&(r("line.width"),r("line.dash")),u==="fill"&&r("fill.outlinecolor"),u==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),g.coerceFont(r,"symbol.textfont"),r("symbol.textposition"),r("symbol.placement"))}}ee.exports=function(t,o,r){m(t,o,r,{type:"mapbox",attributes:v,handleDefaults:e,partition:"y",accessToken:o._mapboxAccessToken})}},{"../../lib":503,"../array_container_defaults":549,"../subplot_defaults":632,"./layout_attributes":615}],617:[function(y,ee,te){var g=y("mapbox-gl/dist/mapbox-gl-unminified"),m=y("../../lib"),b=y("../../lib/geo_location_utils"),v=y("../../registry"),e=y("../cartesian/axes"),n=y("../../components/dragelement"),t=y("../../components/fx"),o=y("../../components/dragelement/helpers"),r=o.rectMode,d=o.drawMode,c=o.selectMode,i=y("../cartesian/select").prepSelect,u=y("../cartesian/select").clearSelect,f=y("../cartesian/select").clearSelectionsCache,s=y("../cartesian/select").selectOnClick,h=y("./constants"),p=y("./layers");function a(k,L){this.id=L,this.gd=k;var A=k._fullLayout,I=k._context;this.container=A._glcontainer.node(),this.isStatic=I.staticPlot,this.uid=A._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(A),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var x=a.prototype;x.plot=function(k,L,A){var I,P=this,S=L[P.id];P.map&&S.accesstoken!==P.accessToken&&(P.map.remove(),P.map=null,P.styleObj=null,P.traceHash={},P.layerList=[]),I=P.map?new Promise(function(E,D){P.updateMap(k,L,E,D)}):new Promise(function(E,D){P.createMap(k,L,E,D)}),A.push(I)},x.createMap=function(k,L,A,I){var P=this,S=L[P.id],E=P.styleObj=w(S.style);P.accessToken=S.accesstoken;var D=P.map=new g.Map({container:P.div,style:E.style,center:T(S.center),zoom:S.zoom,bearing:S.bearing,pitch:S.pitch,interactive:!P.isStatic,preserveDrawingBuffer:P.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new g.AttributionControl({compact:!0}));D._canvas.style.left="0px",D._canvas.style.top="0px",P.rejectOnError(I),P.isStatic||P.initFx(k,L);var F=[];F.push(new Promise(function(H){D.once("load",H)})),F=F.concat(b.fetchTraceGeoData(k)),Promise.all(F).then(function(){P.f
1220illBelowLookup(k,L),P.updateData(k),P.updateLayout(L),P.resolveOnRender(A)}).catch(I)},x.updateMap=function(k,L,A,I){var P=this,S=P.map,E=L[this.id];P.rejectOnError(I);var D=[],F=w(E.style);JSON.stringify(P.styleObj)!==JSON.stringify(F)&&(P.styleObj=F,S.setStyle(F.style),P.traceHash={},D.push(new Promise(function(H){S.once("styledata",H)}))),D=D.concat(b.fetchTraceGeoData(k)),Promise.all(D).then(function(){P.fillBelowLookup(k,L),P.updateData(k),P.updateLayout(L),P.resolveOnRender(A)}).catch(I)},x.fillBelowLookup=function(k,L){var A,I,P=L[this.id].layers,S=this.belowLookup={},E=!1;for(A=0;A<k.length;A++){var D=k[A][0].trace,F=D._module;typeof D.below=="string"?I=D.below:F.getBelow&&(I=F.getBelow(D,this)),I===""&&(E=!0),S["trace-"+D.uid]=I||""}for(A=0;A<P.length;A++){var H=P[A];I=typeof H.below=="string"?H.below:E?"traces":"",S["layout-"+A]=I}var V,Z,K={};for(V in S)K[I=S[V]]?K[I].push(V):K[I]=[V];for(I in K){var q=K[I];if(q.length>1)for(A=0;A<q.length;A++)(V=q[A]).indexOf("trace-")===0?(Z=V.split("trace-")[1],this.traceHash[Z]&&(this.traceHash[Z].below=null)):V.indexOf("layout-")===0&&(Z=V.split("layout-")[1],this.layerList[Z]&&(this.layerList[Z].below=null))}};var l={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function w(k){var L={};return m.isPlainObject(k)?(L.id=k.id,L.style=k):typeof k=="string"?(L.id=k,h.styleValuesMapbox.indexOf(k)!==-1?L.style=_(k):h.stylesNonMapbox[k]?L.style=h.stylesNonMapbox[k]:L.style=k):(L.id=h.styleValueDflt,L.style=_(h.styleValueDflt)),L.transition={duration:0,delay:0},L}function _(k){return h.styleUrlPrefix+k+"-"+h.styleUrlSuffix}function T(k){return[k.lon,k.lat]}x.updateData=function(k){var L,A,I,P,S=this.traceHash,E=k.slice().sort(function(Z,K){return l[Z[0].trace.type]-l[K[0].trace.type]});for(I=0;I<E.length;I++){var D=E[I],F=!1;(L=S[(A=D[0].trace).uid])&&(L.type===A.type?(L.update(D),F=!0):L.dispose()),!F&&A._module&&(S[A.uid]=A._module.plot(this,D))}var H=Object.keys(S);e:for(I=0;I<H.length;I++){var V=H[I];for(P=0;P<k.length;P++)if(V===(A=k[P][0].trace).uid)continue e;(L=S[V]).dispose(),delete S[V]}},x.updateLayout=function(k){var L=this.map,A=k[this.id];this.dragging||this.wheeling||(L.setCenter(T(A.center)),L.setZoom(A.zoom),L.setBearing(A.bearing),L.setPitch(A.pitch)),this.updateLayers(k),this.updateFramework(k),this.updateFx(k),this.map.resize(),this.gd._context._scrollZoom.mapbox?L.scrollZoom.enable():L.scrollZoom.disable()},x.resolveOnRender=function(k){var L=this.map;L.on("render",function A(){L.loaded()&&(L.off("render",A),setTimeout(k,10))})},x.rejectOnError=function(k){var L=this.map;function A(){k(new Error(h.mapOnErrorMsg))}L.once("error",A),L.once("style.error",A),L.once("source.error",A),L.once("tile.error",A),L.once("layer.error",A)},x.createFramework=function(k){var L=this,A=L.div=document.createElement("div");A.id=L.uid,A.style.position="absolute",L.container.appendChild(A),L.xaxis={_id:"x",c2p:function(I){return L.project(I).x}},L.yaxis={_id:"y",c2p:function(I){return L.project(I).y}},L.updateFramework(k),L.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(L.mockAxis,k)},x.initFx=function(k,L){var A=this,I=A.gd,P=A.map;function S(){t.loneUnhover(L._hoverlayer)}function E(){var D=A.getView();I.emit("plotly_relayouting",A.getViewEditsWithDerived(D))}P.on("moveend",function(D){if(A.map){var F=I._fullLayout;if(D.originalEvent||A.wheeling){var H=F[A.id];v.call("_storeDirectGUIEdit",I.layout,F._preGUI,A.getViewEdits(H));var V=A.getView();H._input.center=H.center=V.center,H._input.zoom=H.zoom=V.zoom,H._input.bearing=H.bearing=V.bearing,H._input.pitch=H.pitch=V.pitch,I.emit("plotly_relayout",A.getViewEditsWithDerived(V))}D.originalEvent&&D.originalEvent.type==="mouseup"?A.dragging=!1:A.wheeling&&(A.wheeling=!1),F._rehover&&F._rehover()}}),P.on("wheel",function(){A.wheeling=!0}),P.on("mousemove",function(D){var F=A.div.getBoundingClientRect(),H=[D.originalEvent.offsetX,D.originalEvent.offsetY];D.target.getBoundingClientRect=function(){return F},A.xaxis.p2c=function(){return P.unproject(H).lng},A.yaxis.p2c=function(){return P.unproject(H).lat},I._fullLayout._rehover=function(){I._fullLayout._hoversubplot===A.id&&I._fullLayout[A.id]&&t.hover(I,D,A.id)},t.hover(I,D,A.id),I._fullLayout._hoversubplot=A.id}),P.on("dragstart",function(){A.dragging=!0,S()}),P.on("zoomstart",S),P.on("mouseout",function(){I._fullLayout._hoversubplot=null}),P.on("drag",E),P.on("zoom",E),P.on("dblclick",function(){var D=I._fullLayout[A.id];v.call("_storeDirectGUIEdit",I.layout,I._fullLayout._preGUI,A.getViewEdits(D));var F=A.viewInitial;P.setCenter(T(F.center)),P.setZoom(F.zoom),P.setBearing(F.bearing),P.setPitch(F.pitch);var H=A.getView();D._input.center=D.center=H.center,D._input.zoom=D.zoom=H.zoom,D._input.bearing=D.bearing=H.bearing,D._input.pitch=D.pitch=H.pitch,I.emit("plotly_doubleclick",null),I.emit("plotly_relayout",A.getViewEditsWithDerived(H))}),A.clearSelect=function(){f(A.dragOptions),u(A.dragOptions.gd)},A.onClickInPanFn=function(D){return function(F){var H=I._fullLayout.clickmode;H.indexOf("select")>-1&&s(F.originalEvent,I,[A.xaxis],[A.yaxis],A.id,D),H.indexOf("event")>-1&&t.click(I,F.originalEvent)}}},x.updateFx=function(k){var L=this,A=L.map,I=L.gd;if(!L.isStatic){var P,S=k.dragmode;P=r(S)?function(F,H){(F.range={})[L.id]=[D([H.xmin,H.ymin]),D([H.xmax,H.ymax])]}:function(F,H,V){(F.lassoPoints={})[L.id]=V.filtered.map(D)};var E=L.dragOptions;L.dragOptions=m.extendDeep(E||{},{dragmode:k.dragmode,element:L.div,gd:I,plotinfo:{id:L.id,domain:k[L.id].domain,xaxis:L.xaxis,yaxis:L.yaxis,fillRangeItems:P},xaxes:[L.xaxis],yaxes:[L.yaxis],subplot:L.id}),A.off("click",L.onClickInPanHandler),c(S)||d(S)?(A.dragPan.disable(),A.on("zoomstart",L.clearSelect),L.dragOptions.prepFn=function(F,H,V){i(F,H,V,L.dragOptions,S)},n.init(L.dragOptions)):(A.dragPan.enable(),A.off("zoomstart",L.clearSelect),L.div.onmousedown=null,L.onClickInPanHandler=L.onClickInPanFn(L.dragOptions),A.on("click",L.onClickInPanHandler))}function D(F){var H=L.map.unproject(F);return[H.lng,H.lat]}},x.updateFramework=function(k){var L=k[this.id].domain,A=k._size,I=this.div.style;I.width=A.w*(L.x[1]-L.x[0])+"px",I.height=A.h*(L.y[1]-L.y[0])+"px",I.left=A.l+L.x[0]*A.w+"px",I.top=A.t+(1-L.y[1])*A.h+"px",this.xaxis._offset=A.l+L.x[0]*A.w,this.xaxis._length=A.w*(L.x[1]-L.x[0]),this.yaxis._offset=A.t+(1-L.y[1])*A.h,this.yaxis._length=A.h*(L.y[1]-L.y[0])},x.updateLayers=function(k){var L,A=k[this.id].layers,I=this.layerList;if(A.length!==I.length){for(L=0;L<I.length;L++)I[L].dispose();for(I=this.layerList=[],L=0;L<A.length;L++)I.push(p(this,L,A[L]))}else for(L=0;L<A.length;L++)I[L].update(A[L])},x.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},x.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},x.setOptions=function(k,L,A){for(var I in A)this.map[L](k,I,A[I])},x.getMapLayers=function(){return this.map.getStyle().layers},x.addLayer=function(k,L){var A=this.map;if(typeof L=="string"){if(L==="")return void A.addLayer(k,L);for(var I=this.getMapLayers(),P=0;P<I.length;P++)if(L===I[P].id)return void A.addLayer(k,L);m.warn(["Trying to add layer with *below* value",L,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}A.addLayer(k)},x.project=function(k){return this.map.project(new g.LngLat(k[0],k[1]))},x.getView=function(){var k=this.map,L=k.getCenter(),A={lon:L.lng,lat:L.lat},I=k.getCanvas(),P=parseInt(I.style.width),S=parseInt(I.style.height);return{center:A,zoom:k.getZoom(),bearing:k.getBearing(),pitch:k.getPitch(),_derived:{coordinates:[k.unproject([0,0]).toArray(),k.unproject([P,0]).toArray(),k.unproject([P,S]).toArray(),k.unproject([0,S]).toArray()]}}},x.getViewEdits=function(k){for(var L=this.id,A=["center","zoom","bearing","pitch"],I={},P=0;P<A.length;P++){var S=A[P];I[L+"."+S]=k[S]}return I},x.getViewEditsWithDerived=function(k){var L=this.id,A=this.getViewEdits(k);return A[L+"._derived"]=k._derived,A},ee.exports=a},{"../../components/dragelement":385,"../../components/dragelement/helpers":384,"../../components/fx":406,"../../lib":503,"../../lib/geo_location_utils":496,"../../registry":638,"../cartesian/axes":554,"../cartesian/select":575,"./constants":611,"./layers":614,"mapbox-gl/dist/mapbox-gl-unminified":239}],618:[function(y,ee,te){ee.exports=function(g){var m=g.editType;return{t:{valType:"number",dflt:0,editType:m},r:{valType:"number",dflt:0,editType:m},b:{valType:"number",dflt:0,editType:m},l:{valType:"number",dflt:0,editType:m},editType:m}}},{}],619:[function(y,ee,te){var g=y("@plotly/d3"),m=y("d3-time-format").timeFormatLocale,b=y("d3-format").formatLocale,v=y("fast-isnumeric"),e=y("../registry"),n=y("../plot_api/plot_schema"),t=y("../plot_api/plot_template"),o=y("../lib"),r=y("../components/color"),d=y("../constants/numerical").BADNUM,c=y("./cartesian/axis_ids"),i=y("./cartesian/handle_outline").clearSelect,u=y("./animation_attributes"),f=y("./frame_attributes"),s=y("../plots/get_data").getModuleCalcData,h=o.relinkPrivateKeys,p=o._,a=ee.exports={};
1220o.extendFlat(a,e),a.attributes=y("./attributes"),a.attributes.type.values=a.allTypes,a.fontAttrs=y("./font_attributes"),a.layoutAttributes=y("./layout_attributes"),a.fontWeight="normal";var x=a.transformsRegistry,l=y("./command");a.executeAPICommand=l.executeAPICommand,a.computeAPICommandBindings=l.computeAPICommandBindings,a.manageCommandObserver=l.manageCommandObserver,a.hasSimpleAPICommandBindings=l.hasSimpleAPICommandBindings,a.redrawText=function(V){return V=o.getGraphDiv(V),new Promise(function(Z){setTimeout(function(){V._fullLayout&&(e.getComponentMethod("annotations","draw")(V),e.getComponentMethod("legend","draw")(V),e.getComponentMethod("colorbar","draw")(V),Z(a.previousPromises(V)))},300)})},a.resize=function(V){var Z;V=o.getGraphDiv(V);var K=new Promise(function(q,W){V&&!o.isHidden(V)||W(new Error("Resize must be passed a displayed plot div element.")),V._redrawTimer&&clearTimeout(V._redrawTimer),V._resolveResize&&(Z=V._resolveResize),V._resolveResize=q,V._redrawTimer=setTimeout(function(){if(!V.layout||V.layout.width&&V.layout.height||o.isHidden(V))q(V);else{delete V.layout.width,delete V.layout.height;var $=V.changed;V.autoplay=!0,e.call("relayout",V,{autosize:!0}).then(function(){V.changed=$,V._resolveResize===q&&(delete V._resolveResize,q(V))})}},100)});return Z&&Z(K),K},a.previousPromises=function(V){if((V._promises||[]).length)return Promise.all(V._promises).then(function(){V._promises=[]})},a.addLinks=function(V){if(V._context.showLink||V._context.showSources){var Z=V._fullLayout,K=o.ensureSingle(Z._paper,"text","js-plot-link-container",function(U){U.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:r.defaultLine,"pointer-events":"all"}).each(function(){var Q=g.select(this);Q.append("tspan").classed("js-link-to-tool",!0),Q.append("tspan").classed("js-link-spacer",!0),Q.append("tspan").classed("js-sourcelinks",!0)})}),q=K.node(),W={y:Z._paper.attr("height")-9};document.body.contains(q)&&q.getComputedTextLength()>=Z.width-20?(W["text-anchor"]="start",W.x=5):(W["text-anchor"]="end",W.x=Z._paper.attr("width")-7),K.attr(W);var $=K.select(".js-link-to-tool"),R=K.select(".js-link-spacer"),N=K.select(".js-sourcelinks");V._context.showSources&&V._context.showSources(V),V._context.showLink&&function(U,Q){Q.text("");var j=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(U._context.linkText+" »");if(U._context.sendData)j.on("click",function(){a.sendDataToCloud(U)});else{var X=window.location.pathname.split("/"),J=window.location.search;j.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+X[2].split(".")[0]+"/"+X[1]+J})}}(V,$),R.text($.text()&&N.text()?" - ":"")}},a.sendDataToCloud=function(V){var Z=(window.PLOTLYENV||{}).BASE_URL||V._context.plotlyServerURL;if(Z){V.emit("plotly_beforeexport");var K=g.select(V).append("div").attr("id","hiddenform").style("display","none"),q=K.append("form").attr({action:Z+"/external",method:"post",target:"_blank"});return q.append("input").attr({type:"text",name:"data"}).node().value=a.graphJson(V,!1,"keepdata"),q.node().submit(),K.remove(),V.emit("plotly_afterexport"),!1}};var w=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],_=["year","month","dayMonth","dayMonthYear"];function T(V,Z){var K=V._context.locale;K||(K="en-US");var q=!1,W={};function $(X){for(var J=!0,re=0;re<Z.length;re++){var ne=Z[re];W[ne]||(X[ne]?W[ne]=X[ne]:J=!1)}J&&(q=!0)}for(var R=0;R<2;
1220R++){for(var N=V._context.locales,U=0;U<2;U++){var Q=(N[K]||{}).format;if(Q&&($(Q),q))break;N=e.localeRegistry}var j=K.split("-")[0];if(q||j===K)break;K=j}return q||$(e.localeRegistry.en.format),W}function k(V,Z){var K={_fullLayout:Z},q=V._id.charAt(0)==="x",W=V._mainAxis._anchorAxis,$="",R="",N="";if(W&&(N=W._mainAxis._id,$=q?V._id+N:N+V._id),!$||!Z._plots[$]){$="";for(var U=V._counterAxes,Q=0;Q<U.length;Q++){var j=U[Q],X=q?V._id+j:j+V._id;R||(R=X);var J=c.getFromId(K,j);if(N&&J.overlaying===N){$=X;break}}}return $||R}function L(V){var Z=V.transforms;if(Array.isArray(Z)&&Z.length)for(var K=0;K<Z.length;K++){var q=Z[K],W=q._module||x[q.type];if(W&&W.makesData)return!0}return!1}function A(V,Z,K,q){for(var W=V.transforms,$=[V],R=0;R<W.length;R++){var N=W[R],U=x[N.type];U&&U.transform&&($=U.transform($,{transform:N,fullTrace:V,fullData:Z,layout:K,fullLayout:q,transformIndex:R}))}return $}function I(V){return typeof V=="string"&&V.substr(V.length-2)==="px"&&parseFloat(V)}function P(V){var Z=V.margin;if(!V._size){var K=V._size={l:Math.round(Z.l),r:Math.round(Z.r),t:Math.round(Z.t),b:Math.round(Z.b),p:Math.round(Z.pad)};K.w=Math.round(V.width)-K.l-K.r,K.h=Math.round(V.height)-K.t-K.b}V._pushmargin||(V._pushmargin={}),V._pushmarginIds||(V._pushmarginIds={})}a.supplyDefaults=function(V,Z){var K=Z&&Z.skipUpdateCalc,q=V._fullLayout||{};if(q._skipDefaults)delete q._skipDefaults;else{var W,$=V._fullLayout={},R=V.layout||{},N=V._fullData||[],U=V._fullData=[],Q=V.data||[],j=V.calcdata||[],X=V._context||{};V._transitionData||a.createTransitionData(V),$._dfltTitle={plot:p(V,"Click to enter Plot title"),x:p(V,"Click to enter X axis title"),y:p(V,"Click to enter Y axis title"),colorbar:p(V,"Click to enter Colorscale title"),annotation:p(V,"new text")},$._traceWord=p(V,"trace");var J=T(V,w);if($._mapboxAccessToken=X.mapboxAccessToken,q._initialAutoSizeIsDone){var re=q.width,ne=q.height;a.supplyLayoutGlobalDefaults(R,$,J),R.width||($.width=re),R.height||($.height=ne),a.sanitizeMargins($)}else{a.supplyLayoutGlobalDefaults(R,$,J);var se=!R.width||!R.height,oe=$.autosize,pe=X.autosizable;se&&(oe||pe)?a.plotAutoSize(V,R,$):se&&a.sanitizeMargins($),!oe&&se&&(R.width=$.width,R.height=$.height)}$._d3locale=function(Ue,Ge){return Ue.decimal=Ge.charAt(0),Ue.thousands=Ge.charAt(1),{numberFormat:function(Ye){try{Ye=b(Ue).format(o.adjustFormat(Ye))}catch{return o.warnBadFormat(Ye),o.noFormat}return Ye},timeFormat:m(Ue).utcFormat}}(J,$.separators),$._extraFormat=T(V,_),$._initialAutoSizeIsDone=!0,$._dataLength=Q.length,$._modules=[],$._visibleModules=[],$._basePlotModules=[];var ce=$._subplots=function(){var Ue,Ge,Ye=e.collectableSubplotTypes,tt={};if(!Ye){Ye=[];var lt=e.subplotsRegistry;for(var vt in lt){var It=lt[vt].attr;if(It&&(Ye.push(vt),Array.isArray(It)))for(Ge=0;Ge<It.length;Ge++)o.pushUnique(Ye,It[Ge])}}for(Ue=0;Ue<Ye.length;Ue++)tt[Ye[Ue]]=[];return tt}(),de=$._splomAxes={x:{},y:{}},xe=$._splomSubplots={};$._splomGridDflt={},$._scatterStackOpts={},$._firstScatter={},$._alignmentOpts={},$._colorAxes={},$._requestRangeslider={},$._traceUids=function(Ue,Ge){var Ye,tt,lt=Ge.length,vt=[];for(Ye=0;Ye<Ue.length;Ye++){var It=Ue[Ye]._fullInput;It!==tt&&vt.push(It),tt=It}var St=vt.length,rt=new Array(lt),et={};function Tt(Be,qe){rt[qe]=Be,et[Be]=1}function Vt(Be,qe){if(Be&&typeof Be=="string"&&!et[Be])return Tt(Be,qe),!0}for(Ye=0;Ye<lt;Ye++){var Kt=Ge[Ye].uid;typeof Kt=="number"&&(Kt=String(Kt)),Vt(Kt,Ye)||Ye<St&&Vt(vt[Ye].uid,Ye)||Tt(o.randstr(et),Ye)}return rt}(N,Q),$._globalTransforms=(V._context||{}).globalTransforms,a.supplyDataDefaults(Q,U,R,$);var we=Object.keys(de.x),be=Object.keys(de.y);if(we.length>1&&be.length>1){for(e.getComponentMethod("grid","sizeDefaults")(R,$),W=0;W<we.length;W++)o.pushUnique(ce.xaxis,we[W]);for(W=0;W<be.length;W++)o.pushUnique(ce.yaxis,be[W]);for(var Ee in xe)o.pushUnique(ce.cartesian,Ee)}if($._has=a._hasPlotType.bind($),N.length===U.length)for(W=0;W<U.length;W++)h(U[W],N[W]);a.supplyLayoutModuleDefaults(R,$,U,V._transitionData);var fe=$._visibleModules,me=[];for(W=0;W<fe.length;W++){var Te=fe[W].crossTraceDefaults;Te&&o.pushUnique(me,Te)}for(W=0;W<me.length;W++)me[W](U,$);$._hasOnlyLargeSploms=$._basePlotModules.length===1&&$._basePlotModules[0].name==="splom"&&we.length>15&&be.length>15&&$.shapes.length===0&&$.images.length===0,a.linkSubplots(U,$,N,q),a.cleanPlot(U,$,N,q);var _e=!(!q._has||!q._has("gl2d")),Ae=!(!$._has||!$._has("gl2d")),Pe=!(!q._has||!q._has("cartesian"))||_e,De=!(!$._has||!$._has("cartesian"))||Ae;Pe&&!De?q._bgLayer.remove():De&&!Pe&&($._shouldCreateBgLayer=!0),q._zoomlayer&&!V._dragging&&i({_fullLayout:q}),function(Ue,Ge){var Ye,tt=[];Ge.meta&&(Ye=Ge._meta={meta:Ge.meta,layout:{meta:Ge.meta}});for(var lt=0;lt<Ue.length;lt++){var vt=Ue[lt];vt.meta?tt[vt.index]=vt._meta={meta:vt.meta}:Ge.meta&&(vt._meta={meta:Ge.meta}),Ge.meta&&(vt._meta.layout={meta:Ge.meta})}tt.length&&(Ye||(Ye=Ge._meta={}),Ye.data=tt)}(U,$),h($,q),e.getComponentMethod("colorscale","crossTraceDefaults")(U,$),$._preGUI||($._preGUI={}),$._tracePreGUI||($._tracePreGUI={});var Ve,Qe=$._tracePreGUI,Oe={};for(Ve in Qe)Oe[Ve]="old";for(W=0;W<U.length;W++)Oe[Ve=U[W]._fullInput.uid]||(Qe[Ve]={}),Oe[Ve]="new";for(Ve in Oe)Oe[Ve]==="old"&&delete Qe[Ve];P($),e.getComponentMethod("rangeslider","makeData")($),K||j.length!==U.length||a.supplyDefaultsUpdateCalc(j,U)}},a.supplyDefaultsUpdateCalc=function(V,Z){for(var K=0;K<Z.length;K++){var q=Z[K],W=(V[K]||[])[0];if(W&&W.trace){var $=W.trace;if($._hasCalcTransform){var R,N,U,Q=$._arrayAttrs;for(R=0;R<Q.length;R++)N=Q[R],U=o.nestedProperty($,N).get().slice(),o.nestedProperty(q,N).set(U)}W.trace=q}}},a.createTransitionData=function(V){V._transitionData||(V._transitionData={}),V._transitionData._frames||(V._transitionData._frames=[]),V._transitionData._frameHash||(V._transitionData._frameHash={}),V._transitionData._counter||(V._transitionData._counter=0),V._transitionData._interruptCallbacks||(V._transitionData._interruptCallbacks=[])},a._hasPlotType=function(V){var Z,K=this._basePlotModules||[];for(Z=0;Z<K.length;Z++)if(K[Z].name===V)return!0;var q=this._modules||[];for(Z=0;Z<q.length;Z++){var W=q[Z].name;if(W===V)return!0;var $=e.modules[W];if($&&$.categories[V])return!0}return!1},a.cleanPlot=function(V,Z,K,q){var W,$,R=q._basePlotModules||[];for(W=0;W<R.length;W++){var N=R[W];N.clean&&N.clean(V,Z,K,q)}var U=q._has&&q._has("gl"),Q=Z._has&&Z._has("gl");U&&!Q&&q._glcontainer!==void 0&&(q._glcontainer.selectAll(".gl-canvas").remove(),q._glcontainer.selectAll(".no-webgl").remove(),q._glcanvas=null);var j=!!q._infolayer;e:for(W=0;W<K.length;W++){var X=K[W].uid;for($=0;$<V.length;$++)if(X===V[$].uid)continue e;j&&q._infolayer.select(".cb"+X).remove()}},a.linkSubplots=function(V,Z,K,q){var W,$,R=q._plots||{},N=Z._plots={},U=Z._subplots,Q={_fullData:V,_fullLayout:Z},j=U.cartesian.concat(U.gl2d||[]);for(W=0;W<j.length;W++){var X,J=j[W],re=R[J],ne=c.getFromId(Q,J,"x"),se=c.getFromId(Q,J,"y");for(re?X=N[J]=re:(X=N[J]={}).id=J,ne._counterAxes.push(se._id),se._counterAxes.push(ne._id),ne._subplotsWith.push(J),se._subplotsWith.push(J),X.xaxis=ne,X.yaxis=se,X._hasClipOnAxisFalse=!1,$=0;$<V.length;$++){var oe=V[$];if(oe.xaxis===X.xaxis._id&&oe.yaxis===X.yaxis._id&&oe.cliponaxis===!1){X._hasClipOnAxisFalse=!0;break}}}var pe,ce=c.list(Q,null,!0);for(W=0;W<ce.length;W++){var de=null;(pe=ce[W]).overlaying&&(de=c.getFromId(Q,pe.overlaying))&&de.overlaying&&(pe.overlaying=!1,de=null),pe._mainAxis=de||pe,de&&(pe.domain=de.domain.slice()),pe._anchorAxis=pe.anchor==="free"?null:c.getFromId(Q,pe.anchor)}for(W=0;W<ce.length;W++)if((pe=ce[W])._counterAxes.sort(c.idSort),pe._subplotsWith.sort(o.subplotSort),pe._mainSubplot=k(pe,Z),pe._counterAxes.length&&(pe.spikemode&&pe.spikemode.indexOf("across")!==-1||pe.automargin&&pe.mirror&&pe.anchor!=="free"||e.getComponentMethod("rangeslider","isVisible")(pe))){var xe=1,we=0;for($=0;$<pe._counterAxes.length;$++){var be=c.getFromId(Q,pe._counterAxes[$]);xe=Math.min(xe,be.domain[0]),we=Math.max(we,be.domain[1])}xe<we&&(pe._counterDomainMin=xe,pe._counterDomainMax=we)}},a.clearExpandedTraceDefaultColors=function(V){var Z,K,q;for(K=[],(Z=V._module._colorAttrs)||(V._module._colorAttrs=Z=[],n.crawl(V._module.attributes,function(W,$,R,N){K[N]=$,K.length=N+1,W.valType==="color"&&W.dflt===void 0&&Z.push(K.join("."))})),q=0;q<Z.length;q++)o.nestedProperty(V,"_input."+Z[q]).get()||o.nestedProperty(V,Z[q]).set(null)},a.supplyDataDefaults=function(V,Z,K,q){var W,$,R,N=q._modules,U=q._visibleModules,Q=q._basePlotModules,j=0,X=0;function J(Ee){Z.push(Ee);var fe=Ee._module;fe&&(o.pushUnique(N,fe),Ee.visible===!0&&o.pushUnique(U,fe),o.pushUnique(Q,Ee._module.basePlotModule),j++,Ee._input.visible!==!1&&X++)}q._transformModules=[];var re={},ne=[],se=(K.template||{}).data||{},oe=t.traceTemplater(se);for(W=0;W<V.length;W++){if(R=V[W],($=oe.newTrace(R)).uid=q._traceUids[W],a.supplyTraceDefaults(R,$,X,q,W),$.index=W,$._input=R,$._expandedIndex=j,$.transforms&&$.transforms.length)for(var pe=R.visible!==!1&&$.visible===!1,ce=A($,Z,K,q),de=0;de<ce.length;de++){var xe=ce[de],we={_template:$._template,type:$.type,uid:$.uid+de};pe&&xe.visible===!1&&delete xe.visible,a.supplyTraceDefaults(xe,we,j,q,W),h(we,xe),we.index=W,we._input=R,we._fullInput=$,we._expandedIndex=j,we._expandedInput=xe,J(we)}else $._fullInput=$,$._expandedInput=$,J($);e.traceIs($,"carpetAxis")&&(re[$.carpet]=$),e.traceIs($,"carpetDepen
1220dent")&&ne.push(W)}for(W=0;W<ne.length;W++)if(($=Z[ne[W]]).visible){var be=re[$.carpet];$._carpet=be,be&&be.visible?($.xaxis=be.xaxis,$.yaxis=be.yaxis):$.visible=!1}},a.supplyAnimationDefaults=function(V){var Z;V=V||{};var K={};function q(W,$){return o.coerce(V||{},K,u,W,$)}if(q("mode"),q("direction"),q("fromcurrent"),Array.isArray(V.frame))for(K.frame=[],Z=0;Z<V.frame.length;Z++)K.frame[Z]=a.supplyAnimationFrameDefaults(V.frame[Z]||{});else K.frame=a.supplyAnimationFrameDefaults(V.frame||{});if(Array.isArray(V.transition))for(K.transition=[],Z=0;Z<V.transition.length;Z++)K.transition[Z]=a.supplyAnimationTransitionDefaults(V.transition[Z]||{});else K.transition=a.supplyAnimationTransitionDefaults(V.transition||{});return K},a.supplyAnimationFrameDefaults=function(V){var Z={};function K(q,W){return o.coerce(V||{},Z,u.frame,q,W)}return K("duration"),K("redraw"),Z},a.supplyAnimationTransitionDefaults=function(V){var Z={};function K(q,W){return o.coerce(V||{},Z,u.transition,q,W)}return K("duration"),K("easing"),Z},a.supplyFrameDefaults=function(V){var Z={};function K(q,W){return o.coerce(V,Z,f,q,W)}return K("group"),K("name"),K("traces"),K("baseframe"),K("data"),K("layout"),Z},a.supplyTraceDefaults=function(V,Z,K,q,W){var $,R=q.colorway||r.defaults,N=R[K%R.length];function U(ce,de){return o.coerce(V,Z,a.attributes,ce,de)}var Q=U("visible");U("type"),U("name",q._traceWord+" "+W),U("uirevision",q.uirevision);var j=a.getModule(Z);if(Z._module=j,j){var X=j.basePlotModule,J=X.attr,re=X.attributes;if(J&&re){var ne=q._subplots,se="";if(Q||X.name!=="gl2d"){if(Array.isArray(J))for($=0;$<J.length;$++){var oe=J[$],pe=o.coerce(V,Z,re,oe);ne[oe]&&o.pushUnique(ne[oe],pe),se+=pe}else se=o.coerce(V,Z,re,J);ne[X.name]&&o.pushUnique(ne[X.name],se)}}}return Q&&(U("customdata"),U("ids"),U("meta"),e.traceIs(Z,"showLegend")?(o.coerce(V,Z,j.attributes.showlegend?j.attributes:a.attributes,"showlegend"),U("legendgroup"),U("legendgrouptitle.text"),U("legendrank"),Z._dfltShowLegend=!0):Z._dfltShowLegend=!1,j&&j.supplyDefaults(V,Z,N,q),e.traceIs(Z,"noOpacity")||U("opacity"),e.traceIs(Z,"notLegendIsolatable")&&(Z.visible=!!Z.visible),e.traceIs(Z,"noHover")||(Z.hovertemplate||o.coerceHoverinfo(V,Z,q),Z.type!=="parcats"&&e.getComponentMethod("fx","supplyDefaults")(V,Z,N,q)),j&&j.selectPoints&&U("selectedpoints"),a.supplyTransformDefaults(V,Z,q)),Z},a.hasMakesDataTransform=L,a.supplyTransformDefaults=function(V,Z,K){if(Z._length||L(V)){var q=K._globalTransforms||[],W=K._transformModules||[];if(Array.isArray(V.transforms)||q.length!==0)for(var $=V.transforms||[],R=q.concat($),N=Z.transforms=[],U=0;U<R.length;U++){var Q,j=R[U],X=j.type,J=x[X],re=!(j._module&&j._module===J),ne=J&&typeof J.transform=="function";J||o.warn("Unrecognized transform type "+X+"."),J&&J.supplyDefaults&&(re||ne)?((Q=J.supplyDefaults(j,Z,K,V)).type=X,Q._module=J,o.pushUnique(W,J)):Q=o.extendFlat({},j),N.push(Q)}}},a.supplyLayoutGlobalDefaults=function(V,Z,K){function q(U,Q){return o.coerce(V,Z,a.layoutAttributes,U,Q)}var W=V.template;o.isPlainObject(W)&&(Z.template=W,Z._template=W.layout,Z._dataTemplate=W.data),q("autotypenumbers");var $=o.coerceFont(q,"font"),R=$.size;o.coerceFont(q,"title.font",o.extendFlat({},$,{size:Math.round(1.4*R)})),q("title.text",Z._dfltTitle.plot),q("title.xref"),q("title.yref"),q("title.x"),q("title.y"),q("title.xanchor"),q("title.yanchor"),q("title.pad.t"),q("title.pad.r"),q("title.pad.b"),q("title.pad.l"),q("uniformtext.mode")&&q("uniformtext.minsize"),q("autosize",!(V.width&&V.height)),q("width"),q("height"),q("margin.l"),q("margin.r"),q("margin.t"),q("margin.b"),q("margin.pad"),q("margin.autoexpand"),V.width&&V.height&&a.sanitizeMargins(Z),e.getComponentMethod("grid","sizeDefaults")(V,Z),q("paper_bgcolor"),q("separators",K.decimal+K.thousands),q("hidesources"),q("colorway"),q("datarevision");var N=q("uirevision");q("editrevision",N),q("selectionrevision",N),e.getComponentMethod("modebar","supplyLayoutDefaults")(V,Z),e.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(V,Z,q),q("meta"),o.isPlainObject(V.transition)&&(q("transition.duration"),q("transition.easing"),q("transition.ordering")),e.getComponentMethod("calendars","handleDefaults")(V,Z,"calendar"),e.getComponentMethod("fx","supplyLayoutGlobalDefaults")(V,Z,q)},a.plotAutoSize=function(V,Z,K){var q,W,$=V._context||{},R=$.frameMargins,N=o.isPlotDiv(V);if(N&&V.emit("plotly_autosize"),$.fillFrame)q=window.innerWidth,W=window.innerHeight,document.body.style.overflow="hidden";else{var U=N?window.getComputedStyle(V):{};if(q=I(U.width)||I(U.maxWidth)||K.width,W=I(U.height)||I(U.maxHeight)||K.height,v(R)&&R>0){var Q=1-2*R;q=Math.round(Q*q),W=Math.round(Q*W)}}var j=a.layoutAttributes.width.min,X=a.layoutAttributes.height.min;q<j&&(q=j),W<X&&(W=X);var J=!Z.width&&Math.abs(K.width-q)>1,re=!Z.height&&Math.abs(K.height-W)>1;(re||J)&&(J&&(K.width=q),re&&(K.height=W)),V._initialAutoSize||(V._initialAutoSize={width:q,height:W}),a.sanitizeMargins(K)},a.supplyLayoutModuleDefaults=function(V,Z,K,q){var W,$,R,N=e.componentsRegistry,U=Z._basePlotModules,Q=e.subplotsRegistry.cartesian;for(W in N)(R=N[W]).includeBasePlot&&R.includeBasePlot(V,Z);
1220for(var j in U.length||U.push(Q),Z._has("cartesian")&&(e.getComponentMethod("grid","contentDefaults")(V,Z),Q.finalizeSubplots(V,Z)),Z._subplots)Z._subplots[j].sort(o.subplotSort);for($=0;$<U.length;$++)(R=U[$]).supplyLayoutDefaults&&R.supplyLayoutDefaults(V,Z,K);var X=Z._modules;for($=0;$<X.length;$++)(R=X[$]).supplyLayoutDefaults&&R.supplyLayoutDefaults(V,Z,K);var J=Z._transformModules;for($=0;$<J.length;$++)(R=J[$]).supplyLayoutDefaults&&R.supplyLayoutDefaults(V,Z,K,q);for(W in N)(R=N[W]).supplyLayoutDefaults&&R.supplyLayoutDefaults(V,Z,K)},a.purge=function(V){var Z=V._fullLayout||{};Z._glcontainer!==void 0&&(Z._glcontainer.selectAll(".gl-canvas").remove(),Z._glcontainer.remove(),Z._glcanvas=null),Z._modeBar&&Z._modeBar.destroy(),V._transitionData&&(V._transitionData._interruptCallbacks&&(V._transitionData._interruptCallbacks.length=0),V._transitionData._animationRaf&&window.cancelAnimationFrame(V._transitionData._animationRaf)),o.clearThrottle(),o.clearResponsive(V),delete V.data,delete V.layout,delete V._fullData,delete V._fullLayout,delete V.calcdata,delete V.empty,delete V.fid,delete V.undoqueue,delete V.undonum,delete V.autoplay,delete V.changed,delete V._promises,delete V._redrawTimer,delete V._hmlumcount,delete V._hmpixcount,delete V._transitionData,delete V._transitioning,delete V._initialAutoSize,delete V._transitioningWithDuration,delete V._dragging,delete V._dragged,delete V._dragdata,delete V._hoverdata,delete V._snapshotInProgress,delete V._editing,delete V._mouseDownTime,delete V._legendMouseDownTime,V.removeAllListeners&&V.removeAllListeners()},a.style=function(V){var Z,K=V._fullLayout._visibleModules,q=[];for(Z=0;Z<K.length;Z++){var W=K[Z];W.style&&o.pushUnique(q,W.style)}for(Z=0;Z<q.length;Z++)q[Z](V)},a.sanitizeMargins=function(V){if(V&&V.margin){var Z,K=V.width,q=V.height,W=V.margin,$=K-(W.l+W.r),R=q-(W.t+W.b);$<0&&(Z=(K-1)/(W.l+W.r),W.l=Math.floor(Z*W.l),W.r=Math.floor(Z*W.r)),R<0&&(Z=(q-1)/(W.t+W.b),W.t=Math.floor(Z*W.t),W.b=Math.floor(Z*W.b))}},a.clearAutoMarginIds=function(V){V._fullLayout._pushmarginIds={}},a.allowAutoMargin=function(V,Z){V._fullLayout._pushmarginIds[Z]=1},a.autoMargin=function(V,Z,K){var q=V._fullLayout,W=q.width,$=q.height,R=q.margin,N=o.constrain(W-R.l-R.r,2,64),U=o.constrain($-R.t-R.b,2,64),Q=Math.max(0,W-N),j=Math.max(0,$-U),X=q._pushmargin,J=q._pushmarginIds;if(R.autoexpand!==!1){if(K){var re=K.pad;if(re===void 0&&(re=Math.min(12,R.l,R.r,R.t,R.b)),Q){var ne=(K.l+K.r)/Q;ne>1&&(K.l/=ne,K.r/=ne)}if(j){var se=(K.t+K.b)/j;se>1&&(K.t/=se,K.b/=se)}var oe=K.xl!==void 0?K.xl:K.x,pe=K.xr!==void 0?K.xr:K.x,ce=K.yt!==void 0?K.yt:K.y,de=K.yb!==void 0?K.yb:K.y;X[Z]={l:{val:oe,size:K.l+re},r:{val:pe,size:K.r+re},b:{val:de,size:K.b+re},t:{val:ce,size:K.t+re}},J[Z]=1}else delete X[Z],delete J[Z];if(!q._replotting)return a.doAutoMargin(V)}},a.doAutoMargin=function(V){var Z=V._fullLayout,K=Z.width,q=Z.height;Z._size||(Z._size={}),P(Z);var W=Z._size,$=Z.margin,R=o.extendFlat({},W),N=$.l,U=$.r,Q=$.t,j=$.b,X=Z._pushmargin,J=Z._pushmarginIds;if(Z.margin.autoexpand!==!1){for(var re in X)J[re]||delete X[re];for(var ne in X.base={l:{val:0,size:N},r:{val:1,size:U},t:{val:1,size:Q},b:{val:0,size:j}},X){var se=X[ne].l||{},oe=X[ne].b||{}
1220,pe=se.val,ce=se.size,de=oe.val,xe=oe.size;for(var we in X){if(v(ce)&&X[we].r){var be=X[we].r.val,Ee=X[we].r.size;if(be>pe){var fe=(ce*be+(Ee-K)*pe)/(be-pe),me=(Ee*(1-pe)+(ce-K)*(1-be))/(be-pe);fe+me>N+U&&(N=fe,U=me)}}if(v(xe)&&X[we].t){var Te=X[we].t.val,_e=X[we].t.size;if(Te>de){var Ae=(xe*Te+(_e-q)*de)/(Te-de),Pe=(_e*(1-de)+(xe-q)*(1-Te))/(Te-de);Ae+Pe>j+Q&&(j=Ae,Q=Pe)}}}}}var De=o.constrain(K-$.l-$.r,2,64),Ve=o.constrain(q-$.t-$.b,2,64),Qe=Math.max(0,K-De),Oe=Math.max(0,q-Ve);if(Qe){var Ue=(N+U)/Qe;Ue>1&&(N/=Ue,U/=Ue)}if(Oe){var Ge=(j+Q)/Oe;Ge>1&&(j/=Ge,Q/=Ge)}if(W.l=Math.round(N),W.r=Math.round(U),W.t=Math.round(Q),W.b=Math.round(j),W.p=Math.round($.pad),W.w=Math.round(K)-W.l-W.r,W.h=Math.round(q)-W.t-W.b,!Z._replotting&&a.didMarginChange(R,W)){"_redrawFromAutoMarginCount"in Z?Z._redrawFromAutoMarginCount++:Z._redrawFromAutoMarginCount=1;var Ye=3*(1+Object.keys(J).length);if(Z._redrawFromAutoMarginCount<Ye)return e.call("_doPlot",V);Z._size=R,o.warn("Too many auto-margin redraws.")}(function(tt){var lt=c.list(tt,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(vt){for(var It=0;It<lt.length;It++){var St=lt[It][vt];St&&St()}})})(V)};var S=["l","r","t","b","p","w","h"];function E(V,Z,K){var q=!1,W=[a.previousPromises,function(){if(V._transitionData)return V._transitioning=!1,function(R){var N=Promise.resolve();if(!R)return N;for(;R.length;)N=N.then(R.shift());return N}(V._transitionData._interruptCallbacks)},K.prepareFn,a.rehover,function(){return V.emit("plotly_transitioning",[]),new Promise(function(R){V._transitioning=!0,Z.duration>0&&(V._transitioningWithDuration=!0),V._transitionData._interruptCallbacks.push(function(){q=!0}),K.redraw&&V._transitionData._interruptCallbacks.push(function(){return e.call("redraw",V)}),V._transitionData._interruptCallbacks.push(function(){V.emit("plotly_transitioninterrupted",[])});var N=0,U=0;function Q(){return N++,function(){U++,q||U!==N||function(j){V._transitionData&&(function(X){if(X)for(;X.length;)X.shift()}(V._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return e.call("redraw",V)}).then(function(){V._transitioning=!1,V._transitioningWithDuration=!1,V.emit("plotly_transitioned",[])}).then(j))}(R)}}K.runFn(Q),setTimeout(Q())})}],$=o.syncOrAsync(W,V);return $&&$.then||($=Promise.resolve()),$.then(function(){return V})}a.didMarginChange=function(V,Z){for(var K=0;K<S.length;K++){var q=S[K],W=V[q],$=Z[q];if(!v(W)||Math.abs($-W)>1)return!0}return!1},a.graphJson=function(V,Z,K,q,W,$){(W&&Z&&!V._fullData||W&&!Z&&!V._fullLayout)&&a.supplyDefaults(V);var R=W?V._fullData:V.data,N=W?V._fullLayout:V.layout,U=(V._transitionData||{})._frames;function Q(J,re){if(typeof J=="function")return re?"_function_":null;if(o.isPlainObject(J)){var ne,se={};return Object.keys(J).sort().forEach(function(oe){if(["_","["].indexOf(oe.charAt(0))===-1)if(typeof J[oe]!="function"){if(K==="keepdata"){if(oe.substr(oe.length-3)==="src")return}else if(K==="keepstream"){if(typeof(ne=J[oe+"src"])=="string"&&ne.indexOf(":")>0&&!o.isPlainObject(J.stream))return}else if(K!=="keepall"&&typeof(ne=J[oe+"src"])=="string"&&ne.indexOf(":")>0)return;se[oe]=Q(J[oe],re)}else re&&(se[oe]="_function")}),se}return Array.isArray(J)?J.map(function(oe){return Q(oe,re)}):o.isTypedArray(J)?o.simpleMap(J,o.identity):o.isJSDate(J)?o.ms2DateTimeLocal(+J):J}var j={data:(R||[]).map(function(J){var re=Q(J);return Z&&delete re.fit,re})};if(!Z&&(j.layout=Q(N),W)){var X=N._size;j.layout.computed={margin:{b:X.b,l:X.l,r:X.r,t:X.t}}}return U&&(j.frames=Q(U)),$&&(j.config=Q(V._context,!0)),q==="object"?j:JSON.stringify(j)},a.modifyFrames=function(V,Z){var K,q,W,$=V._transitionData._frames,R=V._transitionData._frameHash;for(K=0;K<Z.length;K++)switch((q=Z[K]).type){case"replace":W=q.value;var N=($[q.index]||{}).name,U=W.name;$[q.index]=R[U]=W,U!==N&&(delete R[N],R[U]=W);break;case"insert":R[(W=q.value).name]=W,$.splice(q.index,0,W);break;case"delete":delete R[(W=$[q.index]).name],$.splice(q.index,1)}return Promise.resolve()},a.computeFrame=function(V,Z){var K,q,W,$,R=V._transitionData._frameHash;if(!Z)throw new Error("computeFrame must be given a string frame name");var N=R[Z.toString()];if(!N)return!1;for(var U=[N],Q=[N.name];N.baseframe&&(N=R[N.baseframe.toString()])&&Q.indexOf(N.name)===-1;)U.push(N),Q.push(N.name);for(var j={};N=U.pop();)if(N.layout&&(j.layout=a.extendLayout(j.layout,N.layout)),N.data){if(j.data||(j.data=[]),!(q=N.traces))for(q=[],K=0;K<N.data.length;K++)q[K]=K;for(j.traces||(j.traces=[]),K=0;K<N.data.length;K++)(W=q[K])!=null&&(($=j.traces.indexOf(W))===-1&&($=j.data.length,j.traces[$]=W),j.data[$]=a.extendTrace(j.data[$],N.data[K]))}return j},a.recomputeFrameHash=function(V){for(var Z=V._transitionData._frameHash={},K=V._transitionData._frames,q=0;q<K.length;q++){var W=K[q];W&&W.name&&(Z[W.name]=W)}},a.extendObjectWithContainers=function(V,Z,K){var q,W,$,R,N,U,Q,j=o.extendDeepNoArrays({},Z||{}),X=o.expandObjectPaths(j),J={};if(K&&K.length)for($=0;$<K.length;$++)(W=(q=o.nestedProperty(X,K[$])).get())===void 0?o.nestedProperty(J,K[$]).set(null):(q.set(null),o.nestedProperty(J,K[$]).set(W));if(V=o.extendDeepNoArrays(V||{},X),K&&K.length){for($=0;$<K.length;$++)if(U=o.nestedProperty(J,K[$]).get()){for(Q=(N=o.nestedProperty(V,K[$])).get(),Array.isArray(Q)||(Q=[],N.set(Q)),R=0;R<U.length;R++){var re=U[R];Q[R]=re===null?null:a.extendObjectWithContainers(Q[R],re)}N.set(Q)}}return V},a.dataArrayContainers=["transforms","dimensions"],a.layoutArrayContainers=e.layoutArrayContainers,a.extendTrace=function(V,Z){return a.extendObjectWithContainers(V,Z,a.dataArrayContainers
1220)},a.extendLayout=function(V,Z){return a.extendObjectWithContainers(V,Z,a.layoutArrayContainers)},a.transition=function(V,Z,K,q,W,$){var R={redraw:W.redraw},N={},U=[];return R.prepareFn=function(){for(var Q=Array.isArray(Z)?Z.length:0,j=q.slice(0,Q),X=0;X<j.length;X++){var J=j[X],re=V._fullData[J]._module;if(re){if(re.animatable){var ne=re.basePlotModule.name;N[ne]||(N[ne]=[]),N[ne].push(J)}V.data[j[X]]=a.extendTrace(V.data[j[X]],Z[X])}}var se=o.expandObjectPaths(o.extendDeepNoArrays({},K)),oe=/^[xy]axis[0-9]*$/;for(var pe in se)oe.test(pe)&&delete se[pe].range;a.extendLayout(V.layout,se),delete V.calcdata,a.supplyDefaults(V),a.doCalcdata(V);var ce=o.expandObjectPaths(K);if(ce){var de=V._fullLayout._plots;for(var xe in de){var we=de[xe],be=we.xaxis,Ee=we.yaxis,fe=be.range.slice(),me=Ee.range.slice(),Te=null,_e=null,Ae=null,Pe=null;Array.isArray(ce[be._name+".range"])?Te=ce[be._name+".range"].slice():Array.isArray((ce[be._name]||{}).range)&&(Te=ce[be._name].range.slice()),Array.isArray(ce[Ee._name+".range"])?_e=ce[Ee._name+".range"].slice():Array.isArray((ce[Ee._name]||{}).range)&&(_e=ce[Ee._name].range.slice()),fe&&Te&&(be.r2l(fe[0])!==be.r2l(Te[0])||be.r2l(fe[1])!==be.r2l(Te[1]))&&(Ae={xr0:fe,xr1:Te}),me&&_e&&(Ee.r2l(me[0])!==Ee.r2l(_e[0])||Ee.r2l(me[1])!==Ee.r2l(_e[1]))&&(Pe={yr0:me,yr1:_e}),(Ae||Pe)&&U.push(o.extendFlat({plotinfo:we},Ae,Pe))}}return Promise.resolve()},R.runFn=function(Q){var j,X,J=V._fullLayout._basePlotModules,re=U.length;if(K)for(X=0;X<J.length;X++)J[X].transitionAxes&&J[X].transitionAxes(V,U,$,Q);for(var ne in re?((j=o.extendFlat({},$)).duration=0,delete N.cartesian):j=$,N){var se=N[ne];V._fullData[se[0]]._module.basePlotModule.plot(V,se,j,Q)}},E(V,$,R)},a.transitionFromReact=function(V,Z,K,q){var W=V._fullLayout,$=W.transition,R={},N=[];return R.prepareFn=function(){var U=W._plots;for(var Q in R.redraw=!1,Z.anim==="some"&&(R.redraw=!0),K.anim==="some"&&(R.redraw=!0),U){var j=U[Q],X=j.xaxis,J=j.yaxis,re=q[X._name].range.slice(),ne=q[J._name].range.slice(),se=X.range.slice(),oe=J.range.slice();X.setScale(),J.setScale();var pe=null,ce=null;X.r2l(re[0])===X.r2l(se[0])&&X.r2l(re[1])===X.r2l(se[1])||(pe={xr0:re,xr1:se}),J.r2l(ne[0])===J.r2l(oe[0])&&J.r2l(ne[1])===J.r2l(oe[1])||(ce={yr0:ne,yr1:oe}),(pe||ce)&&N.push(o.extendFlat({plotinfo:j},pe,ce))}return Promise.resolve()},R.runFn=function(U){for(var Q,j,X,J=V._fullData,re=V._fullLayout._basePlotModules,ne=[],se=0;se<J.length;se++)ne.push(se);function oe(){if(V._fullLayout)for(var ce=0;ce<re.length;ce++)re[ce].transitionAxes&&re[ce].transitionAxes(V,N,Q,U)}function pe(){if(V._fullLayout)for(var ce=0;ce<re.length;ce++)re[ce].plot(V,X,j,U)}N.length&&Z.anim?$.ordering==="traces first"?(Q=o.extendFlat({},$,{duration:0}),X=ne,j=$,setTimeout(oe,$.duration),pe()):(Q=$,X=null,j=o.extendFlat({},$,{duration:0}),setTimeout(pe,Q.duration),oe()):N.length?(Q=$,oe()):Z.anim&&(X=ne,j=$,pe())},E(V,$,R)},a.doCalcdata=function(V,Z){var K,q,W,$,R=c.list(V),N=V._fullData,U=V._fullLayout,Q=new Array(N.length),j=(V.calcdata||[]).slice();for(V.calcdata=Q,U._numBoxes=0,U._numViolins=0,U._violinScaleGroupStats={},V._hmpixcount=0,V._hmlumcount=0,U._piecolormap={},U._sunburstcolormap={},U._treemapcolormap={},U._iciclecolormap={},U._funnelareacolormap={},W=0;W<N.length;W++)Array.isArray(Z)&&Z.indexOf(W)===-1&&(Q[W]=j[W]);for(W=0;W<N.length;W++)(K=N[W])._arrayAttrs=n.findArrayAttributes(K),K._extremes={};var X=U._subplots.polar||[];for(W=0;W<X.length;W++)R.push(U[X[W]].radialaxis,U[X[W]].angularaxis);for(var J in U._colorAxes){var re=U[J];re.cauto!==!1&&(delete re.cmin,delete re.cmax)}var ne=!1;function se(ce){if(K=N[ce],q=K._module,K.visible===!0&&K.transforms){if(q&&q.calc){var de=q.calc(V,K);de[0]&&de[0].t&&de[0].t._scene&&delete de[0].t._scene.dirty}for($=0;$<K.transforms.length;$++){var xe=K.transforms[$];(q=x[xe.type])&&q.calcTransform&&(K._hasCalcTransform=!0,ne=!0,q.calcTransform(V,K,xe))}}}function oe(ce,de){if(K=N[ce],!!(q=K._module).isContainer===de){var xe=[];if(K.visible===!0&&K._length!==0){delete K._indexToPoints;var we=K.transforms||[];for($=we.length-1;$>=0;$--)if(we[$].enabled){K._indexToPoints=we[$]._indexToPoints;break}q&&q.calc&&(xe=q.calc(V,K))}Array.isArray(xe)&&xe[0]||(xe=[{x:d,y:d}]),xe[0].t||(xe[0].t={}),xe[0].trace=K,Q[ce]=xe}}for(F(R,N,U),W=0;W<N.length;W++)oe(W,!0);for(W=0;W<N.length;W++)se(W);for(ne&&F(R,N,U),W=0;W<N.length;W++)oe(W,!0);for(W=0;W<N.length;W++)oe(W,!1);H(V);var pe=function(ce,de){var xe,we,be,Ee,fe,me=[];function Te(Xe,ke,Le){var Ie=ke._id.charAt(0);
1220if(Xe==="histogram2dcontour"){var Ce=ke._counterAxes[0],Je=c.getFromId(de,Ce),it=Ie==="x"||Ce==="x"&&Je.type==="category",ht=Ie==="y"||Ce==="y"&&Je.type==="category";return function(ut,kt){return ut===0||kt===0||it&&ut===Le[kt].length-1||ht&&kt===Le.length-1?-1:(Ie==="y"?kt:ut)-1}}return function(ut,kt){return Ie==="y"?kt:ut}}var _e={min:function(Xe){return o.aggNums(Math.min,null,Xe)},max:function(Xe){return o.aggNums(Math.max,null,Xe)},sum:function(Xe){return o.aggNums(function(ke,Le){return ke+Le},null,Xe)},total:function(Xe){return o.aggNums(function(ke,Le){return ke+Le},null,Xe)},mean:function(Xe){return o.mean(Xe)},median:function(Xe){return o.median(Xe)}};for(xe=0;xe<ce.length;xe++){var Ae=ce[xe];if(Ae.type==="category"){var Pe=Ae.categoryorder.match(D);if(Pe){var De=Pe[1],Ve=Pe[2],Qe=Ae._id.charAt(0),Oe=Qe==="x",Ue=[];for(we=0;we<Ae._categories.length;we++)Ue.push([Ae._categories[we],[]]);for(we=0;we<Ae._traceIndices.length;we++){var Ge=Ae._traceIndices[we],Ye=de._fullData[Ge];if(Ye.visible===!0){var tt=Ye.type;e.traceIs(Ye,"histogram")&&(delete Ye._xautoBinFinished,delete Ye._yautoBinFinished);var lt=tt==="splom",vt=tt==="scattergl",It=de.calcdata[Ge];for(be=0;be<It.length;be++){var St,rt,et=It[be];if(lt){var Tt=Ye._axesDim[Ae._id];if(!Oe){var Vt=Ye._diag[Tt][0];Vt&&(Ae=de._fullLayout[c.id2name(Vt)])}var Kt=et.trace.dimensions[Tt].values;for(Ee=0;Ee<Kt.length;Ee++)for(St=Ae._categoriesMap[Kt[Ee]],fe=0;fe<et.trace.dimensions.length;fe++)if(fe!==Tt){var Be=et.trace.dimensions[fe];Ue[St][1].push(Be.values[Ee])}}else if(vt){for(Ee=0;Ee<et.t.x.length;Ee++)Oe?(St=et.t.x[Ee],rt=et.t.y[Ee]):(St=et.t.y[Ee],rt=et.t.x[Ee]),Ue[St][1].push(rt);et.t&&et.t._scene&&delete et.t._scene.dirty}else if(et.hasOwnProperty("z")){rt=et.z;var qe=Te(Ye.type,Ae,rt);for(Ee=0;Ee<rt.length;Ee++)for(fe=0;fe<rt[Ee].length;fe++)(St=qe(fe,Ee))+1&&Ue[St][1].push(rt[Ee][fe])}else for((St=et.p)===void 0&&(St=et[Qe]),(rt=et.s)===void 0&&(rt=et.v),rt===void 0&&(rt=Oe?et.y:et.x),Array.isArray(rt)||(rt=rt===void 0?[]:[rt]),Ee=0;Ee<rt.length;Ee++)Ue[St][1].push(rt[Ee])}}}Ae._categoriesValue=Ue;var Re=[];for(we=0;we<Ue.length;we++)Re.push([Ue[we][0],_e[De](Ue[we][1])]);Re.sort(function(Xe,ke){return Xe[1]-ke[1]}),Ae._categoriesAggregatedValue=Re,Ae._initialCategories=Re.map(function(Xe){return Xe[0]}),Ve==="descending"&&Ae._initialCategories.reverse(),me=me.concat(Ae.sortByInitialCategories())}}}return me}(R,V);if(pe.length){for(U._numBoxes=0,U._numViolins=0,W=0;W<pe.length;W++)oe(pe[W],!0);for(W=0;W<pe.length;W++)oe(pe[W],!1);H(V)}e.getComponentMethod("fx","calc")(V),e.getComponentMethod("errorbars","calc")(V)};var D=/(total|sum|min|max|mean|median) (ascending|descending)/;function F(V,Z,K){var q={};function W(U){U.clearCalc(),U.type==="multicategory"&&U.setupMultiCategory(Z),q[U._id]=1}o.simpleMap(V,W);for(var $=K._axisMatchGroups||[],R=0;R<$.length;R++)for(var N in $[R])q[N]||W(K[c.id2name(N)])}function H(V){var Z,K,q,W=V._fullLayout,$=W._visibleModules,R={};for(K=0;K<$.length;K++){var N=$[K],U=N.crossTraceCalc;if(U){var Q=N.basePlotModule.name;R[Q]?o.pushUnique(R[Q],U):R[Q]=[U]}}for(q in R){var j=R[q],X=W._subplots[q];if(Array.isArray(X))for(Z=0;Z<X.length;Z++){var J=X[Z],re=q==="cartesian"?W._plots[J]:W[J];for(K=0;K<j.length;K++)j[K](V,re,J)}else for(K=0;K<j.length;K++)j[K](V)}}a.rehover=function(V){V._fullLayout._rehover&&V._fullLayout._rehover()},a.redrag=function(V){V._fullLayout._redrag&&V._fullLayout._redrag()},a.generalUpdatePerTraceModule=function(V,Z,K,q){var W,$=Z.traceHash,R={};for(W=0;W<K.length;W++){var N=K[W],U=N[0].trace;U.visible&&(R[U.type]=R[U.type]||[],R[U.type].push(N))}for(var Q in $)if(!R[Q]){var j=$[Q][0];j[0].trace.visible=!1,R[Q]=[j]}for(var X in R){var J=R[X];J[0][0].trace._module.plot(V,Z,o.filterVisible(J),q)}Z.traceHash=R},a.plotBasePlot=function(V,Z,K,q,W){var $=e.getModule(V),R=s(Z.calcdata,$)[0];$.plot(Z,R,q,W)},a.cleanBasePlot=function(V,Z,K,q,W){var $=W._has&&W._has(V),R=K._has&&K._has(V);$&&!R&&W["_"+V+"layer"].selectAll("g.trace").remove()}},{"../components/color":366,"../constants/numerical":479,"../lib":503,"../plot_api/plot_schema":542,"../plot_api/plot_template":543,"../plots/get_data":593,"../registry":638,"./animation_attributes":548,"./attributes":550,"./cartesian/axis_ids":558,"./cartesian/handle_outline":565,"./command":583,"./font_attributes":585,"./frame_attributes":586,"./layout_attributes":610,"@plotly/d3":58,"d3-format":112,"d3-time-format":120,"fast-isnumeric":190}],620:[function(y,ee,te){ee.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG
1220:8,MINZOOM:20,OFFEDGE:20}},{}],621:[function(y,ee,te){var g=y("../../lib"),m=y("../../lib/polygon").tester,b=g.findIndexOfMin,v=g.isAngleInsideSector,e=g.angleDelta,n=g.angleDist;function t(c,i,u,f){var s,h,p=f[0],a=f[1],x=r(Math.sin(i)-Math.sin(c)),l=r(Math.cos(i)-Math.cos(c)),w=Math.tan(u),_=r(1/w),T=x/l,k=a-T*p;return _?x&&l?h=w*(s=k/(w-T)):l?(s=a*_,h=a):(s=p,h=p*w):x&&l?(s=0,h=k):l?(s=0,h=a):s=h=NaN,[s,h]}function o(c,i,u,f){return g.isFullCircle([i,u])?function(s,h){var p,a=h.length,x=new Array(a+1);for(p=0;p<a;p++){var l=h[p];x[p]=[s*Math.cos(l),s*Math.sin(l)]}return x[p]=x[0].slice(),x}(c,f):function(s,h,p,a){var x,l,w=a.length,_=[];function T(F){return[s*Math.cos(F),s*Math.sin(F)]}function k(F,H,V){return t(F,H,V,T(F))}function L(F){return g.mod(F,w)}function A(F){return v(F,[h,p])}var I=b(a,function(F){return A(F)?n(F,h):1/0}),P=k(a[I],a[L(I-1)],h);for(_.push(P),x=I,l=0;l<w;x++,l++){var S=a[L(x)];if(!A(S))break;_.push(T(S))}var E=b(a,function(F){return A(F)?n(F,p):1/0}),D=k(a[E],a[L(E+1)],p);return _.push(D),_.push([0,0]),_.push(_[0].slice()),_}(c,i,u,f)}function r(c){return Math.abs(c)>1e-10?c:0}function d(c,i,u){i=i||0,u=u||0;for(var f=c.length,s=new Array(f),h=0;h<f;h++){var p=c[h];s[h]=[i+p[0],u-p[1]]}return s}ee.exports={isPtInsidePolygon:function(c,i,u,f,s){if(!v(i,f))return!1;var h,p;u[0]<u[1]?(h=u[0],p=u[1]):(h=u[1],p=u[0]);var a=m(o(h,f[0],f[1],s)),x=m(o(p,f[0],f[1],s)),l=[c*Math.cos(i),c*Math.sin(i)];return x.contains(l)&&!a.contains(l)},findPolygonOffset:function(c,i,u,f){for(var s=1/0,h=1/0,p=o(c,i,u,f),a=0;a<p.length;a++){var x=p[a];s=Math.min(s,x[0]),h=Math.min(h,-x[1])}return[s,h]},findEnclosingVertexAngles:function(c,i){var u=b(i,function(s){var h=e(s,c);return h>0?h:1/0}),f=g.mod(u+1,i.length);return[i[u],i[f]]},findIntersectionXY:t,findXYatLength:function(c,i,u,f){var s=-i*u,h=i*i+1,p=2*(i*s-u),a=s*s+u*u-c*c,x=Math.sqrt(p*p-4*h*a),l=(-p+x)/(2*h),w=(-p-x)/(2*h);return[[l,i*l+s+f],[w,i*w+s+f]]},clampTiny:r,pathPolygon:function(c,i,u,f,s,h){return"M"+d(o(c,i,u,f),s,h).join("L")},pathPolygonAnnulus:function(c,i,u,f,s,h,p){var a,x;c<i?(a=c,x=i):(a=i,x=c);var l=d(o(a,u,f,s),h,p);return"M"+d(o(x,u,f,s),h,p).reverse().join("L")+"M"+l.join("L")}}},{"../../lib":503,"../../lib/polygon":515}],622:[function(y,ee,te){var g=y("../get_data").getSubplotCalcData,m=y("../../lib").counterRegex,b=y("./polar"),v=y("./constants"),e=v.attr,n=v.name,t=m(n),o={};o[e]={valType:"subplotid",dflt:n,editType:"calc"},ee.exports={attr:e,name:n,idRoot:n,idRegex:t,attrRegex:t,attributes:o,layoutAttributes:y("./layout_attributes"),supplyLayoutDefaults:y("./layout_defaults"),plot:function(r){for(var d=r._fullLayout,c=r.calcdata,i=d._subplots[n],u=0;u<i.length;u++){var f=i[u],s=g(c,n,f),h=d[f]._subplot;h||(h=b(r,f),d[f]._subplot=h),h.plot(s,d,r._promises)}},clean:function(r,d,c,i){for(var u=i._subplots[n]||[],f=i._has&&i._has("gl"),s=d._has&&d._has("gl"),h=f&&!s,p=0;p<u.length;p++){var a=u[p],x=i[a]._subplot;if(!d[a]&&x)for(var l in x.framework.remove(),x.layers["radial-axis-title"].remove(),x.clipPaths)x.clipPaths[l].remove();h&&x._scene&&(x._scene.destroy(),x._scene=null)}},toSVG:y("../cartesian").toSVG}},{"../../lib":503,"../cartesian":568,"../get_data":593,"./constants":620,"./layout_attributes":623,"./layout_defaults":624,"./polar":625}],623:[function(y,ee,te){var g=y("../../components/color/attributes"),m=y("../cartesian/layout_attributes"),b=y("../domain").attributes,v=y("../../lib").extendFlat,e=y("../../plot_api/edit_types").overrideAll,n=e({color:m.color,showline:v({},m.showline,{dflt:!0}),linecolor:m.linecolor,linewidth:m.linewidth,showgrid:v({},m.showgrid,{dflt:!0}),gridcolor:m.gridcolor,gridwidth:m.gridwidth},"plot","from-root"),t=e({tickmode:m.tickmode,nticks:m.nticks,tick0:m.tick0,dtick:m.dtick,tickvals:m.tickvals,ticktext:m.ticktext,ticks:m.ticks,ticklen:m.ticklen,tickwidth:m.tickwidth,tickcolor:m.tickcolor,ticklabelstep:m.ticklabelstep,showticklabels:m.showticklabels,showtickprefix:m.showtickprefix,tickprefix:m.tickprefix,showticksuffix:m.showticksuffix,ticksuffix:m.ticksuffix,showexponent:m.showexponent,exponentformat:m.exponentformat,minexponent:m.minexponent,separatethousands:m.separatethousands,tickfont:m.tickfont,tickangle:m.tickangle,tickformat:m.tickformat,tickformatstops:m.tickformatstops,layer:m.layer},"plot","from-root"),o={visible:v({},m.visible,{dflt:!0}),type:v({},m.type,{values:["-","linear","log","date","category"]}),autotypenumbers:m.autotypenumbers,autorange:v({},m.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},range:v({},m.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:m.categoryorder,categoryarray:m.categoryarray,angle:{valType:"angle",editType:"plot"},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:v({},m.title.text,{editType:"plot",dflt:""}),font:v({},m.title.font,{editType:"plot"}),editType:"plot"},hoverformat:m.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:m._deprecated.title,titlefont:m._deprecated.titlefont}};v(o,n,t);var r={visible:v({},m.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:m.autotypenumbers,categoryorder:m.categoryorder,categoryarray:m.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"}
1220,period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:m.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};v(r,n,t),ee.exports={domain:b({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:g.background},radialaxis:o,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},{"../../components/color/attributes":365,"../../lib":503,"../../plot_api/edit_types":536,"../cartesian/layout_attributes":569,"../domain":584}],624:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color"),b=y("../../plot_api/plot_template"),v=y("../subplot_defaults"),e=y("../get_data").getSubplotData,n=y("../cartesian/tick_value_defaults"),t=y("../cartesian/tick_mark_defaults"),o=y("../cartesian/tick_label_defaults"),r=y("../cartesian/prefix_suffix_defaults"),d=y("../cartesian/category_order_defaults"),c=y("../cartesian/line_grid_defaults"),i=y("../cartesian/axis_autotype"),u=y("./layout_attributes"),f=y("./set_convert"),s=y("./constants"),h=s.axisNames;function p(x,l,w,_){var T=w("bgcolor");_.bgColor=m.combine(T,_.paper_bgcolor);var k=w("sector");w("hole");var L,A=e(_.fullData,s.name,_.id),I=_.layoutOut;function P(Q,j){return w(L+"."+Q,j)}for(var S=0;S<h.length;S++){L=h[S],g.isPlainObject(x[L])||(x[L]={});var E=x[L],D=b.newContainer(l,L);D._id=D._name=L,D._attr=_.id+"."+L,D._traceIndices=A.map(function(Q){return Q._expandedIndex});var F=s.axisName2dataArray[L],H=a(E,D,P,A,F,_);d(E,D,P,{axData:A,dataAttr:F});var V=P("visible");switch(f(D,l,I),P("uirevision",l.uirevision),D._m=1,L){case"radialaxis":var Z=P("autorange",!D.isValidRange(E.range));E.autorange=Z,!Z||H!=="linear"&&H!=="-"||P("rangemode"),Z==="reversed"&&(D._m=-1),P("range"),D.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(H==="date"){g.log("Polar plots do not support date angular axes yet.");for(var K=0;K<A.length;K++)A[K].visible=!1;H=E.type=D.type="linear"}P(H==="linear"?"thetaunit":"period");var q=P("direction");P("rotation",{counterclockwise:0,clockwise:90}[q])}if(r(E,D,P,D.type,{tickSuffixDflt:D.thetaunit==="degrees"?"°":void 0}),V){var W,$,R,N,U=_.font||{};$=(W=P("color"))===E.color?W:U.color,R=U.size,N=U.family,n(E,D,P,D.type),o(E,D,P,D.type,{font:{color:$,size:R,family:N}}),t(E,D,P,{outerTicks:!0}),c(E,D,P,{dfltColor:W,bgColor:_.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u[L]}),P("layer"),L==="radialaxis"&&(P("side"),P("angle",k[0]),P("title.text"),g.coerceFont(P,"title.font",{color:$,size:g.bigFont(R),family:N}))}H!=="category"&&P("hoverformat"),D._input=E}l.angularaxis.type==="category"&&w("gridshape")}function a(x,l,w,_,T,k){var L=w("autotypenumbers",k.autotypenumbersDflt);if(w("type")==="-"){for(var A,I=0;I<_.length;I++)if(_[I].visible){A=_[I];break}A&&A[T]&&(l.type=i(A[T],"gregorian",{noMultiCategory:!0,autotypenumbers:L})),l.type==="-"?l.type="linear":x.type=l.type}return l.type}ee.exports=function(x,l,w){v(x,l,w,{type:s.name,attributes:u,handleDefaults:p,font:l.font,autotypenumbersDflt:l.autotypenumbers,paper_bgcolor:l.paper_bgcolor,fullData:w,layoutOut:l})}},{"../../components/color":366,"../../lib":503,"../../plot_api/plot_template":543,"../cartesian/axis_autotype":555,"../cartesian/category_order_defaults":559,"../cartesian/line_grid_defaults":571,"../cartesian/prefix_suffix_defaults":573,"../cartesian/tick_label_defaults":578,"../cartesian/tick_mark_defaults":579,"../cartesian/tick_value_defaults":580,"../get_data":593,"../subplot_defaults":632,"./constants":620,"./layout_attributes":623,"./set_convert":626}],625:[function(y,ee,te){var g=y("@plotly/d3"),m=y("tinycolor2"),b=y("../../registry"),v=y("../../lib"),e=v.strRotate,n=v.strTranslate,t=y("../../components/color"),o=y("../../components/drawing"),r=y("../plots"),d=y("../../plots/cartesian/axes"),c=y("../cartesian/set_convert"),i=y("./set_convert"),u=y("../cartesian/autorange").doAutoRange,f=y("../cartesian/dragbox"),s=y("../../components/dragelement"),h=y("../../components/fx"),p=y("../../components/titles"),a=y("../cartesian/select").prepSelect,x=y("../cartesian/select").selectOnClick,l=y("../cartesian/select").clearSelect,w=y("../../lib/setcursor"),_=y("../../lib/clear_gl_canvase
1220s"),T=y("../../plot_api/subroutines").redrawReglTraces,k=y("../../constants/alignment").MID_SHIFT,L=y("./constants"),A=y("./helpers"),I=y("../smith/helpers"),P=I.smith,S=I.reactanceArc,E=I.resistanceArc,D=I.smithTransform,F=v._,H=v.mod,V=v.deg2rad,Z=v.rad2deg;function K(N,U,Q){this.isSmith=Q||!1,this.id=U,this.gd=N,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var j=N._fullLayout,X="clip"+j._uid+U;this.clipIds.forTraces=X+"-for-traces",this.clipPaths.forTraces=j._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=j["_"+(Q?"smith":"polar")+"layer"].append("g").attr("class",U),this.getHole=function(J){return this.isSmith?0:J.hole},this.getSector=function(J){return this.isSmith?[0,360]:J.sector},this.getRadial=function(J){return this.isSmith?J.realaxis:J.radialaxis},this.getAngular=function(J){return this.isSmith?J.imaginaryaxis:J.angularaxis},Q||(this.radialTickLayout=null,this.angularTickLayout=null)}var q=K.prototype;function W(N){var U=N.ticks+String(N.ticklen)+String(N.showticklabels);return"side"in N&&(U+=N.side),U}function $(N,U){return U[v.findIndexOfMin(U,function(Q){return v.angleDist(N,Q)})]}function R(N,U,Q){return U?(N.attr("display",null),N.attr(Q)):N&&N.attr("display","none"),N}ee.exports=function(N,U,Q){return new K(N,U,Q)},q.plot=function(N,U){for(var Q=U[this.id],j=!1,X=0;X<N.length;X++)if(N[X][0].trace.cliponaxis===!1){j=!0;break}this._hasClipOnAxisFalse=j,this.updateLayers(U,Q),this.updateLayout(U,Q),r.generalUpdatePerTraceModule(this.gd,this,N,Q),this.updateFx(U,Q),this.isSmith&&(delete Q.realaxis.range,delete Q.imaginaryaxis.range)},q.updateLayers=function(N,U){var Q=this.isSmith,j=this.layers,X=this.getRadial(U),J=this.getAngular(U),re=L.layerNames,ne=re.indexOf("frontplot"),se=re.slice(0,ne),oe=J.layer==="below traces",pe=X.layer==="below traces";oe&&se.push("angular-line"),pe&&se.push("radial-line"),oe&&se.push("angular-axis"),pe&&se.push("radial-axis"),se.push("frontplot"),oe||se.push("angular-line"),pe||se.push("radial-line"),oe||se.push("angular-axis"),pe||se.push("radial-axis");var ce=(Q?"smith":"polar")+"sublayer",de=this.framework.selectAll("."+ce).data(se,String);de.enter().append("g").attr("class",function(xe){return ce+" "+xe}).each(function(xe){var we=j[xe]=g.select(this);switch(xe){case"frontplot":Q||we.append("g").classed("barlayer",!0),we.append("g").classed("scatterlayer",!0);break;case"backplot":we.append("g").classed("maplayer",!0);break;case"plotbg":j.bg=we.append("path");break;case"radial-grid":case"angular-grid":we.style("fill","none");break;case"radial-line":we.append("line").style("fill","none");break;case"angular-line":we.append("path").style("fill","none")}}),de.order()},q.updateLayout=function(N,U){var Q=this.layers,j=N._size,X=this.getRadial(U),J=this.getAngular(U),re=U.domain.x,ne=U.domain.y;this.xOffset=j.l+j.w*re[0],this.yOffset=j.t+j.h*(1-ne[1]);var se=this.xLength=j.w*(re[1]-re[0]),oe=this.yLength=j.h*(ne[1]-ne[0]),pe=this.getSector(U);this.sectorInRad=pe.map(V);var ce,de,xe,we,be,Ee=this.sectorBBox=function(vt){var It,St,rt,et,Tt=vt[0],Vt=vt[1]-Tt,Kt=H(Tt,360),Be=Kt+Vt,qe=Math.cos(V(Kt)),Re=Math.sin(V(Kt)),Xe=Math.cos(V(Be)),ke=Math.sin(V(Be));return et=Kt<=90&&Be>=90||Kt>90&&Be>=450?1:Re<=0&&ke<=0?0:Math.max(Re,ke),It=Kt<=180&&Be>=180||Kt>180&&Be>=540?-1:qe>=0&&Xe>=0?0:Math.min(qe,Xe),St=Kt<=270&&Be>=270||Kt>270&&Be>=630?-1:Re>=0&&ke>=0?0:Math.min(Re,ke),rt=Be>=360?1:qe<=0&&Xe<=0?0:Math.max(qe,Xe),[It,St,rt,et]}(pe),fe=Ee[2]-Ee[0],me=Ee[3]-Ee[1],Te=oe/se,_e=Math.abs(me/fe);Te>_e?(ce=se,be=(oe-(de=se*_e))/j.h/2,xe=[re[0],re[1]],we=[ne[0]+be,ne[1]-be]):(de=oe,be=(se-(ce=oe/_e))/j.w/2,xe=[re[0]+be,re[1]-be],we=[ne[0],ne[1]]),this.xLength2=ce,this.yLength2=de,this.xDomain2=xe,this.yDomain2=we;var Ae,Pe=this.xOffset2=j.l+j.w*xe[0],De=this.yOffset2=j.t+j.h*(1-we[1]),Ve=this.radius=ce/fe,Qe=this.innerRadius=this.getHole(U)*Ve,Oe=this.cx=Pe-Ve*Ee[0],Ue=this.cy=De+Ve*Ee[3],Ge=this.cxx=Oe-Pe,Ye=this.cyy=Ue-De,tt=X.side;tt==="counterclockwise"?(Ae=tt,tt="top"):tt==="clockwise"&&(Ae=tt,tt="bottom"),this.radialAxis=this.mockAxis(N,U,X,{_id:"x",side:tt,_trueSide:Ae,domain:[Qe/j.w,Ve/j.w]}),this.angularAxis=this.mockAxis(N,U,J,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(N,U),this.updateAngularAxis(N,U),this.updateRadialAxis(N,U),this.updateRadialAxisTitle(N,U),this.xaxis=this.mockCartesianAxis(N,U,{_id:"x",domain:xe}),this.yaxis=this.mockCartesianAxis(N,U,{_id:"y",domain:we});var lt=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",lt).attr("transform",n(Ge,Ye)),Q.frontplot.attr("transform",n(Pe,De)).call(o.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),Q.bg.attr("d",lt).attr("transform",n(Oe,Ue)).call(t.fill,U.bgcolor)},q.mockAxis=function(N,U,Q,j){var X=v.extendFlat({},Q,j);return i(X,U,N),X},q.mockCartesianAxis=function(N,U,Q){var j=this,X=j.isSmith,J=Q._id,re=v.extendFlat({type:"linear"},Q);c(re,N);var ne={x:[0,2],y:[1,3]};return re.setRange=function(){var se=j.sectorBBox,oe=ne[J],pe=j.radialAxis._rl,ce=(pe[1]-pe[0])/(1-j.getHole(U));re.range=[se[oe[0]]*ce,se[oe[1]]*ce]},re.isPtWithinRange=J!=="x"||X?function(){return!0}:function(se){return j.isPtInside(se)},re.setRange(),re.setScale(),re},q.doAutoRange=function(N,U){var Q=this.gd,j=this.radialAxis,X=this.getRadial(U);u(Q,j);var J=j.range;X.range=J.slice(),X._input.range=J.slice(),j._rl=[j.r2l(J[0],null,"gregorian"),j.r2l(J[1],null,"gregorian")]},q.updateRadialAxis=function(N,U){var Q=this,j=Q.gd,X=Q.layers,J=Q.radius,re=Q.innerRadius,ne=Q.cx,se=Q.cy,oe=Q.getRadial(U),pe=H(Q.getSector(U)[0],360),ce=Q.radialAxis,de=re<J,xe=Q.isSmith;xe||(Q.fillViewInitialKey("radialaxis.angle",oe.angle),Q.fillViewInitialKey("radialaxis.range",ce.range.slice()),ce.setGeometry()),ce.tickangle==="auto"&&pe>90&&pe<=270&&(ce.tickangle=180);var we=xe?function(Ve){var Qe=D(Q,P([Ve.x,0]));return n(Qe[0]-ne,Qe[1]-se)}:function(Ve){return n(ce.l2p(Ve.x)+re,0)},be=xe?function(Ve){return E(Q,Ve.x,-1/0,1/0)}:function(Ve){return Q.pathArc(ce.r2p(Ve.x)+re)},Ee=W(oe);
1220if(Q.radialTickLayout!==Ee&&(X["radial-axis"].selectAll(".xtick").remove(),Q.radialTickLayout=Ee),de){ce.setScale();var fe=0,me=xe?(ce.tickvals||[]).filter(function(Ve){return Ve>=0}).map(function(Ve){return d.tickText(ce,Ve,!0,!1)}):d.calcTicks(ce),Te=xe?me:d.clipEnds(ce,me),_e=d.getTickSigns(ce)[2];xe&&((ce.ticks==="top"&&ce.side==="bottom"||ce.ticks==="bottom"&&ce.side==="top")&&(_e=-_e),ce.ticks==="top"&&ce.side==="top"&&(fe=-ce.ticklen),ce.ticks==="bottom"&&ce.side==="bottom"&&(fe=ce.ticklen)),d.drawTicks(j,ce,{vals:me,layer:X["radial-axis"],path:d.makeTickPath(ce,0,_e),transFn:we,crisp:!1}),d.drawGrid(j,ce,{vals:Te,layer:X["radial-grid"],path:be,transFn:v.noop,crisp:!1}),d.drawLabels(j,ce,{vals:me,layer:X["radial-axis"],transFn:we,labelFns:d.makeLabelFns(ce,fe)})}var Ae=Q.radialAxisAngle=Q.vangles?Z($(V(oe.angle),Q.vangles)):oe.angle,Pe=n(ne,se),De=Pe+e(-Ae);R(X["radial-axis"],de&&(oe.showticklabels||oe.ticks),{transform:De}),R(X["radial-grid"],de&&oe.showgrid,{transform:xe?"":Pe}),R(X["radial-line"].select("line"),de&&oe.showline,{x1:xe?-J:re,y1:0,x2:J,y2:0,transform:De}).attr("stroke-width",oe.linewidth).call(t.stroke,oe.linecolor)},q.updateRadialAxisTitle=function(N,U,Q){if(!this.isSmith){var j=this.gd,X=this.radius,J=this.cx,re=this.cy,ne=this.getRadial(U),se=this.id+"title",oe=0;if(ne.title){var pe=o.bBox(this.layers["radial-axis"].node()).height,ce=ne.title.font.size,de=ne.side;oe=de==="top"?ce:de==="counterclockwise"?-(pe+.4*ce):pe+.8*ce}var xe=Q!==void 0?Q:this.radialAxisAngle,we=V(xe),be=Math.cos(we),Ee=Math.sin(we),fe=J+X/2*be+oe*Ee,me=re-X/2*Ee+oe*be;this.layers["radial-axis-title"]=p.draw(j,se,{propContainer:ne,propName:this.id+".radialaxis.title",placeholder:F(j,"Click to enter radial axis title"),attributes:{x:fe,y:me,"text-anchor":"middle"},transform:{rotate:-xe}})}},q.updateAngularAxis=function(N,U){var Q=this,j=Q.gd,X=Q.layers,J=Q.radius,re=Q.innerRadius,ne=Q.cx,se=Q.cy,oe=Q.getAngular(U),pe=Q.angularAxis,ce=Q.isSmith;ce||(Q.fillViewInitialKey("angularaxis.rotation",oe.rotation),pe.setGeometry(),pe.setScale());var de=ce?function(Ve){var Qe=D(Q,P([0,Ve.x]));return Math.atan2(Qe[0]-ne,Qe[1]-se)-Math.PI/2}:function(Ve){return pe.t2g(Ve.x)};pe.type==="linear"&&pe.thetaunit==="radians"&&(pe.tick0=Z(pe.tick0),pe.dtick=Z(pe.dtick));var xe=function(Ve){return n(ne+J*Math.cos(Ve),se-J*Math.sin(Ve))},we=ce?function(Ve){var Qe=D(Q,P([0,Ve.x]));return n(Qe[0],Qe[1])}:function(Ve){return xe(de(Ve))},be=ce?function(Ve){var Qe=D(Q,P([0,Ve.x])),Oe=Math.atan2(Qe[0]-ne,Qe[1]-se)-Math.PI/2;return n(Qe[0],Qe[1])+e(-Z(Oe))}:function(Ve){var Qe=de(Ve);return xe(Qe)+e(-Z(Qe))},Ee=ce?function(Ve){return S(Q,Ve.x,0,1/0)}:function(Ve){var Qe=de(Ve),Oe=Math.cos(Qe),Ue=Math.sin(Qe);return"M"+[ne+re*Oe,se-re*Ue]+"L"+[ne+J*Oe,se-J*Ue]},fe=d.makeLabelFns(pe,0).labelStandoff,me={xFn:function(Ve){var Qe=de(Ve);return Math.cos(Qe)*fe},yFn:function(Ve){var Qe=de(Ve),Oe=Math.sin(Qe)>0?.2:1;return-Math.sin(Qe)*(fe+Ve.fontSize*Oe)+Math.abs(Math.cos(Qe))*(Ve.fontSize*k)},anchorFn:function(Ve){var Qe=de(Ve),Oe=Math.cos(Qe);return Math.abs(Oe)<.1?"middle":Oe>0?"start":"end"},heightFn:function(Ve,Qe,Oe){var Ue=de(Ve);return-.5*(1+Math.sin(Ue))*Oe}},Te=W(oe);Q.angularTickLayout!==Te&&(X["angular-axis"].selectAll("."+pe._id+"tick").remove(),Q.angularTickLayout=Te);var _e,Ae=ce?[1/0].concat(pe.tickvals||[]).map(function(Ve){return d.tickText(pe,Ve,!0,!1)}):d.calcTicks(pe);if(ce&&(Ae[0].text="∞",Ae[0].fontSize*=1.75),U.gridshape==="linear"?(_e=Ae.map(de),v.angleDelta(_e[0],_e[1])<0&&(_e=_e.slice().reverse())):_e=null,Q.vangles=_e,pe.type==="category"&&(Ae=Ae.filter(function(Ve){return v.isAngleInsideSector(de(Ve),Q.sectorInRad)})),pe.visible){var Pe=pe.ticks==="inside"?-1:1,De=(pe.linewidth||1)/2;d.drawTicks(j,pe,{vals:Ae,layer:X["angular-axis"],path:"M"+Pe*De+",0h"+Pe*pe.ticklen,transFn:be,crisp:!1}),d.drawGrid(j,pe,{vals:Ae,layer:X["angular-grid"],path:Ee,transFn:v.noop,crisp:!1}),d.drawLabels(j,pe,{vals:Ae,layer:X["angular-axis"],repositionOnUpdate:!0,transFn:we,labelFns:me})}R(X["angular-line"].select("path"),oe.showline,{d:Q.pathSubplot(),transform:n(ne,se)}).attr("stroke-width",oe.linewidth).call(t.stroke,oe.linecolor)},q.updateFx=function(N,U){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(N),this.updateRadialDrag(N,U,0),this.updateRadialDrag(N,U,1)),this.updateHoverAndMainDrag(N))},q.updateHoverAndMainDrag=function(N){var U,Q,j=this,X=j.isSmith,J=j.gd,re=j.layers,ne=N._zoomlayer,se=L.MINZOOM,oe=L.OFFEDGE,pe=j.radius,ce=j.innerRadius,de=j.cx,xe=j.cy,we=j.cxx,be=j.cyy,Ee=j.sectorInRad,fe=j.vangles,me=j.radialAxis,Te=A.clampTiny,_e=A.findXYatLength,Ae=A.findEnclosingVertexAngles,Pe=L.cornerHalfWidth,De=L.cornerLen/2,Ve=f.makeDragger(re,"path","maindrag","crosshair");g.select(Ve).attr("d",j.pathSubplot()).attr("transform",n(de,xe)),Ve.onmousemove=function(it){h.hover(J,it,j.id),J._fullLayout._lasthover=Ve,J._fullLayout._hoversubplot=j.id},Ve.onmouseout=function(it){J._dragging||s.unhover(J,it)};var Qe,Oe,Ue,Ge,Ye,tt,lt,vt,It,St={element:Ve,gd:J,subplot:j.id,plotinfo:{id:j.id,xaxis:j.xaxis,yaxis:j.yaxis},xaxes:[j.xaxis],yaxes:[j.yaxis]};function rt(it,ht){return Math.sqrt(it*it+ht*ht)}function et(it,ht){return rt(it-we,ht-be)}
1220function Tt(it,ht){return Math.atan2(be-ht,it-we)}function Vt(it,ht){return[it*Math.cos(ht),it*Math.sin(-ht)]}function Kt(it,ht){if(it===0)return j.pathSector(2*Pe);var ut=De/it,kt=ht-ut,ot=ht+ut,Lt=Math.max(0,Math.min(it,pe)),Et=Lt-Pe,Ze=Lt+Pe;return"M"+Vt(Et,kt)+"A"+[Et,Et]+" 0,0,0 "+Vt(Et,ot)+"L"+Vt(Ze,ot)+"A"+[Ze,Ze]+" 0,0,1 "+Vt(Ze,kt)+"Z"}function Be(it,ht,ut){if(it===0)return j.pathSector(2*Pe);var kt,ot,Lt=Vt(it,ht),Et=Vt(it,ut),Ze=Te((Lt[0]+Et[0])/2),pt=Te((Lt[1]+Et[1])/2);if(Ze&&pt){var Ct=pt/Ze,zt=-1/Ct,Gt=_e(Pe,Ct,Ze,pt);kt=_e(De,zt,Gt[0][0],Gt[0][1]),ot=_e(De,zt,Gt[1][0],Gt[1][1])}else{var ze,st;pt?(ze=De,st=Pe):(ze=Pe,st=De),kt=[[Ze-ze,pt-st],[Ze+ze,pt-st]],ot=[[Ze-ze,pt+st],[Ze+ze,pt+st]]}return"M"+kt.join("L")+"L"+ot.reverse().join("L")+"Z"}function qe(it,ht){return ht=Math.max(Math.min(ht,pe),ce),it<oe?it=0:pe-it<oe?it=pe:ht<oe?ht=0:pe-ht<oe&&(ht=pe),Math.abs(ht-it)>se?(it<ht?(Ue=it,Ge=ht):(Ue=ht,Ge=it),!0):(Ue=null,Ge=null,!1)}function Re(it,ht){it=it||Ye,ht=ht||"M0,0Z",vt.attr("d",it),It.attr("d",ht),f.transitionZoombox(vt,It,tt,lt),tt=!0;var ut={};Ce(ut),J.emit("plotly_relayouting",ut)}function Xe(it,ht){var ut,kt,ot=Qe+(it*=U),Lt=Oe+(ht*=Q),Et=et(Qe,Oe),Ze=Math.min(et(ot,Lt),pe),pt=Tt(Qe,Oe);qe(Et,Ze)&&(ut=Ye+j.pathSector(Ge),Ue&&(ut+=j.pathSector(Ue)),kt=Kt(Ue,pt)+Kt(Ge,pt)),Re(ut,kt)}function ke(it,ht,ut,kt){var ot=A.findIntersectionXY(ut,kt,ut,[it-we,be-ht]);return rt(ot[0],ot[1])}function Le(it,ht){var ut,kt,ot=Qe+it,Lt=Oe+ht,Et=Tt(Qe,Oe),Ze=Tt(ot,Lt),pt=Ae(Et,fe),Ct=Ae(Ze,fe);qe(ke(Qe,Oe,pt[0],pt[1]),Math.min(ke(ot,Lt,Ct[0],Ct[1]),pe))&&(ut=Ye+j.pathSector(Ge),Ue&&(ut+=j.pathSector(Ue)),kt=[Be(Ue,pt[0],pt[1]),Be(Ge,pt[0],pt[1])].join(" ")),Re(ut,kt)}function Ie(){if(f.removeZoombox(J),Ue!==null&&Ge!==null){var it={};Ce(it),f.showDoubleClickNotifier(J),b.call("_guiRelayout",J,it)}}function Ce(it){var ht=me._rl,ut=(ht[1]-ht[0])/(1-ce/pe)/pe,kt=[ht[0]+(Ue-ce)*ut,ht[0]+(Ge-ce)*ut];it[j.id+".radialaxis.range"]=kt}function Je(it,ht){var ut=J._fullLayout.clickmode;if(f.removeZoombox(J),it===2){var kt={};for(var ot in j.viewInitial)kt[j.id+"."+ot]=j.viewInitial[ot];J.emit("plotly_doubleclick",null),b.call("_guiRelayout",J,kt)}ut.indexOf("select")>-1&&it===1&&x(ht,J,[j.xaxis],[j.yaxis],j.id,St),ut.indexOf("event")>-1&&h.click(J,ht,j.id)}St.prepFn=function(it,ht,ut){var kt=J._fullLayout.dragmode,ot=Ve.getBoundingClientRect();J._fullLayout._calcInverseTransform(J);var Lt=J._fullLayout._invTransform;U=J._fullLayout._invScaleX,Q=J._fullLayout._invScaleY;var Et=v.apply3DTransform(Lt)(ht-ot.left,ut-ot.top);if(Qe=Et[0],Oe=Et[1],fe){var Ze=A.findPolygonOffset(pe,Ee[0],Ee[1],fe);Qe+=we+Ze[0],Oe+=be+Ze[1]}switch(kt){case"zoom":St.clickFn=Je,X||(St.moveFn=fe?Le:Xe,St.doneFn=Ie,function(){Ue=null,Ge=null,Ye=j.pathSubplot(),tt=!1;var pt=J._fullLayout[j.id];lt=m(pt.bgcolor).getLuminance(),(vt=f.makeZoombox(ne,lt,de,xe,Ye)).attr("fill-rule","evenodd"),It=f.makeCorners(ne,de,xe),l(J)}());break;case"select":case"lasso":a(it,ht,ut,St,kt)}},s.init(St)},q.updateRadialDrag=function(N,U,Q){var j=this,X=j.gd,J=j.layers,re=j.radius,ne=j.innerRadius,se=j.cx,oe=j.cy,pe=j.radialAxis,ce=L.radialDragBoxSize,de=ce/2;if(pe.visible){var xe,we,be,Ee=V(j.radialAxisAngle),fe=pe._rl,me=fe[0],Te=fe[1],_e=fe[Q],Ae=.75*(fe[1]-fe[0])/(1-j.getHole(U))/re;Q?(xe=se+(re+de)*Math.cos(Ee),we=oe-(re+de)*Math.sin(Ee),be="radialdrag"):(xe=se+(ne-de)*Math.cos(Ee),we=oe-(ne-de)*Math.sin(Ee),be="radialdrag-inner");var Pe,De,Ve,Qe=f.makeRectDragger(J,be,"crosshair",-de,-de,ce,ce),Oe={element:Qe,gd:X};R(g.select(Qe),pe.visible&&ne<re,{transform:n(xe,we)}),Oe.prepFn=function(){Pe=null,De=null,Ve=null,Oe.moveFn=Ue,Oe.doneFn=Ge,l(X)},Oe.clampFn=function(lt,vt){return Math.sqrt(lt*lt+vt*vt)<L.MINDRAG&&(lt=0,vt=0),[lt,vt]},s.init(Oe)}function Ue(lt,vt){if(Pe)Pe(lt,vt);else{var It=[lt,-vt],St=[Math.cos(Ee),Math.sin(Ee)],rt=Math.abs(v.dot(It,St)/Math.sqrt(v.dot(It,It)));isNaN(rt)||(Pe=rt<.5?Ye:tt)}var et={};(function(Tt){De!==null?Tt[j.id+".radialaxis.angle"]=De:Ve!==null&&(Tt[j.id+".radialaxis.range["+Q+"]"]=Ve)})(et),X.emit("plotly_relayouting",et)}function Ge(){De!==null?b.call("_guiRelayout",X,j.id+".radialaxis.angle",De):Ve!==null&&b.call("_guiRelayout",X,j.id+".radialaxis.range["+Q+"]",Ve)}function Ye(lt,vt){if(Q!==0){var It=xe+lt,St=we+vt;De=Math.atan2(oe-St,It-se),j.vangles&&(De=$(De,j.vangles)),De=Z(De);var rt=n(se,oe)+e(-De);J["radial-axis"].attr("transform",rt),J["radial-line"].select("line").attr("transform",rt);var et=j.gd._fullLayout,Tt=et[j.id];j.updateRadialAxisTitle(et,Tt,De)}}
1220function tt(lt,vt){var It=v.dot([lt,-vt],[Math.cos(Ee),Math.sin(Ee)]);if(Ve=_e-Ae*It,Ae>0==(Q?Ve>me:Ve<Te)){var St=X._fullLayout,rt=St[j.id];pe.range[Q]=Ve,pe._rl[Q]=Ve,j.updateRadialAxis(St,rt),j.xaxis.setRange(),j.xaxis.setScale(),j.yaxis.setRange(),j.yaxis.setScale();var et=!1;for(var Tt in j.traceHash){var Vt=j.traceHash[Tt],Kt=v.filterVisible(Vt);Vt[0][0].trace._module.plot(X,j,Kt,rt),b.traceIs(Tt,"gl")&&Kt.length&&(et=!0)}et&&(_(X),T(X))}else Ve=null}},q.updateAngularDrag=function(N){var U=this,Q=U.gd,j=U.layers,X=U.radius,J=U.angularAxis,re=U.cx,ne=U.cy,se=U.cxx,oe=U.cyy,pe=L.angularDragBoxSize,ce=f.makeDragger(j,"path","angulardrag","move"),de={element:ce,gd:Q};function xe(Oe,Ue){return Math.atan2(oe+pe-Ue,Oe-se-pe)}g.select(ce).attr("d",U.pathAnnulus(X,X+pe)).attr("transform",n(re,ne)).call(w,"move");var we,be,Ee,fe,me,Te,_e=j.frontplot.select(".scatterlayer").selectAll(".trace"),Ae=_e.selectAll(".point"),Pe=_e.selectAll(".textpoint");function De(Oe,Ue){var Ge=U.gd._fullLayout,Ye=Ge[U.id],tt=xe(we+Oe*N._invScaleX,be+Ue*N._invScaleY),lt=Z(tt-Te);if(fe=Ee+lt,j.frontplot.attr("transform",n(U.xOffset2,U.yOffset2)+e([-lt,se,oe])),U.vangles){me=U.radialAxisAngle+lt;var vt=n(re,ne)+e(-lt),It=n(re,ne)+e(-me);j.bg.attr("transform",vt),j["radial-grid"].attr("transform",vt),j["radial-axis"].attr("transform",It),j["radial-line"].select("line").attr("transform",It),U.updateRadialAxisTitle(Ge,Ye,me)}else U.clipPaths.forTraces.select("path").attr("transform",n(se,oe)+e(lt));Ae.each(function(){var Kt=g.select(this),Be=o.getTranslate(Kt);Kt.attr("transform",n(Be.x,Be.y)+e([lt]))}),Pe.each(function(){var Kt=g.select(this),Be=Kt.select("text"),qe=o.getTranslate(Kt);Kt.attr("transform",e([lt,Be.attr("x"),Be.attr("y")])+n(qe.x,qe.y))}),J.rotation=v.modHalf(fe,360),U.updateAngularAxis(Ge,Ye),U._hasClipOnAxisFalse&&!v.isFullCircle(U.sectorInRad)&&_e.call(o.hideOutsideRangePoints,U);var St=!1;for(var rt in U.traceHash)if(b.traceIs(rt,"gl")){var et=U.traceHash[rt],Tt=v.filterVisible(et);et[0][0].trace._module.plot(Q,U,Tt,Ye),Tt.length&&(St=!0)}St&&(_(Q),T(Q));var Vt={};Ve(Vt),Q.emit("plotly_relayouting",Vt)}function Ve(Oe){Oe[U.id+".angularaxis.rotation"]=fe,U.vangles&&(Oe[U.id+".radialaxis.angle"]=me)}function Qe(){Pe.select("text").attr("transform",null);var Oe={};Ve(Oe),b.call("_guiRelayout",Q,Oe)}de.prepFn=function(Oe,Ue,Ge){var Ye=N[U.id];Ee=Ye.angularaxis.rotation;var tt=ce.getBoundingClientRect();we=Ue-tt.left,be=Ge-tt.top,Q._fullLayout._calcInverseTransform(Q);var lt=v.apply3DTransform(N._invTransform)(we,be);we=lt[0],be=lt[1],Te=xe(we,be),de.moveFn=De,de.doneFn=Qe,l(Q)},U.vangles&&!v.isFullCircle(U.sectorInRad)&&(de.prepFn=v.noop,w(g.select(ce),null)),s.init(de)},q.isPtInside=function(N){if(this.isSmith)return!0;var U=this.sectorInRad,Q=this.vangles,j=this.angularAxis.c2g(N.theta),X=this.radialAxis,J=X.c2l(N.r),re=X._rl;return(Q?A.isPtInsidePolygon:v.isPtInsideSector)(J,j,re,U,Q)},q.pathArc=function(N){var U=this.sectorInRad,Q=this.vangles;return(Q?A.pathPolygon:v.pathArc)(N,U[0],U[1],Q)},q.pathSector=function(N){var U=this.sectorInRad,Q=this.vangles;return(Q?A.pathPolygon:v.pathSector)(N,U[0],U[1],Q)},q.pathAnnulus=function(N,U){var Q=this.sectorInRad,j=this.vangles;return(j?A.pathPolygonAnnulus:v.pathAnnulus)(N,U,Q[0],Q[1],j)},q.pathSubplot=function(){var N=this.innerRadius,U=this.radius;return N?this.pathAnnulus(N,U):this.pathSector(U)},q.fillViewInitialKey=function(N,U){N in this.viewInitial||(this.viewInitial[N]=U)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/drawing":388,"../../components/fx":406,"../../components/titles":464,"../../constants/alignment":471,"../../lib":503,"../../lib/clear_gl_canvases":487,"../../lib/setcursor":524,"../../plot_api/subroutines":544,"../../plots/cartesian/axes":554,"../../registry":638,"../cartesian/autorange":553,"../cartesian/dragbox":563,"../cartesian/select":575,"../cartesian/set_convert":576,"../plots":619,"../smith/helpers":628,"./constants":620,"./helpers":621,"./set_convert":626,"@plotly/d3":58,tinycolor2:312}],626:[function(y,ee,te){var g=y("../../lib"),m=y("../cartesian/set_convert"),b=g.deg2rad,v=g.rad2deg;ee.exports=function(e,n,t){switch(m(e,t),e._id){case"x":case"radialaxis":(function(o,r){var d=r._subplot;o.setGeometry=function(){var c=o._rl[0],i=o._rl[1],u=d.innerRadius,f=(d.radius-u)/(i-c),s=u/f,h=c>i?function(p){return p<=0}:function(p){return p>=0};o.c2g=function(p){var a=o.c2l(p)-c;
1220return(h(a)?a:0)+s},o.g2c=function(p){return o.l2c(p+c-s)},o.g2p=function(p){return p*f},o.c2p=function(p){return o.g2p(o.c2g(p))}}})(e,n);break;case"angularaxis":(function(o,r){var d=o.type;if(d==="linear"){var c=o.d2c,i=o.c2d;o.d2c=function(u,f){return function(s,h){return h==="degrees"?b(s):s}(c(u),f)},o.c2d=function(u,f){return i(function(s,h){return h==="degrees"?v(s):s}(u,f))}}o.makeCalcdata=function(u,f){var s,h,p=u[f],a=u._length,x=function(k){return o.d2c(k,u.thetaunit)};if(p){if(g.isTypedArray(p)&&d==="linear"){if(a===p.length)return p;if(p.subarray)return p.subarray(0,a)}for(s=new Array(a),h=0;h<a;h++)s[h]=x(p[h])}else{var l=f+"0",w="d"+f,_=l in u?x(u[l]):0,T=u[w]?x(u[w]):(o.period||2*Math.PI)/a;for(s=new Array(a),h=0;h<a;h++)s[h]=_+h*T}return s},o.setGeometry=function(){var u,f,s,h,p=r.sector,a=p.map(b),x={clockwise:-1,counterclockwise:1}[o.direction],l=b(o.rotation),w=function(L){return x*L+l},_=function(L){return(L-l)/x};switch(d){case"linear":f=u=g.identity,h=b,s=v,o.range=g.isFullCircle(a)?[p[0],p[0]+360]:a.map(_).map(v);break;case"category":var T=o._categories.length,k=o.period?Math.max(o.period,T):T;k===0&&(k=1),f=h=function(L){return 2*L*Math.PI/k},u=s=function(L){return L*k/Math.PI/2},o.range=[0,k]}o.c2g=function(L){return w(f(L))},o.g2c=function(L){return u(_(L))},o.t2g=function(L){return w(h(L))},o.g2t=function(L){return s(_(L))}}})(e,n)}}},{"../../lib":503,"../cartesian/set_convert":576}],627:[function(y,ee,te){ee.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},{}],628:[function(y,ee,te){function g(e){return e<0?-1:e>0?1:0}function m(e){var n=e[0],t=e[1];if(!isFinite(n)||!isFinite(t))return[1,0];var o=(n+1)*(n+1)+t*t;return[(n*n+t*t-1)/o,2*t/o]}function b(e,n){var t=n[0],o=n[1];
1220return[t*e.radius+e.cx,-o*e.radius+e.cy]}function v(e,n){return n*e.radius}ee.exports={smith:m,reactanceArc:function(e,n,t,o){var r=b(e,m([t,n])),d=r[0],c=r[1],i=b(e,m([o,n])),u=i[0],f=i[1];if(n===0)return["M"+d+","+c,"L"+u+","+f].join(" ");var s=v(e,1/Math.abs(n));return["M"+d+","+c,"A"+s+","+s+" 0 0,"+(n<0?1:0)+" "+u+","+f].join(" ")},resistanceArc:function(e,n,t,o){var r=v(e,1/(n+1)),d=b(e,m([n,t])),c=d[0],i=d[1],u=b(e,m([n,o])),f=u[0],s=u[1];if(g(t)!==g(o)){var h=b(e,m([n,0]));return["M"+c+","+i,"A"+r+","+r+" 0 0,"+(0<t?0:1)+" "+h[0]+","+h[1],"A"+r+","+r+" 0 0,"+(o<0?0:1)+f+","+s].join(" ")}return["M"+c+","+i,"A"+r+","+r+" 0 0,"+(o<t?0:1)+" "+f+","+s].join(" ")},smithTransform:b}},{}],629:[function(y,ee,te){var g=y("../get_data").getSubplotCalcData,m=y("../../lib").counterRegex,b=y("../polar/polar"),v=y("./constants"),e=v.attr,n=v.name,t=m(n),o={};o[e]={valType:"subplotid",dflt:n,editType:"calc"},ee.exports={attr:e,name:n,idRoot:n,idRegex:t,attrRegex:t,attributes:o,layoutAttributes:y("./layout_attributes"),supplyLayoutDefaults:y("./layout_defaults"),plot:function(r){for(var d=r._fullLayout,c=r.calcdata,i=d._subplots[n],u=0;u<i.length;u++){var f=i[u],s=g(c,n,f),h=d[f]._subplot;h||(h=b(r,f,!0),d[f]._subplot=h),h.plot(s,d,r._promises)}},clean:function(r,d,c,i){for(var u=i._subplots[n]||[],f=0;f<u.length;f++){var s=u[f],h=i[s]._subplot;if(!d[s]&&h)for(var p in h.framework.remove(),h.clipPaths)h.clipPaths[p].remove()}},toSVG:y("../cartesian").toSVG}},{"../../lib":503,"../cartesian":568,"../get_data":593,"../polar/polar":625,"./constants":627,"./layout_attributes":630,"./layout_defaults":631}],630:[function(y,ee,te){var g=y("../../components/color/attributes"),m=y("../cartesian/layout_attributes"),b=y("../domain").attributes,v=y("../../lib").extendFlat,e=y("../../plot_api/edit_types").overrideAll,n=e({color:m.color,showline:v({},m.showline,{dflt:!0}),linecolor:m.linecolor,linewidth:m.linewidth,showgrid:v({},m.showgrid,{dflt:!0}),gridcolor:m.gridcolor,gridwidth:m.gridwidth},"plot","from-root"),t=e({ticklen:m.ticklen,tickwidth:v({},m.tickwidth,{dflt:2}),tickcolor:m.tickcolor,showticklabels:m.showticklabels,showtickprefix:m.showtickprefix,tickprefix:m.tickprefix,showticksuffix:m.showticksuffix,ticksuffix:m.ticksuffix,tickfont:m.tickfont,tickformat:m.tickformat,hoverformat:m.hoverformat,layer:m.layer},"plot","from-root"),o=v({visible:v({},m.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:v({},m.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},n,t),r=v({visible:v({},m.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:m.ticks,editType:"calc"},n,t);ee.exports={domain:b({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:g.background},realaxis:o,imaginaryaxis:r,editType:"calc"}},{"../../components/color/attributes":365,"../../lib":503,"../../plot_api/edit_types":536,"../cartesian/layout_attributes":569,"../domain":584}],631:[function(y,ee,te){var g,m,b,v=y("../../lib"),e=y("../../components/color"),n=y("../../plot_api/plot_template"),t=y("../subplot_defaults"),o=y("../get_data").getSubplotData,r=y("../cartesian/prefix_suffix_defaults"),d=y("../cartesian/tick_label_defaults"),c=y("../cartesian/line_grid_defaults"),i=y("../cartesian/set_convert"),u=y("./layout_attributes"),f=y("./constants"),s=f.axisNames,h=(g=function(a){return a.slice().reverse().map(function(x){return-x}).concat([0]).concat(a)},m=String,b={},function(a){var x=m?m(a):a;if(x in b)return b[x];var l=g(a);return b[x]=l,l});function p(a,x,l,w){var _=l("bgcolor");w.bgColor=e.combine(_,w.paper_bgcolor);var T,k=o(w.fullData,f.name,w.id),L=w.layoutOut;function A(q,W){return l(T+"."+q,W)}for(var I=0;I<s.length;I++){T=s[I],v.isPlainObject(a[T])||(a[T]={});var P=a[T],S=n.newContainer(x,T);S._id=S._name=T,S._attr=w.id+"."+T,S._traceIndices=k.map(function(q){return q._expandedIndex});var E=A("visible");if(S.type="linear",i(S,L),r(P,S,A,S.type),E){var D,F,H,V,Z=T==="realaxis";Z&&A("side"),Z?A("tickvals"):A("tickvals",h(x.realaxis.tickvals||u.realaxis.tickvals.dflt));var K=w.font||{};E&&(F=(D=A("color"))===P.color?D:K.color,H=K.size,V=K.family),d(P,S,A,S.type,{noTicklabelstep:!0,noAng:!Z,noExp:!0,font:{color:F,size:H,family:V}}),v.coerce2(a,x,u,T+".ticklen"),v.coerce2(a,x,u,T+".tickwidth"),v.coerce2(a,x,u,T+".tickcolor",x.color),A("ticks")||(delete x[T].ticklen,delete x[T].tickwidth,delete x[T].tickcolor),c(P,S,A,{dfltColor:D,bgColor:w.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u[T]}),A("layer")}A("hoverformat"),delete S.type,S._input=P}}ee.exports=function(a,x,l){t(a,x,l,{noUirevision:!0,type:f.name,attributes:u,handleDefaults:p,font:x.font,paper_bgcolor:x.paper_bgcolor,fullData:l,layoutOut:x})}},{"../../components/color":366,"../../lib":503,"../../plot_api/plot_template":543,"../cartesian/line_grid_defaults":571,"../cartesian/prefix_suffix_defaults":573,"../cartesian/set_convert":576,"../cartesian/tick_label_defaults":578,"../get_data":593,"../subplot_defaults":632,"./constants":627,"./layout_attributes":630}],632:[function(y,ee,te){var g=y("../lib"),m=y("../plot_api/plot_template"),b=y("./domain").defaults;ee.exports=function(v,e,n,t){var o,r,d=t.type,c=t.attributes,i=t.handleDefaults,u=t.partition||"x",f=e._subplots[d],s=f.length,h=s&&f[0].replace(/\d+$/,"");function p(w,_){return g.coerce(o,r,c,w,_)}for(var a=0;a<s;a++){var x=f[a];o=v[x]?v[x]:v[x]={},r=m.newContainer(e,x,h),t.noUirevision||p("uirevision",e.uirevision);var l={};l[u]=[a/s,(a+1)/s],b(r,e,p,l),t.id=x,i(o,r,p,t)}}},{"../lib":503,"../plot_api/plot_template":543,"./domain":584}],633:[function(y,ee,te){var g=y("../constants/docs");g.FORMAT_LINK,g.DATE_FORMAT_LINK;
1220function m(b){var v=b.description?" "+b.description:"",e=b.keys||[];if(e.length>0){for(var n=[],t=0;t<e.length;t++)n[t]="`"+e[t]+"`";v+="Finally, the template string has access to ",v=e.length===1?"variable "+n[0]:"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return v}te.hovertemplateAttrs=function(b,v){b=b||{},m(v=v||{});var e={valType:"string",dflt:"",editType:b.editType||"none"};return b.arrayOk!==!1&&(e.arrayOk=!0),e},te.texttemplateAttrs=function(b,v){b=b||{},m(v=v||{});var e={valType:"string",dflt:"",editType:b.editType||"calc"};return b.arrayOk!==!1&&(e.arrayOk=!0),e}},{"../constants/docs":474}],634:[function(y,ee,te){var g=y("./ternary"),m=y("../../plots/get_data").getSubplotCalcData,b=y("../../lib").counterRegex;te.name="ternary";var v=te.attr="subplot";te.idRoot="ternary",te.idRegex=te.attrRegex=b("ternary"),(te.attributes={})[v]={valType:"subplotid",dflt:"ternary",editType:"calc"},te.layoutAttributes=y("./layout_attributes"),te.supplyLayoutDefaults=y("./layout_defaults"),te.plot=function(e){for(var n=e._fullLayout,t=e.calcdata,o=n._subplots.ternary,r=0;r<o.length;r++){var d=o[r],c=m(t,"ternary",d),i=n[d]._subplot;i||(i=new g({id:d,graphDiv:e,container:n._ternarylayer.node()},n),n[d]._subplot=i),i.plot(c,n,e._promises)}},te.clean=function(e,n,t,o){for(var r=o._subplots.ternary||[],d=0;d<r.length;d++){var c=r[d],i=o[c]._subplot;!n[c]&&i&&(i.plotContainer.remove(),i.clipDef.remove(),i.clipDefRelative.remove(),i.layers["a-title"].remove(),i.layers["b-title"].remove(),i.layers["c-title"].remove())}}},{"../../lib":503,"../../plots/get_data":593,"./layout_attributes":635,"./layout_defaults":636,"./ternary":637}],635:[function(y,ee,te){var g=y("../../components/color/attributes"),m=y("../domain").attributes,b=y("../cartesian/layout_attributes"),v=y("../../plot_api/edit_types").overrideAll,e=y("../../lib/extend").extendFlat,n={title:{text:b.title.text,font:b.title.font},color:b.color,tickmode:b.tickmode,nticks:e({},b.nticks,{dflt:6,min:1}),tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,hoverformat:b.hoverformat,showline:e({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:e({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,layer:b.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:b._deprecated.title,titlefont:b._deprecated.titlefont}},t=ee.exports=v({domain:m({name:"ternary"}),bgcolor:{valType:"color",dflt:g.background},sum:{valType:"number",dflt:1,min:0},aaxis:n,baxis:n,caxis:n},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plot_api/edit_types":536,"../cartesian/layout_attributes":569,"../domain":584}],636:[function(y,ee,te){var g=y("../../components/color"),m=y("../../plot_api/plot_template"),b=y("../../lib"),v=y("../subplot_defaults"),e=y("../cartesian/tick_label_defaults"),n=y("../cartesian/prefix_suffix_defaults"),t=y("../cartesian/tick_mark_defaults"),o=y("../cartesian/tick_value_defaults"),r=y("../cartesian/line_grid_defaults"),d=y("./layout_attributes"),c=["aaxis","baxis","caxis"];function i(f,s,h,p){var a,x,l,w=h("bgcolor"),_=h("sum");p.bgColor=g.combine(w,p.paper_bgcolor);for(var T=0;T<c.length;T++)x=f[a=c[T]]||{},(l=m.newContainer(s,a))._name=a,u(x,l,p,s);var k=s.aaxis,L=s.baxis,A=s.caxis;k.min+L.min+A.min>=_&&(k.min=0,L.min=0,A.min=0,f.aaxis&&delete f.aaxis.min,f.baxis&&delete f.baxis.min,f.caxis&&delete f.caxis.min)}function u(f,s,h,p){var a=d[s._name];function x(L,A){return b.coerce(f,s,a,L,A)}x("uirevision",p.uirevision),s.type="linear";var l=x("color"),w=l!==a.color.dflt?l:h.font.color,_=s._name.charAt(0).toUpperCase(),T="Component "+_,k=x("title.text",T);s._hovertitle=k===T?k:_,b.coerceFont(x,"title.font",{family:h.font.family,size:b.bigFont(h.font.size),color:w}),x("min"),o(f,s,x,"linear"),n(f,s,x,"linear"),e(f,s,x,"linear"),t(f,s,x,{outerTicks:!0}),x("showticklabels")&&(b.coerceFont(x,"tickfont",{family:h.font.family,size:h.font.size,color:w}),x("tickangle"),x("tickformat")),r(f,s,x,{dfltColor:l,bgColor:h.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),x("hoverformat"),x("layer")}ee.exports=function(f,s,h){v(f,s,h,{type:"ternary",attributes:d,handleDefaults:i,font:s.font,paper_bgcolor:s.paper_bgcolor})}},{"../../components/color":366,"../../lib":503,"../../plot_api/plot_template":543,"../cartesian/line_grid_defaults":571,"../cartesian/prefix_suffix_defaults":573,"../cartesian/tick_label_defaults":578,"../cartesian/tick_mark_defaults":579,"../cartesian/tick_value_defaults":580,"../subplot_defaults":632,"./layout_attributes":635}],637:[function(y,ee,te){var g=y("@plotly/d3"),m=y("tinycolor2"),b=y("../../registry"),v=y("../../lib"),e=v.strTranslate,n=v._,t=y("../../components/color"),o=y("../../components/drawing"),r=y("../cartesian/set_convert"),d=y("../../lib/extend").extendFlat,c=y("../plots"),i=y("../cartesian/axes"),u=y("../../components/dragelement"),f=y("../../components/fx"),s=y("../../components/dragelement/helpers"),h=s.freeMode,p=s.rectMode,a=y("../../components/titles"),x=y("../cartesian/select").prepSelect,l=y("../cartesian/select").selectOnClick,w=y("../cartesian/select").clearSelect,_=y("../cartesian/select").clearSelectionsCache,T=y("../cartesian/constants");
1220function k(H,V){this.id=H.id,this.graphDiv=H.graphDiv,this.init(V),this.makeFramework(V),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}ee.exports=k;var L=k.prototype;L.init=function(H){this.container=H._ternarylayer,this.defs=H._defs,this.layoutId=H._uid,this.traceHash={},this.layers={}},L.plot=function(H,V){var Z=V[this.id],K=V._size;this._hasClipOnAxisFalse=!1;for(var q=0;q<H.length;q++)if(H[q][0].trace.cliponaxis===!1){this._hasClipOnAxisFalse=!0;break}this.updateLayers(Z),this.adjustLayout(Z,K),c.generalUpdatePerTraceModule(this.graphDiv,this,H,Z),this.layers.plotbg.select("path").call(t.fill,Z.bgcolor)},L.makeFramework=function(H){var V=this.graphDiv,Z=H[this.id],K=this.clipId="clip"+this.layoutId+this.id,q=this.clipIdRelative="clip-relative"+this.layoutId+this.id;this.clipDef=v.ensureSingleById(H._clips,"clipPath",K,function(W){W.append("path").attr("d","M0,0Z")}),this.clipDefRelative=v.ensureSingleById(H._clips,"clipPath",q,function(W){W.append("path").attr("d","M0,0Z")}),this.plotContainer=v.ensureSingle(this.container,"g",this.id),this.updateLayers(Z),o.setClipUrl(this.layers.backplot,K,V),o.setClipUrl(this.layers.grids,K,V)},L.updateLayers=function(H){var V=this.layers,Z=["draglayer","plotbg","backplot","grids"];H.aaxis.layer==="below traces"&&Z.push("aaxis","aline"),H.baxis.layer==="below traces"&&Z.push("baxis","bline"),H.caxis.layer==="below traces"&&Z.push("caxis","cline"),Z.push("frontplot"),H.aaxis.layer==="above traces"&&Z.push("aaxis","aline"),H.baxis.layer==="above traces"&&Z.push("baxis","bline"),H.caxis.layer==="above traces"&&Z.push("caxis","cline");var K=this.plotContainer.selectAll("g.toplevel").data(Z,String),q=["agrid","bgrid","cgrid"];K.enter().append("g").attr("class",function(W){return"toplevel "+W}).each(function(W){var $=g.select(this);V[W]=$,W==="frontplot"?$.append("g").classed("scatterlayer",!0):W==="backplot"?$.append("g").classed("maplayer",!0):W==="plotbg"?$.append("path").attr("d","M0,0Z"):W==="aline"||W==="bline"||W==="cline"?$.append("path"):W==="grids"&&q.forEach(function(R){V[R]=$.append("g").classed("grid "+R,!0)})}),K.order()};var A=Math.sqrt(4/3);L.adjustLayout=function(H,V){var Z,K,q,W,$,R,N=this,U=H.domain,Q=(U.x[0]+U.x[1])/2,j=(U.y[0]+U.y[1])/2,X=U.x[1]-U.x[0],J=U.y[1]-U.y[0],re=X*V.w,ne=J*V.h,se=H.sum,oe=H.aaxis.min,pe=H.baxis.min,ce=H.caxis.min;re>A*ne?q=(W=ne)*A:W=(q=re)/A,$=X*q/re,R=J*W/ne,Z=V.l+V.w*Q-q/2,K=V.t+V.h*(1-j)-W/2,N.x0=Z,N.y0=K,N.w=q,N.h=W,N.sum=se,N.xaxis={type:"linear",range:[oe+2*ce-se,se-oe-2*pe],domain:[Q-$/2,Q+$/2],_id:"x"},r(N.xaxis,N.graphDiv._fullLayout),N.xaxis.setScale(),N.xaxis.isPtWithinRange=function(Pe){return Pe.a>=N.aaxis.range[0]&&Pe.a<=N.aaxis.range[1]&&Pe.b>=N.baxis.range[1]&&Pe.b<=N.baxis.range[0]&&Pe.c>=N.caxis.range[1]&&Pe.c<=N.caxis.range[0]},N.yaxis={type:"linear",range:[oe,se-pe-ce],domain:[j-R/2,j+R/2],_id:"y"},r(N.yaxis,N.graphDiv._fullLayout),N.yaxis.setScale(),N.yaxis.isPtWithinRange=function(){return!0};var de=N.yaxis.domain[0],xe=N.aaxis=d({},H.aaxis,{range:[oe,se-pe-ce],side:"left",tickangle:(+H.aaxis.tickangle||0)-30,domain:[de,de+R*A],anchor:"free",position:0,_id:"y",_length:q});r(xe,N.graphDiv._fullLayout),xe.setScale();var we=N.baxis=d({},H.baxis,{range:[se-oe-ce,pe],side:"bottom",domain:N.xaxis.domain,anchor:"free",position:0,_id:"x",_length:q});r(we,N.graphDiv._fullLayout),we.setScale();var be=N.caxis=d({},H.caxis,{range:[se-oe-pe,ce],side:"right",tickangle:(+H.caxis.tickangle||0)+30,domain:[de,de+R*A],anchor:"free",position:0,_id:"y",_length:q});r(be,N.graphDiv._fullLayout),be.setScale();var Ee="M"+Z+","+(K+W)+"h"+q+"l-"+q/2+",-"+W+"Z";N.clipDef.select("path").attr("d",Ee),N.layers.plotbg.select("path").attr("d",Ee);var fe="M0,"+W+"h"+q+"l-"+q/2+",-"+W+"Z";N.clipDefRelative.select("path").attr("d",fe);var me=e(Z,K);N.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",me),N.clipDefRelative.select("path").attr("transform",null);var Te=e(Z-we._offset,K+W);N.layers.baxis.attr("transform",Te),N.layers.bgrid.attr("transform",Te);var _e=e(Z+q/2,K)+"rotate(30)"+e(0,-xe._offset);N.layers.aaxis.attr("transform",_e),N.layers.agrid.attr("transform",_e);var Ae=e(Z+q/2,K)+"rotate(-30)"+e(0,-be._offset);N.layers.caxis.attr("transform",Ae),N.layers.cgrid.attr("transform",Ae),N.drawAxes(!0),N.layers.aline.select("path").attr("d",xe.showline?"M"+Z+","+(K+W)+"l"+q/2+",-"+W:"M0,0").call(t.stroke,xe.linecolor||"#000").style("stroke-width",(xe.line
1220width||0)+"px"),N.layers.bline.select("path").attr("d",we.showline?"M"+Z+","+(K+W)+"h"+q:"M0,0").call(t.stroke,we.linecolor||"#000").style("stroke-width",(we.linewidth||0)+"px"),N.layers.cline.select("path").attr("d",be.showline?"M"+(Z+q/2)+","+K+"l"+q/2+","+W:"M0,0").call(t.stroke,be.linecolor||"#000").style("stroke-width",(be.linewidth||0)+"px"),N.graphDiv._context.staticPlot||N.initInteractions(),o.setClipUrl(N.layers.frontplot,N._hasClipOnAxisFalse?null:N.clipId,N.graphDiv)},L.drawAxes=function(H){var V=this.graphDiv,Z=this.id.substr(7)+"title",K=this.layers,q=this.aaxis,W=this.baxis,$=this.caxis;if(this.drawAx(q),this.drawAx(W),this.drawAx($),H){var R=Math.max(q.showticklabels?q.tickfont.size/2:0,($.showticklabels?.75*$.tickfont.size:0)+($.ticks==="outside"?.87*$.ticklen:0)),N=(W.showticklabels?W.tickfont.size:0)+(W.ticks==="outside"?W.ticklen:0)+3;K["a-title"]=a.draw(V,"a"+Z,{propContainer:q,propName:this.id+".aaxis.title",placeholder:n(V,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-q.title.font.size/3-R,"text-anchor":"middle"}}),K["b-title"]=a.draw(V,"b"+Z,{propContainer:W,propName:this.id+".baxis.title",placeholder:n(V,"Click to enter Component B title"),attributes:{x:this.x0-N,y:this.y0+this.h+.83*W.title.font.size+N,"text-anchor":"middle"}}),K["c-title"]=a.draw(V,"c"+Z,{propContainer:$,propName:this.id+".caxis.title",placeholder:n(V,"Click to enter Component C title"),attributes:{x:this.x0+this.w+N,y:this.y0+this.h+.83*$.title.font.size+N,"text-anchor":"middle"}})}},L.drawAx=function(H){var V,Z=this.graphDiv,K=H._name,q=K.charAt(0),W=H._id,$=this.layers[K],R=q+"tickLayout",N=(V=H).ticks+String(V.ticklen)+String(V.showticklabels);this[R]!==N&&($.selectAll("."+W+"tick").remove(),this[R]=N),H.setScale();var U=i.calcTicks(H),Q=i.clipEnds(H,U),j=i.makeTransTickFn(H),X=i.getTickSigns(H)[2],J=v.deg2rad(30),re=X*(H.linewidth||1)/2,ne=X*H.ticklen,se=this.w,oe=this.h,pe=q==="b"?"M0,"+re+"l"+Math.sin(J)*ne+","+Math.cos(J)*ne:"M"+re+",0l"+Math.cos(J)*ne+","+-Math.sin(J)*ne,ce={a:"M0,0l"+oe+",-"+se/2,b:"M0,0l-"+se/2+",-"+oe,c:"M0,0l-"+oe+","+se/2}[q];i.drawTicks(Z,H,{vals:H.ticks==="inside"?Q:U,layer:$,path:pe,transFn:j,crisp:!1}),i.drawGrid(Z,H,{vals:Q,layer:this.layers[q+"grid"],path:ce,transFn:j,crisp:!1}),i.drawLabels(Z,H,{vals:U,layer:$,transFn:j,labelFns:i.makeLabelFns(H,0,30)})};var I=T.MINZOOM/2+.87,P="m-0.87,.5h"+I+"v3h-"+(I+5.2)+"l"+(I/2+2.6)+",-"+(.87*I+4.5)+"l2.6,1.5l-"+I/2+","+.87*I+"Z",S="m0.87,.5h-"+I+"v3h"+(I+5.2)+"l-"+(I/2+2.6)+",-"+(.87*I+4.5)+"l-2.6,1.5l"+I/2+","+.87*I+"Z",E="m0,1l"+I/2+","+.87*I+"l2.6,-1.5l-"+(I/2+2.6)+",-"+(.87*I+4.5)+"l-"+(I/2+2.6)+","+(.87*I+4.5)+"l2.6,1.5l"+I/2+",-"+.87*I+"Z",D=!0;function F(H){g.select(H).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}L.clearSelect=function(){_(this.dragOptions),w(this.dragOptions.gd)},L.initInteractions=function(){var H,V,Z,K,q,W,$,R,N,U,Q,j,X=this,J=X.layers.plotbg.select("path").node(),re=X.graphDiv,ne=re._fullLayout._zoomlayer;function se(fe){var me={};return me[X.id+".aaxis.min"]=fe.a,me[X.id+".baxis.min"]=fe.b,me[X.id+".caxis.min"]=fe.c,me}function oe(fe,me){var Te=re._fullLayout.clickmode;F(re),fe===2&&(re.emit("plotly_doubleclick",null),b.call("_guiRelayout",re,se({a:0,b:0,c:0}))),Te.indexOf("select")>-1&&fe===1&&l(me,re,[X.xaxis],[X.yaxis],X.id,X.dragOptions),Te.indexOf("event")>-1&&f.click(re,me,X.id)}function pe(fe,me){return 1-me/X.h}function ce(fe,me){return 1-(fe+(X.h-me)/Math.sqrt(3))/X.w}function de(fe,me){return(fe-(X.h-me)/Math.sqrt(3))/X.w}function xe(fe,me){var Te=Z+fe*H,_e=K+me*V,Ae=Math.max(0,Math.min(1,pe(0,K),pe(0,_e))),Pe=Math.max(0,Math.min(1,ce(Z,K),ce(Te,_e))),De=Math.max(0,Math.min(1,de(Z,K),de(Te,_e))),Ve=(Ae/2+De)*X.w,Qe=(1-Ae/2-Pe)*X.w,Oe=(Ve+Qe)/2,Ue=Qe-Ve,Ge=(1-Ae)*X.h,Ye=Ge-Ue/A;Ue<T.MINZOOM?($=q,Q.attr("d",N),j.attr("d","M0,0Z")):($={a:q.a+Ae*W,b:q.b+Pe*W,c:q.c+De*W},Q.attr("d",N+"M"+Ve+","+Ge+"H"+Qe+"L"+Oe+","+Ye+"L"+Ve+","+Ge+"Z"),j.attr("d","M"+Z+","+K+"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2ZM"+Ve+","+Ge+P+"M"+Qe+","+Ge+S+"M"+Oe+","+Ye+E)),U||(Q.transition().style("fill",R>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),j.transition().style("opacity",1).duration(200),U=!0),re.emit("plotly_relayouting",se($))}function we(){F(re),$!==q&&(b.call("_guiRelayout",re,se($)),D&&re.data&&re._context.showTips&&(v.notifier(n(re,"Double-click to zoom back out"),"long"),D=!1))}function be(fe,me){var Te=fe/X.xaxis._m,_e=me/X.yaxis._m,Ae=[($={a:q.a-_e,b:q.b+(Te+_e)/2,c:q.c-(Te-_e)/2}).a,$.b,$.c].sort(v.sorterAsc),Pe=Ae.indexOf($.a),De=Ae.indexOf($.b),Ve=Ae.indexOf($.c);Ae[0]<0&&(Ae[1]+Ae[0]/2<0?(Ae[2]+=Ae[0]+Ae[1],Ae[0]=Ae[1]=0):(Ae[2]+=Ae[0]/2,Ae[1]+=Ae[0]/2,Ae[0]=0),$={a:Ae[Pe],b:Ae[De],c:Ae[Ve]},me=(q.a-$.a)*X.yaxis._m,fe=(q.c-$.c-q.b+$.b)*X.xaxis._m);var Qe=e(X.x0+fe,X.y0+me);X.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Qe);var Oe=e(-fe,-me);X.clipDefRelative.select("path").attr("transform",Oe),X.aaxis.range=[$.a,X.sum-$.b-$.c],X.baxis.range=[X.sum-$.a-$.c,$.b],X.caxis.range=[X.sum-$.a-$.b,$.c],X.drawAxes(!1),X._hasClipOnAxisFalse&&X.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,X),re.emit("plotly_relayouting",se($))}function Ee(){b.call("_guiRelayout",re,se($))}this.dragOptions={element:J,gd:re,plotinfo:{id:X.id,domain:re._fullLayout[X.id].domain,xaxis:X.xaxis,yaxis:X.yaxis},subplot:X.id,prepFn:function(fe,me,Te){X.dragOptions.xaxes=[X.xaxis],X.dragOptions.yaxes=[X.yaxis],H=re._fullLayout._invScaleX,V=re._fullLayout._invScaleY;var _e=X.dragOptions.dragmode=re._fullLayout.dragmode;h(_e)?X.dragOptions.minDrag=1:X.dragOptions.minDrag=void 0,_e==="zoom"?(X.dragOptions.moveFn=xe,X.dragOptions.clickFn=oe,X.dragOptions.doneFn=we,function(Ae,Pe,De){var Ve=J.getBoundingClientRect();Z=Pe-Ve.left,K=De-Ve.top,re._fullLayout._calcInverseTransform(re);var Qe=re._fullLayout._invTransform,Oe=v.apply3DTransform(Qe)(Z,K);Z=Oe[0],K=Oe[1],q={a:X.aaxis.range[0],b:X.baxis.range[1],c:X.caxis.range[1]},$=q,W=X.aaxis.range[1]-q.a,R=m(X.graphDiv._fullLayout[X.id].bgcolor).getLuminance(),N="M0,"+X.h+"L"+X.w/2+", 0L"+X.w+","+X.h+"Z",U=!1,Q=ne.append("path").attr("class","zoombox").attr("transform",e(X.x0,X.y0)).style({fill:R>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",N),j=ne.append("path").attr("class","zoombox-corners").attr("transform",e(X.x0,X.y0)).style({fill:t.background,stroke:t.defaultLine,"stroke-width":1,opacity:0}
1220).attr("d","M0,0Z"),X.clearSelect(re)}(0,me,Te)):_e==="pan"?(X.dragOptions.moveFn=be,X.dragOptions.clickFn=oe,X.dragOptions.doneFn=Ee,q={a:X.aaxis.range[0],b:X.baxis.range[1],c:X.caxis.range[1]},$=q,X.clearSelect(re)):(p(_e)||h(_e))&&x(fe,me,Te,X.dragOptions,_e)}},J.onmousemove=function(fe){f.hover(re,fe,X.id),re._fullLayout._lasthover=J,re._fullLayout._hoversubplot=X.id},J.onmouseout=function(fe){re._dragging||u.unhover(re,fe)},u.init(this.dragOptions)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../components/titles":464,"../../lib":503,"../../lib/extend":493,"../../registry":638,"../cartesian/axes":554,"../cartesian/constants":561,"../cartesian/select":575,"../cartesian/set_convert":576,"../plots":619,"@plotly/d3":58,tinycolor2:312}],638:[function(y,ee,te){var g=y("./lib/loggers"),m=y("./lib/noop"),b=y("./lib/push_unique"),v=y("./lib/is_plain_object"),e=y("./lib/dom").addStyleRule,n=y("./lib/extend"),t=y("./plots/attributes"),o=y("./plots/layout_attributes"),r=n.extendFlat,d=n.extendDeepAll;function c(l){var w=l.name,_=l.categories,T=l.meta;if(te.modules[w])g.log("Type "+w+" already registered");else{te.subplotsRegistry[l.basePlotModule.name]||function(D){var F=D.name;if(te.subplotsRegistry[F])return void g.log("Plot type "+F+" already registered.");for(var H in s(D),te.subplotsRegistry[F]=D,te.componentsRegistry)a(H,D.name)}(l.basePlotModule);for(var k={},L=0;L<_.length;L++)k[_[L]]=!0,te.allCategories[_[L]]=!0;for(var A in te.modules[w]={_module:l,categories:k},T&&Object.keys(T).length&&(te.modules[w].meta=T),te.allTypes.push(w),te.componentsRegistry)h(A,w);l.layoutAttributes&&r(te.traceLayoutAttributes,l.layoutAttributes);var I=l.basePlotModule,P=I.name;if(P==="mapbox"){var S=I.constants.styleRules;for(var E in S)e(".js-plotly-plot .plotly .mapboxgl-"+E,S[E])}P!=="geo"&&P!=="mapbox"||typeof window===void 0||window.PlotlyGeoAssets!==void 0||(window.PlotlyGeoAssets={topojson:{}})}}function i(l){if(typeof l.name!="string")throw new Error("Component module *name* must be a string.");var w=l.name;for(var _ in te.componentsRegistry[w]=l,l.layoutAttributes&&(l.layoutAttributes._isLinkedToArray&&b(te.layoutArrayContainers,w),s(l)),te.modules)h(w,_);for(var T in te.subplotsRegistry)a(w,T);for(var k in te.transformsRegistry)p(w,k);l.schema&&l.schema.layout&&d(o,l.schema.layout)}function u(l){if(typeof l.name!="string")throw new Error("Transform module *name* must be a string.");var w="Transform module "+l.name,_=typeof l.transform=="function",T=typeof l.calcTransform=="function";if(!_&&!T)throw new Error(w+" is missing a *transform* or *calcTransform* method.");for(var k in _&&T&&g.log([w+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),v(l.attributes)||g.log(w+" registered without an *attributes* object."),typeof l.supplyDefaults!="function"&&g.log(w+" registered without a *supplyDefaults* method."),te.transformsRegistry[l.name]=l,te.componentsRegistry)p(k,l.name)}function f(l){var w=l.name,_=w.split("-")[0],T=l.dictionary,k=l.format,L=T&&Object.keys(T).length,A=k&&Object.keys(k).length,I=te.localeRegistry,P=I[w];if(P||(I[w]=P={}),_!==w){var S=I[_];S||(I[_]=S={}),L&&S.dictionary===P.dictionary&&(S.dictionary=T),A&&S.format===P.format&&(S.format=k)}L&&(P.dictionary=T),A&&(P.format=k)}function s(l){if(l.layoutAttributes){var w=l.layoutAttributes._arrayAttrRegexps;if(w)for(var _=0;_<w.length;_++)b(te.layoutArrayRegexes,w[_])}}function h(l,w){var _=te.componentsRegistry[l].schema;if(_&&_.traces){var T=_.traces[w];T&&d(te.modules[w]._module.attributes,T)}}function p(l,w){var _=te.componentsRegistry[l].schema;if(_&&_.transforms){var T=_.transforms[w];T&&d(te.transformsRegistry[w].attributes,T)}}function a(l,w){var _=te.componentsRegistry[l].schema;if(_&&_.subplots){var T=te.subplotsRegistry[w],k=T.layoutAttributes,L=T.attr==="subplot"?T.name:T.attr;Array.isArray(L)&&(L=L[0]);var A=_.subplots[L];k&&A&&d(k,A)}}function x(l){return typeof l=="object"&&(l=l.type),l}te.modules={},te.allCategories={},te.allTypes=[],te.subplotsRegistry={},te.transformsRegistry={},te.componentsRegistry={},te.layoutArrayContainers=[],te.layoutArrayRegexes=[],te.traceLayoutAttributes={},te.localeRegistry={},te.apiMethodRegistry={},te.collectableSubplotTypes=null,te.register=function(l){if(te.collectableSubplotTypes=null,!l)throw new Error("No argument passed to Plotly.register.");l&&!Array.isArray(l)&&(l=[l]);for(var w=0;w<l.length;w++){var _=l[w];if(!_)throw new Error("Invalid module was attempted to be registered!");switch(_.moduleType){case"trace":c(_);break;case"transform":u(_);break;case"component":i(_);break;case"locale":f(_);break;case"apiMethod":var T=_.name;te.apiMethodRegistry[T]=_.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},te.getModule=function(l){var w=te.modules[x(l)];return!!w&&w._module},te.traceIs=function(l,w){if((l=x(l))==="various")return!1;var _=te.modules[l];return _||(l&&g.log("Unrecognized trace type "+l+"."),_=te.modules[t.type.dflt]),!!_.categories[w]},te.getTransformIndices=function(l,w){for(var _=[],T=l.transforms||[],k=0;k<T.length;k++)T[k].type===w&&_.push(k);return _},te.hasTransform=function(l,w){for(var _=l.transforms||[],T=0;T<_.length;T++)if(_[T].type===w)return!0;return!1},te.getComponentMethod=function(l,w){var _=te.componentsRegistry[l];return _&&_[w]||m},te.call=function(){var l=arguments[0],w=[].slice.call(arguments,1
1220);return te.apiMethodRegistry[l].apply(null,w)}},{"./lib/dom":491,"./lib/extend":493,"./lib/is_plain_object":504,"./lib/loggers":507,"./lib/noop":512,"./lib/push_unique":518,"./plots/attributes":550,"./plots/layout_attributes":610}],639:[function(y,ee,te){var g=y("../registry"),m=y("../lib"),b=m.extendFlat,v=m.extendDeep;function e(n){var t;switch(n){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}ee.exports=function(n,t){var o,r,d=n.data,c=n.layout,i=v([],d),u=v({},c,e(t.tileClass)),f=n._context||{};if(t.width&&(u.width=t.width),t.height&&(u.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){u.annotations=[];var s=Object.keys(u);for(o=0;o<s.length;o++)r=s[o],["xaxis","yaxis","zaxis"].indexOf(r.slice(0,5))>-1&&(u[s[o]].title={text:""});for(o=0;o<i.length;o++){var h=i[o];h.showscale=!1,h.marker&&(h.marker.showscale=!1),g.traceIs(h,"pie-like")&&(h.textposition="none")}}if(Array.isArray(t.annotations))for(o=0;o<t.annotations.length;o++)u.annotations.push(t.annotations[o]);var p=Object.keys(u).filter(function(_){return _.match(/^scene\d*$/)});if(p.length){var a={};for(t.tileClass==="thumbnail"&&(a={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),o=0;o<p.length;o++){var x=u[p[o]];x.xaxis||(x.xaxis={}),x.yaxis||(x.yaxis={}),x.zaxis||(x.zaxis={}),b(x.xaxis,a),b(x.yaxis,a),b(x.zaxis,a),x._scene=null}}var l=document.createElement("div");t.tileClass&&(l.className=t.tileClass);var w={gd:l,td:l,layout:u,data:i,config:{staticPlot:t.staticPlot===void 0||t.staticPlot,plotGlPixelRatio:t.plotGlPixelRatio===void 0?2:t.plotGlPixelRatio,displaylogo:t.displaylogo||!1,showLink:t.showLink||!1,showTips:t.showTips||!1,mapboxAccessToken:f.mapboxAccessToken}};return t.setBackground!=="transparent"&&(w.config.setBackground=t.setBackground||"opaque"),w.gd.defaultLayout=e(t.tileClass),w}},{"../lib":503,"../registry":638}],640:[function(y,ee,te){var g=y("../lib"),m=y("../plot_api/to_image"),b=y("./filesaver"),v=y("./helpers");ee.exports=function(e,n){var t;return g.isPlainObject(e)||(t=g.getGraphDiv(e)),(n=n||{}).format=n.format||"png",n.width=n.width||null,n.height=n.height||null,n.imageDataOnly=!0,new Promise(function(o,r){t&&t._snapshotInProgress&&r(new Error("Snapshotting already in progress.")),g.isIE()&&n.format!=="svg"&&r(new Error(v.MSG_IE_BAD_FORMAT)),t&&(t._snapshotInProgress=!0);var d=m(e,n),c=n.filename||e.fn||"newplot";c+="."+n.format.replace("-","."),d.then(function(i){return t&&(t._snapshotInProgress=!1),b(i,c,n.format)}).then(function(i){o(i)}).catch(function(i){t&&(t._snapshotInProgress=!1),r(i)})})}},{"../lib":503,"../plot_api/to_image":546,"./filesaver":641,"./helpers":642}],641:[function(y,ee,te){var g=y("../lib"),m=y("./helpers");ee.exports=function(b,v,e){var n=document.createElement("a"),t="download"in n;return new Promise(function(o,r){var d,c;if(g.isIE())return d=m.createBlob(b,"svg"),window.navigator.msSaveBlob(d,v),d=null,o(v);if(t)return d=m.createBlob(b,e),c=m.createObjectURL(d),n.href=c,n.download=v,document.body.appendChild(n),n.click(),document.body.removeChild(n),m.revokeObjectURL(c),d=null,o(v);if(g.isSafari()){var i=e==="svg"?",":";base64,";return m.octetStream(i+encodeURIComponent(b)),o(v)}r(new Error("download error"))})}},{"../lib":503,"./helpers":642}],642:[function(y,ee,te){var g=y("../registry");te.getDelay=function(b){return b._has&&(b._has("gl3d")||b._has("gl2d")||b._has("mapbox"))?500:0},te.getRedrawFunc=function(b){return function(){g.getComponentMethod("colorbar","draw")(b)}},te.encodeSVG=function(b){return"data:image/svg+xml,"+encodeURIComponent(b)},te.encodeJSON=function(b){return"data:application/json,"+encodeURIComponent(b)};var m=window.URL||window.webkitURL;te.createObjectURL=function(b){return m.createObjectURL(b)},te.revokeObjectURL=function(b){return m.revokeObjectURL(b)},te.createBlob=function(b,v){if(v==="svg")return new window.Blob([b],{type:"image/svg+xml;charset=utf-8"});if(v==="full-json")return new window.Blob([b],{type:"application/json;charset=utf-8"});var e=function(n){for(var t=n.length,o=new ArrayBuffer(t),r=new Uint8Array(o),d=0;d<t;d++)r[d]=n.charCodeAt(d);return o}(window.atob(b));return new window.Blob([e],{type:"image/"+v})},te.octetStream=function(b){document.location.href="data:application/octet-stream"+b},te.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,te.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},{"../registry":638}],643:[function(y,ee,te){var g=y("./helpers"),m={getDelay:g.getDelay,getRedrawFunc:g.getRedrawFunc,clone:y("./cloneplot"),toSVG:y("./tosvg"),svgToImg:y("./svgtoimg"),toImage:y("./toimage"),downloadImage:y("./download")};ee.exports=m},{"./cloneplot":639,"./download":640,"./helpers":642,"./svgtoimg":644,"./toimage":645,"./tosvg":646}],644:[function(y,ee,te){var g=y("../lib"),m=y("events").EventEmitter,b=y("./helpers");ee.exports=function(v){var e=v.emitter||new m,n=new Promise(function(t,o){var r=window.Image,d=v.svg,c=v.format||"png";if(g.isIE()&&c!=="svg"){var i=new Error(b.MSG_IE_BAD_FORMAT);return o(i),v.promise?n:e.emit("error",i)}var u,f,s=v.canvas,h=v.scale||1,p=v.width||300,a=v.height||150,x=h*p,l=h*a,w=s.getContext("2d"),_=new r;c==="svg"||g.isSafari()?f=b.encodeSVG(d):(u=b.createBlob(d,"svg"),f=b.createObjectURL(u)),s.width=x,s.height=l,_.onload=function(){var T;switch(u=null,b.revokeObjectURL(f),c!=="svg"&&w.drawImage(_,0,0,x,l),c){case"jpeg":T=s.toDataURL("image/jpeg");break;case"png":T=s.toDataURL("image/png");break;case"webp":T=s.toDataURL("image/webp");break;case"svg":T=f;break;default:var k="Image format is not jpeg, png, svg or webp.";if(o(new Error(k)),!v.promise)return e.emit("error",k)}t(T),v.promise||e.emit("success",T)},_.onerror=function(T){if(u=null,b.revokeObjectURL(f),o(T),!v.promise)return e.emit("error",T)},_.src=f});return v.promise?n:e}},{"../lib":503,"./helpers":642,events:84}],645:[function(y,ee,te){var g=y("events").EventEmitter,m=y("../registry"),b=y("../lib"),v=y("./helpers"),e=y("./cloneplot"),n=y("./tosvg"),t=y("./svgtoimg");ee.exports=function(o,r){var d=new g,c=e(o,{format:"png"}),i=c.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);var u=v.getRedrawFunc(i);
1220return m.call("_doPlot",i,c.data,c.layout,c.config).then(u).then(function(){var f=v.getDelay(i._fullLayout);setTimeout(function(){var s=n(i),h=document.createElement("canvas");h.id=b.randstr(),(d=t({format:r.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:h,emitter:d,svg:s})).clean=function(){i&&document.body.removeChild(i)}},f)}).catch(function(f){d.emit("error",f)}),d}},{"../lib":503,"../registry":638,"./cloneplot":639,"./helpers":642,"./svgtoimg":644,"./tosvg":646,events:84}],646:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../lib"),b=y("../components/drawing"),v=y("../components/color"),e=y("../constants/xmlns_namespaces"),n=/"/g,t=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");ee.exports=function(o,r,d){var c,i=o._fullLayout,u=i._paper,f=i._toppaper,s=i.width,h=i.height;u.insert("rect",":first-child").call(b.setRect,0,0,s,h).call(v.fill,i.paper_bgcolor);var p=i._basePlotModules||[];for(c=0;c<p.length;c++){var a=p[c];a.toSVG&&a.toSVG(o)}if(f){var x=f.node().childNodes,l=Array.prototype.slice.call(x);for(c=0;c<l.length;c++){var w=l[c];w.childNodes.length&&u.node().appendChild(w)}}i._draggers&&i._draggers.remove(),u.node().style.background="",u.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var T=g.select(this);if(this.style.visibility!=="hidden"&&this.style.display!=="none"){T.style({visibility:null,display:null});var k=this.style.fontFamily;k&&k.indexOf('"')!==-1&&T.style("font-family",k.replace(n,"TOBESTRIPPED"))}else T.remove()}),u.selectAll(".gradient_filled,.pattern_filled").each(function(){var T=g.select(this),k=this.style.fill;k&&k.indexOf("url(")!==-1&&T.style("fill",k.replace(n,"TOBESTRIPPED"));var L=this.style.stroke;L&&L.indexOf("url(")!==-1&&T.style("stroke",L.replace(n,"TOBESTRIPPED"))}),r!=="pdf"&&r!=="eps"||u.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),u.node().setAttributeNS(e.xmlns,"xmlns",e.svg),u.node().setAttributeNS(e.xmlns,"xmlns:xlink",e.xlink),r==="svg"&&d&&(u.attr("width",d*s),u.attr("height",d*h),u.attr("viewBox","0 0 "+s+" "+h));var _=new window.XMLSerializer().serializeToString(u.node());return _=function(T){var k=g.select("body").append("div").style({display:"none"}).html(""),L=T.replace(/(&[^;]*;)/gi,function(A){return A==="&lt;"?"&#60;":A==="&rt;"?"&#62;":A.indexOf("<")!==-1||A.indexOf(">")!==-1?"":k.html(A).text()});return k.remove(),L}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(t,"'"),m.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},{"../components/color":366,"../components/drawing":388,"../constants/xmlns_namespaces":480,"../lib":503,"@plotly/d3":58}],647:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b){for(var v=0;v<m.length;v++)m[v].i=v;g.mergeArray(b.text,m,"tx"),g.mergeArray(b.hovertext,m,"htx");var e=b.marker;if(e){g.mergeArray(e.opacity,m,"mo",!0),g.mergeArray(e.color,m,"mc");var n=e.line;n&&(g.mergeArray(n.color,m,"mlc"),g.mergeArrayCastPositive(n.width,m,"mlw"))}}},{"../../lib":503}],648:[function(y,ee,te){var g=y("../scatter/attributes"),m=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../../plots/template_attributes").texttemplateAttrs,e=y("../../components/colorscale/attributes"),n=y("../../plots/font_attributes"),t=y("./constants"),o=y("../../components/drawing/attributes").pattern,r=y("../../lib/extend").extendFlat,d=n({editType:"calc",arrayOk:!0,colorEditType:"style"}),c=r({},g.marker.line.width,{dflt:0}),i=r({width:c,editType:"calc"},e("marker.line")),u=r({line:i,editType:"calc"},e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:o});ee.exports={x:g.x,x0:g.x0,dx:g.dx,y:g.y,y0:g.y0,dy:g.dy,xperiod:g.xperiod,yperiod:g.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,xhoverformat:m("x"),yhoverformat:m("y"),text:g.text,texttemplate:v({editType:"plot"},{keys:t.eventDataKeys}),hovertext:g.hovertext,hovertemplate:b({},{keys:t.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","
1220none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:r({},d,{}),insidetextfont:r({},d,{}),outsidetextfont:r({},d,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:r({},g.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:u,offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},selected:{marker:{opacity:g.selected.marker.opacity,color:g.selected.marker.color,editType:"style"},textfont:g.selected.textfont,editType:"style"},unselected:{marker:{opacity:g.unselected.marker.opacity,color:g.unselected.marker.color,editType:"style"},textfont:g.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"../scatter/attributes":926,"./constants":650}],649:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../plots/cartesian/align_period"),b=y("../../components/colorscale/helpers").hasColorscale,v=y("../../components/colorscale/calc"),e=y("./arrays_to_calcdata"),n=y("../scatter/calc_selection");ee.exports=function(t,o){var r,d,c,i,u,f,s=g.getFromId(t,o.xaxis||"x"),h=g.getFromId(t,o.yaxis||"y"),p={msUTC:!(!o.base&&o.base!==0)};o.orientation==="h"?(r=s.makeCalcdata(o,"x",p),c=h.makeCalcdata(o,"y"),i=m(o,h,"y",c),u=!!o.yperiodalignment,f="y"):(r=h.makeCalcdata(o,"y",p),c=s.makeCalcdata(o,"x"),i=m(o,s,"x",c),u=!!o.xperiodalignment,f="x"),d=i.vals;for(var a=Math.min(d.length,r.length),x=new Array(a),l=0;l<a;l++)x[l]={p:d[l],s:r[l]},u&&(x[l].orig_p=c[l],x[l][f+"End"]=i.ends[l],x[l][f+"Start"]=i.starts[l]),o.ids&&(x[l].id=String(o.ids[l]));return b(o,"marker")&&v(t,o,{vals:o.marker.color,containerStr:"marker",cLetter:"c"}),b(o,"marker.line")&&v(t,o,{vals:o.marker.line.color,containerStr:"marker.line",cLetter:"c"}),e(x,o),n(x,o),x}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":928,"./arrays_to_calcdata":647}],650:[function(y,ee,te){ee.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},{}],651:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib").isArrayOrTypedArray,b=y("../../constants/numerical").BADNUM,v=y("../../registry"),e=y("../../plots/cartesian/axes"),n=y("../../plots/cartesian/constraints").getAxisGroup,t=y("./sieve.js");function o(a,x,l,w,_){if(w.length){var T,k,L,A;switch(function(I,P){var S,E;for(S=0;S<P.length;S++){var D,F=P[S],H=F[0].trace,V=H.type==="funnel"?H._base:H.base,Z=H.orientation==="h"?H.xcalendar:H.ycalendar,K=I.type==="category"||I.type==="multicategory"?function(){return null}:I.d2c;if(m(V)){for(E=0;E<Math.min(V.length,F.length);E++)D=K(V[E],0,Z),g(D)?(F[E].b=+D,F[E].hasB=1):F[E].b=0;for(;E<F.length;E++)F[E].b=0}else{D=K(V,0,Z);var q=g(D);for(D=q?D:0,E=0;E<F.length;E++)F[E].b=D,q&&(F[E].hasB=1)}}}(l,w),_.mode){case"overlay":r(x,l,w,_);break;case"group":for(T=[],k=[],L=0;L<w.length;L++)(A=w[L])[0].trace.offset===void 0?k.push(A):T.push(A);k.length&&function(I,P,S,E,D){var F=new t(E,{posAxis:P,sepNegVal:!1,overlapNoMerge:!D.norm});(function(H,V,Z,K){for(var q=H._fullLayout,W=Z.positions,$=Z.distinctPositions,R=Z.minDiff,N=Z.traces,U=N.length,Q=W.length!==$.length,j=R*(1-K.gap),X=n(q,V._id)+N[0][0].trace.orientation,J=q._alignmentOpts[X]||{},re=0;re<U;re++){var ne,se,oe=N[re],pe=oe[0].trace,ce=J[pe.alignmentgroup]||{},de=Object.keys(ce.offsetGroups||{}).length,xe=(ne=de?j/de:Q?j/U:j)*(1-(K.groupgap||0));se=de?((2*pe._offsetIndex+1-de)*ne-xe)/2:Q?((2*re+1-U)*ne-xe)/2:-xe/2;var we=oe[0].t;we.barwidth=xe,we.poffset=se,we.bargroupwidth=j,we.bardelta=R}Z.binWidth=N[0][0].t.barwidth/100,c(Z),i(V,Z),u(V,Z,Q)})(I,P,F,D),function(H,V){for(var Z=H.traces,K=0;K<Z.length;K++){var q=Z[K];if(q[0].trace.base===void 0)for(var W=new t([q],{posAxis:V,sepNegVal:!0,overlapNoMerge:!0}),$=0;$<q.length;$++){var R=q[$];if(R.p!==b){var N=W.put(R.p,R.b+R.s);N&&(R.b=N)}}}}(F,P),D.norm?(s(F),h(S,F,D)):f(S,F)}(a,x,l,k,_),T.length&&r(x,l,T,_);break;case"stack":case"relative":for(T=[],k=[],L=0;L<w.length;L++)(A=w[L])[0].trace.base===void 0?k.push(A):T.push(A);
1220k.length&&function(I,P,S,E,D){var F=new t(E,{posAxis:P,sepNegVal:D.mode==="relative",overlapNoMerge:!(D.norm||D.mode==="stack"||D.mode==="relative")});d(P,F,D),function(q,W,$){var R,N,U,Q,j,X,J=p(q),re=W.traces;for(Q=0;Q<re.length;Q++)if(R=re[Q],(N=R[0].trace).type==="funnel")for(j=0;j<R.length;j++)(X=R[j]).s!==b&&W.put(X.p,-.5*X.s);for(Q=0;Q<re.length;Q++){R=re[Q],N=R[0].trace,U=N.type==="funnel";var ne=[];for(j=0;j<R.length;j++)if((X=R[j]).s!==b){var se;se=U?X.s:X.s+X.b;var oe=W.put(X.p,se),pe=oe+se;X.b=oe,X[J]=pe,$.norm||(ne.push(pe),X.hasB&&ne.push(oe))}$.norm||(N._extremes[q._id]=e.findExtremes(q,ne,{tozero:!0,padded:!0}))}}(S,F,D);for(var H=0;H<E.length;H++)for(var V=E[H],Z=0;Z<V.length;Z++){var K=V[Z];K.s!==b&&K.b+K.s===F.get(K.p,K.s)&&(K._outmost=!0)}D.norm&&h(S,F,D)}(0,x,l,k,_),T.length&&r(x,l,T,_)}(function(I,P){var S,E,D,F=p(P),H={},V=1/0,Z=-1/0;for(S=0;S<I.length;S++)for(D=I[S],E=0;E<D.length;E++){var K=D[E].p;g(K)&&(V=Math.min(V,K),Z=Math.max(Z,K))}var q=1e4/(Z-V),W=H.round=function(X){return String(Math.round(q*(X-V)))};for(S=0;S<I.length;S++){(D=I[S])[0].t.extents=H;var $=D[0].t.poffset,R=Array.isArray($);for(E=0;E<D.length;E++){var N=D[E],U=N[F]-N.w/2;if(g(U)){var Q=N[F]+N.w/2,j=W(N.p);H[j]?H[j]=[Math.min(U,H[j][0]),Math.max(Q,H[j][1])]:H[j]=[U,Q]}N.p0=N.p+(R?$[E]:$),N.p1=N.p0+N.w,N.s0=N.b,N.s1=N.s0+N.s}}})(w,x)}}function r(a,x,l,w){for(var _=0;_<l.length;_++){var T=l[_],k=new t([T],{posAxis:a,sepNegVal:!1,overlapNoMerge:!w.norm});d(a,k,w),w.norm?(s(k),h(x,k,w)):f(x,k)}}function d(a,x,l){for(var w=x.minDiff,_=x.traces,T=w*(1-l.gap),k=T*(1-(l.groupgap||0)),L=-k/2,A=0;A<_.length;A++){var I=_[A][0].t;I.barwidth=k,I.poffset=L,I.bargroupwidth=T,I.bardelta=w}x.binWidth=_[0][0].t.barwidth/100,c(x),i(a,x),u(a,x)}function c(a){var x,l,w=a.traces;for(x=0;x<w.length;x++){var _,T=w[x],k=T[0],L=k.trace,A=k.t,I=L._offset||L.offset,P=A.poffset;if(m(I)){for(_=Array.prototype.slice.call(I,0,T.length),l=0;l<_.length;l++)g(_[l])||(_[l]=P);for(l=_.length;l<T.length;l++)_.push(P);A.poffset=_}else I!==void 0&&(A.poffset=I);var S=L._width||L.width,E=A.barwidth;if(m(S)){var D=Array.prototype.slice.call(S,0,T.length);for(l=0;l<D.length;l++)g(D[l])||(D[l]=E);for(l=D.length;l<T.length;l++)D.push(E);if(A.barwidth=D,I===void 0){for(_=[],l=0;l<T.length;l++)_.push(P+(E-D[l])/2);A.poffset=_}}else S!==void 0&&(A.barwidth=S,I===void 0&&(A.poffset=P+(E-S)/2))}}function i(a,x){for(var l=x.traces,w=p(a),_=0;_<l.length;_++)for(var T=l[_],k=T[0].t,L=k.poffset,A=Array.isArray(L),I=k.barwidth,P=Array.isArray(I),S=0;S<T.length;S++){var E=T[S],D=E.w=P?I[S]:I;E[w]=E.p+(A?L[S]:L)+D/2}}function u(a,x,l){var w=x.traces,_=x.minDiff/2;e.minDtick(a,x.minDiff,x.distinctPositions[0],l);for(var T=0;T<w.length;T++){var k,L,A,I,P=w[T],S=P[0],E=S.trace,D=[];for(I=0;I<P.length;I++)L=(k=P[I]).p-_,A=k.p+_,D.push(L,A);if(E.width||E.offset){var F=S.t,H=F.poffset,V=F.barwidth,Z=Array.isArray(H),K=Array.isArray(V);for(I=0;I<P.length;I++){k=P[I];var q=Z?H[I]:H,W=K?V[I]:V;A=(L=k.p+q)+W,D.push(L,A)}}E._extremes[a._id]=e.findExtremes(a,D,{padded:!1})}}function f(a,x){for(var l=x.traces,w=p(a),_=0;_<l.length;_++){for(var T=l[_],k=T[0].trace,L=[],A=!1,I=0;I<T.length;I++){var P=T[I],S=P.b,E=S+P.s;P[w]=E,L.push(E),P.hasB&&L.push(S),P.hasB&&P.b||(A=!0)}k._extremes[a._id]=e.findExtremes(a,L,{tozero:A,padded:!0})}}function s(a){for(var x=a.traces,l=0;l<x.length;l++)for(var w=x[l],_=0;_<w.length;_++){var T=w[_];T.s!==b&&a.put(T.p,T.b+T.s)}}function h(a,x,l){var w=x.traces,_=p(a),T=l.norm==="fraction"?1:100,k=T/1e9,L=a.l2c(a.c2l(0)),A=l.mode==="stack"?T:L;function I($){return g(a.c2l($))&&($<L-k||$>A+k||!g(L))}for(var P=0;P<w.length;P++){for(var S=w[P],E=S[0].trace,D=[],F=!1,H=!1,V=0;V<S.length;V++){var Z=S[V];if(Z.s!==b){var K=Math.abs(T/x.get(Z.p,Z.s));Z.b*=K,Z.s*=K;var q=Z.b,W=q+Z.s;Z[_]=W,D.push(W),H=H||I(W),Z.hasB&&(D.push(q),H=H||I(q)),Z.hasB&&Z.b||(F=!0)}}E._extremes[a._id]=e.findExtremes(a,D,{tozero:F,padded:H})}}function p(a){return a._id.charAt(0)}ee.exports={crossTraceCalc:function(a,x){for(var l=x.xaxis,w=x.yaxis,_=a._fullLayout,T=a._fullData,k=a.calcdata,L=[],A=[],I=0;I<T.length;I++){var P=T[I];if(P.visible===!0&&v.traceIs(P,"bar")&&P.xaxis===l._id&&P.yaxis===w._id&&(P.orientation==="h"?L.push(k[I]):A.push(k[I]),P._computePh))for(var S=a.calcdata[I],E=0;E<S.length;E++)typeof S[E].ph0=="function"&&(S[E].ph0=S[E].ph0()),typeof S[E].ph1=="function"&&(S[E].ph1=S[E].ph1())}var D={xCat:l.type==="category"||l.type==="multicategory",yCat:w.type==="category"||w.type==="multicategory",mode:_.barmode,norm:_.barnorm,gap:_.bargap,groupgap:_.bargroupgap};o(a,l,w,A,D),o(a,w,l,L,D)},setGroupPositions:o}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../../plots/cartesian/constraints":562,"../../registry":638,"./sieve.js":661,"fast-isnumeric":190}],652:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color"),b=y("../../registry"),v=y("../scatter/xy_defaults"),e=y("../scatter/period_defaults"),n=y("./style_defaults"),t=y("../../plots/cartesian/constraints").getAxisGroup,o=y("./attributes"),r=g.coerceFont;function d(i,u,f,s){var h=u.orientation,p=u[{v:"x",h:"y"}[h]+"axis"],a=t(f,p)+h,x=f._alignmentOpts||{},l=s("alignmentgroup"),w=x[a];w||(w=x[a]={});var _=w[l];_?_.traces.push(u):_=w[l]={traces:[u],alignmentIndex:Object.keys(w).length,offsetGroups:{}};var T=s("offsetgroup"),k=_.offsetGroups,L=k[T];T&&(L||(L=k[T]={offsetIndex:Object.keys(k).length}),u._offsetIndex=L.offsetIndex)}function c(i,u,f,s,h,p){var a=(p=p||{}).moduleHasSelected!==!1,x=p.moduleHasUnselected!==!1,l=p.moduleHasConstrain!==!1,w=p.moduleHasCliponaxis!==!1,_=p.moduleHasTextangle!==!1,T=p.moduleHasInsideanchor!==!1,k=!!p.hasPathbar,L=Array.isArray(h)||h==="auto",A=L||h==="inside",I=L||h==="outside";if(A||I){var P=r(s,"textfont",f.font),S=g.extendFlat({},P),E=!(i.textfont&&i.textfont.color);if(E&&delete S.color,r(s,"insidetextfont",S),k){var D=g.extendFlat({},P);E&&delete D.color,r(s,"pathbar.textfont",D)}I&&r(s,"outsidetextfont",P),a&&s("selected.textfont.color"),x&&s("unselected.textfont.color"),l&&s("constraintext"),w&&s("cliponaxis"),_&&s("textangle"),s("texttemplate")}A&&T&&s("insidetextanchor")}ee.exports={supplyDefaults:function(i,u,f,s){function h(l,w){return g.coerce(i,u,o,l,w)}if(v(i,u,s,h)){e(i,u,s,h),h("xhoverformat"),h("yhoverformat"),h("orientation",u.x&&!u.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate");var p=h("textposition");c(i,u,s,h,p,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n(i,u,h,f,s);var a=(u.marker.line||{}).color,x=b.getComponentMethod("errorbars","supplyDefaults");x(i,u,a||m.defaultLine,{axis:"y"}),x(i,u,a||m.defaultLine,{axis:"x",inherit:"y"}),g.coerceSelectionMarkerOpacity(u,h)}else u.visible=!1},crossTraceDefaults:function(i,u){var f;function s(p){return g.coerce(f._input,f,o,p)}if(u.barmode==="group")for(var h=0;h<i.length;h++)(f=i[h]).type==="bar"&&(f._input,d(0,f,u,s))},handleGroupingDefaults:d,handleText:c}},{"../../components/color":366,"../../lib":503,"../../plots/cartesian/constraints":562,"../../registry":638,"../scatter/period_defaults":946,"../scatter/xy_defaults":953,"./attributes":648,"./style_defaults":663}],653:[function(y,ee,te){ee.exports=function(g,m,b){return g.x="xVal"in m?m.xVal:m.x,g.y="yVal"in m?m.yVal:m.y,m.xa&&(g.xaxis=m.xa),m.ya&&(g.yaxis=m.ya),b.orientation==="h"?(g.label=g.y,g.value=g.x):(g.label=g.x,g.value=g.y),g}},{}],654:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("tinycolor2"),b=y("../../lib").isArrayOrTypedArray;te.coerceString=function(v,e,n){if(typeof e=="string"){if(e||!v.noBlank)return e}
1220else if((typeof e=="number"||e===!0)&&!v.strict)return String(e);return n!==void 0?n:v.dflt},te.coerceNumber=function(v,e,n){if(g(e)){e=+e;var t=v.min,o=v.max;if(!(t!==void 0&&e<t||o!==void 0&&e>o))return e}return n!==void 0?n:v.dflt},te.coerceColor=function(v,e,n){return m(e).isValid()?e:n!==void 0?n:v.dflt},te.coerceEnumerated=function(v,e,n){return v.coerceNumber&&(e=+e),v.values.indexOf(e)!==-1?e:n!==void 0?n:v.dflt},te.getValue=function(v,e){var n;return Array.isArray(v)?e<v.length&&(n=v[e]):n=v,n},te.getLineWidth=function(v,e){return 0<e.mlw?e.mlw:b(v.marker.line.width)?0:v.marker.line.width}},{"../../lib":503,"fast-isnumeric":190,tinycolor2:312}],655:[function(y,ee,te){var g=y("../../components/fx"),m=y("../../registry"),b=y("../../components/color"),v=y("../../lib").fillText,e=y("./helpers").getLineWidth,n=y("../../plots/cartesian/axes").hoverLabelText,t=y("../../constants/numerical").BADNUM;function o(d,c,i,u,f){var s,h,p,a,x,l,w,_=d.cd,T=_[0].trace,k=_[0].t,L=u==="closest",A=T.type==="waterfall",I=d.maxHoverDistance,P=d.maxSpikeDistance;T.orientation==="h"?(s=i,h=c,p="y",a="x",x=R,l=W):(s=c,h=i,p="x",a="y",l=R,x=W);var S=T[p+"period"],E=L||S;function D(ne){return H(ne,-1)}function F(ne){return H(ne,1)}function H(ne,se){var oe=ne.w;return ne[p]+se*oe/2}function V(ne){return ne[p+"End"]-ne[p+"Start"]}var Z=L?D:S?function(ne){return ne.p-V(ne)/2}:function(ne){return Math.min(D(ne),ne.p-k.bardelta/2)},K=L?F:S?function(ne){return ne.p+V(ne)/2}:function(ne){return Math.max(F(ne),ne.p+k.bardelta/2)};function q(ne,se,oe){return f.finiteRange&&(oe=0),g.inbox(ne-s,se-s,oe+Math.min(1,Math.abs(se-ne)/w)-1)}function W(ne){return q(Z(ne),K(ne),I)}function $(ne){var se=ne[a];if(A){var oe=Math.abs(ne.rawS)||0;h>0?se+=oe:h<0&&(se-=oe)}return se}function R(ne){var se=h,oe=ne.b,pe=$(ne);return g.inbox(oe-se,pe-se,I+(pe-se)/(pe-oe)-1)}var N=d[p+"a"],U=d[a+"a"];w=Math.abs(N.r2c(N.range[1])-N.r2c(N.range[0]));var Q=g.getDistanceFunction(u,x,l,function(ne){return(x(ne)+l(ne))/2});if(g.getClosest(_,Q,d),d.index!==!1&&_[d.index].p!==t){E||(Z=function(ne){return Math.min(D(ne),ne.p-k.bargroupwidth/2)},K=function(ne){return Math.max(F(ne),ne.p+k.bargroupwidth/2)});var j=_[d.index],X=T.base?j.b+j.s:j.s;d[a+"0"]=d[a+"1"]=U.c2p(j[a],!0),d[a+"LabelVal"]=X;var J=k.extents[k.extents.round(j.p)];d[p+"0"]=N.c2p(L?Z(j):J[0],!0),d[p+"1"]=N.c2p(L?K(j):J[1],!0);var re=j.orig_p!==void 0;return d[p+"LabelVal"]=re?j.orig_p:j.p,d.labelLabel=n(N,d[p+"LabelVal"],T[p+"hoverformat"]),d.valueLabel=n(U,d[a+"LabelVal"],T[a+"hoverformat"]),d.baseLabel=n(U,j.b,T[a+"hoverformat"]),d.spikeDistance=(function(ne){var se=h,oe=ne.b,pe=$(ne);return g.inbox(oe-se,pe-se,P+(pe-se)/(pe-oe)-1)}(j)+function(ne){return q(D(ne),F(ne),P)}(j))/2,d[p+"Spike"]=N.c2p(j.p,!0),v(j,T,d),d.hovertemplate=T.hovertemplate,d}}function r(d,c){var i=c.mcc||d.marker.color,u=c.mlcc||d.marker.line.color,f=e(d,c);return b.opacity(i)?i:b.opacity(u)&&f?u:void 0}ee.exports={hoverPoints:function(d,c,i,u,f){var s=o(d,c,i,u,f);if(s){var h=s.cd,p=h[0].trace,a=h[s.index];return s.color=r(p,a),m.getComponentMethod("errorbars","hoverInfo")(a,p,s),[s]}},hoverOnBars:o,getTraceColor:r}},{"../../components/color":366,"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./helpers":654}],656:[function(y,ee,te){ee.exports={attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults").supplyDefaults,crossTraceDefaults:y("./defaults").crossTraceDefaults,supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc"),crossTraceCalc:y("./cross_trace_calc").crossTraceCalc,colorbar:y("../scatter/marker_colorbar"),arraysToCalcdata:y("./arrays_to_calcdata"),plot:y("./plot").plot,style:y("./style").style,styleOnSelect:y("./style").styleOnSelect,hoverPoints:y("./hover").hoverPoints,eventData:y("./event_data"),selectPoints:y("./select"),moduleType:"trace",name:"bar",basePlotModule:y("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":944,"./arrays_to_calcdata":647,"./attributes":648,"./calc":649,"./cross_trace_calc":651,"./defaults":652,"./event_data":653,"./hover":655,"./layout_attributes":657,"./layout_defaults":658,"./plot":659,"./select":660,"./style":662}],657:[function(y,ee,te){ee.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],658:[function(y,ee,te){var g=y("../../registry"),m=y("../../plots/cartesian/axes"),b=y("../../lib"),v=y("./layout_attributes");ee.exports=function(e,n,t){function o(p,a){return b.coerce(e,n,v,p,a)}for(var r=!1,d=!1,c=!1,i={},u=o("barmode"),f=0;f<t.length;f++){var s=t[f];if(g.traceIs(s,"bar")&&s.visible){if(r=!0,u==="group"){var h=s.xaxis+s.yaxis;i[h]&&(c=!0),i[h]=!0}s.visible&&s.type==="histogram"&&m.getFromId({_fullLayout:n},s[s.orientation==="v"?"xaxis":"yaxis"]).type!=="category"&&(d=!0)}}r?(u!=="overlay"&&o("barnorm"),o("bargap",d&&!c?0:.2),o("bargroupgap")):delete n.barmode}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./layout_attributes":657}
1220],659:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("../../lib"),v=y("../../lib/svg_text_utils"),e=y("../../components/color"),n=y("../../components/drawing"),t=y("../../registry"),o=y("../../plots/cartesian/axes").tickText,r=y("./uniform_text"),d=r.recordMinTextSize,c=r.clearMinTextSize,i=y("./style"),u=y("./helpers"),f=y("./constants"),s=y("./attributes"),h=s.text,p=s.textposition,a=y("../../components/fx/helpers").appendArrayPointValue,x=f.TEXTPAD;function l(P){return P.id}function w(P){if(P.ids)return l}function _(P,S){return P<S?1:-1}function T(P,S,E,D){var F;return!S.uniformtext.mode&&k(E)?(D&&(F=D()),P.transition().duration(E.duration).ease(E.easing).each("end",function(){F&&F()}).each("interrupt",function(){F&&F()})):P}function k(P){return P&&P.duration>0}function L(P){return P==="auto"?0:P}function A(P,S){var E=Math.PI/180*S,D=Math.abs(Math.sin(E)),F=Math.abs(Math.cos(E));return{x:P.width*F+P.height*D,y:P.width*D+P.height*F}}function I(P,S,E,D,F,H){var V=!!H.isHorizontal,Z=!!H.constrained,K=H.angle||0,q=H.anchor||"end",W=q==="end",$=q==="start",R=((H.leftToRight||0)+1)/2,N=1-R,U=F.width,Q=F.height,j=Math.abs(S-P),X=Math.abs(D-E),J=j>2*x&&X>2*x?x:0;j-=2*J,X-=2*J;var re=L(K);K!=="auto"||U<=j&&Q<=X||!(U>j||Q>X)||(U>X||Q>j)&&U<Q==j<X||(re+=90);var ne=A(F,re),se=1;Z&&(se=Math.min(1,j/ne.x,X/ne.y));var oe=F.left*N+F.right*R,pe=(F.top+F.bottom)/2,ce=(P+x)*N+(S-x)*R,de=(E+D)/2,xe=0,we=0;if($||W){var be=(V?ne.x:ne.y)/2,Ee=V?_(P,S):_(E,D);V?$?(ce=P+Ee*J,xe=-Ee*be):(ce=S-Ee*J,xe=Ee*be):$?(de=E+Ee*J,we=-Ee*be):(de=D-Ee*J,we=Ee*be)}return{textX:oe,textY:pe,targetX:ce,targetY:de,anchorX:xe,anchorY:we,scale:se,rotate:re}}ee.exports={plot:function(P,S,E,D,F,H){var V=S.xaxis,Z=S.yaxis,K=P._fullLayout;F||(F={mode:K.barmode,norm:K.barmode,gap:K.bargap,groupgap:K.bargroupgap},c("bar",K));var q=b.makeTraceGroups(D,E,"trace bars").each(function(W){var $=g.select(this),R=W[0].trace,N=R.type==="waterfall",U=R.type==="funnel",Q=R.type==="bar"||U,j=0;N&&R.connector.visible&&R.connector.mode==="between"&&(j=R.connector.line.width/2);var X=R.orientation==="h",J=k(F),re=b.ensureSingle($,"g","points"),ne=w(R),se=re.selectAll("g.point").data(b.identity,ne);se.enter().append("g").classed("point",!0),se.exit().remove(),se.each(function(pe,ce){var de,xe,we=g.select(this),be=function(Oe,Ue,Ge,Ye){var tt=[],lt=[],vt=Ye?Ue:Ge,It=Ye?Ge:Ue;return tt[0]=vt.c2p(Oe.s0,!0),lt[0]=It.c2p(Oe.p0,!0),tt[1]=vt.c2p(Oe.s1,!0),lt[1]=It.c2p(Oe.p1,!0),Ye?[tt,lt]:[lt,tt]}(pe,V,Z,X),Ee=be[0][0],fe=be[0][1],me=be[1][0],Te=be[1][1],_e=(X?fe-Ee:Te-me)==0;if(_e&&Q&&u.getLineWidth(R,pe)&&(_e=!1),_e||(_e=!(m(Ee)&&m(fe)&&m(me)&&m(Te))),pe.isBlank=_e,_e&&(X?fe=Ee:Te=me),j&&!_e&&(X?(Ee-=_(Ee,fe)*j,fe+=_(Ee,fe)*j):(me-=_(me,Te)*j,Te+=_(me,Te)*j)),R.type==="waterfall"){if(!_e){var Ae=R[pe.dir].marker;de=Ae.line.width,xe=Ae.color}}else de=u.getLineWidth(R,pe),xe=pe.mc||R.marker.color;function Pe(Oe){var Ue=g.round(de/2%1,2);return F.gap===0&&F.groupgap===0?g.round(Math.round(Oe)-Ue,2):Oe}if(!P._context.staticPlot){var De=e.opacity(xe)<1||de>.01?Pe:function(Oe,Ue,Ge){return Ge&&Oe===Ue?Oe:Math.abs(Oe-Ue)>=2?Pe(Oe):Oe>Ue?Math.ceil(Oe):Math.floor(Oe)};Ee=De(Ee,fe,X),fe=De(fe,Ee,X),me=De(me,Te,!X),Te=De(Te,me,!X)}var Ve=T(b.ensureSingle(we,"path"),K,F,H);if(Ve.style("vector-effect","non-scaling-stroke").attr("d",isNaN((fe-Ee)*(Te-me))||_e&&P._context.staticPlot?"M0,0Z":"M"+Ee+","+me+"V"+Te+"H"+fe+"V"+me+"Z").call(n.setClipUrl,S.layerClipId,P),!K.uniformtext.mode&&J){var Qe=n.makePointStyleFns(R);n.singlePointStyle(pe,Ve,R,Qe,P)}(function(Oe,Ue,Ge,Ye,tt,lt,vt,It,St,rt,et){var Tt,Vt=Ue.xaxis,Kt=Ue.yaxis,Be=Oe._fullLayout;function qe(Ut,Xt,sr){return b.ensureSingle(Ut,"text").text(Xt).attr({class:"bartext bartext-"+Tt,"text-anchor":"middle","data-notex":1}).call(n.font,sr).call(v.convertToTspans,Oe)}var Re=Ye[0].trace,Xe=Re.orientation==="h",ke=function(Ut,Xt,sr,vr,pr){var ar,lr=Xt[0].trace;return ar=lr.texttemplate?function(hr,Or,dr,Fr,tn){var rn=Or[0].trace,An=b.castOption(rn,dr,"texttemplate");if(!An)return"";var Ln,_n,Vr,Ir,xr=rn.type==="histogram",Nr=rn.type==="waterfall",en=rn.type==="funnel",Qr=rn.orientation==="h";Qr?(Ln="y",_n=tn,Vr="x",Ir=Fr):(Ln="x",_n=Fr,Vr="y",Ir=tn);function yn(cr){return o(Ir,Ir.c2l(cr),!0).text}var un=Or[dr],$r={};$r.label=un.p,$r.labelLabel=$r[Ln+"Label"]=(In=un.p,o(_n,_n.c2l(In),!0).text);var In,Qt=b.castOption(rn,un.i,"text");(Qt===0||Qt)&&($r.text=Qt),$r.value=un.s,$r.valueLabel=$r[Vr+"Label"]=yn(un.s);var Pt={};a(Pt,rn,un.i),(xr||Pt.x===void 0)&&(Pt.x=Qr?$r.value:$r.label),(xr||Pt.y===void 0)&&(Pt.y=Qr?$r.label:$r.value),(xr||Pt.xLabel===void 0)&&(Pt.xLabel=Qr?$r.valueLabel:$r.labelLabel),(xr||Pt.yLabel===void 0)&&(Pt.yLabel=Qr?$r.labelLabel:$r.valueLabel),Nr&&($r.delta=+un.rawS||un.s,$r.deltaLabel=yn($r.delta),$r.final=un.v,$r.finalLabel=yn($r.final),$r.initial=$r.final-$r.delta,$r.initialLabel=yn($r.initial)),en&&($r.value=un.s,$r.valueLabel=yn($r.value),$r.percentInitial=un.begR,$r.percentInitialLabel=b.formatPercent(un.begR),$r.percentPrevious=un.difR,$r.percentPreviousLabel=b.formatPercent(un.difR),$r.percentTotal=un.sumR,$r.percenTotalLabel=b.formatPercent(un.sumR));var Yt=b.castOption(rn,un.i,"customdata");return Yt&&($r.customdata=Yt),b.texttemplateString(An,$r,hr._d3locale,Pt,$r,rn._meta||{})}(Ut,Xt,sr,vr,pr):lr.textinfo?function(hr,Or,dr,Fr){var tn=hr[0].trace,rn=tn.orientation==="h",An=tn.type==="waterfall",Ln=tn.type==="funnel";function _n(Yt){return o(rn?dr:Fr,+Yt,!0).text}var Vr,Ir=tn.textinfo,xr=hr[Or],Nr=Ir.split("+"),en=[],Qr=function(Yt){return Nr.indexOf(Yt)!==-1};Qr("label")&&en.push((yn=hr[Or].p,o(rn?Fr:dr,yn,!0).text));var yn;if(Qr("text")&&((Vr=b.castOption(tn,xr.i,"text"))===0||Vr)&&en.push(Vr),An){var un=+xr.rawS||xr.s,$r=xr.v,In=$r-un;Qr("initial")&&en.push(_n(In)),Qr("delta")&&en.push(_n(un)),Qr("final")&&en.push(_n($r))}if(Ln){Qr("value")&&en.push(_n(xr.s));var Qt=0;Qr("percent initial")&&Qt++,Qr("percent previous")&&Qt++,Qr("percent total")&&Qt++;var Pt=Qt>1;Qr("percent initial")&&(Vr=b.formatPercent(xr.begR),Pt&&(Vr+=" of initial"),en.push(Vr)),Qr("percent previous")&&(Vr=b.formatPercent(xr.difR),Pt&&(Vr+=" of previous"),en.push(Vr)),Qr("percent total")&&(Vr=b.formatPercent(xr.sumR),Pt&&(Vr+=" of total"),en.push(Vr))}return en.join("<br>")}(Xt,sr,vr,pr):u.getValue(lr.text,sr),u.coerceString(h,ar)}(Be,Ye,tt,Vt,Kt);
1220Tt=function(Ut,Xt){var sr=u.getValue(Ut.textposition,Xt);return u.coerceEnumerated(p,sr)}(Re,tt);var Le=rt.mode==="stack"||rt.mode==="relative",Ie=Ye[tt],Ce=!Le||Ie._outmost;if(!ke||Tt==="none"||(Ie.isBlank||lt===vt||It===St)&&(Tt==="auto"||Tt==="inside"))return void Ge.select("text").remove();var Je=Be.font,it=i.getBarColor(Ye[tt],Re),ht=i.getInsideTextFont(Re,tt,Je,it),ut=i.getOutsideTextFont(Re,tt,Je),kt=Ge.datum();Xe?Vt.type==="log"&&kt.s0<=0&&(lt=Vt.range[0]<Vt.range[1]?0:Vt._length):Kt.type==="log"&&kt.s0<=0&&(It=Kt.range[0]<Kt.range[1]?Kt._length:0);var ot,Lt,Et,Ze,pt,Ct=Math.abs(vt-lt)-2*x,zt=Math.abs(St-It)-2*x;if(Tt==="outside"&&(Ce||Ie.hasB||(Tt="inside")),Tt==="auto")if(Ce){Tt="inside",pt=b.ensureUniformFontSize(Oe,ht),ot=qe(Ge,ke,pt),Lt=n.bBox(ot.node()),Et=Lt.width,Ze=Lt.height;var Gt=Et<=Ct&&Ze<=zt,ze=Et<=zt&&Ze<=Ct,st=Xe?Ct>=Et*(zt/Ze):zt>=Ze*(Ct/Et);Et>0&&Ze>0&&(Gt||ze||st)?Tt="inside":(Tt="outside",ot.remove(),ot=null)}else Tt="inside";if(!ot){pt=b.ensureUniformFontSize(Oe,Tt==="outside"?ut:ht);var yt=(ot=qe(Ge,ke,pt)).attr("transform");if(ot.attr("transform",""),Lt=n.bBox(ot.node()),Et=Lt.width,Ze=Lt.height,ot.attr("transform",yt),Et<=0||Ze<=0)return void ot.remove()}var Dt,jt,or=Re.textangle;Tt==="outside"?(jt=Re.constraintext==="both"||Re.constraintext==="outside",Dt=function(Ut,Xt,sr,vr,pr,ar){var lr,hr=!!ar.isHorizontal,Or=!!ar.constrained,dr=ar.angle||0,Fr=pr.width,tn=pr.height,rn=Math.abs(Xt-Ut),An=Math.abs(vr-sr);lr=hr?An>2*x?x:0:rn>2*x?x:0;var Ln=1;Or&&(Ln=hr?Math.min(1,An/tn):Math.min(1,rn/Fr));var _n=L(dr),Vr=A(pr,_n),Ir=(hr?Vr.x:Vr.y)/2,xr=(pr.left+pr.right)/2,Nr=(pr.top+pr.bottom)/2,en=(Ut+Xt)/2,Qr=(sr+vr)/2,yn=0,un=0,$r=hr?_(Xt,Ut):_(sr,vr);return hr?(en=Xt-$r*lr,yn=$r*Ir):(Qr=vr+$r*lr,un=-$r*Ir),{textX:xr,textY:Nr,targetX:en,targetY:Qr,anchorX:yn,anchorY:un,scale:Ln,rotate:_n}}(lt,vt,It,St,Lt,{isHorizontal:Xe,constrained:jt,angle:or})):(jt=Re.constraintext==="both"||Re.constraintext==="inside",Dt=I(lt,vt,It,St,Lt,{isHorizontal:Xe,constrained:jt,angle:or,anchor:Re.insidetextanchor})),Dt.fontSize=pt.size,d(Re.type==="histogram"?"bar":Re.type,Dt,Be),Ie.transform=Dt,T(ot,Be,rt,et).attr("transform",b.getTextTransform(Dt))})(P,S,we,W,ce,Ee,fe,me,Te,F,H),S.layerClipId&&n.hideOutsideRangePoint(pe,we.select("text"),V,Z,R.xcalendar,R.ycalendar)});var oe=R.cliponaxis===!1;n.setClipUrl($,oe?null:S.layerClipId,P)});t.getComponentMethod("errorbars","plot")(P,q,S,F)},toMoveInsideBar:I}},{"../../components/color":366,"../../components/drawing":388,"../../components/fx/helpers":402,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"./attributes":648,"./constants":650,"./helpers":654,"./style":662,"./uniform_text":664,"@plotly/d3":58,"fast-isnumeric":190}],660:[function(y,ee,te){function g(m,b,v,e,n){var t=b.c2p(e?m.s0:m.p0,!0),o=b.c2p(e?m.s1:m.p1,!0),r=v.c2p(e?m.p0:m.s0,!0),d=v.c2p(e?m.p1:m.s1,!0);return n?[(t+o)/2,(r+d)/2]:e?[o,(r+d)/2]:[(t+o)/2,d]}ee.exports=function(m,b){var v,e=m.cd,n=m.xaxis,t=m.yaxis,o=e[0].trace,r=o.type==="funnel",d=o.orientation==="h",c=[];if(b===!1)for(v=0;v<e.length;v++)e[v].selected=0;else for(v=0;v<e.length;v++){var i=e[v],u="ct"in i?i.ct:g(i,n,t,d,r);b.contains(u,!1,v,m)?(c.push({pointNumber:v,x:n.c2d(i.x),y:t.c2d(i.y)}),i.selected=1):i.selected=0}return c}},{}],661:[function(y,ee,te){ee.exports=b;var g=y("../../lib").distinctVals,m=y("../../constants/numerical").BADNUM;function b(v,e){this.traces=v,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var n=1/0,t=[],o=0;o<v.length;o++){for(var r=v[o],d=0;d<r.length;d++){var c=r[d];c.p!==m&&t.push(c.p)}r[0]&&r[0].width1&&(n=Math.min(r[0].width1,n))}this.positions=t;var i=g(t);this.distinctPositions=i.vals,i.vals.length===1&&n!==1/0?this.minDiff=n:this.minDiff=Math.min(i.minDiff,n);var u=(e.posAxis||{}).type;u!=="category"&&u!=="multicategory"||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}b.prototype.put=function(v,e){var n=this.getLabel(v,e),t=this.bins[n]||0;return this.bins[n]=t+e,t},b.prototype.get=function(v,e){var n=this.getLabel(v,e);return this.bins[n]||0},b.prototype.getLabel=function(v,e){return(e<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?v:Math.round(v/this.binWidth))}},{"../../constants/numerical":479,"../../lib":503}],662:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/color"),b=y("../../components/drawing"),v=y("../../lib"),e=y("../../registry"),n=y("./uniform_text").resizeText,t=y("./attributes"),o=t.textfont,r=t.insidetextfont,d=t.outsidetextfont,c=y("./helpers");function i(l,w,_){b.pointStyle(l.selectAll("path"),w,_),u(l,w,_)}function u(l,w,_){l.selectAll("text").each(function(T){var k=g.select(this),L=v.ensureUniformFontSize(_,f(k,T,w,_));b.font(k,L)})}
1220function f(l,w,_,T){var k=T._fullLayout.font,L=_.textfont;if(l.classed("bartext-inside")){var A=x(w,_);L=h(_,w.i,k,A)}else l.classed("bartext-outside")&&(L=p(_,w.i,k));return L}function s(l,w,_){return a(o,l.textfont,w,_)}function h(l,w,_,T){var k=s(l,w,_);return(l._input.textfont===void 0||l._input.textfont.color===void 0||Array.isArray(l.textfont.color)&&l.textfont.color[w]===void 0)&&(k={color:m.contrast(T),family:k.family,size:k.size}),a(r,l.insidetextfont,w,k)}function p(l,w,_){var T=s(l,w,_);return a(d,l.outsidetextfont,w,T)}function a(l,w,_,T){w=w||{};var k=c.getValue(w.family,_),L=c.getValue(w.size,_),A=c.getValue(w.color,_);return{family:c.coerceString(l.family,k,T.family),size:c.coerceNumber(l.size,L,T.size),color:c.coerceColor(l.color,A,T.color)}}function x(l,w){return w.type==="waterfall"?w[l.dir].marker.color:l.mcc||l.mc||w.marker.color}ee.exports={style:function(l){var w=g.select(l).selectAll("g.barlayer").selectAll("g.trace");n(l,w,"bar");var _=w.size(),T=l._fullLayout;w.style("opacity",function(k){return k[0].trace.opacity}).each(function(k){(T.barmode==="stack"&&_>1||T.bargap===0&&T.bargroupgap===0&&!k[0].trace.marker.line.width)&&g.select(this).attr("shape-rendering","crispEdges")}),w.selectAll("g.points").each(function(k){i(g.select(this),k[0].trace,l)}),e.getComponentMethod("errorbars","style")(w)},styleTextPoints:u,styleOnSelect:function(l,w,_){var T=w[0].trace;T.selectedpoints?function(k,L,A){b.selectedPointStyle(k.selectAll("path"),L),function(I,P,S){I.each(function(E){var D,F=g.select(this);if(E.selected){D=v.ensureUniformFontSize(S,f(F,E,P,S));var H=P.selected.textfont&&P.selected.textfont.color;H&&(D.color=H),b.font(F,D)}else b.selectedTextStyle(F,P)})}(k.selectAll("text"),L,A)}(_,T,l):(i(_,T,l),e.getComponentMethod("errorbars","style")(_))},getInsideTextFont:h,getOutsideTextFont:p,getBarColor:x,resizeText:n}},{"../../components/color":366,"../../components/drawing":388,"../../lib":503,"../../registry":638,"./attributes":648,"./helpers":654,"./uniform_text":664,"@plotly/d3":58}],663:[function(y,ee,te){var g=y("../../components/color"),m=y("../../components/colorscale/helpers").hasColorscale,b=y("../../components/colorscale/defaults"),v=y("../../lib").coercePattern;ee.exports=function(e,n,t,o,r){var d=t("marker.color",o),c=m(e,"marker");c&&b(e,n,r,t,{prefix:"marker.",cLetter:"c"}),t("marker.line.color",g.defaultLine),m(e,"marker.line")&&b(e,n,r,t,{prefix:"marker.line.",cLetter:"c"}),t("marker.line.width"),t("marker.opacity"),v(t,"marker.pattern",d,c),t("selected.marker.color"),t("unselected.marker.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],664:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib");function b(v){return"_"+v+"Text_minsize"}ee.exports={recordMinTextSize:function(v,e,n){if(n.uniformtext.mode){var t=b(v),o=n.uniformtext.minsize,r=e.scale*e.fontSize;e.hide=r<o,n[t]=n[t]||1/0,e.hide||(n[t]=Math.min(n[t],Math.max(r,o)))}},clearMinTextSize:function(v,e){e[b(v)]=void 0},resizeText:function(v,e,n){var t=v._fullLayout,o=t["_"+n+"Text_minsize"];if(o){var r,d=t.uniformtext.mode==="hide";switch(n){case"funnelarea":case"pie":case"sunburst":r="g.slice";break;case"treemap":case"icicle":r="g.slice, g.pathbar";break;default:r="g.points > g.point"}e.selectAll(r).each(function(c){var i=c.transform;i&&(i.scale=d&&i.hide?0:o/i.fontSize,g.select(this).select("text").attr("transform",m.getTextTransform(i)))})}}}},{"../../lib":503,"@plotly/d3":58}],665:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../../lib/extend").extendFlat,b=y("../scatterpolar/attributes"),v=y("../bar/attributes");ee.exports={r:b.r,theta:b.theta,r0:b.r0,dr:b.dr,theta0:b.theta0,dtheta:b.dtheta,thetaunit:b.thetaunit,base:m({},v.base,{}),offset:m({},v.offset,{}),width:m({},v.width,{}),text:m({},v.text,{}),hovertext:m({},v.hovertext,{}),marker:v.marker,hoverinfo:b.hoverinfo,hovertemplate:g(),selected:v.selected,unselected:v.unselected}},{"../../lib/extend":493,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatterpolar/attributes":1e3}],666:[function(y,ee,te){var g=y("../../components/colorscale/helpers").hasColorscale,m=y("../../components/colorscale/calc"),b=y("../bar/arrays_to_calcdata"),v=y("../bar/cross_trace_calc").setGroupPositions,e=y("../scatter/calc_selection"),n=y("../../registry").traceIs,t=y("../../lib").extendFlat;ee.exports={calc:function(o,r){for(var d=o._fullLayout,c=r.subplot,i=d[c].radialaxis,u=d[c].angularaxis,f=i.makeCalcdata(r,"r"),s=u.makeCalcdata(r,"theta"),h=r._length,p=new Array(h),a=f,x=s,l=0;l<h;l++)p[l]={p:x[l],s:a[l]};function w(_){var T=r[_];T!==void 0&&(r["_"+_]=Array.isArray(T)?u.makeCalcdata(r,_):u.d2c(T,r.thetaunit))}return u.type==="linear"&&(w("width"),w("offset")),g(r,"marker")&&m(o,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),g(r,"marker.line")&&m(o,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),b(p,r),e(p,r),p},crossTraceCalc:function(o,r,d){for(var c=o.calcdata,i=[],u=0;u<c.length;u++){var f=c[u],s=f[0].trace;s.visible===!0&&n(s,"bar")&&s.subplot===d&&i.push(f)}var h=t({},r.radialaxis,{_id:"x"}),p=r.angularaxis;v(o,p,h,i,{mode:r.barmode,norm:r.barnorm,gap:r.bargap,groupgap:r.bargroupgap})}}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"../../lib":503,"../../registry":638,"../bar/arrays_to_calcdata":647,"../bar/cross_trace_calc":651,"../scatter/calc_selection":928}],667:[function(y,ee,te){var g=y("../../lib"),m=y("../scatterpolar/defaults").handleRThetaDefaults,b=y("../bar/style_defaults"),v=y("./attributes");ee.exports=function(e,n,t,o){function r(d,c){return g.coerce(e,n,v,d,c)}m(e,n,o,r)?(r("thetaunit"),r("base"),r("offset"),r("width"),r("text"),r("hovertext"),r("hovertemplate"),b(e,n,r,t,o),g.coerceSelectionMarkerOpacity(n,r)):n.visible=!1}},{"../../lib":503,"../bar/style_defaults":663,"../scatterpolar/defaults":1002,"./attributes":665}],668:[function(y,ee,te){var g=y("../../components/fx"),m=y("../../lib"),b=y("../bar/hover").getTraceColor,v=m.fillText,e=y("../scatterpolar/hover").makeHoverPointText,n=y("../../plots/polar/helpers").isPtInsidePolygon;ee.exports=function(t,o,r){var d=t.cd,c=d[0].trace,i=t.subplot,u=i.radialAxis,f=i.angularAxis,s=i.vangles,h=s?n:m.isPtInsideSector,p=t.maxHoverDistance,a=f._peri
1220od||2*Math.PI,x=Math.abs(u.g2p(Math.sqrt(o*o+r*r))),l=Math.atan2(r,o);if(u.range[0]>u.range[1]&&(l+=Math.PI),g.getClosest(d,function(T){return h(x,l,[T.rp0,T.rp1],[T.thetag0,T.thetag1],s)?p+Math.min(1,Math.abs(T.thetag1-T.thetag0)/a)-1+(T.rp1-x)/(T.rp1-T.rp0)-1:1/0},t),t.index!==!1){var w=d[t.index];t.x0=t.x1=w.ct[0],t.y0=t.y1=w.ct[1];var _=m.extendFlat({},w,{r:w.s,theta:w.p});return v(w,c,t),e(_,c,i,t),t.hovertemplate=c.hovertemplate,t.color=b(c,w),t.xLabelVal=t.yLabelVal=void 0,w.s<0&&(t.idealAlign="left"),[t]}}},{"../../components/fx":406,"../../lib":503,"../../plots/polar/helpers":621,"../bar/hover":655,"../scatterpolar/hover":1004}],669:[function(y,ee,te){ee.exports={moduleType:"trace",name:"barpolar",basePlotModule:y("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults"),supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc").calc,crossTraceCalc:y("./calc").crossTraceCalc,plot:y("./plot"),colorbar:y("../scatter/marker_colorbar"),formatLabels:y("../scatterpolar/format_labels"),style:y("../bar/style").style,styleOnSelect:y("../bar/style").styleOnSelect,hoverPoints:y("./hover"),selectPoints:y("../bar/select"),meta:{}}},{"../../plots/polar":622,"../bar/select":660,"../bar/style":662,"../scatter/marker_colorbar":944,"../scatterpolar/format_labels":1003,"./attributes":665,"./calc":666,"./defaults":667,"./hover":668,"./layout_attributes":670,"./layout_defaults":671,"./plot":672}],670:[function(y,ee,te){ee.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],671:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v,e){var n,t={};function o(c,i){return g.coerce(b[n]||{},v[n],m,c,i)}for(var r=0;r<e.length;r++){var d=e[r];d.type==="barpolar"&&d.visible===!0&&(t[n=d.subplot]||(o("barmode"),o("bargap"),t[n]=1))}}},{"../../lib":503,"./layout_attributes":670}],672:[function(y,ee,te){var g=y("@plotly/d3"),m=y("fast-isnumeric"),b=y("../../lib"),v=y("../../components/drawing"),e=y("../../plots/polar/helpers");ee.exports=function(n,t,o){var r=t.xaxis,d=t.yaxis,c=t.radialAxis,i=t.angularAxis,u=function(s){var h=s.cxx,p=s.cyy;return s.vangles?function(a,x,l,w){var _,T;b.angleDelta(l,w)>0?(_=l,T=w):(_=w,T=l);var k=[e.findEnclosingVertexAngles(_,s.vangles)[0],(_+T)/2,e.findEnclosingVertexAngles(T,s.vangles)[1]];return e.pathPolygonAnnulus(a,x,_,T,k,h,p)}:function(a,x,l,w){return b.pathAnnulus(a,x,l,w,h,p)}}(t),f=t.layers.frontplot.select("g.barlayer");b.makeTraceGroups(f,o,"trace bars").each(function(){var s=g.select(this),h=b.ensureSingle(s,"g","points").selectAll("g.point").data(b.identity);h.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),h.exit().remove(),h.each(function(p){var a,x=g.select(this),l=p.rp0=c.c2p(p.s0),w=p.rp1=c.c2p(p.s1),_=p.thetag0=i.c2g(p.p0),T=p.thetag1=i.c2g(p.p1);if(m(l)&&m(w)&&m(_)&&m(T)&&l!==w&&_!==T){var k=c.c2g(p.s1),L=(_+T)/2;p.ct=[r.c2p(k*Math.cos(L)),d.c2p(k*Math.sin(L))],a=u(l,w,_,T)}else a="M0,0Z";b.ensureSingle(x,"path").attr("d",a)}),v.setClipUrl(s,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,n)})}},{"../../components/drawing":388,"../../lib":503,"../../plots/polar/helpers":621,"@plotly/d3":58,"fast-isnumeric":190}],673:[function(y,ee,te){var g=y("../scatter/attributes"),m=y("../bar/attributes"),b=y("../../components/color/attributes"),v=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,e=y("../../plots/template_attributes").hovertemplateAttrs,n=y("../../lib/extend").extendFlat,t=g.marker,o=t.line;ee.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:g.xperiod,yperiod:g.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,xhoverformat:v("x"),yhoverformat:v("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:n({},t.symbol,{arrayOk:!1,editType:"plot"}),opacity:n({},t.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:n({},t.size,{arrayOk:!1,editType:"calc"}),color:n({},t.color,{arrayOk:!1,editType:"style"}),line:{color:n({},o.color,{arrayOk:!1,dflt:b.defaultLine,editType:"style"}),width:n({},o.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"}
1220,fillcolor:g.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup,selected:{marker:g.selected.marker,editType:"style"},unselected:{marker:g.unselected.marker,editType:"style"},text:n({},g.text,{}),hovertext:n({},g.hovertext,{}),hovertemplate:e({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":926}],674:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../plots/cartesian/axes"),b=y("../../plots/cartesian/align_period"),v=y("../../lib"),e=y("../../constants/numerical").BADNUM,n=v._;ee.exports=function(h,p){var a,x,l,w,_,T,k,L=h._fullLayout,A=m.getFromId(h,p.xaxis||"x"),I=m.getFromId(h,p.yaxis||"y"),P=[],S=p.type==="violin"?"_numViolins":"_numBoxes";p.orientation==="h"?(l=A,w="x",_=I,T="y",k=!!p.yperiodalignment):(l=I,w="y",_=A,T="x",k=!!p.xperiodalignment);var E,D,F,H,V,Z,K=function(Ge,Ye,tt,lt){var vt,It=Ye+"0"in Ge,St="d"+Ye in Ge;if(Ye in Ge||It&&St){var rt=tt.makeCalcdata(Ge,Ye);return[b(Ge,tt,Ye,rt).vals,rt]}vt=It?Ge[Ye+"0"]:"name"in Ge&&(tt.type==="category"||g(Ge.name)&&["linear","log"].indexOf(tt.type)!==-1||v.isDateTime(Ge.name)&&tt.type==="date")?Ge.name:lt;for(var et=tt.type==="multicategory"?tt.r2c_just_indices(vt):tt.d2c(vt,0,Ge[Ye+"calendar"]),Tt=Ge._length,Vt=new Array(Tt),Kt=0;Kt<Tt;Kt++)Vt[Kt]=et;return[Vt]}(p,T,_,L[S]),q=K[0],W=K[1],$=v.distinctVals(q,_),R=$.vals,N=$.minDiff/2,U=(p.boxpoints||p.points)==="all"?v.identity:function(Ge){return Ge.v<E.lf||Ge.v>E.uf};if(p._hasPreCompStats){var Q=p[w],j=function(Ge){return l.d2c((p[Ge]||[])[a])},X=1/0,J=-1/0;for(a=0;a<p._length;a++){var re=q[a];if(g(re)){if((E={}).pos=E[T]=re,k&&W&&(E.orig_p=W[a]),E.q1=j("q1"),E.med=j("median"),E.q3=j("q3"),D=[],Q&&v.isArrayOrTypedArray(Q[a]))for(x=0;x<Q[a].length;x++)(Z=l.d2c(Q[a][x]))!==e&&(o(V={v:Z,i:[a,x]},p,[a,x]),D.push(V));if(E.pts=D.sort(r),H=(F=E[w]=D.map(d)).length,E.med!==e&&E.q1!==e&&E.q3!==e&&E.med>=E.q1&&E.q3>=E.med){var ne=j("lowerfence");E.lf=ne!==e&&ne<=E.q1?ne:c(E,F,H);var se=j("upperfence");E.uf=se!==e&&se>=E.q3?se:i(E,F,H);var oe=j("mean");E.mean=oe!==e?oe:H?v.mean(F,H):(E.q1+E.q3)/2;var pe=j("sd");E.sd=oe!==e&&pe>=0?pe:H?v.stdev(F,H,E.mean):E.q3-E.q1,E.lo=u(E),E.uo=f(E);var ce=j("notchspan");ce=ce!==e&&ce>0?ce:s(E,H),E.ln=E.med-ce,E.un=E.med+ce;var de=E.lf,xe=E.uf;p.boxpoints&&F.length&&(de=Math.min(de,F[0]),xe=Math.max(xe,F[H-1])),p.notched&&(de=Math.min(de,E.ln),xe=Math.max(xe,E.un)),E.min=de,E.max=xe}else{var we;
1220v.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join(`
1221`)),we=E.med!==e?E.med:E.q1!==e?E.q3!==e?(E.q1+E.q3)/2:E.q1:E.q3!==e?E.q3:0,E.med=we,E.q1=E.q3=we,E.lf=E.uf=we,E.mean=E.sd=we,E.ln=E.un=we,E.min=E.max=we}X=Math.min(X,E.min),J=Math.max(J,E.max),E.pts2=D.filter(U),P.push(E)}}p._extremes[l._id]=m.findExtremes(l,[X,J],{padded:!0})}else{var be=l.makeCalcdata(p,w),Ee=function(Ge,Ye){for(var tt=Ge.length,lt=new Array(tt+1),vt=0;vt<tt;vt++)lt[vt]=Ge[vt]-Ye;return lt[tt]=Ge[tt-1]+Ye,lt}(R,N),fe=R.length,me=function(Ge){for(var Ye=new Array(Ge),tt=0;tt<Ge;tt++)Ye[tt]=[];return Ye}(fe);for(a=0;a<p._length;a++)if(Z=be[a],g(Z)){var Te=v.findBin(q[a],Ee);Te>=0&&Te<fe&&(o(V={v:Z,i:a},p,a),me[Te].push(V))}var _e=1/0,Ae=-1/0,Pe=p.quartilemethod,De=Pe==="exclusive",Ve=Pe==="inclusive";for(a=0;a<fe;a++)if(me[a].length>0){var Qe,Oe;(E={}).pos=E[T]=R[a],D=E.pts=me[a].sort(r),H=(F=E[w]=D.map(d)).length,E.min=F[0],E.max=F[H-1],E.mean=v.mean(F,H),E.sd=v.stdev(F,H,E.mean),E.med=v.interp(F,.5),H%2&&(De||Ve)?(De?(Qe=F.slice(0,H/2),Oe=F.slice(H/2+1)):Ve&&(Qe=F.slice(0,H/2+1),Oe=F.slice(H/2)),E.q1=v.interp(Qe,.5),E.q3=v.interp(Oe,.5)):(E.q1=v.interp(F,.25),E.q3=v.interp(F,.75)),E.lf=c(E,F,H),E.uf=i(E,F,H),E.lo=u(E),E.uo=f(E);var Ue=s(E,H);E.ln=E.med-Ue,E.un=E.med+Ue,_e=Math.min(_e,E.ln),Ae=Math.max(Ae,E.un),E.pts2=D.filter(U),P.push(E)}p._extremes[l._id]=m.findExtremes(l,p.notched?be.concat([_e,Ae]):be,{padded:!0})}return function(Ge,Ye){if(v.isArrayOrTypedArray(Ye.selectedpoints))for(var tt=0;tt<Ge.length;tt++){for(var lt=Ge[tt].pts||[],vt={},It=0;It<lt.length;It++)vt[lt[It].i]=It;v.tagSelected(lt,Ye,vt)}}(P,p),P.length>0?(P[0].t={num:L[S],dPos:N,posLetter:T,valLetter:w,labels:{med:n(h,"median:"),min:n(h,"min:"),q1:n(h,"q1:"),q3:n(h,"q3:"),max:n(h,"max:"),mean:p.boxmean==="sd"?n(h,"mean ± σ:"):n(h,"mean:"),lf:n(h,"lower fence:"),uf:n(h,"upper fence:")}},L[S]++,P):[{t:{empty:!0}}]};var t={text:"tx",hovertext:"htx"};function o(h,p,a){for(var x in t)v.isArrayOrTypedArray(p[x])&&(Array.isArray(a)?v.isArrayOrTypedArray(p[x][a[0]])&&(h[t[x]]=p[x][a[0]][a[1]]):h[t[x]]=p[x][a])}function r(h,p){return h.v-p.v}function d(h){return h.v}function c(h,p,a){return a===0?h.q1:Math.min(h.q1,p[Math.min(v.findBin(2.5*h.q1-1.5*h.q3,p,!0)+1,a-1)])}function i(h,p,a){return a===0?h.q3:Math.max(h.q3,p[Math.max(v.findBin(2.5*h.q3-1.5*h.q1,p),0)])}function u(h){return 4*h.q1-3*h.q3}function f(h){return 4*h.q3-3*h.q1}function s(h,p){return p===0?0:1.57*(h.q3-h.q1)/Math.sqrt(p)}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"fast-isnumeric":190}],675:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../lib"),b=y("../../plots/cartesian/constraints").getAxisGroup,v=["v","h"];function e(n,t,o,r){var d,c,i,u=t.calcdata,f=t._fullLayout,s=r._id,h=s.charAt(0),p=[],a=0;for(d=0;d<o.length;d++)for(i=u[o[d]],c=0;c<i.length;c++)p.push(r.c2l(i[c].pos,!0)),a+=(i[c].pts2||[]).length;if(p.length){var x=m.distinctVals(p);r.type!=="category"&&r.type!=="multicategory"||(x.minDiff=1);var l=x.minDiff/2;g.minDtick(r,x.minDiff,x.vals[0],!0);var w=f[n==="violin"?"_numViolins":"_numBoxes"],_=f[n+"mode"]==="group"&&w>1,T=1-f[n+"gap"],k=1-f[n+"groupgap"];for(d=0;d<o.length;d++){var L,A,I,P,S,E,D=(i=u[o[d]])[0].trace,F=i[0].t,H=D.width,V=D.side;if(H)L=A=P=H/2,I=0;else if(L=l,_){var Z=b(f,r._id)+D.orientation,K=(f._alignmentOpts[Z]||{})[D.alignmentgroup]||{},q=Object.keys(K.offsetGroups||{}).length,W=q||w;A=L*T*k/W,I=2*L*(((q?D._offsetIndex:F.num)+.5)/W-.5)*T,P=L*T/W}else A=L*T*k,I=0,P=L;F.dPos=L,F.bPos=I,F.bdPos=A,F.wHover=P;var $,R,N,U,Q,j,X=I+A,J=!!H;if(V==="positive"?(S=L*(H?1:.5),$=X,E=$=I):V==="negative"?(S=$=I,E=L*(H?1:.5),R=X):(S=E=L,$=R=X),(D.boxpoints||D.points)&&a>0){var re=D.pointpos,ne=D.jitter,se=D.marker.size/2,oe=0;re+ne>=0&&((oe=X*(re+ne))>S?(J=!0,Q=se,N=oe):oe>$&&(Q=se,N=S)),oe<=S&&(N=S);var pe=0;re-ne<=0&&((pe=-X*(re-ne))>E?(J=!0,j=se,U=pe):pe>R&&(j=se,U=E)),pe<=E&&(U=E)}else N=S,U=E;var ce=new Array(i.length);for(c=0;c<i.length;c++)ce[c]=i[c].pos;D._extremes[s]=g.findExtremes(r,ce,{padded:J,vpadminus:U,vpadplus:N,vpadLinearized:!0,ppadminus:{x:j,y:Q}[h],ppadplus:{x:Q,y:j}[h]})}}}ee.exports={crossTraceCalc:function(n,t){for(var o=n.calcdata,r=t.xaxis,d=t.yaxis,c=0;c<v.length;c++){for(var i=v[c],u=i==="h"?d:r,f=[],s=0;s<o.length;s++){var h=o[s],p=h[0].t,a=h[0].trace;a.visible!==!0||a.type!=="box"&&a.type!=="candlestick"||p.empty||(a.orientation||"v")!==i||a.xaxis!==r._id||a.yaxis!==d._id||f.push(s)}e("box",n,f,u)}},setPositionOffset:e}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../plots/cartesian/constraints":562}],676:[function(y,ee,te){var g=y("../../lib"),m=y("../../registry"),b=y("../../components/color"),v=y("../scatter/period_defaults"),e=y("../bar/defaults").handleGroupingDefaults,n=y("../../plots/cartesian/axis_autotype"),t=y("./attributes");function o(d,c,i,u){function f(V){var Z=0;return V&&V.length&&(Z+=1,g.isArrayOrTypedArray(V[0])&&V[0].length&&(Z+=1)),Z}function s(V){return g.validate(d[V],t[V])}var h,p=i("y"),a=i("x");if(c.type==="box"){var x=i("q1"),l=i("median"),w=i("q3");c._hasPreCompStats=x&&x.length&&l&&l.length&&w&&w.length,h=Math.min(g.minRowLength(x),g.minRowLength(l),g.minRowLength(w))}var _,T,k=f(p),L=f(a),A=k&&g.minRowLength(p),I=L&&g.minRowLength(a),P=u.calendar,S={autotypenumbers:u.autotypenumbers};if(c._hasPreCompStats)switch(String(L)+String(k)){case"00":var E=s("x0")||s("dx");_=(s("y0")||s("dy"))&&!E?"h":"v",T=h;break;case"10":_="v",T=Math.min(h,I);break;case"20":_="h",T=Math.min(h,a.length);break;case"01":_="h",T=Math.min(h,A);break;case"02":_="v",T=Math.min(h,p.length);break;case"12":_="v",T=Math.min(h,I,p.length);break;case"21":_="h",T=Math.min(h,a.length,A);break;case"11":T=0;break;case"22":var D,F=!1;for(D=0;D<a.length;D++)if(n(a[D],P,S)==="category"){F=!0;break}if(F)_="v",T=Math.min(h,I,p.length);else{for(D=0;D<p.length;D++)if(n(p[D],P,S)==="category"){F=!0;break}F?(_="h",T=Math.min(h,a.length,A)):(_="v",T=Math.min(h,I,p.length))}}else k>0?(_="v",T=L>0?Math.min(I,A):Math.min(A)):L>0?(_="h",T=Math.min(I)):T=0;if(T){c._length=T;var H=i("orientation",_);c._hasPreCompStats?H==="v"&&L===0?(i("x0",0),i("dx",1)):H==="h"&&k===0&&(i("y0",0),i("dy",1)):H==="v"&&L===0?i("x0"):H==="h"&&k===0&&i("y0"),m.getComponentMethod("calendars","handleTraceDefaults")(d,c,["x","y"],u)}else c.visible=!1}function r(d,c,i,u){var f=u.prefix,s=g.coerce2(d,c,t,"marker.outliercolor"),h=i("marker.line.outliercolor"),p="outliers";c._hasPreCompStats?p="all":(s||h)&&(p="suspectedoutliers");var a=i(f+"points",p);a?(i("jitter",a==="all"?.3:0),i("pointpos",a==="all"?-1.5:0),i("marker.symbol"),i("marker.opacity"),i("marker.size"),i("marker.color",c.line.color),i("marker.line.color"),i("marker.line.width"),a==="suspectedoutliers"&&(i("marker.line.outliercolor",c.marker.color),i("marker.line.outlierwidth")),i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size"),i("text"),i("hovertext")):delete c.marker;var x=i("hoveron");x!=="all"&&x.indexOf("points")===-1||i("hovertemplate"),g.coerceSelectionMarkerOpacity(c,i)}ee.exports={supplyDefaults:function(d,c,i,u){function f(w,_){return g.coerce(d,c,t,w,_)}if(o(d,c,f,u),c.visible!==!1){v(d,c,u,f),f("xhoverformat"),f("yhoverformat");var s=c._hasPreCompStats;s&&(f("lowerfence"),f("upperfence")),f("line.color",(d.marker||{}).color||i),f("line.width"),f("fillcolor",b.addOpacity(c.line.color,.5));var h=!1;if(s){var p=f("mean"),a=f("sd");p&&p.length&&(h=!0,a&&a.length&&(h="sd"))}f("boxmean",h),f("whiskerwidth"),f("width"),f("quartilemethod");var x=!1;if(s){var l=f("notchspan");l&&l.length&&(x=!0)}else g.validate(d.notchwidth,t.notchwidth)&&(x=!0);f("notched",x)&&f("notchwidth"),r(d,c,f,{prefix:"box"})}},crossTraceDefaults:function(d,c){var i,u;function f(p){return g.coerce(u._input,u,t,p)}for(var s=0;s<d.length;s++){var h=(u=d[s]).type;h!=="box"&&h!=="violin"||(i=u._input,c[h+"mode"]==="group"&&e(i,u,c,f))}},handleSampleDefaults:o,handlePointsDefaults:r}},{"../../components/color":366,"../../lib":503,"../../plots/cartesian/axis_autotype":555,"../../registry":638,"../bar/defaults":652,"../scatter/period_defaults":946,"./attributes":673}],677:[function(y,ee,te){ee.exports=function(g,m){return m.hoverOnBox&&(g.hoverOnBox=m.hoverOnBox),"xVal"in m&&(g.x=m.xVal),"yVal"in m&&(g.y=m.yVal),m.xa&&(g.xaxis=m.xa),m.ya&&(g.yaxis=m.ya),g}},{}],678:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../lib"),b=y("../../components/fx"),v=y("../../components/color"),e=m.fillText;function n(o,r,d,c){var i,u,f,s,h,p,a,x,l,w,_,T,k,L,A=o.cd,I=o.xa,P=o.ya,S=A[0].trace,E=A[0].t,D=S.type==="violin",F=[],H=E.bdPos,V=E.wHover,Z=function(oe){return f.c2l(oe.pos)+E.bPos-f.c2l(p)};D&&S.side!=="both"?(S.side==="positive"&&(l=function(oe){var pe=Z(oe);return b.inbox(pe,pe+V,w)},T=H,k=0),S.side==="negative"&&(l=function(oe){var pe=Z(oe);return b.inbox(pe-V,pe,w)},T=0,k=H)):(l=function(oe){var pe=Z(oe);return b.inbox(pe-V,pe+V,w)},T=k=H),L=D?function(oe){return b.inbox(oe.span[0]-h,oe.span[1]-h,w)}:function(oe){return b.inbox(oe.min-h,oe.max-h,w)},S.orientation==="h"?(h=r,p=d,a=L,x=l,i="y",f=P,u="x",s=I):(h=d,p=r,a=l,x=L,i="x",f=I,u="y",s=P);
1221var K=Math.min(1,H/Math.abs(f.r2c(f.range[1])-f.r2c(f.range[0])));function q(oe){return(a(oe)+x(oe))/2}w=o.maxHoverDistance-K,_=o.maxSpikeDistance-K;var W=b.getDistanceFunction(c,a,x,q);if(b.getClosest(A,W,o),o.index===!1)return[];var $=A[o.index],R=S.line.color,N=(S.marker||{}).color;v.opacity(R)&&S.line.width?o.color=R:v.opacity(N)&&S.boxpoints?o.color=N:o.color=S.fillcolor,o[i+"0"]=f.c2p($.pos+E.bPos-k,!0),o[i+"1"]=f.c2p($.pos+E.bPos+T,!0),o[i+"LabelVal"]=$.orig_p!==void 0?$.orig_p:$.pos;var U=i+"Spike";o.spikeDistance=q($)*_/w,o[U]=f.c2p($.pos,!0);var Q={},j=["med","q1","q3","min","max"];(S.boxmean||(S.meanline||{}).visible)&&j.push("mean"),(S.boxpoints||S.points)&&j.push("lf","uf");for(var X=0;X<j.length;X++){var J=j[X];if(J in $&&!($[J]in Q)){Q[$[J]]=!0;var re=$[J],ne=s.c2p(re,!0),se=m.extendFlat({},o);se.attr=J,se[u+"0"]=se[u+"1"]=ne,se[u+"LabelVal"]=re,se[u+"Label"]=(E.labels?E.labels[J]+" ":"")+g.hoverLabelText(s,re,S[u+"hoverformat"]),se.hoverOnBox=!0,J==="mean"&&"sd"in $&&S.boxmean==="sd"&&(se[u+"err"]=$.sd),o.name="",o.spikeDistance=void 0,o[U]=void 0,se.hovertemplate=!1,F.push(se)}}return F}function t(o,r,d){for(var c,i,u,f=o.cd,s=o.xa,h=o.ya,p=f[0].trace,a=s.c2p(r),x=h.c2p(d),l=b.quadrature(function(D){var F=Math.max(3,D.mrc||0);return Math.max(Math.abs(s.c2p(D.x)-a)-F,1-3/F)},function(D){var F=Math.max(3,D.mrc||0);return Math.max(Math.abs(h.c2p(D.y)-x)-F,1-3/F)}),w=!1,_=0;_<f.length;_++){i=f[_];for(var T=0;T<(i.pts||[]).length;T++){var k=l(u=i.pts[T]);k<=o.distance&&(o.distance=k,w=[_,T])}}if(!w)return!1;u=(i=f[w[0]]).pts[w[1]];var L=s.c2p(u.x,!0),A=h.c2p(u.y,!0),I=u.mrc||1;c=m.extendFlat({},o,{index:u.i,color:(p.marker||{}).color,name:p.name,x0:L-I,x1:L+I,y0:A-I,y1:A+I,spikeDistance:o.distance,hovertemplate:p.hovertemplate});var P,S=i.orig_p,E=S!==void 0?S:i.pos;return p.orientation==="h"?(P=h,c.xLabelVal=u.x,c.yLabelVal=E):(P=s,c.xLabelVal=E,c.yLabelVal=u.y),c[P._id.charAt(0)+"Spike"]=P.c2p(i.pos,!0),e(u,p,c),c}ee.exports={hoverPoints:function(o,r,d,c){var i,u=o.cd[0].trace.hoveron,f=[];return u.indexOf("boxes")!==-1&&(f=f.concat(n(o,r,d,c))),u.indexOf("points")!==-1&&(i=t(o,r,d)),c==="closest"?i?[i]:f:(i&&f.push(i),f)},hoverOnBoxes:n,hoverOnPoints:t}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"../../plots/cartesian/axes":554}],679:[function(y,ee,te){ee.exports={attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults").supplyDefaults,crossTraceDefaults:y("./defaults").crossTraceDefaults,supplyLayoutDefaults:y("./layout_defaults").supplyLayoutDefaults,calc:y("./calc"),crossTraceCalc:y("./cross_trace_calc").crossTraceCalc,plot:y("./plot").plot,style:y("./style").style,styleOnSelect:y("./style").styleOnSelect,hoverPoints:y("./hover").hoverPoints,eventData:y("./event_data"),selectPoints:y("./select"),moduleType:"trace",name:"box",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"./attributes":673,"./calc":674,"./cross_trace_calc":675,"./defaults":676,"./event_data":677,"./hover":678,"./layout_attributes":680,"./layout_defaults":681,"./plot":682,"./select":683,"./style":684}],680:[function(y,ee,te){ee.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}},{}],681:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("./layout_attributes");function v(e,n,t,o,r){for(var d=r+"Layout",c=!1,i=0;i<t.length;i++){var u=t[i];if(g.traceIs(u,d)){c=!0;break}}c&&(o(r+"mode"),o(r+"gap"),o(r+"groupgap"))}ee.exports={supplyLayoutDefaults:function(e,n,t){v(0,0,t,function(o,r){return m.coerce(e,n,b,o,r)},"box")},_supply:v}},{"../../lib":503,"../../registry":638,"./layout_attributes":680}],682:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../components/drawing");function v(t,o,r,d){var c,i,u=r.orientation==="h",f=o.val,s=o.pos,h=!!s.rangebreaks,p=d.bPos,a=d.wdPos||0,x=d.bPosPxOffset||0,l=r.whiskerwidth||0,w=r.notched||!1,_=w?1-2*r.not
1221chwidth:1;Array.isArray(d.bdPos)?(c=d.bdPos[0],i=d.bdPos[1]):(c=d.bdPos,i=d.bdPos);var T=t.selectAll("path.box").data(r.type!=="violin"||r.box.visible?m.identity:[]);T.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","box"),T.exit().remove(),T.each(function(k){if(k.empty)return"M0,0Z";var L=s.c2l(k.pos+p,!0),A=s.l2p(L-c)+x,I=s.l2p(L+i)+x,P=h?(A+I)/2:s.l2p(L)+x,S=r.whiskerwidth,E=h?A*S+(1-S)*P:s.l2p(L-a)+x,D=h?I*S+(1-S)*P:s.l2p(L+a)+x,F=s.l2p(L-c*_)+x,H=s.l2p(L+i*_)+x,V=f.c2p(k.q1,!0),Z=f.c2p(k.q3,!0),K=m.constrain(f.c2p(k.med,!0),Math.min(V,Z)+1,Math.max(V,Z)-1),q=k.lf===void 0||r.boxpoints===!1,W=f.c2p(q?k.min:k.lf,!0),$=f.c2p(q?k.max:k.uf,!0),R=f.c2p(k.ln,!0),N=f.c2p(k.un,!0);u?g.select(this).attr("d","M"+K+","+F+"V"+H+"M"+V+","+A+"V"+I+(w?"H"+R+"L"+K+","+H+"L"+N+","+I:"")+"H"+Z+"V"+A+(w?"H"+N+"L"+K+","+F+"L"+R+","+A:"")+"ZM"+V+","+P+"H"+W+"M"+Z+","+P+"H"+$+(l===0?"":"M"+W+","+E+"V"+D+"M"+$+","+E+"V"+D)):g.select(this).attr("d","M"+F+","+K+"H"+H+"M"+A+","+V+"H"+I+(w?"V"+R+"L"+H+","+K+"L"+I+","+N:"")+"V"+Z+"H"+A+(w?"V"+N+"L"+F+","+K+"L"+A+","+R:"")+"ZM"+P+","+V+"V"+W+"M"+P+","+Z+"V"+$+(l===0?"":"M"+E+","+W+"H"+D+"M"+E+","+$+"H"+D))})}function e(t,o,r,d){var c=o.x,i=o.y,u=d.bdPos,f=d.bPos,s=r.boxpoints||r.points;m.seedPseudoRandom();var h=t.selectAll("g.points").data(s?function(a){return a.forEach(function(x){x.t=d,x.trace=r}),a}:[]);h.enter().append("g").attr("class","points"),h.exit().remove();var p=h.selectAll("path").data(function(a){var x,l,w=a.pts2,_=Math.max((a.max-a.min)/10,a.q3-a.q1),T=1e-9*_,k=.01*_,L=[],A=0;if(r.jitter){if(_===0)for(A=1,L=new Array(w.length),x=0;x<w.length;x++)L[x]=1;else for(x=0;x<w.length;x++){var I=Math.max(0,x-5),P=w[I].v,S=Math.min(w.length-1,x+5),E=w[S].v;s!=="all"&&(w[x].v<a.lf?E=Math.min(E,a.lf):P=Math.max(P,a.uf));var D=Math.sqrt(k*(S-I)/(E-P+T))||0;D=m.constrain(Math.abs(D),0,1),L.push(D),A=Math.max(D,A)}l=2*r.jitter/(A||1)}for(x=0;x<w.length;x++){var F=w[x],H=F.v,V=r.jitter?l*L[x]*(m.pseudoRandom()-.5):0,Z=a.pos+f+u*(r.pointpos+V);r.orientation==="h"?(F.y=Z,F.x=H):(F.x=Z,F.y=H),s==="suspectedoutliers"&&H<a.uo&&H>a.lo&&(F.so=!0)}return w});p.enter().append("path").classed("point",!0),p.exit().remove(),p.call(b.translatePoints,c,i)}function n(t,o,r,d){var c,i,u=o.val,f=o.pos,s=!!f.rangebreaks,h=d.bPos,p=d.bPosPxOffset||0,a=r.boxmean||(r.meanline||{}).visible;Array.isArray(d.bdPos)?(c=d.bdPos[0],i=d.bdPos[1]):(c=d.bdPos,i=d.bdPos);var x=t.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?m.identity:[]);x.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),x.exit().remove(),x.each(function(l){var w=f.c2l(l.pos+h,!0),_=f.l2p(w-c)+p,T=f.l2p(w+i)+p,k=s?(_+T)/2:f.l2p(w)+p,L=u.c2p(l.mean,!0),A=u.c2p(l.mean-l.sd,!0),I=u.c2p(l.mean+l.sd,!0);r.orientation==="h"?g.select(this).attr("d","M"+L+","+_+"V"+T+(a==="sd"?"m0,0L"+A+","+k+"L"+L+","+_+"L"+I+","+k+"Z":"")):g.select(this).attr("d","M"+_+","+L+"H"+T+(a==="sd"?"m0,0L"+k+","+A+"L"+_+","+L+"L"+k+","+I+"Z":""))})}ee.exports={plot:function(t,o,r,d){var c=o.xaxis,i=o.yaxis;m.makeTraceGroups(d,r,"trace boxes").each(function(u){var f,s,h=g.select(this),p=u[0],a=p.t,x=p.trace;a.wdPos=a.bdPos*x.whiskerwidth,x.visible!==!0||a.empty?h.remove():(x.orientation==="h"?(f=i,s=c):(f=c,s=i),v(h,{pos:f,val:s},x,a),e(h,{x:c,y:i},x,a),n(h,{pos:f,val:s},x,a))})},plotBoxAndWhiskers:v,plotPoints:e,plotBoxMean:n}},{"../../components/drawing":388,"../../lib":503,"@plotly/d3":58}],683:[function(y,ee,te){ee.exports=function(g,m){var b,v,e=g.cd,n=g.xaxis,t=g.yaxis,o=[];if(m===!1)for(b=0;b<e.length;b++)for(v=0;v<(e[b].pts||[]).length;v++)e[b].pts[v].selected=0;else for(b=0;b<e.length;b++)for(v=0;v<(e[b].pts||[]).length;v++){var r=e[b].pts[v],d=n.c2p(r.x),c=t.c2p(r.y);m.contains([d,c],null,r.i,g)?(o.push({pointNumber:r.i,x:n.c2d(r.x),y:t.c2d(r.y)}),r.selected=1):r.selected=0}return o}},{}],684:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/color"),b=y("../../components/drawing");ee.exports={style:function(v,e,n){var t=n||g.select(v).selectAll("g.trace.boxes");t.style("opacity",function(o){return o[0].trace.opacity}),t.each(function(o){var r=g.select(this),d=o[0].trace,c=d.line.width;function i(s,h,p,a){s.style("stroke-width",h+"px").call(m.stroke,p).call(m.fill,a)}var u=r.selectAll("path.box");if(d.type==="candlestick")u.each(function(s){if(!s.empty){var h=g.select(this),p=d[s.dir];
1221i(h,p.line.width,p.line.color,p.fillcolor),h.style("opacity",d.selectedpoints&&!s.selected?.3:1)}});else{i(u,c,d.line.color,d.fillcolor),r.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(m.stroke,d.line.color);var f=r.selectAll("path.point");b.pointStyle(f,d,v)}})},styleOnSelect:function(v,e,n){var t=e[0].trace,o=n.selectAll("path.point");t.selectedpoints?b.selectedPointStyle(o,t):b.pointStyle(o,t,v)}}},{"../../components/color":366,"../../components/drawing":388,"@plotly/d3":58}],685:[function(y,ee,te){var g=y("../../lib").extendFlat,m=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=y("../ohlc/attributes"),v=y("../box/attributes");function e(n){return{line:{color:g({},v.line.color,{dflt:n}),width:v.line.width,editType:"style"},fillcolor:v.fillcolor,editType:"style"}}ee.exports={xperiod:b.xperiod,xperiod0:b.xperiod0,xperiodalignment:b.xperiodalignment,xhoverformat:m("x"),yhoverformat:m("y"),x:b.x,open:b.open,high:b.high,low:b.low,close:b.close,line:{width:g({},v.line.width,{}),editType:"style"},increasing:e(b.increasing.line.color.dflt),decreasing:e(b.decreasing.line.color.dflt),text:b.text,hovertext:b.hovertext,whiskerwidth:g({},v.whiskerwidth,{dflt:0}),hoverlabel:b.hoverlabel}},{"../../lib":503,"../../plots/cartesian/axis_format_attributes":557,"../box/attributes":673,"../ohlc/attributes":872}],686:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("../../plots/cartesian/align_period"),v=y("../ohlc/calc").calcCommon;function e(n,t,o,r){return{min:o,q1:Math.min(n,r),med:r,q3:Math.max(n,r),max:t}}ee.exports=function(n,t){var o=n._fullLayout,r=m.getFromId(n,t.xaxis),d=m.getFromId(n,t.yaxis),c=r.makeCalcdata(t,"x"),i=b(t,r,"x",c).vals,u=v(n,t,c,i,d,e);return u.length?(g.extendFlat(u[0].t,{num:o._numBoxes,dPos:g.distinctVals(i).minDiff/2,posLetter:"x",valLetter:"y"}),o._numBoxes++,u):[{t:{empty:!0}}]}},{"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../ohlc/calc":873}],687:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color"),b=y("../ohlc/ohlc_defaults"),v=y("../scatter/period_defaults"),e=y("./attributes");function n(t,o,r,d){var c=r(d+".line.color");r(d+".line.width",o.line.width),r(d+".fillcolor",m.addOpacity(c,.5))}ee.exports=function(t,o,r,d){function c(i,u){return g.coerce(t,o,e,i,u)}b(t,o,c,d)?(v(t,o,d,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),n(t,o,c,"increasing"),n(t,o,c,"decreasing"),c("text"),c("hovertext"),c("whiskerwidth"),d._requestRangeslider[o.xaxis]=!0):o.visible=!1}},{"../../components/color":366,"../../lib":503,"../ohlc/ohlc_defaults":877,"../scatter/period_defaults":946,"./attributes":685}],688:[function(y,ee,te){ee.exports={moduleType:"trace",name:"candlestick",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:y("./attributes"),layoutAttributes:y("../box/layout_attributes"),supplyLayoutDefaults:y("../box/layout_defaults").supplyLayoutDefaults,crossTraceCalc:y("../box/cross_trace_calc").crossTraceCalc,supplyDefaults:y("./defaults"),calc:y("./calc"),plot:y("../box/plot").plot,layerName:"boxlayer",style:y("../box/style").style,hoverPoints:y("../ohlc/hover").hoverPoints,selectPoints:y("../ohlc/select")}},{"../../plots/cartesian":568,"../box/cross_trace_calc":675,"../box/layout_attributes":680,"../box/layout_defaults":681,"../box/plot":682,"../box/style":684,"../ohlc/hover":875,"../ohlc/select":879,"./attributes":685,"./calc":686,"./defaults":687}],689:[function(y,ee,te){var g=y("./axis_defaults"),m=y("../../plot_api/plot_template");ee.exports=function(b,v,e,n,t){n("a")||(n("da"),n("a0")),n("b")||(n("db"),n("b0")),function(o,r,d,c){["aaxis","baxis"].forEach(function(i){var u=i.charAt(0),f=o[i]||{},s=m.newContainer(r,i),h={noTicklabelstep:!0,tickfont:"x",id:u+"axis",letter:u,font:r.font,name:i,data:o[u],calendar:r.calendar,dfltColor:c,bgColor:d.paper_bgcolor,autotypenumbersDflt:d.autotypenumbers,fullLayout:d};g(f,s,h),s._categories=s._categories||[],o[i]||f.type==="-"||(o[i]={type:f.type})})}(b,v,e,t)}},{"../../plot_api/plot_template":543,"./axis_defaults":694}],690:[function(y,ee,te){var g=y("../../lib").isArrayOrTypedArray;ee.exports=function(m){return function b(v,e){if(!g(v)||e>=10)return null;for(var n=1/0,t=-1/0,o=v.length,r=0;r<o;r++){var d=v[r];
1221if(g(d)){var c=b(d,e+1);c&&(n=Math.min(c[0],n),t=Math.max(c[1],t))}else n=Math.min(d,n),t=Math.max(d,t)}return[n,t]}(m,0)}},{"../../lib":503}],691:[function(y,ee,te){var g=y("../../plots/font_attributes"),m=y("./axis_attributes"),b=y("../../components/color/attributes"),v=g({editType:"calc"});v.family.dflt='"Open Sans", verdana, arial, sans-serif',v.size.dflt=12,v.color.dflt=b.defaultLine,ee.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:m,baxis:m,font:v,color:{valType:"color",dflt:b.defaultLine,editType:"plot"},transforms:void 0}},{"../../components/color/attributes":365,"../../plots/font_attributes":585,"./axis_attributes":693}],692:[function(y,ee,te){var g=y("../../lib").isArrayOrTypedArray;ee.exports=function(m,b,v,e){var n,t,o,r,d,c,i,u,f,s,h,p,a,x=g(v)?"a":"b",l=(x==="a"?m.aaxis:m.baxis).smoothing,w=x==="a"?m.a2i:m.b2j,_=x==="a"?v:e,T=x==="a"?e:v,k=x==="a"?b.a.length:b.b.length,L=x==="a"?b.b.length:b.a.length,A=Math.floor(x==="a"?m.b2j(T):m.a2i(T)),I=x==="a"?function($){return m.evalxy([],$,A)}:function($){return m.evalxy([],A,$)};l&&(o=Math.max(0,Math.min(L-2,A)),r=A-o,t=x==="a"?function($,R){return m.dxydi([],$,o,R,r)}:function($,R){return m.dxydj([],o,$,r,R)});var P=w(_[0]),S=w(_[1]),E=P<S?1:-1,D=1e-8*(S-P),F=E>0?Math.floor:Math.ceil,H=E>0?Math.ceil:Math.floor,V=E>0?Math.min:Math.max,Z=E>0?Math.max:Math.min,K=F(P+D),q=H(S-D),W=[[i=I(P)]];for(n=K;n*E<q*E;n+=E)d=[],h=Z(P,n),a=(p=V(S,n+E))-h,c=Math.max(0,Math.min(k-2,Math.floor(.5*(h+p)))),u=I(p),l&&(f=t(c,h-c),s=t(c,p-c),d.push([i[0]+f[0]/3*a,i[1]+f[1]/3*a]),d.push([u[0]-s[0]/3*a,u[1]-s[1]/3*a])),d.push(u),W.push(d),i=u;return W}},{"../../lib":503}],693:[function(y,ee,te){var g=y("../../plots/font_attributes"),m=y("../../components/color/attributes"),b=y("../../plots/cartesian/layout_attributes"),v=y("../../plots/cartesian/axis_format_attributes").descriptionWithDates,e=y("../../plot_api/edit_types").overrideAll;ee.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:g({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:b.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},tickfont:g({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:v("tick label")},tickformatstops:e(b.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category desce
1221nding","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:m.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgridcolor:{valType:"color",dflt:m.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},_deprecated:{title:{valType:"string",editType:"calc"},titlefont:g({editType:"calc"}),titleoffset:{valType:"number",dflt:10,editType:"calc"}},editType:"calc"}},{"../../components/color/attributes":365,"../../plot_api/edit_types":536,"../../plots/cartesian/axis_format_attributes":557,"../../plots/cartesian/layout_attributes":569,"../../plots/font_attributes":585}],694:[function(y,ee,te){var g=y("./attributes"),m=y("../../components/color").addOpacity,b=y("../../registry"),v=y("../../lib"),e=y("../../plots/cartesian/tick_value_defaults"),n=y("../../plots/cartesian/tick_label_defaults"),t=y("../../plots/cartesian/prefix_suffix_defaults"),o=y("../../plots/cartesian/category_order_defaults"),r=y("../../plots/cartesian/set_convert"),d=y("../../plots/cartesian/axis_autotype");ee.exports=function(c,i,u){var f=u.letter,s=u.font||{},h=g[f+"axis"];function p(S,E){return v.coerce(c,i,h,S,E)}function a(S,E){return v.coerce2(c,i,h,S,E)}u.name&&(i._name=u.name,i._id=u.name),p("autotypenumbers",u.autotypenumbersDflt);var x=p("type");x==="-"&&(u.data&&function(S,E){if(S.type==="-"){var D=S._id.charAt(0),F=S[D+"calendar"];S.type=d(E,F,{autotypenumbers:S.autotypenumbers})}}(i,u.data),i.type==="-"?i.type="linear":x=c.type=i.type),p("smoothing"),p("cheatertype"),p("showticklabels"),p("labelprefix",f+" = "),p("labelsuffix"),p("showtickprefix"),p("showticksuffix"),p("separatethousands"),p("tickformat"),p("exponentformat"),p("minexponent"),p("showexponent"),p("categoryorder"),p("tickmode"),p("tickvals"),p("ticktext"),p("tick0"),p("dtick"),i.tickmode==="array"&&(p("arraytick0"),p("arraydtick")),p("labelpadding"),i._hovertitle=f,x==="date"&&b.getComponentMethod("calendars","handleDefaults")(c,i,"calendar",u.calendar),r(i,u.fullLayout),i.c2p=v.identity;var l=p("color",u.dfltColor),w=l===c.color?l:s.color;p("title.text")&&(v.coerceFont(p,"title.font",{family:s.family,size:v.bigFont(s.size),color:w}),p("title.offset")),p("tickangle"),p("autorange",!i.isValidRange(c.range))&&p("rangemode"),p("range"),i.cleanRange(),p("fixedrange"),e(c,i,p,x),t(c,i,p,x,u),n(c,i,p,x,u),o(c,i,p,{data:u.data,dataAttr:f});var _=a("gridcolor",m(l,.3)),T=a("gridwidth"),k=p("showgrid");k||(delete i.gridcolor,delete i.gridwidth);var L=a("startlinecolor",l),A=a("startlinewidth",T);p("startline",i.showgrid||!!L||!!A)||(delete i.startlinecolor,delete i.startlinewidth);var I=a("endlinecolor",l),P=a("endlinewidth",T);return p("endline",i.showgrid||!!I||!!P)||(delete i.endlinecolor,delete i.endlinewidth),k?(p("minorgridcount"),p("minorgridwidth",T),p("minorgridcolor",m(_,.06)),i.minorgridcount||(delete i.minorgridwidth,delete i.minorgridcolor)):(delete i.gridcolor,delete i.gridWidth),i.showticklabels==="none"&&(delete i.tickfont,delete i.tickangle,delete i.showexponent,delete i.exponentformat,delete i.minexponent,delete i.tickformat,delete i.showticksuffix,delete i.showtickprefix),i.showticksuffix||delete i.ticksuffix,i.showtickprefix||delete i.tickprefix,p("tickmode"),i}},{"../../components/color":366,"../../lib":503,"../../plots/cartesian/axis_autotype":555,"../../plots/cartesian/category_order_defaults":559,"../../plots/cartesian/prefix_suffix_defaults":573,"../../plots/cartesian/set_convert":576,"../../plots/cartesian/tick_label_defaults":578,"../../plots/cartesian/tick_value_defaults":580,"../../registry":638,"./attributes":691}],695:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../lib").isArray1D,b=y("./cheater_basis"),v=y("./array_minmax"),e=y("./calc_gridlines"),n=y("./calc_labels"),t=y("./calc_clippath"),o=y("../heatmap/clean_2d_array"),r=y("./smooth_fill_2d_array"),d=y("../heatmap/convert_column_xyz"),c=y("./set_convert");ee.exports=function(i,u){var f=g.getFromId(i,u.xaxis),s=g.getFromId(i,u.yaxis),h=u.aaxis,p=u.baxis,a=u.x,x=u.y,l=[];a&&m(a)&&l.push("x"),x&&m(x)&&l.push("y"),l.length&&d(u,h,p,"a","b",l);var w=u._a=u._a||u.a,_=u._b=u._b||u.b;a=u._x||u.x,x=u._y||u.y;var T={};
1221if(u._cheater){var k=h.cheatertype==="index"?w.length:w,L=p.cheatertype==="index"?_.length:_;a=b(k,L,u.cheaterslope)}u._x=a=o(a),u._y=x=o(x),r(a,w,_),r(x,w,_),c(u),u.setScale();var A=v(a),I=v(x),P=.5*(A[1]-A[0]),S=.5*(A[1]+A[0]),E=.5*(I[1]-I[0]),D=.5*(I[1]+I[0]);return A=[S-1.3*P,S+1.3*P],I=[D-1.3*E,D+1.3*E],u._extremes[f._id]=g.findExtremes(f,A,{padded:!0}),u._extremes[s._id]=g.findExtremes(s,I,{padded:!0}),e(u,"a","b"),e(u,"b","a"),n(u,h),n(u,p),T.clipsegments=t(u._xctrl,u._yctrl,h,p),T.x=a,T.y=x,T.a=w,T.b=_,[T]}},{"../../lib":503,"../../plots/cartesian/axes":554,"../heatmap/clean_2d_array":794,"../heatmap/convert_column_xyz":796,"./array_minmax":690,"./calc_clippath":696,"./calc_gridlines":697,"./calc_labels":698,"./cheater_basis":700,"./set_convert":713,"./smooth_fill_2d_array":714}],696:[function(y,ee,te){ee.exports=function(g,m,b,v){var e,n,t,o=[],r=!!b.smoothing,d=!!v.smoothing,c=g[0].length-1,i=g.length-1;for(e=0,n=[],t=[];e<=c;e++)n[e]=g[0][e],t[e]=m[0][e];for(o.push({x:n,y:t,bicubic:r}),e=0,n=[],t=[];e<=i;e++)n[e]=g[e][c],t[e]=m[e][c];for(o.push({x:n,y:t,bicubic:d}),e=c,n=[],t=[];e>=0;e--)n[c-e]=g[i][e],t[c-e]=m[i][e];for(o.push({x:n,y:t,bicubic:r}),e=i,n=[],t=[];e>=0;e--)n[i-e]=g[e][0],t[i-e]=m[e][0];return o.push({x:n,y:t,bicubic:d}),o}},{}],697:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../lib/extend").extendFlat;ee.exports=function(b,v,e){var n,t,o,r,d,c,i,u,f,s,h,p,a,x,l=b["_"+v],w=b[v+"axis"],_=w._gridlines=[],T=w._minorgridlines=[],k=w._boundarylines=[],L=b["_"+e],A=b[e+"axis"];w.tickmode==="array"&&(w.tickvals=l.slice());var I=b._xctrl,P=b._yctrl,S=I[0].length,E=I.length,D=b._a.length,F=b._b.length;g.prepTicks(w),w.tickmode==="array"&&delete w.tickvals;var H=w.smoothing?3:1;function V(K){var q,W,$,R,N,U,Q,j,X,J,re,ne,se=[],oe=[],pe={};if(v==="b")for(W=b.b2j(K),$=Math.floor(Math.max(0,Math.min(F-2,W))),R=W-$,pe.length=F,pe.crossLength=D,pe.xy=function(ce){return b.evalxy([],ce,W)},pe.dxy=function(ce,de){return b.dxydi([],ce,$,de,R)},q=0;q<D;q++)U=Math.min(D-2,q),Q=q-U,j=b.evalxy([],q,W),A.smoothing&&q>0&&(X=b.dxydi([],q-1,$,0,R),se.push(N[0]+X[0]/3),oe.push(N[1]+X[1]/3),J=b.dxydi([],q-1,$,1,R),se.push(j[0]-J[0]/3),oe.push(j[1]-J[1]/3)),se.push(j[0]),oe.push(j[1]),N=j;else for(q=b.a2i(K),U=Math.floor(Math.max(0,Math.min(D-2,q))),Q=q-U,pe.length=D,pe.crossLength=F,pe.xy=function(ce){return b.evalxy([],q,ce)},pe.dxy=function(ce,de){return b.dxydj([],U,ce,Q,de)},W=0;W<F;W++)$=Math.min(F-2,W),R=W-$,j=b.evalxy([],q,W),A.smoothing&&W>0&&(re=b.dxydj([],U,W-1,Q,0),se.push(N[0]+re[0]/3),oe.push(N[1]+re[1]/3),ne=b.dxydj([],U,W-1,Q,1),se.push(j[0]-ne[0]/3),oe.push(j[1]-ne[1]/3)),se.push(j[0]),oe.push(j[1]),N=j;return pe.axisLetter=v,pe.axis=w,pe.crossAxis=A,pe.value=K,pe.constvar=e,pe.index=u,pe.x=se,pe.y=oe,pe.smoothing=A.smoothing,pe}function Z(K){var q,W,$,R,N,U=[],Q=[],j={};if(j.length=l.length,j.crossLength=L.length,v==="b")for($=Math.max(0,Math.min(F-2,K)),N=Math.min(1,Math.max(0,K-$)),j.xy=function(X){return b.evalxy([],X,K)},j.dxy=function(X,J){return b.dxydi([],X,$,J,N)},q=0;q<S;q++)U[q]=I[K*H][q],Q[q]=P[K*H][q];else for(W=Math.max(0,Math.min(D-2,K)),R=Math.min(1,Math.max(0,K-W)),j.xy=function(X){return b.evalxy([],K,X)},j.dxy=function(X,J){return b.dxydj([],W,X,R,J)},q=0;q<E;q++)U[q]=I[q][K*H],Q[q]=P[q][K*H];return j.axisLetter=v,j.axis=w,j.crossAxis=A,j.value=l[K],j.constvar=e,j.index=K,j.x=U,j.y=Q,j.smoothing=A.smoothing,j}if(w.tickmode==="array"){for(r=5e-15,c=(d=[Math.floor((l.length-1-w.arraytick0)/w.arraydtick*(1+r)),Math.ceil(-w.arraytick0/w.arraydtick/(1+r))].sort(function(K,q){return K-q}))[0]-1,i=d[1]+1,u=c;u<i;u++)(t=w.arraytick0+w.arraydtick*u)<0||t>l.length-1||_.push(m(Z(t),{color:w.gridcolor,width:w.gridwidth}));for(u=c;u<i;u++)if(o=w.arraytick0+w.arraydtick*u,h=Math.min(o+w.arraydtick,l.length-1),!(o<0||o>l.length-1||h<0||h>l.length-1))for(p=l[o],a=l[h],n=0;n<w.minorgridcount;n++)(x=h-o)<=0||(s=p+(a-p)*(n+1)/(w.minorgridcount+1)*(w.arraydtick/x))<l[0]||s>l[l.length-1]||T.push(m(V(s),{color:w.minorgridcolor,width:w.minorgridwidth}));w.startline&&k.push(m(Z(0),{color:w.startlinecolor,width:w.startlinewidth})),w.endline&&k.push(m(Z(l.length-1),{color:w.endlinecolor,width:w.endlinewidth}))}else{for(r=5e-15,c=(d=[Math.floor((l[l.length-1]-w.tick0)/w.dtick*(1+r)),Math.ceil((l[0]-w.tick0)/w.dtick/(1+r))].sort(function(K,q){return K-q}))[0],i=d[1],u=c;u<=i;u++)f=w.tick0+w.dtick*u,_.push(m(V(f),{color:w.gridcolor,width:w.gridwidth}));for(u=c-1;u<i+1;u++)for(f=w.tick0+w.dtick*u,n=0;n<w.minorgridcount;n++)(s=f+w.dtick*(n+1)/(w.minorgridcount+1))<l[0]||s>l[l.length-1]||T.push(m(V(s),{color:w.minorgridcolor,width:w.minorgridwidth}));w.startline&&k.push(m(V(l[0]),{color:w.startlinecolor,width:w.startlinewidth})),w.endline&&k.push(m(V(l[l.length-1]),{color:w.endlinecolor,width:w.endlinewidth}))}}},{"../../lib/extend":493,"../../plots/cartesian/axes":554}],698:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../lib/extend").extendFlat;ee.exports=function(b,v){var e,n,t,o=v._labels=[],r=v._gridlines;for(e=0;e<r.length;e++)t=r[e],["start","both"].indexOf(v.showticklabels)!==-1&&(n=g.tickText(v,t.value),m(n,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:t.xy(0),dxy:t.dxy(0,0),axis:t.axis,length:t.crossAxis.length,font:t.axis.tickfont,isFirst:e===0,isLast:e===r.length-1}),o.push(n)),["end","both"].indexOf(v.showticklabels)!==-1&&(n=g.tickText(v,t.value),m(n,{endAnchor:!1,xy:t.xy(t.crossLength-1),dxy:t.dxy(t.crossLength-2,1),axis:t.axis,length:t.crossAxis.length,font:t.axis.tickfont,isFirst:e===0,isLast:e===r.length-1}),o.push(n))}},{"../../lib/extend":493,"../../plots/cartesian/axes":554}],699:[function(y,ee,te){ee.exports=function(g,m,b,v){var e=g[0]-m[0],n=g[1]-m[1],t=b[0]-m[0],o=b[1]-m[1],r=Math.pow(e*e+n*n,.25),d=Math.pow(t*t+o*o,.25),c=(d*d*e-r*r*t)*v,i=(d*d*n-r*r*o)*v,u=d*(r+d)*3,f=r*(r+d)*3;return[[m[0]+(u&&c/u),m[1]+(u&&i/u)],[m[0]-(f&&c/f),m[1]-(f&&i/f)]]}},{}],700:[function(y,ee,te){var g=y("../../lib").isArrayOrTypedArray;ee.exports=function(m,b,v){var e,n,t,o,r,d,c=[],i=g(m)?m.length:m,u=g(b)?b.length:b,f
1221=g(m)?m:null,s=g(b)?b:null;f&&(t=(f.length-1)/(f[f.length-1]-f[0])/(i-1)),s&&(o=(s.length-1)/(s[s.length-1]-s[0])/(u-1));var h=1/0,p=-1/0;for(n=0;n<u;n++)for(c[n]=[],r=s?(s[n]-s[0])*o:n/(u-1),e=0;e<i;e++)d=(f?(f[e]-f[0])*t:e/(i-1))-r*v,h=Math.min(d,h),p=Math.max(d,p),c[n][e]=d;var a=1/(p-h),x=-h*a;for(n=0;n<u;n++)for(e=0;e<i;e++)c[n][e]=a*c[n][e]+x;return c}},{"../../lib":503}],701:[function(y,ee,te){var g=y("./catmull_rom"),m=y("../../lib").ensureArray;function b(v,e,n){var t=-.5*n[0]+1.5*e[0],o=-.5*n[1]+1.5*e[1];return[(2*t+v[0])/3,(2*o+v[1])/3]}ee.exports=function(v,e,n,t,o,r){var d,c,i,u,f,s,h,p,a,x,l=n[0].length,w=n.length,_=o?3*l-2:l,T=r?3*w-2:w;for(v=m(v,T),e=m(e,T),i=0;i<T;i++)v[i]=m(v[i],_),e[i]=m(e[i],_);for(c=0,u=0;c<w;c++,u+=r?3:1)for(f=v[u],s=e[u],h=n[c],p=t[c],d=0,i=0;d<l;d++,i+=o?3:1)f[i]=h[d],s[i]=p[d];if(o)for(c=0,u=0;c<w;c++,u+=r?3:1){for(d=1,i=3;d<l-1;d++,i+=3)a=g([n[c][d-1],t[c][d-1]],[n[c][d],t[c][d]],[n[c][d+1],t[c][d+1]],o),v[u][i-1]=a[0][0],e[u][i-1]=a[0][1],v[u][i+1]=a[1][0],e[u][i+1]=a[1][1];x=b([v[u][0],e[u][0]],[v[u][2],e[u][2]],[v[u][3],e[u][3]]),v[u][1]=x[0],e[u][1]=x[1],x=b([v[u][_-1],e[u][_-1]],[v[u][_-3],e[u][_-3]],[v[u][_-4],e[u][_-4]]),v[u][_-2]=x[0],e[u][_-2]=x[1]}if(r)for(i=0;i<_;i++){for(u=3;u<T-3;u+=3)a=g([v[u-3][i],e[u-3][i]],[v[u][i],e[u][i]],[v[u+3][i],e[u+3][i]],r),v[u-1][i]=a[0][0],e[u-1][i]=a[0][1],v[u+1][i]=a[1][0],e[u+1][i]=a[1][1];x=b([v[0][i],e[0][i]],[v[2][i],e[2][i]],[v[3][i],e[3][i]]),v[1][i]=x[0],e[1][i]=x[1],x=b([v[T-1][i],e[T-1][i]],[v[T-3][i],e[T-3][i]],[v[T-4][i],e[T-4][i]]),v[T-2][i]=x[0],e[T-2][i]=x[1]}if(o&&r)for(u=1;u<T;u+=(u+1)%3==0?2:1){for(i=3;i<_-3;i+=3)a=g([v[u][i-3],e[u][i-3]],[v[u][i],e[u][i]],[v[u][i+3],e[u][i+3]],o),v[u][i-1]=.5*(v[u][i-1]+a[0][0]),e[u][i-1]=.5*(e[u][i-1]+a[0][1]),v[u][i+1]=.5*(v[u][i+1]+a[1][0]),e[u][i+1]=.5*(e[u][i+1]+a[1][1]);x=b([v[u][0],e[u][0]],[v[u][2],e[u][2]],[v[u][3],e[u][3]]),v[u][1]=.5*(v[u][1]+x[0]),e[u][1]=.5*(e[u][1]+x[1]),x=b([v[u][_-1],e[u][_-1]],[v[u][_-3],e[u][_-3]],[v[u][_-4],e[u][_-4]]),v[u][_-2]=.5*(v[u][_-2]+x[0]),e[u][_-2]=.5*(e[u][_-2]+x[1])}return[v,e]}},{"../../lib":503,"./catmull_rom":699}],702:[function(y,ee,te){ee.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],703:[function(y,ee,te){ee.exports=function(g,m,b){return m&&b?function(v,e,n,t,o){var r,d,c,i,u,f;v||(v=[]),e*=3,n*=3;var s=t*t,h=1-t,p=h*h,a=h*t*2,x=-3*p,l=3*(p-a),w=3*(a-s),_=3*s,T=o*o,k=T*o,L=1-o,A=L*L,I=A*L;for(f=0;f<g.length;f++)r=x*(u=g[f])[n][e]+l*u[n][e+1]+w*u[n][e+2]+_*u[n][e+3],d=x*u[n+1][e]+l*u[n+1][e+1]+w*u[n+1][e+2]+_*u[n+1][e+3],c=x*u[n+2][e]+l*u[n+2][e+1]+w*u[n+2][e+2]+_*u[n+2][e+3],i=x*u[n+3][e]+l*u[n+3][e+1]+w*u[n+3][e+2]+_*u[n+3][e+3],v[f]=I*r+3*(A*o*d+L*T*c)+k*i;return v}:m?function(v,e,n,t,o){var r,d,c,i;v||(v=[]),e*=3;var u=t*t,f=1-t,s=f*f,h=f*t*2,p=-3*s,a=3*(s-h),x=3*(h-u),l=3*u,w=1-o;for(c=0;c<g.length;c++)r=p*(i=g[c])[n][e]+a*i[n][e+1]+x*i[n][e+2]+l*i[n][e+3],d=p*i[n+1][e]+a*i[n+1][e+1]+x*i[n+1][e+2]+l*i[n+1][e+3],v[c]=w*r+o*d;return v}:b?function(v,e,n,t,o){var r,d,c,i,u,f;v||(v=[]),n*=3;var s=o*o,h=s*o,p=1-o,a=p*p,x=a*p;for(u=0;u<g.length;u++)r=(f=g[u])[n][e+1]-f[n][e],d=f[n+1][e+1]-f[n+1][e],c=f[n+2][e+1]-f[n+2][e],i=f[n+3][e+1]-f[n+3][e],v[u]=x*r+3*(a*o*d+p*s*c)+h*i;return v}:function(v,e,n,t,o){var r,d,c,i;v||(v=[]);var u=1-o;for(c=0;c<g.length;c++)r=(i=g[c])[n][e+1]-i[n][e],d=i[n+1][e+1]-i[n+1][e],v[c]=u*r+o*d;return v}}},{}],704:[function(y,ee,te){ee.exports=function(g,m,b){return m&&b?function(v,e,n,t,o){var r,d,c,i,u,f;v||(v=[]),e*=3,n*=3;var s=t*t,h=s*t,p=1-t,a=p*p,x=a*p,l=o*o,w=1-o,_=w*w,T=w*o*2,k=-3*_,L=3*(_-T),A=3*(T-l),I=3*l;for(f=0;f<g.length;f++)r=k*(u=g[f])[n][e]+L*u[n+1][e]+A*u[n+2][e]+I*u[n+3][e],d=k*u[n][e+1]+L*u[n+1][e+1]+A*u[n+2][e+1]+I*u[n+3][e+1],c=k*u[n][e+2]+L*u[n+1][e+2]+A*u[n+2][e+2]+I*u[n+3][e+2],i=k*u[n][e+3]+L*u[n+1][e+3]+A*u[n+2][e+3]+I*u[n+3][e+3],v[f]=x*r+3*(a*t*d+p*s*c)+h*i;return v}:m?function(v,e,n,t,o){var r,d,c,i,u,f;v||(v=[]),e*=3;var s=o*o,h=s*o,p=1-o,a=p*p,x=a*p;for(u=0;u<g.length;u++)r=(f=g[u])[n+1][e]-f[n][e],d=f[n+1][e+1]-f[n][e+1],c=f[n+1][e+2]-f[n][e+2],i=f[n+1][e+3]-f[n][e+3],v[u]=x*r+3*(a*o*d+p*s*c)+h*i;return v}:b?function(v,e,n,t,o){var r,d,c,i;v||(v=[]),n*=3;var u=1-t,f=o*o,s=1-o,h=s*s,p=s*o*2,a=-3*h,x=3*(h-p),l=3*(p-f),w=3*f;
1221for(c=0;c<g.length;c++)r=a*(i=g[c])[n][e]+x*i[n+1][e]+l*i[n+2][e]+w*i[n+3][e],d=a*i[n][e+1]+x*i[n+1][e+1]+l*i[n+2][e+1]+w*i[n+3][e+1],v[c]=u*r+t*d;return v}:function(v,e,n,t,o){var r,d,c,i;v||(v=[]);var u=1-t;for(c=0;c<g.length;c++)r=(i=g[c])[n+1][e]-i[n][e],d=i[n+1][e+1]-i[n][e+1],v[c]=u*r+t*d;return v}}},{}],705:[function(y,ee,te){ee.exports=function(g,m,b,v,e){var n=m-2,t=b-2;return v&&e?function(o,r,d){var c,i,u,f,s,h;o||(o=[]);var p=Math.max(0,Math.min(Math.floor(r),n)),a=Math.max(0,Math.min(Math.floor(d),t)),x=Math.max(0,Math.min(1,r-p)),l=Math.max(0,Math.min(1,d-a));p*=3,a*=3;var w=x*x,_=w*x,T=1-x,k=T*T,L=k*T,A=l*l,I=A*l,P=1-l,S=P*P,E=S*P;for(h=0;h<g.length;h++)c=L*(s=g[h])[a][p]+3*(k*x*s[a][p+1]+T*w*s[a][p+2])+_*s[a][p+3],i=L*s[a+1][p]+3*(k*x*s[a+1][p+1]+T*w*s[a+1][p+2])+_*s[a+1][p+3],u=L*s[a+2][p]+3*(k*x*s[a+2][p+1]+T*w*s[a+2][p+2])+_*s[a+2][p+3],f=L*s[a+3][p]+3*(k*x*s[a+3][p+1]+T*w*s[a+3][p+2])+_*s[a+3][p+3],o[h]=E*c+3*(S*l*i+P*A*u)+I*f;return o}:v?function(o,r,d){o||(o=[]);var c,i,u,f,s,h,p=Math.max(0,Math.min(Math.floor(r),n)),a=Math.max(0,Math.min(Math.floor(d),t)),x=Math.max(0,Math.min(1,r-p)),l=Math.max(0,Math.min(1,d-a));p*=3;var w=x*x,_=w*x,T=1-x,k=T*T,L=k*T,A=1-l;for(s=0;s<g.length;s++)c=A*(h=g[s])[a][p]+l*h[a+1][p],i=A*h[a][p+1]+l*h[a+1][p+1],u=A*h[a][p+2]+l*h[a+1][p+1],f=A*h[a][p+3]+l*h[a+1][p+1],o[s]=L*c+3*(k*x*i+T*w*u)+_*f;return o}:e?function(o,r,d){o||(o=[]);var c,i,u,f,s,h,p=Math.max(0,Math.min(Math.floor(r),n)),a=Math.max(0,Math.min(Math.floor(d),t)),x=Math.max(0,Math.min(1,r-p)),l=Math.max(0,Math.min(1,d-a));a*=3;var w=l*l,_=w*l,T=1-l,k=T*T,L=k*T,A=1-x;for(s=0;s<g.length;s++)c=A*(h=g[s])[a][p]+x*h[a][p+1],i=A*h[a+1][p]+x*h[a+1][p+1],u=A*h[a+2][p]+x*h[a+2][p+1],f=A*h[a+3][p]+x*h[a+3][p+1],o[s]=L*c+3*(k*l*i+T*w*u)+_*f;return o}:function(o,r,d){o||(o=[]);var c,i,u,f,s=Math.max(0,Math.min(Math.floor(r),n)),h=Math.max(0,Math.min(Math.floor(d),t)),p=Math.max(0,Math.min(1,r-s)),a=Math.max(0,Math.min(1,d-h)),x=1-a,l=1-p;for(u=0;u<g.length;u++)c=l*(f=g[u])[h][s]+p*f[h][s+1],i=l*f[h+1][s]+p*f[h+1][s+1],o[u]=x*c+a*i;return o}}},{}],706:[function(y,ee,te){var g=y("../../lib"),m=y("./xy_defaults"),b=y("./ab_defaults"),v=y("./attributes"),e=y("../../components/color/attributes");ee.exports=function(n,t,o,r){function d(i,u){return g.coerce(n,t,v,i,u)}t._clipPathId="clip"+t.uid+"carpet";var c=d("color",e.defaultLine);g.coerceFont(d,"font"),d("carpet"),b(n,t,r,d,c),t.a&&t.b?(t.a.length<3&&(t.aaxis.smoothing=0),t.b.length<3&&(t.baxis.smoothing=0),m(n,t,d)||(t.visible=!1),t._cheater&&d("cheaterslope")):t.visible=!1}},{"../../components/color/attributes":365,"../../lib":503,"./ab_defaults":689,"./attributes":691,"./xy_defaults":715}],707:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),plot:y("./plot"),calc:y("./calc"),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":568,"./attributes":691,"./calc":695,"./defaults":706,"./plot":712}],708:[function(y,ee,te){ee.exports=function(g,m){for(var b,v=g._fullData.length,e=0;e<v;e++){var n=g._fullData[e];if(n.index!==m.index&&n.type==="carpet"&&(b||(b=n),n.carpet===m.carpet))return n}return b}},{}],709:[function(y,ee,te){ee.exports=function(g,m,b){if(g.length===0)return"";var v,e=[],n=b?3:1;for(v=0;v<g.length;v+=n)e.push(g[v]+","+m[v]),b&&v<g.length-n&&(e.push("C"),e.push([g[v+1]+","+m[v+1],g[v+2]+","+m[v+2]+" "].join(" ")));return e.join(b?"":"L")}},{}],710:[function(y,ee,te){var g=y("../../lib").isArrayOrTypedArray;ee.exports=function(m,b,v){var e;for(g(m)?m.length>b.length&&(m=m.slice(0,b.length)):m=[],e=0;e<b.length;e++)m[e]=v(b[e]);return m}},{"../../lib":503}],711:[function(y,ee,te){ee.exports=function(g,m,b,v,e,n){var t=e[0]*g.dpdx(m),o=e[1]*g.dpdy(b),r=1,d=1;if(n){var c=Math.sqrt(e[0]*e[0]+e[1]*e[1]),i=Math.sqrt(n[0]*n[0]+n[1]*n[1]),u=(e[0]*n[0]+e[1]*n[1])/c/i;d=Math.max(0,u)}var f=180*Math.atan2(o,t)/Math.PI;return f<-90?(f+=180,r=-r):f>90&&(f-=180,r=-r),{angle:f,flip:r,p:g.c2p(v,m,b),offsetMultplier:d}}},{}],712:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/drawing"),b=y("./map_1d_array"),v=y("./makepath"),e=y("./orient_text"),n=y("../../lib/svg_text_utils"),t=y("../../lib"),o=t.strRotate,r=t.strTranslate,d=y("../../constants/alignment");function c(h,p,a,x,l,w){var _="const-"+l+"-lines",T=a.selectAll("."+_).data(w);T.enter().append("path").classed(_,!0).style("vector-effect","non-scaling-stroke"),T.each(function(k){var L=k,A=L.x,I=L.y,P=b([],A,h.c2p),S=b([],I,p.c2p),E="M"+v(P,S,L.smoothing);g.select(this).attr("d",E).style("stroke-width",L.width).style("stroke",L.color).style("fill","none")}),T.exit().remove()}function i(h,p,a,x,l,w,_,T){var k=w.selectAll("text."+T).data(_);k.enter().append("text").classed(T,!0);var L=0,A={};return k.each(function(I,P){var S;
1221if(I.axis.tickangle==="auto")S=e(x,p,a,I.xy,I.dxy);else{var E=(I.axis.tickangle+180)*Math.PI/180;S=e(x,p,a,I.xy,[Math.cos(E),Math.sin(E)])}P||(A={angle:S.angle,flip:S.flip});var D=(I.endAnchor?-1:1)*S.flip,F=g.select(this).attr({"text-anchor":D>0?"start":"end","data-notex":1}).call(m.font,I.font).text(I.text).call(n.convertToTspans,h),H=m.bBox(this);F.attr("transform",r(S.p[0],S.p[1])+o(S.angle)+r(I.axis.labelpadding*D,.3*H.height)),L=Math.max(L,H.width+I.axis.labelpadding)}),k.exit().remove(),A.maxExtent=L,A}ee.exports=function(h,p,a,x){var l=p.xaxis,w=p.yaxis,_=h._fullLayout._clips;t.makeTraceGroups(x,a,"trace").each(function(T){var k=g.select(this),L=T[0],A=L.trace,I=A.aaxis,P=A.baxis,S=t.ensureSingle(k,"g","minorlayer"),E=t.ensureSingle(k,"g","majorlayer"),D=t.ensureSingle(k,"g","boundarylayer"),F=t.ensureSingle(k,"g","labellayer");k.style("opacity",A.opacity),c(l,w,E,I,"a",I._gridlines),c(l,w,E,P,"b",P._gridlines),c(l,w,S,I,"a",I._minorgridlines),c(l,w,S,P,"b",P._minorgridlines),c(l,w,D,I,"a-boundary",I._boundarylines),c(l,w,D,P,"b-boundary",P._boundarylines);var H=i(h,l,w,A,L,F,I._labels,"a-label"),V=i(h,l,w,A,L,F,P._labels,"b-label");(function(Z,K,q,W,$,R,N,U){var Q,j,X,J,re=t.aggNums(Math.min,null,q.a),ne=t.aggNums(Math.max,null,q.a),se=t.aggNums(Math.min,null,q.b),oe=t.aggNums(Math.max,null,q.b);Q=.5*(re+ne),j=se,X=q.ab2xy(Q,j,!0),J=q.dxyda_rough(Q,j),N.angle===void 0&&t.extendFlat(N,e(q,$,R,X,q.dxydb_rough(Q,j))),s(Z,K,q,W,X,J,q.aaxis,$,R,N,"a-title"),Q=re,j=.5*(se+oe),X=q.ab2xy(Q,j,!0),J=q.dxydb_rough(Q,j),U.angle===void 0&&t.extendFlat(U,e(q,$,R,X,q.dxyda_rough(Q,j))),s(Z,K,q,W,X,J,q.baxis,$,R,U,"b-title")})(h,F,A,L,l,w,H,V),function(Z,K,q,W,$){var R,N,U,Q,j=q.select("#"+Z._clipPathId);j.size()||(j=q.append("clipPath").classed("carpetclip",!0));var X=t.ensureSingle(j,"path","carpetboundary"),J=K.clipsegments,re=[];for(Q=0;Q<J.length;Q++)R=J[Q],N=b([],R.x,W.c2p),U=b([],R.y,$.c2p),re.push(v(N,U,R.bicubic));var ne="M"+re.join("L")+"Z";j.attr("id",Z._clipPathId),X.attr("d",ne)}(A,L,_,l,w)})};var u=d.LINE_SPACING,f=(1-d.MID_SHIFT)/u+1;function s(h,p,a,x,l,w,_,T,k,L,A){var I=[];_.title.text&&I.push(_.title.text);var P=p.selectAll("text."+A).data(I),S=L.maxExtent;P.enter().append("text").classed(A,!0),P.each(function(){var E=e(a,T,k,l,w);["start","both"].indexOf(_.showticklabels)===-1&&(S=0);var D=_.title.font.size;S+=D+_.title.offset;var F=(L.angle+(L.flip<0?180:0)-E.angle+450)%360,H=F>90&&F<270,V=g.select(this);V.text(_.title.text).call(n.convertToTspans,h),H&&(S=(-n.lineCount(V)+f)*u*D-S),V.attr("transform",r(E.p[0],E.p[1])+o(E.angle)+r(0,S)).attr("text-anchor","middle").call(m.font,_.title.font)}),P.exit().remove()}},{"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"./makepath":709,"./map_1d_array":710,"./orient_text":711,"@plotly/d3":58}],713:[function(y,ee,te){var g=y("./constants"),m=y("../../lib/search").findBin,b=y("./compute_control_points"),v=y("./create_spline_evaluator"),e=y("./create_i_derivative_evaluator"),n=y("./create_j_derivative_evaluator");ee.exports=function(t){var o=t._a,r=t._b,d=o.length,c=r.length,i=t.aaxis,u=t.baxis,f=o[0],s=o[d-1],h=r[0],p=r[c-1],a=o[o.length-1]-o[0],x=r[r.length-1]-r[0],l=a*g.RELATIVE_CULL_TOLERANCE,w=x*g.RELATIVE_CULL_TOLERANCE;f-=l,s+=l,h-=w,p+=w,t.isVisible=function(_,T){return _>f&&_<s&&T>h&&T<p},t.isOccluded=function(_,T){return _<f||_>s||T<h||T>p},t.setScale=function(){var _=t._x,T=t._y,k=b(t._xctrl,t._yctrl,_,T,i.smoothing,u.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=v([t._xctrl,t._yctrl],d,c,i.smoothing,u.smoothing),t.dxydi=e([t._xctrl,t._yctrl],i.smoothing,u.smoothing),t.dxydj=n([t._xctrl,t._yctrl],i.smoothing,u.smoothing)},t.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),d-2),k=_[0]-T;return(1-k)*o[T]+k*o[T+1]},t.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),d-2),k=_[1]-T;return(1-k)*r[T]+k*r[T+1]},t.ij2ab=function(_){return[t.i2a(_[0]),t.j2b(_[1])]},t.a2i=function(_){var T=Math.max(0,Math.min(m(_,o),d-2)),k=o[T],L=o[T+1];return Math.max(0,Math.min(d-1,T+(_-k)/(L-k)))},t.b2j=function(_){var T=Math.max(0,Math.min(m(_,r),c-2)),k=r[T],L=r[T+1];return Math.max(0,Math.min(c-1,T+(_-k)/(L-k)))},t.ab2ij=function(_){return[t.a2i(_[0]),t.b2j(_[1])]},t.i2c=function(_,T){return t.evalxy([],_,T)}
1221,t.ab2xy=function(_,T,k){if(!k&&(_<o[0]||_>o[d-1]|T<r[0]||T>r[c-1]))return[!1,!1];var L=t.a2i(_),A=t.b2j(T),I=t.evalxy([],L,A);if(k){var P,S,E,D,F=0,H=0,V=[];_<o[0]?(P=0,S=0,F=(_-o[0])/(o[1]-o[0])):_>o[d-1]?(P=d-2,S=1,F=(_-o[d-1])/(o[d-1]-o[d-2])):S=L-(P=Math.max(0,Math.min(d-2,Math.floor(L)))),T<r[0]?(E=0,D=0,H=(T-r[0])/(r[1]-r[0])):T>r[c-1]?(E=c-2,D=1,H=(T-r[c-1])/(r[c-1]-r[c-2])):D=A-(E=Math.max(0,Math.min(c-2,Math.floor(A)))),F&&(t.dxydi(V,P,E,S,D),I[0]+=V[0]*F,I[1]+=V[1]*F),H&&(t.dxydj(V,P,E,S,D),I[0]+=V[0]*H,I[1]+=V[1]*H)}return I},t.c2p=function(_,T,k){return[T.c2p(_[0]),k.c2p(_[1])]},t.p2x=function(_,T,k){return[T.p2c(_[0]),k.p2c(_[1])]},t.dadi=function(_){var T=Math.max(0,Math.min(o.length-2,_));return o[T+1]-o[T]},t.dbdj=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},t.dxyda=function(_,T,k,L){var A=t.dxydi(null,_,T,k,L),I=t.dadi(_,k);return[A[0]/I,A[1]/I]},t.dxydb=function(_,T,k,L){var A=t.dxydj(null,_,T,k,L),I=t.dbdj(T,L);return[A[0]/I,A[1]/I]},t.dxyda_rough=function(_,T,k){var L=a*(k||.1),A=t.ab2xy(_+L,T,!0),I=t.ab2xy(_-L,T,!0);return[.5*(A[0]-I[0])/L,.5*(A[1]-I[1])/L]},t.dxydb_rough=function(_,T,k){var L=x*(k||.1),A=t.ab2xy(_,T+L,!0),I=t.ab2xy(_,T-L,!0);return[.5*(A[0]-I[0])/L,.5*(A[1]-I[1])/L]},t.dpdx=function(_){return _._m},t.dpdy=function(_){return _._m}}},{"../../lib/search":523,"./compute_control_points":701,"./constants":702,"./create_i_derivative_evaluator":703,"./create_j_derivative_evaluator":704,"./create_spline_evaluator":705}],714:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b,v){var e,n,t,o=[],r=[],d=m[0].length,c=m.length;function i(K,q){var W,$=0,R=0;return K>0&&(W=m[q][K-1])!==void 0&&(R++,$+=W),K<d-1&&(W=m[q][K+1])!==void 0&&(R++,$+=W),q>0&&(W=m[q-1][K])!==void 0&&(R++,$+=W),q<c-1&&(W=m[q+1][K])!==void 0&&(R++,$+=W),$/Math.max(1,R)}var u,f,s,h,p,a,x,l,w,_,T,k=0;for(e=0;e<d;e++)for(n=0;n<c;n++)m[n][e]===void 0&&(o.push(e),r.push(n),m[n][e]=i(e,n)),k=Math.max(k,Math.abs(m[n][e]));if(!o.length)return m;var L=0,A=0,I=o.length;do{for(L=0,t=0;t<I;t++){e=o[t],n=r[t];var P,S,E,D,F,H,V=0,Z=0;e===0?(E=b[F=Math.min(d-1,2)],D=b[1],P=m[n][F],Z+=(S=m[n][1])+(S-P)*(b[0]-D)/(D-E),V++):e===d-1&&(E=b[F=Math.max(0,d-3)],D=b[d-2],P=m[n][F],Z+=(S=m[n][d-2])+(S-P)*(b[d-1]-D)/(D-E),V++),(e===0||e===d-1)&&n>0&&n<c-1&&(u=v[n+1]-v[n],Z+=((f=v[n]-v[n-1])*m[n+1][e]+u*m[n-1][e])/(f+u),V++),n===0?(E=v[H=Math.min(c-1,2)],D=v[1],P=m[H][e],Z+=(S=m[1][e])+(S-P)*(v[0]-D)/(D-E),V++):n===c-1&&(E=v[H=Math.max(0,c-3)],D=v[c-2],P=m[H][e],Z+=(S=m[c-2][e])+(S-P)*(v[c-1]-D)/(D-E),V++),(n===0||n===c-1)&&e>0&&e<d-1&&(u=b[e+1]-b[e],Z+=((f=b[e]-b[e-1])*m[n][e+1]+u*m[n][e-1])/(f+u),V++),V?Z/=V:(s=b[e+1]-b[e],h=b[e]-b[e-1],l=(p=v[n+1]-v[n])*(a=v[n]-v[n-1])*(p+a),Z=((x=s*h*(s+h))*(a*m[n+1][e]+p*m[n-1][e])+l*(h*m[n][e+1]+s*m[n][e-1]))/(l*(h+s)+x*(a+p))),L+=(_=(w=Z-m[n][e])/k)*_,T=V?0:.85,m[n][e]+=w*(1+T)}L=Math.sqrt(L)}while(A++<100&&L>1e-5);return g.log("Smoother converged to",L,"after",A,"iterations"),m}},{"../../lib":503}],715:[function(y,ee,te){var g=y("../../lib").isArray1D;ee.exports=function(m,b,v){var e=v("x"),n=e&&e.length,t=v("y"),o=t&&t.length;if(!n&&!o)return!1;if(b._cheater=!e,n&&!g(e)||o&&!g(t))b._length=null;else{var r=n?e.length:1/0;o&&(r=Math.min(r,t.length)),b.a&&b.a.length&&(r=Math.min(r,b.a.length)),b.b&&b.b.length&&(r=Math.min(r,b.b.length)),b._length=r}return!0}},{"../../lib":503}],716:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../scattergeo/attributes"),b=y("../../components/colorscale/attributes"),v=y("../../plots/attributes"),e=y("../../components/color/attributes").defaultLine,n=y("../../lib/extend").extendFlat,t=m.marker.line;ee.exports=n({locations:{valType:"data_array",editType:"calc"},locationmode:m.locationmode,z:{valType:"data_array",editType:"calc"},geojson:n({},m.geojson,{}),featureidkey:m.featureidkey,text:n({},m.text,{}),hovertext:n({},m.hovertext,{}),marker:{line:{color:n({},t.color,{dflt:e}),width:n({},t.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:m.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:m.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:n({},v.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:g(),showlegend:n({},v.showlegend,{dflt:!1})},b("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":365,"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scattergeo/attributes":968}],717:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../constants/numerical").BADNUM,b=y("../../components/colorscale/calc"),v=y("../scatter/arrays_to_calcdata"),e=y("../scatter/calc_selection");function n(t){return t&&typeof t=="string"}ee.exports=function(t,o){var r,d=o._length,c=new Array(d);r=o.geojson?function(h){return n(h)||g(h)}:n;for(var i=0;i<d;i++){var u=c[i]={},f=o.locations[i],s=o.z[i];r(f)&&g(s)?(u.loc=f,u.z=s):(u.loc=null,u.z=m),u.index=i}return v(c,o),b(t,o,{vals:o.z,containerStr:"",cLetter:"z"}),e(c,o),c}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../scatter/arrays_to_calcdata":925,"../scatter/calc_selection":928,"fast-isnumeric":190}],718:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/colorscale/defaults"),b=y("./attributes");ee.exports=function(v,e,n,t){function o(u,f){return g.coerce(v,e,b,u,f)}var r=o("locations"),d=o("z");if(r&&r.length&&g.isArrayOrTypedArray(d)&&d.length){e._length=Math.min(r.length,d.length);var c,i=o("geojson");(typeof i=="string"&&i!==""||g.isPlainObject(i))&&(c="geojson-id"),o("locationmode",c)==="geojson-id"&&o("featureidkey"),o("text"),o("hovertext"),o("hovertemplate"),o("marker.line.width")&&o("marker.line.color"),o("marker.opacity"),m(v,e,t,o,{prefix:"",cLetter:"z"}),g.coerceSelectionMarkerOpacity(e,o)}else e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":716}],719:[function(y,ee,te){ee.exports=function(g,m,b,v,e){g.location=m.location,g.z=m.z;var n=v[e];return n.fIn&&n.fIn.properties&&(g.properties=n.fIn.properties),g.ct=n.ct,g}},{}],720:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("./attributes"),b=y("../../lib").fillText;ee.exports=function(v,e,n){var t,o,r,d,c=v.cd,i=c[0].trace,u=v.subplot,f=[e,n],s=[e+360,n];for(o=0;o<c.length;
1221o++)if(d=!1,(t=c[o])._polygons){for(r=0;r<t._polygons.length;r++)t._polygons[r].contains(f)&&(d=!d),t._polygons[r].contains(s)&&(d=!d);if(d)break}if(d&&t)return v.x0=v.x1=v.xa.c2p(t.ct),v.y0=v.y1=v.ya.c2p(t.ct),v.index=t.index,v.location=t.loc,v.z=t.z,v.zLabel=g.tickText(u.mockAxis,u.mockAxis.c2l(t.z),"hover").text,v.hovertemplate=t.hovertemplate,function(h,p,a){if(!p.hovertemplate){var x=a.hi||p.hoverinfo,l=String(a.loc),w=x==="all"?m.hoverinfo.flags:x.split("+"),_=w.indexOf("name")!==-1,T=w.indexOf("location")!==-1,k=w.indexOf("z")!==-1,L=w.indexOf("text")!==-1,A=[];!_&&T?h.nameOverride=l:(_&&(h.nameOverride=p.name),T&&A.push(l)),k&&A.push(h.zLabel),L&&b(a,p,A),h.extraText=A.join("<br>")}}(v,i,t),[v]}},{"../../lib":503,"../../plots/cartesian/axes":554,"./attributes":716}],721:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../heatmap/colorbar"),calc:y("./calc"),calcGeoJSON:y("./plot").calcGeoJSON,plot:y("./plot").plot,style:y("./style").style,styleOnSelect:y("./style").styleOnSelect,hoverPoints:y("./hover"),eventData:y("./event_data"),selectPoints:y("./select"),moduleType:"trace",name:"choropleth",basePlotModule:y("../../plots/geo"),categories:["geo","noOpacity","showLegend"],meta:{}}},{"../../plots/geo":589,"../heatmap/colorbar":795,"./attributes":716,"./calc":717,"./defaults":718,"./event_data":719,"./hover":720,"./plot":722,"./select":723,"./style":724}],722:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../lib/geo_location_utils"),v=y("../../lib/topojson_utils").getTopojsonFeatures,e=y("../../plots/cartesian/autorange").findExtremes,n=y("./style").style;ee.exports={calcGeoJSON:function(t,o){for(var r=t[0].trace,d=o[r.geo],c=d._subplot,i=r.locationmode,u=r._length,f=i==="geojson-id"?b.extractTraceFeature(t):v(r,c.topojson),s=[],h=[],p=0;p<u;p++){var a=t[p],x=i==="geojson-id"?a.fOut:b.locationToFeature(i,a.loc,f);if(x){a.geojson=x,a.ct=x.properties.ct,a._polygons=b.feature2polygons(x);var l=b.computeBbox(x);s.push(l[0],l[2]),h.push(l[1],l[3])}else a.geojson=null}if(d.fitbounds==="geojson"&&i==="geojson-id"){var w=b.computeBbox(b.getTraceGeojson(r));s=[w[0],w[2]],h=[w[1],w[3]]}var _={padded:!0};r._extremes.lon=e(d.lonaxis._ax,s,_),r._extremes.lat=e(d.lataxis._ax,h,_)},plot:function(t,o,r){var d=o.layers.backplot.select(".choroplethlayer");m.makeTraceGroups(d,r,"trace choropleth").each(function(c){var i=g.select(this).selectAll("path.choroplethlocation").data(m.identity);i.enter().append("path").classed("choroplethlocation",!0),i.exit().remove(),n(t,c)})}}},{"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/topojson_utils":532,"../../plots/cartesian/autorange":553,"./style":724,"@plotly/d3":58}],723:[function(y,ee,te){ee.exports=function(g,m){var b,v,e,n,t,o=g.cd,r=g.xaxis,d=g.yaxis,c=[];if(m===!1)for(b=0;b<o.length;b++)o[b].selected=0;else for(b=0;b<o.length;b++)(e=(v=o[b]).ct)&&(n=r.c2p(e),t=d.c2p(e),m.contains([n,t],null,b,g)?(c.push({pointNumber:b,lon:e[0],lat:e[1]}),v.selected=1):v.selected=0);return c}},{}],724:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/color"),b=y("../../components/drawing"),v=y("../../components/colorscale");function e(n,t){var o=t[0].trace,r=t[0].node3.selectAll(".choroplethlocation"),d=o.marker||{},c=d.line||{}
1221,i=v.makeColorScaleFuncFromTrace(o);r.each(function(u){g.select(this).attr("fill",i(u.z)).call(m.stroke,u.mlc||c.color).call(b.dashLine,"",u.mlw||c.width||0).style("opacity",d.opacity)}),b.selectedPointStyle(r,o,n)}ee.exports={style:function(n,t){t&&e(n,t)},styleOnSelect:function(n,t){var o=t[0].node3,r=t[0].trace;r.selectedpoints?b.selectedPointStyle(o.selectAll(".choroplethlocation"),r,n):e(n,t)}}},{"../../components/color":366,"../../components/colorscale":378,"../../components/drawing":388,"@plotly/d3":58}],725:[function(y,ee,te){var g=y("../choropleth/attributes"),m=y("../../components/colorscale/attributes"),b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../../plots/attributes"),e=y("../../lib/extend").extendFlat;ee.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},g.featureidkey,{}),below:{valType:"string",editType:"plot"},text:g.text,hovertext:g.hovertext,marker:{line:{color:e({},g.marker.line.color,{editType:"plot"}),width:e({},g.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},g.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},g.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},g.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:g.hoverinfo,hovertemplate:b({},{keys:["properties"]}),showlegend:e({},v.showlegend,{dflt:!1})},m("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../choropleth/attributes":716}],726:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../components/colorscale"),v=y("../../components/drawing"),e=y("../../lib/geojson_utils").makeBlank,n=y("../../lib/geo_location_utils");function t(o){var r,d=o[0].trace,c=d._opts;if(d.selectedpoints){for(var i=v.makeSelectedPointStyleFns(d),u=0;u<o.length;u++){var f=o[u];f.fOut&&(f.fOut.properties.mo2=i.selectedOpacityFn(f))}r={type:"identity",property:"mo2"}}else r=m.isArrayOrTypedArray(d.marker.opacity)?{type:"identity",property:"mo"}:d.marker.opacity;return m.extendFlat(c.fill.paint,{"fill-opacity":r}),m.extendFlat(c.line.paint,{"line-opacity":r}),c}ee.exports={convert:function(o){var r=o[0].trace,d=r.visible===!0&&r._length!==0,c={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},u=r._opts={fill:c,line:i,geojson:e()};if(!d)return u;var f=n.extractTraceFeature(o);if(!f)return u;var s,h,p,a=b.makeColorScaleFuncFromTrace(r),x=r.marker,l=x.line||{};m.isArrayOrTypedArray(x.opacity)&&(s=function(A){var I=A.mo;return g(I)?+m.constrain(I,0,1):0}),m.isArrayOrTypedArray(l.color)&&(h=function(A){return A.mlc}),m.isArrayOrTypedArray(l.width)&&(p=function(A){return A.mlw});for(var w=0;w<o.length;w++){var _=o[w],T=_.fOut;if(T){var k=T.properties;k.fc=a(_.z),s&&(k.mo=s(_)),h&&(k.mlc=h(_)),p&&(k.mlw=p(_)),_.ct=k.ct,_._polygons=n.feature2polygons(T)}}var L=s?{type:"identity",property:"mo"}:x.opacity;return m.extendFlat(c.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":L}),m.extendFlat(i.paint,{"line-color":h?{type:"identity",property:"mlc"}:l.color,"line-width":p?{type:"identity",property:"mlw"}:l.width,"line-opacity":L}),c.layout.visibility="visible",i.layout.visibility="visible",u.geojson={type:"FeatureCollection",features:f},t(o),u},convertOnSelect:t}},{"../../components/colorscale":378,"../../components/drawing":388,"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/geojson_utils":497,"fast-isnumeric":190}],727:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/colorscale/defaults"),b=y("./attributes");ee.exports=function(v,e,n,t){function o(i,u){return g.coerce(v,e,b,i,u)}var r=o("locations"),d=o("z"),c=o("geojson");g.isArrayOrTypedArray(r)&&r.length&&g.isArrayOrTypedArray(d)&&d.length&&(typeof c=="string"&&c!==""||g.isPlainObject(c))?(o("featureidkey"),e._length=Math.min(r.length,d.length),o("below"),o("text"),o("hovertext"),o("hovertemplate"),o("marker.line.width")&&o("marker.line.color"),o("marker.opacity"),m(v,e,t,o,{prefix:"",cLetter:"z"}),g.coerceSelectionMarkerOpacity(e,o)):e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":725}],728:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../heatmap/colorbar"),calc:y("../choropleth/calc"),plot:y("./plot"),hoverPoints:y("../choropleth/hover"),eventData:y("../choropleth/event_data"),selectPoints:y("../choropleth/select"),styleOnSelect:function(g,m){m&&m[0].trace._glTrace.updateOnSelect(m)},getBelow:function(g,m){for(var b=m.getMapLayers(),v=b.length-2;v>=0;v--){var e=b[v].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var n=v+1;n<b.length;n++)if(typeof(e=b[n].id)=="string"&&e.indexOf("plotly-")===-1)return e}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:y("../../plots/mapbox"),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}}
1221,{"../../plots/mapbox":613,"../choropleth/calc":717,"../choropleth/event_data":719,"../choropleth/hover":720,"../choropleth/select":723,"../heatmap/colorbar":795,"./attributes":725,"./defaults":727,"./plot":729}],729:[function(y,ee,te){var g=y("./convert").convert,m=y("./convert").convertOnSelect,b=y("../../plots/mapbox/constants").traceLayerPrefix;function v(n,t){this.type="choroplethmapbox",this.subplot=n,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",b+t+"-fill"],["line",b+t+"-line"]],this.below=null}var e=v.prototype;e.update=function(n){this._update(g(n))},e.updateOnSelect=function(n){this._update(m(n))},e._update=function(n){var t=this.subplot,o=this.layerList,r=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),r!==this.below&&(this._removeLayers(),this._addLayers(n,r),this.below=r);for(var d=0;d<o.length;d++){var c=o[d],i=c[0],u=c[1],f=n[i];t.setOptions(u,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&t.setOptions(u,"setPaintProperty",f.paint)}},e._addLayers=function(n,t){for(var o=this.subplot,r=this.layerList,d=this.sourceId,c=0;c<r.length;c++){var i=r[c],u=i[0],f=n[u];o.addLayer({type:u,id:i[1],source:d,layout:f.layout,paint:f.paint},t)}},e._removeLayers=function(){for(var n=this.subplot.map,t=this.layerList,o=t.length-1;o>=0;o--)n.removeLayer(t[o][1])},e.dispose=function(){var n=this.subplot.map;this._removeLayers(),n.removeSource(this.sourceId)},ee.exports=function(n,t){var o=t[0].trace,r=new v(n,o.uid),d=r.sourceId,c=g(t),i=r.below=n.belowLookup["trace-"+o.uid];return n.map.addSource(d,{type:"geojson",data:c.geojson}),r._addLayers(c,i),t[0].trace._glTrace=r,r}},{"../../plots/mapbox/constants":611,"./convert":726}],730:[function(y,ee,te){var g=y("../../components/colorscale/attributes"),m=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../mesh3d/attributes"),e=y("../../plots/attributes"),n=y("../../lib/extend").extendFlat,t={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:b({editType:"calc"},{keys:["norm"]}),uhoverformat:m("u",1),vhoverformat:m("v",1),whoverformat:m("w",1),xhoverformat:m("x"),yhoverformat:m("y"),zhoverformat:m("z"),showlegend:n({},e.showlegend,{dflt:!1})};n(t,g("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(o){t[o]=v[o]}),t.hoverinfo=n({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),t.transforms=void 0,ee.exports=t},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],731:[function(y,ee,te){var g=y("../../components/colorscale/calc");ee.exports=function(m,b){for(var v=b.u,e=b.v,n=b.w,t=Math.min(b.x.length,b.y.length,b.z.length,v.length,e.length,n.length),o=-1/0,r=1/0,d=0;d<t;d++){var c=v[d],i=e[d],u=n[d],f=Math.sqrt(c*c+i*i+u*u);o=Math.max(o,f),r=Math.min(r,f)}b._len=t,b._normMax=o,g(m,b,{vals:[r,o],containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],732:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_cone3d,m=y("../../../stackgl_modules").gl_cone3d.createConeMesh,b=y("../../lib").simpleMap,v=y("../../lib/gl_format_color").parseColorScale,e=y("../../components/colorscale").extractOpts,n=y("../../plots/gl3d/zip3");function t(u,f){this.scene=u,this.uid=f,this.mesh=null,this.data=null}var o=t.prototype;o.handlePick=function(u){if(u.object===this.mesh){var f=u.index=u.data.index,s=this.data.x[f],h=this.data.y[f],p=this.data.z[f],a=this.data.u[f],x=this.data.v[f],l=this.data.w[f];u.traceCoordinate=[s,h,p,a,x,l,Math.sqrt(a*a+x*x+l*l)];var w=this.data.hovertext||this.data.text;return Array.isArray(w)&&w[f]!==void 0?u.textLabel=w[f]:w&&(u.textLabel=w),!0}};var r={xaxis:0,yaxis:1,zaxis:2},d={tip:1,tail:0,cm:.25,center:.5},c={tip:1,tail:1,cm:.75,center:.5};function i(u,f){var s=u.fullSceneLayout,h=u.dataScale,p={};function a(_,T){var k=s[T],L=h[r[T]];return b(_,function(A){return k.d2l(A)*L})}p.vectors=n(a(f.u,"xaxis"),a(f.v,"yaxis"),a(f.w,"zaxis"),f._len),p.positions=n(a(f.x,"xaxis"),a(f.y,"yaxis"),a(f.z,"zaxis"),f._len);var x=e(f);p.colormap=v(f),p.vertexIntensityBounds=[x.min/f._normMax,x.max/f._normMax],p.coneOffset=d[f.anchor],f.sizemode==="scaled"?p.coneSize=f.sizeref||.5:p.coneSize=f.sizeref&&f._normMax?f.sizeref/f._normMax:.5;var l=g(p),w=f.lightposition;return l.lightPosition=[w.x,w.y,w.z],l.ambient=f.lighting.ambient,l.diffuse=f.lighting.diffuse,l.specular=f.lighting.specular,l.roughness=f.lighting.roughness,l.fresnel=f.lighting.fresnel,l.opacity=f.opacity,f._pad=c[f.anchor]*l.vectorScale*l.coneScale*f._normMax,l}o.update=function(u){this.data=u;var f=i(this.scene,u);this.mesh.update(f)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},ee.exports=function(u,f){var s=u.glplot.gl,h=i(u,f),p=m(s,h),a=new t(u,f.uid);return a.mesh=p,a.data=f,p._trace=a,u.glplot.add(p),a}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/gl3d/zip3":609}],733:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/colorscale/defaults"),b=y("./attributes");ee.exports=function(v,e,n,t){function o(s,h){return g.coerce(v,e,b,s,h)}
1221var r=o("u"),d=o("v"),c=o("w"),i=o("x"),u=o("y"),f=o("z");r&&r.length&&d&&d.length&&c&&c.length&&i&&i.length&&u&&u.length&&f&&f.length?(o("sizeref"),o("sizemode"),o("anchor"),o("lighting.ambient"),o("lighting.diffuse"),o("lighting.specular"),o("lighting.roughness"),o("lighting.fresnel"),o("lightposition.x"),o("lightposition.y"),o("lightposition.z"),m(v,e,t,o,{prefix:"",cLetter:"c"}),o("text"),o("hovertext"),o("hovertemplate"),o("uhoverformat"),o("vhoverformat"),o("whoverformat"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),e._length=null):e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":730}],734:[function(y,ee,te){ee.exports={moduleType:"trace",name:"cone",basePlotModule:y("../../plots/gl3d"),categories:["gl3d","showLegend"],attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:y("./calc"),plot:y("./convert"),eventData:function(g,m){return g.norm=m.traceCoordinate[6],g},meta:{}}},{"../../plots/gl3d":598,"./attributes":730,"./calc":731,"./convert":732,"./defaults":733}],735:[function(y,ee,te){var g=y("../heatmap/attributes"),m=y("../scatter/attributes"),b=y("../../plots/cartesian/axis_format_attributes"),v=b.axisHoverFormat,e=b.descriptionOnlyNumbers,n=y("../../components/colorscale/attributes"),t=y("../../components/drawing/attributes").dash,o=y("../../plots/font_attributes"),r=y("../../lib/extend").extendFlat,d=y("../../constants/filter_ops"),c=d.COMPARISON_OPS2,i=d.INTERVAL_OPS,u=m.line;ee.exports=r({z:g.z,x:g.x,x0:g.x0,dx:g.dx,y:g.y,y0:g.y0,dy:g.dy,xperiod:g.xperiod,yperiod:g.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,text:g.text,hovertext:g.hovertext,transpose:g.transpose,xtype:g.xtype,ytype:g.ytype,xhoverformat:v("x"),yhoverformat:v("y"),zhoverformat:v("z",1),hovertemplate:g.hovertemplate,texttemplate:r({},g.texttemplate,{}),textfont:r({},g.textfont,{}),hoverongaps:g.hoverongaps,connectgaps:r({},g.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:o({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:e("contour label")},operation:{valType:"enumerated",values:[].concat(c).concat(i),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},u.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},u.smoothing,{}),editType:"plot"}},n("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../constants/filter_ops":475,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../heatmap/attributes":792,"../scatter/attributes":926}],736:[function(y,ee,te){var g=y("../../components/colorscale"),m=y("../heatmap/calc"),b=y("./set_contours"),v=y("./end_plus");ee.exports=function(e,n){var t=m(e,n),o=t[0].z;b(n,o);var r,d=n.contours,c=g.extractOpts(n);if(d.coloring==="heatmap"&&c.auto&&n.autocontour===!1){var i=d.start,u=v(d),f=d.size||1,s=Math.floor((u-i)/f)+1;isFinite(f)||(f=1,s=1);var h=i-f/2;r=[h,h+s*f]}else r=o;return g.calc(e,n,{vals:r,cLetter:"z"}),t}},{"../../components/colorscale":378,"../heatmap/calc":793,"./end_plus":746,"./set_contours":754}],737:[function(y,ee,te){ee.exports=function(g,m){var b,v=g[0],e=v.z;switch(m.type){case"levels":var n=Math.min(e[0][0],e[0][1]);for(b=0;b<g.length;b++){var t=g[b];t.prefixBoundary=!t.edgepaths.length&&(n>t.level||t.starts.length&&n===t.level)}break;case"constraint":if(v.prefixBoundary=!1,v.edgepaths.length)return;var o=v.x.length,r=v.y.length,d=-1/0,c=1/0;for(b=0;b<r;b++)c=Math.min(c,e[b][0]),c=Math.min(c,e[b][o-1]),d=Math.max(d,e[b][0]),d=Math.max(d,e[b][o-1]);for(b=1;b<o-1;b++)c=Math.min(c,e[0][b]),c=Math.min(c,e[r-1][b]),d=Math.max(d,e[0][b]),d=Math.max(d,e[r-1][b]);var i,u,f=m.value;switch(m._operation){case">":f>d&&(v.prefixBoundary=!0);break;case"<":(f<c||v.starts.length&&f===c)&&(v.prefixBoundary=!0);break;case"[]":i=Math.min(f[0],f[1]),((u=Math.max(f[0],f[1]))<c||i>d||v.starts.length&&u===c)&&(v.prefixBoundary=!0);break;case"][":i=Math.min(f[0],f[1]),u=Math.max(f[0],f[1]),i<c&&u>d&&(v.prefixBoundary=!0)}}}},{}],738:[function(y,ee,te){var g=y("../../components/colorscale"),m=y("./make_color_map"),b=y("./end_plus");ee.exports={min:"zmin",max:"zmax",calc:function(v,e,n){var t=e.contours,o=e.line,r=t.size||1,d=t.coloring,c=m(e,{isColorbar:!0});if(d==="heatmap"){var i=g.extractOpts(e);n._fillgradient=i.reversescale?g.flipScale(i.colorscale):i.colorscale,n._zrange=[i.min,i.max]}else d==="fill"&&(n._fillcolor=c);n._line={color:d==="lines"?c:o.color,width:t.showlines!==!1?o.width:0,dash:o.dash},n._levels={start:t.start,end:b(t),size:r}}}},{"../../components/colorscale":378,"./end_plus":746,"./make_color_map":751}],739:[function(y,ee,te){ee.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],740:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("./label_defaults"),b=y("../../components/color"),v=b.addOpacity,e=b.opacity,n=y("../../constants/filter_ops"),t=n.CONSTRAINT_REDUCTION,o=n.COMPARISON_OPS2;ee.exports=function(r,d,c,i,u,f){var s,h,p,a=d.contours,x=c("contours.operation");a._operation=t[x],function(l,w){var _;o.indexOf(w.operation)===-1?(l("contours.value",[0,1]),Array.isArray(w.value)?w.value.length>2?w.value=w.value.slice(2):w.length===0?w.value=[0,1]:w.length<2?(_=parseFloat(w.value[0]),w.value=[_,_+1]):w.value=[parseFloat(w.value[0]),parseFloat(w.value[1])]:g(w.value)&&(_=parseFloat(w.value),w.value=[_,_+1])):(l("contours.value",0),g(w.value)||(Array.isArray(w.value)?w.value=parseFloat(w.value[0]):w.value=0))}(c,a),x==="="?s=a.showlines=!0:(s=c("contours.showlines"),p=c("fillcolor",v((r.line||{}).color||u,.5))),s&&(h=c("line.color",p&&e(p)?v(d.fillcolor,1):u),c("line.width",2),c("line.dash")),c("line.smoothing"),m(c,i,h,f)}},{"../../components/color":366,"../../constants/filter_ops":475,"./label_defaults":750,"fast-isnumeric":190}],741:[function(y,ee,te){var g=y("../../constants/filter_ops"),m=y("fast-isnumeric");function b(n,t){var o,r=Array.isArray(t);function d(c){return m(c)?+c:null}return g.COMPARISON_OPS2.indexOf(n)!==-1?o=d(r?t[0]:t):g.INTERVAL_OPS.indexOf(n)!==-1?o=r?[d(t[0]),d(t[1])]:[d(t),d(t)]:g.SET_OPS.indexOf(n)!==-1&&(o=r?t.map(d):[d(t)]),o}function v(n){return function(t){t=b(n,t);var o=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:o,end:r,size:r-o}}}function e(n){return function(t){return{start:t=b(n,t),end:1/0,size:1/0}}}ee.exports={"[]":v("[]"),"][":v("]["),">":e(">"),"<":e("<"),"=":e("=")}},{"../../constants/filter_ops":475,"fast-isnumeric":190}],742:[function(y,ee,te){ee.exports=function(g,m,b,v){var e=v("contours.start"),n=v("contours.end"),t=e===!1||n===!1,o=b("contours.size");!(t?m.autocontour=!0:b("autocontour",!1))&&o||b("ncontours")}},{}],743:[function(y,ee,te){var g=y("../../lib");function m(b){return g.extendFlat({},b,{edgepaths:g.extendDeep([],b.edgepaths),paths:g.extendDeep([],b.paths),starts:g.extendDeep([],b.starts)})}ee.exports=function(b,v){var e,n,t,o=function(c){return c.reverse()},r=function(c){return c};switch(v){case"=":case"<":return b;case">
1221":for(b.length!==1&&g.warn("Contour data invalid for the specified inequality operation."),n=b[0],e=0;e<n.edgepaths.length;e++)n.edgepaths[e]=o(n.edgepaths[e]);for(e=0;e<n.paths.length;e++)n.paths[e]=o(n.paths[e]);for(e=0;e<n.starts.length;e++)n.starts[e]=o(n.starts[e]);return b;case"][":var d=o;o=r,r=d;case"[]":for(b.length!==2&&g.warn("Contour data invalid for the specified inequality range operation."),n=m(b[0]),t=m(b[1]),e=0;e<n.edgepaths.length;e++)n.edgepaths[e]=o(n.edgepaths[e]);for(e=0;e<n.paths.length;e++)n.paths[e]=o(n.paths[e]);for(e=0;e<n.starts.length;e++)n.starts[e]=o(n.starts[e]);for(;t.edgepaths.length;)n.edgepaths.push(r(t.edgepaths.shift()));for(;t.paths.length;)n.paths.push(r(t.paths.shift()));for(;t.starts.length;)n.starts.push(r(t.starts.shift()));return[n]}}},{"../../lib":503}],744:[function(y,ee,te){var g=y("../../lib"),m=y("../heatmap/xyz_defaults"),b=y("../scatter/period_defaults"),v=y("./constraint_defaults"),e=y("./contours_defaults"),n=y("./style_defaults"),t=y("../heatmap/label_defaults"),o=y("./attributes");ee.exports=function(r,d,c,i){function u(s,h){return g.coerce(r,d,o,s,h)}if(m(r,d,u,i)){b(r,d,i,u),u("xhoverformat"),u("yhoverformat"),u("text"),u("hovertext"),u("hoverongaps"),u("hovertemplate");var f=u("contours.type")==="constraint";u("connectgaps",g.isArray1D(d.z)),f?v(r,d,u,i,c):(e(r,d,u,function(s){return g.coerce2(r,d,o,s)}),n(r,d,u,i)),d.contours&&d.contours.coloring==="heatmap"&&t(u,i)}else d.visible=!1}},{"../../lib":503,"../heatmap/label_defaults":802,"../heatmap/xyz_defaults":807,"../scatter/period_defaults":946,"./attributes":735,"./constraint_defaults":740,"./contours_defaults":742,"./style_defaults":756}],745:[function(y,ee,te){var g=y("../../lib"),m=y("./constraint_mapping"),b=y("./end_plus");ee.exports=function(v,e,n){for(var t=v.type==="constraint"?m[v._operation](v.value):v,o=t.size,r=[],d=b(t),c=n.trace._carpetTrace,i=c?{xaxis:c.aaxis,yaxis:c.baxis,x:n.a,y:n.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:n.x,y:n.y},u=t.start;u<d;u+=o)if(r.push(g.extendFlat({level:u,crossings:{},starts:[],edgepaths:[],paths:[],z:n.z,smoothing:n.trace.line.smoothing},i)),r.length>1e3){g.warn("Too many contours, clipping at 1000",v);break}return r}},{"../../lib":503,"./constraint_mapping":741,"./end_plus":746}],746:[function(y,ee,te){ee.exports=function(g){return g.end+g.size/1e6}},{}],747:[function(y,ee,te){var g=y("../../lib"),m=y("./constants");function b(n,t,o,r){return Math.abs(n[0]-t[0])<o&&Math.abs(n[1]-t[1])<r}function v(n,t,o,r,d){var c,i=t.join(","),u=n.crossings[i],f=function(X,J,re){var ne=0,se=0;return X>20&&J?X===208||X===1114?ne=re[0]===0?1:-1:se=re[1]===0?1:-1:m.BOTTOMSTART.indexOf(X)!==-1?se=1:m.LEFTSTART.indexOf(X)!==-1?ne=1:m.TOPSTART.indexOf(X)!==-1?se=-1:ne=-1,[ne,se]}(u,o,t),s=[e(n,t,[-f[0],-f[1]])],h=n.z.length,p=n.z[0].length,a=t.slice(),x=f.slice();for(c=0;c<1e4;c++){if(u>20?(u=m.CHOOSESADDLE[u][(f[0]||f[1])<0?0:1],n.crossings[i]=m.SADDLEREMAINDER[u]):delete n.crossings[i],!(f=m.NEWDELTA[u])){g.log("Found bad marching index:",u,t,n.level);break}s.push(e(n,t,f)),t[0]+=f[0],t[1]+=f[1],i=t.join(","),b(s[s.length-1],s[s.length-2],r,d)&&s.pop();var l=f[0]&&(t[0]<0||t[0]>p-2)||f[1]&&(t[1]<0||t[1]>h-2);if(t[0]===a[0]&&t[1]===a[1]&&f[0]===x[0]&&f[1]===x[1]||o&&l)break;u=n.crossings[i]}c===1e4&&g.log("Infinite loop in contour?");var w,_,T,k,L,A,I,P,S,E,D,F,H,V,Z,K=b(s[0],s[s.length-1],r,d),q=0,W=.2*n.smoothing,$=[],R=0;for(c=1;c<s.length;c++)F=s[c],H=s[c-1],V=void 0,Z=void 0,V=F[2]-H[2],Z=F[3]-H[3],q+=I=Math.sqrt(V*V+Z*Z),$.push(I);var N=q/$.length*W;function U(X){return s[X%s.length]}for(c=s.length-2;c>=R;c--)if((w=$[c])<N){for(T=0,_=c-1;_>=R&&w+$[_]<N;_--)w+=$[_];if(K&&c===s.length-2)for(T=0;T<_&&w+$[T]<N;T++)w+=$[T];L=c-_+T+1,A=Math.floor((c+_+T+2)/2),k=K||c!==s.length-2?K||_!==-1?L%2?U(A):[(U(A)[0]+U(A+1)[0])/2,(U(A)[1]+U(A+1)[1])/2]:s[0]:s[s.length-1],s.splice(_+1,c-_+1,k),c=_+1,T&&(R=T),K&&(c===s.length-2?s[T]=s[s.length-1]:c===0&&(s[s.length-1]=s[0]))}for(s.splice(0,R),c=0;c<s.length;c++)s[c].length=2;if(!(s.length<2))if(K)s.pop(),n.paths.push(s);else{o||g.log("Unclosed interior contour?",n.level,a.join(","),s.join("L"));var Q=!1;for(P=0;P<n.edgepaths.length;P++)if(E=n.edgepaths[P],!Q&&b(E[0],s[s.length-1],r,d)){s.pop(),Q=!0;var j=!1;for(S=0;S<n.edgepaths.length;S++)if(b((D=n.edgepaths[S])[D.length-1],s[0],r,d)){j=!0,s.shift(),n.edgepaths.splice(P,1),S===P?n.paths.push(s.concat(D)):(S>P&&S--,n.edgepaths[S]=D.concat(s,E));break}j||(n.edgepaths[P]=s.concat(E))}for(P=0;P<n.edgepaths.length&&!Q;P++)b((E=n.edgepaths[P])[E.length-1],s[0],r,d)&&(s.shift(),n.edgepaths[P]=E.concat(s),Q=!0);Q||n.edgepaths.push(s)}}function e(n,t,o){var r=t[0]+Math.max(o[0],0),d=t[1]+Math.max(o[1],0),c=n.z[d][r],i=n.xaxis,u=n.yaxis;if(o[1]){var f=(n.level-c)/(n.z[d][r+1]-c),s=(f!==1?(1-f)*i.c2l(n.x[r]):0)+(f!==0?f*i.c2l(n.x[r+1]):0);return[i.c2p(i.l2c(s),!0),u.c2p(n.y[d],!0),r+f,d]}var h=(n.level-c)/(n.z[d+1][r]-c),p=(h!==1?(1-h)*u.c2l(n.y[d]):0)+(h!==0?h*u.c2l(n.y[d+1]):0);return[i.c2p(n.x[r],!0),u.c2p(u.l2c(p),!0),r,d+h]}ee.exports=function(n,t,o){var r,d,c,i;for(t=t||.01,o=o||.01,d=0;d<n.length;d++){for(c=n[d],i=0;i<c.starts.length;i++)v(c,c.starts[i],"edge",t,o);for(r=0;Object.keys(c.crossings).length&&r<1e4;)r++,v(c,Object.keys(c.crossings)[0].split(",").map(Number),void 0,t,o);r===1e4&&g.log("Infinite loop in contour?")}}},{"../../lib":503,"./constants":739}],748:[function(y,ee,te){var g=y("../../components/color"),m=y("../heatmap/hover");ee.exports=function(b,v,e,n,t){t||(t={}),t.isContour=!0;var o=m(b,v,e,n,t);return o&&o.forEach(function(r){var d=r.trace;d.contours.type==="constraint"&&(d.fillcolor&&g.opacity(d.fillcolor)?r.color=g.addOpacity(d.fillcolor,1):d.contours.showlines&&g.opacity(d.line.color)&&(r.color=g.addOpacity(d.line.color,1)))}),o}},{"../../components/color":366,"../heatmap/hover":799}],749:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc"),plot:y("./plot").plot,style:y("./style"),colorbar:y("./colorbar"),hoverPoints:y("./hover"),moduleType:"trace",name:"contour",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},{"../../plots/cartesian":568,"./attributes":735,"./calc":736,"./colorbar":738,"./defaults":744,"./hover":748,"./plot":753,"./style":755}],750:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b,v,e){if(e||(e={}),m("contours.showlabels")){var n=b.font;g.coerceFont(m,"contours.labelfont",{family:n.family,size:n.size,color:v}),m("contours.labelformat")}e.hasHover!==!1&&m("zhoverformat")}},{"../../lib":503}],751:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/colorscale"),b=y("./end_plus");ee.exports=function(v){var e=v.contours,n=e.start,t=b(e),o=e.size||1,r=Math.floor((t-n)/o)+1,d=e.coloring==="lines"?0:1,c=m.extractOpts(v);isFinite(o)||(o=1,r=1);var i,u,f=c.reversescale?m.flipScale(c.colorscale):c.colorscale,s=f.length,h=new Array(s),p=new Array(s);if(e.coloring==="heatmap"){var a=c.min,x=c.max;for(u=0;
1221u<s;u++)i=f[u],h[u]=i[0]*(x-a)+a,p[u]=i[1];var l=g.extent([a,x,e.start,e.start+o*(r-1)]),w=l[a<x?0:1],_=l[a<x?1:0];w!==a&&(h.splice(0,0,w),p.splice(0,0,p[0])),_!==x&&(h.push(_),p.push(p[p.length-1]))}else for(u=0;u<s;u++)i=f[u],h[u]=(i[0]*(r+d-1)-d/2)*o+n,p[u]=i[1];return m.makeColorScaleFunc({domain:h,range:p},{noNumericCheck:!0})}},{"../../components/colorscale":378,"./end_plus":746,"@plotly/d3":58}],752:[function(y,ee,te){var g=y("./constants");function m(b,v){var e=(v[0][0]>b?0:1)+(v[0][1]>b?0:2)+(v[1][1]>b?0:4)+(v[1][0]>b?0:8);return e===5||e===10?b>(v[0][0]+v[0][1]+v[1][0]+v[1][1])/4?e===5?713:1114:e===5?104:208:e===15?0:e}ee.exports=function(b){var v,e,n,t,o,r,d,c,i,u=b[0].z,f=u.length,s=u[0].length,h=f===2||s===2;for(e=0;e<f-1;e++)for(t=[],e===0&&(t=t.concat(g.BOTTOMSTART)),e===f-2&&(t=t.concat(g.TOPSTART)),v=0;v<s-1;v++)for(n=t.slice(),v===0&&(n=n.concat(g.LEFTSTART)),v===s-2&&(n=n.concat(g.RIGHTSTART)),o=v+","+e,r=[[u[e][v],u[e][v+1]],[u[e+1][v],u[e+1][v+1]]],i=0;i<b.length;i++)(d=m((c=b[i]).level,r))&&(c.crossings[o]=d,n.indexOf(d)!==-1&&(c.starts.push([v,e]),h&&n.indexOf(d,n.indexOf(d)+1)!==-1&&c.starts.push([v,e])))}},{"./constants":739}],753:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../components/drawing"),v=y("../../components/colorscale"),e=y("../../lib/svg_text_utils"),n=y("../../plots/cartesian/axes"),t=y("../../plots/cartesian/set_convert"),o=y("../heatmap/plot"),r=y("./make_crossings"),d=y("./find_all_paths"),c=y("./empty_pathinfo"),i=y("./convert_to_constraints"),u=y("./close_boundaries"),f=y("./constants"),s=f.LABELOPTIMIZER;function h(x,l){var w,_,T,k,L,A,I,P="",S=0,E=x.edgepaths.map(function(K,q){return q}),D=!0;function F(K){return Math.abs(K[1]-l[2][1])<.01}function H(K){return Math.abs(K[0]-l[0][0])<.01}function V(K){return Math.abs(K[0]-l[2][0])<.01}for(;E.length;){for(A=b.smoothopen(x.edgepaths[S],x.smoothing),P+=D?A:A.replace(/^M/,"L"),E.splice(E.indexOf(S),1),w=x.edgepaths[S][x.edgepaths[S].length-1],k=-1,T=0;T<4;T++){if(!w){m.log("Missing end?",S,x);break}for(I=w,Math.abs(I[1]-l[0][1])<.01&&!V(w)?_=l[1]:H(w)?_=l[0]:F(w)?_=l[3]:V(w)&&(_=l[2]),L=0;L<x.edgepaths.length;L++){var Z=x.edgepaths[L][0];Math.abs(w[0]-_[0])<.01?Math.abs(w[0]-Z[0])<.01&&(Z[1]-w[1])*(_[1]-Z[1])>=0&&(_=Z,k=L):Math.abs(w[1]-_[1])<.01?Math.abs(w[1]-Z[1])<.01&&(Z[0]-w[0])*(_[0]-Z[0])>=0&&(_=Z,k=L):m.log("endpt to newendpt is not vert. or horz.",w,_,Z)}if(w=_,k>=0)break;P+="L"+_}if(k===x.edgepaths.length){m.log("unclosed perimeter path");break}S=k,(D=E.indexOf(S)===-1)&&(S=E[0],P+="Z")}for(S=0;S<x.paths.length;S++)P+=b.smoothclosed(x.paths[S],x.smoothing);return P}function p(x,l,w,_){var T=l.width/2,k=l.height/2,L=x.x,A=x.y,I=x.theta,P=Math.cos(I)*T,S=Math.sin(I)*T,E=(L>_.center?_.right-L:L-_.left)/(P+Math.abs(Math.sin(I)*k)),D=(A>_.middle?_.bottom-A:A-_.top)/(Math.abs(S)+Math.cos(I)*k);if(E<1||D<1)return 1/0;var F=s.EDGECOST*(1/(E-1)+1/(D-1));F+=s.ANGLECOST*I*I;for(var H=L-P,V=A-S,Z=L+P,K=A+S,q=0;q<w.length;q++){var W=w[q],$=Math.cos(W.theta)*W.width/2,R=Math.sin(W.theta)*W.width/2,N=2*m.segmentDistance(H,V,Z,K,W.x-$,W.y-R,W.x+$,W.y+R)/(l.height+W.height),U=W.level===l.level,Q=U?s.SAMELEVELDISTANCE:1;if(N<=Q)return 1/0;F+=s.NEIGHBORCOST*(U?s.SAMELEVELFACTOR:1)/(N-Q)}return F}function a(x){var l,w,_=x.trace._emptypoints,T=[],k=x.z.length,L=x.z[0].length,A=[];for(l=0;l<L;l++)A.push(1);for(l=0;l<k;l++)T.push(A.slice());for(l=0;l<_.length;l++)T[(w=_[l])[0]][w[1]]=0;return x.zmask=T,T}te.plot=function(x,l,w,_){var T=l.xaxis,k=l.yaxis;m.makeTraceGroups(_,w,"contour").each(function(L){var A=g.select(this),I=L[0],P=I.trace,S=I.x,E=I.y,D=P.contours,F=c(D,l,I),H=m.ensureSingle(A,"g","heatmapcoloring"),V=[];D.coloring==="heatmap"&&(V=[L]),o(x,l,V,H),r(F),d(F);var Z=T.c2p(S[0],!0),K=T.c2p(S[S.length-1],!0),q=k.c2p(E[0],!0),W=k.c2p(E[E.length-1],!0),$=[[Z,W],[K,W],[K,q],[Z,q]],R=F;D.type==="constraint"&&(R=i(F,D._operation)),function(N,U,Q){var j=m.ensureSingle(N,"g","contourbg").selectAll("path").data(Q.coloring==="fill"?[0]:[]);j.enter().append("path"),j.exit().remove(),j.attr("d","M"+U.join("L")+"Z").style("stroke","none")}(A,$,D),function(N,U,Q,j){var X=j.coloring==="fill"||j.type==="constraint"&&j._operation!=="=",J="M"+Q.join("L")+"Z";X&&u(U,j);var re=m.ensureSingle(N,"g","contourfill").selectAll("path").data(X?U:[]);re.enter().append("path"),re.exit().remove(),re.each(function(ne){var se=(ne.prefixBoundary?J:"")+h(ne,Q);se?g.select(this).attr("d",se).style("stroke","none"):g.select(this).remove()})}(A,R,$,D),function(N,U,Q,j,X){var J=m.ensureSingle(N,"g","contourlines"),re=X.showlines!==!1,ne=X.showlabels,se=re&&ne,oe=te.createLines(J,re||ne,U),pe=te.createLineClip(J,se,Q,j.trace.uid),ce=N.selectAll("g.contourlabels").data(ne?[0]:[]);if(ce.exit().remove(),ce.enter().append("g").classed("contourlabels",!0),ne){var de=[],xe=[];m.clearLocationCache();var we=te.labelFormatter(Q,j),be=b.tester.append("text").attr("data-notex",1).call(b.font,X.labelfont),Ee=U[0].xaxis,fe=U[0].yaxis,me=Ee._length,Te=fe._length,_e=Ee.range,Ae=fe.range,Pe=m.aggNums(Math.min,null,
vendor: 8,033 bytes, line 1221
1221j.x),De=m.aggNums(Math.max,null,j.x),Ve=m.aggNums(Math.min,null,j.y),Qe=m.aggNums(Math.max,null,j.y),Oe=Math.max(Ee.c2p(Pe,!0),0),Ue=Math.min(Ee.c2p(De,!0),me),Ge=Math.max(fe.c2p(Qe,!0),0),Ye=Math.min(fe.c2p(Ve,!0),Te),tt={};_e[0]<_e[1]?(tt.left=Oe,tt.right=Ue):(tt.left=Ue,tt.right=Oe),Ae[0]<Ae[1]?(tt.top=Ge,tt.bottom=Ye):(tt.top=Ye,tt.bottom=Ge),tt.middle=(tt.top+tt.bottom)/2,tt.center=(tt.left+tt.right)/2,de.push([[tt.left,tt.top],[tt.right,tt.top],[tt.right,tt.bottom],[tt.left,tt.bottom]]);var lt=Math.sqrt(me*me+Te*Te),vt=f.LABELDISTANCE*lt/Math.max(1,U.length/f.LABELINCREASE);oe.each(function(It){var St=te.calcTextOpts(It.level,we,be,Q);g.select(this).selectAll("path").each(function(){var rt=m.getVisibleSegment(this,tt,St.height/2);if(rt&&!(rt.len<(St.width+St.height)*f.LABELMIN))for(var et=Math.min(Math.ceil(rt.len/vt),f.LABELMAX),Tt=0;Tt<et;Tt++){var Vt=te.findBestTextLocation(this,rt,St,xe,tt);if(!Vt)break;te.addLabelData(Vt,St,xe,de)}})}),be.remove(),te.drawLabels(ce,xe,Q,pe,se?de:null)}ne&&!re&&oe.remove()}(A,F,x,I,D),function(N,U,Q,j,X){var J=j.trace,re=Q._fullLayout._clips,ne="clip"+J.uid,se=re.selectAll("#"+ne).data(J.connectgaps?[]:[0]);if(se.enter().append("clipPath").classed("contourclip",!0).attr("id",ne),se.exit().remove(),J.connectgaps===!1){var oe={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:U.xaxis,yaxis:U.yaxis,x:j.x,y:j.y,z:a(j),smoothing:0};r([oe]),d([oe]),u([oe],{type:"levels"}),m.ensureSingle(se,"path","").attr("d",(oe.prefixBoundary?"M"+X.join("L")+"Z":"")+h(oe,X))}else ne=null;b.setClipUrl(N,ne,Q)}(A,l,x,I,$)})},te.createLines=function(x,l,w){var _=w[0].smoothing,T=x.selectAll("g.contourlevel").data(l?w:[]);if(T.exit().remove(),T.enter().append("g").classed("contourlevel",!0),l){var k=T.selectAll("path.openline").data(function(A){return A.pedgepaths||A.edgepaths});k.exit().remove(),k.enter().append("path").classed("openline",!0),k.attr("d",function(A){return b.smoothopen(A,_)}).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke");var L=T.selectAll("path.closedline").data(function(A){return A.ppaths||A.paths});L.exit().remove(),L.enter().append("path").classed("closedline",!0),L.attr("d",function(A){return b.smoothclosed(A,_)}).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke")}return T},te.createLineClip=function(x,l,w,_){var T=l?"clipline"+_:null,k=w._fullLayout._clips.selectAll("#"+T).data(l?[0]:[]);return k.exit().remove(),k.enter().append("clipPath").classed("contourlineclip",!0).attr("id",T),b.setClipUrl(x,T,w),k},te.labelFormatter=function(x,l){var w=x._fullLayout,_=l.trace,T=_.contours,k={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(T.labelformat)k.tickformat=T.labelformat,t(k,w);else{var L=v.extractOpts(_);if(L&&L.colorbar&&L.colorbar._axis)k=L.colorbar._axis;else{if(T.type==="constraint"){var A=T.value;Array.isArray(A)?k.range=[A[0],A[A.length-1]]:k.range=[A,A]}else k.range=[T.start,T.end],k.nticks=(T.end-T.start)/T.size;k.range[0]===k.range[1]&&(k.range[1]+=k.range[0]||1),k.nticks||(k.nticks=1e3),t(k,w),n.prepTicks(k),k._tmin=null,k._tmax=null}}return function(I){return n.tickText(k,I).text}},te.calcTextOpts=function(x,l,w,_){var T=l(x);w.text(T).call(e.convertToTspans,_);var k=w.node(),L=b.bBox(k,!0);return{text:T,width:L.width,height:L.height,fontSize:+k.style["font-size"].replace("px",""),level:x,dy:(L.top+L.bottom)/2}},te.findBestTextLocation=function(x,l,w,_,T){var k,L,A,I,P,S=w.width;l.isClosed?(L=l.len/s.INITIALSEARCHPOINTS,k=l.min+L/2,A=l.max):(L=(l.len-S)/(s.INITIALSEARCHPOINTS+1),k=l.min+L+S/2,A=l.max-(L+S)/2);for(var E=1/0,D=0;D<s.ITERATIONS;D++){for(var F=k;F<A;F+=L){var H=m.getTextLocation(x,l.total,F,S),V=p(H,w,_,T);V<E&&(E=V,P=H,I=F)}if(E>2*s.MAXCOST)break;D&&(L/=2),A=(k=I-L/2)+1.5*L}if(E<=s.MAXCOST)return P},te.addLabelData=function(x,l,w,_){var T=l.fontSize,k=l.width+T/3,L=Math.max(0,l.height-T/3),A=x.x,I=x.y,P=x.theta,S=Math.sin(P),E=Math.cos(P),D=function(H,V){return[A+H*E-V*S,I+H*S+V*E]},F=[D(-k/2,-L/2),D(-k/2,L/2),D(k/2,L/2),D(k/2,-L/2)];w.push({text:l.text,x:A,y:I,dy:l.dy,theta:P,level:l.level,width:k,height:L}),_.push(F)},te.drawLabels=function(x,l,w,_,T){var k=x.selectAll("text").data(l,function(I){return I.text+","+I.x+","+I.y+","+I.theta});if(k.exit().remove(),k.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(I){var P=I.x+Math.sin(I.theta)*I.dy,S=I.y-Math.cos(I.theta)*I.dy;g.select(this).text(I.text).attr({x:P,y:S,transform:"rotate("+180*I.theta/Math.PI+" "+P+" "+S+")"}).call(e.convertToTspans,w)}),T){for(var L="",A=0;A<T.length;A++)L+="M"+T[A].join("L")+"Z";m.ensureSingle(_,"path","").attr("d",L)}}},{"../../components/colorscale":378,"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/set_convert":576,"../heatmap/plot":804,"./close_boundaries":737,"./constants":739,"./convert_to_constraints":743,"./empty_pathinfo":745,"./find_all_paths":747,"./make_crossings":752,"@plotly/d3":58}],754:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../lib");function b(v,e,n){var t={type:"linear",range:[v,e]};return g.autoTicks(t,(e-v)/(n||15)),t}ee.exports=function(v,e){var n=v.contours;if(v.autocontour){var t=v.zmin,o=v.zmax;(v.zauto||t===void 0)&&(t=m.aggNums(Math.min,null,e)),(v.zauto||o===void 0)&&(o=m.aggNums(Math.max,null,e));var r=b(t,o,v.ncontours);n.size=r.dtick,n.start=g.tickFirst(r),r.range.reverse(),n.end=g.tickFirst(r),n.start===t&&(n.start+=n.size),n.end===o&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),v._input.contours||(v._input.contours={}),m.extendFlat(v._input.contours,{start:n.start,end:n.end,size:n.size}),v._input.autocontour=!0}else if(n.type!=="constraint"){var d,c=n.start,i=n.end,u=v._input.contours;c>i&&(n.start=u.start=i,i=n.end=u.end=c,c=n.start),!(n.size>0)&&(d=c===i?1:b(c,i,v.ncontours).dtick,u.size=n.size=d)}}},{"../../lib":503,"../../plots/cartesian/axes":554}],755:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/drawing"),b=y("../heatmap/style"),v=y("./make_color_map");ee.exports=function(e){var n=g.select(e).selectAll("g.contour");n.style("opacity",function(t){return t[0].trace.opacity}),n.each(function(t){var o=g.select(this),r=t[0].trace,d=r.contours,c=r.line,i=d.size||1,u=d.start,f=d.type==="constraint",s=!f&&d.coloring==="lines",h=!f&&d.coloring==="fill",p=s||h?v(r):null;o.selectAll("g.contourlevel").each(function(l){g.select(this).selectAll("path").call(m.lineGroupStyle,c.width,s?p(l.level):c.color,c.dash)});var a=d.labelfont;if(o.selectAll("g.contourlabels text").each(function(l){m.font(g.select(this),{family:a.family,size:a.size,color:a.color||(s?p(l.level):c.color)})}),f)o.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(h){var x;o.selectAll("g.contourfill path").style("fill",function(l){return x===void 0&&(x=l.level),p(l.level+.5*i)}),x===void 0&&(x=u),o.selectAll("g.contourbg path").style("fill",p(x-.5*i))}}),b(e)}},{"../../components/drawing":388,"../heatmap/style":805,"./make_color_map":751,"@plotly/d3":58}],756:[function(y,ee,te){var g=y("../../components/colorscale/defaults"),m=y("./label_defaults");ee.exports=function(b,v,e,n,t){var o,r=e("contours.coloring"),d="";r==="fill"&&(o=e("contours.showlines")),o!==!1&&(r!=="lines"&&(d=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(b.showlegend!==!0&&(v.showlegend=!1),v._dfltShowLegend=!1,g(b,v,n,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),m(e,n,d,t)}},{"../../components/colorscale/defaults":376,"./label_defaults":750}],757:[function(y,ee,te){var g=y("../heatmap/attributes"),m=y("../contour/attributes"),b=y("../../components/colorscale/attributes"),v=y("../../lib/extend").extendFlat,e=m.contours;ee.exports=v({carpet:{valType:"string",editType:"calc"},z:g.z,a:g.x,a0:g.x0,da:g.dx,b:g.y,b0:g.y0,db:g.dy,text:g.text,hovertext:g.hovertext,transpose:g.transpose,atype:g.xtype,btype:g.ytype,fillcolor:m.fillcolor,autocontour:m.autocontour,ncontours:m.ncontours,c
1221ontours:{type:e.type,start:e.start,end:e.end,size:e.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:e.showlines,showlabels:e.showlabels,labelfont:e.labelfont,labelformat:e.labelformat,operation:e.operation,value:e.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:m.line.color,width:m.line.width,dash:m.line.dash,smoothing:m.line.smoothing,editType:"plot"},transforms:void 0},b("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../contour/attributes":735,"../heatmap/attributes":792}],758:[function(y,ee,te){var g=y("../../components/colorscale/calc"),m=y("../../lib"),b=y("../heatmap/convert_column_xyz"),v=y("../heatmap/clean_2d_array"),e=y("../heatmap/interp2d"),n=y("../heatmap/find_empties"),t=y("../heatmap/make_bound_array"),o=y("./defaults"),r=y("../carpet/lookup_carpetid"),d=y("../contour/set_contours");ee.exports=function(c,i){var u=i._carpetTrace=r(c,i);if(u&&u.visible&&u.visible!=="legendonly"){if(!i.a||!i.b){var f=c.data[u.index],s=c.data[i.index];s.a||(s.a=f.a),s.b||(s.b=f.b),o(s,i,i._defaultColor,c._fullLayout)}var h=function(p,a){var x,l,w,_,T,k,L,A=a._carpetTrace,I=A.aaxis,P=A.baxis;I._minDtick=0,P._minDtick=0,m.isArray1D(a.z)&&b(a,I,P,"a","b",["z"]),x=a._a=a._a||a.a,_=a._b=a._b||a.b,x=x?I.makeCalcdata(a,"_a"):[],_=_?P.makeCalcdata(a,"_b"):[],l=a.a0||0,w=a.da||1,T=a.b0||0,k=a.db||1,L=a._z=v(a._z||a.z,a.transpose),a._emptypoints=n(L),e(L,a._emptypoints);var S=m.maxRowLength(L),E=a.xtype==="scaled"?"":x,D=t(a,E,l,w,S,I),F=a.ytype==="scaled"?"":_,H=t(a,F,T,k,L.length,P),V={a:D,b:H,z:L};return a.contours.type==="levels"&&a.contours.coloring!=="none"&&g(p,a,{vals:L,containerStr:"",cLetter:"z"}),[V]}(c,i);return d(i,i._z),h}}},{"../../components/colorscale/calc":374,"../../lib":503,"../carpet/lookup_carpetid":708,"../contour/set_contours":754,"../heatmap/clean_2d_array":794,"../heatmap/convert_column_xyz":796,"../heatmap/find_empties":798,"../heatmap/interp2d":801,"../heatmap/make_bound_array":803,"./defaults":759}],759:[function(y,ee,te){var g=y("../../lib"),m=y("../heatmap/xyz_defaults"),b=y("./attributes"),v=y("../contour/constraint_defaults"),e=y("../contour/contours_defaults"),n=y("../contour/style_defaults");ee.exports=function(t,o,r,d){function c(i,u){return g.coerce(t,o,b,i,u)}if(c("carpet"),t.a&&t.b){if(!m(t,o,c,d,"a","b"))return void(o.visible=!1);c("text"),c("contours.type")==="constraint"?v(t,o,c,d,r,{hasHover:!1}):(e(t,o,c,function(i){return g.coerce2(t,o,b,i)}),n(t,o,c,d,{hasHover:!1}))}else o._defaultColor=r,o._length=null}},{"../../lib":503,"../contour/constraint_defaults":740,"../contour/contours_defaults":742,"../contour/style_defaults":756,"../heatmap/xyz_defaults":807,"./attributes":757}],760:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../contour/colorbar"),calc:y("./calc"),plot:y("./plot"),style:y("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":568,"../contour/colorbar":738,"../contour/style":755,"./attributes":757,"./calc":758,"./defaults":759,"./plot":761}],761:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../carpet/map_1d_array"),b=y("../carpet/makepath"),v=y("../../components/drawing"),e=y("../../lib"),n=y("../contour/make_crossings"),t=y("../contour/find_all_paths"),o=y("../contour/plot"),r=y("../contour/constants"),d=y("../contour/convert_to_constraints"),c=y("../contour/empty_pathinfo"),i=y("../contour/close_boundaries"),u=y("../carpet/lookup_carpetid"),f=y("../carpet/axis_aligned_line");function s(a,x,l){var w=a.getPointAtLength(x),_=a.getPointAtLength(l),T=_.x-w.x,k=_.y-w.y,L=Math.sqrt(T*T+k*k);return[T/L,k/L]}function h(a){var x=Math.sqrt(a[0]*a[0]+a[1]*a[1]);return[a[0]/x,a[1]/x]}function p(a,x){var l=Math.abs(a[0]*x[0]+a[1]*x[1]);return Math.sqrt(1-l*l)/l}ee.exports=function(a,x,l,w){var _=x.xaxis,T=x.yaxis;e.makeTraceGroups(w,l,"contour").each(function(k){var L=g.select(this),A=k[0],I=A.trace,P=I._carpetTrace=u(a,I),S=a.calcdata[P.index][0];if(P.visible&&P.visible!=="legendonly"){var E=A.a,D=A.b,F=I.contours,H=c(F,x,A),V=F.type==="constraint",Z=F._operation,K=V?Z==="="?"lines":"fill":F.coloring,q=[[E[0],D[D.length-1]],[E[E.length-1],D[D.length-1]],[E[E.length-1],D[0]],[E[0],D[0]]];n(H);var W=1e-8*(E[E.length-1]-E[0]),$=1e-8*(D[D.length-1]-D[0]);t(H,W,$);var R,N,U,Q,j=H;F.type==="constraint"&&(j=d(H,Z)),function(ne,se){var oe,pe,ce,de,xe,we,be,Ee,fe;for(oe=0;oe<ne.length;oe++){for(de=ne[oe],xe=de.pedgepaths=[],we=de.ppaths=[],pe=0;pe<de.edgepaths.length;pe++){for(fe=de.edgepaths[pe],be=[],ce=0;ce<fe.length;ce++)be[ce]=se(fe[ce]);xe.push(be)}for(pe=0;pe<de.paths.length;pe++){for(fe=de.paths[pe],Ee=[],ce=0;ce<fe.length;ce++)Ee[ce]=se(fe[ce]);we.push(Ee)}}}(H,re);var X=[];for(Q=S.clipsegments.length-1;Q>=0;Q--)R=S.clipsegments[Q],N=m([],R.x,_.c2p),U=m([],R.y,T.c2p),N.reverse(),U.reverse(),X.push(b(N,U,R.bicubic));var J="M"+X.join("L")+"Z";(function(ne,se,oe,pe,ce,de){var xe,we,be,Ee,fe=e.ensureSingle(ne,"g","contourbg").selectAll("path").data(de!=="fill"||ce?[]:[0]);fe.enter().append("path"),fe.exit().remove();var me=[];for(Ee=0;Ee<se.length;
1221Ee++)xe=se[Ee],we=m([],xe.x,oe.c2p),be=m([],xe.y,pe.c2p),me.push(b(we,be,xe.bicubic));fe.attr("d","M"+me.join("L")+"Z").style("stroke","none")})(L,S.clipsegments,_,T,V,K),function(ne,se,oe,pe,ce,de,xe,we,be,Ee,fe){var me=Ee==="fill";me&&i(ce,ne.contours);var Te=e.ensureSingle(se,"g","contourfill").selectAll("path").data(me?ce:[]);Te.enter().append("path"),Te.exit().remove(),Te.each(function(_e){var Ae=(_e.prefixBoundary?fe:"")+function(Pe,De,Ve,Qe,Oe,Ue,Ge,Ye){var tt,lt,vt,It,St,rt,et,Tt="",Vt=De.edgepaths.map(function(it,ht){return ht}),Kt=!0,Be=1e-4*Math.abs(Ve[0][0]-Ve[2][0]),qe=1e-4*Math.abs(Ve[0][1]-Ve[2][1]);function Re(it){return Math.abs(it[1]-Ve[0][1])<qe}function Xe(it){return Math.abs(it[1]-Ve[2][1])<qe}function ke(it){return Math.abs(it[0]-Ve[0][0])<Be}function Le(it){return Math.abs(it[0]-Ve[2][0])<Be}function Ie(it,ht){var ut,kt,ot,Lt,Et="";for(Re(it)&&!Le(it)||Xe(it)&&!ke(it)?(Lt=Oe.aaxis,ot=f(Oe,Ue,[it[0],ht[0]],.5*(it[1]+ht[1]))):(Lt=Oe.baxis,ot=f(Oe,Ue,.5*(it[0]+ht[0]),[it[1],ht[1]])),ut=1;ut<ot.length;ut++)for(Et+=Lt.smoothing?"C":"L",kt=0;kt<ot[ut].length;kt++){var Ze=ot[ut][kt];Et+=[Ge.c2p(Ze[0]),Ye.c2p(Ze[1])]+" "}return Et}for(tt=0,lt=null;Vt.length;){var Ce=De.edgepaths[tt][0];for(lt&&(Tt+=Ie(lt,Ce)),et=v.smoothopen(De.edgepaths[tt].map(Qe),De.smoothing),Tt+=Kt?et:et.replace(/^M/,"L"),Vt.splice(Vt.indexOf(tt),1),lt=De.edgepaths[tt][De.edgepaths[tt].length-1],St=-1,It=0;It<4;It++){if(!lt){e.log("Missing end?",tt,De);break}for(Re(lt)&&!Le(lt)?vt=Ve[1]:ke(lt)?vt=Ve[0]:Xe(lt)?vt=Ve[3]:Le(lt)&&(vt=Ve[2]),rt=0;rt<De.edgepaths.length;rt++){var Je=De.edgepaths[rt][0];Math.abs(lt[0]-vt[0])<Be?Math.abs(lt[0]-Je[0])<Be&&(Je[1]-lt[1])*(vt[1]-Je[1])>=0&&(vt=Je,St=rt):Math.abs(lt[1]-vt[1])<qe?Math.abs(lt[1]-Je[1])<qe&&(Je[0]-lt[0])*(vt[0]-Je[0])>=0&&(vt=Je,St=rt):e.log("endpt to newendpt is not vert. or horz.",lt,vt,Je)}if(St>=0)break;Tt+=Ie(lt,vt),lt=vt}if(St===De.edgepaths.length){e.log("unclosed perimeter path");break}tt=St,(Kt=Vt.indexOf(tt)===-1)&&(tt=Vt[0],Tt+=Ie(lt,vt)+"Z",lt=null)}for(tt=0;tt<De.paths.length;tt++)Tt+=v.smoothclosed(De.paths[tt].map(Qe),De.smoothing);return Tt}(0,_e,de,xe,we,be,oe,pe);Ae?g.select(this).attr("d",Ae).style("stroke","none"):g.select(this).remove()})}(I,L,_,T,j,q,re,P,S,K,J),function(ne,se,oe,pe,ce,de,xe){var we=e.ensureSingle(ne,"g","contourlines"),be=ce.showlines!==!1,Ee=ce.showlabels,fe=be&&Ee,me=o.createLines(we,be||Ee,se),Te=o.createLineClip(we,fe,oe,pe.trace.uid),_e=ne.selectAll("g.contourlabels").data(Ee?[0]:[]);if(_e.exit().remove(),_e.enter().append("g").classed("contourlabels",!0),Ee){var Ae=de.xaxis,Pe=de.yaxis,De=Ae._length,Ve=Pe._length,Qe=[[[0,0],[De,0],[De,Ve],[0,Ve]]],Oe=[];e.clearLocationCache();var Ue=o.labelFormatter(oe,pe),Ge=v.tester.append("text").attr("data-notex",1).call(v.font,ce.labelfont),Ye={left:0,right:De,center:De/2,top:0,bottom:Ve,middle:Ve/2},tt=Math.sqrt(De*De+Ve*Ve),lt=r.LABELDISTANCE*tt/Math.max(1,se.length/r.LABELINCREASE);me.each(function(vt){var It=o.calcTextOpts(vt.level,Ue,Ge,oe);g.select(this).selectAll("path").each(function(St){var rt=e.getVisibleSegment(this,Ye,It.height/2);if(rt&&(function(Kt,Be,qe,Re,Xe,ke){for(var Le,Ie=0;Ie<qe.pedgepaths.length;Ie++)Be===qe.pedgepaths[Ie]&&(Le=qe.edgepaths[Ie]);if(!Le)return;var Ce=Xe.a[0],Je=Xe.a[Xe.a.length-1],it=Xe.b[0],ht=Xe.b[Xe.b.length-1];function ut(Ze,pt){var Ct,zt=0;return(Math.abs(Ze[0]-Ce)<.1||Math.abs(Ze[0]-Je)<.1)&&(Ct=h(Xe.dxydb_rough(Ze[0],Ze[1],.1)),zt=Math.max(zt,ke*p(pt,Ct)/2)),(Math.abs(Ze[1]-it)<.1||Math.abs(Ze[1]-ht)<.1)&&(Ct=h(Xe.dxyda_rough(Ze[0],Ze[1],.1)),zt=Math.max(zt,ke*p(pt,Ct)/2)),zt}var kt=s(Kt,0,1),ot=s(Kt,Re.total,Re.total-1),Lt=ut(Le[0],kt),Et=Re.total-ut(Le[Le.length-1],ot);Re.min<Lt&&(Re.min=Lt),Re.max>Et&&(Re.max=Et),Re.len=Re.max-Re.min}(this,St,vt,rt,xe,It.height),!(rt.len<(It.width+It.height)*r.LABELMIN)))for(var et=Math.min(Math.ceil(rt.len/lt),r.LABELMAX),Tt=0;Tt<et;Tt++){var Vt=o.findBestTextLocation(this,rt,It,Oe,Ye);if(!Vt)break;o.addLabelData(Vt,It,Oe,Qe)}})}),Ge.remove(),o.drawLabels(_e,Oe,oe,Te,fe?Qe:null)}Ee&&!be&&me.remove()}(L,H,a,A,F,x,P),v.setClipUrl(L,P._clipPathId,a)}function re(ne){var se=P.ab2xy(ne[0],ne[1],!0);return[_.c2p(se[0]),T.c2p(se[1])]}})}},{"../../components/drawing":388,"../../lib":503,"../carpet/axis_aligned_line":692,"../carpet/lookup_carpetid":708,"../carpet/makepath":709,"../carpet/map_1d_array":710,"../contour/close_boundaries":737,"../contour/constants":739,"../contour/convert_to_constraints":743,"../contour/empty_pathinfo":745,"../contour/find_all_paths":747,"../contour/make_crossings":752,"../contour/plot":753,"@plotly/d3":58}],762:[function(y,ee,te){var g=y("../../components/colorscale/attributes"),m=y("../../plots/template_attributes").hovertemplateAttrs,b=y("../../plots/attributes"),v=y("../scattermapbox/attributes"),e=y("../../lib/extend").extendFlat;ee.exports=e({lon:v.lon,lat:v.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:v.text,hovertext:v.hovertext,hoverinfo:e({},b.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:m(),showlegend:e({},b.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scattermapbox/attributes":991}],763:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib").isArrayOrTypedArray,b=y("../../constants/numerical").BADNUM,v=y("../../components/colorscale/calc"),e=y("../../lib")._;ee.exports=function(n,t){for(var o=t._length,r=new Array(o),d=t.z,c=m(d)&&d.length,i=0;i<o;i++){var u=r[i]={},f=t.lon[i],s=t.lat[i];if(u.lonlat=g(f)&&g(s)?[+f,+s]:[b,b],c){var h=d[i];
1221u.z=g(h)?h:b}}return v(n,t,{vals:c?d:[0,1],containerStr:"",cLetter:"z"}),o&&(r[0].t={labels:{lat:e(n,"lat:")+" ",lon:e(n,"lon:")+" "}}),r}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],764:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../components/color"),v=y("../../components/colorscale"),e=y("../../constants/numerical").BADNUM,n=y("../../lib/geojson_utils").makeBlank;ee.exports=function(t){var o=t[0].trace,r=o.visible===!0&&o._length!==0,d=o._opts={heatmap:{layout:{visibility:"none"},paint:{}},geojson:n()};if(!r)return d;var c,i=[],u=o.z,f=o.radius,s=m.isArrayOrTypedArray(u)&&u.length,h=m.isArrayOrTypedArray(f);for(c=0;c<t.length;c++){var p=t[c],a=p.lonlat;if(a[0]!==e){var x={};if(s){var l=p.z;x.z=l!==e?l:0}h&&(x.r=g(f[c])&&f[c]>0?+f[c]:0),i.push({type:"Feature",geometry:{type:"Point",coordinates:a},properties:x})}}var w=v.extractOpts(o),_=w.reversescale?v.flipScale(w.colorscale):w.colorscale,T=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,b.opacity(T)<1?T:b.addOpacity(T,0)];for(c=1;c<_.length;c++)k.push(_[c][0],_[c][1]);var L=["interpolate",["linear"],["get","z"],w.min,0,w.max,1];return m.extendFlat(d.heatmap.paint,{"heatmap-weight":s?L:1/(w.max-w.min),"heatmap-color":k,"heatmap-radius":h?{type:"identity",property:"r"}:o.radius,"heatmap-opacity":o.opacity}),d.geojson={type:"FeatureCollection",features:i},d.heatmap.layout.visibility="visible",d}},{"../../components/color":366,"../../components/colorscale":378,"../../constants/numerical":479,"../../lib":503,"../../lib/geojson_utils":497,"fast-isnumeric":190}],765:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/colorscale/defaults"),b=y("./attributes");ee.exports=function(v,e,n,t){function o(i,u){return g.coerce(v,e,b,i,u)}var r=o("lon")||[],d=o("lat")||[],c=Math.min(r.length,d.length);c?(e._length=c,o("z"),o("radius"),o("below"),o("text"),o("hovertext"),o("hovertemplate"),m(v,e,t,o,{prefix:"",cLetter:"z"})):e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":762}],766:[function(y,ee,te){ee.exports=function(g,m){return g.lon=m.lon,g.lat=m.lat,g.z=m.z,g}},{}],767:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../scattermapbox/hover").hoverPoints,b=y("../scattermapbox/hover").getExtraText;ee.exports=function(v,e,n){var t=m(v,e,n);if(t){var o=t[0],r=o.cd,d=r[0].trace,c=r[o.index];if(delete o.color,"z"in c){var i=o.subplot.mockAxis;o.z=c.z,o.zLabel=g.tickText(i,i.c2l(c.z),"hover").text}return o.extraText=b(d,c,r[0].t.labels),[o]}}},{"../../plots/cartesian/axes":554,"../scattermapbox/hover":996}],768:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../heatmap/colorbar"),formatLabels:y("../scattermapbox/format_labels"),calc:y("./calc"),plot:y("./plot"),hoverPoints:y("./hover"),eventData:y("./event_data"),getBelow:function(g,m){for(var b=m.getMapLayers(),v=0;v<b.length;v++){var e=b[v],n=e.id;if(e.type==="symbol"&&typeof n=="string"&&n.indexOf("plotly-")===-1)return n}},moduleType:"trace",name:"densitymapbox",basePlotModule:y("../../plots/mapbox"),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}},{"../../plots/mapbox":613,"../heatmap/colorbar":795,"../scattermapbox/format_labels":995,"./attributes":762,"./calc":763,"./defaults":765,"./event_data":766,"./hover":767,"./plot":769}],769:[function(y,ee,te){var g=y("./convert"),m=y("../../plots/mapbox/constants").traceLayerPrefix;function b(e,n){this.type="densitymapbox",this.subplot=e,this.uid=n,this.sourceId="source-"+n,this.layerList=[["heatmap",m+n+"-heatmap"]],this.below=null}var v=b.prototype;v.update=function(e){var n=this.subplot,t=this.layerList,o=g(e),r=n.belowLookup["trace-"+this.uid];n.map.getSource(this.sourceId).setData(o.geojson),r!==this.below&&(this._removeLayers(),this._addLayers(o,r),this.below=r);for(var d=0;d<t.length;d++){var c=t[d],i=c[0],u=c[1],f=o[i];n.setOptions(u,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&n.setOptions(u,"setPaintProperty",f.paint)}},v._addLayers=function(e,n){for(var t=this.subplot,o=this.layerList,r=this.sourceId,d=0;d<o.length;d++){var c=o[d],i=c[0],u=e[i];t.addLayer({type:i,id:c[1],source:r,layout:u.layout,paint:u.paint},n)}},v._removeLayers=function(){for(var e=this.subplot.map,n=this.layerList,t=n.length-1;t>=0;t--)e.removeLayer(n[t][1])},v.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},ee.exports=function(e,n){var t=n[0].trace,o=new b(e,t.uid),r=o.sourceId,d=g(n),c=o.below=e.belowLookup["trace-"+t.uid];return e.map.addSource(r,{type:"geojson",data:d.geojson}),o._addLayers(d,c),o}},{"../../plots/mapbox/constants":611,"./convert":764}],770:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b){for(var v=0;v<m.length;v++)m[v].i=v;g.mergeArray(b.text,m,"tx"),g.mergeArray(b.hovertext,m,"htx");var e=b.marker;if(e){g.mergeArray(e.opacity,m,"mo"),g.mergeArray(e.color,m,"mc");var n=e.line;n&&(g.mergeArray(n.color,m,"mlc"),g.mergeArrayCastPositive(n.width,m,"mlw"))}}},{"../../lib":503}],771:[function(y,ee,te){var g,m=y("../bar/attributes"),b=y("../scatter/attributes").line,v=y("../../plots/attributes"),e=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,n=y("../../plots/template_attributes").hovertemplateAttrs,t=y("../../plots/template_attributes").texttemplateAttrs,o=y("./constants"),r=y("../../lib/extend").extendFlat,d=y("../../components/color");ee.exports={x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.x
1221period,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:e("x"),yhoverformat:e("y"),hovertext:m.hovertext,hovertemplate:n({},{keys:o.eventDataKeys}),hoverinfo:r({},v.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:t({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),text:m.text,textposition:m.textposition,insidetextanchor:r({},m.insidetextanchor,{dflt:"middle"}),textangle:r({},m.textangle,{dflt:0}),textfont:m.textfont,insidetextfont:m.insidetextfont,outsidetextfont:m.outsidetextfont,constraintext:m.constraintext,cliponaxis:m.cliponaxis,orientation:r({},m.orientation,{}),offset:r({},m.offset,{arrayOk:!1}),width:r({},m.width,{arrayOk:!1}),marker:(g=r({},m.marker),delete g.pattern,g),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:r({},b.color,{dflt:d.defaultLine}),width:r({},b.width,{dflt:0,editType:"plot"}),dash:b.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup}},{"../../components/color":366,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":926,"./constants":773}],772:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../plots/cartesian/align_period"),b=y("./arrays_to_calcdata"),v=y("../scatter/calc_selection"),e=y("../../constants/numerical").BADNUM;function n(t){return t===e?0:t}ee.exports=function(t,o){var r,d,c,i,u,f,s,h,p=g.getFromId(t,o.xaxis||"x"),a=g.getFromId(t,o.yaxis||"y");o.orientation==="h"?(r=p.makeCalcdata(o,"x"),c=a.makeCalcdata(o,"y"),i=m(o,a,"y",c),u=!!o.yperiodalignment,f="y"):(r=a.makeCalcdata(o,"y"),c=p.makeCalcdata(o,"x"),i=m(o,p,"x",c),u=!!o.xperiodalignment,f="x"),d=i.vals;var x,l=Math.min(d.length,r.length),w=new Array(l);for(o._base=[],s=0;s<l;s++){r[s]<0&&(r[s]=e);var _=!1;r[s]!==e&&s+1<l&&r[s+1]!==e&&(_=!0),h=w[s]={p:d[s],s:r[s],cNext:_},o._base[s]=-.5*h.s,u&&(w[s].orig_p=c[s],w[s][f+"End"]=i.ends[s],w[s][f+"Start"]=i.starts[s]),o.ids&&(h.id=String(o.ids[s])),s===0&&(w[0].vTotal=0),w[0].vTotal+=n(h.s),h.begR=n(h.s)/n(w[0].s)}for(s=0;s<l;s++)(h=w[s]).s!==e&&(h.sumR=h.s/w[0].vTotal,h.difR=x!==void 0?h.s/x:1,x=h.s);return b(w,o),v(w,o),w}},{"../../constants/numerical":479,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":928,"./arrays_to_calcdata":770}],773:[function(y,ee,te){ee.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},{}],774:[function(y,ee,te){var g=y("../bar/cross_trace_calc").setGroupPositions;ee.exports=function(m,b){var v,e,n=m._fullLayout,t=m._fullData,o=m.calcdata,r=b.xaxis,d=b.yaxis,c=[],i=[],u=[];for(e=0;e<t.length;e++){var f=t[e],s=f.orientation==="h";f.visible===!0&&f.xaxis===r._id&&f.yaxis===d._id&&f.type==="funnel"&&(v=o[e],s?u.push(v):i.push(v),c.push(v))}var h={mode:n.funnelmode,norm:n.funnelnorm,gap:n.funnelgap,groupgap:n.funnelgroupgap};for(g(m,r,d,i,h),g(m,d,r,u,h),e=0;e<c.length;e++){v=c[e];for(var p=0;p<v.length;p++)p+1<v.length&&(v[p].nextP0=v[p+1].p0,v[p].nextS0=v[p+1].s0,v[p].nextP1=v[p+1].p1,v[p].nextS1=v[p+1].s1)}}},{"../bar/cross_trace_calc":651}],775:[function(y,ee,te){var g=y("../../lib"),m=y("../bar/defaults").handleGroupingDefaults,b=y("../bar/defaults").handleText,v=y("../scatter/xy_defaults"),e=y("../scatter/period_defaults"),n=y("./attributes"),t=y("../../components/color");ee.exports={supplyDefaults:function(o,r,d,c){function i(h,p){return g.coerce(o,r,n,h,p)}if(v(o,r,c,i)){e(o,r,c,i),i("xhoverformat"),i("yhoverformat"),i("orientation",r.y&&!r.x?"v":"h"),i("offset"),i("width");var u=i("text");i("hovertext"),i("hovertemplate");var f=i("textposition");b(o,r,c,i,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r.textposition==="none"||r.texttemplate||i("textinfo",Array.isArray(u)?"text+value":"value");var s=i("marker.color",d);i("marker.line.color",t.defaultLine),i("marker.line.width"),i("connector.visible")&&(i("connector.fill
1221color",function(h){var p=g.isArrayOrTypedArray(h)?"#000":h;return t.addOpacity(p,.5*t.opacity(p))}(s)),i("connector.line.width")&&(i("connector.line.color"),i("connector.line.dash")))}else r.visible=!1},crossTraceDefaults:function(o,r){var d,c;function i(f){return g.coerce(c._input,c,n,f)}if(r.funnelmode==="group")for(var u=0;u<o.length;u++)d=(c=o[u])._input,m(d,c,r,i)}}},{"../../components/color":366,"../../lib":503,"../bar/defaults":652,"../scatter/period_defaults":946,"../scatter/xy_defaults":953,"./attributes":771}],776:[function(y,ee,te){ee.exports=function(g,m){return g.x="xVal"in m?m.xVal:m.x,g.y="yVal"in m?m.yVal:m.y,"percentInitial"in m&&(g.percentInitial=m.percentInitial),"percentPrevious"in m&&(g.percentPrevious=m.percentPrevious),"percentTotal"in m&&(g.percentTotal=m.percentTotal),m.xa&&(g.xaxis=m.xa),m.ya&&(g.yaxis=m.ya),g}},{}],777:[function(y,ee,te){var g=y("../../components/color").opacity,m=y("../bar/hover").hoverOnBars,b=y("../../lib").formatPercent;ee.exports=function(v,e,n,t,o){var r=m(v,e,n,t,o);if(r){var d=r.cd,c=d[0].trace,i=c.orientation==="h",u=d[r.index];r[(i?"x":"y")+"LabelVal"]=u.s,r.percentInitial=u.begR,r.percentInitialLabel=b(u.begR,1),r.percentPrevious=u.difR,r.percentPreviousLabel=b(u.difR,1),r.percentTotal=u.sumR,r.percentTotalLabel=b(u.sumR,1);var f=u.hi||c.hoverinfo,s=[];if(f&&f!=="none"&&f!=="skip"){var h=f==="all",p=f.split("+"),a=function(x){return h||p.indexOf(x)!==-1};a("percent initial")&&s.push(r.percentInitialLabel+" of initial"),a("percent previous")&&s.push(r.percentPreviousLabel+" of previous"),a("percent total")&&s.push(r.percentTotalLabel+" of total")}return r.extraText=s.join("<br>"),r.color=function(x,l){var w=x.marker,_=l.mc||w.color,T=l.mlc||w.line.color,k=l.mlw||w.line.width;if(g(_))return _;if(g(T)&&k)return T}(c,u),[r]}}},{"../../components/color":366,"../../lib":503,"../bar/hover":655}],778:[function(y,ee,te){ee.exports={attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults").supplyDefaults,crossTraceDefaults:y("./defaults").crossTraceDefaults,supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc"),crossTraceCalc:y("./cross_trace_calc"),plot:y("./plot"),style:y("./style").style,hoverPoints:y("./hover"),eventData:y("./event_data"),selectPoints:y("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:y("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":771,"./calc":772,"./cross_trace_calc":774,"./defaults":775,"./event_data":776,"./hover":777,"./layout_attributes":779,"./layout_defaults":780,"./plot":781,"./style":782}],779:[function(y,ee,te){ee.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],780:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v,e){var n=!1;function t(d,c){return g.coerce(b,v,m,d,c)}for(var o=0;o<e.length;o++){var r=e[o];if(r.visible&&r.type==="funnel"){n=!0;break}}n&&(t("funnelmode"),t("funnelgap",.2),t("funnelgroupgap"))}},{"../../lib":503,"./layout_attributes":779}],781:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../components/drawing"),v=y("../../constants/numerical").BADNUM,e=y("../bar/plot"),n=y("../bar/uniform_text").clearMinTextSize;function t(o,r,d,c){var i=[],u=[],f=c?r:d,s=c?d:r;return i[0]=f.c2p(o.s0,!0),u[0]=s.c2p(o.p0,!0),i[1]=f.c2p(o.s1,!0),u[1]=s.c2p(o.p1,!0),i[2]=f.c2p(o.nextS0,!0),u[2]=s.c2p(o.nextP0,!0),i[3]=f.c2p(o.nextS1,!0),u[3]=s.c2p(o.nextP1,!0),c?[i,u]:[u,i]}ee.exports=function(o,r,d,c){var i=o._fullLayout;n("funnel",i),function(u,f,s,h){var p=f.xaxis,a=f.yaxis;m.makeTraceGroups(h,s,"trace bars").each(function(x){var l=g.select(this),w=x[0].trace,_=m.ensureSingle(l,"g","regions");if(w.connector&&w.connector.visible){var T=w.orientation==="h",k=_.selectAll("g.region").data(m.identity);
1221k.enter().append("g").classed("region",!0),k.exit().remove();var L=k.size();k.each(function(A,I){if(I===L-1||A.cNext){var P=t(A,p,a,T),S=P[0],E=P[1],D="";S[0]!==v&&E[0]!==v&&S[1]!==v&&E[1]!==v&&S[2]!==v&&E[2]!==v&&S[3]!==v&&E[3]!==v&&(D+=T?"M"+S[0]+","+E[1]+"L"+S[2]+","+E[2]+"H"+S[3]+"L"+S[1]+","+E[1]+"Z":"M"+S[1]+","+E[1]+"L"+S[2]+","+E[3]+"V"+E[2]+"L"+S[1]+","+E[0]+"Z"),D===""&&(D="M0,0Z"),m.ensureSingle(g.select(this),"path").attr("d",D).call(b.setClipUrl,f.layerClipId,u)}})}else _.remove()})}(o,r,d,c),function(u,f,s,h){var p=f.xaxis,a=f.yaxis;m.makeTraceGroups(h,s,"trace bars").each(function(x){var l=g.select(this),w=x[0].trace,_=m.ensureSingle(l,"g","lines");if(w.connector&&w.connector.visible&&w.connector.line.width){var T=w.orientation==="h",k=_.selectAll("g.line").data(m.identity);k.enter().append("g").classed("line",!0),k.exit().remove();var L=k.size();k.each(function(A,I){if(I===L-1||A.cNext){var P=t(A,p,a,T),S=P[0],E=P[1],D="";S[3]!==void 0&&E[3]!==void 0&&(T?(D+="M"+S[0]+","+E[1]+"L"+S[2]+","+E[2],D+="M"+S[1]+","+E[1]+"L"+S[3]+","+E[2]):(D+="M"+S[1]+","+E[1]+"L"+S[2]+","+E[3],D+="M"+S[1]+","+E[0]+"L"+S[2]+","+E[2])),D===""&&(D="M0,
12210Z"),m.ensureSingle(g.select(this),"path").attr("d",D).call(b.setClipUrl,f.layerClipId,u)}})}else _.remove()})}(o,r,d,c),e.plot(o,r,d,c,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../bar/plot":659,"../bar/uniform_text":664,"@plotly/d3":58}],782:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/drawing"),b=y("../../components/color"),v=y("../../constants/interactions").DESELECTDIM,e=y("../bar/style"),n=y("../bar/uniform_text").resizeText,t=e.styleTextPoints;ee.exports={style:function(o,r,d){var c=d||g.select(o).selectAll("g.funnellayer").selectAll("g.trace");n(o,c,"funnel"),c.style("opacity",function(i){return i[0].trace.opacity}),c.each(function(i){var u=g.select(this),f=i[0].trace;u.selectAll(".point > path").each(function(s){if(!s.isBlank){var h=f.marker;g.select(this).call(b.fill,s.mc||h.color).call(b.stroke,s.mlc||h.line.color).call(m.dashLine,h.line.dash,s.mlw||h.line.width).style("opacity",f.selectedpoints&&!s.selected?v:1)}}),t(u,f,o),u.selectAll(".regions").each(function(){g.select(this).selectAll("path").style("stroke-width",0).call(b.fill,f.connector.fillcolor)}),u.selectAll(".lines").each(function(){var s=f.connector.line;m.lineGroupStyle(g.select(this).selectAll("path"),s.width,s.color,s.dash)})})}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],783:[function(y,ee,te){var g=y("../pie/attributes"),m=y("../../plots/attributes"),b=y("../../plots/domain").attributes,v=y("../../plots/template_attributes").hovertemplateAttrs,e=y("../../plots/template_attributes").texttemplateAttrs,n=y("../../lib/extend").extendFlat;ee.exports={labels:g.labels,label0:g.label0,dlabel:g.dlabel,values:g.values,marker:{colors:g.marker.colors,line:{color:n({},g.marker.line.color,{dflt:null}),width:n({},g.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:g.text,hovertext:g.hovertext,scalegroup:n({},g.scalegroup,{}),textinfo:n({},g.textinfo,{flags:["label","text","value","percent"]}),texttemplate:e({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:n({},m.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:v({},{keys:["label","color","value","text","percent"]}),textposition:n({},g.textposition,{values:["inside","none"],dflt:"inside"}),textfont:g.textfont,insidetextfont:g.insidetextfont,title:{text:g.title.text,font:g.title.font,position:n({},g.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:b({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":900}],784:[function(y,ee,te){var g=y("../../plots/plots");te.name="funnelarea",te.plot=function(m,b,v,e){g.plotBasePlot(te.name,m,b,v,e)},te.clean=function(m,b,v,e){g.cleanBasePlot(te.name,m,b,v,e)}},{"../../plots/plots":619}],785:[function(y,ee,te){var g=y("../pie/calc");ee.exports={calc:function(m,b){return g.calc(m,b)},crossTraceCalc:function(m){g.crossTraceCalc(m,{type:"funnelarea"})}}},{"../pie/calc":902}],786:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("../../plots/domain").defaults,v=y("../bar/defaults").handleText,e=y("../pie/defaults").handleLabelsAndValues;ee.exports=function(n,t,o,r){function d(x,l){return g.coerce(n,t,m,x,l)}var c=d("labels"),i=d("values"),u=e(c,i),f=u.len;if(t._hasLabels=u.hasLabels,t._hasValues=u.hasValues,!t._hasLabels&&t._hasValues&&(d("label0"),d("dlabel")),f){t._length=f,d("marker.line.width")&&d("marker.line.color",r.paper_bgcolor),d("marker.colors"),d("scalegroup");var s,h=d("text"),p=d("texttemplate");if(p||(s=d("textinfo",Array.isArray(h)?"text+percent":"percent")),d("hovertext"),d("hovertemplate"),p||s&&s!=="none"){var a=d("textposition");v(n,t,r,d,a,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}b(t,r,d),d("title.text")&&(d("title.position"),g.coerceFont(d,"title.font",r.font)),d("aspectratio"),d("baseratio")}else t.visible=!1}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"../pie/defaults":903,"./attributes":783}],787:[function(y,ee,te){ee.exports={moduleType:"trace",name:"funnelarea",basePlotModule:y("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults"),supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc").calc,crossTraceCalc:y("./calc").crossTraceCalc,plot:y("./plot"),style:y("./style"),styleOne:y("../pie/style_one"),meta:{}}},{"../pie/style_one":911,"./attributes":783,"./base_plot":784,"./calc":785,"./defaults":786,"./layout_attributes":788,"./layout_defaults":789,"./plot":790,"./style":791}],788:[function(y,ee,te){var g=y("../pie/layout_attributes").hiddenlabels;ee.exports={hiddenlabels:g,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":907}],789:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v){function e(n,t){return g.coerce(b,v,m,n,t)}e("hiddenlabels"),e("funnelareacolorway",v.colorway),e("extendfunnelareacolors")}},{"../../lib":503,"./layout_attributes":788}],790:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/drawing"),b=y("../../lib"),v=b.strScale,e=b.strTranslate,n=y("../../lib/svg_text_utils"),t=y("../bar/plot").toMoveInsideBar,o=y("../bar/uniform_text"),r=o.recordMinTextSize,d=o.clearMinTextSize,c=y("../pie/helpers"),i=y("../pie/plot"),u=i.attachFxHandlers,f=i.determineInsideTextFont,s=i.layoutAreas,h=i.prerenderTitles,p=i.positionTitleOutside,a=i.formatSliceLabel;function x(l,w){return"l"+(w[0]-l[0])+","+(w[1]-l[1])}ee.exports=function(l,w){var _=l._fullLayout;d("funnelarea",_),h(w,l),s(w,_._size),b.makeTraceGroups(_._funnelarealayer,w,"trace").each(function(T){var k=g.select(this),L=T[0],A=L.trace;(function(I){if(!I.length)return;var P=I[0],S=P.trace,E=S.aspectratio,D=S.baseratio;D>.999&&(D=.999);
1221var F,H=Math.pow(D,2),V=P.vTotal,Z=V,K=V*H/(1-H)/V;function q(){var be,Ee={x:be=Math.sqrt(K),y:-be};return[Ee.x,Ee.y]}var W,$,R=[];for(R.push(q()),W=I.length-1;W>-1;W--)if(!($=I[W]).hidden){var N=$.v/Z;K+=N,R.push(q())}var U=1/0,Q=-1/0;for(W=0;W<R.length;W++)F=R[W],U=Math.min(U,F[1]),Q=Math.max(Q,F[1]);for(W=0;W<R.length;W++)R[W][1]-=(Q+U)/2;var j=R[R.length-1][0],X=P.r,J=(Q-U)/2,re=X/j,ne=X/J*E;for(P.r=ne*J,W=0;W<R.length;W++)R[W][0]*=re,R[W][1]*=ne;var se=[-(F=R[0])[0],F[1]],oe=[F[0],F[1]],pe=0;for(W=I.length-1;W>-1;W--)if(!($=I[W]).hidden){var ce=R[pe+=1][0],de=R[pe][1];$.TL=[-ce,de],$.TR=[ce,de],$.BL=se,$.BR=oe,$.pxmid=(xe=$.TR,we=$.BR,[.5*(xe[0]+we[0]),.5*(xe[1]+we[1])]),se=$.TL,oe=$.TR}var xe,we})(T),k.each(function(){var I=g.select(this).selectAll("g.slice").data(T);I.enter().append("g").classed("slice",!0),I.exit().remove(),I.each(function(S,E){if(S.hidden)g.select(this).selectAll("path,g").remove();else{S.pointNumber=S.i,S.curveNumber=A.index;var D=L.cx,F=L.cy,H=g.select(this),V=H.selectAll("path.surface").data([S]);V.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),H.call(u,l,T);var Z="M"+(D+S.TR[0])+","+(F+S.TR[1])+x(S.TR,S.BR)+x(S.BR,S.BL)+x(S.BL,S.TL)+"Z";V.attr("d",Z),a(l,S,L);var K=c.castOption(A.textposition,S.pts),q=H.selectAll("g.slicetext").data(S.text&&K!=="none"?[0]:[]);q.enter().append("g").classed("slicetext",!0),q.exit().remove(),q.each(function(){var W=b.ensureSingle(g.select(this),"text","",function(J){J.attr("data-notex",1)}),$=b.ensureUniformFontSize(l,f(A,S,_.font));W.text(S.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(m.font,$).call(n.convertToTspans,l);var R,N,U,Q=m.bBox(W.node()),j=Math.min(S.BL[1],S.BR[1])+F,X=Math.max(S.TL[1],S.TR[1])+F;N=Math.max(S.TL[0],S.BL[0])+D,U=Math.min(S.TR[0],S.BR[0])+D,(R=t(N,U,j,X,Q,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=$.size,r(A.type,R,_),T[E].transform=R,W.attr("transform",b.getTextTransform(R))})}});var P=g.select(this).selectAll("g.titletext").data(A.title.text?[0]:[]);P.enter().append("g").classed("titletext",!0),P.exit().remove(),P.each(function(){var S=b.ensureSingle(g.select(this),"text","",function(F){F.attr("data-notex",1)}),E=A.title.text;A._meta&&(E=b.templateString(E,A._meta)),S.text(E).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(m.font,A.title.font).call(n.convertToTspans,l);var D=p(L,_._size);S.attr("transform",e(D.x,D.y)+v(Math.min(1,D.scale))+e(D.tx,D.ty))})})})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/plot":659,"../bar/uniform_text":664,"../pie/helpers":905,"../pie/plot":909,"@plotly/d3":58}],791:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../pie/style_one"),b=y("../bar/uniform_text").resizeText;ee.exports=function(v){var e=v._fullLayout._funnelarealayer.selectAll(".trace");b(v,e,"funnelarea"),e.each(function(n){var t=n[0].trace,o=g.select(this);o.style({opacity:t.opacity}),o.selectAll("path.surface").each(function(r){g.select(this).call(m,r,t)})})}},{"../bar/uniform_text":664,"../pie/style_one":911,"@plotly/d3":58}],792:[function(y,ee,te){var g=y("../scatter/attributes"),m=y("../../plots/attributes"),b=y("../../plots/font_attributes"),v=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,e=y("../../plots/template_attributes").hovertemplateAttrs,n=y("../../plots/template_attributes").texttemplateAttrs,t=y("../../components/colorscale/attributes"),o=y("../../lib/extend").extendFlat;ee.exports=o({z:{valType:"data_array",editType:"calc"},x:o({},g.x,{impliedEdits:{xtype:"array"}}),x0:o({},g.x0,{impliedEdits:{xtype:"scaled"}}),dx:o({},g.dx,{impliedEdits:{xtype:"scaled"}}),y:o({},g.y,{impliedEdits:{ytype:"array"}}),y0:o({},g.y0,{impliedEdits:{ytype:"scaled"}}),dy:o({},g.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:o({},g.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:o({},g.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:o({},g.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:o({},g.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:o({},g.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:o({},g.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:v("x"),yhoverformat:v("y"),zhoverformat:v("z",1),hovertemplate:e(),texttemplate:n({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:b({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:o({},m.showlegend,{dflt:!1})},{transforms:void 0},t("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"../scatter/attributes":926}],793:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("../../plots/cartesian/axes"),v=y("../../plots/cartesian/align_period"),e=y("../histogram2d/calc"),n=y("../../components/colorscale/calc"),t=y("./convert_column_xyz"),o=y("./clean_2d_array"),r=y("./interp2d"),d=y("./find_empties"),c=y("./make_bound_array"),i=y("../../constants/numerical").BADNUM;function u(f){for(var s=[],h=f.length,p=0;p<h;p++){var a=f[p];a!==i&&s.push(a)}return s}ee.exports=function(f,s){var h,p,a,x,l,w,_,T,k,L,A,I=b.getFromId(f,s.xaxis||"x"),P=b.getFromId(f,s.yaxis||"y"),S=g.traceIs(s,"contour"),E=g.traceIs(s,"histogram"),D=g.traceIs(s,"gl2d"),F=S?"best":s.zsmooth;if(I._minDtick=0,P._minDtick=0,E)x=(A=e(f,s)).orig_x,h=A.x,p=A.x0,a=A.dx,T=A.orig_y,l=A.y,w=A.y0,_=A.dy,k=A.z;else{var H=s.z;m.isArray1D(H)?(t(s,I,P,"x","y",["z"]),h=s._x,l=s._y,H=s._z):(x=s.x?I.makeCalcdata(s,"x"):[],T=s.y?P.makeCalcdata(s,"y"):[],h=v(s,I,"x",x).vals,l=v(s,P,"y",T).vals,s._x=h,s._y=l),p=s.x0,a=s.dx,w=s.y0,_=s.dy,k=o(H,s,I,P)}function V(J){F=s._input.zsmooth=s.zsmooth=!1,m.warn('cannot use zsmooth: "fast": '+J)}if((I.rangebreaks||P.rangebreaks)&&(k=function(J,re,ne){for(var se=[],oe=-1,pe=0;pe<ne.length;pe++)if(re[pe]!==i){oe++,se[oe]=[];for(var ce=0;ce<ne[pe].length;ce++)J[ce]!==i&&se[oe].push(ne[pe][ce])}return se}(h,l,k),E||(h=u(h),l=u(l),s._x=h,s._y=l)),E||!S&&!s.connectgaps||(s._emptypoints=d(k),r(k,s._emptypoints)),F==="fast"){if(I.type==="log"||P.type==="log")V("log axis foun
1221d");else if(!E){if(h.length){var Z=(h[h.length-1]-h[0])/(h.length-1),K=Math.abs(Z/100);for(L=0;L<h.length-1;L++)if(Math.abs(h[L+1]-h[L]-Z)>K){V("x scale is not linear");break}}if(l.length&&F==="fast"){var q=(l[l.length-1]-l[0])/(l.length-1),W=Math.abs(q/100);for(L=0;L<l.length-1;L++)if(Math.abs(l[L+1]-l[L]-q)>W){V("y scale is not linear");break}}}}var $=m.maxRowLength(k),R=s.xtype==="scaled"?"":h,N=c(s,R,p,a,$,I),U=s.ytype==="scaled"?"":l,Q=c(s,U,w,_,k.length,P);D||(s._extremes[I._id]=b.findExtremes(I,N),s._extremes[P._id]=b.findExtremes(P,Q));var j={x:N,y:Q,z:k,text:s._text||s.text,hovertext:s._hovertext||s.hovertext};if(s.xperiodalignment&&x&&(j.orig_x=x),s.yperiodalignment&&T&&(j.orig_y=T),R&&R.length===N.length-1&&(j.xCenter=R),U&&U.length===Q.length-1&&(j.yCenter=U),E&&(j.xRanges=A.xRanges,j.yRanges=A.yRanges,j.pts=A.pts),S||n(f,s,{vals:k,cLetter:"z"}),S&&s.contours&&s.contours.coloring==="heatmap"){var X={type:s.type==="contour"?"heatmap":"histogram2d",xcalendar:s.xcalendar,ycalendar:s.ycalendar};j.xfill=c(X,R,p,a,$,I),j.yfill=c(X,U,w,_,k.length,P)}return[j]}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../../registry":638,"../histogram2d/calc":826,"./clean_2d_array":794,"./convert_column_xyz":796,"./find_empties":798,"./interp2d":801,"./make_bound_array":803}],794:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../constants/numerical").BADNUM;ee.exports=function(v,e,n,t){var o,r,d,c,i,u;function f(l){if(g(l))return+l}if(e&&e.transpose){for(o=0,i=0;i<v.length;i++)o=Math.max(o,v[i].length);if(o===0)return!1;d=function(l){return l.length},c=function(l,w,_){return(l[_]||[])[w]}}else o=v.length,d=function(l,w){return l[w].length},c=function(l,w,_){return(l[w]||[])[_]};var s=function(l,w,_){return w===b||_===b?b:c(l,w,_)};function h(l){if(e&&e.type!=="carpet"&&e.type!=="contourcarpet"&&l&&l.type==="category"&&e["_"+l._id.charAt(0)].length){var w=l._id.charAt(0),_={},T=e["_"+w+"CategoryMap"]||e[w];for(i=0;i<T.length;i++)_[T[i]]=i;return function(k){var L=_[l._categories[k]];return L+1?L:b}}return m.identity}var p=h(n),a=h(t);t&&t.type==="category"&&(o=t._categories.length);var x=new Array(o);for(i=0;i<o;i++)for(r=n&&n.type==="category"?n._categories.length:d(v,i),x[i]=new Array(r),u=0;u<r;u++)x[i][u]=f(s(v,a(i),p(u)));return x}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],795:[function(y,ee,te){ee.exports={min:"zmin",max:"zmax"}},{}],796:[function(y,ee,te){var g=y("../../lib"),m=y("../../constants/numerical").BADNUM,b=y("../../plots/cartesian/align_period");ee.exports=function(v,e,n,t,o,r){var d=v._length,c=e.makeCalcdata(v,t),i=n.makeCalcdata(v,o);c=b(v,e,t,c).vals,i=b(v,n,o,i).vals;var u,f,s,h,p=v.text,a=p!==void 0&&g.isArray1D(p),x=v.hovertext,l=x!==void 0&&g.isArray1D(x),w=g.distinctVals(c),_=w.vals,T=g.distinctVals(i),k=T.vals,L=[],A=k.length,I=_.length;for(u=0;u<r.length;u++)L[u]=g.init2dArray(A,I);a&&(s=g.init2dArray(A,I)),l&&(h=g.init2dArray(A,I));var P=g.init2dArray(A,I);for(u=0;u<d;u++)if(c[u]!==m&&i[u]!==m){var S=g.findBin(c[u]+w.minDiff/2,_),E=g.findBin(i[u]+T.minDiff/2,k);for(f=0;f<r.length;f++){var D=v[r[f]];L[f][E][S]=D[u],P[E][S]=u}a&&(s[E][S]=p[u]),l&&(h[E][S]=x[u])}for(v["_"+t]=_,v["_"+o]=k,f=0;f<r.length;f++)v["_"+r[f]]=L[f];a&&(v._text=s),l&&(v._hovertext=h),e&&e.type==="category"&&(v["_"+t+"CategoryMap"]=_.map(function(F){return e._categories[F]})),n&&n.type==="category"&&(v["_"+o+"CategoryMap"]=k.map(function(F){return n._categories[F]})),v._after2before=P}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551}],797:[function(y,ee,te){var g=y("../../lib"),m=y("./xyz_defaults"),b=y("./label_defaults"),v=y("../scatter/period_defaults"),e=y("./style_defaults"),n=y("../../components/colorscale/defaults"),t=y("./attributes");ee.exports=function(o,r,d,c){function i(u,f){return g.coerce(o,r,t,u,f)}m(o,r,i,c)?(v(o,r,c,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),b(i,c),e(o,r,i,c),i("hoverongaps"),i("connectgaps",g.isArray1D(r.z)&&r.zsmooth!==!1),n(o,r,c,i,{prefix:"",cLetter:"z"})):r.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"../scatter/period_defaults":946,"./attributes":792,"./label_defaults":802,"./style_defaults":806,"./xyz_defaults":807}],798:[function(y,ee,te){var g=y("../../lib").maxRowLength;ee.exports=function(m){var b,v,e,n,t,o,r,d,c=[],i={},u=[],f=m[0],s=[],h=[0,0,0],p=g(m);for(v=0;v<m.length;v++)for(b=s,s=f,f=m[v+1]||[],e=0;e<p;e++)s[e]===void 0&&((o=(s[e-1]!==void 0?1:0)+(s[e+1]!==void 0?1:0)+(b[e]!==void 0?1:0)+(f[e]!==void 0?1:0))?(v===0&&o++,e===0&&o++,v===m.length-1&&o++,e===s.length-1&&o++,o<4&&(i[[v,e]]=[v,e,o]),c.push([v,e,o])):u.push([v,e]));for(;u.length;){for(r={},d=!1,t=u.length-1;t>=0;t--)(o=((i[[(v=(n=u[t])[0])-1,e=n[1]]]||h)[2]+(i[[v+1,e]]||h)[2]+(i[[v,e-1]]||h)[2]+(i[[v,e+1]]||h)[2])/20)&&(r[n]=[v,e,o],u.splice(t,1),d=!0);if(!d)throw"findEmpties iterated with no new neighbors";for(n in r)i[n]=r[n],c.push(r[n])}return c.sort(function(a,x){return x[2]-a[2]})}},{"../../lib":503}],799:[function(y,ee,te){var g=y("../../components/fx"),m=y("../../lib"),b=y("../../plots/cartesian/axes"),v=y("../../components/colorscale").extractOpts;ee.exports=function(e,n,t,o,r){r||(r={});var d,c,i,u,f=r.isContour,s=e.cd[0],h=s.trace,p=e.xa,a=e.ya,x=s.x,l=s.y,w=s.z,_=s.xCenter,T=s.yCenter,k=s.zmask,L=h.zhoverformat,A=x,I=l;if(e.index!==!1){try{i=Math.round(e.index[1]),u=Math.round(e.index[0])}catch{return void m.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(i<0||i>=w[0].length||u<0||u>w.length)return}else{if(g.inbox(n-x[0],n-x[x.length-1],0)>0||g.inbox(t-l[0],t-l[l.length-1],0)>0)return;if(f){var P;for(A=[2*x[0]-x[1]],P=1;P<x.length;P++)A.push((x[P]+x[P-1])/2);for(A.push([2*x[x.length-1]-x[x.length-2]]),I=[2*l[0]-l[1]],P=1;P<l.length;P++)I.push((l[P]+l[P-1])/2);I.push([2*l[l.length-1]-l[l.length-2]])}i=Math.max(0,Math.min(A.length-2,m.findBin(n,A))),u=Math.max(0,Math.min(I.length-2,m.findBin(t,I)))}var S,E,D=p.c2p(x[i]),F=p.c2p(x[i+1]),H=a.c2p(l[u]),V=a.c2p(l[u+1]);f?(S=s.orig_x||x,E=s.orig_y||l,F=D,d=S[i],V=H,c=E[u]):(S=s.orig_x||_||x,E=s.orig_y||T||l,d=_?S[i]:(S[i]+S[i+1])/2,c=T?E[u]:(E[u]+E[u+1])/2,p&&p.type==="category"&&(d=x[i]),a&&a.type==="category"&&(c=l[u]),h.zsmooth&&(D=F=p.c2p(d),H=V=a.c2p(c)));var Z=w[u][i];if(k&&!k[u][i]&&(Z=void 0),Z!==void 0||h.hoverongaps){var K;Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[u])?K=s.hovertext[u][i]:Array.isArray(s.text)&&Array.isArray(s.text[u])&&(K=s.text[u][i]);var q=v(h),W={type:"linear",range:[q.min,q.max],hoverformat:L,_separators:p._separators,_numFormat:p._numFormat},$=b.tickText(W,Z,"hover").text;return[m.extendFlat(e,{index:h._after2before?h._after2before[u][i]:[u,i],distance:e.maxHoverDistance,spikeDistance:e.maxSpikeDistance,x0:D,x1:F,y0:H,y1:V,xLabelVal:d,yLabelVal:c,zLabelVal:Z,zLabel:$,text:K})]}}},{"../../components/colorscale":378,"../../components/fx":406,"../../lib":503,"../../plots/cartesian/axes":554}],800:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc"),plot:y("./plot"),colorbar:y("./colorbar"),style:y("./style"),hoverPoints:y("./hover"),moduleType:"trace",name:"heatmap",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}},{"../../plots/cartesian":568,"./attributes":792,"./calc":793,"./colorbar":795,"./defaults":797,"./hover":799,"./plot":804,"./style":805}],801:[function(y,ee,te){var g=y("../../lib"),m=[[-1,0],[1,0],[0,-1],[0,1]];function b(e){return .5-.25*Math.min(1,.5*e)}function v(e,n,t){var o,r,d,c,i,u,f,s,h,p,a,x,l,w=0;for(c=0;c<n.length;c++){for(r=(o=n[c])[0],d=o[1],a=e[r][d],p=0,h=0,i=0;i<4;
1221i++)(f=e[r+(u=m[i])[0]])&&(s=f[d+u[1]])!==void 0&&(p===0?x=l=s:(x=Math.min(x,s),l=Math.max(l,s)),h++,p+=s);if(h===0)throw"iterateInterp2d order is wrong: no defined neighbors";e[r][d]=p/h,a===void 0?h<4&&(w=1):(e[r][d]=(1+t)*e[r][d]-t*a,l>x&&(w=Math.max(w,Math.abs(e[r][d]-a)/(l-x))))}return w}ee.exports=function(e,n){var t,o=1;for(v(e,n),t=0;t<n.length&&!(n[t][2]<4);t++);for(n=n.slice(t),t=0;t<100&&o>.01;t++)o=v(e,n,b(o));return o>.01&&g.log("interp2d didn't converge quickly",o),e}},{"../../lib":503}],802:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b){m("texttemplate");var v=g.extendFlat({},b.font,{color:"auto",size:"auto"});g.coerceFont(m,"textfont",v)}},{"../../lib":503}],803:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib").isArrayOrTypedArray;ee.exports=function(b,v,e,n,t,o){var r,d,c,i=[],u=g.traceIs(b,"contour"),f=g.traceIs(b,"histogram"),s=g.traceIs(b,"gl2d");if(m(v)&&v.length>1&&!f&&o.type!=="category"){var h=v.length;if(!(h<=t))return u?v.slice(0,t):v.slice(0,t+1);if(u||s)i=v.slice(0,t);else if(t===1)i=[v[0]-.5,v[0]+.5];else{for(i=[1.5*v[0]-.5*v[1]],c=1;c<h;c++)i.push(.5*(v[c-1]+v[c]));i.push(1.5*v[h-1]-.5*v[h-2])}if(h<t){var p=i[i.length-1],a=p-i[i.length-2];for(c=h;c<t;c++)p+=a,i.push(p)}}else{var x=b[o._id.charAt(0)+"calendar"];for(f?r=o.r2c(e,0,x):m(v)&&v.length===1?r=v[0]:e===void 0?r=0:r=(o.type==="log"?o.d2c:o.r2c)(e,0,x),d=n||1,c=u||s?0:-.5;c<t;c++)i.push(r+d*c)}return i}},{"../../lib":503,"../../registry":638}],804:[function(y,ee,te){var g=y("@plotly/d3"),m=y("tinycolor2"),b=y("../../registry"),v=y("../../components/drawing"),e=y("../../plots/cartesian/axes"),n=y("../../lib"),t=y("../../lib/svg_text_utils"),o=y("../scatter/format_labels"),r=y("../../components/color"),d=y("../../components/colorscale").extractOpts,c=y("../../components/colorscale").makeColorScaleFuncFromTrace,i=y("../../constants/xmlns_namespaces"),u=y("../../constants/alignment").LINE_SPACING;function f(x){return x.selectAll("g.heatmap-label")}function s(x){f(x).remove()}function h(x,l){var w=l.length-2,_=n.constrain(n.findBin(x,l),0,w),T=l[_],k=l[_+1],L=n.constrain(_+(x-T)/(k-T)-.5,0,w),A=Math.round(L),I=Math.abs(L-A);return L&&L!==w&&I?{bin0:A,frac:I,bin1:Math.round(A+I/(L-A))}:{bin0:A,bin1:A,frac:0}}function p(x,l){var w=l.length-1,_=n.constrain(n.findBin(x,l),0,w),T=l[_],k=(x-T)/(l[_+1]-T)||0;return k<=0?{bin0:_,bin1:_,frac:0}:k<.5?{bin0:_,bin1:_+1,frac:k}:{bin0:_+1,bin1:_,frac:1-k}}function a(x,l,w){x[l]=w[0],x[l+1]=w[1],x[l+2]=w[2],x[l+3]=Math.round(255*w[3])}ee.exports=function(x,l,w,_){var T=l.xaxis,k=l.yaxis;n.makeTraceGroups(_,w,"hm").each(function(L){var A,I,P,S,E,D,F,H,V=g.select(this),Z=L[0],K=Z.trace,q=K.xgap||0,W=K.ygap||0,$=Z.z,R=Z.x,N=Z.y,U=Z.xCenter,Q=Z.yCenter,j=b.traceIs(K,"contour"),X=j?"best":K.zsmooth,J=$.length,re=n.maxRowLength($),ne=!1,se=!1;for(D=0;A===void 0&&D<R.length-1;)A=T.c2p(R[D]),D++;for(D=R.length-1;I===void 0&&D>0;)I=T.c2p(R[D]),D--;for(I<A&&(P=I,I=A,A=P,ne=!0),D=0;S===void 0&&D<N.length-1;)S=k.c2p(N[D]),D++;for(D=N.length-1;E===void 0&&D>0;)E=k.c2p(N[D]),D--;if(E<S&&(P=S,S=E,E=P,se=!0),j&&(U=R,Q=N,R=Z.xfill,N=Z.yfill),X!=="fast"){var oe=X==="best"?0:.5;A=Math.max(-oe*T._length,A),I=Math.min((1+oe)*T._length,I),S=Math.max(-oe*k._length,S),E=Math.min((1+oe)*k._length,E)}var pe,ce,de=Math.round(I-A),xe=Math.round(E-S);if(de<=0||xe<=0)return V.selectAll("image").data([]).exit().remove(),void s(V);X==="fast"?(pe=re,ce=J):(pe=de,ce=xe);var we=document.createElement("canvas");we.width=pe,we.height=ce;var be,Ee,fe=we.getContext("2d"),me=c(K,{noNumericCheck:!0,returnArray:!0});X==="fast"?(be=ne?function(Ir){return re-1-Ir}:n.identity,Ee=se?function(Ir){return J-1-Ir}:n.identity):(be=function(Ir){return n.constrain(Math.round(T.c2p(R[Ir])-A),0,de)},Ee=function(Ir){return n.constrain(Math.round(k.c2p(N[Ir])-S),0,xe)});var Te,_e,Ae,Pe,De=Ee(0),Ve=[De,De],Qe=ne?0:1,Oe=se?0:1,Ue=0,Ge=0,Ye=0,tt=0;function lt(Ir,xr){if(Ir!==void 0){var Nr=me(Ir);return Nr[0]=Math.round(Nr[0]),Nr[1]=Math.round(Nr[1]),Nr[2]=Math.round(Nr[2]),Ue+=xr,Ge+=Nr[0]*xr,Ye+=Nr[1]*xr,tt+=Nr[2]*xr,Nr}return[0,0,0,0]}function vt(Ir,xr,Nr,en){var Qr=Ir[Nr.bin0];
1221if(Qr===void 0)return lt(void 0,1);var yn,un=Ir[Nr.bin1],$r=xr[Nr.bin0],In=xr[Nr.bin1],Qt=un-Qr||0,Pt=$r-Qr||0;return yn=un===void 0?In===void 0?0:$r===void 0?2*(In-Qr):2*(2*In-$r-Qr)/3:In===void 0?$r===void 0?0:2*(2*Qr-un-$r)/3:$r===void 0?2*(2*In-un-Qr)/3:In+Qr-un-$r,lt(Qr+Nr.frac*Qt+en.frac*(Pt+Nr.frac*yn))}if(X){var It,St=0;try{It=new Uint8Array(de*xe*4)}catch{It=new Array(de*xe*4)}if(X==="best"){var rt,et,Tt,Vt=U||R,Kt=Q||N,Be=new Array(Vt.length),qe=new Array(Kt.length),Re=new Array(de),Xe=U?p:h,ke=Q?p:h;for(D=0;D<Vt.length;D++)Be[D]=Math.round(T.c2p(Vt[D])-A);for(D=0;D<Kt.length;D++)qe[D]=Math.round(k.c2p(Kt[D])-S);for(D=0;D<de;D++)Re[D]=Xe(D,Be);for(F=0;F<xe;F++)for(et=$[(rt=ke(F,qe)).bin0],Tt=$[rt.bin1],D=0;D<de;D++,St+=4)a(It,St,Pe=vt(et,Tt,Re[D],rt))}else for(F=0;F<J;F++)for(Ae=$[F],Ve=Ee(F),D=0;D<de;D++)Pe=lt(Ae[D],1),a(It,St=4*(Ve*de+be(D)),Pe);var Le=fe.createImageData(de,xe);try{Le.data.set(It)}catch{var Ie=Le.data,Ce=Ie.length;for(F=0;F<Ce;F++)Ie[F]=It[F]}fe.putImageData(Le,0,0)}else{var Je=Math.floor(q/2),it=Math.floor(W/2);for(F=0;F<J;F++)if(Ae=$[F],Ve.reverse(),Ve[Oe]=Ee(F+1),Ve[0]!==Ve[1]&&Ve[0]!==void 0&&Ve[1]!==void 0)for(Te=[_e=be(0),_e],D=0;D<re;D++)Te.reverse(),Te[Qe]=be(D+1),Te[0]!==Te[1]&&Te[0]!==void 0&&Te[1]!==void 0&&(Pe=lt(Ae[D],(Te[1]-Te[0])*(Ve[1]-Ve[0])),fe.fillStyle="rgba("+Pe.join(",")+")",fe.fillRect(Te[0]+Je,Ve[0]+it,Te[1]-Te[0]-q,Ve[1]-Ve[0]-W))}Ge=Math.round(Ge/Ue),Ye=Math.round(Ye/Ue),tt=Math.round(tt/Ue);var ht=m("rgb("+Ge+","+Ye+","+tt+")");x._hmpixcount=(x._hmpixcount||0)+Ue,x._hmlumcount=(x._hmlumcount||0)+Ue*ht.getLuminance();var ut=V.selectAll("image").data(L);ut.enter().append("svg:image").attr({xmlns:i.svg,preserveAspectRatio:"none"}),ut.attr({height:xe,width:de,x:A,y:S,"xlink:href":we.toDataURL("image/png")}),s(V);var kt=K.texttemplate;if(kt){var ot=d(K),Lt={type:"linear",range:[ot.min,ot.max],_separators:T._separators,_numFormat:T._numFormat},Et=K.type==="histogram2dcontour",Ze=K.type==="contour",pt=Ze?J-1:J,Ct=Ze?1:0,zt=Ze?re-1:re,Gt=[];for(D=Ze?1:0;D<pt;D++){var ze;if(Ze)ze=Z.y[D];else if(Et){if(D===0||D===J-1)continue;ze=Z.y[D]}else if(Z.yCenter)ze=Z.yCenter[D];else{if(D+1===J&&Z.y[D+1]===void 0)continue;ze=(Z.y[D]+Z.y[D+1])/2}var st=Math.round(k.c2p(ze));if(!(0>st||st>k._length))for(F=Ct;F<zt;F++){var yt;if(Ze)yt=Z.x[F];else if(Et){if(F===0||F===re-1)continue;yt=Z.x[F]}else if(Z.xCenter)yt=Z.xCenter[F];else{if(F+1===re&&Z.x[F+1]===void 0)continue;yt=(Z.x[F]+Z.x[F+1])/2}var Dt=Math.round(T.c2p(yt));if(!(0>Dt||Dt>T._length)){var jt=o({x:yt,y:ze},K,x._fullLayout);jt.x=yt,jt.y=ze;var or=Z.z[D][F];or===void 0?(jt.z="",jt.zLabel=""):(jt.z=or,jt.zLabel=e.tickText(Lt,or,"hover").text);var Ut=Z.text&&Z.text[D]&&Z.text[D][F];Ut!==void 0&&Ut!==!1||(Ut=""),jt.text=Ut;var Xt=n.texttemplateString(kt,jt,x._fullLayout._d3locale,jt,K._meta||{});if(Xt){var sr=Xt.split("<br>"),vr=sr.length,pr=0;for(H=0;H<vr;H++)pr=Math.max(pr,sr[H].length);Gt.push({l:vr,c:pr,t:Xt,x:Dt,y:st,z:or})}}}}var ar=K.textfont,lr=ar.family,hr=ar.size,Or=x._fullLayout.font.size;if(!hr||hr==="auto"){var dr=1/0,Fr=1/0,tn=0,rn=0;for(H=0;H<Gt.length;H++){var An=Gt[H];if(tn=Math.max(tn,An.l),rn=Math.max(rn,An.c),H<Gt.length-1){var Ln=Gt[H+1],_n=Math.abs(Ln.x-An.x),Vr=Math.abs(Ln.y-An.y);_n&&(dr=Math.min(dr,_n)),Vr&&(Fr=Math.min(Fr,Vr))}}isFinite(dr)&&isFinite(Fr)?(dr-=q,Fr-=W,dr/=rn,Fr/=tn,dr/=u/2,Fr/=u,hr=Math.min(Math.floor(dr),Math.floor(Fr),Or)):hr=Or}if(hr<=0||!isFinite(hr))return;f(V).data(Gt).enter().append("g").classed("heatmap-label",1).append("text").attr("text-anchor","middle").each(function(Ir){var xr=g.select(this),Nr=ar.color;Nr&&Nr!=="auto"||(Nr=r.contrast("rgba("+me(Ir.z).join()+")")),xr.attr("data-notex",1).call(t.positionText,function(en){return en.x}(Ir),function(en){return en.y-hr*(en.l*u/2-1)}(Ir)).call(v.font,lr,hr,Nr).text(Ir.t).call(t.convertToTspans,x)})}})}},{"../../components/color":366,"../../components/colorscale":378,"../../components/drawing":388,"../../constants/alignment":471,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"../scatter/format_labels":935,"@plotly/d3":58,tinycolor2:312}],805:[function(y,ee,te){var g=y("@plotly/d3");ee.exports=function(m){g.select(m).selectAll(".hm image").style("opacity",function(b){return b.trace.opacity})}},{"@plotly/d3":58}],806:[function(y,ee,te){ee.exports=function(g,m,b){b("zsmooth")===!1&&(b
1221("xgap"),b("ygap")),b("zhoverformat")}},{}],807:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../registry");function v(e,n){var t=n(e);return(t?n(e+"type","array"):"scaled")==="scaled"&&(n(e+"0"),n("d"+e)),t}ee.exports=function(e,n,t,o,r,d){var c,i,u=t("z");if(r=r||"x",d=d||"y",u===void 0||!u.length)return 0;if(m.isArray1D(e.z)){c=t(r),i=t(d);var f=m.minRowLength(c),s=m.minRowLength(i);if(f===0||s===0)return 0;n._length=Math.min(f,s,u.length)}else{if(c=v(r,t),i=v(d,t),!function(h){for(var p,a=!0,x=!1,l=!1,w=0;w<h.length;w++){if(p=h[w],!m.isArrayOrTypedArray(p)){a=!1;break}p.length>0&&(x=!0);for(var _=0;_<p.length;_++)if(g(p[_])){l=!0;break}}return a&&x&&l}(u))return 0;t("transpose"),n._length=null}return e.type==="heatmapgl"||b.getComponentMethod("calendars","handleTraceDefaults")(e,n,[r,d],o),!0}},{"../../lib":503,"../../registry":638,"fast-isnumeric":190}],808:[function(y,ee,te){for(var g=y("../heatmap/attributes"),m=y("../../components/colorscale/attributes"),b=y("../../lib/extend").extendFlat,v=y("../../plot_api/edit_types").overrideAll,e=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],n={},t=0;t<e.length;t++){var o=e[t];n[o]=g[o]}n.zsmooth={valType:"enumerated",values:["fast",!1],dflt:"fast",editType:"calc"},b(n,m("",{cLetter:"z",autoColorDflt:!1})),ee.exports=v(n,"calc","nested")},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../heatmap/attributes":792}],809:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_heatmap2d,m=y("../../plots/cartesian/axes"),b=y("../../lib/str2rgbarray");function v(n,t){this.scene=n,this.uid=t,this.type="heatmapgl",this.name="",this.hoverinfo="all",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={zsmooth:"fast",z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=g(n.glplot,this.options),this.heatmap._trace=this}var e=v.prototype;e.handlePick=function(n){var t=this.options,o=t.shape,r=n.pointId,d=r%o[0],c=Math.floor(r/o[0]),i=r;return{trace:this,dataCoord:n.dataCoord,traceCoord:[t.x[d],t.y[c],t.z[i]],textLabel:this.textLabels[r],name:this.name,pointIndex:[c,d],hoverinfo:this.hoverinfo}},e.update=function(n,t){var o=t[0];this.index=n.index,this.name=n.name,this.hoverinfo=n.hoverinfo;var r=o.z;this.options.z=[].concat.apply([],r);var d=r[0].length,c=r.length;this.options.shape=[d,c],this.options.x=o.x,this.options.y=o.y,this.options.zsmooth=n.zsmooth;var i=function(p){for(var a=p.colorscale,x=p.zmin,l=p.zmax,w=a.length,_=new Array(w),T=new Array(4*w),k=0;k<w;k++){var L=a[k],A=b(L[1]);_[k]=x+L[0]*(l-x);for(var I=0;I<4;I++)T[4*k+I]=A[I]}return{colorLevels:_,colorValues:T}}(n);this.options.colorLevels=i.colorLevels,this.options.colorValues=i.colorValues,this.textLabels=[].concat.apply([],n.text),this.heatmap.update(this.options);var u,f,s=this.scene.xaxis,h=this.scene.yaxis;n.zsmooth===!1&&(u={ppad:o.x[1]-o.x[0]},f={ppad:o.y[1]-o.y[0]}),n._extremes[s._id]=m.findExtremes(s,o.x,u),n._extremes[h._id]=m.findExtremes(h,o.y,f)},e.dispose=function(){this.heatmap.dispose()},ee.exports=function(n,t,o){var r=new v(n,t.uid);return r.update(t,o),r}},{"../../../stackgl_modules":1120,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554}],810:[function(y,ee,te){var g=y("../../lib"),m=y("../heatmap/xyz_defaults"),b=y("../../components/colorscale/defaults"),v=y("./attributes");ee.exports=function(e,n,t,o){function r(d,c){return g.coerce(e,n,v,d,c)}m(e,n,r,o)?(r("text"),r("zsmooth"),b(e,n,o,r,{prefix:"",cLetter:"z"})):n.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"../heatmap/xyz_defaults":807,"./attributes":808}],811:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../heatmap/colorbar"),calc:y("../heatmap/calc"),plot:y("./convert"),moduleType:"trace",name:"heatmapgl",basePlotModule:y("../../plots/gl2d"),categories:["gl","gl2d","2dMap"],meta:{}}},{"../../plots/gl2d":596,"../heatmap/calc":793,"../heatmap/colorbar":795,"./attributes":808,"./convert":809,"./defaults":810}],812:[function(y,ee,te){var g=y("../bar/attributes"),m=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../../plots/template_attributes").texttemplateAttrs,e=y("../../plots/font_attributes"),n=y("./bin_attributes"),t=y("./constants"),o=y("../../lib/extend").extendFlat;ee.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:m("x"),yhoverformat:m("y"),text:o({},g.text,{}),hovertext:o({},g.hovertext,{}),orientation:g.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:n("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:n("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:b({},{keys:t.eventDataKeys}),texttemplate:v({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:o({},g.textposition,{arrayOk:!1}),textfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:g.insidetextanchor,textangle:g.textangle,cliponaxis:g.cliponaxis,constraintext:g.constraintext,marker:g.marker,offsetgroup:g.offsetgroup,alignmentgroup:g.alignmentgroup,selected:g.selected,unselected:g.unselected,_deprecated:{bardir:g._deprecated.bardir}}},{"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"../bar/attributes":648,"./bin_attributes":814,"./constants":818}],813:[function(y,ee,te){ee.exports=function(g,m){for(var b=g.length,v=0,e=0;e<b;e++)m[e]?(g[e]/=m[e],v+=g[e]):g[e]=null;return v}},{}],814:[function(y,ee,te){ee.exports=function(g,m){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},{}],815:[function(y,ee,te){var g=y("fast-isnumeric");ee.exports={count:function(m,b,v){return v[m]++,1},sum:function(m,b,v,e){var n=e[b];return g(n)?(n=Number(n),v[m]+=n,n):0},avg:function(m,b,v,e,n){var t=e[b];return g(t)&&(t=Number(t),v[m]+=t,n[m]++),0},min:function(m,b,v,e){var n=e[b];
1221if(g(n)){if(n=Number(n),!g(v[m]))return v[m]=n,n;if(v[m]>n){var t=n-v[m];return v[m]=n,t}}return 0},max:function(m,b,v,e){var n=e[b];if(g(n)){if(n=Number(n),!g(v[m]))return v[m]=n,n;if(v[m]<n){var t=n-v[m];return v[m]=n,t}}return 0}}},{"fast-isnumeric":190}],816:[function(y,ee,te){var g=y("../../constants/numerical"),m=g.ONEAVGYEAR,b=g.ONEAVGMONTH,v=g.ONEDAY,e=g.ONEHOUR,n=g.ONEMIN,t=g.ONESEC,o=y("../../plots/cartesian/axes").tickIncrement;function r(u,f,s,h){if(u*f<=0)return 1/0;for(var p=Math.abs(f-u),a=s.type==="date",x=d(p,a),l=0;l<10;l++){var w=d(80*x,a);if(x===w||!c(w,u,f,a,s,h))break;x=w}return x}function d(u,f){return f&&u>t?u>v?u>1.1*m?m:u>1.1*b?b:v:u>e?e:u>n?n:t:Math.pow(10,Math.floor(Math.log(u)/Math.LN10))}function c(u,f,s,h,p,a){if(h&&u>v){var x=i(f,p,a),l=i(s,p,a),w=u===m?0:1;return x[w]!==l[w]}return Math.floor(s/u)-Math.floor(f/u)>.1}function i(u,f,s){var h=f.c2d(u,m,s).split("-");return h[0]===""&&(h.unshift(),h[0]="-"+h[0]),h}ee.exports=function(u,f,s,h,p){var a,x,l=-1.1*f,w=-.1*f,_=u-w,T=s[0],k=s[1],L=Math.min(r(T+w,T+_,h,p),r(k+w,k+_,h,p)),A=Math.min(r(T+l,T+w,h,p),r(k+l,k+w,h,p));if(L>A&&A<Math.abs(k-T)/4e3?(a=L,x=!1):(a=Math.min(L,A),x=!0),h.type==="date"&&a>v){var I=a===m?1:6,P=a===m?"M12":"M1";return function(S,E){var D=h.c2d(S,m,p),F=D.indexOf("-",I);F>0&&(D=D.substr(0,F));var H=h.d2c(D,0,p);if(H<S){var V=o(H,P,!1,p);(H+V)/2<S+u&&(H=V)}return E&&x?o(H,P,!0,p):H}}return function(S,E){var D=a*Math.round(S/a);return D+a/10<S&&D+.9*a<S+u&&(D+=a),E&&x&&(D-=a),D}}},{"../../constants/numerical":479,"../../plots/cartesian/axes":554}],817:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../registry"),v=y("../../plots/cartesian/axes"),e=y("../bar/arrays_to_calcdata"),n=y("./bin_functions"),t=y("./norm_functions"),o=y("./average"),r=y("./bin_label_vals");function d(c,i,u,f,s){var h,p,a,x,l,w,_,T=f+"bins",k=c._fullLayout,L=i["_"+f+"bingroup"],A=k._histogramBinOpts[L],I=k.barmode==="overlay",P=function(ce){return u.r2c(ce,0,x)},S=function(ce){return u.c2r(ce,0,x)},E=u.type==="date"?function(ce){return ce||ce===0?m.cleanDate(ce,null,x):null}:function(ce){return g(ce)?Number(ce):null};function D(ce,de,xe){de[ce+"Found"]?(de[ce]=E(de[ce]),de[ce]===null&&(de[ce]=xe[ce])):(w[ce]=de[ce]=xe[ce],m.nestedProperty(p[0],T+"."+ce).set(xe[ce]))}if(i["_"+f+"autoBinFinished"])delete i["_"+f+"autoBinFinished"];else{p=A.traces;var F=[],H=!0,V=!1,Z=!1;for(h=0;h<p.length;h++)if((a=p[h]).visible){var K=A.dirs[h];l=a["_"+K+"pos0"]=u.makeCalcdata(a,K),F=m.concat(F,l),delete a["_"+f+"autoBinFinished"],i.visible===!0&&(H?H=!1:(delete a._autoBin,a["_"+f+"autoBinFinished"]=1),b.traceIs(a,"2dMap")&&(V=!0),a.type==="histogram2dcontour"&&(Z=!0))}x=p[0][f+"calendar"];var q=v.autoBin(F,u,A.nbins,V,x,A.sizeFound&&A.size),W=p[0]._autoBin={};if(w=W[A.dirs[0]]={},Z&&(A.size||(q.start=S(v.tickIncrement(P(q.start),q.size,!0,x))),A.end===void 0&&(q.end=S(v.tickIncrement(P(q.end),q.size,!1,x)))),I&&!b.traceIs(i,"2dMap")&&q._dataSpan===0&&u.type!=="category"&&u.type!=="multicategory"){if(s)return[q,l,!0];q=function(ce,de,xe,we,be){var Ee,fe,me,Te=ce._fullLayout,_e=function(vt,It){for(var St=It.xaxis,rt=It.yaxis,et=It.orientation,Tt=[],Vt=vt._fullData,Kt=0;Kt<Vt.length;Kt++){var Be=Vt[Kt];Be.type==="histogram"&&Be.visible===!0&&Be.orientation===et&&Be.xaxis===St&&Be.yaxis===rt&&Tt.push(Be)}return Tt}(ce,de),Ae=!1,Pe=1/0,De=[de];for(Ee=0;Ee<_e.length;Ee++)if((fe=_e[Ee])===de)Ae=!0;else if(Ae){var Ve=d(ce,fe,xe,we,!0),Qe=Ve[0],Oe=Ve[2];fe["_"+we+"autoBinFinished"]=1,fe["_"+we+"pos0"]=Ve[1],Oe?De.push(fe):Pe=Math.min(Pe,Qe.size)}else me=Te._histogramBinOpts[fe["_"+we+"bingroup"]],Pe=Math.min(Pe,me.size||fe[be].size);var Ue=new Array(De.length);for(Ee=0;Ee<De.length;Ee++)for(var Ge=De[Ee]["_"+we+"pos0"],Ye=0;Ye<Ge.length;Ye++)if(Ge[Ye]!==void 0){Ue[Ee]=Ge[Ye];break}for(isFinite(Pe)||(Pe=m.distinctVals(Ue).minDiff),Ee=0;Ee<De.length;Ee++){var tt=(fe=De[Ee])[we+"calendar"],lt={start:xe.c2r(Ue[Ee]-Pe/2,0,tt),end:xe.c2r(Ue[Ee]+Pe/2,0,tt),size:Pe};fe._input[be]=fe[be]=lt,(me=Te._histogramBinOpts[fe["_"+we+"bingroup"]])&&m.extendFlat(me,lt)}return de[be]}(c,i,u,f,T)}(_=a.cumulative||{}).enabled&&_.currentbin!=="include"&&(_.direction==="decreasing"?q.start=S(v.tickIncrement(P(q.start),q.size,!0,x)):q.end=S(v.tickIncrement(P(q.end),q.size,!1,x))),A.size=q.size,A.sizeFound||(w.size=q.size,m.nestedProperty(p[0],T+".size").set(q.size)),D("start",A,q),D("end",A,q)}l=i["_"+f+"pos0"],delete i["_"+f+"pos0"];var $=i._input[T]||{},R=m.extendFlat({},A),N=A.start,U=u.r2l($.start),Q=U!==void 0;
vendor: 1,963 bytes, line 1221
1221if((A.startFound||Q)&&U!==u.r2l(N)){var j=Q?U:m.aggNums(Math.min,null,l),X={type:u.type==="category"||u.type==="multicategory"?"linear":u.type,r2l:u.r2l,dtick:A.size,tick0:N,calendar:x,range:[j,v.tickIncrement(j,A.size,!1,x)].map(u.l2r)},J=v.tickFirst(X);J>u.r2l(j)&&(J=v.tickIncrement(J,A.size,!0,x)),R.start=u.l2r(J),Q||m.nestedProperty(i,T+".start").set(R.start)}var re=A.end,ne=u.r2l($.end),se=ne!==void 0;if((A.endFound||se)&&ne!==u.r2l(re)){var oe=se?ne:m.aggNums(Math.max,null,l);R.end=u.l2r(oe),se||m.nestedProperty(i,T+".start").set(R.end)}var pe="autobin"+f;return i._input[pe]===!1&&(i._input[T]=m.extendFlat({},i[T]||{}),delete i._input[pe],delete i[pe]),[R,l]}ee.exports={calc:function(c,i){var u,f,s,h,p=[],a=[],x=i.orientation==="h",l=v.getFromId(c,x?i.yaxis:i.xaxis),w=x?"y":"x",_={x:"y",y:"x"}[w],T=i[w+"calendar"],k=i.cumulative,L=d(c,i,l,w),A=L[0],I=L[1],P=typeof A.size=="string",S=[],E=P?S:A,D=[],F=[],H=[],V=0,Z=i.histnorm,K=i.histfunc,q=Z.indexOf("density")!==-1;k.enabled&&q&&(Z=Z.replace(/ ?density$/,""),q=!1);var W,$=K==="max"||K==="min"?null:0,R=n.count,N=t[Z],U=!1,Q=function(fe){return l.r2c(fe,0,T)};for(m.isArrayOrTypedArray(i[_])&&K!=="count"&&(W=i[_],U=K==="avg",R=n[K]),u=Q(A.start),s=Q(A.end)+(u-v.tickIncrement(u,A.size,!1,T))/1e6;u<s&&p.length<1e6&&(f=v.tickIncrement(u,A.size,!1,T),p.push((u+f)/2),a.push($),H.push([]),S.push(u),q&&D.push(1/(f-u)),U&&F.push(0),!(f<=u));)u=f;S.push(u),P||l.type!=="date"||(E={start:Q(E.start),end:Q(E.end),size:E.size}),c._fullLayout._roundFnOpts||(c._fullLayout._roundFnOpts={});var j=i["_"+w+"bingroup"],X={leftGap:1/0,rightGap:1/0};j&&(c._fullLayout._roundFnOpts[j]||(c._fullLayout._roundFnOpts[j]=X),X=c._fullLayout._roundFnOpts[j]);var J,re=a.length,ne=!0,se=X.leftGap,oe=X.rightGap,pe={};for(u=0;u<I.length;u++){var ce=I[u];(h=m.findBin(ce,E))>=0&&h<re&&(V+=R(h,u,a,W,F),ne&&H[h].length&&ce!==I[H[h][0]]&&(ne=!1),H[h].push(u),pe[u]=h,se=Math.min(se,ce-S[h]),oe=Math.min(oe,S[h+1]-ce))}
1221X.leftGap=se,X.rightGap=oe,ne||(J=function(fe,me){return function(){var Te=c._fullLayout._roundFnOpts[j];return r(Te.leftGap,Te.rightGap,S,l,T)(fe,me)}}),U&&(V=o(a,F)),N&&N(a,V,D),k.enabled&&function(fe,me,Te){var _e,Ae,Pe;function De(Qe){Pe=fe[Qe],fe[Qe]/=2}function Ve(Qe){Ae=fe[Qe],fe[Qe]=Pe+Ae/2,Pe+=Ae}if(Te==="half")if(me==="increasing")for(De(0),_e=1;_e<fe.length;_e++)Ve(_e);else for(De(fe.length-1),_e=fe.length-2;_e>=0;_e--)Ve(_e);else if(me==="increasing"){for(_e=1;_e<fe.length;_e++)fe[_e]+=fe[_e-1];Te==="exclude"&&(fe.unshift(0),fe.pop())}else{for(_e=fe.length-2;_e>=0;_e--)fe[_e]+=fe[_e+1];Te==="exclude"&&(fe.push(0),fe.shift())}}(a,k.direction,k.currentbin);var de=Math.min(p.length,a.length),xe=[],we=0,be=de-1;for(u=0;u<de;u++)if(a[u]){we=u;break}for(u=de-1;u>=we;u--)if(a[u]){be=u;break}for(u=we;u<=be;u++)if(g(p[u])&&g(a[u])){var Ee={p:p[u],s:a[u],b:0};k.enabled||(Ee.pts=H[u],ne?Ee.ph0=Ee.ph1=H[u].length?I[H[u][0]]:p[u]:(i._computePh=!0,Ee.ph0=J(S[u]),Ee.ph1=J(S[u+1],!0))),xe.push(Ee)}return xe.length===1&&(xe[0].width1=v.tickIncrement(xe[0].p,A.size,!1,T)-xe[0].p),e(xe,i),m.isArrayOrTypedArray(i.selectedpoints)&&m.tagSelected(xe,i,pe),xe},calcAllAutoBins:d}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"../bar/arrays_to_calcdata":647,"./average":813,"./bin_functions":815,"./bin_label_vals":816,"./norm_functions":824,"fast-isnumeric":190}],818:[function(y,ee,te){ee.exports={eventDataKeys:["binNumber"]}},{}],819:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axis_ids"),b=y("../../registry").traceIs,v=y("../bar/defaults").handleGroupingDefaults,e=g.nestedProperty,n=y("../../plots/cartesian/constraints").getAxisGroup,t=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],o=["x","y"];ee.exports=function(r,d){var c,i,u,f,s,h,p,a=d._histogramBinOpts={},x=[],l={},w=[];function _(q,W){return g.coerce(c._input,c,c._module.attributes,q,W)}function T(q){return q.orientation==="v"?"x":"y"}function k(q,W,$){var R=q.uid+"__"+$;W||(W=R);var N=function(X,J){return m.getFromTrace({_fullLayout:d},X,J).type}(q,$),U=q[$+"calendar"]||"",Q=a[W],j=!0;Q&&(N===Q.axType&&U===Q.calendar?(j=!1,Q.traces.push(q),Q.dirs.push($)):(W=R,N!==Q.axType&&g.warn(["Attempted to group the bins of trace",q.index,"set on a","type:"+N,"axis","with bins on","type:"+Q.axType,"axis."].join(" ")),U!==Q.calendar&&g.warn(["Attempted to group the bins of trace",q.index,"set with a",U,"calendar","with bins",Q.calendar?"on a "+Q.calendar+" calendar":"w/o a set calendar"].join(" ")))),j&&(a[W]={traces:[q],dirs:[$],axType:N,calendar:q[$+"calendar"]||""}),q["_"+$+"bingroup"]=W}for(s=0;s<r.length;s++)c=r[s],b(c,"histogram")&&(x.push(c),delete c._xautoBinFinished,delete c._yautoBinFinished,b(c,"2dMap")||v(c._input,c,d,_));var L=d._alignmentOpts||{};for(s=0;s<x.length;s++){if(c=x[s],u="",!b(c,"2dMap")){if(f=T(c),d.barmode==="group"&&c.alignmentgroup){var A=c[f+"axis"],I=n(d,A)+c.orientation;(L[I]||{})[c.alignmentgroup]&&(u=I)}u||d.barmode==="overlay"||(u=n(d,c.xaxis)+n(d,c.yaxis)+T(c))}u?(l[u]||(l[u]=[]),l[u].push(c)):w.push(c)}for(u in l)if((i=l[u]).length!==1){var P=!1;for(i.length&&(c=i[0],P=_("bingroup")),u=P||u,s=0;s<i.length;s++){var S=(c=i[s])._input.bingroup;S&&S!==u&&g.warn(["Trace",c.index,"must match","within bingroup",u+".","Ignoring its bingroup:",S,"setting."].join(" ")),c.bingroup=u,k(c,u,T(c))}}else w.push(i[0]);for(s=0;s<w.length;s++){c=w[s];var E=_("bingroup");if(b(c,"2dMap"))for(p=0;p<2;p++){var D=_((f=o[p])+"bingroup",E?E+"__"+f:null);k(c,D,f)}else k(c,E,T(c))}for(u in a){var F=a[u];for(i=F.traces,h=0;h<t.length;h++){var H,V,Z=t[h],K=Z.name;if(K!=="nbins"||!F.sizeFound){for(s=0;s<i.length;s++){if(c=i[s],f=F.dirs[s],H=Z.aStr[f],e(c._input,H).get()!==void 0){F[K]=_(H),F[K+"Found"]=!0;break}(V=(c._autoBin||{})[f]||{})[K]&&e(c,H).set(V[K])}if(K==="start"||K==="end")for(;s<i.length;s++)(c=i[s])["_"+f+"bingroup"]&&_(H,(V=(c._autoBin||{})[f]||{})[K]);K!=="nbins"||F.sizeFound||F.nbinsFound||(c=i[0],F[K]=_(H))}}}}},{"../../lib":503,"../../plots/cartesian/axis_ids":558,"../../plots/cartesian/constraints":562,"../../registry":638,"../bar/defaults":652}],820:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("../../components/color"),v=y("../bar/defaults").handleText,e=y("../bar/style_defaults"),n=y("./attributes");ee.exports=function(t,o,r,d){function c(w,_){return m.coerce(t,o,n,w,_)}var i=c("x"),u=c("y");c("cumulative.enabled")&&(c("cumulative.direction"),c("cumulative.currentbin")),c("text");var f=c("textposition");v(t,o,d,c,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c("hovertext"),c("hovertemplate"),c("xhoverformat"),c("yhoverformat");var s=c("orientation",u&&!i?"h":"v"),h=s==="v"?"x":"y",p=s==="v"?"y":"x",a=i&&u?Math.min(m.minRowLength(i)&&m.minRowLength(u)):m.minRowLength(o[h]||[]);if(a){o._length=a,g.getComponentMethod("calendars","handleTraceDefaults")(t,o,["x","y"],d),o[p]&&c("histfunc"),c("histnorm"),c("autobin"+h),e(t,o,c,r,d),m.coerceSelectionMarkerOpacity(o,c);var x=(o.marker.line||{}).color,l=g.getComponentMethod("errorbars","supplyDefaults");l(t,o,x||b.defaultLine,{axis:"y"}),l(t,o,x||b.defaultLine,{axis:"x",inherit:"y"})}else o.visible=!1}},{"../../components/color":366,"../../lib":503,"../../registry":638,"../bar/defaults":652,"../bar/style_defaults":663,"./attributes":812}],821:[function(y,ee,te){ee.exports=function(g,m,b,v,e){if(g.x="xVal"in m?m.xVal:m.x,g.y="yVal"in m?m.yVal:m.y,"zLabelVal"in m&&(g.z=m.zLabelVal),m.xa&&(g.xaxis=m.xa),m.ya&&(g.yaxis=m.ya),!(b.cumulative||{}).enabled){var n,t=Array.isArray(e)?v[0].pts[e[0]][e[1]]:v[e].pts;if(g.pointNumbers=t,g.binNumber=g.pointNumber,delete g.pointNumber,delete g.pointIndex,b._indexToPoints){n=[];for(var o=0;o<t.length;o++)n=n.concat(b._indexToPoints[t[o]])}else n=t;g.pointIndices=n}return g}},{}],822:[function(y,ee,te){var g=y("../bar/hover").hoverPoints,m=y("../../plots/cartesian/axes").hoverLabelText;ee.exports=function(b,v,e,n,t){var o=g(b,v,e,n,t);if(o){var r=(b=o[0]).cd[b.index],d=b.cd[0].trace;if(!d.cumulative.enabled){var c=d.orientation==="h"?"y":"x";b[c+"Label"]=m(b[c+"a"],[r.ph0,r.ph1],d[c+"hoverformat"])}return o}}},{"../../plots/cartesian/axes":554,"../bar/hover":655}],823:[function(y,ee,te){ee.exports={attributes:y("./attributes"),layoutAttributes:y("../bar/layout_attributes"),supplyDefaults:y("./defaults"),crossTraceDefaults:y("./cross_trace_defaults"),supplyLayoutDefaults:y("../bar/layout_defaults"),calc:y("./calc").calc,crossTraceCalc:y("../bar/cross_trace_calc").crossTraceCalc,plot:y("../bar/plot").plot,layerName:"barlayer",style:y("../bar/style").style,styleOnSelect:y("../bar/style").styleOnSelect,colorbar:y("../scatter/marker_colorbar"),hoverPoints:y("./hover"),selectPoints:y("../bar/select"),eventData:y("./event_data"),moduleType:"trace",name:"histogram",basePlotModule:y("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}},{"../../plots/cartesian":568,"../bar/cross_trace_calc":651,"../bar/layout_attributes":657,"../bar/layout_defaults":658,"../bar/plot":659,"../bar/select":660,"../bar/style":662,"../scatter/marker_colorbar":944,"./attributes":812,"./calc":817,"./cross_trace_defaults":819,"./defaults":820,"./event_data":821,"./hover":822}],824:[function(y,ee,te){ee.exports={percent:function(g,m){for(var b=g.length,v=100/m,e=0;e<b;e++)g[e]*=v},probability:function(g,m){for(var b=g.length,v=0;v<b;v++)g[v]/=m},density:function(g,m,b,v){var e=g.length;v=v||1;for(var n=0;n<e;n++)g[n]*=b[n]*v},"probability density":function(g,m,b,v){var e=g.length;v&&(m/=v);for(var n=0;n<e;n++)g[n]*=b[n]/m}}},{}],825:[function(y,ee,te){var g=y("../histogram/attributes"),m=y("../histogram/bin_attributes"),b=y("../heatmap/attributes"),v=y("../../plots/attributes"),e=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,n=y("../../plots/template_attributes").hovertemplateAttrs,t=y("../../plots/template_attributes").texttemplateAttrs,o=y("../../components/colorscale/attributes"),r=y("../../lib/extend").extendFlat;ee.exports=r({x:g.x,y:g.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:g.histnorm,histfunc:g.histfunc,nbinsx:g.nbinsx,xbins:m("x"),nbinsy:g.nbinsy,ybins:m("y"),autobinx:g.autobinx,autobiny:g.autobiny,bingroup:r({},g.bingroup,{}),xbingroup:r({},g.bingroup,{}),ybingroup:r({},g.bingroup,{}),xgap:b.xgap,ygap:b.ygap,zsmooth:b.zsmooth,xhoverformat:e("x"),yhoverformat:e("y"),zhoverformat:e("z",1),hovertemplate:n({},{keys:"z"}),texttemplate:t({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:b.textfont,showlegend:r({},v.showlegend,{dflt:!1})},o("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../heatmap/attributes":792,"../histogram/attributes":812,"../histogram/bin_attributes":814}],826:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("../histogram/bin_functions"),v=y("../histogram/norm_functions"),e=y("../histogram/average"),n=y("../histogram/bin_label_vals"),t=y("../histogram/calc").calcAllAutoBins;function o(c,i,u,f){var s,h=new Array(c);if(f)for(s=0;s<c;s++)h[s]=1/(i[s+1]-i[s]);else{var p=1/u;for(s=0;s<c;s++)h[s]=p}return h}function r(c,i){return{start:c(i.start),end:c(i.end),size:i.size}}function d(c,i,u,f,s,h){var p,a=c.length-1,x=new Array(a),l=n(u,f,c,s,h);for(p=0;p<a;p++){var w=(i||[])[p];x[p]=w===void 0?[l(c[p]),l(c[p+1],!0)]:[w,w]}return x}ee.exports=function(c,i){var u,f,s,h,p=m.getFromId(c,i.xaxis),a=m.getFromId(c,i.yaxis),x=i.xcalendar,l=i.ycalendar,w=function(rt){return p.r2c(rt,0,x)},_=function(rt){return a.r2c(rt,0,l)},T=t(c,i,p,"x"),k=T[0],L=T[1],A=t(c,i,a,"y"),I=A[0],P=A[1],S=i._length;L.length>S&&L.splice(S,L.length-S),P.length>S&&P.splice(S,P.length-S);var E=[],D=[],F=[],H=typeof k.size=="string",V=typeof I.size=="string",Z=[],K=[],q=H?Z:k,W=V?K:I,$=0,R=[],N=[],U=i.histnorm,Q=i.histfunc,j=U.indexOf("density")!==-1,X=Q==="max"||Q==="min"?null:0,J=b.count,re=v[U],ne=!1,se=[],oe=[],pe="z"in i?i.z:"marker"in i&&Array.isArray(i.marker.color)?i.marker.color:"";pe&&Q!=="count"&&(ne=Q==="avg",J=b[Q]);var ce=k.size,de=w(k.start),xe=w(k.end)+(de-m.tickIncrement(de,ce,!1,x))/1e6;for(u=de;u<xe;u=m.tickIncrement(u,ce,!1,x))D.push(X),Z.push(u),ne&&F.push(0);Z.push(u);var we,be=D.length,Ee=(u-de)/be,fe=(we=de+Ee/2,p.c2r(we,0,x)),me=I.size,Te=_(I.start),_e=_(I.end)+(Te-m.tickIncrement(Te,me,!1,l))/1e6;for(u=Te;u<_e;u=m.tickIncrement(u,me,!1,l)){E.push(D.slice()),K.push(u);var Ae=new Array(be);for(f=0;f<be;f++)Ae[f]=[];N.push(Ae),ne&&R.push(F.slice())}K.push(u);var Pe=E.length,De=(u-Te)/Pe,Ve=function(rt){return a.c2r(rt,0,l)}(Te+De/2);j&&(se=o(D.length,q,Ee,H),oe=o(E.length,W,De,V)),H||p.type!=="date"||(q=r(w,q)),V||a.type!=="date"||(W=r(_,W));var Qe=!0,Oe=!0,Ue=new Array(be),Ge=new Array(Pe),Ye=1/0,tt=1/0,lt=1/0,vt=1/0;for(u=0;
1221u<S;u++){var It=L[u],St=P[u];s=g.findBin(It,q),h=g.findBin(St,W),s>=0&&s<be&&h>=0&&h<Pe&&($+=J(s,u,E[h],pe,R[h]),N[h][s].push(u),Qe&&(Ue[s]===void 0?Ue[s]=It:Ue[s]!==It&&(Qe=!1)),Oe&&(Ge[h]===void 0?Ge[h]=St:Ge[h]!==St&&(Oe=!1)),Ye=Math.min(Ye,It-Z[s]),tt=Math.min(tt,Z[s+1]-It),lt=Math.min(lt,St-K[h]),vt=Math.min(vt,K[h+1]-St))}if(ne)for(h=0;h<Pe;h++)$+=e(E[h],R[h]);if(re)for(h=0;h<Pe;h++)re(E[h],$,se,oe[h]);return{x:L,xRanges:d(Z,Qe&&Ue,Ye,tt,p,x),x0:fe,dx:Ee,y:P,yRanges:d(K,Oe&&Ge,lt,vt,a,l),y0:Ve,dy:De,z:E,pts:N}}},{"../../lib":503,"../../plots/cartesian/axes":554,"../histogram/average":813,"../histogram/bin_functions":815,"../histogram/bin_label_vals":816,"../histogram/calc":817,"../histogram/norm_functions":824}],827:[function(y,ee,te){var g=y("../../lib"),m=y("./sample_defaults"),b=y("../heatmap/style_defaults"),v=y("../../components/colorscale/defaults"),e=y("../heatmap/label_defaults"),n=y("./attributes");ee.exports=function(t,o,r,d){function c(i,u){return g.coerce(t,o,n,i,u)}m(t,o,c,d),o.visible!==!1&&(b(t,o,c,d),v(t,o,d,c,{prefix:"",cLetter:"z"}),c("hovertemplate"),e(c,d),c("xhoverformat"),c("yhoverformat"))}},{"../../components/colorscale/defaults":376,"../../lib":503,"../heatmap/label_defaults":802,"../heatmap/style_defaults":806,"./attributes":825,"./sample_defaults":830}],828:[function(y,ee,te){var g=y("../heatmap/hover"),m=y("../../plots/cartesian/axes").hoverLabelText;ee.exports=function(b,v,e,n,t){var o=g(b,v,e,n,t);if(o){var r=(b=o[0]).index,d=r[0],c=r[1],i=b.cd[0],u=i.trace,f=i.xRanges[c],s=i.yRanges[d];return b.xLabel=m(b.xa,[f[0],f[1]],u.xhoverformat),b.yLabel=m(b.ya,[s[0],s[1]],u.yhoverformat),o}}},{"../../plots/cartesian/axes":554,"../heatmap/hover":799}],829:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),crossTraceDefaults:y("../histogram/cross_trace_defaults"),calc:y("../heatmap/calc"),plot:y("../heatmap/plot"),layerName:"heatmaplayer",colorbar:y("../heatmap/colorbar"),style:y("../heatmap/style"),hoverPoints:y("./hover"),eventData:y("../histogram/event_data"),moduleType:"trace",name:"histogram2d",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}},{"../../plots/cartesian":568,"../heatmap/calc":793,"../heatmap/colorbar":795,"../heatmap/plot":804,"../heatmap/style":805,"../histogram/cross_trace_defaults":819,"../histogram/event_data":821,"./attributes":825,"./defaults":827,"./hover":828}],830:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib");ee.exports=function(b,v,e,n){var t=e("x"),o=e("y"),r=m.minRowLength(t),d=m.minRowLength(o);r&&d?(v._length=Math.min(r,d),g.getComponentMethod("calendars","handleTraceDefaults")(b,v,["x","y"],n),(e("z")||e("marker.color"))&&e("histfunc"),e("histnorm"),e("autobinx"),e("autobiny")):v.visible=!1}},{"../../lib":503,"../../registry":638}],831:[function(y,ee,te){var g=y("../histogram2d/attributes"),m=y("../contour/attributes"),b=y("../../components/colorscale/attributes"),v=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,e=y("../../lib/extend").extendFlat;ee.exports=e({x:g.x,y:g.y,z:g.z,marker:g.marker,histnorm:g.histnorm,histfunc:g.histfunc,nbinsx:g.nbinsx,xbins:g.xbins,nbinsy:g.nbinsy,ybins:g.ybins,autobinx:g.autobinx,autobiny:g.autobiny,bingroup:g.bingroup,xbingroup:g.xbingroup,ybingroup:g.ybingroup,autocontour:m.autocontour,ncontours:m.ncontours,contours:m.contours,line:{color:m.line.color,width:e({},m.line.width,{dflt:.5}),dash:m.line.dash,smoothing:m.line.smoothing,editType:"plot"},xhoverformat:v("x"),yhoverformat:v("y"),zhoverformat:v("z",1),hovertemplate:g.hovertemplate,texttemplate:m.texttemplate,textfont:m.textfont},b("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../contour/attributes":735,"../histogram2d/attributes":825}],832:[function(y,ee,te){var g=y("../../lib"),m=y("../histogram2d/sample_defaults"),b=y("../contour/contours_defaults"),v=y("../contour/style_defaults"),e=y("../heatmap/label_defaults"),n=y("./attributes");ee.exports=function(t,o,r,d){function c(i,u){return g.coerce(t,o,n,i,u)}
1221m(t,o,c,d),o.visible!==!1&&(b(t,o,c,function(i){return g.coerce2(t,o,n,i)}),v(t,o,c,d),c("xhoverformat"),c("yhoverformat"),c("hovertemplate"),o.contours&&o.contours.coloring==="heatmap"&&e(c,d))}},{"../../lib":503,"../contour/contours_defaults":742,"../contour/style_defaults":756,"../heatmap/label_defaults":802,"../histogram2d/sample_defaults":830,"./attributes":831}],833:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),crossTraceDefaults:y("../histogram/cross_trace_defaults"),calc:y("../contour/calc"),plot:y("../contour/plot").plot,layerName:"contourlayer",style:y("../contour/style"),colorbar:y("../contour/colorbar"),hoverPoints:y("../contour/hover"),moduleType:"trace",name:"histogram2dcontour",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}},{"../../plots/cartesian":568,"../contour/calc":736,"../contour/colorbar":738,"../contour/hover":748,"../contour/plot":753,"../contour/style":755,"../histogram/cross_trace_defaults":819,"./attributes":831,"./defaults":832}],834:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../../plots/template_attributes").texttemplateAttrs,b=y("../../components/colorscale/attributes"),v=y("../../plots/domain").attributes,e=y("../pie/attributes"),n=y("../sunburst/attributes"),t=y("../treemap/attributes"),o=y("../treemap/constants"),r=y("../../lib/extend").extendFlat;ee.exports={labels:n.labels,parents:n.parents,values:n.values,branchvalues:n.branchvalues,count:n.count,level:n.level,maxdepth:n.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:t.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:r({colors:n.marker.colors,line:n.marker.line,editType:"calc"},b("marker",{colorAttr:"colors",anim:!1})),leaf:n.leaf,pathbar:t.pathbar,text:e.text,textinfo:n.textinfo,texttemplate:m({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),hovertext:e.hovertext,hoverinfo:n.hoverinfo,hovertemplate:g({},{keys:o.eventDataKeys}),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:t.outsidetextfont,textposition:t.textposition,sort:e.sort,root:n.root,domain:v({name:"icicle",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":900,"../sunburst/attributes":1045,"../treemap/attributes":1071,"../treemap/constants":1074}],835:[function(y,ee,te){var g=y("../../plots/plots");te.name="icicle",te.plot=function(m,b,v,e){g.plotBasePlot(te.name,m,b,v,e)},te.clean=function(m,b,v,e){g.cleanBasePlot(te.name,m,b,v,e)}},{"../../plots/plots":619}],836:[function(y,ee,te){var g=y("../sunburst/calc");te.calc=function(m,b){return g.calc(m,b)},te.crossTraceCalc=function(m){return g._runCrossTraceCalc("icicle",m)}},{"../sunburst/calc":1047}],837:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("../../components/color"),v=y("../../plots/domain").defaults,e=y("../bar/defaults").handleText,n=y("../bar/constants").TEXTPAD,t=y("../../components/colorscale"),o=t.hasColorscale,r=t.handleDefaults;ee.exports=function(d,c,i,u){function f(w,_){return g.coerce(d,c,m,w,_)}var s=f("labels"),h=f("parents");if(s&&s.length&&h&&h.length){var p=f("values");p&&p.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),f("tiling.orientation"),f("tiling.flip"),f("tiling.pad");var a=f("text");f("texttemplate"),c.texttemplate||f("textinfo",Array.isArray(a)?"text+label":"label"),f("hovertext"),f("hovertemplate");var x=f("pathbar.visible");e(d,c,u,f,"auto",{hasPathbar:x,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition"),f("marker.line.width")&&f("marker.line.color",u.paper_bgcolor),f("marker.colors");var l=c._hasColorscale=o(d,"marker","colors")||(d.marker||{}).coloraxis;l&&r(d,c,u,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",l?1:.7),c._hovered={marker:{line:{width:2,color:b.contrast(u.paper_bgcolor)}}},x&&(f("pathbar.thickness",c.pathbar.textfont.size+2*n),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),v(c,u,f),c._length=null}else c.visible=!1}},{"../../components/color":366,"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/constants":650,"../bar/defaults":652,"./attributes":834}],838:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../components/drawing"),v=y("../../lib/svg_text_utils"),e=y("./partition"),n=y("./style").styleOne,t=y("../treemap/constants"),o=y("../sunburst/helpers"),r=y("../sunburst/fx"),d=y("../sunburst/plot").formatSliceLabel;ee.exports=function(c,i,u,f,s){var h=s.width,p=s.height,a=s.viewX,x=s.viewY,l=s.pathSlice,w=s.toMoveInsideSlice,_=s.strTransform,T=s.hasTransition,k=s.handleSlicesExit,L=s.makeUpdateSliceInterpolator,A=s.makeUpdateTextInterpolator,I=s.prevEntry,P=c._fullLayout,S=i[0].trace,E=S.textposition.indexOf("left")!==-1,D=S.textposition.indexOf("right")!==-1,F=S.textposition.indexOf("bottom")!==-1,H=e(u,[h,p],{flipX:S.tiling.flip.indexOf("x")>-1,flipY:S.tiling.flip.indexOf("y")>-1,orientation:S.tiling.orientation,pad:{inner:S.tiling.pad},maxDepth:S._maxDepth}).descendants(),V=1/0,Z=-1/0;H.forEach(function(R){var N=R.depth;N>=S._maxDepth?(R.x0=R.x1=(R.x0+R.x1)/2,R.y0=R.y1=(R.y0+R.y1)/2):(V=Math.min(V,N),Z=Math.max(Z,N))}),f=f.data(H,o.getPtId),S._maxVisibleLayers=isFinite(Z)?Z-V+1:0,f.enter().append("g").classed("slice",!0),k(f,!1,{},[h,p],l),f.order();var K=null;if(T&&I){var q=o.getPtId(I);f.each(function(R){K===null&&o.getPtId(R)===q&&(K={x0:R.x0,x1:R.x1,y0:R.y0,y1:R.y1})})}var W=function(){return K||{x0:0,x1:h,y0:0,y1:p}},$=f;return T&&($=$.transition().each("end",function(){var R=g.select(this);o.setSliceCursor(R,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}
1221)),$.each(function(R){R._x0=a(R.x0),R._x1=a(R.x1),R._y0=x(R.y0),R._y1=x(R.y1),R._hoverX=a(R.x1-S.tiling.pad),R._hoverY=x(F?R.y1-S.tiling.pad/2:R.y0+S.tiling.pad/2);var N=g.select(this),U=m.ensureSingle(N,"path","surface",function(J){J.style("pointer-events","all")});T?U.transition().attrTween("d",function(J){var re=L(J,!1,W(),[h,p],{orientation:S.tiling.orientation,flipX:S.tiling.flip.indexOf("x")>-1,flipY:S.tiling.flip.indexOf("y")>-1});return function(ne){return l(re(ne))}}):U.attr("d",l),N.call(r,u,c,i,{styleOne:n,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,c,{isTransitioning:c._transitioning}),U.call(n,R,S,{hovered:!1}),R.x0===R.x1||R.y0===R.y1?R._text="":R._text=d(R,u,S,i,P)||"";var Q=m.ensureSingle(N,"g","slicetext"),j=m.ensureSingle(Q,"text","",function(J){J.attr("data-notex",1)}),X=m.ensureUniformFontSize(c,o.determineTextFont(S,R,P.font));j.text(R._text||" ").classed("slicetext",!0).attr("text-anchor",D?"end":E?"start":"middle").call(b.font,X).call(v.convertToTspans,c),R.textBB=b.bBox(j.node()),R.transform=w(R,{fontSize:X.size}),R.transform.fontSize=X.size,T?j.transition().attrTween("transform",function(J){var re=A(J,!1,W(),[h,p]);return function(ne){return _(re(ne))}}):j.attr("transform",_(R))}),K}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1050,"../sunburst/helpers":1051,"../sunburst/plot":1055,"../treemap/constants":1074,"./partition":842,"./style":844,"@plotly/d3":58}],839:[function(y,ee,te){ee.exports={moduleType:"trace",name:"icicle",basePlotModule:y("./base_plot"),categories:[],animatable:!0,attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults"),supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc").calc,crossTraceCalc:y("./calc").crossTraceCalc,plot:y("./plot"),style:y("./style").style,colorbar:y("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":944,"./attributes":834,"./base_plot":835,"./calc":836,"./defaults":837,"./layout_attributes":840,"./layout_defaults":841,"./plot":843,"./style":844}],840:[function(y,ee,te){ee.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],841:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v){function e(n,t){return g.coerce(b,v,m,n,t)}e("iciclecolorway",v.colorway),e("extendiciclecolors")}},{"../../lib":503,"./layout_attributes":840}],842:[function(y,ee,te){var g=y("d3-hierarchy"),m=y("../treemap/flip_tree");ee.exports=function(b,v,e){var n=e.flipX,t=e.flipY,o=e.orientation==="h",r=e.maxDepth,d=v[0],c=v[1];r&&(d=(b.height+1)*v[0]/Math.min(b.height+1,r),c=(b.height+1)*v[1]/Math.min(b.height+1,r));var i=g.partition().padding(e.pad.inner).size(o?[v[1],d]:[v[0],c])(b);return(o||n||t)&&m(i,v,{swapXY:o,flipX:n,flipY:t}),i}},{"../treemap/flip_tree":1079,"d3-hierarchy":115}],843:[function(y,ee,te){var g=y("../treemap/draw"),m=y("./draw_descendants");ee.exports=function(b,v,e,n){return g(b,v,e,n,{type:"icicle",drawDescendants:m})}},{"../treemap/draw":1076,"./draw_descendants":838}],844:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/color"),b=y("../../lib"),v=y("../bar/uniform_text").resizeText;function e(n,t,o){var r=t.data.data,d=!t.children,c=r.i,i=b.castOption(o,c,"marker.line.color")||m.defaultLine,u=b.castOption(o,c,"marker.line.width")||0;n.style("stroke-width",u).call(m.fill,r.color).call(m.stroke,i).style("opacity",d?o.leaf.opacity:null)}ee.exports={style:function(n){var t=n._fullLayout._iciclelayer.selectAll(".trace");v(n,t,"icicle"),t.each(function(o){var r=g.select(this),d=o[0].trace;r.style("opacity",d.opacity),r.selectAll("path.surface").each(function(c){g.select(this).call(e,c,d)})})},styleOne:e}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],845:[function(y,ee,te){for(var g=y("../../plots/attributes"),m=y("../../plots/template_attributes").hovertemplateAttrs,b=y("../../lib/extend").extendFlat,v=y("./constants").colormodel,e=["rgb","rgba","rgba256","hsl","hsla"],n=[],t=[],o=0;o<e.length;o++){var r=v[e[o]];n.push("For the `"+e[o]+"` colormodel, it is ["+(r.zminDflt||r.min).join(", ")+"]."),t.pu
1221sh("For the `"+e[o]+"` colormodel, it is ["+(r.zmaxDflt||r.max).join(", ")+"].")}ee.exports=b({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:e,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:b({},g.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:m({},{keys:["z","color","colormodel"]}),transforms:void 0})},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"./constants":847}],846:[function(y,ee,te){var g=y("../../lib"),m=y("./constants"),b=y("fast-isnumeric"),v=y("../../plots/cartesian/axes"),e=y("../../lib").maxRowLength,n=y("./helpers").getImageSize;function t(r,d,c,i){return function(u){return g.constrain((u-r)*d,c,i)}}function o(r,d){return function(c){return g.constrain(c,r,d)}}ee.exports=function(r,d){var c,i;if(d._hasZ)c=d.z.length,i=e(d.z);else if(d._hasSource){var u=n(d.source);c=u.height,i=u.width}var f,s=v.getFromId(r,d.xaxis||"x"),h=v.getFromId(r,d.yaxis||"y"),p=s.d2c(d.x0)-d.dx/2,a=h.d2c(d.y0)-d.dy/2,x=[p,p+i*d.dx],l=[a,a+c*d.dy];if(s&&s.type==="log")for(f=0;f<i;f++)x.push(p+f*d.dx);if(h&&h.type==="log")for(f=0;f<c;f++)l.push(a+f*d.dy);return d._extremes[s._id]=v.findExtremes(s,x),d._extremes[h._id]=v.findExtremes(h,l),d._scaler=function(w){var _=m.colormodel[w.colormodel],T=(_.colormodel||w.colormodel).length;w._sArray=[];for(var k=0;k<T;k++)_.min[k]!==w.zmin[k]||_.max[k]!==w.zmax[k]?w._sArray.push(t(w.zmin[k],(_.max[k]-_.min[k])/(w.zmax[k]-w.zmin[k]),_.min[k],_.max[k])):w._sArray.push(o(_.min[k],_.max[k]));return function(L){for(var A=L.slice(0,T),I=0;I<T;I++){var P=A[I];if(!b(P))return!1;A[I]=w._sArray[I](P)}return A}}(d),[{x0:p,y0:a,z:d.z,w:i,h:c}]}},{"../../lib":503,"../../plots/cartesian/axes":554,"./constants":847,"./helpers":850,"fast-isnumeric":190}],847:[function(y,ee,te){ee.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(g){return g.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(g){return g.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(g){return g.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(g){var m=g.slice(0,3);
1221return m[1]=m[1]+"%",m[2]=m[2]+"%",m},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(g){var m=g.slice(0,4);return m[1]=m[1]+"%",m[2]=m[2]+"%",m},suffix:["°","%","%",""]}},pixelatedStyle:["image-rendering: optimizeSpeed","image-rendering: -moz-crisp-edges","image-rendering: -o-crisp-edges","image-rendering: -webkit-optimize-contrast","image-rendering: optimize-contrast","image-rendering: crisp-edges","image-rendering: pixelated",""].join("; ")}},{}],848:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("./constants"),v=y("../../snapshot/helpers").IMAGE_URL_PREFIX;ee.exports=function(e,n){function t(d,c){return g.coerce(e,n,m,d,c)}t("source"),n.source&&!n.source.match(v)&&delete n.source,n._hasSource=!!n.source;var o,r=t("z");n._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),n._hasZ||n._hasSource?(t("x0"),t("y0"),t("dx"),t("dy"),n._hasZ?(t("colormodel","rgb"),t("zmin",(o=b.colormodel[n.colormodel]).zminDflt||o.min),t("zmax",o.zmaxDflt||o.max)):n._hasSource&&(n.colormodel="rgba256",o=b.colormodel[n.colormodel],n.zmin=o.zminDflt,n.zmax=o.zmaxDflt),t("zsmooth"),t("text"),t("hovertext"),t("hovertemplate"),n._length=null):n.visible=!1}},{"../../lib":503,"../../snapshot/helpers":642,"./attributes":845,"./constants":847}],849:[function(y,ee,te){ee.exports=function(g,m){return"xVal"in m&&(g.x=m.xVal),"yVal"in m&&(g.y=m.yVal),m.xa&&(g.xaxis=m.xa),m.ya&&(g.yaxis=m.ya),g.color=m.color,g.colormodel=m.trace.colormodel,g.z||(g.z=m.color),g}},{}],850:[function(y,ee,te){var g=y("probe-image-size/sync"),m=y("../../snapshot/helpers").IMAGE_URL_PREFIX,b=y("buffer/").Buffer;te.getImageSize=function(v){var e=v.replace(m,""),n=new b(e,"base64");return g(n)}},{"../../snapshot/helpers":642,"buffer/":85,"probe-image-size/sync":276}],851:[function(y,ee,te){var g=y("../../components/fx"),m=y("../../lib"),b=y("./constants");ee.exports=function(v,e,n){var t=v.cd[0],o=t.trace,r=v.xa,d=v.ya;if(!(g.inbox(e-t.x0,e-(t.x0+t.w*o.dx),0)>
12210||g.inbox(n-t.y0,n-(t.y0+t.h*o.dy),0)>0)){var c,i=Math.floor((e-t.x0)/o.dx),u=Math.floor(Math.abs(n-t.y0)/o.dy);if(o._hasZ?c=t.z[u][i]:o._hasSource&&(c=o._canvas.el.getContext("2d").getImageData(i,u,1,1).data),c){var f,s=t.hi||o.hoverinfo;if(s){var h=s.split("+");h.indexOf("all")!==-1&&(h=["color"]),h.indexOf("color")!==-1&&(f=!0)}var p,a=b.colormodel[o.colormodel],x=a.colormodel||o.colormodel,l=x.length,w=o._scaler(c),_=a.suffix,T=[];(o.hovertemplate||f)&&(T.push("["+[w[0]+_[0],w[1]+_[1],w[2]+_[2]].join(", ")),l===4&&T.push(", "+w[3]+_[3]),T.push("]"),T=T.join(""),v.extraText=x.toUpperCase()+": "+T),Array.isArray(o.hovertext)&&Array.isArray(o.hovertext[u])?p=o.hovertext[u][i]:Array.isArray(o.text)&&Array.isArray(o.text[u])&&(p=o.text[u][i]);var k=d.c2p(t.y0+(u+.5)*o.dy),L=t.x0+(i+.5)*o.dx,A=t.y0+(u+.5)*o.dy,I="["+c.slice(0,o.colormodel.length).join(", ")+"]";return[m.extendFlat(v,{index:[u,i],x0:r.c2p(t.x0+i*o.dx),x1:r.c2p(t.x0+(i+1)*o.dx),y0:k,y1:k,color:w,xVal:L,xLabelVal:L,yVal:A,yLabelVal:A,zLabelVal:I,text:p,hovertemplateLabels:{zLabel:I,colorLabel:T,"color[0]Label":w[0]+_[0],"color[1]Label":w[1]+_[1],"color[2]Label":w[2]+_[2],"color[3]Label":w[3]+_[3]}})]}}}},{"../../components/fx":406,"../../lib":503,"./constants":847}],852:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc"),plot:y("./plot"),style:y("./style"),hoverPoints:y("./hover"),eventData:y("./event_data"),moduleType:"trace",name:"image",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":568,"./attributes":845,"./calc":846,"./defaults":848,"./event_data":849,"./hover":851,"./plot":853,"./style":854}],853:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=m.strTranslate,v=y("../../constants/xmlns_namespaces"),e=y("./constants"),n=m.isIOS()||m.isSafari()||m.isIE();ee.exports=function(t,o,r,d){var c=o.xaxis,i=o.yaxis,u=!(n||t._context._exportedPlot);m.makeTraceGroups(d,r,"im").each(function(f){var s=g.select(this),h=f[0],p=h.trace,a=(p.zsmooth==="fast"||p.zsmooth===!1&&u)&&!p._hasZ&&p._hasSource&&c.type==="linear"&&i.type==="linear";p._realImage=a;var x,l,w,_,T,k,L=h.z,A=h.x0,I=h.y0,P=h.w,S=h.h,E=p.dx,D=p.dy;for(k=0;x===void 0&&k<P;)x=c.c2p(A+k*E),k++;for(k=P;l===void 0&&k>0;)l=c.c2p(A+k*E),k--;for(k=0;_===void 0&&k<S;)_=i.c2p(I+k*D),k++;for(k=S;T===void 0&&k>0;)T=i.c2p(I+k*D),k--;l<x&&(w=l,l=x,x=w),T<_&&(w=_,_=T,T=w),!a&&(x=Math.max(-.5*c._length,x),l=Math.min(1.5*c._length,l),_=Math.max(-.5*i._length,_),T=Math.min(1.5*i._length,T));var F=Math.round(l-x),H=Math.round(T-_);if(F<=0||H<=0)s.selectAll("image").data([]).exit().remove();else{var V=s.selectAll("image").data([f]);V.enter().append("svg:image").attr({xmlns:v.svg,preserveAspectRatio:"none"}),V.exit().remove();var Z=p.zsmooth===!1?e.pixelatedStyle:"";if(a){var K=m.simpleMap(c.range,c.r2l),q=m.simpleMap(i.range,i.r2l),W=K[1]<K[0],$=q[1]>q[0];if(W||$){var R=x+F/2,N=_+H/2;Z+="transform:"+b(R+"px",N+"px")+"scale("+(W?-1:1)+","+($?-1:1)+")"+b(-R+"px",-N+"px")+";"}}V.attr("style",Z);var U=new Promise(function(j){if(p._hasZ)j();else if(p._hasSource)if(p._canvas&&p._canvas.el.width===P&&p._canvas.el.height===S&&p._canvas.source===p.source)j();else{var X=document.createElement("canvas");X.width=P,X.height=S;var J=X.getContext("2d");p._image=p._image||new Image;var re=p._image;re.onload=function(){J.drawImage(re,0,0),p._canvas={el:X,source:p.source},j()},re.setAttribute("src",p.source)}}).then(function(){var j;if(p._hasZ)j=Q(function(J,re){return L[re][J]}).toDataURL("image/png");else if(p._hasSource)if(a)j=p.source;else{var X=p._canvas.el.getContext("2d").getImageData(0,0,P,S).data;j=Q(function(J,re){var ne=4*(re*P+J);return[X[ne],X[ne+1],X[ne+2],X[ne+3]]}).toDataURL("image/png")}V.attr({"xlink:href":j,height:H,width:F,x,y:_})});t._promises.push(U)}function Q(j){var X=document.createElement("canvas");X.width=F,X.height=H;var J,re=X.getContext("2d"),ne=function(fe){return m.constrain(Math.round(c.c2p(A+fe*E)-x),0,F)},se=function(fe){return m.constrain(Math.round(i.c2p(I+fe*D)-_),0,H)},oe=e.colormodel[p.colormodel],pe=oe.colormodel||p.colormodel,ce=oe.fmt;for(k=0;k<h.w;k++){var de=ne(k),xe=ne(k+1);if(xe!==de&&!isNaN(xe)&&!isNaN(de))for(var we=0;we<h.h;we++){var be=se(we),Ee=se(we+1);Ee===be||isNaN(Ee)||isNaN(be)||!j(k,we)||(J=p._scaler(j(k,we)),re.fillStyle=J?pe+"("+ce(J).join(",")+")":"rgba(0,0,0,0)",re.fillRect(de,be,xe-de,Ee-be))}}return X}})}},{"../../constants/xmlns_namespaces":480,"../../lib":503,"./constants":847,"@plotly/d3":58}],854:[function(y,ee,te){var g=y("@plotly/d3");ee.exports=function(m){g.select(m).selectAll(".im image").style("opacity",function(b){return b[0].trace.opacity})}},{"@plotly/d3":58}],855:[function(y,ee,te){var g=y("../../lib/extend").extendFlat,m=y("../../lib/extend").extendDeep,b=y("../../plot_api/edit_types").overrideAll,v=y("../../plots/font_attributes"),e=y("../../components/color/attributes"),n=y("../../plots/domain").attributes,t=y("../../plots/cartesian/layout_attributes"),o=y("../../plot_api/plot_template").templatedArray,r=y("../../constants/delta.js"),d=y("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,c=v({editType:"plot",colorEditType:"plot"}),i={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:e.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},u={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},f=o("step",m({},i,{range:u}));ee.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:n({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:g({},c,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:d("value")},font:g({},c,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:d("value")},increasing:{symbol:{valType:"string",dflt:r.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:r.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:r.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:r.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:g({},c,{}),editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:m({},i,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:b({range:u,visible:g({},t.visible,{dflt:!0}),tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:g({},t.ticks,{dflt:"outside"}
1221),ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,ticklabelstep:t.ticklabelstep,showticklabels:t.showticklabels,tickfont:v({}),tickangle:t.tickangle,tickformat:t.tickformat,tickformatstops:t.tickformatstops,tickprefix:t.tickprefix,showtickprefix:t.showtickprefix,ticksuffix:t.ticksuffix,showticksuffix:t.showticksuffix,separatethousands:t.separatethousands,exponentformat:t.exponentformat,minexponent:t.minexponent,showexponent:t.showexponent,editType:"plot"},"plot"),steps:f,threshold:{line:{color:g({},i.line.color,{}),width:g({},i.line.width,{dflt:1}),editType:"plot"},thickness:g({},i.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},{"../../components/color/attributes":365,"../../constants/delta.js":473,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_format_attributes":557,"../../plots/cartesian/layout_attributes":569,"../../plots/domain":584,"../../plots/font_attributes":585}],856:[function(y,ee,te){var g=y("../../plots/plots");te.name="indicator",te.plot=function(m,b,v,e){g.plotBasePlot(te.name,m,b,v,e)},te.clean=function(m,b,v,e){g.cleanBasePlot(te.name,m,b,v,e)}},{"../../plots/plots":619}],857:[function(y,ee,te){ee.exports={calc:function(g,m){var b=[],v=m.value;typeof m._lastValue!="number"&&(m._lastValue=m.value);var e=m._lastValue,n=e;return m._hasDelta&&typeof m.delta.reference=="number"&&(n=m.delta.reference),b[0]={y:v,lastY:e,delta:v-n,relativeDelta:(v-n)/n},b}}},{}],858:[function(y,ee,te){ee.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},{}],859:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("../../plots/domain").defaults,v=y("../../plot_api/plot_template"),e=y("../../plots/array_container_defaults"),n=y("./constants.js"),t=y("../../plots/cartesian/tick_value_defaults"),o=y("../../plots/cartesian/tick_mark_defaults"),r=y("../../plots/cartesian/tick_label_defaults"),d=y("../../plots/cartesian/prefix_suffix_defaults");function c(i,u){function f(s,h){return g.coerce(i,u,m.gauge.steps,s,h)}f("color"),f("line.color"),f("line.width"),f("range"),f("thickness")}ee.exports={supplyDefaults:function(i,u,f,s){function h(P,S){return g.coerce(i,u,m,P,S)}b(u,s,h),h("mode"),u._hasNumber=u.mode.indexOf("number")!==-1,u._hasDelta=u.mode.indexOf("delta")!==-1,u._hasGauge=u.mode.indexOf("gauge")!==-1;var p=h("value");u._range=[0,typeof p=="number"?1.5*p:1];var a,x,l,w,_,T,k=new Array(2);function L(P,S){return g.coerce(l,w,m.gauge,P,S)}function A(P,S){return g.coerce(_,T,m.gauge.axis,P,S)}if(u._hasNumber&&(h("number.valueformat"),h("number.font.color",s.font.color),h("number.font.family",s.font.family),h("number.font.size"),u.number.font.size===void 0&&(u.number.font.size=n.defaultNumberFontSize,k[0]=!0),h("number.prefix"),h("number.suffix"),a=u.number.font.size),u._hasDelta&&(h("delta.font.color",s.font.color),h("delta.font.family",s.font.family),h("delta.font.size"),u.delta.font.size===void 0&&(u.delta.font.size=(u._hasNumber?.5:1)*(a||n.defaultNumberFontSize),k[1]=!0),h("delta.reference",u.value),h("delta.relative"),h("delta.valueformat",u.delta.relative?"2%":""),h("delta.increasing.symbol"),h("delta.increasing.color"),h("delta.decreasing.symbol"),h("delta.decreasing.color"),h("delta.position"),x=u.delta.font.size),u._scaleNumbers=(!u._hasNumber||k[0])&&(!u._hasDelta||k[1])||!1,h("title.font.color",s.font.color),h("title.font.family",s.font.family),h("title.font.size",.25*(a||x||n.defaultNumberFontSize)),h("title.text"),u._hasGauge){(l=i.gauge)||(l={}),w=v.newContainer(u,"gauge"),L("shape"),(u._isBullet=u.gauge.shape==="bullet")||h("title.align","center"),(u._isAngular=u.gauge.shape==="angular")||h("align","center"),L("bgcolor",s.paper_bgcolor),L("borderwidth"),L("bordercolor"),L("bar.color"),L("bar.line.color"),L("bar.line.width"),L("bar.thickness",n.valueThickness*(u.gauge.shape==="bullet"?.5:1)),e(l,w,{name:"steps",handleItemDefaults:c}),L("threshold.value"),L("threshold.thickness"),L("threshold.line.width"),L("threshold.line.color"),_={},l&&(_=l.axis||{}),T=v.newContainer(w,"axis"),A("visible"),u._range=A("range",u._range);var I={outerTicks:!0};t(_,T,A,"linear"),d(_,T,A,"linear",I),r(_,T,A,"linear",I),o(_,T,A,I)}else h("title.align","center"),h("align","center"),u._isAngular=u._isBullet=!1;u._length=null}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../../plots/cartesian/prefix_suffix_defaults":573,"../../plots/cartesian/tick_label_defaults":578,"../../plots/cartesian/tick_mark_defaults":579,"../../plots/cartesian/tick_value_defaults":580,"../../plots/domain":584,"./attributes":855,"./constants.js":858}],860:[function(y,ee,te){ee.exports={moduleType:"trace",name:"indicator",basePlotModule:y("./base_plot"),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:y("./attributes"),supplyDefaults:y("./defaults").supplyDefaults,calc:y("./calc").calc,plot:y("./plot"),meta:{}}},{"./attributes":855,"./base_plot":856,"./calc":857,"./defaults":859,"./plot":861}],861:[function(y,ee,te){var g=y("@plotly/d3"),m=y("d3-interpolate").interpolate,b=y("d3-interpolate").interpolateNumber,v=y("../../lib"),e=v.strScale,n=v.strTranslate,t=v.rad2deg,o=y("../../constants/alignment").MID_SHIFT,r=y("../../components/drawing"),d=y("./constants"),c=y("../../lib/svg_text_utils"),i=y("../../plots/cartesian/axes"),u=y("../../plots/cartesian/axis_defaults"),f=y("../../plots/cartesian/position_defaults"),s=y("../../plots/cartesian/layout_attributes"),h=y("../../components/color"),p={left:"start",center:"middle",right:"end"},a={left:0,center:.5,right:1},x=/[yzafpn\xb5mkMGTPEZY]/;function l(A){return A&&A.duration>0}function w(A){A.each(function(I){h.stroke(g.select(this),I.line.color)}).each(function(I){h.fill(g.select(this),I.color)}).style("stroke-width",function(I){return I.line.width})}function _(A,I,P){var S=A._fullLayout,E=v.extendFlat({type:"linear",ticks:"outside",range:P,showline:!0},I),D={type:"linear",_id:"x"+I._id},F={letter:"x",font:S.font,noHover:!0,noTickson:!0};function H(V,Z){return v.coerce(E,D,s,V,Z)}return u(E,D,H,F,S),f(E,D,H,F),D}
1221function T(A,I,P){return[Math.min(I/A.width,P/A.height),A,I+"x"+P]}function k(A,I,P,S){var E=document.createElementNS("http://www.w3.org/2000/svg","text"),D=g.select(E);return D.text(A).attr("x",0).attr("y",0).attr("text-anchor",P).attr("data-unformatted",A).call(c.convertToTspans,S).call(r.font,I),r.bBox(D.node())}function L(A,I,P,S,E,D){var F="_cache"+I;A[F]&&A[F].key===E||(A[F]={key:E,value:P});var H=v.aggNums(D,null,[A[F].value,S],2);return A[F].value=H,H}ee.exports=function(A,I,P,S){var E,D=A._fullLayout;l(P)&&S&&(E=S()),v.makeTraceGroups(D._indicatorlayer,I,"trace").each(function(F){var H,V,Z,K,q,W=F[0].trace,$=g.select(this),R=W._hasGauge,N=W._isAngular,U=W._isBullet,Q=W.domain,j={w:D._size.w*(Q.x[1]-Q.x[0]),h:D._size.h*(Q.y[1]-Q.y[0]),l:D._size.l+D._size.w*Q.x[0],r:D._size.r+D._size.w*(1-Q.x[1]),t:D._size.t+D._size.h*(1-Q.y[1]),b:D._size.b+D._size.h*Q.y[0]},X=j.l+j.w/2,J=j.t+j.h/2,re=Math.min(j.w/2,j.h),ne=d.innerRadius*re,se=W.align||"center";if(V=J,R){if(N&&(H=X,V=J+re/2,Z=function(Ee){return function(fe,me){var Te=Math.sqrt(fe.width/2*(fe.width/2)+fe.height*fe.height);return[me/Te,fe,me]}(Ee,.9*ne)}),U){var oe=d.bulletPadding,pe=1-d.bulletNumberDomainSize+oe;H=j.l+(pe+(1-pe)*a[se])*j.w,Z=function(Ee){return T(Ee,(d.bulletNumberDomainSize-oe)*j.w,j.h)}}}else H=j.l+a[se]*j.w,Z=function(Ee){return T(Ee,j.w,j.h)};(function(Ee,fe,me,Te){var _e,Ae,Pe,De=me[0].trace,Ve=Te.numbersX,Qe=Te.numbersY,Oe=De.align||"center",Ue=p[Oe],Ge=Te.transitionOpts,Ye=Te.onComplete,tt=v.ensureSingle(fe,"g","numbers"),lt=[];De._hasNumber&&lt.push("number"),De._hasDelta&&(lt.push("delta"),De.delta.position==="left"&&lt.reverse());var vt=tt.selectAll("text").data(lt);function It(qe,Re,Xe,ke){if(!qe.match("s")||Xe>=0==ke>=0||Re(Xe).slice(-1).match(x)||Re(ke).slice(-1).match(x))return Re;var Le=qe.slice().replace("s","f").replace(/\d+/,function(Ce){return parseInt(Ce)-1}),Ie=_(Ee,{tickformat:Le});return function(Ce){return Math.abs(Ce)<1?i.tickText(Ie,Ce).text:Re(Ce)}}vt.enter().append("text"),vt.attr("text-anchor",function(){return Ue}).attr("class",function(qe){return qe}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),vt.exit().remove();var St,rt=De.mode+De.align;if(De._hasDelta&&(St=function(){var qe=_(Ee,{tickformat:De.delta.valueformat},De._range);qe.setScale(),i.prepTicks(qe);var Re=function(Je){return i.tickText(qe,Je).text},Xe=function(Je){return De.delta.relative?Je.relativeDelta:Je.delta},ke=function(Je,it){return Je===0||typeof Je!="number"||isNaN(Je)?"-":(Je>0?De.delta.increasing.symbol:De.delta.decreasing.symbol)+it(Je)},Le=function(Je){return Je.delta>=0?De.delta.increasing.color:De.delta.decreasing.color};De._deltaLastValue===void 0&&(De._deltaLastValue=Xe(me[0]));var Ie=tt.select("text.delta");function Ce(){Ie.text(ke(Xe(me[0]),Re)).call(h.fill,Le(me[0])).call(c.convertToTspans,Ee)}return Ie.call(r.font,De.delta.font).call(h.fill,Le({delta:De._deltaLastValue})),l(Ge)?Ie.transition().duration(Ge.duration).ease(Ge.easing).tween("text",function(){var Je=g.select(this),it=Xe(me[0]),ht=De._deltaLastValue,ut=It(De.delta.valueformat,Re,ht,it),kt=b(ht,it);return De._deltaLastValue=it,function(ot){Je.text(ke(kt(ot),ut)),Je.call(h.fill,Le({delta:kt(ot)}))}}).each("end",function(){Ce(),Ye&&Ye()}).each("interrupt",function(){Ce(),Ye&&Ye()}):Ce(),Ae=k(ke(Xe(me[0]),Re),De.delta.font,Ue,Ee),Ie}(),rt+=De.delta.position+De.delta.font.size+De.delta.font.family+De.delta.valueformat,rt+=De.delta.increasing.symbol+De.delta.decreasing.symbol,Pe=Ae),De._hasNumber&&(function(){var qe=_(Ee,{tickformat:De.number.valueformat},De._range);qe.setScale(),i.prepTicks(qe);var Re=function(Ce){return i.tickText(qe,Ce).text},Xe=De.number.suffix,ke=De.number.prefix,Le=tt.select("text.number");function Ie(){var Ce=typeof me[0].y=="number"?ke+Re(me[0].y)+Xe:"-";Le.text(Ce).call(r.font,De.number.font).call(c.convertToTspans,Ee)}l(Ge)?Le.transition().duration(Ge.duration).ease(Ge.easing).each("end",function(){Ie(),Ye&&Ye()}).each("interrupt",function(){Ie(),Ye&&Ye()}).attrTween("text",function(){var Ce=g.select(this),Je=b(me[0].lastY,me[0].y);De._lastValue=me[0].y;var it=It(De.number.valueformat,Re,me[0].lastY,me[0].y);return function(ht){Ce.text(ke+it(Je(ht))+Xe)}}):Ie(),_e=k(ke+Re(me[0].y)+Xe,De.number.font,Ue,Ee)}(),rt+=De.number.font.size+De.number.font.family+De.number.valueformat
vendor: 8,283 bytes, line 1221
1221+De.number.suffix+De.number.prefix,Pe=_e),De._hasDelta&&De._hasNumber){var et,Tt,Vt=[(_e.left+_e.right)/2,(_e.top+_e.bottom)/2],Kt=[(Ae.left+Ae.right)/2,(Ae.top+Ae.bottom)/2],Be=.75*De.delta.font.size;De.delta.position==="left"&&(et=L(De,"deltaPos",0,-1*(_e.width*a[De.align]+Ae.width*(1-a[De.align])+Be),rt,Math.min),Tt=Vt[1]-Kt[1],Pe={width:_e.width+Ae.width+Be,height:Math.max(_e.height,Ae.height),left:Ae.left+et,right:_e.right,top:Math.min(_e.top,Ae.top+Tt),bottom:Math.max(_e.bottom,Ae.bottom+Tt)}),De.delta.position==="right"&&(et=L(De,"deltaPos",0,_e.width*(1-a[De.align])+Ae.width*a[De.align]+Be,rt,Math.max),Tt=Vt[1]-Kt[1],Pe={width:_e.width+Ae.width+Be,height:Math.max(_e.height,Ae.height),left:_e.left,right:Ae.right+et,top:Math.min(_e.top,Ae.top+Tt),bottom:Math.max(_e.bottom,Ae.bottom+Tt)}),De.delta.position==="bottom"&&(et=null,Tt=Ae.height,Pe={width:Math.max(_e.width,Ae.width),height:_e.height+Ae.height,left:Math.min(_e.left,Ae.left),right:Math.max(_e.right,Ae.right),top:_e.bottom-_e.height,bottom:_e.bottom+Ae.height}),De.delta.position==="top"&&(et=null,Tt=_e.top,Pe={width:Math.max(_e.width,Ae.width),height:_e.height+Ae.height,left:Math.min(_e.left,Ae.left),right:Math.max(_e.right,Ae.right),top:_e.bottom-_e.height-Ae.height,bottom:_e.bottom}),St.attr({dx:et,dy:Tt})}(De._hasNumber||De._hasDelta)&&tt.attr("transform",function(){var qe=Te.numbersScaler(Pe);rt+=qe[2];var Re,Xe=L(De,"numbersScale",1,qe[0],rt,Math.min);De._scaleNumbers||(Xe=1),Re=De._isAngular?Qe-Xe*Pe.bottom:Qe-Xe*(Pe.top+Pe.bottom)/2,De._numbersTop=Xe*Pe.top+Re;var ke=Pe[Oe];Oe==="center"&&(ke=(Pe.left+Pe.right)/2);var Le=Ve-Xe*ke;return Le=L(De,"numbersTranslate",0,Le,rt,Math.max),n(Le,Re)+e(Xe)})})(A,$,F,{numbersX:H,numbersY:V,numbersScaler:Z,transitionOpts:P,onComplete:E}),R&&(K={range:W.gauge.axis.range,color:W.gauge.bgcolor,line:{color:W.gauge.bordercolor,width:0},thickness:1},q={range:W.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:W.gauge.bordercolor,width:W.gauge.borderwidth},thickness:1});var ce=$.selectAll("g.angular").data(N?F:[]);ce.exit().remove();var de=$.selectAll("g.angularaxis").data(N?F:[]);de.exit().remove(),N&&function(Ee,fe,me,Te){var _e,Ae,Pe,De,Ve=me[0].trace,Qe=Te.size,Oe=Te.radius,Ue=Te.innerRadius,Ge=Te.gaugeBg,Ye=Te.gaugeOutline,tt=[Qe.l+Qe.w/2,Qe.t+Qe.h/2+Oe/2],lt=Te.gauge,vt=Te.layer,It=Te.transitionOpts,St=Te.onComplete,rt=Math.PI/2;function et(Et){var Ze=Ve.gauge.axis.range[0],pt=(Et-Ze)/(Ve.gauge.axis.range[1]-Ze)*Math.PI-rt;return pt<-rt?-rt:pt>rt?rt:pt}function Tt(Et){return g.svg.arc().innerRadius((Ue+Oe)/2-Et/2*(Oe-Ue)).outerRadius((Ue+Oe)/2+Et/2*(Oe-Ue)).startAngle(-rt)}function Vt(Et){Et.attr("d",function(Ze){return Tt(Ze.thickness).startAngle(et(Ze.range[0])).endAngle(et(Ze.range[1]))()})}lt.enter().append("g").classed("angular",!0),lt.attr("transform",n(tt[0],tt[1])),vt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),vt.selectAll("g.xangularaxistick,path,text").remove(),(_e=_(Ee,Ve.gauge.axis)).type="linear",_e.range=Ve.gauge.axis.range,_e._id="xangularaxis",_e.ticklabeloverflow="allow",_e.setScale();var Kt=function(Et){return(_e.range[0]-Et.x)/(_e.range[1]-_e.range[0])*Math.PI+Math.PI},Be={},qe=i.makeLabelFns(_e,0).labelStandoff;Be.xFn=function(Et){var Ze=Kt(Et);return Math.cos(Ze)*qe},Be.yFn=function(Et){var Ze=Kt(Et),pt=Math.sin(Ze)>0?.2:1;return-Math.sin(Ze)*(qe+Et.fontSize*pt)+Math.abs(Math.cos(Ze))*(Et.fontSize*o)},Be.anchorFn=function(Et){var Ze=Kt(Et),pt=Math.cos(Ze);return Math.abs(pt)<.1?"middle":pt>0?"start":"end"},Be.heightFn=function(Et,Ze,pt){var Ct=Kt(Et);return-.5*(1+Math.sin(Ct))*pt};var Re=function(Et){return n(tt[0]+Oe*Math.cos(Et),tt[1]-Oe*Math.sin(Et))};if(Pe=function(Et){return Re(Kt(Et))},Ae=i.calcTicks(_e),De=i.getTickSigns(_e)[2],_e.visible){De=_e.ticks==="inside"?-1:1;var Xe=(_e.linewidth||1)/2;i.drawTicks(Ee,_e,{vals:Ae,layer:vt,path:"M"+De*Xe+",0h"+De*_e.ticklen,transFn:function(Et){var Ze=Kt(Et);return Re(Ze)+"rotate("+-t(Ze)+")"}}),i.drawLabels(Ee,_e,{vals:Ae,layer:vt,transFn:Pe,labelFns:Be})}var ke=[Ge].concat(Ve.gauge.steps),Le=lt.selectAll("g.bg-arc").data(ke);Le.enter().append("g").classed("bg-arc",!0).append("path"),Le.select("path").call(Vt).call(w),Le.exit().remove();var Ie=Tt(Ve.gauge.bar.thickness),Ce=lt.selectAll("g.value-arc").data([Ve.gauge.bar]);Ce.enter().append("g").classed("value-arc",!0).append("path");var Je=Ce.select("path");l(It)?(Je.transition().duration(It.duration).ease(It.easing).each("end",function(){St&&St()}).each("interrupt",function(){St&&St()}).attrTween("d",(it=Ie,ht=et(me[0].lastY),ut=et(me[0].y),function(){var Et=m(ht,ut);return function(Ze){return it.endAngle(Et(Ze))()}})),Ve._lastValue=me[0].y):Je.attr("d",typeof me[0].y=="number"?Ie.endAngle(et(me[0].y)):"M0,0Z");var it,ht,ut;Je.call(w),Ce.exit().remove(),ke=[];var kt=Ve.gauge.threshold.value;(kt||kt===0)&&ke.push({range:[kt,kt],color:Ve.gauge.threshold.color,line:{color:Ve.gauge.threshold.line.color,width:Ve.gauge.threshold.line.width},thickness:Ve.gauge.threshold.thickness});var ot=lt.selectAll("g.threshold-arc").data(ke);ot.enter().append("g").classed("threshold-arc",!0).append("path"),ot.select("path").call(Vt).call(w),ot.exit().remove();var Lt=lt.selectAll("g.gauge-outline").data([Ye]);Lt.enter().append("g").classed("gauge-outline",!0).append("path"),Lt.select("path").call(Vt).call(w),Lt.exit().remove()}(A,0,F,{radius:re,innerRadius:ne,gauge:ce,layer:de,size:j,gaugeBg:K,gaugeOutline:q,transitionOpts:P,onComplete:E});var xe=$.selectAll("g.bullet").data(U?F:[]);xe.exit().remove();var we=$.selectAll("g.bulletaxis").data(U?F:[]);we.exit().remove(),U&&function(Ee,fe,me,Te){var _e,Ae,Pe,De,Ve,Qe=me[0].trace,Oe=Te.gauge,Ue=Te.layer,Ge=Te.gaugeBg,Ye=Te.gaugeOutline,tt=Te.size,lt=Qe.domain,vt=Te.transitionOpts,It=Te.onComplete;Oe.enter().append("g").classed("bullet",!0),Oe.attr("transform",n(tt.l,tt.t)),Ue.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),Ue.selectAll("g.xbulletaxistick,path,text").remove();var St=tt.h,rt=Qe.gauge.bar.thickness*St,et=lt.x[0],Tt=lt.x[0]+(lt.x[1]-lt.x[0])*(Qe._hasNumber||Qe._hasDelta?1-d.bulletNumberDomainSize:1);(_e=_(Ee,Qe.gauge.axis))._id="xbulletaxis",_e.domain=[et,Tt],_e.setScale(),Ae=i.calcTicks(_e),Pe=i.makeTransTickFn(_e),De=i.getTickSigns(_e)[2],Ve=tt.t+tt.h,_e.visible&&(i.drawTicks(Ee,_e,{vals:_e.ticks==="inside"?i.clipEnds(_e,Ae):Ae,layer:Ue,path:i.makeTickPath(_e,Ve,De),transFn:Pe}),i.drawLabels(Ee,_e,{vals:Ae,layer:Ue,transFn:Pe,labelFns:i.makeLabelFns(_e,Ve)}));function Vt(Le){Le.attr("width",function(Ie){return Math.max(0,_e.c2p(Ie.range[1])-_e.c2p(Ie.range[0]))}).attr("x",function(Ie){return _e.c2p(Ie.range[0])}).attr("y",function(Ie){return .5*(1-Ie.thickness)*St}).attr("height",function(Ie){return Ie.thickness*St})}var Kt=[Ge].concat(Qe.gauge.steps),Be=Oe.selectAll("g.bg-bullet").data(Kt);Be.enter().append("g").classed("bg-bullet",!0).append("rect"),Be.select("rect").call(Vt).call(w),Be.exit().remove();var qe=Oe.selectAll("g.value-bullet").data([Qe.gauge.bar]);qe.enter().append("g").classed("value-bullet",!0).append("rect"),qe.select("rect").attr("height",rt).attr("y",(St-rt)/2).call(w),l(vt)?qe.select("rect").transition().duration(vt.duration).ease(vt.easing).each("end",function(){It&&It()}).each("interrupt",function(){It&&It()}).attr("width",Math.max(0,_e.c2p(Math.min(Qe.gauge.axis.range[1],me[0].y)))):qe.select("rect").attr("width",typeof me[0].y=="number"?Math.max(0,_e.c2p(Math.min(Qe.gauge.axis.range[1],me[0].y))):0),qe.exit().remove();var Re=me.filter(function(){return Qe.gauge.threshold.value||Qe.gauge.threshold.value===0}),Xe=Oe.selectAll("g.threshold-bullet").data(Re);Xe.enter().append("g").classed("threshold-bullet",!0).append("line"),Xe.select("line").attr("x1",_e.c2p(Qe.gauge.threshold.value)).attr("x2",_e.c2p(Qe.gauge.threshold.value)).attr("y1",(1-Qe.gauge.threshold.thickness)/2*St).attr("y2",(1-(1-Qe.gauge.threshold.thickness)/2)*St).call(h.stroke,Qe.gauge.threshold.line.color).style("stroke-width",Qe.gauge.threshold.line.width),Xe.exit().remove();var ke=Oe.selectAll("g.gauge-outline").data([Ye]);ke.enter().append("g").classed("gauge-outline",!0).append("rect"),ke.select("rect").call(Vt).call(w),ke.exit().remove()}(A,0,F,{gauge:xe,layer:we,size:j,gaugeBg:K,gaugeOutline:q,transitionOpts:P,onComplete:E});
1221var be=$.selectAll("text.title").data(F);be.exit().remove(),be.enter().append("text").classed("title",!0),be.attr("text-anchor",function(){return U?p.right:p[W.title.align]}).text(W.title.text).call(r.font,W.title.font).call(c.convertToTspans,A),be.attr("transform",function(){var Ee,fe=j.l+j.w*a[W.title.align],me=d.titlePadding,Te=r.bBox(be.node());return R?(N&&(W.gauge.axis.visible?Ee=r.bBox(de.node()).top-me-Te.bottom:Ee=j.t+j.h/2-re/2-Te.bottom-me),U&&(Ee=V-(Te.top+Te.bottom)/2,fe=j.l-d.bulletPadding*j.w)):Ee=W._numbersTop-me-Te.bottom,n(fe,Ee)})})}},{"../../components/color":366,"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_defaults":556,"../../plots/cartesian/layout_attributes":569,"../../plots/cartesian/position_defaults":572,"./constants":858,"@plotly/d3":58,"d3-interpolate":116}],862:[function(y,ee,te){var g=y("../../components/colorscale/attributes"),m=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../mesh3d/attributes"),e=y("../../plots/attributes"),n=y("../../lib/extend").extendFlat,t=y("../../plot_api/edit_types").overrideAll,o=ee.exports=t(n({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:b(),xhoverformat:m("x"),yhoverformat:m("y"),zhoverformat:m("z"),valuehoverformat:m("value",1),showlegend:n({},e.showlegend,{dflt:!1})},g("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:v.opacity,lightposition:v.lightposition,lighting:v.lighting,flatshading:v.flatshading,contour:v.contour,hoverinfo:n({},e.hoverinfo)}),"calc","nested");o.flatshading.dflt=!0,o.lighting.facenormalsepsilon.dflt=0,o.x.editType=o.y.editType=o.z.editType=o.value.editType="calc+clearAxisTypes",o.transforms=void 0},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],863:[function(y,ee,te){var g=y("../../components/colorscale/calc"),m=y("../streamtube/calc").processGrid,b=y("../streamtube/calc").filter;ee.exports=function(v,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=b(e.x,e._len),e._y=b(e.y,e._len),e._z=b(e.z,e._len),e._value=b(e.value,e._len);var n=m(e);e._gridFill=n.fill,e._Xs=n.Xs,e._Ys=n.Ys,e._Zs=n.Zs,e._len=n.len;for(var t=1/0,o=-1/0,r=0;r<e._len;r++){var d=e._value[r];t=Math.min(t,d),o=Math.max(o,d)}e._minValues=t,e._maxValues=o,e._vMin=e.isomin===void 0||e.isomin===null?t:e.isomin,e._vMax=e.isomax===void 0||e.isomin===null?o:e.isomax,g(v,e,{vals:[e._vMin,e._vMax],containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374,"../streamtube/calc":1041}],864:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_mesh3d,m=y("../../lib/gl_format_color").parseColorScale,b=y("../../lib/str2rgbarray"),v=y("../../components/colorscale").extractOpts,e=y("../../plots/gl3d/zip3"),n=function(c,i){for(var u=i.length-1;u>0;u--){var f=Math.min(i[u],i[u-1]),s=Math.max(i[u],i[u-1]);if(s>f&&f<c&&c<=s)return{id:u,distRatio:(s-c)/(s-f)}}return{id:0,distRatio:0}};function t(c,i,u){this.scene=c,this.uid=u,this.mesh=i,this.name="",this.data=null,this.showContour=!1}var o=t.prototype;o.handlePick=function(c){if(c.object===this.mesh){var i=c.data.index,u=this.data._meshX[i],f=this.data._meshY[i],s=this.data._meshZ[i],h=this.data._Ys.length,p=this.data._Zs.length,a=n(u,this.data._Xs).id,x=n(f,this.data._Ys).id,l=n(s,this.data._Zs).id,w=c.index=l+p*x+p*h*a;c.traceCoordinate=[this.data._meshX[w],this.data._meshY[w],this.data._meshZ[w],this.data._value[w]];var _=this.data.hovertext||this.data.text;return Array.isArray(_)&&_[w]!==void 0?c.textLabel=_[w]:_&&(c.textLabel=_),!0}},o.update=function(c){var i=this.scene,u=i.fullSceneLayout;function f(p,a,x,l){return a.map(function(w){return p.d2l(w,0,l)*x})}this.data=d(c);var s={positions:e(f(u.xaxis,c._meshX,i.dataScale[0],c.xcalendar),f(u.yaxis,c._meshY,i.dataScale[1],c.ycalendar),f(u.zaxis,c._meshZ,i.dataScale[2],c.zcalendar)),cells:e(c._meshI,c._meshJ,c._meshK),lightPosition:[c.lightposition.x,c.lightposition.y,c.lightposition.z],ambient:c.lighting.ambient,diffuse:c.lighting.diffuse,specular:c.lighting.specular,roughness:c.lighting.roughness,fresnel:c.lighting.fresnel,vertexNormalsEpsilon:c.lighting.vertexnormalsepsilon,faceNormalsEpsilon:c.lighting.facenormalsepsilon,opacity:c.op
1221acity,contourEnable:c.contour.show,contourColor:b(c.contour.color).slice(0,3),contourWidth:c.contour.width,useFacetNormals:c.flatshading},h=v(c);s.vertexIntensity=c._meshIntensity,s.vertexIntensityBounds=[h.min,h.max],s.colormap=m(c),this.mesh.update(s)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var r=["xyz","xzy","yxz","yzx","zxy","zyx"];function d(c){c._meshI=[],c._meshJ=[],c._meshK=[];var i,u,f,s,h,p,a,x=c.surface.show,l=c.spaceframe.show,w=c.surface.fill,_=c.spaceframe.fill,T=!1,k=!1,L=0,A=c._Xs,I=c._Ys,P=c._Zs,S=A.length,E=I.length,D=P.length,F=r.indexOf(c._gridFill.replace(/-/g,"").replace(/\+/g,"")),H=function(Oe,Ue,Ge){switch(F){case 5:return Ge+D*Ue+D*E*Oe;case 4:return Ge+D*Oe+D*S*Ue;case 3:return Ue+E*Ge+E*D*Oe;case 2:return Ue+E*Oe+E*S*Ge;case 1:return Oe+S*Ge+S*D*Ue;default:return Oe+S*Ue+S*E*Ge}},V=c._minValues,Z=c._maxValues,K=c._vMin,q=c._vMax;function W(Oe,Ue,Ge){for(var Ye=p.length,tt=u;tt<Ye;tt++)if(Oe===f[tt]&&Ue===s[tt]&&Ge===h[tt])return tt;return-1}function $(){u=i}function R(){f=[],s=[],h=[],p=[],i=0,$()}function N(Oe,Ue,Ge,Ye){return f.push(Oe),s.push(Ue),h.push(Ge),p.push(Ye),++i-1}function U(Oe,Ue,Ge){for(var Ye=[],tt=0;tt<Oe.length;tt++)Ye[tt]=Oe[tt]*(1-Ge)+Ge*Ue[tt];return Ye}function Q(Oe){a=Oe}function j(Oe,Ue){return Oe==="all"||Oe===null||Oe.indexOf(Ue)>-1}function X(Oe,Ue){return Oe===null?Ue:Oe}function J(Oe,Ue,Ge){$();var Ye,tt,lt,vt=[Ue],It=[Ge];if(a>=1)vt=[Ue],It=[Ge];else if(a>0){var St=function(Xe,ke){var Le=Xe[0],Ie=Xe[1],Ce=Xe[2],Je=function(Ze,pt,Ct){for(var zt=[],Gt=0;Gt<Ze.length;Gt++)zt[Gt]=(Ze[Gt]+pt[Gt]+Ct[Gt])/3;return zt}(Le,Ie,Ce),it=Math.sqrt(1-a),ht=U(Je,Le,it),ut=U(Je,Ie,it),kt=U(Je,Ce,it),ot=ke[0],Lt=ke[1],Et=ke[2];return{xyzv:[[Le,Ie,ut],[ut,ht,Le],[Ie,Ce,kt],[kt,ut,Ie],[Ce,Le,ht],[ht,kt,Ce]],abc:[[ot,Lt,-1],[-1,-1,ot],[Lt,Et,-1],[-1,-1,Lt],[Et,ot,-1],[-1,-1,Et]]}}(Ue,Ge);vt=St.xyzv,It=St.abc}for(var rt=0;rt<vt.length;rt++){Ue=vt[rt],Ge=It[rt];for(var et=[],Tt=0;Tt<3;Tt++){var Vt=Ue[Tt][0],Kt=Ue[Tt][1],Be=Ue[Tt][2],qe=Ue[Tt][3],Re=Ge[Tt]>-1?Ge[Tt]:W(Vt,Kt,Be);et[Tt]=Re>-1?Re:N(Vt,Kt,Be,X(Oe,qe))}Ye=et[0],tt=et[1],lt=et[2],c._meshI.push(Ye),c._meshJ.push(tt),c._meshK.push(lt),++L}}function re(Oe,Ue,Ge,Ye){var tt=Oe[3];tt<Ge&&(tt=Ge),tt>Ye&&(tt=Ye);for(var lt=(Oe[3]-tt)/(Oe[3]-Ue[3]+1e-9),vt=[],It=0;It<4;It++)vt[It]=(1-lt)*Oe[It]+lt*Ue[It];return vt}function ne(Oe,Ue,Ge){return Oe>=Ue&&Oe<=Ge}function se(Oe){var Ue=.001*(q-K);return Oe>=K-Ue&&Oe<=q+Ue}function oe(Oe){for(var Ue=[],Ge=0;Ge<4;Ge++){var Ye=Oe[Ge];Ue.push([c._x[Ye],c._y[Ye],c._z[Ye],c._value[Ye]])}return Ue}function pe(Oe,Ue,Ge,Ye,tt,lt){lt||(lt=1),Ge=[-1,-1,-1];var vt=!1,It=[ne(Ue[0][3],Ye,tt),ne(Ue[1][3],Ye,tt),ne(Ue[2][3],Ye,tt)];if(!It[0]&&!It[1]&&!It[2])return!1;var St=function(et,Tt,Vt){return se(Tt[0][3])&&se(Tt[1][3])&&se(Tt[2][3])?(J(et,Tt,Vt),!0):lt<3&&pe(et,Tt,Vt,K,q,++lt)};if(It[0]&&It[1]&&It[2])return St(Oe,Ue,Ge)||vt;var rt=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(et){if(It[et[0]]&&It[et[1]]&&!It[et[2]]){var Tt=Ue[et[0]],Vt=Ue[et[1]],Kt=Ue[et[2]],Be=re(Kt,Tt,Ye,tt),qe=re(Kt,Vt,Ye,tt);vt=St(Oe,[qe,Be,Tt],[-1,-1,Ge[et[0]]])||vt,vt=St(Oe,[Tt,Vt,qe],[Ge[et[0]],Ge[et[1]],-1])||vt,rt=!0}}
vendor: 5,493 bytes, line 1221
1221),rt||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(et){if(It[et[0]]&&!It[et[1]]&&!It[et[2]]){var Tt=Ue[et[0]],Vt=Ue[et[1]],Kt=Ue[et[2]],Be=re(Vt,Tt,Ye,tt),qe=re(Kt,Tt,Ye,tt);vt=St(Oe,[qe,Be,Tt],[-1,-1,Ge[et[0]]])||vt,rt=!0}}),vt}function ce(Oe,Ue,Ge,Ye){var tt=!1,lt=oe(Ue),vt=[ne(lt[0][3],Ge,Ye),ne(lt[1][3],Ge,Ye),ne(lt[2][3],Ge,Ye),ne(lt[3][3],Ge,Ye)];if(!(vt[0]||vt[1]||vt[2]||vt[3]))return tt;if(vt[0]&&vt[1]&&vt[2]&&vt[3])return k&&(tt=function(St,rt,et){var Tt=function(Vt,Kt,Be){J(St,[rt[Vt],rt[Kt],rt[Be]],[et[Vt],et[Kt],et[Be]])};Tt(0,1,2),Tt(3,0,1),Tt(2,3,0),Tt(1,2,3)}(Oe,lt,Ue)||tt),tt;var It=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(St){if(vt[St[0]]&&vt[St[1]]&&vt[St[2]]&&!vt[St[3]]){var rt=lt[St[0]],et=lt[St[1]],Tt=lt[St[2]],Vt=lt[St[3]];if(k)tt=J(Oe,[rt,et,Tt],[Ue[St[0]],Ue[St[1]],Ue[St[2]]])||tt;else{var Kt=re(Vt,rt,Ge,Ye),Be=re(Vt,et,Ge,Ye),qe=re(Vt,Tt,Ge,Ye);tt=J(null,[Kt,Be,qe],[-1,-1,-1])||tt}It=!0}}),It||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(St){if(vt[St[0]]&&vt[St[1]]&&!vt[St[2]]&&!vt[St[3]]){var rt=lt[St[0]],et=lt[St[1]],Tt=lt[St[2]],Vt=lt[St[3]],Kt=re(Tt,rt,Ge,Ye),Be=re(Tt,et,Ge,Ye),qe=re(Vt,et,Ge,Ye),Re=re(Vt,rt,Ge,Ye);k?(tt=J(Oe,[rt,Re,Kt],[Ue[St[0]],-1,-1])||tt,tt=J(Oe,[et,Be,qe],[Ue[St[1]],-1,-1])||tt):tt=function(Xe,ke,Le){var Ie=function(Ce,Je,it){J(Xe,[ke[Ce],ke[Je],ke[it]],[Le[Ce],Le[Je],Le[it]])};Ie(0,1,2),Ie(2,3,0)}(null,[Kt,Be,qe,Re],[-1,-1,-1,-1])||tt,It=!0}}),It||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(St){if(vt[St[0]]&&!vt[St[1]]&&!vt[St[2]]&&!vt[St[3]]){var rt=lt[St[0]],et=lt[St[1]],Tt=lt[St[2]],Vt=lt[St[3]],Kt=re(et,rt,Ge,Ye),Be=re(Tt,rt,Ge,Ye),qe=re(Vt,rt,Ge,Ye);k?(tt=J(Oe,[rt,Kt,Be],[Ue[St[0]],-1,-1])||tt,tt=J(Oe,[rt,Be,qe],[Ue[St[0]],-1,-1])||tt,tt=J(Oe,[rt,qe,Kt],[Ue[St[0]],-1,-1])||tt):tt=J(null,[Kt,Be,qe],[-1,-1,-1])||tt,It=!0}})),tt}function de(Oe,Ue,Ge,Ye,tt,lt,vt,It,St,rt,et){var Tt=!1;return T&&(j(Oe,"A")&&(Tt=ce(null,[Ue,Ge,Ye,lt],rt,et)||Tt),j(Oe,"B")&&(Tt=ce(null,[Ge,Ye,tt,St],rt,et)||Tt),j(Oe,"C")&&(Tt=ce(null,[Ge,lt,vt,St],rt,et)||Tt),j(Oe,"D")&&(Tt=ce(null,[Ye,lt,It,St],rt,et)||Tt),j(Oe,"E")&&(Tt=ce(null,[Ge,Ye,lt,St],rt,et)||Tt)),k&&(Tt=ce(Oe,[Ge,Ye,lt,St],rt,et)||Tt),Tt}function xe(Oe,Ue,Ge,Ye,tt,lt,vt,It){return[It[0]===!0||pe(Oe,oe([Ue,Ge,Ye]),[Ue,Ge,Ye],lt,vt),It[1]===!0||pe(Oe,oe([Ye,tt,Ue]),[Ye,tt,Ue],lt,vt)]}function we(Oe,Ue,Ge,Ye,tt,lt,vt,It,St){return It?xe(Oe,Ue,Ge,tt,Ye,lt,vt,St):xe(Oe,Ge,tt,Ye,Ue,lt,vt,St)}function be(Oe,Ue,Ge,Ye,tt,lt,vt){var It,St,rt,et,Tt=!1,Vt=function(){Tt=pe(Oe,[It,St,rt],[-1,-1,-1],tt,lt)||Tt,Tt=pe(Oe,[rt,et,It],[-1,-1,-1],tt,lt)||Tt},Kt=vt[0],Be=vt[1],qe=vt[2];return Kt&&(It=U(oe([H(Ue,Ge-0,Ye-0)])[0],oe([H(Ue-1,Ge-0,Ye-0)])[0],Kt),St=U(oe([H(Ue,Ge-0,Ye-1)])[0],oe([H(Ue-1,Ge-0,Ye-1)])[0],Kt),rt=U(oe([H(Ue,Ge-1,Ye-1)])[0],oe([H(Ue-1,Ge-1,Ye-1)])[0],Kt),et=U(oe([H(Ue,Ge-1,Ye-0)])[0],oe([H(Ue-1,Ge-1,Ye-0)])[0],Kt),Vt()),Be&&(It=U(oe([H(Ue-0,Ge,Ye-0)])[0],oe([H(Ue-0,Ge-1,Ye-0)])[0],Be),St=U(oe([H(Ue-0,Ge,Ye-1)])[0],oe([H(Ue-0,Ge-1,Ye-1)])[0],Be),rt=U(oe([H(Ue-1,Ge,Ye-1)])[0],oe([H(Ue-1,Ge-1,Ye-1)])[0],Be),et=U(oe([H(Ue-1,Ge,Ye-0)])[0],oe([H(Ue-1,Ge-1,Ye-0)])[0],Be),Vt()),qe&&(It=U(oe([H(Ue-0,Ge-0,Ye)])[0],oe([H(Ue-0,Ge-0,Ye-1)])[0],qe),St=U(oe([H(Ue-0,Ge-1,Ye)])[0],oe([H(Ue-0,Ge-1,Ye-1)])[0],qe),rt=U(oe([H(Ue-1,Ge-1,Ye)])[0],oe([H(Ue-1,Ge-1,Ye-1)])[0],qe),et=U(oe([H(Ue-1,Ge-0,Ye)])[0],oe([H(Ue-1,Ge-0,Ye-1)])[0],qe),Vt()),Tt}function Ee(Oe,Ue,Ge,Ye,tt,lt,vt,It,St,rt,et,Tt){var Vt=Oe;return Tt?(T&&Oe==="even"&&(Vt=null),de(Vt,Ue,Ge,Ye,tt,lt,vt,It,St,rt,et)):(T&&Oe==="odd"&&(Vt=null),de(Vt,St,It,vt,lt,tt,Ye,Ge,Ue,rt,et))}function fe(Oe,Ue,Ge,Ye,tt){for(var lt=[],vt=0,It=0;It<Ue.length;It++)for(var St=Ue[It],rt=1;rt<D;rt++)for(var et=1;et<E;et++)lt.push(we(Oe,H(St,et-1,rt-1),H(St,et-1,rt),H(St,et,rt-1),H(St,et,rt),Ge,Ye,(St+et+rt)%2,tt&&tt[vt]?tt[vt]:[])),vt++;return lt}function me(Oe,Ue,Ge,Ye,tt){for(var lt=[],vt=0,It=0;It<Ue.length;It++)for(var St=Ue[It],rt=1;rt<S;rt++)for(var et=1;et<D;et++)lt.push(we(Oe,H(rt-1,St,et-1),H(rt,St,et-1),H(rt-1,St,et),H(rt,St,et),Ge,Ye,(rt+St+et)%2,tt&&tt[vt]?tt[vt]:[])),vt++;return lt}function Te(Oe,Ue,Ge,Ye,tt){for(var lt=[],vt=0,It=0;It<Ue.length;It++)for(var St=Ue[It],rt=1;rt<E;rt++)for(var et=1;et<S;et++)lt.push(we(Oe,H(et-1,rt-1,St),H(et-1,rt,St),H(et,rt-1,St),H(et,rt,St),Ge,Ye,(et+rt+St)%2,tt&&tt[vt]?tt[vt]:[])),vt++;return lt}function _e(Oe,Ue,Ge){for(var Ye=1;Ye<D;Ye++)for(var tt=1;tt<E;tt++)for(var lt=1;lt<S;lt++)Ee(Oe,H(lt-1,tt-1,Ye-1),H(lt-1,tt-1,Ye),H(lt-1,tt,Ye-1),H(lt-1,tt,Ye),H(lt,tt-1,Ye-1),H(lt,tt-1,Ye),H(lt,tt,Ye-1),H(lt,tt,Ye),Ue,Ge,(lt+tt+Ye)%2)}function Ae(Oe,Ue,Ge){T=!0,_e(Oe,Ue,Ge),T=!1}function Pe(Oe,Ue,Ge,Ye,tt,lt){for(var vt=[],It=0,St=0;St<Ue.length;St++)for(var rt=Ue[St],et=1;et<D;et++)for(var Tt=1;Tt<E;Tt++)vt.push(be(Oe,rt,Tt,et,Ge,Ye,tt[St],lt&&lt[It]&&lt[It])),It++;return vt}function De(Oe,Ue,Ge,Ye,tt,lt){for(var vt=[],It=0,St=0;St<Ue.length;St++)for(var rt=Ue[St],et=1;et<S;et++)for(var Tt=1;Tt<D;Tt++)vt.push(be(Oe,et,rt,Tt,Ge,Ye,tt[St],lt&&lt[It]&&lt[It])),It++;return vt}function Ve(Oe,Ue,Ge,Ye,tt,lt){for(var vt=[],It=0,St=0;St<Ue.length;St++)for(var rt=Ue[St],et=1;et<E;et++)for(var Tt=1;Tt<S;Tt++)vt.push(be(Oe,Tt,et,rt,Ge,Ye,tt[St],lt&&lt[It]&&lt[It])),It++;return vt}function Qe(Oe,Ue){for(var Ge=[],Ye=Oe;Ye<Ue;Ye++)Ge.push(Ye);return Ge}return function(){if(R(),function(){for(var It=0;It<S;It++)for(var St=0;St<E;St++)for(var rt=0;rt<D;rt++){var et=H(It,St,rt);
1221N(c._x[et],c._y[et],c._z[et],c._value[et])}}(),l&&_&&(Q(_),k=!0,_e(null,K,q),k=!1),x&&w){Q(w);for(var Oe=c.surface.pattern,Ue=c.surface.count,Ge=0;Ge<Ue;Ge++){var Ye=Ue===1?.5:Ge/(Ue-1),tt=(1-Ye)*K+Ye*q,lt=Math.abs(tt-V)>Math.abs(tt-Z)?[V,tt]:[tt,Z];Ae(Oe,lt[0],lt[1])}}var vt=[[Math.min(K,Z),Math.max(K,Z)],[Math.min(V,q),Math.max(V,q)]];["x","y","z"].forEach(function(It){for(var St=[],rt=0;rt<vt.length;rt++){var et=0,Tt=vt[rt][0],Vt=vt[rt][1],Kt=c.slices[It];if(Kt.show&&Kt.fill){Q(Kt.fill);var Be=[],qe=[],Re=[];if(Kt.locations.length)for(var Xe=0;Xe<Kt.locations.length;Xe++){var ke=n(Kt.locations[Xe],It==="x"?A:It==="y"?I:P);ke.distRatio===0?Be.push(ke.id):ke.id>0&&(qe.push(ke.id),It==="x"?Re.push([ke.distRatio,0,0]):It==="y"?Re.push([0,ke.distRatio,0]):Re.push([0,0,ke.distRatio]))}else Be=Qe(1,It==="x"?S-1:It==="y"?E-1:D-1);qe.length>0&&(St[et]=It==="x"?Pe(null,qe,Tt,Vt,Re,St[et]):It==="y"?De(null,qe,Tt,Vt,Re,St[et]):Ve(null,qe,Tt,Vt,Re,St[et]),et++),Be.length>0&&(St[et]=It==="x"?fe(null,Be,Tt,Vt,St[et]):It==="y"?me(null,Be,Tt,Vt,St[et]):Te(null,Be,Tt,Vt,St[et]),et++)}var Le=c.caps[It];Le.show&&Le.fill&&(Q(Le.fill),St[et]=It==="x"?fe(null,[0,S-1],Tt,Vt,St[et]):It==="y"?me(null,[0,E-1],Tt,Vt,St[et]):Te(null,[0,D-1],Tt,Vt,St[et]),et++)}}),L===0&&R(),c._meshX=f,c._meshY=s,c._meshZ=h,c._meshIntensity=p,c._Xs=A,c._Ys=I,c._Zs=P}(),c}ee.exports={findNearestOnAxis:n,generateIsoMeshes:d,createIsosurfaceTrace:function(c,i){var u=c.glplot.gl,f=g({gl:u}),s=new t(c,f,i.uid);return f._trace=s,s.update(i),c.glplot.add(f),s}}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609}],865:[function(y,ee,te){var g=y("../../lib"),m=y("../../registry"),b=y("./attributes"),v=y("../../components/colorscale/defaults");function e(n,t,o,r,d){var c=d("isomin"),i=d("isomax");i!=null&&c!=null&&c>i&&(t.isomin=null,t.isomax=null);var u=d("x"),f=d("y"),s=d("z"),h=d("value");u&&u.length&&f&&f.length&&s&&s.length&&h&&h.length?(m.getComponentMethod("calendars","handleTraceDefaults")(n,t,["x","y","z"],r),d("valuehoverformat"),["x","y","z"].forEach(function(p){d(p+"hoverformat");var a="caps."+p;d(a+".show")&&d(a+".fill");var x="slices."+p;d(x+".show")&&(d(x+".fill"),d(x+".locations"))}),d("spaceframe.show")&&d("spaceframe.fill"),d("surface.show")&&(d("surface.count"),d("surface.fill"),d("surface.pattern")),d("contour.show")&&(d("contour.color"),d("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(p){d(p)}),v(n,t,r,d,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}ee.exports={supplyDefaults:function(n,t,o,r){e(n,t,o,r,function(d,c){return g.coerce(n,t,b,d,c)})},supplyIsoDefaults:e}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":862}],866:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults").supplyDefaults,calc:y("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:y("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:y("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":862,"./calc":863,"./convert":864,"./defaults":865}],867:[function(y,ee,te){var g=y("../../components/colorscale/attributes"),m=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../surface/attributes"),e=y("../../plots/attributes"),n=y("../../lib/extend").extendFlat;ee.exports=n({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:b({editType:"calc"}),xhoverformat:m("x"),yhoverformat:m("y"),zhoverformat:m("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},g("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:v.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:n({},v.contours.x.show,{}),color:v.contours.x.color,width:v.contours.x.width,editType:"calc"},lightposition:{x:n({},v.lightposition.x,{dflt:1e5}),y:n({},v.lightposition.y,{dflt:1e5}),z:n({},v.lightposition.z,{dflt:0}),editType:"calc"},lighting:n({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},v.lighting),hoverinfo:n({},e.hoverinfo,{editType:"calc"}),showlegend:n({},e.showlegend,{dflt:!1})})},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../surface/attributes":1057}],868:[function(y,ee,te){var g=y("../../components/colorscale/calc");ee.exports=function(m,b){b.intensity&&g(m,b,{vals:b.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],869:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_mesh3d,m=y("../../../stackgl_modules").delaunay_triangulate,b=y("../../../stackgl_modules").alpha_shape,v=y("../../../stackgl_modules").convex_hull,e=y("../../lib/gl_format_color").parseColorScale,n=y("../../lib/str2rgbarray"),t=y("../../components/colorscale").extractOpts,o=y("../../plots/gl3d/zip3");function r(s,h,p){this.scene=s,this.uid=p,this.mesh=h,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var d=r.prototype;function c(s){for(var h=[],p=s.length,a=0;a<p;a++)h[a]=n(s[a]);return h}function i(s,h,p,a){for(var x=[],l=h.length,w=0;w<l;w++)x[w]=s.d2l(h[w],0,a)*p;return x}function u(s){for(var h=[],p=s.length,a=0;a<p;a++)h[a]=Math.round(s[a]);return h}function f(s,h){for(var p=s.length,a=0;a<p;a++)if(s[a]<=-.5||s[a]>=h-.5)return!1;return!0}d.handlePick=function(s){if(s.object===this.mesh){var h=s.index=s.data.index;s.data._cellCenter?s.traceCoordinate=s.data.dataCoordinate:s.traceCoordinate=[this.data.x[h],this.data.y[h],this.data.z[h]];var p=this.data.hovertext||this.data.text;return Array.isArray(p)&&p[h]!==void 0?s.textLabel=p[h]:p&&(s.textLabel=p),!0}},d.update=function(s){var h=this.scene,p=h.fullSceneLayout;this.data=s;var a,x=s.x.length,l=o(i(p.xaxis,s.x,h.dataScale[0],s.xcalendar),i(p.yaxis,s.y,h.dataScale[1],s.ycalendar),i(p.zaxis,s.z,h.dataScale[2],s.zcalendar));if(s.i&&s.j&&s.k){if(s.i.length!==s.j.length||s.j.length!==s.k.length||!f(s.i,x)||!f(s.j,x)||!f(s.k,x))return;a=o(u(s.i),u(s.j),u(s.k))}else a=s.alphahull===0?v(l):s.alphahull>0?b(s.alphahull,l):function(k,L){for(var A=["x","y","z"].indexOf(k),I=[],P=L.length,S=0;S<P;S++)I[S]=[L[S][(A+1)%3],L[S][(A+2)%3]];return m(I)}(s.delaunayaxis,l);var w={positions:l,cells:a,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,contourEnable:s.contour.show,contourColor:n(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading};if(s.intensity){var _=t(s);this.color="#fff";var T=s.intensitymode;w[T+"Intensity"]=s.intensity,w[T+"IntensityBounds"]=[_.min,_.max],w.colormap=e(s)}else s.vertexcolor?(this.color=s.vertexcolor[0],w.vertexColors=c(s.vertexcolor)):s.facecolor?(this.color=s.facecolor[0],w.cellColors=c(s.facecolor)):(this.color=s.color,w.meshColor=n(s.color));this.mesh.update(w)},d.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},ee.exports=function(s,h){var p=s.glplot.gl,a=g({gl:p}),x=new r(s,a,h.uid);return a._trace=x,x.update(h),s.glplot.add(a),x}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609}],870:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("../../components/colorscale/defaults"),v=y("./attributes");ee.exports=function(e,n,t,o){function r(c,i){return m.coerce(e,n,v,c,i)}function d(c){var i=c.map(function(u){var f=r(u);return f&&m.isArrayOrTypedArray(f)?f:null});return i.every(function(u){return u&&u.length===i[0].length})&&i}d(["x","y","z"])?(d(["i","j","k"]),(!n.i||n.j&&n.k)&&(!n.j||n.k&&n.i)&&(!n.k||n.i&&n.j)?(g.getComponentMethod("calendars","handleTraceDefaults")(e,n,["x","y","z"],o),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){r(c)}),r("contour.show")&&(r("contour.color"),r("contour.width")),"intensity"in e?(r("intensity"),r("intensitymode"),b(e,n,o,r,{prefix:"",cLetter:"c"})):(n.showscale=!1,"facecolor"in e?r("facecolor"):"vertexcolor"in e?r("vertexcolor"):r("color",t)),r("text"),r("hovertext"),r("hovertemplate"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),n._length=null):n.visible=!1):n.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":867}],871:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:y("./convert"),moduleType:"trace",name:"mesh3d",basePlotModule:y("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":867,"./calc":868,"./convert":869,"./defaults":870}],872:[function(y,ee,te){var g=y("../../lib").extendFlat,m=y("../scatter/attributes"),b=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,v=y("../../components/drawing/attributes").dash,e=y("../../components/fx/attributes"),n=y("../../constants/delta.js"),t=n.INCREASING.COLOR,o=n.DECREASING.COLOR,r=m.line;function d(c){return{line:{color:g({},r.color,{dflt:c}),width:r.width,dash:v,editType:"style"},editType:"style"}}
1221ee.exports={xperiod:m.xperiod,xperiod0:m.xperiod0,xperiodalignment:m.xperiodalignment,xhoverformat:b("x"),yhoverformat:b("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:g({},r.width,{}),dash:g({},v,{}),editType:"style"},increasing:d(t),decreasing:d(o),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:g({},e.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},{"../../components/drawing/attributes":387,"../../components/fx/attributes":397,"../../constants/delta.js":473,"../../lib":503,"../../plots/cartesian/axis_format_attributes":557,"../scatter/attributes":926}],873:[function(y,ee,te){var g=y("../../lib"),m=g._,b=y("../../plots/cartesian/axes"),v=y("../../plots/cartesian/align_period"),e=y("../../constants/numerical").BADNUM;function n(o,r,d,c){return{o,h:r,l:d,c}}function t(o,r,d,c,i,u){for(var f=i.makeCalcdata(r,"open"),s=i.makeCalcdata(r,"high"),h=i.makeCalcdata(r,"low"),p=i.makeCalcdata(r,"close"),a=Array.isArray(r.text),x=Array.isArray(r.hovertext),l=!0,w=null,_=!!r.xperiodalignment,T=[],k=0;k<c.length;k++){var L=c[k],A=f[k],I=s[k],P=h[k],S=p[k];if(L!==e&&A!==e&&I!==e&&P!==e&&S!==e){S===A?w!==null&&S!==w&&(l=S>w):l=S>A,w=S;var E=u(A,I,P,S);E.pos=L,E.yc=(A+S)/2,E.i=k,E.dir=l?"increasing":"decreasing",E.x=E.pos,E.y=[P,I],_&&(E.orig_p=d[k]),a&&(E.tx=r.text[k]),x&&(E.htx=r.hovertext[k]),T.push(E)}else T.push({pos:L,empty:!0})}return r._extremes[i._id]=b.findExtremes(i,g.concat(h,s),{padded:!0}),T.length&&(T[0].t={labels:{open:m(o,"open:")+" ",high:m(o,"high:")+" ",low:m(o,"low:")+" ",close:m(o,"close:")+" "}}),T}ee.exports={calc:function(o,r){var d=b.getFromId(o,r.xaxis),c=b.getFromId(o,r.yaxis),i=function(p,a,x){var l=x._minDiff;if(!l){var w,_=p._fullData,T=[];for(l=1/0,w=0;w<_.length;w++){var k=_[w];if(k.type==="ohlc"&&k.visible===!0&&k.xaxis===a._id){T.push(k);var L=a.makeCalcdata(k,"x");k._origX=L;var A=v(x,a,"x",L).vals;k._xcalc=A;var I=g.distinctVals(A).minDiff;I&&isFinite(I)&&(l=Math.min(l,I))}}for(l===1/0&&(l=1),w=0;w<T.length;w++)T[w]._minDiff=l}return l*x.tickwidth}(o,d,r),u=r._minDiff;r._minDiff=null;var f=r._origX;r._origX=null;var s=r._xcalc;r._xcalc=null;var h=t(o,r,f,s,c,n);return r._extremes[d._id]=b.findExtremes(d,s,{vpad:u/2}),h.length?(g.extendFlat(h[0].t,{wHover:u/2,tickLen:i}),h):[{t:{empty:!0}}]},calcCommon:t}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554}],874:[function(y,ee,te){var g=y("../../lib"),m=y("./ohlc_defaults"),b=y("../scatter/period_defaults"),v=y("./attributes");function e(n,t,o,r){o(r+".line.color"),o(r+".line.width",t.line.width),o(r+".line.dash",t.line.dash)}ee.exports=function(n,t,o,r){function d(c,i){return g.coerce(n,t,v,c,i)}m(n,t,d,r)?(b(n,t,r,d,{x:!0}),d("xhoverformat"),d("yhoverformat"),d("line.width"),d("line.dash"),e(n,t,d,"increasing"),e(n,t,d,"decreasing"),d("text"),d("hovertext"),d("tickwidth"),r._requestRangeslider[t.xaxis]=!0):t.visible=!1}},{"../../lib":503,"../scatter/period_defaults":946,"./attributes":872,"./ohlc_defaults":877}],875:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../lib"),b=y("../../components/fx"),v=y("../../components/color"),e=y("../../lib").fillText,n=y("../../constants/delta.js"),t={increasing:n.INCREASING.SYMBOL,decreasing:n.DECREASING.SYMBOL};function o(c,i,u,f){var s,h,p=c.cd,a=c.xa,x=p[0].trace,l=p[0].t,w=x.type,_=w==="ohlc"?"l":"min",T=w==="ohlc"?"h":"max",k=l.bPos||0,L=l.bdPos||l.tickLen,A=l.wHover,I=Math.min(1,L/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));function P(Z){var K=function(q){return q.pos+k-i}(Z);return b.inbox(K-A,K+A,s)}function S(Z){var K=Z[_],q=Z[T];return K===q||b.inbox(K-u,q-u,s)}function E(Z){return(P(Z)+S(Z))/2}s=c.maxHoverDistance-I,h=c.maxSpikeDistance-I;var D=b.getDistanceFunction(f,P,S,E);if(b.getClosest(p,D,c),c.index===!1)return null;var F=p[c.index];if(F.empty)return null;var H=x[F.dir],V=H.line.color;return v.opacity(V)&&H.line.width?c.color=V:c.color=H.fillcolor,c.x0=a.c2p(F.pos+k-L,!0),c.x1=a.c2p(F.pos+k+L,!0),c.xLabelVal=F.orig_p!==void 0?F.orig_p:F.pos,
1221c.spikeDistance=E(F)*h/s,c.xSpike=a.c2p(F.pos,!0),c}function r(c,i,u,f){var s=c.cd,h=c.ya,p=s[0].trace,a=s[0].t,x=[],l=o(c,i,u,f);if(!l)return[];var w=s[l.index].hi||p.hoverinfo,_=w.split("+");if(!(w==="all"||_.indexOf("y")!==-1))return[];for(var T=["high","open","close","low"],k={},L=0;L<T.length;L++){var A,I=T[L],P=p[I][l.index],S=h.c2p(P,!0);P in k?(A=k[P]).yLabel+="<br>"+a.labels[I]+g.hoverLabelText(h,P,p.yhoverformat):((A=m.extendFlat({},l)).y0=A.y1=S,A.yLabelVal=P,A.yLabel=a.labels[I]+g.hoverLabelText(h,P,p.yhoverformat),A.name="",x.push(A),k[P]=A)}return x}function d(c,i,u,f){var s=c.cd,h=c.ya,p=s[0].trace,a=s[0].t,x=o(c,i,u,f);if(!x)return[];var l=s[x.index],w=x.index=l.i,_=l.dir;function T(E){return a.labels[E]+g.hoverLabelText(h,p[E][w],p.yhoverformat)}var k=l.hi||p.hoverinfo,L=k.split("+"),A=k==="all",I=A||L.indexOf("y")!==-1,P=A||L.indexOf("text")!==-1,S=I?[T("open"),T("high"),T("low"),T("close")+"  "+t[_]]:[];return P&&e(l,p,S),x.extraText=S.join("<br>"),x.y0=x.y1=h.c2p(l.yc,!0),[x]}ee.exports={hoverPoints:function(c,i,u,f){return c.cd[0].trace.hoverlabel.split?r(c,i,u,f):d(c,i,u,f)},hoverSplit:r,hoverOnPoints:d}},{"../../components/color":366,"../../components/fx":406,"../../constants/delta.js":473,"../../lib":503,"../../plots/cartesian/axes":554}],876:[function(y,ee,te){ee.exports={moduleType:"trace",name:"ohlc",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc").calc,plot:y("./plot"),style:y("./style"),hoverPoints:y("./hover").hoverPoints,selectPoints:y("./select")}},{"../../plots/cartesian":568,"./attributes":872,"./calc":873,"./defaults":874,"./hover":875,"./plot":878,"./select":879,"./style":880}],877:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib");ee.exports=function(b,v,e,n){var t=e("x"),o=e("open"),r=e("high"),d=e("low"),c=e("close");if(e("hoverlabel.split"),g.getComponentMethod("calendars","handleTraceDefaults")(b,v,["x"],n),o&&r&&d&&c){var i=Math.min(o.length,r.length,d.length,c.length);return t&&(i=Math.min(i,m.minRowLength(t))),v._length=i,i}}},{"../../lib":503,"../../registry":638}],878:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib");ee.exports=function(b,v,e,n){var t=v.yaxis,o=v.xaxis,r=!!o.rangebreaks;m.makeTraceGroups(n,e,"trace ohlc").each(function(d){var c=g.select(this),i=d[0],u=i.t;if(i.trace.visible!==!0||u.empty)c.remove();else{var f=u.tickLen,s=c.selectAll("path").data(m.identity);s.enter().append("path"),s.exit().remove(),s.attr("d",function(h){if(h.empty)return"M0,0Z";var p=o.c2p(h.pos-f,!0),a=o.c2p(h.pos+f,!0),x=r?(p+a)/2:o.c2p(h.pos,!0);return"M"+p+","+t.c2p(h.o,!0)+"H"+x+"M"+x+","+t.c2p(h.h,!0)+"V"+t.c2p(h.l,!0)+"M"+a+","+t.c2p(h.c,!0)+"H"+x})}})}},{"../../lib":503,"@plotly/d3":58}],879:[function(y,ee,te){ee.exports=function(g,m){var b,v=g.cd,e=g.xaxis,n=g.yaxis,t=[],o=v[0].t.bPos||0;if(m===!1)for(b=0;b<v.length;b++)v[b].selected=0;else for(b=0;b<v.length;b++){var r=v[b];m.contains([e.c2p(r.pos+o),n.c2p(r.yc)],null,r.i,g)?(t.push({pointNumber:r.i,x:e.c2d(r.pos),y:n.c2d(r.yc)}),r.selected=1):r.selected=0}return t}},{}],880:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/drawing"),b=y("../../components/color");ee.exports=function(v,e,n){var t=n||g.select(v).selectAll("g.ohlclayer").selectAll("g.trace");t.style("opacity",function(o){return o[0].trace.opacity}),t.each(function(o){var r=o[0].trace;g.select(this).selectAll("path").each(function(d){if(!d.empty){var c=r[d.dir].line;g.select(this).style("fill","none").call(b.stroke,c.color).call(m.dashLine,c.dash,c.width).style("opacity",r.selectedpoints&&!d.selected?.3:1)}})})}},{"../../components/color":366,"../../components/drawing":388,"@plotly/d3":58}],881:[function(y,ee,te){var g=y("../../lib/extend").extendFlat,m=y("../../plots/attributes"),b=y("../../plots/font_attributes"),v=y("../../components/colorscale/attributes"),e=y("../../plots/template_attributes").hovertemplateAttrs,n=y("../../plots/domain").attributes,t=g({editType:"calc"},v("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});ee.exports={domain:n({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:g({},m.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:b({editType:"calc"}),tickfont:b({editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category desce
1221nding","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:t,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],882:[function(y,ee,te){var g=y("../../plots/get_data").getModuleCalcData,m=y("./plot");te.name="parcats",te.plot=function(b,v,e,n){var t=g(b.calcdata,"parcats");if(t.length){var o=t[0];m(b,o,e,n)}},te.clean=function(b,v,e,n){var t=n._has&&n._has("parcats"),o=v._has&&v._has("parcats");t&&!o&&n._paperdiv.selectAll(".parcats").remove()}},{"../../plots/get_data":593,"./plot":887}],883:[function(y,ee,te){var g=y("../../lib/gup").wrap,m=y("../../components/colorscale/helpers").hasColorscale,b=y("../../components/colorscale/calc"),v=y("../../lib/filter_unique.js"),e=y("../../components/drawing"),n=y("../../lib"),t=y("fast-isnumeric");function o(c,i,u){c.valueInds.push(i),c.count+=u}function r(c,i,u){return{categoryInds:c,color:i,rawColor:u,valueInds:[],count:0}}function d(c,i,u){c.valueInds.push(i),c.count+=u}ee.exports=function(c,i){var u=n.filterVisible(i.dimensions);if(u.length===0)return[];var f,s,h,p=u.map(function(W){var $;if(W.categoryorder==="trace")$=null;else if(W.categoryorder==="array")$=W.categoryarray;else{$=v(W.values);for(var R=!0,N=0;N<$.length;N++)if(!t($[N])){R=!1;break}$.sort(R?n.sorterAsc:void 0),W.categoryorder==="category descending"&&($=$.reverse())}return function(U,Q){Q=Q==null?[]:Q.map(function(pe){return pe});var j={},X={},J=[];Q.forEach(function(pe,ce){j[pe]=0,X[pe]=ce});for(var re=0;re<U.length;re++){var ne,se=U[re];j[se]===void 0?(j[se]=1,ne=Q.push(se)-1,X[se]=ne):(j[se]++,ne=X[se]),J.push(ne)}var oe=Q.map(function(pe){return j[pe]});return{uniqueValues:Q,uniqueCounts:oe,inds:J}}(W.values,$)});f=n.isArrayOrTypedArray(i.counts)?i.counts:[i.counts],function(W){var $;if(function(R){for(var N=new Array(R.length),U=0;U<R.length;U++){if(R[U]<0||R[U]>=R.length||N[R[U]]!==void 0)return!1;N[R[U]]=!0}return!0}(W.map(function(R){return R.displayindex})))for($=0;$<W.length;$++)W[$]._displayindex=W[$].displayindex;else for($=0;$<W.length;$++)W[$]._displayindex=$}(u),u.forEach(function(W,$){(function(R,N){R._categoryarray=N.uniqueValues,R.ticktext===null||R.ticktext===void 0?R._ticktext=[]:R._ticktext=R.ticktext.slice();for(var U=R._ticktext.length;U<N.uniqueValues.length;U++)R._ticktext.push(N.uniqueValues[U])})(W,p[$])});var a,x=i.line;x?(m(i,"line")&&b(c,i,{vals:i.line.color,containerStr:"line",cLetter:"c"}),a=e.tryColorscale(x)):a=n.identity;var l,w,_,T,k,L=u[0].values.length,A={},I=p.map(function(W){return W.inds});for(h=0,l=0;l<L;l++){var P=[];for(w=0;w<I.length;w++)P.push(I[w][l]);s=f[l%f.length],h+=s;var S=(_=l,T=void 0,k=void 0,n.isArrayOrTypedArray(x.color)?k=T=x.color[_%x.color.length]:T=x.color,{color:a(T),rawColor:k}),E=P+"-"+S.rawColor;A[E]===void 0&&(A[E]=r(P,S.color,S.rawColor)),d(A[E],l,s)}var D,F=u.map(function(W,$){return function(R,N,U,Q,j){return{dimensionInd:R,containerInd:N,displayInd:U,dimensionLabel:Q,count:j,categories:[],dragX:null}}($,W._index,W._displayindex,W.label,h)});for(l=0;l<L;l++)for(s=f[l%f.length],w=0;w<F.length;w++){var H=F[w].containerInd,V=p[w].inds[l],Z=F[w].categories;if(Z[V]===void 0){var K=i.dimensions[H]._categoryarray[V],q=i.dimensions[H]._ticktext[V];Z[V]={dimensionInd:w,categoryInd:D=V,categoryValue:K,displayInd:D,categoryLabel:q,valueInds:[],count:0,dragY:null}}o(Z[V],l,s)}return g(function(W,$,R){var N=W.map(function(U){return U.categories.length}).reduce(function(U,Q){return Math.max(U,Q)});return{dimensions:W,paths:$,trace:void 0,maxCats:N,count:R}}(F,A,h))}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"../../components/drawing":388,"../../lib":503,"../../lib/filter_unique.js":494,"../../lib/gup":500,"fast-isnumeric":190}],884:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/colorscale/helpers").hasColorscale,b=y("../../components/colorscale/defaults"),v=y("../../plots/domain").defaults,e=y("../../plots/array_container_defaults"),n=y("./attributes"),t=y("../parcoords/merge_length");function o(r,d){function c(a,x){return g.coerce(r,d,n.dimensions,a,x)}var i=c("values"),u=c("visible");if(i&&i.length||(u=d.visible=!1),u){c("label"),c("displayindex",d._index);var f,s=r.categoryarray,h=Array.isArray(s)&&s.length>0;h&&(f="array");var p=c("categoryorder",f);p==="array"?(c("categoryarray"),c("ticktext")):(delete r.categoryarray,delete r.ticktext),h||p!=="array"||(d.categoryorder="trace")}}ee.exports=function(r,d,c,i){function u(a,x){return g.coerce(r,d,n,a,x)}var f=e(r,d,{name:"dimensions",handleItemDefaults:o}),s=function(a,x,l,w,_){_("line.shape"),_("line.hovertemplate");var T=_("line.color",w.colorway[0]);if(m(a,"line")&&g.isArrayOrTypedArray(T)){if(T.length)return _("line.colorscale"),b(a,x,w,_,{prefix:"line.",cLetter:"c"}),T.length;x.line.color=l}return 1/0}(r,d,c,i,u);v(d,i,u),Array.isArray(f)&&f.length||(d.visible=!1),t(d,f,"values",s),u("hoveron"),u("hovertemplate"),u("arrangement"),u("bundlecolors"),u("sortpaths"),u("counts");var h={family:i.font.family,size:Math.round(i.font.size),color:i.font.color};g.coerceFont(u,"labelfont",h);var p={family:i.font.family,size:Math.round(i.font.size/1.2),color:i.font.color};g.coerceFont(u,"tickfont",p)}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/domain":584,"../parcoords/merge_length":897,"./attributes":881}],885:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc"),plot:y("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:y("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":881,"./base_plot":882,"./calc":883,"./defaults":884,"./plot":887}],886:[function(y,ee,te){var g=y("@plotly/d3"),m=y("d3-interpolate").interpolateNumber,b=y("../../plot_api/plot_api"),v=y("../../components/fx"),e=y("../../lib"),n=e.strTranslate,t=y("../../components/drawing"),o=y("tinycolor2"),r=y("../../lib/svg_text_utils");function d(R,N,U,Q){var j=R.map(Z.bind(0,N,U)),X=Q.selectAll("g.parcatslayer").data([null]);X.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var J=X.selectAll("g.trace.parcats").data(j,c),re=J.enter().append("g").attr("class","trace parcats");
1221J.attr("transform",function(be){return n(be.x,be.y)}),re.append("g").attr("class","paths");var ne=J.select("g.paths").selectAll("path.path").data(function(be){return be.paths},c);ne.attr("fill",function(be){return be.model.color});var se=ne.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(be){return be.model.color}).attr("fill-opacity",0);x(se),ne.attr("d",function(be){return be.svgD}),se.empty()||ne.sort(u),ne.exit().remove(),ne.on("mouseover",f).on("mouseout",s).on("click",a),re.append("g").attr("class","dimensions");var oe=J.select("g.dimensions").selectAll("g.dimension").data(function(be){return be.dimensions},c);oe.enter().append("g").attr("class","dimension"),oe.attr("transform",function(be){return n(be.x,0)}),oe.exit().remove();var pe=oe.selectAll("g.category").data(function(be){return be.categories},c),ce=pe.enter().append("g").attr("class","category");pe.attr("transform",function(be){return n(0,be.y)}),ce.append("rect").attr("class","catrect").attr("pointer-events","none"),pe.select("rect.catrect").attr("fill","none").attr("width",function(be){return be.width}).attr("height",function(be){return be.height}),w(ce);var de=pe.selectAll("rect.bandrect").data(function(be){return be.bands},c);de.each(function(){e.raiseToTop(this)}),de.attr("fill",function(be){return be.color});var xe=de.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(be){return be.color}).attr("fill-opacity",0);de.attr("fill",function(be){return be.color}).attr("width",function(be){return be.width}).attr("height",function(be){return be.height}).attr("y",function(be){return be.y}).attr("cursor",function(be){return be.parcatsViewModel.arrangement==="fixed"?"default":be.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),_(xe),de.exit().remove(),ce.append("text").attr("class","catlabel").attr("pointer-events","none");var we=N._fullLayout.paper_bgcolor;pe.select("text.catlabel").attr("text-anchor",function(be){return i(be)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",r.makeTextShadow(we)).style("fill","rgb(0, 0, 0)").attr("x",function(be){return i(be)?be.width+5:-5}).attr("y",function(be){return be.height/2}).text(function(be){return be.model.categoryLabel}).each(function(be){t.font(g.select(this),be.parcatsViewModel.categorylabelfont),r.convertToTspans(g.select(this),N)}),ce.append("text").attr("class","dimlabel"),pe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(be){return be.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(be){return be.width/2}).attr("y",-5).text(function(be,Ee){return Ee===0?be.parcatsViewModel.model.dimensions[be.model.dimensionInd].dimensionLabel:null}).each(function(be){t.font(g.select(this),be.parcatsViewModel.labelfont)}),pe.selectAll("rect.bandrect").on("mouseover",I).on("mouseout",P),pe.exit().remove(),oe.call(g.behavior.drag().origin(function(be){return{x:be.x,y:0}}).on("dragstart",S).on("drag",E).on("dragend",D)),J.each(function(be){be.traceSelection=g.select(this),be.pathSelection=g.select(this).selectAll("g.paths").selectAll("path.path"),be.dimensionSelection=g.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),J.exit().remove()}function c(R){return R.key}function i(R){var N=R.parcatsViewModel.dimensions.length,U=R.parcatsViewModel.dimensions[N-1].model.dimensionInd;return R.model.dimensionInd===U}function u(R,N){return R.model.rawColor>N.model.rawColor?1:R.model.rawColor<N.model.rawColor?-1:0}function f(R){if(!R.parcatsViewModel.dragDimension&&R.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),l(g.select(this));var N=h(R),U=p(R);if(R.parcatsViewModel.graphDiv.emit("plotly_hover",{points:N,event:g.event,constraints:U}),R.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var Q,j,X,J=g.mouse(this)[0],re=R.parcatsViewModel.graphDiv,ne=R.parcatsViewModel.trace,se=re._fullLayout,oe=se._paperdiv.node().getBoundingClientRect(),pe=R.parcatsViewModel.graphDiv.getBoundingClientRect();for(X=0;X<R.leftXs.length-1;X++)if(R.leftXs[X]+R.dimWidths[X]-2<=J&&J<=R.leftXs[X+1]+2){var ce=R.parcatsViewModel.dimensions[X],de=R.parcatsViewModel.dimensions[X+1];
1221Q=(ce.x+ce.width+de.x)/2,j=(R.topYs[X]+R.topYs[X+1]+R.height)/2;break}var xe=R.parcatsViewModel.x+Q,we=R.parcatsViewModel.y+j,be=o.mostReadable(R.model.color,["black","white"]),Ee=R.model.count,fe=Ee/R.parcatsViewModel.model.count,me={countLabel:Ee,probabilityLabel:fe.toFixed(3)},Te=[];R.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Te.push(["Count:",me.countLabel].join(" ")),R.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Te.push(["P:",me.probabilityLabel].join(" "));var _e=Te.join("<br>"),Ae=g.mouse(re)[0];v.loneHover({trace:ne,x:xe-oe.left+pe.left,y:we-oe.top+pe.top,text:_e,color:R.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:be,idealAlign:Ae<xe?"right":"left",hovertemplate:(ne.line||{}).hovertemplate,hovertemplateLabels:me,eventData:[{data:ne._input,fullData:ne,count:Ee,probability:fe}]},{container:se._hoverlayer.node(),outerContainer:se._paper.node(),gd:re})}}}function s(R){if(!R.parcatsViewModel.dragDimension&&(x(g.select(this)),v.loneUnhover(R.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),R.parcatsViewModel.pathSelection.sort(u),R.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var N=h(R),U=p(R);R.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:N,event:g.event,constraints:U})}}function h(R){for(var N=[],U=F(R.parcatsViewModel),Q=0;Q<R.model.valueInds.length;Q++){var j=R.model.valueInds[Q];N.push({curveNumber:U,pointNumber:j})}return N}function p(R){for(var N={},U=R.parcatsViewModel.model.dimensions,Q=0;Q<U.length;Q++){var j=U[Q],X=j.categories[R.model.categoryInds[Q]];N[j.containerInd]=X.categoryValue}return R.model.rawColor!==void 0&&(N.color=R.model.rawColor),N}function a(R){if(R.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var N=h(R),U=p(R);R.parcatsViewModel.graphDiv.emit("plotly_click",{points:N,event:g.event,constraints:U})}}function x(R){R.attr("fill",function(N){return N.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function l(R){R.attr("fill-opacity",.8).attr("stroke",function(N){return o.mostReadable(N.model.color,["black","white"])}).attr("stroke-width",.3)}function w(R){R.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function _(R){R.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function T(R){var N=R.parcatsViewModel.pathSelection,U=R.categoryViewModel.model.dimensionInd,Q=R.categoryViewModel.model.categoryInd;return N.filter(function(j){return j.model.categoryInds[U]===Q&&j.model.color===R.color})}function k(R,N,U){var Q=g.select(R).datum(),j=Q.categoryViewModel.model,X=Q.parcatsViewModel.graphDiv,J=g.select(R.parentNode).selectAll("rect.bandrect"),re=[];J.each(function(se){T(se).each(function(oe){Array.prototype.push.apply(re,h(oe))})});var ne={};ne[j.dimensionInd]=j.categoryValue,X.emit(N,{points:re,event:U,constraints:ne})}function L(R,N,U){var Q=g.select(R).datum(),j=Q.categoryViewModel.model,X=Q.parcatsViewModel.graphDiv,J=T(Q),re=[];J.each(function(se){Array.prototype.push.apply(re,h(se))});var ne={};ne[j.dimensionInd]=j.categoryValue,Q.rawColor!==void 0&&(ne.color=Q.rawColor),X.emit(N,{points:re,event:U,constraints:ne})}function A(R,N,U){R._fullLayout._calcInverseTransform(R);var Q,j,X=R._fullLayout._invScaleX,J=R._fullLayout._invScaleY,re=g.select(U.parentNode).select("rect.catrect"),ne=re.node().getBoundingClientRect(),se=re.datum(),oe=se.parcatsViewModel,pe=oe.model.dimensions[se.model.dimensionInd],ce=oe.trace,de=ne.top+ne.height/2;oe.dimensions.length>1&&pe.displayInd===oe.dimensions.length-1?(Q=ne.left,j="left"):(Q=ne.left+ne.width,j="right");var xe=se.model.count,we=se.model.categoryLabel,be=xe/se.parcatsViewModel.model.count,Ee={countLabel:xe,categoryLabel:we,probabilityLabel:be.toFixed(3)},fe=[];se.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&fe.push(["Count:",Ee.countLabel].join(" ")),se.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&fe.push(["P("+Ee.categoryLabel+"):",Ee.probabilityLabel].join(" "));var me=fe.join("<br>");return{trace:ce,x:X*(Q-N.left),y:J*(de-N.top),text:me,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:j,hovertemplate:ce.hovertemplate,hovertemplateLabels:Ee,eventData:[{data:ce._input,fullData:ce,count:xe,category:we,probability:be}]}}
1221function I(R){if(!R.parcatsViewModel.dragDimension&&R.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){if(g.mouse(this)[1]<-1)return;var N,U=R.parcatsViewModel.graphDiv,Q=U._fullLayout,j=Q._paperdiv.node().getBoundingClientRect(),X=R.parcatsViewModel.hoveron;X==="color"?(function(J){var re=g.select(J).datum(),ne=T(re);l(ne),ne.each(function(){e.raiseToTop(this)}),g.select(J.parentNode).selectAll("rect.bandrect").filter(function(se){return se.color===re.color}).each(function(){e.raiseToTop(this),g.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(this),L(this,"plotly_hover",g.event)):(function(J){g.select(J.parentNode).selectAll("rect.bandrect").each(function(re){var ne=T(re);l(ne),ne.each(function(){e.raiseToTop(this)})}),g.select(J.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),k(this,"plotly_hover",g.event)),R.parcatsViewModel.hoverinfoItems.indexOf("none")===-1&&(X==="category"?N=A(U,j,this):X==="color"?N=function(J,re,ne){J._fullLayout._calcInverseTransform(J);var se,oe,pe=J._fullLayout._invScaleX,ce=J._fullLayout._invScaleY,de=ne.getBoundingClientRect(),xe=g.select(ne).datum(),we=xe.categoryViewModel,be=we.parcatsViewModel,Ee=be.model.dimensions[we.model.dimensionInd],fe=be.trace,me=de.y+de.height/2;be.dimensions.length>1&&Ee.displayInd===be.dimensions.length-1?(se=de.left,oe="left"):(se=de.left+de.width,oe="right");var Te=we.model.categoryLabel,_e=xe.parcatsViewModel.model.count,Ae=0;xe.categoryViewModel.bands.forEach(function(lt){lt.color===xe.color&&(Ae+=lt.count)});var Pe=we.model.count,De=0;be.pathSelection.each(function(lt){lt.model.color===xe.color&&(De+=lt.model.count)});var Ve=Ae/_e,Qe=Ae/De,Oe=Ae/Pe,Ue={countLabel:_e,categoryLabel:Te,probabilityLabel:Ve.toFixed(3)},Ge=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ge.push(["Count:",Ue.countLabel].join(" ")),we.parc
1221atsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ge.push("P(color ∩ "+Te+"): "+Ue.probabilityLabel),Ge.push("P("+Te+" | color): "+Qe.toFixed(3)),Ge.push("P(color | "+Te+"): "+Oe.toFixed(3)));var Ye=Ge.join("<br>"),tt=o.mostReadable(xe.color,["black","white"]);return{trace:fe,x:pe*(se-re.left),y:ce*(me-re.top),text:Ye,color:xe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:tt,fontSize:10,idealAlign:oe,hovertemplate:fe.hovertemplate,hovertemplateLabels:Ue,eventData:[{data:fe._input,fullData:fe,category:Te,count:_e,probability:Ve,categorycount:Pe,colorcount:De,bandcolorcount:Ae}]}}(U,j,this):X==="dimension"&&(N=function(J,re,ne){var se=[];return g.select(ne.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){se.push(A(J,re,this))}),se}(U,j,this)),N&&v.loneHover(N,{container:Q._hoverlayer.node(),outerContainer:Q._paper.node(),gd:U}))}}function P(R){var N=R.parcatsViewModel;!N.dragDimension&&(x(N.pathSelection),w(N.dimensionSelection.selectAll("g.category")),_(N.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),v.loneUnhover(N.graphDiv._fullLayout._hoverlayer.node()),N.pathSelection.sort(u),N.hoverinfoItems.indexOf("skip")===-1)&&(R.parcatsViewModel.hoveron==="color"?L(this,"plotly_unhover",g.event):k(this,"plotly_unhover",g.event))}function S(R){R.parcatsViewModel.arrangement!=="fixed"&&(R.dragDimensionDisplayInd=R.model.displayInd,R.initialDragDimensionDisplayInds=R.parcatsViewModel.model.dimensions.map(function(N){return N.displayInd}),R.dragHasMoved=!1,R.dragCategoryDisplayInd=null,g.select(this).selectAll("g.category").select("rect.catrect").each(function(N){var U=g.mouse(this)[0],Q=g.mouse(this)[1];-2<=U&&U<=N.width+2&&-2<=Q&&Q<=N.height+2&&(R.dragCategoryDisplayInd=N.model.displayInd,R.initialDragCategoryDisplayInds=R.model.categories.map(function(j){return j.displayInd}),N.model.dragY=N.y,e.raiseToTop(this.parentNode),g.select(this.parentNode).selectAll("rect.bandrect").each(function(j){j.y<Q&&Q<=j.y+j.height&&(R.potentialClickBand=this)}))}),R.parcatsViewModel.dragDimension=R,v.loneUnhover(R.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function E(R){if(R.parcatsViewModel.arrangement!=="fixed"&&(R.dragHasMoved=!0,R.dragDimensionDisplayInd!==null)){var N=R.dragDimensionDisplayInd,U=N-1,Q=N+1,j=R.parcatsViewModel.dimensions[N];if(R.dragCategoryDisplayInd!==null){var X=j.categories[R.dragCategoryDisplayInd];X.model.dragY+=g.event.dy;var J=X.model.dragY,re=X.model.displayInd,ne=j.categories,se=ne[re-1],oe=ne[re+1];se!==void 0&&J<se.y+se.height/2&&(X.model.displayInd=se.model.displayInd,se.model.displayInd=re),oe!==void 0&&J+X.height>oe.y+oe.height/2&&(X.model.displayInd=oe.model.displayInd,oe.model.displayInd=re),R.dragCategoryDisplayInd=X.model.displayInd}if(R.dragCategoryDisplayInd===null||R.parcatsViewModel.arrangement==="freeform"){j.model.dragX=g.event.x;var pe=R.parcatsViewModel.dimensions[U],ce=R.parcatsViewModel.dimensions[Q];pe!==void 0&&j.model.dragX<pe.x+pe.width&&(j.model.displayInd=pe.model.displayInd,pe.model.displayInd=N),ce!==void 0&&j.model.dragX+j.width>ce.x&&(j.model.displayInd=ce.model.displayInd,ce.model.displayInd=R.dragDimensionDisplayInd),R.dragDimensionDisplayInd=j.model.displayInd}W(R.parcatsViewModel),q(R.parcatsViewModel),V(R.parcatsViewModel),H(R.parcatsViewModel)}}function D(R){if(R.parcatsViewModel.arrangement!=="fixed"&&R.dragDimensionDisplayInd!==null){g.select(this).selectAll("text").attr("font-weight","normal");var N={},U=F(R.parcatsViewModel),Q=R.parcatsViewModel.model.dimensions.map(function(oe){return oe.displayInd}),j=R.initialDragDimensionDisplayInds.some(function(oe,pe){return oe!==Q[pe]});j&&Q.forEach(function(oe,pe){var ce=R.parcatsViewModel.model.dimensions[pe].containerInd;N["dimensions["+ce+"].displayindex"]=oe});var X=!1;if(R.dragCategoryDisplayInd!==null){var J=R.model.categories.map(function(oe){return oe.displayInd});if(X=R.initialDragCategoryDisplayInds.some(function(oe,pe){return oe!==J[pe]})){var re=R.model.categories.slice().sort(function(oe,pe){return oe.displayInd-pe.dis
1221playInd}),ne=re.map(function(oe){return oe.categoryValue}),se=re.map(function(oe){return oe.categoryLabel});N["dimensions["+R.model.containerInd+"].categoryarray"]=[ne],N["dimensions["+R.model.containerInd+"].ticktext"]=[se],N["dimensions["+R.model.containerInd+"].categoryorder"]="array"}}R.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!R.dragHasMoved&&R.potentialClickBand&&(R.parcatsViewModel.hoveron==="color"?L(R.potentialClickBand,"plotly_click",g.event.sourceEvent):k(R.potentialClickBand,"plotly_click",g.event.sourceEvent)),R.model.dragX=null,R.dragCategoryDisplayInd!==null&&(R.parcatsViewModel.dimensions[R.dragDimensionDisplayInd].categories[R.dragCategoryDisplayInd].model.dragY=null,R.dragCategoryDisplayInd=null),R.dragDimensionDisplayInd=null,R.parcatsViewModel.dragDimension=null,R.dragHasMoved=null,R.potentialClickBand=null,W(R.parcatsViewModel),q(R.parcatsViewModel),g.transition().duration(300).ease("cubic-in-out").each(function(){V(R.parcatsViewModel,!0),H(R.parcatsViewModel,!0)}).each("end",function(){(j||X)&&b.restyle(R.parcatsViewModel.graphDiv,N,[U])})}}function F(R){for(var N,U=R.graphDiv._fullData,Q=0;Q<U.length;Q++)if(R.key===U[Q].uid){N=Q;break}return N}function H(R,N){var U;N===void 0&&(N=!1),R.pathSelection.data(function(Q){return Q.paths},c),(U=R.pathSelection,N?U.transition():U).attr("d",function(Q){return Q.svgD})}function V(R,N){function U(J){return N?J.transition():J}N===void 0&&(N=!1),R.dimensionSelection.data(function(J){return J.dimensions},c);var Q=R.dimensionSelection.selectAll("g.category").data(function(J){return J.categories},c);U(R.dimensionSelection).attr("transform",function(J){return n(J.x,0)}),U(Q).attr("transform",function(J){return n(0,J.y)}),Q.select(".dimlabel").text(function(J,re){return re===0?J.parcatsViewModel.model.dimensions[J.model.dimensionInd].dimensionLabel:null}),Q.select(".catlabel").attr("text-anchor",function(J){return i(J)?"start":"end"}).attr("x",function(J){return i(J)?J.width+5:-5}).each(function(J){var re,ne;i(J)?(re=J.width+5,ne="start"):(re=-5,ne="end"),g.select(this).selectAll("tspan").attr("x",re).attr("text-anchor",ne)});var j=Q.selectAll("rect.bandrect").data(function(J){return J.bands},c),X=j.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(J){return J.color}).attr("fill-opacity",0);j.attr("fill",function(J){return J.color}).attr("width",function(J){return J.width}).attr("height",function(J){return J.height}).attr("y",function(J){return J.y}),_(X),j.each(function(){e.raiseToTop(this)}),j.exit().remove()}function Z(R,N,U){var Q,j=U[0],X=N.margin||{l:80,r:80,t:100,b:80},J=j.trace,re=J.domain,ne=N.width,se=N.height,oe=Math.floor(ne*(re.x[1]-re.x[0])),pe=Math.floor(se*(re.y[1]-re.y[0])),ce=re.x[0]*ne+X.l,de=N.height-re.y[1]*N.height+X.t,xe=J.line.shape;Q=J.hoverinfo==="all"?["count","probability"]:(J.hoverinfo||"").split("+");var we={trace:J,key:J.uid,model:j,x:ce,y:de,width:oe,height:pe,hoveron:J.hoveron,hoverinfoItems:Q,arrangement:J.arrangement,bundlecolors:J.bundlecolors,sortpaths:J.sortpaths,labelfont:J.labelfont,categorylabelfont:J.tickfont,pathShape:xe,dragDimension:null,margin:X,paths:[],dimensions:[],graphDiv:R,traceSelection:null,pathSelection:null,dimensionSelection:null};return j.dimensions&&(W(we),q(we)),we}function K(R,N,U,Q,j){var X,J,re=[],ne=[];for(J=0;J<U.length-1;J++)X=m(U[J]+R[J],R[J+1]),re.push(X(j)),ne.push(X(1-j));var se="M "+R[0]+","+N[0];for(se+="l"+U[0]+",0 ",J=1;J<U.length;J++)se+="C"+re[J-1]+","+N[J-1]+" "+ne[J-1]+","+N[J]+" "+R[J]+","+N[J],se+="l"+U[J]+",0 ";for(se+="l0,"+Q+" ",se+="l -"+U[U.length-1]+",0 ",J=U.length-2;J>=0;J--)se+="C"+ne[J]+","+(N[J+1]+Q)+" "+re[J]+","+(N[J]+Q)+" "+(R[J]+U[J])+","+(N[J]+Q),se+="l-"+U[J]+",0 ";return se+="Z"}function q(R){var N=R.dimensions,U=R.model,Q=N.map(function(Ge){return Ge.categories.map(function(Ye){return Ye.y})}),j=R.model.dimensions.map(function(Ge){return Ge.categories.map(function(Ye){return Ye.displayInd})}),X=R.model.dimensions.map(function(Ge){return Ge.displayInd}),J=R.dimensions.map(function(Ge){return Ge.model.dimensionInd}),re=N.map(function(Ge){return Ge.x}),ne=N.map(function(Ge){return Ge.width}),se=[];for(var oe in U.paths)U.paths.hasOwnProperty(oe)&&se.push(U.paths[oe]);function pe(Ge){var Ye=Ge.categoryInds.map(function(tt,lt){return j[lt][tt]});return J.map(function(tt){return Ye[tt]})}se.sort(function(Ge,Ye){var tt=pe(Ge),lt=pe(Ye);return R.sortpaths==="backward"&&(tt.reverse(),lt.reverse()),tt.push(Ge.valueInds[0]),lt.push(Ye.valueInds[0]),R.bundlecolors&&(tt.unshift(Ge.rawColor),lt.unshift(Ye.rawColor)),tt<lt?-1:tt>lt?1:0});for(var ce=new Array(se.length),de=N[0].model.count,xe=N[0].categories.map(function(Ge){return Ge.height}).reduce(function(Ge,Ye){return Ge+Ye}),we=0;we<se.length;we++){var be,Ee=se[we];be=de>0?xe*(Ee.count/de):0;for(var fe,me=new Array(Q.length),Te=0;Te<Ee.categoryInds.length;Te++){var _e=Ee.categoryInds[Te],Ae=j[Te][_e],Pe=X[Te];me[Pe]=Q[Pe][Ae],Q[Pe][Ae]+=be;
1221var De=R.dimensions[Pe].categories[Ae],Ve=De.bands.length,Qe=De.bands[Ve-1];if(Qe===void 0||Ee.rawColor!==Qe.rawColor){var Oe=Qe===void 0?0:Qe.y+Qe.height;De.bands.push({key:Oe,color:Ee.color,rawColor:Ee.rawColor,height:be,width:De.width,count:Ee.count,y:Oe,categoryViewModel:De,parcatsViewModel:R})}else{var Ue=De.bands[Ve-1];Ue.height+=be,Ue.count+=Ee.count}}fe=R.pathShape==="hspline"?K(re,me,ne,be,.5):K(re,me,ne,be,0),ce[we]={key:Ee.valueInds[0],model:Ee,height:be,leftXs:re,topYs:me,dimWidths:ne,svgD:fe,parcatsViewModel:R}}R.paths=ce}function W(R){var N=R.model.dimensions.map(function(J){return{displayInd:J.displayInd,dimensionInd:J.dimensionInd}});N.sort(function(J,re){return J.displayInd-re.displayInd});var U=[];for(var Q in N){var j=N[Q].dimensionInd,X=R.model.dimensions[j];U.push($(R,X))}R.dimensions=U}function $(R,N){var U,Q=R.model.dimensions.length,j=N.displayInd;U=40+(Q>1?(R.width-80-16)/(Q-1):0)*j;var X,J,re,ne,se,oe=[],pe=R.model.maxCats,ce=N.categories.length,de=N.count,xe=R.height-8*(pe-1),we=8*(pe-ce)/2,be=N.categories.map(function(Ee){return{displayInd:Ee.displayInd,categoryInd:Ee.categoryInd}});for(be.sort(function(Ee,fe){return Ee.displayInd-fe.displayInd}),se=0;se<ce;se++)ne=be[se].categoryInd,J=N.categories[ne],X=de>0?J.count/de*xe:0,re={key:J.valueInds[0],model:J,width:16,height:X,y:J.dragY!==null?J.dragY:we,bands:[],parcatsViewModel:R},we=we+X+8,oe.push(re);return{key:N.dimensionInd,x:N.dragX!==null?N.dragX:U,y:0,width:16,model:N,categories:oe,parcatsViewModel:R,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}ee.exports=function(R,N,U,Q){d(U,R,Q,N)}},{"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/svg_text_utils":529,"../../plot_api/plot_api":540,"@plotly/d3":58,"d3-interpolate":116,tinycolor2:312}],887:[function(y,ee,te){var g=y("./parcats");ee.exports=function(m,b,v,e){var n=m._fullLayout,t=n._paper,o=n._size;g(m,t,b,{width:o.w,height:o.h,margin:{t:o.t,r:o.r,b:o.b,l:o.l}},v,e)}},{"./parcats":886}],888:[function(y,ee,te){var g=y("../../components/colorscale/attributes"),m=y("../../plots/cartesian/layout_attributes"),b=y("../../plots/font_attributes"),v=y("../../plots/domain").attributes,e=y("../../lib/extend").extendFlat,n=y("../../plot_api/plot_template").templatedArray;ee.exports={domain:v({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:b({editType:"plot"}),tickfont:b({editType:"plot"}),rangefont:b({editType:"plot"}),dimensions:n("dimension",{label:{valType:"string",editType:"plot"},tickvals:e({},m.tickvals,{editType:"plot"}),ticktext:e({},m.ticktext,{editType:"plot"}),tickformat:e({},m.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:e({editType:"calc"},g("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"}))}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/layout_attributes":569,"../../plots/domain":584,"../../plots/font_attributes":585}],889:[function(y,ee,te){var g=y("./constants"),m=y("@plotly/d3"),b=y("../../lib/gup").keyFun,v=y("../../lib/gup").repeat,e=y("../../lib").sorterAsc,n=y("../../lib").strTranslate,t=g.bar.snapRatio;function o(A,I){return A*(1-t)+I*t}var r=g.bar.snapClose;function d(A,I){return A*(1-r)+I*r}function c(A,I,P,S){if(function($,R){for(var N=0;N<R.length;N++)if($>=R[N][0]&&$<=R[N][1])return!0;return!1}(P,S))return P;var E=A?-1:1,D=0,F=I.length-1;if(E<0){var H=D;D=F,F=H}for(var V=I[D],Z=V,K=D;E*K<E*F;K+=E){var q=K+E,W=I[q];
1221if(E*P<E*d(V,W))return o(V,Z);if(E*P<E*W||q===F)return o(W,V);Z=V,V=W}}function i(A){A.attr("x",-g.bar.captureWidth/2).attr("width",g.bar.captureWidth)}function u(A){A.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function f(A){if(!A.brush.filterSpecified)return"0,"+A.height;for(var I,P,S,E=s(A.brush.filter.getConsolidated(),A.height),D=[0],F=E.length?E[0][0]:null,H=0;H<E.length;H++)P=(I=E[H])[1]-I[0],D.push(F),D.push(P),(S=H+1)<E.length&&(F=E[S][0]-I[1]);return D.push(A.height),D}function s(A,I){return A.map(function(P){return P.map(function(S){return Math.max(0,S*I)}).sort(e)})}function h(){m.select(document.body).style("cursor",null)}function p(A){A.attr("stroke-dasharray",f)}function a(A,I){var P=m.select(A).selectAll(".highlight, .highlight-shadow");p(I?P.transition().duration(g.bar.snapDuration).each("end",I):P)}function x(A,I){var P,S=A.brush,E=NaN,D={};if(S.filterSpecified){var F=A.height,H=S.filter.getConsolidated(),V=s(H,F),Z=NaN,K=NaN,q=NaN;for(P=0;P<=V.length;P++){var W=V[P];if(W&&W[0]<=I&&I<=W[1]){Z=P;break}if(K=P?P-1:NaN,W&&W[0]>I){q=P;break}}if(E=Z,isNaN(E)&&(E=isNaN(K)||isNaN(q)?isNaN(K)?q:K:I-V[K][1]<V[q][0]-I?K:q),!isNaN(E)){var $=V[E],R=function(j,X){var J=g.bar.handleHeight;if(!(X>j[1]+J||X<j[0]-J))return X>=.9*j[1]+.1*j[0]?"n":X<=.9*j[0]+.1*j[1]?"s":"ns"}($,I);R&&(D.interval=H[E],D.intervalPix=$,D.region=R)}}if(A.ordinal&&!D.region){var N=A.unitTickvals,U=A.unitToPaddedPx.invert(I);for(P=0;P<N.length;P++){var Q=[.25*N[Math.max(P-1,0)]+.75*N[P],.25*N[Math.min(P+1,N.length-1)]+.75*N[P]];if(U>=Q[0]&&U<=Q[1]){D.clickableOrdinalRange=Q;break}}}return D}function l(A,I){m.event.sourceEvent.stopPropagation();var P=I.height-m.mouse(A)[1]-2*g.verticalPadding,S=I.brush.svgBrush;S.wasDragged=!0,S._dragging=!0,S.grabbingBar?S.newExtent=[P-S.grabPoint,P+S.barLength-S.grabPoint].map(I.unitToPaddedPx.invert):S.newExtent=[S.startExtent,I.unitToPaddedPx.invert(P)].sort(e),I.brush.filterSpecified=!0,S.extent=S.stayingIntervals.concat([S.newExtent]),S.brushCallback(I),a(A.parentNode)}function w(A,I){var P=x(I,I.height-m.mouse(A)[1]-2*g.verticalPadding),S="crosshair";P.clickableOrdinalRange?S="pointer":P.region&&(S=P.region+"-resize"),m.select(document.body).style("cursor",S)}function _(A){A.on("mousemove",function(I){m.event.preventDefault(),I.parent.inBrushDrag||w(this,I)}).on("mouseleave",function(I){I.parent.inBrushDrag||h()}).call(m.behavior.drag().on("dragstart",function(I){(function(P,S){m.event.sourceEvent.stopPropagation();var E=S.height-m.mouse(P)[1]-2*g.verticalPadding,D=S.unitToPaddedPx.invert(E),F=S.brush,H=x(S,E),V=H.interval,Z=F.svgBrush;if(Z.wasDragged=!1,Z.grabbingBar=H.region==="ns",Z.grabbingBar){var K=V.map(S.unitToPaddedPx);Z.grabPoint=E-K[0]-g.verticalPadding,Z.barLength=K[1]-K[0]}Z.clickableOrdinalRange=H.clickableOrdinalRange,Z.stayingIntervals=S.multiselect&&F.filterSpecified?F.filter.getConsolidated():[],V&&(Z.stayingIntervals=Z.stayingIntervals.filter(function(q){return q[0]!==V[0]&&q[1]!==V[1]})),Z.startExtent=H.region?V[H.region==="s"?1:0]:D,S.parent.inBrushDrag=!0,Z.brushStartCallback()})(this,I)}).on("drag",function(I){l(this,I)}).on("dragend",function(I){(function(P,S){var E=S.brush,D=E.filter,F=E.svgBrush;F._dragging||(w(P,S),l(P,S),S.brush.svgBrush.wasDragged=!1),F._dragging=!1,m.event.sourceEvent.stopPropagation();var H=F.grabbingBar;if(F.grabbingBar=!1,F.grabLocation=void 0,S.parent.inBrushDrag=!1,h(),!F.wasDragged)return F.wasDragged=void 0,F.clickableOrdinalRange?E.filterSpecified&&S.multiselect?F.extent.push(F.clickableOrdinalRange):(F.extent=[F.clickableOrdinalRange],E.filterSpecified=!0):H?(F.extent=F.stayingIntervals,F.extent.length===0&&k(E)):k(E),F.brushCallback(S),a(P.parentNode),void F.brushEndCallback(E.filterSpecified?D.getConsolidated():[]);var V=function(){D.set(D.getConsolidated())};if(S.ordinal){var Z=S.unitTickvals;Z[Z.length-1]<Z[0]&&Z.reverse(),F.newExtent=[c(0,Z,F.newExtent[0],F.stayingIntervals),c(1,Z,F.newExtent[1],F.stayingIntervals)];var K=F.newExtent[1]>F.newExtent[0];F.extent=F.stayingIntervals.concat(K?[F.newExtent]:[]),F.extent.length||k(E),F.brushCallback(S),K?a(P.parentNode,V):(V(),a(P.parentNode))}else V();F.brushEndCallback(E.filterSpecified?D.getConsolidated():[])})(this,I)}))}function T(A,I){return A[0]-I[0]}function k(A){A.filterSpecified=!1,A.svgBrush.extent=[[-1/0,1/0]]}function L(A){for(var I,P=A.slice(),S=[],E=P.shift();E;){for(I=E.slice();(E=P.shift())&&E[0]<=I[1];)I[1]=Math.max(I[1],E[1]);S.push(I)}return S.length===1&&S[0][0]>S[0][1]&&(S=[]),S}ee.exports={makeBrush:function(A,I,P,S,E,D){var F,H=function(){var V,Z,K=[];return{set:function(q){(K=q.map(function(W){return W.slice().sort(e)}).sort(T)).length===1&&K[0][0]===-1/0&&K[0][1]===1/0&&(K=[[0,-1]]),V=L(K),Z=K.reduce(function(W,$){return[Math.min(W[0],$[0]),Math.max(W[1],$[1])]},[1/0,-1/0])},get:function(){return K.slice()},getConsolidated:function(){return V},getBounds:function(){return Z}}}();return H.set(P),{filter:H,filterSpecified:I,svgBrush:{extent:[],brushStartCallback:S,brushCallback:(F=E,function(V){var Z=V.brush,K=function(q){return q.svgBrush.extent.map(function(W){return W.slice()})}(Z).slice();Z.filter.set(K),F()}),brushEndCallback:D}}},ensureAxisBrush:function(A,I){var P=A.selectAll("."+g.cn.axisBrush).data(v,b);P.enter().append("g").classed(g.cn.axisBrush,!0),function(S,E){var D=S.selectAll(".background").data(v);D.enter().append("rect").classed("background",!0).call(i).call(u).style("pointer-events","auto").attr("transform",n(0,g.verticalPadding)),D.call(_).attr("height",function(V){return V.height-g.verticalPadding});var F=S.selectAll(".highlight-shadow").data(v);F.enter().append("line").classed("highlight-shadow",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width+g.bar.strokeWidth).attr("stroke",E).attr("opacity",g.bar.strokeOpacity).attr("stroke-linecap","butt"),F.attr("y1",function(V){return V.height}).call(p);var H=S.selectAll(".highlight").data(v);H.enter().append("line").classed("highlight",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width-g.bar.strokeWidth).attr("stroke",g.bar.fillColor).attr("opacity",g.bar.fillOpacity).attr("stroke-linecap","butt"),H.attr("y1",function(V){return V.height}).call(p)}(P,I)},cleanRanges:function(A,I){if(Array.isArray(A[0])?(A=A.map(function(S){return S.sort(e)}),A=I.multiselect?L(A.sort(T)):[A[0]]):A=[A.sort(e)],I.tickvals){var P=I.tickvals.slice().sort(e);if(!(A=A.map(function(S){var E=[c(0,P,S[0],[]),c(1,P,S[1],[])];if(E[1]>E[0])return E}).filter(function(S){return S})).length)return}return A.length>1?A:A[0]}}},{"../../lib":503,"../../lib/gup":500,"./constants":892,"@plotly/d3":58}],890:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../plots/get_data").getModuleCalcData,b=y("./plot"),v=y("../../constants/xmlns_namespaces");te.name="parcoords",te.plot=function(e){var n=m(e.calcdata,"parcoords")[0];n.length&&b(e,n)},te.clean=function(e,n,t,o){var r=o._has&&o._has("parcoords"),d=n._has&&n._has("parcoords");r&&!d&&(o._paperdiv.selectAll(".parcoords").remove(),o._glimages.selectAll("*").remove())},te.toSVG=function(e){var n=e._fullLayout._glimages,t=g.select(e).selectAll(".svg-container");t.filter(function(o,r){return r===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var o=this.toDataURL("image/png");n.append("svg:image").attr({xmlns:v.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){g.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":480,"../../plots/get_data":593,"./plot":899,"@plotly/d3":58}],891:[function(y,ee,te){var g=y("../../lib").isArrayOrTypedArray,m=y("../../components/colorscale"),b=y("../../lib/gup").wrap;ee.exports=function(v,e){var n,t;return m.hasColorscale(e,"line")&&g(e.line.color)?(n=e.line.color,t=m.extractOpts(e.line).colorscale,m.calc(v,e,{vals:n,containerStr:"line",cLetter:"c"})):(n=function(o){for(var r=new Array(o),d=0;d<o;d++)r[d]=.5;return r}(e._length),t=[[0,e.line.color],[1,e.line.color]]),b({lineColor:n,cscale:t})}},{"../../components/colorscale":378,"../../lib":503,"../../lib/gup":500}],892:[function(y,ee,te){ee.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLine
1221Layer"],axisTitleOffset:28,axisExtentOffset:10,deselectedLineColor:"#777",bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}},{}],893:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/colorscale/helpers").hasColorscale,b=y("../../components/colorscale/defaults"),v=y("../../plots/domain").defaults,e=y("../../plots/array_container_defaults"),n=y("../../plots/cartesian/axes"),t=y("./attributes"),o=y("./axisbrush"),r=y("./constants").maxDimensionCount,d=y("./merge_length");function c(i,u,f,s){function h(w,_){return g.coerce(i,u,t.dimensions,w,_)}var p=h("values"),a=h("visible");if(p&&p.length||(a=u.visible=!1),a){h("label"),h("tickvals"),h("ticktext"),h("tickformat");var x=h("range");u._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:x},n.setConvert(u._ax,s.layout),h("multiselect");var l=h("constraintrange");l&&(u.constraintrange=o.cleanRanges(l,u))}}ee.exports=function(i,u,f,s){function h(w,_){return g.coerce(i,u,t,w,_)}var p=i.dimensions;Array.isArray(p)&&p.length>r&&(g.log("parcoords traces support up to "+r+" dimensions at the moment"),p.splice(r));var a=e(i,u,{name:"dimensions",layout:s,handleItemDefaults:c}),x=function(w,_,T,k,L){var A=L("line.color",T);if(m(w,"line")&&g.isArrayOrTypedArray(A)){if(A.length)return L("line.colorscale"),b(w,_,k,L,{prefix:"line.",cLetter:"c"}),A.length;_.line.color=T}return 1/0}(i,u,f,s,h);v(u,s,h),Array.isArray(a)&&a.length||(u.visible=!1),d(u,a,"values",x);var l={family:s.font.family,size:Math.round(s.font.size/1.2),color:s.font.color};g.coerceFont(h,"labelfont",l),g.coerceFont(h,"tickfont",l),g.coerceFont(h,"rangefont",l),h("labelangle"),h("labelside")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"../../plots/domain":584,"./attributes":888,"./axisbrush":889,"./constants":892,"./merge_length":897}],894:[function(y,ee,te){var g=y("../../lib").isTypedArray;te.convertTypedArray=function(m){return g(m)?Array.prototype.slice.call(m):m},te.isOrdinal=function(m){return!!m.tickvals},te.isVisible=function(m){return m.visible||!("visible"in m)}},{"../../lib":503}],895:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc"),plot:y("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:y("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":888,"./base_plot":890,"./calc":891,"./defaults":893,"./plot":899}],896:[function(y,ee,te){var g=y("glslify"),m=g([`precision highp float;
1222#define GLSLIFY 1
1223
1224varying vec4 fragColor;
1225
1226attribute vec4 p01_04, p05_08, p09_12, p13_16,
1227               p17_20, p21_24, p25_28, p29_32,
1228               p33_36, p37_40, p41_44, p45_48,
1229               p49_52, p53_56, p57_60, colors;
1230
1231uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,
1232             loA, hiA, loB, hiB, loC, hiC, loD, hiD;
1233
1234uniform vec2 resolution, viewBoxPos, viewBoxSize;
1235uniform float maskHeight;
1236uniform float drwLayer; // 0: context, 1: focus, 2: pick
1237uniform vec4 contextColor;
1238uniform sampler2D maskTexture, palette;
1239
1240bool isPick    = (drwLayer > 1.5);
1241bool isContext = (drwLayer < 0.5);
1242
1243const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);
1244const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);
1245
1246float val(mat4 p, mat4 v) {
1247    return dot(matrixCompMult(p, v) * UNITS, UNITS);
1248}
1249
1250float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {
1251    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);
1252    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);
1253    return y1 * (1.0 - ratio) + y2 * ratio;
1254}
1255
1256int iMod(int a, int b) {
1257    return a - b * (a / b);
1258}
1259
1260bool fOutside(float p, float lo, float hi) {
1261    return (lo < hi) && (lo > p || p > hi);
1262}
1263
1264bool vOutside(vec4 p, vec4 lo, vec4 hi) {
1265    return (
1266        fOutside(p[0], lo[0], hi[0]) ||
1267        fOutside(p[1], lo[1], hi[1]) ||
1268        fOutside(p[2], lo[2], hi[2]) ||
1269        fOutside(p[3], lo[3], hi[3])
1270    );
1271}
1272
1273bool mOutside(mat4 p, mat4 lo, mat4 hi) {
1274    return (
1275        vOutside(p[0], lo[0], hi[0]) ||
1276        vOutside(p[1], lo[1], hi[1]) ||
1277        vOutside(p[2], lo[2], hi[2]) ||
1278        vOutside(p[3], lo[3], hi[3])
1279    );
1280}
1281
1282bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {
1283    return mOutside(A, loA, hiA) ||
1284           mOutside(B, loB, hiB) ||
1285           mOutside(C, loC, hiC) ||
1286           mOutside(D, loD, hiD);
1287}
1288
1289bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {
1290    mat4 pnts[4];
1291    pnts[0] = A;
1292    pnts[1] = B;
1293    pnts[2] = C;
1294    pnts[3] = D;
1295
1296    for(int i = 0; i < 4; ++i) {
1297        for(int j = 0; j < 4; ++j) {
1298            for(int k = 0; k < 4; ++k) {
1299                if(0 == iMod(
1300                    int(255.0 * texture2D(maskTexture,
1301                        vec2(
1302                            (float(i * 2 + j / 2) + 0.5) / 8.0,
1303                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight
1304                        ))[3]
1305                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),
1306                    2
1307                )) return true;
1308            }
1309        }
1310    }
1311    return false;
1312}
1313
1314vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {
1315    float x = 0.5 * sign(v) + 0.5;
1316    float y = axisY(x, A, B, C, D);
1317    float z = 1.0 - abs(v);
1318
1319    z += isContext ? 0.0 : 2.0 * float(
1320        outsideBoundingBox(A, B, C, D) ||
1321        outsideRasterMask(A, B, C, D)
1322    );
1323
1324    return vec4(
1325        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,
1326        z,
1327        1.0
1328    );
1329}
1330
1331void main() {
1332    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);
1333    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);
1334    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);
1335    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);
1336
1337    float v = colors[3];
1338
1339    gl_Position = position(isContext, v, A, B, C, D);
1340
1341    fragColor =
1342        isContext ? vec4(contextColor) :
1343        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));
1344}
1345`]),b=g([`precision highp float;
1346#define GLSLIFY 1
1347
1348varying vec4 fragColor;
1349
1350void main() {
1351    gl_FragColor = fragColor;
1352}
1353`]),v=y("./constants").maxDimensionCount,e=y("../../lib"),n=new Uint8Array(4),t=new Uint8Array(4),o={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function r(a,x,l,w,_){var T=a._gl;T.enable(T.SCISSOR_TEST),T.scissor(x,l,w,_),a.clear({color:[0,0,0,0],depth:1})}function d(a,x,l,w,_,T){var k=T.key;l.drawCompleted||(function(L){L.read({x:0,y:0,width:1,height:1,data:n})}(a),l.drawCompleted=!0),function L(A){var I=Math.min(w,_-A*w);A===0&&(window.cancelAnimationFrame(l.currentRafs[k]),delete l.currentRafs[k],r(a,T.scissorX,T.scissorY,T.scissorWidth,T.viewBoxSize[1])),l.clearOnly||(T.count=2*I,T.offset=2*A*w,x(T),A*w+I<_&&(l.currentRafs[k]=window.requestAnimationFrame(function(){L(A+1)})),l.drawCompleted=!1)}(0)}function c(a,x){for(var l=new Array(256),w=0;w<256;w++)l[w]=a(w/255).concat(x);return l}function i(a,x){return(a>>>8*x)%256/255}function u(a,x,l){for(var w=new Array(8*x),_=0,T=0;T<x;T++)for(var k=0;k<2;k++)for(var L=0;L<4;L++){var A=4*a+L,I=l[64*T+A];A===63&&k===0&&(I*=-1),w[_++]=I}return w}function f(a){var x="0"+a;return x.substr(x.length-2)}function s(a){return a<v?"p"+f(a+1)+"_"+f(a+4):"colors"}function h(a,x,l,w,_,T,k,L,A,I,P,S,E,D){for(var F=[[],[]],H=0;H<64;H++)F[0][H]=H===_?1:0,F[1][H]=H===T?1:0;k*=D,L*=D,A*=D,I*=D;var V=a.lines.canvasOverdrag*D,Z=a.domain,K=a.canvasWidth*D,q=a.canvasHeight*D,W=a.pad.l*D,$=a.pad.b*D,R=a.layoutHeight*D,N=a.layoutWidth*D,U=a.deselectedLines.color;return e.extendFlat({key:P,resolution:[K,q],viewBoxPos:[k+V,L],viewBoxSize:[A,I],i0:_,i1:T,dim0A:F[0].slice(0,16),dim0B:F[0].slice(16,32),dim0C:F[0].slice(32,48),dim0D:F[0].slice(48,64),dim1A:F[1].slice(0,16),dim1B:F[1].slice(16,32),dim1C:F[1].slice(32,48),dim1D:F[1].slice(48,64),drwLayer:S,contextColor:[U[0]/255,U[1]/255,U[2]/255,U[3]<1?U[3]:Math.max(1/255,Math.pow(1/a.lines.color.length,1/3))],scissorX:(w===x?0:k+V)+(W-V)+N*Z.x[0],scissorWidth:(w===l?K-k+V:A+.5)+(w===x?k+V:0),scissorY:L+$+R*Z.y[0],scissorHeight:I,viewportX:W-V+N*Z.x[0],viewportY:$+R*Z.y[0],viewportWidth:K,viewportHeight:q},E)}function p(a){var x=Math.max(0,Math.floor(2047*a[0]),0),l=Math.min(2047,Math.ceil(2047*a[1]),2047);return[Math.min(x,l),Math.max(x,l)]}ee.exports=function(a,x){var l,w,_,T,k,L=x.context,A=x.pick,I=x.regl,P=I._gl,S=P.getParameter(P.ALIASED_LINE_WIDTH_RANGE),E=Math.max(S[0],Math.min(S[1],x.viewModel.plotGlPixelRatio)),D={currentRafs:{},drawCompleted:!0,clearOnly:!1},F=function(q){for(var W={},$=0;$<=v;$+=4)W[s($)]=q.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return W}(I),H=I.texture(o),V=[];K(x);var Z=I({profile:!1,blend:{enable:L,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!L,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:I.prop("scissorX"),y:I.prop("scissorY"),width:I.prop("scissorWidth"),height:I.prop("scissorHeight")}},viewport:{x:I.prop("viewportX"),y:I.prop("viewportY"),width:I.prop("viewportWidth"),height:I.prop("viewportHe
1353ight")},dither:!1,vert:m,frag:b,primitive:"lines",lineWidth:E,attributes:F,uniforms:{resolution:I.prop("resolution"),viewBoxPos:I.prop("viewBoxPos"),viewBoxSize:I.prop("viewBoxSize"),dim0A:I.prop("dim0A"),dim1A:I.prop("dim1A"),dim0B:I.prop("dim0B"),dim1B:I.prop("dim1B"),dim0C:I.prop("dim0C"),dim1C:I.prop("dim1C"),dim0D:I.prop("dim0D"),dim1D:I.prop("dim1D"),loA:I.prop("loA"),hiA:I.prop("hiA"),loB:I.prop("loB"),hiB:I.prop("hiB"),loC:I.prop("loC"),hiC:I.prop("hiC"),loD:I.prop("loD"),hiD:I.prop("hiD"),palette:H,contextColor:I.prop("contextColor"),maskTexture:I.prop("maskTexture"),drwLayer:I.prop("drwLayer"),maskHeight:I.prop("maskHeight")},offset:I.prop("offset"),count:I.prop("count")});function K(q){l=q.model,w=q.viewModel,_=w.dimensions.slice(),T=_[0]?_[0].values.length:0;var W=l.lines,$=A?W.color.map(function(N,U){return U/W.color.length}):W.color,R=function(N,U,Q){for(var j,X=new Array(N*(v+4)),J=0,re=0;re<N;re++){for(var ne=0;ne<v;ne++)X[J++]=ne<U.length?U[ne].paddedUnitValues[re]:.5;X[J++]=i(re,2),X[J++]=i(re,1),X[J++]=i(re,0),X[J++]=(j=Q[re],Math.max(1e-6,Math.min(.999999,j)))}return X}(T,_,$);(function(N,U,Q){for(var j=0;j<=v;j+=4)N[s(j)](u(j/4,U,Q))})(F,T,R),L||A||(H=I.texture(e.extendFlat({data:c(l.unitToColor,255)},o)))}return{render:function(q,W,$){var R,N,U,Q=q.length,j=1/0,X=-1/0;for(R=0;R<Q;R++)q[R].dim0.canvasX<j&&(j=q[R].dim0.canvasX,N=R),q[R].dim1.canvasX>X&&(X=q[R].dim1.canvasX,U=R);Q===0&&r(I,0,0,l.canvasWidth,l.canvasHeight);var J=function(be){var Ee,fe,me,Te=[[],[]];for(me=0;me<64;me++){var _e=!be&&me<_.length?_[me].brush.filter.getBounds():[-1/0,1/0];Te[0][me]=_e[0],Te[1][me]=_e[1]}var Ae=new Array(16384);for(Ee=0;Ee<16384;Ee++)Ae[Ee]=255;if(!be)for(Ee=0;Ee<_.length;Ee++){var Pe=Ee%8,De=(Ee-Pe)/8,Ve=Math.pow(2,Pe),Qe=_[Ee].brush.filter.get();if(!(Qe.length<2)){var Oe=p(Qe[0])[1];for(fe=1;fe<Qe.length;fe++){var Ue=p(Qe[fe]);for(me=Oe+1;me<Ue[0];me++)Ae[8*me+De]&=~Ve;Oe=Math.max(Oe,Ue[1])}}}var Ge={shape:[8,2048],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:Ae};return k?k(Ge):k=I.texture(Ge),{maskTexture:k,maskHeight:2048,loA:Te[0].slice(0,16),loB:Te[0].slice(16,32),loC:Te[0].slice(32,48),loD:Te[0].slice(48,64),hiA:Te[1].slice(0,16),hiB:Te[1].slice(16,32),hiC:Te[1].slice(32,48),hiD:Te[1].slice(48,64)}}(L);for(R=0;R<Q;R++){var re=q[R],ne=re.dim0.crossfilterDimensionIndex,se=re.dim1.crossfilterDimensionIndex,oe=re.canvasX,pe=re.canvasY,ce=oe+re.panelSizeX,de=re.plotGlPixelRatio;if(W||!V[ne]||V[ne][0]!==oe||V[ne][1]!==ce){V[ne]=[oe,ce];var xe=h(l,N,U,R,ne,se,oe,pe,re.panelSizeX,re.panelSizeY,re.dim0.crossfilterDimensionIndex,L?0:A?2:1,J,de);D.clearOnly=$;var we=W?l.lines.blockLineCount:T;d(I,Z,D,we,T,xe)}}},readPixel:function(q,W){return I.read({x:q,y:W,width:1,height:1,data:t}),t},readPixels:function(q,W,$,R){var N=new Uint8Array(4*$*R);return I.read({x:q,y:W,width:$,height:R,data:N}),N},destroy:function(){for(var q in a.style["pointer-events"]="none",H.destroy(),k&&k.destroy(),F)F[q].destroy()},update:K}}},{"../../lib":503,"./constants":892,glslify:227}],897:[function(y,ee,te){ee.exports=function(g,m,b,v){var e,n;for(v||(v=1/0),e=0;e<m.length;e++)(n=m[e]).visible&&(v=Math.min(v,n[b].length));for(v===1/0&&(v=0),g._length=v,e=0;e<m.length;e++)(n=m[e]).visible&&(n._length=v);return v}},{}],898:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=m.numberFormat,v=y("color-rgba"),e=y("../../plots/cartesian/axes"),n=m.strRotate,t=m.strTranslate,o=y("../../lib/svg_text_utils"),r=y("../../components/drawing"),d=y("../../components/colorscale"),c=y("../../lib/gup"),i=c.keyFun,u=c.repeat,f=c.unwrap,s=y("./helpers"),h=y("./constants"),p=y("./axisbrush"),a=y("./lines");function x(V,Z,K){return m.aggNums(V,null,Z,K)}function l(V,Z){return _(x(Math.min,V,Z),x(Math.max,V,Z))}function w(V){var Z=V.range;return Z?_(Z[0],Z[1]):l(V.values,V._length)}function _(V,Z){return!isNaN(V)&&isFinite(V)||(V=0),!isNaN(Z)&&isFinite(Z)||(Z=0),V===Z&&(V===0?(V-=1,Z+=1):(V*=.9,Z*=1.1)),[V,Z]}function T(V,Z,K,q,W){var $,R,N=w(K);return q?g.scale.ordinal().domain(q.map(($=b(K.tickformat),R=W,R?function(U,Q){var j=R[Q];return j??$(U)}:$))).range(q.map(function(U){var Q=(U-N[0])/(N[1]-N[0]);return V-Z+Q*(2*Z-V)})):g.scale.linear().domain(N).range([V-Z,Z])}function k(V){if(V.tickvals){var Z=w(V);return g.scale.ordinal().domain(V.tickvals).range(V.tickvals.map(function(K){return(K-Z[0])/(Z[1]-Z[0])}))}}function L(V){var Z=V.map(function(W){return W[0]}),K=V.map(function(W){var $=v(W[1]);return g.rgb("rgb("+$[0]+","+$[1]+","+$[2]+")")}),q="rgb".split("").map(function(W){return g.scale.linear().clamp(!0).domain(Z).range(K.map(($=W,function(R){return R[$]})));var $});return function(W){return q.map(function($){return $(W)})}}function A(V){return V.dimensions.some(function(Z){return Z.brush.filterSpecified})}function I(V,Z,K){var q=f(Z),W=q.trace,$=s.convertTypedArray(q.lineColor),R=W.line,N={color:v(h.deselectedLineColor)},U=d.extractOpts(R),Q=U.reversescale?d.flipScale(q.cscale):q.cscale,j=W.domain,X=W.dimensions,J=V.width,re=W.labelangle,ne=W.labelside,se=W.labelfont,oe=W.tickfont,pe=W.rangefont,ce=m.extendDeepNoArrays({},R,{color:$.map(g.scale.linear().domain(w({values:$,range:[U.min,U.max],_length:W._length}))),blockLineCount:h.blockLineCount,canvasOverdrag:h.overdrag*h.canvasPixelRatio}),de=Math.floor(J*(j.x[1]-j.x[0])),xe=Math.floor(V.height*(j.y[1]-j.y[0])),we=V.margin||{l:80,r:80,t:100,b:80},be=de,Ee=xe;return{key:K,colCount:X.filter(s.isVisible).length,dimensions:X,tickDistance:h.tickDistance,unitToColor:L(Q),lines:ce,deselectedLines:N,labelAngle:re,labelSide:ne,labelFont:se,tickFont:oe,rangeFont:pe,layoutWidth:J,layoutHeight:V.height,domain:j,translateX:j.x[0]*J,translateY:V.height-j.y[1]*V.height,pad:we,canvasWidth:be*h.canvasPixelRatio+2*ce.canvasOverdrag,canvasHeight:Ee*h.canvasPixelRatio,width:be,height:Ee,canvasPixelRatio:h.canvasPixelRatio}}function P(V,Z,K){var q=K.width,W=K.height,$=K.dimensions,R=K.canvasPixelRatio,N=function(J){return q*J/Math.max(1,K.colCount-1)},U=h.verticalPadding/W,Q=function(J,re){return g.scale.linear().range([re,J-re])}(W,h.verticalPadding),j={key:K.key,xScale:N,model:K,inBrushDrag:!1},X={};return j.dimensions=$.filter(s.isVisible).map(function(J,re){var ne=function(Ae,Pe){return g.scale.linear().domain(w(Ae)).range([Pe,1-Pe])}(J,U),se=X[J.label];X[J.label]=(se||0)+1;var oe=J.label+(se?"__"+se:""),pe=J.constraintrange,ce=pe&&pe.length;ce&&!Array.isArray(pe[0])&&(pe=[pe]);var de=ce?pe.map(function(Ae){return Ae.map(ne)}):[[-1/0,1/0]],xe=J.values;xe.length>J._length&&(xe=xe.slice(0,J._length));var we,be=J.tickvals;function Ee(Ae,Pe){return{val:Ae,text:we[Pe]}}function fe(Ae,Pe){return Ae.val-Pe.val}if(Array.isArray(be)&&be.length){we=J.ticktext,Array.isArray(we)&&we.length?we.length>be.length?we=we.slice(0,be.length):be.length>we.length&&(be=be.slice(0,we.length)):we=be.map(b(J.tickformat));for(var me=1;me<be.length;me++)if(be[me]<be[me-1]){for(var Te=be.map(Ee).sort(fe),_e=0;_e<be.length;_e++)be[_e]=Te[_e].val,we[_e]=Te[_e].text;break}}else be=void 0;return xe=s.convertTypedArray(xe),{key:oe,label:J.label,tickFormat:J.tickformat,tickvals:be,ticktext:we,ordinal:s.isOrdinal(J),multiselect:J.multiselect,xIndex:re,crossfilterDimensionIndex:re,visibleIndex:J._index,height:W,values:xe,paddedUnitValues:xe.map(ne),unitTickvals:be&&be.map(ne),xScale:N,x:N(re),canvasX:N(re)*R,unitToPaddedPx:Q,domainScale:T(W,h.verticalPadding,J,be,we),ordinalScale:k(J),parent:j,model:K,brush:p.makeBrush(V,ce,de,function(){V.linePickActive(!1)},function(){var Ae=j;Ae.focusLayer&&Ae.focusLayer.render(Ae.panels,!0);var Pe=A(Ae);!V.contextShown()&&Pe?(Ae.contextLayer&&Ae.contextLayer.render(Ae.panels,!0),V.contextShown(!0)):V.contextShown()&&!Pe&&(Ae.contextLayer&&Ae.contextLayer.render(Ae.panels,!0,!0),V.contextShown(!1))},function(Ae){if(j.focusLayer.render(j.panels,!0),j.pickLayer&&j.pickLayer.render(j.panels,!0),V.linePickActive(!0),Z&&Z.filterChanged){var Pe=ne.invert,De=Ae.map(function(Ve){return Ve.map(Pe).sort(m.sorterAsc)}).sort(function(Ve,Qe){return Ve[0]-Qe[0]});Z.filterChanged(j.key,J._index,De)}})}}),j}function S(V){V.classed(h.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function E(V,Z){var K=Z==="top"?1:-1,q=V*Math.PI/180;return{dir:K,dx:Math.sin(q),dy:Math.cos(q),degrees:V}}function D(V,Z,K){for(var q=Z.panels||(Z.panels=[]),W=V.data(),$=0;$<W.length-1;$++){var R=q[$]||(q[$]={}),N=W[$],U=W[$+1];
vendor: 7,248 bytes, line 1353
1353R.dim0=N,R.dim1=U,R.canvasX=N.canvasX,R.panelSizeX=U.canvasX-N.canvasX,R.panelSizeY=Z.model.canvasHeight,R.y=0,R.canvasY=0,R.plotGlPixelRatio=K}}function F(V,Z){return e.tickText(V._ax,Z,!1).text}function H(V,Z){if(V.ordinal)return"";var K=V.domainScale.domain(),q=K[Z?K.length-1:0];return F(V.model.dimensions[V.visibleIndex],q)}ee.exports=function(V,Z,K,q){var W=V._fullLayout,$=W._toppaper,R=W._glcontainer,N=V._context.plotGlPixelRatio,U=V._fullLayout.paper_bgcolor;(function(_e){for(var Ae=0;Ae<_e.length;Ae++)for(var Pe=0;Pe<_e[Ae].length;Pe++)for(var De=_e[Ae][Pe].trace,Ve=De.dimensions,Qe=0;Qe<Ve.length;Qe++){var Oe=Ve[Qe].values,Ue=Ve[Qe]._ax;Ue&&(Ue.range?Ue.range=_(Ue.range[0],Ue.range[1]):Ue.range=l(Oe,De._length),Ue.dtick||(Ue.dtick=.01*(Math.abs(Ue.range[1]-Ue.range[0])||1)),Ue.tickformat=Ve[Qe].tickformat,e.calcTicks(Ue),Ue.cleanRange())}})(Z);var Q,j,X=(Q=!0,j=!1,{linePickActive:function(_e){return arguments.length?Q=!!_e:Q},contextShown:function(_e){return arguments.length?j=!!_e:j}}),J=Z.filter(function(_e){return f(_e).trace.visible}).map(I.bind(0,K)).map(P.bind(0,X,q));R.each(function(_e,Ae){return m.extendFlat(_e,J[Ae])});var re=R.selectAll(".gl-canvas").each(function(_e){_e.viewModel=J[0],_e.viewModel.plotGlPixelRatio=N,_e.viewModel.paperColor=U,_e.model=_e.viewModel?_e.viewModel.model:null}),ne=null;re.filter(function(_e){return _e.pick}).style("pointer-events","auto").on("mousemove",function(_e){if(X.linePickActive()&&_e.lineLayer&&q&&q.hover){var Ae=g.event,Pe=this.width,De=this.height,Ve=g.mouse(this),Qe=Ve[0],Oe=Ve[1];if(Qe<0||Oe<0||Qe>=Pe||Oe>=De)return;var Ue=_e.lineLayer.readPixel(Qe,De-1-Oe),Ge=Ue[3]!==0,Ye=Ge?Ue[2]+256*(Ue[1]+256*Ue[0]):null,tt={x:Qe,y:Oe,clientX:Ae.clientX,clientY:Ae.clientY,dataIndex:_e.model.key,curveNumber:Ye};Ye!==ne&&(Ge?q.hover(tt):q.unhover&&q.unhover(tt),ne=Ye)}}),re.style("opacity",function(_e){return _e.pick?0:1}),$.style("background","rgba(255, 255, 255, 0)");var se=$.selectAll("."+h.cn.parcoords).data(J,i);se.exit().remove(),se.enter().append("g").classed(h.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),se.attr("transform",function(_e){return t(_e.model.translateX,_e.model.translateY)});var oe=se.selectAll("."+h.cn.parcoordsControlView).data(u,i);oe.enter().append("g").classed(h.cn.parcoordsControlView,!0),oe.attr("transform",function(_e){return t(_e.model.pad.l,_e.model.pad.t)});var pe=oe.selectAll("."+h.cn.yAxis).data(function(_e){return _e.dimensions},i);pe.enter().append("g").classed(h.cn.yAxis,!0),oe.each(function(_e){D(pe,_e,N)}),re.each(function(_e){if(_e.viewModel){!_e.lineLayer||q?_e.lineLayer=a(this,_e):_e.lineLayer.update(_e),(_e.key||_e.key===0)&&(_e.viewModel[_e.key]=_e.lineLayer);var Ae=!_e.context||q;_e.lineLayer.render(_e.viewModel.panels,Ae)}}),pe.attr("transform",function(_e){return t(_e.xScale(_e.xIndex),0)}),pe.call(g.behavior.drag().origin(function(_e){return _e}).on("drag",function(_e){var Ae=_e.parent;X.linePickActive(!1),_e.x=Math.max(-h.overdrag,Math.min(_e.model.width+h.overdrag,g.event.x)),_e.canvasX=_e.x*_e.model.canvasPixelRatio,pe.sort(function(Pe,De){return Pe.x-De.x}).each(function(Pe,De){Pe.xIndex=De,Pe.x=_e===Pe?Pe.x:Pe.xScale(Pe.xIndex),Pe.canvasX=Pe.x*Pe.model.canvasPixelRatio}),D(pe,Ae,N),pe.filter(function(Pe){return Math.abs(_e.xIndex-Pe.xIndex)!==0}).attr("transform",function(Pe){return t(Pe.xScale(Pe.xIndex),0)}),g.select(this).attr("transform",t(_e.x,0)),pe.each(function(Pe,De,Ve){Ve===_e.parent.key&&(Ae.dimensions[De]=Pe)}),Ae.contextLayer&&Ae.contextLayer.render(Ae.panels,!1,!A(Ae)),Ae.focusLayer.render&&Ae.focusLayer.render(Ae.panels)}).on("dragend",function(_e){var Ae=_e.parent;_e.x=_e.xScale(_e.xIndex),_e.canvasX=_e.x*_e.model.canvasPixelRatio,D(pe,Ae,N),g.select(this).attr("transform",function(Pe){return t(Pe.x,0)}),Ae.contextLayer&&Ae.contextLayer.render(Ae.panels,!1,!A(Ae)),Ae.focusLayer&&Ae.focusLayer.render(Ae.panels),Ae.pickLayer&&Ae.pickLayer.render(Ae.panels,!0),X.linePickActive(!0),q&&q.axesMoved&&q.axesMoved(Ae.key,Ae.dimensions.map(function(Pe){return Pe.crossfilterDimensionIndex}))})),pe.exit().remove();var ce=pe.selectAll("."+h.cn.axisOverlays).data(u,i);ce.enter().append("g").classed(h.cn.axisOverlays,!0),ce.selectAll("."+h.cn.axis).remove();var de=ce.selectAll("."+h.cn.axis).data(u,i);de.enter().append("g").classed(h.cn.axis,!0),de.each(function(_e){var Ae=_e.model.height/_e.model.tickDistance,Pe=_e.domainScale,De=Pe.domain();g.select(this).call(g.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ae,_e.tickFormat).tickValues(_e.ordinal?De:null).tickFormat(function(Ve){return s.isOrdinal(_e)?Ve:F(_e.model.dimensions[_e.visibleIndex],Ve)}).scale(Pe)),r.font(de.selectAll("text"),_e.model.tickFont)}),de.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),de.selectAll("text").style("text-shadow",o.makeTextShadow(U)).style("cursor","default");var xe=ce.selectAll("."+h.cn.axisHeading).data(u,i);xe.enter().append("g").classed(h.cn.axisHeading,!0);var we=xe.selectAll("."+h.cn.axisTitle).data(u,i);we.enter().append("text").classed(h.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events","auto"),we.text(function(_e){return _e.label}).each(function(_e){var Ae=g.select(this);r.font(Ae,_e.model.labelFont),o.convertToTspans(Ae,V)}).attr("transform",function(_e){var Ae=E(_e.model.labelAngle,_e.model.labelSide),Pe=h.axisTitleOffset;return(Ae.dir>0?"":t(0,2*Pe+_e.model.height))+n(Ae.degrees)+t(-Pe*Ae.dx,-Pe*Ae.dy)}).attr("text-anchor",function(_e){var Ae=E(_e.model.labelAngle,_e.model.labelSide);return 2*Math.abs(Ae.dx)>Math.abs(Ae.dy)?Ae.dir*Ae.dx<0?"start":"end":"middle"});var be=ce.selectAll("."+h.cn.axisExtent).data(u,i);be.enter().append("g").classed(h.cn.axisExtent,!0);var Ee=be.selectAll("."+h.cn.axisExtentTop).data(u,i);Ee.enter().append("g").classed(h.cn.axisExtentTop,!0),Ee.attr("transform",t(0,-h.axisExtentOffset));var fe=Ee.selectAll("."+h.cn.axisExtentTopText).data(u,i);fe.enter().append("text").classed(h.cn.axisExtentTopText,!0).call(S),fe.text(function(_e){return H(_e,!0)}).each(function(_e){r.font(g.select(this),_e.model.rangeFont)});var me=be.selectAll("."+h.cn.axisExtentBottom).data(u,i);me.enter().append("g").classed(h.cn.axisExtentBottom,!0),me.attr("transform",function(_e){return t(0,_e.model.height+h.axisExtentOffset)});var Te=me.selectAll("."+h.cn.axisExtentBottomText).data(u,i);Te.enter().append("text").classed(h.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(S),Te.text(function(_e){return H(_e,!1)}).each(function(_e){r.font(g.select(this),_e.model.rangeFont)}),p.ensureAxisBrush(ce,U)}},{"../../components/colorscale":378,"../../components/drawing":388,"../../lib":503,"../../lib/gup":500,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"./axisbrush":889,"./constants":892,"./helpers":894,"./lines":896,"@plotly/d3":58,"color-rgba":91}],899:[function(y,ee,te){var g=y("./parcoords"),m=y("../../lib/prepare_regl"),b=y("./helpers").isVisible;function v(e,n,t){var o=n.indexOf(t),r=e.indexOf(o);return r===-1&&(r+=n.length),r}ee.exports=function(e,n){var t=e._fullLayout;if(m(e)){var o={},r={},d={},c={},i=t._size;
1353n.forEach(function(u,f){var s=u[0].trace;d[f]=s.index;var h=c[f]=s._fullInput.index;o[f]=e.data[h].dimensions,r[f]=e.data[h].dimensions.slice()}),g(e,n,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},{filterChanged:function(u,f,s){var h=r[u][f],p=s.map(function(T){return T.slice()}),a="dimensions["+f+"].constraintrange",x=t._tracePreGUI[e._fullData[d[u]]._fullInput.uid];if(x[a]===void 0){var l=h.constraintrange;x[a]=l||null}var w=e._fullData[d[u]].dimensions[f];p.length?(p.length===1&&(p=p[0]),h.constraintrange=p,w.constraintrange=p.slice(),p=[p]):(delete h.constraintrange,delete w.constraintrange,p=null);var _={};_[a]=p,e.emit("plotly_restyle",[_,[c[u]]])},hover:function(u){e.emit("plotly_hover",u)},unhover:function(u){e.emit("plotly_unhover",u)},axesMoved:function(u,f){var s=function(h,p){return function(a,x){return v(h,p,a)-v(h,p,x)}}(f,r[u].filter(b));o[u].sort(s),r[u].filter(function(h){return!b(h)}).sort(function(h){return r[u].indexOf(h)}).forEach(function(h){o[u].splice(o[u].indexOf(h),1),o[u].splice(r[u].indexOf(h),0,h)}),e.emit("plotly_restyle",[{dimensions:[o[u]]},[c[u]]])}})}}},{"../../lib/prepare_regl":516,"./helpers":894,"./parcoords":898}],900:[function(y,ee,te){var g=y("../../plots/attributes"),m=y("../../plots/domain").attributes,b=y("../../plots/font_attributes"),v=y("../../components/color/attributes"),e=y("../../plots/template_attributes").hovertemplateAttrs,n=y("../../plots/template_attributes").texttemplateAttrs,t=y("../../lib/extend").extendFlat,o=b({editType:"plot",arrayOk:!0,colorEditType:"plot"});ee.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:v.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:t({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:e({},{keys:["label","color","value","percent","text"]}),texttemplate:n({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:t({},o,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:t({},o,{}),outsidetextfont:t({},o,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:t({},o,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:m({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:t({},o,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],901:[function(y,ee,te){var g=y("../../plots/plots");te.name="pie",te.plot=function(m,b,v,e){g.plotBasePlot(te.name,m,b,v,e)},te.clean=function(m,b,v,e){g.cleanBasePlot(te.name,m,b,v,e)}},{"../../plots/plots":619}],902:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("tinycolor2"),b=y("../../components/color"),v={};function e(t){return function(o,r){return!!o&&!!(o=m(o)).isValid()&&(o=b.addOpacity(o,o.getAlpha()),t[r]||(t[r]=o),o)}}function n(t,o){var r,d=JSON.stringify(t),c=o[d];if(!c){for(c=t.slice(),r=0;r<t.length;r++)c.push(m(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)c.push(m(t[r]).darken(20).toHexString());o[d]=c}return c}ee.exports={calc:function(t,o){var r,d,c=[],i=t._fullLayout,u=i.hiddenlabels||[],f=o.labels,s=o.marker.colors||[],h=o.values,p=o._length,a=o._hasValues&&p;if(o.dlabel)for(f=new Array(p),r=0;r<p;r++)f[r]=String(o.label0+r*o.dlabel);var x={},l=e(i["_"+o.type+"colormap"]),w=0,_=!1;for(r=0;r<p;r++){var T,k,L;if(a){if(T=h[r],!g(T))continue;T=+T}else T=1;(k=f[r])!==void 0&&k!==""||(k=r);var A=x[k=String(k)];A===void 0?(x[k]=c.length,(L=u.indexOf(k)!==-1)||(w+=T),c.push({v:T,label:k,color:l(s[r],k),i:r,pts:[r],hidden:L})):(_=!0,(d=c[A]).v+=T,d.pts.push(r),d.hidden||(w+=T),d.color===!1&&s[r]&&(d.color=l(s[r],k)))}return c=c.filter(function(I){return I.v>=0}),(o.type==="funnelarea"?_:o.sort)&&c.sort(function(I,P){return P.v-I.v}),c[0]&&(c[0].vTotal=w),c},crossTraceCalc:function(t,o){var r=(o||{}).type;r||(r="pie");var d=t._fullLayout,c=t.calcdata,i=d[r+"colorway"],u=d["_"+r+"colormap"];d["extend"+r+"colors"]&&(i=n(i,v));for(var f=0,s=0;s<c.length;s++){var h=c[s];if(h[0].trace.type===r)for(var p=0;p<h.length;p++){var a=h[p];a.color===!1&&(u[a.label]?a.color=u[a.label]:(u[a.label]=a.color=i[f%i.length],f++))}}},makePullColorFn:e,generateExtendedColors:n}},{"../../components/color":366,"fast-isnumeric":190,tinycolor2:312}],903:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("./attributes"),v=y("../../plots/domain").defaults,e=y("../bar/defaults").handleText;function n(t,o){var r=Array.isArray(t),d=m.isArrayOrTypedArray(o),c=Math.min(r?t.length:1/0,d?o.length:1/0);if(isFinite(c)||(c=0),c&&d){for(var i,u=0;u<c;u++){var f=o[u];if(g(f)&&f>0){i=!0;break}}i||(c=0)}return{hasLabels:r,hasValues:d,len:c}
1353}ee.exports={handleLabelsAndValues:n,supplyDefaults:function(t,o,r,d){function c(l,w){return m.coerce(t,o,b,l,w)}var i=n(c("labels"),c("values")),u=i.len;if(o._hasLabels=i.hasLabels,o._hasValues=i.hasValues,!o._hasLabels&&o._hasValues&&(c("label0"),c("dlabel")),u){o._length=u,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var f,s=c("text"),h=c("texttemplate");if(h||(f=c("textinfo",Array.isArray(s)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),h||f&&f!=="none"){var p=c("textposition");e(t,o,d,c,p,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(p)||p==="auto"||p==="outside")&&c("automargin"),(p==="inside"||p==="auto"||Array.isArray(p))&&c("insidetextorientation")}v(o,d,c);var a=c("hole");if(c("title.text")){var x=c("title.position",a?"middle center":"top center");a||x!=="middle center"||(o.title.position="top center"),m.coerceFont(c,"title.font",d.font)}c("sort"),c("direction"),c("rotation"),c("pull")}else o.visible=!1}}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"./attributes":900,"fast-isnumeric":190}],904:[function(y,ee,te){var g=y("../../components/fx/helpers").appendArrayMultiPointValues;ee.exports=function(m,b){var v={curveNumber:b.index,pointNumbers:m.pts,data:b._input,fullData:b,label:m.label,color:m.color,value:m.v,percent:m.percent,text:m.text,bbox:m.bbox,v:m.v};return m.pts.length===1&&(v.pointNumber=v.i=m.pts[0]),g(v,b,m.pts),b.type==="funnelarea"&&(delete v.v,delete v.i),v}},{"../../components/fx/helpers":402}],905:[function(y,ee,te){var g=y("../../lib");function m(b){return b.indexOf("e")!==-1?b.replace(/[.]?0+e/,"e"):b.indexOf(".")!==-1?b.replace(/[.]?0+$/,""):b}te.formatPiePercent=function(b,v){var e=m((100*b).toPrecision(3));return g.numSeparate(e,v)+"%"},te.formatPieValue=function(b,v){var e=m(b.toPrecision(10));return g.numSeparate(e,v)},te.getFirstFilled=function(b,v){if(Array.isArray(b))for(var e=0;e<v.length;e++){var n=b[v[e]];if(n||n===0||n==="")return n}},te.castOption=function(b,v){return Array.isArray(b)?te.getFirstFilled(b,v):b||void 0},te.getRotationAngle=function(b){return(b==="auto"?0:b)*Math.PI/180}},{"../../lib":503}],906:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults").supplyDefaults,supplyLayoutDefaults:y("./layout_defaults"),layoutAttributes:y("./layout_attributes"),calc:y("./calc").calc,crossTraceCalc:y("./calc").crossTraceCalc,plot:y("./plot").plot,style:y("./style"),styleOne:y("./style_one"),moduleType:"trace",name:"pie",basePlotModule:y("./base_plot"),categories:["pie-like","pie","showLegend"],meta:{}}},{"./attributes":900,"./base_plot":901,"./calc":902,"./defaults":903,"./layout_attributes":907,"./layout_defaults":908,"./plot":909,"./style":910,"./style_one":911}],907:[function(y,ee,te){ee.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],908:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v){function e(n,t){return g.coerce(b,v,m,n,t)}e("hiddenlabels"),e("piecolorway",v.colorway),e("extendpiecolors")}},{"../../lib":503,"./layout_attributes":907}],909:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../plots/plots"),b=y("../../components/fx"),v=y("../../components/color"),e=y("../../components/drawing"),n=y("../../lib"),t=n.strScale,o=n.strTranslate,r=y("../../lib/svg_text_utils"),d=y("../bar/uniform_text"),c=d.recordMinTextSize,i=d.clearMinTextSize,u=y("../bar/constants").TEXTPAD,f=y("./helpers"),s=y("./event_data"),h=y("../../lib").isValidTextValue;function p(Z,K,q){var W=q[0],$=W.cx,R=W.cy,N=W.trace,U=N.type==="funnelarea";"_hasHoverLabel"in N||(N._hasHoverLabel=!1),"_hasHoverEvent"in N||(N._hasHoverEvent=!1),Z.on("mouseover",function(Q){var j=K._fullLayout,X=K._fullData[N.index];if(!K._dragging&&j.hovermode!==!1){var J=X.hoverinfo;if(Array.isArray(J)&&(J=b.castHoverinfo({hoverinfo:[f.castOption(J,Q.pts)],_module:N._module},j,0)),J==="all"&&(J="label+text+value+percent+name"),X.hovertemplate||J!=="none"&&J!=="skip"&&J){var re=Q.rInscribed||0,ne=$+Q.pxmid[0]*(1-re),se=R+Q.pxmid[1]*(1-re),oe=j.separators,pe=[];if(J&&J.indexOf("label")!==-1&&pe.push(Q.label),Q.text=f.castOption(X.hovertext||X.text,Q.pts),J&&J.indexOf("text")!==-1){var ce=Q.text;n.isValidTextValue(ce)&&pe.push(ce)}Q.value=Q.v,Q.valueLabel=f.formatPieValue(Q.v,oe),J&&J.indexOf("value")!==-1&&pe.push(Q.valueLabel),Q.percent=Q.v/W.vTotal,Q.percentLabel=f.formatPiePercent(Q.percent,oe),J&&J.indexOf("percent")!==-1&&pe.push(Q.percentLabel);var de=X.hoverlabel,xe=de.font,we=[];b.loneHover({trace:N,x0:ne-re*W.r,x1:ne+re*W.r,y:se,_x0:U?$+Q.TL[0]:ne-re*W.r,_x1:U?$+Q.TR[0]:ne+re*W.r,_y0:U?R+Q.TL[1]:se-re*W.r,_y1:U?R+Q.BL[1]:se+re*W.r,text:pe.join("<br>"),name:X.hovertemplate||J.indexOf("name")!==-1?X.name:void 0,idealAlign:Q.pxmid[0]<0?"left":"right",color:f.castOption(de.bgcolor,Q.pts)||Q.color,borderColor:f.castOption(de.bordercolor,Q.pts),fontFamily:f.castOption(xe.family,Q.pts),fontSize:f.castOption(xe.size,Q.pts),fontColor:f.castOption(xe.color,Q.pts),nameLength:f.castOption(de.namelength,Q.pts),textAlign:f.castOption(de.align,Q.pts),hovertemplate:f.castOption(X.hovertemplate,Q.pts),hovertemplateLabels:Q,eventData:[s(Q,X)]},{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:K,inOut_bbox:we}),Q.bbox=we[0],N._hasHoverLabel=!0}N._hasHoverEvent=!0,K.emit("plotly_hover",{points:[s(Q,X)],event:g.event})}}),Z.on("mouseout",function(Q){var j=K._fullLayout,X=K._fullData[N.index],J=g.select(this).datum(
1353);N._hasHoverEvent&&(Q.originalEvent=g.event,K.emit("plotly_unhover",{points:[s(J,X)],event:g.event}),N._hasHoverEvent=!1),N._hasHoverLabel&&(b.loneUnhover(j._hoverlayer.node()),N._hasHoverLabel=!1)}),Z.on("click",function(Q){var j=K._fullLayout,X=K._fullData[N.index];K._dragging||j.hovermode===!1||(K._hoverdata=[s(Q,X)],b.click(K,g.event))})}function a(Z,K,q){var W=f.castOption(Z.insidetextfont.color,K.pts);!W&&Z._input.textfont&&(W=f.castOption(Z._input.textfont.color,K.pts));var $=f.castOption(Z.insidetextfont.family,K.pts)||f.castOption(Z.textfont.family,K.pts)||q.family,R=f.castOption(Z.insidetextfont.size,K.pts)||f.castOption(Z.textfont.size,K.pts)||q.size;return{color:W||v.contrast(K.color),family:$,size:R}}function x(Z,K){for(var q,W,$=0;$<Z.length;$++)if((W=(q=Z[$][0]).trace).title.text){var R=W.title.text;W._meta&&(R=n.templateString(R,W._meta));var N=e.tester.append("text").attr("data-notex",1).text(R).call(e.font,W.title.font).call(r.convertToTspans,K),U=e.bBox(N.node(),!0);q.titleBox={width:U.width,height:U.height},N.remove()}}function l(Z,K,q){var W=q.r||K.rpx1,$=K.rInscribed;if(K.startangle===K.stopangle)return{rCenter:1-$,scale:0,rotate:0,textPosAngle:0};var R,N=K.ring,U=N===1&&Math.abs(K.startangle-K.stopangle)===2*Math.PI,Q=K.halfangle,j=K.midangle,X=q.trace.insidetextorientation,J=X==="horizontal",re=X==="tangential",ne=X==="radial",se=X==="auto",oe=[];if(!se){var pe,ce=function(fe,me){if(function(Pe,De){var Ve=Pe.startangle,Qe=Pe.stopangle;return Ve>De&&De>Qe||Ve<De&&De<Qe}(K,fe)){var Te=Math.abs(fe-K.startangle),_e=Math.abs(fe-K.stopangle),Ae=Te<_e?Te:_e;(R=me==="tan"?_(Z,W,N,Ae,0):w(Z,W,N,Ae,Math.PI/2)).textPosAngle=fe,oe.push(R)}};if(J||re){for(pe=4;pe>=-4;pe-=2)ce(Math.PI*pe,"tan");for(pe=4;pe>=-4;pe-=2)ce(Math.PI*(pe+1),"tan")}if(J||ne){for(pe=4;pe>=-4;pe-=2)ce(Math.PI*(pe+1.5),"rad");for(pe=4;pe>=-4;pe-=2)ce(Math.PI*(pe+.5),"rad")}}if(U||se||J){var de=Math.sqrt(Z.width*Z.width+Z.height*Z.height);if((R={scale:$*W*2/de,rCenter:1-$,rotate:0}).textPosAngle=(K.startangle+K.stopangle)/2,R.scale>=1)return R;oe.push(R)}(se||ne)&&((R=w(Z,W,N,Q,j)).textPosAngle=(K.startangle+K.stopangle)/2,oe.push(R)),(se||re)&&((R=_(Z,W,N,Q,j)).textPosAngle=(K.startangle+K.stopangle)/2,oe.push(R));for(var xe=0,we=0,be=0;be<oe.length;be++){var Ee=oe[be].scale;if(we<Ee&&(we=Ee,xe=be),!se&&we>=1)break}return oe[xe]}function w(Z,K,q,W,$){K=Math.max(0,K-2*u);var R=Z.width/Z.height,N=L(R,W,K,q);return{scale:2*N/Z.height,rCenter:T(R,N/K),rotate:k($)}}function _(Z,K,q,W,$){K=Math.max(0,K-2*u);var R=Z.height/Z.width,N=L(R,W,K,q);return{scale:2*N/Z.width,rCenter:T(R,N/K),rotate:k($+Math.PI/2)}}function T(Z,K){return Math.cos(K)-Z*K}function k(Z){return(180/Math.PI*Z+720)%180-90}function L(Z,K,q,W){var $=Z+1/(2*Math.tan(K));return q*Math.min(1/(Math.sqrt($*$+.5)+$),W/(Math.sqrt(Z*Z+W/2)+Z))}function A(Z,K){return Z.v!==K.vTotal||K.trace.hole?Math.min(1/(1+1/Math.sin(Z.halfangle)),Z.ring/2):1}function I(Z,K){var q=K.pxmid[0],W=K.pxmid[1],$=Z.width/2,R=Z.height/2;return q<0&&($*=-1),W<0&&(R*=-1),{scale:1,rCenter:1,rotate:0,x:$+Math.abs(R)*($>0?1:-1)/2,y:R/(1+q*q/(W*W)),outside:!0}}function P(Z,K){var q,W,$,R=Z.trace,N={x:Z.cx,y:Z.cy},U={tx:0,ty:0};U.ty+=R.title.font.size,$=E(R),R.title.position.indexOf("top")!==-1?(N.y-=(1+$)*Z.r,U.ty-=Z.titleBox.height):R.title.position.indexOf("bottom")!==-1&&(N.y+=(1+$)*Z.r);var Q,j,X=(Q=Z.r,j=Z.trace.aspectratio,Q/(j===void 0?1:j)),J=K.w*(R.domain.x[1]-R.domain.x[0])/2;return R.title.position.indexOf("left")!==-1?(J+=X,N.x-=(1+$)*X,U.tx+=Z.titleBox.width/2):R.title.position.indexOf("center")!==-1?J*=2:R.title.position.indexOf("right")!==-1&&(J+=X,N.x+=(1+$)*X,U.tx-=Z.titleBox.width/2),q=J/Z.titleBox.width,W=S(Z,K)/Z.titleBox.height,{x:N.x,y:N.y,scale:Math.min(q,W),tx:U.tx,ty:U.ty}}function S(Z,K){var q=Z.trace,W=K.h*(q.domain.y[1]-q.domain.y[0]);return Math.min(Z.titleBox.height,W/2)}function E(Z){var K,q=Z.pull;if(!q)return 0;if(Array.isArray(q))for(q=0,K=0;K<Z.pull.length;K++)Z.pull[K]>q&&(q=Z.pull[K]);return q}function D(Z,K){for(var q=[],W=0;W<Z.length;W++){var $=Z[W][0],R=$.trace,N=R.domain,U=K.w*(N.x[1]-N.x[0]),Q=K.h*(N.y[1]-N.y[0]);R.title.text&&R.title.position!=="middle center"&&(Q-=S($,K));var j=U/2,X=Q/2;R.type!=="funnelarea"||R.scalegroup||(X/=R.aspectratio),$.r=Math.min(j,X)/(1+E(R)),$.cx=K.l+K.w*(R.domain.x[1]+R.domain.x[0])/2,$.cy=K.t+K.h*(1-R.domain.y[0])-Q/2,R.title.text&&R.title.position.indexOf("bottom")!==-1&&($.cy-=S($,K)),R.scalegroup&&q.indexOf(R.scalegroup)===-1&&q.push(R.scalegroup)}(function(J,re){for(var ne,se,oe,pe=0;pe<re.length;pe++){var ce=1/0,de=re[pe];for(se=0;se<J.length;se++)if(ne=J[se][0],(oe=ne.trace).scalegroup===de){var xe;if(oe.type==="pie")xe=ne.r*ne.r;else if(oe.type==="funnelarea"){var we,be;oe.aspectratio>1?(we=ne.r,be=we/oe.aspectratio):(be=ne.r,we=be*oe.aspectratio),we*=(1+oe.baseratio)/2,xe=we*be}ce=Math.min(ce,xe/ne.vTotal)}for(se=0;se<J.length;se++)if(ne=J[se][0],(oe=ne.trace).scalegroup===de){var Ee=ce*ne.vTotal;oe.type==="funnelarea"&&(Ee/=(1+oe.baseratio)/2,Ee/=oe.aspectratio),ne.r=Math.sqrt(Ee)}}})(Z,q)}function F(Z,K){return[Z*Math.sin(K),-Z*Math.cos(K)]}function H(Z,K,q){var W=Z._fullLayout,$=q.trace,R=$.texttemplate,N=$.textinfo;if(!R&&N&&N!=="none"){var U,Q=N.split("+"),j=function(xe){return Q.indexOf(xe)!==-1},X=j("label"),J=j("text"),re=j("value"),ne=j("percent"),se=W.separators;if(U=X?[K.label]:[],J){var oe=f.getFirstFilled($.text,K.pts);h(oe)&&U.push(oe)}re&&U.push(f.formatPieValue(K.v,se)),ne&&U.push(f.formatPiePercent(K.v/q.vTotal,se)),K.text=U.join("<br>")}if(R){var pe=n.castOption($,K.i,"texttemplate");if(pe){var ce=function(xe){return{label:xe.label,value:xe.v,valueLabel:f.formatPieValue(xe.v,W.separators),percent:xe.v/q.vTotal,percentLabel:f.formatPiePercent(xe.v/q.vTotal,W.separators),color:xe.color,text:xe.text,customdata:n.castOption($,xe.i,"customdata")}}(K),de=f.getFirstFilled($.text,K.pts);(h(de)||de==="")&&(ce.text=de),K.text=n.texttemplateString(pe,ce,Z._fullLayout._d3locale,ce,$._meta||{})}else K.text=""}}
vendor: 5,692 bytes, line 1353
1353function V(Z,K){var q=Z.rotate*Math.PI/180,W=Math.cos(q),$=Math.sin(q),R=(K.left+K.right)/2,N=(K.top+K.bottom)/2;Z.textX=R*W-N*$,Z.textY=R*$+N*W,Z.noCenter=!0}ee.exports={plot:function(Z,K){var q=Z._fullLayout,W=q._size;i("pie",q),x(K,Z),D(K,W);var $=n.makeTraceGroups(q._pielayer,K,"trace").each(function(R){var N=g.select(this),U=R[0],Q=U.trace;(function(j){var X,J,re,ne=j[0],se=ne.r,oe=ne.trace,pe=f.getRotationAngle(oe.rotation),ce=2*Math.PI/ne.vTotal,de="px0",xe="px1";if(oe.direction==="counterclockwise"){for(X=0;X<j.length&&j[X].hidden;X++);if(X===j.length)return;pe+=ce*j[X].v,ce*=-1,de="px1",xe="px0"}for(re=F(se,pe),X=0;X<j.length;X++)(J=j[X]).hidden||(J[de]=re,J.startangle=pe,pe+=ce*J.v/2,J.pxmid=F(se,pe),J.midangle=pe,pe+=ce*J.v/2,re=F(se,pe),J.stopangle=pe,J[xe]=re,J.largeArc=J.v>ne.vTotal/2?1:0,J.halfangle=Math.PI*Math.min(J.v/ne.vTotal,.5),J.ring=1-oe.hole,J.rInscribed=A(J,ne))})(R),N.attr("stroke-linejoin","round"),N.each(function(){var j=g.select(this).selectAll("g.slice").data(R);j.enter().append("g").classed("slice",!0),j.exit().remove();var X=[[[],[]],[[],[]]],J=!1;j.each(function(xe,we){if(xe.hidden)g.select(this).selectAll("path,g").remove();else{xe.pointNumber=xe.i,xe.curveNumber=Q.index,X[xe.pxmid[1]<0?0:1][xe.pxmid[0]<0?0:1].push(xe);var be=U.cx,Ee=U.cy,fe=g.select(this),me=fe.selectAll("path.surface").data([xe]);if(me.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),fe.call(p,Z,R),Q.pull){var Te=+f.castOption(Q.pull,xe.pts)||0;Te>0&&(be+=Te*xe.pxmid[0],Ee+=Te*xe.pxmid[1])}xe.cxFinal=be,xe.cyFinal=Ee;var _e=Q.hole;if(xe.v===U.vTotal){var Ae="M"+(be+xe.px0[0])+","+(Ee+xe.px0[1])+Oe(xe.px0,xe.pxmid,!0,1)+Oe(xe.pxmid,xe.px0,!0,1)+"Z";_e?me.attr("d","M"+(be+_e*xe.px0[0])+","+(Ee+_e*xe.px0[1])+Oe(xe.px0,xe.pxmid,!1,_e)+Oe(xe.pxmid,xe.px0,!1,_e)+"Z"+Ae):me.attr("d",Ae)}else{var Pe=Oe(xe.px0,xe.px1,!0,1);if(_e){var De=1-_e;me.attr("d","M"+(be+_e*xe.px1[0])+","+(Ee+_e*xe.px1[1])+Oe(xe.px1,xe.px0,!1,_e)+"l"+De*xe.px0[0]+","+De*xe.px0[1]+Pe+"Z")}else me.attr("d","M"+be+","+Ee+"l"+xe.px0[0]+","+xe.px0[1]+Pe+"Z")}H(Z,xe,U);var Ve=f.castOption(Q.textposition,xe.pts),Qe=fe.selectAll("g.slicetext").data(xe.text&&Ve!=="none"?[0]:[]);Qe.enter().append("g").classed("slicetext",!0),Qe.exit().remove(),Qe.each(function(){var Ue=n.ensureSingle(g.select(this),"text","",function(rt){rt.attr("data-notex",1)}),Ge=n.ensureUniformFontSize(Z,Ve==="outside"?function(rt,et,Tt){var Vt=f.castOption(rt.outsidetextfont.color,et.pts)||f.castOption(rt.textfont.color,et.pts)||Tt.color,Kt=f.castOption(rt.outsidetextfont.family,et.pts)||f.castOption(rt.textfont.family,et.pts)||Tt.family,Be=f.castOption(rt.outsidetextfont.size,et.pts)||f.castOption(rt.textfont.size,et.pts)||Tt.size;return{color:Vt,family:Kt,size:Be}}(Q,xe,q.font):a(Q,xe,q.font));Ue.text(xe.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(e.font,Ge).call(r.convertToTspans,Z);var Ye,tt=e.bBox(Ue.node());if(Ve==="outside")Ye=I(tt,xe);else if(Ye=l(tt,xe,U),Ve==="auto"&&Ye.scale<1){var lt=n.ensureUniformFontSize(Z,Q.outsidetextfont);Ue.call(e.font,lt),Ye=I(tt=e.bBox(Ue.node()),xe)}var vt=Ye.textPosAngle,It=vt===void 0?xe.pxmid:F(U.r,vt);if(Ye.targetX=be+It[0]*Ye.rCenter+(Ye.x||0),Ye.targetY=Ee+It[1]*Ye.rCenter+(Ye.y||0),V(Ye,tt),Ye.outside){var St=Ye.targetY;xe.yLabelMin=St-tt.height/2,xe.yLabelMid=St,xe.yLabelMax=St+tt.height/2,xe.labelExtraX=0,xe.labelExtraY=0,J=!0}Ye.fontSize=Ge.size,c(Q.type,Ye,q),R[we].transform=Ye,Ue.attr("transform",n.getTextTransform(Ye))})}function Oe(Ue,Ge,Ye,tt){var lt=tt*(Ge[0]-Ue[0]),vt=tt*(Ge[1]-Ue[1]);return"a"+tt*U.r+","+tt*U.r+" 0 "+xe.largeArc+(Ye?" 1 ":" 0 ")+lt+","+vt}});var re=g.select(this).selectAll("g.titletext").data(Q.title.text?[0]:[]);if(re.enter().append("g").classed("titletext",!0),re.exit().remove(),re.each(function(){var xe,we=n.ensureSingle(g.select(this),"text","",function(Ee){Ee.attr("data-notex",1)}),be=Q.title.text;Q._meta&&(be=n.templateString(be,Q._meta)),we.text(be).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(e.font,Q.title.font).call(r.convertToTspans,Z),xe=Q.title.position==="middle center"?function(Ee){var fe=Math.sqrt(Ee.titleBox.width*Ee.titleBox.width+Ee.titleBox.height*Ee.titleBox.height);return{x:Ee.cx,y:Ee.cy,scale:Ee.trace.hole*Ee.r*2/fe,tx:0,ty:-Ee.titleBox.height/2+Ee.trace.title.font.size}}(U):P(U,W),we.attr("transform",o(xe.x,xe.y)+t(Math.min(1,xe.scale))+o(xe.tx,xe.ty))}),J&&function(xe,we){var be,Ee,fe,me,Te,_e,Ae,Pe,De,Ve,Qe,Oe,Ue;function Ge(vt,It){return vt.pxmid[1]-It.pxmid[1]}function Ye(vt,It){return It.pxmid[1]-vt.pxmid[1]}function tt(vt,It){It||(It={});var St,rt,et,Tt,Vt=It.labelExtraY+(Ee?It.yLabelMax:It.yLabelMin),Kt=Ee?vt.yLabelMin:vt.yLabelMax,Be=Ee?vt.yLabelMax:vt.yLabelMin,qe=vt.cyFinal+Te(vt.px0[1],vt.px1[1]),Re=Vt-Kt;if(Re*Ae>0&&(vt.labelExtraY=Re),Array.isArray(we.pull))for(rt=0;rt<Ve.length;rt++)(et=Ve[rt])===vt||(f.castOption(we.pull,vt.pts)||0)>=(f.castOption(we.pull,et.pts)||0)||((vt.pxmid[1]-et.pxmid[1])*Ae>0?(Re=et.cyFinal+Te(et.px0[1],et.px1[1])-Kt-vt.labelExtraY)*Ae>0&&(vt.labelExtraY+=Re):(Be+vt.labelExtraY-qe)*Ae>0&&(St=3*_e*Math.abs(rt-Ve.indexOf(vt)),(Tt=et.cxFinal+me(et.px0[0],et.px1[0])+St-(vt.cxFinal+vt.pxmid[0])-vt.labelExtraX)*_e>0&&(vt.labelExtraX+=Tt)))}for(Ee=0;Ee<2;Ee++)for(fe=Ee?Ge:Ye,Te=Ee?Math.max:Math.min,Ae=Ee?1:-1,be=0;be<2;be++){for(me=be?Math.max:Math.min,_e=be?1:-1,(Pe=xe[Ee][be]).sort(fe),De=xe[1-Ee][be],Ve=De.concat(Pe),Oe=[],Qe=0;Qe<Pe.length;Qe++)Pe[Qe].yLabelMid!==void 0&&Oe.push(Pe[Qe]);for(Ue=!1,Qe=0;Ee&&Qe<De.length;Qe++)if(De[Qe].yLabelMid!==void 0){Ue=De[Qe];break}for(Qe=0;Qe<Oe.length;Qe++){var lt=Qe&&Oe[Qe-1];Ue&&!Qe&&(lt=Ue),tt(Oe[Qe],lt)}}}
vendor: 1,412 bytes, line 1353
1353(X,Q),function(xe,we){xe.each(function(be){var Ee=g.select(this);if(be.labelExtraX||be.labelExtraY){var fe=Ee.select("g.slicetext text");be.transform.targetX+=be.labelExtraX,be.transform.targetY+=be.labelExtraY,fe.attr("transform",n.getTextTransform(be.transform));var me=be.cxFinal+be.pxmid[0],Te="M"+me+","+(be.cyFinal+be.pxmid[1]),_e=(be.yLabelMax-be.yLabelMin)*(be.pxmid[0]<0?-1:1)/4;if(be.labelExtraX){var Ae=be.labelExtraX*be.pxmid[1]/be.pxmid[0],Pe=be.yLabelMid+be.labelExtraY-(be.cyFinal+be.pxmid[1]);Math.abs(Ae)>Math.abs(Pe)?Te+="l"+Pe*be.pxmid[0]/be.pxmid[1]+","+Pe+"H"+(me+be.labelExtraX+_e):Te+="l"+be.labelExtraX+","+Ae+"v"+(Pe-Ae)+"h"+_e}else Te+="V"+(be.yLabelMid+be.labelExtraY)+"h"+_e;n.ensureSingle(Ee,"path","textline").call(v.stroke,we.outsidetextfont.color).attr({"stroke-width":Math.min(2,we.outsidetextfont.size/8),d:Te,fill:"none"})}else Ee.select("path.textline").remove()})}(j,Q),J&&Q.automargin){var ne=e.bBox(N.node()),se=Q.domain,oe=W.w*(se.x[1]-se.x[0]),pe=W.h*(se.y[1]-se.y[0]),ce=(.5*oe-U.r)/W.w,de=(.5*pe-U.r)/W.h;m.autoMargin(Z,"pie."+Q.uid+".automargin",{xl:se.x[0]-ce,xr:se.x[1]+ce,yb:se.y[0]-de,yt:se.y[1]+de,l:Math.max(U.cx-U.r-ne.left,0),r:Math.max(ne.right-(U.cx+U.r),0),b:Math.max(ne.bottom-(U.cy+U.r),0),t:Math.max(U.cy-U.r-ne.top,0),pad:5})}})});setTimeout(function(){$.selectAll("tspan").each(function(){var R=g.select(this);R.attr("dy")&&R.attr("dy",R.attr("dy"))})}
1353,0)},formatSliceLabel:H,transformInsideText:l,determineInsideTextFont:a,positionTitleOutside:P,prerenderTitles:x,layoutAreas:D,attachFxHandlers:p,computeTransform:V}},{"../../components/color":366,"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../bar/constants":650,"../bar/uniform_text":664,"./event_data":904,"./helpers":905,"@plotly/d3":58}],910:[function(y,ee,te){var g=y("@plotly/d3"),m=y("./style_one"),b=y("../bar/uniform_text").resizeText;ee.exports=function(v){var e=v._fullLayout._pielayer.selectAll(".trace");b(v,e,"pie"),e.each(function(n){var t=n[0].trace,o=g.select(this);o.style({opacity:t.opacity}),o.selectAll("path.surface").each(function(r){g.select(this).call(m,r,t)})})}},{"../bar/uniform_text":664,"./style_one":911,"@plotly/d3":58}],911:[function(y,ee,te){var g=y("../../components/color"),m=y("./helpers").castOption;ee.exports=function(b,v,e){var n=e.marker.line,t=m(n.color,v.pts)||g.defaultLine,o=m(n.width,v.pts)||0;b.style("stroke-width",o).call(g.fill,v.color).call(g.stroke,t)}},{"../../components/color":366,"./helpers":905}],912:[function(y,ee,te){var g=y("../scatter/attributes");ee.exports={x:g.x,y:g.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:g.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},{"../scatter/attributes":926}],913:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_pointcloud2d,m=y("../../lib/str2rgbarray"),b=y("../../plots/cartesian/autorange").findExtremes,v=y("../scatter/get_trace_color");function e(t,o){this.scene=t,this.uid=o,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=g(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var n=e.prototype;n.handlePick=function(t){var o=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*o],this.pickXYData[2*o+1]]:[this.pickXData[o],this.pickYData[o]],textLabel:Array.isArray(this.textLabels)?this.textLabels[o]:this.textLabels,color:this.color,name:this.name,pointIndex:o,hoverinfo:this.hoverinfo}},n.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=v(t,{})},n.updateFast=function(t){var o,r,d,c,i,u,f=this.xData=this.pickXData=t.x,s=this.yData=this.pickYData=t.y,h=this.pickXYData=t.xy,p=t.xbounds&&t.ybounds,a=t.indices,x=this.bounds;if(h){if(d=h,o=h.length>>>1,p)x[0]=t.xbounds[0],x[2]=t.xbounds[1],x[1]=t.ybounds[0],x[3]=t.ybounds[1];else for(u=0;u<o;u++)c=d[2*u],i=d[2*u+1],c<x[0]&&(x[0]=c),c>x[2]&&(x[2]=c),i<x[1]&&(x[1]=i),i>x[3]&&(x[3]=i);if(a)r=a;else for(r=new Int32Array(o),u=0;u<o;u++)r[u]=u}else for(o=f.length,d=new Float32Array(2*o),r=new Int32Array(o),u=0;u<o;u++)c=f[u],i=s[u],r[u]=u,d[2*u]=c,d[2*u+1]=i,c<x[0]&&(x[0]=c),c>x[2]&&(x[2]=c),i<x[1]&&(x[1]=i),i>x[3]&&(x[3]=i);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=d;var l=m(t.marker.color),w=m(t.marker.border.color),_=t.opacity*t.marker.opacity;l[3]*=_,this.pointcloudOptions.color=l;var T=t.marker.blend;T===null&&(T=f.length<100||s.length<100),this.pointcloudOptions.blend=T,w[3]*=_,this.pointcloudOptions.borderColor=w;var k=t.marker.sizemin,L=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=k,this.pointcloudOptions.sizeMax=L,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var A=this.scene.xaxis,I=this.scene.yaxis,P=L/2||.5;t._extremes[A._id]=b(A,[x[0],x[2]],{ppad:P}),t._extremes[I._id]=b(I,[x[1],x[3]],{ppad:P})},n.dispose=function(){this.pointcloud.dispose()},ee.exports=function(t,o){var r=new e(t,o.uid);return r.update(o),r}},{"../../../stackgl_modules":1120,"../../lib/str2rgbarray":528,"../../plots/cartesian/autorange":553,"../scatter/get_trace_color":936}],914:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes");ee.exports=function(b,v,e){function n(t,o){return g.coerce(b,v,m,t,o)}
1353n("x"),n("y"),n("xbounds"),n("ybounds"),b.xy&&b.xy instanceof Float32Array&&(v.xy=b.xy),b.indices&&b.indices instanceof Int32Array&&(v.indices=b.indices),n("text"),n("marker.color",e),n("marker.opacity"),n("marker.blend"),n("marker.sizemin"),n("marker.sizemax"),n("marker.border.color",e),n("marker.border.arearatio"),v._length=null}},{"../../lib":503,"./attributes":912}],915:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("../scatter3d/calc"),plot:y("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:y("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":596,"../scatter3d/calc":955,"./attributes":912,"./convert":913,"./defaults":914}],916:[function(y,ee,te){var g=y("../../plots/font_attributes"),m=y("../../plots/attributes"),b=y("../../components/color/attributes"),v=y("../../components/fx/attributes"),e=y("../../plots/domain").attributes,n=y("../../plots/template_attributes").hovertemplateAttrs,t=y("../../components/colorscale/attributes"),o=y("../../plot_api/plot_template").templatedArray,r=y("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,d=y("../../lib/extend").extendFlat,c=y("../../plot_api/edit_types").overrideAll;(ee.exports=c({hoverinfo:d({},m.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:v.hoverlabel,domain:e({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:r("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:g({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:b.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:v.hoverlabel,hovertemplate:n({},{keys:["value","label"]})},link:{label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:b.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:v.hoverlabel,hovertemplate:n({},{keys:["value","label"]}),colorscales:o("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:d(t().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":365,"../../components/colorscale/attributes":373,"../../components/fx/attributes":397,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],917:[function(y,ee,te){var g=y("../../plot_api/edit_types").overrideAll,m=y("../../plots/get_data").getModuleCalcData,b=y("./plot"),v=y("../../components/fx/layout_attributes"),e=y("../../lib/setcursor"),n=y("../../components/dragelement"),t=y("../../plots/cartesian/select").prepSelect,o=y("../../lib"),r=y("../../registry");function d(c,i){var u=c._fullData[i],f=c._fullLayout,s=f.dragmode,h=f.dragmode==="pan"?"move":"crosshair",p=u._bgRect;if(s!=="pan"&&s!=="zoom"){e(p,h);var a={_id:"x",c2p:o.identity,_offset:u._sankey.translateX,_length:u._sankey.width},x={_id:"y",c2p:o.identity,_offset:u._sankey.translateY,_length:u._sankey.height},l={gd:c,element:p.node(),plotinfo:{id:i,xaxis:a,yaxis:x,fillRangeItems:o.noop},subplot:i,xaxes:[a],yaxes:[x],doneFnCompleted:function(w){var _,T=c._fullData[i],k=T.node.groups.slice(),L=[];function A(E){for(var D=T._sankey.graph.nodes,F=0;F<D.length;F++)if(D[F].pointNumber===E)return D[F]}for(var I=0;I<w.length;I++){var P=A(w[I].pointNumber);if(P)if(P.group){for(var S=0;S<P.childrenNodes.length;S++)L.push(P.childrenNodes[S].pointNumber);k[P.pointNumber-T.node._count]=!1}else L.push(P.pointNumber)}
1353_=k.filter(Boolean).concat([L]),r.call("_guiRestyle",c,{"node.groups":[_]},i)},prepFn:function(w,_,T){t(w,_,T,l,s)}};n.init(l)}}te.name="sankey",te.baseLayoutAttrOverrides=g({hoverlabel:v.hoverlabel},"plot","nested"),te.plot=function(c){var i=m(c.calcdata,"sankey")[0];b(c,i),te.updateFx(c)},te.clean=function(c,i,u,f){var s=f._has&&f._has("sankey"),h=i._has&&i._has("sankey");s&&!h&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},te.updateFx=function(c){for(var i=0;i<c._fullData.length;i++)d(c,i)}},{"../../components/dragelement":385,"../../components/fx/layout_attributes":407,"../../lib":503,"../../lib/setcursor":524,"../../plot_api/edit_types":536,"../../plots/cartesian/select":575,"../../plots/get_data":593,"../../registry":638,"./plot":922}],918:[function(y,ee,te){var g=y("strongly-connected-components"),m=y("../../lib"),b=y("../../lib/gup").wrap,v=m.isArrayOrTypedArray,e=m.isIndex,n=y("../../components/colorscale");function t(o){var r,d=o.node,c=o.link,i=[],u=v(c.color),f=v(c.customdata),s={},h={},p=c.colorscales.length;for(r=0;r<p;r++){var a=c.colorscales[r],x=n.extractScale(a,{cLetter:"c"}),l=n.makeColorScaleFunc(x);h[a.label]=l}var w=0;for(r=0;r<c.value.length;r++)c.source[r]>w&&(w=c.source[r]),c.target[r]>w&&(w=c.target[r]);var _,T=w+1;o.node._count=T;var k=o.node.groups,L={};for(r=0;r<k.length;r++){var A=k[r];for(_=0;_<A.length;_++){var I=A[_],P=T+r;L.hasOwnProperty(I)?m.warn("Node "+I+" is already part of a group."):L[I]=P}}var S={source:[],target:[]};for(r=0;r<c.value.length;r++){var E=c.value[r],D=c.source[r],F=c.target[r];if(E>0&&e(D,T)&&e(F,T)&&(!L.hasOwnProperty(D)||!L.hasOwnProperty(F)||L[D]!==L[F])){L.hasOwnProperty(F)&&(F=L[F]),L.hasOwnProperty(D)&&(D=L[D]),F=+F,s[D=+D]=s[F]=!0;var H="";c.label&&c.label[r]&&(H=c.label[r]);var V=null;H&&h.hasOwnProperty(H)&&(V=h[H]),i.push({pointNumber:r,label:H,color:u?c.color[r]:c.color,customdata:f?c.customdata[r]:c.customdata,concentrationscale:V,source:D,target:F,value:+E}),S.source.push(D),S.target.push(F)}}var Z=T+k.length,K=v(d.color),q=v(d.customdata),W=[];for(r=0;r<Z;r++)if(s[r]){var $=d.label[r];W.push({group:r>T-1,childrenNodes:[],pointNumber:r,label:$,color:K?d.color[r]:d.color,customdata:q?d.customdata[r]:d.customdata})}var R=!1;return function(N,U,Q){for(var j=m.init2dArray(N,0),X=0;X<Math.min(U.length,Q.length);X++)if(m.isIndex(U[X],N)&&m.isIndex(Q[X],N)){if(U[X]===Q[X])return!0;j[U[X]].push(Q[X])}return g(j).components.some(function(J){return J.length>1})}(Z,S.source,S.target)&&(R=!0),{circular:R,links:i,nodes:W,groups:k,groupLookup:L}}ee.exports=function(o,r){var d=t(r);return b({circular:d.circular,_nodes:d.nodes,_links:d.links,_groups:d.groups,_groupLookup:d.groupLookup})}},{"../../components/colorscale":378,"../../lib":503,"../../lib/gup":500,"strongly-connected-components":306}],919:[function(y,ee,te){ee.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},{}],920:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("../../components/color"),v=y("tinycolor2"),e=y("../../plots/domain").defaults,n=y("../../components/fx/hoverlabel_defaults"),t=y("../../plot_api/plot_template"),o=y("../../plots/array_container_defaults");function r(d,c){function i(u,f){return g.coerce(d,c,m.link.colorscales,u,f)}i("label"),i("cmin"),i("cmax"),i("colorscale")}ee.exports=function(d,c,i,u){function f(L,A){return g.coerce(d,c,m,L,A)}var s=g.extendDeep(u.hoverlabel,d.hoverlabel),h=d.node,p=t.newContainer(c,"node");function a(L,A){return g.coerce(h,p,m.node,L,A)}a("label"),a("groups"),a("x"),a("y"),a("pad"),a("thickness"),a("line.color"),a("line.width"),a("hoverinfo",d.hoverinfo),n(h,p,a,s),a("hovertemplate");var x=u.colorway;a("color",p.label.map(function(L,A){return b.addOpacity(function(I){return x[I%x.length]}(A),.8)})),a("customdata");var l=d.link||{},w=t.newContainer(c,"link");function _(L,A){return g.coerce(l,w,m.link,L,A)}_("label"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",d.hoverinfo),n(l,w,_,s),_("hovertemplate");var T,k=v(u.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",g.repeat(k,w.value.length)),_("customdata"),o(l,w,{name:"colorscales",handleItemDefaults:r}),e(c,u,f),f("orientation"),f("valueformat"),f("valuesuffix"),p.x.length&&p.y.length&&(T="freeform"),f("arrangement",T),g.coerceFont(f,"textfont",g.extendFlat({},u.font)),c._length=null}},{"../../components/color":366,"../../components/fx/hoverlabel_defaults":404,"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../../plots/domain":584,"./attributes":916,tinycolor2:312}],921:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc"),plot:y("./plot"),moduleType:"trace",name:"sankey",basePlotModule:y("./base_plot"),selectPoints:y("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":916,"./base_plot":917,"./calc":918,"./defaults":920,"./plot":922,"./select.js":924}],922:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=m.numberFormat,v=y("./render"),e=y("../../components/fx"),n=y("../../components/color"),t=y("./constants").cn,o=m._;function r(l){return l!==""}function d(l,w){return l.filter(function(_){return _.key===w.traceId})}function c(l,w){g.select(l).select("path").style("fill-opacity",w),g.select(l).select("rect").style("fill-opacity",w)}function i(l){g.select(l).select("text.name").style("fill","black")}function u(l){return function(w){return l.node.sourceLinks.indexOf(w.link)!==-1||l.node.targetLinks.indexOf(w.link)!==-1}}function f(l){return function(w){return w.node.sourceLinks.indexOf(l.link)!==-1||w.node.targetLinks.indexOf(l.link)!==-1}}function s(l,w,_){w&&_&&d(_,w).selectAll("."+t.sankeyLink).filter(u(w)).call(p.bind(0,w,_,!1))}function h(l,w,_){w&&_&&d(_,w).selectAll("."+t.sankeyLink).filter(u(w)).call(a.bind(0,w,_,!1))}function p(l,w,_,T){var k=T.datum().link.label;T.style("fill-opacity",function(L){if(!L.link.concentrationscale)return .4}),k&&d(w,l).selectAll("."+t.sankeyLink).filter(function(L){return L.link.label===k}).style("fill-opacity",function(L){if(!L.link.concentrationscale)return .4}),_&&d(w,l).selectAll("."+t.sankeyNode).filter(f(l)).call(s)}function a(l,w,_,T){var k=T.datum().link.label;T.style("fill-opacity",function(L){return L.tinyColorAlpha}),k&&d(w,l).selectAll("."+t.sankeyLink).filter(function(L){return L.link.label===k}).style("fill-opacity",function(L){return L.tinyColorAlpha}),_&&d(w,l).selectAll(t.sankeyNode).filter(f(l)).call(h)}function x(l,w){var _=l.hoverlabel||{},T=m.nestedProperty(_,w).get();return!Array.isArray(T)&&T}ee.exports=function(l,w){for(var _=l._fullLayout,T=_._paper,k=_._size,L=0;L<l._fullData.length;L++)if(l._fullData[L].visible&&l._fullData[L].type===t.sankey&&!l._fullData[L]._viewInitial){var A=l._fullData[L].node;
1353l._fullData[L]._viewInitial={node:{groups:A.groups.slice(),x:A.x.slice(),y:A.y.slice()}}}var I=o(l,"source:")+" ",P=o(l,"target:")+" ",S=o(l,"concentration:")+" ",E=o(l,"incoming flow count:")+" ",D=o(l,"outgoing flow count:")+" ";v(l,T,w,{width:k.w,height:k.h,margin:{t:k.t,r:k.r,b:k.b,l:k.l}},{linkEvents:{hover:function(F,H,V){l._fullLayout.hovermode!==!1&&(g.select(F).call(p.bind(0,H,V,!0)),H.link.trace.link.hoverinfo!=="skip"&&(H.link.fullData=H.link.trace,l.emit("plotly_hover",{event:g.event,points:[H.link]})))},follow:function(F,H){if(l._fullLayout.hovermode!==!1){var V=H.link.trace.link;if(V.hoverinfo!=="none"&&V.hoverinfo!=="skip"){for(var Z=[],K=0,q=0;q<H.flow.links.length;q++){var W=H.flow.links[q];if(l._fullLayout.hovermode!=="closest"||H.link.pointNumber===W.pointNumber){H.link.pointNumber===W.pointNumber&&(K=q),W.fullData=W.trace,V=H.link.trace.link;var $=N(W),R={valueLabel:b(H.valueFormat)(W.value)+H.valueSuffix};Z.push({x:$[0],y:$[1],name:R.valueLabel,text:[W.label||"",I+W.source.label,P+W.target.label,W.concentrationscale?S+b("%0.2f")(W.flow.labelConcentration):""].filter(r).join("<br>"),color:x(V,"bgcolor")||n.addOpacity(W.color,1),borderColor:x(V,"bordercolor"),fontFamily:x(V,"font.family"),fontSize:x(V,"font.size"),fontColor:x(V,"font.color"),nameLength:x(V,"namelength"),textAlign:x(V,"align"),idealAlign:g.event.x<$[0]?"right":"left",hovertemplate:V.hovertemplate,hovertemplateLabels:R,eventData:[W]})}}e.loneHover(Z,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:l,anchorIndex:K}).each(function(){H.link.concentrationscale||c(this,.65),i(this)})}}function N(U){var Q,j;U.circular?(Q=(U.circularPathData.leftInnerExtent+U.circularPathData.rightInnerExtent)/2,j=U.circularPathData.verticalFullExtent):(Q=(U.source.x1+U.target.x0)/2,j=(U.y0+U.y1)/2);var X=[Q,j];return U.trace.orientation==="v"&&X.reverse(),X[0]+=H.parent.translateX,X[1]+=H.parent.translateY,X}},unhover:function(F,H,V){l._fullLayout.hovermode!==!1&&(g.select(F).call(a.bind(0,H,V,!0)),H.link.trace.link.hoverinfo!=="skip"&&(H.link.fullData=H.link.trace,l.emit("plotly_unhover",{event:g.event,points:[H.link]})),e.loneUnhover(_._hoverlayer.node()))},select:function(F,H){var V=H.link;V.originalEvent=g.event,l._hoverdata=[V],e.click(l,{target:!0})}},nodeEvents:{hover:function(F,H,V){l._fullLayout.hovermode!==!1&&(g.select(F).call(s,H,V),H.node.trace.node.hoverinfo!=="skip"&&(H.node.fullData=H.node.trace,l.emit("plotly_hover",{event:g.event,points:[H.node]})))},follow:function(F,H){if(l._fullLayout.hovermode!==!1){var V=H.node.trace.node;if(V.hoverinfo!=="none"&&V.hoverinfo!=="skip"){var Z=g.select(F).select("."+t.nodeRect),K=l._fullLayout._paperdiv.node().getBoundingClientRect(),q=Z.node().getBoundingClientRect(),W=q.left-2-K.left,$=q.right+2-K.left,R=q.top+q.height/4-K.top,N={valueLabel:b(H.valueFormat)(H.node.value)+H.valueSuffix};H.node.fullData=H.node.trace,l._fullLayout._calcInverseTransform(l);var U=l._fullLayout._invScaleX,Q=l._fullLayout._invScaleY,j=e.loneHover({x0:U*W,x1:U*$,y:Q*R,name:b(H.valueFormat)(H.node.value)+H.valueSuffix,text:[H.node.label,E+H.node.targetLinks.length,D+H.node.sourceLinks.length].filter(r).join("<br>"),color:x(V,"bgcolor")||H.tinyColorHue,borderColor:x(V,"bordercolor"),fontFamily:x(V,"font.family"),fontSize:x(V,"font.size"),fontColor:x(V,"font.color"),nameLength:x(V,"namelength"),textAlign:x(V,"align"),idealAlign:"left",hovertemplate:V.hovertemplate,hovertemplateLabels:N,eventData:[H.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:l});c(j,.85),i(j)}}},unhover:function(F,H,V){l._fullLayout.hovermode!==!1&&(g.select(F).call(h,H,V),H.node.trace.node.hoverinfo!=="skip"&&(H.node.fullData=H.node.trace,l.emit("plotly_unhover",{event:g.event,points:[H.node]})),e.loneUnhover(_._hoverlayer.node()))},select:function(F,H,V){var Z=H.node;Z.originalEvent=g.event,l._hoverdata=[Z],g.select(F).call(h,H,V),e.click(l,{target:!0})}}})}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"./constants":919,"./render":923,"@plotly/d3":58}],923:[function(y,ee,te){var g=y("d3-force"),m=y("d3-interpolate").interpolateNumber,b=y("@plotly/d3"),v=y("@plotly/d3-sankey"),e=y("@plotly/d3-sankey-circular"),n=y("./constants"),t=y("tinycolor2"),o=y("../../components/color"),r=y("../../components/drawing"),d=y("../../lib"),c=d.strTranslate,i=d.strRotate,u=y("../../lib/gup"),f=u.keyFun,s=u.repeat,h=u.unwrap,p=y("../../lib/svg_text_utils"),a=y("../../registry"),x=y("../../constants/alignment"),l=x.CAP_SHIFT,w=x.L
1353INE_SPACING;function _(q,W,$){var R,N=h(W),U=N.trace,Q=U.domain,j=U.orientation==="h",X=U.node.pad,J=U.node.thickness,re=q.width*(Q.x[1]-Q.x[0]),ne=q.height*(Q.y[1]-Q.y[0]),se=N._nodes,oe=N._links,pe=N.circular;(R=pe?e.sankeyCircular().circularLinkGap(0):v.sankey()).iterations(n.sankeyIterations).size(j?[re,ne]:[ne,re]).nodeWidth(J).nodePadding(X).nodeId(function(Ae){return Ae.pointNumber}).nodes(se).links(oe);var ce,de,xe,we=R();for(var be in R.nodePadding()<X&&d.warn("node.pad was reduced to ",R.nodePadding()," to fit within the figure."),N._groupLookup){var Ee,fe=parseInt(N._groupLookup[be]);for(ce=0;ce<we.nodes.length;ce++)if(we.nodes[ce].pointNumber===fe){Ee=we.nodes[ce];break}if(Ee){var me={pointNumber:parseInt(be),x0:Ee.x0,x1:Ee.x1,y0:Ee.y0,y1:Ee.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};we.nodes.unshift(me),Ee.childrenNodes.unshift(me)}}if(function(){for(ce=0;ce<we.nodes.length;ce++){var Ae,Pe,De=we.nodes[ce],Ve={};for(de=0;de<De.targetLinks.length;de++)Ae=(Pe=De.targetLinks[de]).source.pointNumber+":"+Pe.target.pointNumber,Ve.hasOwnProperty(Ae)||(Ve[Ae]=[]),Ve[Ae].push(Pe);var Qe=Object.keys(Ve);for(de=0;de<Qe.length;de++){var Oe=Ve[Ae=Qe[de]],Ue=0,Ge={};for(xe=0;xe<Oe.length;xe++)Ge[(Pe=Oe[xe]).label]||(Ge[Pe.label]=0),Ge[Pe.label]+=Pe.value,Ue+=Pe.value;for(xe=0;xe<Oe.length;xe++)(Pe=Oe[xe]).flow={value:Ue,labelConcentration:Ge[Pe.label]/Ue,concentration:Pe.value/Ue,links:Oe},Pe.concentrationscale&&(Pe.color=t(Pe.concentrationscale(Pe.flow.labelConcentration)))}var Ye=0;for(de=0;de<De.sourceLinks.length;de++)Ye+=De.sourceLinks[de].value;for(de=0;de<De.sourceLinks.length;de++)(Pe=De.sourceLinks[de]).concentrationOut=Pe.value/Ye;var tt=0;for(de=0;de<De.targetLinks.length;de++)tt+=De.targetLinks[de].value;for(de=0;de<De.targetLinks.length;de++)(Pe=De.targetLinks[de]).concenrationIn=Pe.value/tt}}(),U.node.x.length&&U.node.y.length){for(ce=0;ce<Math.min(U.node.x.length,U.node.y.length,we.nodes.length);ce++)if(U.node.x[ce]&&U.node.y[ce]){var Te=[U.node.x[ce]*re,U.node.y[ce]*ne];we.nodes[ce].x0=Te[0]-J/2,we.nodes[ce].x1=Te[0]+J/2;var _e=we.nodes[ce].y1-we.nodes[ce].y0;we.nodes[ce].y0=Te[1]-_e/2,we.nodes[ce].y1=Te[1]+_e/2}U.arrangement==="snap"&&function(Ae){Ae.forEach(function(Pe){var De,Ve,Qe,Oe=0,Ue=Pe.length;for(Pe.sort(function(Ge,Ye){return Ge.y0-Ye.y0}),Qe=0;Qe<Ue;++Qe)(De=Pe[Qe]).y0>=Oe||(Ve=Oe-De.y0)>1e-6&&(De.y0+=Ve,De.y1+=Ve),Oe=De.y1+X})}(function(Ae){var Pe,De,Ve=Ae.map(function(Ye,tt){return{x0:Ye.x0,index:tt}}).sort(function(Ye,tt){return Ye.x0-tt.x0}),Qe=[],Oe=-1,Ue=-1/0;for(ce=0;ce<Ve.length;ce++){var Ge=Ae[Ve[ce].index];Ge.x0>Ue+J&&(Oe+=1,Pe=Ge.x0),Ue=Ge.x0,Qe[Oe]||(Qe[Oe]=[]),Qe[Oe].push(Ge),De=Pe-Ge.x0,Ge.x0+=De,Ge.x1+=De}return Qe}(se=we.nodes)),R.update(we)}return{circular:pe,key:$,trace:U,guid:d.randstr(),horizontal:j,width:re,height:ne,nodePad:U.node.pad,nodeLineColor:U.node.line.color,nodeLineWidth:U.node.line.width,linkLineColor:U.link.line.color,linkLineWidth:U.link.line.width,valueFormat:U.valueformat,valueSuffix:U.valuesuffix,textFont:U.textfont,translateX:Q.x[0]*q.width+q.margin.l,translateY:q.height-Q.y[1]*q.height+q.margin.t,dragParallel:j?ne:re,dragPerpendicular:j?re:ne,arrangement:U.arrangement,sankey:R,graph:we,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function T(q,W,$){var R=t(W.color),N=W.source.label+"|"+W.target.label+"__"+$;return W.trace=q.trace,W.curveNumber=q.trace.index,{circular:q.circular,key:N,traceId:q.key,pointNumber:W.pointNumber,link:W,tinyColorHue:o.tinyRGB(R),tinyColorAlpha:R.getAlpha(),linkPath:k,linkLineColor:q.linkLineColor,linkLineWidth:q.linkLineWidth,valueFormat:q.valueFormat,valueSuffix:q.valueSuffix,sankey:q.sankey,parent:q,interactionState:q.interactionState,flow:W.flow}}function k(){return function(q){if(q.link.circular)return W=q.link,$=W.width/2,R=W.circularPathData,W.circularLinkType==="top"?"M "+R.targetX+" "+(R.targetY+$)+" L"+R.rightInnerExtent+" "+(R.targetY+$)+"A"+(R.rightLargeArcRadius+$)+" "+(R.rightSmallArcRadius+$)+" 0 0 1 "+(R.rightFullExtent-$)+" "+(R.targetY-R.rightSmallArcRadius)+"L"+(R.rightFullExtent-$)+" "+R.verticalRightInnerExtent+"A"+(R.rightLargeArcRadius+$)+" "+(R.rightLargeArcRadius+$)+" 0 0 1 "+R.rightInnerExtent+" "+(R.verticalFullExtent-$)+"L"+R.leftInnerExtent+" "+(R.verticalFullExtent-$)+"A"+(R.leftLargeArcRadius+$)+" "+(R.leftLargeArcRadius+$)+" 0 0 1 "+(R.leftFullExtent+$)+" "+R.verticalLeftInnerExtent+"L"+(R.leftFullExtent+$)+" "+(R.sourceY-R.leftSmallArcRadius)+"A"+(R.leftLargeArcRadius+$)+" "+(R.leftSmallArcRadius+$)+" 0 0 1 "+R.leftInnerExtent+" "+(R.sourceY+$)+"L"+R.sourceX+" "+(R.sourceY+$)+"L"+R.sourceX+" "+(R.sourceY-$)+"L"+R.leftInnerExtent+" "+(R.sourceY-$)+"A"+(R.leftLargeArcRadius-$)+" "+(R.leftSmallArcRadius-$)+" 0 0 0 "+(R.leftFullExtent-$)+" "+(R.sourceY-R.leftSmallArcRadius)+"L"+(R.leftFullExtent-$)+" "+R.verticalLeftInnerExtent+"A"+(R.leftLargeArcRadius-$)+" "+(R.leftLargeArcRadius-$)+" 0 0 0 "+R.leftInnerExtent+" "+(R.verticalFullExtent+$)+"L"+R.rightInnerExtent+" "+(R.verticalFullExtent+$)+"A"+(R.rightLargeArcRadius-$)+" "+(R.rightLargeArcRadius-$)+" 0 0 0 "+(R.rightFullE
1353xtent+$)+" "+R.verticalRightInnerExtent+"L"+(R.rightFullExtent+$)+" "+(R.targetY-R.rightSmallArcRadius)+"A"+(R.rightLargeArcRadius-$)+" "+(R.rightSmallArcRadius-$)+" 0 0 0 "+R.rightInnerExtent+" "+(R.targetY-$)+"L"+R.targetX+" "+(R.targetY-$)+"Z":"M "+R.targetX+" "+(R.targetY-$)+" L"+R.rightInnerExtent+" "+(R.targetY-$)+"A"+(R.rightLargeArcRadius+$)+" "+(R.rightSmallArcRadius+$)+" 0 0 0 "+(R.rightFullExtent-$)+" "+(R.targetY+R.rightSmallArcRadius)+"L"+(R.rightFullExtent-$)+" "+R.verticalRightInnerExtent+"A"+(R.rightLargeArcRadius+$)+" "+(R.rightLargeArcRadius+$)+" 0 0 0 "+R.rightInnerExtent+" "+(R.verticalFullExtent+$)+"L"+R.leftInnerExtent+" "+(R.verticalFullExtent+$)+"A"+(R.leftLargeArcRadius+$)+" "+(R.leftLargeArcRadius+$)+" 0 0 0 "+(R.leftFullExtent+$)+" "+R.verticalLeftInnerExtent+"L"+(R.leftFullExtent+$)+" "+(R.sourceY+R.leftSmallArcRadius)+"A"+(R.leftLargeArcRadius+$)+" "+(R.leftSmallArcRadius+$)+" 0 0 0 "+R.leftInnerExtent+" "+(R.sourceY-$)+"L"+R.sourceX+" "+(R.sourceY-$)+"L"+R.sourceX+" "+(R.sourceY+$)+"L"+R.leftInnerExtent+" "+(R.sourceY+$)+"A"+(R.leftLargeArcRadius-$)+" "+(R.leftSmallArcRadius-$)+" 0 0 1 "+(R.leftFullExtent-$)+" "+(R.sourceY+R.leftSmallArcRadius)+"L"+(R.leftFullExtent-$)+" "+R.verticalLeftInnerExtent+"A"+(R.leftLargeArcRadius-$)+" "+(R.leftLargeArcRadius-$)+" 0 0 1 "+R.leftInnerExtent+" "+(R.verticalFullExtent-$)+"L"+R.rightInnerExtent+" "+(R.verticalFullExtent-$)+"A"+(R.rightLargeArcRadius-$)+" "+(R.rightLargeArcRadius-$)+" 0 0 1 "+(R.rightFullExtent+$)+" "+R.verticalRightInnerExtent+"L"+(R.rightFullExtent+$)+" "+(R.targetY+R.rightSmallArcRadius)+"A"+(R.rightLargeArcRadius-$)+" "+(R.rightSmallArcRadius-$)+" 0 0 1 "+R.rightInnerExtent+" "+(R.targetY+$)+"L"+R.targetX+" "+(R.targetY+$)+"Z";var W,$,R,N=q.link.source.x1,U=q.link.target.x0,Q=m(N,U),j=Q(.5),X=Q(.5),J=q.link.y0-q.link.width/2,re=q.link.y0+q.link.width/2,ne=q.link.y1-q.link.width/2,se=q.link.y1+q.link.width/2;return"M"+N+","+J+"C"+j+","+J+" "+X+","+ne+" "+U+","+ne+"L"+U+","+se+"C"+X+","+se+" "+j+","+re+" "+N+","+re+"Z"}}function L(q,W){var $=t(W.color),R=n.nodePadAcross,N=q.nodePad/2;W.dx=W.x1-W.x0,W.dy=W.y1-W.y0;var U=W.dx,Q=Math.max(.5,W.dy),j="node_"+W.pointNumber;return W.group&&(j=d.randstr()),W.trace=q.trace,W.curveNumber=q.trace.index,{index:W.pointNumber,key:j,partOfGroup:W.partOfGroup||!1,group:W.group,traceId:q.key,trace:q.trace,node:W,nodePad:q.nodePad,nodeLineColor:q.nodeLineColor,nodeLineWidth:q.nodeLineWidth,textFont:q.textFont,size:q.horizontal?q.height:q.width,visibleWidth:Math.ceil(U),visibleHeight:Q,zoneX:-R,zoneY:-N,zoneWidth:U+2*R,zoneHeight:Q+2*N,labelY:q.horizontal?W.dy/2+1:W.dx/2+1,left:W.originalLayer===1,sizeAcross:q.width,forceLayouts:q.forceLayouts,horizontal:q.horizontal,darkBackground:$.getBrightness()<=128,tinyColorHue:o.tinyRGB($),tinyColorAlpha:$.getAlpha(),valueFormat:q.valueFormat,valueSuffix:q.valueSuffix,sankey:q.sankey,graph:q.graph,arrangement:q.arrangement,uniqueNodeLabelPathId:[q.guid,q.key,j].join("_"),interactionState:q.interactionState,figure:q}}function A(q){q.attr("transform",function(W){return c(W.node.x0.toFixed(3),W.node.y0.toFixed(3))})}function I(q){q.call(A)}function P(q,W){q.call(I),W.attr("d",k())}function S(q){q.attr("width",function(W){return W.node.x1-W.node.x0}).attr("height",function(W){return W.visibleHeight})}function E(q){return q.link.width>1||q.linkLineWidth>0}function D(q){return c(q.translateX,q.translateY)+(q.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function F(q,W,$){q.on(".basic",null).on("mouseover.basic",function(R){R.interactionState.dragInProgress||R.partOfGroup||($.hover(this,R,W),R.interactionState.hovered=[this,R])}).on("mousemove.basic",function(R){R.interactionState.dragInProgress||R.partOfGroup||($.follow(this,R),R.interactionState.hovered=[this,R])}).on("mouseout.basic",function(R){R.interactionState.dragInProgress||R.partOfGroup||($.unhover(this,R,W),R.interactionState.hovered=!1)}).on("click.basic",function(R){R.interactionState.hovered&&($.unhover(this,R,W),R.interactionState.hovered=!1),R.interactionState.dragInProgress||R.partOfGroup||$.select(this,R,W)})}function H(q,W,$,R){var N=b.behavior.drag().origin(function(U){return{x:U.node.x0+U.visibleWidth/2,y:U.node.y0+U.visibleHeight/2}}
1353).on("dragstart",function(U){if(U.arrangement!=="fixed"&&(d.ensureSingle(R._fullLayout._infolayer,"g","dragcover",function(j){R._fullLayout._dragCover=j}),d.raiseToTop(this),U.interactionState.dragInProgress=U.node,Z(U.node),U.interactionState.hovered&&($.nodeEvents.unhover.apply(0,U.interactionState.hovered),U.interactionState.hovered=!1),U.arrangement==="snap")){var Q=U.traceId+"|"+U.key;U.forceLayouts[Q]?U.forceLayouts[Q].alpha(1):function(j,X,J,re){(function(se){for(var oe=0;oe<se.length;oe++)se[oe].y=(se[oe].y0+se[oe].y1)/2,se[oe].x=(se[oe].x0+se[oe].x1)/2})(J.graph.nodes);var ne=J.graph.nodes.filter(function(se){return se.originalX===J.node.originalX}).filter(function(se){return!se.partOfGroup});J.forceLayouts[X]=g.forceSimulation(ne).alphaDecay(0).force("collide",g.forceCollide().radius(function(se){return se.dy/2+J.nodePad/2}).strength(1).iterations(n.forceIterations)).force("constrain",function(se,oe,pe,ce){return function(){for(var de=0,xe=0;xe<pe.length;xe++){var we=pe[xe];we===ce.interactionState.dragInProgress?(we.x=we.lastDraggedX,we.y=we.lastDraggedY):(we.vx=(we.originalX-we.x)/n.forceTicksPerFrame,we.y=Math.min(ce.size-we.dy/2,Math.max(we.dy/2,we.y))),de=Math.max(de,Math.abs(we.vx),Math.abs(we.vy))}!ce.interactionState.dragInProgress&&de<.1&&ce.forceLayouts[oe].alpha()>0&&ce.forceLayouts[oe].alpha(0)}}(0,X,ne,J)).stop()}(0,Q,U),function(j,X,J,re,ne){window.requestAnimationFrame(function se(){var oe;for(oe=0;oe<n.forceTicksPerFrame;oe++)J.forceLayouts[re].tick();if(function(ce){for(var de=0;de<ce.length;de++)ce[de].y0=ce[de].y-ce[de].dy/2,ce[de].y1=ce[de].y0+ce[de].dy,ce[de].x0=ce[de].x-ce[de].dx/2,ce[de].x1=ce[de].x0+ce[de].dx}(J.graph.nodes),J.sankey.update(J.graph),P(j.filter(K(J)),X),J.forceLayouts[re].alpha()>0)window.requestAnimationFrame(se);else{var pe=J.node.originalX;J.node.x0=pe-J.visibleWidth/2,J.node.x1=pe+J.visibleWidth/2,V(J,ne)}})}(q,W,U,Q,R)}}).on("drag",function(U){if(U.arrangement!=="fixed"){var Q=b.event.x,j=b.event.y;U.arrangement==="snap"?(U.node.x0=Q-U.visibleWidth/2,U.node.x1=Q+U.visibleWidth/2,U.node.y0=j-U.visibleHeight/2,U.node.y1=j+U.visibleHeight/2):(U.arrangement==="freeform"&&(U.node.x0=Q-U.visibleWidth/2,U.node.x1=Q+U.visibleWidth/2),j=Math.max(0,Math.min(U.size-U.visibleHeight/2,j)),U.node.y0=j-U.visibleHeight/2,U.node.y1=j+U.visibleHeight/2),Z(U.node),U.arrangement!=="snap"&&(U.sankey.update(U.graph),P(q.filter(K(U)),W))}}).on("dragend",function(U){if(U.arrangement!=="fixed"){U.interactionState.dragInProgress=!1;for(var Q=0;Q<U.node.childrenNodes.length;Q++)U.node.childrenNodes[Q].x=U.node.x,U.node.childrenNodes[Q].y=U.node.y;U.arrangement!=="snap"&&V(U,R)}});q.on(".drag",null).call(N)}function V(q,W){for(var $=[],R=[],N=0;N<q.graph.nodes.length;N++){var U=(q.graph.nodes[N].x0+q.graph.nodes[N].x1)/2,Q=(q.graph.nodes[N].y0+q.graph.nodes[N].y1)/2;$.push(U/q.figure.width),R.push(Q/q.figure.height)}a.call("_guiRestyle",W,{"node.x":[$],"node.y":[R]},q.trace.index).then(function(){W._fullLayout._dragCover&&W._fullLayout._dragCover.remove()})}function Z(q){q.lastDraggedX=q.x0+q.dx/2,q.lastDraggedY=q.y0+q.dy/2}function K(q){return function(W){return W.node.originalX===q.node.originalX}}ee.exports=function(q,W,$,R,N){var U=!1;d.ensureSingle(q._fullLayout._infolayer,"g","first-render",function(){U=!0});var Q=q._fullLayout._dragCover,j=$.filter(function(ce){return h(ce).trace.visible}).map(_.bind(null,R)),X=W.selectAll("."+n.cn.sankey).data(j,f);X.exit().remove(),X.enter().append("g").classed(n.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events","auto").attr("transform",D),X.each(function(ce,de){q._fullData[de]._sankey=ce;var xe="bgsankey-"+ce.trace.uid+"-"+de;d.ensureSingle(q._fullLayout._draggers,"rect",xe),q._fullData[de]._bgRect=b.select("."+xe),q._fullData[de]._bgRect.style("pointer-events","all").attr("width",ce.width).attr("height",ce.height).attr("x",ce.translateX).attr("y",ce.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),X.transition().ease(n.ease).duration(n.duration).attr("transform",D);var J=X.selectAll("."+n.cn.sankeyLinks).data(s,f);J.enter().append("g").classed(n.cn.sankeyLinks,!0).style("fill","none");var re=J.selectAll("."+n.cn.sankeyLink).data(function(ce){return ce.graph.links.filter(function(de){return de.value}).map(T.bind(null,ce))},f);re.enter().append("path").classed(n.cn.sankeyLink,!0).call(F,X,N.linkEvents),re.style("stroke",function(ce){return E(ce)?o.tinyRGB(t(ce.linkLineColor)):ce.tinyColorHue}).style("stroke-opacity",function(ce){return E(ce)?o.opacity(ce.linkLineColor):ce.tinyColorAlpha}).style("fill",function(ce){return ce.tinyColorHue}).style("fill-opacity",function(ce){return ce.tinyColorAlpha}).style("stroke-width",function(ce){return E(ce)?ce.linkLineWidth:1}).attr("d",k()),re.style("opacity",function(){return q._context.staticPlot||U||Q?1:0}).transition().ease(n.ease).duration(n.duration).style("opacity",1),re.exit().transition().ease(n.ease).duration(n.duration).style("opacity",0).remove();var ne=X.selectAll("."+n.cn.sankeyNodeSet).data(s,f);ne.enter().append("g").classed(n.cn.sankeyNodeSet,!0),ne.style("cursor",function(ce){switch(ce.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var se=ne.selectAll("."+n.cn.sankeyNode).data(function(ce){var de=ce.graph.nodes;return function(xe){var we,be=[];for(we=0;we<xe.length;
1353we++)xe[we].originalX=(xe[we].x0+xe[we].x1)/2,xe[we].originalY=(xe[we].y0+xe[we].y1)/2,be.indexOf(xe[we].originalX)===-1&&be.push(xe[we].originalX);for(be.sort(function(Ee,fe){return Ee-fe}),we=0;we<xe.length;we++)xe[we].originalLayerIndex=be.indexOf(xe[we].originalX),xe[we].originalLayer=xe[we].originalLayerIndex/(be.length-1)}(de),de.map(L.bind(null,ce))},f);se.enter().append("g").classed(n.cn.sankeyNode,!0).call(A).style("opacity",function(ce){return!q._context.staticPlot&&!U||ce.partOfGroup?0:1}),se.call(F,X,N.nodeEvents).call(H,re,N,q),se.transition().ease(n.ease).duration(n.duration).call(A).style("opacity",function(ce){return ce.partOfGroup?0:1}),se.exit().transition().ease(n.ease).duration(n.duration).style("opacity",0).remove();var oe=se.selectAll("."+n.cn.nodeRect).data(s);oe.enter().append("rect").classed(n.cn.nodeRect,!0).call(S),oe.style("stroke-width",function(ce){return ce.nodeLineWidth}).style("stroke",function(ce){return o.tinyRGB(t(ce.nodeLineColor))}).style("stroke-opacity",function(ce){return o.opacity(ce.nodeLineColor)}).style("fill",function(ce){return ce.tinyColorHue}).style("fill-opacity",function(ce){return ce.tinyColorAlpha}),oe.transition().ease(n.ease).duration(n.duration).call(S);var pe=se.selectAll("."+n.cn.nodeLabel).data(s);pe.enter().append("text").classed(n.cn.nodeLabel,!0).style("cursor","default"),pe.attr("data-notex",1).text(function(ce){return ce.node.label}).each(function(ce){var de=b.select(this);r.font(de,ce.textFont),p.convertToTspans(de,q)}).style("text-shadow",p.makeTextShadow(q._fullLayout.paper_bgcolor)).attr("text-anchor",function(ce){return ce.horizontal&&ce.left?"end":"start"}).attr("transform",function(ce){var de=b.select(this),xe=p.lineCount(de),we=ce.textFont.size*((xe-1)*w-l),be=ce.nodeLineWidth/2+3,Ee=((ce.horizontal?ce.visibleHeight:ce.visibleWidth)-we)/2;ce.horizontal&&(ce.left?be=-be:be+=ce.visibleWidth);var fe=ce.horizontal?"":"scale(-1,1)"+i(90);return c(ce.horizontal?be:Ee,ce.horizontal?Ee:be)+fe}),pe.transition().ease(n.ease).duration(n.duration)}},{"../../components/color":366,"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/gup":500,"../../lib/svg_text_utils":529,"../../registry":638,"./constants":919,"@plotly/d3":58,"@plotly/d3-sankey":57,"@plotly/d3-sankey-circular":56,"d3-force":111,"d3-interpolate":116,tinycolor2:312}],924:[function(y,ee,te){ee.exports=function(g,m){for(var b=[],v=g.cd[0].trace,e=v._sankey.graph.nodes,n=0;n<e.length;n++){var t=e[n];if(!t.partOfGroup){var o=[(t.x0+t.x1)/2,(t.y0+t.y1)/2];v.orientation==="v"&&o.reverse(),m&&m.contains(o,!1,n,g)&&b.push({pointNumber:t.pointNumber})}}return b}},{}],925:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b){for(var v=0;v<m.length;v++)m[v].i=v;g.mergeArray(b.text,m,"tx"),g.mergeArray(b.texttemplate,m,"txt"),g.mergeArray(b.hovertext,m,"htx"),g.mergeArray(b.customdata,m,"data"),g.mergeArray(b.textposition,m,"tp"),b.textfont&&(g.mergeArrayCastPositive(b.textfont.size,m,"ts"),g.mergeArray(b.textfont.color,m,"tc"),g.mergeArray(b.textfont.family,m,"tf"));var e=b.marker;if(e){g.mergeArrayCastPositive(e.size,m,"ms"),g.mergeArrayCastPositive(e.opacity,m,"mo"),g.mergeArray(e.symbol,m,"mx"),g.mergeArray(e.color,m,"mc");var n=e.line;e.line&&(g.mergeArray(n.color,m,"mlc"),g.mergeArrayCastPositive(n.width,m,"mlw"));var t=e.gradient;t&&t.type!=="none"&&(g.mergeArray(t.type,m,"mgt"),g.mergeArray(t.color,m,"mgc"))}}},{"../../lib":503}],926:[function(y,ee,te){var g=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,m=y("../../plots/template_attributes").texttemplateAttrs,b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../../components/colorscale/attributes"),e=y("../../plots/font_attributes"),n=y("../../components/drawing/attributes").dash,t=y("../../components/drawing/attributes").pattern,o=y("../../components/drawing"),r=y("./constants"),d=y("../../lib/extend").extendFlat;ee.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:g("x"),yhoverformat:g("y"),stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:m({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:b({},{keys:r.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:d({},n,{editType:"style"}),simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:{valType:"color",editType:"style",anim:!0}
1353,fillpattern:t,marker:d({symbol:{valType:"enumerated",values:o.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},v("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},v("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:e({editType:"calc",colorEditType:"style",arrayOk:!0})}},{"../../components/colorscale/attributes":373,"../../components/drawing":388,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"./constants":930}],927:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../plots/cartesian/axes"),v=y("../../plots/cartesian/align_period"),e=y("../../constants/numerical").BADNUM,n=y("./subtypes"),t=y("./colorscale_calc"),o=y("./arrays_to_calcdata"),r=y("./calc_selection");function d(s,h,p,a,x,l,w){var _=h._length,T=s._fullLayout,k=p._id,L=a._id,A=T._firstScatter[u(h)]===h.uid,I=(f(h,T,p,a)||{}).orientation,P=h.fill;p._minDtick=0,a._minDtick=0;var S={padded:!0},E={padded:!0};w&&(S.ppad=E.ppad=w);var D=_<2||x[0]!==x[_-1]||l[0]!==l[_-1];D&&(P==="tozerox"||P==="tonextx"&&(A||I==="h"))?S.tozero=!0:(h.error_y||{}).visible||P!=="tonexty"&&P!=="tozeroy"&&(n.hasMarkers(h)||n.hasText(h))||(S.padded=!1,S.ppad=0),D&&(P==="tozeroy"||P==="tonexty"&&(A||I==="v"))?E.tozero=!0:P!=="tonextx"&&P!=="tozerox"||(E.padded=!1),k&&(h._extremes[k]=b.findExtremes(p,x,S)),L&&(h._extremes[L]=b.findExtremes(a,l,E))}function c(s,h){if(n.hasMarkers(s)){var p,a=s.marker,x=1.6*(s.marker.sizeref||1);if(p=s.marker.sizemode==="area"?function(k){return Math.max(Math.sqrt((k||0)/x),3)}:function(k){return Math.max((k||0)/x,3)},m.isArrayOrTypedArray(a.size)){var l={type:"linear"};b.setConvert(l);for(var w=l.makeCalcdata(s.marker,"size"),_=new Array(h),T=0;T<h;T++)_[T]=p(w[T]);return _}return p(a.size)}}function i(s,h){var p=u(h),a=s._firstScatter;a[p]||(a[p]=h.uid)}function u(s){var h=s.stackgroup;return s.xaxis+s.yaxis+s.type+(h?"-"+h:"")}function f(s,h,p,a){var x=s.stackgroup;if(x){var l=h._scatterStackOpts[p._id+a._id][x],w=l.orientation==="v"?a:p;return w.type==="linear"||w.type==="log"?l:void 0}}ee.exports={calc:function(s,h){var p,a,x,l,w,_,T=s._fullLayout,k=b.getFromId(s,h.xaxis||"x"),L=b.getFromId(s,h.yaxis||"y"),A=k.makeCalcdata(h,"x"),I=L.makeCalcdata(h,"y"),P=v(h,k,"x",A),S=v(h,L,"y",I),E=P.vals,D=S.vals,F=h._length,H=new Array(F),V=h.ids,Z=f(h,T,k,L),K=!1;i(T,h);var q,W="x",$="y";Z?(m.pushUnique(Z.traceIndices,h._expandedIndex),(p=Z.orientation==="v")?($="s",q="x"):(W="s",q="y"),w=Z.stackgaps==="interpolate"):d(s,h,k,L,E,D,c(h,F));var R=!!h.xperiodalignment,N=!!h.yperiodalignment;for(a=0;a<F;a++){var U=H[a]={}
1353,Q=g(E[a]),j=g(D[a]);Q&&j?(U[W]=E[a],U[$]=D[a],R&&(U.orig_x=A[a],U.xEnd=P.ends[a],U.xStart=P.starts[a]),N&&(U.orig_y=I[a],U.yEnd=S.ends[a],U.yStart=S.starts[a])):Z&&(p?Q:j)?(U[q]=p?E[a]:D[a],U.gap=!0,w?(U.s=e,K=!0):U.s=0):U[W]=U[$]=e,V&&(U.id=String(V[a]))}if(o(H,h),t(s,h),r(H,h),Z){for(a=0;a<H.length;)H[a][q]===e?H.splice(a,1):a++;if(m.sort(H,function(ne,se){return ne[q]-se[q]||ne.i-se.i}),K){for(a=0;a<H.length-1&&H[a].gap;)a++;for((_=H[a].s)||(_=H[a].s=0),x=0;x<a;x++)H[x].s=_;for(l=H.length-1;l>a&&H[l].gap;)l--;for(_=H[l].s,x=H.length-1;x>l;x--)H[x].s=_;for(;a<l;)if(H[++a].gap){for(x=a+1;H[x].gap;)x++;for(var X=H[a-1][q],J=H[a-1].s,re=(H[x].s-J)/(H[x][q]-X);a<x;)H[a].s=J+(H[a][q]-X)*re,a++}}}return H},calcMarkerSize:c,calcAxisExpansion:d,setFirstScatter:i,getStackOpts:f}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"./arrays_to_calcdata":925,"./calc_selection":928,"./colorscale_calc":929,"./subtypes":951,"fast-isnumeric":190}],928:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b){g.isArrayOrTypedArray(b.selectedpoints)&&g.tagSelected(m,b)}},{"../../lib":503}],929:[function(y,ee,te){var g=y("../../components/colorscale/helpers").hasColorscale,m=y("../../components/colorscale/calc"),b=y("./subtypes");ee.exports=function(v,e){b.hasLines(e)&&g(e,"line")&&m(v,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),b.hasMarkers(e)&&(g(e,"marker")&&m(v,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),g(e,"marker.line")&&m(v,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"./subtypes":951}],930:[function(y,ee,te){ee.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},{}],931:[function(y,ee,te){var g=y("./calc");function m(b,v,e,n,t,o,r){t[n]=!0;var d={i:null,gap:!0,s:0};if(d[r]=e,b.splice(v,0,d),v&&e===b[v-1][r]){var c=b[v-1];d.s=c.s,d.i=c.i,d.gap=c.gap}else o&&(d.s=function(i,u,f,s){var h=i[u-1],p=i[u+1];return p?h?h.s+(p.s-h.s)*(f-h[s])/(p[s]-h[s]):p.s:h.s}(b,v,e,r));v||(b[0].t=b[1].t,b[0].trace=b[1].trace,delete b[1].t,delete b[1].trace)}ee.exports=function(b,v){var e=v.xaxis,n=v.yaxis,t=e._id+n._id,o=b._fullLayout._scatterStackOpts[t];if(o){var r,d,c,i,u,f,s,h,p,a,x,l,w,_,T,k=b.calcdata;for(var L in o){var A=(a=o[L]).traceIndices;if(A.length){for(x=a.stackgaps==="interpolate",l=a.groupnorm,a.orientation==="v"?(w="x",_="y"):(w="y",_="x"),T=new Array(A.length),r=0;r<T.length;r++)T[r]=!1;f=k[A[0]];var I=new Array(f.length);for(r=0;r<f.length;r++)I[r]=f[r][w];for(r=1;r<A.length;r++){for(u=k[A[r]],d=c=0;d<u.length;d++){for(s=u[d][w];s>I[c]&&c<I.length;c++)m(u,d,I[c],r,T,x,w),d++;if(s!==I[c]){for(i=0;i<r;i++)m(k[A[i]],c,s,i,T,x,w);I.splice(c,0,s)}c++}for(;c<I.length;c++)m(u,d,I[c],r,T,x,w),d++}var P=I.length;for(d=0;d<f.length;d++){for(h=f[d][_]=f[d].s,r=1;r<A.length;r++)(u=k[A[r]])[0].trace._rawLength=u[0].trace._length,u[0].trace._length=P,h+=u[d].s,u[d][_]=h;if(l)for(p=(l==="fraction"?h:h/100)||1,r=0;r<A.length;r++){var S=k[A[r]][d];S[_]/=p,S.sNorm=S.s/p}}for(r=0;r<A.length;r++){var E=(u=k[A[r]])[0].trace,D=g.calcMarkerSize(E,E._rawLength),F=Array.isArray(D);if(D&&T[r]||F){var H=D;for(D=new Array(P),d=0;d<P;d++)D[d]=u[d].gap?0:F?H[u[d].i]:H}var V=new Array(P),Z=new Array(P);for(d=0;d<P;d++)V[d]=u[d].x,Z[d]=u[d].y;g.calcAxisExpansion(b,E,e,n,V,Z,D),u[0].t.orientation=a.orientation}}}}}},{"./calc":927}],932:[function(y,ee,te){ee.exports=function(g){for(var m=0;m<g.length;m++){var b=g[m];if(b.type==="scatter"){var v=b.fill;if(v!=="none"&&v!=="toself"&&(b.opacity=void 0,v==="tonexty"||v==="tonextx"))for(var e=m-1;e>=0;e--){var n=g[e];if(n.type==="scatter"&&n.xaxis===b.xaxis&&n.yaxis===b.yaxis){n.opacity=void 0;break}}}}}},{}],933:[function(y,ee,te){var g=y("../../lib"),m=y("../../registry"),b=y("./attributes"),v=y("./constants"),e=y("./subtypes"),n=y("./xy_defaults"),t=y("./period_defaults"),o=y("./stack_defaults"),r=y("./marker_defaults"),d=y("./line_defaults"),c=y("./line_shape_defaults"),i=y("./text_defaults"),u=y("./fillcolor_defaults"),f=y("../../lib").coercePattern;ee.exports=function(s,h,p,a){function x(I,P){return g.coerce(s,h,b,I,P)}var l=n(s,h,a,x);if(l||(h.visible=!1),h.visible){t(s,h,a,x),x("xhoverformat"),x("yhoverformat");var w=o(s,h,a,x),_=!w&&l<v.PTS_LINESONLY?"lines+markers":"lines";
1353x("text"),x("hovertext"),x("mode",_),e.hasLines(h)&&(d(s,h,p,a,x),c(s,h,x),x("connectgaps"),x("line.simplify")),e.hasMarkers(h)&&r(s,h,p,a,x,{gradient:!0}),e.hasText(h)&&(x("texttemplate"),i(s,h,a,x));var T=[];(e.hasMarkers(h)||e.hasText(h))&&(x("cliponaxis"),x("marker.maxdisplayed"),T.push("points")),x("fill",w?w.fillDflt:"none"),h.fill!=="none"&&(u(s,h,p,x),e.hasLines(h)||c(s,h,x),f(x,"fillpattern",h.fillcolor,!1));var k=(h.line||{}).color,L=(h.marker||{}).color;h.fill!=="tonext"&&h.fill!=="toself"||T.push("fills"),x("hoveron",T.join("+")||"points"),h.hoveron!=="fills"&&x("hovertemplate");var A=m.getComponentMethod("errorbars","supplyDefaults");A(s,h,k||L||p,{axis:"y"}),A(s,h,k||L||p,{axis:"x",inherit:"y"}),g.coerceSelectionMarkerOpacity(h,x)}}},{"../../lib":503,"../../registry":638,"./attributes":926,"./constants":930,"./fillcolor_defaults":934,"./line_defaults":939,"./line_shape_defaults":941,"./marker_defaults":945,"./period_defaults":946,"./stack_defaults":949,"./subtypes":951,"./text_defaults":952,"./xy_defaults":953}],934:[function(y,ee,te){var g=y("../../components/color"),m=y("../../lib").isArrayOrTypedArray;ee.exports=function(b,v,e,n){var t=!1;if(v.marker){var o=v.marker.color,r=(v.marker.line||{}).color;o&&!m(o)?t=o:r&&!m(r)&&(t=r)}n("fillcolor",g.addOpacity((v.line||{}).color||t||e,.5))}},{"../../components/color":366,"../../lib":503}],935:[function(y,ee,te){var g=y("../../plots/cartesian/axes");ee.exports=function(m,b,v){var e={},n={_fullLayout:v},t=g.getFromTrace(n,b,"x"),o=g.getFromTrace(n,b,"y");return e.xLabel=g.tickText(t,t.c2l(m.x),!0).text,e.yLabel=g.tickText(o,o.c2l(m.y),!0).text,e}},{"../../plots/cartesian/axes":554}],936:[function(y,ee,te){var g=y("../../components/color"),m=y("./subtypes");ee.exports=function(b,v){var e,n;if(b.mode==="lines")return(e=b.line.color)&&g.opacity(e)?e:b.fillcolor;if(b.mode==="none")return b.fill?b.fillcolor:"";var t=v.mcc||(b.marker||{}).color,o=v.mlcc||((b.marker||{}).line||{}).color;return(n=t&&g.opacity(t)?t:o&&g.opacity(o)&&(v.mlw||((b.marker||{}).line||{}).width)?o:"")?g.opacity(n)<.3?g.addOpacity(n,.3):n:(e=(b.line||{}).color)&&g.opacity(e)&&m.hasLines(b)&&b.line.width?e:b.fillcolor}},{"../../components/color":366,"./subtypes":951}],937:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/fx"),b=y("../../registry"),v=y("./get_trace_color"),e=y("../../components/color"),n=g.fillText;ee.exports=function(t,o,r,d){var c=t.cd,i=c[0].trace,u=t.xa,f=t.ya,s=u.c2p(o),h=f.c2p(r),p=[s,h],a=i.hoveron||"",x=i.mode.indexOf("markers")!==-1?3:.5,l=!!i.xperiodalignment,w=!!i.yperiodalignment;if(a.indexOf("points")!==-1){var _=function(oe){var pe=Math.max(x,oe.mrc||0),ce=u.c2p(oe.x)-s,de=f.c2p(oe.y)-h;return Math.max(Math.sqrt(ce*ce+de*de)-pe,1-x/pe)},T=m.getDistanceFunction(d,function(oe){if(l){var pe=u.c2p(oe.xStart),ce=u.c2p(oe.xEnd);return s>=Math.min(pe,ce)&&s<=Math.max(pe,ce)?0:1/0}var de=Math.max(3,oe.mrc||0),xe=1-1/de,we=Math.abs(u.c2p(oe.x)-s);return we<de?xe*we/de:we-de+xe},function(oe){if(w){var pe=f.c2p(oe.yStart),ce=f.c2p(oe.yEnd);return h>=Math.min(pe,ce)&&h<=Math.max(pe,ce)?0:1/0}var de=Math.max(3,oe.mrc||0),xe=1-1/de,we=Math.abs(f.c2p(oe.y)-h);return we<de?xe*we/de:we-de+xe},_);if(m.getClosest(c,T,t),t.index!==!1){var k=c[t.index],L=u.c2p(k.x,!0),A=f.c2p(k.y,!0),I=k.mrc||1;t.index=k.i;var P=c[0].t.orientation,S=P&&(k.sNorm||k.s),E=P==="h"?S:k.orig_x!==void 0?k.orig_x:k.x,D=P==="v"?S:k.orig_y!==void 0?k.orig_y:k.y;return g.extendFlat(t,{color:v(i,k),x0:L-I,x1:L+I,xLabelVal:E,y0:A-I,y1:A+I,yLabelVal:D,spikeDistance:_(k),hovertemplate:i.hovertemplate}),n(k,i,t),b.getComponentMethod("errorbars","hoverInfo")(k,i,t),[t]}}if(a.indexOf("fills")!==-1&&i._polygons){var F,H,V,Z,K,q,W,$,R,N=i._polygons,U=[],Q=!1,j=1/0,X=-1/0,J=1/0,re=-1/0;for(F=0;F<N.length;F++)(V=N[F]).contains(p)&&(Q=!Q,U.push(V),J=Math.min(J,V.ymin),re=Math.max(re,V.ymax));if(Q){var ne=((J=Math.max(J,0))+(re=Math.min(re,f._length)))/2;for(F=0;F<U.length;F++)for(Z=U[F].pts,H=1;H<Z.length;H++)($=Z[H-1][1])>ne!=(R=Z[H][1])>=ne&&(q=Z[H-1][0],W=Z[H][0],R-$&&(K=q+(W-q)*(ne-$)/(R-$),j=Math.min(j,K),X=Math.max(X,K)));j=Math.max(j,0),X=Math.min(X,u._length);var se=e.defaultLine;return e.opacity(i.fillcolor)?se=i.fillcolor:e.opacity((i.line||{}).color)&&(se=i.line.color),g.extendFlat(t,{distance:t.maxHoverDistance,x0:j,x1:X,y0:ne,y1:ne,color:se,hovertemplate:!1}),delete t.index,i.text&&!Array.isArray(i.text)?t.text=String(i.text):t.text=i.name,[t]}}}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"../../registry":638,"./get_trace_color":936}],938:[function(y,ee,te){var g=y("./subtypes");ee.exports={hasLines:g.hasLines,hasMarkers:g.hasMarkers,hasText:g.hasText,isBubble:g.isBubble,attributes:y("./attributes"),supplyDefaults:y("./defaults"),crossTraceDefaults:y("./cross_trace_defaults"),calc:y("./calc").calc,crossTraceCalc:y("./cross_trace_calc"),arraysToCalcdata:y("./arrays_to_calcdata"),plot:y("./plot"),colorbar:y("./marker_colorbar"),formatLabels:y("./format_labels"),style:y("./style").style,styleOnSelect:y("./style").styleOnSelect,hoverPoints:y("./hover"),selectPoints:y("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"./arrays_to_calcdata":925,"./attributes":926,"./calc":927,"./cross_trace_calc":931,"./cross_trace_defaults":932,"./defaults":933,"./format_labels":935,"./hover":937,"./marker_colorbar":944,"./plot":947,"./select":948,"./style":950,"./subtypes":951}],939:[function(y,ee,te){var g=y("../../lib").isArrayOrTypedArray,m=y("../../components/colorscale/helpers").hasColorscale,b=y("../../components/colorscale/defaults");ee.exports=function(v,e,n,t,o,r){var d=(v.marker||{}).color;o("line.color",n),m(v,"line")?b(v,e,t,o,{prefix:"line.",cLetter:"c"}):o("line.color",!g(d)&&d||n),o("line.width"),(r||{}
1353).noDash||o("line.dash")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],940:[function(y,ee,te){var g=y("../../constants/numerical"),m=g.BADNUM,b=g.LOG_CLIP,v=b+.5,e=b-.5,n=y("../../lib"),t=n.segmentsIntersect,o=n.constrain,r=y("./constants");ee.exports=function(d,c){var i,u,f,s,h,p,a,x,l,w,_,T,k,L,A,I,P,S,E=c.xaxis,D=c.yaxis,F=E.type==="log",H=D.type==="log",V=E._length,Z=D._length,K=c.connectGaps,q=c.baseTolerance,W=c.shape,$=W==="linear",R=c.fill&&c.fill!=="none",N=[],U=r.minTolerance,Q=d.length,j=new Array(Q),X=0;function J(Ye){var tt=d[Ye];if(!tt)return!1;var lt=c.linearized?E.l2p(tt.x):E.c2p(tt.x),vt=c.linearized?D.l2p(tt.y):D.c2p(tt.y);if(lt===m){if(F&&(lt=E.c2p(tt.x,!0)),lt===m)return!1;H&&vt===m&&(lt*=Math.abs(E._m*Z*(E._m>0?v:e)/(D._m*V*(D._m>0?v:e)))),lt*=1e3}if(vt===m){if(H&&(vt=D.c2p(tt.y,!0)),vt===m)return!1;vt*=1e3}return[lt,vt]}function re(Ye,tt,lt,vt){var It=lt-Ye,St=vt-tt,rt=.5-Ye,et=.5-tt,Tt=It*It+St*St,Vt=It*rt+St*et;if(Vt>0&&Vt<Tt){var Kt=rt*St-et*It;if(Kt*Kt<Tt)return!0}}function ne(Ye,tt){var lt=Ye[0]/V,vt=Ye[1]/Z,It=Math.max(0,-lt,lt-1,-vt,vt-1);return It&&P!==void 0&&re(lt,vt,P,S)&&(It=0),It&&tt&&re(lt,vt,tt[0]/V,tt[1]/Z)&&(It=0),(1+r.toleranceGrowth*It)*q}function se(Ye,tt){var lt=Ye[0]-tt[0],vt=Ye[1]-tt[1];return Math.sqrt(lt*lt+vt*vt)}var oe,pe,ce,de,xe,we,be,Ee=r.maxScreensAway,fe=-V*Ee,me=V*(1+Ee),Te=-Z*Ee,_e=Z*(1+Ee),Ae=[[fe,Te,me,Te],[me,Te,me,_e],[me,_e,fe,_e],[fe,_e,fe,Te]];function Pe(Ye){if(Ye[0]<fe||Ye[0]>me||Ye[1]<Te||Ye[1]>_e)return[o(Ye[0],fe,me),o(Ye[1],Te,_e)]}function De(Ye,tt){return Ye[0]===tt[0]&&(Ye[0]===fe||Ye[0]===me)||Ye[1]===tt[1]&&(Ye[1]===Te||Ye[1]===_e)||void 0}function Ve(Ye,tt,lt){return function(vt,It){var St=Pe(vt),rt=Pe(It),et=[];if(St&&rt&&De(St,rt))return et;St&&et.push(St),rt&&et.push(rt);var Tt=2*n.constrain((vt[Ye]+It[Ye])/2,tt,lt)-((St||vt)[Ye]+(rt||It)[Ye]);return Tt&&((St&&rt?Tt>0==St[Ye]>rt[Ye]?St:rt:St||rt)[Ye]+=Tt),et}}function Qe(Ye){var tt=Ye[0],lt=Ye[1],vt=tt===j[X-1][0],It=lt===j[X-1][1];if(!vt||!It)if(X>1){var St=tt===j[X-2][0],rt=lt===j[X-2][1];vt&&(tt===fe||tt===me)&&St?rt?X--:j[X-1]=Ye:It&&(lt===Te||lt===_e)&&rt?St?X--:j[X-1]=Ye:j[X++]=Ye}else j[X++]=Ye}function Oe(Ye){j[X-1][0]!==Ye[0]&&j[X-1][1]!==Ye[1]&&Qe([ce,de]),Qe(Ye),xe=null,ce=de=0}function Ue(Ye){if(P=Ye[0]/V,S=Ye[1]/Z,oe=Ye[0]<fe?fe:Ye[0]>me?me:0,pe=Ye[1]<Te?Te:Ye[1]>_e?_e:0,oe||pe){if(X)if(xe){var tt=be(xe,Ye);tt.length>1&&(Oe(tt[0]),j[X++]=tt[1])}else we=be(j[X-1],Ye)[0],j[X++]=we;else j[X++]=[oe||Ye[0],pe||Ye[1]];var lt=j[X-1];oe&&pe&&(lt[0]!==oe||lt[1]!==pe)?(xe&&(ce!==oe&&de!==pe?Qe(ce&&de?(vt=xe,St=(It=Ye)[0]-vt[0],rt=(It[1]-vt[1])/St,(vt[1]*It[0]-It[1]*vt[0])/St>0?[rt>0?fe:me,_e]:[rt>0?me:fe,Te]):[ce||oe,de||pe]):ce&&de&&Qe([ce,de])),Qe([oe,pe])):ce-oe&&de-pe&&Qe([oe||ce,pe||de]),xe=Ye,ce=oe,de=pe}else xe&&Oe(be(xe,Ye)[0]),j[X++]=Ye;var vt,It,St,rt}for(W==="linear"||W==="spline"?be=function(Ye,tt){for(var lt=[],vt=0,It=0;It<4;It++){var St=Ae[It],rt=t(Ye[0],Ye[1],tt[0],tt[1],St[0],St[1],St[2],St[3]);rt&&(!vt||Math.abs(rt.x-lt[0][0])>1||Math.abs(rt.y-lt[0][1])>1)&&(rt=[rt.x,rt.y],vt&&se(rt,Ye)<se(lt[0],Ye)?lt.unshift(rt):lt.push(rt),vt++)}return lt}:W==="hv"||W==="vh"?be=function(Ye,tt){var lt=[],vt=Pe(Ye),It=Pe(tt);return vt&&It&&De(vt,It)||(vt&&lt.push(vt),It&&lt.push(It)),lt}:W==="hvh"?be=Ve(0,fe,me):W==="vhv"&&(be=Ve(1,Te,_e)),i=0;i<Q;i++)if(u=J(i)){for(X=0,xe=null,Ue(u),i++;i<Q;i++){if(!(s=J(i))){if(K)continue;break}if($&&c.simplify){var Ge=J(i+1);if(w=se(s,u),R&&(X===0||X===Q-1)||!(w<ne(s,Ge)*U)){for(x=[(s[0]-u[0])/w,(s[1]-u[1])/w],h=u,_=w,T=L=A=0,a=!1,f=s,i++;i<d.length;i++){if(p=Ge,Ge=J(i+1),!p){if(K)continue;break}if(I=(l=[p[0]-u[0],p[1]-u[1]])[0]*x[1]-l[1]*x[0],L=Math.min(L,I),(A=Math.max(A,I))-L>ne(p,Ge))break;f=p,(k=l[0]*x[0]+l[1]*x[1])>_?(_=k,s=p,a=!1):k<T&&(T=k,h=p,a=!0)}if(a?(Ue(s),f!==h&&Ue(h)):(h!==u&&Ue(h),f!==s&&Ue(s)),Ue(f),i>=d.length||!p)break;Ue(p),u=p}}else Ue(s)}xe&&Qe([ce||xe[0],de||xe[1]]),N.push(j.slice(0,X))}return N}},{"../../constants/numerical":479,"../../lib":503,"./constants":930}],941:[function(y,ee,te){ee.exports=function(g,m,b){b("line.shape")==="spline"&&b("line.smoothing")}},{}],942:[function(y,ee,te){var g={tonextx:1,tonexty:1,tonext:1};ee.exports=function(m,b,v){var e,n,t,o,r,d={},c=!1,i=-1,u=0,f=-1;for(n=0;n<v.length;n++)(t=(e=v[n][0].trace).stackgroup||"")?t in d?r=d[t]:(r=d[t]=u,u++):e.fill in g&&f>=0?r=f:(r=f=u,u++),r<i&&(c=!0),e._groupIndex=i=r;var s=v.slice();c&&s.sort(function(p,a){var x=p[0].trace,l=a[0].trace;return x._groupIndex-l._groupIndex||x.index-l.index});var h={};for(n=0;n<s.length;n++)t=(e=s[n][0].trace).stackgroup||"",e.visible===!0?(e._nexttrace=null,e.fill in g&&(o=h[t],e._prevtrace=o||null,o&&(o._nexttrace=e)),e._ownfill=e.fill&&(e.fill.substr(0,6)==="tozero"||e.fill==="toself"||e.fill.substr(0,2)==="to"&&!e._prevtrace),h[t]=e):e._prevtrace=e._nexttrace=e._ownfill=null;return s}},{}],943:[function(y,ee,te){var g=y("fast-isnumeric");ee.exports=function(m,b){b||(b=2);var v=m.marker,e=v.sizeref||1,n=v.sizemin||0,t=v.sizemode==="area"?function(o){return Math.sqrt(o/e)}:function(o){return o/e};return function(o){var r=t(o/b);return g(r)&&r>0?Math.max(r,n):0}}},{"fast-isnumeric":190}],944:[function(y,ee,te){ee.exports={container:"marker",min:"cmin",max:"cmax"}},{}],945:[function(y,ee,te){var g=y("../../components/color"),m=y("../../components/colorscale/helpers").hasColorscale,b=y("../../components/colorscale/defaults"),v=y("./subtypes");ee.exports=function(e,n,t,o,r,d){var c=v.isBubble(e),i=(e.line||{}).color;d=d||{},i&&(t=i),r("marker.symbol"),r("marker.opacity",c?.7:1),r("marker.size"),r("marker.color",t),m(e,"marker")&&b(e,n,o,r,{prefix:"marker.",cLetter:"c"}),d.noSelect||(r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size")),d.noLine||(r("marker.line.color",i&&!Array.isArray(i)&&n.marker.color!==i?i:c?g.background:g.defaultLine),m(e,"marker.line")&&b(e,n,o,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width",c?1:0)),c&&(r("marker.sizeref"),r("marker.sizemin"),r("marker.sizemode")),d.gradient&&r("marker.gradient.type")!=="none"&&r("marker.gradient.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"./subtypes":951}],946:[function(y,ee,te){var g=y("../../lib").dateTick0,m=y("../../constants/numerical").ONEWEEK;function b(v,e){return g(e,v%m==0?1:0)}ee.exports=function(v,e,n,t,o){if(o||(o={x:!0,y:!0}),o.x){var r=t("xperiod");r&&(t("xperiod0",b(r,e.xcalendar)),t("xperiodalignment"))}if(o.y){var d=t("yperiod");d&&(t("yperiod0",b(d,e.ycalendar)),t("yperiodalignment"))}}},{"../../constants/numerical":479,"../../lib":503}],947:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../registry"),b=y("../../lib"),v=b.ensureSingle,e=b.identity,n=y("../../components/drawing"),t=y("./subtypes"),o=y("./line_points"),r=y("./link_traces"),d=y("../../lib/polygon").tester;function c(i,u,f,s,h,p,a){var x;
1353(function(me,Te,_e,Ae,Pe){var De=_e.xaxis,Ve=_e.yaxis,Qe=g.extent(b.simpleMap(De.range,De.r2c)),Oe=g.extent(b.simpleMap(Ve.range,Ve.r2c)),Ue=Ae[0].trace;if(t.hasMarkers(Ue)){var Ge=Ue.marker.maxdisplayed;if(Ge!==0){var Ye=Ae.filter(function(It){return It.x>=Qe[0]&&It.x<=Qe[1]&&It.y>=Oe[0]&&It.y<=Oe[1]}),tt=Math.ceil(Ye.length/Ge),lt=0;Pe.forEach(function(It,St){var rt=It[0].trace;t.hasMarkers(rt)&&rt.marker.maxdisplayed>0&&St<Te&&lt++});var vt=Math.round(lt*tt/3+Math.floor(lt/3)*tt/7.1);Ae.forEach(function(It){delete It.vis}),Ye.forEach(function(It,St){Math.round((St+vt)%tt)===0&&(It.vis=!0)})}}})(0,u,f,s,h);var l=!!a&&a.duration>0;function w(me){return l?me.transition():me}var _=f.xaxis,T=f.yaxis,k=s[0].trace,L=k.line,A=g.select(p),I=v(A,"g","errorbars"),P=v(A,"g","lines"),S=v(A,"g","points"),E=v(A,"g","text");if(m.getComponentMethod("errorbars","plot")(i,I,f,a),k.visible===!0){var D,F;w(A).style("opacity",k.opacity);var H=k.fill.charAt(k.fill.length-1);H!=="x"&&H!=="y"&&(H=""),s[0][f.isRangePlot?"nodeRangePlot3":"node3"]=A;var V,Z,K="",q=[],W=k._prevtrace;W&&(K=W._prevRevpath||"",F=W._nextFill,q=W._polygons);var $,R,N,U,Q,j,X,J="",re="",ne=[],se=b.noop;if(D=k._ownFill,t.hasLines(k)||k.fill!=="none"){for(F&&F.datum(s),["hv","vh","hvh","vhv"].indexOf(L.shape)!==-1?($=n.steps(L.shape),R=n.steps(L.shape.split("").reverse().join(""))):$=R=L.shape==="spline"?function(me){var Te=me[me.length-1];return me.length>1&&me[0][0]===Te[0]&&me[0][1]===Te[1]?n.smoothclosed(me.slice(1),L.smoothing):n.smoothopen(me,L.smoothing)}:function(me){return"M"+me.join("L")},N=function(me){return R(me.reverse())},ne=o(s,{xaxis:_,yaxis:T,connectGaps:k.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,shape:L.shape,simplify:L.simplify,fill:k.fill}),X=k._polygons=new Array(ne.length),x=0;x<ne.length;x++)k._polygons[x]=d(ne[x]);ne.length&&(U=ne[0][0],j=(Q=ne[ne.length-1])[Q.length-1]),se=function(me){return function(Te){if(V=$(Te),Z=N(Te),J?H?(J+="L"+V.substr(1),re=Z+"L"+re.substr(1)):(J+="Z"+V,re=Z+"Z"+re):(J=V,re=Z),t.hasLines(k)&&Te.length>1){var _e=g.select(this);
1353if(_e.datum(s),me)w(_e.style("opacity",0).attr("d",V).call(n.lineGroupStyle)).style("opacity",1);else{var Ae=w(_e);Ae.attr("d",V),n.singleLineStyle(s,Ae)}}}}}var oe=P.selectAll(".js-line").data(ne);w(oe.exit()).style("opacity",0).remove(),oe.each(se(!1)),oe.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(n.lineGroupStyle).each(se(!0)),n.setClipUrl(oe,f.layerClipId,i),ne.length?(D?(D.datum(s),U&&j&&(H?(H==="y"?U[1]=j[1]=T.c2p(0,!0):H==="x"&&(U[0]=j[0]=_.c2p(0,!0)),w(D).attr("d","M"+j+"L"+U+"L"+J.substr(1)).call(n.singleFillStyle,i)):w(D).attr("d",J+"Z").call(n.singleFillStyle,i))):F&&(k.fill.substr(0,6)==="tonext"&&J&&K?(k.fill==="tonext"?w(F).attr("d",J+"Z"+K+"Z").call(n.singleFillStyle,i):w(F).attr("d",J+"L"+K.substr(1)+"Z").call(n.singleFillStyle,i),k._polygons=k._polygons.concat(q)):(ce(F),k._polygons=null)),k._prevRevpath=re,k._prevPolygons=X):(D?ce(D):F&&ce(F),k._polygons=k._prevRevpath=k._prevPolygons=null),S.datum(s),E.datum(s),function(me,Te,_e){var Ae,Pe=_e[0].trace,De=t.hasMarkers(Pe),Ve=t.hasText(Pe),Qe=Ee(Pe),Oe=fe,Ue=fe;if(De||Ve){var Ge=e,Ye=Pe.stackgroup,tt=Ye&&i._fullLayout._scatterStackOpts[_._id+T._id][Ye].stackgaps==="infer zero";Pe.marker.maxdisplayed||Pe._needsCull?Ge=tt?xe:de:Ye&&!tt&&(Ge=we),De&&(Oe=Ge),Ve&&(Ue=Ge)}var lt,vt=(Ae=me.selectAll("path.point").data(Oe,Qe)).enter().append("path").classed("point",!0);l&&vt.call(n.pointStyle,Pe,i).call(n.translatePoints,_,T).style("opacity",0).transition().style("opacity",1),Ae.order(),De&&(lt=n.makePointStyleFns(Pe)),Ae.each(function(It){var St=g.select(this),rt=w(St);n.translatePoint(It,rt,_,T)?(n.singlePointStyle(It,rt,Pe,lt,i),f.layerClipId&&n.hideOutsideRangePoint(It,rt,_,T,Pe.xcalendar,Pe.ycalendar),Pe.customdata&&St.classed("plotly-customdata",It.data!==null&&It.data!==void 0)):rt.remove()}),l?Ae.exit().transition().style("opacity",0).remove():Ae.exit().remove(),(Ae=Te.selectAll("g").data(Ue,Qe)).enter().append("g").classed("textpoint",!0).append("text"),Ae.order(),Ae.each(function(It){var St=g.select(this),rt=w(St.select("text"));n.translatePoint(It,rt,_,T)?f.layerClipId&&n.hideOutsideRangePoint(It,St,_,T,Pe.xcalendar,Pe.ycalendar):St.remove()}),Ae.selectAll("text").call(n.textPointStyle,Pe,i).each(function(It){var St=_.c2p(It.x),rt=T.c2p(It.y);g.select(this).selectAll("tspan.line").each(function(){w(g.select(this)).attr({x:St,y:rt})})}),Ae.exit().remove()}(S,E,s);var pe=k.cliponaxis===!1?null:f.layerClipId;n.setClipUrl(S,pe,i),n.setClipUrl(E,pe,i)}function ce(me){w(me).attr("d","M0,0Z")}function de(me){return me.filter(function(Te){return!Te.gap&&Te.vis})}function xe(me){return me.filter(function(Te){return Te.vis})}function we(me){return me.filter(function(Te){return!Te.gap})}function be(me){return me.id}function Ee(me){if(me.ids)return be}function fe(){return!1}}ee.exports=function(i,u,f,s,h,p){var a,x,l=!h,w=!!h&&h.duration>0,_=r(i,u,f);(a=s.selectAll("g.trace").data(_,function(T){return T[0].trace.uid})).enter().append("g").attr("class",function(T){return"trace scatter trace"+T[0].trace.uid}).style("stroke-miterlimit",2),a.order(),function(T,k,L){k.each(function(A){var I=v(g.select(this),"g","fills");n.setClipUrl(I,L.layerClipId,T);var P=A[0].trace,S=[];P._ownfill&&S.push("_ownFill"),P._nexttrace&&S.push("_nextFill");var E=I.selectAll("g").data(S,e);E.enter().append("g"),E.exit().each(function(D){P[D]=null}).remove(),E.order().each(function(D){P[D]=v(g.select(this),"path","js-fill")})})}(i,a,u),w?(p&&(x=p()),g.transition().duration(h.duration).ease(h.easing).each("end",function(){x&&x()}).each("interrupt",function(){x&&x()}).each(function(){s.selectAll("g.trace").each(function(T,k){c(i,k,u,T,_,this,h)})})):a.each(function(T,k){c(i,k,u,T,_,this,h)}),l&&a.exit().remove(),s.selectAll("path:not([d])").remove()}},{"../../components/drawing":388,"../../lib":503,"../../lib/polygon":515,"../../registry":638,"./line_points":940,"./link_traces":942,"./subtypes":951,"@plotly/d3":58}],948:[function(y,ee,te){var g=y("./subtypes");ee.exports=function(m,b){var v,e,n,t,o=m.cd,r=m.xaxis,d=m.yaxis,c=[],i=o[0].trace;if(!g.hasMarkers(i)&&!g.hasText(i))return[];if(b===!1)for(v=0;v<o.length;v++)o[v].selected=0;else for(v=0;v<o.length;v++)e=o[v],n=r.c2p(e.x),t=d.c2p(e.y),e.i!==null&&b.contains([n,t],!1,v,m)?(c.push({pointNumber:e.i,x:r.c2d(e.x),y:d.c2d(e.y)}),e.selected=1):e.selected=0;return c}},{"./subtypes":951}],949:[function(y,ee,te){var g=["orientation","groupnorm","stackgaps"];ee.exports=function(m,b,v,e){var n=v._scatterStackOpts,t=e("stackgroup");if(t){var o=b.xaxis+b.yaxis,r=n[o];r||(r=n[o]={});var d=r[t],c=!1;d?d.traces.push(b):(d=r[t]={traceIndices:[],traces:[b]},c=!0);for(var i={orientation:b.x&&!b.y?"h":"v"},u=0;u<g.length;u++){var f=g[u],s=f+"Found";if(!d[s]){var h=m[f]!==void 0,p=f==="orientation";if((h||c)&&(d[f]=e(f,i[f]),p&&(d.fillDflt=d[f]==="h"?"tonextx":"tonexty"),h&&(d[s]=!0,!c&&(delete d.traces[0][f],p))
1353))for(var a=0;a<d.traces.length-1;a++){var x=d.traces[a];x._input.fill!==x.fill&&(x.fill=d.fillDflt)}}}return d}}},{}],950:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/drawing"),b=y("../../registry");function v(n,t,o){m.pointStyle(n.selectAll("path.point"),t,o)}function e(n,t,o){m.textPointStyle(n.selectAll("text"),t,o)}ee.exports={style:function(n){var t=g.select(n).selectAll("g.trace.scatter");t.style("opacity",function(o){return o[0].trace.opacity}),t.selectAll("g.points").each(function(o){v(g.select(this),o.trace||o[0].trace,n)}),t.selectAll("g.text").each(function(o){e(g.select(this),o.trace||o[0].trace,n)}),t.selectAll("g.trace path.js-line").call(m.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(m.fillGroupStyle,n),b.getComponentMethod("errorbars","style")(t)},stylePoints:v,styleText:e,styleOnSelect:function(n,t,o){var r=t[0].trace;r.selectedpoints?(m.selectedPointStyle(o.selectAll("path.point"),r),m.selectedTextStyle(o.selectAll("text"),r)):(v(o,r,n),e(o,r,n))}}},{"../../components/drawing":388,"../../registry":638,"@plotly/d3":58}],951:[function(y,ee,te){var g=y("../../lib");ee.exports={hasLines:function(m){return m.visible&&m.mode&&m.mode.indexOf("lines")!==-1},hasMarkers:function(m){return m.visible&&(m.mode&&m.mode.indexOf("markers")!==-1||m.type==="splom")},hasText:function(m){return m.visible&&m.mode&&m.mode.indexOf("text")!==-1},isBubble:function(m){return g.isPlainObject(m.marker)&&g.isArrayOrTypedArray(m.marker.size)}}},{"../../lib":503}],952:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b,v,e,n){n=n||{},e("textposition"),g.coerceFont(e,"textfont",v.font),n.noSelect||(e("selected.textfont.color"),e("unselected.textfont.color"))}},{"../../lib":503}],953:[function(y,ee,te){var g=y("../../lib"),m=y("../../registry");ee.exports=function(b,v,e,n){var t,o=n("x"),r=n("y");if(m.getComponentMethod("calendars","handleTraceDefaults")(b,v,["x","y"],e),o){var d=g.minRowLength(o);r?t=Math.min(d,g.minRowLength(r)):(t=d,n("y0"),n("dy"))}else{if(!r)return 0;t=g.minRowLength(r),n("x0"),n("dx")}return v._length=t,t}},{"../../lib":503,"../../registry":638}],954:[function(y,ee,te){var g=y("../scatter/attributes"),m=y("../../components/colorscale/attributes"),b=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,v=y("../../plots/template_attributes").hovertemplateAttrs,e=y("../../plots/template_attributes").texttemplateAttrs,n=y("../../plots/attributes"),t=y("../../constants/gl3d_dashes"),o=y("../../constants/gl3d_markers"),r=y("../../lib/extend").extendFlat,d=y("../../plot_api/edit_types").overrideAll,c=y("../../lib/sort_object_keys"),i=g.line,u=g.marker,f=u.line,s=r({width:i.width,dash:{valType:"enumerated",values:c(t),dflt:"solid"}},m("line")),h=ee.exports=d({x:g.x,y:g.y,z:{valType:"data_array"},text:r({},g.text,{}),texttemplate:e({},{}),hovertext:r({},g.hovertext,{}),hovertemplate:v(),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),mode:r({},g.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},y:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},z:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}},connectgaps:g.connectgaps,line:s,marker:r({symbol:{valType:"enumerated",values:c(o),dflt:"circle",arrayOk:!0},size:r({},u.size,{dflt:8}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:r({},u.opacity,{arrayOk:!1}),colorbar:u.colorbar,line:r({width:r({},f.width,{arrayOk:!1})},m("marker.line"))},m("marker")),textposition:r({},g.textposition,{dflt:"top center"}),textfont:{color:g.textfont.color,size:g.textfont.size,family:r({},g.textfont.family,{arrayOk:!1})},opacity:n.opacity,hoverinfo:r({},n.hoverinfo)},"calc","nested");h.x.editType=h.y.editType=h.z.editType="calc+clearAxisTypes"},{"../../components/colorscale/attributes":373,"../../constants/gl3d_dashes":476,"../../constants/gl3d_markers":477,"../../lib/extend":493,"../../lib/sort_object_keys":526,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../scatter/attributes":926}],955:[function(y,ee,te){var g=y("../scatter/arrays_to_calcdata"),m=y("../scatter/colorscale_calc");ee.exports=function(b,v){var e=[{x:!1,y:!1,trace:v,t:{}}];return g(e,v),m(b,v),e}},{"../scatter/arrays_to_calcdata":925,"../scatter/colorscale_calc":929}],956:[function(y,ee,te){var g=y("../../registry");function m(b,v,e,n){if(!v||!v.visible)return null;for(var t=g.getComponentMethod("errorbars","makeComputeError")(v),o=new Array(b.length),r=0;r<b.length;r++){var d=t(+b[r],r);if(n.type==="log"){var c=n.c2l(b[r]),i=b[r]-d[0],u=b[r]+d[1];if(o[r]=[(n.c2l(i,!0)-c)*e,(n.c2l(u,!0)-c)*e],i>0){var f=n.c2l(i);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else o[r]=[-d[0]*e,d[1]*e]}return o}ee.exports=function(b,v,e){var n=[m(b.x,b.error_x,v[0],e.xaxis),m(b.y,b.error_y,v[1],e.yaxis),m(b.z,b.error_z,v[2],e.zaxis)],t=function(u){for(var f=0;f<u.length;f++)if(u[f])return u[f].length;return 0}(n);if(t===0)return null;for(var o=new Array(t),r=0;r<t;r++){for(var d=[[0,0,0],[0,0,0]],c=0;c<3;c++)if(n[c])for(var i=0;i<2;i++)d[i][c]=n[c][r][i];o[r]=d}return o}},{"../../registry":638}],957:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_line3d,m=y("../../../stackgl_modules").gl_scatter3d,b=y("../../../stackgl_modules").gl_error3d,v=y("../../../stackgl_modules").gl_mesh3d,e=y("../../../stackgl_modules").delaunay_triangulate,n=y("../../lib"),t=y("../../lib/str2rgbarray"),o=y("../../lib/gl_format_color").formatColor,r=y("../scatter/make_bubble_size_func"),d=y("../../constants/gl3d_dashes"),c=y("../../constants/gl3d_markers"),i=y("../../plots/cartesian/axes"),u=y("../../components/fx/helpers").appendArrayPointValue,f=y("./calc_errors");function s(L,A){this.scene=L,this.uid=A,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var h=s.prototype;function p(L){return L==null?0:L.indexOf("left")>-1?-1:L.indexOf("right")>-1?1:0}function a(L){return L==null?0:L.indexOf("top")>-1?-1:L.indexOf("bottom")>-1?1:0}function x(L,A){return A(4*L)}function l(L){return c[L]}function w(L,A,I,P,S){var E=null;if(n.isArrayOrTypedArray(L)){E=[];for(var D=0;D<A;D++)L[D]===void 0?E[D]=P:E[D]=I(L[D],S)}else E=I(L,n.identity);return E}function _(L,A){var I,P,S,E,D,F,H=[],V=L.fullSceneLayout,Z=L.dataScale,K=V.xaxis,q=V.yaxis,W=V.zaxis,$=A.marker,R=A.line,N=A.x||[],U=A.y||[],Q=A.z||[],j=N.length,X=A.xcalendar,J=A.ycalendar,re=A.zcalendar;for(D=0;D<j;D++)I=K.d2l(N[D],0,X)*Z[0],P=q.d2l(U[D],0,J)*Z[1],S=W.d2l(Q[D],0,re)*Z[2],H[D]=[I,P,S];if(Array.isArray(A.text))F=A.text;else if(A.text!==void 0)for(F=new Array(j),D=0;D<j;D++)F[D]=A.text;function ne(Ae,Pe){var De=V[Ae];return i.tickText(De,De.d2l(Pe),!0).text}var se=A.texttemplate;if(se){var oe=L.fullLayout._d3locale,pe=Array.isArray(se),ce=pe?Math.min(se.length,j):j,de=pe?function(Ae){return se[Ae]}:function(){return se};for(F=new Array(ce),D=0;D<ce;D++){var xe={x:N[D],y:U[D],z:Q[D]}
vendor: 5,775 bytes, line 1353
1353,we={xLabel:ne("xaxis",N[D]),yLabel:ne("yaxis",U[D]),zLabel:ne("zaxis",Q[D])},be={};u(be,A,D);var Ee=A._meta||{};F[D]=n.texttemplateString(de(D),we,oe,be,xe,Ee)}}if(E={position:H,mode:A.mode,text:F},"line"in A&&(E.lineColor=o(R,1,j),E.lineWidth=R.width,E.lineDashes=R.dash),"marker"in A){var fe=r(A);E.scatterColor=o($,1,j),E.scatterSize=w($.size,j,x,20,fe),E.scatterMarker=w($.symbol,j,l,"●"),E.scatterLineWidth=$.line.width,E.scatterLineColor=o($.line,1,j),E.scatterAngle=0}"textposition"in A&&(E.textOffset=function(Ae){var Pe=[0,0];if(Array.isArray(Ae))for(var De=0;De<Ae.length;De++)Pe[De]=[0,0],Ae[De]&&(Pe[De][0]=p(Ae[De]),Pe[De][1]=a(Ae[De]));else Pe[0]=p(Ae),Pe[1]=a(Ae);return Pe}(A.textposition),E.textColor=o(A.textfont,1,j),E.textSize=w(A.textfont.size,j,n.identity,12),E.textFont=A.textfont.family,E.textAngle=0);var me=["x","y","z"];for(E.project=[!1,!1,!1],E.projectScale=[1,1,1],E.projectOpacity=[1,1,1],D=0;D<3;++D){var Te=A.projection[me[D]];(E.project[D]=Te.show)&&(E.projectOpacity[D]=Te.opacity,E.projectScale[D]=Te.scale)}E.errorBounds=f(A,Z,V);var _e=function(Ae){for(var Pe=[0,0,0],De=[[0,0,0],[0,0,0],[0,0,0]],Ve=[1,1,1],Qe=0;Qe<3;Qe++){var Oe=Ae[Qe];Oe&&Oe.copy_zstyle!==!1&&Ae[2].visible!==!1&&(Oe=Ae[2]),Oe&&Oe.visible&&(Pe[Qe]=Oe.width/2,De[Qe]=t(Oe.color),Ve[Qe]=Oe.thickness)}return{capSize:Pe,color:De,lineWidth:Ve}}([A.error_x,A.error_y,A.error_z]);return E.errorColor=_e.color,E.errorLineWidth=_e.lineWidth,E.errorCapSize=_e.capSize,E.delaunayAxis=A.surfaceaxis,E.delaunayColor=t(A.surfacecolor),E}function T(L){if(n.isArrayOrTypedArray(L)){var A=L[0];return n.isArrayOrTypedArray(A)&&(L=A),"rgb("+L.slice(0,3).map(function(I){return Math.round(255*I)})+")"}return null}function k(L){return n.isArrayOrTypedArray(L)?L.length===4&&typeof L[0]=="number"?T(L):L.map(T):null}h.handlePick=function(L){if(L.object&&(L.object===this.linePlot||L.object===this.delaunayMesh||L.object===this.textMarkers||L.object===this.scatterPlot)){var A=L.index=L.data.index;return L.object.highlight&&L.object.highlight(null),this.scatterPlot&&(L.object=this.scatterPlot,this.scatterPlot.highlight(L.data)),L.textLabel="",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[A]||this.textLabels[A]===0)&&(L.textLabel=this.textLabels[A]):L.textLabel=this.textLabels),L.traceCoordinate=[this.data.x[A],this.data.y[A],this.data.z[A]],!0}},h.update=function(L){var A,I,P,S,E=this.scene.glplot.gl,D=d.solid;this.data=L;var F=_(this.scene,L);"mode"in F&&(this.mode=F.mode),"lineDashes"in F&&F.lineDashes in d&&(D=d[F.lineDashes]),this.color=k(F.scatterColor)||k(F.lineColor),this.dataPoints=F.position,A={gl:this.scene.glplot.gl,position:F.position,color:F.lineColor,lineWidth:F.lineWidth||1,dashes:D[0],dashScale:D[1],opacity:L.opacity,connectGaps:L.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(A):(this.linePlot=g(A),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var H=L.opacity;if(L.marker&&L.marker.opacity&&(H*=L.marker.opacity),I={gl:this.scene.glplot.gl,position:F.position,color:F.scatterColor,size:F.scatterSize,glyph:F.scatterMarker,opacity:H,orthographic:!0,lineWidth:F.scatterLineWidth,lineColor:F.scatterLineColor,project:F.project,projectScale:F.projectScale,projectOpacity:F.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(I):(this.scatterPlot=m(I),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),S={gl:this.scene.glplot.gl,position:F.position,glyph:F.text,color:F.textColor,size:F.textSize,angle:F.textAngle,alignment:F.textOffset,font:F.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:L.opacity},this.textLabels=L.hovertext||L.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(S):(this.textMarkers=m(S),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),P={gl:this.scene.glplot.gl,position:F.position,color:F.errorColor,error:F.errorBounds,lineWidth:F.errorLineWidth,capSize:F.errorCapSize,opacity:L.opacity},this.errorBars?F.errorBounds?this.errorBars.update(P):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):F.errorBounds&&(this.errorBars=b(P),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),F.delaunayAxis>=0){var V=function(Z,K,q){var W,$=(q+1)%3,R=(q+2)%3,N=[],U=[];for(W=0;W<Z.length;++W){var Q=Z[W];!isNaN(Q[$])&&isFinite(Q[$])&&!isNaN(Q[R])&&isFinite(Q[R])&&(N.push([Q[$],Q[R]]),U.push(W))}var j=e(N);for(W=0;W<j.length;++W)for(var X=j[W],J=0;J<X.length;++J)X[J]=U[X[J]];return{positions:Z,cells:j,meshColor:K}}(F.position,F.delaunayColor,F.delaunayAxis);V.opacity=L.opacity,this.delaunayMesh?this.delaunayMesh.update(V):(V.gl=E,this.delaunayMesh=v(V),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},h.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())}
1353,ee.exports=function(L,A){var I=new s(L,A.uid);return I.update(A),I}},{"../../../stackgl_modules":1120,"../../components/fx/helpers":402,"../../constants/gl3d_dashes":476,"../../constants/gl3d_markers":477,"../../lib":503,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554,"../scatter/make_bubble_size_func":943,"./calc_errors":956}],958:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("../scatter/subtypes"),v=y("../scatter/marker_defaults"),e=y("../scatter/line_defaults"),n=y("../scatter/text_defaults"),t=y("./attributes");ee.exports=function(o,r,d,c){function i(x,l){return m.coerce(o,r,t,x,l)}if(function(x,l,w,_){var T=0,k=w("x"),L=w("y"),A=w("z");return g.getComponentMethod("calendars","handleTraceDefaults")(x,l,["x","y","z"],_),k&&L&&A&&(T=Math.min(k.length,L.length,A.length),l._length=l._xlength=l._ylength=l._zlength=T),T}(o,r,i,c)){i("text"),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),i("mode"),b.hasLines(r)&&(i("connectgaps"),e(o,r,d,c,i)),b.hasMarkers(r)&&v(o,r,d,c,i,{noSelect:!0}),b.hasText(r)&&(i("texttemplate"),n(o,r,c,i,{noSelect:!0}));var u=(r.line||{}).color,f=(r.marker||{}).color;i("surfaceaxis")>=0&&i("surfacecolor",u||f);for(var s=["x","y","z"],h=0;h<3;++h){var p="projection."+s[h];i(p+".show")&&(i(p+".opacity"),i(p+".scale"))}var a=g.getComponentMethod("errorbars","supplyDefaults");a(o,r,u||f||d,{axis:"z"}),a(o,r,u||f||d,{axis:"y",inherit:"z"}),a(o,r,u||f||d,{axis:"x",inherit:"z"})}else r.visible=!1}},{"../../lib":503,"../../registry":638,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":954}],959:[function(y,ee,te){ee.exports={plot:y("./convert"),attributes:y("./attributes"),markerSymbols:y("../../constants/gl3d_markers"),supplyDefaults:y("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:y("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:y("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":477,"../../plots/gl3d":598,"./attributes":954,"./calc":955,"./convert":957,"./defaults":958}],960:[function(y,ee,te){var g=y("../scatter/attributes"),m=y("../../plots/attributes"),b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../../plots/template_attributes").texttemplateAttrs,e=y("../../components/colorscale/attributes"),n=y("../../lib/extend").extendFlat,t=g.marker,o=g.line,r=t.line;ee.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},g.mode,{dflt:"markers"}),text:n({},g.text,{}),texttemplate:v({editType:"plot"},{keys:["a","b","text"]}),hovertext:n({},g.hovertext,{}),line:{color:o.color,width:o.width,dash:o.dash,shape:n({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:g.connectgaps,fill:n({},g.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:g.fillcolor,marker:n({symbol:t.symbol,opacity:t.opacity,maxdisplayed:t.maxdisplayed,size:t.size,sizeref:t.sizeref,sizemin:t.sizemin,sizemode:t.sizemode,line:n({width:r.width,editType:"calc"},e("marker.line")),gradient:t.gradient,editType:"calc"},e("marker")),textfont:g.textfont,textposition:g.textposition,selected:g.selected,unselected:g.unselected,hoverinfo:n({},m.hoverinfo,{flags:["a","b","text","name"]}),hoveron:g.hoveron,hovertemplate:b()}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],961:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../scatter/colorscale_calc"),b=y("../scatter/arrays_to_calcdata"),v=y("../scatter/calc_selection"),e=y("../scatter/calc").calcMarkerSize,n=y("../carpet/lookup_carpetid");ee.exports=function(t,o){var r=o._carpetTrace=n(t,o);if(r&&r.visible&&r.visible!=="legendonly"){var d;o.xaxis=r.xaxis,o.yaxis=r.yaxis;var c,i,u=o._length,f=new Array(u),s=!1;for(d=0;d<u;d++)if(c=o.a[d],i=o.b[d],g(c)&&g(i)){var h=r.ab2xy(+c,+i,!0),p=r.isVisible(+c,+i);p||(s=!0),f[d]={x:h[0],y:h[1],a:c,b:i,vis:p}}else f[d]={x:!1,y:!1};return o._needsCull=s,f[0].carpet=r,f[0].trace=o,e(o,u),m(t,o),b(f,o),v(f,o),f}}},{"../carpet/lookup_carpetid":708,"../scatter/arrays_to_calcdata":925,"../scatter/calc":927,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],962:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/constants"),b=y("../scatter/subtypes"),v=y("../scatter/marker_defaults"),e=y("../scatter/line_defaults"),n=y("../scatter/line_shape_defaults"),t=y("../scatter/text_defaults"),o=y("../scatter/fillcolor_defaults"),r=y("./attributes");ee.exports=function(d,c,i,u){function f(x,l){return g.coerce(d,c,r,x,l)}f("carpet"),c.xaxis="x",c.yaxis="y";var s=f("a"),h=f("b"),p=Math.min(s.length,h.length);if(p){c._length=p,f("text"),f("texttemplate"),f("hovertext"),f("mode",p<m.PTS_LINESONLY?"lines+markers":"lines"),b.hasLines(c)&&(e(d,c,i,u,f),n(d,c,f),f("connectgaps")),b.hasMarkers(c)&&v(d,c,i,u,f,{gradient:!0}),b.hasText(c)&&t(d,c,u,f);var a=[];(b.hasMarkers(c)||b.hasText(c))&&(f("marker.maxdisplayed"),a.push("points")),f("fill"),c.fill!=="none"&&(o(d,c,i,f),b.hasLines(c)||n(d,c,f)),c.fill!=="tonext"&&c.fill!=="toself"||a.push("fills"),f("hoveron",a.join("+")||"points")!=="fills"&&f("hovertemplate"),g.coerceSelectionMarkerOpacity(c,f)}else c.visible=!1}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/line_shape_defaults":941,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":960}],963:[function(y,ee,te){ee.exports=function(g,m,b,v,e){var n=v[e];return g.a=n.a,g.b=n.b,g.y=n.y,g}},{}],964:[function(y,ee,te){ee.exports=function(g,m){var b={},v=m._carpet,e=v.ab2ij([g.a,g.b]),n=Math.floor(e[0]),t=e[0]-n,o=Math.floor(e[1]),r=e[1]-o,d=v.evalxy([],n,o,t,r);return b.yLabel=d[1].toFixed(3),b}},{}],965:[function(y,ee,te){var g=y("../scatter/hover"),m=y("../../lib").fillText;ee.exports=function(b,v,e,n){var t=g(b,v,e,n);if(t&&t[0].index!==!1){var o=t[0];if(o.index===void 0){var r=1-o.y0/b.ya._length,d=b.xa._length,c=d*r/2,i=d-c;return o.x0=Math.max(Math.min(o.x0,i),c),o.x1=Math.max(Math.min(o.x1,i),c),t}var u=o.cd[o.index];o.a=u.a,o.b=u.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var f=o.trace,s=f._carpet,h=f._module.formatLabels(u,f);o.yLabel=h.yLabel,delete o.text;var p=[];if(!f.hovertemplate){var a=(u.hi||f.hoverinfo).split("+");a.indexOf("all")!==-1&&(a=["a","b","text"]),a.indexOf("a")!==-1&&x(s.aaxis,u.a),a.indexOf("b")!==-1&&x(s.baxis,u.b),p.push("y: "+o.yLabel),a.indexOf("text")!==-1&&m(u,f,p),o.extraText=p.join("<br>")}return t}function x(l,w){var _;_=l.labelprefix&&l.labelprefix.length>0?l.labelprefix.replace(/ = $/,""):l._hovertitle,p.push(_+": "+w.toFixed(3)+l.labelsuffix)}}},{"../../lib":503,"../scatter/hover":937}],966:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../scatter/marker_colorbar"),formatLabels:y("./format_labels"),calc:y("./calc"),plot:y("./plot"),style:y("../scatter/style").style,styleOnSelect:y("../scatter/style").styleOnSelect,hoverPoints:y("./hover"),selectPoints:y("../scatter/select"),eventData:y("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:y("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDepen
1353dent","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":944,"../scatter/select":948,"../scatter/style":950,"./attributes":960,"./calc":961,"./defaults":962,"./event_data":963,"./format_labels":964,"./hover":965,"./plot":967}],967:[function(y,ee,te){var g=y("../scatter/plot"),m=y("../../plots/cartesian/axes"),b=y("../../components/drawing");ee.exports=function(v,e,n,t){var o,r,d,c=n[0][0].carpet,i={xaxis:m.getFromId(v,c.xaxis||"x"),yaxis:m.getFromId(v,c.yaxis||"y"),plot:e.plot};for(g(v,i,n,t),o=0;o<n.length;o++)r=n[o][0].trace,d=t.selectAll("g.trace"+r.uid+" .js-line"),b.setClipUrl(d,n[o][0].carpet._clipPathId,v)}},{"../../components/drawing":388,"../../plots/cartesian/axes":554,"../scatter/plot":947}],968:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../../plots/template_attributes").texttemplateAttrs,b=y("../scatter/attributes"),v=y("../../plots/attributes"),e=y("../../components/colorscale/attributes"),n=y("../../components/drawing/attributes").dash,t=y("../../lib/extend").extendFlat,o=y("../../plot_api/edit_types").overrideAll,r=b.marker,d=b.line,c=r.line;ee.exports=o({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:t({},b.mode,{dflt:"markers"}),text:t({},b.text,{}),texttemplate:m({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:t({},b.hovertext,{}),textfont:b.textfont,textposition:b.textposition,line:{color:d.color,width:d.width,dash:n},connectgaps:b.connectgaps,marker:t({symbol:r.symbol,opacity:r.opacity,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,colorbar:r.colorbar,line:t({width:c.width},e("marker.line")),gradient:r.gradient},e("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:b.fillcolor,selected:b.selected,unselected:b.unselected,hoverinfo:t({},v.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:g()},"calc","nested")},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],969:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../constants/numerical").BADNUM,b=y("../scatter/colorscale_calc"),v=y("../scatter/arrays_to_calcdata"),e=y("../scatter/calc_selection"),n=y("../../lib")._;function t(o){return o&&typeof o=="string"}ee.exports=function(o,r){var d,c=Array.isArray(r.locations),i=c?r.locations.length:r._length,u=new Array(i);d=r.geojson?function(x){return t(x)||g(x)}:t;for(var f=0;f<i;f++){var s=u[f]={};if(c){var h=r.locations[f];s.loc=d(h)?h:null}else{var p=r.lon[f],a=r.lat[f];g(p)&&g(a)?s.lonlat=[+p,+a]:s.lonlat=[m,m]}}return v(u,r),b(o,r),e(u,r),i&&(u[0].t={labels:{lat:n(o,"lat:")+" ",lon:n(o,"lon:")+" "}}),u}},{"../../constants/numerical":479,"../../lib":503,"../scatter/arrays_to_calcdata":925,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],970:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/subtypes"),b=y("../scatter/marker_defaults"),v=y("../scatter/line_defaults"),e=y("../scatter/text_defaults"),n=y("../scatter/fillcolor_defaults"),t=y("./attributes");ee.exports=function(o,r,d,c){function i(x,l){return g.coerce(o,r,t,x,l)}var u,f=i("locations");if(f&&f.length){var s,h=i("geojson");(typeof h=="string"&&h!==""||g.isPlainObject(h))&&(s="geojson-id"),i("locationmode",s)==="geojson-id"&&i("featureidkey"),u=f.length}else{var p=i("lon")||[],a=i("lat")||[];u=Math.min(p.length,a.length)}u?(r._length=u,i("text"),i("hovertext"),i("hovertemplate"),i("mode"),m.hasLines(r)&&(v(o,r,d,c,i),i("connectgaps")),m.hasMarkers(r)&&b(o,r,d,c,i,{gradient:!0}),m.hasText(r)&&(i("texttemplate"),e(o,r,c,i)),i("fill"),r.fill!=="none"&&n(o,r,d,i),g.coerceSelectionMarkerOpacity(r,i)):r.visible=!1}},{"../../lib":503,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":968}],971:[function(y,ee,te){ee.exports=function(g,m,b,v,e){g.lon=m.lon,g.lat=m.lat,g.location=m.loc?m.loc:null;var n=v[e];return n.fIn&&n.fIn.properties&&(g.properties=n.fIn.properties),g}},{}],972:[function(y,ee,te){var g=y("../../plots/cartesian/axes");ee.exports=function(m,b,v){var e={},n=v[b.geo]._subplot.mockAxis,t=m.lonlat;return e.lonLabel=g.tickText(n,n.c2l(t[0]),!0).text,e.latLabel=g.tickText(n,n.c2l(t[1]),!0).text,e}},{"../../plots/cartesian/axes":554}],973:[function(y,ee,te){var g=y("../../components/fx"),m=y("../../constants/numerical").BADNUM,b=y("../scatter/get_trace_color"),v=y("../../lib").fillText,e=y("./attributes");ee.exports=function(n,t,o){var r=n.cd,d=r[0].trace,c=n.xa,i=n.ya,u=n.subplot,f=u.projection.isLonLatOverEdges,s=u.project;if(g.getClosest(r,function(_){var T=_.lonlat;if(T[0]===m||f(T))return 1/0;var k=s(T),L=s([t,o]),A=Math.abs(k[0]-L[0]),I=Math.abs(k[1]-L[1]),P=Math.max(3,_.mrc||0);return Math.max(Math.sqrt(A*A+I*I)-P,1-3/P)},n),n.index!==!1){var h=r[n.index],p=h.lonlat,a=[c.c2p(p),i.c2p(p)],x=h.mrc||1;n.x0=a[0]-x,n.x1=a[0]+x,n.y0=a[1]-x,n.y1=a[1]+x,n.loc=h.loc,n.lon=p[0],n.lat=p[1];var l={};l[d.geo]={_subplot:u};var w=d._module.formatLabels(h,d,l);
1353return n.lonLabel=w.lonLabel,n.latLabel=w.latLabel,n.color=b(d,h),n.extraText=function(_,T,k,L){if(_.hovertemplate)return;var A=T.hi||_.hoverinfo,I=A==="all"?e.hoverinfo.flags:A.split("+"),P=I.indexOf("location")!==-1&&Array.isArray(_.locations),S=I.indexOf("lon")!==-1,E=I.indexOf("lat")!==-1,D=I.indexOf("text")!==-1,F=[];function H(V){return V+"°"}return P?F.push(T.loc):S&&E?F.push("("+H(k.latLabel)+", "+H(k.lonLabel)+")"):S?F.push(L.lon+H(k.lonLabel)):E&&F.push(L.lat+H(k.latLabel)),D&&v(T,_,F),F.join("<br>")}(d,h,n,r[0].t.labels),n.hovertemplate=d.hovertemplate,[n]}}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":936,"./attributes":968}],974:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../scatter/marker_colorbar"),formatLabels:y("./format_labels"),calc:y("./calc"),calcGeoJSON:y("./plot").calcGeoJSON,plot:y("./plot").plot,style:y("./style"),styleOnSelect:y("../scatter/style").styleOnSelect,hoverPoints:y("./hover"),eventData:y("./event_data"),selectPoints:y("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:y("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":589,"../scatter/marker_colorbar":944,"../scatter/style":950,"./attributes":968,"./calc":969,"./defaults":970,"./event_data":971,"./format_labels":972,"./hover":973,"./plot":975,"./select":976,"./style":977}],975:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../lib/topojson_utils").getTopojsonFeatures,v=y("../../lib/geojson_utils"),e=y("../../lib/geo_location_utils"),n=y("../../plots/cartesian/autorange").findExtremes,t=y("../../constants/numerical").BADNUM,o=y("../scatter/calc").calcMarkerSize,r=y("../scatter/subtypes"),d=y("./style");ee.exports={calcGeoJSON:function(c,i){var u,f,s=c[0].trace,h=i[s.geo],p=h._subplot,a=s._length;if(Array.isArray(s.locations)){var x=s.locationmode,l=x==="geojson-id"?e.extractTraceFeature(c):b(s,p.topojson);for(u=0;u<a;u++){f=c[u];var w=x==="geojson-id"?f.fOut:e.locationToFeature(x,f.loc,l);f.lonlat=w?w.properties.ct:[t,t]}}var _,T,k={padded:!0};if(h.fitbounds==="geojson"&&s.locationmode==="geojson-id"){var L=e.computeBbox(e.getTraceGeojson(s));_=[L[0],L[2]],T=[L[1],L[3]]}else{for(_=new Array(a),T=new Array(a),u=0;u<a;u++)f=c[u],_[u]=f.lonlat[0],T[u]=f.lonlat[1];k.ppad=o(s,a)}s._extremes.lon=n(h.lonaxis._ax,_,k),s._extremes.lat=n(h.lataxis._ax,T,k)},plot:function(c,i,u){var f=i.layers.frontplot.select(".scatterlayer"),s=m.makeTraceGroups(f,u,"trace scattergeo");function h(p,a){p.lonlat[0]===t&&g.select(a).remove()}s.selectAll("*").remove(),s.each(function(p){var a=g.select(this),x=p[0].trace;if(r.hasLines(x)||x.fill!=="none"){var l=v.calcTraceToLineCoords(p),w=x.fill!=="none"?v.makePolygon(l):v.makeLine(l);a.selectAll("path.js-line").data([{geojson:w,trace:x}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(x)&&a.selectAll("path.point").data(m.identity).enter().append("path").classed("point",!0).each(function(_){h(_,this)}),r.hasText(x)&&a.selectAll("g").data(m.identity).enter().append("g").append("text").each(function(_){h(_,this)}),d(c,p)})}}},{"../../constants/numerical":479,"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/geojson_utils":497,"../../lib/topojson_utils":532,"../../plots/cartesian/autorange":553,"../scatter/calc":927,"../scatter/subtypes":951,"./style":977,"@plotly/d3":58}],976:[function(y,ee,te){var g=y("../scatter/subtypes"),m=y("../../constants/numerical").BADNUM;ee.exports=function(b,v){var e,n,t,o,r,d=b.cd,c=b.xaxis,i=b.yaxis,u=[],f=d[0].trace;if(!g.hasMarkers(f)&&!g.hasText(f))return[];if(v===!1)for(r=0;r<d.length;r++)d[r].selected=0;else for(r=0;r<d.length;r++)(n=(e=d[r]).lonlat)[0]!==m&&(t=c.c2p(n),o=i.c2p(n),v.contains([t,o],null,r,b)?(u.push({pointNumber:r,lon:n[0],lat:n[1]}),e.selected=1):e.selected=0);return u}},{"../../constants/numerical":479,"../scatter/subtypes":951}],977:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/drawing"),b=y("../../components/color"),v=y("../scatter/style"),e=v.stylePoints,n=v.styleText;ee.exports=function(t,o){o&&function(r,d){var c=d[0].trace,i=d[0].node3;i.style("opacity",d[0].trace.opacity),e(i,c,r),n(i,c,r),i.selectAll("path.js-line").style("fill","none").each(function(u){var f=g.select(this),s=u.trace,h=s.line||{};f.call(b.stroke,h.color).call(m.dashLine,h.dash||"",h.width||0),s.fill!=="none"&&f.call(b.fill,s.fillcolor)})}(t,o)}},{"../../components/color":366,"../../components/drawing":388,"../scatter/style":950,"@plotly/d3":58}],978:[function(y,ee,te){var g=y("../../plots/attributes"),m=y("../scatter/attributes"),b=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,v=y("../../components/colorscale/attributes"),e=y("../../lib/sort_object_keys"),n=y("../../lib/extend").extendFlat,t=y("../../plot_api/edit_types").overrideAll,o=y("./constants").DASHES,r=m.line,d=m.marker,c=d.line,i=ee.exports=t({x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.x
1353period,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:b("x"),yhoverformat:b("y"),text:m.text,hovertext:m.hovertext,textposition:m.textposition,textfont:m.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:r.color,width:r.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:e(o),dflt:"solid"}},marker:n({},v("marker"),{symbol:d.symbol,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,opacity:d.opacity,colorbar:d.colorbar,line:n({},v("marker.line"),{width:c.width})}),connectgaps:m.connectgaps,fill:n({},m.fill,{dflt:"none"}),fillcolor:m.fillcolor,selected:{marker:m.selected.marker,textfont:m.selected.textfont},unselected:{marker:m.unselected.marker,textfont:m.unselected.textfont},opacity:g.opacity},"calc","nested");i.x.editType=i.y.editType=i.x0.editType=i.y0.editType="calc+clearAxisTypes",i.hovertemplate=m.hovertemplate,i.texttemplate=m.texttemplate},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../lib/sort_object_keys":526,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../scatter/attributes":926,"./constants":980}],979:[function(y,ee,te){var g=y("@plotly/point-cluster"),m=y("../../lib"),b=y("../../plots/cartesian/axis_ids"),v=y("../../plots/cartesian/autorange").findExtremes,e=y("../../plots/cartesian/align_period"),n=y("../scatter/calc"),t=n.calcMarkerSize,o=n.calcAxisExpansion,r=n.setFirstScatter,d=y("../scatter/colorscale_calc"),c=y("./convert"),i=y("./scene_update"),u=y("../../constants/numerical").BADNUM,f=y("./constants").TOO_MANY_POINTS;function s(h,p,a){var x=h._extremes[p._id],l=v(p,a._bnds,{padded:!0});x.min=x.min.concat(l.min),x.max=x.max.concat(l.max)}ee.exports=function(h,p){var a,x=h._fullLayout,l=b.getFromId(h,p.xaxis),w=b.getFromId(h,p.yaxis),_=x._plots[p.xaxis+p.yaxis],T=p._length,k=T>=f,L=2*T,A={},I=l.makeCalcdata(p,"x"),P=w.makeCalcdata(p,"y"),S=e(p,l,"x",I),E=e(p,w,"y",P),D=S.vals,F=E.vals;p._x=D,p._y=F,p.xperiodalignment&&(p._origX=I,p._xStarts=S.starts,p._xEnds=S.ends),p.yperiodalignment&&(p._origY=P,p._yStarts=E.starts,p._yEnds=E.ends);var H=new Array(L),V=new Array(T);for(a=0;a<T;a++)H[2*a]=D[a]===u?NaN:D[a],H[2*a+1]=F[a]===u?NaN:F[a],V[a]=a;if(l.type==="log")for(a=0;a<L;a+=2)H[a]=l.c2l(H[a]);if(w.type==="log")for(a=1;a<L;a+=2)H[a]=w.c2l(H[a]);k&&l.type!=="log"&&w.type!=="log"?A.tree=g(H):A.ids=V,d(h,p);var Z,K=function(W,$,R,N,U,Q){var j=c.style(W,R);if(j.marker&&(j.marker.positions=N),j.line&&N.length>1&&m.extendFlat(j.line,c.linePositions(W,R,N)),j.errorX||j.errorY){var X=c.errorBarPositions(W,R,N,U,Q);j.errorX&&m.extendFlat(j.errorX,X.x),j.errorY&&m.extendFlat(j.errorY,X.y)}return j.text&&(m.extendFlat(j.text,{positions:N},c.textPosition(W,R,j.text,j.marker)),m.extendFlat(j.textSel,{positions:N},c.textPosition(W,R,j.text,j.markerSel)),m.extendFlat(j.textUnsel,{positions:N},c.textPosition(W,R,j.text,j.markerUnsel))),j}(h,0,p,H,D,F),q=i(h,_);return r(x,p),k?K.marker&&(Z=K.marker.sizeAvg||Math.max(K.marker.size,3)):Z=t(p,T),o(h,p,l,w,D,F,Z),K.errorX&&s(p,l,K.errorX),K.errorY&&s(p,w,K.errorY),K.fill&&!q.fill2d&&(q.fill2d=!0),K.marker&&!q.scatter2d&&(q.scatter2d=!0),K.line&&!q.line2d&&(q.line2d=!0),!K.errorX&&!K.errorY||q.error2d||(q.error2d=!0),K.text&&!q.glText&&(q.glText=!0),K.marker&&(K.marker.snap=T),q.lineOptions.push(K.line),q.errorXOptions.push(K.errorX),q.errorYOptions.push(K.errorY),q.fillOptions.push(K.fill),q.markerOptions.push(K.marker),q.markerSelectedOptions.push(K.markerSel),q.markerUnselectedOptions.push(K.markerUnsel),q.textOptions.push(K.text),q.textSelectedOptions.push(K.textSel),q.textUnselectedOptions.push(K.textUnsel),q.selectBatch.push([]),q.unselectBatch.push([]),A._scene=q,A.index=q.count,A.x=D,A.y=F,A.positions=H,q.count++,[{x:!1,y:!1,t:A,trace:p}]}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/autorange":553,"../../plots/cartesian/axis_ids":558,"../scatter/calc":927,"../scatter/colorscale_calc":929,"./constants":980,"./convert":981,"./scene_update":989,"@plotly/point-cluster":59}],980:[function(y,ee,te){ee.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],981:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("svg-path-sdf"),b=y("color-normalize"),v=y("../../registry"),e=y("../../lib"),n=y("../../components/drawing"),t=y("../../plots/cartesian/axis_ids"),o=y("../../lib/gl_format_color").formatColor,r=y("../scatter/subtypes"),d=y("../scatter/make_bubble_size_func"),c=y("./helpers"),i=y("./constants"),u=y("../../constants/interactions").DESELECTDIM,f={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},s=y("../../components/fx/helpers").appendArrayPointValue;function h(I,P){var S,E=I._fullLayout,D=P._length,F=P.textfont,H=P.textposition,V=Array.isArray(H)?H:[H],Z=F.color,K=F.size,q=F.family,W={},$=I._context.plotGlPixelRatio,R=P.texttemplate;if(R){W.text=[];var N=E._d3locale,U=Array.isArray(R),Q=U?Math.min(R.length,D):D,j=U?function(pe){return R[pe]}:function(){return R};for(S=0;S<Q;S++){var X={i:S},J=P._module.formatLabels(X,P,E),re={};s(re,P,S);var ne=P._meta||{};W.text.push(e.texttemplateString(j(S),J,N,re,X,ne))}}else Array.isArray(P.text)&&P.text.length<D?W.text=P.text.slice():W.text=P.text;if(Array.isArray(W.text))for(S=W.text.length;S<D;S++)W.text[S]="";for(W.opacity=P.opacity,W.font={},W.align=[],W.baseline=[],S=0;S<V.length;S++){var se=V[S].split(/\s+/);switch(se[1]){case"left":W.align.push("right");break;case"right":W.align.push("left");break;default:W.align.push(se[1])}switch(se[0]){case"top":W.baseline.push("bottom");break;case"bottom":W.baseline.push("top");break;default:W.baseline.push(se[0])}}if(Array.isArray(Z))for(W.color=new Array(D),S=0;S<D;S++)W.color[S]=Z[S];else W.color=Z;if(e.isArrayOrTypedArray(K)||Array.isArray(q))for(W.font=new Array(D),S=0;S<D;S++){var oe=W.font[S]={};oe.size=(e.isTypedArray(K)?K[S]:Array.isArray(K)?g(K[S])?K[S]:0:K)*$,oe.family=Array.isArray(q)?q[S]:q}else W.font={size:K*$,family:q};return W}function p(I){var P,S,E=I._length,D=I.marker,F={},H=e.isArrayOrTypedArray(D.symbol),V=e.isArrayOrTypedArray(D.color),Z=e.isArrayOrTypedArray(D.line.color),K=e.isArrayOrTypedArray(D.opacity),q=e.isArrayOrTypedArray(D.size),W=e.isArrayOrTypedArray(D.line.width);if(H||(S=c.isOpenSymbol(D.symbol)),H||V||Z||K){F.colors=new Array(E),F.borderColors=new Array(E);var $=o(D,D.opacity,E),R=o(D.line,D.opacity,E);if(!Array.isArray(R[0])){var N=R;for(R=Array(E),P=0;P<E;P++)R[P]=N}if(!Array.isArray($[0])){var U=$;for($=Array(E),P=0;P<E;P++)$[P]=U}for(F.colors=$,F.borderColors=R,P=0;P<E;P++){if(H){var Q=D.symbol[P];S=c.isOpenSymbol(Q)}S&&(R[P]=$[P].slice(),$[P]=$[P].slice(),$[P][3]=0)}F.opacity=I.opacity}else S?(F.color=b(D.color,"uint8"),F.color[3]=0,F.borderColor=b(D.color,"uint8")):(F.color=b(D.color,"uint8"),F.borderColor=b(D.line.color,"uint8")),F.opacity=I.opacity*D.opacity;if(H)for(F.markers=new Array(E),P=0;P<E;P++)F.markers[P]=A(D.symbol[P]);else F.marker=A(D.symbol);var j,X=d(I,1);if(q||W){var J,re=F.sizes=new Array(E),ne=F.borderSizes=new Array(E),se=0;if(q){for(P=0;P<E;P++)re[P]=X(D.size[P]),se+=re[P];J=se/E}else for(j=X(D.size),P=0;P<E;P++)re[P]=j;if(W)for(P=0;P<E;P++)ne[P]=D.line.width[P];else for(j=D.line.width,P=0;P<E;P++)ne[P]=j;F.sizeAvg=J}else F.size=X(D&&D.size||10),F.borderSizes=X(D.line.width);return F}function a(I,P){var S=I.marker,E={};return P&&(P.marker&&P.marker.symbol?E=p(e.extendFlat({},S,P.marker)):P.marker&&(P.marker.size&&(E.size=P.marker.size),P.marker.color&&(E.colors=P.marker.color),P.marker.opacity!==void 0&&(E.opacity=P.marker.opacity))),E}function x(I,P,S){var E={};if(!S)return E;if(S.textfont){var D={opacity:1,text:P.text,texttemplate:P.texttemplate,textposition:P.textposition,textfont:e.extendFlat({},P.textfont)};S.textfont&&e.extendFlat(D.textfont,S.textfont),E=h(I,D)}return E}function l(I,P,S){var E={capSize:2*P.width*S,lineWidth:P.thickness*S,color:P.color};return P.copy_ystyle&&(E=I.error_y),E}var w=i.SYMBOL_SDF_SIZE,_=i.SYMBOL_SIZE,T=i.SYMBOL_STROKE,k={},L=n.symbolFuncs[0](.05*_);function A(I){if(I==="circle")return null;var P,S,E=n.symbolNumber(I),D=n.symbolFuncs[E%100],F=!!n.symbolNoDot[E%100],H=!!n.symbolNoFill[E%100],V=c.isDotSymbol(I);return k[I]?k[I]:(P=V&&!F?D(1.1*_)+L:D(_),S=m(P,{w,h:w,viewBox:[-_,-_,_,_],stroke:H?T:-T}),k[I]=S,S||null)}ee.exports={style:function(I,P){var S,E={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},D=I._context.plotGlPixelRatio;if(P.visible!==!0)return E;if(r.hasText(P)&&(E.text=h(I,P),E.textSel=x(I,P,P.selected),E.textUnsel=x(I,P,P.unselected)),r.hasMarkers(P)&&(E.marker=p(P),E.markerSel=a(P,P.selected),E.markerUnsel=a(P,P.unselected),!P.unselected&&e.isArrayOrTypedArray(P.marker.opacity))){var F=P.marker.opacity;for(E.markerUnsel.opacity=new Array(F.length),S=0;S<F.length;S++)E.markerUnsel.opacity[S]=u*F[S]}if(r.hasLines(P)){E.line={overlay:!0,thickness:P.line.width*D,color:P.line.color,opacity:P.opacity};var H=(i.DASHES[P.line.dash]||[1]).slice();for(S=0;S<H.length;++S)H[S]*=P.line.width*D;E.line.dashes=H}return P.error_x&&P.error_x.visible&&(E.errorX=l(P,P.error_x,D)),P.error_y&&P.error_y.visible&&(E.errorY=l(P,P.error_y,D)),P.fill&&P.fill!=="none"&&(E.fill={closed:!0,fill:P.fillcolor,thickness:0}),E}
1353,markerStyle:p,markerSelection:a,linePositions:function(I,P,S){var E,D,F=S.length,H=F/2;if(r.hasLines(P)&&H)if(P.line.shape==="hv"){for(E=[],D=0;D<H-1;D++)isNaN(S[2*D])||isNaN(S[2*D+1])?E.push(NaN,NaN,NaN,NaN):(E.push(S[2*D],S[2*D+1]),isNaN(S[2*D+2])||isNaN(S[2*D+3])?E.push(NaN,NaN):E.push(S[2*D+2],S[2*D+1]));E.push(S[F-2],S[F-1])}else if(P.line.shape==="hvh"){for(E=[],D=0;D<H-1;D++)if(isNaN(S[2*D])||isNaN(S[2*D+1])||isNaN(S[2*D+2])||isNaN(S[2*D+3]))isNaN(S[2*D])||isNaN(S[2*D+1])?E.push(NaN,NaN):E.push(S[2*D],S[2*D+1]),E.push(NaN,NaN);else{var V=(S[2*D]+S[2*D+2])/2;E.push(S[2*D],S[2*D+1],V,S[2*D+1],V,S[2*D+3])}E.push(S[F-2],S[F-1])}else if(P.line.shape==="vhv"){for(E=[],D=0;D<H-1;D++)if(isNaN(S[2*D])||isNaN(S[2*D+1])||isNaN(S[2*D+2])||isNaN(S[2*D+3]))isNaN(S[2*D])||isNaN(S[2*D+1])?E.push(NaN,NaN):E.push(S[2*D],S[2*D+1]),E.push(NaN,NaN);else{var Z=(S[2*D+1]+S[2*D+3])/2;E.push(S[2*D],S[2*D+1],S[2*D],Z,S[2*D+2],Z)}E.push(S[F-2],S[F-1])}else if(P.line.shape==="vh"){for(E=[],D=0;D<H-1;D++)isNaN(S[2*D])||isNaN(S[2*D+1])?E.push(NaN,NaN,NaN,NaN):(E.push(S[2*D],S[2*D+1]),isNaN(S[2*D+2])||isNaN(S[2*D+3])?E.push(NaN,NaN):E.push(S[2*D],S[2*D+3]));E.push(S[F-2],S[F-1])}else E=S;var K=!1;for(D=0;D<E.length;D++)if(isNaN(E[D])){K=!0;break}var q=K||E.length>i.TOO_MANY_POINTS||r.hasMarkers(P)?"rect":"round";if(K&&P.connectgaps){var W=E[0],$=E[1];for(D=0;D<E.length;D+=2)isNaN(E[D])||isNaN(E[D+1])?(E[D]=W,E[D+1]=$):(W=E[D],$=E[D+1])}return{join:q,positions:E}},errorBarPositions:function(I,P,S,E,D){var F=v.getComponentMethod("errorbars","makeComputeError"),H=t.getFromId(I,P.xaxis),V=t.getFromId(I,P.yaxis),Z=S.length/2,K={};function q(W,$){var R=$._id.charAt(0),N=P["error_"+R];if(N&&N.visible&&($.type==="linear"||$.type==="log")){for(var U=F(N),Q={x:0,y:1}[R],j={x:[0,1,2,3],y:[2,3,0,1]}[R],X=new Float64Array(4*Z),J=1/0,re=-1/0,ne=0,se=0;ne<Z;ne++,se+=4){var oe=W[ne];if(g(oe)){var pe=S[2*ne+Q],ce=U(oe,ne),de=ce[0],xe=ce[1];if(g(de)&&g(xe)){var we=oe-de,be=oe+xe;X[se+j[0]]=pe-$.c2l(we),X[se+j[1]]=$.c2l(be)-pe,X[se+j[2]]=0,X[se+j[3]]=0,J=Math.min(J,oe-de),re=Math.max(re,oe+xe)}}}K[R]={positions:S,errors:X,_bnds:[J,re]}}}return q(E,H),q(D,V),K},textPosition:function(I,P,S,E){var D,F=P._length,H={};if(r.hasMarkers(P)){var V=S.font,Z=S.align,K=S.baseline;for(H.offset=new Array(F),D=0;D<F;D++){var q=E.sizes?E.sizes[D]:E.size,W=Array.isArray(V)?V[D].size:V.size,$=Array.isArray(Z)?Z.length>1?Z[D]:Z[0]:Z,R=Array.isArray(K)?K.length>1?K[D]:K[0]:K,N=f[$],U=f[R],Q=q?q/.8+1:0,j=-U*Q-.5*U;H.offset[D]=[N*Q/W,j/W]}}return H}}},{"../../components/drawing":388,"../../components/fx/helpers":402,"../../constants/interactions":478,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/cartesian/axis_ids":558,"../../registry":638,"../scatter/make_bubble_size_func":943,"../scatter/subtypes":951,"./constants":980,"./helpers":985,"color-normalize":89,"fast-isnumeric":190,"svg-path-sdf":310}],982:[function(y,ee,te){var g=y("../../lib"),m=y("../../registry"),b=y("./helpers"),v=y("./attributes"),e=y("../scatter/constants"),n=y("../scatter/subtypes"),t=y("../scatter/xy_defaults"),o=y("../scatter/period_defaults"),r=y("../scatter/marker_defaults"),d=y("../scatter/line_defaults"),c=y("../scatter/fillcolor_defaults"),i=y("../scatter/text_defaults");ee.exports=function(u,f,s,h){function p(L,A){return g.coerce(u,f,v,L,A)}var a=!!u.marker&&b.isOpenSymbol(u.marker.symbol),x=n.isBubble(u),l=t(u,f,h,p);if(l){o(u,f,h,p),p("xhoverformat"),p("yhoverformat");var w=l<e.PTS_LINESONLY?"lines+markers":"lines";p("text"),p("hovertext"),p("hovertemplate"),p("mode",w),n.hasLines(f)&&(p("connectgaps"),d(u,f,s,h,p),p("line.shape")),n.hasMarkers(f)&&(r(u,f,s,h,p),p("marker.line.width",a||x?1:0)),n.hasText(f)&&(p("texttemplate"),i(u,f,h,p));var _=(f.line||{}).color,T=(f.marker||{}).color;p("fill"),f.fill!=="none"&&c(u,f,s,p);var k=m.getComponentMethod("errorbars","supplyDefaults");k(u,f,_||T||s,{axis:"y"}),k(u,f,_||T||s,{axis:"x",inherit:"y"}),g.coerceSelectionMarkerOpacity(f,p)}else f.visible=!1}},{"../../lib":503,"../../registry":638,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/period_defaults":946,"../scatter/subtypes":951,"../scatter/text_defaults":952,"../scatter/xy_defaults":953,"./attributes":978,"./helpers":985}],983:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color"),b=y("../../constants/interactions").DESELECTDIM;ee.exports={styleTextSelection:function(v){var e,n,t=v[0],o=t.trace,r=t.t,d=r._scene,c=r.index,i=d.selectBatch[c],u=d.unselectBatch[c],f=d.textOptions[c],s=d.textSelectedOptions[c]||{},h=d.textUnselectedOptions[c]||{},p=g.extendFlat({},f);if(i.length||u.length){var a=s.color,x=h.color,l=f.color,w=Array.isArray(l);for(p.color=new Array(o._length),e=0;e<i.length;e++)n=i[e],p.color[n]=a||(w?l[n]:l);for(e=0;e<u.length;e++){n=u[e];var _=w?l[n]:l;p.color[n]=x||(a?_:m.addOpacity(_,b))}}d.glText[c].update(p)}}},{"../../components/color":366,"../../constants/interactions":478,"../../lib":503}],984:[function(y,ee,te){var g=y("../scatter/format_labels");ee.exports=function(m,b,v){var e=m.i;return"x"in m||(m.x=b._x[e]),"y"in m||(m.y=b._y[e]),g(m,b,v)}},{"../scatter/format_labels":935}],985:[function(y,ee,te){var g=y("./constants");te.isOpenSymbol=function(m){return typeof m=="string"?g.OPEN_RE.test(m):m%200>100},te.isDotSymbol=function(m){return typeof m=="string"?g.DOT_RE.test(m):m>200}},{"./constants":980}],986:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("../scatter/get_trace_color");function v(e,n,t,o){var r=e.xa,d=e.ya,c=e.distance,i=e.dxy,u=e.index,f={pointNumber:u,x:n[u],y:t[u]};f.tx=Array.isArray(o.text)?o.text[u]:o.text,f.htx=Array.isArray(o.hovertext)?o.hovertext[u]:o.hovertext,f.data=Array.isArray(o.customdata)?o.customdata[u]:o.customdata,f.tp=Array.isArray(o.textposition)?o.textposition[u]:o.textposition;var s=o.textfont;s&&(f.ts=m.isArrayOrTypedArray(s.size)?s.size[u]:s.size,f.tc=Array.isArray(s.color)?s.color[u]:s.color,f.tf=Array.isArray(s.family)?s.family[u]:s.family);var h=o.marker;h&&(f.ms=m.isArrayOrTypedArray(h.size)?h.size[u]:h.size,f.mo=m.isArrayOrTypedArray(h.opacity)?h.opacity[u]:h.opacity,f.mx=m.isArrayOrTypedArray(h.symbol)?h.symbol[u]:h.symbol,f.mc=m.isArrayOrTypedArray(h.color)?h.color[u]:h.color);var p=h&&h.line;p&&(f.mlc=Array.isArray(p.color)?p.color[u]:p.color,f.mlw=m.isArrayOrTypedArray(p.width)?p.width[u]:p.width);var a=h&&h.gradient;a&&a.type!=="none"&&(f.mgt=Array.isArray(a.type)?a.type[u]:a.type,f.mgc=Array.isArray(a.color)?a.color[u]:a.color);var x=r.c2p(f.x,!0),l=d.c2p(f.y,!0),w=f.mrc||1,_=o.hoverlabel;_&&(f.hbg=Array.isArray(_.bgcolor)?_.bgcolor[u]:_.bgcolor,f.hbc=Array.isArray(_.bordercolor)?_.bordercolor[u]:_.bordercolor,f.hts=m.isArrayOrTypedArray(_.font.size)?_.font.size[u]:_.font.size,f.htc=Array.isArray(_.font.color)?_.font.color[u]:_.font.color,f.htf=Array.isArray(_.font.family)?_.font.family[u]:_.font.family,f.hnl=m.isArrayOrTypedArray(_.namelength)?_.namelength[u]:_.namelength);var T=o.hoverinfo;T&&(f.hi=Array.isArray(T)?T[u]:T);var k=o.hovertemplate;k&&(f.ht=Array.isArray(k)?k[u]:k);var L={};L[e.index]=f;var A=o._origX,I=o._origY,P=m.extendFlat({},e,{color:b(o,f),x0:x-w,x1:x+w,xLabelVal:A?A[u]:f.x,y0:l-w,y1:l+w,yLabelVal:I?I[u]:f.y,cd:L,distance:c,spikeDistance:i,hovertemplate:f.ht});return f.htx?P.text=f.htx:f.tx?P.text=f.tx:o.text&&(P.text=o.text),m.fillText(f,o,P),g.getComponentMethod("errorbars","hoverInfo")(f,o,P),P}ee.exports={hoverPoints:function(e,n,t,o){var r,d,c,i,u,f,s,h,p,a,x=e.cd,l=x[0].t,w=x[0].trace,_=e.xa,T=e.ya,k=l.x,L=l.y,A=_.c2p(n),I=T.c2p(t),P=e.distance;if(l.tree){var S=_.p2c(A-P),E=_.p2c(A+P),D=T.p2c(I-P),F=T.p2c(I+P);r=o==="x"?l.tree.range(Math.min(S,E),Math.min(T._rl[0],T._rl[1]),Math.max(S,E),Math.max(T._rl[0],T._rl[1])
1353):l.tree.range(Math.min(S,E),Math.min(D,F),Math.max(S,E),Math.max(D,F))}else r=l.ids;var H=P;if(o==="x"){var V=!!w.xperiodalignment,Z=!!w.yperiodalignment;for(f=0;f<r.length;f++){if(i=k[d=r[f]],s=Math.abs(_.c2p(i)-A),V){var K=_.c2p(w._xStarts[d]),q=_.c2p(w._xEnds[d]);s=A>=Math.min(K,q)&&A<=Math.max(K,q)?0:1/0}if(s<H){if(H=s,u=L[d],h=T.c2p(u)-I,Z){var W=T.c2p(w._yStarts[d]),$=T.c2p(w._yEnds[d]);h=I>=Math.min(W,$)&&I<=Math.max(W,$)?0:1/0}a=Math.sqrt(s*s+h*h),c=r[f]}}}else for(f=r.length-1;f>-1;f--)i=k[d=r[f]],u=L[d],s=_.c2p(i)-A,h=T.c2p(u)-I,(p=Math.sqrt(s*s+h*h))<H&&(H=a=p,c=d);return e.index=c,e.distance=H,e.dxy=a,c===void 0?[e]:[v(e,k,L,w)]},calcHover:v}},{"../../lib":503,"../../registry":638,"../scatter/get_trace_color":936}],987:[function(y,ee,te){var g=y("./hover");ee.exports={moduleType:"trace",name:"scattergl",basePlotModule:y("../../plots/cartesian"),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:y("./attributes"),supplyDefaults:y("./defaults"),crossTraceDefaults:y("../scatter/cross_trace_defaults"),colorbar:y("../scatter/marker_colorbar"),formatLabels:y("./format_labels"),calc:y("./calc"),plot:y("./plot"),hoverPoints:g.hoverPoints,selectPoints:y("./select"),meta:{}}},{"../../plots/cartesian":568,"../scatter/cross_trace_defaults":932,"../scatter/marker_colorbar":944,"./attributes":978,"./calc":979,"./defaults":982,"./format_labels":984,"./hover":986,"./plot":988,"./select":990}],988:[function(y,ee,te){var g=y("regl-scatter2d"),m=y("regl-line2d"),b=y("regl-error2d"),v=y("gl-text"),e=y("../../lib"),n=y("../../components/dragelement/helpers").selectMode,t=y("../../lib/prepare_regl"),o=y("../scatter/subtypes"),r=y("../scatter/link_traces"),d=y("./edit_style").styleTextSelection;function c(i,u,f,s){var h=i._size,p=i.width*s,a=i.height*s,x=h.l*s,l=h.b*s,w=h.r*s,_=h.t*s,T=h.w*s,k=h.h*s;return[x+u.domain[0]*T,l+f.domain[0]*k,p-w-(1-u.domain[1])*T,a-_-(1-f.domain[1])*k]}ee.exports=function(i,u,f){if(f.length){var s,h,p=i._fullLayout,a=u._scene,x=u.xaxis,l=u.yaxis;if(a)if(t(i,["ANGLE_instanced_arrays","OES_element_index_uint"])){var w=a.count,_=p._glcanvas.data()[0].regl;if(r(i,u,f),a.dirty){if(a.error2d===!0&&(a.error2d=b(_)),a.line2d===!0&&(a.line2d=m(_)),a.scatter2d===!0&&(a.scatter2d=g(_)),a.fill2d===!0&&(a.fill2d=m(_)),a.glText===!0)for(a.glText=new Array(w),s=0;s<w;s++)a.glText[s]=new v(_);if(a.glText){if(w>a.glText.length){var T=w-a.glText.length;for(s=0;s<T;s++)a.glText.push(new v(_))}else if(w<a.glText.length){var k=a.glText.length-w;a.glText.splice(w,k).forEach(function(j){j.destroy()})}for(s=0;s<w;s++)a.glText[s].update(a.textOptions[s])}if(a.line2d&&(a.line2d.update(a.lineOptions),a.lineOptions=a.lineOptions.map(function(j){if(j&&j.positions){for(var X=j.positions,J=0;J<X.length&&(isNaN(X[J])||isNaN(X[J+1]));)J+=2;for(var re=X.length-2;re>J&&(isNaN(X[re])||isNaN(X[re+1]));)re-=2;j.positions=X.slice(J,re+2)}return j}),a.line2d.update(a.lineOptions)),a.error2d){var L=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(L)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=e.repeat(null,w),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(j,X){var J=f[X];if(j&&J&&J[0]&&J[0].trace){var re,ne,se=J[0],oe=se.trace,pe=se.t,ce=a.lineOptions[X],de=[];oe._ownfill&&de.push(X),oe._nexttrace&&de.push(X+1),de.length&&(a.fillOrder[X]=de);var xe,we,be=[],Ee=ce&&ce.positions||pe.positions;if(oe.fill==="tozeroy"){for(xe=0;xe<Ee.length&&isNaN(Ee[xe+1]);)xe+=2;for(we=Ee.length-2;we>xe&&isNaN(Ee[we+1]);)we-=2;Ee[xe+1]!==0&&(be=[Ee[xe],0]),be=be.concat(Ee.slice(xe,we+2)),Ee[we+1]!==0&&(be=be.concat([Ee[we],0]))}else if(oe.fill==="tozerox"){for(xe=0;xe<Ee.length&&isNaN(Ee[xe]);)xe+=2;for(we=Ee.length-2;we>xe&&isNaN(Ee[we]);)we-=2;Ee[xe]!==0&&(be=[0,Ee[xe+1]]),be=be.concat(Ee.slice(xe,we+2)),Ee[we]!==0&&(be=be.concat([0,Ee[we+1]]))}else if(oe.fill==="toself"||oe.fill==="tonext"){for(be=[],re=0,j.splitNull=!0,ne=0;ne<Ee.length;ne+=2)(isNaN(Ee[ne])||isNaN(Ee[ne+1]))&&((be=be.concat(Ee.slice(re,ne))).push(Ee[re],Ee[re+1]),be.push(null,null),re=ne+2);be=be.concat(Ee.slice(re)),re&&be.push(Ee[re],Ee[re+1])}else{var fe=oe._nexttrace;if(fe){var me=a.lineOptions[X+1];if(me){var Te=me.positions;if(oe.fill==="tonexty"){for(be=Ee.slice(),X=Math.floor(Te.length/2);X--;){var _e=Te[2*X],Ae=Te[2*X+1];isNaN(_e)||isNaN(Ae)||be.push(_e,Ae)}j.fill=fe.fillcolor}}}}if(oe._prevtrace&&oe._prevtrace.fill==="tonext"){var Pe=a.lineOptions[X-1].positions,De=be.length/2,Ve=[re=De];for(ne=0;ne<Pe.length;ne+=2)(isNaN(Pe[ne])||isNaN(Pe[ne+1]))&&(Ve.push(ne/2+De+1),re=ne+2);be=be.concat(Pe),j.hole=Ve}return j.fillmode=oe.fill,j.opacity=oe.opacity,j.positions=be,j}}),a.fill2d.update(a.fillOptions))}var A=p.dragmode,I=n(A),P=p.clickmode.indexOf("select")>-1;for(s=0;s<w;
vendor: 4,888 bytes, line 1353
1353s++){var S=f[s][0],E=S.trace,D=S.t,F=D.index,H=E._length,V=D.x,Z=D.y;if(E.selectedpoints||I||P){if(I||(I=!0),E.selectedpoints){var K=a.selectBatch[F]=e.selIndices2selPoints(E),q={};for(h=0;h<K.length;h++)q[K[h]]=1;var W=[];for(h=0;h<H;h++)q[h]||W.push(h);a.unselectBatch[F]=W}var $=D.xpx=new Array(H),R=D.ypx=new Array(H);for(h=0;h<H;h++)$[h]=x.c2p(V[h]),R[h]=l.c2p(Z[h])}else D.xpx=D.ypx=null}if(I){if(a.select2d||(a.select2d=g(p._glcanvas.data()[1].regl)),a.scatter2d){var N=new Array(w);for(s=0;s<w;s++)N[s]=a.selectBatch[s].length||a.unselectBatch[s].length?a.markerUnselectedOptions[s]:{};a.scatter2d.update(N)}a.select2d&&(a.select2d.update(a.markerOptions),a.select2d.update(a.markerSelectedOptions)),a.glText&&f.forEach(function(j){var X=((j||[])[0]||{}).trace||{};o.hasText(X)&&d(j)})}else a.scatter2d&&a.scatter2d.update(a.markerOptions);var U={viewport:c(p,x,l,i._context.plotGlPixelRatio),range:[(x._rl||x.range)[0],(l._rl||l.range)[0],(x._rl||x.range)[1],(l._rl||l.range)[1]]},Q=e.repeat(U,a.count);a.fill2d&&a.fill2d.update(Q),a.line2d&&a.line2d.update(Q),a.error2d&&a.error2d.update(Q.concat(Q)),a.scatter2d&&a.scatter2d.update(Q),a.select2d&&a.select2d.update(Q),a.glText&&a.glText.forEach(function(j){j.update(U)})}else a.init()}}},{"../../components/dragelement/helpers":384,"../../lib":503,"../../lib/prepare_regl":516,"../scatter/link_traces":942,"../scatter/subtypes":951,"./edit_style":983,"gl-text":225,"regl-error2d":279,"regl-line2d":280,"regl-scatter2d":281}],989:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b){var v=b._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},n={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return b._scene||((v=b._scene={}).init=function(){g.extendFlat(v,n,e)},v.init(),v.update=function(t){var o=g.repeat(t,v.count);if(v.fill2d&&v.fill2d.update(o),v.scatter2d&&v.scatter2d.update(o),v.line2d&&v.line2d.update(o),v.error2d&&v.error2d.update(o.concat(o)),v.select2d&&v.select2d.update(o),v.glText)for(var r=0;r<v.count;r++)v.glText[r].update(t)},v.draw=function(){for(var t=v.count,o=v.fill2d,r=v.error2d,d=v.line2d,c=v.scatter2d,i=v.glText,u=v.select2d,f=v.selectBatch,s=v.unselectBatch,h=0;h<t;h++){if(o&&v.fillOrder[h]&&o.draw(v.fillOrder[h]),d&&v.lineOptions[h]&&d.draw(h),r&&(v.errorXOptions[h]&&r.draw(h),v.errorYOptions[h]&&r.draw(h+t)),c&&v.markerOptions[h])if(s[h].length){var p=g.repeat([],v.count);p[h]=s[h],c.draw(p)}else f[h].length||c.draw(h);i[h]&&v.textOptions[h]&&i[h].render()}u&&u.draw(f),v.dirty=!1},v.destroy=function(){v.fill2d&&v.fill2d.destroy&&v.fill2d.destroy(),v.scatter2d&&v.scatter2d.destroy&&v.scatter2d.destroy(),v.error2d&&v.error2d.destroy&&v.error2d.destroy(),v.line2d&&v.line2d.destroy&&v.line2d.destroy(),v.select2d&&v.select2d.destroy&&v.select2d.destroy(),v.glText&&v.glText.forEach(function(t){t.destroy&&t.destroy()}),v.lineOptions=null,v.fillOptions=null,v.markerOptions=null,v.markerSelectedOptions=null,v.markerUnselectedOptions=null,v.errorXOptions=null,v.errorYOptions=null,v.textOptions=null,v.textSelectedOptions=null,v.textUnselectedOptions=null,v.selectBatch=null,v.unselectBatch=null,b._scene=null}),v.dirty||g.extendFlat(v,e),v}},{"../../lib":503}],990:[function(y,ee,te){var g=y("../scatter/subtypes"),m=y("./edit_style").styleTextSelection;ee.exports=function(b,v){var e=b.cd,n=b.xaxis,t=b.yaxis,o=[],r=e[0].trace,d=e[0].t,c=r._length,i=d.x,u=d.y,f=d._scene,s=d.index;if(!f)return o;var h=g.hasText(r),p=g.hasMarkers(r),a=!p&&!h;if(r.visible!==!0||a)return o;var x=[],l=[];if(v!==!1&&!v.degenerate)for(var w=0;w<c;w++)v.contains([d.xpx[w],d.ypx[w]],!1,w,b)?(x.push(w),o.push({pointNumber:w,x:n.c2d(i[w]),y:t.c2d(u[w])})):l.push(w);if(p){var _=f.scatter2d;if(x.length||l.length){if(!f.selectBatch[s].length&&!f.unselectBatch[s].length){var T=new Array(f.count);T[s]=f.markerUnselectedOptions[s],_.update.apply(_,T)}}else{var k=new Array(f.count);k[s]=f.markerOptions[s],_.update.apply(_,k)}}return f.selectBatch[s]=x,f.unselectBatch[s]=l,h&&m(e),o}},{"../scatter/subtypes":951,"./edit_style":983}],991:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../../plots/template_attributes").texttemplateAttrs,b=y("../scattergeo/attributes"),v=y("../scatter/attributes"),e=y("../../plots/mapbox/layout_attributes"),n=y("../../plots/attributes"),t=y("../../components/colorscale/attributes"),o=y("../../lib/extend").extendFlat,r=y("../../plot_api/edit_types").overrideAll,d=b.line,c=b.marker;ee.exports=r({lon:b.lon,lat:b.lat,mode:o({},v.mode,{dflt:"markers"}),text:o({},v.text,{}),texttemplate:m({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:o({},v.hovertext,{}),line:{color:d.color,width:d.width}
1353,connectgaps:v.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode},t("marker")),fill:b.fill,fillcolor:v.fillcolor,textfont:e.layers.symbol.textfont,textposition:e.layers.symbol.textposition,below:{valType:"string"},selected:{marker:v.selected.marker},unselected:{marker:v.unselected.marker},hoverinfo:o({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:g()},"calc","nested")},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/mapbox/layout_attributes":615,"../../plots/template_attributes":633,"../scatter/attributes":926,"../scattergeo/attributes":968}],992:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../lib"),b=y("../../constants/numerical").BADNUM,v=y("../../lib/geojson_utils"),e=y("../../components/colorscale"),n=y("../../components/drawing"),t=y("../scatter/make_bubble_size_func"),o=y("../scatter/subtypes"),r=y("../../plots/mapbox/convert_text_opts"),d=y("../../components/fx/helpers").appendArrayPointValue,c=y("../../lib/svg_text_utils").NEWLINES,i=y("../../lib/svg_text_utils").BR_TAG_ALL;function u(){return{geojson:v.makeBlank(),layout:{visibility:"none"},paint:{}}}function f(p,a){return m.isArrayOrTypedArray(p)?a?function(x){return g(p[x])?+p[x]:0}:function(x){return p[x]}:p?function(){return p}:s}function s(){return""}function h(p){return p[0]===b}ee.exports=function(p,a){var x,l=a[0].trace,w=l.visible===!0&&l._length!==0,_=l.fill!=="none",T=o.hasLines(l),k=o.hasMarkers(l),L=o.hasText(l),A=k&&l.marker.symbol==="circle",I=k&&l.marker.symbol!=="circle",P=u(),S=u(),E=u(),D=u(),F={fill:P,line:S,circle:E,symbol:D};if(!w)return F;if((_||T)&&(x=v.calcTraceToLineCoords(a)),_&&(P.geojson=v.makePolygon(x),P.layout.visibility="visible",m.extendFlat(P.paint,{"fill-color":l.fillcolor})),T&&(S.geojson=v.makeLine(x),S.layout.visibility="visible",m.extendFlat(S.paint,{"line-width":l.line.width,"line-color":l.line.color,"line-opacity":l.opacity})),A){var H=function(K){var q,W,$,R,N=K[0].trace,U=N.marker,Q=N.selectedpoints,j=m.isArrayOrTypedArray(U.color),X=m.isArrayOrTypedArray(U.size),J=m.isArrayOrTypedArray(U.opacity);function re(we){return N.opacity*we}j&&(W=e.hasColorscale(N,"marker")?e.makeColorScaleFuncFromTrace(U):m.identity),X&&($=t(N)),J&&(R=function(we){return re(g(we)?+m.constrain(we,0,1):0)});var ne,se=[];for(q=0;q<K.length;q++){var oe=K[q],pe=oe.lonlat;if(!h(pe)){var ce={};W&&(ce.mcc=oe.mcc=W(oe.mc)),$&&(ce.mrc=oe.mrc=$(oe.ms)),R&&(ce.mo=R(oe.mo)),Q&&(ce.selected=oe.selected||0),se.push({type:"Feature",geometry:{type:"Point",coordinates:pe},properties:ce})}}if(Q)for(ne=n.makeSelectedPointStyleFns(N),q=0;q<se.length;q++){var de=se[q].properties;ne.selectedOpacityFn&&(de.mo=re(ne.selectedOpacityFn(de))),ne.selectedColorFn&&(de.mcc=ne.selectedColorFn(de)),ne.selectedSizeFn&&(de.mrc=ne.selectedSizeFn(de))}return{geojson:{type:"FeatureCollection",features:se},mcc:j||ne&&ne.selectedColorFn?{type:"identity",property:"mcc"}:U.color,mrc:X||ne&&ne.selectedSizeFn?{type:"identity",property:"mrc"}:(xe=U.size,xe/2),mo:J||ne&&ne.selectedOpacityFn?{type:"identity",property:"mo"}:re(U.opacity)};var xe}(a);E.geojson=H.geojson,E.layout.visibility="visible",m.extendFlat(E.paint,{"circle-color":H.mcc,"circle-radius":H.mrc,"circle-opacity":H.mo})}if((I||L)&&(D.geojson=function(K,q){for(var W=q._fullLayout,$=K[0].trace,R=$.marker||{},N=R.symbol,U=R.angle,Q=N!=="circle"?f(N):s,j=U!=="auto"?f(U,!0):s,X=o.hasText($)?f($.text):s,J=[],re=0;re<K.length;re++){var ne=K[re];if(!h(ne.lonlat)){var se,oe=$.texttemplate;if(oe){var pe=Array.isArray(oe)?oe[re]||"":oe,ce=$._module.formatLabels(ne,$,W),de={};d(de,$,ne.i);var xe=$._meta||{};se=m.texttemplateString(pe,ce,W._d3locale,de,ne,xe)}else se=X(re);se&&(se=se.replace(c,"").replace(i,`
1354`)),J.push({type:"Feature",geometry:{type:"Point",coordinates:ne.lonlat},properties:{symbol:Q(re),angle:j(re),text:se}})}}return{type:"FeatureCollection",features:J}}(a,p),m.extendFlat(D.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),I&&(m.extendFlat(D.layout,{"icon-size":l.marker.size/10}),"angle"in l.marker&&l.marker.angle!=="auto"&&m.extendFlat(D.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),D.layout["icon-allow-overlap"]=l.marker.allowoverlap,m.extendFlat(D.paint,{"icon-opacity":l.opacity*l.marker.opacity,"icon-color":l.marker.color})),L)){var V=(l.marker||{}).size,Z=r(l.textposition,V);m.extendFlat(D.layout,{"text-size":l.textfont.size,"text-anchor":Z.anchor,"text-offset":Z.offset}),m.extendFlat(D.paint,{"text-color":l.textfont.color,"text-opacity":l.opacity})}return F}},{"../../components/colorscale":378,"../../components/drawing":388,"../../components/fx/helpers":402,"../../constants/numerical":479,"../../lib":503,"../../lib/geojson_utils":497,"../../lib/svg_text_utils":529,"../../plots/mapbox/convert_text_opts":612,"../scatter/make_bubble_size_func":943,"../scatter/subtypes":951,"fast-isnumeric":190}],993:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/subtypes"),b=y("../scatter/marker_defaults"),v=y("../scatter/line_defaults"),e=y("../scatter/text_defaults"),n=y("../scatter/fillcolor_defaults"),t=y("./attributes");ee.exports=function(o,r,d,c){function i(f,s){return g.coerce(o,r,t,f,s)}if(function(f,s,h){var p=h("lon")||[],a=h("lat")||[],x=Math.min(p.length,a.length);return s._length=x,x}(0,r,i)){if(i("text"),i("texttemplate"),i("hovertext"),i("hovertemplate"),i("mode"),i("below"),m.hasLines(r)&&(v(o,r,d,c,i,{noDash:!0}),i("connectgaps")),m.hasMarkers(r)){b(o,r,d,c,i,{noLine:!0}),i("marker.allowoverlap"),i("marker.angle");var u=r.marker;u.symbol!=="circle"&&(g.isArrayOrTypedArray(u.size)&&(u.size=u.size[0]),g.isArrayOrTypedArray(u.color)&&(u.color=u.color[0]))}m.hasText(r)&&e(o,r,c,i,{noSelect:!0}),i("fill"),r.fill!=="none"&&n(o,r,d,i),g.coerceSelectionMarkerOpacity(r,i)}else r.visible=!1}},{"../../lib":503,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":991}],994:[function(y,ee,te){ee.exports=function(g,m){return g.lon=m.lon,g.lat=m.lat,g}},{}],995:[function(y,ee,te){var g=y("../../plots/cartesian/axes");ee.exports=function(m,b,v){var e={},n=v[b.subplot]._subplot.mockAxis,t=m.lonlat;return e.lonLabel=g.tickText(n,n.c2l(t[0]),!0).text,e.latLabel=g.tickText(n,n.c2l(t[1]),!0).text,e}},{"../../plots/cartesian/axes":554}],996:[function(y,ee,te){var g=y("../../components/fx"),m=y("../../lib"),b=y("../scatter/get_trace_color"),v=m.fillText,e=y("../../constants/numerical").BADNUM;function n(t,o,r){if(!t.hovertemplate){var d=(o.hi||t.hoverinfo).split("+"),c=d.indexOf("all")!==-1,i=d.indexOf("lon")!==-1,u=d.indexOf("lat")!==-1,f=o.lonlat,s=[];return c||i&&u?s.push("("+h(f[1])+", "+h(f[0])+")"):i?s.push(r.lon+h(f[0])):u&&s.push(r.lat+h(f[1])),(c||d.indexOf("text")!==-1)&&v(o,t,s),s.join("<br>")}function h(p){return p+"°"}}ee.exports={hoverPoints:function(t,o,r){var d=t.cd,c=d[0].trace,i=t.xa,u=t.ya,f=t.subplot,
1354s=360*(o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360)),h=o-s;if(g.getClosest(d,function(L){var A=L.lonlat;if(A[0]===e)return 1/0;var I=m.modHalf(A[0],360),P=A[1],S=f.project([I,P]),E=S.x-i.c2p([h,P]),D=S.y-u.c2p([I,r]),F=Math.max(3,L.mrc||0);return Math.max(Math.sqrt(E*E+D*D)-F,1-3/F)},t),t.index!==!1){var p=d[t.index],a=p.lonlat,x=[m.modHalf(a[0],360)+s,a[1]],l=i.c2p(x),w=u.c2p(x),_=p.mrc||1;t.x0=l-_,t.x1=l+_,t.y0=w-_,t.y1=w+_;var T={};T[c.subplot]={_subplot:f};var k=c._module.formatLabels(p,c,T);return t.lonLabel=k.lonLabel,t.latLabel=k.latLabel,t.color=b(c,p),t.extraText=n(c,p,d[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:n}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":936}],997:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../scatter/marker_colorbar"),formatLabels:y("./format_labels"),calc:y("../scattergeo/calc"),plot:y("./plot"),hoverPoints:y("./hover").hoverPoints,eventData:y("./event_data"),selectPoints:y("./select"),styleOnSelect:function(g,m){m&&m[0].trace._glTrace.update(m)},moduleType:"trace",name:"scattermapbox",basePlotModule:y("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":613,"../scatter/marker_colorbar":944,"../scattergeo/calc":969,"./attributes":991,"./defaults":993,"./event_data":994,"./format_labels":995,"./hover":996,"./plot":998,"./select":999}],998:[function(y,ee,te){var g=y("./convert"),m=y("../../plots/mapbox/constants").traceLayerPrefix,b=["fill","line","circle","symbol"];function v(n,t){this.type="scattermapbox",this.subplot=n,this.uid=t,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol"},this.layerIds={fill:m+t+"-fill",line:m+t+"-line",circle:m+t+"-circle",symbol:m+t+"-symbol"},this.below=null}var e=v.prototype;e.addSource=function(n,t){this.subplot.map.addSource(this.sourceIds[n],{type:"geojson",data:t.geojson})},e.setSourceData=function(n,t){this.subplot.map.getSource(this.sourceIds[n]).setData(t.geojson)},e.addLayer=function(n,t,o){this.subplot.addLayer({type:n,id:this.layerIds[n],source:this.sourceIds[n],layout:t.layout,paint:t.paint},o)},e.update=function(n){var t,o,r,d=this.subplot,c=d.map,i=g(d.gd,n),u=d.belowLookup["trace-"+this.uid];if(u!==this.below){for(t=b.length-1;t>=0;t--)o=b[t],c.removeLayer(this.layerIds[o]);for(t=0;t<b.length;t++)r=i[o=b[t]],this.addLayer(o,r,u);this.below=u}for(t=0;t<b.length;t++)r=i[o=b[t]],d.setOptions(this.layerIds[o],"setLayoutProperty",r.layout),r.layout.visibility==="visible"&&(this.setSourceData(o,r),d.setOptions(this.layerIds[o],"setPaintProperty",r.paint));n[0].trace._glTrace=this},e.dispose=function(){for(var n=this.subplot.map,t=b.length-1;t>=0;t--){var o=b[t];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},ee.exports=function(n,t){for(var o=t[0].trace,r=new v(n,o.uid),d=g(n.gd,t),c=r.below=n.belowLookup["trace-"+o.uid],i=0;i<b.length;i++){var u=b[i],f=d[u];r.addSource(u,f),r.addLayer(u,f,c)}return t[0].trace._glTrace=r,r}},{"../../plots/mapbox/constants":611,"./convert":992}],999:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/subtypes"),b=y("../../constants/numerical").BADNUM;ee.exports=function(v,e){var n,t=v.cd,o=v.xaxis,r=v.yaxis,d=[],c=t[0].trace;if(!m.hasMarkers(c))return[];if(e===!1)for(n=0;n<t.length;n++)t[n].selected=0;else for(n=0;n<t.length;n++){var i=t[n],u=i.lonlat;if(u[0]!==b){var f=[g.modHalf(u[0],360),u[1]],s=[o.c2p(f),r.c2p(f)];e.contains(s,null,n,v)?(d.push({pointNumber:n,lon:u[0],lat:u[1]}),i.selected=1):i.selected=0}}return d}},{"../../constants/numerical":479,"../../lib":503,"../scatter/subtypes":951}],1e3:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../../plots/template_attributes").texttemplateAttrs,b=y("../../lib/extend").extendFlat,v=y("../scatter/attributes"),e=y("../../plots/attributes"),n=v.line;ee.exports={mode:v.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:v.text,texttemplate:m({editType:"plot"},{keys:["r","theta","text"]}),hovertext:v.hovertext,line:{color:n.color,width:n.width,dash:n.dash,shape:b({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:v.connectgaps,marker:v.marker,cliponaxis:b({},v.cliponaxis,{dflt:!1}),textposition:v.textposition,textfont:v.textfont,fill:b({},v.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v.fillcolor,hoverinfo:b({},e.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:v.hoveron,hovertemplate:g(),selected:v.selected,unselected:v.unselected}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],1001:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../constants/numerical").BADNUM,b=y("../../plots/cartesian/axes"),v=y("../scatter/colorscale_calc"),e=y("../scatter/arrays_to_calcdata"),n=y("../scatter/calc_selection"),t=y("../scatter/calc").calcMarkerSize;ee.exports=function(o,r){for(var d=o._fullLayout,c=r.subplot,i=d[c].radialaxis,u=d[c].angularaxis,f=i.makeCalcdata(r,"r"),s=u.makeCalcdata(r,"theta"),h=r._length,p=new Array(h),a=0;a<h;a++){var x=f[a],l=s[a],w=p[a]={};g(x)&&g(l)?(w.r=x,w.theta=l):w.r=m}
1354var _=t(r,h);return r._extremes.x=b.findExtremes(i,f,{ppad:_}),v(o,r),e(p,r),n(p,r),p}},{"../../constants/numerical":479,"../../plots/cartesian/axes":554,"../scatter/arrays_to_calcdata":925,"../scatter/calc":927,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],1002:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/subtypes"),b=y("../scatter/marker_defaults"),v=y("../scatter/line_defaults"),e=y("../scatter/line_shape_defaults"),n=y("../scatter/text_defaults"),t=y("../scatter/fillcolor_defaults"),o=y("../scatter/constants").PTS_LINESONLY,r=y("./attributes");function d(c,i,u,f){var s,h=f("r"),p=f("theta");if(h)p?s=Math.min(h.length,p.length):(s=h.length,f("theta0"),f("dtheta"));else{if(!p)return 0;s=i.theta.length,f("r0"),f("dr")}return i._length=s,s}ee.exports={handleRThetaDefaults:d,supplyDefaults:function(c,i,u,f){function s(a,x){return g.coerce(c,i,r,a,x)}var h=d(c,i,f,s);if(h){s("thetaunit"),s("mode",h<o?"lines+markers":"lines"),s("text"),s("hovertext"),i.hoveron!=="fills"&&s("hovertemplate"),m.hasLines(i)&&(v(c,i,u,f,s),e(c,i,s),s("connectgaps")),m.hasMarkers(i)&&b(c,i,u,f,s,{gradient:!0}),m.hasText(i)&&(s("texttemplate"),n(c,i,f,s));var p=[];(m.hasMarkers(i)||m.hasText(i))&&(s("cliponaxis"),s("marker.maxdisplayed"),p.push("points")),s("fill"),i.fill!=="none"&&(t(c,i,u,s),m.hasLines(i)||e(c,i,s)),i.fill!=="tonext"&&i.fill!=="toself"||p.push("fills"),s("hoveron",p.join("+")||"points"),g.coerceSelectionMarkerOpacity(i,s)}else i.visible=!1}}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/line_shape_defaults":941,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":1e3}],1003:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes");ee.exports=function(b,v,e){var n,t,o={},r=e[v.subplot]._subplot;r?(n=r.radialAxis,t=r.angularAxis):(n=(r=e[v.subplot]).radialaxis,t=r.angularaxis);var d=n.c2l(b.r);o.rLabel=m.tickText(n,d,!0).text;var c=t.thetaunit==="degrees"?g.rad2deg(b.theta):b.theta;return o.thetaLabel=m.tickText(t,c,!0).text,o}},{"../../lib":503,"../../plots/cartesian/axes":554}],1004:[function(y,ee,te){var g=y("../scatter/hover");function m(b,v,e,n){var t=e.radialAxis,o=e.angularAxis;t._hovertitle="r",o._hovertitle="θ";var r={};r[v.subplot]={_subplot:e};var d=v._module.formatLabels(b,v,r);n.rLabel=d.rLabel,n.thetaLabel=d.thetaLabel;var c=b.hi||v.hoverinfo,i=[];function u(s,h){i.push(s._hovertitle+": "+h)}if(!v.hovertemplate){var f=c.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&u(t,n.rLabel),f.indexOf("theta")!==-1&&u(o,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(i.push(n.text),delete n.text),n.extraText=i.join("<br>")}}ee.exports={hoverPoints:function(b,v,e,n){var t=g(b,v,e,n);if(t&&t[0].index!==!1){var o=t[0];if(o.index===void 0)return t;var r=b.subplot,d=o.cd[o.index],c=o.trace;if(r.isPtInside(d))return o.xLabelVal=void 0,o.yLabelVal=void 0,m(d,c,r,o),o.hovertemplate=c.hovertemplate,t}},makeHoverPointText:m}},{"../scatter/hover":937}],1005:[function(y,ee,te){ee.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:y("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:y("./attributes"),supplyDefaults:y("./defaults").supplyDefaults,colorbar:y("../scatter/marker_colorbar"),formatLabels:y("./format_labels"),calc:y("./calc"),plot:y("./plot"),style:y("../scatter/style").style,styleOnSelect:y("../scatter/style").styleOnSelect,hoverPoints:y("./hover").hoverPoints,selectPoints:y("../scatter/select"),meta:{}}},{"../../plots/polar":622,"../scatter/marker_colorbar":944,"../scatter/select":948,"../scatter/style":950,"./attributes":1e3,"./calc":1001,"./defaults":1002,"./format_labels":1003,"./hover":1004,"./plot":1006}],1006:[function(y,ee,te){var g=y("../scatter/plot"),m=y("../../constants/numerical").BADNUM;ee.exports=function(b,v,e){for(var n=v.layers.frontplot.select("g.scatterlayer"),t={xaxis:v.xaxis,yaxis:v.yaxis,plot:v.framework,layerClipId:v._hasClipOnAxisFalse?v.clipIds.forTraces:null},o=v.radialAxis,r=v.angularAxis,d=0;d<e.length;d++)for(var c=e[d],i=0;i<c.length;i++){var u=c[i],f=u.r;if(f===m)u.x=u.y=m;else{var s=o.c2g(f),h=r.c2g(u.theta);u.x=s*Math.cos(h),u.y=s*Math.sin(h)}}g(b,t,e,n)}},{"../../constants/numerical":479,"../scatter/plot":947}],1007:[function(y,ee,te){var g=y("../scatterpolar/attributes"),m=y("../scattergl/attributes"),b=y("../../plots/template_attributes").texttemplateAttrs;ee.exports={mode:g.mode,r:g.r,theta:g.theta,r0:g.r0,dr:g.dr,theta0:g.theta0,dtheta:g.dtheta,thetaunit:g.thetaunit,text:g.text,texttemplate:b({editType:"plot"},{keys:["r","theta","text"]}),hovertext:g.hovertext,hovertemplate:g.hovertemplate,line:m.line,connectgaps:m.connectgaps,marker:m.marker,fill:m.fill,fillcolor:m.fillcolor,textposition:m.textposition,textfont:m.textfont,hoverinfo:g.hoverinfo,selected:g.selected,unselected:g.unselected}},{"../../plots/template_attributes":633,"../scattergl/attributes":978,"../scatterpolar/attributes":1e3}],1008:[function(y,ee,te){var g=y("../scatter/colorscale_calc"),m=y("../scatter/calc").calcMarkerSize,b=y("../scattergl/convert"),v=y("../../plots/cartesian/axes"),e=y("../scattergl/constants").TOO_MANY_POINTS;ee.exports=function(n,t){var o=n._fullLayout,r=t.subplot,d=o[r].radialaxis,c=o[r].angularaxis,i=t._r=d.makeCalcdata(t,"r"),u=t._theta=c.makeCalcdata(t,"theta"),f=t._length,s={};f<i.length&&(i=i.slice(0,f)),f<u.length&&(u=u.slice(0,f)),s.r=i,s.theta=u,g(n,t);var h,p=s.opts=b.style(n,t);return f<e?h=m(t,f):p.marker&&(h=2*(p.marker.sizeAvg||Math.max(p.marker.size,3))),t._extremes.x=v.findExtremes(d,i,{ppad:h}),[{x:!1,y:!1,t:s,trace:t}]}},{"../../plots/cartesian/axes":554,"../scatter/calc":927,"../scatter/colorscale_calc":929,"../scattergl/constants":980,"../scattergl/convert":981}],1009:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/subtypes"),b=y("../scatterpolar/defaults").handleRThetaDefaults,v=y("../scatter/marker_defaults"),e=y("../scatter/line_defaults"),n=y("../scatter/text_defaults"),t=y("../scatter/fillcolor_defaults"),o=y("../scatter/constants").PTS_LINESONLY,r=y("./attributes");ee.exports=function(d,c,i,u){function f(h,p){return g.coerce(d,c,r,h,p)}var s=b(d,c,u,f);s?(f("thetaunit"),f("mode",s<o?"lines+markers":"lines"),f("text"),f("hovertext"),c.hoveron!=="fills"&&f("hovertemplate"),m.hasLines(c)&&(e(d,c,i,u,f),f("connectgaps")),m.hasMarkers(c)&&v(d,c,i,u,f),m.hasText(c)&&(f("texttemplate"),n(d,c,u,f)),f("fill"),c.fill!=="none"&&t(d,c,i,f),g.coerceSelectionMarkerOpacity(c,f)):c.visible=!1}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"../scatterpolar/defaults":1002,"./attributes":1007}],1010:[function(y,ee,te){var g=y("../scatterpolar/format_labels");ee.exports=function(m,b,v){var e=m.i;return"r"in m||(m.r=b._r[e]),"theta"in m||(m.theta=b._theta[e]),g(m,b,v)}},{"../scatterpolar/format_labels":1003}],1011:[function(y,ee,te){var g=y("../scattergl/hover"),m=y("../scatterpolar/hover").makeHoverPointText;ee.exports={hoverPoints:function(b,v,e,n){var t=b.cd[0].t,o=t.r,r=t.theta,d=g.hoverPoints(b,v,e,n);if(d&&d[0].index!==!1){var c=d[0];if(c.index===void 0)return d;var i=b.subplot,u=c.cd[c.index],f=c.trace;if(u.r=o[c.index],u.theta=r[c.index],i.isPtInside(u))return c.xLabelVal=void 0,c.yLabelVal=void 0,m(u,f,i,c),d}}}},{"../scattergl/hover":986,"../scatterpolar/hover":1004}],1012:[function(y,ee,te){ee.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:y("../../plots/polar"),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../scatter/marker_colorbar"),formatLabels:y("./format_labels"),calc:y("./calc"),plot:y("./plot"),hoverPoints:y("./hover").hoverPoints,selectPoints:y("../scattergl/select"),meta:{}}},{"../../plots/polar":622,"../scatter/marker_colorbar":944,"../scattergl/select":990,"./attributes":1007,"./calc":1008,"./defaults":1009,"./format_labels":1010,"./hover":1011,"./plot":1013}],1013:[function(y,ee,te){var g=y("@plotly/point-cluster"),m=y("fast-isnumeric"),b=y("../scattergl/plot"),v=y("../scattergl/scene_update"),e=y("../scattergl/convert"),n=y("../../lib"),t=y("../scattergl/constants").TOO_MANY_POINTS;ee.exports=function(o,r,d){if(d.length){var c=r.radialAxis,i=r.angularAxis,u=v(o,r);return d.forEach(function(f){if(f&&f[0]&&f[0].trace){var s,h=f[0],p=h.trace,a=h.t,x=p._length,l=a.r,w=a.theta,_=a.opts,T=l.slice(),k=w.slice();for(s=0;s<l.length;s++)r.isPtInside({r:l[s],theta:w[s]})||(T[s]=NaN,k[s]=NaN);var L=new Array(2*x),A=Array(x),I=Array(x);for(s=0;s<x;s++){var P,S,E=T[s];if(m(E)){var D=c.c2g(E),F=i.c2g(k[s],p.thetaunit);P=D*Math.cos(F),S=D*Math.sin(F)}else P=S=NaN;A[s]=L[2*s]=P,I[s]=L[2*s+1]=S}a.tree=g(L),_.marker&&x>
1354=t&&(_.marker.cluster=a.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=L),_.line&&L.length>1&&n.extendFlat(_.line,e.linePositions(o,p,L)),_.text&&(n.extendFlat(_.text,{positions:L},e.textPosition(o,p,_.text,_.marker)),n.extendFlat(_.textSel,{positions:L},e.textPosition(o,p,_.text,_.markerSel)),n.extendFlat(_.textUnsel,{positions:L},e.textPosition(o,p,_.text,_.markerUnsel))),_.fill&&!u.fill2d&&(u.fill2d=!0),_.marker&&!u.scatter2d&&(u.scatter2d=!0),_.line&&!u.line2d&&(u.line2d=!0),_.text&&!u.glText&&(u.glText=!0),u.lineOptions.push(_.line),u.fillOptions.push(_.fill),u.markerOptions.push(_.marker),u.markerSelectedOptions.push(_.markerSel),u.markerUnselectedOptions.push(_.markerUnsel),u.textOptions.push(_.text),u.textSelectedOptions.push(_.textSel),u.textUnselectedOptions.push(_.textUnsel),u.selectBatch.push([]),u.unselectBatch.push([]),a.x=A,a.y=I,a.rawx=A,a.rawy=I,a.r=l,a.theta=w,a.positions=L,a._scene=u,a.index=u.count,u.count++}}),b(o,r,d)}}},{"../../lib":503,"../scattergl/constants":980,"../scattergl/convert":981,"../scattergl/plot":988,"../scattergl/scene_update":989,"@plotly/point-cluster":59,"fast-isnumeric":190}],1014:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../../plots/template_attributes").texttemplateAttrs,b=y("../../lib/extend").extendFlat,v=y("../scatter/attributes"),e=y("../../plots/attributes"),n=v.line;ee.exports={mode:v.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:v.text,texttemplate:m({editType:"plot"},{keys:["real","imag","text"]}),hovertext:v.hovertext,line:{color:n.color,width:n.width,dash:n.dash,shape:b({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:v.connectgaps,marker:v.marker,cliponaxis:b({},v.cliponaxis,{dflt:!1}),textposition:v.textposition,textfont:v.textfont,fill:b({},v.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v.fillcolor,hoverinfo:b({},e.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:v.hoveron,hovertemplate:g(),selected:v.selected,unselected:v.unselected}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],1015:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../../constants/numerical").BADNUM,b=y("../scatter/colorscale_calc"),v=y("../scatter/arrays_to_calcdata"),e=y("../scatter/calc_selection"),n=y("../scatter/calc").calcMarkerSize;ee.exports=function(t,o){for(var r=t._fullLayout,d=o.subplot,c=r[d].realaxis,i=r[d].imaginaryaxis,u=c.makeCalcdata(o,"real"),f=i.makeCalcdata(o,"imag"),s=o._length,h=new Array(s),p=0;p<s;p++){var a=u[p],x=f[p],l=h[p]={};g(a)&&g(x)?(l.real=a,l.imag=x):l.real=m}return n(o,s),b(t,o),v(h,o),e(h,o),h}},{"../../constants/numerical":479,"../scatter/arrays_to_calcdata":925,"../scatter/calc":927,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],1016:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/subtypes"),b=y("../scatter/marker_defaults"),v=y("../scatter/line_defaults"),e=y("../scatter/line_shape_defaults"),n=y("../scatter/text_defaults"),t=y("../scatter/fillcolor_defaults"),o=y("../scatter/constants").PTS_LINESONLY,r=y("./attributes");ee.exports=function(d,c,i,u){function f(p,a){return g.coerce(d,c,r,p,a)}var s=function(p,a,x,l){var w,_=l("real"),T=l("imag");return _&&T&&(w=Math.min(_.length,T.length)),a._length=w,w}(0,c,0,f);if(s){f("mode",s<o?"lines+markers":"lines"),f("text"),f("hovertext"),c.hoveron!=="fills"&&f("hovertemplate"),m.hasLines(c)&&(v(d,c,i,u,f),e(d,c,f),f("connectgaps")),m.hasMarkers(c)&&b(d,c,i,u,f,{gradient:!0}),m.hasText(c)&&(f("texttemplate"),n(d,c,u,f));var h=[];(m.hasMarkers(c)||m.hasText(c))&&(f("cliponaxis"),f("marker.maxdisplayed"),h.push("points")),f("fill"),c.fill!=="none"&&(t(d,c,i,f),m.hasLines(c)||e(d,c,f)),c.fill!=="tonext"&&c.fill!=="toself"||h.push("fills"),f("hoveron",h.join("+")||"points"),g.coerceSelectionMarkerOpacity(c,f)}else c.visible=!1}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/line_shape_defaults":941,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":1014}],1017:[function(y,ee,te){var g=y("../../plots/cartesian/axes");ee.exports=function(m,b,v){var e={},n=v[b.subplot]._subplot;return e.realLabel=g.tickText(n.radialAxis,m.real,!0).text,e.imagLabel=g.tickText(n.angularAxis,m.imag,!0).text,e}},{"../../plots/cartesian/axes":554}],1018:[function(y,ee,te){var g=y("../scatter/hover");function m(b,v,e,n){var t=e.radialAxis,o=e.angularAxis;t._hovertitle="real",o._hovertitle="imag";var r={};r[v.subplot]={_subplot:e};var d=v._module.formatLabels(b,v,r);n.realLabel=d.realLabel,n.imagLabel=d.imagLabel;var c=b.hi||v.hoverinfo,i=[];function u(s,h){i.push(s._hovertitle+": "+h)}if(!v.hovertemplate){var f=c.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&u(t,n.realLabel),f.indexOf("imag")!==-1&&u(o,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(i.push(n.text),delete n.text),n.extraText=i.join("<br>")}}ee.exports={hoverPoints:function(b,v,e,n){var t=g(b,v,e,n);if(t&&t[0].index!==!1){var o=t[0];if(o.index===void 0)return t;var r=b.subplot,d=o.cd[o.index],c=o.trace;if(r.isPtInside(d))return o.xLabelVal=void 0,o.yLabelVal=void 0,m(d,c,r,o),o.hovertemplate=c.hovertemplate,t}},makeHoverPointText:m}},{"../scatter/hover":937}],1019:[function(y,ee,te){ee.exports={moduleType:"trace",name:"scattersmith",basePlotModule:y("../../plots/smith"),categories:["smith","symbols","showLegend","scatter-like"],attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../scatter/marker_colorbar"),formatLabels:y("./format_labels"),calc:y("./calc"),plot:y("./plot"),style:y("../scatter/style").style,styleOnSelect:y("../scatter/style").styleOnSelect,hoverPoints:y("./hover").hoverPoints,selectPoints:y("../scatter/select"),meta:{}}},{"../../plots/smith":629,"../scatter/marker_colorbar":944,"../scatter/select":948,"../scatter/style":950,"./attributes":1014,"./calc":1015,"./defaults":1016,"./format_labels":1017,"./hover":1018,"./plot":1020}],1020:[function(y,ee,te){var g=y("../scatter/plot"),m=y("../../constants/numerical").BADNUM,b=y("../../plots/smith/helpers").smith;ee.exports=function(v,e,n){for(var t=e.layers.frontplot.select("g.scatterlayer"),o={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},r=0;r<n.length;r++)for(var d=n[r],c=0;c<d.length;c++){var i=d[c],u=i.real;if(u===m)i.x=i.y=m;else{var f=b([u,i.imag]);i.x=f[0],i.y=f[1]}}g(v,o,n,t)}},{"../../constants/numerical":479,"../../plots/smith/helpers":628,"../scatter/plot":947}],1021:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../../plots/template_attributes").texttemplateAttrs,b=y("../scatter/attributes"),v=y("../../plots/attributes"),e=y("../../components/colorscale/attributes"),n=y("../../components/drawing/attributes").dash,t=y("../../lib/extend").extendFlat,o=b.marker,r=b.line,d=o.line;ee.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:t({},b.mode,{dflt:"markers"}),text:t({},b.text,{}),texttemplate:m({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:t({},b.hovertext,{}),line:{color:r.color,width:r.width,dash:n,shape:t({},r.shape,{values:["linear","spline"]}),smoothing:r.smoothing,editType:"calc"},connectgaps:b.connectgaps,cliponaxis:b.cliponaxis,fill:t({},b.fill,{values:["none","toself","tonext"],dflt:"none"}
1354),fillcolor:b.fillcolor,marker:t({symbol:o.symbol,opacity:o.opacity,maxdisplayed:o.maxdisplayed,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,line:t({width:d.width,editType:"calc"},e("marker.line")),gradient:o.gradient,editType:"calc"},e("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:t({},v.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:b.hoveron,hovertemplate:g()}},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],1022:[function(y,ee,te){var g=y("fast-isnumeric"),m=y("../scatter/colorscale_calc"),b=y("../scatter/arrays_to_calcdata"),v=y("../scatter/calc_selection"),e=y("../scatter/calc").calcMarkerSize,n=["a","b","c"],t={a:["b","c"],b:["a","c"],c:["a","b"]};ee.exports=function(o,r){var d,c,i,u,f,s,h=o._fullLayout[r.subplot].sum,p=r.sum||h,a={a:r.a,b:r.b,c:r.c};for(d=0;d<n.length;d++)if(!a[i=n[d]]){for(f=a[t[i][0]],s=a[t[i][1]],u=new Array(f.length),c=0;c<f.length;c++)u[c]=p-f[c]-s[c];a[i]=u}var x,l,w,_,T,k,L=r._length,A=new Array(L);for(d=0;d<L;d++)x=a.a[d],l=a.b[d],w=a.c[d],g(x)&&g(l)&&g(w)?((_=h/((x=+x)+(l=+l)+(w=+w)))!==1&&(x*=_,l*=_,w*=_),k=x,T=w-l,A[d]={x:T,y:k,a:x,b:l,c:w}):A[d]={x:!1,y:!1};return e(r,L),m(o,r),b(A,r),v(A,r),A}},{"../scatter/arrays_to_calcdata":925,"../scatter/calc":927,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],1023:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/constants"),b=y("../scatter/subtypes"),v=y("../scatter/marker_defaults"),e=y("../scatter/line_defaults"),n=y("../scatter/line_shape_defaults"),t=y("../scatter/text_defaults"),o=y("../scatter/fillcolor_defaults"),r=y("./attributes");ee.exports=function(d,c,i,u){function f(l,w){return g.coerce(d,c,r,l,w)}var s,h=f("a"),p=f("b"),a=f("c");if(h?(s=h.length,p?(s=Math.min(s,p.length),a&&(s=Math.min(s,a.length))):s=a?Math.min(s,a.length):0):p&&a&&(s=Math.min(p.length,a.length)),s){c._length=s,f("sum"),f("text"),f("hovertext"),c.hoveron!=="fills"&&f("hovertemplate"),f("mode",s<m.PTS_LINESONLY?"lines+markers":"lines"),b.hasLines(c)&&(e(d,c,i,u,f),n(d,c,f),f("connectgaps")),b.hasMarkers(c)&&v(d,c,i,u,f,{gradient:!0}),b.hasText(c)&&(f("texttemplate"),t(d,c,u,f));var x=[];(b.hasMarkers(c)||b.hasText(c))&&(f("cliponaxis"),f("marker.maxdisplayed"),x.push("points")),f("fill"),c.fill!=="none"&&(o(d,c,i,f),b.hasLines(c)||n(d,c,f)),c.fill!=="tonext"&&c.fill!=="toself"||x.push("fills"),f("hoveron",x.join("+")||"points"),g.coerceSelectionMarkerOpacity(c,f)}else c.visible=!1}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/line_shape_defaults":941,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":1021}],1024:[function(y,ee,te){ee.exports=function(g,m,b,v,e){if(m.xa&&(g.xaxis=m.xa),m.ya&&(g.yaxis=m.ya),v[e]){var n=v[e];g.a=n.a,g.b=n.b,g.c=n.c}else g.a=m.a,g.b=m.b,g.c=m.c;return g}},{}],1025:[function(y,ee,te){var g=y("../../plots/cartesian/axes");ee.exports=function(m,b,v){var e={},n=v[b.subplot]._subplot;return e.aLabel=g.tickText(n.aaxis,m.a,!0).text,e.bLabel=g.tickText(n.baxis,m.b,!0).text,e.cLabel=g.tickText(n.caxis,m.c,!0).text,e}},{"../../plots/cartesian/axes":554}],1026:[function(y,ee,te){var g=y("../scatter/hover");ee.exports=function(m,b,v,e){var n=g(m,b,v,e);if(n&&n[0].index!==!1){var t=n[0];if(t.index===void 0){var o=1-t.y0/m.ya._length,r=m.xa._length,d=r*o/2,c=r-d;return t.x0=Math.max(Math.min(t.x0,c),d),t.x1=Math.max(Math.min(t.x1,c),d),n}var i=t.cd[t.index],u=t.trace,f=t.subplot;t.a=i.a,t.b=i.b,t.c=i.c,t.xLabelVal=void 0,t.yLabelVal=void 0;var s={};s[u.subplot]={_subplot:f};var h=u._module.formatLabels(i,u,s);t.aLabel=h.aLabel,t.bLabel=h.bLabel,t.cLabel=h.cLabel;var p=i.hi||u.hoverinfo,a=[];if(!u.hovertemplate){var x=p.split("+");x.indexOf("all")!==-1&&(x=["a","b","c"]),x.indexOf("a")!==-1&&l(f.aaxis,t.aLabel),x.indexOf("b")!==-1&&l(f.baxis,t.bLabel),x.indexOf("c")!==-1&&l(f.caxis,t.cLabel)}return t.extraText=a.join("<br>"),t.hovertemplate=u.hovertemplate,n}function l(w,_){a.push(w._hovertitle+": "+_)}}},{"../scatter/hover":937}],1027:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../scatter/marker_colorbar"),formatLabels:y("./format_labels"),calc:y("./calc"),plot:y("./plot"),style:y("../scatter/style").style,styleOnSelect:y("../scatter/style").styleOnSelect,hoverPoints:y("./hover"),selectPoints:y("../scatter/select"),eventData:y("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:y("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":634,"../scatter/marker_colorbar":944,"../scatter/select":948,"../scatter/style":950,"./attributes":1021,"./calc":1022,"./defaults":1023,"./event_data":1024,"./format_labels":1025,"./hover":1026,"./plot":1028}],1028:[function(y,ee,te){var g=y("../scatter/plot");ee.exports=function(m,b,v){var e=b.plotContainer;e.select(".scatterlayer").selectAll("*").remove();
1354var n={xaxis:b.xaxis,yaxis:b.yaxis,plot:e,layerClipId:b._hasClipOnAxisFalse?b.clipIdRelative:null},t=b.layers.frontplot.select("g.scatterlayer");g(m,n,v,t)}},{"../scatter/plot":947}],1029:[function(y,ee,te){var g=y("../scatter/attributes"),m=y("../../components/colorscale/attributes"),b=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,v=y("../../plots/template_attributes").hovertemplateAttrs,e=y("../scattergl/attributes"),n=y("../../plots/cartesian/constants").idRegex,t=y("../../plot_api/plot_template").templatedArray,o=y("../../lib/extend").extendFlat,r=g.marker,d=r.line,c=o(m("marker.line",{editTypeOverride:"calc"}),{width:o({},d.width,{editType:"calc"}),editType:"calc"}),i=o(m("marker"),{symbol:r.symbol,size:o({},r.size,{editType:"markerSize"}),sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,opacity:r.opacity,colorbar:r.colorbar,line:c,editType:"calc"});function u(f){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:n[f],editType:"plot"}}}i.color.editType=i.cmin.editType=i.cmax.editType="style",ee.exports={dimensions:t("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:o({},e.text,{}),hovertext:o({},e.hovertext,{}),hovertemplate:v(),xhoverformat:b("x"),yhoverformat:b("y"),marker:i,xaxes:u("x"),yaxes:u("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:e.selected.marker,editType:"calc"},unselected:{marker:e.unselected.marker,editType:"calc"},opacity:e.opacity}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_format_attributes":557,"../../plots/cartesian/constants":561,"../../plots/template_attributes":633,"../scatter/attributes":926,"../scattergl/attributes":978}],1030:[function(y,ee,te){var g=y("regl-line2d"),m=y("../../registry"),b=y("../../lib/prepare_regl"),v=y("../../plots/get_data").getModuleCalcData,e=y("../../plots/cartesian"),n=y("../../plots/cartesian/axis_ids").getFromId,t=y("../../plots/cartesian/axes").shouldShowZeroLine;function o(d,c,i){for(var u=i.matrixOptions.data.length,f=c._visibleDims,s=i.viewOpts.ranges=new Array(u),h=0;h<f.length;h++){var p=f[h],a=s[h]=new Array(4),x=n(d,c._diag[p][0]);x&&(a[0]=x.r2l(x.range[0]),a[2]=x.r2l(x.range[1]));var l=n(d,c._diag[p][1]);l&&(a[1]=l.r2l(l.range[0]),a[3]=l.r2l(l.range[1]))}i.selectBatch.length||i.unselectBatch.length?i.matrix.update({ranges:s},{ranges:s}):i.matrix.update({ranges:s})}function r(d){var c=d._fullLayout,i=c._glcanvas.data()[0].regl,u=c._splomGrid;u||(u=c._splomGrid=g(i)),u.update(function(f){var s,h=f._context.plotGlPixelRatio,p=f._fullLayout,a=p._size,x=[0,0,p.width*h,p.height*h],l={};function w(K,q,W,$,R,N){W*=h,$*=h,R*=h,N*=h;var U=q[K+"color"],Q=q[K+"width"],j=String(U+Q);j in l?l[j].data.push(NaN,NaN,W,$,R,N):l[j]={data:[W,$,R,N],join:"rect",thickness:Q*h,color:U,viewport:x,range:x,overlay:!1}}for(s in p._splomSubplots){var _,T,k=p._plots[s],L=k.xaxis,A=k.yaxis,I=L._gridVals,P=A._gridVals,S=L._offset,E=L._length,D=A._length,F=a.b+A.domain[0]*a.h,H=-A._m,V=-H*A.r2l(A.range[0],A.calendar);if(L.showgrid)for(s=0;s<I.length;s++)_=S+L.l2p(I[s].x),w("grid",L,_,F,_,F+D);if(A.showgrid)for(s=0;s<P.length;s++)T=F+V+H*P[s].x,w("grid",A,S,T,S+E,T);t(f,L,A)&&(_=S+L.l2p(0),w("zeroline",L,_,F,_,F+D)),t(f,A,L)&&w("zeroline",A,S,T=F+V+0,S+E,T)}var Z=[];for(s in l)Z.push(l[s]);return Z}(d))}ee.exports={name:"splom",attr:e.attr,attrRegex:e.attrRegex,layoutAttributes:e.layoutAttributes,supplyLayoutDefaults:e.supplyLayoutDefaults,drawFramework:e.drawFramework,plot:function(d){var c=d._fullLayout,i=m.getModule("splom"),u=v(d.calcdata,i)[0];
1354b(d,["ANGLE_instanced_arrays","OES_element_index_uint"])&&(c._hasOnlyLargeSploms&&r(d),i.plot(d,{},u))},drag:function(d){var c=d.calcdata,i=d._fullLayout;i._hasOnlyLargeSploms&&r(d);for(var u=0;u<c.length;u++){var f=c[u][0].trace,s=i._splomScenes[f.uid];f.type==="splom"&&s&&s.matrix&&o(d,f,s)}},updateGrid:r,clean:function(d,c,i,u){var f,s={};if(u._splomScenes){for(f=0;f<d.length;f++){var h=d[f];h.type==="splom"&&(s[h.uid]=1)}for(f=0;f<i.length;f++){var p=i[f];if(!s[p.uid]){var a=u._splomScenes[p.uid];a&&a.destroy&&a.destroy(),u._splomScenes[p.uid]=null,delete u._splomScenes[p.uid]}}}Object.keys(u._splomScenes||{}).length===0&&delete u._splomScenes,u._splomGrid&&!c._hasOnlyLargeSploms&&u._hasOnlyLargeSploms&&(u._splomGrid.destroy(),u._splomGrid=null,delete u._splomGrid),e.clean(d,c,i,u)},updateFx:e.updateFx,toSVG:e.toSVG}},{"../../lib/prepare_regl":516,"../../plots/cartesian":568,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_ids":558,"../../plots/get_data":593,"../../registry":638,"regl-line2d":280}],1031:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axis_ids"),b=y("../scatter/calc").calcMarkerSize,v=y("../scatter/calc").calcAxisExpansion,e=y("../scatter/colorscale_calc"),n=y("../scattergl/convert").markerSelection,t=y("../scattergl/convert").markerStyle,o=y("./scene_update"),r=y("../../constants/numerical").BADNUM,d=y("../scattergl/constants").TOO_MANY_POINTS;ee.exports=function(c,i){var u,f,s,h,p,a,x=i.dimensions,l=i._length,w={},_=w.cdata=[],T=w.data=[],k=i._visibleDims=[];function L(I,P){for(var S=I.makeCalcdata({v:P.values,vcalendar:i.calendar},"v"),E=0;E<S.length;E++)S[E]=S[E]===r?NaN:S[E];_.push(S),T.push(I.type==="log"?g.simpleMap(S,I.c2l):S)}for(u=0;u<x.length;u++)if((s=x[u]).visible){if(h=m.getFromId(c,i._diag[u][0]),p=m.getFromId(c,i._diag[u][1]),h&&p&&h.type!==p.type){g.log("Skipping splom dimension "+u+" with conflicting axis types");continue}h?(L(h,s),p&&p.type==="category"&&(p._categories=h._categories.slice())):L(p,s),k.push(u)}for(e(c,i),g.extendFlat(w,t(i)),a=_.length*l>d?w.sizeAvg||Math.max(w.size,3):b(i,l),f=0;f<k.length;f++)s=x[u=k[f]],h=m.getFromId(c,i._diag[u][0])||{},p=m.getFromId(c,i._diag[u][1])||{},v(c,i,h,p,_[f],_[f],a);var A=o(c,i);return A.matrix||(A.matrix=!0),A.matrixOptions=w,A.selectedOptions=n(i,i.selected),A.unselectedOptions=n(i,i.unselected),[{x:!1,y:!1,t:{},trace:i}]}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axis_ids":558,"../scatter/calc":927,"../scatter/colorscale_calc":929,"../scattergl/constants":980,"../scattergl/convert":981,"./scene_update":1038}],1032:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/array_container_defaults"),b=y("./attributes"),v=y("../scatter/subtypes"),e=y("../scatter/marker_defaults"),n=y("../parcoords/merge_length"),t=y("../scattergl/helpers").isOpenSymbol;function o(r,d){function c(u,f){return g.coerce(r,d,b.dimensions,u,f)}c("label");var i=c("values");i&&i.length?c("visible"):d.visible=!1,c("axis.type"),c("axis.matches")}ee.exports=function(r,d,c,i){function u(l,w){return g.coerce(r,d,b,l,w)}var f=m(r,d,{name:"dimensions",handleItemDefaults:o}),s=u("diagonal.visible"),h=u("showupperhalf"),p=u("showlowerhalf");if(n(d,f,"values")&&(s||h||p)){u("text"),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat"),e(r,d,c,i,u);var a=t(d.marker.symbol),x=v.isBubble(d);u("marker.line.width",a||x?1:0),function(l,w,_,T){var k,L,A=w.dimensions,I=A.length,P=w.showupperhalf,S=w.showlowerhalf,E=w.diagonal.visible,D=new Array(I),F=new Array(I);for(k=0;k<I;k++){var H=k?k+1:"";D[k]="x"+H,F[k]="y"+H}var V=T("xaxes",D),Z=T("yaxes",F),K=w._diag=new Array(I);w._xaxes={},w._yaxes={};var q=[],W=[];function $(ne,se,oe,pe){if(ne){var ce=ne.charAt(0),de=_._splomAxes[ce];if(w["_"+ce+"axes"][ne]=1,pe.push(ne),!(ne in de)){var xe=de[ne]={};oe&&(xe.label=oe.label||"",oe.visible&&oe.axis&&(oe.axis.type&&(xe.type=oe.axis.type),oe.axis.matches&&(xe.matches=se)))}}}var R=!E&&!S,N=!E&&!P;for(w._axesDim={},k=0;k<I;k++){var U=A[k],Q=k===0,j=k===I-1,X=Q&&R||j&&N?void 0:V[k],J=Q&&N||j&&R?void 0:Z[k];$(X,J,U,q),$(J,X,U,W),K[k]=[X,J],w._axesDim[X]=k,w._axesDim[J]=k}for(k=0;k<q.length;k++)for(L=0;L<W.length;L++){var re=q[k]+W[L];k>L&&P||k<L&&S?_._splomSubplots[re]=1:k!==L||!E&&S&&P||(_._splomSubplots[re]=1)}(!S||!E&&P&&S)&&(_._splomGridDflt.xside="bottom",_._splomGridDflt.yside="left")}(0,d,i,u),g.coerceSelectionMarkerOpacity(d,u)}else d.visible=!1}},{"../../lib":503,"../../plots/array_container_defaults":549,"../parcoords/merge_length":897,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scattergl/helpers":985,"./attributes":1029}],1033:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/colorscale_calc"),b=y("../scattergl/convert").markerStyle;ee.exports=function(v,e){var n=e.trace,t=v._fullLayout._splomScenes[n.uid];if(t){m(v,n),g.extendFlat(t.matrixOptions,b(n));var o=g.extendFlat({},t.matrixOptions,t.viewOpts);t.matrix.update(o,null)}}},{"../../lib":503,"../scatter/colorscale_calc":929,"../scattergl/convert":981}],1034:[function(y,ee,te){te.getDimIndex=function(g,m){for(var b=m._id,v={x:0,y:1}[b.charAt(0)],e=g._visibleDims,n=0;n<e.length;n++){var t=e[n];if(g._diag[t][v]===b)return n}return!1}},{}],1035:[function(y,ee,te){var g=y("./helpers"),m=y("../scattergl/hover").calcHover;ee.exports={hoverPoints:function(b,v,e){var n=b.cd[0].trace,t=b.scene.matrixOptions.cdata,o=b.xa,r=b.ya,d=o.c2p(v),c=r.c2p(e),i=b.distance,u=g.getDimIndex(n,o),f=g.getDimIndex(n,r);if(u===!1||f===!1)return[b];for(var s,h,p=t[u],a=t[f],x=i,l=0;l<p.length;l++){var w=p[l],_=a[l],T=o.c2p(w)-d,k=r.c2p(_)-c,L=Math.sqrt(T*T+k*k);L<x&&(x=h=L,s=l)}return b.index=s,b.distance=x,b.dxy=h,s===void 0?[b]:[m(b,p,a,n)]}}},{"../scattergl/hover":986,"./helpers":1034}],1036:[function(y,ee,te){var g=y("../../registry"),m=y("../../components/grid");ee.exports={moduleType:"trace",name:"splom",basePlotModule:y("./base_plot"),categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:y("../scatter/marker_colorbar"),calc:y("./calc"),plot:y("./plot"),hoverPoints:y("./hover").hoverPoints,selectPoints:y("./select"),editStyle:y("./edit_style"),meta:{}},g.register(m)},{"../../components/grid":410,"../../registry":638,"../scatter/marker_colorbar":944,"./attributes":1029,"./base_plot":1030,"./calc":1031,"./defaults":1032,"./edit_style":1033,"./hover":1035,"./plot":1037,"./select":1039}],1037:[function(y,ee,te){var g=y("regl-splom"),m=y("../../lib"),b=y("../../plots/cartesian/axis_ids"),v=y("../../components/dragelement/helpers").selectMode;function e(n,t){var o,r,d,c,i,u=n._fullLayout,f=u._size,s=t.trace,h=t.t,p=u._splomScenes[s.uid],a=p.matrixOptions,x=a.cdata,l=u._glcanvas.data()[0].regl,w=u.dragmode;if(x.length!==0){a.lower=s.showupperhalf,a.upper=s.showlowerhalf,a.diagonal=s.diagonal.visible;var _=s._visibleDims,T=x.length,k=p.viewOpts={};for(k.ranges=new Array(T),k.domains=new Array(T),i=0;i<_.length;i++){d=_[i];var L=k.ranges[i]=new Array(4),A=k.domains[i]=new Array(4);(o=b.getFromId(n,s._diag[d][0]))&&(L[0]=o._rl[0],L[2]=o._rl[1],A[0]=o.domain[0],A[2]=o.domain[1]),(r=b.getFromId(n,s._diag[d][1]))&&(L[1]=r._rl[0],L[3]=r._rl[1],A[1]=r.domain[0],A[3]=r.domain[1])}var I=n._context.plotGlPixelRatio,P=f.l*I,S=f.b*I,E=f.w*I,D=f.h*I;k.viewport=[P,S,E+P,D+S],p.matrix===!0&&(p.matrix=g(l));var F=u.clickmode.indexOf("select")>-1,H=!0;if(v(w)||s.selectedpoints||F){var V=s._length;if(s.selectedpoints){p.selectBatch=s.selectedpoints;var Z=s.selectedpoints,K={};for(d=0;d<Z.length;d++)K[Z[d]]=!0;var q=[];for(d=0;d<V;d++)K[d]||q.push(d);p.unselectBatch=q}var W=h.xpx=new Array(T),$=h.ypx=new Array(T);for(i=0;i<_.length;i++){if(d=_[i],o=b.getFromId(n,s._diag[d][0]))for(W[i]=new Array(V),c=0;c<V;c++)W[i][c]=o.c2p(x[i][c]);if(r=b.getFromId(n,s._diag[d][1]))for($[i]=new Array(V),c=0;c<V;c++)$[i][c]=r.c2p(x[i][c])}if(p.selectBatch.length||p.unselectBatch.length){var R=m.extendFlat({}
1354,a,p.unselectedOptions,k),N=m.extendFlat({},a,p.selectedOptions,k);p.matrix.update(R,N),H=!1}}else h.xpx=h.ypx=null;if(H){var U=m.extendFlat({},a,k);p.matrix.update(U,null)}}}ee.exports=function(n,t,o){if(o.length)for(var r=0;r<o.length;r++)e(n,o[r][0])}},{"../../components/dragelement/helpers":384,"../../lib":503,"../../plots/cartesian/axis_ids":558,"regl-splom":282}],1038:[function(y,ee,te){var g=y("../../lib");ee.exports=function(m,b){var v=m._fullLayout,e=b.uid,n=v._splomScenes;n||(n=v._splomScenes={});var t={dirty:!0,selectBatch:[],unselectBatch:[]},o=n[b.uid];return o||((o=n[e]=g.extendFlat({},t,{matrix:!1,selectBatch:[],unselectBatch:[]})).draw=function(){o.matrix&&o.matrix.draw&&(o.selectBatch.length||o.unselectBatch.length?o.matrix.draw(o.unselectBatch,o.selectBatch):o.matrix.draw()),o.dirty=!1},o.destroy=function(){o.matrix&&o.matrix.destroy&&o.matrix.destroy(),o.matrixOptions=null,o.selectBatch=null,o.unselectBatch=null,o=null}),o.dirty||g.extendFlat(o,t),o}},{"../../lib":503}],1039:[function(y,ee,te){var g=y("../../lib"),m=y("../scatter/subtypes"),b=y("./helpers");ee.exports=function(v,e){var n=v.cd,t=n[0].trace,o=n[0].t,r=v.scene,d=r.matrixOptions.cdata,c=v.xaxis,i=v.yaxis,u=[];if(!r)return u;var f=!m.hasMarkers(t)&&!m.hasText(t);if(t.visible!==!0||f)return u;var s=b.getDimIndex(t,c),h=b.getDimIndex(t,i);if(s===!1||h===!1)return u;var p=o.xpx[s],a=o.ypx[h],x=d[s],l=d[h],w=[],_=[];if(e!==!1&&!e.degenerate)for(var T=0;T<x.length;T++)e.contains([p[T],a[T]],null,T,v)?(w.push(T),u.push({pointNumber:T,x:x[T],y:l[T]})):_.push(T);var k=r.matrixOptions;return w.length||_.length?r.selectBatch.length||r.unselectBatch.length||r.matrix.update(r.unselectedOptions,g.extendFlat({},k,r.selectedOptions,r.viewOpts)):r.matrix.update(k,null),r.selectBatch=w,r.unselectBatch=_,u}},{"../../lib":503,"../scatter/subtypes":951,"./helpers":1034}],1040:[function(y,ee,te){var g=y("../../components/colorscale/attributes"),m=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=y("../../plots/template_attributes").hovertemplateAttrs,v=y("../mesh3d/attributes"),e=y("../../plots/attributes"),n=y("../../lib/extend").extendFlat,t={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:b({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:m("u",1),vhoverformat:m("v",1),whoverformat:m("w",1),xhoverformat:m("x"),yhoverformat:m("y"),zhoverformat:m("z"),showlegend:n({},e.showlegend,{dflt:!1})};n(t,g("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(o){t[o]=v[o]}),t.hoverinfo=n({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),t.transforms=void 0,ee.exports=t},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],1041:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/colorscale/calc");function b(n){var t,o,r,d,c,i,u,f,s,h,p,a,x=n._x,l=n._y,w=n._z,_=n._len,T=-1/0,k=1/0,L=-1/0,A=1/0,I=-1/0,P=1/0,S="";for(_&&(u=x[0],s=l[0],p=w[0]),_>1&&(f=x[_-1],h=l[_-1],a=w[_-1]),t=0;t<_;t++)T=Math.max(T,x[t]),k=Math.min(k,x[t]),L=Math.max(L,l[t]),A=Math.min(A,l[t]),I=Math.max(I,w[t]),P=Math.min(P,w[t]),d||x[t]===u||(d=!0,S+="x"),c||l[t]===s||(c=!0,S+="y"),i||w[t]===p||(i=!0,S+="z");d||(S+="x"),c||(S+="y"),i||(S+="z");var E=v(n._x),D=v(n._y),F=v(n._z);S=(S=(S=S.replace("x",(u>f?"-":"+")+"x")).replace("y",(s>h?"-":"+")+"y")).replace("z",(p>a?"-":"+")+"z");var H=function(){_=0,E=[],D=[],F=[]};(!_||_<E.length*D.length*F.length)&&H();var V=function(ce){return ce==="x"?x:ce==="y"?l:w},Z=function(ce){return ce==="x"?E:ce==="y"?D:F},K=function(ce){return ce[_-1]<ce[0]?-1:1},q=V(S[1]),W=V(S[3]),$=V(S[5]),R=Z(S[1]).length,N=Z(S[3]).length,U=Z(S[5]).length,Q=!1,j=function(ce,de,xe){return R*(N*ce+de)+xe},X=K(V(S[1])),J=K(V(S[3])),re=K(V(S[5]));for(t=0;t<U-1;t++){for(o=0;o<N-1;o++){for(r=0;r<R-1;r++){var ne=j(t,o,r),se=j(t,o,r+1),oe=j(t,o+1,r),pe=j(t+1,o,r);if(q[ne]*X<q[se]*X&&W[ne]*J<W[oe]*J&&$[ne]*re<$[pe]*re||(Q=!0),Q)break}if(Q)break}if(Q)break}return Q&&(g.warn("Encountered arbitrary coordinates! Unable to input data grid."),H()),{xMin:k,yMin:A,zMin:P,xMax:T,yMax:L,zMax:I,Xs:E,Ys:D,Zs:F,len:_,fill:S}}function v(n){return g.distinctVals(n).vals}function e(n,t){if(t===void 0&&(t=n.length),g.isTypedArray(n))return n.subarray(0,t);for(var o=[],r=0;r<t;r++)o[r]=+n[r];return o}ee.exports={calc:function(n,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=e(t.u,t._len),t._v=e(t.v,t._len),t._w=e(t.w,t._len),t._x=e(t.x,t._len),t._y=e(t.y,t._len),t._z=e(t.z,t._len);var o=b(t);t._gridFill=o.fill,t._Xs=o.Xs,t._Ys=o.Ys,t._Zs=o.Zs,t._len=o.len;var r,d,c,i=0;t.starts&&(r=e(t.starts.x||[]),d=e(t.starts.y||[]),c=e(t.starts.z||[]),i=Math.min(r.length,d.length,c.length)),t._startsX=r||[],t._startsY=d||[],t._startsZ=c||[];var u,f=0,s=1/0;for(u=0;
1354u<t._len;u++){var h=t._u[u],p=t._v[u],a=t._w[u],x=Math.sqrt(h*h+p*p+a*a);f=Math.max(f,x),s=Math.min(s,x)}for(m(n,t,{vals:[s,f],containerStr:"",cLetter:"c"}),u=0;u<i;u++){var l=r[u];o.xMax=Math.max(o.xMax,l),o.xMin=Math.min(o.xMin,l);var w=d[u];o.yMax=Math.max(o.yMax,w),o.yMin=Math.min(o.yMin,w);var _=c[u];o.zMax=Math.max(o.zMax,_),o.zMin=Math.min(o.zMin,_)}t._slen=i,t._normMax=f,t._xbnds=[o.xMin,o.xMax],t._ybnds=[o.yMin,o.yMax],t._zbnds=[o.zMin,o.zMax]},filter:e,processGrid:b}},{"../../components/colorscale/calc":374,"../../lib":503}],1042:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_streamtube3d,m=g.createTubeMesh,b=y("../../lib"),v=y("../../lib/gl_format_color").parseColorScale,e=y("../../components/colorscale").extractOpts,n=y("../../plots/gl3d/zip3"),t={xaxis:0,yaxis:1,zaxis:2};function o(u,f){this.scene=u,this.uid=f,this.mesh=null,this.data=null}var r=o.prototype;function d(u){var f=u.length;return f>2?u.slice(1,f-1):f===2?[(u[0]+u[1])/2]:u}function c(u){var f=u.length;return f===1?[.5,.5]:[u[1]-u[0],u[f-1]-u[f-2]]}function i(u,f){var s=u.fullSceneLayout,h=u.dataScale,p=f._len,a={};function x(R,N){var U=s[N],Q=h[t[N]];return b.simpleMap(R,function(j){return U.d2l(j)*Q})}if(a.vectors=n(x(f._u,"xaxis"),x(f._v,"yaxis"),x(f._w,"zaxis"),p),!p)return{positions:[],cells:[]};var l=x(f._Xs,"xaxis"),w=x(f._Ys,"yaxis"),_=x(f._Zs,"zaxis");if(a.meshgrid=[l,w,_],a.gridFill=f._gridFill,f._slen)a.startingPositions=n(x(f._startsX,"xaxis"),x(f._startsY,"yaxis"),x(f._startsZ,"zaxis"));else{for(var T=w[0],k=d(l),L=d(_),A=new Array(k.length*L.length),I=0,P=0;P<k.length;P++)for(var S=0;S<L.length;S++)A[I++]=[k[P],T,L[S]];a.startingPositions=A}a.colormap=v(f),a.tubeSize=f.sizeref,a.maxLength=f.maxdisplayed;var E=x(f._xbnds,"xaxis"),D=x(f._ybnds,"yaxis"),F=x(f._zbnds,"zaxis"),H=c(l),V=c(w),Z=c(_),K=[[E[0]-H[0],D[0]-V[0],F[0]-Z[0]],[E[1]+H[1],D[1]+V[1],F[1]+Z[1]]],q=g(a,K),W=e(f);q.vertexIntensityBounds=[W.min/f._normMax,W.max/f._normMax];var $=f.lightposition;return q.lightPosition=[$.x,$.y,$.z],q.ambient=f.lighting.ambient,q.diffuse=f.lighting.diffuse,q.specular=f.lighting.specular,q.roughness=f.lighting.roughness,q.fresnel=f.lighting.fresnel,q.opacity=f.opacity,f._pad=q.tubeScale*f.sizeref*2,q}r.handlePick=function(u){var f=this.scene.fullSceneLayout,s=this.scene.dataScale;function h(x,l){var w=f[l],_=s[t[l]];return w.l2c(x)/_}if(u.object===this.mesh){var p=u.data.position,a=u.data.velocity;return u.traceCoordinate=[h(p[0],"xaxis"),h(p[1],"yaxis"),h(p[2],"zaxis"),h(a[0],"xaxis"),h(a[1],"yaxis"),h(a[2],"zaxis"),u.data.intensity*this.data._normMax,u.data.divergence],u.textLabel=this.data.hovertext||this.data.text,!0}},r.update=function(u){this.data=u;var f=i(this.scene,u);this.mesh.update(f)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},ee.exports=function(u,f){var s=u.glplot.gl,h=i(u,f),p=m(s,h),a=new o(u,f.uid);return a.mesh=p,a.data=f,p._trace=a,u.glplot.add(p),a}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/gl3d/zip3":609}],1043:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/colorscale/defaults"),b=y("./attributes");ee.exports=function(v,e,n,t){function o(s,h){return g.coerce(v,e,b,s,h)}var r=o("u"),d=o("v"),c=o("w"),i=o("x"),u=o("y"),f=o("z");r&&r.length&&d&&d.length&&c&&c.length&&i&&i.length&&u&&u.length&&f&&f.length?(o("starts.x"),o("starts.y"),o("starts.z"),o("maxdisplayed"),o("sizeref"),o("lighting.ambient"),o("lighting.diffuse"),o("lighting.specular"),o("lighting.roughness"),o("lighting.fresnel"),o("lightposition.x"),o("lightposition.y"),o("lightposition.z"),m(v,e,t,o,{prefix:"",cLetter:"c"}),o("text"),o("hovertext"),o("hovertemplate"),o("uhoverformat"),o("vhoverformat"),o("whoverformat"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),e._length=null):e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":1040}],1044:[function(y,ee,te){ee.exports={moduleType:"trace",name:"streamtube",basePlotModule:y("../../plots/gl3d"),categories:["gl3d","showLegend"],attributes:y("./attributes"),supplyDefaults:y("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:y("./calc").calc,plot:y("./convert"),eventData:function(g,m){return g.tubex=g.x,g.tubey=g.y,g.tubez=g.z,g.tubeu=m.traceCoordinate[3],g.tubev=m.traceCoordinate[4],g.tubew=m.traceCoordinate[5],g.norm=m.traceCoordinate[6],g.divergence=m.traceCoordinate[7],delete g.x,delete g.y,delete g.z,g},meta:{}}},{"../../plots/gl3d":598,"./attributes":1040,"./calc":1041,"./convert":1042,"./defaults":1043}],1045:[function(y,ee,te){var g=y("../../plots/attributes"),m=y("../../plots/template_attributes").hovertemplateAttrs,b=y("../../plots/template_attributes").texttemplateAttrs,v=y("../../components/colorscale/attributes"),e=y("../../plots/domain").attributes,n=y("../pie/attributes"),t=y("./constants"),o=y("../../lib/extend").extendFlat;ee.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:o({colors:{valType:"data_array",editType:"calc"},line:{color:o({},n.marker.line.color,{dflt:null}),width:o({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},v("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:n.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:b({editType:"plot"},{keys:t.eventDataKeys.concat(["label","value"])}),hovertext:n.hovertext,hoverinfo:o({},g.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:m({},{keys:t.eventDataKeys}),textfont:n.textfont,insidetextorientation:n.insidetextorientation,insidetextfont:n.insidetextfont,outsidetextfont:o({},n.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:n.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":900,"./constants":1048}],1046:[function(y,ee,te){var g=y("../../plots/plots");te.name="sunburst",te.plot=function(m,b,v,e){g.plotBasePlot(te.name,m,b,v,e)},te.clean=function(m,b,v,e){g.cleanBasePlot(te.name,m,b,v,e)}},{"../../plots/plots":619}],1047:[function(y,ee,te){var g=y("d3-hierarchy"),m=y("fast-isnumeric"),b=y("../../lib"),v=y("../../components/colorscale").makeColorScaleFuncFromTrace,e=y("../pie/calc").makePullColorFn,n=y("../pie/calc").generateExtendedColors,t=y("../../components/colorscale").calc,o=y("../../constants/numerical").ALMOST_EQUAL,r={},d={},c={};te.calc=function(i,u){var f,s,h,p,a,x,l=i._fullLayout,w=u.ids,_=b.isArrayOrTypedArray(w),T=u.labels,k=u.parents,L=u.values,A=b.isArrayOrTypedArray(L),I=[],P={},S={},E=function(J){return J||typeof J=="number"},D=function(J){return!A||m(L[J])&&L[J]>=0};_?(f=Math.min(w.length,k.length),s=function(J){return E(w[J])&&D(J)},h=function(J){return String(w[J])}
1354):(f=Math.min(T.length,k.length),s=function(J){return E(T[J])&&D(J)},h=function(J){return String(T[J])}),A&&(f=Math.min(f,L.length));for(var F=0;F<f;F++)if(s(F)){var H=h(F),V=E(k[F])?String(k[F]):"",Z={i:F,id:H,pid:V,label:E(T[F])?String(T[F]):""};A&&(Z.v=+L[F]),I.push(Z),a=H,P[p=V]?P[p].push(a):P[p]=[a],S[a]=1}if(P[""]){if(P[""].length>1){for(var K=b.randstr(),q=0;q<I.length;q++)I[q].pid===""&&(I[q].pid=K);I.unshift({hasMultipleRoots:!0,id:K,pid:"",label:""})}}else{var W,$=[];for(W in P)S[W]||$.push(W);if($.length!==1)return b.warn(["Multiple implied roots, cannot build",u.type,"hierarchy of",u.name+".","These roots include:",$.join(", ")].join(" "));W=$[0],I.unshift({hasImpliedRoot:!0,id:W,pid:"",label:W})}try{x=g.stratify().id(function(J){return J.id}).parentId(function(J){return J.pid})(I)}catch(J){return b.warn(["Failed to build",u.type,"hierarchy of",u.name+".","Error:",J.message].join(" "))}var R=g.hierarchy(x),N=!1;if(A)switch(u.branchvalues){case"remainder":R.sum(function(J){return J.data.v});break;case"total":R.each(function(J){var re=J.data.data,ne=re.v;if(J.children){var se=J.children.reduce(function(oe,pe){return oe+pe.data.data.v},0);if((re.hasImpliedRoot||re.hasMultipleRoots)&&(ne=se),ne<se*o)return N=!0,b.warn(["Total value for node",J.data.data.id,"of",u.name,"is smaller than the sum of its children.",`
1355parent value =`,ne,`
1356children sum =`,se].join(" "))}J.value=ne})}else(function J(re,ne,se){var oe=0,pe=re.children;if(pe){for(var ce=pe.length,de=0;de<ce;de++)oe+=J(pe[de],ne,se);se.branches&&oe++}else se.leaves&&oe++;return re.value=re.data.data.value=oe,ne._values||(ne._values=[]),ne._values[re.data.data.i]=oe,oe})(R,u,{branches:u.count.indexOf("branches")!==-1,leaves:u.count.indexOf("leaves")!==-1});if(!N){var U,Q;u.sort&&R.sort(function(J,re){return re.value-J.value});var j=u.marker.colors||[],X=!!j.length;return u._hasColorscale?(X||(j=A?u.values:u._values),t(i,u,{vals:j,containerStr:"marker",cLetter:"c"}),Q=v(u.marker)):U=e(l["_"+u.type+"colormap"]),R.each(function(J){var re=J.data.data;re.color=u._hasColorscale?Q(j[re.i]):U(j[re.i],re.id)}),I[0].hierarchy=R,I}},te._runCrossTraceCalc=function(i,u){var f=u._fullLayout,s=u.calcdata,h=f[i+"colorway"],p=f["_"+i+"colormap"];f["extend"+i+"colors"]&&(h=n(h,i==="icicle"?c:i==="treemap"?d:r));var a,x=0;function l(T){var k=T.data.data,L=k.id;k.color===!1&&(p[L]?k.color=p[L]:T.parent?T.parent.parent?k.color=T.parent.data.data.color:(p[L]=k.color=h[x%h.length],x++):k.color=a)}for(var w=0;w<s.length;w++){var _=s[w][0];_.trace.type===i&&_.hierarchy&&(a=_.trace.root.color,_.hierarchy.each(l))}},te.crossTraceCalc=function(i){return te._runCrossTraceCalc("sunburst",i)}},{"../../components/colorscale":378,"../../constants/numerical":479,"../../lib":503,"../pie/calc":902,"d3-hierarchy":115,"fast-isnumeric":190}],1048:[function(y,ee,te){ee.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},{}],1049:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("../../plots/domain").defaults,v=y("../bar/defaults").handleText,e=y("../../components/colorscale"),n=e.hasColorscale,t=e.handleDefaults;ee.exports=function(o,r,d,c){function i(a,x){return g.coerce(o,r,m,a,x)}var u=i("labels"),f=i("parents");if(u&&u.length&&f&&f.length){var s=i("values");s&&s.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),i("marker.line.width")&&i("marker.line.color",c.paper_bgcolor),i("marker.colors");var h=r._hasColorscale=n(o,"marker","colors")||(o.marker||{}).coloraxis;h&&t(o,r,c,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",h?1:.7);var p=i("text");i("texttemplate"),r.texttemplate||i("textinfo",Array.isArray(p)?"text+label":"label"),i("hovertext"),i("hovertemplate"),v(o,r,c,i,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("insidetextorientation"),i("sort"),i("rotation"),i("root.color"),b(r,c,i),r._length=null}else r.visible=!1}},{"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"./attributes":1045}],1050:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../registry"),b=y("../../components/fx/helpers").appendArrayPointValue,v=y("../../components/fx"),e=y("../../lib"),n=y("../../lib/events"),t=y("./helpers"),o=y("../pie/helpers").formatPieValue;function r(d,c,i){for(var u=d.data.data,f={curveNumber:c.index,pointNumber:u.i,data:c._input,fullData:c},s=0;s<i.length;s++){var h=i[s];h in d&&(f[h]=d[h])}
1356return"parentString"in d&&!t.isHierarchyRoot(d)&&(f.parent=d.parentString),b(f,c,u.i),f}ee.exports=function(d,c,i,u,f){var s=u[0],h=s.trace,p=s.hierarchy,a=h.type==="sunburst",x=h.type==="treemap"||h.type==="icicle";"_hasHoverLabel"in h||(h._hasHoverLabel=!1),"_hasHoverEvent"in h||(h._hasHoverEvent=!1),d.on("mouseover",function(l){var w=i._fullLayout;if(!i._dragging&&w.hovermode!==!1){var _,T=i._fullData[h.index],k=l.data.data,L=k.i,A=t.isHierarchyRoot(l),I=t.getParent(p,l),P=t.getValue(l),S=function(X){return e.castOption(T,L,X)},E=S("hovertemplate"),D=v.castHoverinfo(T,w,L),F=w.separators;if(E||D&&D!=="none"&&D!=="skip"){var H,V;a&&(H=s.cx+l.pxmid[0]*(1-l.rInscribed),V=s.cy+l.pxmid[1]*(1-l.rInscribed)),x&&(H=l._hoverX,V=l._hoverY);var Z,K={},q=[],W=[],$=function(X){return q.indexOf(X)!==-1};D&&(q=D==="all"?T._module.attributes.hoverinfo.flags:D.split("+")),K.label=k.label,$("label")&&K.label&&W.push(K.label),k.hasOwnProperty("v")&&(K.value=k.v,K.valueLabel=o(K.value,F),$("value")&&W.push(K.valueLabel)),K.currentPath=l.currentPath=t.getPath(l.data),$("current path")&&!A&&W.push(K.currentPath);var R=[],N=function(){R.indexOf(Z)===-1&&(W.push(Z),R.push(Z))};K.percentParent=l.percentParent=P/t.getValue(I),K.parent=l.parentString=t.getPtLabel(I),$("percent parent")&&(Z=t.formatPercent(K.percentParent,F)+" of "+K.parent,N()),K.percentEntry=l.percentEntry=P/t.getValue(c),K.entry=l.entry=t.getPtLabel(c),!$("percent entry")||A||l.onPathbar||(Z=t.formatPercent(K.percentEntry,F)+" of "+K.entry,N()),K.percentRoot=l.percentRoot=P/t.getValue(p),K.root=l.root=t.getPtLabel(p),$("percent root")&&!A&&(Z=t.formatPercent(K.percentRoot,F)+" of "+K.root,N()),K.text=S("hovertext")||S("text"),$("text")&&(Z=K.text,e.isValidTextValue(Z)&&W.push(Z)),_=[r(l,T,f.eventDataKeys)];var U={trace:T,y:V,_x0:l._x0,_x1:l._x1,_y0:l._y0,_y1:l._y1,text:W.join("<br>"),name:E||$("name")?T.name:void 0,color:S("hoverlabel.bgcolor")||k.color,borderColor:S("hoverlabel.bordercolor"),fontFamily:S("hoverlabel.font.family"),fontSize:S("hoverlabel.font.size"),fontColor:S("hoverlabel.font.color"),nameLength:S("hoverlabel.namelength"),textAlign:S("hoverlabel.align"),hovertemplate:E,hovertemplateLabels:K,eventData:_};a&&(U.x0=H-l.rInscribed*l.rpx1,U.x1=H+l.rInscribed*l.rpx1,U.idealAlign=l.pxmid[0]<0?"left":"right"),x&&(U.x=H,U.idealAlign=H<0?"left":"right");var Q=[];v.loneHover(U,{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:i,inOut_bbox:Q}),_[0].bbox=Q[0],h._hasHoverLabel=!0}if(x){var j=d.select("path.surface");f.styleOne(j,l,T,{hovered:!0})}h._hasHoverEvent=!0,i.emit("plotly_hover",{points:_||[r(l,T,f.eventDataKeys)],event:g.event})}}),d.on("mouseout",function(l){var w=i._fullLayout,_=i._fullData[h.index],T=g.select(this).datum();if(h._hasHoverEvent&&(l.originalEvent=g.event,i.emit("plotly_unhover",{points:[r(T,_,f.eventDataKeys)],event:g.event}),h._hasHoverEvent=!1),h._hasHoverLabel&&(v.loneUnhover(w._hoverlayer.node()),h._hasHoverLabel=!1),x){var k=d.select("path.surface");f.styleOne(k,T,_,{hovered:!1})}}),d.on("click",function(l){var w=i._fullLayout,_=i._fullData[h.index],T=a&&(t.isHierarchyRoot(l)||t.isLeaf(l)),k=t.getPtId(l),L=t.isEntry(l)?t.findEntryWithChild(p,k):t.findEntryWithLevel(p,k),A=t.getPtId(L),I={points:[r(l,_,f.eventDataKeys)],event:g.event};T||(I.nextLevel=A);var P=n.triggerHandler(i,"plotly_"+h.type+"click",I);if(P!==!1&&w.hovermode&&(i._hoverdata=[r(l,_,f.eventDataKeys)],v.click(i,g.event)),!T&&P!==!1&&!i._dragging&&!i._transitioning){m.call("_storeDirectGUIEdit",_,w._tracePreGUI[_.uid],{level:_.level});var S={data:[{level:A}],traces:[h.index]},E={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};v.loneUnhover(w._hoverlayer.node()),m.call("animate",i,S,E)}})}},{"../../components/fx":406,"../../components/fx/helpers":402,"../../lib":503,"../../lib/events":492,"../../registry":638,"../pie/helpers":905,"./helpers":1051,"@plotly/d3":58}],1051:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color"),b=y("../../lib/setcursor"),v=y("../pie/helpers");function e(n){return n.data.data.pid}te.findEntryWithLevel=function(n,t){var o;return t&&n.eachAfter(function(r){if(te.getPtId(r)===t)return o=r.copy()}),o||n},te.findEntryWithChild=function(n,t){var o;return n.eachAfter(function(r){for(var d=r.children||[],c=0;c<d.length;c++){var i=d[c];if(te.getPtId(i)===t)return o=r.copy()}}),o||n},te.isEntry=function(n){return!n.parent},te.isLeaf=function(n){return!n.children},te.getPtId=function(n){return n.data.data.id},te.getPtLabel=function(n){return n.data.data.label},te.getValue=function(n){return n.value},te.isHierarchyRoot=function(n){return e(n)===""},te.setSliceCursor=function(n,t,o){var r=o.isTransitioning;if(!r){var d=n.datum();r=o.hideOnRoot&&te.isHierarchyRoot(d)||o.hideOnLeaves&&te.isLeaf(d)}b(n,r?null:"pointer")},te.getInsideTextFontKey=function(n,t,o,r,d){var c=(d||{}).onPathbar?"pathbar.textfont":"insidetextfont",i=o.data.data.i;return g.castOption(t,i,c+"."+n)||g.castOption(t,i,"textfont."+n)||r.size},te.getOutsideTextFontKey=function(n,t,o,r){var d=o.data.data.i;return g.castOption(t,d,"outsidetextfont."+n)||g.castOption(t,d,"textfont."+n)||r.size},te.isOutsideText=function(n,t){return!n._hasColorscale&&te.isHierarchyRoot(t)},te.determineTextFont=function(n,t,o,r){return te.isOutsideText(n,t)?function(d,c,i){return{color:te.getOutsideTextFontKey("color",d,c,i),family:te.getOutsideTextFontKey("family",d,c,i),size:te.getOutsideTextFontKey("size",d,c,i)}}(n,t,o):function(d,c,i,u){var f=(u||{}).onPathbar,s=c.data.data,h=s.i,p=g.castOption(d,h,(f?"pathbar.textfont":"insidetextfont")+".color");return!p&&d._input.textfont&&(p=g.castOption(d._input,h,"textfont.color")),{color:p||m.contrast(s.color),family:te.getInsideTextFontKey("family",d,c,i,u),size:te.getInsideTextFontKey("size",d,c,i,u)}}(n,t,o,r)},te.hasTransition=function(n){return!!(n&&n.duration>0)},te.getMaxDepth=function(n){return n.maxdepth>=0?n.maxdepth:1/0},te.isHeader=function(n,t){return!(te.isLeaf(n)||n.depth===t._maxDepth-1)},te.getParent=function(n,t){return te.findEntryWithLevel(n,e(t))},te.listPath=function(n,t){var o=n.parent;if(!o)return[];var r=t?[o.data[t]]:[o];return te.listPath(o,t).concat(r)},te.getPath=function(n){return te.listPath(n,"label").join("/")+"/"},te.formatValue=v.formatPieValue,te.formatPercent=function(n,t){var o=g.formatPercent(n,0);return o==="0%"&&(o=v.formatPiePercent(n,t)),o}},{"../../components/color":366,"../../lib":503,"../../lib/setcursor":524,"../pie/helpers":905}],1052:[function(y,ee,te){ee.exports={moduleType:"trace",name:"sunburst",basePlotModule:y("./base_plot"),categories:[],animatable:!0,attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults"),supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc").calc,crossTraceCalc:y("./calc").crossTraceCalc,plot:y("./plot").plot,style:y("./style").style,colorbar:y("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":944,"./attributes":1045,"./base_plot":1046,"./calc":1047,"./defaults":1049,"./layout_attributes":1053,"./layout_defaults":1054,"./plot":1055,"./style":1056}],1053:[function(y,ee,te){ee.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1054:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v){function e(n,t){return g.coerce(b,v,m,n,t)}e("sunburstcolorway",v.colorway),e("extendsunburstcolors")}},{"../../lib":503,"./layout_attributes":1053}],1055:[function(y,ee,te){var g=y("@plotly/d3"),m=y("d3-hierarchy"),b=y("d3-interpolate").interpolate,v=y("../../components/drawing"),e=y("../../lib"),n=y("../../lib/svg_text_utils"),t=y("../bar/uniform_text"),o=t.recordMinTextSize,r=t.clearMinTextSize,d=y("../pie/plot"),c=y("../pie/helpers").getRotationAngle,i=d.computeTransform,u=d.transformInsideText,f=y("./style").styleOne,s=y("../bar/style").resizeText,h=y("./fx"),p=y("./constants"),a=y("./helpers");function x(w,_,T,k){var L=w._fullLayout,A=!L.uniformtext.mode&&a.hasTransition(k),I=g.select(T).selectAll("g.slice"),P=_[0],S=P.trace,E=P.hierarchy,D=a.findEntryWithLevel(E,S.level),F=a.getMaxDepth(S),H=L._size,V=S.domain,Z=H.w*(V.x[1]-V.x[0]),K=H.h*(V.y[1]-V.y[0]),q=.5*Math.min(Z,K),W=P.cx=H.l+H.w*(V.x[1]+V.x[0])/2,$=P.cy=H.t+H.h*(1-V.y[0])-K/2;if(!D)return I.remove();var R=null,N={};A&&I.each(function(Ee){N[a.getPtId(Ee)]={rpx0:Ee.rpx0,rpx1:Ee.rpx1,x0:Ee.x0,x1:Ee.x1,transform:Ee.transform},!R&&a.isEntry(Ee)&&(R=Ee)});var U=function(Ee){return m.partition().size([2*Math.PI,Ee.height+1])(Ee)}(D).descendants(),Q=D.height+1,j=0,X=F;P.hasMultipleRoots&&a.isHierarchyRoot(D)&&(U=U.slice(1),Q-=1,j=1,X+=1),U=U.filter(function(Ee){return Ee.y1<=X});var J=c(S.rotation);
1356J&&U.forEach(function(Ee){Ee.x0+=J,Ee.x1+=J});var re=Math.min(Q,F),ne=function(Ee){return(Ee-j)/re*q},se=function(Ee,fe){return[Ee*Math.cos(fe),-Ee*Math.sin(fe)]},oe=function(Ee){return e.pathAnnulus(Ee.rpx0,Ee.rpx1,Ee.x0,Ee.x1,W,$)},pe=function(Ee){return W+l(Ee)[0]*(Ee.transform.rCenter||0)+(Ee.transform.x||0)},ce=function(Ee){return $+l(Ee)[1]*(Ee.transform.rCenter||0)+(Ee.transform.y||0)};(I=I.data(U,a.getPtId)).enter().append("g").classed("slice",!0),A?I.exit().transition().each(function(){var Ee=g.select(this);Ee.select("path.surface").transition().attrTween("d",function(fe){var me=function(Te){var _e,Ae=a.getPtId(Te),Pe=N[Ae],De=N[a.getPtId(D)];if(De){var Ve=(Te.x1>De.x1?2*Math.PI:0)+J;_e=Te.rpx1<De.rpx1?{x0:Te.x0,x1:Te.x1,rpx0:0,rpx1:0}:{x0:Ve,x1:Ve,rpx0:Te.rpx0,rpx1:Te.rpx1}}else{var Qe,Oe=a.getPtId(Te.parent);I.each(function(lt){if(a.getPtId(lt)===Oe)return Qe=lt});var Ue,Ge=Qe.children;Ge.forEach(function(lt,vt){if(a.getPtId(lt)===Ae)return Ue=vt});var Ye=Ge.length,tt=b(Qe.x0,Qe.x1);_e={rpx0:q,rpx1:q,x0:tt(Ue/Ye),x1:tt((Ue+1)/Ye)}}return b(Pe,_e)}(fe);return function(Te){return oe(me(Te))}}),Ee.select("g.slicetext").attr("opacity",0)}).remove():I.exit().remove(),I.order();var de=null;if(A&&R){var xe=a.getPtId(R);I.each(function(Ee){de===null&&a.getPtId(Ee)===xe&&(de=Ee.x1)})}var we=I;function be(Ee){var fe=Ee.parent,me=N[a.getPtId(fe)],Te={};if(me){var _e=fe.children,Ae=_e.indexOf(Ee),Pe=_e.length,De=b(me.x0,me.x1);Te.x0=De(Ae/Pe),Te.x1=De(Ae/Pe)}else Te.x0=Te.x1=0;return Te}A&&(we=we.transition().each("end",function(){var Ee=g.select(this);a.setSliceCursor(Ee,w,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})}
1356)),we.each(function(Ee){var fe=g.select(this),me=e.ensureSingle(fe,"path","surface",function(Ve){Ve.style("pointer-events","all")});Ee.rpx0=ne(Ee.y0),Ee.rpx1=ne(Ee.y1),Ee.xmid=(Ee.x0+Ee.x1)/2,Ee.pxmid=se(Ee.rpx1,Ee.xmid),Ee.midangle=-(Ee.xmid-Math.PI/2),Ee.startangle=-(Ee.x0-Math.PI/2),Ee.stopangle=-(Ee.x1-Math.PI/2),Ee.halfangle=.5*Math.min(e.angleDelta(Ee.x0,Ee.x1)||Math.PI,Math.PI),Ee.ring=1-Ee.rpx0/Ee.rpx1,Ee.rInscribed=function(Ve){return Ve.rpx0===0&&e.isFullCircle([Ve.x0,Ve.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(Ve.halfangle)),Ve.ring/2))}(Ee),A?me.transition().attrTween("d",function(Ve){var Qe=function(Oe){var Ue,Ge=N[a.getPtId(Oe)],Ye={x0:Oe.x0,x1:Oe.x1,rpx0:Oe.rpx0,rpx1:Oe.rpx1};if(Ge)Ue=Ge;else if(R)if(Oe.parent)if(de){var tt=(Oe.x1>de?2*Math.PI:0)+J;Ue={x0:tt,x1:tt}}else Ue={rpx0:q,rpx1:q},e.extendFlat(Ue,be(Oe));else Ue={rpx0:0,rpx1:0};else Ue={x0:J,x1:J};return b(Ue,Ye)}(Ve);return function(Oe){return oe(Qe(Oe))}}):me.attr("d",oe),fe.call(h,D,w,_,{eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,w,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:w._transitioning}),me.call(f,Ee,S);var Te=e.ensureSingle(fe,"g","slicetext"),_e=e.ensureSingle(Te,"text","",function(Ve){Ve.attr("data-notex",1)}),Ae=e.ensureUniformFontSize(w,a.determineTextFont(S,Ee,L.font));_e.text(te.formatSliceLabel(Ee,D,S,_,L)).classed("slicetext",!0).attr("text-anchor","middle").call(v.font,Ae).call(n.convertToTspans,w);var Pe=v.bBox(_e.node());Ee.transform=u(Pe,Ee,P),Ee.transform.targetX=pe(Ee),Ee.transform.targetY=ce(Ee);var De=function(Ve,Qe){var Oe=Ve.transform;
1356return i(Oe,Qe),Oe.fontSize=Ae.size,o(S.type,Oe,L),e.getTextTransform(Oe)};A?_e.transition().attrTween("transform",function(Ve){var Qe=function(Oe){var Ue,Ge=N[a.getPtId(Oe)],Ye=Oe.transform;if(Ge)Ue=Ge;else if(Ue={rpx1:Oe.rpx1,transform:{textPosAngle:Ye.textPosAngle,scale:0,rotate:Ye.rotate,rCenter:Ye.rCenter,x:Ye.x,y:Ye.y}},R)if(Oe.parent)if(de){var tt=Oe.x1>de?2*Math.PI:0;Ue.x0=Ue.x1=tt}else e.extendFlat(Ue,be(Oe));else Ue.x0=Ue.x1=J;else Ue.x0=Ue.x1=J;var lt=b(Ue.transform.textPosAngle,Oe.transform.textPosAngle),vt=b(Ue.rpx1,Oe.rpx1),It=b(Ue.x0,Oe.x0),St=b(Ue.x1,Oe.x1),rt=b(Ue.transform.scale,Ye.scale),et=b(Ue.transform.rotate,Ye.rotate),Tt=Ye.rCenter===0?3:Ue.transform.rCenter===0?1/3:1,Vt=b(Ue.transform.rCenter,Ye.rCenter);return function(Kt){var Be=vt(Kt),qe=It(Kt),Re=St(Kt),Xe=function(Le){return Vt(Math.pow(Le,Tt))}(Kt),ke={pxmid:se(Be,(qe+Re)/2),rpx1:Be,transform:{textPosAngle:lt(Kt),rCenter:Xe,x:Ye.x,y:Ye.y}};return o(S.type,Ye,L),{transform:{targetX:pe(ke),targetY:ce(ke),scale:rt(Kt),rotate:et(Kt),rCenter:Xe}}}}(Ve);return function(Oe){return De(Qe(Oe),Pe)}}):_e.attr("transform",De(Ee,Pe))})}function l(w){return _=w.rpx1,T=w.transform.textPosAngle,[_*Math.sin(T),-_*Math.cos(T)];var _,T}te.plot=function(w,_,T,k){var L,A,I=w._fullLayout,P=I._sunburstlayer,S=!T,E=!I.uniformtext.mode&&a.hasTransition(T);r("sunburst",I),(L=P.selectAll("g.trace.sunburst").data(_,function(D){return D[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),L.order(),E?(k&&(A=k()),g.transition().duration(T.duration).ease(T.easing).each("end",function(){A&&A()}).each("interrupt",function(){A&&A()}).each(function(){P.selectAll("g.trace").each(function(D){x(w,D,this,T)})})):(L.each(function(D){x(w,D,this,T)}),I.uniformtext.mode&&s(w,I._sunburstlayer.selectAll(".trace"),"sunburst")),S&&L.exit().remove()},te.formatSliceLabel=function(w,_,T,k,L){var A=T.texttemplate,I=T.textinfo;if(!(A||I&&I!=="none"))return"";var P=L.separators,S=k[0],E=w.data.data,D=S.hierarchy,F=a.isHierarchyRoot(w),H=a.getParent(D,w),V=a.getValue(w);if(!A){var Z,K=I.split("+"),q=function(J){return K.indexOf(J)!==-1},W=[];if(q("label")&&E.label&&W.push(E.label),E.hasOwnProperty("v")&&q("value")&&W.push(a.formatValue(E.v,P)),!F){q("current path")&&W.push(a.getPath(w.data));var $=0;q("percent parent")&&$++,q("percent entry")&&$++,q("percent root")&&$++;var R=$>1;if($){var N,U=function(J){Z=a.formatPercent(N,P),R&&(Z+=" of "+J),W.push(Z)};q("percent parent")&&!F&&(N=V/a.getValue(H),U("parent")),q("percent entry")&&(N=V/a.getValue(_),U("entry")),q("percent root")&&(N=V/a.getValue(D),U("root"))}}return q("text")&&(Z=e.castOption(T,E.i,"text"),e.isValidTextValue(Z)&&W.push(Z)),W.join("<br>")}var Q=e.castOption(T,E.i,"texttemplate");if(!Q)return"";var j={};E.label&&(j.label=E.label),E.hasOwnProperty("v")&&(j.value=E.v,j.valueLabel=a.formatValue(E.v,P)),j.currentPath=a.getPath(w.data),F||(j.percentParent=V/a.getValue(H),j.percentParentLabel=a.formatPercent(j.percentParent,P),j.parent=a.getPtLabel(H)),j.percentEntry=V/a.getValue(_),j.percentEntryLabel=a.formatPercent(j.percentEntry,P),j.entry=a.getPtLabel(_),j.percentRoot=V/a.getValue(D),j.percentRootLabel=a.formatPercent(j.percentRoot,P),j.root=a.getPtLabel(D),E.hasOwnProperty("color")&&(j.color=E.color);var X=e.castOption(T,E.i,"text");return(e.isValidTextValue(X)||X==="")&&(j.text=X),j.customdata=e.castOption(T,E.i,"customdata"),e.texttemplateString(Q,j,L._d3locale,j,T._meta||{})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/style":662,"../bar/uniform_text":664,"../pie/helpers":905,"../pie/plot":909,"./constants":1048,"./fx":1050,"./helpers":1051,"./style":1056,"@plotly/d3":58,"d3-hierarchy":115,"d3-interpolate":116}],1056:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/color"),b=y("../../lib"),v=y("../bar/uniform_text").resizeText;function e(n,t,o){var r=t.data.data,d=!t.children,c=r.i,i=b.castOption(o,c,"marker.line.color")||m.defaultLine,u=b.castOption(o,c,"marker.line.width")||0;n.style("stroke-width",u).call(m.fill,r.color).call(m.stroke,i).style("opacity",d?o.leaf.opacity:null)}ee.exports={style:function(n){var t=n._fullLayout._sunburstlayer.selectAll(".trace");v(n,t,"sunburst"),t.each(function(o){var r=g.select(this),d=o[0].trace;r.style("opacity",d.opacity),r.selectAll("path.surface").each(function(c){g.select(this).call(e,c,d)})})},styleOne:e}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],1057:[function(y,ee,te){var g=y("../../components/color"),m=y("../../components/colorscale/attributes"),b=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,v=y("../../plots/template_attributes").hovertemplateAttrs,e=y("../../plots/attributes"),n=y("../../lib/extend").extendFlat,t=y("../../plot_api/edit_types").overrideAll;function o(d){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:g.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:g.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var r=ee.exports=t(n({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:v(),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},m("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:o(),y:o(),z:o()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:n({},m.zauto,{}),zmin:n({},m.zmin,{}),zmax:n({},m.zmax,{})},hoverinfo:n({},e.hoverinfo),showlegend:n({},e.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType="calc+clearAxisTypes",r.transforms=void 0},{"../../components/color":366,"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633}],1058:[function(y,ee,te){var g=y("../../components/colorscale/calc");ee.exports=function(m,b){b.surfacecolor?g(m,b,{vals:b.surfacecolor,containerStr:"",cLetter:"c"}):g(m,b,{vals:b.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],1059:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_surface3d,m=y("../../../stackgl_modules").ndarray,b=y("../../../stackgl_modules").ndarray_linear_interpolate.d2,v=y("../heatmap/interp2d"),e=y("../heatmap/find_empties"),n=y("../../lib").isArrayOrTypedArray,t=y("../../lib/gl_format_color").parseColorScale,o=y("../../lib/str2rgbarray"),r=y("../../components/colorscale").extractOpts;function d(T,k,L){this.scene=T,this.uid=L,this.surface=k,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,
vendor: 12,070 bytes, line 1356
1356null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var c=d.prototype;c.getXat=function(T,k,L,A){var I=n(this.data.x)?n(this.data.x[0])?this.data.x[k][T]:this.data.x[T]:T;return L===void 0?I:A.d2l(I,0,L)},c.getYat=function(T,k,L,A){var I=n(this.data.y)?n(this.data.y[0])?this.data.y[k][T]:this.data.y[k]:k;return L===void 0?I:A.d2l(I,0,L)},c.getZat=function(T,k,L,A){var I=this.data.z[k][T];return I===null&&this.data.connectgaps&&this.data._interpolatedZ&&(I=this.data._interpolatedZ[k][T]),L===void 0?I:A.d2l(I,0,L)},c.handlePick=function(T){if(T.object===this.surface){var k=(T.data.index[0]-1)/this.dataScaleX-1,L=(T.data.index[1]-1)/this.dataScaleY-1,A=Math.max(Math.min(Math.round(k),this.data.z[0].length-1),0),I=Math.max(Math.min(Math.round(L),this.data._ylength-1),0);T.index=[A,I],T.traceCoordinate=[this.getXat(A,I),this.getYat(A,I),this.getZat(A,I)],T.dataCoordinate=[this.getXat(A,I,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(A,I,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(A,I,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var P=0;P<3;P++){var S=T.dataCoordinate[P];S!=null&&(T.dataCoordinate[P]*=this.scene.dataScale[P])}var E=this.data.hovertext||this.data.text;return Array.isArray(E)&&E[I]&&E[I][A]!==void 0?T.textLabel=E[I][A]:T.textLabel=E||"",T.data.dataCoordinate=T.dataCoordinate.slice(),this.surface.highlight(T.data),this.scene.glplot.spikes.position=T.dataCoordinate,!0}};var i=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function u(T,k){if(T<k)return 0;for(var L=0;Math.floor(T%k)===0;)T/=k,L++;return L}function f(T){for(var k=[],L=0;L<i.length;L++){var A=i[L];k.push(u(T,A))}return k}function s(T){for(var k=f(T),L=T,A=0;A<i.length;A++)if(k[A]>0){L=i[A];break}return L}function h(T,k){if(!(T<1||k<1)){for(var L=f(T),A=f(k),I=1,P=0;P<i.length;P++)I*=Math.pow(i[P],Math.max(L[P],A[P]));return I}}c.calcXnums=function(T){var k,L=[];for(k=1;k<T;k++){var A=this.getXat(k-1,0),I=this.getXat(k,0);L[k-1]=I!==A&&A!=null&&I!=null?Math.abs(I-A):0}var P=0;for(k=1;k<T;k++)P+=L[k-1];for(k=1;k<T;k++)L[k-1]===0?L[k-1]=1:L[k-1]=Math.round(P/L[k-1]);return L},c.calcYnums=function(T){var k,L=[];for(k=1;k<T;k++){var A=this.getYat(0,k-1),I=this.getYat(0,k);L[k-1]=I!==A&&A!=null&&I!=null?Math.abs(I-A):0}var P=0;for(k=1;k<T;k++)P+=L[k-1];for(k=1;k<T;k++)L[k-1]===0?L[k-1]=1:L[k-1]=Math.round(P/L[k-1]);return L};var p=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],a=p[9],x=p[13];function l(T,k,L){var A=L[8]+L[2]*k[0]+L[5]*k[1];return T[0]=(L[6]+L[0]*k[0]+L[3]*k[1])/A,T[1]=(L[7]+L[1]*k[0]+L[4]*k[1])/A,T}function w(T,k,L){return function(A,I,P,S){for(var E=[0,0],D=A.shape[0],F=A.shape[1],H=0;H<D;H++)for(var V=0;V<F;V++)P(E,[H,V],S),A.set(H,V,b(I,E[0],E[1]))}(T,k,l,L),T}function _(T,k){for(var L=!1,A=0;A<T.length;A++)if(k===T[A]){L=!0;break}L===!1&&T.push(k)}c.estimateScale=function(T,k){for(var L=1+function(I){if(I.length!==0){for(var P=1,S=0;S<I.length;S++)P=h(P,I[S]);return P}}(k===0?this.calcXnums(T):this.calcYnums(T));L<a;)L*=2;for(;L>x;)L--,L/=s(L),++L<a&&(L=x);var A=Math.round(L/T);return A>1?A:1},c.refineCoords=function(T){for(var k=this.dataScaleX,L=this.dataScaleY,A=T[0].shape[0],I=T[0].shape[1],P=0|Math.floor(T[0].shape[0]*k+1),S=0|Math.floor(T[0].shape[1]*L+1),E=1+A+1,D=1+I+1,F=m(new Float32Array(E*D),[E,D]),H=[1/k,0,0,0,1/L,0,0,0,1],V=0;V<T.length;++V){this.surface.padField(F,T[V]);var Z=m(new Float32Array(P*S),[P,S]);w(Z,F,H),T[V]=Z}},c.setContourLevels=function(){var T,k,L,A=[[],[],[]],I=[!1,!1,!1],P=!1;for(T=0;T<3;++T)if(this.showContour[T]&&(P=!0,this.contourSize[T]>0&&this.contourStart[T]!==null&&this.contourEnd[T]!==null&&this.contourEnd[T]>this.contourStart[T]))for(I[T]=!0,k=this.contourStart[T];k<this.contourEnd[T];k+=this.contourSize[T])L=k*this.scene.dataScale[T],_(A[T],L);if(P){var S=[[],[],[]];for(T=0;T<3;++T)this.showContour[T]&&(S[T]=I[T]?A[T]:this.scene.contourLevels[T]);this.surface.update({levels:S})}},c.update=function(T){var k,L,A,I,P=this.scene,S=P.fullSceneLayout,E=this.surface,D=t(T),F=P.dataScale,H=T.z[0].length,V=T._ylength,Z=P.contourLevels;this.data=T;var K=[];for(k=0;k<3;k++)for(K[k]=[],L=0;L<H;L++)K[k][L]=[];for(L=0;L<H;L++)for(A=0;A<V;A++)K[0][L][A]=this.getXat(L,A,T.xcalendar,S.xaxis),K[1][L][A]=this.getYat(L,A,T.ycalendar,S.yaxis),K[2][L][A]=this.getZat(L,A,T.zcalendar,S.zaxis);if(T.connectgaps)for(T._emptypoints=e(K[2]),v(K[2],T._emptypoints),T._interpolatedZ=[],L=0;L<H;L++)for(T._interpolatedZ[L]=[],A=0;A<V;A++)T._interpolatedZ[L][A]=K[2][L][A];for(k=0;k<3;k++)for(L=0;L<H;L++)for(A=0;A<V;A++)(I=K[k][L][A])==null?K[k][L][A]=NaN:I=K[k][L][A]*=F[k];for(k=0;k<3;k++)for(L=0;L<H;L++)for(A=0;A<V;A++)(I=K[k][L][A])!=null&&(this.minValues[k]>I&&(this.minValues[k]=I),this.maxValues[k]<I&&(this.maxValues[k]=I));for(k=0;k<3;k++)this.objectOffset[k]=.5*(this.minValues[k]+this.maxValues[k]);for(k=0;k<3;k++)for(L=0;L<H;L++)for(A=0;A<V;A++)(I=K[k][L][A])!=null&&(K[k][L][A]-=this.objectOffset[k]);var q=[m(new Float32Array(H*V),[H,V]),m(new Float32Array(H*V),[H,V]),m(new Float32Array(H*V),[H,V])];for(k=0;k<3;k++)for(L=0;L<H;L++)for(A=0;A<V;A++)q[k].set(L,A,K[k][L][A]);K=[];var W={colormap:D,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!T.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:T.opacityscale,opacity:T.opacity},$=r(T);if(W.intensityBounds=[$.min,$.max],T.surfacecolor){var R=m(new Float32Array(H*V),[H,V]);for(L=0;L<H;L++)for(A=0;A<V;A++)R.set(L,A,T.surfacecolor[A][L]);q.push(R)}else W.intensityBounds[0]*=F[2],W.intensityBounds[1]*=F[2];(x<q[0].shape[0]||x<q[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(q[0].shape[0],0),this.dataScaleY=this.estimateScale(q[0].shape[1],1),this.dataScaleX===1&&this.dataScaleY===1||this.refineCoords(q)),T.surfacecolor&&(W.intensity=q.pop());var N=[!0,!0,!0],U=["x","y","z"];for(k=0;k<3;++k){var Q=T.contours[U[k]];N[k]=Q.highlight,W.showContour[k]=Q.show||Q.highlight,W.showContour[k]&&(W.contourProject[k]=[Q.project.x,Q.project.y,Q.project.z],Q.show?(this.showContour[k]=!0,W.levels[k]=Z[k],E.highlightColor[k]=W.contourColor[k]=o(Q.color),Q.usecolormap?E.highlightTint[k]=W.contourTint[k]=0:E.highlightTint[k]=W.contourTint[k]=1,W.contourWidth[k]=Q.width,this.contourStart[k]=Q.start,this.contourEnd[k]=Q.end,this.contourSize[k]=Q.size):(this.showContour[k]=!1,this.contourStart[k]=null,this.contourEnd[k]=null,this.contourSize[k]=0),Q.highlight&&(W.dynamicColor[k]=o(Q.highlightcolor),W.dynamicWidth[k]=Q.highlightwidth))}(function(j){var X=j[0].rgb,J=j[j.length-1].rgb;return X[0]===J[0]&&X[1]===J[1]&&X[2]===J[2]&&X[3]===J[3]})(D)&&(W.vertexColor=!0),W.objectOffset=this.objectOffset,W.coords=q,E.update(W),E.visible=T.visible,E.enableDynamic=N,E.enableHighlight=N,E.snapToData=!0,"lighting"in T&&(E.ambientLight=T.lighting.ambient,E.diffuseLight=T.lighting.diffuse,E.specularLight=T.lighting.specular,E.roughness=T.lighting.roughness,E.fresnel=T.lighting.fresnel),"lightposition"in T&&(E.lightPosition=[T.lightposition.x,T.lightposition.y,T.lightposition.z])},c.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},ee.exports=function(T,k){var L=T.glplot.gl,A=g({gl:L}),I=new d(T,A,k.uid);return A._trace=I,I.update(k),T.glplot.add(A),I}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../heatmap/find_empties":798,"../heatmap/interp2d":801}],1060:[function(y,ee,te){var g=y("../../registry"),m=y("../../lib"),b=y("../../components/colorscale/defaults"),v=y("./attributes");function e(t,o,r,d){var c=d("opacityscale");c==="max"?o.opacityscale=[[0,.1],[1,1]]:c==="min"?o.opacityscale=[[0,1],[1,.1]]:c==="extremes"?o.opacityscale=function(i,u){for(var f=[],s=0;s<32;s++){var h=s/31,p=u+(1-u)*(1-Math.pow(Math.sin(i*h*Math.PI),2));f.push([h,Math.max(0,Math.min(1,p))])}return f}(1,.1):function(i){var u=0;if(!Array.isArray(i)||i.length<2||!i[0]||!i[i.length-1]||+i[0][0]!=0||+i[i.length-1][0]!=1)return!1;for(var f=0;f<i.length;f++){var s=i[f];if(s.length!==2||+s[0]<u)return!1;u=+s[0]}return!0}(c)||(o.opacityscale=void 0)}function n(t,o,r){o in t&&!(r in t)&&(t[r]=t[o])}ee.exports={supplyDefaults:function(t,o,r,d){var c,i;function u(_,T){return m.coerce(t,o,v,_,T)}var f=u("x"),s=u("y"),h=u("z");if(!h||!h.length||f&&f.length<1||s&&s.length<1)o.visible=!1;else{o._xlength=Array.isArray(f)&&m.isArrayOrTypedArray(f[0])?h.length:h[0].length,o._ylength=h.length,g.getComponentMethod("calendars","handleTraceDefaults")(t,o,["x","y","z"],d),u("text"),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat"),u("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(_){u(_)});var p=u("surfacecolor"),a=["x","y","z"];for(c=0;c<3;++c){var x="contours."+a[c],l=u(x+".show"),w=u(x+".highlight");if(l||w)for(i=0;i<3;++i)u(x+".project."+a[i]);l&&(u(x+".color"),u(x+".width"),u(x+".usecolormap")),w&&(u(x+".highlightcolor"),u(x+".highlightwidth")),u(x+".start"),u(x+".end"),u(x+".size")}p||(n(t,"zmin","cmin"),n(t,"zmax","cmax"),n(t,"zauto","cauto")),b(t,o,d,u,{prefix:"",cLetter:"c"}),e(t,o,d,u),o._length=null}},opacityscaleDefaults:e}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":1057}],1061:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults").supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:y("./calc"),plot:y("./convert"),moduleType:"trace",name:"surface",basePlotModule:y("../../plots/gl3d"),categories:["gl3d","2dMap","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":1057,"./calc":1058,"./convert":1059,"./defaults":1060}
1356],1062:[function(y,ee,te){var g=y("../../components/annotations/attributes"),m=y("../../lib/extend").extendFlat,b=y("../../plot_api/edit_types").overrideAll,v=y("../../plots/font_attributes"),e=y("../../plots/domain").attributes,n=y("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers;(ee.exports=b({domain:e({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:n("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:m({},g.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:m({},v({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:n("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:m({},g.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:m({},v({arrayOk:!0}))}},"calc","from-root")).transforms=void 0},{"../../components/annotations/attributes":349,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/cartesian/axis_format_attributes":557,"../../plots/domain":584,"../../plots/font_attributes":585}],1063:[function(y,ee,te){var g=y("../../plots/get_data").getModuleCalcData,m=y("./plot");te.name="table",te.plot=function(b){var v=g(b.calcdata,"table")[0];v.length&&m(b,v)},te.clean=function(b,v,e,n){var t=n._has&&n._has("table"),o=v._has&&v._has("table");t&&!o&&n._paperdiv.selectAll(".table").remove()}},{"../../plots/get_data":593,"./plot":1070}],1064:[function(y,ee,te){var g=y("../../lib/gup").wrap;ee.exports=function(){return g({})}},{"../../lib/gup":500}],1065:[function(y,ee,te){ee.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlVie
1356w:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},{}],1066:[function(y,ee,te){var g=y("./constants"),m=y("../../lib/extend").extendFlat,b=y("fast-isnumeric");function v(c){if(Array.isArray(c)){for(var i=0,u=0;u<c.length;u++)i=Math.max(i,v(c[u]));return i}return c}function e(c,i){return c+i}function n(c){var i,u=c.slice(),f=1/0,s=0;for(i=0;i<u.length;i++)Array.isArray(u[i])||(u[i]=[u[i]]),f=Math.min(f,u[i].length),s=Math.max(s,u[i].length);if(f!==s)for(i=0;i<u.length;i++){var h=s-u[i].length;h&&(u[i]=u[i].concat(t(h)))}return u}function t(c){for(var i=new Array(c),u=0;u<c;u++)i[u]="";return i}function o(c){return c.calcdata.columns.reduce(function(i,u){return u.xIndex<c.xIndex?i+u.columnWidth:i},0)}function r(c,i){return Object.keys(c).map(function(u){return m({},c[u],{auxiliaryBlocks:i})})}function d(c,i){for(var u,f={},s=0,h=0,p={firstRowIndex:null,lastRowIndex:null,rows:[]},a=0,x=0,l=0;l<c.length;l++)u=c[l],p.rows.push({rowIndex:l,rowHeight:u}),((h+=u)>=i||l===c.length-1)&&(f[s]=p,p.key=x++,p.firstRowIndex=a,p.lastRowIndex=l,p={firstRowIndex:null,lastRowIndex:null,rows:[]},s+=h,a=l+1,h=0);return f}ee.exports=function(c,i){var u=n(i.cells.values),f=function(F){return F.slice(i.header.values.length,F.length)},s=n(i.header.values);s.length&&!s[0].length&&(s[0]=[""],s=n(s));var h=s.concat(f(u).map(function(){return t((s[0]||[""]).length)})),p=i.domain,a=Math.floor(c._fullLayout._size.w*(p.x[1]-p.x[0])),x=Math.floor(c._fullLayout._size.h*(p.y[1]-p.y[0])),l=i.header.values.length?h[0].map(function(){return i.header.height}):[g.emptyHeaderHeight],w=u.length?u[0].map(function(){return i.cells.height}):[],_=l.reduce(e,0),T=d(w,x-_+g.uplift),k=r(d(l,_),[]),L=r(T,k),A={},I=i._fullInput.columnorder.concat(f(u.map(function(F,H){return H}))),P=h.map(function(F,H){var V=Array.isArray(i.columnwidth)?i.columnwidth[Math.min(H,i.columnwidth.length-1)]:i.columnwidth;return b(V)?Number(V):1}),S=P.reduce(e,0);P=P.map(function(F){return F/S*a});var E=Math.max(v(i.header.line.width),v(i.cells.line.width)),D={key:i.uid+c._context.staticPlot,translateX:p.x[0]*c._fullLayout._size.w,translateY:c._fullLayout._size.h*(1-p.y[1]),size:c._fullLayout._size,width:a,maxLineWidth:E,height:x,columnOrder:I,groupHeight:x,rowBlocks:L,headerRowBlocks:k,scrollY:0,cells:m({},i.cells,{values:u}),headerCells:m({},i.header,{values:h}),gdColumns:h.map(function(F){return F[0]}),gdColumnsOriginalOrder:h.map(function(F){return F[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:h.map(function(F,H){var V=A[F];return A[F]=(V||0)+1,{key:F+"__"+A[F],label:F,specIndex:H,xIndex:I[H],xScale:o,x:void 0,calcdata:void 0,columnWidth:P[H]}})};return D.columns.forEach(function(F){F.calcdata=D,F.x=o(F)}),D}},{"../../lib/extend":493,"./constants":1065,"fast-isnumeric":190}],1067:[function(y,ee,te){var g=y("../../lib/extend").extendFlat;te.splitToPanels=function(m){var b=[0,0],v=g({},m,{key:"header",type:"header",page:0,prevPages:b,currentRepaint:[null,null],dragHandle:!0,values:m.calcdata.headerCells.values[m.specIndex],rowBlocks:m.calcdata.headerRowBlocks,calcdata:g({},m.calcdata,{cells:m.calcdata.headerCells})});return[g({},m,{key:"cells1",type:"cells",page:0,prevPages:b,currentRepaint:[null,null],dragHandle:!1,values:m.calcdata.cells.values[m.specIndex],rowBlocks:m.calcdata.rowBlocks}),g({},m,{key:"cells2",type:"cells",page:1,prevPages:b,currentRepaint:[null,null],dragHandle:!1,values:m.calcdata.cells.values[m.specIndex],rowBlocks:m.calcdata.rowBlocks}),v]},te.splitToCells=function(m){var b=function(v){var e=v.rowBlocks[v.page],n=e?e.rows[0].rowIndex:0,t=e?n+e.rows.length:0;return[n,t]}(m);return(m.values||[]).slice(b[0],b[1]).map(function(v,e){return{keyWithinBlock:e+(typeof v=="string"&&v.match(/[<$&>
1356 ]/)?"_keybuster_"+Math.random():""),key:b[0]+e,column:m,calcdata:m.calcdata,page:m.page,rowBlocks:m.rowBlocks,value:v}})}},{"../../lib/extend":493}],1068:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("../../plots/domain").defaults;ee.exports=function(v,e,n,t){function o(r,d){return g.coerce(v,e,m,r,d)}b(e,t,o),o("columnwidth"),o("header.values"),o("header.format"),o("header.align"),o("header.prefix"),o("header.suffix"),o("header.height"),o("header.line.width"),o("header.line.color"),o("header.fill.color"),g.coerceFont(o,"header.font",g.extendFlat({},t.font)),function(r,d){for(var c=r.columnorder||[],i=r.header.values.length,u=c.slice(0,i),f=u.slice().sort(function(p,a){return p-a}),s=u.map(function(p){return f.indexOf(p)}),h=s.length;h<i;h++)s.push(h);d("columnorder",s)}(e,o),o("cells.values"),o("cells.format"),o("cells.align"),o("cells.prefix"),o("cells.suffix"),o("cells.height"),o("cells.line.width"),o("cells.line.color"),o("cells.fill.color"),g.coerceFont(o,"cells.font",g.extendFlat({},t.font)),e._length=null}},{"../../lib":503,"../../plots/domain":584,"./attributes":1062}],1069:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("./calc"),plot:y("./plot"),moduleType:"trace",name:"table",basePlotModule:y("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1062,"./base_plot":1063,"./calc":1064,"./defaults":1068,"./plot":1070}],1070:[function(y,ee,te){var g=y("./constants"),m=y("@plotly/d3"),b=y("../../lib").numberFormat,v=y("../../lib/gup"),e=y("../../components/drawing"),n=y("../../lib/svg_text_utils"),t=y("../../lib").raiseToTop,o=y("../../lib").strTranslate,r=y("../../lib").cancelTransition,d=y("./data_preparation_helper"),c=y("./data_split_helpers"),i=y("../../components/color");function u(q){return Math.ceil(q.calcdata.maxLineWidth/2)}function f(q,W){return"clip"+q._fullLayout._uid+"_scrollAreaBottomClip_"+W.key}function s(q,W){return"clip"+q._fullLayout._uid+"_columnBoundaryClippath_"+W.calcdata.key+"_"+W.specIndex}function h(q){return[].concat.apply([],q.map(function(W){return W})).map(function(W){return W.__data__})}function p(q,W,$){var R=q.selectAll("."+g.cn.scrollbarKit).data(v.repeat,v.keyFun);R.enter().append("g").classed(g.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),R.each(function(X){var J=X.scrollbarState;J.totalHeight=function(re){var ne=re.rowBlocks;return H(ne,ne.length-1)+(ne.length?V(ne[ne.length-1],1/0):1)}(X),J.scrollableAreaHeight=X.groupHeight-L(X),J.currentlyVisibleHeight=Math.min(J.totalHeight,J.scrollableAreaHeight),J.ratio=J.currentlyVisibleHeight/J.totalHeight,J.barLength=Math.max(J.ratio*J.currentlyVisibleHeight,g.goldenRatio*g.scrollbarWidth),J.barWiggleRoom=J.currentlyVisibleHeight-J.barLength,J.wiggleRoom=Math.max(0,J.totalHeight-J.scrollableAreaHeight),J.topY=J.barWiggleRoom===0?0:X.scrollY/J.wiggleRoom*J.barWiggleRoom,J.bottomY=J.topY+J.barLength,J.dragMultiplier=J.wiggleRoom/J.barWiggleRoom}).attr("transform",function(X){var J=X.width+g.scrollbarWidth/2+g.scrollbarOffset;return o(J,L(X))});var N=R.selectAll("."+g.cn.scrollbar).data(v.repeat,v.keyFun);N.enter().append("g").classed(g.cn.scrollbar,!0);var U=N.selectAll("."+g.cn.scrollbarSlider).data(v.repeat,v.keyFun);U.enter().append("g").classed(g.cn.scrollbarSlider,!0),U.attr("transform",function(X){return o(0,X.scrollbarState.topY||0)});var Q=U.selectAll("."+g.cn.scrollbarGlyph).data(v.repeat,v.keyFun);Q.enter().append("line").classed(g.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",g.scrollbarWidth).attr("stroke-linecap","round").attr("y1",g.scrollbarWidth/2),Q.attr("y2",function(X){return X.scrollbarState.barLength-g.scrollbarWidth/2}).attr("stroke-opacity",function(X){return X.columnDragInProgress||!X.scrollbarState.barWiggleRoom||$?0:.4}),Q.transition().delay(0).duration(0),Q.transition().delay(g.scrollbarHideDelay).duration(g.scrollbarHideDuration).attr("stroke-opacity",0);var j=N.selectAll("."+g.cn.scrollbarCaptureZone).data(v.repeat,v.keyFun);j.enter().append("line").classed(g.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",g.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(X){var J=m.event.y,re=this.getBoundingClientRect(),ne=X.scrollbarState,se=J-re.top,oe=m.scale.linear().domain([0,ne.scrollableAreaHeight]).range([0,ne.totalHeight]).clamp(!0);ne.topY<=se&&se<=ne.bottomY||I(W,q,null,oe(se-ne.barLength/2))(X)}).call(m.behavior.drag().origin(function(X){return m.event.stopPropagation(),X.scrollbarState.scrollbarScrollInProgress=!0,X}).on("drag",I(W,q)).on("dragend",function(){})),j.attr("y2",function(X){return X.scrollbarState.scrollableAreaHeight}),W._context.staticPlot&&(Q.remove(),j.remove())}function a(q,W,$,R){var N=function(Q){var j=Q.selectAll("."+g.cn.columnCell).data(c.splitToCells,function(X){return X.keyWithinBlock});return j.enter().append("g").classed(g.cn.columnCell,!0),j.exit().remove(),j}(function(Q){var j=Q.selectAll("."+g.cn.columnCells).data(v.repeat,v.keyFun);return j.enter().append("g").classed(g.cn.columnCells,!0),j.exit().remove(),j}($));(function(Q){Q.each(function(j,X){var J=j.calcdata.cells.font,re=j.column.specIndex,ne={size:w(J.size,re,X),c
1356olor:w(J.color,re,X),family:w(J.family,re,X)};j.rowNumber=j.key,j.align=w(j.calcdata.cells.align,re,X),j.cellBorderWidth=w(j.calcdata.cells.line.width,re,X),j.font=ne})})(N),function(Q){Q.attr("width",function(j){return j.column.columnWidth}).attr("stroke-width",function(j){return j.cellBorderWidth}).each(function(j){var X=m.select(this);i.stroke(X,w(j.calcdata.cells.line.color,j.column.specIndex,j.rowNumber)),i.fill(X,w(j.calcdata.cells.fill.color,j.column.specIndex,j.rowNumber))})}(function(Q){var j=Q.selectAll("."+g.cn.cellRect).data(v.repeat,function(X){return X.keyWithinBlock});return j.enter().append("rect").classed(g.cn.cellRect,!0),j}(N));var U=function(Q){var j=Q.selectAll("."+g.cn.cellText).data(v.repeat,function(X){return X.keyWithinBlock});return j.enter().append("text").classed(g.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){m.event.stopPropagation()}),j}(function(Q){var j=Q.selectAll("."+g.cn.cellTextHolder).data(v.repeat,function(X){return X.keyWithinBlock});return j.enter().append("g").classed(g.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),j}(N));(function(Q){Q.each(function(j){e.font(m.select(this),j.font)})})(U),x(U,W,R,q),F(N)}function x(q,W,$,R){q.text(function(N){var U=N.column.specIndex,Q=N.rowNumber,j=N.value,X=typeof j=="string",J=X&&j.match(/<br>/i),re=!X||J;N.mayHaveMarkup=X&&j.match(/[<&>]/);var ne,se=typeof(ne=j)=="string"&&ne.match(g.latexCheck);N.latex=se;var oe,pe,ce=se?"":w(N.calcdata.cells.prefix,U,Q)||"",de=se?"":w(N.calcdata.cells.suffix,U,Q)||"",xe=se?null:w(N.calcdata.cells.format,U,Q)||null,we=ce+(xe?b(xe)(N.value):N.value)+de;if(N.wrappingNeeded=!N.wrapped&&!re&&!se&&(oe=l(we)),N.cellHeightMayIncrease=J||se||N.mayHaveMarkup||(oe===void 0?l(we):oe),N.needsConvertToTspans=N.mayHaveMarkup||N.wrappingNeeded||N.latex,N.wrappingNeeded){var be=(g.wrapSplitCharacter===" "?we.replace(/<a href=/gi,"<a_href="):we).split(g.wrapSplitCharacter),Ee=g.wrapSplitCharacter===" "?be.map(function(fe){return fe.replace(/<a_href=/gi,"<a href=")}):be;N.fragments=Ee.map(function(fe){return{text:fe,width:null}}),N.fragments.push({fragment:g.wrapSpacer,width:null}),pe=Ee.join(g.lineBreaker)+g.lineBreaker+g.wrapSpacer}else delete N.fragments,pe=we;return pe}).attr("dy",function(N){return N.needsConvertToTspans?0:"0.75em"}).each(function(N){var U=m.select(this),Q=N.wrappingNeeded?S:E;N.needsConvertToTspans?n.convertToTspans(U,R,Q($,this,W,R,N)):m.select(this.parentNode).attr("transform",function(j){return o(D(j),g.cellPad)}).attr("text-anchor",function(j){return{left:"start",center:"middle",right:"end"}[j.align]})})}function l(q){return q.indexOf(g.wrapSplitCharacter)!==-1}function w(q,W,$){if(Array.isArray(q)){var R=q[Math.min(W,q.length-1)];return Array.isArray(R)?R[Math.min($,R.length-1)]:R}return q}function _(q,W,$){q.transition().ease(g.releaseTransitionEase).duration(g.releaseTransitionDuration).attr("transform",o(W.x,$))}function T(q){return q.type==="cells"}function k(q){return q.type==="header"}function L(q){return(q.rowBlocks.length?q.rowBlocks[0].auxiliaryBlocks:[]).reduce(function(W,$){return W+V($,1/0)},0)}function A(q,W,$){var R=h(W)[0];if(R!==void 0){var N=R.rowBlocks,U=R.calcdata,Q=H(N,N.length),j=R.calcdata.groupHeight-L(R),X=U.scrollY=Math.max(0,Math.min(Q-j,U.scrollY)),J=function(re,ne,se){for(var oe=[],pe=0,ce=0;ce<re.length;ce++){for(var de=re[ce],xe=de.rows,we=0,be=0;be<xe.length;be++)we+=xe[be].rowHeight;de.allRowsHeight=we,ne<pe+we&&ne+se>pe&&oe.push(ce),pe+=we}return oe}(N,X,j);J.length===1&&(J[0]===N.length-1?J.unshift(J[0]-1):J.push(J[0]+1)),J[0]%2&&J.reverse(),W.each(function(re,ne){re.page=J[ne],re.scrollY=X}),W.attr("transform",function(re){var ne=H(re.rowBlocks,re.page)-re.scrollY;return o(0,ne)}),q&&(P(q,$,W,J,R.prevPages,R,0),P(q,$,W,J,R.prevPages,R,1),p($,q))}}function I(q,W,$,R){return function(N){var U=N.calcdata?N.calcdata:N,Q=W.filter(function(re){return U.key===re.key}),j=$||U.scrollbarState.dragMultiplier,X=U.scrollY;U.scrollY=R===void 0?U.scrollY+j*m.event.dy:R;var J=Q.selectAll("."+g.cn.yColumn).selectAll("."+g.cn.columnBlock).filter(T);return A(q,J,Q),U.scrollY===X}}function P(q,W,$,R,N,U,Q){R[Q]!==N[Q]&&(clearTimeout(U.currentRepaint[Q]),U.currentRepaint[Q]=setTimeout(function(){var j=$.filter(function(X,J){return J===Q&&R[J]!==N[J]});a(q,W,j,$),N[Q]=R[Q]}))}function S(q,W,$,R){return function(){var N=m.select(W.parentNode);N.each(function(U){var Q=U.fragments;N.selectAll("tspan.line").each(function(pe,ce){Q[ce].width=this.getComputedTextLength()});var j,X,J=Q[Q.length-1].width,re=Q.slice(0,-1),ne=[],se=0,oe=U.column.columnWidth-2*g.cellPad;for(U.value="";re.length;)se+(X=(j=re.shift()).width+J)>oe&&(U.value+=ne.join(g.wrapSpacer)+g.lineBreaker,ne=[],se=0),ne.push(j.text),se+=X;se&&(U.value+=ne.join(g.wrapSpacer)),U.wrapped=!0}),N.selectAll("tspan.line").remove(),x(N.select("."+g.cn.cellText),$,q,R),m.select(W.parentNode.parentNode).call(F)}}function E(q,W,$,R,N){return function(){if(!N.settledY){var U=m.select(W.parentNode),Q=K(N),j=N.key-Q.firstRowIndex,X=Q.rows[j].rowHeight,J=N.cellHeightMayIncrease?W.parentNode.getBoundingClientRect().height+2*g.cellPad:X,re=Math.max(J,X);re-Q.rows[j].rowHeight&&(Q.rows[j].rowHeight=re,q.selectAll("."+g.cn.columnCell).call(F),A(null,q.filter(T),0),p($,R,!0)),U.attr("transform",function(){var ne=this.parentNode.getBoundingClientRect(),se=m.select(this.parentNode).select("."+g.cn.cellRect).node().getBoundingClientRect(),oe=this.transform.baseVal.consolidate(),pe=se.top-ne.top+(oe?oe.matrix.f:g.cellPad);return o(D(N,m.select(this.parentNode).select("."+g.cn.cellTextHolder).node().getBoundingClientRect().width),pe)}),N.settledY=!0}}}function D(q,W){switch(q.align){case"left":return g.cellPad;case"right":return q.column.columnWidth-(W||0)-g.cellPad;case"center":return(q.column.columnWidth-(W||0))/2;default:return g.cellPad}}function F(q){q.attr("transform",function(W){var $=W.rowBlocks[0].auxiliaryBlocks.reduce(function(N,U){return N+V(U,1/0)},0),R=V(K(W),W.key);return o(0,R+$)}).selectAll("."+g.cn.cellRect).attr("height",function(W){return($=K(W),R=W.key,$.rows[R-$.firstRowIndex]).rowHeight;var $,R}
1356)}function H(q,W){for(var $=0,R=W-1;R>=0;R--)$+=Z(q[R]);return $}function V(q,W){for(var $=0,R=0;R<q.rows.length&&q.rows[R].rowIndex<W;R++)$+=q.rows[R].rowHeight;return $}function Z(q){var W=q.allRowsHeight;if(W!==void 0)return W;for(var $=0,R=0;R<q.rows.length;R++)$+=q.rows[R].rowHeight;return q.allRowsHeight=$,$}function K(q){return q.rowBlocks[q.page]}ee.exports=function(q,W){var $=!q._context.staticPlot,R=q._fullLayout._paper.selectAll("."+g.cn.table).data(W.map(function(de){var xe=v.unwrap(de).trace;return d(q,xe)}),v.keyFun);R.exit().remove(),R.enter().append("g").classed(g.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),R.attr("width",function(de){return de.width+de.size.l+de.size.r}).attr("height",function(de){return de.height+de.size.t+de.size.b}).attr("transform",function(de){return o(de.translateX,de.translateY)});var N=R.selectAll("."+g.cn.tableControlVie
1356w).data(v.repeat,v.keyFun),U=N.enter().append("g").classed(g.cn.tableControlView,!0).style("box-sizing","content-box");if($){var Q="onwheel"in document?"wheel":"mousewheel";U.on("mousemove",function(de){N.filter(function(xe){return de===xe}).call(p,q)}).on(Q,function(de){if(!de.scrollbarState.wheeling){de.scrollbarState.wheeling=!0;var xe=de.scrollY+m.event.deltaY;I(q,N,null,xe)(de)||(m.event.stopPropagation(),m.event.preventDefault()),de.scrollbarState.wheeling=!1}}).call(p,q,!0)}N.attr("transform",function(de){return o(de.size.l,de.size.t)});var j=N.selectAll("."+g.cn.scrollBackground).data(v.repeat,v.keyFun);j.enter().append("rect").classed(g.cn.scrollBackground,!0).attr("fill","none"),j.attr("width",function(de){return de.width}).attr("height",function(de){return de.height}),N.each(function(de){e.setClipUrl(m.select(this),f(q,de),q)});var X=N.selectAll("."+g.cn.yColumn).data(function(de){return de.columns},v.keyFun);X.enter().append("g").classed(g.cn.yColumn,!0),X.exit().remove(),X.attr("transform",function(de){return o(de.x,0)}),$&&X.call(m.behavior.drag().origin(function(de){return _(m.select(this),de,-g.uplift),t(this),de.calcdata.columnDragInProgress=!0,p(N.filter(function(xe){return de.calcdata.key===xe.key}),q),de}).on("drag",function(de){var xe=m.select(this),we=function(be){return(de===be?m.event.x:be.x)+be.columnWidth/2};de.x=Math.max(-g.overdrag,Math.min(de.calcdata.width+g.overdrag-de.columnWidth,m.event.x)),h(X).filter(function(be){return be.calcdata.key===de.calcdata.key}).sort(function(be,Ee){return we(be)-we(Ee)}).forEach(function(be,Ee){be.xIndex=Ee,be.x=de===be?be.x:be.xScale(be)}),X.filter(function(be){return de!==be}).transition().ease(g.transitionEase).duration(g.transitionDuration).attr("transform",function(be){return o(be.x,0)}),xe.call(r).attr("transform",o(de.x,-g.uplift))}).on("dragend",function(de){var xe=m.select(this),we=de.calcdata;de.x=de.xScale(de),de.calcdata.columnDragInProgress=!1,_(xe,de,0),function(be,Ee,fe){var me=Ee.gdColumnsOriginalOrder;Ee.gdColumns.sort(function(Te,_e){return fe[me.indexOf(Te)]-fe[me.indexOf(_e)]}),Ee.columnorder=fe,be.emit("plotly_restyle")}(q,we,we.columns.map(function(be){return be.xIndex}))})),X.each(function(de){e.setClipUrl(m.select(this),s(q,de),q)});var J=X.selectAll("."+g.cn.columnBlock).data(c.splitToPanels,v.keyFun);J.enter().append("g").classed(g.cn.columnBlock,!0).attr("id",function(de){return de.key}),J.style("cursor",function(de){return de.dragHandle?"ew-resize":de.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var re=J.filter(k),ne=J.filter(T);$&&ne.call(m.behavior.drag().origin(function(de){return m.event.stopPropagation(),de}).on("drag",I(q,N,-1)).on("dragend",function(){})),a(q,N,re,J),a(q,N,ne,J);var se=N.selectAll("."+g.cn.scrollAreaClip).data(v.repeat,v.keyFun);se.enter().append("clipPath").classed(g.cn.scrollAreaClip,!0).attr("id",function(de){return f(q,de)});var oe=se.selectAll("."+g.cn.scrollAreaClipRect).data(v.repeat,v.keyFun);oe.enter().append("rect").classed(g.cn.scrollAreaClipRect,!0).attr("x",-g.overdrag).attr("y",-g.uplift).attr("fill","none"),oe.attr("width",function(de){return de.width+2*g.overdrag}).attr("height",function(de){return de.height+g.uplift}),X.selectAll("."+g.cn.columnBoundary).data(v.repeat,v.keyFun).enter().append("g").classed(g.cn.columnBoundary,!0);var pe=X.selectAll("."+g.cn.columnBoundaryClippath).data(v.repeat,v.keyFun);pe.enter().append("clipPath").classed(g.cn.columnBoundaryClippath,!0),pe.attr("id",function(de){return s(q,de)});var ce=pe.selectAll("."+g.cn.columnBoundaryRect).data(v.repeat,v.keyFun);ce.enter().append("rect").classed(g.cn.columnBoundaryRect,!0).attr("fill","none"),ce.attr("width",function(de){return de.columnWidth+2*u(de)}).attr("height",function(de){return de.calcdata.height+2*u(de)+g.uplift}).attr("x",function(de){return-u(de)}).attr("y",function(de){return-u(de)}),A(null,ne,N)}},{"../../components/color":366,"../../components/drawing":388,"../../lib":503,"../../lib/gup":500,"../../lib/svg_text_utils":529,"./constants":1065,"./data_preparation_helper":1066,"./data_split_helpers":1067,"@plotly/d3":58}],1071:[function(y,ee,te){var g=y("../../plots/template_attributes").hovertemplateAttrs,m=y("../../plots/template_attributes").texttemplateAttrs,b=y("../../components/colorscale/attributes"),v=y("../../plots/domain").attributes,e=y("../pie/attributes"),n=y("../sunburst/attributes"),t=y("./constants"),o=y("../../lib/extend").extendFlat;ee.exports={labels:n.labels,parents:n.parents,values:n.values,branchvalues:n.branchvalues,count:n.count,level:n.level,maxdepth:n.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:o({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:n.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:n.marker.line,editType:"calc"},b("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:o({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:n.textinfo,texttemplate:m({editType:"plot"},{keys:t.eventDataKeys.concat(["label","value"])}),hovertext:e.hovertext,hoverinfo:n.hoverinfo,hovertemplate:g({},{keys:t.eventDataKeys}),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:o({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:n.root,domain:v({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":900,"../sunburst/attributes":1045,"./constants":1074}],1072:[function(y,ee,te){var g=y("../../plots/plots");te.name="treemap",te.plot=function(m,b,v,e){g.plotBasePlot(te.name,m,b,v,e)},te.clean=function(m,b,v,e){g.cleanBasePlot(te.name,m,b,v,e)}},{"../../plots/plots":619}
1356],1073:[function(y,ee,te){var g=y("../sunburst/calc");te.calc=function(m,b){return g.calc(m,b)},te.crossTraceCalc=function(m){return g._runCrossTraceCalc("treemap",m)}},{"../sunburst/calc":1047}],1074:[function(y,ee,te){ee.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1075:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("../../components/color"),v=y("../../plots/domain").defaults,e=y("../bar/defaults").handleText,n=y("../bar/constants").TEXTPAD,t=y("../../components/colorscale"),o=t.hasColorscale,r=t.handleDefaults;ee.exports=function(d,c,i,u){function f(T,k){return g.coerce(d,c,m,T,k)}var s=f("labels"),h=f("parents");if(s&&s.length&&h&&h.length){var p=f("values");p&&p.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),f("tiling.packing")==="squarify"&&f("tiling.squarifyratio"),f("tiling.flip"),f("tiling.pad");var a=f("text");f("texttemplate"),c.texttemplate||f("textinfo",Array.isArray(a)?"text+label":"label"),f("hovertext"),f("hovertemplate");var x=f("pathbar.visible");e(d,c,u,f,"auto",{hasPathbar:x,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition");var l=c.textposition.indexOf("bottom")!==-1;f("marker.line.width")&&f("marker.line.color",u.paper_bgcolor);var w=f("marker.colors");(c._hasColorscale=o(d,"marker","colors")||(d.marker||{}).coloraxis)?r(d,c,u,f,{prefix:"marker.",cLetter:"c"}):f("marker.depthfade",!(w||[]).length);var _=2*c.textfont.size;f("marker.pad.t",l?_/4:_),f("marker.pad.l",_/4),f("marker.pad.r",_/4),f("marker.pad.b",l?_:_/4),c._hovered={marker:{line:{width:2,color:b.contrast(u.paper_bgcolor)}}},x&&(f("pathbar.thickness",c.pathbar.textfont.size+2*n),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),v(c,u,f),c._length=null}else c.visible=!1}},{"../../components/color":366,"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/constants":650,"../bar/defaults":652,"./attributes":1071}],1076:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../sunburst/helpers"),b=y("../bar/uniform_text").clearMinTextSize,v=y("../bar/style").resizeText,e=y("./plot_one");ee.exports=function(n,t,o,r,d){var c,i,u=d.type,f=d.drawDescendants,s=n._fullLayout,h=s["_"+u+"layer"],p=!o;b(u,s),(c=h.selectAll("g.trace."+u).data(t,function(a){return a[0].trace.uid})).enter().append("g").classed("trace",!0).classed(u,!0),c.order(),!s.uniformtext.mode&&m.hasTransition(o)?(r&&(i=r()),g.transition().duration(o.duration).ease(o.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()}).each(function(){h.selectAll("g.trace").each(function(a){e(n,a,this,o,f)})})):(c.each(function(a){e(n,a,this,o,f)}),s.uniformtext.mode&&v(n,h.selectAll(".trace"),u)),p&&c.exit().remove()}},{"../bar/style":662,"../bar/uniform_text":664,"../sunburst/helpers":1051,"./plot_one":1085,"@plotly/d3":58}],1077:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../components/drawing"),v=y("../../lib/svg_text_utils"),e=y("./partition"),n=y("./style").styleOne,t=y("./constants"),o=y("../sunburst/helpers"),r=y("../sunburst/fx");ee.exports=function(d,c,i,u,f){var s=f.barDifY,h=f.width,p=f.height,a=f.viewX,x=f.viewY,l=f.pathSlice,w=f.toMoveInsideSlice,_=f.strTransform,T=f.hasTransition,k=f.handleSlicesExit,L=f.makeUpdateSliceInterpolator,A=f.makeUpdateTextInterpolator,I={},P=d._fullLayout,S=c[0],E=S.trace,D=S.hierarchy,F=h/E._entryDepth,H=o.listPath(i.data,"id"),V=e(D.copy(),[h,p],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(V=V.filter(function(K){var q=H.indexOf(K.data.id);return q!==-1&&(K.x0=F*q,K.x1=F*(q+1),K.y0=s,K.y1=s+p,K.onPathbar=!0,!0)})).reverse(),(u=u.data(V,o.getPtId)).enter().append("g").classed("pathbar",!0),k(u,!0,I,[h,p],l),u.order();var Z=u;T&&(Z=Z.transition().each("end",function(){var K=g.select(this);o.setSliceCursor(K,d,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}
1356)),Z.each(function(K){K._x0=a(K.x0),K._x1=a(K.x1),K._y0=x(K.y0),K._y1=x(K.y1),K._hoverX=a(K.x1-Math.min(h,p)/2),K._hoverY=x(K.y1-p/2);var q=g.select(this),W=m.ensureSingle(q,"path","surface",function(U){U.style("pointer-events","all")});T?W.transition().attrTween("d",function(U){var Q=L(U,!0,I,[h,p]);return function(j){return l(Q(j))}}):W.attr("d",l),q.call(r,i,d,c,{styleOne:n,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,d,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:d._transitioning}),W.call(n,K,E,{hovered:!1}),K._text=(o.getPtLabel(K)||"").split("<br>").join(" ")||"";var $=m.ensureSingle(q,"g","slicetext"),R=m.ensureSingle($,"text","",function(U){U.attr("data-notex",1)}),N=m.ensureUniformFontSize(d,o.determineTextFont(E,K,P.font,{onPathbar:!0}));R.text(K._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(b.font,N).call(v.convertToTspans,d),K.textBB=b.bBox(R.node()),K.transform=w(K,{fontSize:N.size,onPathbar:!0}),K.transform.fontSize=N.size,T?R.transition().attrTween("transform",function(U){var Q=A(U,!0,I,[h,p]);return function(j){return _(Q(j))}}):R.attr("transform",_(K))})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1050,"../sunburst/helpers":1051,"./constants":1074,"./partition":1083,"./style":1086,"@plotly/d3":58}],1078:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../components/drawing"),v=y("../../lib/svg_text_utils"),e=y("./partition"),n=y("./style").styleOne,t=y("./constants"),o=y("../sunburst/helpers"),r=y("../sunburst/fx"),d=y("../sunburst/plot").formatSliceLabel;ee.exports=function(c,i,u,f,s){var h=s.width,p=s.height,a=s.viewX,x=s.viewY,l=s.pathSlice,w=s.toMoveInsideSlice,_=s.strTransform,T=s.hasTransition,k=s.handleSlicesExit,L=s.makeUpdateSliceInterpolator,A=s.makeUpdateTextInterpolator,I=s.prevEntry,P=c._fullLayout,S=i[0].trace,E=S.textposition.indexOf("left")!==-1,D=S.textposition.indexOf("right")!==-1,F=S.textposition.indexOf("bottom")!==-1,H=!F&&!S.marker.pad.t||F&&!S.marker.pad.b,V=e(u,[h,p],{packing:S.tiling.packing,squarifyratio:S.tiling.squarifyratio,flipX:S.tiling.flip.indexOf("x")>-1,flipY:S.tiling.flip.indexOf("y")>-1,pad:{inner:S.tiling.pad,top:S.marker.pad.t,left:S.marker.pad.l,right:S.marker.pad.r,bottom:S.marker.pad.b}}).descendants(),Z=1/0,K=-1/0;
1356V.forEach(function(N){var U=N.depth;U>=S._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(Z=Math.min(Z,U),K=Math.max(K,U))}),f=f.data(V,o.getPtId),S._maxVisibleLayers=isFinite(K)?K-Z+1:0,f.enter().append("g").classed("slice",!0),k(f,!1,{},[h,p],l),f.order();var q=null;if(T&&I){var W=o.getPtId(I);f.each(function(N){q===null&&o.getPtId(N)===W&&(q={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var $=function(){return q||{x0:0,x1:h,y0:0,y1:p}},R=f;return T&&(R=R.transition().each("end",function(){var N=g.select(this);o.setSliceCursor(N,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(N){var U=o.isHeader(N,S);N._x0=a(N.x0),N._x1=a(N.x1),N._y0=x(N.y0),N._y1=x(N.y1),N._hoverX=a(N.x1-S.marker.pad.r),N._hoverY=x(F?N.y1-S.marker.pad.b/2:N.y0+S.marker.pad.t/2);var Q=g.select(this),j=m.ensureSingle(Q,"path","surface",function(ne){ne.style("pointer-events","all")});T?j.transition().attrTween("d",function(ne){var se=L(ne,!1,$(),[h,p]);return function(oe){return l(se(oe))}}):j.attr("d",l),Q.call(r,u,c,i,{styleOne:n,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,c,{isTransitioning:c._transitioning}),j.call(n,N,S,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=U?H?"":o.getPtLabel(N)||"":d(N,u,S,i,P)||"";var X=m.ensureSingle(Q,"g","slicetext"),J=m.ensureSingle(X,"text","",function(ne){ne.attr("data-notex",1)}),re=m.ensureUniformFontSize(c,o.determineTextFont(S,N,P.font));J.text(N._text||" ").classed("slicetext",!0).attr("text-anchor",D?"end":E||U?"start":"middle").call(b.font,re).call(v.convertToTspans,c),N.textBB=b.bBox(J.node()),N.transform=w(N,{fontSize:re.size,isHeader:U}),N.transform.fontSize=re.size,T?J.transition().attrTween("transform",function(ne){var se=A(ne,!1,$(),[h,p]);return function(oe){return _(se(oe))}}):J.attr("transform",_(N))}),q}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1050,"../sunburst/helpers":1051,"../sunburst/plot":1055,"./constants":1074,"./partition":1083,"./style":1086,"@plotly/d3":58}],1079:[function(y,ee,te){ee.exports=function g(m,b,v){var e;v.swapXY&&(e=m.x0,m.x0=m.y0,m.y0=e,e=m.x1,m.x1=m.y1,m.y1=e),v.flipX&&(e=m.x0,m.x0=b[0]-m.x1,m.x1=b[0]-e),v.flipY&&(e=m.y0,m.y0=b[1]-m.y1,m.y1=b[1]-e);var n=m.children;if(n)for(var t=0;t<n.length;t++)g(n[t],b,v)}},{}],1080:[function(y,ee,te){ee.exports={moduleType:"trace",name:"treemap",basePlotModule:y("./base_plot"),categories:[],animatable:!0,attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults"),supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc").calc,crossTraceCalc:y("./calc").crossTraceCalc,plot:y("./plot"),style:y("./style").style,colorbar:y("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":944,"./attributes":1071,"./base_plot":1072,"./calc":1073,"./defaults":1075,"./layout_attributes":1081,"./layout_defaults":1082,"./plot":1084,"./style":1086}],1081:[function(y,ee,te){ee.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1082:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v){function e(n,t){return g.coerce(b,v,m,n,t)}e("treemapcolorway",v.colorway),e("extendtreemapcolors")}},{"../../lib":503,"./layout_attributes":1081}],1083:[function(y,ee,te){var g=y("d3-hierarchy"),m=y("./flip_tree");ee.exports=function(b,v,e){var n,t=e.flipX,o=e.flipY,r=e.packing==="dice-slice",d=e.pad[o?"bottom":"top"],c=e.pad[t?"right":"left"],i=e.pad[t?"left":"right"],u=e.pad[o?"top":"bottom"];r&&(n=c,c=d,d=n,n=i,i=u,u=n);var f=g.treemap().tile(function(s,h){switch(s){case"squarify":return g.treemapSquarify.ratio(h);case"binary":return g.treemapBinary;case"dice":return g.treemapDice;case"slice":return g.treemapSlice;default:return g.treemapSliceDice}}(e.packing,e.squarifyratio)).paddingInner(e.pad.inner).paddingLeft(c).paddingRight(i).paddingTop(d).paddingBottom(u).size(r?[v[1],v[0]]:v)(b);return(r||t||o)&&m(f,v,{swapXY:r,flipX:t,flipY:o}),f}}
1356,{"./flip_tree":1079,"d3-hierarchy":115}],1084:[function(y,ee,te){var g=y("./draw"),m=y("./draw_descendants");ee.exports=function(b,v,e,n){return g(b,v,e,n,{type:"treemap",drawDescendants:m})}},{"./draw":1076,"./draw_descendants":1078}],1085:[function(y,ee,te){var g=y("@plotly/d3"),m=y("d3-interpolate").interpolate,b=y("../sunburst/helpers"),v=y("../../lib"),e=y("../bar/constants").TEXTPAD,n=y("../bar/plot").toMoveInsideBar,t=y("../bar/uniform_text").recordMinTextSize,o=y("./constants"),r=y("./draw_ancestors");function d(c){return b.isHierarchyRoot(c)?"":b.getPtId(c)}ee.exports=function(c,i,u,f,s){var h=c._fullLayout,p=i[0],a=p.trace,x=a.type==="icicle",l=p.hierarchy,w=b.findEntryWithLevel(l,a.level),_=g.select(u),T=_.selectAll("g.pathbar"),k=_.selectAll("g.slice");if(!w)return T.remove(),void k.remove();var L=b.isHierarchyRoot(w),A=!h.uniformtext.mode&&b.hasTransition(f),I=b.getMaxDepth(a),P=h._size,S=a.domain,E=P.w*(S.x[1]-S.x[0]),D=P.h*(S.y[1]-S.y[0]),F=E,H=a.pathbar.thickness,V=a.marker.line.width+o.gapWithPathbar,Z=a.pathbar.visible?a.pathbar.side.indexOf("bottom")>-1?D+V:-(H+V):0,K={x0:F,x1:F,y0:Z,y1:Z+H},q=function(Ae,Pe,De){var Ve=a.tiling.pad,Qe=function(Ye){return Ye-Ve<=Pe.x0},Oe=function(Ye){return Ye+Ve>=Pe.x1},Ue=function(Ye){return Ye-Ve<=Pe.y0},Ge=function(Ye){return Ye+Ve>=Pe.y1};return Ae.x0===Pe.x0&&Ae.x1===Pe.x1&&Ae.y0===Pe.y0&&Ae.y1===Pe.y1?{x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1}:{x0:Qe(Ae.x0-Ve)?0:Oe(Ae.x0-Ve)?De[0]:Ae.x0,x1:Qe(Ae.x1+Ve)?0:Oe(Ae.x1+Ve)?De[0]:Ae.x1,y0:Ue(Ae.y0-Ve)?0:Ge(Ae.y0-Ve)?De[1]:Ae.y0,y1:Ue(Ae.y1+Ve)?0:Ge(Ae.y1+Ve)?De[1]:Ae.y1}},W=null,$={},R={},N=null,U=function(Ae,Pe){return Pe?$[d(Ae)]:R[d(Ae)]},Q=function(Ae,Pe,De,Ve){if(Pe)return $[d(l)]||K;var Qe=R[a.level]||De;return function(Oe){return Oe.data.depth-w.data.depth<I}(Ae)?q(Ae,Qe,Ve):{}};p.hasMultipleRoots&&L&&I++,a._maxDepth=I,a._backgroundColor=h.paper_bgcolor,a._entryDepth=w.data.depth,a._atRootLevel=L;var j=-E/2+P.l+P.w*(S.x[1]+S.x[0])/2,X=-D/2+P.t+P.h*(1-(S.y[1]+S.y[0])/2),J=function(Ae){return j+Ae},re=function(Ae){return X+Ae},ne=re(0),se=J(0),oe=function(Ae){return se+Ae},pe=function(Ae){return ne+Ae};function ce(Ae,Pe){return Ae+","+Pe}var de=oe(0),xe=function(Ae){Ae.x=Math.max(de,Ae.x)},we=a.pathbar.edgeshape,be=function(Ae,Pe){var De=Ae.x0,Ve=Ae.x1,Qe=Ae.y0,Oe=Ae.y1,Ue=Ae.textBB,Ge=function(Tt){return a.textposition.indexOf(Tt)!==-1},Ye=Ge("bottom"),tt=Ge("top")||Pe.isHeader&&!Ye?"start":Ye?"end":"middle",lt=Ge("right"),vt=Ge("left")||Pe.onPathbar?-1:lt?1:0,It=a[x?"tiling":"marker"].pad;if(Pe.isHeader){if((De+=(x?It:It.l)-e)>=(Ve-=(x?It:It.r)-e)){var St=(De+Ve)/2;De=St,Ve=St}var rt;Ye?Qe<(rt=Oe-(x?It:It.b))&&rt<Oe&&(Qe=rt):Qe<(rt=Qe+(x?It:It.t))&&rt<Oe&&(Oe=rt)}var et=n(De,Ve,Qe,Oe,Ue,{isHorizontal:!1,constrained:!0,angle:0,anchor:tt,leftToRight:vt});return et.fontSize=Pe.fontSize,et.targetX=J(et.targetX),et.targetY=re(et.targetY),isNaN(et.targetX)||isNaN(et.targetY)?{}:(De!==Ve&&Qe!==Oe&&t(a.type,et,h),{scale:et.scale,rotate:et.rotate,textX:et.textX,textY:et.textY,anchorX:et.anchorX,anchorY:et.anchorY,targetX:et.targetX,targetY:et.targetY})},Ee=function(Ae,Pe){for(var De,Ve=0,Qe=Ae;!De&&Ve<I;)Ve++,(Qe=Qe.parent)?De=U(Qe,Pe):Ve=I;return De||{}},fe=function(Ae,Pe,De,Ve,Qe){var Oe,Ue=U(Ae,Pe);if(Ue)Oe=Ue;else if(Pe)Oe=K;else if(W)if(Ae.parent){var Ge=N||De;Ge&&!Pe?Oe=q(Ae,Ge,Ve):(Oe={},v.extendFlat(Oe,Ee(Ae,Pe)))}else Oe=v.extendFlat({},Ae),x&&(Qe.orientation==="h"?Qe.flipX?Oe.x0=Ae.x1:Oe.x1=0:Qe.flipY?Oe.y0=Ae.y1:Oe.y1=0);else Oe={};return m(Oe,{x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1})},me=function(Ae,Pe,De,Ve){var Qe=U(Ae,Pe),Oe={},Ue=Q(Ae,Pe,De,Ve);v.extendFlat(Oe,{transform:be({x0:Ue.x0,x1:Ue.x1,y0:Ue.y0,y1:Ue.y1,textBB:Ae.textBB,_text:Ae._text},{isHeader:b.isHeader(Ae,a)})}),Qe?Oe=Qe:Ae.parent&&v.extendFlat(Oe,Ee(Ae,Pe));var Ge=Ae.transform;return Ae.x0!==Ae.x1&&Ae.y0!==Ae.y1&&t(a.type,Ge,h),m(Oe,{transform:{scale:Ge.scale,rotate:Ge.rotate,textX:Ge.textX,textY:Ge.textY,anchorX:Ge.anchorX,anchorY:Ge.anchorY,targetX:Ge.targetX,targetY:Ge.targetY}})},Te=function(Ae,Pe,De,Ve,Qe){var Oe=Ve[0],Ue=Ve[1];A?Ae.exit().transition().each(function(){var Ge=g.select(this);Ge.select("path.surface").transition().attrTween("d",function(Ye){var tt=function(lt,vt,It,St){var rt,et=U(lt,vt);if(vt)rt=K;else{var Tt=U(w,vt);rt=Tt?q(lt,Tt,St):{}}return m(et,rt)}(Ye,Pe,0,[Oe,Ue]);return function(lt){return Qe(tt(lt))}}),Ge.select("g.slicetext").attr("opacity",0)}).remove():Ae.exit().remove()},_e=function(Ae){var Pe=Ae.transform;return Ae.x0!==Ae.x1&&Ae.y0!==Ae.y1&&t(a.type,Pe,h),v.getTextTransform({textX:Pe.textX,textY:Pe.textY,anchorX:Pe.anchorX,anchorY:Pe.anchorY,targetX:Pe.targetX,targetY:Pe.targetY,scale:Pe.scale,rotate:Pe.rotate})};A&&(T.each(function(Ae){$[d(Ae)]={x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1},Ae.transform&&($[d(Ae)].transform={textX:Ae.transform.textX,textY:Ae.transform.textY,anchorX:Ae.transform.anchorX,anchorY:Ae.transform.anchorY,targetX:Ae.transform.targetX,targetY:Ae.transform.targetY,scale:Ae.transform.scale,rotate:Ae.transform.rotate})}),k.each(function(Ae){R[d(Ae)]={x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1},Ae.transform&&(R[d(Ae)].transform={textX:Ae.transform.textX,textY:Ae.transform.textY,anchorX:Ae.transform.anchorX,anchorY:Ae.transform.anchorY,targetX:Ae.transform.targetX,targetY:Ae.transform.targetY,scale:Ae.transform.scale,rotate:Ae.transform.rotate}),!W&&b.isEntry(Ae)&&(W=Ae)})),N=s(c,i,w,k,{width:E,height:D,viewX:J,viewY:re,pathSlice:function(Ae){var Pe=J(Ae.x0),De=J(Ae.x1),Ve=re(Ae.y0),Qe=re(Ae.y1),Oe=De-Pe,Ue=Qe-Ve;return!Oe||!Ue?"":"M"+ce(Pe,Ve+0)+"L"+ce(De-0,Ve)+"L"+ce(De,Qe-0)+"L"+ce(Pe+0,Qe)+"Z"},toMoveInsideSlice:be,prevEntry:W,makeUpdateSliceInterpolator:fe,makeUpdateTextInterpolator:me,handleSlicesExit:Te,hasTransition:A,strTransform:_e}),a.pathbar.visible?r(c,i,w,T,{barDifY:Z,width:F,height:H,viewX:oe,viewY:pe,pathSlice:function(Ae){var Pe=oe(Math.max(Math.min(Ae.x0,Ae.x0),0)),De=oe(Math.min(Math.max(Ae.x1,Ae.x1),F)),Ve=pe(Ae.y0),Qe=pe(Ae.y1),Oe=H/2,Ue={},Ge={};Ue.x=Pe,Ge.x=De,Ue.y=Ge.y=(Ve+Qe)/2;var Ye={x:Pe,y:Ve},tt={x:De,y:Ve},lt={x:De,y:Qe},vt={x:Pe,y:Qe};return we===">"?(Ye.x-=Oe,tt.x-=Oe,lt.x-=Oe,vt.x-=Oe):we==="/"?(lt.x-=Oe,vt.x-=Oe,Ue.x-=Oe/2,Ge.x-=Oe/2):we==="\\"?(Ye.x-=Oe,tt.x-=Oe,Ue.x-=Oe/2,Ge.x-=Oe/2):we==="<"&&(Ue.x-=Oe,Ge.x-=Oe),xe(Ye),xe(vt),xe(Ue),xe(tt),xe(lt),xe(Ge),"M"+ce(Ye.x,Ye.y)+"L"+ce(tt.x,tt.y)+"L"+ce(Ge.x,Ge.y)+"L"+ce(lt.x,lt.y)+"L"+ce(vt.x,vt.y)+"L"+ce(Ue.x,Ue.y)+"Z"},toMoveInsideSlice:be,makeUpdateSliceInterpolator:fe,makeUpdateTextInterpolator:me,handleSlicesExit:Te,hasTransition:A,strTransform:_e}):T.remove()}},{"../../lib":503,"../bar/constants":650,"../bar/plot":659,"../bar/uniform_text":664,"../sunburst/helpers":1051,"./constants":1074,"./draw_ancestors":1077,"@plotly/d3":58,"d3-interpolate":116}],1086:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/color"),b=y("../../lib"),v=y("../sunburst/helpers"),e=y("../bar/uniform_text").resizeText;function n(t,o,r,d){var c,i,u=(d||{}).hovered,f=o.data.data,s=f.i,h=f.color,p=v.isHierarchyRoot(o),a=1;
1356if(u)c=r._hovered.marker.line.color,i=r._hovered.marker.line.width;else if(p&&h===r.root.color)a=100,c="rgba(0,0,0,0)",i=0;else if(c=b.castOption(r,s,"marker.line.color")||m.defaultLine,i=b.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!o.onPathbar){var x=r.marker.depthfade;if(x){var l,w=m.combine(m.addOpacity(r._backgroundColor,.75),h);if(x===!0){var _=v.getMaxDepth(r);l=isFinite(_)?v.isLeaf(o)?0:r._maxVisibleLayers-(o.data.depth-r._entryDepth):o.data.height+1}else l=o.data.depth-r._entryDepth,r._atRootLevel||l++;if(l>0)for(var T=0;T<l;T++){var k=.5*T/l;h=m.combine(m.addOpacity(w,k),h)}}}t.style("stroke-width",i).call(m.fill,h).call(m.stroke,c).style("opacity",a)}ee.exports={style:function(t){var o=t._fullLayout._treemaplayer.selectAll(".trace");e(t,o,"treemap"),o.each(function(r){var d=g.select(this),c=r[0].trace;d.style("opacity",c.opacity),d.selectAll("path.surface").each(function(i){g.select(this).call(n,i,c,{hovered:!1})})})},styleOne:n}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"../sunburst/helpers":1051,"@plotly/d3":58}],1087:[function(y,ee,te){var g=y("../box/attributes"),m=y("../../lib/extend").extendFlat,b=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat;ee.exports={y:g.y,x:g.x,x0:g.x0,y0:g.y0,xhoverformat:b("x"),yhoverformat:b("y"),name:m({},g.name,{}),orientation:m({},g.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:g.fillcolor,points:m({},g.boxpoints,{}),jitter:m({},g.jitter,{}),pointpos:m({},g.pointpos,{}),width:m({},g.width,{}),marker:g.marker,text:g.text,hovertext:g.hovertext,hovertemplate:g.hovertemplate,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:g.offsetgroup,alignmentgroup:g.alignmentgroup,selected:g.selected,unselected:g.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},{"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../box/attributes":673}],1088:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("../box/calc"),v=y("./helpers"),e=y("../../constants/numerical").BADNUM;function n(o,r,d){var c=r.max-r.min;if(!c)return o.bandwidth?o.bandwidth:0;if(o.bandwidth)return Math.max(o.bandwidth,c/1e4);var i=d.length,u=g.stdev(d,i-1,r.mean);return Math.max(function(f,s,h){return 1.059*Math.min(s,h/1.349)*Math.pow(f,-.2)}(i,u,r.q3-r.q1),c/100)}function t(o,r,d,c){var i,u=o.spanmode,f=o.span||[],s=[r.min,r.max],h=[r.min-2*c,r.max+2*c];function p(x){var l=f[x],w=d.type==="multicategory"?d.r2c(l):d.d2c(l,0,o[r.valLetter+"calendar"]);return w===e?h[x]:w}var a={type:"linear",range:i=u==="soft"?h:u==="hard"?s:[p(0),p(1)]};return m.setConvert(a),a.cleanRange(),i}ee.exports=function(o,r){var d=b(o,r);if(d[0].t.empty)return d;for(var c=o._fullLayout,i=m.getFromId(o,r[r.orientation==="h"?"xaxis":"yaxis"]),u=1/0,f=-1/0,s=0,h=0,p=0;p<d.length;p++){var a=d[p],x=a.pts.map(v.extractVal),l=a.bandwidth=n(r,a,x),w=a.span=t(r,a,i,l);if(a.min===a.max&&l===0)w=a.span=[a.min,a.max],a.density=[{v:1,t:w[0]}],a.bandwidth=l,s=Math.max(s,1);
1356else{var _=w[1]-w[0],T=Math.ceil(_/(l/3)),k=_/T;if(!isFinite(k)||!isFinite(T))return g.error("Something went wrong with computing the violin span"),d[0].t.empty=!0,d;var L=v.makeKDE(a,r,x);a.density=new Array(T);for(var A=0,I=w[0];I<w[1]+k/2;A++,I+=k){var P=L(I);a.density[A]={v:P,t:I},s=Math.max(s,P)}}h=Math.max(h,x.length),u=Math.min(u,w[0]),f=Math.max(f,w[1])}var S=m.findExtremes(i,[u,f],{padded:!0});if(r._extremes[i._id]=S,r.width)d[0].t.maxKDE=s;else{var E=c._violinScaleGroupStats,D=r.scalegroup,F=E[D];F?(F.maxKDE=Math.max(F.maxKDE,s),F.maxCount=Math.max(F.maxCount,h)):E[D]={maxKDE:s,maxCount:h}}return d[0].t.labels.kde=g._(o,"kde:"),d}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../box/calc":674,"./helpers":1091}],1089:[function(y,ee,te){var g=y("../box/cross_trace_calc").setPositionOffset,m=["v","h"];ee.exports=function(b,v){for(var e=b.calcdata,n=v.xaxis,t=v.yaxis,o=0;o<m.length;o++){for(var r=m[o],d=r==="h"?t:n,c=[],i=0;i<e.length;i++){var u=e[i],f=u[0].t,s=u[0].trace;s.visible!==!0||s.type!=="violin"||f.empty||s.orientation!==r||s.xaxis!==n._id||s.yaxis!==t._id||c.push(i)}g("violin",b,c,d)}}},{"../box/cross_trace_calc":675}],1090:[function(y,ee,te){var g=y("../../lib"),m=y("../../components/color"),b=y("../box/defaults"),v=y("./attributes");ee.exports=function(e,n,t,o){function r(_,T){return g.coerce(e,n,v,_,T)}function d(_,T){return g.coerce2(e,n,v,_,T)}if(b.handleSampleDefaults(e,n,r,o),n.visible!==!1){r("bandwidth"),r("side"),r("width")||(r("scalegroup",n.name),r("scalemode"));var c,i=r("span");Array.isArray(i)&&(c="manual"),r("spanmode",c);var u=r("line.color",(e.marker||{}).color||t),f=r("line.width"),s=r("fillcolor",m.addOpacity(n.line.color,.5));b.handlePointsDefaults(e,n,r,{prefix:""});var h=d("box.width"),p=d("box.fillcolor",s),a=d("box.line.color",u),x=d("box.line.width",f);r("box.visible",!!(h||p||a||x))||(n.box={visible:!1});var l=d("meanline.color",u),w=d("meanline.width",f);r("meanline.visible",!!(l||w))||(n.meanline={visible:!1})}}},{"../../components/color":366,"../../lib":503,"../box/defaults":676,"./attributes":1087}],1091:[function(y,ee,te){var g=y("../../lib"),m=function(b){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*b*b)};te.makeKDE=function(b,v,e){var n=e.length,t=m,o=b.bandwidth,r=1/(n*o);return function(d){for(var c=0,i=0;i<n;i++)c+=t((d-e[i])/o);return r*c}},te.getPositionOnKdePath=function(b,v,e){var n,t;v.orientation==="h"?(n="y",t="x"):(n="x",t="y");var o=g.findPointOnPath(b.path,e,t,{pathLength:b.pathLength}),r=b.posCenterPx,d=o[n];return[d,v.side==="both"?2*r-d:r]},te.getKdeValue=function(b,v,e){var n=b.pts.map(te.extractVal);return te.makeKDE(b,v,n)(e)/b.posDensityScale},te.extractVal=function(b){return b.v}},{"../../lib":503}],1092:[function(y,ee,te){var g=y("../../lib"),m=y("../../plots/cartesian/axes"),b=y("../box/hover"),v=y("./helpers");ee.exports=function(e,n,t,o,r){r||(r={});var d,c,i=r.hoverLayer,u=e.cd,f=u[0].trace,s=f.hoveron,h=s.indexOf("violins")!==-1,p=s.indexOf("kde")!==-1,a=[];if(h||p){var x=b.hoverOnBoxes(e,n,t,o);if(p&&x.length>0){var l,w,_,T,k,L=e.xa,A=e.ya;f.orientation==="h"?(k=n,l="y",_=A,w="x",T=L):(k=t,l="x",_=L,w="y",T=A);var I=u[e.index];if(k>=I.span[0]&&k<=I.span[1]){var P=g.extendFlat({},e),S=T.c2p(k,!0),E=v.getKdeValue(I,f,k),D=v.getPositionOnKdePath(I,f,S),F=_._offset,H=_._length;P[l+"0"]=D[0],P[l+"1"]=D[1],P[w+"0"]=P[w+"1"]=S,P[w+"Label"]=w+": "+m.hoverLabelText(T,k,f[w+"hoverformat"])+", "+u[0].t.labels.kde+" "+E.toFixed(3),P.spikeDistance=x[0].spikeDistance;var V=l+"Spike";P[V]=x[0][V],x[0].spikeDistance=void 0,x[0][V]=void 0,P.hovertemplate=!1,a.push(P),(c={stroke:e.color})[l+"1"]=g.constrain(F+D[0],F,F+H),c[l+"2"]=g.constrain(F+D[1],F,F+H),c[w+"1"]=c[w+"2"]=T._offset+S}}h&&(a=a.concat(x))}s.indexOf("points")!==-1&&(d=b.hoverOnPoints(e,n,t));var Z=i.selectAll(".violinline-"+f.uid).data(c?[0]:[]);return Z.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),Z.exit().remove(),Z.attr(c),o==="closest"?d?[d]:a:(d&&a.push(d),a)}},{"../../lib":503,"../../plots/cartesian/axes":554,"../box/hover":678,"./helpers":1091}],1093:[function(y,ee,te){ee.exports={attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults"),crossTraceDefaults:y("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc"),crossTraceCalc:y("./cross_trace_calc"),plot:y("./plot"),style:y("./style"),styleOnSelect:y("../scatter/style").styleOnSelect,hoverPoints:y("./hover"),selectPoints:y("../box/select"),moduleType:"trace",name:"violin",basePlotModule:y("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../box/defaults":676,"../box/select":683,"../scatter/style":950,"./attributes":1087,"./calc":1088,"./cross_trace_calc":1089,"./defaults":1090,"./hover":1092,"./layout_attributes":1094,"./layout_defaults":1095,"./plot":1096,"./style":1097}],1094:[function(y,ee,te){var g=y("../box/layout_attributes"),m=y("../../lib").extendFlat;ee.exports={violinmode:m({},g.boxmode,{}),violingap:m({},g.boxgap,{}),violingroupgap:m({},g.boxgroupgap,{})}},{"../../lib":503,"../box/layout_attributes":680}],1095:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes"),b=y("../box/layout_defaults");ee.exports=function(v,e,n){b._supply(v,e,n,function(t,o){return g.coerce(v,e,m,t,o)},"violin")}},{"../../lib":503,"../box/layout_defaults":681,"./layout_attributes":1094}],1096:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../components/drawing"),v=y("../box/plot"),e=y("../scatter/line_points"),n=y("./helpers");ee.exports=function(t,o,r,d){var c=t._fullLayout,i=o.xaxis,u=o.yaxis;function f(s){var h=e(s,{xaxis:i,yaxis:u,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return b.smoothopen(h[0],1)}m.makeTraceGroups(d,r,"trace violins").each(function(s){var h=g.select(this),p=s[0],a=p.t,x=p.trace;if(x.visible!==!0||a.empty)h.remove();else{var l=a.bPos,w=a.bdPos,_=o[a.valLetter+"axis"],T=o[a.posLetter+"axis"],k=x.side==="both",L=k||x.side==="positive",A=k||x.side==="negative",I=h.selectAll("path.violin").data(m.identity);I.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),I.exit().remove(),I.each(function(Z){var K,q,W,$,R,N,U,Q,j=g.select(this),X=Z.density,J=X.length,re=T.c2l(Z.pos+l,!0),ne=T.l2p(re);if(x.width)K=a.maxKDE/w;else{var se=c._violinScaleGroupStats[x.scalegroup];K=x.scalemode==="count"?se.maxKDE/w*(se.maxCount/Z.pts.length):se.maxKDE/w}if(L){for(U=new Array(J),R=0;R<J;R++)(Q=U[R]={})[a.posLetter]=re+X[R].v/K,Q[a.valLetter]=_.c2l(X[R].t,!0);q=f(U)}if(A){for(U=new Array(J),N=0,R=J-1;N<J;N++,R--)(Q=U[N]={})[a.posLetter]=re-X[R].v/K,Q[a.valLetter]=_.c2l(X[R].t,!0);
1356W=f(U)}if(k)$=q+"L"+W.substr(1)+"Z";else{var oe=[ne,_.c2p(X[0].t)],pe=[ne,_.c2p(X[J-1].t)];x.orientation==="h"&&(oe.reverse(),pe.reverse()),$=L?"M"+oe+"L"+q.substr(1)+"L"+pe:"M"+pe+"L"+W.substr(1)+"L"+oe}j.attr("d",$),Z.posCenterPx=ne,Z.posDensityScale=K*w,Z.path=j.node(),Z.pathLength=Z.path.getTotalLength()/(k?2:1)});var P,S,E,D=x.box,F=D.width,H=(D.line||{}).width;k?(P=w*F,S=0):L?(P=[0,w*F/2],S=H*{x:1,y:-1}[a.posLetter]):(P=[w*F/2,0],S=H*{x:-1,y:1}[a.posLetter]),v.plotBoxAndWhiskers(h,{pos:T,val:_},x,{bPos:l,bdPos:P,bPosPxOffset:S}),v.plotBoxMean(h,{pos:T,val:_},x,{bPos:l,bdPos:P,bPosPxOffset:S}),!x.box.visible&&x.meanline.visible&&(E=m.identity);var V=h.selectAll("path.meanline").data(E||[]);V.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect","non-scaling-stroke"),V.exit().remove(),V.each(function(Z){var K=_.c2p(Z.mean,!0),q=n.getPositionOnKdePath(Z,x,K);g.select(this).attr("d",x.orientation==="h"?"M"+K+","+q[0]+"V"+q[1]:"M"+q[0]+","+K+"H"+q[1])}),v.plotPoints(h,{x:i,y:u},x,a)}})}},{"../../components/drawing":388,"../../lib":503,"../box/plot":682,"../scatter/line_points":940,"./helpers":1091,"@plotly/d3":58}],1097:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/color"),b=y("../scatter/style").stylePoints;ee.exports=function(v){var e=g.select(v).selectAll("g.trace.violins");e.style("opacity",function(n){return n[0].trace.opacity}),e.each(function(n){var t=n[0].trace,o=g.select(this),r=t.box||{},d=r.line||{},c=t.meanline||{},i=c.width;o.selectAll("path.violin").style("stroke-width",t.line.width+"px").call(m.stroke,t.line.color).call(m.fill,t.fillcolor),o.selectAll("path.box").style("stroke-width",d.width+"px").call(m.stroke,d.color).call(m.fill,r.fillcolor);var u={"stroke-width":i+"px","stroke-dasharray":2*i+"px,"+i+"px"};o.selectAll("path.mean").style(u).call(m.stroke,c.color),o.selectAll("path.meanline").style(u).call(m.stroke,c.color),b(o,t,v)})}},{"../../components/color":366,"../scatter/style":950,"@plotly/d3":58}],1098:[function(y,ee,te){var g=y("../../components/colorscale/attributes"),m=y("../isosurface/attributes"),b=y("../surface/attributes"),v=y("../../plots/attributes"),e=y("../../lib/extend").extendFlat,n=y("../../plot_api/edit_types").overrideAll,t=ee.exports=n(e({x:m.x,y:m.y,z:m.z,value:m.value,isomin:m.isomin,isomax:m.isomax,surface:m.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:m.slices,caps:m.caps,text:m.text,hovertext:m.hovertext,xhoverformat:m.xhoverformat,yhoverformat:m.yhoverformat,zhoverformat:m.zhoverformat,valuehoverformat:m.valuehoverformat,hovertemplate:m.hovertemplate},g("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:m.colorbar,opacity:m.opacity,opacityscale:b.opacityscale,lightposition:m.lightposition,lighting:m.lighting,flatshading:m.flatshading,contour:m.contour,hoverinfo:e({},v.hoverinfo),showlegend:e({},v.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes",t.transforms=void 0},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../isosurface/attributes":862,"../surface/attributes":1057}],1099:[function(y,ee,te){var g=y("../../../stackgl_modules").gl_mesh3d,m=y("../../lib/gl_format_color").parseColorScale,b=y("../../lib/str2rgbarray"),v=y("../../components/colorscale").extractOpts,e=y("../../plots/gl3d/zip3"),n=y("../isosurface/convert").findNearestOnAxis,t=y("../isosurface/convert").generateIsoMeshes;function o(d,c,i){this.scene=d,this.uid=i,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var r=o.prototype;r.handlePick=function(d){if(d.object===this.mesh){var c=d.data.index,i=this.data._meshX[c],u=this.data._meshY[c],f=this.data._meshZ[c],s=this.data._Ys.length,h=this.data._Zs.length,p=n(i,this.data._Xs).id,a=n(u,this.data._Ys).id,x=n(f,this.data._Zs).id,l=d.index=x+h*a+h*s*p;d.traceCoordinate=[this.data._meshX[l],this.data._meshY[l],this.data._meshZ[l],this.data._value[l]];var w=this.data.hovertext||this.data.text;return Array.isArray(w)&&w[l]!==void 0?d.textLabel=w[l]:w&&(d.textLabel=w),!0}},r.update=function(d){var c=this.scene,i=c.fullSceneLayout;function u(h,p,a,x){return p.map(function(l){return h.d2l(l,0,x)*a})}this.data=t(d);var f={positions:e(u(i.xaxis,d._meshX,c.dataScale[0],d.xcalendar),u(i.yaxis,d._meshY,c.dataScale[1],d.ycalendar),u(i.zaxis,d._meshZ,c.dataScale[2],d.zcalendar)),cells:e(d._meshI,d._meshJ,d._meshK),lightPosition:[d.lightposition.x,d.lightposition.y,d.lightposition.z],ambient:d.lighting.ambient,diffuse:d.lighting.diffuse,specular:d.lighting.specular,roughness:d.lighting.roughness,fresnel:d.lighting.fresnel,vertexNormalsEpsilon:d.lighting.vertexnormalsepsilon,faceNormalsEpsilon:d.lighting.facenormalsepsilon,opacity:d.opacity,opacityscale:d.opacityscale,contourEnable:d.contour.show,contourColor:b(
1356d.contour.color).slice(0,3),contourWidth:d.contour.width,useFacetNormals:d.flatshading},s=v(d);f.vertexIntensity=d._meshIntensity,f.vertexIntensityBounds=[s.min,s.max],f.colormap=m(d),this.mesh.update(f)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},ee.exports=function(d,c){var i=d.glplot.gl,u=g({gl:i}),f=new o(d,u,c.uid);return u._trace=f,f.update(c),d.glplot.add(u),f}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609,"../isosurface/convert":864}],1100:[function(y,ee,te){var g=y("../../lib"),m=y("./attributes"),b=y("../isosurface/defaults").supplyIsoDefaults,v=y("../surface/defaults").opacityscaleDefaults;ee.exports=function(e,n,t,o){function r(d,c){return g.coerce(e,n,m,d,c)}b(e,n,t,o,r),v(e,n,o,r)}},{"../../lib":503,"../isosurface/defaults":865,"../surface/defaults":1060,"./attributes":1098}],1101:[function(y,ee,te){ee.exports={attributes:y("./attributes"),supplyDefaults:y("./defaults"),calc:y("../isosurface/calc"),colorbar:{min:"cmin",max:"cmax"},plot:y("./convert"),moduleType:"trace",name:"volume",basePlotModule:y("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"../isosurface/calc":863,"./attributes":1098,"./convert":1099,"./defaults":1100}],1102:[function(y,ee,te){var g=y("../bar/attributes"),m=y("../scatter/attributes").line,b=y("../../plots/attributes"),v=y("../../plots/cartesian/axis_format_attributes").axisHoverFormat,e=y("../../plots/template_attributes").hovertemplateAttrs,n=y("../../plots/template_attributes").texttemplateAttrs,t=y("./constants"),o=y("../../lib/extend").extendFlat,r=y("../../components/color");function d(c){return{marker:{color:o({},g.marker.color,{arrayOk:!1,editType:"style"}),line:{color:o({},g.marker.line.color,{arrayOk:!1,editType:"style"}),width:o({},g.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}ee.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:g.x,x0:g.x0,dx:g.dx,y:g.y,y0:g.y0,dy:g.dy,xperiod:g.xperiod,yperiod:g.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,xhoverformat:v("x"),yhoverformat:v("y"),hovertext:g.hovertext,hovertemplate:e({},{keys:t.eventDataKeys}),hoverinfo:o({},b.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:n({editType:"plot"},{keys:t.eventDataKeys.concat(["label"])}),text:g.text,textposition:g.textposition,insidetextanchor:g.insidetextanchor,textangle:g.textangle,textfont:g.textfont,insidetextfont:g.insidetextfont,outsidetextfont:g.outsidetextfont,constraintext:g.constraintext,cliponaxis:g.cliponaxis,orientation:g.orientation,offset:g.offset,width:g.width,increasing:d(),decreasing:d(),totals:d(),connector:{line:{color:o({},m.color,{dflt:r.defaultLine}),width:o({},m.width,{editType:"plot"}),dash:m.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:g.offsetgroup,alignmentgroup:g.alignmentgroup}},{"../../components/color":366,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":926,"./constants":1104}],1103:[function(y,ee,te){var g=y("../../plots/cartesian/axes"),m=y("../../plots/cartesian/align_period"),b=y("../../lib").mergeArray,v=y("../scatter/calc_selection"),e=y("../../constants/numerical").BADNUM;function n(o){return o==="a"||o==="absolute"}function t(o){return o==="t"||o==="total"}ee.exports=function(o,r){var d,c,i,u,f,s,h=g.getFromId(o,r.xaxis||"x"),p=g.getFromId(o,r.yaxis||"y");r.orientation==="h"?(d=h.makeCalcdata(r,"x"),i=p.makeCalcdata(r,"y"),u=m(r,p,"y",i),f=!!r.yperiodalignment,s="y"):(d=p.makeCalcdata(r,"y"),i=h.makeCalcdata(r,"x"),u=m(r,h,"x",i),f=!!r.xperiodalignment,s="x"),c=u.vals;for(var a,x=Math.min(c.length,d.length),l=new Array(x),w=0,_=!1,T=0;T<x;T++){var k=d[T]||0,L=!1;(d[T]!==e||t(r.measure[T])||n(r.measure[T]))&&T+1<x&&(d[T+1]!==e||t(r.measure[T+1])||n(r.measure[T+1]))&&(L=!0);var A=l[T]={i:T,p:c[T],s:k,rawS:k,cNext:L};n(r.measure[T])?(w=A.s,A.isSum=!0,A.dir="totals",A.s=w):t(r.measure[T])?(A.isSum=!0,A.dir="totals",A.s=w):(A.isSum=!1,A.dir=A.rawS<0?"decreasing":"increasing",a=A.s,A.s=w+a,w+=a),A.dir==="totals"&&(_=!0),f&&(l[T].orig_p=i[T],l[T][s+"End"]=u.ends[T],l[T][s+"Start"]=u.starts[T]),r.ids&&(A.id=String(r.ids[T])),A.v=(r.base||0)+w}return l.length&&(l[0].hasTotals=_),b(r.text,l,"tx"),b(r.hovertext,l,"htx"),v(l,r),l}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":928}],1104:[function(y,ee,te){ee.exports={eventDataKeys:["initial","delta","final"]}},{}],1105:[function(y,ee,te){var g=y("../bar/cross_trace_calc").setGroupPositions;ee.exports=function(m,b){var v,e,n=m._fullLayout,t=m._fullData,o=m.calcdata,r=b.xaxis,d=b.yaxis,c=[],i=[],u=[];for(e=0;e<t.length;e++){var f=t[e];f.visible===!0&&f.xaxis===r._id&&f.yaxis===d._id&&f.type==="waterfall"&&(v=o[e],f.orientation==="h"?u.push(v):i.push(v),c.push(v))}var s={mode:n.waterfallmode,norm:n.waterfallnorm,gap:n.waterfallgap,groupgap:n.waterfallgroupgap};for(g(m,r,d,i,s),g(m,d,r,u,s),e=0;e<c.length;e++){v=c[e];for(var h=0;h<v.length;h++){var p=v[h];p.isSum===!1&&(p.s0+=h===0?0:v[h-1].s),h+1<v.length&&(v[h].nextP0=v[h+1].p0,v[h].nextS0=v[h+1].s0)}}}},{"../bar/cross_trace_calc":651}],1106:[function(y,ee,te){var g=y("../../lib"),m=y("../bar/defaults").handleGroupingDefaults,b=y("../bar/defaults").handleText,v=y("../scatter/xy_defaults"),e=y("../scatter/period_defaults"),n=y("./attributes"),t=y("../../components/color"),o=y("../../constants/delta.js"),r=o.INCREASING.COLOR,d=o.DECREASING.COLOR;function c(i,u,f){i(u+".marker.color",f),i(u+".marker.line.color",t.defaultLine),i(u+".marker.line.width")}ee.exports={supplyDefaults:function(i,u,f,s){function h(a,x){return g.coerce(i,u,n,a,x)}if(v(i,u,s,h)){e(i,u,s,h),h("xhoverformat"),h("yhoverformat"),h("measure"),h("orientation",u.x&&!u.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate");var p=h("textposition");b(i,u,s,h,p,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u.textposition!=="none"&&(h("texttemplate"),u.texttemplate||h("textinfo")),c(h,"increasing",r),c(h,"decreasing",d),c(h,"totals","#4499FF"),h("connector.visible")&&(h("connector.mode"),h("connector.line.width")&&(h("connector.line.color"),h("connector.line.dash")))}else u.visible=!1},crossTraceDefaults:function(i,u){var f,s;function h(a){return g.coerce(s._input,s,n,a)}if(u.waterfallmode==="group")for(var p=0;p<i.length;p++)f=(s=i[p])._input,m(f,s,u,h)}}},{"../../components/color":366,"../../constants/delta.js":473,"../../lib":503,"../bar/defaults":652,"../scatter/period_defaults":946,"../scatter/xy_defaults":953,"./attributes":1102}],1107:[function(y,ee,te){ee.exports=function(g,m){return g.x="xVal"in m?m.xVal:m.x,g.y="yVal"in m?m.yVal:m.y,"initial"in m&&(g.initial=m.initial),"delta"in m&&(g.delta=m.delta),"final"in m&&(g.final=m.final),m.xa&&(g.xaxis=m.xa),m.ya&&(g.yaxis=m.ya),g}},{}],1108:[function(y,ee,te){var g=y("../../plots/cartesian/axes").hoverLabelText,m=y("../../components/color").opacity,b=y("../bar/hover").hoverOnBars,v=y("../../constants/delta.js"),e=v.INCREASING.SYMBOL,n=v.DECREASING.SYMBOL;ee.exports=function(t,o,r,d,c){var i=b(t,o,r,d,c);if(i){var u=i.cd,f=u[0].trace,s=f.orientation==="h",h=s?"x":"y",p=s?t.xa:t.ya,a=u[i.index],x=a.isSum?a.b+a.s:a.rawS;if(!a.isSum){i.initial=a.b+a.s-x,i.delta=x,i.final=i.initial+i.delta;var l=A(Math.abs(i.delta));i.deltaLabel=x<0?"("+l+")":l,i.finalLabel=A(i.final),i.initialLabel=A(i.initial)}var w=a.hi||f.hoverinfo,_=[];
1356if(w&&w!=="none"&&w!=="skip"){var T=w==="all",k=w.split("+"),L=function(I){return T||k.indexOf(I)!==-1};a.isSum||(!L("final")||L(s?"x":"y")||_.push(i.finalLabel),L("delta")&&(x<0?_.push(i.deltaLabel+" "+n):_.push(i.deltaLabel+" "+e)),L("initial")&&_.push("Initial: "+i.initialLabel))}return _.length&&(i.extraText=_.join("<br>")),i.color=function(I,P){var S=I[P.dir].marker,E=S.color,D=S.line.color,F=S.line.width;if(m(E))return E;if(m(D)&&F)return D}(f,a),[i]}function A(I){return g(p,I,f[h+"hoverformat"])}}},{"../../components/color":366,"../../constants/delta.js":473,"../../plots/cartesian/axes":554,"../bar/hover":655}],1109:[function(y,ee,te){ee.exports={attributes:y("./attributes"),layoutAttributes:y("./layout_attributes"),supplyDefaults:y("./defaults").supplyDefaults,crossTraceDefaults:y("./defaults").crossTraceDefaults,supplyLayoutDefaults:y("./layout_defaults"),calc:y("./calc"),crossTraceCalc:y("./cross_trace_calc"),plot:y("./plot"),style:y("./style").style,hoverPoints:y("./hover"),eventData:y("./event_data"),selectPoints:y("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:y("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":1102,"./calc":1103,"./cross_trace_calc":1105,"./defaults":1106,"./event_data":1107,"./hover":1108,"./layout_attributes":1110,"./layout_defaults":1111,"./plot":1112,"./style":1113}],1110:[function(y,ee,te){ee.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],1111:[function(y,ee,te){var g=y("../../lib"),m=y("./layout_attributes");ee.exports=function(b,v,e){var n=!1;function t(d,c){return g.coerce(b,v,m,d,c)}for(var o=0;o<e.length;o++){var r=e[o];if(r.visible&&r.type==="waterfall"){n=!0;break}}n&&(t("waterfallmode"),t("waterfallgap",.2),t("waterfallgroupgap"))}},{"../../lib":503,"./layout_attributes":1110}],1112:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../lib"),b=y("../../components/drawing"),v=y("../../constants/numerical").BADNUM,e=y("../bar/plot"),n=y("../bar/uniform_text").clearMinTextSize;ee.exports=function(t,o,r,d){var c=t._fullLayout;n("waterfall",c),e.plot(t,o,r,d,{mode:c.waterfallmode,norm:c.waterfallmode,gap:c.waterfallgap,groupgap:c.waterfallgroupgap}),function(i,u,f,s){var h=u.xaxis,p=u.yaxis;m.makeTraceGroups(s,f,"trace bars").each(function(a){var x=g.select(this),l=a[0].trace,w=m.ensureSingle(x,"g","lines");if(l.connector&&l.connector.visible){var _=l.orientation==="h",T=l.connector.mode,k=w.selectAll("g.line").data(m.identity);k.enter().append("g").classed("line",!0),k.exit().remove();var L=k.size();k.each(function(A,I){if(I===L-1||A.cNext){var P=function(F,H,V,Z){var K=[],q=[],W=Z?H:V,$=Z?V:H;return K[0]=W.c2p(F.s0,!0),q[0]=$.c2p(F.p0,!0),K[1]=W.c2p(F.s1,!0),q[1]=$.c2p(F.p1,!0),K[2]=W.c2p(F.nextS0,!0),q[2]=$.c2p(F.nextP0,!0),Z?[K,q]:[q,K]}(A,h,p,_),S=P[0],E=P[1],D="";S[0]!==v&&E[0]!==v&&S[1]!==v&&E[1]!==v&&(T==="spanning"&&!A.isSum&&I>0&&(D+=_?"M"+S[0]+","+E[1]+"V"+E[0]:"M"+S[1]+","+E[0]+"H"+S[0]),T!=="between"&&(A.isSum||I<L-1)&&(D+=_?"M"+S[1]+","+E[0]+"V"+E[1]:"M"+S[0]+","+E[1]+"H"+S[1]),S[2]!==v&&E[2]!==v&&(D+=_?"M"+S[1]+","+E[1]+"V"+E[2]:"M"+S[1]+","+E[1]+"H"+S[2])),D===""&&(D="M0,
13560Z"),m.ensureSingle(g.select(this),"path").attr("d",D).call(b.setClipUrl,u.layerClipId,i)}})}else w.remove()})}(t,o,r,d)}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../bar/plot":659,"../bar/uniform_text":664,"@plotly/d3":58}],1113:[function(y,ee,te){var g=y("@plotly/d3"),m=y("../../components/drawing"),b=y("../../components/color"),v=y("../../constants/interactions").DESELECTDIM,e=y("../bar/style"),n=y("../bar/uniform_text").resizeText,t=e.styleTextPoints;ee.exports={style:function(o,r,d){var c=d||g.select(o).selectAll("g.waterfalllayer").selectAll("g.trace");n(o,c,"waterfall"),c.style("opacity",function(i){return i[0].trace.opacity}),c.each(function(i){var u=g.select(this),f=i[0].trace;u.selectAll(".point > path").each(function(s){if(!s.isBlank){var h=f[s.dir].marker;g.select(this).call(b.fill,h.color).call(b.stroke,h.line.color).call(m.dashLine,h.line.dash,h.line.width).style("opacity",f.selectedpoints&&!s.selected?v:1)}}),t(u,f,o),u.selectAll(".lines").each(function(){var s=f.connector.line;m.lineGroupStyle(g.select(this).selectAll("path"),s.width,s.color,s.dash)})})}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],1114:[function(y,ee,te){var g=y("../plots/cartesian/axes"),m=y("../lib"),b=y("../plot_api/plot_schema"),v=y("./helpers").pointsAccessorFunction,e=y("../constants/numerical").BADNUM;te.moduleType="transform",te.name="aggregate";var n=te.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},t=n.aggregations;function o(i,u,f,s){if(s.enabled){for(var h=s.target,p=m.nestedProperty(u,h),a=p.get(),x=function(_,T){var k=_.func,L=T.d2c,A=T.c2d;switch(k){case"count":return r;case"first":return d;case"last":return c;case"sum":return function(I,P){for(var S=0,E=0;E<P.length;E++){var D=L(I[P[E]]);D!==e&&(S+=D)}return A(S)};case"avg":return function(I,P){for(var S=0,E=0,D=0;D<P.length;D++){var F=L(I[P[D]]);F!==e&&(S+=F,E++)}return E?A(S/E):e};case"min":return function(I,P){for(var S=1/0,E=0;E<P.length;E++){var D=L(I[P[E]]);D!==e&&(S=Math.min(S,D))}return S===1/0?e:A(S)};case"max":return function(I,P){for(var S=-1/0,E=0;E<P.length;E++){var D=L(I[P[E]]);D!==e&&(S=Math.max(S,D))}return S===-1/0?e:A(S)};case"range":return function(I,P){for(var S=1/0,E=-1/0,D=0;D<P.length;D++){var F=L(I[P[D]]);F!==e&&(S=Math.min(S,F),E=Math.max(E,F))}return E===-1/0||S===1/0?e:A(E-S)};case"change":return function(I,P){var S=L(I[P[0]]),E=L(I[P[P.length-1]]);return S===e||E===e?e:A(E-S)};case"median":return function(I,P){for(var S=[],E=0;E<P.length;E++){var D=L(I[P[E]]);D!==e&&S.push(D)}if(!S.length)return e;S.sort(m.sorterAsc);var F=(S.length-1)/2;return A((S[Math.floor(F)]+S[Math.ceil(F)])/2)};case"mode":return function(I,P){for(var S={},E=0,D=e,F=0;F<P.length;F++){var H=L(I[P[F]]);if(H!==e){var V=S[H]=(S[H]||0)+1;V>E&&(E=V,D=H)}}return E?A(D):e};case"rms":return function(I,P){for(var S=0,E=0,D=0;D<P.length;D++){var F=L(I[P[D]]);F!==e&&(S+=F*F,E++)}return E?A(Math.sqrt(S/E)):e};case"stddev":return function(I,P){var S,E=0,D=0,F=1,H=e;for(S=0;S<P.length&&H===e;S++)H=L(I[P[S]]);if(H===e)return e;for(;S<P.length;S++){var V=L(I[P[S]]);if(V!==e){var Z=V-H;E+=Z,D+=Z*Z,F++}}var K=_.funcmode==="sample"?F-1:F;return K?Math.sqrt((D-E*E/F)/K):0}}}(s,g.getDataConversions(i,u,h,a)),l=new Array(f.length),w=0;w<f.length;w++)l[w]=x(a,f[w]);p.set(l),s.func==="count"&&m.pushUnique(u._arrayAttrs,h)}}function r(i,u){return u.length}function d(i,u){return i[u[0]]}function c(i,u){return i[u[u.length-1]]}te.supplyDefaults=function(i,u){var f,s={};function h(A,I){return m.coerce(i,s,n,A,I)}if(!h("enabled"))return s;var p=b.findArrayAttributes(u),a={};for(f=0;f<p.length;f++)a[p[f]]=1;var x=h("groups");
1356if(!Array.isArray(x)){if(!a[x])return s.enabled=!1,s;a[x]=0}var l,w=i.aggregations||[],_=s.aggregations=new Array(w.length);function T(A,I){return m.coerce(w[f],l,t,A,I)}for(f=0;f<w.length;f++){l={_index:f};var k=T("target"),L=T("func");T("enabled")&&k&&(a[k]||L==="count"&&a[k]===void 0)?(L==="stddev"&&T("funcmode"),a[k]=0,_[f]=l):_[f]={enabled:!1,_index:f}}for(f=0;f<p.length;f++)a[p[f]]&&_.push({target:p[f],func:t.func.dflt,enabled:!0,_index:-1});return s},te.calcTransform=function(i,u,f){if(f.enabled){var s=f.groups,h=m.getTargetArray(u,{target:s});if(h){var p,a,x,l,w={},_={},T=[],k=v(u.transforms,f),L=h.length;for(u._length&&(L=Math.min(L,u._length)),p=0;p<L;p++)(x=w[a=h[p]])===void 0?(w[a]=T.length,l=[p],T.push(l),_[w[a]]=k(p)):(T[x].push(p),_[w[a]]=(_[w[a]]||[]).concat(k(p)));f._indexToPoints=_;var A=f.aggregations;for(p=0;p<A.length;p++)o(i,u,T,A[p]);typeof s=="string"&&o(i,u,T,{target:s,func:"first",enabled:!0}),u._length=T.length}}}},{"../constants/numerical":479,"../lib":503,"../plot_api/plot_schema":542,"../plots/cartesian/axes":554,"./helpers":1117}],1115:[function(y,ee,te){var g=y("../lib"),m=y("../registry"),b=y("../plots/cartesian/axes"),v=y("./helpers").pointsAccessorFunction,e=y("../constants/filter_ops"),n=e.COMPARISON_OPS,t=e.INTERVAL_OPS,o=e.SET_OPS;te.moduleType="transform",te.name="filter",te.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(n).concat(t).concat(o),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},te.supplyDefaults=function(r){var d={};function c(f,s){return g.coerce(r,d,te.attributes,f,s)}if(c("enabled")){var i=c("target");if(g.isArrayOrTypedArray(i)&&i.length===0)return d.enabled=!1,d;c("preservegaps"),c("operation"),c("value");var u=m.getComponentMethod("calendars","handleDefaults");u(r,d,"valuecalendar",null),u(r,d,"targetcalendar",null)}return d},te.calcTransform=function(r,d,c){if(c.enabled){var i=g.getTargetArray(d,c);if(i){var u=c.target,f=i.length;d._length&&(f=Math.min(f,d._length));var s=c.targetcalendar,h=d._arrayAttrs,p=c.preservegaps;if(typeof u=="string"){var a=g.nestedProperty(d,u+"calendar").get();a&&(s=a)}var x,l,w=function(P,S,E){var D=P.operation,F=P.value,H=Array.isArray(F);function V(W){return W.indexOf(D)!==-1}var Z,K=function(W){return S(W,0,P.valuecalendar)},q=function(W){return S(W,0,E)};switch(V(n)?Z=K(H?F[0]:F):V(t)?Z=H?[K(F[0]),K(F[1])]:[K(F),K(F)]:V(o)&&(Z=H?F.map(K):[K(F)]),D){case"=":return function(W){return q(W)===Z};case"!=":return function(W){return q(W)!==Z};case"<":return function(W){return q(W)<Z};case"<=":return function(W){return q(W)<=Z};case">":return function(W){return q(W)>Z};case">=":return function(W){return q(W)>=Z};case"[]":return function(W){var $=q(W);return $>=Z[0]&&$<=Z[1]};case"()":return function(W){var $=q(W);return $>Z[0]&&$<Z[1]};case"[)":return function(W){var $=q(W);return $>=Z[0]&&$<Z[1]};case"(]":return function(W){var $=q(W);return $>Z[0]&&$<=Z[1]};case"][":return function(W){var $=q(W);return $<=Z[0]||$>=Z[1]};case")(":return function(W){var $=q(W);return $<Z[0]||$>Z[1]};case"](":return function(W){var $=q(W);return $<=Z[0]||$>Z[1]};case")[":return function(W){var $=q(W);return $<Z[0]||$>=Z[1]};case"{}":return function(W){return Z.indexOf(q(W))!==-1};case"}{":return function(W){return Z.indexOf(q(W))===-1}}}(c,b.getDataToCoordFunc(r,d,u,i),s),_={},T={},k=0;p?(x=function(P){_[P.astr]=g.extendDeep([],P.get()),P.set(new Array(f))},l=function(P,S){var E=_[P.astr][S];P.get()[S]=E}):(x=function(P){_[P.astr]=g.extendDeep([],P.get()),P.set([])},l=function(P,S){var E=_[P.astr][S];P.get().push(E)}),I(x);for(var L=v(d.transforms,c),A=0;A<f;A++)w(i[A])?(I(l,A),T[k++]=L(A)):p&&k++;c._indexToPoints=T,d._length=k}}function I(P,S){for(var E=0;E<h.length;E++)P(g.nestedProperty(d,h[E]),S)}}},{"../constants/filter_ops":475,"../lib":503,"../plots/cartesian/axes":554,"../registry":638,"./helpers":1117}],1116:[function(y,ee,te){var g=y("../lib"),m=y("../plot_api/plot_schema"),b=y("../plots/plots"),v=y("./helpers").pointsAccessorFunction;function e(n,t){var o,r,d,c,i,u,f,s,h,p,a=t.transform,x=t.transformIndex,l=n.transforms[x].groups,w=v(n.transforms,a);if(!g.isArrayOrTypedArray(l)||l.length===0)return[n];var _=g.filterUnique(l),T=new Array(_.length),k=l.length,L=m.findArrayAttributes(n),A=a.styles||[],I={};for(o=0;o<A.length;o++)I[A[o].target]=A[o].value;a.styles&&(p=g.keyedContainer(a,"styles","target","value.name"));var P={},S={};for(o=0;o<_.length;o++){P[u=_[o]]=o,S[u]=0,(f=T[o]=g.extendDeepNoArrays({},n))._group=u,f.transforms[x]._indexToPoints={};var E=null;for(p&&(E=p.get(u)),f.name=E||E===""?E:g.templateString(a.nameformat,{trace:n.name,group:u}),s=f.transforms,f.transforms=[],r=0;r<s.length;r++)f.transforms[r]=g.extendDeepNoArrays({},s[r]);for(r=0;r<L.length;r++)g.nestedProperty(f,L[r]).set([])}for(d=0;d<L.length;d++){for(c=L[d],r=0,h=[];r<_.length;r++)h[r]=g.nestedProperty(T[r],c).get();for(i=g.nestedProperty(n,c).get(),r=0;r<k;r++)h[P[l[r]]].push(i[r])}for(r=0;r<k;r++)(f=T[P[l[r]]]).transforms[x]._indexToPoints[S[l[r]]]=w(r),S[l[r]]++;for(o=0;o<_.length;o++)u=_[o],f=T[o],b.clearExpandedTraceDefaultColors(f),f=g.extendDeepNoArrays(f,I[u]||{});return T}te.moduleType="transform",te.name="groupby",te.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},te.supplyDefaults=function(n,t,o){var r,d={};function c(h,p){return g.coerce(n,d,te.attributes,h,p)}if(!c("enabled"))return d;c("groups"),c("nameformat",o._dataLength>1?"%{group} (%{trace})":"%{group}");var i=n.styles,u=d.styles=[];if(i)for(r=0;r<i.length;r++){var f=u[r]={};g.coerce(i[r],u[r],te.attributes.styles,"target");var s=g.coerce(i[r],u[r],te.attributes.styles,"value");g.isPlainObject(s)?f.value=g.extendDeep({},s):s&&delete f.value}return d},te.transform=function(n,t){var o,r,d,c=[];for(r=0;r<n.length;r++)for(o=e(n[r],t),d=0;d<o.length;d++)c.push(o[d]);return c}},{"../lib":503,"../plot_api/plot_schema":542,"../plots/plots":619,"./helpers":1117}],1117:[function(y,ee,te){te.pointsAccessorFunction=function(g,m){for(var b,v,e=0;e<g.length&&(b=g[e])!==m;e++)b._indexToPoints&&b.enabled!==!1&&(v=b._indexToPoints);return v?function(n){return v[n]}:function(n){return[n]}}},{}],1118:[function(y,ee,te){var g=y("../lib"),m=y("../plots/cartesian/axes"),b=y("./helpers").pointsAccessorFunction,v=y("../constants/numerical").BADNUM;te.moduleType="transform",te.name="sort",te.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},te.supplyDefaults=function(e){var n={};function t(o,r){return g.coerce(e,n,te.attributes,o,r)}return t("enabled")&&(t("target"),t("order")),n},te.calcTransform=function(e,n,t){if(t.enabled){var o=g.getTargetArray(n,t);if(o){var r=t.target,d=o.length;n._length&&(d=Math.min(d,n._length));var c,i,u=n._arrayAttrs,f=function(l,w,_,T){var k,L=new Array(T),A=new Array(T);for(k=0;k<T;k++)L[k]={v:w[k],i:k};for(L.sort(function(I,P){switch(I.order){case"ascending":return function(S,E){var D=P(S.v),F=P(E.v);return D===v?1:F===v?-1:D-F};
1356case"descending":return function(S,E){var D=P(S.v),F=P(E.v);return D===v?1:F===v?-1:F-D}}}(l,_)),k=0;k<T;k++)A[k]=L[k].i;return A}(t,o,m.getDataToCoordFunc(e,n,r,o),d),s=b(n.transforms,t),h={};for(c=0;c<u.length;c++){var p=g.nestedProperty(n,u[c]),a=p.get(),x=new Array(d);for(i=0;i<d;i++)x[i]=a[f[i]];p.set(x)}for(i=0;i<d;i++)h[i]=s(f[i]);t._indexToPoints=h,n._length=d}}}},{"../constants/numerical":479,"../lib":503,"../plots/cartesian/axes":554,"./helpers":1117}],1119:[function(y,ee,te){te.version="2.10.1"},{}],1120:[function(y,ee,te){(function(g){(function(){(function(m){typeof te=="object"&&ee!==void 0?ee.exports=m():(typeof window<"u"?window:g!==void 0?g:typeof self<"u"?self:this).stackgl=m()})(function(){return function m(b,v,e){function n(r,d){if(!v[r]){if(!b[r]){var c=typeof y=="function"&&y;if(!d&&c)return c(r,!0);if(t)return t(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var u=v[r]={exports:{}};b[r][0].call(u.exports,function(f){return n(b[r][1][f]||f)},u,u.exports,m,b,v,e)}return v[r].exports}for(var t=typeof y=="function"&&y,o=0;o<e.length;o++)n(e[o]);return n}({1:[function(m,b,v){v.byteLength=function(u){var f=c(u),s=f[0],h=f[1];return 3*(s+h)/4-h},v.toByteArray=function(u){var f,s,h=c(u),p=h[0],a=h[1],x=new t(function(_,T,k){return 3*(T+k)/4-k}(0,p,a)),l=0,w=a>0?p-4:p;for(s=0;s<w;
1356s+=4)f=n[u.charCodeAt(s)]<<18|n[u.charCodeAt(s+1)]<<12|n[u.charCodeAt(s+2)]<<6|n[u.charCodeAt(s+3)],x[l++]=f>>16&255,x[l++]=f>>8&255,x[l++]=255&f;return a===2&&(f=n[u.charCodeAt(s)]<<2|n[u.charCodeAt(s+1)]>>4,x[l++]=255&f),a===1&&(f=n[u.charCodeAt(s)]<<10|n[u.charCodeAt(s+1)]<<4|n[u.charCodeAt(s+2)]>>2,x[l++]=f>>8&255,x[l++]=255&f),x},v.fromByteArray=function(u){for(var f,s=u.length,h=s%3,p=[],a=0,x=s-h;a<x;a+=16383)p.push(i(u,a,a+16383>x?x:a+16383));return h===1?(f=u[s-1],p.push(e[f>>2]+e[f<<4&63]+"==")):h===2&&(f=(u[s-2]<<8)+u[s-1],p.push(e[f>>10]+e[f>>4&63]+e[f<<2&63]+"=")),p.join("")};for(var e=[],n=[],t=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,d=o.length;r<d;++r)e[r]=o[r],n[o.charCodeAt(r)]=r;function c(u){var f=u.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=u.indexOf("=");return s===-1&&(s=f),[s,s===f?0:4-s%4]}function i(u,f,s){for(var h,p,a=[],x=f;x<s;x+=3)h=(u[x]<<16&16711680)+(u[x+1]<<8&65280)+(255&u[x+2]),a.push(e[(p=h)>>18&63]+e[p>>12&63]+e[p>>6&63]+e[63&p]);return a.join("")}n[45]=62,n[95]=63},{}],2:[function(m,b,v){},{}],3:[function(m,b,v){(function(e){(function(){var n=m("base64-js"),t=m("ieee754");v.Buffer=r,v.SlowBuffer=function(j){return+j!=j&&(j=0),r.alloc(+j)},v.INSPECT_MAX_BYTES=50;function o(j){if(j>2147483647)throw new RangeError('The value "'+j+'" is invalid for option "size"');var X=new Uint8Array(j);return X.__proto__=r.prototype,X}function r(j,X,J){if(typeof j=="number"){if(typeof X=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(j)}return d(j,X,J)}function d(j,X,J){if(typeof j=="string")return function(se,oe){if(typeof oe=="string"&&oe!==""||(oe="utf8"),!r.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);var pe=0|s(se,oe),ce=o(pe),de=ce.write(se,oe);return de!==pe&&(ce=ce.slice(0,de)),ce}(j,X);if(ArrayBuffer.isView(j))return u(j);if(j==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(U(j,ArrayBuffer)||j&&U(j.buffer,ArrayBuffer))return function(se,oe,pe){if(oe<0||se.byteLength<oe)throw new RangeError('"offset" is outside of buffer bounds');if(se.byteLength<oe+(pe||0))throw new RangeError('"length" is outside of buffer bounds');var ce;return ce=oe===void 0&&pe===void 0?new Uint8Array(se):pe===void 0?new Uint8Array(se,oe):new Uint8Array(se,oe,pe),ce.__proto__=r.prototype,ce}(j,X,J);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var re=j.valueOf&&j.valueOf();if(re!=null&&re!==j)return r.from(re,X,J);var ne=function(se){if(r.isBuffer(se)){var oe=0|f(se.length),pe=o(oe);return pe.length===0||se.copy(pe,0,0,oe),pe}if(se.length!==void 0)return typeof se.length!="number"||Q(se.length)?o(0):u(se);if(se.type==="Buffer"&&Array.isArray(se.data))return u(se.data)}(j);if(ne)return ne;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return r.from(j[Symbol.toPrimitive]("string"),X,J);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}function c(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function i(j){return c(j),o(j<0?0:0|f(j))}function u(j){for(var X=j.length<0?0:0|f(j.length),J=o(X),re=0;re<X;re+=1)J[re]=255&j[re];return J}function f(j){if(j>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|j}function s(j,X){if(r.isBuffer(j))return j.length;if(ArrayBuffer.isView(j)||U(j,ArrayBuffer))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);var J=j.length,re=arguments.length>2&&arguments[2]===!0;if(!re&&J===0)return 0;for(var ne=!1;;)switch(X){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":return $(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*J;case"hex":return J>>>1;case"base64":return R(j).length;default:if(ne)return re?-1:$(j).length;X=(""+X).toLowerCase(),ne=!0}}function h(j,X,J){var re=!1;if((X===void 0||X<0)&&(X=0),X>this.length||((J===void 0||J>this.length)&&(J=this.length),J<=0)||(J>>>=0)<=(X>>>=0))return"";for(j||(j="utf8");;)switch(j){case"hex":return E(this,X,J);case"utf8":case"utf-8":return I(this,X,J);case"ascii":return P(this,X,J);case"latin1":case"binary":return S(this,X,J);case"base64":return A(this,X,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,X,J);default:if(re)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),re=!0}}function p(j,X,J){var re=j[X];j[X]=j[J],j[J]=re}function a(j,X,J,re,ne){if(j.length===0)return-1;if(typeof J=="string"?(re=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),Q(J=+J)&&(J=ne?0:j.length-1),J<0&&(J=j.length+J),J>=j.length){if(ne)return-1;J=j.length-1}else if(J<0){if(!ne)return-1;J=0}if(typeof X=="string"&&(X=r.from(X,re)),r.isBuffer(X))return X.length===0?-1:x(j,X,J,re,ne);
1356if(typeof X=="number")return X&=255,typeof Uint8Array.prototype.indexOf=="function"?ne?Uint8Array.prototype.indexOf.call(j,X,J):Uint8Array.prototype.lastIndexOf.call(j,X,J):x(j,[X],J,re,ne);throw new TypeError("val must be string, number or Buffer")}function x(j,X,J,re,ne){var se,oe=1,pe=j.length,ce=X.length;if(re!==void 0&&((re=String(re).toLowerCase())==="ucs2"||re==="ucs-2"||re==="utf16le"||re==="utf-16le")){if(j.length<2||X.length<2)return-1;oe=2,pe/=2,ce/=2,J/=2}function de(Ee,fe){return oe===1?Ee[fe]:Ee.readUInt16BE(fe*oe)}if(ne){var xe=-1;for(se=J;se<pe;se++)if(de(j,se)===de(X,xe===-1?0:se-xe)){if(xe===-1&&(xe=se),se-xe+1===ce)return xe*oe}else xe!==-1&&(se-=se-xe),xe=-1}else for(J+ce>pe&&(J=pe-ce),se=J;se>=0;se--){for(var we=!0,be=0;be<ce;be++)if(de(j,se+be)!==de(X,be)){we=!1;break}if(we)return se}return-1}function l(j,X,J,re){J=Number(J)||0;var ne=j.length-J;re?(re=Number(re))>ne&&(re=ne):re=ne;var se=X.length;re>se/2&&(re=se/2);for(var oe=0;oe<re;++oe){var pe=parseInt(X.substr(2*oe,2),16);if(Q(pe))return oe;j[J+oe]=pe}return oe}function w(j,X,J,re){return N($(X,j.length-J),j,J,re)}function _(j,X,J,re){return N(function(ne){for(var se=[],oe=0;oe<ne.length;++oe)se.push(255&ne.charCodeAt(oe));return se}(X),j,J,re)}function T(j,X,J,re){return _(j,X,J,re)}function k(j,X,J,re){return N(R(X),j,J,re)}function L(j,X,J,re){return N(function(ne,se){for(var oe,pe,ce,de=[],xe=0;xe<ne.length&&!((se-=2)<0);++xe)oe=ne.charCodeAt(xe),pe=oe>>8,ce=oe%256,de.push(ce),de.push(pe);return de}(X,j.length-J),j,J,re)}function A(j,X,J){return X===0&&J===j.length?n.fromByteArray(j):n.fromByteArray(j.slice(X,J))}function I(j,X,J){J=Math.min(j.length,J);for(var re=[],ne=X;ne<J;){var se,oe,pe,ce,de=j[ne],xe=null,we=de>239?4:de>223?3:de>191?2:1;if(ne+we<=J)switch(we){case 1:de<128&&(xe=de);break;case 2:(192&(se=j[ne+1]))==128&&(ce=(31&de)<<6|63&se)>127&&(xe=ce);break;case 3:se=j[ne+1],oe=j[ne+2],(192&se)==128&&(192&oe)==128&&(ce=(15&de)<<12|(63&se)<<6|63&oe)>2047&&(ce<55296||ce>57343)&&(xe=ce);break;case 4:se=j[ne+1],oe=j[ne+2],pe=j[ne+3],(192&se)==128&&(192&oe)==128&&(192&pe)==128&&(ce=(15&de)<<18|(63&se)<<12|(63&oe)<<6|63&pe)>65535&&ce<1114112&&(xe=ce)}xe===null?(xe=65533,we=1):xe>65535&&(xe-=65536,re.push(xe>>>10&1023|55296),xe=56320|1023&xe),re.push(xe),ne+=we}return function(be){var Ee=be.length;if(Ee<=4096)return String.fromCharCode.apply(String,be);for(var fe="",me=0;me<Ee;)fe+=String.fromCharCode.apply(String,be.slice(me,me+=4096));return fe}(re)}v.kMaxLength=2147483647,r.TYPED_ARRAY_SUPPORT=function(){try{var j=new Uint8Array(1);return j.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},j.foo()===42}catch{return!1}}(),r.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192,r.from=function(j,X,J){return d(j,X,J)},r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,r.alloc=function(j,X,J){return function(re,ne,se){return c(re),re<=0?o(re):ne!==void 0?typeof se=="string"?o(re).fill(ne,se):o(re).fill(ne):o(re)}(j,X,J)},r.allocUnsafe=function(j){return i(j)},r.allocUnsafeSlow=function(j){return i(j)},r.isBuffer=function(j){return j!=null&&j._isBuffer===!0&&j!==r.prototype},r.compare=function(j,X){if(U(j,Uint8Array)&&(j=r.from(j,j.offset,j.byteLength)),U(X,Uint8Array)&&(X=r.from(X,X.offset,X.byteLength)),!r.isBuffer(j)||!r.isBuffer(X))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(j===X)return 0;for(var J=j.length,re=X.length,ne=0,se=Math.min(J,re);ne<se;++ne)if(j[ne]!==X[ne]){J=j[ne],re=X[ne];break}return J<re?-1:re<J?1:0},r.isEncoding=function(j){switch(String(j).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(j,X){if(!Array.isArray(j))throw new TypeError('"list" argument must be an Array of Buffers');if(j.length===0)return r.alloc(0);var J;if(X===void 0)for(X=0,J=0;J<j.length;++J)X+=j[J].length;var re=r.allocUnsafe(X),ne=0;for(J=0;J<j.length;++J){var se=j[J];if(U(se,Uint8Array)&&(se=r.from(se)),!r.isBuffer(se))throw new TypeError('"list" argument must be an Array of Buffers');se.copy(re,ne),ne+=se.length}return re},r.byteLength=s,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var j=this.length;if(j%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<j;X+=2)p(this,X,X+1);return this},r.prototype.swap32=function(){var j=this.length;if(j%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<j;X+=4)p(this,X,X+3),p(this,X+1,X+2);return this},r.prototype.swap64=function(){var j=this.length;if(j%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<j;X+=8)p(this,X,X+7),p(this,X+1,X+6),p(this,X+2,X+5),p(this,X+3,X+4);return this},r.prototype.toString=function(){var j=this.length;return j===0?"":arguments.length===0?I(this,0,j):h.apply(this,arguments)}
vendor: 9,721 bytes, line 1356
1356,r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(j){if(!r.isBuffer(j))throw new TypeError("Argument must be a Buffer");return this===j||r.compare(this,j)===0},r.prototype.inspect=function(){var j="",X=v.INSPECT_MAX_BYTES;return j=this.toString("hex",0,X).replace(/(.{2})/g,"$1 ").trim(),this.length>X&&(j+=" ... "),"<Buffer "+j+">"},r.prototype.compare=function(j,X,J,re,ne){if(U(j,Uint8Array)&&(j=r.from(j,j.offset,j.byteLength)),!r.isBuffer(j))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof j);if(X===void 0&&(X=0),J===void 0&&(J=j?j.length:0),re===void 0&&(re=0),ne===void 0&&(ne=this.length),X<0||J>j.length||re<0||ne>this.length)throw new RangeError("out of range index");if(re>=ne&&X>=J)return 0;if(re>=ne)return-1;if(X>=J)return 1;if(this===j)return 0;for(var se=(ne>>>=0)-(re>>>=0),oe=(J>>>=0)-(X>>>=0),pe=Math.min(se,oe),ce=this.slice(re,ne),de=j.slice(X,J),xe=0;xe<pe;++xe)if(ce[xe]!==de[xe]){se=ce[xe],oe=de[xe];break}return se<oe?-1:oe<se?1:0},r.prototype.includes=function(j,X,J){return this.indexOf(j,X,J)!==-1},r.prototype.indexOf=function(j,X,J){return a(this,j,X,J,!0)},r.prototype.lastIndexOf=function(j,X,J){return a(this,j,X,J,!1)},r.prototype.write=function(j,X,J,re){if(X===void 0)re="utf8",J=this.length,X=0;else if(J===void 0&&typeof X=="string")re=X,J=this.length,X=0;else{if(!isFinite(X))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");X>>>=0,isFinite(J)?(J>>>=0,re===void 0&&(re="utf8")):(re=J,J=void 0)}var ne=this.length-X;if((J===void 0||J>ne)&&(J=ne),j.length>0&&(J<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var se=!1;;)switch(re){case"hex":return l(this,j,X,J);case"utf8":case"utf-8":return w(this,j,X,J);case"ascii":return _(this,j,X,J);case"latin1":case"binary":return T(this,j,X,J);case"base64":return k(this,j,X,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,j,X,J);default:if(se)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),se=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(j,X,J){var re="";J=Math.min(j.length,J);for(var ne=X;ne<J;++ne)re+=String.fromCharCode(127&j[ne]);return re}function S(j,X,J){var re="";J=Math.min(j.length,J);for(var ne=X;ne<J;++ne)re+=String.fromCharCode(j[ne]);return re}function E(j,X,J){var re=j.length;(!X||X<0)&&(X=0),(!J||J<0||J>re)&&(J=re);for(var ne="",se=X;se<J;++se)ne+=W(j[se]);return ne}function D(j,X,J){for(var re=j.slice(X,J),ne="",se=0;se<re.length;se+=2)ne+=String.fromCharCode(re[se]+256*re[se+1]);return ne}function F(j,X,J){if(j%1!=0||j<0)throw new RangeError("offset is not uint");if(j+X>J)throw new RangeError("Trying to access beyond buffer length")}function H(j,X,J,re,ne,se){if(!r.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(X>ne||X<se)throw new RangeError('"value" argument is out of bounds');if(J+re>j.length)throw new RangeError("Index out of range")}function V(j,X,J,re,ne,se){if(J+re>j.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function Z(j,X,J,re,ne){return X=+X,J>>>=0,ne||V(j,0,J,4),t.write(j,X,J,re,23,4),J+4}function K(j,X,J,re,ne){return X=+X,J>>>=0,ne||V(j,0,J,8),t.write(j,X,J,re,52,8),J+8}r.prototype.slice=function(j,X){var J=this.length;(j=~~j)<0?(j+=J)<0&&(j=0):j>J&&(j=J),(X=X===void 0?J:~~X)<0?(X+=J)<0&&(X=0):X>J&&(X=J),X<j&&(X=j);var re=this.subarray(j,X);return re.__proto__=r.prototype,re},r.prototype.readUIntLE=function(j,X,J){j>>>=0,X>>>=0,J||F(j,X,this.length);for(var re=this[j],ne=1,se=0;++se<X&&(ne*=256);)re+=this[j+se]*ne;return re},r.prototype.readUIntBE=function(j,X,J){j>>>=0,X>>>=0,J||F(j,X,this.length);for(var re=this[j+--X],ne=1;X>0&&(ne*=256);)re+=this[j+--X]*ne;return re},r.prototype.readUInt8=function(j,X){return j>>>=0,X||F(j,1,this.length),this[j]},r.prototype.readUInt16LE=function(j,X){return j>>>=0,X||F(j,2,this.length),this[j]|this[j+1]<<8},r.prototype.readUInt16BE=function(j,X){return j>>>=0,X||F(j,2,this.length),this[j]<<8|this[j+1]},r.prototype.readUInt32LE=function(j,X){return j>>>=0,X||F(j,4,this.length),(this[j]|this[j+1]<<8|this[j+2]<<16)+16777216*this[j+3]},r.prototype.readUInt32BE=function(j,X){return j>>>=0,X||F(j,4,this.length),16777216*this[j]+(this[j+1]<<16|this[j+2]<<8|this[j+3])},r.prototype.readIntLE=function(j,X,J){j>>>=0,X>>>=0,J||F(j,X,this.length);for(var re=this[j],ne=1,se=0;++se<X&&(ne*=256);)re+=this[j+se]*ne;return re>=(ne*=128)&&(re-=Math.pow(2,8*X)),re},r.prototype.readIntBE=function(j,X,J){j>>>=0,X>>>=0,J||F(j,X,this.length);for(var re=X,ne=1,se=this[j+--re];re>0&&(ne*=256);)se+=this[j+--re]*ne;return se>=(ne*=128)&&(se-=Math.pow(2,8*X)),se},r.prototype.readInt8=function(j,X){return j>>>=0,X||F(j,1,this.length),128&this[j]?-1*(255-this[j]+1):this[j]},r.prototype.readInt16LE=function(j,X){j>>>=0,X||F(j,2,this.length);var J=this[j]|this[j+1]<<8;return 32768&J?4294901760|J:J},r.prototype.readInt16BE=function(j,X){j>>>=0,X||F(j,2,this.length);var J=this[j+1]|this[j]<<8;return 32768&J?4294901760|J:J},r.prototype.readInt32LE=function(j,X){return j>>>=0,X||F(j,4,this.length),this[j]|this[j+1]<<8|this[j+2]<<16|this[j+3]<<24},r.prototype.readInt32BE=function(j,X){return j>>>=0,X||F(j,4,this.length),this[j]<<24|this[j+1]<<16|this[j+2]<<8|this[j+3]},r.prototype.readFloatLE=function(j,X){return j>>>=0,X||F(j,4,this.length),t.read(this,j,!0,23,4)},r.prototype.readFloatBE=function(j,X){return j>>>=0,X||F(j,4,this.length),t.read(this,j,!1,23,4)},r.prototype.readDoubleLE=function(j,X){return j>>>=0,X||F(j,8,this.length),t.read(this,j,!0,52,8)},r.prototype.readDoubleBE=function(j,X){return j>>>=0,X||F(j,8,this.length),t.read(this,j,!1,52,8)},r.prototype.writeUIntLE=function(j,X,J,re){j=+j,X>>>=0,J>>>=0,re||H(this,j,X,J,Math.pow(2,8*J)-1,0);var ne=1,se=0;for(this[X]=255&j;++se<J&&(ne*=256);)this[X+se]=j/ne&255;return X+J},r.prototype.writeUIntBE=function(j,X,J,re){j=+j,X>>>=0,J>>>=0,re||H(this,j,X,J,Math.pow(2,8*J)-1,0);var ne=J-1,se=1;for(this[X+ne]=255&j;--ne>=0&&(se*=256);)this[X+ne]=j/se&255;return X+J},r.prototype.writeUInt8=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,1,255,0),this[X]=255&j,X+1},r.prototype.writeUInt16LE=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,2,65535,0),this[X]=255&j,this[X+1]=j>>>8,X+2},r.prototype.writeUInt16BE=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,2,65535,0),this[X]=j>>>8,this[X+1]=255&j,X+2},r.prototype.writeUInt32LE=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,4,4294967295,0),this[X+3]=j>>>24,this[X+2]=j>>>16,this[X+1]=j>>>8,this[X]=255&j,X+4},r.prototype.writeUInt32BE=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,4,4294967295,0),this[X]=j>>>24,this[X+1]=j>>>16,this[X+2]=j>>>8,this[X+3]=255&j,X+4},r.prototype.writeIntLE=function(j,X,J,re){if(j=+j,X>>>=0,!re){var ne=Math.pow(2,8*J-1);H(this,j,X,J,ne-1,-ne)}var se=0,oe=1,pe=0;for(this[X]=255&j;++se<J&&(oe*=256);)j<0&&pe===0&&this[X+se-1]!==0&&(pe=1),this[X+se]=(j/oe>>0)-pe&255;return X+J},r.prototype.writeIntBE=function(j,X,J,re){if(j=+j,X>>>=0,!re){var ne=Math.pow(2,8*J-1);H(this,j,X,J,ne-1,-ne)}var se=J-1,oe=1,pe=0;for(this[X+se]=255&j;--se>=0&&(oe*=256);)j<0&&pe===0&&this[X+se+1]!==0&&(pe=1),this[X+se]=(j/oe>>0)-pe&255;return X+J},r.prototype.writeInt8=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,1,127,-128),j<0&&(j=255+j+1),this[X]=255&j,X+1},r.prototype.writeInt16LE=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,2,32767,-32768),this[X]=255&j,this[X+1]=j>>>8,X+2},r.prototype.writeInt16BE=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,2,32767,-32768),this[X]=j>>>8,this[X+1]=255&j,X+2},r.prototype.writeInt32LE=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,4,2147483647,-2147483648),this[X]=255&j,this[X+1]=j>>>8,this[X+2]=j>>>16,this[X+3]=j>>>24,X+4},r.prototype.writeInt32BE=function(j,X,J){return j=+j,X>>>=0,J||H(this,j,X,4,2147483647,-2147483648),j<0&&(j=4294967295+j+1),this[X]=j>>>24,this[X+1]=j>>>16,this[X+2]=j>>>8,this[X+3]=255&j,X+4},r.prototype.writeFloatLE=function(j,X,J){return Z(this,j,X,!0,J)},r.prototype.writeFloatBE=function(j,X,J){return Z(this,j,X,!1,J)},r.prototype.writeDoubleLE=function(j,X,J){return K(this,j,X,!0,J)},r.prototype.writeDoubleBE=function(j,X,J){return K(this,j,X,!1,J)},r.prototype.copy=function(j,X,J,re){if(!r.isBuffer(j))throw new TypeError("argument should be a Buffer");if(J||(J=0),re||re===0||(re=this.length),X>=j.length&&(X=j.length),X||(X=0),re>0&&re<J&&(re=J),re===J||j.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),j.length-X<re-J&&(re=j.length-X+J);var ne=re-J;if(this===j&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(X,J,re);else if(this===j&&J<X&&X<re)for(var se=ne-1;se>=0;--se)j[se+X]=this[se+J];else Uint8Array.prototype.set.call(j,this.subarray(J,re),X);return ne},r.prototype.fill=function(j,X,J,re){if(typeof j=="string"){if(typeof X=="string"?(re=X,X=0,J=this.length):typeof J=="string"&&(re=J,J=this.length),re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!r.isEncoding(re))throw new TypeError("Unknown encoding: "+re);if(j.length===1){var ne=j.charCodeAt(0);(re==="utf8"&&ne<128||re==="latin1")&&(j=ne)}}else typeof j=="number"&&(j&=255);if(X<0||this.length<X||this.length<J)throw new RangeError("Out of range index");if(J<=X)return this;var se;if(X>>>=0,J=J===void 0?this.length:J>>>0,j||(j=0),typeof j=="number")for(se=X;
1356se<J;++se)this[se]=j;else{var oe=r.isBuffer(j)?j:r.from(j,re),pe=oe.length;if(pe===0)throw new TypeError('The value "'+j+'" is invalid for argument "value"');for(se=0;se<J-X;++se)this[se+X]=oe[se%pe]}return this};var q=/[^+/0-9A-Za-z-_]/g;function W(j){return j<16?"0"+j.toString(16):j.toString(16)}function $(j,X){var J;X=X||1/0;for(var re=j.length,ne=null,se=[],oe=0;oe<re;++oe){if((J=j.charCodeAt(oe))>55295&&J<57344){if(!ne){if(J>56319){(X-=3)>-1&&se.push(239,191,189);continue}if(oe+1===re){(X-=3)>-1&&se.push(239,191,189);continue}ne=J;continue}if(J<56320){(X-=3)>-1&&se.push(239,191,189),ne=J;continue}J=65536+(ne-55296<<10|J-56320)}else ne&&(X-=3)>-1&&se.push(239,191,189);if(ne=null,J<128){if((X-=1)<0)break;se.push(J)}else if(J<2048){if((X-=2)<0)break;se.push(J>>6|192,63&J|128)}else if(J<65536){if((X-=3)<0)break;se.push(J>>12|224,J>>6&63|128,63&J|128)}else{if(!(J<1114112))throw new Error("Invalid code point");if((X-=4)<0)break;se.push(J>>18|240,J>>12&63|128,J>>6&63|128,63&J|128)}}return se}function R(j){return n.toByteArray(function(X){if((X=(X=X.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;X.length%4!=0;)X+="=";return X}(j))}function N(j,X,J,re){for(var ne=0;ne<re&&!(ne+J>=X.length||ne>=j.length);++ne)X[ne+J]=j[ne];return ne}function U(j,X){return j instanceof X||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===X.name}function Q(j){return j!=j}}).call(this)}).call(this,m("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(m,b,v){v.read=function(e,n,t,o,r){var d,c,i=8*r-o-1,u=(1<<i)-1,f=u>>1,s=-7,h=t?r-1:0,p=t?-1:1,a=e[n+h];for(h+=p,d=a&(1<<-s)-1,a>>=-s,s+=i;s>0;d=256*d+e[n+h],h+=p,s-=8);for(c=d&(1<<-s)-1,d>>=-s,s+=o;s>0;c=256*c+e[n+h],h+=p,s-=8);if(d===0)d=1-f;else{if(d===u)return c?NaN:1/0*(a?-1:1);c+=Math.pow(2,o),d-=f}return(a?-1:1)*c*Math.pow(2,d-o)},v.write=function(e,n,t,o,r,d){var c,i,u,f=8*d-r-1,s=(1<<f)-1,h=s>>1,p=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=o?0:d-1,x=o?1:-1,l=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(i=isNaN(n)?1:0,c=s):(c=Math.floor(Math.log(n)/Math.LN2),n*(u=Math.pow(2,-c))<1&&(c--,u*=2),(n+=c+h>=1?p/u:p*Math.pow(2,1-h))*u>=2&&(c++,u/=2),c+h>=s?(i=0,c=s):c+h>=1?(i=(n*u-1)*Math.pow(2,r),c+=h):(i=n*Math.pow(2,h-1)*Math.pow(2,r),c=0));r>=8;e[t+a]=255&i,a+=x,i/=256,r-=8);for(c=c<<r|i,f+=r;f>0;e[t+a]=255&c,a+=x,c/=256,f-=8);e[t+a-x]|=128*l}},{}],5:[function(m,b,v){var e,n,t=b.exports={};function o(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function d(x){if(e===setTimeout)return setTimeout(x,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(x,0);try{return e(x,0)}catch{try{return e.call(null,x,0)}catch{return e.call(this,x,0)}}}(function(){try{e=typeof setTimeout=="function"?setTimeout:o}catch{e=o}try{n=typeof clearTimeout=="function"?clearTimeout:r}catch{n=r}})();var c,i=[],u=!1,f=-1;function s(){u&&c&&(u=!1,c.length?i=c.concat(i):f=-1,i.length&&h())}function h(){if(!u){var x=d(s);u=!0;for(var l=i.length;l;){for(c=i,i=[];++f<l;)c&&c[f].run();f=-1,l=i.length}c=null,u=!1,function(w){if(n===clearTimeout)return clearTimeout(w);if((n===r||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(w);try{n(w)}catch{try{return n.call(null,w)}catch{return n.call(this,w)}}}(x)}}function p(x,l){this.fun=x,this.array=l}function a(){}t.nextTick=function(x){var l=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)l[w-1]=arguments[w];i.push(new p(x,l)),i.length!==1||u||d(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=a,t.addListener=a,t.once=a,t.off=a,t.removeListener=a,t.removeAllListeners=a,t.emit=a,t.prependListener=a,t.prependOnceListener=a,t.listeners=function(x){return[]},t.binding=function(x){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(x){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],6:[function(m,b,v){b.exports={alpha_shape:m("alpha-shape"),convex_hull:m("convex-hull"),delaunay_triangulate:m("delaunay-triangulate"),gl_cone3d:m("gl-cone3d"),gl_error3d:m("gl-error3d"),gl_heatmap2d:m("gl-heatmap2d"),gl_line3d:m("gl-line3d"),gl_mesh3d:m("gl-mesh3d"),gl_plot2d:m("gl-plot2d"),gl_plot3d:m("gl-plot3d"),gl_pointcloud2d:m("gl-pointcloud2d"),gl_scatter3d:m("gl-scatter3d"),gl_select_box:m("gl-select-box"),gl_spikes2d:m("gl-spikes2d"),gl_streamtube3d:m("gl-streamtube3d"),gl_surface3d:m("gl-surface3d"),ndarray:m("ndarray"),ndarray_linear_interpolate:m("ndarray-linear-interpolate")}},{"alpha-shape":12,"convex-hull":58,"delaunay-triangulate":63,"gl-cone3d":79,"gl-error3d":84,"gl-heatmap2d":88,"gl-line3d":91,"gl-mesh3d":112,"gl-plot2d":118,"gl-plot3d":121,"gl-pointcloud2d":123,"gl-scatter3d":128,"gl-select-box":130,"gl-spikes2d":139,"gl-streamtube3d":143,"gl-surface3d":145,ndarray:259,"ndarray-linear-interpolate":253}],7:[function(m,b,v){b.exports=function(d){var c=(d=d||{}).eye||[0,0,1],i=d.center||[0,0,0],u=d.up||[0,1,0],f=d.distanceLimits||[0,1/0],s=d.mode||"turntable",h=e(),p=n(),a=t();return h.setDistanceLimits(f[0],f[1]),h.lookAt(0,c,i,u),p.setDistanceLimits(f[0],f[1]),p.lookAt(0,c,i,u),a.setDistanceLimits(f[0],f[1]),a.lookAt(0,c,i,u),new o({turntable:h,orbit:p,matrix:a},s)};var e=m("turntable-camera-controller"),n=m("orbit-camera-controller"),t=m("matrix-camera-controller");function o(d,c){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(i){return d[i]}),this._mode=c,this._active=d[c],this._active||(this._mode="turntable",this._active=d.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 r=o.prototype;r.flush=function(d){for(var c=this._controllerList,i=0;i<c.length;++i)c[i].flush(d)},r.idle=function(d){for(var c=this._controllerList,i=0;i<c.length;
1356++i)c[i].idle(d)},r.lookAt=function(d,c,i,u){for(var f=this._controllerList,s=0;s<f.length;++s)f[s].lookAt(d,c,i,u)},r.rotate=function(d,c,i,u){for(var f=this._controllerList,s=0;s<f.length;++s)f[s].rotate(d,c,i,u)},r.pan=function(d,c,i,u){for(var f=this._controllerList,s=0;s<f.length;++s)f[s].pan(d,c,i,u)},r.translate=function(d,c,i,u){for(var f=this._controllerList,s=0;s<f.length;++s)f[s].translate(d,c,i,u)},r.setMatrix=function(d,c){for(var i=this._controllerList,u=0;u<i.length;++u)i[u].setMatrix(d,c)},r.setDistanceLimits=function(d,c){for(var i=this._controllerList,u=0;u<i.length;++u)i[u].setDistanceLimits(d,c)},r.setDistance=function(d,c){for(var i=this._controllerList,u=0;u<i.length;++u)i[u].setDistance(d,c)},r.recalcMatrix=function(d){this._active.recalcMatrix(d)},r.getDistance=function(d){return this._active.getDistance(d)},r.getDistanceLimits=function(d){return this._active.getDistanceLimits(d)},r.lastT=function(){return this._active.lastT()},r.setMode=function(d){if(d!==this._mode){var c=this._controllerNames.indexOf(d);if(!(c<0)){var i=this._active,u=this._controllerList[c],f=Math.max(i.lastT(),u.lastT());i.recalcMatrix(f),u.setMatrix(f,i.computedMatrix),this._active=u,this._mode=d,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}}},r.getMode=function(){return this._mode}},{"matrix-camera-controller":245,"orbit-camera-controller":263,"turntable-camera-controller":305}],8:[function(m,b,v){var e=typeof WeakMap>"u"?m("weak-map"):WeakMap,n=m("gl-buffer"),t=m("gl-vao"),o=new e;b.exports=function(r){var d=o.get(r),c=d&&(d._triangleBuffer.handle||d._triangleBuffer.buffer);if(!c||!r.isBuffer(c)){var i=n(r,new Float32Array([-1,-1,-1,4,4,-1]));(d=t(r,[{buffer:i,type:r.FLOAT,size:2}]))._triangleBuffer=i,o.set(r,d)}d.bind(),r.drawArrays(r.TRIANGLES,0,3),d.unbind()}},{"gl-buffer":78,"gl-vao":150,"weak-map":313}],9:[function(m,b,v){var e=m("pad-left");b.exports=function(n,t,o){t=typeof t=="number"?t:1,o=o||": ";var r=n.split(/\r?\n/),d=String(r.length+t-1).length;return r.map(function(c,i){var u=i+t,f=String(u).length;return e(u,d-f)+o+c}).join(`
1357`)}},{"pad-left":264}],10:[function(m,b,v){b.exports=function(t){var o=t.length;if(o===0)return[];if(o===1)return[0];for(var r=t[0].length,d=[t[0]],c=[0],i=1;i<o;++i)if(d.push(t[i]),n(d,r)){if(c.push(i),c.length===r+1)return c}else d.pop();return c};var e=m("robust-orientation");function n(t,o){for(var r=new Array(o+1),d=0;d<t.length;++d)r[d]=t[d];for(d=0;d<=t.length;++d){for(var c=t.length;c<=o;++c){for(var i=new Array(o),u=0;u<o;++u)i[u]=Math.pow(c+1-d,u);r[c]=i}if(e.apply(void 0,r))return!0}return!1}},{"robust-orientation":284}],11:[function(m,b,v){b.exports=function(t,o){return e(o).filter(function(r){for(var d=new Array(r.length),c=0;c<r.length;++c)d[c]=o[r[c]];return n(d)*t<1})};var e=m("delaunay-triangulate"),n=m("circumradius")},{circumradius:49,"delaunay-triangulate":63}],12:[function(m,b,v){b.exports=function(t,o){return n(e(t,o))};var e=m("alpha-complex"),n=m("simplicial-complex-boundary")},{"alpha-complex":11,"simplicial-complex-boundary":290}],13:[function(m,b,v){b.exports=function(e){return atob(e)}},{}],14:[function(m,b,v){b.exports=function(t,o){for(var r=o.length,d=new Array(r+1),c=0;c<r;++c){for(var i=new Array(r+1),u=0;u<=r;++u)i[u]=t[u][c];d[c]=i}for(d[r]=new Array(r+1),c=0;c<=r;++c)d[r][c]=1;var f=new Array(r+1);for(c=0;c<r;++c)f[c]=o[c];f[r]=1;var s=e(d,f),h=n(s[r+1]);h===0&&(h=1);var p=new Array(r+1);for(c=0;c<=r;++c)p[c]=n(s[c])/h;return p};var e=m("robust-linear-solve");function n(t){for(var o=0,r=0;r<t.length;++r)o+=t[r];return o}},{"robust-linear-solve":283}],15:[function(m,b,v){var e=m("./lib/rationalize");b.exports=function(n,t){return e(n[0].mul(t[1]).add(t[0].mul(n[1])),n[1].mul(t[1]))}},{"./lib/rationalize":25}],16:[function(m,b,v){b.exports=function(e,n){return e[0].mul(n[1]).cmp(n[0].mul(e[1]))}},{}],17:[function(m,b,v){var e=m("./lib/rationalize");
1357b.exports=function(n,t){return e(n[0].mul(t[1]),n[1].mul(t[0]))}},{"./lib/rationalize":25}],18:[function(m,b,v){var e=m("./is-rat"),n=m("./lib/is-bn"),t=m("./lib/num-to-bn"),o=m("./lib/str-to-bn"),r=m("./lib/rationalize"),d=m("./div");b.exports=function c(i,u){if(e(i))return u?d(i,c(u)):[i[0].clone(),i[1].clone()];var f,s,h=0;if(n(i))f=i.clone();else if(typeof i=="string")f=o(i);else{if(i===0)return[t(0),t(1)];if(i===Math.floor(i))f=t(i);else{for(;i!==Math.floor(i);)i*=Math.pow(2,256),h-=256;f=t(i)}}if(e(u))f.mul(u[1]),s=u[0].clone();else if(n(u))s=u.clone();else if(typeof u=="string")s=o(u);else if(u)if(u===Math.floor(u))s=t(u);else{for(;u!==Math.floor(u);)u*=Math.pow(2,256),h+=256;s=t(u)}else s=t(1);return h>0?f=f.ushln(h):h<0&&(s=s.ushln(-h)),r(f,s)}},{"./div":17,"./is-rat":19,"./lib/is-bn":23,"./lib/num-to-bn":24,"./lib/rationalize":25,"./lib/str-to-bn":26}],19:[function(m,b,v){var e=m("./lib/is-bn");b.exports=function(n){return Array.isArray(n)&&n.length===2&&e(n[0])&&e(n[1])}},{"./lib/is-bn":23}],20:[function(m,b,v){var e=m("bn.js");b.exports=function(n){return n.cmp(new e(0))}},{"bn.js":33}],21:[function(m,b,v){var e=m("./bn-sign");b.exports=function(n){var t=n.length,o=n.words,r=0;if(t===1)r=o[0];else if(t===2)r=o[0]+67108864*o[1];else for(var d=0;d<t;d++){var c=o[d];r+=c*Math.pow(67108864,d)}return e(n)*r}},{"./bn-sign":20}],22:[function(m,b,v){var e=m("double-bits"),n=m("bit-twiddle").countTrailingZeros;b.exports=function(t){var o=n(e.lo(t));if(o<32)return o;var r=n(e.hi(t));return r>20?52:r+32}},{"bit-twiddle":32,"double-bits":64}],23:[function(m,b,v){m("bn.js"),b.exports=function(e){return e&&typeof e=="object"&&!!e.words}},{"bn.js":33}],24:[function(m,b,v){var e=m("bn.js"),n=m("double-bits");b.exports=function(t){var o=n.exponent(t);return o<52?new e(t):new e(t*Math.pow(2,52-o)).ushln(o-52)}},{"bn.js":33,"double-bits":64}],25:[function(m,b,v){var e=m("./num-to-bn"),n=m("./bn-sign");b.exports=function(t,o){var r=n(t),d=n(o);if(r===0)return[e(0),e(1)];if(d===0)return[e(0),e(0)];d<0&&(t=t.neg(),o=o.neg());var c=t.gcd(o);return c.cmpn(1)?[t.div(c),o.div(c)]:[t,o]}},{"./bn-sign":20,"./num-to-bn":24}],26:[function(m,b,v){var e=m("bn.js");b.exports=function(n){return new e(n)}},{"bn.js":33}],27:[function(m,b,v){var e=m("./lib/rationalize");b.exports=function(n,t){return e(n[0].mul(t[0]),n[1].mul(t[1]))}},{"./lib/rationalize":25}],28:[function(m,b,v){var e=m("./lib/bn-sign");b.exports=function(n){return e(n[0])*e(n[1])}},{"./lib/bn-sign":20}],29:[function(m,b,v){var e=m("./lib/rationalize");b.exports=function(n,t){return e(n[0].mul(t[1]).sub(n[1].mul(t[0])),n[1].mul(t[1]))}},{"./lib/rationalize":25}],30:[function(m,b,v){var e=m("./lib/bn-to-num"),n=m("./lib/ctz");b.exports=function(t){var o=t[0],r=t[1];if(o.cmpn(0)===0)return 0;var d=o.abs().divmod(r.abs()),c=d.div,i=e(c),u=d.mod,f=o.negative!==r.negative?-1:1;if(u.cmpn(0)===0)return f*i;if(i){var s=n(i)+4,h=e(u.ushln(s).divRound(r));return f*(i+h*Math.pow(2,-s))}var p=r.bitLength()-u.bitLength()+53;return h=e(u.ushln(p).divRound(r)),p<1023?f*h*Math.pow(2,-p):(h*=Math.pow(2,-1023),f*h*Math.pow(2,1023-p))}},{"./lib/bn-to-num":21,"./lib/ctz":22}],31:[function(m,b,v){function e(c,i,u,f,s){for(var h=s+1;f<=s;){var p=f+s>>>1,a=c[p];(u!==void 0?u(a,i):a-i)>=0?(h=p,s=p-1):f=p+1}return h}function n(c,i,u,f,s){for(var h=s+1;f<=s;){var p=f+s>>>1,a=c[p];(u!==void 0?u(a,i):a-i)>0?(h=p,s=p-1):f=p+1}return h}function t(c,i,u,f,s){for(var h=f-1;f<=s;){var p=f+s>>>1,a=c[p];(u!==void 0?u(a,i):a-i)<0?(h=p,f=p+1):s=p-1}return h}function o(c,i,u,f,s){for(var h=f-1;f<=s;){var p=f+s>>>1,a=c[p];(u!==void 0?u(a,i):a-i)<=0?(h=p,f=p+1):s=p-1}return h}function r(c,i,u,f,s){for(;f<=s;){var h=f+s>>>1,p=c[h],a=u!==void 0?u(p,i):p-i;if(a===0)return h;a<=0?f=h+1:s=h-1}return-1}function d(c,i,u,f,s,h){return typeof u=="function"?h(c,i,u,f===void 0?0:0|f,s===void 0?c.length-1:0|s):h(c,i,void 0,u===void 0?0:0|u,f===void 0?c.length-1:0|f)}b.exports={ge:function(c,i,u,f,s){return d(c,i,u,f,s,e)},gt:function(c,i,u,f,s){return d(c,i,u,f,s,n)},lt:function(c,i,u,f,s){return d(c,i,u,f,s,t)},le:function(c,i,u,f,s){return d(c,i,u,f,s,o)},eq:function(c,i,u,f,s){return d(c,i,u,f,s,r)}}},{}],32:[function(m,b,v){function e(t){var o=32;
1357return(t&=-t)&&o--,65535&t&&(o-=16),16711935&t&&(o-=8),252645135&t&&(o-=4),858993459&t&&(o-=2),1431655765&t&&(o-=1),o}v.INT_BITS=32,v.INT_MAX=2147483647,v.INT_MIN=-1<<31,v.sign=function(t){return(t>0)-(t<0)},v.abs=function(t){var o=t>>31;return(t^o)-o},v.min=function(t,o){return o^(t^o)&-(t<o)},v.max=function(t,o){return t^(t^o)&-(t<o)},v.isPow2=function(t){return!(t&t-1||!t)},v.log2=function(t){var o,r;return o=(t>65535)<<4,o|=r=((t>>>=o)>255)<<3,o|=r=((t>>>=r)>15)<<2,(o|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},v.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},v.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},v.countTrailingZeros=e,v.nextPow2=function(t){return t+=t===0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},v.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},v.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);(function(t){for(var o=0;o<256;++o){var r=o,d=o,c=7;for(r>>>=1;r;r>>>=1)d<<=1,d|=1&r,--c;t[o]=d<<c&255}})(n),v.reverse=function(t){return n[255&t]<<24|n[t>>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},v.interleave2=function(t,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(o=1431655765&((o=858993459&((o=252645135&((o=16711935&((o&=65535)|o<<8))|o<<4))|o<<2))|o<<1))<<1},v.deinterleave2=function(t,o){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>o&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},v.interleave3=function(t,o,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(o=1227133513&((o=3272356035&((o=251719695&((o=4278190335&((o&=1023)|o<<16))|o<<8))|o<<4))|o<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},v.deinterleave3=function(t,o){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>o&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},v.nextCombination=function(t){var o=t|t-1;return o+1|(~o&-~o)-1>>>e(t)+1}},{}],33:[function(m,b,v){(function(e,n){function t(S,E){if(!S)throw new Error(E||"Assertion failed")}function o(S,E){S.super_=E;var D=function(){};D.prototype=E.prototype,S.prototype=new D,S.prototype.constructor=S}function r(S,E,D){if(r.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&(E!=="le"&&E!=="be"||(D=E,E=10),this._init(S||0,E||10,D||"be"))}var d;typeof e=="object"?e.exports=r:n.BN=r,r.BN=r,r.wordSize=26;try{d=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:m("buffer").Buffer}catch{}function c(S,E){var D=S.charCodeAt(E);return D>=65&&D<=70?D-55:D>=97&&D<=102?D-87:D-48&15}function i(S,E,D){var F=c(S,D);return D-1>=E&&(F|=c(S,D-1)<<4),F}function u(S,E,D,F){for(var H=0,V=Math.min(S.length,D),Z=E;Z<V;Z++){var K=S.charCodeAt(Z)-48;H*=F,H+=K>=49?K-49+10:K>=17?K-17+10:K}return H}r.isBN=function(S){return S instanceof r||S!==null&&typeof S=="object"&&S.constructor.wordSize===r.wordSize&&Array.isArray(S.words)},r.max=function(S,E){return S.cmp(E)>0?S:E},r.min=function(S,E){return S.cmp(E)<0?S:E},r.prototype._init=function(S,E,D){if(typeof S=="number")return this._initNumber(S,E,D);if(typeof S=="object")return this._initArray(S,E,D);E==="hex"&&(E=16),t(E===(0|E)&&E>=2&&E<=36);var F=0;(S=S.toString().replace(/\s+/g,""))[0]==="-"&&(F++,this.negative=1),F<S.length&&(E===16?this._parseHex(S,F,D):(this._parseBase(S,E,F),D==="le"&&this._initArray(this.toArray(),E,D)))},r.prototype._initNumber=function(S,E,D){S<0&&(this.negative=1,S=-S),S<67108864?(this.words=[67108863&S],this.length=1):S<4503599627370496?(this.words=[67108863&S,S/67108864&67108863],this.length=2):(t(S<9007199254740992),this.words=[67108863&S,S/67108864&67108863,1],this.length=3),D==="le"&&this._initArray(this.toArray(),E,D)},r.prototype._initArray=function(S,E,D){if(t(typeof S.length=="number"),S.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(S.length/3),this.words=new Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var H,V,Z=0;if(D==="be")for(F=S.length-1,H=0;F>=0;F-=3)V=S[F]|S[F-1]<<8|S[F-2]<<16,this.words[H]|=V<<Z&67108863,this.words[H+1]=V>>>26-Z&67108863,(Z+=24)>=26&&(Z-=26,H++);else if(D==="le")for(F=0,H=0;F<S.length;F+=3)V=S[F]|S[F+1]<<8|S[F+2]<<16,this.words[H]|=V<<Z&67108863,this.words[H+1]=V>>>26-Z&67108863,(Z+=24)>=26&&(Z-=26,H++);return this.strip()},r.prototype._parseHex=function(S,E,D){this.length=Math.ceil((S.length-E)/6),this.words=new Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var H,V=0,Z=0;if(D==="be")for(F=S.length-1;F>=E;F-=2)H=i(S,E,F)<<V,this.words[Z]|=67108863&H,V>=18?(V-=18,Z+=1,this.words[Z]|=H>>>26):V+=8;else for(F=(S.length-E)%2==0?E+1:E;F<S.length;F+=2)H=i(S,E,F)<<V,this.words[Z]|=67108863&H,V>=18?(V-=18,Z+=1,this.words[Z]|=H>>>26):V+=8;this.strip()},r.prototype._parseBase=function(S,E,D){this.words=[0],this.length=1;for(var F=0,H=1;H<=67108863;H*=E)F++;F--,H=H/E|0;for(var V=S.length-D,Z=V%F,K=Math.min(V,V-Z)+D,q=0,W=D;W<K;W+=F)q=u(S,W,W+F,E),this.imuln(H),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q);
1357if(Z!==0){var $=1;for(q=u(S,W,S.length,E),W=0;W<Z;W++)$*=E;this.imuln($),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q)}this.strip()},r.prototype.copy=function(S){S.words=new Array(this.length);for(var E=0;E<this.length;E++)S.words[E]=this.words[E];S.length=this.length,S.negative=this.negative,S.red=this.red},r.prototype.clone=function(){var S=new r(null);return this.copy(S),S},r.prototype._expand=function(S){for(;this.length<S;)this.words[this.length++]=0;return this},r.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],s=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(S,E,D){D.negative=E.negative^S.negative;var F=S.length+E.length|0;D.length=F,F=F-1|0;var H=0|S.words[0],V=0|E.words[0],Z=H*V,K=67108863&Z,q=Z/67108864|0;D.words[0]=K;for(var W=1;W<F;W++){for(var $=q>>>26,R=67108863&q,N=Math.min(W,E.length-1),U=Math.max(0,W-S.length+1);U<=N;U++){var Q=W-U|0;$+=(Z=(H=0|S.words[Q])*(V=0|E.words[U])+R)/67108864|0,R=67108863&Z}D.words[W]=0|R,q=0|$}return q!==0?D.words[W]=0|q:D.length--,D.strip()}r.prototype.toString=function(S,E){var D;if(E=0|E||1,(S=S||10)===16||S==="hex"){D="";for(var F=0,H=0,V=0;V<this.length;V++){var Z=this.words[V],K=(16777215&(Z<<F|H)).toString(16);D=(H=Z>>>24-F&16777215)!==0||V!==this.length-1?f[6-K.length]+K+D:K+D,(F+=2)>=26&&(F-=26,V--)}for(H!==0&&(D=H.toString(16)+D);D.length%E!=0;)D="0"+D;return this.negative!==0&&(D="-"+D),D}if(S===(0|S)&&S>=2&&S<=36){var q=s[S],W=h[S];D="";var $=this.clone();for($.negative=0;!$.isZero();){var R=$.modn(W).toString(S);D=($=$.idivn(W)).isZero()?R+D:f[q-R.length]+R+D}for(this.isZero()&&(D="0"+D);D.length%E!=0;)D="0"+D;return this.negative!==0&&(D="-"+D),D}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var S=this.words[0];return this.length===2?S+=67108864*this.words[1]:this.length===3&&this.words[2]===1?S+=4503599627370496+67108864*this.words[1]:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-S:S},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(S,E){return t(d!==void 0),this.toArrayLike(d,S,E)},r.prototype.toArray=function(S,E){return this.toArrayLike(Array,S,E)},r.prototype.toArrayLike=function(S,E,D){var F=this.byteLength(),H=D||Math.max(1,F);t(F<=H,"byte array longer than desired length"),t(H>0,"Requested array length <= 0"),this.strip();var V,Z,K=E==="le",q=new S(H),W=this.clone();if(K){for(Z=0;!W.isZero();Z++)V=W.andln(255),W.iushrn(8),q[Z]=V;for(;Z<H;Z++)q[Z]=0}else{for(Z=0;Z<H-F;Z++)q[Z]=0;for(Z=0;!W.isZero();Z++)V=W.andln(255),W.iushrn(8),q[H-Z-1]=V}return q},Math.clz32?r.prototype._countBits=function(S){return 32-Math.clz32(S)}:r.prototype._countBits=function(S){var E=S,D=0;return E>=4096&&(D+=13,E>>>=13),E>=64&&(D+=7,E>>>=7),E>=8&&(D+=4,E>>>=4),E>=2&&(D+=2,E>>>=2),D+E},r.prototype._zeroBits=function(S){if(S===0)return 26;var E=S,D=0;return!(8191&E)&&(D+=13,E>>>=13),!(127&E)&&(D+=7,E>>>=7),!(15&E)&&(D+=4,E>>>=4),!(3&E)&&(D+=2,E>>>=2),!(1&E)&&D++,D},r.prototype.bitLength=function(){var S=this.words[this.length-1],E=this._countBits(S);return 26*(this.length-1)+E},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var S=0,E=0;E<this.length;E++){var D=this._zeroBits(this.words[E]);if(S+=D,D!==26)break}return S},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(S){return this.negative!==0?this.abs().inotn(S).iaddn(1):this.clone()},r.prototype.fromTwos=function(S){return this.testn(S-1)?this.notn(S).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return this.negative!==0},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(S){for(;this.length<S.length;)this.words[this.length++]=0;for(var E=0;E<S.length;E++)this.words[E]=this.words[E]|S.words[E];return this.strip()},r.prototype.ior=function(S){return t((this.negative|S.negative)==0),this.iuor(S)},r.prototype.or=function(S){return this.length>S.length?this.clone().ior(S):S.clone().ior(this)},r.prototype.uor=function(S){return this.length>S.length?this.clone().iuor(S):S.clone().iuor(this)},r.prototype.iuand=function(S){var E;E=this.length>S.length?S:this;for(var D=0;D<E.length;D++)this.words[D]=this.words[D]&S.words[D];return this.length=E.length,this.strip()},r.prototype.iand=function(S){return t((this.negative|S.negative)==0),this.iuand(S)},r.prototype.and=function(S){return this.length>S.length?this.clone().iand(S):S.clone().iand(this)},r.prototype.uand=function(S){return this.length>S.length?this.clone().iuand(S):S.clone().iuand(this)},r.prototype.iuxor=function(S){var E,D;this.length>S.length?(E=this,D=S):(E=S,D=this);for(var F=0;F<D.length;F++)this.words[F]=E.words[F]^D.words[F];if(this!==E)for(;F<E.length;F++)this.words[F]=E.words[F];return this.length=E.length,this.strip()},r.prototype.ixor=function(S){return t((this.negative|S.negative)==0),this.iuxor(S)},r.prototype.xor=function(S){return this.length>S.length?this.clone().ixor(S):S.clone().ixor(this)},r.prototype.uxor=function(S){return this.length>S.length?this.clone().iuxor(S):S.clone().iuxor(this)},r.prototype.inotn=function(S){t(typeof S=="number"&&S>=0);var E=0|Math.ceil(S/26),D=S%26;this._expand(E),D>0&&E--;for(var F=0;F<E;F++)this.words[F]=67108863&~this.words[F];return D>0&&(this.words[F]=~this.words[F]&67108863>>26-D),this.strip()},r.prototype.notn=function(S){return this.clone().inotn(S)},r.prototype.setn=function(S,E){t(typeof S=="number"&&S>=0);var D=S/26|0,F=S%26;return this._expand(D+1),this.words[D]=E?this.words[D]|1<<F:this.words[D]&~(1<<F),this.strip()},r.prototype.iadd=function(S){var E,D,F;if(this.negative!==0&&S.negative===0)return this.negative=0,E=this.isub(S),this.negative^=1,this._normSign();if(this.negative===0&&S.negative!==0)return S.negative=0,E=this.isub(S),S.negative=1,E._normSign();this.length>S.length?(D=this,F=S):(D=S,F=this);for(var H=0,V=0;V<F.length;V++)E=(0|D.words[V])+(0|F.words[V])+H,this.words[V]=67108863&E,H=E>>>26;for(;H!==0&&V<D.length;V++)E=(0|D.words[V])+H,this.words[V]=67108863&E,H=E>>>26;if(this.length=D.length,H!==0)this.words[this.length]=H,this.length++;else if(D!==this)for(;V<D.length;V++)this.words[V]=D.words[V];return this},r.prototype.add=function(S){var E;return S.negative!==0&&this.negative===0?(S.negative=0,E=this.sub(S),S.negative^=1,E):S.negative===0&&this.negative!==0?(this.negative=0,E=S.sub(this),this.negative=1,E):this.length>S.length?this.clone().iadd(S):S.clone().iadd(this)},r.prototype.isub=function(S){if(S.negative!==0){S.negative=0;
vendor: 21,841 bytes, line 1357
1357var E=this.iadd(S);return S.negative=1,E._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(S),this.negative=1,this._normSign();var D,F,H=this.cmp(S);if(H===0)return this.negative=0,this.length=1,this.words[0]=0,this;H>0?(D=this,F=S):(D=S,F=this);for(var V=0,Z=0;Z<F.length;Z++)V=(E=(0|D.words[Z])-(0|F.words[Z])+V)>>26,this.words[Z]=67108863&E;for(;V!==0&&Z<D.length;Z++)V=(E=(0|D.words[Z])+V)>>26,this.words[Z]=67108863&E;if(V===0&&Z<D.length&&D!==this)for(;Z<D.length;Z++)this.words[Z]=D.words[Z];return this.length=Math.max(this.length,Z),D!==this&&(this.negative=1),this.strip()},r.prototype.sub=function(S){return this.clone().isub(S)};var a=function(S,E,D){var F,H,V,Z=S.words,K=E.words,q=D.words,W=0,$=0|Z[0],R=8191&$,N=$>>>13,U=0|Z[1],Q=8191&U,j=U>>>13,X=0|Z[2],J=8191&X,re=X>>>13,ne=0|Z[3],se=8191&ne,oe=ne>>>13,pe=0|Z[4],ce=8191&pe,de=pe>>>13,xe=0|Z[5],we=8191&xe,be=xe>>>13,Ee=0|Z[6],fe=8191&Ee,me=Ee>>>13,Te=0|Z[7],_e=8191&Te,Ae=Te>>>13,Pe=0|Z[8],De=8191&Pe,Ve=Pe>>>13,Qe=0|Z[9],Oe=8191&Qe,Ue=Qe>>>13,Ge=0|K[0],Ye=8191&Ge,tt=Ge>>>13,lt=0|K[1],vt=8191&lt,It=lt>>>13,St=0|K[2],rt=8191&St,et=St>>>13,Tt=0|K[3],Vt=8191&Tt,Kt=Tt>>>13,Be=0|K[4],qe=8191&Be,Re=Be>>>13,Xe=0|K[5],ke=8191&Xe,Le=Xe>>>13,Ie=0|K[6],Ce=8191&Ie,Je=Ie>>>13,it=0|K[7],ht=8191&it,ut=it>>>13,kt=0|K[8],ot=8191&kt,Lt=kt>>>13,Et=0|K[9],Ze=8191&Et,pt=Et>>>13;D.negative=S.negative^E.negative,D.length=19;var Ct=(W+(F=Math.imul(R,Ye))|0)+((8191&(H=(H=Math.imul(R,tt))+Math.imul(N,Ye)|0))<<13)|0;W=((V=Math.imul(N,tt))+(H>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,F=Math.imul(Q,Ye),H=(H=Math.imul(Q,tt))+Math.imul(j,Ye)|0,V=Math.imul(j,tt);var zt=(W+(F=F+Math.imul(R,vt)|0)|0)+((8191&(H=(H=H+Math.imul(R,It)|0)+Math.imul(N,vt)|0))<<13)|0;W=((V=V+Math.imul(N,It)|0)+(H>>>13)|0)+(zt>>>26)|0,zt&=67108863,F=Math.imul(J,Ye),H=(H=Math.imul(J,tt))+Math.imul(re,Ye)|0,V=Math.imul(re,tt),F=F+Math.imul(Q,vt)|0,H=(H=H+Math.imul(Q,It)|0)+Math.imul(j,vt)|0,V=V+Math.imul(j,It)|0;var Gt=(W+(F=F+Math.imul(R,rt)|0)|0)+((8191&(H=(H=H+Math.imul(R,et)|0)+Math.imul(N,rt)|0))<<13)|0;W=((V=V+Math.imul(N,et)|0)+(H>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,F=Math.imul(se,Ye),H=(H=Math.imul(se,tt))+Math.imul(oe,Ye)|0,V=Math.imul(oe,tt),F=F+Math.imul(J,vt)|0,H=(H=H+Math.imul(J,It)|0)+Math.imul(re,vt)|0,V=V+Math.imul(re,It)|0,F=F+Math.imul(Q,rt)|0,H=(H=H+Math.imul(Q,et)|0)+Math.imul(j,rt)|0,V=V+Math.imul(j,et)|0;var ze=(W+(F=F+Math.imul(R,Vt)|0)|0)+((8191&(H=(H=H+Math.imul(R,Kt)|0)+Math.imul(N,Vt)|0))<<13)|0;W=((V=V+Math.imul(N,Kt)|0)+(H>>>13)|0)+(ze>>>26)|0,ze&=67108863,F=Math.imul(ce,Ye),H=(H=Math.imul(ce,tt))+Math.imul(de,Ye)|0,V=Math.imul(de,tt),F=F+Math.imul(se,vt)|0,H=(H=H+Math.imul(se,It)|0)+Math.imul(oe,vt)|0,V=V+Math.imul(oe,It)|0,F=F+Math.imul(J,rt)|0,H=(H=H+Math.imul(J,et)|0)+Math.imul(re,rt)|0,V=V+Math.imul(re,et)|0,F=F+Math.imul(Q,Vt)|0,H=(H=H+Math.imul(Q,Kt)|0)+Math.imul(j,Vt)|0,V=V+Math.imul(j,Kt)|0;var st=(W+(F=F+Math.imul(R,qe)|0)|0)+((8191&(H=(H=H+Math.imul(R,Re)|0)+Math.imul(N,qe)|0))<<13)|0;W=((V=V+Math.imul(N,Re)|0)+(H>>>13)|0)+(st>>>26)|0,st&=67108863,F=Math.imul(we,Ye),H=(H=Math.imul(we,tt))+Math.imul(be,Ye)|0,V=Math.imul(be,tt),F=F+Math.imul(ce,vt)|0,H=(H=H+Math.imul(ce,It)|0)+Math.imul(de,vt)|0,V=V+Math.imul(de,It)|0,F=F+Math.imul(se,rt)|0,H=(H=H+Math.imul(se,et)|0)+Math.imul(oe,rt)|0,V=V+Math.imul(oe,et)|0,F=F+Math.imul(J,Vt)|0,H=(H=H+Math.imul(J,Kt)|0)+Math.imul(re,Vt)|0,V=V+Math.imul(re,Kt)|0,F=F+Math.imul(Q,qe)|0,H=(H=H+Math.imul(Q,Re)|0)+Math.imul(j,qe)|0,V=V+Math.imul(j,Re)|0;var yt=(W+(F=F+Math.imul(R,ke)|0)|0)+((8191&(H=(H=H+Math.imul(R,Le)|0)+Math.imul(N,ke)|0))<<13)|0;W=((V=V+Math.imul(N,Le)|0)+(H>>>13)|0)+(yt>>>26)|0,yt&=67108863,F=Math.imul(fe,Ye),H=(H=Math.imul(fe,tt))+Math.imul(me,Ye)|0,V=Math.imul(me,tt),F=F+Math.imul(we,vt)|0,H=(H=H+Math.imul(we,It)|0)+Math.imul(be,vt)|0,V=V+Math.imul(be,It)|0,F=F+Math.imul(ce,rt)|0,H=(H=H+Math.imul(ce,et)|0)+Math.imul(de,rt)|0,V=V+Math.imul(de,et)|0,F=F+Math.imul(se,Vt)|0,H=(H=H+Math.imul(se,Kt)|0)+Math.imul(oe,Vt)|0,V=V+Math.imul(oe,Kt)|0,F=F+Math.imul(J,qe)|0,H=(H=H+Math.imul(J,Re)|0)+Math.imul(re,qe)|0,V=V+Math.imul(re,Re)|0,F=F+Math.imul(Q,ke)|0,H=(H=H+Math.imul(Q,Le)|0)+Math.imul(j,ke)|0,V=V+Math.imul(j,Le)|0;var Dt=(W+(F=F+Math.imul(R,Ce)|0)|0)+((8191&(H=(H=H+Math.imul(R,Je)|0)+Math.imul(N,Ce)|0))<<13)|0;W=((V=V+Math.imul(N,Je)|0)+(H>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,F=Math.imul(_e,Ye),H=(H=Math.imul(_e,tt))+Math.imul(Ae,Ye)|0,V=Math.imul(Ae,tt),F=F+Math.imul(fe,vt)|0,H=(H=H+Math.imul(fe,It)|0)+Math.imul(me,vt)|0,V=V+Math.imul(me,It)|0,F=F+Math.imul(we,rt)|0,H=(H=H+Math.imul(we,et)|0)+Math.imul(be,rt)|0,V=V+Math.imul(be,et)|0,F=F+Math.imul(ce,Vt)|0,H=(H=H+Math.imul(ce,Kt)|0)+Math.imul(de,Vt)|0,V=V+Math.imul(de,Kt)|0,F=F+Math.imul(se,qe)|0,H=(H=H+Math.imul(se,Re)|0)+Math.imul(oe,qe)|0,V=V+Math.imul(oe,Re)|0,F=F+Math.imul(J,ke)|0,H=(H=H+Math.imul(J,Le)|0)+Math.imul(re,ke)|0,V=V+Math.imul(re,Le)|0,F=F+Math.imul(Q,Ce)|0,H=(H=H+Math.imul(Q,Je)|0)+Math.imul(j,Ce)|0,V=V+Math.imul(j,Je)|0;var jt=(W+(F=F+Math.imul(R,ht)|0)|0)+((8191&(H=(H=H+Math.imul(R,ut)|0)+Math.imul(N,ht)|0))<<13)|0;W=((V=V+Math.imul(N,ut)|0)+(H>>>13)|0)+(jt>>>26)|0,jt&=67108863,F=Math.imul(De,Ye),H=(H=Math.imul(De,tt))+Math.imul(Ve,Ye)|0,V=Math.imul(Ve,tt),F=F+Math.imul(_e,vt)|0,H=(H=H+Math.imul(_e,It)|0)+Math.imul(Ae,vt)|0,V=V+Math.imul(Ae,It)|0,F=F+Math.imul(fe,rt)|0,H=(H=H+Math.imul(fe,et)|0)+Math.imul(me,rt)|0,V=V+Math.imul(me,et)|0,F=F+Math.imul(we,Vt)|0,H=(H=H+Math.imul(we,Kt)|0)+Math.imul(be,Vt)|0,V=V+Math.imul(be,Kt)|0,F=F+Math.imul(ce,qe)|0,H=(H=H+Math.imul(ce,Re)|0)+Math.imul(de,qe)|0,V=V+Math.imul(de,Re)|0,F=F+Math.imul(se,ke)|0,H=(H=H+Math.imul(se,Le)|0)+Math.imul(oe,ke)|0,V=V+Math.imul(oe,Le)|0,F=F+Math.imul(J,Ce)|0,H=(H=H+Math.imul(J,Je)|0)+Math.imul(re,Ce)|0,V=V+Math.imul(re,Je)|0,F=F+Math.imul(Q,ht)|0,H=(H=H+Math.imul(Q,ut)|0)+Math.imul(j,ht)|0,V=V+Math.imul(j,ut)|0;var or=(W+(F=F+Math.imul(R,ot)|0)|0)+((8191&(H=(H=H+Math.imul(R,Lt)|0)+Math.imul(N,ot)|0))<<13)|0;W=((V=V+Math.imul(N,Lt)|0)+(H>>>13)|0)+(or>>>26)|0,or&=67108863,F=Math.imul(Oe,Ye),H=(H=Math.imul(Oe,tt))+Math.imul(Ue,Ye)|0,V=Math.imul(Ue,tt),F=F+Math.imul(De,vt)|0,H=(H=H+Math.imul(De,It)|0)+Math.imul(Ve,vt)|0,V=V+Math.imul(Ve,It)|0,F=F+Math.imul(_e,rt)|0,H=(H=H+Math.imul(_e,et)|0)+Math.imul(Ae,rt)|0,V=V+Math.imul(Ae,et)|0,F=F+Math.imul(fe,Vt)|0,H=(H=H+Math.imul(fe,Kt)|0)+Math.imul(me,Vt)|0,V=V+Math.imul(me,Kt)|0,F=F+Math.imul(we,qe)|0,H=(H=H+Math.imul(we,Re)|0)+Math.imul(be,qe)|0,V=V+Math.imul(be,Re)|0,F=F+Math.imul(ce,ke)|0,H=(H=H+Math.imul(ce,Le)|0)+Math.imul(de,ke)|0,V=V+Math.imul(de,Le)|0,F=F+Math.imul(se,Ce)|0,H=(H=H+Math.imul(se,Je)|0)+Math.imul(oe,Ce)|0,V=V+Math.imul(oe,Je)|0,F=F+Math.imul(J,ht)|0,H=(H=H+Math.imul(J,ut)|0)+Math.imul(re,ht)|0,V=V+Math.imul(re,ut)|0,F=F+Math.imul(Q,ot)|0,H=(H=H+Math.imul(Q,Lt)|0)+Math.imul(j,ot)|0,V=V+Math.imul(j,Lt)|0;var Ut=(W+(F=F+Math.imul(R,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(R,pt)|0)+Math.imul(N,Ze)|0))<<13)|0;W=((V=V+Math.imul(N,pt)|0)+(H>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,F=Math.imul(Oe,vt),H=(H=Math.imul(Oe,It))+Math.imul(Ue,vt)|0,V=Math.imul(Ue,It),F=F+Math.imul(De,rt)|0,H=(H=H+Math.imul(De,et)|0)+Math.imul(Ve,rt)|0,V=V+Math.imul(Ve,et)|0,F=F+Math.imul(_e,Vt)|0,H=(H=H+Math.imul(_e,Kt)|0)+Math.imul(Ae,Vt)|0,V=V+Math.imul(Ae,Kt)|0,F=F+Math.imul(fe,qe)|0,H=(H=H+Math.imul(fe,Re)|0)+Math.imul(me,qe)|0,V=V+Math.imul(me,Re)|0,F=F+Math.imul(we,ke)|0,H=(H=H+Math.imul(we,Le)|0)+Math.imul(be,ke)|0,V=V+Math.imul(be,Le)|0,F=F+Math.imul(ce,Ce)|0,H=(H=H+Math.imul(ce,Je)|0)+Math.imul(de,Ce)|0,V=V+Math.imul(de,Je)|0,F=F+Math.imul(se,ht)|0,H=(H=H+Math.imul(se,ut)|0)+Math.imul(oe,ht)|0,V=V+Math.imul(oe,ut)|0,F=F+Math.imul(J,ot)|0,H=(H=H+Math.imul(J,Lt)|0)+Math.imul(re,ot)|0,V=V+Math.imul(re,Lt)|0;var Xt=(W+(F=F+Math.imul(Q,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(Q,pt)|0)+Math.imul(j,Ze)|0))<<13)|0;W=((V=V+Math.imul(j,pt)|0)+(H>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,F=Math.imul(Oe,rt),H=(H=Math.imul(Oe,et))+Math.imul(Ue,rt)|0,V=Math.imul(Ue,et),F=F+Math.imul(De,Vt)|0,H=(H=H+Math.imul(De,Kt)|0)+Math.imul(Ve,Vt)|0,V=V+Math.imul(Ve,Kt)|0,F=F+Math.imul(_e,qe)|0,H=(H=H+Math.imul(_e,Re)|0)+Math.imul(Ae,qe)|0,V=V+Math.imul(Ae,Re)|0,F=F+Math.imul(fe,ke)|0,H=(H=H+Math.imul(fe,Le)|0)+Math.imul(me,ke)|0,V=V+Math.imul(me,Le)|0,F=F+Math.imul(we,Ce)|0,H=(H=H+Math.imul(we,Je)|0)+Math.imul(be,Ce)|0,V=V+Math.imul(be,Je)|0,F=F+Math.imul(ce,ht)|0,H=(H=H+Math.imul(ce,ut)|0)+Math.imul(de,ht)|0,V=V+Math.imul(de,ut)|0,F=F+Math.imul(se,ot)|0,H=(H=H+Math.imul(se,Lt)|0)+Math.imul(oe,ot)|0,V=V+Math.imul(oe,Lt)|0;var sr=(W+(F=F+Math.imul(J,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(J,pt)|0)+Math.imul(re,Ze)|0))<<13)|0;W=((V=V+Math.imul(re,pt)|0)+(H>>>13)|0)+(sr>>>26)|0,sr&=67108863,F=Math.imul(Oe,Vt),H=(H=Math.imul(Oe,Kt))+Math.imul(Ue,Vt)|0,V=Math.imul(Ue,Kt),F=F+Math.imul(De,qe)|0,H=(H=H+Math.imul(De,Re)|0)+Math.imul(Ve,qe)|0,V=V+Math.imul(Ve,Re)|0,F=F+Math.imul(_e,ke)|0,H=(H=H+Math.imul(_e,Le)|0)+Math.imul(Ae,ke)|0,V=V+Math.imul(Ae,Le)|0,F=F+Math.imul(fe,Ce)|0,H=(H=H+Math.imul(fe,Je)|0)+Math.imul(me,Ce)|0,V=V+Math.imul(me,Je)|0,F=F+Math.imul(we,ht)|0,H=(H=H+Math.imul(we,ut)|0)+Math.imul(be,ht)|0,V=V+Math.imul(be,ut)|0,F=F+Math.imul(ce,ot)|0,H=(H=H+Math.imul(ce,Lt)|0)+Math.imul(de,ot)|0,V=V+Math.imul(de,Lt)|0;var vr=(W+(F=F+Math.imul(se,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(se,pt)|0)+Math.imul(oe,Ze)|0))<<13)|0;W=((V=V+Math.imul(oe,pt)|0)+(H>>>13)|0)+(vr>>>26)|0,vr&=67108863,F=Math.imul(Oe,qe),H=(H=Math.imul(Oe,Re))+Math.imul(Ue,qe)|0,V=Math.imul(Ue,Re),F=F+Math.imul(De,ke)|0,H=(H=H+Math.imul(De,Le)|0)+Math.imul(Ve,ke)|0,V=V+Math.imul(Ve,Le)|0,F=F+Math.imul(_e,Ce)|0,H=(H=H+Math.imul(_e,Je)|0)+Math.imul(Ae,Ce)|0,V=V+Math.imul(Ae,Je)|0,F=F+Math.imul(fe,ht)|0,H=(H=H+Math.imul(fe,ut)|0)+Math.imul(me,ht)|0,V=V+Math.imul(me,ut)|0,F=F+Math.imul(we,ot)|0,H=(H=H+Math.imul(we,Lt)|0)+Math.imul(be,ot)|0,V=V+Math.imul(be,Lt)|0;var pr=(W+(F=F+Math.imul(ce,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(ce,pt)|0)+Math.imul(de,Ze)|0))<<13)|0;W=((V=V+Math.imul(de,pt)|0)+(H>>>13)|0)+(pr>>>26)|0,pr&=67108863,F=Math.imul(Oe,ke),H=(H=Math.imul(Oe,Le))+Math.imul(Ue,ke)|0,V=Math.imul(Ue,Le),F=F+Math.imul(De,Ce)|0,H=(H=H+Math.imul(De,Je)|0)+Math.imul(Ve,Ce)|0,V=V+Math.imul(Ve,Je)|0,F=F+Math.imul(_e,ht)|0,H=(H=H+Math.imul(_e,ut)|0)+Math.imul(Ae,ht)|0,V=V+Math.imul(Ae,ut)|0,F=F+Math.imul(fe,ot)|0,H=(H=H+Math.imul(fe,Lt)|0)+Math.imul(me,ot)|0,V=V+Math.imul(me,Lt)|0;var ar=(W+(F=F+Math.imul(we,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(we,pt)|0)+Math.imul(be,Ze)|0))<<13)|0;W=((V=V+Math.imul(be,pt)|0)+(H>>>13)|0)+(ar>>>26)|0,ar&=67108863,F=Math.imul(Oe,Ce),H=(H=Math.imul(Oe,Je))+Math.imul(Ue,Ce)|0,V=Math.imul(Ue,Je),F=F+Math.imul(De,ht)|0,H=(H=H+Math.imul(De,ut)|0)+Math.imul(Ve,ht)|0,V=V+Math.imul(Ve,ut)|0,F=F+Math.imul(_e,ot)|0,H=(H=H+Math.imul(_e,Lt)|0)+Math.imul(Ae,ot)|0,V=V+Math.imul(Ae,Lt)|0;var lr=(W+(F=F+Math.imul(fe,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(fe,pt)|0)+Math.imul(me,Ze)|0))<<13)|0;W=((V=V+Math.imul(me,pt)|0)+(H>>>13)|0)+(lr>>>26)|0,lr&=67108863,F=Math.imul(Oe,ht),H=(H=Math.imul(Oe,ut))+Math.imul(Ue,ht)|0,V=Math.imul(Ue,ut),F=F+Math.imul(De,ot)|0,H=(H=H+Math.imul(De,Lt)|0)+Math.imul(Ve,ot)|0,V=V+Math.imul(Ve,Lt)|0;var hr=(W+(F=F+Math.imul(_e,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(_e,pt)|0)+Math.imul(Ae,Ze)|0))<<13)|0;W=((V=V+Math.imul(Ae,pt)|0)+(H>>>13)|0)+(hr>>>26)|0,hr&=67108863,F=Math.imul(Oe,ot),H=(H=Math.imul(Oe,Lt))+Math.imul(Ue,ot)|0,V=Math.imul(Ue,Lt);var Or=(W+(F=F+Math.imul(De,Ze)|0)|0)+((8191&(H=(H=H+Math.imul(De,pt)|0)+Math.imul(Ve,Ze)|0))<<13)|0;W=((V=V+Math.imul(Ve,pt)|0)+(H>>>13)|0)+(Or>>>26)|0,Or&=67108863;var dr=(W+(F=Math.imul(Oe,Ze))|0)+((8191&(H=(H=Math.imul(Oe,pt))+Math.imul(Ue,Ze)|0))<<13)|0;return W=((V=Math.imul(Ue,pt))+(H>>>13)|0)+(dr>>>26)|0,dr&=67108863,q[0]=Ct,q[1]=zt,q[2]=Gt,q[3]=ze,q[4]=st,q[5]=yt,q[6]=Dt,q[7]=jt,q[8]=or,q[9]=Ut,q[10]=Xt,q[11]=sr,q[12]=vr,q[13]=pr,q[14]=ar,q[15]=lr,q[16]=hr,q[17]=Or,q[18]=dr,W!==0&&(q[19]=W,D.length++),D};function x(S,E,D){return new l().mulp(S,E,D)}function l(S,E){this.x=S,this.y=E}Math.imul||(a=p),r.prototype.mulTo=function(S,E){var D=this.length+S.length;return this.length===10&&S.length===10?a(this,S,E):D<63?p(this,S,E):D<1024?function(F,H,V){V.negative=H.negative^F.negative,V.length=F.length+H.length;for(var Z=0,K=0,q=0;q<V.length-1;q++){var W=K;K=0;for(var $=67108863&Z,R=Math.min(q,H.length-1),N=Math.max(0,q-F.length+1);N<=R;N++){var U=q-N,Q=(0|F.words[U])*(0|H.words[N]),j=67108863&Q;$=67108863&(j=j+$|0),K+=(W=(W=W+(Q/67108864|0)|0)+(j>>>26)|0)>>>26,W&=67108863}V.words[q]=$,Z=W,W=K}return Z!==0?V.words[q]=Z:V.length--,V.strip()}(this,S,E):x(this,S,E)},l.prototype.makeRBT=function(S){for(var E=new Array(S),D=r.prototype._countBits(S)-1,F=0;F<S;F++)E[F]=this.revBin(F,D,S);return E},l.prototype.revBin=function(S,E,D){if(S===0||S===D-1)return S;for(var F=0,H=0;H<E;H++)F|=(1&S)<<E-H-1,S>>=1;return F},l.prototype.permute=function(S,E,D,F,H,V){for(var Z=0;Z<V;Z++)F[Z]=E[S[Z]],H[Z]=D[S[Z]]},l.prototype.transform=function(S,E,D,F,H,V){this.permute(V,S,E,D,F,H);for(var Z=1;Z<H;Z<<=1)for(var K=Z<<1,q=Math.cos(2*Math.PI/K),W=Math.sin(2*Math.PI/K),$=0;$<H;$+=K)for(var R=q,N=W,U=0;U<Z;U++){var Q=D[$+U],j=F[$+U],X=D[$+U+Z],J=F[$+U+Z],re=R*X-N*J;J=R*J+N*X,X=re,D[$+U]=Q+X,F[$+U]=j+J,D[$+U+Z]=Q-X,F[$+U+Z]=j-J,U!==K&&(re=q*R-W*N,N=q*N+W*R,R=re)}},l.prototype.guessLen13b=function(S,E){var D=1|Math.max(E,S),F=1&D,H=0;for(D=D/2|0;D;D>>>=1)H++;return 1<<H+1+F},l.prototype.conjugate=function(S,E,D){if(!(D<=1))for(var F=0;F<D/2;F++){var H=S[F];S[F]=S[D-F-1],S[D-F-1]=H,H=E[F],E[F]=-E[D-F-1],E[D-F-1]=-H}},l.prototype.normalize13b=function(S,E){for(var D=0,F=0;F<E/2;F++){var H=8192*Math.round(S[2*F+1]/E)+Math.round(S[2*F]/E)+D;S[F]=67108863&H,D=H<67108864?0:H/67108864|0}return S},l.prototype.convert13b=function(S,E,D,F){for(var H=0,V=0;V<E;V++)H+=0|S[V],D[2*V]=8191&H,H>>>=13,D[2*V+1]=8191&H,H>>>=13;for(V=2*E;V<F;++V)D[V]=0;t(H===0),t((-8192&H)==0)},l.prototype.stub=function(S){for(var E=new Array(S),D=0;D<S;D++)E[D]=0;return E},l.prototype.mulp=function(S,E,D){var F=2*this.guessLen13b(S.length,E.length),H=this.makeRBT(F),V=this.stub(F),Z=new Array(F),K=new Array(F),q=new Array(F),W=new Array(F),$=new Array(F),R=new Array(F),N=D.words;N.length=F,this.convert13b(S.words,S.length,Z,F),this.convert13b(E.words,E.length,W,F),this.transform(Z,V,K,q,F,H),this.transform(W,V,$,R,F,H);for(var U=0;U<F;U++){var Q=K[U]*$[U]-q[U]*R[U];q[U]=K[U]*R[U]+q[U]*$[U],K[U]=Q}return this.conjugate(K,q,F),this.transform(K,q,N,V,F,H),this.conjugate(N,V,F),this.normalize13b(N,F),D.negative=S.negative^E.negative,D.length=S.length+E.length,D.strip()},r.prototype.mul=function(S){var E=new r(null);return E.words=new Array(this.length+S.length),this.mulTo(S,E)},r.prototype.mulf=function(S){var E=new r(null);return E.words=new Array(this.length+S.length),x(this,S,E)},r.prototype.imul=function(S){return this.clone().mulTo(S,this)},r.prototype.imuln=function(S){t(typeof S=="number"),t(S<67108864);for(var E=0,D=0;D<this.length;D++){var F=(0|this.words[D])*S,H=(67108863&F)+(67108863&E);E>>=26,E+=F/67108864|0,E+=H>>>26,this.words[D]=67108863&H}return E!==0&&(this.words[D]=E,this.length++),this},r.prototype.muln=function(S){return this.clone().imuln(S)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(S){var E=function(V){for(var Z=new Array(V.bitLength()),K=0;K<Z.length;K++){var q=K/26|0,W=K%26;Z[K]=(V.words[q]&1<<W)>>>W}return Z}(S);if(E.length===0)return new r(1);for(var D=this,F=0;F<E.length&&E[F]===0;F++,D=D.sqr());if(++F<E.length)for(var H=D.sqr();F<E.length;F++,H=H.sqr())E[F]!==0&&(D=D.mul(H));return D},r.prototype.iushln=function(S){t(typeof S=="number"&&S>=0);var E,D=S%26,F=(S-D)/26,H=67108863>>>26-D<<26-D;if(D!==0){var V=0;for(E=0;E<this.length;E++){var Z=this.words[E]&H,K=(0|this.words[E])-Z<<D;this.words[E]=K|V,V=Z>>>26-D}V&&(this.words[E]=V,this.length++)}if(F!==0){for(E=this.length-1;E>=0;E--)this.words[E+F]=this.words[E];for(E=0;E<F;E++)this.words[E]=0;this.length+=F}return this.strip()},r.prototype.ishln=function(S){return t(this.negative===0),this.iushln(S)},r.prototype.iushrn=function(S,E,D){var F;t(typeof S=="number"&&S>=0),F=E?(E-E%26)/26:0;var H=S%26,V=Math.min((S-H)/26,this.length),Z=67108863^67108863>>>H<<H,K=D;if(F-=V,F=Math.max(0,F),K){for(var q=0;q<V;q++)K.words[q]=this.words[q];K.length=V}if(V!==0)if(this.length>V)for(this.length-=V,q=0;q<this.length;q++)this.words[q]=this.words[q+V];else this.words[0]=0,this.length=1;var W=0;for(q=this.length-1;q>=0&&(W!==0||q>=F);q--){var $=0|this.words[q];this.words[q]=W<<26-H|$>>>H,W=$&Z}return K&&W!==0&&(K.words[K.length++]=W),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(S,E,D){return t(this.negative===0),this.iushrn(S,E,D)},r.prototype.shln=function(S){return this.clone().ishln(S)},r.prototype.ushln=function(S){return this.clone().iushln(S)},r.prototype.shrn=function(S){return this.clone().ishrn(S)},r.prototype.ushrn=function(S){return this.clone().iushrn(S)},r.prototype.testn=function(S){t(typeof S=="number"&&S>=0);var E=S%26,D=(S-E)/26,F=1<<E;return!(this.length<=D)&&!!(this.words[D]&F)},r.prototype.imaskn=function(S){t(typeof S=="number"&&S>=0);var E=S%26,D=(S-E)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=D)return this;if(E!==0&&D++,this.length=Math.min(D,this.length),E!==0){var F=67108863^67108863>>>E<<E;this.words[this.length-1]&=F}return this.strip()},r.prototype.maskn=function(S){return this.clone().imaskn(S)},r.prototype.iaddn=function(S){return t(typeof S=="number"),t(S<67108864),S<0?this.isubn(-S):this.negative!==0?this.length===1&&(0|this.words[0])<S?(this.words[0]=S-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(S),this.negative=1,this):this._iaddn(S)},r.prototype._iaddn=function(S){this.words[0]+=S;for(var E=0;E<this.length&&this.words[E]>=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},r.prototype.isubn=function(S){if(t(typeof S=="number"),t(S<67108864),S<0)return this.iaddn(-S);if(this.negative!==0)return this.negative=0,this.iaddn(S),this.negative=1,this;if(this.words[0]-=S,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E<this.length&&this.words[E]<0;E++)this.words[E]+=67108864,this.words[E+1]-=1;return this.strip()},r.prototype.addn=function(S){return this.clone().iaddn(S)},r.prototype.subn=function(S){return this.clone().isubn(S)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(S,E,D){var F,H,V=S.length+D;this._expand(V);var Z=0;for(F=0;F<S.length;F++){H=(0|this.words[F+D])+Z;var K=(0|S.words[F])*E;Z=((H-=67108863&K)>>26)-(K/67108864|0),this.words[F+D]=67108863&H}for(;F<this.length-D;F++)Z=(H=(0|this.words[F+D])+Z)>>26,this.words[F+D]=67108863&H;if(Z===0)return this.strip();for(t(Z===-1),Z=0,F=0;F<this.length;F++)Z=(H=-(0|this.words[F])+Z)>>26,this.words[F]=67108863&H;return this.negative=1,this.strip()},r.prototype._wordDiv=function(S,E){var D=(this.length,S.length),F=this.clone(),H=S,V=0|H.words[H.length-1];(D=26-this._countBits(V))!==0&&(H=H.ushln(D),F.iushln(D),V=0|H.words[H.length-1]);var Z,K=F.length-H.length;if(E!=="mod"){(Z=new r(null)).length=K+1,Z.words=new Array(Z.length);for(var q=0;q<Z.length;q++)Z.words[q]=0}var W=F.clone()._ishlnsubmul(H,1,K);W.negative===0&&(F=W,Z&&(Z.words[K]=1));for(var $=K-1;$>=0;$--){var R=67108864*(0|F.words[H.length+$])+(0|F.words[H.length+$-1]);for(R=Math.min(R/V|0,67108863),F._ishlnsubmul(H,R,$);F.negative!==0;)R--,F.negative=0,F._ishlnsubmul(H,1,$),F.isZero()||(F.negative^=1);Z&&(Z.words[$]=R)}return Z&&Z.strip(),F.strip(),E!=="div"&&D!==0&&F.iushrn(D),{div:Z||null,mod:F}},r.prototype.divmod=function(S,E,D){return t(!S.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:this.negative!==0&&S.negative===0?(V=this.neg().divmod(S,E),E!=="mod"&&(F=V.div.neg()),E!=="div"&&(H=V.mod.neg(),D&&H.negative!==0&&H.iadd(S)),{div:F,mod:H}):this.negative===0&&S.negative!==0?(V=this.divmod(S.neg(),E),E!=="mod"&&(F=V.div.neg()),{div:F,mod:V.mod}):this.negative&S.negative?(V=this.neg().divmod(S.neg(),E),E!=="div"&&(H=V.mod.neg(),D&&H.negative!==0&&H.isub(S)),{div:V.div,mod:H}):S.length>this.length||this.cmp(S)<0?{div:new r(0),mod:this}:S.length===1?E==="div"?{div:this.divn(S.words[0]),mod:null}:E==="mod"?{div:null,mod:new r(this.modn(S.words[0]))}:{div:this.divn(S.words[0]),mod:new r(this.modn(S.words[0]))}:this._wordDiv(S,E);var F,H,V},r.prototype.div=function(S){return this.divmod(S,"div",!1).div},r.prototype.mod=function(S){return this.divmod(S,"mod",!1).mod},r.prototype.umod=function(S){return this.divmod(S,"mod",!0).mod},r.prototype.divRound=function(S){var E=this.divmod(S);if(E.mod.isZero())return E.div;var D=E.div.negative!==0?E.mod.isub(S):E.mod,F=S.ushrn(1),H=S.andln(1),V=D.cmp(F);return V<0||H===1&&V===0?E.div:E.div.negative!==0?E.div.isubn(1):E.div.iaddn(1)},r.prototype.modn=function(S){t(S<=67108863);for(var E=(1<<26)%S,D=0,F=this.length-1;F>=0;F--)D=(E*D+(0|this.words[F]))%S;return D},r.prototype.idivn=function(S){t(S<=67108863);for(var E=0,D=this.length-1;D>=0;D--){var F=(0|this.words[D])+67108864*E;this.words[D]=F/S|0,E=F%S}return this.strip()},r.prototype.divn=function(S){return this.clone().idivn(S)},r.prototype.egcd=function(S){t(S.negative===0),t(!S.isZero());var E=this,D=S.clone();E=E.negative!==0?E.umod(S):E.clone();for(var F=new r(1),H=new r(0),V=new r(0),Z=new r(1),K=0;E.isEven()&&D.isEven();)E.iushrn(1),D.iushrn(1),++K;for(var q=D.clone(),W=E.clone();!E.isZero();){for(var $=0,R=1;!(E.words[0]&R)&&$<26;++$,R<<=1);if($>0)for(E.iushrn($);$-- >0;)(F.isOdd()||H.isOdd())&&(F.iadd(q),H.isub(W)),F.iushrn(1),H.iushrn(1);for(var N=0,U=1;!(D.words[0]&U)&&N<26;++N,U<<=1);if(N>0)for(D.iushrn(N);N-- >0;
1357)(V.isOdd()||Z.isOdd())&&(V.iadd(q),Z.isub(W)),V.iushrn(1),Z.iushrn(1);E.cmp(D)>=0?(E.isub(D),F.isub(V),H.isub(Z)):(D.isub(E),V.isub(F),Z.isub(H))}return{a:V,b:Z,gcd:D.iushln(K)}},r.prototype._invmp=function(S){t(S.negative===0),t(!S.isZero());var E=this,D=S.clone();E=E.negative!==0?E.umod(S):E.clone();for(var F,H=new r(1),V=new r(0),Z=D.clone();E.cmpn(1)>0&&D.cmpn(1)>0;){for(var K=0,q=1;!(E.words[0]&q)&&K<26;++K,q<<=1);if(K>0)for(E.iushrn(K);K-- >0;)H.isOdd()&&H.iadd(Z),H.iushrn(1);for(var W=0,$=1;!(D.words[0]&$)&&W<26;++W,$<<=1);if(W>0)for(D.iushrn(W);W-- >0;)V.isOdd()&&V.iadd(Z),V.iushrn(1);E.cmp(D)>=0?(E.isub(D),H.isub(V)):(D.isub(E),V.isub(H))}return(F=E.cmpn(1)===0?H:V).cmpn(0)<0&&F.iadd(S),F},r.prototype.gcd=function(S){if(this.isZero())return S.abs();if(S.isZero())return this.abs();var E=this.clone(),D=S.clone();E.negative=0,D.negative=0;for(var F=0;E.isEven()&&D.isEven();F++)E.iushrn(1),D.iushrn(1);for(;;){for(;E.isEven();)E.iushrn(1);for(;D.isEven();)D.iushrn(1);var H=E.cmp(D);if(H<0){var V=E;E=D,D=V}else if(H===0||D.cmpn(1)===0)break;E.isub(D)}return D.iushln(F)},r.prototype.invm=function(S){return this.egcd(S).a.umod(S)},r.prototype.isEven=function(){return(1&this.words[0])==0},r.prototype.isOdd=function(){return(1&this.words[0])==1},r.prototype.andln=function(S){return this.words[0]&S},r.prototype.bincn=function(S){t(typeof S=="number");var E=S%26,D=(S-E)/26,F=1<<E;if(this.length<=D)return this._expand(D+1),this.words[D]|=F,this;for(var H=F,V=D;H!==0&&V<this.length;V++){var Z=0|this.words[V];H=(Z+=H)>>>26,Z&=67108863,this.words[V]=Z}return H!==0&&(this.words[V]=H,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(S){var E,D=S<0;if(this.negative!==0&&!D)return-1;if(this.negative===0&&D)return 1;if(this.strip(),this.length>1)E=1;else{D&&(S=-S),t(S<=67108863,"Number is too big");var F=0|this.words[0];E=F===S?0:F<S?-1:1}return this.negative!==0?0|-E:E},r.prototype.cmp=function(S){if(this.negative!==0&&S.negative===0)return-1;if(this.negative===0&&S.negative!==0)return 1;var E=this.ucmp(S);return this.negative!==0?0|-E:E},r.prototype.ucmp=function(S){if(this.length>S.length)return 1;if(this.length<S.length)return-1;for(var E=0,D=this.length-1;D>=0;D--){var F=0|this.words[D],H=0|S.words[D];if(F!==H){F<H?E=-1:F>H&&(E=1);break}}return E},r.prototype.gtn=function(S){return this.cmpn(S)===1},r.prototype.gt=function(S){return this.cmp(S)===1},r.prototype.gten=function(S){return this.cmpn(S)>=0},r.prototype.gte=function(S){return this.cmp(S)>=0},r.prototype.ltn=function(S){return this.cmpn(S)===-1},r.prototype.lt=function(S){return this.cmp(S)===-1},r.prototype.lten=function(S){return this.cmpn(S)<=0},r.prototype.lte=function(S){return this.cmp(S)<=0},r.prototype.eqn=function(S){return this.cmpn(S)===0},r.prototype.eq=function(S){return this.cmp(S)===0},r.red=function(S){return new I(S)},r.prototype.toRed=function(S){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),S.convertTo(this)._forceRed(S)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(S){return this.red=S,this},r.prototype.forceRed=function(S){return t(!this.red,"Already a number in reduction context"),this._forceRed(S)},r.prototype.redAdd=function(S){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,S)},r.prototype.redIAdd=function(S){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,S)},r.prototype.redSub=function(S){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,S)},r.prototype.redISub=function(S){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,S)},r.prototype.redShl=function(S){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,S)},r.prototype.redMul=function(S){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,S),this.red.mul(this,S)},r.prototype.redIMul=function(S){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,S),this.red.imul(this,S)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(S){return t(this.red&&!S.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,S)};var w={k256:null,p224:null,p192:null,p25519:null};function _(S,E){this.name=S,this.p=new r(E,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function T(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function L(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(S){if(typeof S=="string"){var E=r._prime(S);this.m=E.p,this.prime=E}else t(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}function P(S){I.call(this,S),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var S=new r(null);return S.words=new Array(Math.ceil(this.n/13)),S},_.prototype.ireduce=function(S){var E,D=S;do this.split(D,this.tmp),E=(D=(D=this.imulK(D)).iadd(this.tmp)).bitLength();while(E>this.n);var F=E<this.n?-1:D.ucmp(this.p);return F===0?(D.words[0]=0,D.length=1):F>0?D.isub(this.p):D.strip!==void 0?D.strip():D._strip(),D},_.prototype.split=function(S,E){S.iushrn(this.n,0,E)},_.prototype.imulK=function(S){return S.imul(this.k)},o(T,_),T.prototype.split=function(S,E){for(var D=Math.min(S.length,9),F=0;F<D;F++)E.words[F]=S.words[F];if(E.length=D,S.length<=9)return S.words[0]=0,void(S.length=1);var H=S.words[9];for(E.words[E.length++]=4194303&H,F=10;F<S.length;F++){var V=0|S.words[F];S.words[F-10]=(4194303&V)<<4|H>>>22,H=V}H>>>=22,S.words[F-10]=H,H===0&&S.length>10?S.length-=10:S.length-=9},T.prototype.imulK=function(S){S.words[S.length]=0,S.words[S.length+1]=0,S.length+=2;for(var E=0,D=0;D<S.length;D++){var F=0|S.words[D];E+=977*F,S.words[D]=67108863&E,E=64*F+(E/67108864|0)}return S.words[S.length-1]===0&&(S.length--,S.words[S.length-1]===0&&S.length--),S},o(k,_),o(L,_),o(A,_),A.prototype.imulK=function(S){for(var E=0,D=0;D<S.length;D++){var F=19*(0|S.words[D])+E,H=67108863&F;F>>>=26,S.words[D]=H,E=F}return E!==0&&(S.words[S.length++]=E),S},r._prime=function(S){if(w[S])return w[S];var E;if(S==="k256")E=new T;else if(S==="p224")E=new k;else if(S==="p192")E=new L;else{if(S!=="p25519")throw new Error("Unknown prime "+S);E=new A}return w[S]=E,E},I.prototype._verify1=function(S){t(S.negative===0,"red works only with positives"),t(S.red,"red works only with red numbers")},I.prototype._verify2=function(S,E){t((S.negative|E.negative)==0,"red works only with positives"),t(S.red&&S.red===E.red,"red works only with red numbers")},I.prototype.imod=function(S){return this.prime?this.prime.ireduce(S)._forceRed(this):S.umod(this.m)._forceRed(this)},I.prototype.neg=function(S){return S.isZero()?S.clone():this.m.sub(S)._forceRed(this)},I.prototype.add=function(S,E){this._verify2(S,E);var D=S.add(E);return D.cmp(this.m)>=0&&D.isub(this.m),D._forceRed(this)},I.prototype.iadd=function(S,E){this._verify2(S,E);var D=S.iadd(E);return D.cmp(this.m)>=0&&D.isub(this.m),D},I.prototype.sub=function(S,E){this._verify2(S,E);var D=S.sub(E);return D.cmpn(0)<0&&D.iadd(this.m),D._forceRed(this)},I.prototype.isub=function(S,E){this._verify2(S,E);var D=S.isub(E);return D.cmpn(0)<0&&D.iadd(this.m),D},I.prototype.shl=function(S,E){return this._verify1(S),this.imod(S.ushln(E))},I.prototype.imul=function(S,E){return this._verify2(S,E),this.imod(S.imul(E))},I.prototype.mul=function(S,E){return this._verify2(S,E),this.imod(S.mul(E))},I.prototype.isqr=function(S){return this.imul(S,S.clone())},I.prototype.sqr=function(S){return this.mul(S,S)},I.prototype.sqrt=function(S){if(S.isZero())return S.clone();var E=this.m.andln(3);if(t(E%2==1),E===3){var D=this.m.add(new r(1)).iushrn(2);return this.pow(S,D)}for(var F=this.m.subn(1),H=0;!F.isZero()&&F.andln(1)===0;)H++,F.iushrn(1);t(!F.isZero());var V=new r(1).toRed(this),Z=V.redNeg(),K=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new r(2*q*q).toRed(this);this.pow(q,K).cmp(Z)!==0;)q.redIAdd(Z);for(var W=this.pow(q,F),$=this.pow(S,F.addn(1).iushrn(1)),R=this.pow(S,F),N=H;R.cmp(V)!==0;){for(var U=R,Q=0;U.cmp(V)!==0;Q++)U=U.redSqr();t(Q<N);var j=this.pow(W,new r(1).iushln(N-Q-1));$=$.redMul(j),W=j.redSqr(),R=R.redMul(W),N=Q}return $},I.prototype.invm=function(S){var E=S._invmp(this.m);return E.negative!==0?(E.negative=0,this.imod(E).redNeg()):this.imod(E)}
1357,I.prototype.pow=function(S,E){if(E.isZero())return new r(1).toRed(this);if(E.cmpn(1)===0)return S.clone();var D=new Array(16);D[0]=new r(1).toRed(this),D[1]=S;for(var F=2;F<D.length;F++)D[F]=this.mul(D[F-1],S);var H=D[0],V=0,Z=0,K=E.bitLength()%26;for(K===0&&(K=26),F=E.length-1;F>=0;F--){for(var q=E.words[F],W=K-1;W>=0;W--){var $=q>>W&1;H!==D[0]&&(H=this.sqr(H)),$!==0||V!==0?(V<<=1,V|=$,(++Z===4||F===0&&W===0)&&(H=this.mul(H,D[V]),Z=0,V=0)):Z=0}K=26}return H},I.prototype.convertTo=function(S){var E=S.umod(this.m);return E===S?E.clone():E},I.prototype.convertFrom=function(S){var E=S.clone();return E.red=null,E},r.mont=function(S){return new P(S)},o(P,I),P.prototype.convertTo=function(S){return this.imod(S.ushln(this.shift))},P.prototype.convertFrom=function(S){var E=this.imod(S.mul(this.rinv));return E.red=null,E},P.prototype.imul=function(S,E){if(S.isZero()||E.isZero())return S.words[0]=0,S.length=1,S;var D=S.imul(E),F=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),H=D.isub(F).iushrn(this.shift),V=H;return H.cmp(this.m)>=0?V=H.isub(this.m):H.cmpn(0)<0&&(V=H.iadd(this.m)),V._forceRed(this)},P.prototype.mul=function(S,E){if(S.isZero()||E.isZero())return new r(0)._forceRed(this);var D=S.mul(E),F=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),H=D.isub(F).iushrn(this.shift),V=H;return H.cmp(this.m)>=0?V=H.isub(this.m):H.cmpn(0)<0&&(V=H.iadd(this.m)),V._forceRed(this)},P.prototype.invm=function(S){return this.imod(S._invmp(this.m).mul(this.r2))._forceRed(this)}})(b===void 0||b,this)},{buffer:2}],34:[function(m,b,v){b.exports=function(e){var n,t,o,r=e.length,d=0;for(n=0;n<r;++n)d+=e[n].length;var c=new Array(d),i=0;for(n=0;n<r;++n){var u=e[n],f=u.length;for(t=0;t<f;++t){var s=c[i++]=new Array(f-1),h=0;for(o=0;o<f;++o)o!==t&&(s[h++]=u[o]);if(1&t){var p=s[1];s[1]=s[0],s[0]=p}}}return c}},{}],35:[function(m,b,v){b.exports=function(s,h,p){switch(arguments.length){case 1:return u(s);case 2:return typeof h=="function"?c(s,s,h,!0):f(s,h);case 3:return c(s,h,p,!1);default:throw new Error("box-intersect: Invalid arguments")}};var e,n=m("typedarray-pool"),t=m("./lib/sweep"),o=m("./lib/intersect");function r(s,h){for(var p=0;p<s;++p)if(!(h[p]<=h[p+s]))return!0;return!1}function d(s,h,p,a){for(var x=0,l=0,w=0,_=s.length;w<_;++w){var T=s[w];if(!r(h,T)){for(var k=0;k<2*h;++k)p[x++]=T[k];a[l++]=w}}return l}function c(s,h,p,a){var x=s.length,l=h.length;if(!(x<=0||l<=0)){var w=s[0].length>>>1;if(!(w<=0)){var _,T=n.mallocDouble(2*w*x),k=n.mallocInt32(x);if((x=d(s,w,T,k))>0){if(w===1&&a)t.init(x),_=t.sweepComplete(w,p,0,x,T,k,0,x,T,k);else{var L=n.mallocDouble(2*w*l),A=n.mallocInt32(l);(l=d(h,w,L,A))>0&&(t.init(x+l),_=w===1?t.sweepBipartite(w,p,0,x,T,k,0,l,L,A):o(w,p,a,x,T,k,l,L,A),n.free(L),n.free(A))}n.free(T),n.free(k)}return _}}}function i(s,h){e.push([s,h])}function u(s){return e=[],c(s,s,i,!0),e}function f(s,h){return e=[],c(s,h,i,!1),e}},{"./lib/intersect":37,"./lib/sweep":41,"typedarray-pool":308}],36:[function(m,b,v){function e(n){return n?function(t,o,r,d,c,i,u,f,s,h,p){return c-d>s-f?function(a,x,l,w,_,T,k,L,A,I,P){for(var S=2*a,E=w,D=S*w;E<_;++E,D+=S){var F=T[x+D],H=T[x+D+a],V=k[E];e:for(var Z=L,K=S*L;Z<A;++Z,K+=S){var q=I[x+K],W=I[x+K+a],$=P[Z];if(!(W<F||H<q)){for(var R=x+1;R<a;++R){var N=T[R+D],U=T[R+a+D],Q=I[R+K],j=I[R+a+K];if(U<Q||j<N)continue e}var X=l(V,$);if(X!==void 0)return X}}}}(t,o,r,d,c,i,u,f,s,h,p):function(a,x,l,w,_,T,k,L,A,I,P){for(var S=2*a,E=L,D=S*L;E<A;++E,D+=S){var F=I[x+D],H=I[x+D+a],V=P[E];e:for(var Z=w,K=S*w;Z<_;++Z,K+=S){var q=T[x+K],W=T[x+K+a],$=k[Z];if(!(H<q||W<F)){for(var R=x+1;R<a;++R){var N=T[R+K],U=T[R+a+K],Q=I[R+D],j=I[R+a+D];if(U<Q||j<N)continue e}var X=l($,V);if(X!==void 0)return X}}}}(t,o,r,d,c,i,u,f,s,h,p)}:function(t,o,r,d,c,i,u,f,s,h,p,a){return i-c>h-s?d?function(x,l,w,_,T,k,L,A,I,P,S){for(var E=2*x,D=_,F=E*_;D<T;++D,F+=E){var H=k[l+F],V=k[l+F+x],Z=L[D];e:for(var K=A,q=E*A;K<I;++K,q+=E){var W=P[l+q],$=S[K];if(!(W<=H||V<W)){for(var R=l+1;R<x;++R){var N=k[R+F],U=k[R+x+F],Q=P[R+q],j=P[R+x+q];if(U<Q||j<N)continue e}var X=w($,Z);if(X!==void 0)return X}}}}(t,o,r,c,i,u,f,s,h,p,a):function(x,l,w,_,T,k,L,A,I,P,S){for(var E=2*x,D=_,F=E*_;D<T;++D,F+=E){var H=k[l+F],V=k[l+F+x],Z=L[D];e:for(var K=A,q=E*A;K<I;++K,q+=E){var W=P[l+q],$=S[K];if(!(W<H||V<W)){for(var R=l+1;R<x;++R){var N=k[R+F],U=k[R+x+F],Q=P[R+q],j=P[R+x+q];if(U<Q||j<N)continue e}var X=w(Z,$);if(X!==void 0)return X}}}}(t,o,r,c,i,u,f,s,h,p,a):d?function(x,l,w,_,T,k,L,A,I,P,S){for(var E=2*x,D=A,F=E*A;D<I;++D,F+=E){var H=P[l+F],V=S[D];e:for(var Z=_,K=E*_;Z<T;++Z,K+=E){var q=k[l+K],W=k[l+K+x],$=L[Z];if(!(H<=q||W<H)){for(var R=l+1;R<x;++R){var N=k[R+K],U=k[R+x+K],Q=P[R+F],j=P[R+x+F];if(U<Q||j<N)continue e}var X=w(V,$);if(X!==void 0)return X}}}}(t,o,r,c,i,u,f,s,h,p,a):function(x,l,w,_,T,k,L,A,I,P,S){for(var E=2*x,D=A,F=E*A;D<I;++D,F+=E){var H=P[l+F],V=S[D];e:for(var Z=_,K=E*_;Z<T;++Z,K+=E){var q=k[l+K],W=k[l+K+x],$=L[Z];if(!(H<q||W<H)){for(var R=l+1;R<x;++R){var N=k[R+K],U=k[R+x+K],Q=P[R+F],j=P[R+x+F];if(U<Q||j<N)continue e}var X=w($,V);if(X!==void 0)return X}}}}(t,o,r,c,i,u,f,s,h,p,a)}}v.partial=e(!1),v.full=e(!0)},{}],37:[function(m,b,v){b.exports=function(k,L,A,I,P,S,E,D,F){(function(Te,_e){var Ae=8*n.log2(_e+1)*(Te+1)|0,Pe=n.nextPow2(6*Ae);x.length<Pe&&(e.free(x),x=e.mallocInt32(Pe));var De=n.nextPow2(2*Ae);l.length<De&&(e.free(l),l=e.mallocDouble(De))})(k,I+E);var H,V=0,Z=2*k;for(w(V++,0,0,I,0,E,A?16:0,-1/0,1/0),A||w(V++,0,0,E,0,I,1,-1/0,1/0);V>0;){var K=6*(V-=1),q=x[K],W=x[K+1],$=x[K+2],R=x[K+3],N=x[K+4],U=x[K+5],Q=2*V,j=l[Q],X=l[Q+1],J=1&U,re=!!(16&U),ne=P,se=S,oe=D,pe=F;if(J&&(ne=D,se=F,oe=P,pe=S),!(2&U&&($=s(k,q,W,$,ne,se,X),W>=$)||4&U&&(W=h(k,q,W,$,ne,se,j))>=$)){var ce=$-W,de=N-R;if(re){if(k*ce*(ce+de)<1<<22){if((H=d.scanComplete(k,q,L,W,$,ne,se,R,N,oe,pe))!==void 0)return H;continue}}else{if(k*Math.min(ce,de)<128){if((H=o(k,q,L,J,W,$,ne,se,R,N,oe,pe))!==void 0)return H;continue}if(k*ce*de<1<<22){if((H=d.scanBipartite(k,q,L,J,W,$,ne,se,R,N,oe,pe))!==void 0)return H;continue}}var xe=u(k,q,W,$,ne,se,j,X);if(W<xe)if(k*(xe-W)<128){if((H=r(k,q+1,L,W,xe,ne,se,R,N,oe,pe))!==void 0)return H}else if(q===k-2){if((H=J?d.sweepBipartite(k,L,R,N,oe,pe,W,xe,ne,se):d.sweepBipartite(k,L,W,xe,ne,se,R,N,oe,pe))!==void 0)return H}else w(V++,q+1,W,xe,R,N,J,-1/0,1/0),w(V++,q+1,R,N,W,xe,1^J,-1/0,1/0);if(xe<$){var we=c(k,q,R,N,oe,pe),be=oe[Z*we+q],Ee=f(k,q,we,N,oe,pe,be);if(Ee<N&&w(V++,q,xe,$,Ee,N,(4|J)+(re?16:0),be,X),R<we&&w(V++,q,xe,$,R,we,(2|J)+(re?16:0),j,be),we+1===Ee){if((H=re?T(k,q,L,xe,$,ne,se,we,oe,pe[we]):_(k,q,L,J,xe,$,ne,se,we,oe,pe[we]))!==void 0)return H}else if(we<Ee){var fe;if(re){if(fe=p(k,q,xe,$,ne,se,be),xe<fe){var me=f(k,q,xe,fe,ne,se,be);if(q===k-2){if(xe<me&&(H=d.sweepComplete(k,L,xe,me,ne,se,we,Ee,oe,pe))!==void 0||me<fe&&(H=d.sweepBipartite(k,L,me,fe,ne,se,we,Ee,oe,pe))!==void 0)return H}else xe<me&&w(V++,q+1,xe,me,we,Ee,16,-1/0,1/0),me<fe&&(w(V++,q+1,me,fe,we,Ee,0,-1/0,1/0),w(V++,q+1,we,Ee,me,fe,1,-1/0,1/0))}}else fe=J?a(k,q,xe,$,ne,se,be):p(k,q,xe,$,ne,se,be),xe<fe&&(q===k-2?H=J?d.sweepBipartite(k,L,we,Ee,oe,pe,xe,fe,ne,se):d.sweepBipartite(k,L,xe,fe,ne,se,we,Ee,oe,pe):(w(V++,q+1,xe,fe,
1357we,Ee,J,-1/0,1/0),w(V++,q+1,we,Ee,xe,fe,1^J,-1/0,1/0)))}}}}};var e=m("typedarray-pool"),n=m("bit-twiddle"),t=m("./brute"),o=t.partial,r=t.full,d=m("./sweep"),c=m("./median"),i=m("./partition"),u=i("!(lo>=p0)&&!(p1>=hi)"),f=i("lo===p0"),s=i("lo<p0"),h=i("hi<=p0"),p=i("lo<=p0&&p0<=hi"),a=i("lo<p0&&p0<=hi"),x=e.mallocInt32(1024),l=e.mallocDouble(1024);function w(k,L,A,I,P,S,E,D,F){var H=6*k;x[H]=L,x[H+1]=A,x[H+2]=I,x[H+3]=P,x[H+4]=S,x[H+5]=E;var V=2*k;l[V]=D,l[V+1]=F}function _(k,L,A,I,P,S,E,D,F,H,V){var Z=2*k,K=F*Z,q=H[K+L];e:for(var W=P,$=P*Z;W<S;++W,$+=Z){var R=E[$+L],N=E[$+L+k];if(!(q<R||N<q)&&(!I||q!==R)){for(var U,Q=D[W],j=L+1;j<k;++j){R=E[$+j],N=E[$+j+k];var X=H[K+j],J=H[K+j+k];if(N<X||J<R)continue e}if((U=I?A(V,Q):A(Q,V))!==void 0)return U}}}function T(k,L,A,I,P,S,E,D,F,H){var V=2*k,Z=D*V,K=F[Z+L];e:for(var q=I,W=I*V;q<P;++q,W+=V){var $=E[q];if($!==H){var R=S[W+L],N=S[W+L+k];if(!(K<R||N<K)){for(var U=L+1;U<k;++U){R=S[W+U],N=S[W+U+k];var Q=F[Z+U],j=F[Z+U+k];if(N<Q||j<R)continue e}var X=A($,H);if(X!==void 0)return X}}}}},{"./brute":36,"./median":38,"./partition":39,"./sweep":41,"bit-twiddle":32,"typedarray-pool":308}],38:[function(m,b,v){b.exports=function(t,o,r,d,c,i){if(d<=r+1)return r;for(var u=r,f=d,s=d+r>>>1,h=2*t,p=s,a=c[h*s+o];u<f;){if(f-u<8){n(t,o,u,f,c,i),a=c[h*s+o];break}var x=f-u,l=Math.random()*x+u|0,w=c[h*l+o],_=Math.random()*x+u|0,T=c[h*_+o],k=Math.random()*x+u|0,L=c[h*k+o];w<=T?L>=T?(p=_,a=T):w>=L?(p=l,a=w):(p=k,a=L):T>=L?(p=_,a=T):L>=w?(p=l,a=w):(p=k,a=L);for(var A=h*(f-1),I=h*p,P=0;P<h;++P,++A,++I){var S=c[A];c[A]=c[I],c[I]=S}var E=i[f-1];for(i[f-1]=i[p],i[p]=E,p=e(t,o,u,f-1,c,i,a),A=h*(f-1),I=h*p,P=0;P<h;++P,++A,++I)S=c[A],c[A]=c[I],c[I]=S;if(E=i[f-1],i[f-1]=i[p],i[p]=E,s<p){for(f=p-1;u<f&&c[h*(f-1)+o]===a;)f-=1;f+=1}else{if(!(p<s))break;for(u=p+1;u<f&&c[h*u+o]===a;)u+=1}}return e(t,o,r,s,c,i,c[h*s+o])};var e=m("./partition")("lo<p0");function n(t,o,r,d,c,i){for(var u=2*t,f=u*(r+1)+o,s=r+1;s<d;++s,f+=u)for(var h=c[f],p=s,a=u*(s-1);p>r&&c[a+o]>h;--p,a-=u){for(var x=a,l=a+u,w=0;w<u;++w,++x,++l){var _=c[x];c[x]=c[l],c[l]=_}var T=i[p];i[p]=i[p-1],i[p-1]=T}}},{"./partition":39}],39:[function(m,b,v){b.exports=function(n){return e[n]};var e={"lo===p0":function(n,t,o,r,d,c,i){for(var u=2*n,f=u*o,s=f,h=o,p=t,a=o;r>a;++a,f+=u)if(d[f+p]===i)if(h===a)h+=1,s+=u;else{for(var x=0;u>x;++x){var l=d[f+x];d[f+x]=d[s],d[s++]=l}var w=c[a];c[a]=c[h],c[h++]=w}return h},"lo<p0":function(n,t,o,r,d,c,i){for(var u=2*n,f=u*o,s=f,h=o,p=t,a=o;r>a;++a,f+=u)if(d[f+p]<i)if(h===a)h+=1,s+=u;else{for(var x=0;u>x;++x){var l=d[f+x];d[f+x]=d[s],d[s++]=l}var w=c[a];c[a]=c[h],c[h++]=w}return h},"lo<=p0":function(n,t,o,r,d,c,i){for(var u=2*n,f=u*o,s=f,h=o,p=n+t,a=o;r>a;++a,f+=u)if(d[f+p]<=i)if(h===a)h+=1,s+=u;else{for(var x=0;u>x;++x){var l=d[f+x];d[f+x]=d[s],d[s++]=l}var w=c[a];c[a]=c[h],c[h++]=w}return h},"hi<=p0":function(n,t,o,r,d,c,i){for(var u=2*n,f=u*o,s=f,h=o,p=n+t,a=o;r>a;++a,f+=u)if(d[f+p]<=i)if(h===a)h+=1,s+=u;else{for(var x=0;u>x;++x){var l=d[f+x];d[f+x]=d[s],d[s++]=l}var w=c[a];c[a]=c[h],c[h++]=w}return h},"lo<p0&&p0<=hi":function(n,t,o,r,d,c,i){for(var u=2*n,f=u*o,s=f,h=o,p=t,a=n+t,x=o;r>x;++x,f+=u){var l=d[f+p],w=d[f+a];if(l<i&&i<=w)if(h===x)h+=1,s+=u;else{for(var _=0;u>_;++_){var T=d[f+_];d[f+_]=d[s],d[s++]=T}var k=c[x];c[x]=c[h],c[h++]=k}}return h},"lo<=p0&&p0<=hi":function(n,t,o,r,d,c,i){for(var u=2*n,f=u*o,s=f,h=o,p=t,a=n+t,x=o;r>x;++x,f+=u){var l=d[f+p],w=d[f+a];if(l<=i&&i<=w)if(h===x)h+=1,s+=u;else{for(var _=0;u>_;++_){var T=d[f+_];d[f+_]=d[s],d[s++]=T}var k=c[x];c[x]=c[h],c[h++]=k}}return h},"!(lo>=p0)&&!(p1>=hi)":function(n,t,o,r,d,c,i,u){for(var f=2*n,s=f*o,h=s,p=o,a=t,x=n+t,l=o;r>l;++l,s+=f){var w=d[s+a],_=d[s+x];if(!(w>=i||u>=_))if(p===l)p+=1,h+=f;else{for(var T=0;f>T;++T){var k=d[s+T];d[s+T]=d[h],d[h++]=k}var L=c[l];c[l]=c[p],c[p++]=L}}return p}}},{}],40:[function(m,b,v){b.exports=function(i,u){u<=128?e(0,u-1,i):function f(s,h,p){var a=(h-s+1)/6|0,x=s+a,l=h-a,w=s+h>>1,_=w-a,T=w+a,k=x,L=_,A=w,I=T,P=l,S=s+1,E=h-1,D=0;d(k,L,p)&&(D=k,k=L,L=D),d(I,P,p)&&(D=I,I=P,P=D),d(k,A,p)&&(D=k,k=A,A=D),d(L,A,p)&&(D=L,L=A,A=D),d(k,I,p)&&(D=k,k=I,I=D),d(A,I,p)&&(D=A,A=I,I=D),d(L,P,p)&&(D=L,L=P,P=D),d(L,A,p)&&(D=L,L=A,A=D),d(I,P,p)&&(D=I,I=P,P=D);
1357for(var F=p[2*L],H=p[2*L+1],V=p[2*I],Z=p[2*I+1],K=2*k,q=2*A,W=2*P,$=2*x,R=2*w,N=2*l,U=0;U<2;++U){var Q=p[K+U],j=p[q+U],X=p[W+U];p[$+U]=Q,p[R+U]=j,p[N+U]=X}t(_,s,p),t(T,h,p);for(var J=S;J<=E;++J)if(c(J,F,H,p))J!==S&&n(J,S,p),++S;else if(!c(J,V,Z,p))for(;;){if(c(E,V,Z,p)){c(E,F,H,p)?(o(J,S,E,p),++S,--E):(n(J,E,p),--E);break}if(--E<J)break}r(s,S-1,F,H,p),r(h,E+1,V,Z,p),S-2-s<=32?e(s,S-2,p):f(s,S-2,p),h-(E+2)<=32?e(E+2,h,p):f(E+2,h,p),E-S<=32?e(S,E,p):f(S,E,p)}(0,u-1,i)};function e(i,u,f){for(var s=2*(i+1),h=i+1;h<=u;++h){for(var p=f[s++],a=f[s++],x=h,l=s-2;x-- >i;){var w=f[l-2],_=f[l-1];if(w<p||w===p&&_<a)break;f[l]=w,f[l+1]=_,l-=2}f[l]=p,f[l+1]=a}}function n(i,u,f){u*=2;var s=f[i*=2],h=f[i+1];f[i]=f[u],f[i+1]=f[u+1],f[u]=s,f[u+1]=h}function t(i,u,f){u*=2,f[i*=2]=f[u],f[i+1]=f[u+1]}function o(i,u,f,s){u*=2,f*=2;var h=s[i*=2],p=s[i+1];s[i]=s[u],s[i+1]=s[u+1],s[u]=s[f],s[u+1]=s[f+1],s[f]=h,s[f+1]=p}function r(i,u,f,s,h){u*=2,h[i*=2]=h[u],h[u]=f,h[i+1]=h[u+1],h[u+1]=s}function d(i,u,f){u*=2;var s=f[i*=2],h=f[u];return!(s<h)&&(s!==h||f[i+1]>f[u+1])}function c(i,u,f,s){var h=s[i*=2];return h<u||h===u&&s[i+1]<f}},{}],41:[function(m,b,v){b.exports={init:function(p){var a=n.nextPow2(p);o.length<a&&(e.free(o),o=e.mallocInt32(a)),r.length<a&&(e.free(r),r=e.mallocInt32(a)),d.length<a&&(e.free(d),d=e.mallocInt32(a)),c.length<a&&(e.free(c),c=e.mallocInt32(a)),i.length<a&&(e.free(i),i=e.mallocInt32(a)),u.length<a&&(e.free(u),u=e.mallocInt32(a));var x=8*a;f.length<x&&(e.free(f),f=e.mallocDouble(x))},sweepBipartite:function(p,a,x,l,w,_,T,k,L,A){for(var I=0,P=2*p,S=p-1,E=P-1,D=x;D<l;++D){var F=_[D],H=P*D;f[I++]=w[H+S],f[I++]=-(F+1),f[I++]=w[H+E],f[I++]=F}for(D=T;D<k;++D){F=A[D]+(1<<28);var V=P*D;f[I++]=L[V+S],f[I++]=-F,f[I++]=L[V+E],f[I++]=F}var Z=I>>>1;t(f,Z);var K=0,q=0;for(D=0;D<Z;++D){var W=0|f[2*D+1];if(W>=1<<28)s(d,c,q--,W=W-(1<<28)|0);else if(W>=0)s(o,r,K--,W);else if(W<=-(1<<28)){W=-W-(1<<28)|0;for(var $=0;$<K;++$)if((R=a(o[$],W))!==void 0)return R;h(d,c,q++,W)}else{for(W=-W-1|0,$=0;$<q;++$){var R;if((R=a(W,d[$]))!==void 0)return R}h(o,r,K++,W)}}},sweepComplete:function(p,a,x,l,w,_,T,k,L,A){for(var I=0,P=2*p,S=p-1,E=P-1,D=x;D<l;++D){var F=_[D]+1<<1,H=P*D;f[I++]=w[H+S],f[I++]=-F,f[I++]=w[H+E],f[I++]=F}for(D=T;D<k;++D){F=A[D]+1<<1;var V=P*D;f[I++]=L[V+S],f[I++]=1|-F,f[I++]=L[V+E],f[I++]=1|F}var Z=I>>>1;t(f,Z);var K=0,q=0,W=0;for(D=0;D<Z;++D){var $=0|f[2*D+1],R=1&$;if(D<Z-1&&$>>1==f[2*D+3]>>1&&(R=2,D+=1),$<0){for(var N=-($>>1)-1,U=0;U<W;++U)if((Q=a(i[U],N))!==void 0)return Q;if(R!==0){for(U=0;U<K;++U)if((Q=a(o[U],N))!==void 0)return Q}if(R!==1)for(U=0;U<q;++U){var Q;if((Q=a(d[U],N))!==void 0)return Q}R===0?h(o,r,K++,N):R===1?h(d,c,q++,N):R===2&&h(i,u,W++,N)}else N=($>>1)-1,R===0?s(o,r,K--,N):R===1?s(d,c,q--,N):R===2&&s(i,u,W--,N)}},scanBipartite:function(p,a,x,l,w,_,T,k,L,A,I,P){var S=0,E=2*p,D=a,F=a+p,H=1,V=1;l?V=1<<28:H=1<<28;for(var Z=w;Z<_;++Z){var K=Z+H,q=E*Z;f[S++]=T[q+D],f[S++]=-K,f[S++]=T[q+F],f[S++]=K}for(Z=L;Z<A;++Z){K=Z+V;var W=E*Z;f[S++]=I[W+D],f[S++]=-K}var $=S>>>1;t(f,$);var R=0;for(Z=0;Z<$;++Z){var N=0|f[2*Z+1];if(N<0){var U=!1;if((K=-N)>=1<<28?(U=!l,K-=1<<28):(U=!!l,K-=1),U)h(o,r,R++,K);else{var Q=P[K],j=E*K,X=I[j+a+1],J=I[j+a+1+p];e:for(var re=0;re<R;++re){var ne=o[re],se=E*ne;if(!(J<T[se+a+1]||T[se+a+1+p]<X)){for(var oe=a+2;oe<p;++oe)if(I[j+oe+p]<T[se+oe]||T[se+oe+p]<I[j+oe])continue e;var pe,ce=k[ne];if((pe=l?x(Q,ce):x(ce,Q))!==void 0)return pe}}}}else s(o,r,R--,N-H)}},scanComplete:function(p,a,x,l,w,_,T,k,L,A,I){for(var P=0,S=2*p,E=a,D=a+p,F=l;F<w;++F){var H=F+268435456,V=S*F;f[P++]=_[V+E],f[P++]=-H,f[P++]=_[V+D],f[P++]=H}for(F=k;F<L;++F){H=F+1;var Z=S*F;f[P++]=A[Z+E],f[P++]=-H}var K=P>>
1357>1;t(f,K);var q=0;for(F=0;F<K;++F){var W=0|f[2*F+1];if(W<0)if((H=-W)>=1<<28)o[q++]=H-(1<<28);else{var $=I[H-=1],R=S*H,N=A[R+a+1],U=A[R+a+1+p];e:for(var Q=0;Q<q;++Q){var j=o[Q],X=T[j];if(X===$)break;var J=S*j;if(!(U<_[J+a+1]||_[J+a+1+p]<N)){for(var re=a+2;re<p;++re)if(A[R+re+p]<_[J+re]||_[J+re+p]<A[R+re])continue e;var ne=x(X,$);if(ne!==void 0)return ne}}}else{for(H=W-(1<<28),Q=q-1;Q>=0;--Q)if(o[Q]===H){for(re=Q+1;re<q;++re)o[re-1]=o[re];break}--q}}}};var e=m("typedarray-pool"),n=m("bit-twiddle"),t=m("./sort"),o=e.mallocInt32(1024),r=e.mallocInt32(1024),d=e.mallocInt32(1024),c=e.mallocInt32(1024),i=e.mallocInt32(1024),u=e.mallocInt32(1024),f=e.mallocDouble(8192);function s(p,a,x,l){var w=a[l],_=p[x-1];p[w]=_,a[_]=w}function h(p,a,x,l){p[x]=l,a[l]=x}},{"./sort":40,"bit-twiddle":32,"typedarray-pool":308}],42:[function(m,b,v){var e=m("./lib/monotone"),n=m("./lib/triangulation"),t=m("./lib/delaunay"),o=m("./lib/filter");function r(i){return[Math.min(i[0],i[1]),Math.max(i[0],i[1])]}function d(i,u){return i[0]-u[0]||i[1]-u[1]}function c(i,u,f){return u in i?i[u]:f}b.exports=function(i,u,f){Array.isArray(u)?(f=f||{},u=u||[]):(f=u||{},u=[]);var s=!!c(f,"delaunay",!0),h=!!c(f,"interior",!0),p=!!c(f,"exterior",!0),a=!!c(f,"infinity",!1);if(!h&&!p||i.length===0)return[];var x=e(i,u);if(s||h!==p||a){for(var l=n(i.length,function(T){return T.map(r).sort(d)}(u)),w=0;w<x.length;++w){var _=x[w];l.addTriangle(_[0],_[1],_[2])}return s&&t(i,l),p?h?a?o(l,0,a):l.cells():o(l,1,a):o(l,-1)}return x}},{"./lib/delaunay":43,"./lib/filter":44,"./lib/monotone":45,"./lib/triangulation":46}],43:[function(m,b,v){var e=m("robust-in-sphere")[4];m("binary-search-bounds");function n(t,o,r,d,c,i){var u=o.opposite(d,c);if(!(u<0)){if(c<d){var f=d;d=c,c=f,f=i,i=u,u=f}o.isConstraint(d,c)||e(t[d],t[c],t[i],t[u])<0&&r.push(d,c)}}b.exports=function(t,o){for(var r=[],d=t.length,c=o.stars,i=0;i<d;++i)for(var u=c[i],f=1;f<u.length;f+=2)if(!((a=u[f])<i)&&!o.isConstraint(i,a)){for(var s=u[f-1],h=-1,p=1;p<u.length;p+=2)if(u[p-1]===a){h=u[p];break}h<0||e(t[i],t[a],t[s],t[h])<0&&r.push(i,a)}for(;r.length>0;){for(var a=r.pop(),x=(i=r.pop(),s=-1,h=-1,u=c[i],1);x<u.length;x+=2){var l=u[x-1],w=u[x];l===a?h=w:w===a&&(s=l)}s<0||h<0||e(t[i],t[a],t[s],t[h])>=0||(o.flip(i,a),n(t,o,r,s,i,h),n(t,o,r,i,h,s),n(t,o,r,h,a,s),n(t,o,r,a,s,h))}}},{"binary-search-bounds":31,"robust-in-sphere":282}],44:[function(m,b,v){var e,n=m("binary-search-bounds");function t(r,d,c,i,u,f,s){this.cells=r,this.neighbor=d,this.flags=i,this.constraint=c,this.active=u,this.next=f,this.boundary=s}function o(r,d){return r[0]-d[0]||r[1]-d[1]||r[2]-d[2]}b.exports=function(r,d,c){var i=function(L,A){for(var I=L.cells(),P=I.length,S=0;S<P;++S){var E=(R=I[S])[0],D=R[1],F=R[2];D<F?D<E&&(R[0]=D,R[1]=F,R[2]=E):F<E&&(R[0]=F,R[1]=E,R[2]=D)}I.sort(o);var H=new Array(P);for(S=0;S<H.length;++S)H[S]=0;var V=[],Z=[],K=new Array(3*P),q=new Array(3*P),W=null;A&&(W=[]);var $=new t(I,K,q,H,V,Z,W);for(S=0;S<P;++S)for(var R=I[S],N=0;N<3;++N){E=R[N],D=R[(N+1)%3];var U=K[3*S+N]=$.locate(D,E,L.opposite(D,E)),Q=q[3*S+N]=L.isConstraint(E,D);U<0&&(Q?Z.push(S):(V.push(S),H[S]=1),A&&W.push([D,E,-1]))}return $}(r,c);if(d===0)return c?i.cells.concat(i.boundary):i.cells;for(var u=1,f=i.active,s=i.next,h=i.flags,p=i.cells,a=i.constraint,x=i.neighbor;f.length>0||s.length>0;){for(;f.length>0;){var l=f.pop();if(h[l]!==-u){h[l]=u,p[l];for(var w=0;w<3;++w){var _=x[3*l+w];_>=0&&h[_]===0&&(a[3*l+w]?s.push(_):(f.push(_),h[_]=u))}}}var T=s;s=f,f=T,s.length=0,u=-u}var k=function(L,A,I){for(var P=0,S=0;S<L.length;++S)A[S]===I&&(L[P++]=L[S]);return L.length=P,L}(p,h,d);return c?k.concat(i.boundary):k},t.prototype.locate=(e=[0,0,0],function(r,d,c){var i=r,u=d,f=c;return d<c?d<r&&(i=d,u=c,f=r):c<r&&(i=c,u=r,f=d),i<0?-1:(e[0]=i,e[1]=u,e[2]=f,n.eq(this.cells,e,o))})},{"binary-search-bounds":31}],45:[function(m,b,v){var e=m("binary-search-bounds"),n=m("robust-orientation")[3];function t(s,h,p,a,x){this.a=s,this.b=h,this.idx=p,this.lowerIds=a,this.upperIds=x}function o(s,h,p,a){this.a=s,this.b=h,this.type=p,this.idx=a}function r(s,h){var p=s.a[0]-h.a[0]||s.a[1]-h.a[1]||s.type-h.type;return p||(s.type!==0&&(p=n(s.a,s.b,h.b))?p:s.idx-h.idx)}function d(s,h){return n(s.a,s.b,h)}function c(s,h,p,a,x){for(var l=e.lt(h,a,d),w=e.gt(h,a,d),_=l;_<w;++_){for(var T=h[_],k=T.lowerIds,L=k.length;L>1&&n(p[k[L-2]],p[k[L-1]],a)>0;)s.push([k[L-1],k[L-2],x]),L-=1;k.length=L,k.push(x);var A=T.upperIds;for(L=A.length;L>1&&n(p[A[L-2]],p[A[L-1]],a)<0;)s.push([A[L-2],A[L-1],x]),L-=1;A.length=L,A.push(x)}}function i(s,h){var p;return(p=s.a[0]<h.a[0]?n(s.a,s.b,h.a):n(h.b,h.a,s.a))?p:(p=h.b[0]<s.b[0]?n(s.a,s.b,h.b):n(h.b,h.a,s.b))||s.idx-h.idx}function u(s,h,p){var a=e.le(s,p,i),x=s[a],l=x.upperIds,w=l[l.length-1];
1357x.upperIds=[w],s.splice(a+1,0,new t(p.a,p.b,p.idx,[w],l))}function f(s,h,p){var a=p.a;p.a=p.b,p.b=a;var x=e.eq(s,p,i),l=s[x];s[x-1].upperIds=l.upperIds,s.splice(x,1)}b.exports=function(s,h){for(var p=s.length,a=h.length,x=[],l=0;l<p;++l)x.push(new o(s[l],null,0,l));for(l=0;l<a;++l){var w=h[l],_=s[w[0]],T=s[w[1]];_[0]<T[0]?x.push(new o(_,T,2,l),new o(T,_,1,l)):_[0]>T[0]&&x.push(new o(T,_,2,l),new o(_,T,1,l))}x.sort(r);for(var k=x[0].a[0]-(1+Math.abs(x[0].a[0]))*Math.pow(2,-52),L=[new t([k,1],[k,0],-1,[],[])],A=[],I=(l=0,x.length);l<I;++l){var P=x[l],S=P.type;S===0?c(A,L,s,P.a,P.idx):S===2?u(L,s,P):f(L,s,P)}return A}},{"binary-search-bounds":31,"robust-orientation":284}],46:[function(m,b,v){var e=m("binary-search-bounds");function n(r,d){this.stars=r,this.edges=d}b.exports=function(r,d){for(var c=new Array(r),i=0;i<r;++i)c[i]=[];return new n(c,d)};var t=n.prototype;function o(r,d,c){for(var i=1,u=r.length;i<u;i+=2)if(r[i-1]===d&&r[i]===c)return r[i-1]=r[u-2],r[i]=r[u-1],void(r.length=u-2)}t.isConstraint=function(){var r=[0,0];function d(c,i){return c[0]-i[0]||c[1]-i[1]}return function(c,i){return r[0]=Math.min(c,i),r[1]=Math.max(c,i),e.eq(this.edges,r,d)>=0}}(),t.removeTriangle=function(r,d,c){var i=this.stars;o(i[r],d,c),o(i[d],c,r),o(i[c],r,d)},t.addTriangle=function(r,d,c){var i=this.stars;i[r].push(d,c),i[d].push(c,r),i[c].push(r,d)},t.opposite=function(r,d){for(var c=this.stars[d],i=1,u=c.length;i<u;i+=2)if(c[i]===r)return c[i-1];return-1},t.flip=function(r,d){var c=this.opposite(r,d),i=this.opposite(d,r);this.removeTriangle(r,d,c),this.removeTriangle(d,r,i),this.addTriangle(r,i,c),this.addTriangle(d,c,i)},t.edges=function(){for(var r=this.stars,d=[],c=0,i=r.length;c<i;++c)for(var u=r[c],f=0,s=u.length;f<s;f+=2)d.push([u[f],u[f+1]]);return d},t.cells=function(){for(var r=this.stars,d=[],c=0,i=r.length;c<i;++c)for(var u=r[c],f=0,s=u.length;f<s;f+=2){var h=u[f],p=u[f+1];c<Math.min(h,p)&&d.push([c,h,p])}return d}},{"binary-search-bounds":31}],47:[function(m,b,v){b.exports=function(e){for(var n=1,t=1;t<e.length;++t)for(var o=0;o<t;++o)if(e[t]<e[o])n=-n;else if(e[o]===e[t])return 0;return n}},{}],48:[function(m,b,v){var e=m("dup"),n=m("robust-linear-solve");function t(d,c){for(var i=0,u=d.length,f=0;f<u;++f)i+=d[f]*c[f];return i}function o(d){var c=d.length;if(c===0)return[];d[0].length;var i=e([d.length+1,d.length+1],1),u=e([d.length+1],1);i[c][c]=0;for(var f=0;f<c;++f){for(var s=0;s<=f;++s)i[s][f]=i[f][s]=2*t(d[f],d[s]);u[f]=t(d[f],d[f])}var h=n(i,u),p=0,a=h[c+1];for(f=0;f<a.length;++f)p+=a[f];var x=new Array(c);for(f=0;f<c;++f){a=h[f];var l=0;for(s=0;s<a.length;++s)l+=a[s];x[f]=l/p}return x}function r(d){if(d.length===0)return[];for(var c=d[0].length,i=e([c]),u=o(d),f=0;f<d.length;++f)for(var s=0;s<c;++s)i[s]+=d[f][s]*u[f];return i}r.barycenetric=o,b.exports=r},{dup:65,"robust-linear-solve":283}],49:[function(m,b,v){b.exports=function(n){for(var t=e(n),o=0,r=0;r<n.length;++r)for(var d=n[r],c=0;c<t.length;++c)o+=Math.pow(d[c]-t[c],2);return Math.sqrt(o/n.length)};var e=m("circumcenter")},{circumcenter:48}],50:[function(m,b,v){b.exports=function(w,_,T){var k;if(T){k=_;for(var L=new Array(_.length),A=0;A<_.length;++A){var I=_[A];L[A]=[I[0],I[1],T[A]]}_=L}for(var P=function(S,E,D){var F=h(S,[],s(S));return x(E,F,D),!!F}(w,_,!!T);l(w,_,!!T);)P=!0;if(T&&P)for(k.length=0,T.length=0,A=0;A<_.length;++A)I=_[A],k.push([I[0],I[1]]),T.push(I[2]);return P};var e=m("union-find"),n=m("box-intersect"),t=m("robust-segment-intersect"),o=m("big-rat"),r=m("big-rat/cmp"),d=m("big-rat/to-float"),c=m("rat-vec"),i=m("nextafter"),u=m("./lib/rat-seg-intersect");function f(w){var _=d(w);return[i(_,-1/0),i(_,1/0)]}function s(w){for(var _=new Array(w.length),T=0;T<w.length;++T){var k=w[T];_[T]=[i(k[0],-1/0),i(k[1],-1/0),i(k[0],1/0),i(k[1],1/0)]}return _}function h(w,_,T){for(var k=_.length,L=new e(k),A=[],I=0;I<_.length;++I){var P=_[I],S=f(P[0]),E=f(P[1]);A.push([i(S[0],-1/0),i(E[0],-1/0),i(S[1],1/0),i(E[1],1/0)])}n(A,function(Z,K){L.link(Z,K)});var D=!0,F=new Array(k);for(I=0;I<k;++I)(V=L.find(I))!==I&&(D=!1,w[V]=[Math.min(w[I][0],w[V][0]),Math.min(w[I][1],w[V][1])]);if(D)return null;var H=0;for(I=0;I<k;++I){var V;(V=L.find(I))===I?(F[I]=H,w[H++]=w[I]):F[I]=-1}for(w.length=H,I=0;I<k;++I)F[I]<0&&(F[I]=F[L.find(I)]);return F}function p(w,_){return w[0]-_[0]||w[1]-_[1]}function a(w,_){var T=w[0]-_[0]||w[1]-_[1];return T||(w[2]<_[2]?-1:w[2]>_[2]?1:0)}function x(w,_,T){if(w.length!==0){if(_)for(var k=0;k<w.length;++k){var L=_[(I=w[k])[0]],A=_[I[1]];I[0]=Math.min(L,A),I[1]=Math.max(L,A)}else for(k=0;k<w.length;++k){var I;L=(I=w[k])[0],A=I[1],I[0]=Math.min(L,A),I[1]=Math.max(L,A)}T?w.sort(a):w.sort(p);var P=1;for(k=1;k<w.length;++k){var S=w[k-1],E=w[k];(E[0]!==S[0]||E[1]!==S[1]||T&&E[2]!==S[2])&&(w[P++]=E)}w.length=P}}function l(w,_,T){var k=function(S,E){for(var D=new Array(E.length),F=0;F<E.length;++F){var H=E[F],V=S[H[0]],Z=S[H[1]];D[F]=[i(Math.min(V[0],Z[0]),-1/0),i(Math.min(V[1],Z[1]),-1/0),i(Math.max(V[0],Z[0]),1/0),i(Math.max(V[1],Z[1]),1/0)]}return D}(w,_),L=function(S,E,D){var F=[];return n(D,function(H,V){var Z=E[H],K=E[V];if(Z[0]!==K[0]&&Z[0]!==K[1]&&Z[1]!==K[0]&&Z[1]!==K[1]){var q=S[Z[0]],W=S[Z[1]],$=S[K[0]],R=S[K[1]];t(q,W,$,R)&&F.push([H,V])}}),F}(w,_,k),A=s(w),I=function(S,E,D,F){var H=[];return n(D,F,function(V,Z){var K=E[V];if(K[0]!==Z&&K[1]!==Z){var q=S[Z],W=S[K[0]],$=S[K[1]];t(W,$,q,q)&&H.push([V,Z])}}),H}(w,_,k,A),P=h(w,function(S,E,D,F,H){var V,Z,K=S.map(function(de){return[o(de[0]),o(de[1])]});for(V=0;V<D.length;++V){var q=D[V];Z=q[0];var W=q[1],$=E[Z],R=E[W],N=u(c(S[$[0]]),c(S[$[1]]),c(S[R[0]]),c(S[R[1]])
1357);if(N){var U=S.length;S.push([d(N[0]),d(N[1])]),K.push(N),F.push([Z,U],[W,U])}}for(F.sort(function(de,xe){if(de[0]!==xe[0])return de[0]-xe[0];var we=K[de[1]],be=K[xe[1]];return r(we[0],be[0])||r(we[1],be[1])}),V=F.length-1;V>=0;--V){var Q=E[Z=(pe=F[V])[0]],j=Q[0],X=Q[1],J=S[j],re=S[X];if((J[0]-re[0]||J[1]-re[1])<0){var ne=j;j=X,X=ne}Q[0]=j;var se,oe=Q[1]=pe[1];for(H&&(se=Q[2]);V>0&&F[V-1][0]===Z;){var pe,ce=(pe=F[--V])[1];H?E.push([oe,ce,se]):E.push([oe,ce]),oe=ce}H?E.push([oe,X,se]):E.push([oe,X])}return K}(w,_,L,I,T));return x(_,P,T),!!P||L.length>0||I.length>0}},{"./lib/rat-seg-intersect":51,"big-rat":18,"big-rat/cmp":16,"big-rat/to-float":30,"box-intersect":35,nextafter:260,"rat-vec":273,"robust-segment-intersect":287,"union-find":309}],51:[function(m,b,v){b.exports=function(u,f,s,h){var p=r(f,u),a=r(h,s),x=i(p,a);if(o(x)===0)return null;var l=r(u,s),w=i(a,l),_=n(w,x),T=c(p,_);return d(u,T)};var e=m("big-rat/mul"),n=m("big-rat/div"),t=m("big-rat/sub"),o=m("big-rat/sign"),r=m("rat-vec/sub"),d=m("rat-vec/add"),c=m("rat-vec/muls");function i(u,f){return t(e(u[0],f[1]),e(u[1],f[0]))}},{"big-rat/div":17,"big-rat/mul":27,"big-rat/sign":28,"big-rat/sub":29,"rat-vec/add":272,"rat-vec/muls":274,"rat-vec/sub":275}],52:[function(m,b,v){b.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}
1357],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]}
1357,{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],53:[function(m,b,v){var e=m("./colorScale"),n=m("lerp");function t(d){return[d[0]/255,d[1]/255,d[2]/255,d[3]]}function o(d){for(var c,i="#",u=0;u<3;++u)i+=("00"+(c=(c=d[u]).toString(16))).substr(c.length);return i}function r(d){return"rgba("+d.join(",")+")"}b.exports=function(d){var c,i,u,f,s,h,p,a,x,l;if(d||(d={}
1357),a=(d.nshades||72)-1,p=d.format||"hex",(h=d.colormap)||(h="jet"),typeof h=="string"){if(h=h.toLowerCase(),!e[h])throw Error(h+" not a supported colorscale");s=e[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);s=h.slice()}if(s.length>a+1)throw new Error(h+" map requires nshades to be at least size "+s.length);x=Array.isArray(d.alpha)?d.alpha.length!==2?[1,1]:d.alpha.slice():typeof d.alpha=="number"?[d.alpha,d.alpha]:[1,1],c=s.map(function(L){return Math.round(L.index*a)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var w=s.map(function(L,A){var I=s[A].index,P=s[A].rgb.slice();return P.length===4&&P[3]>=0&&P[3]<=1||(P[3]=x[0]+(x[1]-x[0])*I),P}),_=[];for(l=0;l<c.length-1;++l){f=c[l+1]-c[l],i=w[l],u=w[l+1];for(var T=0;T<f;T++){var k=T/f;_.push([Math.round(n(i[0],u[0],k)),Math.round(n(i[1],u[1],k)),Math.round(n(i[2],u[2],k)),n(i[3],u[3],k)])}}return _.push(s[s.length-1].rgb.concat(x[1])),p==="hex"?_=_.map(o):p==="rgbaString"?_=_.map(r):p==="float"&&(_=_.map(t)),_}},{"./colorScale":52,lerp:240}],54:[function(m,b,v){b.exports=function(c,i,u,f){var s=e(i,u,f);if(s===0){var h=n(e(c,i,u)),p=n(e(c,i,f));if(h===p){if(h===0){var a=d(c,i,u),x=d(c,i,f);return a===x?0:a?1:-1}return 0}return p===0?h>0||d(c,i,f)?-1:1:h===0?p>0||d(c,i,u)?1:-1:n(p-h)}var l=e(c,i,u);return l>0?s>0&&e(c,i,f)>0?1:-1:l<0?s>0||e(c,i,f)>0?1:-1:e(c,i,f)>0||d(c,i,u)?1:-1};var e=m("robust-orientation"),n=m("signum"),t=m("two-sum"),o=m("robust-product"),r=m("robust-sum");function d(c,i,u){var f=t(c[0],-i[0]),s=t(c[1],-i[1]),h=t(u[0],-i[0]),p=t(u[1],-i[1]),a=r(o(f,h),o(s,p));return a[a.length-1]>=0}},{"robust-orientation":284,"robust-product":285,"robust-sum":289,signum:55,"two-sum":307}],55:[function(m,b,v){b.exports=function(e){return e<0?-1:e>0?1:0}},{}],56:[function(m,b,v){b.exports=function(t,o){var r=t.length,d=t.length-o.length;if(d)return d;switch(r){case 0:return 0;case 1:return t[0]-o[0];case 2:return t[0]+t[1]-o[0]-o[1]||e(t[0],t[1])-e(o[0],o[1]);case 3:var c=t[0]+t[1],i=o[0]+o[1];if(d=c+t[2]-(i+o[2]))return d;var u=e(t[0],t[1]),f=e(o[0],o[1]);return e(u,t[2])-e(f,o[2])||e(u+t[2],c)-e(f+o[2],i);case 4:var s=t[0],h=t[1],p=t[2],a=t[3],x=o[0],l=o[1],w=o[2],_=o[3];return s+h+p+a-(x+l+w+_)||e(s,h,p,a)-e(x,l,w,_,x)||e(s+h,s+p,s+a,h+p,h+a,p+a)-e(x+l,x+w,x+_,l+w,l+_,w+_)||e(s+h+p,s+h+a,s+p+a,h+p+a)-e(x+l+w,x+l+_,x+w+_,l+w+_);default:for(var T=t.slice().sort(n),k=o.slice().sort(n),L=0;L<r;++L)if(d=T[L]-k[L])return d;return 0}};var e=Math.min;function n(t,o){return t-o}},{}],57:[function(m,b,v){var e=m("compare-cell"),n=m("cell-orientation");b.exports=function(t,o){return e(t,o)||n(t)-n(o)}},{"cell-orientation":47,"compare-cell":56}],58:[function(m,b,v){var e=m("./lib/ch1d"),n=m("./lib/ch2d"),t=m("./lib/chnd");b.exports=function(o){var r=o.length;if(r===0)return[];if(r===1)return[[0]];var d=o[0].length;return d===0?[]:d===1?e(o):d===2?n(o):t(o,d)}},{"./lib/ch1d":59,"./lib/ch2d":60,"./lib/chnd":61}],59:[function(m,b,v){b.exports=function(e){for(var n=0,t=0,o=1;o<e.length;++o)e[o][0]<e[n][0]&&(n=o),e[o][0]>e[t][0]&&(t=o);return n<t?[[n],[t]]:n>t?[[t],[n]]:[[n]]}},{}],60:[function(m,b,v){b.exports=function(n){var t=e(n),o=t.length;if(o<=2)return[];for(var r=new Array(o),d=t[o-1],c=0;c<o;++c){var i=t[c];r[c]=[d,i],d=i}return r};var e=m("monotone-convex-hull-2d")},{"monotone-convex-hull-2d":246}],61:[function(m,b,v){b.exports=function(t,o){try{return e(t,!0)}catch{var r=n(t);if(r.length<=o)return[];var d=function(i,u){for(var f=i.length,s=new Array(f),h=0;h<u.length;++h)s[h]=i[u[h]];var p=u.length;for(h=0;h<f;++h)u.indexOf(h)<0&&(s[p++]=i[h]);return s}(t,r);return function(i,u){for(var f=i.length,s=u.length,h=0;h<f;++h)for(var p=i[h],a=0;a<p.length;++a){var x=p[a];if(x<s)p[a]=u[x];else{x-=s;for(var l=0;l<s;++l)x>=u[l]&&(x+=1);p[a]=x}}return i}(e(d,!0),r)}};var e=m("incremental-convex-hull"),n=m("affine-hull")},{"affine-hull":10,"incremental-convex-hull":233}],62:[function(m,b,v){b.exports=function(e,n,t,o,r,d){var c=r-1,i=r*r,u=c*c,f=(1+2*r)*u,s=r*u,h=i*(3-2*r),p=i*c;if(e.length){d||(d=new Array(e.length));for(var a=e.length-1;a>=0;
1357--a)d[a]=f*e[a]+s*n[a]+h*t[a]+p*o[a];return d}return f*e+s*n+h*t+p*o},b.exports.derivative=function(e,n,t,o,r,d){var c=6*r*r-6*r,i=3*r*r-4*r+1,u=-6*r*r+6*r,f=3*r*r-2*r;if(e.length){d||(d=new Array(e.length));for(var s=e.length-1;s>=0;--s)d[s]=c*e[s]+i*n[s]+u*t[s]+f*o[s];return d}return c*e+i*n+u*t[s]+f*o}},{}],63:[function(m,b,v){var e=m("incremental-convex-hull"),n=m("uniq");function t(r,d){this.point=r,this.index=d}function o(r,d){for(var c=r.point,i=d.point,u=c.length,f=0;f<u;++f){var s=i[f]-c[f];if(s)return s}return 0}b.exports=function(r,d){var c=r.length;if(c===0)return[];var i=r[0].length;if(i<1)return[];if(i===1)return function(I,P,S){if(I===1)return S?[[-1,0]]:[];var E=P.map(function(Z,K){return[Z[0],K]});E.sort(function(Z,K){return Z[0]-K[0]});for(var D=new Array(I-1),F=1;F<I;++F){var H=E[F-1],V=E[F];D[F-1]=[H[1],V[1]]}return S&&D.push([-1,D[0][1]],[D[I-1][1],-1]),D}(c,r,d);for(var u=new Array(c),f=1,s=0;s<c;++s){for(var h=r[s],p=new Array(i+1),a=0,x=0;x<i;++x){var l=h[x];p[x]=l,a+=l*l}p[i]=a,u[s]=new t(p,s),f=Math.max(a,f)}n(u,o),c=u.length;var w=new Array(c+i+1),_=new Array(c+i+1),T=(i+1)*(i+1)*f,k=new Array(i+1);for(s=0;s<=i;++s)k[s]=0;for(k[i]=T,w[0]=k.slice(),_[0]=-1,s=0;s<=i;++s)(p=k.slice())[s]=1,w[s+1]=p,_[s+1]=-1;for(s=0;s<c;++s){var L=u[s];w[s+i+1]=L.point,_[s+i+1]=L.index}var A=e(w,!1);if(A=d?A.filter(function(I){for(var P=0,S=0;S<=i;++S){var E=_[I[S]];if(E<0&&++P>=2)return!1;I[S]=E}return!0}):A.filter(function(I){for(var P=0;P<=i;++P){var S=_[I[P]];if(S<0)return!1;I[P]=S}return!0}),1&i)for(s=0;s<A.length;++s)p=(L=A[s])[0],L[0]=L[1],L[1]=p;return A}},{"incremental-convex-hull":233,uniq:310}],64:[function(m,b,v){(function(e){(function(){var n=!1;if(typeof Float64Array<"u"){var t=new Float64Array(1),o=new Uint32Array(t.buffer);t[0]=1,n=!0,o[1]===1072693248?(b.exports=function(d){return t[0]=d,[o[0],o[1]]},b.exports.pack=function(d,c){return o[0]=d,o[1]=c,t[0]},b.exports.lo=function(d){return t[0]=d,o[0]},b.exports.hi=function(d){return t[0]=d,o[1]}):o[0]===1072693248?(b.exports=function(d){return t[0]=d,[o[1],o[0]]},b.exports.pack=function(d,c){return o[1]=d,o[0]=c,t[0]},b.exports.lo=function(d){return t[0]=d,o[1]},b.exports.hi=function(d){return t[0]=d,o[0]}):n=!1}if(!n){var r=new e(8);b.exports=function(d){return r.writeDoubleLE(d,0,!0),[r.readUInt32LE(0,!0),r.readUInt32LE(4,!0)]},b.exports.pack=function(d,c){return r.writeUInt32LE(d,0,!0),r.writeUInt32LE(c,4,!0),r.readDoubleLE(0,!0)},b.exports.lo=function(d){return r.writeDoubleLE(d,0,!0),r.readUInt32LE(0,!0)},b.exports.hi=function(d){return r.writeDoubleLE(d,0,!0),r.readUInt32LE(4,!0)}}b.exports.sign=function(d){return b.exports.hi(d)>>>31},b.exports.exponent=function(d){return(b.exports.hi(d)<<1>>>21)-1023},b.exports.fraction=function(d){var c=b.exports.lo(d),i=b.exports.hi(d),u=1048575&i;return 2146435072&i&&(u+=1<<20),[c,u]},b.exports.denormalized=function(d){return!(2146435072&b.exports.hi(d))}}).call(this)}).call(this,m("buffer").Buffer)},{buffer:3}],65:[function(m,b,v){b.exports=function(e,n){switch(n===void 0&&(n=0),typeof e){case"number":if(e>0)return function(t,o){var r,d;for(r=new Array(t),d=0;d<t;++d)r[d]=o;return r}(0|e,n);break;case"object":if(typeof e.length=="number")return function t(o,r,d){var c=0|o[d];if(c<=0)return[];var i,u=new Array(c);if(d===o.length-1)for(i=0;i<c;++i)u[i]=r;else for(i=0;i<c;++i)u[i]=t(o,r,d+1);return u}(e,n,0)}return[]}},{}],66:[function(m,b,v){b.exports=function(n,t){var o=n.length;if(typeof t!="number"){t=0;for(var r=0;r<o;++r){var d=n[r];t=Math.max(t,d[0],d[1])}t=1+(0|t)}t|=0;var c=new Array(t);for(r=0;r<t;++r)c[r]=[];for(r=0;r<o;++r)d=n[r],c[d[0]].push(d[1]),c[d[1]].push(d[0]);for(var i=0;i<t;++i)e(c[i],function(u,f){return u-f});return c};var e=m("uniq")},{uniq:310}],67:[function(m,b,v){b.exports=function(e,n,t){var o=n||0,r=t||1;return[[e[12]+e[0],e[13]+e[1],e[14]+e[2],e[15]+e[3]],[e[12]-e[0],e[13]-e[1],e[14]-e[2],e[15]-e[3]],[e[12]+e[4],e[13]+e[5],e[14]+e[6],e[15]+e[7]],[e[12]-e[4],e[13]-e[5],e[14]-e[6],e[15]-e[7]],[o*e[12]+e[8],o*e[13]+e[9],o*e[14]+e[10],o*e[15]+e[11]],[r*e[12]-e[8],r*e[13]-e[9],r*e[14]-e[10],r*e[15]-e[11]]]}},{}],68:[function(m,b,v){b.exports=function(c,i,u){switch(arguments.length){case 0:return new o([0],[0],0);case 1:return typeof c=="number"?new o(f=d(c),f,0):new o(c,d(c.length),0);case 2:if(typeof i=="number"){var f=d(c.length);return new o(c,f,+i)}u=0;case 3:if(c.length!==i.length)throw new Error("state and velocity lengths must match");return new o(c,i,u)}};
1357var e=m("cubic-hermite"),n=m("binary-search-bounds");function t(c,i,u){return Math.min(i,Math.max(c,u))}function o(c,i,u){this.dimension=c.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var f=0;f<this.dimension;++f)this.bounds[0][f]=-1/0,this.bounds[1][f]=1/0;this._state=c.slice().reverse(),this._velocity=i.slice().reverse(),this._time=[u],this._scratch=[c.slice(),c.slice(),c.slice(),c.slice(),c.slice()]}var r=o.prototype;function d(c){for(var i=new Array(c),u=0;u<c;++u)i[u]=0;return i}r.flush=function(c){var i=n.gt(this._time,c)-1;i<=0||(this._time.splice(0,i),this._state.splice(0,i*this.dimension),this._velocity.splice(0,i*this.dimension))},r.curve=function(c){var i=this._time,u=i.length,f=n.le(i,c),s=this._scratch[0],h=this._state,p=this._velocity,a=this.dimension,x=this.bounds;if(f<0)for(var l=a-1,w=0;w<a;++w,--l)s[w]=h[l];else if(f>=u-1){l=h.length-1;var _=c-i[u-1];for(w=0;w<a;++w,--l)s[w]=h[l]+_*p[l]}else{l=a*(f+1)-1;var T=i[f],k=i[f+1]-T||1,L=this._scratch[1],A=this._scratch[2],I=this._scratch[3],P=this._scratch[4],S=!0;for(w=0;w<a;++w,--l)L[w]=h[l],I[w]=p[l]*k,A[w]=h[l+a],P[w]=p[l+a]*k,S=S&&L[w]===A[w]&&I[w]===P[w]&&I[w]===0;if(S)for(w=0;w<a;++w)s[w]=L[w];else e(L,I,A,P,(c-T)/k,s)}var E=x[0],D=x[1];for(w=0;w<a;++w)s[w]=t(E[w],D[w],s[w]);return s},r.dcurve=function(c){var i=this._time,u=i.length,f=n.le(i,c),s=this._scratch[0],h=this._state,p=this._velocity,a=this.dimension;if(f>=u-1)for(var x=h.length-1,l=(i[u-1],0);l<a;++l,--x)s[l]=p[x];else{x=a*(f+1)-1;var w=i[f],_=i[f+1]-w||1,T=this._scratch[1],k=this._scratch[2],L=this._scratch[3],A=this._scratch[4],I=!0;for(l=0;l<a;++l,--x)T[l]=h[x],L[l]=p[x]*_,k[l]=h[x+a],A[l]=p[x+a]*_,I=I&&T[l]===k[l]&&L[l]===A[l]&&L[l]===0;if(I)for(l=0;l<a;++l)s[l]=0;else for(e.derivative(T,L,k,A,(c-w)/_,s),l=0;l<a;++l)s[l]/=_}return s},r.lastT=function(){var c=this._time;return c[c.length-1]},r.stable=function(){for(var c=this._velocity,i=c.length,u=this.dimension-1;u>=0;--u)if(c[--i])return!1;return!0},r.jump=function(c){var i=this.lastT(),u=this.dimension;if(!(c<i||arguments.length!==u+1)){var f=this._state,s=this._velocity,h=f.length-this.dimension,p=this.bounds,a=p[0],x=p[1];this._time.push(i,c);for(var l=0;l<2;++l)for(var w=0;w<u;++w)f.push(f[h++]),s.push(0);for(this._time.push(c),w=u;w>0;--w)f.push(t(a[w-1],x[w-1],arguments[w])),s.push(0)}},r.push=function(c){var i=this.lastT(),u=this.dimension;if(!(c<i||arguments.length!==u+1)){var f=this._state,s=this._velocity,h=f.length-this.dimension,p=c-i,a=this.bounds,x=a[0],l=a[1],w=p>1e-6?1/p:0;this._time.push(c);for(var _=u;_>0;--_){var T=t(x[_-1],l[_-1],arguments[_]);f.push(T),s.push((T-f[h++])*w)}}},r.set=function(c){var i=this.dimension;if(!(c<this.lastT()||arguments.length!==i+1)){var u=this._state,f=this._velocity,s=this.bounds,h=s[0],p=s[1];this._time.push(c);for(var a=i;a>0;--a)u.push(t(h[a-1],p[a-1],arguments[a])),f.push(0)}},r.move=function(c){var i=this.lastT(),u=this.dimension;if(!(c<=i||arguments.length!==u+1)){var f=this._state,s=this._velocity,h=f.length-this.dimension,p=this.bounds,a=p[0],x=p[1],l=c-i,w=l>1e-6?1/l:0;this._time.push(c);for(var _=u;_>0;--_){var T=arguments[_];f.push(t(a[_-1],x[_-1],f[h++]+T)),s.push(T*w)}}},r.idle=function(c){var i=this.lastT();if(!(c<i)){var u=this.dimension,f=this._state,s=this._velocity,h=f.length-u,p=this.bounds,a=p[0],x=p[1],l=c-i;this._time.push(c);for(var w=u-1;w>=0;--w)f.push(t(a[w],x[w],f[h]+l*s[h])),s.push(0),h+=1}}},{"binary-search-bounds":31,"cubic-hermite":62}],69:[function(m,b,v){b.exports=function(a){return new r(a||p,null)};function e(a,x,l,w,_,T){this._color=a,this.key=x,this.value=l,this.left=w,this.right=_,this._count=T}function n(a){return new e(a._color,a.key,a.value,a.left,a.right,a._count)}function t(a,x){return new e(a,x.key,x.value,x.left,x.right,x._count)}function o(a){a._count=1+(a.left?a.left._count:0)+(a.right?a.right._count:0)}function r(a,x){this._compare=a,this.root=x}var d=r.prototype;function c(a,x){var l;return x.left&&(l=c(a,x.left))?l:(l=a(x.key,x.value))||(x.right?c(a,x.right):void 0)}function i(a,x,l,w){if(x(a,w.key)<=0){var _;if(w.left&&(_=i(a,x,l,w.left))||(_=l(w.key,w.value)))return _}if(w.right)return i(a,x,l,w.right)}function u(a,x,l,w,_){var T,k=l(a,_.key),L=l(x,_.key);if(k<=0&&(_.left&&(T=u(a,x,l,w,_.left))||L>0&&(T=w(_.key,_.value))))return T;if(L>0&&_.right)return u(a,x,l,w,_.right)}function f(a,x){this.tree=a,this._stack=x}Object.defineProperty(d,"keys",{get:function(){var a=[];return this.forEach(function(x,l){a.push(x)}),a}}),Object.defineProperty(d,"values",{get:function(){var a=[];return this.forEach(function(x,l){a.push(l)}),a}}),Object.defineProperty(d,"length",{get:function(){return this.root?this.root._count:0}}),d.insert=function(a,x){for(var l=this._compare,w=this.root,_=[],T=[];w;){var k=l(a,w.key);_.push(w),T.push(k),w=k<=0?w.left:w.right}
1357_.push(new e(0,a,x,null,null,1));for(var L=_.length-2;L>=0;--L)w=_[L],T[L]<=0?_[L]=new e(w._color,w.key,w.value,_[L+1],w.right,w._count+1):_[L]=new e(w._color,w.key,w.value,w.left,_[L+1],w._count+1);for(L=_.length-1;L>1;--L){var A=_[L-1];if(w=_[L],A._color===1||w._color===1)break;var I=_[L-2];if(I.left===A)if(A.left===w){if(!(P=I.right)||P._color!==0){I._color=0,I.left=A.right,A._color=1,A.right=I,_[L-2]=A,_[L-1]=w,o(I),o(A),L>=3&&((S=_[L-3]).left===I?S.left=A:S.right=A);break}A._color=1,I.right=t(1,P),I._color=0,L-=1}else{if(!(P=I.right)||P._color!==0){A.right=w.left,I._color=0,I.left=w.right,w._color=1,w.left=A,w.right=I,_[L-2]=w,_[L-1]=A,o(I),o(A),o(w),L>=3&&((S=_[L-3]).left===I?S.left=w:S.right=w);break}A._color=1,I.right=t(1,P),I._color=0,L-=1}else if(A.right===w){if(!(P=I.left)||P._color!==0){I._color=0,I.right=A.left,A._color=1,A.left=I,_[L-2]=A,_[L-1]=w,o(I),o(A),L>=3&&((S=_[L-3]).right===I?S.right=A:S.left=A);break}A._color=1,I.left=t(1,P),I._color=0,L-=1}else{var P;if(!(P=I.left)||P._color!==0){var S;A.left=w.right,I._color=0,I.right=w.left,w._color=1,w.right=A,w.left=I,_[L-2]=w,_[L-1]=A,o(I),o(A),o(w),L>=3&&((S=_[L-3]).right===I?S.right=w:S.left=w);break}A._color=1,I.left=t(1,P),I._color=0,L-=1}}return _[0]._color=1,new r(l,_[0])},d.forEach=function(a,x,l){if(this.root)switch(arguments.length){case 1:return c(a,this.root);case 2:return i(x,this._compare,a,this.root);case 3:return this._compare(x,l)>=0?void 0:u(x,l,this._compare,a,this.root)}},Object.defineProperty(d,"begin",{get:function(){for(var a=[],x=this.root;x;)a.push(x),x=x.left;return new f(this,a)}}),Object.defineProperty(d,"end",{get:function(){for(var a=[],x=this.root;x;)a.push(x),x=x.right;return new f(this,a)}}),d.at=function(a){if(a<0)return new f(this,[]);for(var x=this.root,l=[];;){if(l.push(x),x.left){if(a<x.left._count){x=x.left;continue}a-=x.left._count}if(!a)return new f(this,l);if(a-=1,!x.right||a>=x.right._count)break;x=x.right}return new f(this,[])},d.ge=function(a){for(var x=this._compare,l=this.root,w=[],_=0;l;){var T=x(a,l.key);w.push(l),T<=0&&(_=w.length),l=T<=0?l.left:l.right}return w.length=_,new f(this,w)},d.gt=function(a){for(var x=this._compare,l=this.root,w=[],_=0;l;){var T=x(a,l.key);w.push(l),T<0&&(_=w.length),l=T<0?l.left:l.right}return w.length=_,new f(this,w)},d.lt=function(a){for(var x=this._compare,l=this.root,w=[],_=0;l;){var T=x(a,l.key);w.push(l),T>0&&(_=w.length),l=T<=0?l.left:l.right}return w.length=_,new f(this,w)},d.le=function(a){for(var x=this._compare,l=this.root,w=[],_=0;l;){var T=x(a,l.key);w.push(l),T>=0&&(_=w.length),l=T<0?l.left:l.right}return w.length=_,new f(this,w)},d.find=function(a){for(var x=this._compare,l=this.root,w=[];l;){var _=x(a,l.key);if(w.push(l),_===0)return new f(this,w);l=_<=0?l.left:l.right}return new f(this,[])},d.remove=function(a){var x=this.find(a);return x?x.remove():this},d.get=function(a){for(var x=this._compare,l=this.root;l;){var w=x(a,l.key);if(w===0)return l.value;l=w<=0?l.left:l.right}};var s=f.prototype;function h(a,x){a.key=x.key,a.value=x.value,a.left=x.left,a.right=x.right,a._color=x._color,a._count=x._count}function p(a,x){return a<x?-1:a>x?1:0}Object.defineProperty(s,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(s,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),s.clone=function(){return new f(this.tree,this._stack.slice())},s.remove=function(){var a=this._stack;if(a.length===0)return this.tree;var x=new Array(a.length),l=a[a.length-1];x[x.length-1]=new e(l._color,l.key,l.value,l.left,l.right,l._count);for(var w=a.length-2;w>=0;--w)(l=a[w]).left===a[w+1]?x[w]=new e(l._color,l.key,l.value,x[w+1],l.right,l._count):x[w]=new e(l._color,l.key,l.value,l.left,x[w+1],l._count);if((l=x[x.length-1]).left&&l.right){var _=x.length;for(l=l.left;l.right;)x.push(l),l=l.right;var T=x[_-1];for(x.push(new e(l._color,T.key,T.value,l.left,l.right,l._count)),x[_-1].key=l.key,x[_-1].value=l.value,w=x.length-2;w>=_;--w)l=x[w],x[w]=new e(l._color,l.key,l.value,l.left,x[w+1],l._count);x[_-1].left=x[_]}if((l=x[x.length-1])._color===0){var k=x[x.length-2];for(k.left===l?k.left=null:k.right===l&&(k.right=null),x.pop(),w=0;w<x.length;++w)x[w]._count--;return new r(this.tree._compare,x[0])}if(l.left||l.right){for(l.left?h(l,l.left):l.right&&h(l,l.right),l._color=1,w=0;w<x.length-1;++w)x[w]._count--;return new r(this.tree._compare,x[0])}if(x.length===1)return new r(this.tree._compare,null);for(w=0;w<x.length;++w)x[w]._count--;var L=x[x.length-2];return function(A){for(var I,P,S,E,D=A.length-1;D>=0;--D){if(I=A[D],D===0)return void(I._color=1);
1357if((P=A[D-1]).left===I){if((S=P.right).right&&S.right._color===0)return E=(S=P.right=n(S)).right=n(S.right),P.right=S.left,S.left=P,S.right=E,S._color=P._color,I._color=1,P._color=1,E._color=1,o(P),o(S),D>1&&((F=A[D-2]).left===P?F.left=S:F.right=S),void(A[D-1]=S);if(S.left&&S.left._color===0)return E=(S=P.right=n(S)).left=n(S.left),P.right=E.left,S.left=E.right,E.left=P,E.right=S,E._color=P._color,P._color=1,S._color=1,I._color=1,o(P),o(S),o(E),D>1&&((F=A[D-2]).left===P?F.left=E:F.right=E),void(A[D-1]=E);if(S._color===1){if(P._color===0)return P._color=1,void(P.right=t(0,S));P.right=t(0,S);continue}S=n(S),P.right=S.left,S.left=P,S._color=P._color,P._color=0,o(P),o(S),D>1&&((F=A[D-2]).left===P?F.left=S:F.right=S),A[D-1]=S,A[D]=P,D+1<A.length?A[D+1]=I:A.push(I),D+=2}else{if((S=P.left).left&&S.left._color===0)return E=(S=P.left=n(S)).left=n(S.left),P.left=S.right,S.right=P,S.left=E,S._color=P._color,I._color=1,P._color=1,E._color=1,o(P),o(S),D>1&&((F=A[D-2]).right===P?F.right=S:F.left=S),void(A[D-1]=S);if(S.right&&S.right._color===0)return E=(S=P.left=n(S)).right=n(S.right),P.left=E.right,S.right=E.left,E.right=P,E.left=S,E._color=P._color,P._color=1,S._color=1,I._color=1,o(P),o(S),o(E),D>1&&((F=A[D-2]).right===P?F.right=E:F.left=E),void(A[D-1]=E);if(S._color===1){if(P._color===0)return P._color=1,void(P.left=t(0,S));P.left=t(0,S);continue}var F;S=n(S),P.left=S.right,S.right=P,S._color=P._color,P._color=0,o(P),o(S),D>1&&((F=A[D-2]).right===P?F.right=S:F.left=S),A[D-1]=S,A[D]=P,D+1<A.length?A[D+1]=I:A.push(I),D+=2}}}(x),L.left===l?L.left=null:L.right=null,new r(this.tree._compare,x[0])},Object.defineProperty(s,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(s,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(s,"index",{get:function(){var a=0,x=this._stack;if(x.length===0){var l=this.tree.root;return l?l._count:0}x[x.length-1].left&&(a=x[x.length-1].left._count);for(var w=x.length-2;w>=0;--w)x[w+1]===x[w].right&&(++a,x[w].left&&(a+=x[w].left._count));return a},enumerable:!0}),s.next=function(){var a=this._stack;if(a.length!==0){var x=a[a.length-1];if(x.right)for(x=x.right;x;)a.push(x),x=x.left;else for(a.pop();a.length>0&&a[a.length-1].right===x;)x=a[a.length-1],a.pop()}},Object.defineProperty(s,"hasNext",{get:function(){var a=this._stack;if(a.length===0)return!1;if(a[a.length-1].right)return!0;for(var x=a.length-1;x>0;--x)if(a[x-1].left===a[x])return!0;return!1}}),s.update=function(a){var x=this._stack;if(x.length===0)throw new Error("Can't update empty node!");var l=new Array(x.length),w=x[x.length-1];l[l.length-1]=new e(w._color,w.key,a,w.left,w.right,w._count);for(var _=x.length-2;_>=0;--_)(w=x[_]).left===x[_+1]?l[_]=new e(w._color,w.key,w.value,l[_+1],w.right,w._count):l[_]=new e(w._color,w.key,w.value,w.left,l[_+1],w._count);return new r(this.tree._compare,l[0])},s.prev=function(){var a=this._stack;if(a.length!==0){var x=a[a.length-1];if(x.left)for(x=x.left;x;)a.push(x),x=x.right;else for(a.pop();a.length>0&&a[a.length-1].left===x;)x=a[a.length-1],a.pop()}},Object.defineProperty(s,"hasPrev",{get:function(){var a=this._stack;if(a.length===0)return!1;if(a[a.length-1].left)return!0;for(var x=a.length-1;x>0;--x)if(a[x-1].right===a[x])return!0;return!1}})},{}],70:[function(m,b,v){b.exports=function(_,T){var k=new i(_);return k.update(T),k};var e=m("./lib/text.js"),n=m("./lib/lines.js"),t=m("./lib/background.js"),o=m("./lib/cube.js"),r=m("./lib/ticks.js"),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(_,T){return _[0]=T[0],_[1]=T[1],_[2]=T[2],_}function i(_){this.gl=_,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWi
1357dth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=t(_)}var u=i.prototype;function f(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}u.update=function(_){function T(Z,K,q){if(q in _){var W,$=_[q],R=this[q];(Z?Array.isArray($)&&Array.isArray($[0]):Array.isArray($))?this[q]=W=[K($[0]),K($[1]),K($[2])]:this[q]=W=[K($),K($),K($)];for(var N=0;N<3;++N)if(W[N]!==R[N])return!0}return!1}_=_||{};var k,L=T.bind(this,!1,Number),A=T.bind(this,!1,Boolean),I=T.bind(this,!1,String),P=T.bind(this,!0,function(Z){if(Array.isArray(Z)){if(Z.length===3)return[+Z[0],+Z[1],+Z[2],1];if(Z.length===4)return[+Z[0],+Z[1],+Z[2],+Z[3]]}return[0,0,0,1]}),S=!1,E=!1;if("bounds"in _)for(var D=_.bounds,F=0;F<2;++F)for(var H=0;H<3;++H)D[F][H]!==this.bounds[F][H]&&(E=!0),this.bounds[F][H]=D[F][H];if("ticks"in _)for(k=_.ticks,S=!0,this.autoTicks=!1,F=0;F<3;++F)this.tickSpacing[F]=0;else L("tickSpacing")&&(this.autoTicks=!0,E=!0);if(this._firstInit&&("ticks"in _||"tickSpacing"in _||(this.autoTicks=!0),E=!0,S=!0,this._firstInit=!1),E&&this.autoTicks&&(k=r.create(this.bounds,this.tickSpacing),S=!0),S){for(F=0;F<3;++F)k[F].sort(function(Z,K){return Z.x-K.x});r.equal(k,this.ticks)?S=!1:this.ticks=k}A("tickEnable"),I("tickFont")&&(S=!0),L("tickSize"),L("tickAngle"),L("tickPad"),P("tickColor");var V=I("labels");I("labelFont")&&(V=!0),A("labelEnable"),L("labelSize"),L("labelPad"),P("labelColor"),A("lineEnable"),A("lineMirror"),L("lineWidth"),P("lineColor"),A("lineTickEnable"),A("lineTickMirror"),L("lineTickLength"),L("lineTickWidth"),P("lineTickColor"),A("gridEnable"),L("gridWidth"),P("gridColor"),A("zeroEnable"),P("zeroLineColor"),L("zeroLineWidth"),A("backgroundEnable"),P("backgroundColor"),this._text?this._text&&(V||S)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=e(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&S&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};var s=[new f,new f,new f];function h(_,T,k,L,A){for(var I=_.primalOffset,P=_.primalMinor,S=_.mirrorOffset,E=_.mirrorMinor,D=L[T],F=0;F<3;++F)if(T!==F){var H=I,V=S,Z=P,K=E;D&1<<F&&(H=S,V=I,Z=E,K=P),H[F]=k[0][F],V[F]=k[1][F],A[F]>0?(Z[F]=-1,K[F]=0):(Z[F]=0,K[F]=1)}}var p=[0,0,0],a={model:d,view:d,projection:d,_ortho:!1};u.isOpaque=function(){return!0},u.isTransparent=function(){return!1},u.drawTransparent=function(_){};var x=[0,0,0],l=[0,0,0],w=[0,0,0];u.draw=function(_){_=_||a;for(var T=this.gl,k=_.model||d,L=_.view||d,A=_.projection||d,I=this.bounds,P=_._ortho||!1,S=o(k,L,A,I,P),E=S.cubeEdges,D=S.axis,F=L[12],H=L[13],V=L[14],Z=L[15],K=(P?2:1)*this.pixelRatio*(A[3]*F+A[7]*H+A[11]*V+A[15]*Z)/T.drawingBufferHeight,q=0;q<3;++q)this.lastCubeProps.cubeEdges[q]=E[q],this.lastCubeProps.axis[q]=D[q];var W=s;for(q=0;q<3;++q)h(s[q],q,this.bounds,E,D);T=this.gl;var $,R=p;for(q=0;q<3;++q)this.backgroundEnable[q]?R[q]=D[q]:R[q]=0;for(this._background.draw(k,L,A,I,R,this.backgroundColor),this._lines.bind(k,L,A,this),q=0;q<3;++q){var N=[0,0,0];D[q]>0?N[q]=I[1][q]:N[q]=I[0][q];for(var U=0;U<2;++U){var Q=(q+1+U)%3,j=(q+1+(1^U))%3;this.gridEnable[Q]&&this._lines.drawGrid(Q,j,this.bounds,N,this.gridColor[Q],this.gridWidth[Q]*this.pixelRatio)}for(U=0;U<2;++U)Q=(q+1+U)%3,j=(q+1+(1^U))%3,this.zeroEnable[j]&&Math.min(I[0][j],I[1][j])<=0&&Math.max(I[0][j],I[1][j])>=0&&this._lines.drawZero(Q,j,this.bounds,N,this.zeroLineColor[j],this.zeroLineWidth[j]*this.pixelRatio)}for(q=0;q<3;++q){this.lineEnable[q]&&this._lines.drawAxisLine(q,this.bounds,W[q].primalOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio),this.lineMirror[q]&&this._lines.drawAxisLine(q,this.bounds,W[q].mirrorOffset,this.lineColor[q],this.lineWidth[q]*this.pixelRatio);var X=c(x,W[q].primalMinor),J=c(l,W[q].mirrorMinor),re=this.lineTickLength;for(U=0;U<3;++U){var ne=K/k[5*U];X[U]*=re[U]*ne,J[U]*=re[U]*ne}this.lineTickEnable[q]&&this._lines.drawAxisTicks(q,W[q].primalOffset,X,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio),this.lineTickMirror[q]&&this._lines.drawAxisTicks(q,W[q].mirrorOffset,J,this.lineTickColor[q],this.lineTickWidth[q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(k,L,A,this.pixelRatio);var se,oe;function pe(Ee){(oe=[0,0,0])[Ee]=1}function ce(Ee,fe,me){var Te=(Ee+1)%3,_e=(Ee+2)%3,Ae=fe[Te],Pe=fe[_e],De=me[Te],Ve=me[_e];Ae>0&&Ve>0||Ae>0&&Ve<0||Ae<0&&Ve>0||Ae<0&&Ve<0?pe(Te):(Pe>0&&De>0||Pe>0&&De<0||Pe<0&&De>0||Pe<0&&De<0)&&pe(_e)}for(q=0;q<3;++q){var de=W[q].primalMinor,xe=W[q].mirrorMinor,we=c(w,W[q].primalOffset);for(U=0;U<3;++U)this.lineTickEnable[q]&&(we[U]+=K*de[U]*Math.max(this.lineTickLength[U],0)/k[5*U]);var be=[0,0,0];if(be[q]=1,this.tickEnable[q]){for(this.tickAngle[q]===-3600?(this.tickAngle[q]=0,this.tickAlign[q]="auto"):this.tickAlign[q]=-1,se=1,($=[this.tickAlign[q],.5,se])[0]==="auto"?$[0]=0:$[0]=parseInt(""+$[0]),oe=[0,0,0],ce(q,de,xe),U=0;U<3;++U)we[U]+=K*de[U]*this.tickPad[U]/k[5*U];this._text.drawTicks(q,this.tickSize[q],this.tickAngle[q],we,this.tickColor[q],be,oe,$)}if(this.labelEnable[q]){for(se=0,oe=[0,0,0],this.labels[q].length>4&&(pe(q),se=1),($=[this.labelAlign[q],.5,se])[0]==="auto"?$[0]=0:$[0]=parseInt(""+$[0]),U=0;U<3;++U)we[U]+=K*de[U]*this.labelPad[U]/k[5*U];we[q]+=.5*(I[0][q]+I[1][q]),this._text.drawLabel(q,this.labelSize[q],this.labelAngle[q],we,this.labelColor[q],[0,0,0],oe,$)}}this._text.unbind()},u.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":71,"./lib/cube.js":72,"./lib/lines.js":73,"./lib/text.js":75,"./lib/ticks.js":76}],71:[function(m,b,v){b.exports=function(d){for(var c=[],i=[],u=0,f=0;f<3;++f)for(var s=(f+1)%3,h=(f+2)%3,p=[0,0,0],a=[0,0,0],x=-1;x<=1;x+=2){i.push(u,u+2,u+1,u+1,u+2,u+3),p[f]=x,a[f]=x;for(var l=-1;l<=1;l+=2){p[s]=l;for(var w=-1;w<=1;w+=2)p[h]=w,c.push(p[0],p[1],p[2],a[0],a[1],a[2]),u+=1}var _=s;s=h,h=_}var T=e(d,new Float32Array(c)),k=e(d,new Uint16Array(i),d.ELEMENT_ARRAY_BUFFER),L=n(d,[{buffer:T,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:T,type:d.FLOAT,size:3,offset:12,stride:24}],k),A=t(d);return A.attributes.position.location=0,A.attributes.normal.location=1,new o(d,T,L,A)};var e=m("gl-buffer"),n=m("gl-vao"),t=m("./shaders").bg;function o(d,c,i,u){this.gl=d,this.buffer=c,this.vao=i,this.shader=u}var r=o.prototype;r.draw=function(d,c,i,u,f,s){for(var h=!1,p=0;p<3;++p)h=h||f[p];if(h){var a=this.gl;a.enable(a.POLYGON_OFFSET_FILL),a.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:c,projection:i,bounds:u,enable:f,colors:s},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),a.disable(a.POLYGON_OFFSET_FILL)}},r.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":74,"gl-buffer":78,"gl-vao":150}],72:[function(m,b,v){b.exports=function(l,w,_,T,k){n(r,w,l),n(r,_,r);for(var L=0,A=0;A<2;++A){i[2]=T[A][2];for(var I=0;I<2;++I){i[1]=T[I][1];for(var P=0;P<2;++P)i[0]=T[P][0],f(d[L],i,r),L+=1}}var S=-1;for(A=0;A<8;++A){for(var E=d[A][3],D=0;D<3;++D)c[A][D]=d[A][D]/E;k&&(c[A][2]*=-1),E<0&&(S<0||c[A][2]<c[S][2])&&(S=A)}if(S<0){S=0;for(var F=0;F<3;
1357++F){for(var H=(F+2)%3,V=(F+1)%3,Z=-1,K=-1,q=0;q<2;++q){var W=(R=q<<F)+(q<<H)+(1-q<<V),$=R+(1-q<<H)+(q<<V);o(c[R],c[W],c[$],u)<0||(q?Z=1:K=1)}if(Z<0||K<0)K>Z&&(S|=1<<F);else{for(q=0;q<2;++q){W=(R=q<<F)+(q<<H)+(1-q<<V),$=R+(1-q<<H)+(q<<V);var R,N=h([d[R],d[W],d[$],d[R+(1<<H)+(1<<V)]]);q?Z=N:K=N}K>Z&&(S|=1<<F)}}}var U=7^S,Q=-1;for(A=0;A<8;++A)A!==S&&A!==U&&(Q<0||c[Q][1]>c[A][1])&&(Q=A);var j=-1;for(A=0;A<3;++A)(J=Q^1<<A)!==S&&J!==U&&(j<0&&(j=J),(V=c[J])[0]<c[j][0]&&(j=J));var X=-1;for(A=0;A<3;++A){var J;(J=Q^1<<A)!==S&&J!==U&&J!==j&&(X<0&&(X=J),(V=c[J])[0]>c[X][0]&&(X=J))}var re=p;re[0]=re[1]=re[2]=0,re[e.log2(j^Q)]=Q&j,re[e.log2(Q^X)]=Q&X;var ne=7^X;ne===S||ne===U?(ne=7^j,re[e.log2(X^ne)]=ne&X):re[e.log2(j^ne)]=ne&j;var se=a,oe=S;for(F=0;F<3;++F)se[F]=oe&1<<F?-1:1;return x};var e=m("bit-twiddle"),n=m("gl-mat4/multiply"),t=m("split-polygon"),o=m("robust-orientation"),r=new Array(16),d=new Array(8),c=new Array(8),i=new Array(3),u=[0,0,0];function f(l,w,_){for(var T=0;T<4;++T){l[T]=_[12+T];for(var k=0;k<3;++k)l[T]+=w[k]*_[4*k+T]}}(function(){for(var l=0;l<8;++l)d[l]=[1,1,1,1],c[l]=[1,1,1]})();var s=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function h(l){for(var w=0;w<s.length;++w)if((l=t.positive(l,s[w])).length<3)return 0;var _=l[0],T=_[0]/_[3],k=_[1]/_[3],L=0;for(w=1;w+1<l.length;++w){var A=l[w],I=l[w+1],P=A[0]/A[3]-T,S=A[1]/A[3]-k,E=I[0]/I[3]-T,D=I[1]/I[3]-k;L+=Math.abs(P*D-S*E)}return L}var p=[1,1,1],a=[0,0,0],x={cubeEdges:p,axis:a}},{"bit-twiddle":32,"gl-mat4/multiply":100,"robust-orientation":284,"split-polygon":300}],73:[function(m,b,v){b.exports=function(p,a,x){var l=[],w=[0,0,0],_=[0,0,0],T=[0,0,0],k=[0,0,0];l.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var L=0;L<3;++L){for(var A=l.length/3|0,I=0;I<x[L].length;++I){var P=+x[L][I].x;l.push(P,0,1,P,1,1,P,0,-1,P,0,-1,P,1,1,P,1,-1)}var S=l.length/3|0;w[L]=A,_[L]=S-A,A=l.length/3|0;for(var E=0;E<x[L].length;++E)P=+x[L][E].x,l.push(P,0,1,P,1,1,P,0,-1,P,0,-1,P,1,1,P,1,-1);S=l.length/3|0,T[L]=A,k[L]=S-A}var D=e(p,new Float32Array(l)),F=n(p,[{buffer:D,type:p.FLOAT,size:3,stride:0,offset:0}]),H=t(p);return H.attributes.position.location=0,new s(p,D,F,H,_,w,k,T)};var e=m("gl-buffer"),n=m("gl-vao"),t=m("./shaders").line,o=[0,0,0],r=[0,0,0],d=[0,0,0],c=[0,0,0],i=[1,1];function u(p){return p[0]=p[1]=p[2]=0,p}function f(p,a){return p[0]=a[0],p[1]=a[1],p[2]=a[2],p}function s(p,a,x,l,w,_,T,k){this.gl=p,this.vertBuffer=a,this.vao=x,this.shader=l,this.tickCount=w,this.tickOffset=_,this.gridCount=T,this.gridOffset=k}var h=s.prototype;h.bind=function(p,a,x){this.shader.bind(),this.shader.uniforms.model=p,this.shader.uniforms.view=a,this.shader.uniforms.projection=x,i[0]=this.gl.drawingBufferWidth,i[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=i,this.vao.bind()},h.unbind=function(){this.vao.unbind()},h.drawAxisLine=function(p,a,x,l,w){var _=u(r);this.shader.uniforms.majorAxis=r,_[p]=a[1][p]-a[0][p],this.shader.uniforms.minorAxis=_;var T,k=f(c,x);k[p]+=a[0][p],this.shader.uniforms.offset=k,this.shader.uniforms.lineWidth=w,this.shader.uniforms.color=l,(T=u(d))[(p+2)%3]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,6),(T=u(d))[(p+1)%3]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,6)},h.drawAxisTicks=function(p,a,x,l,w){if(this.tickCount[p]){var _=u(o);_[p]=1,this.shader.uniforms.majorAxis=_,this.shader.uniforms.offset=a,this.shader.uniforms.minorAxis=x,this.shader.uniforms.color=l,this.shader.uniforms.lineWidth=w;var T=u(d);T[p]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,this.tickCount[p],this.tickOffset[p])}},h.drawGrid=function(p,a,x,l,w,_){if(this.gridCount[p]){var T=u(r);T[a]=x[1][a]-x[0][a],this.shader.uniforms.minorAxis=T;var k=f(c,l);k[a]+=x[0][a],this.shader.uniforms.offset=k;var L=u(o);L[p]=1,this.shader.uniforms.majorAxis=L;var A=u(d);A[p]=1,this.shader.uniforms.screenAxis=A,this.shader.uniforms.lineWidth=_,this.shader.uniforms.color=w,this.vao.draw(this.gl.TRIANGLES,this.gridCount[p],this.gridOffset[p])}},h.drawZero=function(p,a,x,l,w,_){var T=u(r);this.shader.uniforms.majorAxis=T,T[p]=x[1][p]-x[0][p],this.shader.uniforms.minorAxis=T;var k=f(c,l);k[p]+=x[0][p],this.shader.uniforms.offset=k;var L=u(d);L[a]=1,this.shader.uniforms.screenAxis=L,this.shader.uniforms.lineWidth=_,this.shader.uniforms.color=w,this.vao.draw(this.gl.TRIANGLES,6)},h.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{"./shaders":74,"gl-buffer":78,"gl-vao":150}],74:[function(m,b,v){var e=m("glslify"),n=m("gl-shader"),t=e([`precision highp float;
1358#define GLSLIFY 1
1359
1360attribute vec3 position;
1361
1362uniform mat4 model, view, projection;
1363uniform vec3 offset, majorAxis, minorAxis, screenAxis;
1364uniform float lineWidth;
1365uniform vec2 screenShape;
1366
1367vec3 project(vec3 p) {
1368  vec4 pp = projection * view * model * vec4(p, 1.0);
1369  return pp.xyz / max(pp.w, 0.0001);
1370}
1371
1372void main() {
1373  vec3 major = position.x * majorAxis;
1374  vec3 minor = position.y * minorAxis;
1375
1376  vec3 vPosition = major + minor + offset;
1377  vec3 pPosition = project(vPosition);
1378  vec3 offset = project(vPosition + screenAxis * position.z);
1379
1380  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;
1381
1382  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
1383}
1384`]),o=e([`precision highp float;
1385#define GLSLIFY 1
1386
1387uniform vec4 color;
1388void main() {
1389  gl_FragColor = color;
1390}`]);v.line=function(u){return n(u,t,o,null,[{name:"position",type:"vec3"}])};var r=e([`precision highp float;
1391#define GLSLIFY 1
1392
1393attribute vec3 position;
1394
1395uniform mat4 model, view, projection;
1396uniform vec3 offset, axis, alignDir, alignOpt;
1397uniform float scale, angle, pixelScale;
1398uniform vec2 resolution;
1399
1400vec3 project(vec3 p) {
1401  vec4 pp = projection * view * model * vec4(p, 1.0);
1402  return pp.xyz / max(pp.w, 0.0001);
1403}
1404
1405float computeViewAngle(vec3 a, vec3 b) {
1406  vec3 A = project(a);
1407  vec3 B = project(b);
1408
1409  return atan(
1410    (B.y - A.y) * resolution.y,
1411    (B.x - A.x) * resolution.x
1412  );
1413}
1414
1415const float PI = 3.141592;
1416const float TWO_PI = 2.0 * PI;
1417const float HALF_PI = 0.5 * PI;
1418const float ONE_AND_HALF_PI = 1.5 * PI;
1419
1420int option = int(floor(alignOpt.x + 0.001));
1421float hv_ratio =       alignOpt.y;
1422bool enableAlign =    (alignOpt.z != 0.0);
1423
1424float mod_angle(float a) {
1425  return mod(a, PI);
1426}
1427
1428float positive_angle(float a) {
1429  return mod_angle((a < 0.0) ?
1430    a + TWO_PI :
1431    a
1432  );
1433}
1434
1435float look_upwards(float a) {
1436  float b = positive_angle(a);
1437  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?
1438    b - PI :
1439    b;
1440}
1441
1442float look_horizontal_or_vertical(float a, float ratio) {
1443  // ratio controls the ratio between being horizontal to (vertical + horizontal)
1444  // if ratio is set to 0.5 then it is 50%, 50%.
1445  // when using a higher ratio e.g. 0.75 the result would
1446  // likely be more horizontal than vertical.
1447
1448  float b = positive_angle(a);
1449
1450  return
1451    (b < (      ratio) * HALF_PI) ? 0.0 :
1452    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :
1453    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :
1454    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :
1455                                    0.0;
1456}
1457
1458float roundTo(float a, float b) {
1459  return float(b * floor((a + 0.5 * b) / b));
1460}
1461
1462float look_round_n_directions(float a, int n) {
1463  float b = positive_angle(a);
1464  float div = TWO_PI / float(n);
1465  float c = roundTo(b, div);
1466  return look_upwards(c);
1467}
1468
1469float applyAlignOption(float rawAngle, float delta) {
1470  return
1471    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions
1472    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical
1473    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis
1474    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards
1475    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal
1476                    rawAngle;                // otherwise return back raw input angle
1477}
1478
1479bool isAxisTitle = (axis.x == 0.0) &&
1480                   (axis.y == 0.0) &&
1481                   (axis.z == 0.0);
1482
1483void main() {
1484  //Compute world offset
1485  float axisDistance = position.z;
1486  vec3 dataPosition = axisDistance * axis + offset;
1487
1488  float beta = angle; // i.e. user defined attributes for each tick
1489
1490  float axisAngle;
1491  float clipAngle;
1492  float flip;
1493
1494  if (enableAlign) {
1495    axisAngle = (isAxisTitle) ? HALF_PI :
1496                      computeViewAngle(dataPosition, dataPosition + axis);
1497    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);
1498
1499    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;
1500    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;
1501
1502    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),
1503                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;
1504
1505    beta += applyAlignOption(clipAngle, flip * PI);
1506  }
1507
1508  //Compute plane offset
1509  vec2 planeCoord = position.xy * pixelScale;
1510
1511  mat2 planeXform = scale * mat2(
1512     cos(beta), sin(beta),
1513    -sin(beta), cos(beta)
1514  );
1515
1516  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;
1517
1518  //Compute clip position
1519  vec3 clipPosition = project(dataPosition);
1520
1521  //Apply text offset in clip coordinates
1522  clipPosition += vec3(viewOffset, 0.0);
1523
1524  //Done
1525  gl_Position = vec4(clipPosition, 1.0);
1526}`]),d=e([`precision highp float;
1527#define GLSLIFY 1
1528
1529uniform vec4 color;
1530void main() {
1531  gl_FragColor = color;
1532}`]);v.text=function(u){return n(u,r,d,null,[{name:"position",type:"vec3"}])};var c=e([`precision highp float;
1533#define GLSLIFY 1
1534
1535attribute vec3 position;
1536attribute vec3 normal;
1537
1538uniform mat4 model, view, projection;
1539uniform vec3 enable;
1540uniform vec3 bounds[2];
1541
1542varying vec3 colorChannel;
1543
1544void main() {
1545
1546  vec3 signAxis = sign(bounds[1] - bounds[0]);
1547
1548  vec3 realNormal = signAxis * normal;
1549
1550  if(dot(realNormal, enable) > 0.0) {
1551    vec3 minRange = min(bounds[0], bounds[1]);
1552    vec3 maxRange = max(bounds[0], bounds[1]);
1553    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));
1554    gl_Position = projection * view * model * vec4(nPosition, 1.0
1554);
1555  } else {
1556    gl_Position = vec4(0,0,0,0);
1557  }
1558
1559  colorChannel = abs(realNormal);
1560}`]),i=e([`precision highp float;
1561#define GLSLIFY 1
1562
1563uniform vec4 colors[3];
1564
1565varying vec3 colorChannel;
1566
1567void main() {
1568  gl_FragColor = colorChannel.x * colors[0] +
1569                 colorChannel.y * colors[1] +
1570                 colorChannel.z * colors[2];
1571}`]);v.bg=function(u){return n(u,c,i,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":132,glslify:231}],75:[function(m,b,v){(function(e){(function(){b.exports=function(s,h,p,a,x,l){var w=n(s),_=t(s,[{buffer:w,size:3}]),T=r(s);T.attributes.position.location=0;var k=new i(s,T,w,_);return k.update(h,p,a,x,l),k};var n=m("gl-buffer"),t=m("gl-vao"),o=m("vectorize-text"),r=m("./shaders").text,d=window||e.global||{},c=d.__TEXT_CACHE||{};d.__TEXT_CACHE={};function i(s,h,p,a){this.gl=s,this.shader=h,this.buffer=p,this.vao=a,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=i.prototype,f=[0,0];u.bind=function(s,h,p,a){this.vao.bind(),this.shader.bind();var x=this.shader.uniforms;x.model=s,x.view=h,x.projection=p,x.pixelScale=a,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.unbind=function(){this.vao.unbind()},u.update=function(s,h,p,a,x){var l=[];function w(S,E,D,F,H,V){var Z=c[D];Z||(Z=c[D]={});var K=Z[E];K||(K=Z[E]=function(X,J){try{return o(X,J)}catch(re){return console.warn('error vectorizing text:"'+X+'" error:',re),{cells:[],positions:[]}}}
1571(E,{triangles:!0,font:D,textAlign:"center",textBaseline:"middle",lineSpacing:H,styletags:V}));for(var q=(F||12)/12,W=K.positions,$=K.cells,R=0,N=$.length;R<N;++R)for(var U=$[R],Q=2;Q>=0;--Q){var j=W[U[Q]];l.push(q*j[0],-q*j[1],S)}}for(var _=[0,0,0],T=[0,0,0],k=[0,0,0],L=[0,0,0],A={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},I=0;I<3;++I){k[I]=l.length/3|0,w(.5*(s[0][I]+s[1][I]),h[I],p[I],12,1.25,A),L[I]=(l.length/3|0)-k[I],_[I]=l.length/3|0;for(var P=0;P<a[I].length;++P)a[I][P].text&&w(a[I][P].x,a[I][P].text,a[I][P].font||x,a[I][P].fontSize||12,1.25,A);T[I]=(l.length/3|0)-_[I]}this.buffer.update(l),this.tickOffset=_,this.tickCount=T,this.labelOffset=k,this.labelCount=L},u.drawTicks=function(s,h,p,a,x,l,w,_){this.tickCount[s]&&(this.shader.uniforms.axis=l,this.shader.uniforms.color=x,this.shader.uniforms.angle=p,this.shader.uniforms.scale=h,this.shader.uniforms.offset=a,this.shader.uniforms.alignDir=w,this.shader.uniforms.alignOpt=_,this.vao.draw(this.gl.TRIANGLES,this.tickCount[s],this.tickOffset[s]))},u.drawLabel=function(s,h,p,a,x,l,w,_){this.labelCount[s]&&(this.shader.uniforms.axis=l,this.shader.uniforms.color=x,this.shader.uniforms.angle=p,this.shader.uniforms.scale=h,this.shader.uniforms.offset=a,this.shader.uniforms.alignDir=w,this.shader.uniforms.alignOpt=_,this.vao.draw(this.gl.TRIANGLES,this.labelCount[s],this.labelOffset[s]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this)}).call(this,m("_process"))},{"./shaders":74,_process:5,"gl-buffer":78,"gl-vao":150,"vectorize-text":311}],76:[function(m,b,v){function e(n,t){var o=n+"",r=o.indexOf("."),d=0;r>=0&&(d=o.length-r-1);var c=Math.pow(10,d),i=Math.round(n*t*c),u=i+"";if(u.indexOf("e")>=0)return u;var f=i/c,s=i%c;i<0?(f=0|-Math.ceil(f),s=0|-s):(f=0|Math.floor(f),s|=0);var h=""+f;if(i<0&&(h="-"+h),d){for(var p=""+s;p.length<d;)p="0"+p;return h+"."+p}return h}v.create=function(n,t){for(var o=[],r=0;r<3;++r){for(var d=[],c=(n[0][r],n[1][r],0);c*t[r]<=n[1][r];++c)d.push({x:c*t[r],text:e(t[r],c)});for(c=-1;c*t[r]>=n[0][r];--c)d.push({x:c*t[r],text:e(t[r],c)});o.push(d)}return o},v.equal=function(n,t){for(var o=0;o<3;++o){if(n[o].length!==t[o].length)return!1;for(var r=0;r<n[o].length;++r){var d=n[o][r],c=t[o][r];if(d.x!==c.x||d.text!==c.text||d.font!==c.font||d.fontColor!==c.fontColor||d.fontSize!==c.fontSize||d.dx!==c.dx||d.dy!==c.dy)return!1}}return!0}},{}],77:[function(m,b,v){b.exports=function(x,l,w,_,T){var k=l.model||c,L=l.view||c,A=l.projection||c,I=l._ortho||!1,P=x.bounds,S=(T=T||t(k,L,A,P,I)).axis;o(i,L,k),o(i,A,i);for(var E=p,D=0;D<3;++D)E[D].lo=1/0,E[D].hi=-1/0,E[D].pixelsPerDataUnit=1/0;var F=e(r(i,i));r(i,i);for(var H=0;H<3;++H){var V=(H+1)%3,Z=(H+2)%3,K=a;e:for(D=0;D<2;++D){var q=[];if(S[H]<0!=!!D){K[H]=P[D][H];for(var W=0;W<2;++W){K[V]=P[W^D][V];for(var $=0;$<2;++$)K[Z]=P[$^W^D][Z],q.push(K.slice())}var R=I?5:4;for(W=R;W===R;++W){if(q.length===0)continue e;q=n.positive(q,F[W])}for(W=0;W<q.length;++W){Z=q[W];var N=h(a,i,Z,w,_);for($=0;$<3;++$)E[$].lo=Math.min(E[$].lo,Z[$]),E[$].hi=Math.max(E[$].hi,Z[$]),$!==H&&(E[$].pixelsPerDataUnit=Math.min(E[$].pixelsPerDataUnit,Math.abs(N[$])))}}}}return E};var e=m("extract-frustum-planes"),n=m("split-polygon"),t=m("./lib/cube.js"),o=m("gl-mat4/multiply"),r=m("gl-mat4/transpose"),d=m("gl-vec4/transformMat4"),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),i=new Float32Array(16);function u(x,l,w){this.lo=x,this.hi=l,this.pixelsPerDataUnit=w}var f=[0,0,0,1],s=[0,0,0,1];function h(x,l,w,_,T){for(var k=0;k<3;++k){for(var L=f,A=s,I=0;I<3;++I)A[I]=L[I]=w[I];A[3]=L[3]=1,A[k]+=1,d(A,A,l),A[3]<0&&(x[k]=1/0),L[k]-=1,d(L,L,l),L[3]<0&&(x[k]=1/0);var P=(L[0]/L[3]-A[0]/A[3])*_,S=(L[1]/L[3]-A[1]/A[3])*T;x[k]=.25*Math.sqrt(P*P+S*S)}return x}var p=[new u(1/0,-1/0,1/0),new u(1/0,-1/0,1/0),new u(1/0,-1/0,1/0)],a=[0,0,0]},{"./lib/cube.js":72,"extract-frustum-planes":67,"gl-mat4/multiply":100,"gl-mat4/transpose":109,"gl-vec4/transformMat4":221,"split-polygon":300}],78:[function(m,b,v){var e=m("typedarray-pool"),n=m("ndarray-ops"),t=m("ndarray"),o=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function r(u,f,s,h,p){this.gl=u,this.type=f,this.handle=s,this.length=h,this.usage=p}var d=r.prototype;function c(u,f,s,h,p,a){var x=p.length*p.BYTES_PER_ELEMENT;if(a<0)return u.bufferData(f,p,h),x;if(x+a>s)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return u.bufferSubData(f,a,p),s}function i(u,f){for(var s=e.malloc(u.length,f),h=u.length,p=0;p<h;++p)s[p]=u[p];return s}d.bind=function(){this.gl.bindBuffer(this.type,this.handle)},d.unbind=function(){this.gl.bindBuffer(this.type,null)},d.dispose=function(){this.gl.deleteBuffer(this.handle)},d.update=function(u,f){if(typeof f!="number"&&(f=-1),this.bind(),typeof u=="object"&&u.shape!==void 0){var s=u.dtype;if(o.indexOf(s)<0&&(s="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(s=gl.getExtension("OES_element_index_uint")&&s!=="uint16"?"uint32":"uint16"),s===u.dtype&&function(x,l){for(var w=1,_=l.length-1;_>=0;--_){if(l[_]!==w)return!1;w*=x[_]}return!0}(u.shape,u.stride))u.offset===0&&u.data.length===u.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,u.data,f):this.length=c(this.gl,this.type,this.length,this.usage,u.data.subarray(u.offset,u.shape[0]),f);else{var h=e.malloc(u.size,s),p=t(h,u.shape);n.assign(p,u),this.length=c(this.gl,this.type,this.length,this.usage,f<0?h:h.subarray(0,u.size),f),e.free(h)}}else if(Array.isArray(u)){var a;a=this.type===this.gl.ELEMENT_ARRAY_BUFFER?i(u,"uint16"):i(u,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,f<0?a:a.subarray(0,u.length),f),e.free(
1571a)}else if(typeof u=="object"&&typeof u.length=="number")this.length=c(this.gl,this.type,this.length,this.usage,u,f);else{if(typeof u!="number"&&u!==void 0)throw new Error("gl-buffer: Invalid data type");if(f>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(u|=0)<=0&&(u=1),this.gl.bufferData(this.type,0|u,this.usage),this.length=u}},b.exports=function(u,f,s,h){if(s=s||u.ARRAY_BUFFER,h=h||u.DYNAMIC_DRAW,s!==u.ARRAY_BUFFER&&s!==u.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(h!==u.DYNAMIC_DRAW&&h!==u.STATIC_DRAW&&h!==u.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var p=u.createBuffer(),a=new r(u,s,p,0,h);return a.update(f),a}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],79:[function(m,b,v){var e=m("gl-vec3");b.exports=function(t,o){var r=t.positions,d=t.vectors,c={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(t.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),c;for(var i=0,u=1/0,f=-1/0,s=1/0,h=-1/0,p=1/0,a=-1/0,x=null,l=null,w=[],_=1/0,T=!1,k=0;k<r.length;k++){var L=r[k];u=Math.min(L[0],u),f=Math.max(L[0],f),s=Math.min(L[1],s),h=Math.max(L[1],h),p=Math.min(L[2],p),a=Math.max(L[2],a);var A=d[k];if(e.length(A)>i&&(i=e.length(A)),k){var I=2*e.distance(x,L)/(e.length(l)+e.length(A));I?(_=Math.min(_,I),T=!1):T=!0}T||(x=L,l=A),w.push(A)}var P=[u,s,p],S=[f,h,a];o&&(o[0]=P,o[1]=S),i===0&&(i=1);var E=1/i;isFinite(_)||(_=1),c.vectorScale=_;var D=t.coneSize||.5;t.absoluteConeSize&&(D=t.absoluteConeSize*E),c.coneScale=D,k=0;for(var F=0;k<r.length;k++)for(var H=(L=r[k])[0],V=L[1],Z=L[2],K=w[k],q=e.length(K)*E,W=0;W<8;W++){c.positions.push([H,V,Z,F++]),c.positions.push([H,V,Z,F++]),c.positions.push([H,V,Z,F++]),c.positions.push([H,V,Z,F++]),c.positions.push([H,V,Z,F++]),c.positions.push([H,V,Z,F++]),c.vectors.push(K),c.vectors.push(K),c.vectors.push(K),c.vectors.push(K),c.vectors.push(K),c.vectors.push(K),c.vertexIntensity.push(q,q,q),c.vertexIntensity.push(q,q,q);var $=c.positions.length;c.cells.push([$-6,$-5,$-4],[$-3,$-2,$-1])}return c};var n=m("./lib/shaders");b.exports.createMesh=m("./create_mesh"),b.exports.createConeMesh=function(t,o){return b.exports.createMesh(t,o,{shaders:n,traceType:"cone"})}},{"./create_mesh":80,"./lib/shaders":81,"gl-vec3":169}],80:[function(m,b,v){var e=m("gl-shader"),n=m("gl-buffer"),t=m("gl-vao"),o=m("gl-texture2d"),r=m("gl-mat4/multiply"),d=m("gl-mat4/invert"),c=m("ndarray"),i=m("colormap"),u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(a,x,l,w,_,T,k,L,A,I,P){this.gl=a,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=x,this.dirty=!0,this.triShader=l,this.pickShader=w,this.trianglePositions=_,this.triangleVectors=T,this.triangleColors=L,this.triangleUVs=A,this.triangleIds=k,this.triangleVAO=I,this.triangleCount=0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.traceType=P,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=u,this._view=u,this._projection=u,this._resolution=[1,1]}var s=f.prototype;function h(a,x){var l=e(a,x.meshShader.vertex,x.meshShader.fragment,null,x.meshShader.attributes);return l.attributes.position.location=0,l.attributes.color.location=2,l.attributes.uv.location=3,l.attributes.vector.location=4,l}function p(a,x){var l=e(a,x.pickShader.vertex,x.pickShader.fragment,null,x.pickShader.attributes);return l.attributes.position.location=0,l.attributes.id.location=1,l.attributes.vector.location=4,l}s.isOpaque=function(){return this.opacity>=1},s.isTransparent=function(){return this.opacity<1},s.pickSlots=1,s.setPickBase=function(a){this.pickId=a},s.update=function(a){a=a||{};var x=this.gl;this.dirty=!0,"lightPosition"in a&&(this.lightPosition=a.lightPosition),"opacity"in a&&(this.opacity=a.opacity),"ambient"in a&&(this.ambientLight=a.ambient),"diffuse"in a&&(this.diffuseLight=a.diffuse),"specular"in a&&(this.specularLight=a.specular),"roughness"in a&&(this.roughness=a.roughness),"fresnel"in a&&(this.fresnel=a.fresnel),a.tubeScale!==void 0&&(this.tubeScale=a.tubeScale),a.vectorScale!==void 0&&(this.vectorScale=a.vectorScale),a.coneScale!==void 0&&(this.coneScale=a.coneScale),a.coneOffset!==void 0&&(this.coneOffset=a.coneOffset),a.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=x.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=x.LINEAR,this.texture.setPixels(function(Q){for(var j=i({colormap:Q,nshades:256,format:"rgba"}),X=new Uint8Array(1024),J=0;J<256;++J){for(var re=j[J],ne=0;ne<3;++ne)X[4*J+ne]=re[ne];X[4*J+3]=255*re[3]}return c(X,[256,256,4],[4,0,1])}(a.colormap)),this.texture.generateMipmap());var l=a.cells,w=a.positions,_=a.vectors;if(w&&l&&_){var T=[],k=[],L=[],A=[],I=[];this.cells=l,this.positions=w,this.vectors=_;var P=a.meshColor||[1,1,1,1],S=a.vertexIntensity,E=1/0,D=-1/0;
1571if(S)if(a.vertexIntensityBounds)E=+a.vertexIntensityBounds[0],D=+a.vertexIntensityBounds[1];else for(var F=0;F<S.length;++F){var H=S[F];E=Math.min(E,H),D=Math.max(D,H)}else for(F=0;F<w.length;++F)H=w[F][2],E=Math.min(E,H),D=Math.max(D,H);for(this.intensity=S||function(Q){for(var j=Q.length,X=new Array(j),J=0;J<j;++J)X[J]=Q[J][2];return X}(w),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],F=0;F<w.length;++F)for(var V=w[F],Z=0;Z<3;++Z)!isNaN(V[Z])&&isFinite(V[Z])&&(this.bounds[0][Z]=Math.min(this.bounds[0][Z],V[Z]),this.bounds[1][Z]=Math.max(this.bounds[1][Z],V[Z]));var K=0;e:for(F=0;F<l.length;++F){var q=l[F];switch(q.length){case 3:for(Z=0;Z<3;++Z){V=w[$=q[Z]];for(var W=0;W<3;++W)if(isNaN(V[W])||!isFinite(V[W]))continue e}for(Z=0;Z<3;++Z){var $;V=w[$=q[2-Z]],T.push(V[0],V[1],V[2],V[3]);var R=_[$];k.push(R[0],R[1],R[2],R[3]||0);var N,U=P;U.length===3?L.push(U[0],U[1],U[2],1):L.push(U[0],U[1],U[2],U[3]),N=S?[(S[$]-E)/(D-E),0]:[(V[2]-E)/(D-E),0],A.push(N[0],N[1]),I.push(F)}K+=1}}this.triangleCount=K,this.trianglePositions.update(T),this.triangleVectors.update(k),this.triangleColors.update(L),this.triangleUVs.update(A),this.triangleIds.update(new Uint32Array(I))}},s.drawTransparent=s.draw=function(a){a=a||{};for(var x=this.gl,l=a.model||u,w=a.view||u,_=a.projection||u,T=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],k=0;k<3;++k)T[0][k]=Math.max(T[0][k],this.clipBounds[0][k]),T[1][k]=Math.min(T[1][k],this.clipBounds[1][k]);var L={model:l,view:w,projection:_,inverseModel:u.slice(),clipBounds:T,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};L.inverseModel=d(L.inverseModel,L.model),x.disable(x.CULL_FACE),this.texture.bind(0);var A=new Array(16);for(r(A,L.view,L.model),r(A,L.projection,A),d(A,A),k=0;k<3;++k)L.eyePosition[k]=A[12+k]/A[15];var I=A[15];for(k=0;k<3;++k)I+=this.lightPosition[k]*A[4*k+3];for(k=0;k<3;++k){for(var P=A[12+k],S=0;S<3;++S)P+=A[4*S+k]*this.lightPosition[S];L.lightPosition[k]=P/I}if(this.triangleCount>0){var E=this.triShader;E.bind(),E.uniforms=L,this.triangleVAO.bind(),x.drawArrays(x.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},s.drawPick=function(a){a=a||{};for(var x=this.gl,l=a.model||u,w=a.view||u,_=a.projection||u,T=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],k=0;k<3;++k)T[0][k]=Math.max(T[0][k],this.clipBounds[0][k]),T[1][k]=Math.min(T[1][k],this.clipBounds[1][k]);this._model=[].slice.call(l),this._view=[].slice.call(w),this._projection=[].slice.call(_),this._resolution=[x.drawingBufferWidth,x.drawingBufferHeight];var L={model:l,view:w,projection:_,clipBounds:T,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},A=this.pickShader;A.bind(),A.uniforms=L,this.triangleCount>0&&(this.triangleVAO.bind(),x.drawArrays(x.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},s.pick=function(a){if(!a||a.id!==this.pickId)return null;var x=a.value[0]+256*a.value[1]+65536*a.value[2],l=this.cells[x],w=this.positions[l[1]].slice(0,3),_={position:w,dataCoordinate:w,index:Math.floor(l[1]/48)};return this.traceType==="cone"?_.index=Math.floor(l[1]/48):this.traceType==="streamtube"&&(_.intensity=this.intensity[l[1]],_.velocity=this.vectors[l[1]].slice(0,3),_.divergence=this.vectors[l[1]][3],_.index=x),_},s.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()}
1571,b.exports=function(a,x,l){var w=l.shaders;arguments.length===1&&(a=(x=a).gl);var _=h(a,w),T=p(a,w),k=o(a,c(new Uint8Array([255,255,255,255]),[1,1,4]));k.generateMipmap(),k.minFilter=a.LINEAR_MIPMAP_LINEAR,k.magFilter=a.LINEAR;var L=n(a),A=n(a),I=n(a),P=n(a),S=n(a),E=t(a,[{buffer:L,type:a.FLOAT,size:4},{buffer:S,type:a.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:a.FLOAT,size:4},{buffer:P,type:a.FLOAT,size:2},{buffer:A,type:a.FLOAT,size:4}]),D=new f(a,k,_,T,L,A,S,I,P,E,l.traceType||"cone");return D.update(x),D}},{colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-shader":132,"gl-texture2d":146,"gl-vao":150,ndarray:259}],81:[function(m,b,v){var e=m("glslify"),n=e([`precision highp float;
1572
1573precision highp float;
1574#define GLSLIFY 1
1575
1576vec3 getOrthogonalVector(vec3 v) {
1577  // Return up-vector for only-z vector.
1578  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
1579  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
1580  // Assign z = 0, x = -b, y = a:
1581  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
1582  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
1583    return normalize(vec3(-v.y, v.x, 0.0));
1584  } else {
1585    return normalize(vec3(0.0, v.z, -v.y));
1586  }
1587}
1588
1589// Calculate the cone vertex and normal at the given index.
1590//
1591// The returned vertex is for a cone with its top at origin and height of 1.0,
1592// pointing in the direction of the vector attribute.
1593//
1594// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
1595// These vertices are used to make up the triangles of the cone by the following:
1596//   segment + 0 top vertex
1597//   segment + 1 perimeter vertex a+1
1598//   segment + 2 perimeter vertex a
1599//   segment + 3 center base vertex
1600//   segment + 4 perimeter vertex a
1601//   segment + 5 perimeter vertex a+1
1602// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
1603// To go from index to segment, floor(index / 6)
1604// To go from segment to angle, 2*pi * (segment/segmentCount)
1605// To go from index to segment index, index - (segment*6)
1606//
1607vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {
1608
1609  const float segmentCount = 8.0;
1610
1611  float index = rawIndex - floor(rawIndex /
1612    (segmentCount * 6.0)) *
1613    (segmentCount * 6.0);
1614
1615  float segment = floor(0.001 + index/6.0);
1616  float segmentIndex = index - (segment*6.0);
1617
1618  normal = -normalize(d);
1619
1620  if (segmentIndex > 2.99 && segmentIndex < 3.01) {
1621    return mix(vec3(0.0), -d, coneOffset);
1622  }
1623
1624  float nextAngle = (
1625    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||
1626    (segmentIndex > 4.99 &&  segmentIndex < 5.01)
1627  ) ? 1.0 : 0.0;
1628  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);
1629
1630  vec3 v1 = mix(d, vec3(0.0), coneOffset);
1631  vec3 v2 = v1 - d;
1632
1633  vec3 u = getOrthogonalVector(d);
1634  vec3 v = normalize(cross(u, d));
1635
1636  vec3 x = u * cos(angle) * length(d)*0.25;
1637  vec3 y = v * sin(angle) * length(d)*0.25;
1638  vec3 v3 = v2 + x + y;
1639  if (segmentIndex < 3.0) {
1640    vec3 tx = u * sin(angle);
1641    vec3 ty = v * -cos(angle);
1642    vec3 tangent = tx + ty;
1643    normal = normalize(cross(v3 - v1, tangent));
1644  }
1645
1646  if (segmentIndex == 0.0) {
1647    return mix(d, vec3(0.0), coneOffset);
1648  }
1649  return v3;
1650}
1651
1652attribute vec3 vector;
1653attribute vec4 color, position;
1654attribute vec2 uv;
1655
1656uniform float vectorScale, coneScale, coneOffset;
1657uniform mat4 model, view, projection, inverseModel;
1658uniform vec3 eyePosition, lightPosition;
1659
1660varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
1661varying vec4 f_color;
1662varying vec2 f_uv;
1663
1664void main() {
1665  // Scale the vector magnitude to stay constant with
1666  // model & view changes.
1667  vec3 normal;
1668  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);
1669  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
1670
1671  //Lighting geometry parameters
1672  vec4 cameraCoordinate = view * conePosition;
1673  cameraCoordinate.xyz /= cameraCoordinate.w;
1674  f_lightDirection = lightPosition - cameraCoordinate.xyz;
1675  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
1676  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);
1677
1678  // vec4 m_position  = model * vec4(conePosition, 1.0);
1679  vec4 t_position  = view * conePosition;
1680  gl_Position      = projection * t_position;
1681
1682  f_color          = color;
1683  f_data           = conePosition.xyz;
1684  f_position       = position.xyz;
1685  f_uv             = uv;
1686}
1687`]),t=e([`#extension GL_OES_standard_derivatives : enable
1688
1689precision highp float;
1690#define GLSLIFY 1
1691
1692float beckmannDistribution(float x, float roughness) {
1693  float NdotH = max(x, 0.0001);
1694  float cos2Alpha = NdotH * NdotH;
1695  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
1696  float roughness2 = roughness * roughness;
1697  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
1698  return exp(tan2Alpha / roughness2) / denom;
1699}
1700
1701float cookTorranceSpecular(
1702  vec3 lightDirection,
1703  vec3 viewDirection,
1704  vec3 surfaceNormal,
1705  float roughness,
1706  float fresnel) {
1707
1708  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
1709  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
1710
1711  //Half angle vector
1712  vec3 H = normalize(lightDirection + viewDirection);
1713
1714  //Geometric term
1715  float NdotH = max(dot(surfaceNormal, H), 0.0);
1716  float VdotH = max(dot(viewDirection, H), 0.000001);
1717  float LdotH = max(dot(lightDirection, H), 0.000001);
1718  float G1 = (2.0 * NdotH * VdotN) / VdotH;
1719  float G2 = (2.0 * NdotH * LdotN) / LdotH;
1720  float G = min(1.0, min(G1, G2));
1721  
1722  //Distribution term
1723  float D = beckmannDistribution(NdotH, roughness);
1724
1725  //Fresnel term
1726  float F = pow(1.0 - VdotN, fresnel);
1727
1728  //Multiply terms and done
1729  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
1730}
1731
1732bool outOfRange(float a, float b, float p) {
1733  return ((p > max(a, b)) || 
1734          (p < min(a, b)));
1735}
1736
1737bool outOfRange(vec2 a, vec2 b, vec2 p) {
1738  return (outOfRange(a.x, b.x, p.x) ||
1739          outOfRange(a.y, b.y, p.y));
1740}
1741
1742bool outOfRange(vec3 a, vec3 b, vec3 p) {
1743  return (outOfRange(a.x, b.x, p.x) ||
1744          outOfRange(a.y, b.y, p.y) ||
1745          outOfRange(a.z, b.z, p.z));
1746}
1747
1748bool outOfRange(vec4 a, vec4 b, vec4 p) {
1749  return outOfRange(a.xyz, b.xyz, p.xyz);
1750}
1751
1752uniform vec3 clipBounds[2];
1753uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
1754uniform sampler2D texture;
1755
1756varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
1757varying vec4 f_color;
1758varying vec2 f_uv;
1759
1760void main() {
1761  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
1762  vec3 N = normalize(f_normal);
1763  vec3 L = normalize(f_lightDirection);
1764  vec3 V = normalize(f_eyeDirection);
1765
1766  if(gl_FrontFacing) {
1767    N = -N;
1768  }
1769
1770  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
1771  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
1772
1773  vec4 surfaceColor = f_color * texture2D(texture, f_uv);
1774  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);
1775
1776  gl_FragColor = litColor * opacity;
1777}
1778`]),o=e([`precision highp float;
1779
1780precision highp float;
1781#define GLSLIFY 1
1782
1783vec3 getOrthogonalVector(vec3 v) {
1784  // Return up-vector for only-z vector.
1785  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
1786  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
1787  // Assign z = 0, x = -b, y = a:
1788  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
1789  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
1790    return normalize(vec3(-v.y, v.x, 0.0));
1791  } else {
1792    return normalize(vec3(0.0, v.z, -v.y));
1793  }
1794}
1795
1796// Calculate the cone vertex and normal at the given index.
1797//
1798// The returned vertex is for a cone with its top at origin and height of 1.0,
1799// pointing in the direction of the vector attribute.
1800//
1801// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
1802// These vertices are used to make up the triangles of the cone by the following:
1803//   segment + 0 top vertex
1804//   segment + 1 perimeter vertex a+1
1805//   segment + 2 perimeter vertex a
1806//   segment + 3 center base vertex
1807//   segment + 4 perimeter vertex a
1808//   segment + 5 perimeter vertex a+1
1809// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
1810// To go from index to segment, floor(index / 6)
1811// To go from segment to angle, 2*pi * (segment/segmentCount)
1812// To go from index to segment index, index - (segment*6)
1813//
1814vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {
1815
1816  const float segmentCount = 8.0;
1817
1818  float index = rawIndex - floor(rawIndex /
1819    (segmentCount * 6.0)) *
1820    (segmentCount * 6.0);
1821
1822  float segment = floor(0.001 + index/6.0);
1823  float segmentIndex = index - (segment*6.0);
1824
1825  normal = -normalize(d);
1826
1827  if (segmentIndex > 2.99 && segmentIndex < 3.01) {
1828    return mix(vec3(0.0), -d, coneOffset);
1829  }
1830
1831  float nextAngle = (
1832    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||
1833    (segmentIndex > 4.99 &&  segmentIndex < 5.01)
1834  ) ? 1.0 : 0.0;
1835  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);
1836
1837  vec3 v1 = mix(d, vec3(0.0), coneOffset);
1838  vec3 v2 = v1 - d;
1839
1840  vec3 u = getOrthogonalVector(d);
1841  vec3 v = normalize(cross(u, d));
1842
1843  vec3 x = u * cos(angle) * length(d)*0.25;
1844  vec3 y = v * sin(angle) * length(d)*0.25;
1845  vec3 v3 = v2 + x + y;
1846  if (segmentIndex < 3.0) {
1847    vec3 tx = u * sin(angle);
1848    vec3 ty = v * -cos(angle);
1849    vec3 tangent = tx + ty;
1850    normal = normalize(cross(v3 - v1, tangent));
1851  }
1852
1853  if (segmentIndex == 0.0) {
1854    return mix(d, vec3(0.0), coneOffset);
1855  }
1856  return v3;
1857}
1858
1859attribute vec4 vector;
1860attribute vec4 position;
1861attribute vec4 id;
1862
1863uniform mat4 model, view, projection;
1864uniform float vectorScale, coneScale, coneOffset;
1865
1866varying vec3 f_position;
1867varying vec4 f_id;
1868
1869void main() {
1870  vec3 normal;
1871  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);
1872  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
1873  gl_Position = projection * view * conePosition;
1874  f_id        = id;
1875  f_position  = position.xyz;
1876}
1877`]),r=e([`precision highp float;
1878#define GLSLIFY 1
1879
1880bool outOfRange(float a, float b, float p) {
1881  return ((p > max(a, b)) || 
1882          (p < min(a, b)));
1883}
1884
1885bool outOfRange(vec2 a, vec2 b, vec2 p) {
1886  return (outOfRange(a.x, b.x, p.x) ||
1887          outOfRange(a.y, b.y, p.y));
1888}
1889
1890bool outOfRange(vec3 a, vec3 b, vec3 p) {
1891  return (outOfRange(a.x, b.x, p.x) ||
1892          outOfRange(a.y, b.y, p.y) ||
1893          outOfRange(a.z, b.z, p.z));
1894}
1895
1896bool outOfRange(vec4 a, vec4 b, vec4 p) {
1897  return outOfRange(a.xyz, b.xyz, p.xyz);
1898}
1899
1900uniform vec3  clipBounds[2];
1901uniform float pickId;
1902
1903varying vec3 f_position;
1904varying vec4 f_id;
1905
1906void main() {
1907  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
1908
1909  gl_FragColor = vec4(pickId, f_id.xyz);
1910}`]);v.meshShader={vertex:n,fragment:t,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},v.pickShader={vertex:o,fragment:r,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:231}],82:[function(m,b,v){b.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_
1910SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],83:[function(m,b,v){var e=m("./1.0/numbers");b.exports=function(n){return e[n]}},{"./1.0/numbers":82}],84:[function(m,b,v){b.exports=function(f){var s=f.gl,h=e(s),p=n(s,[{buffer:h,type:s.FLOAT,size:3,offset:0,stride:40},{buffer:h,type:s.FLOAT,size:4,offset:12,stride:40},{buffer:h,type:s.FLOAT,size:3,offset:28,stride:40}]),a=t(s);a.attributes.position.location=0,a.attributes.color.location=1,a.attributes.offset.location=2;var x=new r(s,h,p,a);return x.update(f),x};var e=m("gl-buffer"),n=m("gl-vao"),t=m("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function r(f,s,h,p){this.gl=f,this.shader=p,this.buffer=s,this.vao=h,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var d=r.prototype;function c(f,s){for(var h=0;h<3;++h)f[0][h]=Math.min(f[0][h],s[h]),f[1][h]=Math.max(f[1][h],s[h])}d.isOpaque=function(){return!this.hasAlpha},d.isTransparent=function(){return this.hasAlpha},d.drawTransparent=d.draw=function(f){var s=this.gl,h=this.shader.uniforms;this.shader.bind();var p=h.view=f.view||o,a=h.projection=f.projection||o;h.model=f.model||o,h.clipBounds=this.clipBounds,h.opacity=this.opacity;var x=p[12],l=p[13],w=p[14],_=p[15],T=(f._ortho?2:1)*this.pixelRatio*(a[3]*x+a[7]*l+a[11]*w+a[15]*_)/s.drawingBufferHeight;this.vao.bind();for(var k=0;k<3;++k)s.lineWidth(this.lineWidth[k]*this.pixelRatio),h.capSize=this.capSize[k]*T,this.lineCount[k]&&s.drawArrays(s.LINES,this.lineOffset[k],this.lineCount[k]);this.vao.unbind()};var i=function(){for(var f=new Array(3),s=0;s<3;++s){for(var h=[],p=1;p<=2;++p)for(var a=-1;a<=1;a+=2){var x=[0,0,0];x[(p+s)%3]=a,h.push(x)}f[s]=h}return f}();function u(f,s,h,p){for(var a=i[p],x=0;x<a.length;++x){var l=a[x];f.push(s[0],s[1],s[2],h[0],h[1],h[2],h[3],l[0],l[1],l[2])}return a.length}d.update=function(f){"lineWidth"in(f=f||{})&&(this.lineWidth=f.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in f&&(this.capSize=f.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in f&&(this.opacity=+f.opacity,this.opacity<1&&(this.hasAlpha=!0));var s=f.color||[[0,0,0],[0,0,0],[0,0,0]],h=f.position,p=f.error;if(Array.isArray(s[0])||(s=[s,s,s]),h&&p){var a=[],x=h.length,l=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var w=0;w<3;++w){this.lineOffset[w]=l;e:for(var _=0;_<x;++_){for(var T=h[_],k=0;k<3;++k)if(isNaN(T[k])||!isFinite(T[k]))continue e;var L=p[_],A=s[w];if(Array.isArray(A[0])&&(A=s[_]),A.length===3?A=[A[0],A[1],A[2],1]:A.length===4&&(A=[A[0],A[1],A[2],A[3]],!this.hasAlpha&&A[3]<1&&(this.hasAlpha=!0)),!isNaN(L[0][w])&&!isNaN(L[1][w])){var I;
1910L[0][w]<0&&((I=T.slice())[w]+=L[0][w],a.push(T[0],T[1],T[2],A[0],A[1],A[2],A[3],0,0,0,I[0],I[1],I[2],A[0],A[1],A[2],A[3],0,0,0),c(this.bounds,I),l+=2+u(a,I,A,w)),L[1][w]>0&&((I=T.slice())[w]+=L[1][w],a.push(T[0],T[1],T[2],A[0],A[1],A[2],A[3],0,0,0,I[0],I[1],I[2],A[0],A[1],A[2],A[3],0,0,0),c(this.bounds,I),l+=2+u(a,I,A,w))}}this.lineCount[w]=l-this.lineOffset[w]}this.buffer.update(a)}},d.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":85,"gl-buffer":78,"gl-vao":150}],85:[function(m,b,v){var e=m("glslify"),n=m("gl-shader"),t=e([`precision highp float;
1911#define GLSLIFY 1
1912
1913attribute vec3 position, offset;
1914attribute vec4 color;
1915uniform mat4 model, view, projection;
1916uniform float capSize;
1917varying vec4 fragColor;
1918varying vec3 fragPosition;
1919
1920void main() {
1921  vec4 worldPosition  = model * vec4(position, 1.0);
1922  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);
1923  gl_Position         = projection * view * worldPosition;
1924  fragColor           = color;
1925  fragPosition        = position;
1926}`]),o=e([`precision highp float;
1927#define GLSLIFY 1
1928
1929bool outOfRange(float a, float b, float p) {
1930  return ((p > max(a, b)) || 
1931          (p < min(a, b)));
1932}
1933
1934bool outOfRange(vec2 a, vec2 b, vec2 p) {
1935  return (outOfRange(a.x, b.x, p.x) ||
1936          outOfRange(a.y, b.y, p.y));
1937}
1938
1939bool outOfRange(vec3 a, vec3 b, vec3 p) {
1940  return (outOfRange(a.x, b.x, p.x) ||
1941          outOfRange(a.y, b.y, p.y) ||
1942          outOfRange(a.z, b.z, p.z));
1943}
1944
1945bool outOfRange(vec4 a, vec4 b, vec4 p) {
1946  return outOfRange(a.xyz, b.xyz, p.xyz);
1947}
1948
1949uniform vec3 clipBounds[2];
1950uniform float opacity;
1951varying vec3 fragPosition;
1952varying vec4 fragColor;
1953
1954void main() {
1955  if (
1956    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||
1957    fragColor.a * opacity == 0.
1958  ) discard;
1959
1960  gl_FragColor = opacity * fragColor;
1961}`]);b.exports=function(r){return n(r,t,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":132,glslify:231}],86:[function(m,b,v){var e=m("gl-texture2d");b.exports=function(x,l,w,_){n||(n=x.FRAMEBUFFER_UNSUPPORTED,t=x.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=x.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,r=x.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var T=x.getExtension("WEBGL_draw_buffers");if(!d&&T&&function(E,D){var F=E.getParameter(D.MAX_COLOR_ATTACHMENTS_WEBGL);d=new Array(F+1);for(var H=0;H<=F;++H){for(var V=new Array(F),Z=0;Z<H;++Z)V[Z]=E.COLOR_ATTACHMENT0+Z;for(Z=H;Z<F;++Z)V[Z]=E.NONE;d[H]=V}}(x,T),Array.isArray(l)&&(_=w,w=0|l[1],l=0|l[0]),typeof l!="number")throw new Error("gl-fbo: Missing shape parameter");var k=x.getParameter(x.MAX_RENDERBUFFER_SIZE);if(l<0||l>k||w<0||w>k)throw new Error("gl-fbo: Parameters are too large for FBO");var L=1;if("color"in(_=_||{})){if((L=Math.max(0|_.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(L>1){if(!T)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(L>x.getParameter(T.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+L+" draw buffers")}}var A=x.UNSIGNED_BYTE,I=x.getExtension("OES_texture_float");if(_.float&&L>0){if(!I)throw new Error("gl-fbo: Context does not support floating point textures");A=x.FLOAT}else _.preferFloat&&L>0&&I&&(A=x.FLOAT);var P=!0;"depth"in _&&(P=!!_.depth);var S=!1;return"stencil"in _&&(S=!!_.stencil),new h(x,l,w,A,L,P,S,T)};var n,t,o,r,d=null;function c(x){return[x.getParameter(x.FRAMEBUFFER_BINDING),x.getParameter(x.RENDERBUFFER_BINDING),x.getParameter(x.TEXTURE_BINDING_2D)]}function i(x,l){x.bindFramebuffer(x.FRAMEBUFFER,l[0]),x.bindRenderbuffer(x.RENDERBUFFER,l[1]),x.bindTexture(x.TEXTURE_2D,l[2])}function u(x){switch(x){case n:throw new Error("gl-fbo: Framebuffer unsupported");case t:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case r:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}
1961function f(x,l,w,_,T,k){if(!_)return null;var L=e(x,l,w,T,_);return L.magFilter=x.NEAREST,L.minFilter=x.NEAREST,L.mipSamples=1,L.bind(),x.framebufferTexture2D(x.FRAMEBUFFER,k,x.TEXTURE_2D,L.handle,0),L}function s(x,l,w,_,T){var k=x.createRenderbuffer();return x.bindRenderbuffer(x.RENDERBUFFER,k),x.renderbufferStorage(x.RENDERBUFFER,_,l,w),x.framebufferRenderbuffer(x.FRAMEBUFFER,T,x.RENDERBUFFER,k),k}function h(x,l,w,_,T,k,L,A){this.gl=x,this._shape=[0|l,0|w],this._destroyed=!1,this._ext=A,this.color=new Array(T);for(var I=0;I<T;++I)this.color[I]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=_,this._useDepth=k,this._useStencil=L;var P=this,S=[0|l,0|w];Object.defineProperties(S,{0:{get:function(){return P._shape[0]},set:function(E){return P.width=E}},1:{get:function(){return P._shape[1]},set:function(E){return P.height=E}}}),this._shapeVector=S,function(E){var D=c(E.gl),F=E.gl,H=E.handle=F.createFramebuffer(),V=E._shape[0],Z=E._shape[1],K=E.color.length,q=E._ext,W=E._useStencil,$=E._useDepth,R=E._colorType;F.bindFramebuffer(F.FRAMEBUFFER,H);for(var N=0;N<K;++N)E.color[N]=f(F,V,Z,R,F.RGBA,F.COLOR_ATTACHMENT0+N);K===0?(E._color_rb=s(F,V,Z,F.RGBA4,F.COLOR_ATTACHMENT0),q&&q.drawBuffersWEBGL(d[0])):K>1&&q.drawBuffersWEBGL(d[K]);var U=F.getExtension("WEBGL_depth_texture");U?W?E.depth=f(F,V,Z,U.UNSIGNED_INT_24_8_WEBGL,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):$&&(E.depth=f(F,V,Z,F.UNSIGNED_SHORT,F.DEPTH_COMPONENT,F.DEPTH_ATTACHMENT)):$&&W?E._depth_rb=s(F,V,Z,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):$?E._depth_rb=s(F,V,Z,F.DEPTH_COMPONENT16,F.DEPTH_ATTACHMENT):W&&(E._depth_rb=s(F,V,Z,F.STENCIL_INDEX,F.STENCIL_ATTACHMENT));var Q=F.checkFramebufferStatus(F.FRAMEBUFFER);if(Q!==F.FRAMEBUFFER_COMPLETE){for(E._destroyed=!0,F.bindFramebuffer(F.FRAMEBUFFER,null),F.deleteFramebuffer(E.handle),E.handle=null,E.depth&&(E.depth.dispose(),E.depth=null),E._depth_rb&&(F.deleteRenderbuffer(E._depth_rb),E._depth_rb=null),N=0;N<E.color.length;++N)E.color[N].dispose(),E.color[N]=null;E._color_rb&&(F.deleteRenderbuffer(E._color_rb),E._color_rb=null),i(F,D),u(Q)}i(F,D)}(this)}var p=h.prototype;function a(x,l,w){if(x._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(x._shape[0]!==l||x._shape[1]!==w){var _=x.gl,T=_.getParameter(_.MAX_RENDERBUFFER_SIZE);if(l<0||l>T||w<0||w>T)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");x._shape[0]=l,x._shape[1]=w;for(var k=c(_),L=0;L<x.color.length;++L)x.color[L].shape=x._shape;x._color_rb&&(_.bindRenderbuffer(_.RENDERBUFFER,x._color_rb),_.renderbufferStorage(_.RENDERBUFFER,_.RGBA4,x._shape[0],x._shape[1])),x.depth&&(x.depth.shape=x._shape),x._depth_rb&&(_.bindRenderbuffer(_.RENDERBUFFER,x._depth_rb),x._useDepth&&x._useStencil?_.renderbufferStorage(_.RENDERBUFFER,_.DEPTH_STENCIL,x._shape[0],x._shape[1]):x._useDepth?_.renderbufferStorage(_.RENDERBUFFER,_.DEPTH_COMPONENT16,x._shape[0],x._shape[1]):x._useStencil&&_.renderbufferStorage(_.RENDERBUFFER,_.STENCIL_INDEX,x._shape[0],x._shape[1])),_.bindFramebuffer(_.FRAMEBUFFER,x.handle);var A=_.checkFramebufferStatus(_.FRAMEBUFFER);A!==_.FRAMEBUFFER_COMPLETE&&(x.dispose(),i(_,k),u(A)),i(_,k)}}Object.defineProperties(p,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(x){if(Array.isArray(x)||(x=[0|x,0|x]),x.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var l=0|x[0],w=0|x[1];return a(this,l,w),[l,w]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(x){return a(this,x|=0,this._shape[1]),x},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(x){return x|=0,a(this,this._shape[0],x),x},enumerable:!1}}),p.bind=function(){if(!this._destroyed){var x=this.gl;x.bindFramebuffer(x.FRAMEBUFFER,this.handle),x.viewport(0,0,this._shape[0],this._shape[1])}},p.dispose=function(){if(!this._destroyed){this._destroyed=!0;var x=this.gl;x.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(x.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var l=0;l<this.color.length;++l)this.color[l].dispose(),this.color[l]=null;this._color_rb&&(x.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{"gl-texture2d":146}],87:[function(m,b,v){var e=m("sprintf-js").sprintf,n=m("gl-constants/lookup"),t=m("glsl-shader-name"),o=m("add-line-numbers");b.exports=function(r,d,c){var i=t(d)||"of unknown name (see npm glsl-shader-name)",u="unknown type";c!==void 0&&(u=c===n.FRAGMENT_SHADER?"fragment":"vertex");
1961for(var f=e(`Error compiling %s shader %s:
1962`,u,i),s=e("%s%s",f,r),h=r.split(`
1963`),p={},a=0;a<h.length;a++){var x=h[a];if(x!==""&&x!=="\0"){var l=parseInt(x.split(":")[2]);if(isNaN(l))throw new Error(e("Could not parse error: %s",x));p[l]=x}}var w=o(d).split(`
1964`);for(a=0;a<w.length;a++)if(p[a+3]||p[a+2]||p[a+1]){var _=w[a];if(f+=_+`
1965`,p[a+1]){var T=p[a+1];T=T.substr(T.split(":",3).join(":").length+1).trim(),f+=e(`^^^ %s
1966
1967`,T)}}return{long:f.trim(),short:s.trim()}}},{"add-line-numbers":9,"gl-constants/lookup":83,"glsl-shader-name":223,"sprintf-js":301}],88:[function(m,b,v){b.exports=function(s,h){var p=s.gl,a=o(p,d.vertex,d.fragment),x=o(p,d.pickVertex,d.pickFragment),l=r(p),w=r(p),_=r(p),T=r(p),k=new c(s,a,x,l,w,_,T);return k.update(h),s.addObject(k),k};var e=m("binary-search-bounds"),n=m("iota-array"),t=m("typedarray-pool"),o=m("gl-shader"),r=m("gl-buffer"),d=m("./lib/shaders");function c(s,h,p,a,x,l,w){this.plot=s,this.shader=h,this.pickShader=p,this.positionBuffer=a,this.weightBuffer=x,this.colorBuffer=l,this.idBuffer=w,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var i,u=c.prototype,f=[0,0,1,0,0,1,1,0,1,1,0,1];u.draw=(i=[1,0,0,0,1,0,0,0,1],function(){var s=this.plot,h=this.shader,p=this.bounds,a=this.numVertices;if(!(a<=0)){var x=s.gl,l=s.dataBox,w=p[2]-p[0],_=p[3]-p[1],T=l[2]-l[0],k=l[3]-l[1];i[0]=2*w/T,i[4]=2*_/k,i[6]=2*(p[0]-l[0])/T-1,i[7]=2*(p[1]-l[1])/k-1,h.bind();var L=h.uniforms;L.viewTransform=i,L.shape=this.shape;var A=h.attributes;this.positionBuffer.bind(),A.position.pointer(),this.weightBuffer.bind(),A.weight.pointer(x.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),A.color.pointer(x.UNSIGNED_BYTE,!0),x.drawArrays(x.TRIANGLES,0,a)}}),u.drawPick=function(){var s=[1,0,0,0,1,0,0,0,1],h=[0,0,0,0];return function(p){var a=this.plot,x=this.pickShader,l=this.bounds,w=this.numVertices;if(!(w<=0)){var _=a.gl,T=a.dataBox,k=l[2]-l[0],L=l[3]-l[1],A=T[2]-T[0],I=T[3]-T[1];s[0]=2*k/A,s[4]=2*L/I,s[6]=2*(l[0]-T[0])/A-1,s[7]=2*(l[1]-T[1])/I-1;for(var P=0;P<4;++P)h[P]=p>>8*P&255;this.pickOffset=p,x.bind();var S=x.uniforms;S.viewTransform=s,S.pickOffset=h,S.shape=this.shape;var E=x.attributes;return this.positionBuffer.bind(),E.position.pointer(),this.weightBuffer.bind(),E.weight.pointer(_.UNSIGNED_BYTE,!1),this.idBuffer.bind(),E.pickId.pointer(_.UNSIGNED_BYTE,!1),_.drawArrays(_.TRIANGLES,0,w),p+this.shape[0]*this.shape[1]}}}(),u.pick=function(s,h,p){var a=this.pickOffset,x=this.shape[0]*this.shape[1];if(p<a||p>=a+x)return null;var l=p-a,w=this.xData,_=this.yData;return{object:this,pointId:l,dataCoord:[w[l%this.shape[0]],_[l/this.shape[0]|0]]}},u.update=function(s){var h=(s=s||{}).shape||[0,0],p=s.x||n(h[0]),a=s.y||n(h[1]),x=s.z||new Float32Array(h[0]*h[1]),l=s.zsmooth!==!1;this.xData=p,this.yData=a;var w,_,T,k,L=s.colorLevels||[0],A=s.colorValues||[0,0,0,1],I=L.length,P=this.bounds;l?(w=P[0]=p[0],_=P[1]=a[0],T=P[2]=p[p.length-1],k=P[3]=a[a.length-1]):(w=P[0]=p[0]+(p[1]-p[0])/2,_=P[1]=a[0]+(a[1]-a[0])/2,T=P[2]=p[p.length-1]+(p[p.length-1]-p[p.length-2])/2,k=P[3]=a[a.length-1]+(a[a.length-1]-a[a.length-2])/2);var S=1/(T-w),E=1/(k-_),D=h[0],F=h[1];this.shape=[D,F];var H=(l?(D-1)*(F-1):D*F)*(f.length>>>1);this.numVertices=H;for(var V=t.mallocUint8(4*H),Z=t.mallocFloat32(2*H),K=t.mallocUint8(2*H),q=t.mallocUint32(H),W=0,$=l?D-1:D,R=l?F-1:F,N=0;N<R;++N){var U,Q;l?(U=E*(a[N]-_),Q=E*(a[N+1]-_)):(U=N<F-1?E*(a[N]-(a[N+1]-a[N])/2-_):E*(a[N]-(a[N]-a[N-1])/2-_),Q=N<F-1?E*(a[N]+(a[N+1]-a[N])/2-_):E*(a[N]+(a[N]-a[N-1])/2-_));for(var j=0;j<$;++j){var X,J;l?(X=S*(p[j]-w),J=S*(p[j+1]-w)):(X=j<D-1?S*(p[j]-(p[j+1]-p[j])/2-w):S*(p[j]-(p[j]-p[j-1])/2-w),J=j<D-1?S*(p[j]+(p[j+1]-p[j])/2-w):S*(p[j]+(p[j]-p[j-1])/2-w));for(var re=0;re<f.length;re+=2){var ne,se,oe,pe,ce=f[re],de=f[re+1],xe=x[l?(N+de)*D+(j+ce):N*D+j],we=e.le(L,xe);if(we<0)ne=A[0],se=A[1],oe=A[2],pe=A[3];else if(we===I-1)ne=A[4*I-4],se=A[4*I-3],oe=A[4*I-2],pe=A[4*I-1];else{var be=(xe-L[we])/(L[we+1]-L[we]),Ee=1-be,fe=4*we,me=4*(we+1);ne=Ee*A[fe]+be*A[me],se=Ee*A[fe+1]+be*A[me+1],oe=Ee*A[fe+2]+be*A[me+2],pe=Ee*A[fe+3]+be*A[me+3]}V[4*W]=255*ne,V[4*W+1]=255*se,V[4*W+2]=255*oe,V[4*W+3]=255*pe,Z[2*W]=.5*X+.5*J,Z[2*W+1]=.5*U+.5*Q,K[2*W]=ce,K[2*W+1]=de,q[W]=N*D+j,W+=1}}}this.positionBuffer.update(Z),this.weightBuffer.update(K),this.colorBuffer.update(V),this.idBuffer.update(q),t.free(Z),t.free(V),t.free(K),t.free(q)},u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}}
1967,{"./lib/shaders":89,"binary-search-bounds":31,"gl-buffer":78,"gl-shader":132,"iota-array":235,"typedarray-pool":308}],89:[function(m,b,v){var e=m("glslify");b.exports={fragment:e([`precision lowp float;
1968#define GLSLIFY 1
1969varying vec4 fragColor;
1970void main() {
1971  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);
1972}
1973`]),vertex:e([`precision mediump float;
1974#define GLSLIFY 1
1975
1976attribute vec2 position;
1977attribute vec4 color;
1978attribute vec2 weight;
1979
1980uniform vec2 shape;
1981uniform mat3 viewTransform;
1982
1983varying vec4 fragColor;
1984
1985void main() {
1986  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
1987  fragColor = color;
1988  gl_Position = vec4(vPosition.xy, 0, vPosition.z);
1989}
1990`]),pickFragment:e([`precision mediump float;
1991#define GLSLIFY 1
1992
1993varying vec4 fragId;
1994varying vec2 vWeight;
1995
1996uniform vec2 shape;
1997uniform vec4 pickOffset;
1998
1999void main() {
2000  vec2 d = step(.5, vWeight);
2001  vec4 id = fragId + pickOffset;
2002  id.x += d.x + d.y*shape.x;
2003
2004  id.y += floor(id.x / 256.0);
2005  id.x -= floor(id.x / 256.0) * 256.0;
2006
2007  id.z += floor(id.y / 256.0);
2008  id.y -= floor(id.y / 256.0) * 256.0;
2009
2010  id.w += floor(id.z / 256.0);
2011  id.z -= floor(id.z / 256.0) * 256.0;
2012
2013  gl_FragColor = id/255.;
2014}
2015`]),pickVertex:e([`precision mediump float;
2016#define GLSLIFY 1
2017
2018attribute vec2 position;
2019attribute vec4 pickId;
2020attribute vec2 weight;
2021
2022uniform vec2 shape;
2023uniform mat3 viewTransform;
2024
2025varying vec4 fragId;
2026varying vec2 vWeight;
2027
2028void main() {
2029  vWeight = weight;
2030
2031  fragId = pickId;
2032
2033  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
2034  gl_Position = vec4(vPosition.xy, 0, vPosition.z);
2035}
2036`])}},{glslify:231}],90:[function(m,b,v){var e=m("glslify"),n=m("gl-shader"),t=e([`precision highp float;
2037#define GLSLIFY 1
2038
2039attribute vec3 position, nextPosition;
2040attribute float arcLength, lineWidth;
2041attribute vec4 color;
2042
2043uniform vec2 screenShape;
2044uniform float pixelRatio;
2045uniform mat4 model, view, projection;
2046
2047varying vec4 fragColor;
2048varying vec3 worldPosition;
2049varying float pixelArcLength;
2050
2051vec4 project(vec3 p) {
2052  return projection * view * model * vec4(p, 1.0);
2053}
2054
2055void main() {
2056  vec4 startPoint = project(position);
2057  vec4 endPoint   = project(nextPosition);
2058
2059  vec2 A = startPoint.xy / startPoint.w;
2060  vec2 B =   endPoint.xy /   endPoint.w;
2061
2062  float clipAngle = atan(
2063    (B.y - A.y) * screenShape.y,
2064    (B.x - A.x) * screenShape.x
2065  );
2066
2067  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
2068    sin(clipAngle),
2069    -cos(clipAngle)
2070  ) / screenShape;
2071
2072  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);
2073
2074  worldPosition = position;
2075  pixelArcLength = arcLength;
2076  fragColor = color;
2077}
2078`]),o=e([`precision highp float;
2079#define GLSLIFY 1
2080
2081bool outOfRange(float a, float b, float p) {
2082  return ((p > max(a, b)) || 
2083          (p < min(a, b)));
2084}
2085
2086bool outOfRange(vec2 a, vec2 b, vec2 p) {
2087  return (outOfRange(a.x, b.x, p.x) ||
2088          outOfRange(a.y, b.y, p.y));
2089}
2090
2091bool outOfRange(vec3 a, vec3 b, vec3 p) {
2092  return (outOfRange(a.x, b.x, p.x) ||
2093          outOfRange(a.y, b.y, p.y) ||
2094          outOfRange(a.z, b.z, p.z));
2095}
2096
2097bool outOfRange(vec4 a, vec4 b, vec4 p) {
2098  return outOfRange(a.xyz, b.xyz, p.xyz);
2099}
2100
2101uniform vec3      clipBounds[2];
2102uniform sampler2D dashTexture;
2103uniform float     dashScale;
2104uniform float     opacity;
2105
2106varying vec3    worldPosition;
2107varying float   pixelArcLength;
2108varying vec4    fragColor;
2109
2110void main() {
2111  if (
2112    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||
2113    fragColor.a * opacity == 0.
2114  ) discard;
2115
2116  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;
2117  if(dashWeight < 0.5) {
2118    discard;
2119  }
2120  gl_FragColor = fragColor * opacity;
2121}
2122`]),r=e([`precision highp float;
2123#define GLSLIFY 1
2124
2125#define FLOAT_MAX  1.70141184e38
2126#define FLOAT_MIN  1.17549435e-38
2127
2128// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl
2129vec4 packFloat(float v) {
2130  float av = abs(v);
2131
2132  //Handle special cases
2133  if(av < FLOAT_MIN) {
2134    return vec4(0.0, 0.0, 0.0, 0.0);
2135  } else if(v > FLOAT_MAX) {
2136    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;
2137  } else if(v < -FLOAT_MAX) {
2138    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;
2139  }
2140
2141  vec4 c = vec4(0,0,0,0);
2142
2143  //Compute exponent and mantissa
2144  float e = floor(log2(av));
2145  float m = av * pow(2.0, -e) - 1.0;
2146
2147  //Unpack mantissa
2148  c[1] = floor(128.0 * m);
2149  m -= c[1] / 128.0;
2150  c[2] = floor(32768.0 * m);
2151  m -= c[2] / 32768.0;
2152  c[3] = floor(8388608.0 * m);
2153
2154  //Unpack exponent
2155  float ebias = e + 127.0;
2156  c[0] = floor(ebias / 2.0);
2157  ebias -= c[0] * 2.0;
2158  c[1] += floor(ebias) * 128.0;
2159
2160  //Unpack sign bit
2161  c[0] += 128.0 * step(0.0, -v);
2162
2163  //Scale back to range
2164  return c / 255.0;
2165}
2166
2167bool outOfRange(float a, float b, float p) {
2168  return ((p > max(a, b)) || 
2169          (p < min(a, b)));
2170}
2171
2172bool outOfRange(vec2 a, vec2 b, vec2 p) {
2173  return (outOfRange(a.x, b.x, p.x) ||
2174          outOfRange(a.y, b.y, p.y));
2175}
2176
2177bool outOfRange(vec3 a, vec3 b, vec3 p) {
2178  return (outOfRange(a.x, b.x, p.x) ||
2179          outOfRange(a.y, b.y, p.y) ||
2180          outOfRange(a.z, b.z, p.z));
2181}
2182
2183bool outOfRange(vec4 a, vec4 b, vec4 p) {
2184  return outOfRange(a.xyz, b.xyz, p.xyz);
2185}
2186
2187uniform float pickId;
2188uniform vec3 clipBounds[2];
2189
2190varying vec3 worldPosition;
2191varying float pixelArcLength;
2192varying vec4 fragColor;
2193
2194void main() {
2195  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;
2196
2197  gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);
2198}`]),d=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];v.createShader=function(c){return n(c,t,o,null,d)},v.createPickShader=function(c){return n(c,t,r,null,d)}},{"gl-shader":132,glslify:231}],91:[function(m,b,v){b.exports=function(w){var _=w.gl||w.scene&&w.scene.gl,T=u(_);T.attributes.position.location=0,T.attributes.nextPosition.location=1,T.attributes.arcLength.location=2,T.attributes.lineWidth.location=3,T.attributes.color.location=4;var k=f(_);k.attributes.position.location=0,k.attributes.nextPosition.location=1,k.attributes.arcLength.location=2,k.attributes.lineWidth.location=3,k.attributes.color.location=4;for(var L=e(_),A=n(_,[{buffer:L,size:3,offset:0,stride:48},{buffer:L,size:3,offset:12,stride:48},{buffer:L,size:1,offset:24,stride:48},{buffer:L,size:1,offset:28,stride:48},{buffer:L,size:4,offset:32,stride:48}]),I=c(new Array(1024),[256,1,4]),P=0;P<1024;++P)I.data[P]=255;var S=t(_,I);S.wrap=_.REPEAT;var E=new x(_,T,k,L,A,S);return E.update(w),E};var e=m("gl-buffer"),n=m("gl-vao"),t=m("gl-texture2d"),o=new Uint8Array(4),r=new Float32Array(o.buffer),d=m("binary-search-bounds"),c=m("ndarray"),i=m("./lib/shaders"),u=i.createShader,f=i.createPickShader,s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(w,_){for(var T=0,k=0;k<3;++k){var L=w[k]-_[k];T+=L*L}return Math.sqrt(T)}function p(w){for(var _=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],T=0;T<3;++T)_[0][T]=Math.max(w[0][T],_[0][T]),_[1][T]=Math.min(w[1][T],_[1][T]);return _}function a(w,_,T,k){this.arcLength=w,this.position=_,this.index=T,this.dataCoordinate=k}function x(w,_,T,k,L,A){this.gl=w,this.shader=_,this.pickShader=T,this.buffer=k,this.vao=L,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=A,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var l=x.prototype;l.isTransparent=function(){return this.hasAlpha},l.isOpaque=function(){return!this.hasAlpha},l.pickSlots=1,l.setPickBase=function(w){this.pickId=w},l.drawTransparent=l.draw=function(w){if(this.vertexCount){var _=this.gl,T=this.shader,k=this.vao;T.bind(),T.uniforms={model:w.model||s,view:w.view||s,projection:w.projection||s,clipBounds:p(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[_.drawingBufferWidth,_.drawingBufferHeight],pixelRatio:this.pixelRatio}
vendor: 4,467 bytes, line 2198
2198,k.bind(),k.draw(_.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},l.drawPick=function(w){if(this.vertexCount){var _=this.gl,T=this.pickShader,k=this.vao;T.bind(),T.uniforms={model:w.model||s,view:w.view||s,projection:w.projection||s,pickId:this.pickId,clipBounds:p(this.clipBounds),screenShape:[_.drawingBufferWidth,_.drawingBufferHeight],pixelRatio:this.pixelRatio},k.bind(),k.draw(_.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},l.update=function(w){var _,T;this.dirty=!0;var k=!!w.connectGaps;"dashScale"in w&&(this.dashScale=w.dashScale),this.hasAlpha=!1,"opacity"in w&&(this.opacity=+w.opacity,this.opacity<1&&(this.hasAlpha=!0));var L=[],A=[],I=[],P=0,S=0,E=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],D=w.position||w.positions;if(D){var F=w.color||w.colors||[0,0,0,1],H=w.lineWidth||1,V=!1;e:for(_=1;_<D.length;++_){var Z,K,q,W=D[_-1],$=D[_];for(A.push(P),I.push(W.slice()),T=0;T<3;++T){if(isNaN(W[T])||isNaN($[T])||!isFinite(W[T])||!isFinite($[T])){if(!k&&L.length>0){for(var R=0;R<24;++R)L.push(L[L.length-12]);S+=2,V=!0}continue e}E[0][T]=Math.min(E[0][T],W[T],$[T]),E[1][T]=Math.max(E[1][T],W[T],$[T])}Array.isArray(F[0])?(Z=F.length>_-1?F[_-1]:F.length>0?F[F.length-1]:[0,0,0,1],K=F.length>_?F[_]:F.length>0?F[F.length-1]:[0,0,0,1]):Z=K=F,Z.length===3&&(Z=[Z[0],Z[1],Z[2],1]),K.length===3&&(K=[K[0],K[1],K[2],1]),!this.hasAlpha&&Z[3]<1&&(this.hasAlpha=!0),q=Array.isArray(H)?H.length>_-1?H[_-1]:H.length>0?H[H.length-1]:[0,0,0,1]:H;var N=P;if(P+=h(W,$),V){for(T=0;T<2;++T)L.push(W[0],W[1],W[2],$[0],$[1],$[2],N,q,Z[0],Z[1],Z[2],Z[3]);S+=2,V=!1}L.push(W[0],W[1],W[2],$[0],$[1],$[2],N,q,Z[0],Z[1],Z[2],Z[3],W[0],W[1],W[2],$[0],$[1],$[2],N,-q,Z[0],Z[1],Z[2],Z[3],$[0],$[1],$[2],W[0],W[1],W[2],P,-q,K[0],K[1],K[2],K[3],$[0],$[1],$[2],W[0],W[1],W[2],P,q,K[0],K[1],K[2],K[3]),S+=4}}if(this.buffer.update(L),A.push(P),I.push(D[D.length-1].slice()),this.bounds=E,this.vertexCount=S,this.points=I,this.arcLength=A,"dashes"in w){var U=w.dashes.slice();for(U.unshift(0),_=1;_<U.length;++_)U[_]=U[_-1]+U[_];var Q=c(new Array(1024),[256,1,4]);for(_=0;_<256;++_){for(T=0;T<4;++T)Q.set(_,0,T,0);1&d.le(U,U[U.length-1]*_/255)?Q.set(_,0,0,0):Q.set(_,0,0,255)}this.texture.setPixels(Q)}},l.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},l.pick=function(w){if(!w||w.id!==this.pickId)return null;var _=function(D,F,H,V){return o[0]=V,o[1]=H,o[2]=F,o[3]=D,r[0]}(w.value[0],w.value[1],w.value[2],0),T=d.le(this.arcLength,_);if(T<0)return null;if(T===this.arcLength.length-1)return new a(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),T);for(var k=this.points[T],L=this.points[Math.min(T+1,this.points.length-1)],A=(_-this.arcLength[T])/(this.arcLength[T+1]-this.arcLength[T]),I=1-A,P=[0,0,0],S=0;S<3;++S)P[S]=I*k[S]+A*L[S];var E=Math.min(A<.5?T:T+1,this.points.length-1);return new a(_,P,E,this.points[E])}},{"./lib/shaders":90,"binary-search-bounds":31,"gl-buffer":78,"gl-texture2d":146,"gl-vao":150,ndarray:259}],92:[function(m,b,v){b.exports=function(e){var n=new Float32Array(16);return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n}},{}],93:[function(m,b,v){b.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],94:[function(m,b,v){b.exports=function(e){var n=e[0],t=e[1],o=e[2],r=e[3],d=e[4],c=e[5],i=e[6],u=e[7],f=e[8],s=e[9],h=e[10],p=e[11],a=e[12],x=e[13],l=e[14],w=e[15];return(n*c-t*d)*(h*w-p*l)-(n*i-o*d)*(s*w-p*x)+(n*u-r*d)*(s*l-h*x)+(t*i-o*c)*(f*w-p*a)-(t*u-r*c)*(f*l-h*a)+(o*u-r*i)*(f*x-s*a)}},{}],95:[function(m,b,v){b.exports=function(e,n){var t=n[0],o=n[1],r=n[2],d=n[3],c=t+t,i=o+o,u=r+r,f=t*c,s=o*c,h=o*i,p=r*c,a=r*i,x=r*u,l=d*c,w=d*i,_=d*u;return e[0]=1-h-x,e[1]=s+_,e[2]=p-w,e[3]=0,e[4]=s-_,e[5]=1-f-x,e[6]=a+l,e[7]=0,e[8]=p+w,e[9]=a-l,e[10]=1-f-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],96:[function(m,b,v){b.exports=function(e,n,t){var o=n[0],r=n[1],d=n[2],c=n[3],i=o+o,u=r+r,f=d+d,s=o*i,h=o*u,p=o*f,a=r*u,x=r*f,l=d*f,w=c*i,_=c*u,T=c*f;return e[0]=1-(a+l),e[1]=h+T,e[2]=p-_,e[3]=0,e[4]=h-T,e[5]=1-(s+l),e[6]=x+w,e[7]=0,e[8]=p+_,e[9]=x-w,e[10]=1-(s+a),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},{}],97:[function(m,b,v){b.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
2198]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],98:[function(m,b,v){b.exports=function(e,n){var t=n[0],o=n[1],r=n[2],d=n[3],c=n[4],i=n[5],u=n[6],f=n[7],s=n[8],h=n[9],p=n[10],a=n[11],x=n[12],l=n[13],w=n[14],_=n[15],T=t*i-o*c,k=t*u-r*c,L=t*f-d*c,A=o*u-r*i,I=o*f-d*i,P=r*f-d*u,S=s*l-h*x,E=s*w-p*x,D=s*_-a*x,F=h*w-p*l,H=h*_-a*l,V=p*_-a*w,Z=T*V-k*H+L*F+A*D-I*E+P*S;return Z?(Z=1/Z,e[0]=(i*V-u*H+f*F)*Z,e[1]=(r*H-o*V-d*F)*Z,e[2]=(l*P-w*I+_*A)*Z,e[3]=(p*I-h*P-a*A)*Z,e[4]=(u*D-c*V-f*E)*Z,e[5]=(t*V-r*D+d*E)*Z,e[6]=(w*L-x*P-_*k)*Z,e[7]=(s*P-p*L+a*k)*Z,e[8]=(c*H-i*D+f*S)*Z,e[9]=(o*D-t*H-d*S)*Z,e[10]=(x*I-l*L+_*T)*Z,e[11]=(h*L-s*I-a*T)*Z,e[12]=(i*E-c*F-u*S)*Z,e[13]=(t*F-o*E+r*S)*Z,e[14]=(l*k-x*A-w*T)*Z,e[15]=(s*A-h*k+p*T)*Z,e):null}},{}],99:[function(m,b,v){var e=m("./identity");b.exports=function(n,t,o,r){var d,c,i,u,f,s,h,p,a,x,l=t[0],w=t[1],_=t[2],T=r[0],k=r[1],L=r[2],A=o[0],I=o[1],P=o[2];return Math.abs(l-A)<1e-6&&Math.abs(w-I)<1e-6&&Math.abs(_-P)<1e-6?e(n):(h=l-A,p=w-I,a=_-P,x=1/Math.sqrt(h*h+p*p+a*a),d=k*(a*=x)-L*(p*=x),c=L*(h*=x)-T*a,i=T*p-k*h,(x=Math.sqrt(d*d+c*c+i*i))?(d*=x=1/x,c*=x,i*=x):(d=0,c=0,i=0),u=p*i-a*c,f=a*d-h*i,s=h*c-p*d,(x=Math.sqrt(u*u+f*f+s*s))?(u*=x=1/x,f*=x,s*=x):(u=0,f=0,s=0),n[0]=d,n[1]=u,n[2]=h,n[3]=0,n[4]=c,n[5]=f,n[6]=p,n[7]=0,n[8]=i,n[9]=s,n[10]=a,n[11]=0,n[12]=-(d*l+c*w+i*_),n[13]=-(u*l+f*w+s*_),n[14]=-(h*l+p*w+a*_),n[15]=1,n)}},{"./identity":97}],100:[function(m,b,v){b.exports=function(e,n,t){var o=n[0],r=n[1],d=n[2],c=n[3],i=n[4],u=n[5],f=n[6],s=n[7],h=n[8],p=n[9],a=n[10],x=n[11],l=n[12],w=n[13],_=n[14],T=n[15],k=t[0],L=t[1],A=t[2],I=t[3];return e[0]=k*o+L*i+A*h+I*l,e[1]=k*r+L*u+A*p+I*w,e[2]=k*d+L*f+A*a+I*_,e[3]=k*c+L*s+A*x+I*T,k=t[4],L=t[5],A=t[6],I=t[7],e[4]=k*o+L*i+A*h+I*l,e[5]=k*r+L*u+A*p+I*w,e[6]=k*d+L*f+A*a+I*_,e[7]=k*c+L*s+A*x+I*T,k=t[8],L=t[9],A=t[10],I=t[11],e[8]=k*o+L*i+A*h+I*l,e[9]=k*r+L*u+A*p+I*w,e[10]=k*d+L*f+A*a+I*_,e[11]=k*c+L*s+A*x+I*T,k=t[12],L=t[13],A=t[14],I=t[15],e[12]=k*o+L*i+A*h+I*l,e[13]=k*r+L*u+A*p+I*w,e[14]=k*d+L*f+A*a+I*_,e[15]=k*c+L*s+A*x+I*T,e}},{}],101:[function(m,b,v){b.exports=function(e,n,t,o,r,d,c){var i=1/(n-t),u=1/(o-r),f=1/(d-c);return e[0]=-2*i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*f,e[11]=0,e[12]=(n+t)*i,e[13]=(r+o)*u,e[14]=(c+d)*f,e[15]=1,e}},{}],102:[function(m,b,v){b.exports=function(e,n,t,o,r){var d=1/Math.tan(n/2),c=1/(o-r);return e[0]=d/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=d,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*o*c,e[15]=0,e}},{}],103:[function(m,b,v){b.exports=function(e,n,t,o){var r,d,c,i,u,f,s,h,p,a,x,l,w,_,T,k,L,A,I,P,S,E,D,F,H=o[0],V=o[1],Z=o[2],K=Math.sqrt(H*H+V*V+Z*Z);return Math.abs(K)<1e-6?null:(H*=K=1/K,V*=K,Z*=K,r=Math.sin(t),d=Math.cos(t),c=1-d,i=n[0],u=n[1],f=n[2],s=n[3],h=n[4],p=n[5],a=n[6],x=n[7],l=n[8],w=n[9],_=n[10],T=n[11],k=H*H*c+d,L=V*H*c+Z*r,A=Z*H*c-V*r,I=H*V*c-Z*r,P=V*V*c+d,S=Z*V*c+H*r,E=H*Z*c+V*r,D=V*Z*c-H*r,F=Z*Z*c+d,e[0]=i*k+h*L+l*A,e[1]=u*k+p*L+w*A,e[2]=f*k+a*L+_*A,e[3]=s*k+x*L+T*A,e[4]=i*I+h*P+l*S,e[5]=u*I+p*P+w*S,e[6]=f*I+a*P+_*S,e[7]=s*I+x*P+T*S,e[8]=i*E+h*D+l*F,e[9]=u*E+p*D+w*F,e[10]=f*E+a*D+_*F,e[11]=s*E+x*D+T*F,n!==e&&(e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15]),e)}},{}],104:[function(m,b,v){b.exports=function(e,n,t){var o=Math.sin(t),r=Math.cos(t),d=n[4],c=n[5],i=n[6],u=n[7],f=n[8],s=n[9],h=n[10],p=n[11];return n!==e&&(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15]),e[4]=d*r+f*o,e[5]=c*r+s*o,e[6]=i*r+h*o,e[7]=u*r+p*o,e[8]=f*r-d*o,e[9]=s*r-c*o,e[10]=h*r-i*o,e[11]=p*r-u*o,e}},{}],105:[function(m,b,v){b.exports=function(e,n,t){var o=Math.sin(t),r=Math.cos(t),d=n[0],c=n[1],i=n[2],u=n[3],f=n[8],s=n[9],h=n[10],p=n[11];return n!==e&&(e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15]),e[0]=d*r-f*o,e[1]=c*r-s*o,e[2]=i*r-h*o,e[3]=u*r-p*o,e[8]=d*o+f*r,e[9]=c*o+s*r,e[10]=i*o+h*r,e[11]=u*o+p*r,e}},{}],106:[function(m,b,v){b.exports=function(e,n,t){var o=Math.sin(t),r=Math.cos(t),d=n[0],c=n[1],i=n[2],u=n[3],f=n[4],s=n[5],h=n[6],p=n[7];return n!==e&&(e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15]),e[0]=d*r+f*o,e[1]=c*r+s*o,e[2]=i*r+h*o,e[3]=u*r+p*o,e[4]=f*r-d*o,e[5]=s*r-c*o,e[6]=h*r-i*o,e[7]=p*r-u*o,e}},{}],107:[function(m,b,v){b.exports=function(e,n,t){var o=t[0],r=t[1],d=t[2];return e[0]=n[0]*o,e[1]=n[1]*o,e[2]=n[2]*o,e[3]=n[3]*o,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=n[7]*r,e[8]=n[8]*d,e[9]=n[9]*d,e[10]=n[10]*d,e[11]=n[11]*d,e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e}},{}],108:[function(m,b,v){b.exports=function(e,n,t){var o,r,d,c,i,u,f,s,h,p,a,x,l=t[0],w=t[1],_=t[2];return n===e?(e[12]=n[0]*l+n[4]*w+n[8]*_+n[12],e[13]=n[1]*l+n[5]*w+n[9]*_+n[13],e[14]=n[2]*l+n[6]*w+n[10]*_+n[14],e[15]=n[3]*l+n[7]*w+n[11]*_+n[15]):(o=n[0],r=n[1],d=n[2],
vendor: 4,268 bytes, lines 2198-2288
2198c=n[3],i=n[4],u=n[5],f=n[6],s=n[7],h=n[8],p=n[9],a=n[10],x=n[11],e[0]=o,e[1]=r,e[2]=d,e[3]=c,e[4]=i,e[5]=u,e[6]=f,e[7]=s,e[8]=h,e[9]=p,e[10]=a,e[11]=x,e[12]=o*l+i*w+h*_+n[12],e[13]=r*l+u*w+p*_+n[13],e[14]=d*l+f*w+a*_+n[14],e[15]=c*l+s*w+x*_+n[15]),e}},{}],109:[function(m,b,v){b.exports=function(e,n){if(e===n){var t=n[1],o=n[2],r=n[3],d=n[6],c=n[7],i=n[11];e[1]=n[4],e[2]=n[8],e[3]=n[12],e[4]=t,e[6]=n[9],e[7]=n[13],e[8]=o,e[9]=d,e[11]=n[14],e[12]=r,e[13]=c,e[14]=i}else e[0]=n[0],e[1]=n[4],e[2]=n[8],e[3]=n[12],e[4]=n[1],e[5]=n[5],e[6]=n[9],e[7]=n[13],e[8]=n[2],e[9]=n[6],e[10]=n[10],e[11]=n[14],e[12]=n[3],e[13]=n[7],e[14]=n[11],e[15]=n[15];return e}},{}],110:[function(m,b,v){var e=m("barycentric"),n=m("polytope-closest-point/lib/closest_point_2d.js");function t(d,c){for(var i=[0,0,0,0],u=0;u<4;++u)for(var f=0;f<4;++f)i[f]+=d[4*u+f]*c[u];return i}function o(d,c,i,u,f){for(var s=t(u,t(i,t(c,[d[0],d[1],d[2],1]))),h=0;h<3;++h)s[h]/=s[3];return[.5*f[0]*(1+s[0]),.5*f[1]*(1-s[1])]}function r(d,c){for(var i=[0,0,0],u=0;u<d.length;++u)for(var f=d[u],s=c[u],h=0;h<3;++h)i[h]+=s*f[h];return i}b.exports=function(d,c,i,u,f,s){if(d.length===1)return[0,d[0].slice()];for(var h=new Array(d.length),p=0;p<d.length;++p)h[p]=o(d[p],i,u,f,s);var a=0,x=1/0;for(p=0;p<h.length;++p){for(var l=0,w=0;w<2;++w)l+=Math.pow(h[p][w]-c[w],2);l<x&&(x=l,a=p)}var _=function(k,L){if(k.length===2){for(var A=0,I=0,P=0;P<2;++P)A+=Math.pow(L[P]-k[0][P],2),I+=Math.pow(L[P]-k[1][P],2);return A=Math.sqrt(A),I=Math.sqrt(I),A+I<1e-6?[1,0]:[I/(A+I),A/(I+A)]}if(k.length===3){var S=[0,0];return n(k[0],k[1],k[2],L,S),e(k,S)}return[]}(h,c),T=0;for(p=0;p<3;++p){if(_[p]<-.001||_[p]>1.0001)return null;T+=_[p]}return Math.abs(T-1)>.001?null:[a,r(d,_),_]}},{barycentric:14,"polytope-closest-point/lib/closest_point_2d.js":270}],111:[function(m,b,v){var e=m("glslify"),n=e([`precision highp float;
2199#define GLSLIFY 1
2200
2201attribute vec3 position, normal;
2202attribute vec4 color;
2203attribute vec2 uv;
2204
2205uniform mat4 model
2206           , view
2207           , projection
2208           , inverseModel;
2209uniform vec3 eyePosition
2210           , lightPosition;
2211
2212varying vec3 f_normal
2213           , f_lightDirection
2214           , f_eyeDirection
2215           , f_data;
2216varying vec4 f_color;
2217varying vec2 f_uv;
2218
2219vec4 project(vec3 p) {
2220  return projection * view * model * vec4(p, 1.0);
2221}
2222
2223void main() {
2224  gl_Position      = project(position);
2225
2226  //Lighting geometry parameters
2227  vec4 cameraCoordinate = view * vec4(position , 1.0);
2228  cameraCoordinate.xyz /= cameraCoordinate.w;
2229  f_lightDirection = lightPosition - cameraCoordinate.xyz;
2230  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
2231  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);
2232
2233  f_color          = color;
2234  f_data           = position;
2235  f_uv             = uv;
2236}
2237`]),t=e([`#extension GL_OES_standard_derivatives : enable
2238
2239precision highp float;
2240#define GLSLIFY 1
2241
2242float beckmannDistribution(float x, float roughness) {
2243  float NdotH = max(x, 0.0001);
2244  float cos2Alpha = NdotH * NdotH;
2245  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
2246  float roughness2 = roughness * roughness;
2247  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
2248  return exp(tan2Alpha / roughness2) / denom;
2249}
2250
2251float cookTorranceSpecular(
2252  vec3 lightDirection,
2253  vec3 viewDirection,
2254  vec3 surfaceNormal,
2255  float roughness,
2256  float fresnel) {
2257
2258  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
2259  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
2260
2261  //Half angle vector
2262  vec3 H = normalize(lightDirection + viewDirection);
2263
2264  //Geometric term
2265  float NdotH = max(dot(surfaceNormal, H), 0.0);
2266  float VdotH = max(dot(viewDirection, H), 0.000001);
2267  float LdotH = max(dot(lightDirection, H), 0.000001);
2268  float G1 = (2.0 * NdotH * VdotN) / VdotH;
2269  float G2 = (2.0 * NdotH * LdotN) / LdotH;
2270  float G = min(1.0, min(G1, G2));
2271  
2272  //Distribution term
2273  float D = beckmannDistribution(NdotH, roughness);
2274
2275  //Fresnel term
2276  float F = pow(1.0 - VdotN, fresnel);
2277
2278  //Multiply terms and done
2279  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
2280}
2281
2282//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d
2283
2284bool outOfRange(float a, float b, float p) {
2285  return ((p > max(a, b)) || 
2286          (p < min(a, b)));
2287}
2288
2289bool outOfRange(vec2 a, vec2 b, vec2 p) {
2290  return (outOfRange(a.x, b.x, p.x) ||
2291          outOfRange(a.y, b.y, p.y));
2292}
2293
2294bool outOfRange(vec3 a, vec3 b, vec3 p) {
2295  return (outOfRange(a.x, b.x, p.x) ||
2296          outOfRange(a.y, b.y, p.y) ||
2297          outOfRange(a.z, b.z, p.z));
2298}
2299
2300bool outOfRange(vec4 a, vec4 b, vec4 p) {
2301  return outOfRange(a.xyz, b.xyz, p.xyz);
2302}
2303
2304uniform vec3 clipBounds[2];
2305uniform float roughness
2306            , fresnel
2307            , kambient
2308            , kdiffuse
2309            , kspecular;
2310uniform sampler2D texture;
2311
2312varying vec3 f_normal
2313           , f_lightDirection
2314           , f_eyeDirection
2315           , f_data;
2316varying vec4 f_color;
2317varying vec2 f_uv;
2318
2319void main() {
2320  if (f_color.a == 0.0 ||
2321    outOfRange(clipBounds[0], clipBounds[1], f_data)
2322  ) discard;
2323
2324  vec3 N = normalize(f_normal);
2325  vec3 L = normalize(f_lightDirection);
2326  vec3 V = normalize(f_eyeDirection);
2327
2328  if(gl_FrontFacing) {
2329    N = -N;
2330  }
2331
2332  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
2333  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d
2334
2335  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
2336
2337  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);
2338  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);
2339
2340  gl_FragColor = litColor * f_color.a;
2341}
2342`]),o=e([`precision highp float;
2343#define GLSLIFY 1
2344
2345attribute vec3 position;
2346attribute vec4 color;
2347attribute vec2 uv;
2348
2349uniform mat4 model, view, projection;
2350
2351varying vec4 f_color;
2352varying vec3 f_data;
2353varying vec2 f_uv;
2354
2355void main() {
2356  gl_Position = projection * view * model * vec4(position, 1.0);
2357  f_color = color;
2358  f_data  = position;
2359  f_uv    = uv;
2360}`]),r=e([`precision highp float;
2361#define GLSLIFY 1
2362
2363bool outOfRange(float a, float b, float p) {
2364  return ((p > max(a, b)) || 
2365          (p < min(a, b)));
2366}
2367
2368bool outOfRange(vec2 a, vec2 b, vec2 p) {
2369  return (outOfRange(a.x, b.x, p.x) ||
2370          outOfRange(a.y, b.y, p.y));
2371}
2372
2373bool outOfRange(vec3 a, vec3 b, vec3 p) {
2374  return (outOfRange(a.x, b.x, p.x) ||
2375          outOfRange(a.y, b.y, p.y) ||
2376          outOfRange(a.z, b.z, p.z));
2377}
2378
2379bool outOfRange(vec4 a, vec4 b, vec4 p) {
2380  return outOfRange(a.xyz, b.xyz, p.xyz);
2381}
2382
2383uniform vec3 clipBounds[2];
2384uniform sampler2D texture;
2385uniform float opacity;
2386
2387varying vec4 f_color;
2388varying vec3 f_data;
2389varying vec2 f_uv;
2390
2391void main() {
2392  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;
2393
2394  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
2395}`]),d=e([`precision highp float;
2396#define GLSLIFY 1
2397
2398bool outOfRange(float a, float b, float p) {
2399  return ((p > max(a, b)) || 
2400          (p < min(a, b)));
2401}
2402
2403bool outOfRange(vec2 a, vec2 b, vec2 p) {
2404  return (outOfRange(a.x, b.x, p.x) ||
2405          outOfRange(a.y, b.y, p.y));
2406}
2407
2408bool outOfRange(vec3 a, vec3 b, vec3 p) {
2409  return (outOfRange(a.x, b.x, p.x) ||
2410          outOfRange(a.y, b.y, p.y) ||
2411          outOfRange(a.z, b.z, p.z));
2412}
2413
2414bool outOfRange(vec4 a, vec4 b, vec4 p) {
2415  return outOfRange(a.xyz, b.xyz, p.xyz);
2416}
2417
2418attribute vec3 position;
2419attribute vec4 color;
2420attribute vec2 uv;
2421attribute float pointSize;
2422
2423uniform mat4 model, view, projection;
2424uniform vec3 clipBounds[2];
2425
2426varying vec4 f_color;
2427varying vec2 f_uv;
2428
2429void main() {
2430  if (outOfRange(clipBounds[0], clipBounds[1], position)) {
2431
2432    gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);
2433  } else {
2434    gl_Position = projection * view * model * vec4(position, 1.0);
2435  }
2436  gl_PointSize = pointSize;
2437  f_color = color;
2438  f_uv = uv;
2439}`]),c=e([`precision highp float;
2440#define GLSLIFY 1
2441
2442uniform sampler2D texture;
2443uniform float opacity;
2444
2445varying vec4 f_color;
2446varying vec2 f_uv;
2447
2448void main() {
2449  vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);
2450  if(dot(pointR, pointR) > 0.25) {
2451    discard;
2452  }
2453  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
2454}`]),i=e([`precision highp float;
2455#define GLSLIFY 1
2456
2457attribute vec3 position;
2458attribute vec4 id;
2459
2460uniform mat4 model, view, projection;
2461
2462varying vec3 f_position;
2463varying vec4 f_id;
2464
2465void main() {
2466  gl_Position = projection * view * model * vec4(position, 1.0);
2467  f_id        = id;
2468  f_position  = position;
2469}`]),u=e([`precision highp float;
2470#define GLSLIFY 1
2471
2472bool outOfRange(float a, float b, float p) {
2473  return ((p > max(a, b)) || 
2474          (p < min(a, b)));
2475}
2476
2477bool outOfRange(vec2 a, vec2 b, vec2 p) {
2478  return (outOfRange(a.x, b.x, p.x) ||
2479          outOfRange(a.y, b.y, p.y));
2480}
2481
2482bool outOfRange(vec3 a, vec3 b, vec3 p) {
2483  return (outOfRange(a.x, b.x, p.x) ||
2484          outOfRange(a.y, b.y, p.y) ||
2485          outOfRange(a.z, b.z, p.z));
2486}
2487
2488bool outOfRange(vec4 a, vec4 b, vec4 p) {
2489  return outOfRange(a.xyz, b.xyz, p.xyz);
2490}
2491
2492uniform vec3  clipBounds[2];
2493uniform float pickId;
2494
2495varying vec3 f_position;
2496varying vec4 f_id;
2497
2498void main() {
2499  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
2500
2501  gl_FragColor = vec4(pickId, f_id.xyz);
2502}`]),f=e([`precision highp float;
2503#define GLSLIFY 1
2504
2505bool outOfRange(float a, float b, float p) {
2506  return ((p > max(a, b)) || 
2507          (p < min(a, b)));
2508}
2509
2510bool outOfRange(vec2 a, vec2 b, vec2 p) {
2511  return (outOfRange(a.x, b.x, p.x) ||
2512          outOfRange(a.y, b.y, p.y));
2513}
2514
2515bool outOfRange(vec3 a, vec3 b, vec3 p) {
2516  return (outOfRange(a.x, b.x, p.x) ||
2517          outOfRange(a.y, b.y, p.y) ||
2518          outOfRange(a.z, b.z, p.z));
2519}
2520
2521bool outOfRange(vec4 a, vec4 b, vec4 p) {
2522  return outOfRange(a.xyz, b.xyz, p.xyz);
2523}
2524
2525attribute vec3  position;
2526attribute float pointSize;
2527attribute vec4  id;
2528
2529uniform mat4 model, view, projection;
2530uniform vec3 clipBounds[2];
2531
2532varying vec3 f_position;
2533varying vec4 f_id;
2534
2535void main() {
2536  if (outOfRange(clipBounds[0], clipBounds[1], position)) {
2537
2538    gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
2539  } else {
2540    gl_Position  = projection * view * model * vec4(position, 1.0);
2541    gl_PointSize = pointSize;
2542  }
2543  f_id         = id;
2544  f_position   = position;
2545}`]),s=e([`precision highp float;
2546#define GLSLIFY 1
2547
2548attribute vec3 position;
2549
2550uniform mat4 model, view, projection;
2551
2552void main() {
2553  gl_Position = projection * view * model * vec4(position, 1.0);
2554}`]),h=e([`precision highp float;
2555#define GLSLIFY 1
2556
2557uniform vec3 contourColor;
2558
2559void main() {
2560  gl_FragColor = vec4(contourColor, 1.0);
2561}
2562`]);v.meshShader={vertex:n,fragment:t,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},v.wireShader={vertex:o,fragment:r,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},v.pointShader={vertex:d,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},v.pickShader={vertex:i,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},v.pointPickShader={vertex:f,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},v.contourShader={vertex:s,fragment:h,attributes:[{name:"position",type:"vec3"}]}},{glslify:231}],112:[function(m,b,v){var e=m("gl-shader"),n=m("gl-buffer"),t=m("gl-vao"),o=m("gl-texture2d"),r=m("normals"),d=m("gl-mat4/multiply"),c=m("gl-mat4/invert"),i=m("ndarray"),u=m("colormap"),f=m("simplicial-complex-contour"),s=m("typedarray-pool"),h=m("./lib/shaders"),p=m("./lib/closest-point"),a=h.meshShader,x=h.wireShader,l=h.pointShader,w=h.pickShader,_=h.pointPickShader,T=h.contourShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function L(V,Z,K,q,W,$,R,N,U,Q,j,X,J,re,ne,se,oe,pe,ce,de,xe,we,be,Ee,fe,me,Te){this.gl=V,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=Z,this.dirty=!0,this.triShader=K,this.lineShader=q,this.pointShader=W,this.pickShader=$,this.pointPickShader=R,this.contourShader=N,this.trianglePositions=U,this.triangleColors=j,this.triangleNormals=J,this.triangleUVs=X,this.triangleIds=Q,this.triangleVAO=re,this.triangleCount=0,this.lineWidth=1,this.edgePositions=ne,this.edgeColors=oe,this.edgeUVs=pe,this.edgeIds=se,this.edgeVAO=ce,this.edgeCount=0,this.pointPositions=de,this.pointColors=we,this.pointUVs=be,this.pointSizes=Ee,this.pointIds=xe,this.pointVAO=fe,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=me,this.contourVAO=Te,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=k,this._view=k,this._projection=k,this._resolution=[1,1]}var A=L.prototype;function I(V,Z){if(!Z||!Z.length)return 1;for(var K=0;K<Z.length;++K){if(Z.length<2)return 1;if(Z[K][0]===V)return Z[K][1];if(Z[K][0]>V&&K>0){var q=(Z[K][0]-V)/(Z[K][0]-Z[K-1][0]);
2562return Z[K][1]*(1-q)+q*Z[K-1][1]}}return 1}function P(V){var Z=e(V,a.vertex,a.fragment);return Z.attributes.position.location=0,Z.attributes.color.location=2,Z.attributes.uv.location=3,Z.attributes.normal.location=4,Z}function S(V){var Z=e(V,x.vertex,x.fragment);return Z.attributes.position.location=0,Z.attributes.color.location=2,Z.attributes.uv.location=3,Z}function E(V){var Z=e(V,l.vertex,l.fragment);return Z.attributes.position.location=0,Z.attributes.color.location=2,Z.attributes.uv.location=3,Z.attributes.pointSize.location=4,Z}function D(V){var Z=e(V,w.vertex,w.fragment);return Z.attributes.position.location=0,Z.attributes.id.location=1,Z}function F(V){var Z=e(V,_.vertex,_.fragment);return Z.attributes.position.location=0,Z.attributes.id.location=1,Z.attributes.pointSize.location=4,Z}function H(V){var Z=e(V,T.vertex,T.fragment);return Z.attributes.position.location=0,Z}A.isOpaque=function(){return!this.hasAlpha},A.isTransparent=function(){return this.hasAlpha},A.pickSlots=1,A.setPickBase=function(V){this.pickId=V},A.highlight=function(V){if(V&&this.contourEnable){for(var Z=f(this.cells,this.intensity,V.intensity),K=Z.cells,q=Z.vertexIds,W=Z.vertexWeights,$=K.length,R=s.mallocFloat32(6*$),N=0,U=0;U<$;++U)for(var Q=K[U],j=0;j<2;++j){var X=Q[0];Q.length===2&&(X=Q[j]);for(var J=q[X][0],re=q[X][1],ne=W[X],se=1-ne,oe=this.positions[J],pe=this.positions[re],ce=0;ce<3;++ce)R[N++]=ne*oe[ce]+se*pe[ce]}this.contourCount=N/3|0,this.contourPositions.update(R.subarray(0,N)),s.free(R)}else this.contourCount=0},A.update=function(V){V=V||{};var Z=this.gl;this.dirty=!0,"contourEnable"in V&&(this.contourEnable=V.contourEnable),"contourColor"in V&&(this.contourColor=V.contourColor),"lineWidth"in V&&(this.lineWidth=V.lineWidth),"lightPosition"in V&&(this.lightPosition=V.lightPosition),this.hasAlpha=!1,"opacity"in V&&(this.opacity=V.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in V&&(this.opacityscale=V.opacityscale,this.hasAlpha=!0),"ambient"in V&&(this.ambientLight=V.ambient),"diffuse"in V&&(this.diffuseLight=V.diffuse),"specular"in V&&(this.specularLight=V.specular),"roughness"in V&&(this.roughness=V.roughness),"fresnel"in V&&(this.fresnel=V.fresnel),V.texture?(this.texture.dispose(),this.texture=o(Z,V.texture)):V.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=Z.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=Z.LINEAR,this.texture.setPixels(function(Kt,Be){for(var qe=u({colormap:Kt,nshades:256,format:"rgba"}),Re=new Uint8Array(1024),Xe=0;Xe<256;++Xe){for(var ke=qe[Xe],Le=0;Le<3;++Le)Re[4*Xe+Le]=ke[Le];Re[4*Xe+3]=Be?255*I(Xe/255,Be):255*ke[3]}return i(Re,[256,256,4],[4,0,1])}(V.colormap,this.opacityscale)),this.texture.generateMipmap());var K=V.cells,q=V.positions;if(q&&K){var W=[],$=[],R=[],N=[],U=[],Q=[],j=[],X=[],J=[],re=[],ne=[],se=[],oe=[],pe=[];this.cells=K,this.positions=q;var ce=V.vertexNormals,de=V.cellNormals,xe=V.vertexNormalsEpsilon===void 0?1e-6:V.vertexNormalsEpsilon,we=V.faceNormalsEpsilon===void 0?1e-6:V.faceNormalsEpsilon;V.useFacetNormals&&!de&&(de=r.faceNormals(K,q,we)),de||ce||(ce=r.vertexNormals(K,q,xe));var be=V.vertexColors,Ee=V.cellColors,fe=V.meshColor||[1,1,1,1],me=V.vertexUVs,Te=V.vertexIntensity,_e=V.cellUVs,Ae=V.cellIntensity,Pe=1/0,De=-1/0;if(!me&&!_e)if(Te)if(V.vertexIntensityBounds)Pe=+V.vertexIntensityBounds[0],De=+V.vertexIntensityBounds[1];else for(var Ve=0;Ve<Te.length;++Ve){var Qe=Te[Ve];Pe=Math.min(Pe,Qe),De=Math.max(De,Qe)}else if(Ae)if(V.cellIntensityBounds)Pe=+V.cellIntensityBounds[0],De=+V.cellIntensityBounds[1];else for(Ve=0;Ve<Ae.length;++Ve)Qe=Ae[Ve],Pe=Math.min(Pe,Qe),De=Math.max(De,Qe);else for(Ve=0;Ve<q.length;++Ve)Qe=q[Ve][2],Pe=Math.min(Pe,Qe),De=Math.max(De,Qe);this.intensity=Te||Ae||function(Kt){for(var Be=Kt.length,qe=new Array(Be),Re=0;Re<Be;++Re)qe[Re]=Kt[Re][2];return qe}(q),this.pickVertex=!(Ae||Ee);var Oe=V.pointSizes,Ue=V.pointSize||1;for(this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Ve=0;Ve<q.length;++Ve)for(var Ge=q[Ve],Ye=0;Ye<3;++Ye)!isNaN(Ge[Ye])&&isFinite(Ge[Ye])&&(this.bounds[0][Ye]=Math.min(this.bounds[0][Ye],Ge[Ye]),this.bounds[1][Ye]=Math.max(this.bounds[1][Ye],Ge[Ye]));var tt=0,lt=0,vt=0;e:for(Ve=0;Ve<K.length;++Ve){var It=K[Ve];switch(It.length){case 1:for(Ge=q[rt=It[0]],Ye=0;Ye<3;++Ye)if(isNaN(Ge[Ye])||!isFinite(Ge[Ye]))continue e;re.push(Ge[0],Ge[1],Ge[2]),et=be?be[rt]:Ee?Ee[Ve]:fe,this.opacityscale&&Te?$.push(et[0],et[1],et[2],this.opacity*I((Te[rt]-Pe)/(De-Pe),this.opacityscale)):et.length===3?ne.pu
2562sh(et[0],et[1],et[2],this.opacity):(ne.push(et[0],et[1],et[2],et[3]*this.opacity),et[3]<1&&(this.hasAlpha=!0)),Tt=me?me[rt]:Te?[(Te[rt]-Pe)/(De-Pe),0]:_e?_e[Ve]:Ae?[(Ae[Ve]-Pe)/(De-Pe),0]:[(Ge[2]-Pe)/(De-Pe),0],se.push(Tt[0],Tt[1]),Oe?oe.push(Oe[rt]):oe.push(Ue),pe.push(Ve),vt+=1;break;case 2:for(Ye=0;Ye<2;++Ye){Ge=q[rt=It[Ye]];for(var St=0;St<3;++St)if(isNaN(Ge[St])||!isFinite(Ge[St]))continue e}for(Ye=0;Ye<2;++Ye)Ge=q[rt=It[Ye]],Q.push(Ge[0],Ge[1],Ge[2]),et=be?be[rt]:Ee?Ee[Ve]:fe,this.opacityscale&&Te?$.push(et[0],et[1],et[2],this.opacity*I((Te[rt]-Pe)/(De-Pe),this.opacityscale)):et.length===3?j.push(et[0],et[1],et[2],this.opacity):(j.push(et[0],et[1],et[2],et[3]*this.opacity),et[3]<1&&(this.hasAlpha=!0)),Tt=me?me[rt]:Te?[(Te[rt]-Pe)/(De-Pe),0]:_e?_e[Ve]:Ae?[(Ae[Ve]-Pe)/(De-Pe),0]:[(Ge[2]-Pe)/(De-Pe),0],X.push(Tt[0],Tt[1]),J.push(Ve);lt+=1;break;case 3:for(Ye=0;Ye<3;++Ye)for(Ge=q[rt=It[Ye]],St=0;St<3;++St)if(isNaN(Ge[St])||!isFinite(Ge[St]))continue e;for(Ye=0;Ye<3;++Ye){var rt,et,Tt,Vt;Ge=q[rt=It[2-Ye]],W.push(Ge[0],Ge[1],Ge[2]),(et=be?be[rt]:Ee?Ee[Ve]:fe)?this.opacityscale&&Te?$.push(et[0],et[1],et[2],this.opacity*I((Te[rt]-Pe)/(De-Pe),this.opacityscale)):et.length===3?$.push(et[0],et[1],et[2],this.opacity):($.push(et[0],et[1],et[2],et[3]*this.opacity),et[3]<1&&(this.hasAlpha=!0)):$.push(.5,.5,.5,1),Tt=me?me[rt]:Te?[(Te[rt]-Pe)/(De-Pe),0]:_e?_e[Ve]:Ae?[(Ae[Ve]-Pe)/(De-Pe),0]:[(Ge[2]-Pe)/(De-Pe),0],N.push(Tt[0],Tt[1]),Vt=ce?ce[rt]:de[Ve],R.push(Vt[0],Vt[1],Vt[2]),U.push(Ve)}tt+=1}}this.pointCount=vt,this.edgeCount=lt,this.triangleCount=tt,this.pointPositions.update(re),this.pointColors.update(ne),this.pointUVs.update(se),this.pointSizes.update(oe),this.pointIds.update(new Uint32Array(pe)),this.edgePositions.update(Q),this.edgeColors.update(j),this.edgeUVs.update(X),this.edgeIds.update(new Uint32Array(J)),this.trianglePositions.update(W),this.triangleColors.update($),this.triangleUVs.update(N),this.triangleNormals.update(R),this.triangleIds.update(new Uint32Array(U))}},A.drawTransparent=A.draw=function(V){V=V||{};for(var Z=this.gl,K=V.model||k,q=V.view||k,W=V.projection||k,$=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],R=0;R<3;++R)$[0][R]=Math.max($[0][R],this.clipBounds[0][R]),$[1][R]=Math.min($[1][R],this.clipBounds[1][R]);var N={model:K,view:q,projection:W,inverseModel:k.slice(),clipBounds:$,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};N.inverseModel=c(N.inverseModel,N.model),Z.disable(Z.CULL_FACE),this.texture.bind(0);var U=new Array(16);for(d(U,N.view,N.model),d(U,N.projection,U),c(U,U),R=0;R<3;++R)N.eyePosition[R]=U[12+R]/U[15];var Q,j=U[15];for(R=0;R<3;++R)j+=this.lightPosition[R]*U[4*R+3];for(R=0;R<3;++R){for(var X=U[12+R],J=0;J<3;++J)X+=U[4*J+R]*this.lightPosition[J];N.lightPosition[R]=X/j}this.triangleCount>0&&((Q=this.triShader).bind(),Q.uniforms=N,this.triangleVAO.bind(),Z.drawArrays(Z.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((Q=this.lineShader).bind(),Q.uniforms=N,this.edgeVAO.bind(),Z.lineWidth(this.lineWidth*this.pixelRatio),Z.drawArrays(Z.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((Q=this.pointShader).bind(),Q.uniforms=N,this.pointVAO.bind(),Z.drawArrays(Z.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((Q=this.contourShader).bind(),Q.uniforms=N,this.contourVAO.bind(),Z.drawArrays(Z.LINES,0,this.contourCount),this.contourVAO.unbind())},A.drawPick=function(V){V=V||{};for(var Z=this.gl,K=V.model||k,q=V.view||k,W=V.projection||k,$=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],R=0;R<3;++R)$[0][R]=Math.max($[0][R],this.clipBounds[0][R]),$[1][R]=Math.min($[1][R],this.clipBounds[1][R]);this._model=[].slice.call(K),this._view=[].slice.call(q),this._projection=[].slice.call(W),this._resolution=[Z.drawingBufferWidth,Z.drawingBufferHeight];var N,U={model:K,view:q,projection:W,clipBounds:$,pickId:this.pickId/255};(N=this.pickShader).bind(),N.uniforms=U,this.triangleCount>0&&(this.triangleVAO.bind(),Z.drawArrays(Z.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),Z.lineWidth(this.lineWidth*this.pixelRatio),Z.drawArrays(Z.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((N=this.pointPickShader).bind(),N.uniforms=U,this.pointVAO.bind(),Z.drawArrays(Z.POINTS,0,this.pointCount),this.pointVAO.unbind())},A.pick=function(V){if(!V||V.id!==this.pickId)return null;for(var Z=V.value[0]+256*V.value[1]+65536*V.value[2],K=this.cells[Z],q=this.positions,W=new Array(K.length),$=0;$<K.length;++$)W[$]=q[K[$]];var R=V.coord[0],N=V.coord[1];if(!this.pickVertex){var U=this.positions[K[0]],Q=this.positions[K[1]],j=this.positions[K[2]],X=[(U[0]+Q[0]+j[0])/3,(U[1]+Q[1]+j[1])/3,(U[2]+Q[2]+j[2])/3];return{_cellCenter:!0,position:[R,N],index:Z,cell:K,cellId:Z,intensity:this.intensity[Z],dataCoordinate:X}}var J=p(W,[R*this.pixelRatio,this._resolution[1]-N*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!J)return null;var re=J[2],ne=0;for($=0;$<K.length;++$)ne+=re[$]*this.intensity[K[$]];return{position:J[1],index:K[J[0]],cell:K,cellId:Z,intensity:ne,dataCoordinate:this.positions[K[J[0]]]}},A.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()}
2562,b.exports=function(V,Z){arguments.length===1&&(V=(Z=V).gl);var K=V.getExtension("OES_standard_derivatives")||V.getExtension("MOZ_OES_standard_derivatives")||V.getExtension("WEBKIT_OES_standard_derivatives");if(!K)throw new Error("derivatives not supported");var q=P(V),W=S(V),$=E(V),R=D(V),N=F(V),U=H(V),Q=o(V,i(new Uint8Array([255,255,255,255]),[1,1,4]));Q.generateMipmap(),Q.minFilter=V.LINEAR_MIPMAP_LINEAR,Q.magFilter=V.LINEAR;var j=n(V),X=n(V),J=n(V),re=n(V),ne=n(V),se=t(V,[{buffer:j,type:V.FLOAT,size:3},{buffer:ne,type:V.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:X,type:V.FLOAT,size:4},{buffer:J,type:V.FLOAT,size:2},{buffer:re,type:V.FLOAT,size:3}]),oe=n(V),pe=n(V),ce=n(V),de=n(V),xe=t(V,[{buffer:oe,type:V.FLOAT,size:3},{buffer:de,type:V.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:pe,type:V.FLOAT,size:4},{buffer:ce,type:V.FLOAT,size:2}]),we=n(V),be=n(V),Ee=n(V),fe=n(V),me=n(V),Te=t(V,[{buffer:we,type:V.FLOAT,size:3},{buffer:me,type:V.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:be,type:V.FLOAT,size:4},{buffer:Ee,type:V.FLOAT,size:2},{buffer:fe,type:V.FLOAT,size:1}]),_e=n(V),Ae=t(V,[{buffer:_e,type:V.FLOAT,size:3}]),Pe=new L(V,Q,q,W,$,R,N,U,j,ne,X,J,re,se,oe,de,pe,ce,xe,we,me,be,Ee,fe,Te,_e,Ae);return Pe.update(Z),Pe}},{"./lib/closest-point":110,"./lib/shaders":111,colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-shader":132,"gl-texture2d":146,"gl-vao":150,ndarray:259,normals:261,"simplicial-complex-contour":291,"typedarray-pool":308}
2562],113:[function(m,b,v){b.exports=function(i){var u=i.gl,f=e(u,[0,0,0,1,1,0,1,1]),s=n(u,t.boxVert,t.lineFrag);return new o(i,f,s)};var e=m("gl-buffer"),n=m("gl-shader"),t=m("./shaders");function o(i,u,f){this.plot=i,this.vbo=u,this.shader=f}var r,d,c=o.prototype;c.bind=function(){var i=this.shader;this.vbo.bind(),this.shader.bind(),i.attributes.coord.pointer(),i.uniforms.screenBox=this.plot.screenBox},c.drawBox=(r=[0,0],d=[0,0],function(i,u,f,s,h){var p=this.plot,a=this.shader,x=p.gl;r[0]=i,r[1]=u,d[0]=f,d[1]=s,a.uniforms.lo=r,a.uniforms.hi=d,a.uniforms.color=h,x.drawArrays(x.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":116,"gl-buffer":78,"gl-shader":132}],114:[function(m,b,v){b.exports=function(p){var a=p.gl,x=e(a),l=n(a,o.gridVert,o.gridFrag),w=n(a,o.tickVert,o.gridFrag);return new r(p,x,l,w)};var e=m("gl-buffer"),n=m("gl-shader"),t=m("binary-search-bounds"),o=m("./shaders");function r(p,a,x,l){this.plot=p,this.vbo=a,this.shader=x,this.tickShader=l,this.ticks=[[],[]]}function d(p,a){return p-a}var c,i,u,f,s,h=r.prototype;h.draw=(c=[0,0],i=[0,0],u=[0,0],function(){for(var p=this.plot,a=this.vbo,x=this.shader,l=this.ticks,w=p.gl,_=p._tickBounds,T=p.dataBox,k=p.viewBox,L=p.gridLineWidth,A=p.gridLineColor,I=p.gridLineEnable,P=p.pixelRatio,S=0;S<2;++S){var E=_[S],D=_[S+2]-E,F=.5*(T[S+2]+T[S]),H=T[S+2]-T[S];i[S]=2*D/H,c[S]=2*(E-F)/H}x.bind(),a.bind(),x.attributes.dataCoord.pointer(),x.uniforms.dataShift=c,x.uniforms.dataScale=i;var V=0;for(S=0;S<2;++S){u[0]=u[1]=0,u[S]=1,x.uniforms.dataAxis=u,x.uniforms.lineWidth=L[S]/(k[S+2]-k[S])*P,x.uniforms.color=A[S];var Z=6*l[S].length;I[S]&&Z&&w.drawArrays(w.TRIANGLES,V,Z),V+=Z}}),h.drawTickMarks=function(){var p=[0,0],a=[0,0],x=[1,0],l=[0,1],w=[0,0],_=[0,0];return function(){for(var T=this.plot,k=this.vbo,L=this.tickShader,A=this.ticks,I=T.gl,P=T._tickBounds,S=T.dataBox,E=T.viewBox,D=T.pixelRatio,F=T.screenBox,H=F[2]-F[0],V=F[3]-F[1],Z=E[2]-E[0],K=E[3]-E[1],q=0;q<2;++q){var W=P[q],$=P[q+2]-W,R=.5*(S[q+2]+S[q]),N=S[q+2]-S[q];a[q]=2*$/N,p[q]=2*(W-R)/N}a[0]*=Z/H,p[0]*=Z/H,a[1]*=K/V,p[1]*=K/V,L.bind(),k.bind(),L.attributes.dataCoord.pointer();var U=L.uniforms;U.dataShift=p,U.dataScale=a;var Q=T.tickMarkLength,j=T.tickMarkWidth,X=T.tickMarkColor,J=6*A[0].length,re=Math.min(t.ge(A[0],(S[0]-P[0])/(P[2]-P[0]),d),A[0].length),ne=Math.min(t.gt(A[0],(S[2]-P[0])/(P[2]-P[0]),d),A[0].length),se=0+6*re,oe=6*Math.max(0,ne-re),pe=Math.min(t.ge(A[1],(S[1]-P[1])/(P[3]-P[1]),d),A[1].length),ce=Math.min(t.gt(A[1],(S[3]-P[1])/(P[3]-P[1]),d),A[1].length),de=J+6*pe,xe=6*Math.max(0,ce-pe);w[0]=2*(E[0]-Q[1])/H-1,w[1]=(E[3]+E[1])/V-1,_[0]=Q[1]*D/H,_[1]=j[1]*D/V,xe&&(U.color=X[1],U.tickScale=_,U.dataAxis=l,U.screenOffset=w,I.drawArrays(I.TRIANGLES,de,xe)),w[0]=(E[2]+E[0])/H-1,w[1]=2*(E[1]-Q[0])/V-1,_[0]=j[0]*D/H,_[1]=Q[0]*D/V,oe&&(U.color=X[0],U.tickScale=_,U.dataAxis=x,U.screenOffset=w,I.drawArrays(I.TRIANGLES,se,oe)),w[0]=2*(E[2]+Q[3])/H-1,w[1]=(E[3]+E[1])/V-1,_[0]=Q[3]*D/H,_[1]=j[3]*D/V,xe&&(U.color=X[3],U.tickScale=_,U.dataAxis=l,U.screenOffset=w,I.drawArrays(I.TRIANGLES,de,xe)),w[0]=(E[2]+E[0])/H-1,w[1]=2*(E[3]+Q[2])/V-1,_[0]=j[2]*D/H,_[1]=Q[2]*D/V,oe&&(U.color=X[2],U.tickScale=_,U.dataAxis=x,U.screenOffset=w,I.drawArrays(I.TRIANGLES,se,oe))}}(),h.update=(f=[1,1,-1,-1,1,-1],s=[1,-1,1,1,-1,-1],function(p){for(var a=p.ticks,x=p.bounds,l=new Float32Array(18*(a[0].length+a[1].length)),w=(this.plot.zeroLineEnable,0),_=[[],[]],T=0;T<2;++T)for(var k=_[T],L=a[T],A=x[T],I=x[T+2],P=0;P<L.length;++P){var S=(L[P].x-A)/(I-A);k.push(S);for(var E=0;E<6;++E)l[w++]=S,l[w++]=f[E],l[w++]=s[E]}this.ticks=_,this.vbo.update(l)}),h.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{"./shaders":116,"binary-search-bounds":31,"gl-buffer":78,"gl-shader":132}],115:[function(m,b,v){b.exports=function(i){var u=i.gl,f=e(u,[-1,-1,-1,1,1,-1,1,1]),s=n(u,t.lineVert,t.lineFrag);return new o(i,f,s)};var e=m("gl-buffer"),n=m("gl-shader"),t=m("./shaders");function o(i,u,f){this.plot=i,this.vbo=u,this.shader=f}var r,d,c=o.prototype;c.bind=function(){var i=this.shader;this.vbo.bind(),this.shader.bind(),i.attributes.coord.pointer(),i.uniforms.screenBox=this.plot.screenBox},c.drawLine=(r=[0,0],d=[0,0],function(i,u,f,s,h,p){var a=this.plot,x=this.shader,l=a.gl;r[0]=i,r[1]=u,d[0]=f,d[1]=s,x.uniforms.start=r,x.uniforms.end=d,x.uniforms.width=h*a.pixelRatio,x.uniforms.color=p,l.drawArrays(l.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":116,"gl-buffer":78,"gl-shader":132}],116:[function(m,b,v){var e=m("glslify"),n=e([`precision lowp float;
2563#define GLSLIFY 1
2564uniform vec4 color;
2565void main() {
2566  gl_FragColor = vec4(color.xyz * color.w, color.w);
2567}
2568`]);b.exports={lineVert:e([`precision mediump float;
2569#define GLSLIFY 1
2570
2571attribute vec2 coord;
2572
2573uniform vec4 screenBox;
2574uniform vec2 start, end;
2575uniform float width;
2576
2577vec2 perp(vec2 v) {
2578  return vec2(v.y, -v.x);
2579}
2580
2581vec2 screen(vec2 v) {
2582  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
2583}
2584
2585void main() {
2586  vec2 delta = normalize(perp(start - end));
2587  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));
2588  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);
2589}
2590`]),lineFrag:n,textVert:e([`#define GLSLIFY 1
2591attribute vec3 textCoordinate;
2592
2593uniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;
2594uniform float angle;
2595
2596void main() {
2597  float dataOffset  = textCoordinate.z;
2598  vec2 glyphOffset  = textCoordinate.xy;
2599  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
2600  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +
2601    glyphMatrix * glyphOffset * textScale + screenOffset;
2602  gl_Position = vec4(screenCoordinate, 0, 1);
2603}
2604`]),textFrag:n,gridVert:e([`precision mediump float;
2605#define GLSLIFY 1
2606
2607attribute vec3 dataCoord;
2608
2609uniform vec2 dataAxis, dataShift, dataScale;
2610uniform float lineWidth;
2611
2612void main() {
2613  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
2614  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;
2615  gl_Position = vec4(pos, 0, 1);
2616}
2617`]),gridFrag:n,boxVert:e([`precision mediump float;
2618#define GLSLIFY 1
2619
2620attribute vec2 coord;
2621
2622uniform vec4 screenBox;
2623uniform vec2 lo, hi;
2624
2625vec2 screen(vec2 v) {
2626  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
2627}
2628
2629void main() {
2630  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);
2631}
2632`]),tickVert:e([`precision mediump float;
2633#define GLSLIFY 1
2634
2635attribute vec3 dataCoord;
2636
2637uniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;
2638
2639void main() {
2640  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
2641  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);
2642}
2643`])}},{glslify:231}],117:[function(m,b,v){b.exports=function(a){var x=a.gl,l=e(x),w=n(x,r.textVert,r.textFrag);return new d(a,l,w)};var e=m("gl-buffer"),n=m("gl-shader"),t=m("text-cache"),o=m("binary-search-bounds"),r=m("./shaders");function d(a,x,l){this.plot=a,this.vbo=x,this.shader=l,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var c,i,u,f,s,h,p=d.prototype;p.drawTicks=(c=[0,0],i=[0,0],u=[0,0],function(a){var x=this.plot,l=this.shader,w=this.tickX[a],_=this.tickOffset[a],T=x.gl,k=x.viewBox,L=x.dataBox,A=x.screenBox,I=x.pixelRatio,P=x.tickEnable,S=x.tickPad,E=x.tickColor,D=x.tickAngle,F=x.labelEnable,H=x.labelPad,V=x.labelColor,Z=x.labelAngle,K=this.labelOffset[a],q=this.labelCount[a],W=o.lt(w,L[a]),$=o.le(w,L[a+2]);c[0]=c[1]=0,c[a]=1,i[a]=(k[2+a]+k[a])/(A[2+a]-A[a])-1;var R=2/A[2+(1^a)]-A[1^a];i[1^a]=R*k[1^a]-1,P[a]&&(i[1^a]-=R*I*S[a],W<$&&_[$]>_[W]&&(l.uniforms.dataAxis=c,l.uniforms.screenOffset=i,l.uniforms.color=E[a],l.uniforms.angle=D[a],T.drawArrays(T.TRIANGLES,_[W],_[$]-_[W]))),F[a]&&q&&(i[1^a]-=R*I*H[a],l.uniforms.dataAxis=u,l.uniforms.screenOffset=i,l.uniforms.color=V[a],l.uniforms.angle=Z[a],T.drawArrays(T.TRIANGLES,K,q)),i[1^a]=R*k[2+(1^a)]-1,P[a+2]&&(i[1^a]+=R*I*S[a+2],W<$&&_[$]>_[W]&&(l.uniforms.dataAxis=c,l.uniforms.screenOffset=i,l.uniforms.color=E[a+2],l.uniforms.angle=D[a+2],T.drawArrays(T.TRIANGLES,_[W],_[$]-_[W]))),F[a+2]&&q&&(i[1^a]+=R*I*H[a+2],l.uniforms.dataAxis=u,l.uniforms.screenOffset=i,l.uniforms.color=V[a+2],l.uniforms.angle=Z[a+2],T.drawArrays(T.TRIANGLES,K,q))}),p.drawTitle=function(){var a=[0,0],x=[0,0];return function(){var l=this.plot,w=this.shader,_=l.gl,T=l.screenBox,k=l.titleCenter,L=l.titleAngle,A=l.titleColor,I=l.pixelRatio;if(this.titleCount){for(var P=0;P<2;++P)x[P]=2*(k[P]*I-T[P])/(T[2+P]-T[P])-1;w.bind(),w.uniforms.dataAxis=a,w.uniforms.screenOffset=x,w.uniforms.angle=L,w.uniforms.color=A,_.drawArrays(_.TRIANGLES,this.titleOffset,this.titleCount)}}}(),p.bind=(f=[0,0],s=[0,0],h=[0,0],function(){var a=this.plot,x=this.shader,l=a._tickBounds,w=a.dataBox,_=a.screenBox,T=a.viewBox;x.bind();for(var k=0;k<2;++k){var L=l[k],A=l[k+2]-L,I=.5*(w[k+2]+w[k]),P=w[k+2]-w[k],S=T[k],E=T[k+2]-S,D=_[k],F=_[k+2]-D;s[k]=2*A/P*E/F,f[k]=2*(L-I)/P*E/F}h[1]=2*a.pixelRatio/(_[3]-_[1]),h[0]=h[1]*(_[3]-_[1])/(_[2]-_[0]),x.uniforms.dataScale=s,x.uniforms.dataShift=f,x.uniforms.textScale=h,this.vbo.bind(),x.attributes.textCoordinate.pointer()}),p.update=function(a){var x,l,w,_,T,k=[],L=a.ticks,A=a.bounds;for(T=0;T<2;++T){var I=[Math.floor(k.length/3)],P=[-1/0],S=L[T];for(x=0;x<S.length;++x){var E=S[x],D=E.x,F=E.text,H=E.font||"sans-serif";_=E.fontSize||12;for(var V=1/(A[T+2]-A[T]),Z=A[T],K=F.split(`
2644`),q=0;q<K.length;q++)for(w=t(H,K[q]).data,l=0;l<w.length;l+=2)k.push(w[l]*_,-w[l+1]*_-q*_*1.2,(D-Z)*V);I.push(Math.floor(k.length/3)),P.push(D)}this.tickOffset[T]=I,this.tickX[T]=P}for(T=0;T<2;++T){for(this.labelOffset[T]=Math.floor(k.length/3),w=t(a.labelFont[T],a.labels[T],{textAlign:"center"}).data,_=a.labelSize[T],x=0;x<w.length;x+=2)k.push(w[x]*_,-w[x+1]*_,0);this.labelCount[T]=Math.floor(k.length/3)-this.labelOffset[T]}for(this.titleOffset=Math.floor(k.length/3),w=t(a.titleFont,a.title).data,_=a.titleSize,x=0;x<w.length;x+=2)k.push(w[x]*_,-w[x+1]*_,0);this.titleCount=Math.floor(k.length/3)-this.titleOffset,this.vbo.update(k)},p.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":116,"binary-search-bounds":31,"gl-buffer":78,"gl-shader":132,"text-cache":303}],118:[function(m,b,v){b.exports=function(f){var s=f.gl,h=e(s,[s.drawingBufferWidth,s.drawingBufferHeight]),p=new d(s,h);return p.grid=n(p),p.text=t(p),p.line=o(p),p.box=r(p),p.update(f),p};var e=m("gl-select-static"),n=m("./lib/grid"),t=m("./lib/text"),o=m("./lib/line"),r=m("./lib/box");function d(f,s){this.gl=f,this.pickBuffer=s,this.screenBox=[0,0,f.drawingBufferWidth,f.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWi
2644dth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var c=d.prototype;function i(f){for(var s=f.slice(),h=0;h<s.length;++h)s[h]=s[h].slice();return s}function u(f,s){return f.x-s.x}c.setDirty=function(){this.dirty=this.pickDirty=!0},c.setOverlayDirty=function(){this.dirty=!0},c.nextDepthValue=function(){return this._depthCounter++/65536},c.draw=function(){var f=this.gl,s=this.screenBox,h=this.viewBox,p=this.dataBox,a=this.pixelRatio,x=this.grid,l=this.line,w=this.text,_=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,f.bindFramebuffer(f.FRAMEBUFFER,null),f.enable(f.SCISSOR_TEST),f.disable(f.DEPTH_TEST),f.depthFunc(f.LESS),f.depthMask(!1),f.enable(f.BLEND),f.blendEquation(f.FUNC_ADD,f.FUNC_ADD),f.blendFunc(f.ONE,f.ONE_MINUS_SRC_ALPHA),this.borderColor){f.scissor(s[0],s[1],s[2]-s[0],s[3]-s[1]);var T=this.borderColor;f.clearColor(T[0]*T[3],T[1]*T[3],T[2]*T[3],T[3]),f.clear(f.COLOR_BUFFER_BIT|f.DEPTH_BUFFER_BIT)}f.scissor(h[0],h[1],h[2]-h[0],h[3]-h[1]),f.viewport(h[0],h[1],h[2]-h[0],h[3]-h[1]);var k=this.backgroundColor;f.clearColor(k[0]*k[3],k[1]*k[3],k[2]*k[3],k[3]),f.clear(f.COLOR_BUFFER_BIT),x.draw();var L=this.zeroLineEnable,A=this.zeroLineColor,I=this.zeroLineWidth;if(L[0]||L[1]){l.bind();for(var P=0;P<2;++P)if(L[P]&&p[P]<=0&&p[P+2]>=0){var S=s[P]-p[P]*(s[P+2]-s[P])/(p[P+2]-p[P]);P===0?l.drawLine(S,s[1],S,s[3],I[P],A[P]):l.drawLine(s[0],S,s[2],S,I[P],A[P])}}for(P=0;P<_.length;++P)_[P].draw();f.viewport(s[0],s[1],s[2]-s[0],s[3]-s[1]),f.scissor(s[0],s[1],s[2]-s[0],s[3]-s[1]),this.grid.drawTickMarks(),l.bind();var E=this.borderLineEnable,D=this.borderLineWidth,F=this.borderLineColor;for(E[1]&&l.drawLine(h[0],h[1]-.5*D[1]*a,h[0],h[3]+.5*D[3]*a,D[1],F[1]),E[0]&&l.drawLine(h[0]-.5*D[0]*a,h[1],h[2]+.5*D[2]*a,h[1],D[0],F[0]),E[3]&&l.drawLine(h[2],h[1]-.5*D[1]*a,h[2],h[3]+.5*D[3]*a,D[3],F[3]),E[2]&&l.drawLine(h[0]-.5*D[0]*a,h[3],h[2]+.5*D[2]*a,h[3],D[2],F[2]),w.bind(),P=0;P<2;++P)w.drawTicks(P);this.titleEnable&&w.drawTitle();var H=this.overlays;for(P=0;P<H.length;++P)H[P].draw();f.disable(f.SCISSOR_TEST),f.disable(f.BLEND),f.depthMask(!0)}},c.drawPick=function(){if(!this.static){var f=this.pickBuffer;this.gl,this._pickTimeout=null,f.begin();for(var s=1,h=this.objects,p=0;p<h.length;++p)s=h[p].drawPick(s);f.end()}},c.pick=function(f,s){if(!this.static){var h=this.pixelRatio,p=this.pickPixelRatio,a=this.viewBox,x=0|Math.round((f-a[0]/h)*p),l=0|Math.round((s-a[1]/h)*p),w=this.pickBuffer.query(x,l,this.pickRadius);if(!w)return null;for(var _=w.id+(w.value[0]<<8)+(w.value[1]<<16)+(w.value[2]<<24),T=this.objects,k=0;k<T.length;++k){var L=T[k].pick(x,l,_);if(L)return L}return null}},c.setScreenBox=function(f){var s=this.screenBox,h=this.pixelRatio;s[0]=0|Math.round(f[0]*h),s[1]=0|Math.round(f[1]*h),s[2]=0|Math.round(f[2]*h),s[3]=0|Math.round(f[3]*h),this.setDirty()},c.setDataBox=function(f){var s=this.dataBox;(s[0]!==f[0]||s[1]!==f[1]||s[2]!==f[2]||s[3]!==f[3])&&(s[0]=f[0],s[1]=f[1],s[2]=f[2],s[3]=f[3],this.setDirty())},c.setViewBox=function(f){var s=this.pixelRatio,h=this.viewBox;h[0]=0|Math.round(f[0]*s),h[1]=0|Math.round(f[1]*s),h[2]=0|Math.round(f[2]*s),h[3]=0|Math.round(f[3]*s);var p=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((f[2]-f[0])*p),0|Math.round((f[3]-f[1])*p)],this.setDirty()},c.update=function(f){f=f||{};var s=this.gl;this.pixelRatio=f.pixelRatio||1;var h=this.pixelRatio;this.pickPixelRatio=Math.max(h,1),this.setScreenBox(f.screenBox||[0,0,s.drawingBufferWidth/h,s.drawingBufferHeight/h]),this.screenBox,this.setViewBox(f.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/h,.125*(this.screenBox[3]-this.screenBox[1])/h,.875*(this.screenBox[2]-this.screenBox[0])/h,.875*(this.screenBox[3]-this.screenBox[1])/h]);var p=this.viewBox,a=(p[2]-p[0])/(p[3]-p[1]);this.setDataBox(f.dataBox||[-10,-10/a,10,10/a]),this.borderColor=f.borderColor!==!1&&(f.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(f.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(f.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(f.gridLineWidth||[1,1]).slice(),this.gridLineColor=i(f.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(f.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWi
2644dth=(f.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=i(f.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(f.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(f.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=i(f.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(f.titleCenter||[.5*(p[0]+p[2])/h,(p[3]+120)/h]).slice(),this.titleEnable=!("titleEnable"in f)||!!f.titleEnable,this.titleAngle=f.titleAngle||0,this.titleColor=(f.titleColor||[0,0,0,1]).slice(),this.labelPad=(f.labelPad||[15,15,15,15]).slice(),this.labelAngle=(f.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(f.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=i(f.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(f.tickPad||[15,15,15,15]).slice(),this.tickAngle=(f.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(f.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=i(f.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(f.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(f.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=i(f.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var x=f.ticks||[[],[]],l=this._tickBounds;l[0]=l[1]=1/0,l[2]=l[3]=-1/0;for(var w=0;w<2;++w){var _=x[w].slice(0);_.length!==0&&(_.sort(u),l[w]=Math.min(l[w],_[0].x),l[w+2]=Math.max(l[w+2],_[_.length-1].x))}this.grid.update({bounds:l,ticks:x}),this.text.update({bounds:l,ticks:x,labels:f.labels||["x","y"],labelSize:f.labelSize||[12,12],labelFont:f.labelFont||["sans-serif","sans-serif"],title:f.title||"",titleSize:f.titleSize||18,titleFont:f.titleFont||"sans-serif"}),this.static=!!f.static,this.setDirty()},c.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var f=this.objects.length-1;f>=0;--f)this.objects[f].dispose();for(this.objects.length=0,f=this.overlays.length-1;f>=0;--f)this.overlays[f].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(f){this.objects.indexOf(f)<0&&(this.objects.push(f),this.setDirty())},c.removeObject=function(f){for(var s=this.objects,h=0;h<s.length;++h)if(s[h]===f){s.splice(h,1),this.setDirty();break}},c.addOverlay=function(f){this.overlays.indexOf(f)<0&&(this.overlays.push(f),this.setOverlayDirty())},c.removeOverlay=function(f){for(var s=this.overlays,h=0;h<s.length;++h)if(s[h]===f){s.splice(h,1),this.setOverlayDirty();break}}},{"./lib/box":113,"./lib/grid":114,"./lib/line":115,"./lib/text":117,"gl-select-static":131}],119:[function(m,b,v){b.exports=function(c,i){c=c||document.body,i=i||{};var u=[.01,1/0];"distanceLimits"in i&&(u[0]=i.distanceLimits[0],u[1]=i.distanceLimits[1]),"zoomMin"in i&&(u[0]=i.zoomMin),"zoomMax"in i&&(u[1]=i.zoomMax);var f=n({center:i.center||[0,0,0],up:i.up||[0,1,0],eye:i.eye||[0,0,10],mode:i.mode||"orbit",distanceLimits:u}),s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=0,p=c.clientWidth,a=c.clientHeight,x={keyBindingMode:"rotate",enableWheel:!0,view:f,element:c,delay:i.delay||16,rotateSpeed:i.rotateSpeed||1,zoomSpeed:i.zoomSpeed||1,translateSpeed:i.translateSpeed||1,flipX:!!i.flipX,flipY:!!i.flipY,modes:f.modes,_ortho:i._ortho||i.projection&&i.projection.type==="orthographic"||!1,tick:function(){var l=e(),w=this.delay,_=l-2*w;f.idle(l-w),f.recalcMatrix(_),f.flush(l-(100+2*w));for(var T=!0,k=f.computedMatrix,L=0;L<16;++L)T=T&&s[L]===k[L],s[L]=k[L];var A=c.clientWidth===p&&c.clientHeight===a;return p=c.clientWidth,a=c.clientHeight,T?!A:(h=Math.exp(f.computedRadius[0]),!0)},lookAt:function(l,w,_){f.lookAt(f.lastT(),l,w,_)},rotate:function(l,w,_){f.rotate(f.lastT(),l,w,_)},pan:function(l,w,_){f.pan(f.lastT(),l,w,_)},translate:function(l,w,_){f.translate(f.lastT(),l,w,_)}};return Object.defineProperties(x,{matrix:{get:function(){return f.computedMatrix},set:function(l){return f.setMatrix(f.lastT(),l),f.computedMatrix},enumerable:!0},mode:{get:function(){return f.getMode()},set:function(l){var w=f.computedUp.slice(),_=f.computedEye.slice(),T=f.computedCenter.slice();if(f.setMode(l),l==="turntable"){var k=e();f._active.lookAt(k,_,T,w),f._active.lookAt(k+500,_,T,[0,0,1]),f._active.flush(k)}return f.getMode()},enumerable:!0},center:{get:function(){return f.computedCenter},set:function(l){return f.lookAt(f.lastT(),null,l),f.computedCenter},enumerable:!0},eye:{get:function(){return f.computedEye},set:function(l){return f.lookAt(f.lastT(),l),f.computedEye},enumerable:!0},up:{get:function(){return f.computedUp},set:function(l){return f.lookAt(f.lastT(),null,null,l),f.computedUp},enumerable:!0},distance:{get:function(){return h},set:function(l){return f.setDistance(f.lastT(),l),l},enumerable:!0},distanceLimits:{get:function(){return f.getDistanceLimits(u)},set:function(l){return f.setDistanceLimits(l),l},enumerable:!0}}),c.addEventListener("contextmenu",function(l){return l.preventDefault(),!1}),x._lastX=-1,x._lastY=-1,x._lastMods={shift:!1,control:!1,alt:!1,meta:!1},x.enableMouseListeners=function(){function l(w,_,T,k){var L=x.keyBindingMode;if(L!==!1){var A=L==="rotate",I=L==="pan",P=L==="zoom",S=!!k.control,E=!!k.alt,D=!!k.shift,F=!!(1&w),H=!!(2&w),V=!!(4&w),Z=1/c.clientHeight,K=Z*(_-x._lastX),q=Z*(T-x._lastY),W=x.flipX?1:-1,$=x.flipY?1:-1,R=Math.PI*x.rotateSpeed,N=e();if(x._lastX!==-1&&x._lastY!==-1&&((A&&F&&!S&&!E&&!D||F&&!S&&!E&&D)&&f.rotate(N,W*R*K,-$*R*q,0),(I&&F&&!S&&!E&&!D||H||F&&S&&!E&&!D)&&f.pan(N,-x.translateSpeed*K*h,x.translateSpeed*q*h,0),P&&F&&!S&&!E&&!D||V||F&&!S&&E&&!D)){var U=-x.zoomSpeed*q/window.innerHeight*(N-f.lastT())*100;f.pan(N,0,0,h*(Math.exp(U)-1))}return x._lastX=_,x._lastY=T,x._lastMods=k,!0}}x.mouseListener=t(c,l),c.addEventListener("touchstart",function(w){var _=r(w.changedTouches[0],c);l(0,_[0],_[1],x._lastMods),l(1,_[0],_[1],x._lastMods)},!!d&&{passive:!0}),c.addEventListener("touchmove",function(w){var _=r(w.changedTouches[0],c);l(1,_[0],_[1],x._lastMods),w.preventDefault()},!!d&&{passive:!1}),c.addEventListener("touchend",function(w){l(0,x._lastX,x._lastY,x._lastMods)},!!d&&{passive:!0}),x.wheelListener=o(c,function(w,_){if(x.keyBindingMode!==!1&&x.enableWheel){var T=x.flipX?1:-1,k=x.flipY?1:-1,L=e();if(Math.abs(w)>Math.abs(_))f.rotate(L,0,0,-w*T*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var A=-x.zoomSpeed*k*_/window.innerHeight*(L-f.lastT())/20;f.pan(L,0,0,h*(Math.exp(A)-1))}}},!0)},x.enableMouseListeners(),x};var e=m("right-now"),n=m("3d-view"),t=m("mouse-change"),o=m("mouse-wheel"),r=m("mouse-event-offset"),d=m("has-passive-events")},{"3d-view":7,"has-passive-events":232,"mouse-change":247,"mouse-event-offset":248,"mouse-wheel":250,"right-now":278}],120:[function(m,b,v){var e=m("glslify"),n=m("gl-shader"),t=e([`precision mediump float;
2645#define GLSLIFY 1
2646attribute vec2 position;
2647varying vec2 uv;
2648void main() {
2649  uv = position;
2650  gl_Position = vec4(position, 0, 1);
2651}`]),o=e([`precision mediump float;
2652#define GLSLIFY 1
2653
2654uniform sampler2D accumBuffer;
2655varying vec2 uv;
2656
2657void main() {
2658  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));
2659  gl_FragColor = min(vec4(1,1,1,1), accum);
2660}`]);b.exports=function(r){return n(r,t,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":132,glslify:231}],121:[function(m,b,v){var e=m("./camera.js"),n=m("gl-axes3d"),t=m("gl-axes3d/properties"),o=m("gl-spikes3d"),r=m("gl-select-static"),d=m("gl-fbo"),c=m("a-big-triangle"),i=m("mouse-change"),u=m("gl-mat4/perspective"),f=m("gl-mat4/ortho"),s=m("./lib/shader"),h=m("is-mobile")({tablet:!0,featureDetect:!0});function p(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function a(l){var w=Math.round(Math.log(Math.abs(l))/Math.log(10));if(w<0){var _=Math.round(Math.pow(10,-w));return Math.ceil(l*_)/_}return w>0?(_=Math.round(Math.pow(10,w)),Math.ceil(l/_)*_):Math.ceil(l)}function x(l){return typeof l!="boolean"||l}b.exports={createScene:function(l){(l=l||{}).camera=l.camera||{};var w=l.canvas;w||(w=document.createElement("canvas"),l.container?l.container.appendChild(w):document.body.appendChild(w));var _=l.gl;if(_||(l.glOptions&&(h=!!l.glOptions.preserveDrawingBuffer),_=function(ce,de){var xe=null;try{(xe=ce.getContext("webgl",de))||(xe=ce.getContext("experimental-webgl",de))}catch{return null}return xe}(w,l.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:h})),!_)throw new Error("webgl not supported");var T=l.bounds||[[-10,-10,-10],[10,10,10]],k=new p,L=d(_,_.drawingBufferWidth,_.drawingBufferHeight,{preferFloat:!h}),A=s(_),I=l.cameraObject&&l.cameraObject._ortho===!0||l.camera.projection&&l.camera.projection.type==="orthographic"||!1,P={eye:l.camera.eye||[2,0,0],center:l.camera.center||[0,0,0],up:l.camera.up||[0,1,0],zoomMin:l.camera.zoomMax||.1,zoomMax:l.camera.zoomMin||100,mode:l.camera.mode||"turntable",_ortho:I},S=l.axes||{},E=n(_,S);E.enable=!S.disable;var D=l.spikes||{},F=o(_,D),H=[],V=[],Z=[],K=[],q=!0,W=!0,$=new Array(16),R=new Array(16),N={view:null,projection:$,model:R,_ortho:!1},U=(W=!0,[_.drawingBufferWidth,_.drawingBufferHeight]),Q=l.cameraObject||e(w,P),j={gl:_,contextLost:!1,pixelRatio:l.pixelRatio||1,canvas:w,selection:k,camera:Q,axes:E,axesPixels:null,spikes:F,bounds:T,objects:H,shape:U,aspect:l.aspectRatio||[1,1,1],pickRadius:l.pickRadius||10,zNear:l.zNear||.01,zFar:l.zFar||1e3,fovy:l.fovy||Math.PI/4,clearColor:l.clearColor||[0,0,0,0],autoResize:x(l.autoResize),autoBounds:x(l.autoBounds),autoScale:!!l.autoScale,autoCenter:x(l.autoCenter),clipToBounds:x(l.clipToBounds),snapToData:!!l.snapToData,onselect:l.onselect||null,onrender:l.onrender||null,onclick:l.onclick||null,cameraParams:N,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ce){this.aspect[0]=ce.x,this.aspect[1]=ce.y,this.aspect[2]=ce.z,W=!0},setBounds:function(ce,de){this.bounds[0][ce]=de.min,this.bounds[1][ce]=de.max},setClearColor:function(ce){this.clearColor=ce}
2660,clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},X=[_.drawingBufferWidth/j.pixelRatio|0,_.drawingBufferHeight/j.pixelRatio|0];function J(){if(!j._stopped&&j.autoResize){var ce=w.parentNode,de=1,xe=1;ce&&ce!==document.body?(de=ce.clientWidth,xe=ce.clientHeight):(de=window.innerWidth,xe=window.innerHeight);var we=0|Math.ceil(de*j.pixelRatio),be=0|Math.ceil(xe*j.pixelRatio);if(we!==w.width||be!==w.height){w.width=we,w.height=be;var Ee=w.style;Ee.position=Ee.position||"absolute",Ee.left="0px",Ee.top="0px",Ee.width=de+"px",Ee.height=xe+"px",q=!0}}}j.autoResize&&J();function re(){for(var ce=H.length,de=K.length,xe=0;xe<de;++xe)Z[xe]=0;e:for(xe=0;xe<ce;++xe){var we=H[xe],be=we.pickSlots;if(be){for(var Ee=0;Ee<de;++Ee)if(Z[Ee]+be<255){V[xe]=Ee,we.setPickBase(Z[Ee]+1),Z[Ee]+=be;continue e}var fe=r(_,U);V[xe]=de,K.push(fe),Z.push(be),we.setPickBase(1),de+=1}else V[xe]=-1}for(;de>0&&Z[de-1]===0;)Z.pop(),K.pop().dispose()}function ne(){if(j.contextLost)return!0;_.isContextLost()&&(j.contextLost=!0,j.mouseListener.enabled=!1,j.selection.object=null,j.oncontextloss&&j.oncontextloss())}window.addEventListener("resize",J),j.update=function(ce){j._stopped||(q=!0,W=!0)},j.add=function(ce){j._stopped||(ce.axes=E,H.push(ce),V.push(-1),q=!0,W=!0,re())},j.remove=function(ce){if(!j._stopped){var de=H.indexOf(ce);de<0||(H.splice(de,1),V.pop(),q=!0,W=!0,re())}},j.dispose=function(){if(!j._stopped&&(j._stopped=!0,window.removeEventListener("resize",J),w.removeEventListener("webglcontextlost",ne),j.mouseListener.enabled=!1,!j.contextLost)){E.dispose(),F.dispose();for(var ce=0;ce<H.length;++ce)H[ce].dispose();for(L.dispose(),ce=0;ce<K.length;++ce)K[ce].dispose();A.dispose(),_=null,E=null,F=null,H=[]}},j._mouseRotating=!1,j._prevButtons=0,j.enableMouseListeners=function(){j.mouseListener=i(w,function(ce,de,xe){if(!j._stopped){var we=K.length,be=H.length,Ee=k.object;k.distance=1/0,k.mouse[0]=de,k.mouse[1]=xe,k.object=null,k.screen=null,k.dataCoordinate=k.dataPosition=null;var fe=!1;if(ce&&j._prevButtons)j._mouseRotating=!0;else{j._mouseRotating&&(W=!0),j._mouseRotating=!1;for(var me=0;me<we;++me){var Te=K[me].query(de,X[1]-xe-1,j.pickRadius);if(Te){if(Te.distance>k.distance)continue;for(var _e=0;_e<be;++_e){var Ae=H[_e];if(V[_e]===me){var Pe=Ae.pick(Te);Pe&&(k.buttons=ce,k.screen=Te.coord,k.distance=Te.distance,k.object=Ae,k.index=Pe.distance,k.dataPosition=Pe.position,k.dataCoordinate=Pe.dataCoordinate,k.data=Pe,fe=!0)}}}}}Ee&&Ee!==k.object&&(Ee.highlight&&Ee.highlight(null),q=!0),k.object&&(k.object.highlight&&k.object.highlight(k.data),q=!0),(fe=fe||k.object!==Ee)&&j.onselect&&j.onselect(k),1&ce&&!(1&j._prevButtons)&&j.onclick&&j.onclick(k),j._prevButtons=ce}})},w.addEventListener("webglcontextlost",ne);var se=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],oe=[se[0].slice(),se[1].slice()];function pe(){if(!ne()){J();var ce=j.camera.tick();N.view=j.camera.matrix,q=q||ce,W=W||ce,E.pixelRatio=j.pixelRatio,F.pixelRatio=j.pixelRatio;var de=H.length,xe=se[0],we=se[1];xe[0]=xe[1]=xe[2]=1/0,we[0]=we[1]=we[2]=-1/0;for(var be=0;be<de;++be){(Ue=H[be]).pixelRatio=j.pixelRatio,Ue.axes=j.axes,q=q||!!Ue.dirty,W=W||!!Ue.dirty;var Ee=Ue.bounds;if(Ee)for(var fe=Ee[0],me=Ee[1],Te=0;Te<3;++Te)xe[Te]=Math.min(xe[Te],fe[Te]),we[Te]=Math.max(we[Te],me[Te])}var _e=j.bounds;if(j.autoBounds)for(Te=0;Te<3;++Te){if(we[Te]<xe[Te])xe[Te]=-1,we[Te]=1;else{xe[Te]===we[Te]&&(xe[Te]-=1,we[Te]+=1);var Ae=.05*(we[Te]-xe[Te]);xe[Te]=xe[Te]-Ae,we[Te]=we[Te]+Ae}_e[0][Te]=xe[Te],_e[1][Te]=we[Te]}var Pe=!1;for(Te=0;Te<3;++Te)Pe=Pe||oe[0][Te]!==_e[0][Te]||oe[1][Te]!==_e[1][Te],oe[0][Te]=_e[0][Te],oe[1][Te]=_e[1][Te];if(W=W||Pe,q=q||Pe){if(Pe){var De=[0,0,0];for(be=0;be<3;++be)De[be]=a((_e[1][be]-_e[0][be])/10);E.autoTicks?E.update({bounds:_e,tickSpacing:De}):E.update({bounds:_e})}var Ve=_.drawingBufferWidth,Qe=_.drawingBufferHeight;for(U[0]=Ve,U[1]=Qe,X[0]=0|Math.max(Ve/j.pixelRatio,1),X[1]=0|Math.max(Qe/j.pixelRatio,1),function(Ge,Ye){var tt=Ge.bounds,lt=Ge.cameraParams,vt=lt.projection,It=lt.model,St=Ge.gl.drawingBufferWidth,rt=Ge.gl.drawingBufferHeight,et=Ge.zNear,Tt=Ge.zFar,Vt=Ge.fovy,Kt=St/rt;Ye?(f(vt,-Kt,Kt,-1,1,et,Tt),lt._ortho=!0):(u(vt,Vt,Kt,et,Tt),lt._ortho=!1);for(var Be=0;Be<16;++Be)It[Be]=0;It[15]=1;var qe=0;for(Be=0;Be<3;++Be)qe=Math.max(qe,tt[1][Be]-tt[0][Be]);for(Be=0;Be<3;++Be)Ge.autoScale?It[5*Be]=Ge.aspect[Be]/(tt[1][Be]-tt[0][Be]):It[5*Be]=1/qe,Ge.autoCenter&&(It[12+Be]=.5*-It[5*Be]*(tt[0][Be]+tt[1][Be]))}(j,I),be=0;be<de;++be)(Ue=H[be]).axesBounds=_e,j.clipToBounds&&(Ue.clipBounds=_e);k.object&&(j.snapToData?F.position=k.dataCoordinate:F.position=k.dataPosition,F.bounds=_e),W&&(W=!1,function(){if(!ne()){_.colorMask(!0,!0,
2660!0,!0),_.depthMask(!0),_.disable(_.BLEND),_.enable(_.DEPTH_TEST),_.depthFunc(_.LEQUAL);for(var Ge=H.length,Ye=K.length,tt=0;tt<Ye;++tt){var lt=K[tt];lt.shape=X,lt.begin();for(var vt=0;vt<Ge;++vt)if(V[vt]===tt){var It=H[vt];It.drawPick&&(It.pixelRatio=1,It.drawPick(N))}lt.end()}}}()),j.axesPixels=t(j.axes,N,Ve,Qe),j.onrender&&j.onrender(),_.bindFramebuffer(_.FRAMEBUFFER,null),_.viewport(0,0,Ve,Qe),j.clearRGBA(),_.depthMask(!0),_.colorMask(!0,!0,!0,!0),_.enable(_.DEPTH_TEST),_.depthFunc(_.LEQUAL),_.disable(_.BLEND),_.disable(_.CULL_FACE);var Oe=!1;for(E.enable&&(Oe=Oe||E.isTransparent(),E.draw(N)),F.axes=E,k.object&&F.draw(N),_.disable(_.CULL_FACE),be=0;be<de;++be)(Ue=H[be]).axes=E,Ue.pixelRatio=j.pixelRatio,Ue.isOpaque&&Ue.isOpaque()&&Ue.draw(N),Ue.isTransparent&&Ue.isTransparent()&&(Oe=!0);if(Oe){for(L.shape=U,L.bind(),_.clear(_.DEPTH_BUFFER_BIT),_.colorMask(!1,!1,!1,!1),_.depthMask(!0),_.depthFunc(_.LESS),E.enable&&E.isTransparent()&&E.drawTransparent(N),be=0;be<de;++be)(Ue=H[be]).isOpaque&&Ue.isOpaque()&&Ue.draw(N);for(_.enable(_.BLEND),_.blendEquation(_.FUNC_ADD),_.blendFunc(_.ONE,_.ONE_MINUS_SRC_ALPHA),_.colorMask(!0,!0,!0,!0),_.depthMask(!1),_.clearColor(0,0,0,0),_.clear(_.COLOR_BUFFER_BIT),E.isTransparent()&&E.drawTransparent(N),be=0;be<de;++be){var Ue;(Ue=H[be]).isTransparent&&Ue.isTransparent()&&Ue.drawTransparent(N)}_.bindFramebuffer(_.FRAMEBUFFER,null),_.blendFunc(_.ONE,_.ONE_MINUS_SRC_ALPHA),_.disable(_.DEPTH_TEST),A.bind(),L.color[0].bind(0),A.uniforms.accumBuffer=0,c(_),_.disable(_.BLEND)}for(q=!1,be=0;be<de;++be)H[be].dirty=!1}}}return j.enableMouseListeners(),function ce(){j._stopped||j.contextLost||(pe(),requestAnimationFrame(ce))}(),j.redraw=function(){j._stopped||(q=!0,pe())},j},createCamera:e}},{"./camera.js":119,"./lib/shader":120,"a-big-triangle":8,"gl-axes3d":70,"gl-axes3d/properties":77,"gl-fbo":86,"gl-mat4/ortho":101,"gl-mat4/perspective":102,"gl-select-static":131,"gl-spikes3d":141,"is-mobile":238,"mouse-change":247}],122:[function(m,b,v){var e=m("glslify");v.pointVertex=e([`precision mediump float;
2661#define GLSLIFY 1
2662
2663attribute vec2 position;
2664
2665uniform mat3 matrix;
2666uniform float pointSize;
2667uniform float pointCloud;
2668
2669highp float rand(vec2 co) {
2670  highp float a = 12.9898;
2671  highp float b = 78.233;
2672  highp float c = 43758.5453;
2673  highp float d = dot(co.xy, vec2(a, b));
2674  highp float e = mod(d, 3.14);
2675  return fract(sin(e) * c);
2676}
2677
2678void main() {
2679  vec3 hgPosition = matrix * vec3(position, 1);
2680  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);
2681    // if we don't jitter the point size a bit, overall point cloud
2682    // saturation 'jumps' on zooming, which is disturbing and confusing
2683  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);
2684  if(pointCloud != 0.0) { // pointCloud is truthy
2685    // get the same square surface as circle would be
2686    gl_PointSize *= 0.886;
2687  }
2688}`]),v.pointFragment=e([`precision mediump float;
2689#define GLSLIFY 1
2690
2691uniform vec4 color, borderColor;
2692uniform float centerFraction;
2693uniform float pointCloud;
2694
2695void main() {
2696  float radius;
2697  vec4 baseColor;
2698  if(pointCloud != 0.0) { // pointCloud is truthy
2699    if(centerFraction == 1.0) {
2700      gl_FragColor = color;
2701    } else {
2702      gl_FragColor = mix(borderColor, color, centerFraction);
2703    }
2704  } else {
2705    radius = length(2.0 * gl_PointCoord.xy - 1.0);
2706    if(radius > 1.0) {
2707      discard;
2708    }
2709    baseColor = mix(borderColor, color, step(radius, centerFraction));
2710    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);
2711  }
2712}
2713`]),v.pickVertex=e([`precision mediump float;
2714#define GLSLIFY 1
2715
2716attribute vec2 position;
2717attribute vec4 pickId;
2718
2719uniform mat3 matrix;
2720uniform float pointSize;
2721uniform vec4 pickOffset;
2722
2723varying vec4 fragId;
2724
2725void main() {
2726  vec3 hgPosition = matrix * vec3(position, 1);
2727  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);
2728  gl_PointSize = pointSize;
2729
2730  vec4 id = pickId + pickOffset;
2731  id.y += floor(id.x / 256.0);
2732  id.x -= floor(id.x / 256.0) * 256.0;
2733
2734  id.z += floor(id.y / 256.0);
2735  id.y -= floor(id.y / 256.0) * 256.0;
2736
2737  id.w += floor(id.z / 256.0);
2738  id.z -= floor(id.z / 256.0) * 256.0;
2739
2740  fragId = id;
2741}
2742`]),v.pickFragment=e([`precision mediump float;
2743#define GLSLIFY 1
2744
2745varying vec4 fragId;
2746
2747void main() {
2748  float radius = length(2.0 * gl_PointCoord.xy - 1.0);
2749  if(radius > 1.0) {
2750    discard;
2751  }
2752  gl_FragColor = fragId / 255.0;
2753}
2754`])},{glslify:231}],123:[function(m,b,v){var e=m("gl-shader"),n=m("gl-buffer"),t=m("typedarray-pool"),o=m("./lib/shader");function r(u,f,s,h,p){this.plot=u,this.offsetBuffer=f,this.pickBuffer=s,this.shader=h,this.pickShader=p,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}b.exports=function(u,f){var s=u.gl,h=n(s),p=n(s),a=e(s,o.pointVertex,o.pointFragment),x=e(s,o.pickVertex,o.pickFragment),l=new r(u,h,p,a,x);return l.update(f),u.addObject(l),l};var d,c,i=r.prototype;i.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},i.update=function(u){var f;function s(_,T){return _ in u?u[_]:T}u=u||{},this.sizeMin=s("sizeMin",.5),this.sizeMax=s("sizeMax",20),this.color=s("color",[1,0,0,1]).slice(),this.areaRatio=s("areaRatio",1),this.borderColor=s("borderColor",[0,0,0,1]).slice(),this.blend=s("blend",!1);var h=u.positions.length>>>1,p=u.positions instanceof Float32Array,a=u.idToIndex instanceof Int32Array&&u.idToIndex.length>
2754=h,x=u.positions,l=p?x:t.mallocFloat32(x.length),w=a?u.idToIndex:t.mallocInt32(h);if(p||l.set(x),!a)for(l.set(x),f=0;f<h;f++)w[f]=f;this.points=x,this.offsetBuffer.update(l),this.pickBuffer.update(w),p||t.free(l),a||t.free(w),this.pointCount=h,this.pickOffset=0},i.unifiedDraw=(d=[1,0,0,0,1,0,0,0,1],c=[0,0,0,0],function(u){var f=u!==void 0,s=f?this.pickShader:this.shader,h=this.plot.gl,p=this.plot.dataBox;if(this.pointCount===0)return u;var a=p[2]-p[0],x=p[3]-p[1],l=function(k,L){var A,I=0,P=k.length>>>1;for(A=0;A<P;A++){var S=k[2*A],E=k[2*A+1];S>=L[0]&&S<=L[2]&&E>=L[1]&&E<=L[3]&&I++}return I}(this.points,p),w=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(l,.33333)));d[0]=2/a,d[4]=2/x,d[6]=-2*p[0]/a-1,d[7]=-2*p[1]/x-1,this.offsetBuffer.bind(),s.bind(),s.attributes.position.pointer(),s.uniforms.matrix=d,s.uniforms.color=this.color,s.uniforms.borderColor=this.borderColor,s.uniforms.pointCloud=w<5,s.uniforms.pointSize=w,s.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),f&&(c[0]=255&u,c[1]=u>>8&255,c[2]=u>>16&255,c[3]=u>>24&255,this.pickBuffer.bind(),s.attributes.pickId.pointer(h.UNSIGNED_BYTE),s.uniforms.pickOffset=c,this.pickOffset=u);var _=h.getParameter(h.BLEND),T=h.getParameter(h.DITHER);return _&&!this.blend&&h.disable(h.BLEND),T&&h.disable(h.DITHER),h.drawArrays(h.POINTS,0,this.pointCount),_&&!this.blend&&h.enable(h.BLEND),T&&h.enable(h.DITHER),u+this.pointCount}),i.draw=i.unifiedDraw,i.drawPick=i.unifiedDraw,i.pick=function(u,f,s){var h=this.pickOffset,p=this.pointCount;if(s<h||s>=h+p)return null;var a=s-h,x=this.points;return{object:this,pointId:a,dataCoord:[x[2*a],x[2*a+1]]}}},{"./lib/shader":122,"gl-buffer":78,"gl-shader":132,"typedarray-pool":308}],124:[function(m,b,v){b.exports=function(e,n,t,o){var r,d,c,i,u,f=n[0],s=n[1],h=n[2],p=n[3],a=t[0],x=t[1],l=t[2],w=t[3];return(d=f*a+s*x+h*l+p*w)<0&&(d=-d,a=-a,x=-x,l=-l,w=-w),1-d>1e-6?(r=Math.acos(d),c=Math.sin(r),i=Math.sin((1-o)*r)/c,u=Math.sin(o*r)/c):(i=1-o,u=o),e[0]=i*f+u*a,e[1]=i*s+u*x,e[2]=i*h+u*l,e[3]=i*p+u*w,e}},{}],125:[function(m,b,v){b.exports=function(e){return e||e===0?e.toString():""}},{}],126:[function(m,b,v){var e=m("vectorize-text");b.exports=function(t,o,r){var d=n[o];if(d||(d=n[o]={}),t in d)return d[t];var c={textAlign:"center",textBaseline:"middle",lineHeight:1,font:o,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},i=e(t,c);c.triangles=!1;var u,f,s=e(t,c);if(r&&r!==1){for(u=0;u<i.positions.length;++u)for(f=0;f<i.positions[u].length;++f)i.positions[u][f]/=r;for(u=0;u<s.positions.length;++u)for(f=0;f<s.positions[u].length;++f)s.positions[u][f]/=r}var h=[[1/0,1/0],[-1/0,-1/0]],p=s.positions.length;for(u=0;u<p;++u){var a=s.positions[u];for(f=0;f<2;++f)h[0][f]=Math.min(h[0][f],a[f]),h[1][f]=Math.max(h[1][f],a[f])}return d[t]=[i,s,h]};var n={}},{"vectorize-text":311}],127:[function(m,b,v){var e=m("gl-shader"),n=m("glslify"),t=n([`precision highp float;
2755#define GLSLIFY 1
2756
2757bool outOfRange(float a, float b, float p) {
2758  return ((p > max(a, b)) || 
2759          (p < min(a, b)));
2760}
2761
2762bool outOfRange(vec2 a, vec2 b, vec2 p) {
2763  return (outOfRange(a.x, b.x, p.x) ||
2764          outOfRange(a.y, b.y, p.y));
2765}
2766
2767bool outOfRange(vec3 a, vec3 b, vec3 p) {
2768  return (outOfRange(a.x, b.x, p.x) ||
2769          outOfRange(a.y, b.y, p.y) ||
2770          outOfRange(a.z, b.z, p.z));
2771}
2772
2773bool outOfRange(vec4 a, vec4 b, vec4 p) {
2774  return outOfRange(a.xyz, b.xyz, p.xyz);
2775}
2776
2777attribute vec3 position;
2778attribute vec4 color;
2779attribute vec2 glyph;
2780attribute vec4 id;
2781
2782uniform vec4 highlightId;
2783uniform float highlightScale;
2784uniform mat4 model, view, projection;
2785uniform vec3 clipBounds[2];
2786
2787varying vec4 interpColor;
2788varying vec4 pickId;
2789varying vec3 dataCoordinate;
2790
2791void main() {
2792  if (outOfRange(clipBounds[0], clipBounds[1], position)) {
2793
2794    gl_Position = vec4(0,0,0,0);
2795  } else {
2796    float scale = 1.0;
2797    if(distance(highlightId, id) < 0.0001) {
2798      scale = highlightScale;
2799    }
2800
2801    vec4 worldPosition = model * vec4(position, 1);
2802    vec4 viewPosition = view * worldPosition;
2803    viewPosition = viewPosition / viewPosition.w;
2804    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));
2805
2806    gl_Position = clipPosition;
2807    interpColor = color;
2808    pickId = id;
2809    dataCoordinate = position;
2810  }
2811}`]),o=n([`precision highp float;
2812#define GLSLIFY 1
2813
2814bool outOfRange(float a, float b, float p) {
2815  return ((p > max(a, b)) || 
2816          (p < min(a, b)));
2817}
2818
2819bool outOfRange(vec2 a, vec2 b, vec2 p) {
2820  return (outOfRange(a.x, b.x, p.x) ||
2821          outOfRange(a.y, b.y, p.y));
2822}
2823
2824bool outOfRange(vec3 a, vec3 b, vec3 p) {
2825  return (outOfRange(a.x, b.x, p.x) ||
2826          outOfRange(a.y, b.y, p.y) ||
2827          outOfRange(a.z, b.z, p.z));
2828}
2829
2830bool outOfRange(vec4 a, vec4 b, vec4 p) {
2831  return outOfRange(a.xyz, b.xyz, p.xyz);
2832}
2833
2834attribute vec3 position;
2835attribute vec4 color;
2836attribute vec2 glyph;
2837attribute vec4 id;
2838
2839uniform mat4 model, view, projection;
2840uniform vec2 screenSize;
2841uniform vec3 clipBounds[2];
2842uniform float highlightScale, pixelRatio;
2843uniform vec4 highlightId;
2844
2845varying vec4 interpColor;
2846varying vec4 pickId;
2847varying vec3 dataCoordinate;
2848
2849void main() {
2850  if (outOfRange(clipBounds[0], clipBounds[1], position)) {
2851
2852    gl_Position = vec4(0,0,0,0);
2853  } else {
2854    float scale = pixelRatio;
2855    if(distance(highlightId.bgr, id.bgr) < 0.001) {
2856      scale *= highlightScale;
2857    }
2858
2859    vec4 worldPosition = model * vec4(position, 1.0);
2860    vec4 viewPosition = view * worldPosition;
2861    vec4 clipPosition = projection * viewPosition;
2862    clipPosition /= clipPosition.w;
2863
2864    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);
2865    interpColor = color;
2866    pickId = id;
2867    dataCoordinate = position;
2868  }
2869}`]),r=n([`precision highp float;
2870#define GLSLIFY 1
2871
2872bool outOfRange(float a, float b, float p) {
2873  return ((p > max(a, b)) || 
2874          (p < min(a, b)));
2875}
2876
2877bool outOfRange(vec2 a, vec2 b, vec2 p) {
2878  return (outOfRange(a.x, b.x, p.x) ||
2879          outOfRange(a.y, b.y, p.y));
2880}
2881
2882bool outOfRange(vec3 a, vec3 b, vec3 p) {
2883  return (outOfRange(a.x, b.x, p.x) ||
2884          outOfRange(a.y, b.y, p.y) ||
2885          outOfRange(a.z, b.z, p.z));
2886}
2887
2888bool outOfRange(vec4 a, vec4 b, vec4 p) {
2889  return outOfRange(a.xyz, b.xyz, p.xyz);
2890}
2891
2892attribute vec3 position;
2893attribute vec4 color;
2894attribute vec2 glyph;
2895attribute vec4 id;
2896
2897uniform float highlightScale;
2898uniform vec4 highlightId;
2899uniform vec3 axes[2];
2900uniform mat4 model, view, projection;
2901uniform vec2 screenSize;
2902uniform vec3 clipBounds[2];
2903uniform float scale, pixelRatio;
2904
2905varying vec4 interpColor;
2906varying vec4 pickId;
2907varying vec3 dataCoordinate;
2908
2909void main() {
2910  if (outOfRange(clipBounds[0], clipBounds[1], position)) {
2911
2912    gl_Position = vec4(0,0,0,0);
2913  } else {
2914    float lscale = pixelRatio * scale;
2915    if(distance(highlightId, id) < 0.0001) {
2916      lscale *= highlightScale;
2917    }
2918
2919    vec4 clipCenter   = projection * view * model * vec4(position, 1);
2920    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;
2921    vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);
2922
2923    gl_Position = clipPosition;
2924    interpColor = color;
2925    pickId = id;
2926    dataCoordinate = dataPosition;
2927  }
2928}
2929`]),d=n([`precision highp float;
2930#define GLSLIFY 1
2931
2932bool outOfRange(float a, float b, float p) {
2933  return ((p > max(a, b)) || 
2934          (p < min(a, b)));
2935}
2936
2937bool outOfRange(vec2 a, vec2 b, vec2 p) {
2938  return (outOfRange(a.x, b.x, p.x) ||
2939          outOfRange(a.y, b.y, p.y));
2940}
2941
2942bool outOfRange(vec3 a, vec3 b, vec3 p) {
2943  return (outOfRange(a.x, b.x, p.x) ||
2944          outOfRange(a.y, b.y, p.y) ||
2945          outOfRange(a.z, b.z, p.z));
2946}
2947
2948bool outOfRange(vec4 a, vec4 b, vec4 p) {
2949  return outOfRange(a.xyz, b.xyz, p.xyz);
2950}
2951
2952uniform vec3 fragClipBounds[2];
2953uniform float opacity;
2954
2955varying vec4 interpColor;
2956varying vec3 dataCoordinate;
2957
2958void main() {
2959  if (
2960    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||
2961    interpColor.a * opacity == 0.
2962  ) discard;
2963  gl_FragColor = interpColor * opacity;
2964}
2965`]),c=n([`precision highp float;
2966#define GLSLIFY 1
2967
2968bool outOfRange(float a, float b, float p) {
2969  return ((p > max(a, b)) || 
2970          (p < min(a, b)));
2971}
2972
2973bool outOfRange(vec2 a, vec2 b, vec2 p) {
2974  return (outOfRange(a.x, b.x, p.x) ||
2975          outOfRange(a.y, b.y, p.y));
2976}
2977
2978bool outOfRange(vec3 a, vec3 b, vec3 p) {
2979  return (outOfRange(a.x, b.x, p.x) ||
2980          outOfRange(a.y, b.y, p.y) ||
2981          outOfRange(a.z, b.z, p.z));
2982}
2983
2984bool outOfRange(vec4 a, vec4 b, vec4 p) {
2985  return outOfRange(a.xyz, b.xyz, p.xyz);
2986}
2987
2988uniform vec3 fragClipBounds[2];
2989uniform float pickGroup;
2990
2991varying vec4 pickId;
2992varying vec3 dataCoordinate;
2993
2994void main() {
2995  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;
2996
2997  gl_FragColor = vec4(pickGroup, pickId.bgr);
2998}`]),i=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],u={vertex:t,fragment:d,attributes:i},f={vertex:o,fragment:d,attributes:i},s={vertex:r,fragment:d,attributes:i},h={vertex:t,fragment:c,attributes:i},p={vertex:o,fragment:c,attributes:i},a={vertex:r,fragment:c,attributes:i};function x(l,w){var _=e(l,w),T=_.attributes;return T.position.location=0,T.color.location=1,T.glyph.location=2,T.id.location=3,_}v.createPerspective=function(l){return x(l,u)},v.createOrtho=function(l){return x(l,f)},v.createProject=function(l){return x(l,s)},v.createPickPerspective=function(l){return x(l,h)},v.createPickOrtho=function(l){return x(l,p)},v.createPickProject=function(l){return x(l,a)}},{"gl-shader":132,glslify:231}],128:[function(m,b,v){var e=m("is-string-blank"),n=m("gl-buffer"),t=m("gl-vao"),o=m("t
2998ypedarray-pool"),r=m("gl-mat4/multiply"),d=m("./lib/shaders"),c=m("./lib/glyphs"),i=m("./lib/get-simple-string"),u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(Z,K){var q=Z[0],W=Z[1],$=Z[2],R=Z[3];return Z[0]=K[0]*q+K[4]*W+K[8]*$+K[12]*R,Z[1]=K[1]*q+K[5]*W+K[9]*$+K[13]*R,Z[2]=K[2]*q+K[6]*W+K[10]*$+K[14]*R,Z[3]=K[3]*q+K[7]*W+K[11]*$+K[15]*R,Z}function s(Z,K,q,W){return f(W,W),f(W,W),f(W,W)}function h(Z,K){this.index=Z,this.dataCoordinate=this.position=K}function p(Z){return Z===!0||Z>1?1:Z}function a(Z,K,q,W,$,R,N,U,Q,j,X,J){this.gl=Z,this.pixelRatio=1,this.shader=K,this.orthoShader=q,this.projectShader=W,this.pointBuffer=$,this.colorBuffer=R,this.glyphBuffer=N,this.idBuffer=U,this.vao=Q,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=j,this.pickOrthoShader=X,this.pickProjectShader=J,this.points=[],this._selectResult=new h(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}b.exports=function(Z){var K=Z.gl,q=d.createPerspective(K),W=d.createOrtho(K),$=d.createProject(K),R=d.createPickPerspective(K),N=d.createPickOrtho(K),U=d.createPickProject(K),Q=n(K),j=n(K),X=n(K),J=n(K),re=t(K,[{buffer:Q,size:3,type:K.FLOAT},{buffer:j,size:4,type:K.FLOAT},{buffer:X,size:2,type:K.FLOAT},{buffer:J,size:4,type:K.UNSIGNED_BYTE,normalized:!0}]),ne=new a(K,q,W,$,Q,j,X,J,re,R,N,U);return ne.update(Z),ne};var x=a.prototype;x.pickSlots=1,x.setPickBase=function(Z){this.pickId=Z},x.isTransparent=function(){if(this.hasAlpha)return!0;for(var Z=0;Z<3;++Z)if(this.axesProject[Z]&&this.projectHasAlpha)return!0;return!1},x.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Z=0;Z<3;++Z)if(this.axesProject[Z]&&!this.projectHasAlpha)return!0;return!1};var l=[0,0],w=[0,0,0],_=[0,0,0],T=[0,0,0,1],k=[0,0,0,1],L=u.slice(),A=[0,0,0],I=[[0,0,0],[0,0,0]];function P(Z){return Z[0]=Z[1]=Z[2]=0,Z}function S(Z,K){return Z[0]=K[0],Z[1]=K[1],Z[2]=K[2],Z[3]=1,Z}function E(Z,K,q,W){return Z[0]=K[0],Z[1]=K[1],Z[2]=K[2],Z[q]=W,Z}function D(Z,K,q,W){var $,R=K.axesProject,N=K.gl,U=Z.uniforms,Q=q.model||u,j=q.view||u,X=q.projection||u,J=K.axesBounds,re=function(_e){for(var Ae=I,Pe=0;Pe<2;++Pe)for(var De=0;De<3;++De)Ae[Pe][De]=Math.max(Math.min(_e[Pe][De],1e8),-1e8);return Ae}(K.clipBounds);$=K.axes&&K.axes.lastCubeProps?K.axes.lastCubeProps.axis:[1,1,1],l[0]=2/N.drawingBufferWidth,l[1]=2/N.drawingBufferHeight,Z.bind(),U.view=j,U.projection=X,U.screenSize=l,U.highlightId=K.highlightId,U.highlightScale=K.highlightScale,U.clipBounds=re,U.pickGroup=K.pickId/255,U.pixelRatio=W;for(var ne=0;ne<3;++ne)if(R[ne]){U.scale=K.projectScale[ne],U.opacity=K.projectOpacity[ne];for(var se=L,oe=0;oe<16;++oe)se[oe]=0;for(oe=0;oe<4;++oe)se[5*oe]=1;se[5*ne]=0,$[ne]<0?se[12+ne]=J[0][ne]:se[12+ne]=J[1][ne],r(se,Q,se),U.model=se;var pe=(ne+1)%3,ce=(ne+2)%3,de=P(w),xe=P(_);de[pe]=1,xe[ce]=1;var we=s(0,0,0,S(T,de)),be=s(0,0,0,S(k,xe));if(Math.abs(we[1])>Math.abs(be[1])){var Ee=we;we=be,be=Ee,Ee=de,de=xe,xe=Ee;var fe=pe;pe=ce,ce=fe}we[0]<0&&(de[pe]=-1),be[1]>0&&(xe[ce]=-1);var me=0,Te=0;for(oe=0;oe<4;++oe)me+=Math.pow(Q[4*pe+oe],2),Te+=Math.pow(Q[4*ce+oe],2);de[pe]/=Math.sqrt(me),xe[ce]/=Math.sqrt(Te),U.axes[0]=de,U.axes[1]=xe,U.fragClipBounds[0]=E(A,re[0],ne,-1e8),U.fragClipBounds[1]=E(A,re[1],ne,1e8),K.vao.bind(),K.vao.draw(N.TRIANGLES,K.vertexCount),K.lineWidth>0&&(N.lineWidth(K.lineWidth*W),K.vao.draw(N.LINES,K.lineVertexCount,K.vertexCount)),K.vao.unbind()}}var F=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function H(Z,K,q,W,$,R,N){var U=q.gl;if((R===q.projectHasAlpha||N)&&D(K,q,W,$),R===q.hasAlpha||N){Z.bind();var Q=Z.uniforms;Q.model=W.model||u,Q.view=W.view||u,Q.projection=W.projection||u,l[0]=2/U.drawingBufferWidth,l[1]=2/U.drawingBufferHeight,Q.screenSize=l,Q.highlightId=q.highlightId,Q.highlightScale=q.highlightScale,Q.fragClipBounds=F,Q.clipBounds=q.axes.bounds,Q.opacity=q.opacity,Q.pickGroup=q.pickId/255,Q.pixelRatio=$,q.vao.bind(),q.vao.draw(U.TRIANGLES,q.vertexCount),q.lineWidth>0&&(U.lineWidth(q.lineWidth*$),q.vao.draw(U.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}function V(Z,K,q,W){var $;$=Array.isArray(Z)?K<Z.length?Z[K]:void 0:Z,$=i($);var R=!0;e($)&&($="▼",R=!1);var N=c($,q,W);return{mesh:N[0],lines:N[1],bounds:N[2],visible:R}}x.draw=function(Z){H(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,Z,this.pixelRatio,!1,!1)},x.drawTransparent=function(Z){H(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,Z,this.pixelRatio,!0,!1)},x.drawPick=function(Z){H(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,Z,1,!0,!0)}
2998,x.pick=function(Z){if(!Z||Z.id!==this.pickId)return null;var K=Z.value[2]+(Z.value[1]<<8)+(Z.value[0]<<16);if(K>=this.pointCount||K<0)return null;var q=this.points[K],W=this._selectResult;W.index=K;for(var $=0;$<3;++$)W.position[$]=W.dataCoordinate[$]=q[$];return W},x.highlight=function(Z){if(Z){var K=Z.index,q=255&K,W=K>>8&255,$=K>>16&255;this.highlightId=[q/255,W/255,$/255,0]}else this.highlightId=[1,1,1,1]},x.update=function(Z){if("perspective"in(Z=Z||{})&&(this.useOrtho=!Z.perspective),"orthographic"in Z&&(this.useOrtho=!!Z.orthographic),"lineWidth"in Z&&(this.lineWidth=Z.lineWidth),"project"in Z)if(Array.isArray(Z.project))this.axesProject=Z.project;else{var K=!!Z.project;this.axesProject=[K,K,K]}if("projectScale"in Z)if(Array.isArray(Z.projectScale))this.projectScale=Z.projectScale.slice();else{var q=+Z.projectScale;this.projectScale=[q,q,q]}if(this.projectHasAlpha=!1,"projectOpacity"in Z){Array.isArray(Z.projectOpacity)?this.projectOpacity=Z.projectOpacity.slice():(q=+Z.projectOpacity,this.projectOpacity=[q,q,q]);for(var W=0;W<3;++W)this.projectOpacity[W]=p(this.projectOpacity[W]),this.projectOpacity[W]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in Z&&(this.opacity=p(Z.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var $,R,N=Z.position,U=Z.font||"normal",Q=Z.alignment||[0,0];if(Q.length===2)$=Q[0],R=Q[1];else for($=[],R=[],W=0;W<Q.length;++W)$[W]=Q[W][0],R[W]=Q[W][1];var j=[1/0,1/0,1/0],X=[-1/0,-1/0,-1/0],J=Z.glyph,re=Z.color,ne=Z.size,se=Z.angle,oe=Z.lineColor,pe=-1,ce=0,de=0,xe=0;if(N.length){xe=N.length;e:for(W=0;W<xe;++W){for(var we=N[W],be=0;be<3;++be)if(isNaN(we[be])||!isFinite(we[be]))continue e;var Ee=(tt=V(J,W,U,this.pixelRatio)).mesh,fe=tt.lines,me=tt.bounds;ce+=3*Ee.cells.length,de+=2*fe.edges.length}}var Te=ce+de,_e=o.mallocFloat(3*Te),Ae=o.mallocFloat(4*Te),Pe=o.mallocFloat(2*Te),De=o.mallocUint32(Te);if(Te>0){var Ve=0,Qe=ce,Oe=[0,0,0,1],Ue=[0,0,0,1],Ge=Array.isArray(re)&&Array.isArray(re[0]),Ye=Array.isArray(oe)&&Array.isArray(oe[0]);e:for(W=0;W<xe;++W){for(pe+=1,we=N[W],be=0;be<3;++be){if(isNaN(we[be])||!isFinite(we[be]))continue e;X[be]=Math.max(X[be],we[be]),j[be]=Math.min(j[be],we[be])}Ee=(tt=V(J,W,U,this.pixelRatio)).mesh,fe=tt.lines,me=tt.bounds;var tt,lt=tt.visible;if(lt)if(Array.isArray(re)){if((vt=Ge?W<re.length?re[W]:[0,0,0,0]:re).length===3){for(be=0;be<3;++be)Oe[be]=vt[be];Oe[3]=1}else if(vt.length===4){for(be=0;be<4;++be)Oe[be]=vt[be];!this.hasAlpha&&vt[3]<1&&(this.hasAlpha=!0)}}else Oe[0]=Oe[1]=Oe[2]=0,Oe[3]=1;else Oe=[1,1,1,0];if(lt)if(Array.isArray(oe)){var vt;if((vt=Ye?W<oe.length?oe[W]:[0,0,0,0]:oe).length===3){for(be=0;be<3;++be)Ue[be]=vt[be];Ue[be]=1}else if(vt.length===4){for(be=0;be<4;++be)Ue[be]=vt[be];!this.hasAlpha&&vt[3]<1&&(this.hasAlpha=!0)}}else Ue[0]=Ue[1]=Ue[2]=0,Ue[3]=1;else Ue=[1,1,1,0];var It=.5;lt?Array.isArray(ne)?It=W<ne.length?+ne[W]:12:ne?It=+ne:this.useOrtho&&(It=12):It=0;var St=0;Array.isArray(se)?St=W<se.length?+se[W]:0:se&&(St=+se);var rt=Math.cos(St),et=Math.sin(St);for(we=N[W],be=0;be<3;++be)X[be]=Math.max(X[be],we[be]),j[be]=Math.min(j[be],we[be]);var Tt=$,Vt=R;Tt=0,Array.isArray($)?Tt=W<$.length?$[W]:0:$&&(Tt=$),Vt=0,Array.isArray(R)?Vt=W<R.length?R[W]:0:R&&(Vt=R);var Kt=[Tt*=Tt>0?1-me[0][0]:Tt<0?1+me[1][0]:1,Vt*=Vt>0?1-me[0][1]:Vt<0?1+me[1][1]:1],Be=Ee.cells||[],qe=Ee.positions||[];for(be=0;be<Be.length;++be)for(var Re=Be[be],Xe=0;Xe<3;++Xe){for(var ke=0;ke<3;++ke)_e[3*Ve+ke]=we[ke];for(ke=0;ke<4;++ke)Ae[4*Ve+ke]=Oe[ke];De[Ve]=pe;var Le=qe[Re[Xe]];Pe[2*Ve]=It*(rt*Le[0]-et*Le[1]+Kt[0]),Pe[2*Ve+1]=It*(et*Le[0]+rt*Le[1]+Kt[1]),Ve+=1}for(Be=fe.edges,qe=fe.positions,be=0;be<Be.length;++be)for(Re=Be[be],Xe=0;Xe<2;++Xe){for(ke=0;ke<3;++ke)_e[3*Qe+ke]=we[ke];for(ke=0;ke<4;++ke)Ae[4*Qe+ke]=Ue[ke];De[Qe]=pe,Le=qe[Re[Xe]],Pe[2*Qe]=It*(rt*Le[0]-et*Le[1]+Kt[0]),Pe[2*Qe+1]=It*(et*Le[0]+rt*Le[1]+Kt[1]),Qe+=1}}}this.bounds=[j,X],this.points=N,this.pointCount=N.length,this.vertexCount=ce,this.lineVertexCount=de,this.pointBuffer.update(_e),this.colorBuffer.update(Ae),this.glyphBuffer.update(Pe),this.idBuffer.update(De),o.free(_e),o.free(Ae),o.free(Pe),o.free(De)},x.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{"./lib/get-simple-string":125,"./lib/glyphs":126,"./lib/shaders":127,"gl-buffer":78,"gl-mat4/multiply":100,"gl-vao":150,"is-string-blank":239,"typedarray-pool":308}],129:[function(m,b,v){var e=m("glslify");v.boxVertex=e([`precision mediump float;
2999#define GLSLIFY 1
3000
3001attribute vec2 vertex;
3002
3003uniform vec2 cornerA, cornerB;
3004
3005void main() {
3006  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);
3007}
3008`]),v.boxFragment=e([`precision mediump float;
3009#define GLSLIFY 1
3010
3011uniform vec4 color;
3012
3013void main() {
3014  gl_FragColor = color;
3015}
3016`])},{glslify:231}],130:[function(m,b,v){var e=m("gl-shader"),n=m("gl-buffer"),t=m("./lib/shaders");function o(d,c,i){this.plot=d,this.boxBuffer=c,this.boxShader=i,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}b.exports=function(d,c){var i=d.gl,u=n(i,[0,0,0,1,1,0,1,1]),f=e(i,t.boxVertex,t.boxFragment),s=new o(d,u,f);return s.update(c),d.addOverlay(s),s};var r=o.prototype;r.draw=function(){if(this.enabled){var d=this.plot,c=this.selectBox,i=this.borderWidth,u=(this.innerFill,this.innerColor),f=(this.outerFill,this.outerColor),s=this.borderColor,h=d.box,p=d.screenBox,a=d.dataBox,x=d.viewBox,l=d.pixelRatio,w=(c[0]-a[0])*(x[2]-x[0])/(a[2]-a[0])+x[0],_=(c[1]-a[1])*(x[3]-x[1])/(a[3]-a[1])+x[1],T=(c[2]-a[0])*(x[2]-x[0])/(a[2]-a[0])+x[0],k=(c[3]-a[1])*(x[3]-x[1])/(a[3]-a[1])+x[1];if(w=Math.max(w,x[0]),_=Math.max(_,x[1]),T=Math.min(T,x[2]),k=Math.min(k,x[3]),!(T<w||k<_)){h.bind();var L=p[2]-p[0],A=p[3]-p[1];if(this.outerFill&&(h.drawBox(0,0,L,_,f),h.drawBox(0,_,w,k,f),h.drawBox(0,k,L,A,f),h.drawBox(T,_,L,k,f)),this.innerFill&&h.drawBox(w,_,T,k,u),i>0){var I=i*l;h.drawBox(w-I,_-I,T+I,_+I,s),h.drawBox(w-I,k-I,T+I,k+I,s),h.drawBox(w-I,_-I,w+I,k+I,s),h.drawBox(T-I,_-I,T+I,k+I,s)}}}},r.update=function(d){d=d||{},this.innerFill=!!d.innerFill,this.outerFill=!!d.outerFill,this.innerColor=(d.innerColor||[0,0,0,.5]).slice(),this.outerColor=(d.outerColor||[0,0,0,.5]).slice(),this.borderColor=(d.borderColor||[0,0,0,1]).slice(),this.borderWidth=d.borderWidth||0,this.selectBox=(d.selectBox||this.selectBox).slice()},r.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":129,"gl-buffer":78,"gl-shader":132}],131:[function(m,b,v){b.exports=function(i,u){var f=u[0],s=u[1],h=e(i,f,s,{}),p=n.mallocUint8(f*s*4);return new d(i,h,p)};var e=m("gl-fbo"),n=m("typedarray-pool"),t=m("ndarray"),o=m("bit-twiddle").nextPow2;function r(i,u,f,s,h){this.coord=[i,u],this.id=f,this.value=s,this.distance=h}function d(i,u,f){this.gl=i,this.fbo=u,this.buffer=f,this._readTimeout=null;var s=this;this._readCallback=function(){s.gl&&(u.bind(),i.readPixels(0,0,u.shape[0],u.shape[1],i.RGBA,i.UNSIGNED_BYTE,s.buffer),s._readTimeout=null)}}var c=d.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(i){if(this.gl){this.fbo.shape=i;var u=this.fbo.shape[0],f=this.fbo.shape[1];if(f*u*4>this.buffer.length){n.free(this.buffer);for(var s=this.buffer=n.mallocUint8(o(f*u*4)),h=0;h<f*u*4;++h)s[h]=255}return i}}}),c.begin=function(){var i=this.gl;this.shape,i&&(this.fbo.bind(),i.clearColor(1,1,1,1),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT))},c.end=function(){var i=this.gl;i&&(i.bindFramebuffer(i.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},c.query=function(i,u,f){if(!this.gl)return null;var s=this.fbo.shape.slice();i|=0,u|=0,typeof f!="number"&&(f=1);var h=0|Math.min(Math.max(i-f,0),s[0]),p=0|Math.min(Math.max(i+f,0),s[0]),a=0|Math.min(Math.max(u-f,0),s[1]),x=0|Math.min(Math.max(u+f,0),s[1]);if(p<=h||x<=a)return null;var l=[p-h,x-a],w=t(this.buffer,[l[0],l[1],4],[4,4*s[0],1],4*(h+s[0]*a)),_=function(L,A,I){for(var P=1e8,S=-1,E=-1,D=L.shape[0],F=L.shape[1],H=0;H<D;H++)for(var V=0;V<F;V++){var Z=L.get(H,V,0),K=L.get(H,V,1),q=L.get(H,V,2),W=L.get(H,V,3);
3016if(Z<255||K<255||q<255||W<255){var $=A-H,R=I-V,N=$*$+R*R;N<P&&(P=N,S=H,E=V)}}return[S,E,P]}(w.hi(l[0],l[1],1),f,f),T=_[0],k=_[1];return T<0||Math.pow(this.radius,2)<_[2]?null:new r(T+h|0,k+a|0,w.get(T,k,0),[w.get(T,k,1),w.get(T,k,2),w.get(T,k,3)],Math.sqrt(_[2]))},c.dispose=function(){this.gl&&(this.fbo.dispose(),n.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},{"bit-twiddle":32,"gl-fbo":86,ndarray:259,"typedarray-pool":308}],132:[function(m,b,v){var e=m("./lib/create-uniforms"),n=m("./lib/create-attributes"),t=m("./lib/reflect"),o=m("./lib/shader-cache"),r=m("./lib/runtime-reflect"),d=m("./lib/GLError");function c(f){this.gl=f,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var i=c.prototype;function u(f,s){return f.name<s.name?-1:1}i.bind=function(){var f;this.program||this._relink();var s=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),h=this.gl.lastAttribCount;if(s>h)for(f=h;f<s;f++)this.gl.enableVertexAttribArray(f);else if(h>s)for(f=s;f<h;f++)this.gl.disableVertexAttribArray(f);this.gl.lastAttribCount=s,this.gl.useProgram(this.program)},i.dispose=function(){for(var f=this.gl.lastAttribCount,s=0;s<f;s++)this.gl.disableVertexAttribArray(s);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},i.update=function(f,s,h,p){if(!s||arguments.length===1){var a=f;f=a.vertex,s=a.fragment,h=a.uniforms,p=a.attributes}var x=this,l=x.gl,w=x._vref;x._vref=o.shader(l,l.VERTEX_SHADER,f),w&&w.dispose(),x.vertShader=x._vref.shader;var _=this._fref;if(x._fref=o.shader(l,l.FRAGMENT_SHADER,s),_&&_.dispose(),x.fragShader=x._fref.shader,!h||!p){var T=l.createProgram();if(l.attachShader(T,x.fragShader),l.attachShader(T,x.vertShader),l.linkProgram(T),!l.getProgramParameter(T,l.LINK_STATUS)){var k=l.getProgramInfoLog(T);throw new d(k,"Error linking program:"+k)}h=h||r.uniforms(l,T),p=p||r.attributes(l,T),l.deleteProgram(T)}(p=p.slice()).sort(u);var L,A=[],I=[],P=[];for(L=0;L<p.length;++L){var S=p[L];if(S.type.indexOf("mat")>=0){for(var E=0|S.type.charAt(S.type.length-1),D=new Array(E),F=0;F<E;++F)D[F]=P.length,I.push(S.name+"["+F+"]"),typeof S.location=="number"?P.push(S.location+F):Array.isArray(S.location)&&S.location.length===E&&typeof S.location[F]=="number"?P.push(0|S.location[F]):P.push(-1);A.push({name:S.name,type:S.type,locations:D})}else A.push({name:S.name,type:S.type,locations:[P.length]}),I.push(S.name),typeof S.location=="number"?P.push(0|S.location):P.push(-1)}var H=0;for(L=0;L<P.length;++L)if(P[L]<0){for(;P.indexOf(H)>=0;)H+=1;P[L]=H}var V=new Array(h.length);function Z(){x.program=o.program(l,x._vref,x._fref,I,P);for(var K=0;K<h.length;++K)V[K]=l.getUniformLocation(x.program,h[K].name)}Z(),x._relink=Z,x.types={uniforms:t(h),attributes:t(p)},x.attributes=n(l,x,A,P),Object.defineProperty(x,"uniforms",e(l,x,h,V))},b.exports=function(f,s,h,p,a){var x=new c(f);return x.update(s,h,p,a),x}},{"./lib/GLError":133,"./lib/create-attributes":134,"./lib/create-uniforms":135,"./lib/reflect":136,"./lib/runtime-reflect":137,"./lib/shader-cache":138}],133:[function(m,b,v){function e(n,t,o){this.shortMessage=t||"",this.longMessage=o||"",this.rawError=n||"",this.message="gl-shader: "+(t||n||"")+(o?`
3017`+o:""),this.stack=new Error().stack}e.prototype=new Error,e.prototype.name="GLError",e.prototype.constructor=e,b.exports=e},{}],134:[function(m,b,v){b.exports=function(c,i,u,f){for(var s={},h=0,p=u.length;h<p;++h){var a=u[h],x=a.name,l=a.type,w=a.locations;switch(l){case"bool":case"int":case"float":r(c,i,w[0],f,1,s,x);break;default:if(l.indexOf("vec")>=0){if((_=l.charCodeAt(l.length-1)-48)<2||_>4)throw new e("","Invalid data type for attribute "+x+": "+l);r(c,i,w[0],f,_,s,x)}else{if(!(l.indexOf("mat")>=0))throw new e("","Unknown data type for attribute "+x+": "+l);var _;if((_=l.charCodeAt(l.length-1)-48)<2||_>4)throw new e("","Invalid data type for attribute "+x+": "+l);d(c,i,w,f,_,s,x)}}}return s};var e=m("./GLError");function n(c,i,u,f,s,h){this._gl=c,this._wrapper=i,this._index=u,this._locations=f,this._dimension=s,this._constFunc=h}var t=n.prototype;t.pointer=function(c,i,u,f){var s=this._gl,h=this._locations[this._index];s.vertexAttribPointer(h,this._dimension,c||s.FLOAT,!!i,u||0,f||0),s.enableVertexAttribArray(h)},t.set=function(c,i,u,f){return this._constFunc(this._locations[this._index],c,i,u,f)},Object.defineProperty(t,"location",{get:function(){return this._locations[this._index]},set:function(c){return c!==this._locations[this._index]&&(this._locations[this._index]=0|c,this._wrapper.program=null),0|c}});var o=[function(c,i,u){return u.length===void 0?c.vertexAttrib1f(i,u):c.vertexAttrib1fv(i,u)},function(c,i,u,f){return u.length===void 0?c.vertexAttrib2f(i,u,f):c.vertexAttrib2fv(i,u)},function(c,i,u,f,s){return u.length===void 0?c.vertexAttrib3f(i,u,f,s
3017):c.vertexAttrib3fv(i,u)},function(c,i,u,f,s,h){return u.length===void 0?c.vertexAttrib4f(i,u,f,s,h):c.vertexAttrib4fv(i,u)}];function r(c,i,u,f,s,h,p){var a=o[s],x=new n(c,i,u,f,s,a);Object.defineProperty(h,p,{set:function(l){return c.disableVertexAttribArray(f[u]),a(c,f[u],l),l},get:function(){return x},enumerable:!0})}function d(c,i,u,f,s,h,p){for(var a=new Array(s),x=new Array(s),l=0;l<s;++l)r(c,i,u[l],f,s,a,l),x[l]=a[l];Object.defineProperty(a,"location",{set:function(T){if(Array.isArray(T))for(var k=0;k<s;++k)x[k].location=T[k];else for(k=0;k<s;++k)x[k].location=T+k;return T},get:function(){for(var T=new Array(s),k=0;k<s;++k)T[k]=f[u[k]];return T},enumerable:!0}),a.pointer=function(T,k,L,A){T=T||c.FLOAT,k=!!k,L=L||s*s,A=A||0;for(var I=0;I<s;++I){var P=f[u[I]];c.vertexAttribPointer(P,s,T,k,L,A+I*s),c.enableVertexAttribArray(P)}};var w=new Array(s),_=c["vertexAttrib"+s+"fv"];Object.defineProperty(h,p,{set:function(T){for(var k=0;k<s;++k){var L=f[u[k]];if(c.disableVertexAttribArray(L),Array.isArray(T[0]))_.call(c,L,T[k]);else{for(var A=0;A<s;++A)w[A]=T[s*k+A];_.call(c,L,w)}}return T},get:function(){return a},enumerable:!0})}},{"./GLError":133}],135:[function(m,b,v){var e=m("./reflect"),n=m("./GLError");function t(r){return function(){return r}}function o(r,d){for(var c=new Array(r),i=0;i<r;++i)c[i]=d;return c}b.exports=function(r,d,c,i){function u(p){return function(a){for(var x=function F(H,V){if(typeof V!="object")return[[H,V]];var Z=[];for(var K in V){var q=V[K],W=H;parseInt(K)+""===K?W+="["+K+"]":W+="."+K,typeof q=="object"?Z.push.apply(Z,F(W,q)):Z.push([W,q])}return Z}("",p),l=0;l<x.length;++l){var w=x[l],_=w[0],T=w[1];if(i[T]){var k=a;if(typeof _=="string"&&(_.indexOf(".")===0||_.indexOf("[")===0)){var L=_;if(_.indexOf(".")===0&&(L=_.slice(1)),L.indexOf("]")===L.length-1){var A=L.indexOf("["),I=L.slice(0,A),P=L.slice(A+1,L.length-1);k=I?a[I][P]:a[P]}else k=a[L]}var S,E=c[T].type;switch(E){case"bool":case"int":case"sampler2D":case"samplerCube":r.uniform1i(i[T],k);break;case"float":r.uniform1f(i[T],k);break;default:var D=E.indexOf("vec");if(!(0<=D&&D<=1&&E.length===4+D)){if(E.indexOf("mat")===0&&E.length===4){if((S=E.charCodeAt(E.length-1)-48)<2||S>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+E);r["uniformMatrix"+S+"fv"](i[T],!1,k);break}throw new n("","Unknown uniform data type for "+name+": "+E)}if((S=E.charCodeAt(E.length-1)-48)<2||S>4)throw new n("","Invalid data type");switch(E.charAt(0)){case"b":case"i":r["uniform"+S+"iv"](i[T],k);break;case"v":r["uniform"+S+"fv"](i[T],k);break;default:throw new n("","Unrecognized data type for vector "+name+": "+E)}}}}}}function f(p,a,x){if(typeof x=="object"){var l=s(x);Object.defineProperty(p,a,{get:t(l),set:u(x),enumerable:!0,configurable:!1})}else i[x]?Object.defineProperty(p,a,{get:(w=x,function(_,T,k){return _.getUniform(T.program,k[w])}),set:u(x),enumerable:!0,configurable:!1}):p[a]=function(_){switch(_){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var T=_.indexOf("vec");if(0<=T&&T<=1&&_.length===4+T){if((k=_.charCodeAt(_.length-1)-48)<2||k>4)throw new n("","Invalid data type");return _.charAt(0)==="b"?o(k,!1):o(k,0)}if(_.indexOf("mat")===0&&_.length===4){var k;if((k=_.charCodeAt(_.length-1)-48)<2||k>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+_);return o(k*k,0)}throw new n("","Unknown uniform data type for "+name+": "+_)}}(c[x].type);var w}function s(p){var a;if(Array.isArray(p)){a=new Array(p.length);for(var x=0;x<p.length;++x)f(a,x,p[x])}else for(var l in a={},p)f(a,l,p[l]);return a}var h=e(c,!0);return{get:t(s(h)),set:u(h),enumerable:!0,configurable:!0}}},{"./GLError":133,"./reflect":136}],136:[function(m,b,v){b.exports=function(e,n){for(var t={},o=0;o<e.length;++o)for(var r=e[o].name.split("."),d=t,c=0;c<r.length;++c){var i=r[c].split("[");if(i.length>1){i[0]in d||(d[i[0]]=[]),d=d[i[0]];for(var u=1;u<i.length;++u){var f=parseInt(i[u]);u<i.length-1||c<r.length-1?(f in d||(u<i.length-1?d[f]=[]:d[f]={}),d=d[f]):d[f]=n?o:e[o].type}}else c<r.length-1?(i[0]in d||(d[i[0]]={}),d=d[i[0]]):d[i[0]]=n?o:e[o].type}return t}},{}],137:[function(m,b,v){v.uniforms=function(o,r){for(var d=o.getProgramParameter(r,o.ACTIVE_UNIFORMS),c=[],i=0;i<d;++i){var u=o.getActiveUniform(r,i);if(u){var f=t(o,u.type);if(u.size>1)for(var s=0;s<u.size;++s)c.push({name:u.name.replace("[0]","["+s+"]"),type:f});else c.push({name:u.name,type:f})}}return c},v.attributes=function(o,r){for(var d=o.getProgramParameter(r,o.ACTIVE_ATTRIBUTES),c=[],i=0;i<d;++i){var u=o.getActiveAttrib(r,i);u&&c.push({name:u.name,type:t(o,u.type)})}return c};var e={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},n=null;function t(o,r){if(!n){var d=Object.keys(e);n={};for(var c=0;c<d.length;++c){var i=d[c];n[o[i]]=e[i]}}return n[r]}},{}],138:[function(m,b,v){v.shader=function(u,f,s){return i(u).getShaderReference(f,s)},v.program=function(u,f,s,h,p){return i(u).getProgram(f,s,h,p)};var e=m("./GLError"),n=m("gl-format-compiler-error"),t=new(typeof WeakMap>"u"?m("weakmap-shim"):WeakMap),o=0;function r(u,f,s,h,p,a,x){this.id=u,this.src=f,this.type=s,this.shader=h,this.count=a,this.programs=[],this.cache=x}function d(u){this.gl=u,this.shaders=[{},{}],this.programs={}}r.prototype.dispose=function(){if(--this.count==0){for(var u=this.cache,f=u.gl,s=this.programs,h=0,p=s.length;h<p;++h){var a=u.programs[s[h]];a&&(delete u.programs[h],f.deleteProgram(a))}f.deleteShader(this.shader),delete u.shaders[this.type===f.FRAGMENT_SHADER|0][this.src]}};var c=d.prototype;function i(u){var f=t.get(u);return f||(f=new d(u),t.set(u,f)),f}c.getShaderReference=function(u,f){var s=this.gl,h=this.shaders[u===s.FRAGMENT_SHADER|0],p=h[f];if(p&&s.isShader(p.shader))p.count+=1;else{var a=function(x,l,w){var _=x.createShader(l);if(x.shaderSource(_,w),x.compileShader(_),!x.getShaderParameter(_,x.COMPILE_STATUS)){var T=x.getShaderInfoLog(_);try{var k=n(T,w,l)}catch(L){throw console.warn("Failed to format compiler error: "+L),new e(T,`Error compiling shader:
3018`+T)}throw new e(T,k.short,k.long)}return _}(s,u,f);p=h[f]=new r(o++,f,u,a,[],1,this)}return p},c.getProgram=function(u,f,s,h){var p=[u.id,f.id,s.join(":"),h.join(":")].join("@"),a=this.programs[p
3018];return a&&this.gl.isProgram(a)||(this.programs[p]=a=function(x,l,w,_,T){var k=x.createProgram();x.attachShader(k,l),x.attachShader(k,w);for(var L=0;L<_.length;++L)x.bindAttribLocation(k,T[L],_[L]);if(x.linkProgram(k),!x.getProgramParameter(k,x.LINK_STATUS)){var A=x.getProgramInfoLog(k);throw new e(A,"Error linking program: "+A)}return k}(this.gl,u.shader,f.shader,s,h),u.programs.push(p),f.programs.push(p)),a}},{"./GLError":133,"gl-format-compiler-error":87,"weakmap-shim":316}],139:[function(m,b,v){function e(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}b.exports=function(t,o){var r=new e(t);return r.update(o),t.addOverlay(r),r};var n=e.prototype;n.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(o){return o.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},n.draw=function(){var t=this.enable,o=this.width,r=this.color,d=this.center,c=this.plot,i=c.line,u=c.dataBox,f=c.viewBox;if(i.bind(),u[0]<=d[0]&&d[0]<=u[2]&&u[1]<=d[1]&&d[1]<=u[3]){var s=f[0]+(d[0]-u[0])/(u[2]-u[0])*(f[2]-f[0]),h=f[1]+(d[1]-u[1])/(u[3]-u[1])*(f[3]-f[1]);t[0]&&i.drawLine(s,h,f[0],h,o[0],r[0]),t[1]&&i.drawLine(s,h,s,f[1],o[1],r[1]),t[2]&&i.drawLine(s,h,f[2],h,o[2],r[2]),t[3]&&i.drawLine(s,h,s,f[3],o[3],r[3])}},n.dispose=function(){this.plot.removeOverlay(this)}},{}],140:[function(m,b,v){var e=m("glslify"),n=m("gl-shader"),t=e([`precision mediump float;
3019#define GLSLIFY 1
3020
3021attribute vec3 position, color;
3022attribute float weight;
3023
3024uniform mat4 model, view, projection;
3025uniform vec3 coordinates[3];
3026uniform vec4 colors[3];
3027uniform vec2 screenShape;
3028uniform float lineWidth;
3029
3030varying vec4 fragColor;
3031
3032void main() {
3033  vec3 vertexPosition = mix(coordinates[0],
3034    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));
3035
3036  vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0
3036);
3037  vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;
3038  vec2 delta = weight * clipOffset * screenShape;
3039  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;
3040
3041  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
3042  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
3043}
3044`]),o=e([`precision mediump float;
3045#define GLSLIFY 1
3046
3047varying vec4 fragColor;
3048
3049void main() {
3050  gl_FragColor = fragColor;
3051}`]);b.exports=function(r){return n(r,t,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":132,glslify:231}],141:[function(m,b,v){var e=m("gl-buffer"),n=m("gl-vao"),t=m("./shaders/index");b.exports=function(f,s){var h=[];function p(_,T,k,L,A,I){var P=[_,T,k,0,0,0,1];P[L+3]=1,P[L]=A,h.push.apply(h,P),P[6]=-1,h.push.apply(h,P),P[L]=I,h.push.apply(h,P),h.push.apply(h,P),P[6]=1,h.push.apply(h,P),P[L]=A,h.push.apply(h,P)}p(0,0,0,0,0,1),p(0,0,0,1,0,1),p(0,0,0,2,0,1),p(1,0,0,1,-1,1),p(1,0,0,2,-1,1),p(0,1,0,0,-1,1),p(0,1,0,2,-1,1),p(0,0,1,0,-1,1),p(0,0,1,1,-1,1);var a=e(f,h),x=n(f,[{type:f.FLOAT,buffer:a,size:3,offset:0,stride:28},{type:f.FLOAT,buffer:a,size:3,offset:12,stride:28},{type:f.FLOAT,buffer:a,size:1,offset:24,stride:28}]),l=t(f);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.weight.location=2;var w=new r(f,a,x,l);return w.update(s),w};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function r(f,s,h,p){this.gl=f,this.buffer=s,this.vao=h,this.shader=p,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var d=r.prototype,c=[0,0,0],i=[0,0,0],u=[0,0];d.isTransparent=function(){return!1},d.drawTransparent=function(f){},d.draw=function(f){var s=this.gl,h=this.vao,p=this.shader;h.bind(),p.bind();var a,x=f.model||o,l=f.view||o,w=f.projection||o;this.axes&&(a=this.axes.lastCubeProps.axis);for(var _=c,T=i,k=0;k<3;++k)a&&a[k]<0?(_[k]=this.bounds[0][k],T[k]=this.bounds[1][k]):(_[k]=this.bounds[1][k],T[k]=this.bounds[0][k]);for(u[0]=s.drawingBufferWidth,u[1]=s.drawingBufferHeight,p.uniforms.model=x,p.uniforms.view=l,p.uniforms.projection=w,p.uniforms.coordinates=[this.position,_,T],p.uniforms.colors=this.colors,p.uniforms.screenShape=u,k=0;k<3;++k)p.uniforms.lineWidth=this.lineWidth[k]*this.pixelRatio,this.enabled[k]&&(h.draw(s.TRIANGLES,6,6*k),this.drawSides[k]&&h.draw(s.TRIANGLES,12,18+12*k));h.unbind()},d.update=function(f){f&&("bounds"in f&&(this.bounds=f.bounds),"position"in f&&(this.position=f.position),"lineWidth"in f&&(this.lineWidth=f.lineWidth),"colors"in f&&(this.colors=f.colors),"enabled"in f&&(this.enabled=f.enabled),"drawSides"in f&&(this.drawSides=f.drawSides))},d.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":140,"gl-buffer":78,"gl-vao":150}],142:[function(m,b,v){var e=m("glslify"),n=e([`precision highp float;
3052
3053precision highp float;
3054#define GLSLIFY 1
3055
3056vec3 getOrthogonalVector(vec3 v) {
3057  // Return up-vector for only-z vector.
3058  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
3059  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
3060  // Assign z = 0, x = -b, y = a:
3061  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
3062  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
3063    return normalize(vec3(-v.y, v.x, 0.0));
3064  } else {
3065    return normalize(vec3(0.0, v.z, -v.y));
3066  }
3067}
3068
3069// Calculate the tube vertex and normal at the given index.
3070//
3071// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
3072//
3073// Each tube segment is made up of a ring of vertices.
3074// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
3075// The indexes of tube segments run from 0 to 8.
3076//
3077vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
3078  float segmentCount = 8.0;
3079
3080  float angle = 2.0 * 3.14159 * (index / segmentCount);
3081
3082  vec3 u = getOrthogonalVector(d);
3083  vec3 v = normalize(cross(u, d));
3084
3085  vec3 x = u * cos(angle) * length(d);
3086  vec3 y = v * sin(angle) * length(d);
3087  vec3 v3 = x + y;
3088
3089  normal = normalize(v3);
3090
3091  return v3;
3092}
3093
3094attribute vec4 vector;
3095attribute vec4 color, position;
3096attribute vec2 uv;
3097
3098uniform float vectorScale, tubeScale;
3099uniform mat4 model, view, projection, inverseModel;
3100uniform vec3 eyePosition, lightPosition;
3101
3102varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
3103varying vec4 f_color;
3104varying vec2 f_uv;
3105
3106void main() {
3107  // Scale the vector magnitude to stay constant with
3108  // model & view changes.
3109  vec3 normal;
3110  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * 
3110normalize(vector.xyz)), position.w, normal);
3111  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
3112
3113  //Lighting geometry parameters
3114  vec4 cameraCoordinate = view * tubePosition;
3115  cameraCoordinate.xyz /= cameraCoordinate.w;
3116  f_lightDirection = lightPosition - cameraCoordinate.xyz;
3117  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
3118  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);
3119
3120  // vec4 m_position  = model * vec4(tubePosition, 1.0);
3121  vec4 t_position  = view * tubePosition;
3122  gl_Position      = projection * t_position;
3123
3124  f_color          = color;
3125  f_data           = tubePosition.xyz;
3126  f_position       = position.xyz;
3127  f_uv             = uv;
3128}
3129`]),t=e([`#extension GL_OES_standard_derivatives : enable
3130
3131precision highp float;
3132#define GLSLIFY 1
3133
3134float beckmannDistribution(float x, float roughness) {
3135  float NdotH = max(x, 0.0001);
3136  float cos2Alpha = NdotH * NdotH;
3137  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
3138  float roughness2 = roughness * roughness;
3139  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
3140  return exp(tan2Alpha / roughness2) / denom;
3141}
3142
3143float cookTorranceSpecular(
3144  vec3 lightDirection,
3145  vec3 viewDirection,
3146  vec3 surfaceNormal,
3147  float roughness,
3148  float fresnel) {
3149
3150  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
3151  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
3152
3153  //Half angle vector
3154  vec3 H = normalize(lightDirection + viewDirection);
3155
3156  //Geometric term
3157  float NdotH = max(dot(surfaceNormal, H), 0.0);
3158  float VdotH = max(dot(viewDirection, H), 0.000001);
3159  float LdotH = max(dot(lightDirection, H), 0.000001);
3160  float G1 = (2.0 * NdotH * VdotN) / VdotH;
3161  float G2 = (2.0 * NdotH * LdotN) / LdotH;
3162  float G = min(1.0, min(G1, G2));
3163  
3164  //Distribution term
3165  float D = beckmannDistribution(NdotH, roughness);
3166
3167  //Fresnel term
3168  float F = pow(1.0 - VdotN, fresnel);
3169
3170  //Multiply terms and done
3171  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
3172}
3173
3174bool outOfRange(float a, float b, float p) {
3175  return ((p > max(a, b)) || 
3176          (p < min(a, b)));
3177}
3178
3179bool outOfRange(vec2 a, vec2 b, vec2 p) {
3180  return (outOfRange(a.x, b.x, p.x) ||
3181          outOfRange(a.y, b.y, p.y));
3182}
3183
3184bool outOfRange(vec3 a, vec3 b, vec3 p) {
3185  return (outOfRange(a.x, b.x, p.x) ||
3186          outOfRange(a.y, b.y, p.y) ||
3187          outOfRange(a.z, b.z, p.z));
3188}
3189
3190bool outOfRange(vec4 a, vec4 b, vec4 p) {
3191  return outOfRange(a.xyz, b.xyz, p.xyz);
3192}
3193
3194uniform vec3 clipBounds[2];
3195uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
3196uniform sampler2D texture;
3197
3198varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
3199varying vec4 f_color;
3200varying vec2 f_uv;
3201
3202void main() {
3203  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
3204  vec3 N = normalize(f_normal);
3205  vec3 L = normalize(f_lightDirection);
3206  vec3 V = normalize(f_eyeDirection);
3207
3208  if(gl_FrontFacing) {
3209    N = -N;
3210  }
3211
3212  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
3213  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
3214
3215  vec4 surfaceColor = f_color * texture2D(texture, f_uv);
3216  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);
3217
3218  gl_FragColor = litColor * opacity;
3219}
3220`]),o=e([`precision highp float;
3221
3222precision highp float;
3223#define GLSLIFY 1
3224
3225vec3 getOrthogonalVector(vec3 v) {
3226  // Return up-vector for only-z vector.
3227  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
3228  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
3229  // Assign z = 0, x = -b, y = a:
3230  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
3231  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
3232    return normalize(vec3(-v.y, v.x, 0.0));
3233  } else {
3234    return normalize(vec3(0.0, v.z, -v.y));
3235  }
3236}
3237
3238// Calculate the tube vertex and normal at the given index.
3239//
3240// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
3241//
3242// Each tube segment is made up of a ring of vertices.
3243// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
3244// The indexes of tube segments run from 0 to 8.
3245//
3246vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
3247  float segmentCount = 8.0;
3248
3249  float angle = 2.0 * 3.14159 * (index / segmentCount);
3250
3251  vec3 u = getOrthogonalVector(d);
3252  vec3 v = normalize(cross(u, d));
3253
3254  vec3 x = u * cos(angle) * length(d);
3255  vec3 y = v * sin(angle) * length(d);
3256  vec3 v3 = x + y;
3257
3258  normal = normalize(v3);
3259
3260  return v3;
3261}
3262
3263attribute vec4 vector;
3264attribute vec4 position;
3265attribute vec4 id;
3266
3267uniform mat4 model, view, projection;
3268uniform float tubeScale;
3269
3270varying vec3 f_position;
3271varying vec4 f_id;
3272
3273void main() {
3274  vec3 normal;
3275  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
3276  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
3277
3278  gl_Position = projection * view * tubePosition;
3279  f_id        = id;
3280  f_position  = position.xyz;
3281}
3282`]),r=e([`precision highp float;
3283#define GLSLIFY 1
3284
3285bool outOfRange(float a, float b, float p) {
3286  return ((p > max(a, b)) || 
3287          (p < min(a, b)));
3288}
3289
3290bool outOfRange(vec2 a, vec2 b, vec2 p) {
3291  return (outOfRange(a.x, b.x, p.x) ||
3292          outOfRange(a.y, b.y, p.y));
3293}
3294
3295bool outOfRange(vec3 a, vec3 b, vec3 p) {
3296  return (outOfRange(a.x, b.x, p.x) ||
3297          outOfRange(a.y, b.y, p.y) ||
3298          outOfRange(a.z, b.z, p.z));
3299}
3300
3301bool outOfRange(vec4 a, vec4 b, vec4 p) {
3302  return outOfRange(a.xyz, b.xyz, p.xyz);
3303}
3304
3305uniform vec3  clipBounds[2];
3306uniform float pickId;
3307
3308varying vec3 f_position;
3309varying vec4 f_id;
3310
3311void main() {
3312  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
3313
3314  gl_FragColor = vec4(pickId, f_id.xyz);
3315}`]);v.meshShader={vertex:n,fragment:t,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},v.pickShader={vertex:o,fragment:r,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:231}],143:[function(m,b,v){var e=m("gl-vec3"),n=m("gl-vec4"),t=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(f,s,h,p){for(var a=0,x=0;x<f.length;x++)for(var l=f[x].velocities,w=0;w<l.length;w++)a=Math.max(a,e.length(l[w]));var _=f.map(function(F){return function(H,V,Z,K){for(var q=H.points,W=H.velocities,$=H.divergences,R=[],N=[],U=[],Q=[],j=[],X=[],J=0,re=0,ne=n.create(),se=n.create(),oe=0;oe<q.length;oe++){var pe=q[oe],ce=W[oe],de=$[oe];V===0&&(de=.05*Z),re=e.length(ce)/K,ne=n.create(),e.copy(ne,ce),ne[3]=de;for(var xe=0;xe<8;xe++)j[xe]=[pe[0],pe[1],pe[2],xe];if(Q.length>0)for(xe=0;xe<8;xe++){var we=(xe+1)%8;R.push(Q[xe],j[xe],j[we],j[we],Q[we],Q[xe]),U.push(se,ne,ne,ne,se,se),X.push(J,re,re,re,J,J);var be=R.length;N.push([be-6,be-5,be-4],[be-3,be-2,be-1])}var Ee=Q;Q=j,j=Ee;var fe=se;se=ne,ne=fe;var me=J;J=re,re=me}return{positions:R,cells:N,vectors:U,vertexIntensity:X}}(F,h,p,a)}),T=[],k=[],L=[],A=[];for(x=0;x<_.length;x++){var I=_[x],P=T.length;for(T=T.concat(I.positions),L=L.concat(I.vectors),A=A.concat(I.vertexIntensity),w=0;w<I.cells.length;w++){var S=I.cells[w],E=[];k.push(E);for(var D=0;D<S.length;D++)E.push(S[D]+P)}}return{positions:T,cells:k,vectors:L,vertexIntensity:A,colormap:s}},r=function(f,s){var h,p=f.length;for(h=0;h<p;h++){var a=f[h];if(a===s)return h;if(a>s)return h-1}return h},d=function(f,s,h){return f<s?s:f>h?h:f},c=function(f){var s=1/0;f.sort(function(x,l){return x-l});for(var h=f.length,p=1;p<h;p++){var a=Math.abs(f[p]-f[p-1]);a<s&&(s=a)}return s};b.exports=function(f,s){var h=f.startingPositions,p=f.maxLength||1e3,a=f.tubeSize||1,x=f.absoluteTubeSize,l=f.gridFill||"+x+y+z",w={};l.indexOf("-x")!==-1&&(w.reversedX=!0),l.indexOf("-y")!==-1&&(w.reversedY=!0),l.indexOf("-z")!==-1&&(w.reversedZ=!0),w.filled=t.indexOf(l.replace(/-/g,"").replace(/\+/g,""));var _=f.getVelocity||function(oe){return function(pe,ce,de){var xe=ce.vectors,we=ce.meshgrid,be=pe[0],Ee=pe[1],fe=pe[2],me=we[0].length,Te=we[1].length,_e=we[2].length,Ae=r(we[0],be),Pe=r(we[1],Ee),De=r(we[2],fe),Ve=Ae+1,Qe=Pe+1,Oe=De+1;if(Ae=d(Ae,0,me-1),Ve=d(Ve,0,me-1),Pe=d(Pe,0,Te-1),Qe=d(Qe,0,Te-1),De=d(De,0,_e-1),Oe=d(Oe,0,_e-1),Ae<0||Pe<0||De<0||Ve>me-1||Qe>Te-1||Oe>_e-1)return e.create();var Ue,Ge,Ye,tt,lt,vt,It=we[0][Ae],St=we[0][Ve],rt=we[1][Pe],et=we[1][Qe],Tt=we[2][De],Vt=(be-It)/(St-It),Kt=(Ee-rt)/(et-rt),Be=(fe-Tt)/(we[2][Oe]-Tt);switch(isFinite(Vt)||(Vt=.5),isFinite(Kt)||(Kt=.5),isFinite(Be)||(Be=.5),de.reversedX&&(Ae=me-1-Ae,Ve=me-1-Ve),de.reversedY&&(Pe=Te-1-Pe,Qe=Te-1-Qe),de.reversedZ&&(De=_e-1-De,Oe=_e-1-Oe),de.filled){case 5:lt=De,vt=Oe,Ye=Pe*_e,tt=Qe*_e,Ue=Ae*_e*Te,Ge=Ve*_e*Te;break;case 4:lt=De,vt=Oe,Ue=Ae*_e,Ge=Ve*_e,Ye=Pe*_e*me,tt=Qe*_e*me;break;case 3:Ye=Pe,tt=Qe,lt=De*Te,vt=Oe*Te,Ue=Ae*Te*_e,Ge=Ve*Te*_e;break;case 2:Ye=Pe,tt=Qe,Ue=Ae*Te,Ge=Ve*Te,lt=De*Te*me,vt=Oe*Te*me;break;
3315case 1:Ue=Ae,Ge=Ve,lt=De*me,vt=Oe*me,Ye=Pe*me*_e,tt=Qe*me*_e;break;default:Ue=Ae,Ge=Ve,Ye=Pe*me,tt=Qe*me,lt=De*me*Te,vt=Oe*me*Te}var qe=xe[Ue+Ye+lt],Re=xe[Ue+Ye+vt],Xe=xe[Ue+tt+lt],ke=xe[Ue+tt+vt],Le=xe[Ge+Ye+lt],Ie=xe[Ge+Ye+vt],Ce=xe[Ge+tt+lt],Je=xe[Ge+tt+vt],it=e.create(),ht=e.create(),ut=e.create(),kt=e.create();e.lerp(it,qe,Le,Vt),e.lerp(ht,Re,Ie,Vt),e.lerp(ut,Xe,Ce,Vt),e.lerp(kt,ke,Je,Vt);var ot=e.create(),Lt=e.create();e.lerp(ot,it,ut,Kt),e.lerp(Lt,ht,kt,Kt);var Et=e.create();return e.lerp(Et,ot,Lt,Be),Et}(oe,f,w)},T=f.getDivergence||function(oe,pe){var ce=e.create(),de=1e-4;e.add(ce,oe,[de,0,0]);var xe=_(ce);e.subtract(xe,xe,pe),e.scale(xe,xe,1/de),e.add(ce,oe,[0,de,0]);var we=_(ce);e.subtract(we,we,pe),e.scale(we,we,1/de),e.add(ce,oe,[0,0,de]);var be=_(ce);return e.subtract(be,be,pe),e.scale(be,be,1/de),e.add(ce,xe,we),e.add(ce,ce,be),ce},k=[],L=s[0][0],A=s[0][1],I=s[0][2],P=s[1][0],S=s[1][1],E=s[1][2],D=function(oe){var pe=oe[0],ce=oe[1],de=oe[2];return!(pe<L||pe>P||ce<A||ce>S||de<I||de>E)},F=10*e.distance(s[0],s[1])/p,H=F*F,V=1,Z=0,K=h.length;K>1&&(V=function(oe){for(var pe=[],ce=[],de=[],xe={},we={},be={},Ee=oe.length,fe=0;fe<Ee;fe++){var me=oe[fe],Te=me[0],_e=me[1],Ae=me[2];xe[Te]||(pe.push(Te),xe[Te]=!0),we[_e]||(ce.push(_e),we[_e]=!0),be[Ae]||(de.push(Ae),be[Ae]=!0)}var Pe=c(pe),De=c(ce),Ve=c(de),Qe=Math.min(Pe,De,Ve);return isFinite(Qe)?Qe:1}(h));for(var q=0;q<K;q++){var W=e.create();e.copy(W,h[q]);var $=[W],R=[],N=_(W),U=W;R.push(N);var Q=[],j=T(W,N),X=e.length(j);isFinite(X)&&X>Z&&(Z=X),Q.push(X),k.push({points:$,velocities:R,divergences:Q});for(var J=0;J<100*p&&$.length<p&&D(W);){J++;var re=e.clone(N),ne=e.squaredLength(re);if(ne===0)break;ne>H&&e.scale(re,re,F/Math.sqrt(ne)),e.add(re,re,W),N=_(re),e.squaredDistance(U,re)-H>-1e-4*H&&($.push(re),U=re,R.push(N),j=T(re,N),X=e.length(j),isFinite(X)&&X>Z&&(Z=X),Q.push(X)),W=re}}var se=o(k,f.colormap,Z,V);return x?se.tubeScale=x:(Z===0&&(Z=1),se.tubeScale=.5*a*V/Z),se};var i=m("./lib/shaders"),u=m("gl-cone3d").createMesh;b.exports.createTubeMesh=function(f,s){return u(f,s,{shaders:i,traceType:"streamtube"})}},{"./lib/shaders":142,"gl-cone3d":79,"gl-vec3":169,"gl-vec4":205}],144:[function(m,b,v){var e=m("gl-shader"),n=m("glslify"),t=n([`precision highp float;
3316#define GLSLIFY 1
3317
3318attribute vec4 uv;
3319attribute vec3 f;
3320attribute vec3 normal;
3321
3322uniform vec3 objectOffset;
3323uniform mat4 model, view, projection, inverseModel;
3324uniform vec3 lightPosition, eyePosition;
3325uniform sampler2D colormap;
3326
3327varying float value, kill;
3328varying vec3 worldCoordinate;
3329varying vec2 planeCoordinate;
3330varying vec3 lightDirection, eyeDirection, surfaceNormal;
3331varying vec4 vColor;
3332
3333void main() {
3334  vec3 localCoordinate = vec3(uv.zw, f.x);
3335  worldCoordinate = objectOffset + localCoordinate;
3336  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);
3337  vec4 clipPosition = projection * view * worldPosition;
3338  gl_Position = clipPosition;
3339  kill = f.y;
3340  value = f.z;
3341  planeCoordinate = uv.xy;
3342
3343  vColor = texture2D(colormap, vec2(value, value));
3344
3345  //Lighting geometry parameters
3346  vec4 cameraCoordinate = view * worldPosition;
3347  cameraCoordinate.xyz /= cameraCoordinate.w;
3348  lightDirection = lightPosition - cameraCoordinate.xyz;
3349  eyeDirection   = eyePosition - cameraCoordinate.xyz;
3350  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);
3351}
3352`]),o=n([`precision highp float;
3353#define GLSLIFY 1
3354
3355float beckmannDistribution(float x, float roughness) {
3356  float NdotH = max(x, 0.0001);
3357  float cos2Alpha = NdotH * NdotH;
3358  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
3359  float roughness2 = roughness * roughness;
3360  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
3361  return exp(tan2Alpha / roughness2) / denom;
3362}
3363
3364float beckmannSpecular(
3365  vec3 lightDirection,
3366  vec3 viewDirection,
3367  vec3 surfaceNormal,
3368  float roughness) {
3369  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);
3370}
3371
3372bool outOfRange(float a, float b, float p) {
3373  return ((p > max(a, b)) || 
3374          (p < min(a, b)));
3375}
3376
3377bool outOfRange(vec2 a, vec2 b, vec2 p) {
3378  return (outOfRange(a.x, b.x, p.x) ||
3379          outOfRange(a.y, b.y, p.y));
3380}
3381
3382bool outOfRange(vec3 a, vec3 b, vec3 p) {
3383  return (outOfRange(a.x, b.x, p.x) ||
3384          outOfRange(a.y, b.y, p.y) ||
3385          outOfRange(a.z, b.z, p.z));
3386}
3387
3388bool outOfRange(vec4 a, vec4 b, vec4 p) {
3389  return outOfRange(a.xyz, b.xyz, p.xyz);
3390}
3391
3392uniform vec3 lowerBound, upperBound;
3393uniform float contourTint;
3394uniform vec4 contourColor;
3395uniform sampler2D colormap;
3396uniform vec3 clipBounds[2];
3397uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
3398uniform float vertexColor;
3399
3400varying float value, kill;
3401varying vec3 worldCoordinate;
3402varying vec3 lightDirection, eyeDirection, surfaceNormal;
3403varying vec4 vColor;
3404
3405void main() {
3406  if (
3407    kill > 0.0 ||
3408    vColor.a == 0.0 ||
3409    outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)
3410  ) discard;
3411
3412  vec3 N = normalize(surfaceNormal);
3413  vec3 V = normalize(eyeDirection);
3414  vec3 L = normalize(lightDirection);
3415
3416  if(gl_FrontFacing) {
3417    N = -N;
3418  }
3419
3420  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);
3421  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
3422
3423  //decide how to interpolate color — in vertex or in fragment
3424  vec4 surfaceColor =
3425    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +
3426    step(.5, vertexColor) * vColor;
3427
3428  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);
3429
3430  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;
3431}
3432`]),r=n([`precision highp float;
3433#define GLSLIFY 1
3434
3435attribute vec4 uv;
3436attribute float f;
3437
3438uniform vec3 objectOffset;
3439uniform mat3 permutation;
3440uniform mat4 model, view, projection;
3441uniform float height, zOffset;
3442uniform sampler2D colormap;
3443
3444varying float value, kill;
3445varying vec3 worldCoordinate;
3446varying vec2 planeCoordinate;
3447varying vec3 lightDirection, eyeDirection, surfaceNormal;
3448varying vec4 vColor;
3449
3450void main() {
3451  vec3 dataCoordinate = permutation * vec3(uv.xy, height);
3452  worldCoordinate = objectOffset + dataCoordinate;
3453  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);
3454
3455  vec4 clipPosition = projection * view * worldPosition;
3456  clipPosition.z += zOffset;
3457
3458  gl_Position = clipPosition;
3459  value = f + objectOffset.z;
3460  kill = -1.0;
3461  planeCoordinate = uv.zw;
3462
3463  vColor = texture2D(colormap, vec2(value, value));
3464
3465  //Don't do lighting for contours
3466  surfaceNormal   = vec3(1,0,0);
3467  eyeDirection    = vec3(0,1,0);
3468  lightDirection  = vec3(0,0,1);
3469}
3470`]),d=n([`precision highp float;
3471#define GLSLIFY 1
3472
3473bool outOfRange(float a, float b, float p) {
3474  return ((p > max(a, b)) || 
3475          (p < min(a, b)));
3476}
3477
3478bool outOfRange(vec2 a, vec2 b, vec2 p) {
3479  return (outOfRange(a.x, b.x, p.x) ||
3480          outOfRange(a.y, b.y, p.y));
3481}
3482
3483bool outOfRange(vec3 a, vec3 b, vec3 p) {
3484  return (outOfRange(a.x, b.x, p.x) ||
3485          outOfRange(a.y, b.y, p.y) ||
3486          outOfRange(a.z, b.z, p.z));
3487}
3488
3489bool outOfRange(vec4 a, vec4 b, vec4 p) {
3490  return outOfRange(a.xyz, b.xyz, p.xyz);
3491}
3492
3493uniform vec2 shape;
3494uniform vec3 clipBounds[2];
3495uniform float pickId;
3496
3497varying float value, kill;
3498varying vec3 worldCoordinate;
3499varying vec2 planeCoordinate;
3500varying vec3 surfaceNormal;
3501
3502vec2 splitFloat(float v) {
3503  float vh = 255.0 * v;
3504  float upper = floor(vh);
3505  float lower = fract(vh);
3506  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);
3507}
3508
3509void main() {
3510  if ((kill > 0.0) ||
3511      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;
3512
3513  vec2 ux = splitFloat(planeCoordinate.x / shape.x);
3514  vec2 uy = splitFloat(planeCoordinate.y / shape.y);
3515  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));
3516}
3517`]);v.createShader=function(c){var i=e(c,t,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return i.attributes.uv.location=0,i.attributes.f.location=1,i.attributes.normal.location=2,i},v.createPickShader=function(c){var i=e(c,t,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return i.attributes.uv.location=0,i.attributes.f.location=1,i.attributes.normal.location=2,i},v.createContourShader=function(c){var i=e(c,r,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return i.attributes.uv.location=0,i.attributes.f.location=1,i},v.createPickContourShader=function(c){var i=e(c,r,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return i.attributes.uv.location=0,i.attributes.f.location=1,i}},{"gl-shader":132,glslify:231}],145:[function(m,b,v){b.exports=function(N){var U=N.gl,Q=l(U),j=_(U),X=w(U),J=T(U),re=n(U),ne=t(U,[{buffer:re,size:4,stride:40,offset:0},{buffer:re,size:3,stride:40,offset:16},{buffer:re,size:3,stride:40,offset:28}]),se=n(U),oe=t(U,[{buffer:se,size:4,stride:20,offset:0},{buffer:se,size:1,stride:20,offset:16}]),pe=n(U),ce=t(U,[{buffer:pe,size:2,type:U.FLOAT}]),de=o(U,1,256,U.RGBA,U.UNSIGNED_BYTE);de.minFilter=U.LINEAR,de.magFilter=U.LINEAR;var xe=new P(U,[0,0],[[0,0,0],[0,0,0]],Q,j,re,ne,de,X,J,se,oe,pe,ce,[0,0,0]),we={levels:[[],[],[]]};for(var be in N)we[be]=N[be];return we.colormap=we.colormap||"jet",xe.update(we),xe};var e=m("bit-twiddle"),n=m("gl-buffer"),t=m("gl-vao"),o=m("gl-texture2d"),r=m("typedarray-pool"),d=m("colormap"),c=m("ndarray-ops"),i=m("ndarray-pack"),u=m("ndarray"),f=m("surface-nets"),s=m("gl-mat4/multiply"),h=m("gl-mat4/invert"),p=m("binary-search-bou
3517nds"),a=m("ndarray-gradient"),x=m("./lib/shaders"),l=x.createShader,w=x.createContourShader,_=x.createPickShader,T=x.createPickContourShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],L=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function I(N,U,Q,j,X){this.position=N,this.index=U,this.uv=Q,this.level=j,this.dataCoordinate=X}(function(){for(var N=0;N<3;++N){var U=A[N],Q=(N+2)%3;U[(N+1)%3+0]=1,U[Q+3]=1,U[N+6]=1}})();function P(N,U,Q,j,X,J,re,ne,se,oe,pe,ce,de,xe,we){this.gl=N,this.shape=U,this.bounds=Q,this.objectOffset=we,this.intensityBounds=[],this._shader=j,this._pickShader=X,this._coordinateBuffer=J,this._vao=re,this._colorMap=ne,this._contourShader=se,this._contourPickShader=oe,this._contourBuffer=pe,this._contourVAO=ce,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new I([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=de,this._dynamicVAO=xe,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[u(r.mallocFloat(1024),[0,0]),u(r.mallocFloat(1024),[0,0]),u(r.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var S=P.prototype;S.genColormap=function(N,U){var Q=!1,j=i([d({colormap:N,nshades:256,format:"rgba"}).map(function(X,J){var re=U?function(ne,se){if(!se||!se.length)return 1;for(var oe=0;oe<se.length;++oe){if(se.length<2)return 1;if(se[oe][0]===ne)return se[oe][1];if(se[oe][0]>ne&&oe>0){var pe=(se[oe][0]-ne)/(se[oe][0]-se[oe-1][0]);return se[oe][1]*(1-pe)+pe*se[oe-1][1]}}return 1}(J/255,U):X[3];return re<1&&(Q=!0),[X[0],X[1],X[2],255*re]})]);return c.divseq(j,255),this.hasAlphaScale=Q,j},S.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},S.isOpaque=function(){return!this.isTransparent()},S.pickSlots=1,S.setPickBase=function(N){this.pickId=N};var E=[0,0,0],D={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function F(N,U){var Q,j,X,J=U.axes&&U.axes.lastCubeProps.axis||E,re=U.showSurface,ne=U.showContour;for(Q=0;Q<3;++Q)for(re=re||U.surfaceProject[Q],j=0;j<3;++j)ne=ne||U.contourProject[Q][j];for(Q=0;Q<3;++Q){var se=D.projections[Q];for(j=0;j<16;++j)se[j]=0;for(j=0;j<4;++j)se[5*j]=1;se[5*Q]=0,se[12+Q]=U.axesBounds[+(J[Q]>0)][Q],s(se,N.model,se);var oe=D.clipBounds[Q];for(X=0;X<2;++X)for(j=0;j<3;++j)oe[X][j]=N.clipBounds[X][j];oe[0][Q]=-1e8,oe[1][Q]=1e8}return D.showSurface=re,D.showContour=ne,D}var H={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},V=k.slice(),Z=[1,0,0,0,1,0,0,0,1];function K(N,U){N=N||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var j=H;j.model=N.model||k,j.view=N.view||k,j.projection=N.projection||k,j.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],j.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],j.objectOffset=this.objectOffset,j.contourColor=this.contourColor[0],j.inverseModel=h(j.inverseModel,j.model);for(var X=0;X<2;++X)for(var J=j.clipBounds[X],re=0;re<3;++re)J[re]=Math.min(Math.max(this.clipBounds[X][re],-1e8),1e8);j.kambient=this.ambientLight,j.kdiffuse=this.diffuseLight,j.kspecular=this.specularLight,j.roughness=this.roughness,j.fresnel=this.fresnel,j.opacity=this.opacity,j.height=0,j.permutation=Z,j.vertexColor=this.vertexColor;var ne=V;for(s(ne,j.view,j.model),s(ne,j.projection,ne),h(ne,ne),X=0;X<3;++X)j.eyePosition[X]=ne[12+X]/ne[15];var se=ne[15];for(X=0;X<3;++X)se+=this.lightPosition[X]*ne[4*X+3];for(X=0;X<3;++X){var oe=ne[12+X];for(re=0;re<3;++re)oe+=ne[4*re+X]*this.lightPosition[re];j.lightPosition[X]=oe/se}var pe=F(j,this);if(pe.showSurface){for(this._shader.bind(),this._shader.uniforms=j,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Q.TRIANGLES,this._vertexCount),X=0;X<3;++X)this.surfaceProject[X]&&this.vertexCount&&(this._shader.uniforms.model=pe.projections[X],this._shader.uniforms.clipBounds=pe.clipBounds[X],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(pe.showContour){var ce=this._contourShader;j.kambient=1,j.kdiffuse=0,j.kspecular=0,j.opacity=1,ce.bind(),ce.uniforms=j;var de=this._contourVAO;for(de.bind(),X=0;X<3;++X)for(ce.uniforms.permutation=A[X],Q.lineWidth(this.contourWidth[X]*this.pixelRatio),re=0;re<this.contourLevels[X].length;++re)re===this.highlightLevel[X]?(ce.uniforms.contourColor=this.highlightColor[X],ce.uniforms.contourTint=this.highlightTint[X]):re!==0&&re-1!==this.highlightLevel[X]||(ce.uniforms.contourColor=this.contourColor[X],ce.uniforms.contourTint=this.contourTint[X]),this._contourCounts[X][re]&&(ce.uniforms.height=this.contourLevels[X][re],de.draw(Q.LINES,this._contourCounts[X][re],this._contourOffsets[X][re]));for(X=0;X<3;++X)for(ce.uniforms.model=pe.projections[X],ce.uniforms.clipBounds=pe.clipBounds[X],re=0;re<3;++re)if(this.contourProject[X][re]){ce.uniforms.permutation=A[re],Q.lineWidth(this.contourWidth[re]*this.pixelRatio);for(var xe=0;xe<this.contourLevels[re].length;++xe)xe===this.highlightLevel[re]?(ce.uniforms.contourColor=this.highlightColor[re],ce.uniforms.contourTint=this.highlightTint[re]):xe!==0&&xe-1!==this.highlightLevel[re]||(ce.uniforms.contourColor=this.contourColor[re],ce.uniforms.contourTint=this.contourTint[re]),this._contourCounts[re][xe]&&(ce.uniforms.height=this.contourLevels[re][xe],de.draw(Q.LINES,this._contourCounts[re][xe],this._contourOffsets[re][xe]))}for(de.unbind(),(de=this._dynamicVAO).bind(),X=0;X<3;++X)if(this._dynamicCounts[X]!==0)for(ce.uniforms.model=j.model,ce.uniforms.clipBounds=j.clipBounds,ce.uniforms.permutation=A[X],Q.lineWidth(this.dynamicWidth[X]*this.pixelRatio),ce.uniforms.contourColor=this.dynamicColor[X],ce.uniforms.contourTint=this.dynamicTint[X],ce.uniforms.height=this.dynamicLevel[X],de.draw(Q.LINES,this._dynamicCounts[X],this._dynamicOffsets[X]),re=0;re<3;++re)this.contourProject[re][X]&&(ce.uniforms.model=pe.projections[re],ce.uniforms.clipBounds=pe.clipBounds[re],de.draw(Q.LINES,this._dynamicCounts[X],this._dynamicOffsets[X]));de.unbind()}}S.draw=function(N){return K.call(this,N,!1)},S.drawTransparent=function(N){return K.call(this,N,!0)};var q={model:k,view:k,projection:k,inverseModel:k,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function W(N,U){return Array.isArray(N)?[U(N[0]),U(N[1]),U(N[2])]:[U(N),U(N),U(N)]}function $(N){return Array.isArray(N)?N.length===3?[N[0],N[1],N[2],1]:[N[0],N[1],N[2],N[3]]:[0,0,0,1]}function R(N){if(Array.isArray(N)){if(Array.isArray(N))return[$(N[0]),$(N[1]),$(N[2])];var U=$(N);return[U.slice(),U.slice(),U.slice()]}}S.drawPick=function(N){N=N||{};var U=this.gl;U.disable(U.CULL_FACE);var Q=q;Q.model=N.model||k,Q.view=N.view||k,Q.projection=N.projection||k,Q.shape=this._field[2].shape,Q.pickId=this.pickId/255,Q.lowerBound=this.bounds[0],Q.upperBound=this.bounds[1],Q.objectOffset=this.objectOffset,Q.permutation=Z;for(var j=0;j<2;++j)for(var X=Q.clipBounds[j],J=0;J<3;++J)X[J]=Math.min(Math.max(this.clipBounds[j][J],-1e8),1e8);var re=F(Q,this);if(re.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=Q,this._vao.bind(),this._vao.draw(U.TRIANGLES,this._vertexCount),j=0;j<3;++j)this.surfaceProject[j]&&(this._pickShader.uniforms.model=re.projections[j],this._pickShader.uniforms.clipBounds=re.clipBounds[j],this._vao.draw(U.TRIANGLES,this._vertexCount));this._vao.unbind()}if(re.showContour){var ne=this._contourPickShader;ne.bind(),ne.uniforms=Q;var se=this._contourVAO;for(se.bind(),J=0;J<3;++J)for(U.lineWidth(this.contourWidth[J]*this.pixelRatio),ne.uniforms.permutation=A[J],j=0;j<this.contourLevels[J].length;++j)this._contourCounts[J][j]&&(ne.uniforms.height=this.contourLevels[J][j],se.draw(U.LINES,this._contourCounts[J][j],this._contourOffsets[J][j]));for(j=0;j<3;++j)for(ne.uniforms.model=re.projections[j],ne.uniforms.clipBounds=re.clipBounds[j],J=0;J<3;++J)if(this.contourProject[j][J]){ne.uniforms.permutation=A[J],U.lineWidth(this.contourWidth[J]*this.pixelRatio);for(var oe=0;oe<this.contourLevels[J].length;++oe)this._contourCounts[J][oe]&&(ne.uniforms.height=this.contourLevels[J][oe],se.draw(U.LINES,this._contourCounts[J][oe],this._contourOffsets[J][oe]))}se.unbind()}},S.pick=function(N){if(!N||N.id!==this.pickId)return null;var U=this._field[2].shape,Q=this._pickResult,j=U[0]*(N.value[0]+(N.value[2]>>4)/16)/255,X=Math.floor(j),J=j-X,re=U[1]*(N.value[1]+(15&N.value[2])/16)/255,ne=Math.floor(re),se=re-ne;X+=1,ne+=1;var oe=Q.position;oe[0]=oe[1]=oe[2]=0;for(var pe=0;pe<2;++pe)for(var ce=pe?J:1-J,de=0;de<2;++de)for(var xe=X+pe,we=ne+de,be=ce*(de?se:1-se),Ee=0;Ee<3;++Ee)oe[Ee]+=this._field[Ee].get(xe,we)*be;for(var fe=this._pickResult.level,me=0;me<3;++me)if(fe[me]=p.le(this.contourLevels[me],oe[me]),fe[me]<0)this.contourLevels[me].length>0&&(fe[me]=0);else if(fe[me]<this.contourLevels[me].length-1){var Te=this.contourLevels[me][fe[me]],_e=this.contourLevels[me][fe[me]+1];Math.abs(Te-oe[me])>Math.abs(_e-oe[me])&&(fe[me]+=1)}for(Q.index[0]=J<.5?X:X+1,Q.index[1]=se<.5?ne:ne+1,Q.uv[0]=j/U[0],Q.uv[1]=re/U[1],Ee=0;Ee<3;++Ee)Q.dataCoordinate[Ee]=this._field[Ee].get(Q.index[0],Q.index[1]);return Q},S.padField=function(N,U){var Q=U.shape.slice(),j=N.shape.slice();
vendor: 8,454 bytes, line 3517
3517c.assign(N.lo(1,1).hi(Q[0],Q[1]),U),c.assign(N.lo(1).hi(Q[0],1),U.hi(Q[0],1)),c.assign(N.lo(1,j[1]-1).hi(Q[0],1),U.lo(0,Q[1]-1).hi(Q[0],1)),c.assign(N.lo(0,1).hi(1,Q[1]),U.hi(1)),c.assign(N.lo(j[0]-1,1).hi(1,Q[1]),U.lo(Q[0]-1)),N.set(0,0,U.get(0,0)),N.set(0,j[1]-1,U.get(0,Q[1]-1)),N.set(j[0]-1,0,U.get(Q[0]-1,0)),N.set(j[0]-1,j[1]-1,U.get(Q[0]-1,Q[1]-1))},S.update=function(N){N=N||{},this.objectOffset=N.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in N&&(this.contourWidth=W(N.contourWidth,Number)),"showContour"in N&&(this.showContour=W(N.showContour,Boolean)),"showSurface"in N&&(this.showSurface=!!N.showSurface),"contourTint"in N&&(this.contourTint=W(N.contourTint,Boolean)),"contourColor"in N&&(this.contourColor=R(N.contourColor)),"contourProject"in N&&(this.contourProject=W(N.contourProject,function(Ut){return W(Ut,Boolean)})),"surfaceProject"in N&&(this.surfaceProject=N.surfaceProject),"dynamicColor"in N&&(this.dynamicColor=R(N.dynamicColor)),"dynamicTint"in N&&(this.dynamicTint=W(N.dynamicTint,Number)),"dynamicWidth"in N&&(this.dynamicWidth=W(N.dynamicWidth,Number)),"opacity"in N&&(this.opacity=N.opacity),"opacityscale"in N&&(this.opacityscale=N.opacityscale),"colorBounds"in N&&(this.colorBounds=N.colorBounds),"vertexColor"in N&&(this.vertexColor=N.vertexColor?1:0),"colormap"in N&&this._colorMap.setPixels(this.genColormap(N.colormap,this.opacityscale));var U=N.field||N.coords&&N.coords[2]||null,Q=!1;if(U||(U=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in N||"coords"in N){var j=(U.shape[0]+2)*(U.shape[1]+2);j>this._field[2].data.length&&(r.freeFloat(this._field[2].data),this._field[2].data=r.mallocFloat(e.nextPow2(j))),this._field[2]=u(this._field[2].data,[U.shape[0]+2,U.shape[1]+2]),this.padField(this._field[2],U),this.shape=U.shape.slice();for(var X=this.shape,J=0;J<2;++J)this._field[2].size>this._field[J].data.length&&(r.freeFloat(this._field[J].data),this._field[J].data=r.mallocFloat(this._field[2].size)),this._field[J]=u(this._field[J].data,[X[0]+2,X[1]+2]);if(N.coords){var re=N.coords;if(!Array.isArray(re)||re.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(J=0;J<2;++J){var ne=re[J];for(de=0;de<2;++de)if(ne.shape[de]!==X[de])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[J],ne)}}else if(N.ticks){var se=N.ticks;if(!Array.isArray(se)||se.length!==2)throw new Error("gl-surface: invalid ticks");for(J=0;J<2;++J){var oe=se[J];if((Array.isArray(oe)||oe.length)&&(oe=u(oe)),oe.shape[0]!==X[J])throw new Error("gl-surface: invalid tick length");var pe=u(oe.data,X);pe.stride[J]=oe.stride[0],pe.stride[1^J]=0,this.padField(this._field[J],pe)}}else{for(J=0;J<2;++J){var ce=[0,0];ce[J]=1,this._field[J]=u(this._field[J].data,[X[0]+2,X[1]+2],ce,0)}this._field[0].set(0,0,0);for(var de=0;de<X[0];++de)this._field[0].set(de+1,0,de);for(this._field[0].set(X[0]+1,0,X[0]-1),this._field[1].set(0,0,0),de=0;de<X[1];++de)this._field[1].set(0,de+1,de);this._field[1].set(0,X[1]+1,X[1]-1)}var xe=this._field,we=u(r.mallocFloat(3*xe[2].size*2),[3,X[0]+2,X[1]+2,2]);for(J=0;J<3;++J)a(we.pick(J),xe[J],"mirror");var be=u(r.mallocFloat(3*xe[2].size),[X[0]+2,X[1]+2,3]);for(J=0;J<X[0]+2;++J)for(de=0;de<X[1]+2;++de){var Ee=we.get(0,J,de,0),fe=we.get(0,J,de,1),me=we.get(1,J,de,0),Te=we.get(1,J,de,1),_e=we.get(2,J,de,0),Ae=we.get(2,J,de,1),Pe=me*Ae-Te*_e,De=_e*fe-Ae*Ee,Ve=Ee*Te-fe*me,Qe=Math.sqrt(Pe*Pe+De*De+Ve*Ve);Qe<1e-8?(Qe=Math.max(Math.abs(Pe),Math.abs(De),Math.abs(Ve)))<1e-8?(Ve=1,De=Pe=0,Qe=1):Qe=1/Qe:Qe=1/Math.sqrt(Qe),be.set(J,de,0,Pe*Qe),be.set(J,de,1,De*Qe),be.set(J,de,2,Ve*Qe)}r.free(we.data);var Oe=[1/0,1/0,1/0],Ue=[-1/0,-1/0,-1/0],Ge=1/0,Ye=-1/0,tt=(X[0]-1)*(X[1]-1)*6,lt=r.mallocFloat(e.nextPow2(10*tt)),vt=0,It=0;for(J=0;J<X[0]-1;++J)e:for(de=0;de<X[1]-1;++de){for(var St=0;St<2;++St)for(var rt=0;rt<2;++rt)for(var et=0;et<3;++et){var Tt=this._field[et].get(1+J+St,1+de+rt);if(isNaN(Tt)||!isFinite(Tt))continue e}for(et=0;et<6;++et){var Vt=J+L[et][0],Kt=de+L[et][1],Be=this._field[0].get(Vt+1,Kt+1),qe=this._field[1].get(Vt+1,Kt+1);Tt=this._field[2].get(Vt+1,Kt+1),Pe=be.get(Vt+1,Kt+1,0),De=be.get(Vt+1,Kt+1,1),Ve=be.get(Vt+1,Kt+1,2),N.intensity&&(Re=N.intensity.get(Vt,Kt));var Re=N.intensity?N.intensity.get(Vt,Kt):Tt+this.objectOffset[2];lt[vt++]=Vt,lt[vt++]=Kt,lt[vt++]=Be,lt[vt++]=qe,lt[vt++]=Tt,lt[vt++]=0,lt[vt++]=Re,lt[vt++]=Pe,lt[vt++]=De,lt[vt++]=Ve,Oe[0]=Math.min(Oe[0],Be+this.objectOffset[0]),Oe[1]=Math.min(Oe[1],qe+this.objectOffset[1]),Oe[2]=Math.min(Oe[2],Tt+this.objectOffset[2]),Ge=Math.min(Ge,Re),Ue[0]=Math.max(Ue[0],Be+this.objectOffset[0]),Ue[1]=Math.max(Ue[1],qe+this.objectOffset[1]),Ue[2]=Math.max(Ue[2],Tt+this.objectOffset[2]),Ye=Math.max(Ye,Re),It+=1}}for(N.intensityBounds&&(Ge=+N.intensityBounds[0],Ye=+N.intensityBounds[1]),J=6;J<vt;J+=10)lt[J]=(lt[J]-Ge)/(Ye-Ge);this._vertexCount=It,this._coordinateBuffer.update(lt.subarray(0,vt)),r.freeFloat(lt),r.free(be.data),this.bounds=[Oe,Ue],this.intensity=N.intensity||this._field[2],this.intensityBounds[0]===Ge&&this.intensityBounds[1]===Ye||(Q=!0),this.intensityBounds=[Ge,Ye]}if("levels"in N){var Xe=N.levels;for(Xe=Array.isArray(Xe[0])?Xe.slice():[[],[],Xe],J=0;J<3;++J)Xe[J]=Xe[J].slice(),Xe[J].sort(function(Ut,Xt){return Ut-Xt});for(J=0;J<3;++J)for(de=0;de<Xe[J].length;++de)Xe[J][de]-=this.objectOffset[J];e:for(J=0;J<3;++J){if(Xe[J].length!==this.contourLevels[J].length){Q=!0;break}for(de=0;de<Xe[J].length;++de)if(Xe[J][de]!==this.contourLevels[J][de]){Q=!0;break e}}this.contourLevels=Xe}if(Q){xe=this._field,X=this.shape;for(var ke=[],Le=0;Le<3;++Le){var Ie=this.contourLevels[Le],Ce=[],Je=[],it=[0,0,0];for(J=0;J<Ie.length;++J){var ht=f(this._field[Le],Ie[J]);Ce.push(ke.length/5|0),It=0;e:for(de=0;de<ht.cells.length;++de){var ut=ht.cells[de];for(et=0;et<2;++et){var kt=ht.positions[ut[et]],ot=kt[0],Lt=0|Math.floor(ot),Et=ot-Lt,Ze=kt[1],pt=0|Math.floor(Ze),Ct=Ze-pt,zt=!1;t:for(var Gt=0;Gt<3;++Gt){it[Gt]=0;var ze=(Le+Gt+1)%3;for(St=0;St<2;++St){var st=St?Et:1-Et;for(Vt=0|Math.min(Math.max(Lt+St,0),X[0]),rt=0;rt<2;++rt){var yt=rt?Ct:1-Ct;if(Kt=0|Math.min(Math.max(pt+rt,0),X[1]),Tt=Gt<2?this._field[ze].get(Vt,Kt):(this.intensity.get(Vt,Kt)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Tt)||isNaN(Tt)){zt=!0;break t}var Dt=st*yt;it[Gt]+=Dt*Tt}}}if(zt){if(et>0){for(var jt=0;jt<5;++jt)ke.pop();It-=1}continue e}ke.push(it[0],it[1],kt[0],kt[1],it[2]),It+=1}}Je.push(It)}this._contourOffsets[Le]=Ce,this._contourCounts[Le]=Je}var or=r.mallocFloat(ke.length);for(J=0;J<ke.length;++J)or[J]=ke[J];this._contourBuffer.update(or),r.freeFloat(or)}},S.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var N=0;N<3;++N)r.freeFloat(this._field[N].data)},S.highlight=function(N){var U,Q;if(!N)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(U=0;U<3;++U)this.enableHighlight[U]?this.highlightLevel[U]=N.level[U]:this.highlightLevel[U]=-1;for(Q=this.snapToData?N.dataCoordinate:N.position,U=0;U<3;++U)Q[U]-=this.objectOffset[U];if(this.enableDynamic[0]&&Q[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&Q[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&Q[2]!==this.dynamicLevel[2]){for(var j=0,X=this.shape,J=r.mallocFloat(12*X[0]*X[1]),re=0;re<3;++re)if(this.enableDynamic[re]){this.dynamicLevel[re]=Q[re];var ne=(re+1)%3,se=(re+2)%3,oe=this._field[re],pe=this._field[ne],ce=this._field[se],de=f(oe,Q[re]),xe=de.cells,we=de.positions;for(this._dynamicOffsets[re]=j,U=0;U<xe.length;++U)for(var be=xe[U],Ee=0;Ee<2;++Ee){var fe=we[be[Ee]],me=+fe[0],Te=0|me,_e=0|Math.min(Te+1,X[0]),Ae=me-Te,Pe=1-Ae,De=+fe[1],Ve=0|De,Qe=0|Math.min(Ve+1,X[1]),Oe=De-Ve,Ue=1-Oe,Ge=Pe*Ue,Ye=Pe*Oe,tt=Ae*Ue,lt=Ae*Oe,vt=Ge*pe.get(Te,Ve)+Ye*pe.get(Te,Qe)+tt*pe.get(_e,Ve)+lt*pe.get(_e,Qe),It=Ge*ce.get(Te,Ve)+Ye*ce.get(Te,Qe)+tt*ce.get(_e,Ve)+lt*ce.get(_e,Qe);if(isNaN(vt)||isNaN(It)){Ee&&(j-=1);break}J[2*j+0]=vt,J[2*j+1]=It,j+=1}this._dynamicCounts[re]=j-this._dynamicOffsets[re]}else this.dynamicLevel[re]=NaN,this._dynamicCounts[re]=0;this._dynamicBuffer.update(J.subarray(0,2*j)),r.freeFloat(J)}}}
3517,{"./lib/shaders":144,"binary-search-bounds":31,"bit-twiddle":32,colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-texture2d":146,"gl-vao":150,ndarray:259,"ndarray-gradient":252,"ndarray-ops":254,"ndarray-pack":255,"surface-nets":302,"typedarray-pool":308}],146:[function(m,b,v){var e=m("ndarray"),n=m("ndarray-ops"),t=m("typedarray-pool");b.exports=function(_){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||c(_),typeof arguments[1]=="number")return x(_,arguments[1],arguments[2],arguments[3]||_.RGBA,arguments[4]||_.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(_,0|arguments[1][0],0|arguments[1][1],arguments[2]||_.RGBA,arguments[3]||_.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var T=arguments[1],k=i(T)?T:T.raw;if(k)return l(_,k,0|T.width,0|T.height,arguments[2]||_.RGBA,arguments[3]||_.UNSIGNED_BYTE);if(T.shape&&T.data&&T.stride)return w(_,T)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,r=null,d=null;function c(_){o=[_.LINEAR,_.NEAREST_MIPMAP_LINEAR,_.LINEAR_MIPMAP_NEAREST,_.LINEAR_MIPMAP_NEAREST],r=[_.NEAREST,_.LINEAR,_.NEAREST_MIPMAP_NEAREST,_.NEAREST_MIPMAP_LINEAR,_.LINEAR_MIPMAP_NEAREST,_.LINEAR_MIPMAP_LINEAR],d=[_.REPEAT,_.CLAMP_TO_EDGE,_.MIRRORED_REPEAT]}function i(_){return typeof HTMLCanvasElement<"u"&&_ instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&_ instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&_ instanceof HTMLVideoElement||typeof ImageData<"u"&&_ instanceof ImageData}var u=function(_,T){n.muls(_,T,255)};function f(_,T,k){var L=_.gl,A=L.getParameter(L.MAX_TEXTURE_SIZE);if(T<0||T>A||k<0||k>A)throw new Error("gl-texture2d: Invalid texture size");return _._shape=[T,k],_.bind(),L.texImage2D(L.TEXTURE_2D,0,_.format,T,k,0,_.format,_.type,null),_._mipLevels=[0],_}function s(_,T,k,L,A,I){this.gl=_,this.handle=T,this.format=A,this.type=I,this._shape=[k,L],this._mipLevels=[0],this._magFilter=_.NEAREST,this._minFilter=_.NEAREST,this._wrapS=_.CLAMP_TO_EDGE,this._wrapT=_.CLAMP_TO_EDGE,this._anisoSamples=1;var P=this,S=[this._wrapS,this._wrapT];Object.defineProperties(S,[{get:function(){return P._wrapS},set:function(D){return P.wrapS=D}},{get:function(){return P._wrapT},set:function(D){return P.wrapT=D}}]),this._wrapVector=S;var E=[this._shape[0],this._shape[1]];Object.defineProperties(E,[{get:function(){return P._shape[0]},set:function(D){return P.width=D}},{get:function(){return P._shape[1]},set:function(D){return P.height=D}}]),this._shapeVector=E}var h=s.prototype;function p(_,T){return _.length===3?T[2]===1&&T[1]===_[0]*_[2]&&T[0]===_[2]:T[0]===1&&T[1]===_[0]}function a(_){var T=_.createTexture();return _.bindTexture(_.TEXTURE_2D,T),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_MIN_FILTER,_.NEAREST),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_MAG_FILTER,_.NEAREST),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_S,_.CLAMP_TO_EDGE),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_T,_.CLAMP_TO_EDGE),T}function x(_,T,k,L,A){var I=_.getParameter(_.MAX_TEXTURE_SIZE);if(T<0||T>I||k<0||k>I)throw new Error("gl-texture2d: Invalid texture shape");if(A===_.FLOAT&&!_.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var P=a(_);return _.texImage2D(_.TEXTURE_2D,0,L,T,k,0,L,A,null),new s(_,P,T,k,L,A)}function l(_,T,k,L,A,I){var P=a(_);return _.texImage2D(_.TEXTURE_2D,0,A,A,I,T),new s(_,P,k,L,A,I)}function w(_,T){var k=T.dtype,L=T.shape.slice(),A=_.getParameter(_.MAX_TEXTURE_SIZE);if(L[0]<0||L[0]>A||L[1]<0||L[1]>A)throw new Error("gl-texture2d: Invalid texture size");var I=p(L,T.stride.slice()),P=0;k==="float32"?P=_.FLOAT:k==="float64"?(P=_.FLOAT,I=!1,k="float32"):k==="uint8"?P=_.UNSIGNED_BYTE:(P=_.UNSIGNED_BYTE,I=!1,k="uint8");var S,E,D=0;if(L.length===2)D=_.LUMINANCE,L=[L[0],L[1],1],T=e(T.data,L,[T.stride[0],T.stride[1],1],T.offset);else{if(L.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(L[2]===1)D=_.ALPHA;else if(L[2]===2)D=_.LUMINANCE_ALPHA;else if(L[2]===3)D=_.RGB;else{if(L[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");D=_.RGBA}}P!==_.FLOAT||_.getExtension("OES_texture_float")||(P=_.UNSIGNED_BYTE,I=!1);var F=T.size;if(I)S=T.offset===0&&T.data.length===F?T.data:T.data.subarray(T.offset,T.offset+F);else{var H=[L[2],L[2]*L[0],1];E=t.malloc(F,k);var V=e(E,L,H,0);k!=="float32"&&k!=="float64"||P!==_.UNSIGNED_BYTE?n.assign(V,T):u(V,T),S=E.subarray(0,F)}var Z=a(_);return _.texImage2D(_.TEXTURE_2D,0,D,L[0],L[1],0,D,P,S),I||t.free(E),new s(_,Z,L[0],L[1],D,P)}Object.defineProperties(h,{minFilter:{get:function(){return this._minFilter},set:function(_){this.bind();var T=this.gl;
3517if(this.type===T.FLOAT&&o.indexOf(_)>=0&&(T.getExtension("OES_texture_float_linear")||(_=T.NEAREST)),r.indexOf(_)<0)throw new Error("gl-texture2d: Unknown filter mode "+_);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,_),this._minFilter=_}},magFilter:{get:function(){return this._magFilter},set:function(_){this.bind();var T=this.gl;if(this.type===T.FLOAT&&o.indexOf(_)>=0&&(T.getExtension("OES_texture_float_linear")||(_=T.NEAREST)),r.indexOf(_)<0)throw new Error("gl-texture2d: Unknown filter mode "+_);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,_),this._magFilter=_}},mipSamples:{get:function(){return this._anisoSamples},set:function(_){var T=this._anisoSamples;if(this._anisoSamples=0|Math.max(_,1),T!==this._anisoSamples){var k=this.gl.getExtension("EXT_texture_filter_anisotropic");k&&this.gl.texParameterf(this.gl.TEXTURE_2D,k.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(_){if(this.bind(),d.indexOf(_)<0)throw new Error("gl-texture2d: Unknown wrap mode "+_);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,_),this._wrapS=_}},wrapT:{get:function(){return this._wrapT},set:function(_){if(this.bind(),d.indexOf(_)<0)throw new Error("gl-texture2d: Unknown wrap mode "+_);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,_),this._wrapT=_}},wrap:{get:function(){return this._wrapVector},set:function(_){if(Array.isArray(_)||(_=[_,_]),_.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var T=0;T<2;++T)if(d.indexOf(_[T])<0)throw new Error("gl-texture2d: Unknown wrap mode "+_);this._wrapS=_[0],this._wrapT=_[1];var k=this.gl;return this.bind(),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,this._wrapS),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,this._wrapT),_}},shape:{get:function(){return this._shapeVector},set:function(_){if(Array.isArray(_)){if(_.length!==2)throw new Error("gl-texture2d: Invalid texture shape")}else _=[0|_,0|_];return f(this,0|_[0],0|_[1]),[0|_[0],0|_[1]]}},width:{get:function(){return this._shape[0]},set:function(_){return f(this,_|=0,this._shape[1]),_}},height:{get:function(){return this._shape[1]},set:function(_){return _|=0,f(this,this._shape[0],_),_}}}),h.bind=function(_){var T=this.gl;return _!==void 0&&T.activeTexture(T.TEXTURE0+(0|_)),T.bindTexture(T.TEXTURE_2D,this.handle),_!==void 0?0|_:T.getParameter(T.ACTIVE_TEXTURE)-T.TEXTURE0},h.dispose=function(){this.gl.deleteTexture(this.handle)},h.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var _=Math.min(this._shape[0],this._shape[1]),T=0;_>0;++T,_>>>=1)this._mipLevels.indexOf(T)<0&&this._mipLevels.push(T)},h.setPixels=function(_,T,k,L){var A=this.gl;this.bind(),Array.isArray(T)?(L=k,k=0|T[1],T=0|T[0]):(T=T||0,k=k||0),L=L||0;var I=i(_)?_:_.raw;if(I)this._mipLevels.indexOf(L)<0?(A.texImage2D(A.TEXTURE_2D,0,this.format,this.format,this.type,I),this._mipLevels.push(L)):A.texSubImage2D(A.TEXTURE_2D,L,T,k,this.format,this.type,I);else{if(!(_.shape&&_.stride&&_.data))throw new Error("gl-texture2d: Unsupported data type");if(_.shape.length<2||T+_.shape[1]>this._shape[1]>>>L||k+_.shape[0]>this._shape[0]>>>L||T<0||k<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");(function(P,S,E,D,F,H,V,Z){var K=Z.dtype,q=Z.shape.slice();if(q.length<2||q.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var W=0,$=0,R=p(q,Z.stride.slice());if(K==="float32"?W=P.FLOAT:K==="float64"?(W=P.FLOAT,R=!1,K="float32"):K==="uint8"?W=P.UNSIGNED_BYTE:(W=P.UNSIGNED_BYTE,R=!1,K="uint8"),q.length===2)$=P.LUMINANCE,q=[q[0],q[1],1],Z=e(Z.data,q,[Z.stride[0],Z.stride[1],1],Z.offset);else{if(q.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(q[2]===1)$=P.ALPHA;else if(q[2]===2)$=P.LUMINANCE_ALPHA;else if(q[2]===3)$=P.RGB;else{if(q[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");$=P.RGBA}q[2]}if($!==P.LUMINANCE&&$!==P.ALPHA||F!==P.LUMINANCE&&F!==P.ALPHA||($=F),$!==F)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var N=Z.size,U=V.indexOf(D)<0;
3517if(U&&V.push(D),W===H&&R)Z.offset===0&&Z.data.length===N?U?P.texImage2D(P.TEXTURE_2D,D,F,q[0],q[1],0,F,H,Z.data):P.texSubImage2D(P.TEXTURE_2D,D,S,E,q[0],q[1],F,H,Z.data):U?P.texImage2D(P.TEXTURE_2D,D,F,q[0],q[1],0,F,H,Z.data.subarray(Z.offset,Z.offset+N)):P.texSubImage2D(P.TEXTURE_2D,D,S,E,q[0],q[1],F,H,Z.data.subarray(Z.offset,Z.offset+N));else{var Q;Q=H===P.FLOAT?t.mallocFloat32(N):t.mallocUint8(N);var j=e(Q,q,[q[2],q[2]*q[0],1]);W===P.FLOAT&&H===P.UNSIGNED_BYTE?u(j,Z):n.assign(j,Z),U?P.texImage2D(P.TEXTURE_2D,D,F,q[0],q[1],0,F,H,Q.subarray(0,N)):P.texSubImage2D(P.TEXTURE_2D,D,S,E,q[0],q[1],F,H,Q.subarray(0,N)),H===P.FLOAT?t.freeFloat32(Q):t.freeUint8(Q)}})(A,T,k,L,this.format,this.type,this._mipLevels,_)}}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],147:[function(m,b,v){b.exports=function(e,n,t){n?n.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var o=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(t){if(t.length>o)throw new Error("gl-vao: Too many vertex attributes");for(var r=0;r<t.length;++r){var d=t[r];if(d.buffer){var c=d.buffer,i=d.size||4,u=d.type||e.FLOAT,f=!!d.normalized,s=d.stride||0,h=d.offset||0;c.bind(),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,i,u,f,s,h)}else{if(typeof d=="number")e.vertexAttrib1f(r,d);else if(d.length===1)e.vertexAttrib1f(r,d[0]);else if(d.length===2)e.vertexAttrib2f(r,d[0],d[1]);else if(d.length===3)e.vertexAttrib3f(r,d[0],d[1],d[2]);else{if(d.length!==4)throw new Error("gl-vao: Invalid vertex attribute");e.vertexAttrib4f(r,d[0],d[1],d[2],d[3])}e.disableVertexAttribArray(r)}}for(;r<o;++r)e.disableVertexAttribArray(r)}else for(e.bindBuffer(e.ARRAY_BUFFER,null),r=0;r<o;++r)e.disableVertexAttribArray(r)}},{}],148:[function(m,b,v){var e=m("./do-bind.js");function n(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}n.prototype.bind=function(){e(this.gl,this._elements,this._attributes)},n.prototype.update=function(t,o,r){this._elements=o,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},n.prototype.dispose=function(){},n.prototype.unbind=function(){},n.prototype.draw=function(t,o,r){r=r||0;var d=this.gl;this._elements?d.drawElements(t,o,this._elementsType,r):d.drawArrays(t,r,o)},b.exports=function(t){return new n(t)}},{"./do-bind.js":147}],149:[function(m,b,v){var e=m("./do-bind.js");function n(o,r,d,c,i,u){this.location=o,this.dimension=r,this.a=d,this.b=c,this.c=i,this.d=u}function t(o,r,d){this.gl=o,this._ext=r,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=o.UNSIGNED_SHORT}n.prototype.bind=function(o){switch(this.dimension){case 1:o.vertexAttrib1f(this.location,this.a);break;case 2:o.vertexAttrib2f(this.location,this.a,this.b);break;case 3:o.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:o.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},t.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var o=0;o<this._attribs.length;++o)this._attribs[o].bind(this.gl)},t.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},t.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},t.prototype.update=function(o,r,d){if(this.bind(),e(this.gl,r,o),this.unbind(),this._attribs.length=0,o)for(var c=0;c<o.length;++c){var i=o[c];typeof i=="number"?this._attribs.push(new n(c,1,i)):Array.isArray(i)&&this._attribs.push(new n(c,i.length,i[0],i[1],i[2],i[3]))}this._useElements=!!r,this._elementsType=d||this.gl.UNSIGNED_SHORT},t.prototype.draw=function(o,r,d){d=d||0;var c=this.gl;this._useElements?c.drawElements(o,r,this._elementsType,d):c.drawArrays(o,d,r)},b.exports=function(o,r){return new t(o,r,r.createVertexArrayOES())}},{"./do-bind.js":147}],150:[function(m,b,v){var e=m("./lib/vao-native.js"),n=m("./lib/vao-emulated.js");function t(o){this.bindVertexArrayOES=o.bindVertexArray.bind(o),this.createVertexArrayOES=o.createVertexArray.bind(o),this.deleteVertexArrayOES=o.deleteVertexArray.bind(o)}b.exports=function(o,r,d,c){var i,u=o.createVertexArray?new t(o):o.getExtension("OES_vertex_array_object");return(i=u?e(o,u):n(o)).update(r,d,c),i}},{"./lib/vao-emulated.js":148,"./lib/vao-native.js":149}],151:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]+t[0],e[1]=n[1]+t[1],e[2]=n[2]+t[2],e}},{}],152:[function(m,b,v){b.exports=function(o,r){var d=e(o[0],o[1],o[2]),c=e(r[0],r[1],r[2]);
3517n(d,d),n(c,c);var i=t(d,c);return i>1?0:Math.acos(i)};var e=m("./fromValues"),n=m("./normalize"),t=m("./dot")},{"./dot":162,"./fromValues":168,"./normalize":179}],153:[function(m,b,v){b.exports=function(e,n){return e[0]=Math.ceil(n[0]),e[1]=Math.ceil(n[1]),e[2]=Math.ceil(n[2]),e}},{}],154:[function(m,b,v){b.exports=function(e){var n=new Float32Array(3);return n[0]=e[0],n[1]=e[1],n[2]=e[2],n}},{}],155:[function(m,b,v){b.exports=function(e,n){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e}},{}],156:[function(m,b,v){b.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},{}],157:[function(m,b,v){b.exports=function(e,n,t){var o=n[0],r=n[1],d=n[2],c=t[0],i=t[1],u=t[2];return e[0]=r*u-d*i,e[1]=d*c-o*u,e[2]=o*i-r*c,e}},{}],158:[function(m,b,v){b.exports=m("./distance")},{"./distance":159}],159:[function(m,b,v){b.exports=function(e,n){var t=n[0]-e[0],o=n[1]-e[1],r=n[2]-e[2];return Math.sqrt(t*t+o*o+r*r)}},{}],160:[function(m,b,v){b.exports=m("./divide")},{"./divide":161}],161:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]/t[0],e[1]=n[1]/t[1],e[2]=n[2]/t[2],e}},{}],162:[function(m,b,v){b.exports=function(e,n){return e[0]*n[0]+e[1]*n[1]+e[2]*n[2]}},{}],163:[function(m,b,v){b.exports=1e-6},{}],164:[function(m,b,v){b.exports=function(n,t){var o=n[0],r=n[1],d=n[2],c=t[0],i=t[1],u=t[2];return Math.abs(o-c)<=e*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(r-i)<=e*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(d-u)<=e*Math.max(1,Math.abs(d),Math.abs(u))};var e=m("./epsilon")},{"./epsilon":163}],165:[function(m,b,v){b.exports=function(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}},{}],166:[function(m,b,v){b.exports=function(e,n){return e[0]=Math.floor(n[0]),e[1]=Math.floor(n[1]),e[2]=Math.floor(n[2]),e}},{}],167:[function(m,b,v){b.exports=function(n,t,o,r,d,c){var i,u;for(t||(t=3),o||(o=0),u=r?Math.min(r*t+o,n.length):n.length,i=o;i<u;i+=t)e[0]=n[i],e[1]=n[i+1],e[2]=n[i+2],d(e,e,c),n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2];return n};var e=m("./create")()},{"./create":156}],168:[function(m,b,v){b.exports=function(e,n,t){var o=new Float32Array(3);return o[0]=e,o[1]=n,o[2]=t,o}},{}],169:[function(m,b,v){b.exports={EPSILON:m("./epsilon"),create:m("./create"),clone:m("./clone"),angle:m("./angle"),fromValues:m("./fromValues"),copy:m("./copy"),set:m("./set"),equals:m("./equals"),exactEquals:m("./exactEquals"),add:m("./add"),subtract:m("./subtract"),sub:m("./sub"),multiply:m("./multiply"),mul:m("./mul"),divide:m("./divide"),div:m("./div"),min:m("./min"),max:m("./max"),floor:m("./floor"),ceil:m("./ceil"),round:m("./round"),scale:m("./scale"),scaleAndAdd:m("./scaleAndAdd"),distance:m("./distance"),dist:m("./dist"),squaredDistance:m("./squaredDistance"),sqrDist:m("./sqrDist"),length:m("./length"),len:m("./len"),squaredLength:m("./squaredLength"),sqrLen:m("./sqrLen"),negate:m("./negate"),inverse:m("./inverse"),normalize:m("./normalize"),dot:m("./dot"),cross:m("./cross"),lerp:m("./lerp"),random:m("./random"),transformMat4:m("./transformMat4"),transformMat3:m("./transformMat3"),transformQuat:m("./transformQuat"),rotateX:m("./rotateX"),rotateY:m("./rotateY"),rotateZ:m("./rotateZ"),forEach:m("./forEach")}},{"./add":151,"./angle":152,"./ceil":153,"./clone":154,"./copy":155,"./create":156,"./cross":157,"./dist":158,"./distance":159,"./div":160,"./divide":161,"./dot":162,"./epsilon":163,"./equals":164,"./exactEquals":165,"./floor":166,"./forEach":167,"./fromValues":168,"./inverse":170,"./len":171,"./length":172,"./lerp":173,"./max":174,"./min":175,"./mul":176,"./multiply":177,"./negate":178,"./normalize":179,"./random":180,"./rotateX":181,"./rotateY":182,"./rotateZ":183,"./round":184,"./scale":185,"./scaleAndAdd":186,"./set":187,"./sqrDist":188,"./sqrLen":189,"./squaredDistance":190,"./squaredLength":191,"./sub":192,"./subtract":193,"./transformMat3":194,"./transformMat4":195,"./transformQuat":196}],170:[function(m,b,v){b.exports=function(e,n){return e[0]=1/n[0],e[1]=1/n[1],e[2]=1/n[2],e}},{}],171:[function(m,b,v){b.exports=m("./length")},{"./length":172}],172:[function(m,b,v){b.exports=function(e){var n=e[0],t=e[1],o=e[2];return Math.sqrt(n*n+t*t+o*o)}},{}],173:[function(m,b,v){b.exports=function(e,n,t,o){var r=n[0],d=n[1],c=n[2];return e[0]=r+o*(t[0]-r),e[1]=d+o*(t[1]-d),e[2]=c+o*(t[2]-c),e}},{}],174:[function(m,b,v){b.exports=function(e,n,t){return e[0]=Math.max(n[0],t[0]),e[1]=Math.max(n[1],t[1]),e[2]=Math.max(n[2],t[2]),e}},{}],175:[function(m,b,v){b.exports=function(e,n,t){return e[0]=Math.min(n[0],t[0]),e[1]=Math.min(n[1],t[1]),e[2]=Math.min(n[2],t[2]),e}},{}],176:[function(m,b,v){b.exports=m("./multiply")},{"./multiply":177}],177:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]*t[0],e[1]=n[1]*t[1],e[2]=n[2]*t[2],e}},{}],178:[function(m,b,v){b.exports=function(e,n){return e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e}},{}],179:[function(m,b,v){b.exports=function(e,n){var t=n[0],o=n[1],r=n[2],d=t*t+o*o+r*r;return d>0&&(d=1/Math.sqrt(d),e[0]=n[0]*d,e[1]=n[1]*d,e[2]=n[2]*d),e}},{}
3517],180:[function(m,b,v){b.exports=function(e,n){n=n||1;var t=2*Math.random()*Math.PI,o=2*Math.random()-1,r=Math.sqrt(1-o*o)*n;return e[0]=Math.cos(t)*r,e[1]=Math.sin(t)*r,e[2]=o*n,e}},{}],181:[function(m,b,v){b.exports=function(e,n,t,o){var r=t[1],d=t[2],c=n[1]-r,i=n[2]-d,u=Math.sin(o),f=Math.cos(o);return e[0]=n[0],e[1]=r+c*f-i*u,e[2]=d+c*u+i*f,e}},{}],182:[function(m,b,v){b.exports=function(e,n,t,o){var r=t[0],d=t[2],c=n[0]-r,i=n[2]-d,u=Math.sin(o),f=Math.cos(o);return e[0]=r+i*u+c*f,e[1]=n[1],e[2]=d+i*f-c*u,e}},{}],183:[function(m,b,v){b.exports=function(e,n,t,o){var r=t[0],d=t[1],c=n[0]-r,i=n[1]-d,u=Math.sin(o),f=Math.cos(o);return e[0]=r+c*f-i*u,e[1]=d+c*u+i*f,e[2]=n[2],e}},{}],184:[function(m,b,v){b.exports=function(e,n){return e[0]=Math.round(n[0]),e[1]=Math.round(n[1]),e[2]=Math.round(n[2]),e}},{}],185:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]*t,e[1]=n[1]*t,e[2]=n[2]*t,e}},{}],186:[function(m,b,v){b.exports=function(e,n,t,o){return e[0]=n[0]+t[0]*o,e[1]=n[1]+t[1]*o,e[2]=n[2]+t[2]*o,e}},{}],187:[function(m,b,v){b.exports=function(e,n,t,o){return e[0]=n,e[1]=t,e[2]=o,e}},{}],188:[function(m,b,v){b.exports=m("./squaredDistance")},{"./squaredDistance":190}],189:[function(m,b,v){b.exports=m("./squaredLength")},{"./squaredLength":191}],190:[function(m,b,v){b.exports=function(e,n){var t=n[0]-e[0],o=n[1]-e[1],r=n[2]-e[2];return t*t+o*o+r*r}},{}],191:[function(m,b,v){b.exports=function(e){var n=e[0],t=e[1],o=e[2];return n*n+t*t+o*o}},{}],192:[function(m,b,v){b.exports=m("./subtract")},{"./subtract":193}],193:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]-t[0],e[1]=n[1]-t[1],e[2]=n[2]-t[2],e}},{}],194:[function(m,b,v){b.exports=function(e,n,t){var o=n[0],r=n[1],d=n[2];return e[0]=o*t[0]+r*t[3]+d*t[6],e[1]=o*t[1]+r*t[4]+d*t[7],e[2]=o*t[2]+r*t[5]+d*t[8],e}},{}],195:[function(m,b,v){b.exports=function(e,n,t){var o=n[0],r=n[1],d=n[2],c=t[3]*o+t[7]*r+t[11]*d+t[15];return c=c||1,e[0]=(t[0]*o+t[4]*r+t[8]*d+t[12])/c,e[1]=(t[1]*o+t[5]*r+t[9]*d+t[13])/c,e[2]=(t[2]*o+t[6]*r+t[10]*d+t[14])/c,e}},{}],196:[function(m,b,v){b.exports=function(e,n,t){var o=n[0],r=n[1],d=n[2],c=t[0],i=t[1],u=t[2],f=t[3],s=f*o+i*d-u*r,h=f*r+u*o-c*d,p=f*d+c*r-i*o,a=-c*o-i*r-u*d;return e[0]=s*f+a*-c+h*-u-p*-i,e[1]=h*f+a*-i+p*-c-s*-u,e[2]=p*f+a*-u+s*-i-h*-c,e}},{}],197:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]+t[0],e[1]=n[1]+t[1],e[2]=n[2]+t[2],e[3]=n[3]+t[3],e}},{}],198:[function(m,b,v){b.exports=function(e){var n=new Float32Array(4);return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n}},{}],199:[function(m,b,v){b.exports=function(e,n){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e}},{}],200:[function(m,b,v){b.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},{}],201:[function(m,b,v){b.exports=function(e,n){var t=n[0]-e[0],o=n[1]-e[1],r=n[2]-e[2],d=n[3]-e[3];return Math.sqrt(t*t+o*o+r*r+d*d)}},{}],202:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]/t[0],e[1]=n[1]/t[1],e[2]=n[2]/t[2],e[3]=n[3]/t[3],e}},{}],203:[function(m,b,v){b.exports=function(e,n){return e[0]*n[0]+e[1]*n[1]+e[2]*n[2]+e[3]*n[3]}},{}],204:[function(m,b,v){b.exports=function(e,n,t,o){var r=new Float32Array(4);return r[0]=e,r[1]=n,r[2]=t,r[3]=o,r}},{}],205:[function(m,b,v){b.exports={create:m("./create"),clone:m("./clone"),fromValues:m("./fromValues"),copy:m("./copy"),set:m("./set"),add:m("./add"),subtract:m("./subtract"),multiply:m("./multiply"),divide:m("./divide"),min:m("./min"),max:m("./max"),scale:m("./scale"),scaleAndAdd:m("./scaleAndAdd"),distance:m("./distance"),squaredDistance:m("./squaredDistance"),length:m("./length"),squaredLength:m("./squaredLength"),negate:m("./negate"),inverse:m("./inverse"),normalize:m("./normalize"),dot:m("./dot"),lerp:m("./lerp"),random:m("./random"),transformMat4:m("./transformMat4"),transformQuat:m("./transformQuat")}},{"./add":197,"./clone":198,"./copy":199,"./create":200,"./distance":201,"./divide":202,"./dot":203,"./fromValues":204,"./inverse":206,"./length":207,"./lerp":208,"./max":209,"./min":210,"./multiply":211,"./negate":212,"./normalize":213,"./random":214,"./scale":215,"./scaleAndAdd":216,"./set":217,"./squaredDistance":218,"./squaredLength":219,"./subtract":220,"./transformMat4":221,"./transformQuat":222}],206:[function(m,b,v){b.exports=function(e,n){return e[0]=1/n[0],e[1]=1/n[1],e[2]=1/n[2],e[3]=1/n[3],e}},{}],207:[function(m,b,v){b.exports=function(e){var n=e[0],t=e[1],o=e[2],r=e[3];return Math.sqrt(n*n+t*t+o*o+r*r)}},{}],208:[function(m,b,v){b.exports=function(e,n,t,o){var r=n[0],d=n[1],c=n[2],i=n[3];return e[0]=r+o*(t[0]-r),e[1]=d+o*(t[1]-d),e[2]=c+o*(t[2]-c),e[3]=i+o*(t[3]-i),e}},{}],209:[function(m,b,v){b.exports=function(e,n,t){return e[0]=Math.max(n[0],t[0]),e[1]=Math.max(n[1],t[1]),e[2]=Math.max(n[2],t[2]),e[3]=Math.max(n[3],t[3]),e}},{}],210:[function(m,b,v){b.exports=function(e,n,t){return e[0]=Math.min(n[0],t[0]),e[1]=Math.min(n[1],t[1]),e[2]=Math.min(n[2],t[2]),e[3]=Math.min(n[3],t[3]),e}},{}],211:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]*t[0],e[1]=n[1]*t[1],e[2]=n[2]*t[2],e[3]=n[3]*t[3],e}},{}],212:[function(m,b,v){b.exports=function(e,n){return e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e}},{}],213:[function(m,b,v){b.exports=function(e,n){var t=n[0],o=n[1],r=n[2],d=n[3],c=t*t+o*o+r*r+d*d;return c>0&&(c=1/Math.sqrt(c),e[0]=t*c,e[1]=o*c,e[2]=r*c,e[3]=d*c),e}},{}],214:[function(m,b,v){var e=m("./normalize"),n=m("./scale");b.exports=function(t,o){return o=o||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),e(t,t),n(t,t,o),t}},{"./normalize":213,"./scale":215}],215:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]*t,e[1]=n[1]*t,e[2]=n[2]*t,e[3]=n[3]*t,e}},{}],216:[function(m,b,v){b.exports=function(e,n,t,o){return e[0]=n[0]+t[0]*o,e[1]=n[1]+t[1]*o,e[2]=n[2]+t[2]*o,e[3]=n[3]+t[3]*o,e}},{}],217:[function(m,b,v){b.exports=function(e,n,t,o,r){return e[0]=n,e[1]=t,e[2]=o,e[3]=r,e}},{}],218:[function(m,b,v){b.exports=function(e,n){var t=n[0]-e[0],o=n[1]-e[1],r=n[2]-e[2],d=n[3]-e[3];return t*t+o*o+r*r+d*d}},{}],219:[function(m,b,v){b.exports=function(e){var n=e[0],t=e[1],o=e[2],r=e[3];return n*n+t*t+o*o+r*r}},{}],220:[function(m,b,v){b.exports=function(e,n,t){return e[0]=n[0]-t[0],e[1]=n[1]-t[1],e[2]=n[2]-t[2],e[3]=n[3]-t[3],e}},{}],221:[function(m,b,v){b.exports=function(e,n,t){var o=n[0],r=n[1],d=n[2],
3517c=n[3];return e[0]=t[0]*o+t[4]*r+t[8]*d+t[12]*c,e[1]=t[1]*o+t[5]*r+t[9]*d+t[13]*c,e[2]=t[2]*o+t[6]*r+t[10]*d+t[14]*c,e[3]=t[3]*o+t[7]*r+t[11]*d+t[15]*c,e}},{}],222:[function(m,b,v){b.exports=function(e,n,t){var o=n[0],r=n[1],d=n[2],c=t[0],i=t[1],u=t[2],f=t[3],s=f*o+i*d-u*r,h=f*r+u*o-c*d,p=f*d+c*r-i*o,a=-c*o-i*r-u*d;return e[0]=s*f+a*-c+h*-u-p*-i,e[1]=h*f+a*-i+p*-c-s*-u,e[2]=p*f+a*-u+s*-i-h*-c,e[3]=n[3],e}},{}],223:[function(m,b,v){var e=m("glsl-tokenizer"),n=m("atob-lite");b.exports=function(t){for(var o=Array.isArray(t)?t:e(t),r=0;r<o.length;r++){var d=o[r];if(d.type==="preprocessor"){var c=d.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(c&&c[2]){var i=c[1],u=c[2];return(i?n(u):u).trim()}}}}},{"atob-lite":13,"glsl-tokenizer":230}],224:[function(m,b,v){b.exports=function(c){var i,u,f,s=0,h=0,p=999,a=[],x=[],l=1,w=0,_=0,T=!1,k=!1,L="",A=t,I=e;(c=c||{}).version==="300 es"&&(A=r,I=o);var P={},S={};for(s=0;s<A.length;s++)P[A[s]]=!0;for(s=0;s<I.length;s++)S[I[s]]=!0;return function(N){return x=[],N!==null?function(U){s=0,U.toString&&(U=U.toString());var Q;for(L+=U.replace(/\r\n/g,`
3518`),f=L.length;i=L[s],s<f;){switch(Q=s,p){case 0:s=V();break;case 1:case 2:s=H();break;case 3:s=Z();break;case 4:s=W();break;case 11:s=q();break;case 5:s=$();break;case 9999:s=R();break;case 9:s=F();break;case 999:s=D()}if(Q!==s)switch(L[Q]){case`
3519`:w=0,++l;break;default:++w}}return h+=s,L=L.slice(s),x}(N):function(U){return a.length&&E(a.join("")),p=10,E("(eof)"),x}()};function E(N){N.length&&x.push({type:d[p],data:N,position:_,line:l,column:w})}function D(){return a=a.length?[]:a,u==="/"&&i==="*"?(_=h+s-1,p=0,u=i,s+1):u==="/"&&i==="/"?(_=h+s-1,p=1,u=i,s+1):i==="#"?(p=2,_=h+s,s):/\s/.test(i)?(p=9,_=h+s,s):(T=/\d/.test(i),k=/[^\w_]/.test(i),_=h+s,p=T?4:k?3:9999,s)}function F(){return/[^\s]/g.test(i)?(E(a.join("")),p=999,s):(a.push(i),u=i,s+1)}function H(){return i!=="\r"&&i!==`
3520`||u==="\\"?(a.push(i),u=i,s+1):(E(a.join("")),p=999,s)}function V(){return i==="/"&&u==="*"?(a.push(i),E(a.join("")),p=999,s+1):(a.push(i),u=i,s+1)}function Z(){if(u==="."&&/\d/.test(i))return p=5,s;if(u==="/"&&i==="*")return p=0,s;if(u==="/"&&i==="/")return p=1,s;if(i==="."&&a.length){for(;K(a););return p=5,s}if(i===";"||i===")"||i==="("){if(a.length)for(;K(a););return E(i),p=999,s+1}var N=a.length===2&&i!=="=";if(/[\w_\d\s]/.test(i)||N){for(;K(a););return p=999,s}return a.push(i),u=i,s+1}function K(N){for(var U,Q,j=0;;){if(U=n.indexOf(N.slice(0,N.length+j).join("")),Q=n[U],U===-1){if(j--+N.length>0)continue;Q=N.slice(0,1).join("")}return E(Q),_+=Q.length,(a=a.slice(Q.length)).length}}function q(){return/[^a-fA-F0-9]/.test(i)?(E(a.join("")),p=999,s):(a.push(i),u=i,s+1)}function W(){return i==="."||/[eE]/.test(i)?(a.push(i),p=5,u=i,s+1):i==="x"&&a.length===1&&a[0]==="0"?(p=11,a.push(i),u=i,s+1):/[^\d]/.test(i)?(E(a.join("")),p=999,s):(a.push(i),u=i,s+1)}function $(){return i==="f"&&(a.push(i),u=i,s+=1),/[eE]/.test(i)?(a.push(i),u=i,s+1):(i!=="-"&&i!=="+"||!/[eE]/.test(u))&&/[^\d]/.test(i)?(E(a.join("")),p=999,s):(a.push(i),u=i,s+1)}function R(){if(/[^\d\w_]/.test(i)){var N=a.join("");return p=S[N]?8:P[N]?7:6,E(a.join("")),p=999,s}return a.push(i),u=i,s+1}};var e=m("./lib/literals"),n=m("./lib/operators"),t=m("./lib/builtins"),o=m("./lib/literals-300es"),r=m("./lib/builtins-300es"),d=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":226,"./lib/builtins-300es":225,"./lib/literals":228,"./lib/literals-300es":227,"./lib/operators":229}],225:[function(m,b,v){var e=m("./builtins");e=e.slice().filter(function(n){return!/^(gl\_|texture)/.test(n)}),b.exports=e.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":226}],226:[function(m,b,v){b.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],227:[function(m,b,v){var e=m("./literals");b.exports=e.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subrout
3520ine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":228}],228:[function(m,b,v){b.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],229:[function(m,b,v){b.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],230:[function(m,b,v){var e=m("./index");b.exports=function(n,t){var o=e(t),r=[];return r=(r=r.concat(o(n))).concat(o(null))}},{"./index":224}],231:[function(m,b,v){b.exports=function(e){typeof e=="string"&&(e=[e]);for(var n=[].slice.call(arguments,1),t=[],o=0;o<e.length-1;o++)t.push(e[o],n[o]||"");return t.push(e[o]),t.join("")}},{}],232:[function(m,b,v){var e=m("is-browser");b.exports=e&&function(){var n=!1;try{var t=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{n=!1}return n}()},{"is-browser":236}],233:[function(m,b,v){b.exports=function(u,f){var s=u.length;
3520if(s===0)throw new Error("Must have at least d+1 points");var h=u[0].length;if(s<=h)throw new Error("Must input at least d+1 points");var p=u.slice(0,h+1),a=e.apply(void 0,p);if(a===0)throw new Error("Input not in general position");for(var x=new Array(h+1),l=0;l<=h;++l)x[l]=l;a<0&&(x[0]=1,x[1]=0);var w=new t(x,new Array(h+1),!1),_=w.adjacent,T=new Array(h+2);for(l=0;l<=h;++l){for(var k=x.slice(),L=0;L<=h;++L)L===l&&(k[L]=-1);var A=k[0];k[0]=k[1],k[1]=A;var I=new t(k,new Array(h+1),!0);_[l]=I,T[l]=I}for(T[h+1]=w,l=0;l<=h;++l){k=_[l].vertices;var P=_[l].adjacent;for(L=0;L<=h;++L){var S=k[L];if(S<0)P[L]=w;else for(var E=0;E<=h;++E)_[E].vertices.indexOf(S)<0&&(P[L]=_[E])}}var D=new c(h,p,T),F=!!f;for(l=h+1;l<s;++l)D.insert(u[l],F);return D.boundary()};var e=m("robust-orientation"),n=m("simplicial-complex").compareCells;function t(u,f,s){this.vertices=u,this.adjacent=f,this.boundary=s,this.lastVisited=-1}function o(u,f,s){this.vertices=u,this.cell=f,this.index=s}function r(u,f){return n(u.vertices,f.vertices)}t.prototype.flip=function(){var u=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=u;var f=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=f};var d=[];function c(u,f,s){this.dimension=u,this.vertices=f,this.simplices=s,this.interior=s.filter(function(x){return!x.boundary}),this.tuple=new Array(u+1);for(var h=0;h<=u;++h)this.tuple[h]=this.vertices[h];var p,a=d[u];a||(a=d[u]=((p=e[u+1])||(p=e),function(x){return function(){var l=this.tuple;return x.apply(this,l)}}(p))),this.orient=a}var i=c.prototype;i.handleBoundaryDegeneracy=function(u,f){var s=this.dimension,h=this.vertices.length-1,p=this.tuple,a=this.vertices,x=[u];for(u.lastVisited=-h;x.length>0;)for(var l=(u=x.pop()).adjacent,w=0;w<=s;++w){var _=l[w];if(_.boundary&&!(_.lastVisited<=-h)){for(var T=_.vertices,k=0;k<=s;++k){var L=T[k];p[k]=L<0?f:a[L]}var A=this.orient();if(A>0)return _;_.lastVisited=-h,A===0&&x.push(_)}}return null},i.walk=function(u,f){var s=this.vertices.length-1,h=this.dimension,p=this.vertices,a=this.tuple,x=f?this.interior.length*Math.random()|0:this.interior.length-1,l=this.interior[x];e:for(;!l.boundary;){for(var w=l.vertices,_=l.adjacent,T=0;T<=h;++T)a[T]=p[w[T]];for(l.lastVisited=s,T=0;T<=h;++T){var k=_[T];if(!(k.lastVisited>=s)){var L=a[T];a[T]=u;var A=this.orient();if(a[T]=L,A<0){l=k;continue e}k.boundary?k.lastVisited=-s:k.lastVisited=s}}return}return l},i.addPeaks=function(u,f){var s=this.vertices.length-1,h=this.dimension,p=this.vertices,a=this.tuple,x=this.interior,l=this.simplices,w=[f];f.lastVisited=s,f.vertices[f.vertices.indexOf(-1)]=s,f.boundary=!1,x.push(f);for(var _=[];w.length>0;){var T=(f=w.pop()).vertices,k=f.adjacent,L=T.indexOf(s);if(!(L<0)){for(var A=0;A<=h;++A)if(A!==L){var I=k[A];if(I.boundary&&!(I.lastVisited>=s)){var P=I.vertices;if(I.lastVisited!==-s){for(var S=0,E=0;E<=h;++E)P[E]<0?(S=E,a[E]=u):a[E]=p[P[E]];if(this.orient()>0){P[S]=s,I.boundary=!1,x.push(I),w.push(I),I.lastVisited=s;continue}I.lastVisited=-s}var D=I.adjacent,F=T.slice(),H=k.slice(),V=new t(F,H,!0);l.push(V);var Z=D.indexOf(f);if(!(Z<0))for(D[Z]=V,H[L]=I,F[A]=-1,H[A]=f,k[A]=V,V.flip(),E=0;E<=h;++E){var K=F[E];if(!(K<0||K===s)){for(var q=new Array(h-1),W=0,$=0;$<=h;++$){var R=F[$];R<0||$===E||(q[W++]=R)}_.push(new o(q,V,E))}}}}}}for(_.sort(r),A=0;A+1<_.length;A+=2){var N=_[A],U=_[A+1],Q=N.index,j=U.index;Q<0||j<0||(N.cell.adjacent[N.index]=U.cell,U.cell.adjacent[U.index]=N.cell)}},i.insert=function(u,f){var s=this.vertices;s.push(u);var h=this.walk(u,f);if(h){for(var p=this.dimension,a=this.tuple,x=0;x<=p;++x){var l=h.vertices[x];a[x]=l<0?u:s[l]}var w=this.orient(a);w<0||(w!==0||(h=this.handleBoundaryDegeneracy(h,u)))&&this.addPeaks(u,h)}},i.boundary=function(){for(var u=this.dimension,f=[],s=this.simplices,h=s.length,p=0;p<h;++p){var a=s[p];if(a.boundary){for(var x=new Array(u),l=a.vertices,w=0,_=0,T=0;T<=u;++T)l[T]>=0?x[w++]=l[T]:_=1&T;if(_===(1&u)){var k=x[0];x[0]=x[1],x[1]=k}f.push(x)}}return f}},{"robust-orientation":284,"simplicial-complex":293}],234:[function(m,b,v){var e=m("binary-search-bounds");function n(w,_,T,k,L){this.mid=w,this.left=_,this.right=T,this.leftPoints=k,this.rightPoints=L,this.count=(_?_.count:0)+(T?T.count:0)+k.length}b.exports=function(w){return!w||w.length===0?new x(null):new x(a(w))};var t=n.prototype;function o(w,_){w.mid=_.mid,w.left=_.left,w.right=_.right,w.leftPoints=_.leftPoints,w.rightPoints=_.rightPoints,w.count=_.count}function r(w,_){var T=a(_);w.mid=T.mid,w.left=T.left,w.right=T.right,w.leftPoints=T.leftPoints,w.rightPoints=T.rightPoints,w.count=T.count}function d(w,_){var T=w.intervals([]);T.push(_),r(w,T)}function c(w,_){var T=w.intervals([]),k=T.indexOf(_);return k<0?0:(T.splice(k,1),r(w,T),1)}function i(w,_,T){for(var k=0;k<w.length&&w[k][0]<=_;++k){var L=T(w[k]);if(L)return L}}function u(w,_,T){for(var k=w.length-1;k>=0&&w[k][1]>=_;--k){var L=T(w[k]);if(L)return L}}function f(w,_){for(var T=0;T<w.length;++T){var k=_(w[T]);if(k)return k}}function s(w,_){return w-_}function h(w,_){var T=w[0]-_[0];return T||w[1]-_[1]}function p(w,_){var T=w[1]-_[1];return T||w[0]-_[0]}function a(w){if(w.length===0)return null;for(var _=[],T=0;T<w.length;++T)_.push(w[T][0],w[T][1]);_.sort(s);var k=_[_.length>>1],L=[],A=[],I=[];for(T=0;T<w.length;++T){var P=w[T];P[1]<k?L.push(P):k<P[0]?A.push(P):I.push(P)}var S=I,E=I.slice();return S.sort(h),E.sort(p),new n(k,a(L),a(A),S,E)}function x(w){this.root=w}t.intervals=function(w){return w.push.apply(w,this.leftPoints),this.left&&this.left.intervals(w),this.right&&this.right.intervals(w),w},t.insert=function(w){var _=this.count-this.leftPoints.length;if(this.count+=1,w[1]<this.mid)this.left?4*(this.left.count+1)>3*(_+1)?d(this,w):this.left.insert(w):this.left=a([w]);else if(w[0]>this.mid)this.right?4*(this.right.count+1)>3*(_+1)?d(this,w):this.right.insert(w):this.right=a([w]);else{var T=e.ge(this.leftPoints,w,h),k=e.ge(this.rightPoints,w,p);this.leftPoints.splice(T,0,w),this.rightPoints.splice(k,0,w)}},t.remove=function(w){var _=this.count-this.leftPoints;if(w[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(_-1)?c(this,w):(A=this.left.remove(w))===2?(this.left=null,this.count-=1,1):(A===1&&(this.count-=1),A):0;if(w[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(_-1)?c(this,w):(A=this.right.remove(w))===2?(this.right=null,this.count-=1,1):(A===1&&(this.count-=1),A):0;if(this.count===1)return this.leftPoints[0]===w?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===w){if(this.left&&this.right){for(var T=this,k=this.left;k.right;)T=k,k=k.right;if(T===this)k.right=this.right;else{var L=this.left,A=this.right;T.count-=k.count,T.right=k.left,k.left=L,k.right=A}o(this,k),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(L=e.ge(this.leftPoints,w,h);L<this.leftPoints.length&&this.leftPoints[L][0]===w[0];++L)if(this.leftPoints[L]===w){for(this.count-=1,this.leftPoints.splice(L,1),A=e.ge(this.rightPoints,w,p);A<this.rightPoints.length&&this.rightPoints[A][1]===w[1];++A)if(this.rightPoints[A]===w)return this.rightPoints.splice(A,1),1}return 0},t.queryPoint=function(w,_){if(w<this.mid)return this.left&&(T=this.left.queryPoint(w,_))?T:i(this.leftPoints,w,_);if(w>this.mid){var T;return this.right&&(T=this.right.queryPoint(w,_))?T:u(this.rightPoints,w,_)}return f(this.leftPoints,_)},t.queryInterval=function(w,_,T){var k;return w<this.mid&&this.left&&(k=this.left.queryInterval(w,_,T))||_>this.mid&&this.right&&(k=this.right.queryInterval(w,_,T))?k:_<this.mid?i(this.leftPoints,_,T):w>this.mid?u(this.rightPoints,w,T):f(this.leftPoints,T)};var l=x.prototype;l.insert=function(w){this.root?this.root.insert(w):this.root=new n(w[0],null,null,[w],[w])},l.remove=function(w){if(this.root){var _=this.root.remove(w);return _===2&&(this.root=null),_!==0}return!1},l.queryPoint=function(w,_){if(this.root)return this.root.queryPoint(w,_)},l.queryInterval=function(w,_,T){if(w<=_&&this.root)return this.root.queryInterval(w,_,T)},Object.defineProperty(l,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(l,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})}
3520,{"binary-search-bounds":31}],235:[function(m,b,v){b.exports=function(e){for(var n=new Array(e),t=0;t<e;++t)n[t]=t;return n}},{}],236:[function(m,b,v){b.exports=!0},{}],237:[function(m,b,v){function e(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}/*!
3521 * Determine if an object is a Buffer
3522 *
3523 * @author   Feross Aboukhadijeh <https://feross.org>
3524 * @license  MIT
3525 */b.exports=function(n){return n!=null&&(e(n)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&e(t.slice(0,0))}(n)||!!n._isBuffer)}},{}],238:[function(m,b,v){b.exports=t,b.exports.isMobile=t,b.exports.default=t;var e=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function t(o){o||(o={});var r=o.ua;if(r||typeof navigator>"u"||(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;var d=o.tablet?n.test(r):e.test(r);return!d&&o.tablet&&o.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(d=!0),d}},{}],239:[function(m,b,v){b.exports=function(e){for(var n,t=e.length,o=0;o<t;o++)if(((n=e.charCodeAt(o))<9||n>13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},{}],240:[function(m,b,v){b.exports=function(e,n,t){return e*(1-t)+n*t}},{}],241:[function(m,b,v){var e=m("./normalize"),n=m("gl-mat4/create"),t=m("gl-mat4/clone"),o=m("gl-mat4/determinant"),r=m("gl-mat4/invert"),d=m("gl-mat4/transpose"),c={length:m("gl-vec3/length"),normalize:m("gl-vec3/normalize"),dot:m("gl-vec3/dot"),cross:m("gl-vec3/cross")},i=n(),u=n(),f=[0,0,0,0],s=[[0,0,0],[0,0,0],[0,0,0]],h=[0,0,0];function p(a,x,l,w,_){a[0]=x[0]*w+l[0]*_,a[1]=x[1]*w+l[1]*_,a[2]=x[2]*w+l[2]*_}b.exports=function(a,x,l,w,_,T){if(x||(x=[0,0,0]),l||(l=[0,0,0]),w||(w=[0,0,0]),_||(_=[0,0,0,1]),T||(T=[0,0,0,1]),!e(i,a)||(t(u,i),u[3]=0,u[7]=0,u[11]=0,u[15]=1,Math.abs(o(u)<1e-8)))return!1;var k,L,A,I,P,S,E,D=i[3],F=i[7],H=i[11],V=i[12],Z=i[13],K=i[14],q=i[15];if(D!==0||F!==0||H!==0){if(f[0]=D,f[1]=F,f[2]=H,f[3]=q,!r(u,u))return!1;d(u,u),k=_,A=u,I=(L=f)[0],P=L[1],S=L[2],E=L[3],k[0]=A[0]*I+A[4]*P+A[8]*S+A[12]*E,k[1]=A[1]*I+A[5]*P+A[9]*S+A[13]*E,k[2]=A[2]*I+A[6]*P+A[10]*S+A[14]*E,k[3]=A[3]*I+A[7]*P+A[11]*S+A[15]*E}else _[0]=_[1]=_[2]=0,_[3]=1;if(x[0]=V,x[1]=Z,x[2]=K,function($,R){$[0][0]=R[0],$[0][1]=R[1],$[0][2]=R[2],$[1][0]=R[4],$[1][1]=R[5],$[1][2]=R[6],$[2][0]=R[8],$[2][1]=R[9],$[2][2]=R[10]}(s,i),l[0]=c.length(s[0]),c.normalize(s[0],s[0]),w[0]=c.dot(s[0],s[1]),p(s[1],s[1],s[0],1,-w[0]),l[1]=c.length(s[1]),c.normalize(s[1],s[1]),w[0]/=l[1],w[1]=c.dot(s[0],s[2]),p(s[2],s[2],s[0],1,-w[1]),w[2]=c.dot(s[1],s[2]),p(s[2],s[2],s[1],1,-w[2]),l[2]=c.length(s[2]),c.normalize(s[2],s[2]),w[1]/=l[2],w[2]/=l[2],c.cross(h,s[1],s[2]),c.dot(s[0],h)<0)for(var W=0;W<3;W++)l[W]*=-1,s[W][0]*=-1,s[W][1]*=-1,s[W][2]*=-1;return T[0]=.5*Math.sqrt(Math.max(1+s[0][0]-s[1][1]-s[2][2],0)),T[1]=.5*Math.sqrt(Math.max(1-s[0][0]+s[1][1]-s[2][2],0)),T[2]=.5*Math.sqrt(Math.max(1-s[0][0]-s[1][1]+s[2][2],0)),T[3]=.5*Math.sqrt(Math.max(1+s[0][0]+s[1][1]+s[2][2],0)),s[2][1]>s[1][2]&&(T[0]=-T[0]),s[0][2]>s[2][0]&&(T[1]=-T[1]),s[1][0]>s[0][1]&&(T[2]=-T[2]),!0}},{"./normalize":242,"gl-mat4/clone":92,"gl-mat4/create":93,"gl-mat4/determinant":94,"gl-mat4/invert":98,"gl-mat4/transpose":109,"gl-vec3/cross":157,"gl-vec3/dot":162,"gl-vec3/length":172,"gl-vec3/normalize":179}],242:[function(m,b,v){b.exports=function(e,n){var t=n[15];if(t===0)return!1;for(var o=1/t,r=0;r<16;r++)e[r]=n[r]*o;return!0}},{}],243:[function(m,b,v){var e=m("gl-vec3/lerp"),n=m("mat4-recompose"),t=m("mat4-decompose"),o=m("gl-mat4/determinant"),r=m("quat-slerp"),d=u(),c=u(),i=u();function u(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(s){return[s||0,s||0,s||0]}b.exports=function(s,h,p,a){if(o(h)===0||o(p)===0)return!1;var x=t(h,d.translate,d.scale,d.skew,d.perspective,d.quaternion),l=t(p,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!x||!l)&&(e(i.translate,d.translate,c.translate,a),e(i.skew,d.skew,c.skew,a),e(i.scale,d.scale,c.scale,a),e(i.perspective,d.perspective,c.perspective,a),r(i.quaternion,d.quaternion,c.quaternion,a),n(s,i.translate,i.scale,i.skew,i.perspective,i.quaternion),!0)}},{"gl-mat4/determinant":94,"gl-vec3/lerp":173,"mat4-decompose":241,"mat4-recompose":244,"quat-slerp":271}],244:[function(m,b,v){var e={identity:m("gl-mat4/identity"),translate:m("gl-mat4/translate"),multiply:m("gl-mat4/multiply"),create:m("gl-mat4/create"),scale:m("gl-mat4/scale"),fromRotationTranslation:m("gl-mat4/fromRotationTranslation")},n=(e.create(),e.create());b.exports=function(t,o,r,d,c,i){return e.identity(t),e.fromRotationTranslation(t,i,o),t[3]=c[0],t[7]=c[1],t[11]=c[2],t[15]=c[3],e.identity(n),d[2]!==0&&(n[9]=d[2],e.multiply(t,t,n)),d[1]!==0&&(n[9]=0,n[8]=d[1],e.multiply(t,t,n)),d[0]!==0&&(n[8]=0,n[4]=d[0],e.multiply(t,t,n)),e.scale(t,t,r),t}},{"gl-mat4/create":93,"gl-mat4/fromRotationTranslation":96,"gl-mat4/identity":97,"gl-mat4/multiply":100,"gl-mat4/scale":107,"gl-mat4/translate":108}
vendor: 5,825 bytes, line 3525
3525],245:[function(m,b,v){var e=m("binary-search-bounds"),n=m("mat4-interpolate"),t=m("gl-mat4/invert"),o=m("gl-mat4/rotateX"),r=m("gl-mat4/rotateY"),d=m("gl-mat4/rotateZ"),c=m("gl-mat4/lookAt"),i=m("gl-mat4/translate"),u=(m("gl-mat4/scale"),m("gl-vec3/normalize")),f=[0,0,0];function s(a){this._components=a.slice(),this._time=[0],this.prevMatrix=a.slice(),this.nextMatrix=a.slice(),this.computedMatrix=a.slice(),this.computedInverse=a.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}b.exports=function(a){return new s((a=a||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var h=s.prototype;h.recalcMatrix=function(a){var x=this._time,l=e.le(x,a),w=this.computedMatrix;if(!(l<0)){var _=this._components;if(l===x.length-1)for(var T=16*l,k=0;k<16;++k)w[k]=_[T++];else{var L=x[l+1]-x[l],A=(T=16*l,this.prevMatrix),I=!0;for(k=0;k<16;++k)A[k]=_[T++];var P=this.nextMatrix;for(k=0;k<16;++k)P[k]=_[T++],I=I&&A[k]===P[k];if(L<1e-6||I)for(k=0;k<16;++k)w[k]=A[k];else n(w,A,P,(a-x[l])/L)}var S=this.computedUp;S[0]=w[1],S[1]=w[5],S[2]=w[9],u(S,S);var E=this.computedInverse;t(E,w);var D=this.computedEye,F=E[15];D[0]=E[12]/F,D[1]=E[13]/F,D[2]=E[14]/F;var H=this.computedCenter,V=Math.exp(this.computedRadius[0]);for(k=0;k<3;++k)H[k]=D[k]-w[2+4*k]*V}},h.idle=function(a){if(!(a<this.lastT())){for(var x=this._components,l=x.length-16,w=0;w<16;++w)x.push(x[l++]);this._time.push(a)}},h.flush=function(a){var x=e.gt(this._time,a)-2;x<0||(this._time.splice(0,x),this._components.splice(0,16*x))},h.lastT=function(){return this._time[this._time.length-1]},h.lookAt=function(a,x,l,w){this.recalcMatrix(a),x=x||this.computedEye,l=l||f,w=w||this.computedUp,this.setMatrix(a,c(this.computedMatrix,x,l,w));for(var _=0,T=0;T<3;++T)_+=Math.pow(l[T]-x[T],2);_=Math.log(Math.sqrt(_)),this.computedRadius[0]=_},h.rotate=function(a,x,l,w){this.recalcMatrix(a);var _=this.computedInverse;x&&r(_,_,x),l&&o(_,_,l),w&&d(_,_,w),this.setMatrix(a,t(this.computedMatrix,_))};var p=[0,0,0];h.pan=function(a,x,l,w){p[0]=-(x||0),p[1]=-(l||0),p[2]=-(w||0),this.recalcMatrix(a);var _=this.computedInverse;i(_,_,p),this.setMatrix(a,t(_,_))},h.translate=function(a,x,l,w){p[0]=x||0,p[1]=l||0,p[2]=w||0,this.recalcMatrix(a);var _=this.computedMatrix;i(_,_,p),this.setMatrix(a,_)},h.setMatrix=function(a,x){if(!(a<this.lastT())){this._time.push(a);for(var l=0;l<16;++l)this._components.push(x[l])}},h.setDistance=function(a,x){this.computedRadius[0]=x},h.setDistanceLimits=function(a,x){var l=this._limits;l[0]=a,l[1]=x},h.getDistanceLimits=function(a){var x=this._limits;return a?(a[0]=x[0],a[1]=x[1],a):x}},{"binary-search-bounds":31,"gl-mat4/invert":98,"gl-mat4/lookAt":99,"gl-mat4/rotateX":104,"gl-mat4/rotateY":105,"gl-mat4/rotateZ":106,"gl-mat4/scale":107,"gl-mat4/translate":108,"gl-vec3/normalize":179,"mat4-interpolate":243}],246:[function(m,b,v){b.exports=function(n){var t=n.length;if(t<3){for(var o=new Array(t),r=0;r<t;++r)o[r]=r;return t===2&&n[0][0]===n[1][0]&&n[0][1]===n[1][1]?[0]:o}var d=new Array(t);for(r=0;r<t;++r)d[r]=r;d.sort(function(x,l){var w=n[x][0]-n[l][0];return w||n[x][1]-n[l][1]});var c=[d[0],d[1]],i=[d[0],d[1]];for(r=2;r<t;++r){for(var u=d[r],f=n[u],s=c.length;s>1&&e(n[c[s-2]],n[c[s-1]],f)<=0;)s-=1,c.pop();for(c.push(u),s=i.length;s>1&&e(n[i[s-2]],n[i[s-1]],f)>=0;)s-=1,i.pop();i.push(u)}o=new Array(i.length+c.length-2);for(var h=0,p=(r=0,c.length);r<p;++r)o[h++]=c[r];for(var a=i.length-2;a>0;--a)o[h++]=i[a];return o};var e=m("robust-orientation")[3]},{"robust-orientation":284}],247:[function(m,b,v){b.exports=function(n,t){t||(t=n,n=window);var o=0,r=0,d=0,c={shift:!1,alt:!1,control:!1,meta:!1},i=!1;function u(T){var k=!1;return"altKey"in T&&(k=k||T.altKey!==c.alt,c.alt=!!T.altKey),"shiftKey"in T&&(k=k||T.shiftKey!==c.shift,c.shift=!!T.shiftKey),"ctrlKey"in T&&(k=k||T.ctrlKey!==c.control,c.control=!!T.ctrlKey),"metaKey"in T&&(k=k||T.metaKey!==c.meta,c.meta=!!T.metaKey),k}function f(T,k){var L=e.x(k),A=e.y(k);"buttons"in k&&(T=0|k.buttons),(T!==o||L!==r||A!==d||u(k))&&(o=0|T,r=L||0,d=A||0,t&&t(o,r,d,c))}function s(T){f(0,T)}function h(){(o||r||d||c.shift||c.alt||c.meta||c.control)&&(r=d=0,o=0,c.shift=c.alt=c.control=c.meta=!1,t&&t(0,0,0,c))}function p(T){u(T)&&t&&t(o,r,d,c)}function a(T){e.buttons(T)===0?f(0,T):f(o,T)}function x(T){f(o|e.buttons(T),T)}function l(T){f(o&~e.buttons(T),T)}function w(){i||(i=!0,n.addEventListener("mousemove",a),n.addEventListener("mousedown",x),n.addEventListener("mouseup",l),n.addEventListener("mouseleave",s),n.addEventListener("mouseenter",s),n.addEventListener("mouseout",s),n.addEventListener("mouseover",s),n.addEventListener("blur",h),n.addEventListener("keyup",p),n.addEventListener("keydown",p),n.addEventListener("keypress",p),n!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",p),window.addEventListener("keydown",p),window.addEventListener("keypress",p)))}w();var _={element:n};return Object.defineProperties(_,{enabled:{get:function(){return i},set:function(T){T?w():function(){i&&(i=!1,n.removeEventListener("mousemove",a),n.removeEventListener("mousedown",x),n.removeEventListener("mouseup",l),n.removeEventListener("mouseleave",s),n.removeEventListener("mouseenter",s),n.removeEventListener("mouseout",s),n.removeEventListener("mouseover",s),n.removeEventListener("blur",h),n.removeEventListener("keyup",p),n.removeEventListener("keydown",p),n.removeEventListener("keypress",p),n!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",p),window.removeEventListener("keydown",p),window.removeEventListener("keypress",p)))}()},enumerable:!0},buttons:{get:function(){return o},enumerable:!0},x:{get:function(){return r},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return c},enumerable:!0}}),_};
3525var e=m("mouse-event")},{"mouse-event":249}],248:[function(m,b,v){var e={left:0,top:0};b.exports=function(n,t,o){t=t||n.currentTarget||n.srcElement,Array.isArray(o)||(o=[0,0]);var r=n.clientX||0,d=n.clientY||0,c=(i=t,i===window||i===document||i===document.body?e:i.getBoundingClientRect()),i;return o[0]=r-c.left,o[1]=d-c.top,o}},{}],249:[function(m,b,v){function e(n){return n.target||n.srcElement||window}v.buttons=function(n){if(typeof n=="object"){if("buttons"in n)return n.buttons;if("which"in n){if((t=n.which)===2)return 4;if(t===3)return 2;if(t>0)return 1<<t-1}else if("button"in n){var t;if((t=n.button)===1)return 4;if(t===2)return 2;if(t>=0)return 1<<t}}return 0},v.element=e,v.x=function(n){if(typeof n=="object"){if("offsetX"in n)return n.offsetX;var t=e(n).getBoundingClientRect();return n.clientX-t.left}return 0},v.y=function(n){if(typeof n=="object"){if("offsetY"in n)return n.offsetY;var t=e(n).getBoundingClientRect();return n.clientY-t.top}return 0}},{}],250:[function(m,b,v){var e=m("to-px");b.exports=function(n,t,o){typeof n=="function"&&(o=!!t,t=n,n=window);var r=e("ex",n),d=function(c){o&&c.preventDefault();var i=c.deltaX||0,u=c.deltaY||0,f=c.deltaZ||0,s=1;switch(c.deltaMode){case 1:s=r;break;case 2:s=window.innerHeight}if(u*=s,f*=s,(i*=s)||u||f)return t(i,u,f,c)};return n.addEventListener("wheel",d),d}},{"to-px":304}],251:[function(m,b,v){var e=m("typedarray-pool");b.exports=function(t){function o(s){throw new Error("ndarray-extract-contour: "+s)}typeof t!="object"&&o("Must specify arguments");var r=t.order;Array.isArray(r)||o("Must specify order");var d=t.arrayArguments||1;d<1&&o("Must have at least one array argument");var c=t.scalarArguments||0;c<0&&o("Scalar arg count must be > 0"),typeof t.vertex!="function"&&o("Must specify vertex creation function"),typeof t.cell!="function"&&o("Must specify cell creation function"),typeof t.phase!="function"&&o("Must specify phase function");for(var i=t.getters||[],u=new Array(d),f=0;f<d;++f)i.indexOf(f)>=0?u[f]=!0:u[f]=!1;return function(s,h,p,a,x,l){var w=[l,x].join(",");return(0,n[w])(s,h,p,e.mallocUint32,e.freeUint32)}(t.vertex,t.cell,t.phase,0,r,u)};var n={"false,0,1":function(t,o,r,d,c){return function(i,u,f,s){var h,p=0|i.shape[0],a=0|i.shape[1],x=i.data,l=0|i.offset,w=0|i.stride[0],_=0|i.stride[1],T=l,k=0|-w,L=0,A=0|-_,I=0,P=-w-_|0,S=0,E=0|w,D=_-w*p|0,F=0,H=0,V=0,Z=2*p|0,K=d(Z),q=d(Z),W=0,$=0,R=-1,N=-1,U=0,Q=0|-p,j=0|p,X=0,J=-p-1|0,re=p-1|0,ne=0,se=0,oe=0;for(F=0;F<p;++F)K[W++]=r(x[T],u,f,s),T+=E;if(T+=D,a>0){if(H=1,K[W++]=r(x[T],u,f,s),T+=E,p>0)for(F=1,h=x[T],$=K[W]=r(h,u,f,s),U=K[W+R],X=K[W+Q],ne=K[W+J],$===U&&$===X&&$===ne||(L=x[T+k],I=x[T+A],S=x[T+P],t(F,H,h,L,I,S,$,U,X,ne,u,f,s),se=q[W]=V++),W+=1,T+=E,F=2;F<p;++F)h=x[T],$=K[W]=r(h,u,f,s),U=K[W+R],X=K[W+Q],ne=K[W+J],$===U&&$===X&&$===ne||(L=x[T+k],I=x[T+A],S=x[T+P],t(F,H,h,L,I,S,$,U,X,ne,u,f,s),se=q[W]=V++,ne!==U&&o(q[W+R],se,S,L,ne,U,u,f,s)),W+=1,T+=E;for(T+=D,W=0,oe=R,R=N,N=oe,oe=Q,Q=j,j=oe,oe=J,J=re,re=oe,H=2;H<a;++H){if(K[W++]=r(x[T],u,f,s),T+=E,p>0)for(F=1,h=x[T],$=K[W]=r(h,u,f,s),U=K[W+R],X=K[W+Q],ne=K[W+J],$===U&&$===X&&$===ne||(L=x[T+k],I=x[T+A],S=x[T+P],t(F,H,h,L,I,S,$,U,X,ne,u,f,s),se=q[W]=V++,ne!==X&&o(q[W+Q],se,I,S,X,ne,u,f,s)),W+=1,T+=E,F=2;F<p;++F)h=x[T],$=K[W]=r(h,u,f,s),U=K[W+R],X=K[W+Q],ne=K[W+J],$===U&&$===X&&$===ne||(L=x[T+k],I=x[T+A],S=x[T+P],t(F,H,h,L,I,S,$,U,X,ne,u,f,s),se=q[W]=V++,ne!==X&&o(q[W+Q],se,I,S,X,ne,u,f,s),ne!==U&&o(q[W+R],se,S,L,ne,U,u,f,s)),W+=1,T+=E;1&H&&(W=0),oe=R,R=N,N=oe,oe=Q,Q=j,j=oe,oe=J,J=re,re=oe,T+=D}}c(q),c(K)}},"false,1,0":function(t,o,r,d,c){return function(i,u,f,s){var h,p=0|i.shape[0],a=0|i.shape[1],x=i.data,l=0|i.offset,w=0|i.stride[0],_=0|i.stride[1],T=l,k=0|-w,L=0,A=0|-_,I=0,P=-w-_|0,S=0,E=0|_,D=w-_*a|0,F=0,H=0,V=0,Z=2*a|0,K=d(Z),q=d(Z),W=0,$=0,R=-1,N=-1,U=0,Q=0|-a,j=0|a,X=0,J=-a-1|0,re=a-1|0,ne=0,se=0,oe=0;for(H=0;H<a;++H)K[W++]=r(x[T],u,f,s),T+=E;if(T+=D,p>0){if(F=1,K[W++]=r(x[T],u,f,s),T+=E,a>0)for(H=1,h=x[T],$=K[W]=r(h,u,f,s),X=K[W+Q],U=K[W+R],ne=K[W+J],$===X&&$===U&&$===ne||(L=x[T+k],I=x[T+A],S=x[T+P],t(F,H,h,L,I,S,$,X,U,ne,u,f,s),se=q[W]=V++),W+=1,T+=E,H=2;H<a;++H)h=x[T],$=K[W]=r(h,u,f,s),X=K[W+Q],U=K[W+R],ne=K[W+J],$===X&&$===U&&$===ne||(L=x[T+k],I=x[T+A],S=x[T+P],t(F,H,h,L,I,S,$,X,U,ne,u,f,s),se=q[W]=V++,ne!==U&&o(q[W+R],se,I,S,U,ne,u,f,s)),W+=1,T+=E;for(T+=D,W=0,oe=Q,Q=j,j=oe,oe=R,R=N,N=oe,oe=J,J=re,re=oe,F=2;F<p;++F){if(K[W++]=r(x[T],u,f,s),T+=E,a>0)for(H=1,h=x[T],$=K[W]=r(h,u,f,s),X=K[W+Q],U=K[W+R],ne=K[W+J],$===X&&$===U&&$===ne||(L=x[T+k],I=x[T+A],S=x[T+P],t(F,H,h,L,I,S,$,X,U,ne,u,f,s),se=q[W]=V++,ne!==X&&o(q[W+Q],se,S,L,ne,X,u,f,s)),W+=1,T+=E,H=2;H<a;++H)h=x[T],$=K[W]=r(h,u,f,s),X=K[W+Q],U=K[W+R],ne=K[W+J],$===X&&$===U&&$===ne||(L=x[T+k],I=x[T+A],S=x[T+P],t(F,H,h,L,I,S,$,X,U,ne,u,f,s),se=q[W]=V++,ne!==U&&o(q[W+R],se,I,S,U,ne,u,f,s),ne!==X&&o(q[W+Q],se,S,L,ne,X,u,f,s)),W+=1,T+=E;1&F&&(W=0),oe=Q,Q=j,j=oe,oe=R,R=N,N=oe,oe=J,J=re,re=oe,T+=D}}c(q),c(K)}}}},{"typedarray-pool":308}],252:[function(m,b,v){var e=m("dup"),n={zero:function(p,a,x,l){var w=p[0];l|=0;var _=0,T=x[0];for(_=0;_<w;++_)a[l]=0,l+=T},fdTemplate1:function(p,a,x,l,w,_,T){var k=p[0],L=x[0],A=-1*L,I=L;l|=0,T|=0;var P=0,S=L,E=_[0];for(P=0;P<k;++P)w[T]=.5*(a[l+A]-a[l+I]),l+=S,T+=E},fdTemplate2:function(p,a,x,l,w,_,T,k,L,A){var I=p[0],P=p[1],S=x[0],E=x[1],D=_[0],F=_[1],H=L[0],V=L[1],Z=-1*S,K=S,q=-1*E,W=E;l|=0,T|=0,A|=0;var $=0,R=0,N=E,U=S-P*E,Q=F,j=D-P*F,X=V,J=H-P*V;for(R=0;R<I;++R){for($=0;$<P;++$)w[T]=.5*(a[l+Z]-a[l+K]),k[A]=.5*(a[l+q]-a[l+W]),l+=N,T+=Q,A+=X;l+=U,T+=j,A+=J}}},t={cdiff:function(p){var a={};return function(x,l,w){var _=x.dtype,T=x.order,k=l.dtype,L=l.order,A=w.dtype,I=w.order,P=[_,T.join(),k,L.join(),A,I.join()].join(),S=a[P];return S||(a[P]=S=p([_,T,k,L,A,I])),S(x.shape.slice(0),x.data,x.stride,0|x.offset,l.data,l.stride,0|l.offset,w.data,w.stride,0|w.offset)}},zero:function(p){var a={};return function(x){var l=x.dtype,w=x.order,_=[l,w.join()].join(),T=a[_];return T||(a[_]=T=p([l,w])),T(x.shape.slice(0),x.data,x.stride,0|x.offset)}},fdTemplate1:function(p){var a={};return function(x,l){var w=x.dtype,_=x.order,T=l.dtype,k=l.order,L=[w,_.join(),T,k.join()].join(),A=a[L];return A||(a[L]=A=p([w,_,T,k])),A(x.shape.slice(0),x.data,x.stride,0|x.offset,l.data,l.stride,0|l.offset)}},fdTemplate2:function(p){var a={};return function(x,l,w){var _=x.dtype,T=x.order,k=l.dtype,L=l.order,A=w.dtype,I=w.order,P=[_,T.join(),k,L.join(),A,I.join()].join(),S=a[P];return S||(a[P]=S=p([_,T,k,L,A,I])),S(x.shape.slice(0),x.data,x.stride,0|x.offset,l.data,l.stride,0|l.offset,w.data,w.stride,0|w.offset)}}};function o(p){return(0,t[p.funcName])(r.bind(void 0,p))}function r(p){return n[p.funcName]}function d(p){return o({funcName:p.funcName})}var c={},i={},u=d({funcName:"cdiff"}),f=d({funcName:"zero"});
3525function s(p){return p in c?c[p]:c[p]=d({funcName:"fdTemplate"+p})}function h(p,a,x,l){return function(w,_){var T=_.shape.slice();return T[0]>2&&T[1]>2&&l(_.pick(-1,-1).lo(1,1).hi(T[0]-2,T[1]-2),w.pick(-1,-1,0).lo(1,1).hi(T[0]-2,T[1]-2),w.pick(-1,-1,1).lo(1,1).hi(T[0]-2,T[1]-2)),T[1]>2&&(x(_.pick(0,-1).lo(1).hi(T[1]-2),w.pick(0,-1,1).lo(1).hi(T[1]-2)),a(w.pick(0,-1,0).lo(1).hi(T[1]-2))),T[1]>2&&(x(_.pick(T[0]-1,-1).lo(1).hi(T[1]-2),w.pick(T[0]-1,-1,1).lo(1).hi(T[1]-2)),a(w.pick(T[0]-1,-1,0).lo(1).hi(T[1]-2))),T[0]>2&&(x(_.pick(-1,0).lo(1).hi(T[0]-2),w.pick(-1,0,0).lo(1).hi(T[0]-2)),a(w.pick(-1,0,1).lo(1).hi(T[0]-2))),T[0]>2&&(x(_.pick(-1,T[1]-1).lo(1).hi(T[0]-2),w.pick(-1,T[1]-1,0).lo(1).hi(T[0]-2)),a(w.pick(-1,T[1]-1,1).lo(1).hi(T[0]-2))),w.set(0,0,0,0),w.set(0,0,1,0),w.set(T[0]-1,0,0,0),w.set(T[0]-1,0,1,0),w.set(0,T[1]-1,0,0),w.set(0,T[1]-1,1,0),w.set(T[0]-1,T[1]-1,0,0),w.set(T[0]-1,T[1]-1,1,0),w}}b.exports=function(p,a,x){return Array.isArray(x)||(x=e(a.dimension,typeof x=="string"?x:"clamp")),a.size===0?p:a.dimension===0?(p.set(0),p):function(l){var w=l.join();if(L=i[w])return L;for(var _=l.length,T=[u,f],k=1;k<=_;++k)T.push(s(k));var L=h.apply(void 0,T);return i[w]=L,L}(x)(p,a)}},{dup:65}],253:[function(m,b,v){function e(r,d){var c=Math.floor(d),i=d-c,u=0<=c&&c<r.shape[0],f=0<=c+1&&c+1<r.shape[0];return(1-i)*(u?+r.get(c):0)+i*(f?+r.get(c+1):0)}function n(r,d,c){var i=Math.floor(d),u=d-i,f=0<=i&&i<r.shape[0],s=0<=i+1&&i+1<r.shape[0],h=Math.floor(c),p=c-h,a=0<=h&&h<r.shape[1],x=0<=h+1&&h+1<r.shape[1],l=f&&a?r.get(i,h):0,w=f&&x?r.get(i,h+1):0;return(1-p)*((1-u)*l+u*(s&&a?r.get(i+1,h):0))+p*((1-u)*w+u*(s&&x?r.get(i+1,h+1):0))}function t(r,d,c,i){var u=Math.floor(d),f=d-u,s=0<=u&&u<r.shape[0],h=0<=u+1&&u
3525+1<r.shape[0],p=Math.floor(c),a=c-p,x=0<=p&&p<r.shape[1],l=0<=p+1&&p+1<r.shape[1],w=Math.floor(i),_=i-w,T=0<=w&&w<r.shape[2],k=0<=w+1&&w+1<r.shape[2],L=s&&x&&T?r.get(u,p,w):0,A=s&&l&&T?r.get(u,p+1,w):0,I=h&&x&&T?r.get(u+1,p,w):0,P=h&&l&&T?r.get(u+1,p+1,w):0,S=s&&x&&k?r.get(u,p,w+1):0,E=s&&l&&k?r.get(u,p+1,w+1):0;return(1-_)*((1-a)*((1-f)*L+f*I)+a*((1-f)*A+f*P))+_*((1-a)*((1-f)*S+f*(h&&x&&k?r.get(u+1,p,w+1):0))+a*((1-f)*E+f*(h&&l&&k?r.get(u+1,p+1,w+1):0)))}function o(r){var d,c,i=0|r.shape.length,u=new Array(i),f=new Array(i),s=new Array(i),h=new Array(i);for(d=0;d<i;++d)c=+arguments[d+1],u[d]=Math.floor(c),f[d]=c-u[d],s[d]=0<=u[d]&&u[d]<r.shape[d],h[d]=0<=u[d]+1&&u[d]+1<r.shape[d];var p,a,x,l=0;e:for(d=0;d<1<<i;++d){for(a=1,x=r.offset,p=0;p<i;++p)if(d&1<<p){if(!h[p])continue e;a*=f[p],x+=r.stride[p]*(u[p]+1)}else{if(!s[p])continue e;a*=1-f[p],x+=r.stride[p]*u[p]}l+=a*r.data[x]}return l}b.exports=function(r,d,c,i){switch(r.shape.length){case 0:return 0;case 1:return e(r,d);case 2:return n(r,d,c);case 3:return t(r,d,c,i);default:return o.apply(void 0,arguments)}},b.exports.d1=e,b.exports.d2=n,b.exports.d3=t},{}],254:[function(m,b,v){var e={"float64,2,1,0":function(){return function(d,c,i,u,f){var s=d[0],h=d[1],p=d[2],a=i[0],x=i[1],l=i[2];u|=0;var w=0,_=0,T=0,k=l,L=x-p*l,A=a-h*x;for(T=0;T<s;++T){for(_=0;_<h;++_){for(w=0;w<p;++w)c[u]/=f,u+=k;u+=L}u+=A}}},"uint8,2,0,1,float64,2,1,0":function(){return function(d,c,i,u,f,s,h,p){for(var a=d[0],x=d[1],l=d[2],w=i[0],_=i[1],T=i[2],k=s[0],L=s[1],A=s[2],I=u|=0,P=h|=0,S=0|d[0];S>0;){S<64?(a=S,S=0):(a=64,S-=64);for(var E=0|d[1];E>0;){E<64?(x=E,E=0):(x=64,E-=64),u=I+S*w+E*_,h=P+S*k+E*L;var D=0,F=0,H=0,V=T,Z=w-l*T,K=_-a*w,q=A,W=k-l*A,$=L-a*k;for(H=0;H<x;++H){for(F=0;F<a;++F){for(D=0;D<l;++D)c[u]=f[h]*p,u+=V,h+=q;u+=Z,h+=W}u+=K,h+=$}}}}},"float32,1,0,float32,1,0":function(){return function(d,c,i,u,f,s,h){var p=d[0],a=d[1],x=i[0],l=i[1],w=s[0],_=s[1];u|=0,h|=0;var T=0,k=0,L=l,A=x-a*l,I=_,P=w-a*_;for(k=0;k<p;++k){for(T=0;T<a;++T)c[u]=f[h],u+=L,h+=I;u+=A,h+=P}}},"float32,1,0,float32,0,1":function(){return function(d,c,i,u,f,s,h){for(var p=d[0],a=d[1],x=i[0],l=i[1],w=s[0],_=s[1],T=u|=0,k=h|=0,L=0|d[1];L>0;){L<64?(a=L,L=0):(a=64,L-=64);for(var A=0|d[0];A>0;){A<64?(p=A,A=0):(p=64,A-=64),u=T+L*l+A*x,h=k+L*_+A*w;var I=0,P=0,S=l,E=x-a*l,D=_,F=w-a*_;for(P=0;P<p;++P){for(I=0;I<a;++I)c[u]=f[h],u+=S,h+=D;u+=E,h+=F}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(d,c,i,u,f,s,h){for(var p=d[0],a=d[1],x=d[2],l=i[0],w=i[1],_=i[2],T=s[0],k=s[1],L=s[2],A=u|=0,I=h|=0,P=0|d[2];P>0;){P<64?(x=P,P=0):(x=64,P-=64);for(var S=0|d[0];S>0;){S<64?(p=S,S=0):(p=64,S-=64);for(var E=0|d[1];E>0;){E<64?(a=E,E=0):(a=64,E-=64),u=A+P*_+S*l+E*w,h=I+P*L+S*T+E*k;var D=0,F=0,H=0,V=_,Z=l-x*_,K=w-p*l,q=L,W=T-x*L,$=k-p*T;for(H=0;H<a;++H){for(F=0;F<p;++F){for(D=0;D<x;++D)c[u]=f[h],u+=V,h+=q;u+=Z,h+=W}u+=K,h+=$}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(d,c,i,u,f,s,h){var p=d[0],a=d[1],x=d[2],l=i[0],w=i[1],_=i[2],T=s[0],k=s[1],L=s[2];u|=0,h|=0;var A=0,I=0,P=0,S=_,E=l-x*_,D=w-p*l,F=L,H=T-x*L,V=k-p*T;for(P=0;P<a;++P){for(I=0;I<p;++I){for(A=0;A<x;++A)c[u]=f[h],u+=S,h+=F;u+=E,h+=H}u+=D,h+=V}}}},n=function(d,c){var i=c.join(",");return(0,e[i])()},t={mul:function(d){var c={};return function(i,u,f){var s=i.dtype,h=i.order,p=u.dtype,a=u.order,x=f.dtype,l=f.order,w=[s,h.join(),p,a.join(),x,l.join()].join(),_=c[w];return _||(c[w]=_=d([s,h,p,a,x,l])),_(i.shape.slice(0),i.data,i.stride,0|i.offset,u.data,u.stride,0|u.offset,f.data,f.stride,0|f.offset)}},muls:function(d){var c={};return function(i,u,f){var s=i.dtype,h=i.order,p=u.dtype,a=u.order,x=[s,h.join(),p,a.join()].join(),l=c[x];return l||(c[x]=l=d([s,h,p,a])),l(i.shape.slice(0),i.data,i.stride,0|i.offset,u.data,u.stride,0|u.offset,f)}},mulseq:function(d){var c={};return function(i,u){var f=i.dtype,s=i.order,h=[f,s.join()].join(),p=c[h];return p||(c[h]=p=d([f,s])),p(i.shape.slice(0),i.data,i.stride,0|i.offset,u)}},div:function(d){var c={};return function(i,u,f){var s=i.dtype,h=i.order,p=u.dtype,a=u.order,x=f.dtype,l=f.order,w=[s,h.join(),p,a.join(),x,l.join()].join(),_=c[w];return _||(c[w]=_=d([s,h,p,a,x,l])),_(i.shape.slice(0),i.data,i.stride,0|i.offset,u.data,u.stride,0|u.offset,f.data,f.stride,0|f.offset)}},divs:function(d){var c={};return function(i,u,f){var s=i.dtype,h=i.order,p=u.dtype,a=u.order,x=[s,h.join(),p,a.join()].join(),l=c[x];return l||(c[x]=l=d([s,h,p,a])),l(i.shape.slice(0),i.data,i.stride,0|i.offset,u.data,u.stride,0|u.offset,f)}},divseq:function(d){var c={};return function(i,u){var f=i.dtype,s=i.order,h=[f,s.join()].join(),p=c[h];return p||(c[h]=p=d([f,s])),p(i.shape.slice(0),i.data,i.stride,0|i.offset,u)}},assign:function(d){var c={};return function(i,u){var f=i.dtype,s=i.order,h=u.dtype,p=u.order,a=[f,s.join(),h,p.join()].join(),x=c[a];return x||(c[a]=x=d([f,s,h,p])),x(i.shape.slice(0),i.data,i.stride,0|i.offset,u.data,u.stride,0|u.offset)}}};function o(d){return c={funcName:d.funcName},(0,t[c.funcName])(n.bind(void 0,c));var c}
3525var r={mul:"*",div:"/"};(function(){for(var d in r)v[d]=o({funcName:d}),v[d+"s"]=o({funcName:d+"s"}),v[d+"seq"]=o({funcName:d+"seq"})})(),v.assign=o({funcName:"assign"})},{}],255:[function(m,b,v){var e=m("ndarray"),n=m("./doConvert.js");b.exports=function(t,o){for(var r=[],d=t,c=1;Array.isArray(d);)r.push(d.length),c*=d.length,d=d[0];return r.length===0?e():(o||(o=e(new Float64Array(c),r)),n(o,t),o)}},{"./doConvert.js":256,ndarray:259}],256:[function(m,b,v){var e,n=function(){return function(t,o,r,d,c){var i=t[0],u=t[1],f=t[2],s=r[0],h=r[1],p=r[2],a=[0,0,0];d|=0;var x=0,l=0,w=0,_=p,T=h-f*p,k=s-u*h;for(w=0;w<i;++w){for(l=0;l<u;++l){for(x=0;x<f;++x){var L,A=c;for(L=0;L<a.length-1;++L)A=A[a[L]];o[d]=A[a[a.length-1]],d+=_,++a[2]}d+=T,a[2]-=f,++a[1]}d+=k,a[1]-=u,++a[0]}}};b.exports=(e={funcName:"convert"},function(t){var o={};return function(r,d){var c=r.dtype,i=r.order,u=[c,i.join()].join(),f=o[u];return f||(o[u]=f=t([c,i])),f(r.shape.slice(0),r.data,r.stride,0|r.offset,d)}}(n.bind(void 0,e)))},{}],257:[function(m,b,v){var e=m("typedarray-pool");function n(d){switch(d){case"uint32":return[e.mallocUint32,e.freeUint32];default:return null}}var t={"uint32,1,0":function(d,c){return function(i,u,f,s,h,p,a,x,l,w,_){var T,k,L,A,I,P,S,E,D=i*h+s,F=d(x);for(T=i+1;T<=u;++T){for(k=T,L=D+=h,I=0,P=D,A=0;A<x;++A)F[I++]=f[P],P+=l;e:for(;k-- >i;){I=0,P=L-h;t:for(A=0;A<x;++A){if((S=f[P])<(E=F[I]))break e;if(S>E)break t;P+=w,I+=_}for(I=L,P=L-h,A=0;A<x;++A)f[I]=f[P],I+=l,P+=l;L-=h}for(I=L,P=0,A=0;A<x;++A)f[I]=F[P++],I+=l}c(F)}}},o={"uint32,1,0":function(d,c,i){return function u(f,s,h,p,a,x,l,w,_,T,k){var L,A,I,P,S,E,D,F,H,V,Z,K,q,W,$,R,N,U,Q,j,X,J,re,ne,se,oe=(s-f+1)/6|0,pe=f+oe,ce=s-oe,de=f+s>>1,xe=de-oe,we=de+oe,be=pe,Ee=xe,fe=de,me=we,Te=ce,_e=f+1,Ae=s-1,Pe=!0,De=0,Ve=0,Qe=0,Oe=w,Ue=c(Oe),Ge=c(Oe);Z=a*be,K=a*Ee,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=be,be=Ee,Ee=A;break e}if(Qe<0)break e;se+=T}Z=a*me,K=a*Te,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=me,me=Te,Te=A;break e}if(Qe<0)break e;se+=T}Z=a*be,K=a*fe,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=be,be=fe,fe=A;break e}if(Qe<0)break e;se+=T}Z=a*Ee,K=a*fe,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=Ee,Ee=fe,fe=A;break e}if(Qe<0)break e;se+=T}Z=a*be,K=a*me,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=be,be=me,me=A;break e}if(Qe<0)break e;se+=T}Z=a*fe,K=a*me,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=fe,fe=me,me=A;break e}if(Qe<0)break e;se+=T}Z=a*Ee,K=a*Te,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=Ee,Ee=Te,Te=A;break e}if(Qe<0)break e;se+=T}Z=a*Ee,K=a*fe,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=Ee,Ee=fe,fe=A;break e}if(Qe<0)break e;se+=T}Z=a*me,K=a*Te,se=p;e:for(V=0;V<w;++V){if(F=K+se,(Qe=h[D=Z+se]-h[F])>0){A=me,me=Te,Te=A;break e}if(Qe<0)break e;se+=T}for(Z=a*be,K=a*Ee,q=a*fe,W=a*me,$=a*Te,R=a*pe,N=a*de,U=a*ce,ne=0,se=p,V=0;V<w;++V)D=Z+se,F=K+se,H=q+se,Q=W+se,j=$+se,X=R+se,J=N+se,re=U+se,Ue[ne]=h[F],Ge[ne]=h[Q],Pe=Pe&&Ue[ne]===Ge[ne],I=h[D],P=h[H],S=h[j],h[X]=I,h[J]=P,h[re]=S,++ne,se+=_;for(Z=a*xe,K=a*f,se=p,V=0;V<w;++V)F=K+se,h[D=Z+se]=h[F],se+=_;for(Z=a*we,K=a*s,se=p,V=0;V<w;++V)F=K+se,h[D=Z+se]=h[F],se+=_;if(Pe)for(E=_e;E<=Ae;++E){for(D=p+E*a,ne=0,V=0;V<w&&(Qe=h[D]-Ue[ne])===0;++V)ne+=k,D+=T;if(Qe!==0)if(Qe<0){if(E!==_e)for(Z=a*E,K=a*_e,se=p,V=0;V<w;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;++_e}else for(;;){for(D=p+Ae*a,ne=0,V=0;V<w&&(Qe=h[D]-Ue[ne])===0;++V)ne+=k,D+=T;if(!(Qe>
35250)){if(Qe<0){for(Z=a*E,K=a*_e,q=a*Ae,se=p,V=0;V<w;++V)F=K+se,H=q+se,L=h[D=Z+se],h[D]=h[F],h[F]=h[H],h[H]=L,se+=_;++_e,--Ae;break}for(Z=a*E,K=a*Ae,se=p,V=0;V<w;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;--Ae;break}Ae--}}else for(E=_e;E<=Ae;++E){for(D=p+E*a,ne=0,V=0;V<w&&(De=h[D]-Ue[ne])===0;++V)ne+=k,D+=T;if(De<0){if(E!==_e)for(Z=a*E,K=a*_e,se=p,V=0;V<w;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;++_e}else{for(D=p+E*a,ne=0,V=0;V<w&&(Ve=h[D]-Ge[ne])===0;++V)ne+=k,D+=T;if(Ve>0)for(;;){for(D=p+Ae*a,ne=0,V=0;V<w&&(Qe=h[D]-Ge[ne])===0;++V)ne+=k,D+=T;if(!(Qe>0)){for(D=p+Ae*a,ne=0,V=0;V<w&&(Qe=h[D]-Ue[ne])===0;++V)ne+=k,D+=T;if(Qe<0){for(Z=a*E,K=a*_e,q=a*Ae,se=p,V=0;V<w;++V)F=K+se,H=q+se,L=h[D=Z+se],h[D]=h[F],h[F]=h[H],h[H]=L,se+=_;++_e,--Ae}else{for(Z=a*E,K=a*Ae,se=p,V=0;V<w;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;--Ae}break}if(--Ae<E)break}}}for(Z=a*f,K=a*(_e-1),ne=0,se=p,V=0;V<w;++V)F=K+se,h[D=Z+se]=h[F],h[F]=Ue[ne],++ne,se+=_;for(Z=a*s,K=a*(Ae+1),ne=0,se=p,V=0;V<w;++V)F=K+se,h[D=Z+se]=h[F],h[F]=Ge[ne],++ne,se+=_;if(_e-2-f<=32?d(f,_e-2,h,p,a,x,l,w,_,T,k):u(f,_e-2,h,p,a,x,l,w,_,T,k),s-(Ae+2)<=32?d(Ae+2,s,h,p,a,x,l,w,_,T,k):u(Ae+2,s,h,p,a,x,l,w,_,T,k),Pe)return i(Ue),void i(Ge);if(_e<pe&&Ae>ce){e:for(;;){for(D=p+_e*a,ne=0,se=p,V=0;V<w;++V){if(h[D]!==Ue[ne])break e;++ne,D+=_}++_e}e:for(;;){for(D=p+Ae*a,ne=0,se=p,V=0;V<w;++V){if(h[D]!==Ge[ne])break e;++ne,D+=_}--Ae}for(E=_e;E<=Ae;++E){for(D=p+E*a,ne=0,V=0;V<w&&(De=h[D]-Ue[ne])===0;++V)ne+=k,D+=T;if(De===0){if(E!==_e)for(Z=a*E,K=a*_e,se=p,V=0;V<w;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;++_e}else{for(D=p+E*a,ne=0,V=0;V<w&&(Ve=h[D]-Ge[ne])===0;++V)ne+=k,D+=T;if(Ve===0)for(;;){for(D=p+Ae*a,ne=0,V=0;V<w&&(Qe=h[D]-Ge[ne])===0;++V)ne+=k,D+=T;if(Qe!==0){for(D=p+Ae*a,ne=0,V=0;V<w&&(Qe=h[D]-Ue[ne])===0;++V)ne+=k,D+=T;if(Qe<0){for(Z=a*E,K=a*_e,q=a*Ae,se=p,V=0;V<w;++V)F=K+se,H=q+se,L=h[D=Z+se],h[D]=h[F],h[F]=h[H],h[H]=L,se+=_;++_e,--Ae}else{for(Z=a*E,K=a*Ae,se=p,V=0;V<w;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;--Ae}break}if(--Ae<E)break}}}}i(Ue),i(Ge),Ae-_e<=32?d(_e,Ae,h,p,a,x,l,w,_,T,k):u(_e,Ae,h,p,a,x,l,w,_,T,k)}}},r={"uint32,1,0":function(d,c){return function(i){var u=i.data,f=0|i.offset,s=i.shape,h=i.stride,p=0|h[0],a=0|s[0],x=0|h[1],l=0|s[1],w=x,_=x;a<=32?d(0,a-1,u,f,p,x,a,l,w,_,1):c(0,a-1,u,f,p,x,a,l,w,_,1)}}};b.exports=function(d,c){var i=[c,d].join(","),u=r[i],f=function(h,p){var a=n(p),x=[p,h].join(","),l=t[x];return a?l(a[0],a[1]):l()}(d,c),s=function(h,p,a){var x=n(p),l=[p,h].join(","),w=o[l];return h.length>1&&x?w(a,x[0],x[1]):w(a)}(d,c,f);return u(f,s)}},{"typedarray-pool":308}],258:[function(m,b,v){var e=m("./lib/compile_sort.js"),n={};b.exports=function(t){var o=t.order,r=t.dtype,d=[o,r].join(":"),c=n[d];return c||(n[d]=c=e(o,r)),c(t),t}},{"./lib/compile_sort.js":257}],259:[function(m,b,v){var e=m("is-buffer"),n=typeof Float64Array<"u";function t(i,u){return i[0]-u[0]}function o(){var i,u=this.stride,f=new Array(u.length);for(i=0;i<f.length;++i)f[i]=[Math.abs(u[i]),i];f.sort(t);var s=new Array(f.length);for(i=0;i<s.length;++i)s[i]=f[i][1];return s}var r={T:function(i){function u(s){this.data=s}var f=u.prototype;return f.dtype=i,f.index=function(){return-1},f.size=0,f.dimension=-1,f.shape=f.stride=f.order=[],f.lo=f.hi=f.transpose=f.step=function(){return new u(this.data)},f.get=f.set=function(){},f.pick=function(){return null},function(s){return new u(s)}},0:function(i,u){function f(h,p){this.data=h,this.offset=p}var s=f.prototype;return s.dtype=i,s.index=function(){return this.offset},s.dimension=0,s.size=1,s.shape=s.stride=s.order=[],s.lo=s.hi=s.transpose=s.step=function(){return new f(this.data,this.offset)},s.pick=function(){return u(this.data)},s.valueOf=s.get=function(){return i==="generic"?this.data.get(this.offset):this.data[this.offset]},s.set=function(h){return i==="generic"?this.data.set(this.offset,h):this.data[this.offset]=h},function(h,p,a,x){return new f(h,x)}},1:function(i,u,f){function s(p,a,x,l){this.data=p,this.shape=[a],this.stride=[x],this.offset=0|l}var h=s.prototype;return h.dtype=i,h.dimension=1,Object.defineProperty(h,"size",{get:function(){return this.shape[0]}}),h.order=[0],h.set=function(p,a){return i==="generic"?this.data.set(this.offset+this.stride[0]*p,a):this.data[this.offset+this.stride[0]*p]=a},h.get=function(p){return i==="generic"?this.data.get(this.offset+this.stride[0]*p):this.data[this.offset+this.stride[0]*p]},h.index=function(p){return this.offset+this.stride[0]*p}
3525,h.hi=function(p){return new s(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,this.stride[0],this.offset)},h.lo=function(p){var a=this.offset,x=0,l=this.shape[0],w=this.stride[0];return typeof p=="number"&&p>=0&&(a+=w*(x=0|p),l-=x),new s(this.data,l,w,a)},h.step=function(p){var a=this.shape[0],x=this.stride[0],l=this.offset,w=0,_=Math.ceil;return typeof p=="number"&&((w=0|p)<0?(l+=x*(a-1),a=_(-a/w)):a=_(a/w),x*=w),new s(this.data,a,x,l)},h.transpose=function(p){p=p===void 0?0:0|p;var a=this.shape,x=this.stride;return new s(this.data,a[p],x[p],this.offset)},h.pick=function(p){var a=[],x=[],l=this.offset;return typeof p=="number"&&p>=0?l=l+this.stride[0]*p|0:(a.push(this.shape[0]),x.push(this.stride[0])),(0,u[a.length+1])(this.data,a,x,l)},function(p,a,x,l){return new s(p,a[0],x[0],l)}},2:function(i,u,f){function s(p,a,x,l,w,_){this.data=p,this.shape=[a,x],this.stride=[l,w],this.offset=0|_}var h=s.prototype;return h.dtype=i,h.dimension=2,Object.defineProperty(h,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(h,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),h.set=function(p,a,x){return i==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*a,x):this.data[this.offset+this.stride[0]*p+this.stride[1]*a]=x},h.get=function(p,a){return i==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*a):this.data[this.offset+this.stride[0]*p+this.stride[1]*a]},h.index=function(p,a){return this.offset+this.stride[0]*p+this.stride[1]*a},h.hi=function(p,a){return new s(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,typeof a!="number"||a<0?this.shape[1]:0|a,this.stride[0],this.stride[1],this.offset)},h.lo=function(p,a){var x=this.offset,l=0,w=this.shape[0],_=this.shape[1],T=this.stride[0],k=this.stride[1];return typeof p=="number"&&p>=0&&(x+=T*(l=0|p),w-=l),typeof a=="number"&&a>=0&&(x+=k*(l=0|a),_-=l),new s(this.data,w,_,T,k,x)},h.step=function(p,a){var x=this.shape[0],l=this.shape[1],w=this.stride[0],_=this.stride[1],T=this.offset,k=0,L=Math.ceil;return typeof p=="number"&&((k=0|p)<0?(T+=w*(x-1),x=L(-x/k)):x=L(x/k),w*=k),typeof a=="number"&&((k=0|a)<0?(T+=_*(l-1),l=L(-l/k)):l=L(l/k),_*=k),new s(this.data,x,l,w,_,T)},h.transpose=function(p,a){p=p===void 0?0:0|p,a=a===void 0?1:0|a;var x=this.shape,l=this.stride;return new s(this.data,x[p],x[a],l[p],l[a],this.offset)},h.pick=function(p,a){var x=[],l=[],w=this.offset;return typeof p=="number"&&p>=0?w=w+this.stride[0]*p|0:(x.push(this.shape[0]),l.push(this.stride[0])),typeof a=="number"&&a>=0?w=w+this.stride[1]*a|0:(x.push(this.shape[1]),l.push(this.stride[1])),(0,u[x.length+1])(this.data,x,l,w)},function(p,a,x,l){return new s(p,a[0],a[1],x[0],x[1],l)}},3:function(i,u,f){function s(p,a,x,l,w,_,T,k){this.data=p,this.shape=[a,x,l],this.stride=[w,_,T],this.offset=0|k}var h=s.prototype;return h.dtype=i,h.dimension=3,Object.defineProperty(h,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(h,"order",{get:function(){var p=Math.abs(this.stride[0]),a=Math.abs(this.stride[1]),x=Math.abs(this.stride[2]);return p>a?a>x?[2,1,0]:p>x?[1,2,0]:[1,0,2]:p>x?[2,0,1]:x>a?[0,1,2]:[0,2,1]}}),h.set=function(p,a,x,l){return i==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x,l):this.data[this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x]=l},h.get=function(p,a,x){return i==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x):this.data[this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x]},h.index=function(p,a,x){return this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x},h.hi=function(p,a,x){return new s(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,typeof a!="number"||a<0?this.shape[1]:0|a,typeof x!="number"||x<0?this.shape[2]:0|x,this.stride[0],this.stride[1],this.stride[2],this.offset)},h.lo=function(p,a,x){var l=this.offset,w=0,_=this.shape[0],T=this.shape[1],k=this.shape[2],L=this.stride[0],A=this.stride[1],I=this.stride[2];return typeof p=="number"&&p>=0&&(l+=L*(w=0|p),_-=w),typeof a=="number"&&a>=0&&(l+=A*(w=0|a),T-=w),typeof x=="number"&&x>=0&&(l+=I*(w=0|x),k-=w),new s(this.data,_,T,k,L,A,I,l)},h.step=function(p,a,x){var l=this.shape[0],w=this.shape[1],_=this.shape[2],T=this.stride[0],k=this.stride[1],L=this.stride[2],A=this.offset,I=0,P=Math.ceil;return typeof p=="number"&&((I=0|p)<0?(A+=T*(l-1),l=P(-l/I)):l=P(l/I),T*=I),typeof a=="number"&&((I=0|a)<0?(A+=k*(w-1),w=P(-w/I)):w=P(w/I),k*=I),typeof x=="number"&&((I=0|x)<0?(A+=L*(_-1),_=P(-_/I)):_=P(_/I),L*=I),new s(this.data,l,w,_,T,k,L,A)},h.transpose=function(p,a,x){p=p===void 0?0:0|p,a=a===void 0?1:0|a,x=x===void 0?2:0|x;var l=this.shape,w=this.stride;return new s(this.data,l[p],l[a],l[x],w[p],w[a],w[x],this.offset)},h.pick=function(p,a,x){var l=[],w=[],_=this.offset;return typeof p=="number"&&p>=0?_=_+this.stride[0]*p|0:(l.push(this.shape[0]),w.push(this.stride[0])),typeof a=="number"&&a>=0?_=_+this.stride[1]*a|0:(l.push(this.shape[1]),w.push(this.stride[1])),typeof x=="number"&&x>=0?_=_+this.stride[2]*x|0:(l.push(this.shape[2]),w.push(this.stride[2])),(0,u[l.length+1])(this.data,l,w,_)},function(p,a,x,l){return new s(p,a[0],a[1],a[2],x[0],x[1],x[2],l)}},4:function(i,u,f){function s(p,a,x,l,w,_,T,k,L,A){this.data=p,this.shape=[a,x,l,w],this.stride=[_,T,k,L],this.offset=0|A}var h=s.prototype;return h.dtype=i,h.dimension=4,Object.defineProperty(h,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(h,"order",{get:f}),h.set=function(p,a,x,l,w){return i==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l,w):this.data[this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l]=w},h.get=function(p,a,x,l){return i==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l):this.data[this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l]},h.index=function(p,a,x,l){return this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l}
3525,h.hi=function(p,a,x,l){return new s(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,typeof a!="number"||a<0?this.shape[1]:0|a,typeof x!="number"||x<0?this.shape[2]:0|x,typeof l!="number"||l<0?this.shape[3]:0|l,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},h.lo=function(p,a,x,l){var w=this.offset,_=0,T=this.shape[0],k=this.shape[1],L=this.shape[2],A=this.shape[3],I=this.stride[0],P=this.stride[1],S=this.stride[2],E=this.stride[3];return typeof p=="number"&&p>=0&&(w+=I*(_=0|p),T-=_),typeof a=="number"&&a>=0&&(w+=P*(_=0|a),k-=_),typeof x=="number"&&x>=0&&(w+=S*(_=0|x),L-=_),typeof l=="number"&&l>=0&&(w+=E*(_=0|l),A-=_),new s(this.data,T,k,L,A,I,P,S,E,w)},h.step=function(p,a,x,l){var w=this.shape[0],_=this.shape[1],T=this.shape[2],k=this.shape[3],L=this.stride[0],A=this.stride[1],I=this.stride[2],P=this.stride[3],S=this.offset,E=0,D=Math.ceil;return typeof p=="number"&&((E=0|p)<0?(S+=L*(w-1),w=D(-w/E)):w=D(w/E),L*=E),typeof a=="number"&&((E=0|a)<0?(S+=A*(_-1),_=D(-_/E)):_=D(_/E),A*=E),typeof x=="number"&&((E=0|x)<0?(S+=I*(T-1),T=D(-T/E)):T=D(T/E),I*=E),typeof l=="number"&&((E=0|l)<0?(S+=P*(k-1),k=D(-k/E)):k=D(k/E),P*=E),new s(this.data,w,_,T,k,L,A,I,P,S)},h.transpose=function(p,a,x,l){p=p===void 0?0:0|p,a=a===void 0?1:0|a,x=x===void 0?2:0|x,l=l===void 0?3:0|l;var w=this.shape,_=this.stride;return new s(this.data,w[p],w[a],w[x],w[l],_[p],_[a],_[x],_[l],this.offset)},h.pick=function(p,a,x,l){var w=[],_=[],T=this.offset;return typeof p=="number"&&p>=0?T=T+this.stride[0]*p|0:(w.push(this.shape[0]),_.push(this.stride[0])),typeof a=="number"&&a>=0?T=T+this.stride[1]*a|0:(w.push(this.shape[1]),_.push(this.stride[1])),typeof x=="number"&&x>=0?T=T+this.stride[2]*x|0:(w.push(this.shape[2]),_.push(this.stride[2])),typeof l=="number"&&l>=0?T=T+this.stride[3]*l|0:(w.push(this.shape[3]),_.push(this.stride[3])),(0,u[w.length+1])(this.data,w,_,T)},function(p,a,x,l){return new s(p,a[0],a[1],a[2],a[3],x[0],x[1],x[2],x[3],l)}},5:function(i,u,f){function s(p,a,x,l,w,_,T,k,L,A,I,P){this.data=p,this.shape=[a,x,l,w,_],this.stride=[T,k,L,A,I],this.offset=0|P}var h=s.prototype;return h.dtype=i,h.dimension=5,Object.defineProperty(h,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(h,"order",{get:f}),h.set=function(p,a,x,l,w,_){return i==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l+this.stride[4]*w,_):this.data[this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l+this.stride[4]*w]=_},h.get=function(p,a,x,l,w){return i==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l+this.stride[4]*w):this.data[this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l+this.stride[4]*w]},h.index=function(p,a,x,l,w){return this.offset+this.stride[0]*p+this.stride[1]*a+this.stride[2]*x+this.stride[3]*l+this.stride[4]*w},h.hi=function(p,a,x,l,w){return new s(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,typeof a!="number"||a<0?this.shape[1]:0|a,typeof x!="number"||x<0?this.shape[2]:0|x,typeof l!="number"||l<0?this.shape[3]:0|l,typeof w!="number"||w<0?this.shape[4]:0|w,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},h.lo=function(p,a,x,l,w){var _=this.offset,T=0,k=this.shape[0],L=this.shape[1],A=this.shape[2],I=this.shape[3],P=this.shape[4],S=this.stride[0],E=this.stride[1],D=this.stride[2],F=this.stride[3],H=this.stride[4];return typeof p=="number"&&p>=0&&(_+=S*(T=0|p),k-=T),typeof a=="number"&&a>=0&&(_+=E*(T=0|a),L-=T),typeof x=="number"&&x>=0&&(_+=D*(T=0|x),A-=T),typeof l=="number"&&l>=0&&(_+=F*(T=0|l),I-=T),typeof w=="number"&&w>=0&&(_+=H*(T=0|w),P-=T),new s(this.data,k,L,A,I,P,S,E,D,F,H,_)},h.step=function(p,a,x,l,w){var _=this.shape[0],T=this.shape[1],k=this.shape[2],L=this.shape[3],A=this.shape[4],I=this.stride[0],P=this.stride[1],S=this.stride[2],E=this.stride[3],D=this.stride[4],F=this.offset,H=0,V=Math.ceil;return typeof p=="number"&&((H=0|p)<0?(F+=I*(_-1),_=V(-_/H)):_=V(_/H),I*=H),typeof a=="number"&&((H=0|a)<0?(F+=P*(T-1),T=V(-T/H)):T=V(T/H),P*=H),typeof x=="number"&&((H=0|x)<0?(F+=S*(k-1),k=V(-k/H)):k=V(k/H),S*=H),typeof l=="number"&&((H=0|l)<0?(F+=E*(L-1),L=V(-L/H)):L=V(L/H),E*=H),typeof w=="number"&&((H=0|w)<0?(F+=D*(A-1),A=V(-A/H)):A=V(A/H),D*=H),new s(this.data,_,T,k,L,A,I,P,S,E,D,F)},h.transpose=function(p,a,x,l,w){p=p===void 0?0:0|p,a=a===void 0?1:0|a,x=x===void 0?2:0|x,l=l===void 0?3:0|l,w=w===void 0?4:0|w;var _=this.shape,T=this.stride;return new s(this.data,_[p],_[a],_[x],_[l],_[w],T[p],T[a],T[x],T[l],T[w],this.offset)},h.pick=function(p,a,x,l,w){var _=[],T=[],k=this.offset;return typeof p=="number"&&p>=0?k=k+this.stride[0]*p|0:(_.push(this.shape[0]),T.push(this.stride[0])),typeof a=="number"&&a>=0?k=k+this.stride[1]*a|0:(_.push(this.shape[1]),T.push(this.stride[1])),typeof x=="number"&&x>=0?k=k+this.stride[2]*x|0:(_.push(this.shape[2]),T.push(this.stride[2])),typeof l=="number"&&l>=0?k=k+this.stride[3]*l|0:(_.push(this.shape[3]),T.push(this.stride[3])),typeof w=="number"&&w>=0?k=k+this.stride[4]*w|0:(_.push(this.shape[4]),T.push(this.stride[4])),(0,u[_.length+1])(this.data,_,T,k)},function(p,a,x,l){return new s(p,a[0],a[1],a[2],a[3],a[4],x[0],x[1],x[2],x[3],x[4],l)}}};function d(i,u){var f=u===-1?"T":String(u),s=r[f];return u===-1?s(i):u===0?s(i,c[i][0]):s(i,c[i],o)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};b.exports=function(i,u,f,s){if(i===void 0)return(0,c.array[0])([]);typeof i=="number"&&(i=[i]),u===void 0&&(u=[i.length]);var h=u.length;if(f===void 0){f=new Array(h);for(var p=h-1,a=1;p>=0;--p)f[p]=a,a*=u[p]}if(s===void 0)for(s=0,p=0;p<h;++p)f[p]<0&&(s-=(u[p]-1)*f[p]);for(var x=function(w){if(e(w))return"buffer";if(n)switch(Object.prototype.toString.call(w)){case"[object Float64Array
3525]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(w)?"array":"generic"}(i),l=c[x];l.length<=h+1;)l.push(d(x,l.length-1));return(0,l[h+1])(i,u,f,s)}},{"is-buffer":237}],260:[function(m,b,v){var e=m("double-bits"),n=Math.pow(2,-1074);b.exports=function(t,o){if(isNaN(t)||isNaN(o))return NaN;if(t===o)return t;if(t===0)return o<0?-n:n;var r=e.hi(t),d=e.lo(t);return o>t==t>0?d===-1>>>0?(r+=1,d=0):d+=1:d===0?(d=-1>>>0,r-=1):d-=1,e.pack(d,r)}},{"double-bits":64}],261:[function(m,b,v){v.vertexNormals=function(e,n,t){for(var o=n.length,r=new Array(o),d=t===void 0?1e-6:t,c=0;c<o;++c)r[c]=[0,0,0];for(c=0;c<e.length;++c)for(var i=e[c],u=0,f=i[i.length-1],s=i[0],h=0;h<i.length;++h){u=f,f=s,s=i[(h+1)%i.length];for(var p=n[u],a=n[f],x=n[s],l=new Array(3),w=0,_=new Array(3),T=0,k=0;k<3;++k)l[k]=p[k]-a[k],w+=l[k]*l[k],_[k]=x[k]-a[k],T+=_[k]*_[k];if(w*T>d){var L=r[f],A=1/Math.sqrt(w*T);for(k=0;k<3;++k){var I=(k+1)%3,P=(k+2)%3;L[k]+=A*(_[I]*l[P]-_[P]*l[I])}}}for(c=0;c<o;++c){L=r[c];var S=0;for(k=0;k<3;++k)S+=L[k]*L[k];if(S>d)for(A=1/Math.sqrt(S),k=0;k<3;++k)L[k]*=A;else for(k=0;k<3;++k)L[k]=0}return r},v.faceNormals=function(e,n,t){for(var o=e.length,r=new Array(o),d=t===void 0?1e-6:t,c=0;c<o;++c){for(var i=e[c],u=new Array(3),f=0;f<3;++f)u[f]=n[i[f]];var s=new Array(3),h=new Array(3);for(f=0;f<3;++f)s[f]=u[1][f]-u[0][f],h[f]=u[2][f]-u[0][f];var p=new Array(3),a=0;for(f=0;f<3;++f){var x=(f+1)%3,l=(f+2)%3;p[f]=s[x]*h[l]-s[l]*h[x],a+=p[f]*p[f]}for(a=a>d?1/Math.sqrt(a):0,f=0;f<3;++f)p[f]*=a;r[c]=p}return r}},{}],262:[function(m,b,v){b.exports=function(e,n,t,o,r,d,c,i,u,f){var s=n+d+f;if(h>0){var h=Math.sqrt(s+1);e[0]=.5*(c-u)/h,e[1]=.5*(i-o)/h,e[2]=.5*(t-d)/h,e[3]=.5*h}else{var p=Math.max(n,d,f);h=Math.sqrt(2*p-s+1),n>=p?(e[0]=.5*h,e[1]=.5*(r+t)/h,e[2]=.5*(i+o)/h,e[3]=.5*(c-u)/h):d>=p?(e[0]=.5*(t+r)/h,e[1]=.5*h,e[2]=.5*(u+c)/h,e[3]=.5*(i-o)/h):(e[0]=.5*(o+i)/h,e[1]=.5*(c+u)/h,e[2]=.5*h,e[3]=.5*(t-r)/h)}return e}},{}],263:[function(m,b,v){b.exports=function(s){var h=(s=s||{}).center||[0,0,0],p=s.rotation||[0,0,0,1],a=s.radius||1;h=[].slice.call(h,0,3),i(p=[].slice.call(p,0,4),p);var x=new u(p,h,Math.log(a));return x.setDistanceLimits(s.zoomMin,s.zoomMax),("eye"in s||"up"in s)&&x.lookAt(0,s.eye,s.center,s.up),x};var e=m("filtered-vector"),n=m("gl-mat4/lookAt"),t=m("gl-mat4/fromQuat"),o=m("gl-mat4/invert"),r=m("./lib/quatFromFrame");function d(s,h,p){return Math.sqrt(Math.pow(s,2)+Math.pow(h,2)+Math.pow(p,2))}function c(s,h,p,a){return Math.sqrt(Math.pow(s,2)+Math.pow(h,2)+Math.pow(p,2)+Math.pow(a,2))}function i(s,h){var p=h[0],a=h[1],x=h[2],l=h[3],w=c(p,a,x,l);w>1e-6?(s[0]=p/w,s[1]=a/w,s[2]=x/w,s[3]=l/w):(s[0]=s[1]=s[2]=0,s[3]=1)}function u(s,h,p){this.radius=e([p]),this.center=e(h),this.rotation=e(s),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var f=u.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(s){this.radius.curve(s),this.center.curve(s),this.rotation.curve(s);var h=this.computedRotation;i(h,h);var p=this.computedMatrix;t(p,h);var a=this.computedCenter,x=this.computedEye,l=this.computedUp,w=Math.exp(this.computedRadius[0]);x[0]=a[0]+w*p[2],x[1]=a[1]+w*p[6],x[2]=a[2]+w*p[10],l[0]=p[1],l[1]=p[5],l[2]=p[9];for(var _=0;_<3;++_){for(var T=0,k=0;k<3;++k)T+=p[_+4*k]*x[k];p[12+_]=-T}},f.getMatrix=function(s,h){this.recalcMatrix(s);var p=this.computedMatrix;if(h){for(var a=0;a<16;++a)h[a]=p[a];return h}return p},f.idle=function(s){this.center.idle(s),this.radius.idle(s),this.rotation.idle(s)},f.flush=function(s){this.center.flush(s),this.radius.flush(s),this.rotation.flush(s)},f.pan=function(s,h,p,a){h=h||0,p=p||0,a=a||0,this.recalcMatrix(s);var x=this.computedMatrix,l=x[1],w=x[5],_=x[9],T=d(l,w,_);l/=T,w/=T,_/=T;var k=x[0],L=x[4],A=x[8],I=k*l+L*w+A*_,P=d(k-=l*I,L-=w*I,A-=_*I);k/=P,L/=P,A/=P,x[2],x[6],x[10];var S=k*h+l*p,E=L*h+w*p,D=A*h+_*p;this.center.move(s,S,E,D);var F=Math.exp(this.computedRadius[0]);F=Math.max(1e-4,F+a),this.radius.set(s,Math.log(F))},f.rotate=function(s,h,p,a){this.recalcMatrix(s),h=h||0,p=p||0;var x=this.computedMatrix,l=x[0],w=x[4],_=x[8],T=x[1],k=x[5],L=x[9],A=x[2],I=x[6],P=x[10],S=h*l+p*T,E=h*w+p*k,D=h*_+p*L,F=-(I*D-P*E),H=-(P*S-A*D),V=-(A*E-I*S),Z=Math.sqrt(Math.max(0,1-Math.pow(F,2)-Math.pow(H,2)-Math.pow(V,2))),K=c(F,H,V,Z);K>1e-6?(F/=K,H/=K,V/=K,Z/=K):(F=H=V=0,Z=1);var q=this.computedRotation,W=q[0],$=q[1],R=q[2],N=q[3],U=W*Z+N*F+$*V-R*H,Q=$*Z+N*H+R*F-W*V,j=R*Z+N*V+W*H-$*F,X=N*Z-W*F-$*H-R*V;if(a){F=A,H=I,V=P;var J=Math.sin(a)/d(F,H,V);F*=J,H*=J,V*=J,X=X*(Z=Math.cos(h))-(U=U*Z+X*F+Q*V-j*H)*F-(Q=Q*Z+X*H+j*F-U*V)*H-(j=j*Z+X*V+U*H-Q*F)*V}var re=c(U,Q,j,X);re>1e-6?(U/=re,Q/=re,j/=re,X/=re):(U=Q=j=0,X=1),this.rotation.set(s,U,Q,j,X)},f.lookAt=function(s,h,p,a){this.recalcMatrix(s),p=p||this.computedCenter,h=h||this.computedEye,a=a||this.computedUp;var x=this.computedMatrix;n(x,h,p,a);var l=this.computedRotation;r(l,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),i(l,l),this.rotation.set(s,l[0],l[1],l[2],l[3]);for(var w=0,_=0;_<3;++_)w+=Math.pow(p[_]-h[_],2);this.radius.set(s,.5*Math.log(Math.max(w,1e-6))),this.center.set(s,p[0],p[1],p[2])},f.translate=function(s,h,p,a){this.center.move(s,h||0,p||0,a||0)}
3525,f.setMatrix=function(s,h){var p=this.computedRotation;r(p,h[0],h[1],h[2],h[4],h[5],h[6],h[8],h[9],h[10]),i(p,p),this.rotation.set(s,p[0],p[1],p[2],p[3]);var a=this.computedMatrix;o(a,h);var x=a[15];if(Math.abs(x)>1e-6){var l=a[12]/x,w=a[13]/x,_=a[14]/x;this.recalcMatrix(s);var T=Math.exp(this.computedRadius[0]);this.center.set(s,l-a[2]*T,w-a[6]*T,_-a[10]*T),this.radius.idle(s)}else this.center.idle(s),this.radius.idle(s)},f.setDistance=function(s,h){h>0&&this.radius.set(s,Math.log(h))},f.setDistanceLimits=function(s,h){s=s>0?Math.log(s):-1/0,h=h>0?Math.log(h):1/0,h=Math.max(h,s),this.radius.bounds[0][0]=s,this.radius.bounds[1][0]=h},f.getDistanceLimits=function(s){var h=this.radius.bounds;return s?(s[0]=Math.exp(h[0][0]),s[1]=Math.exp(h[1][0]),s):[Math.exp(h[0][0]),Math.exp(h[1][0])]},f.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},f.fromJSON=function(s){var h=this.lastT(),p=s.center;p&&this.center.set(h,p[0],p[1],p[2]);var a=s.rotation;a&&this.rotation.set(h,a[0],a[1],a[2],a[3]);var x=s.distance;x&&x>0&&this.radius.set(h,Math.log(x)),this.setDistanceLimits(s.zoomMin,s.zoomMax)}},{"./lib/quatFromFrame":262,"filtered-vector":68,"gl-mat4/fromQuat":95,"gl-mat4/invert":98,"gl-mat4/lookAt":99}],264:[function(m,b,v){var e=m("repeat-string");b.exports=function(n,t,o){return e(o=o!==void 0?o+"":" ",t)+n}},{"repeat-string":277}
3525],265:[function(m,b,v){b.exports=function(e,n){n||(n=[0,""]),e=String(e);var t=parseFloat(e,10);return n[0]=t,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},{}],266:[function(m,b,v){b.exports=function(n,t){for(var o=0|t.length,r=n.length,d=[new Array(o),new Array(o)],c=0;c<o;++c)d[0][c]=[],d[1][c]=[];for(c=0;c<r;++c){var i=n[c];d[0][i[0]].push(i),d[1][i[1]].push(i)}var u=[];for(c=0;c<o;++c)d[0][c].length+d[1][c].length===0&&u.push([c]);function f(w,_){var T=d[_][w[_]];T.splice(T.indexOf(w),1)}function s(w,_,T){for(var k,L,A,I=0;I<2;++I)if(d[I][_].length>0){k=d[I][_][0],A=I;break}L=k[1^A];for(var P=0;P<2;++P)for(var S=d[P][_],E=0;E<S.length;++E){var D=S[E],F=D[1^P];e(t[w],t[_],t[L],t[F])>0&&(k=D,L=F,A=P)}return T||k&&f(k,A),L}function h(w,_){var T=d[_][w][0],k=[w];f(T,_);for(var L=T[1^_];;){for(;L!==w;)k.push(L),L=s(k[k.length-2],L,!1);if(d[0][w].length+d[1][w].length===0)break;var A=k[k.length-1],I=w,P=k[1],S=s(A,I,!0);if(e(t[A],t[I],t[P],t[S])<0)break;k.push(w),L=s(A,I)}return k}function p(w,_){return _[1]===_[_.length-1]}for(c=0;c<o;++c)for(var a=0;a<2;++a){for(var x=[];d[a][c].length>0;){d[0][c].length;var l=h(c,a);p(0,l)?x.push.apply(x,l):(x.length>0&&u.push(x),x=l)}x.length>0&&u.push(x)}return u};var e=m("compare-angle")},{"compare-angle":54}],267:[function(m,b,v){b.exports=function(n,t){for(var o=e(n,t.length),r=new Array(t.length),d=new Array(t.length),c=[],i=0;i<t.length;++i){var u=o[i].length;d[i]=u,r[i]=!0,u<=1&&c.push(i)}for(;c.length>0;){var f=c.pop();r[f]=!1;var s=o[f];for(i=0;i<s.length;++i){var h=s[i];--d[h]==0&&c.push(h)}}var p=new Array(t.length),a=[];for(i=0;i<t.length;++i)r[i]?(f=a.length,p[i]=f,a.push(t[i])):p[i]=-1;var x=[];for(i=0;i<n.length;++i){var l=n[i];r[l[0]]&&r[l[1]]&&x.push([p[l[0]],p[l[1]]])}return[x,a]};var e=m("edges-to-adjacency-list")},{"edges-to-adjacency-list":66}],268:[function(m,b,v){b.exports=function(u,f){var s=c(u,f);u=s[0];for(var h=(f=s[1]).length,p=(u.length,e(u,f.length)),a=0;a<h;++a)if(p[a].length%2==1)throw new Error("planar-graph-to-polyline: graph must be manifold");var x=n(u,f),l=(x=x.filter(function(oe){for(var pe=oe.length,ce=[0],de=0;de<pe;++de){var xe=f[oe[de]],we=f[oe[(de+1)%pe]],be=o(-xe[0],xe[1]),Ee=o(-xe[0],we[1]),fe=o(we[0],xe[1]),me=o(we[0],we[1]);ce=r(ce,r(r(be,Ee),r(fe,me)))}return ce[ce.length-1]>0})).length,w=new Array(l),_=new Array(l);for(a=0;a<l;++a){w[a]=a;var T=new Array(l),k=x[a].map(function(oe){return f[oe]}),L=t([k]),A=0;e:for(var I=0;I<l;++I)if(T[I]=0,a!==I){for(var P=(ne=x[I]).length,S=0;S<P;++S){var E=L(f[ne[S]]);if(E!==0){E<0&&(T[I]=1,A+=1);continue e}}T[I]=1,A+=1}_[a]=[A,a,T]}for(_.sort(function(oe,pe){return pe[0]-oe[0]}),a=0;a<l;++a){var D=(T=_[a])[1],F=T[2];for(I=0;I<l;++I)F[I]&&(w[I]=D)}var H=function(oe){for(var pe=new Array(oe),ce=0;ce<oe;++ce)pe[ce]=[];return pe}(l);for(a=0;a<l;++a)H[a].push(w[a]),H[w[a]].push(a);var V={},Z=i(h,!1);for(a=0;a<l;++a)for(P=(ne=x[a]).length,I=0;I<P;++I){var K=ne[I],q=ne[(I+1)%P],W=Math.min(K,q)+":"+Math.max(K,q);if(W in V){var $=V[W];H[$].push(a),H[a].push($),Z[K]=Z[q]=!0}else V[W]=a}function R(oe){for(var pe=oe.length,ce=0;ce<pe;++ce)if(!Z[oe[ce]])return!1;return!0}var N=[],U=i(l,-1);for(a=0;a<l;++a)w[a]!==a||R(x[a])?U[a]=-1:(N.push(a),U[a]=0);for(s=[];N.length>0;){var Q=N.pop(),j=H[Q];d(j,function(oe,pe){return oe-pe});var X,J=j.length,re=U[Q];if(re===0){var ne=x[Q];X=[ne]}for(a=0;a<J;++a){var se=j[a];U[se]>=0||(U[se]=1^re,N.push(se),re===0&&(R(ne=x[se])||(ne.reverse(),X.push(ne))))}re===0&&s.push(X)}return s};var e=m("edges-to-adjacency-list"),n=m("planar-dual"),t=m("point-in-big-polygon"),o=m("two-product"),r=m("robust-sum"),d=m("uniq"),c=m("./lib/trim-leaves");function i(u,f){for(var s=new Array(u),h=0;h<u;++h)s[h]=f;return s}},{"./lib/trim-leaves":267,"edges-to-adjacency-list":66,"planar-dual":266,"point-in-big-polygon":269,"robust-sum":289,"two-product":306,uniq:310}],269:[function(m,b,v){b.exports=function(i){for(var u=i.length,f=[],s=[],h=0;h<u;++h)for(var p=i[h],a=p.length,x=a-1,l=0;l<a;x=l++){var w=p[x],_=p[l];
3525w[0]===_[0]?s.push([w,_]):f.push([w,_])}if(f.length===0)return s.length===0?c:(T=d(s),function(A){return T(A[0],A[1])?0:1});var T,k=n(f),L=function(A,I){return function(P){var S=o.le(I,P[0]);if(S<0)return 1;var E=A[S];if(!E){if(!(S>0&&I[S]===P[0]))return 1;E=A[S-1]}for(var D=1;E;){var F=E.key,H=e(P,F[0],F[1]);if(F[0][0]<F[1][0])if(H<0)E=E.left;else{if(!(H>0))return 0;D=-1,E=E.right}else if(H>0)E=E.left;else{if(!(H<0))return 0;D=1,E=E.right}}return D}}(k.slabs,k.coordinates);return s.length===0?L:function(A,I){return function(P){return A(P[0],P[1])?0:I(P)}}(d(s),L)};var e=m("robust-orientation")[3],n=m("slab-decomposition"),t=m("interval-tree-1d"),o=m("binary-search-bounds");function r(){return!0}function d(i){for(var u={},f=0;f<i.length;++f){var s=i[f],h=s[0][0],p=s[0][1],a=s[1][1],x=[Math.min(p,a),Math.max(p,a)];h in u?u[h].push(x):u[h]=[x]}var l={},w=Object.keys(u);for(f=0;f<w.length;++f){var _=u[w[f]];l[w[f]]=t(_)}return function(T){return function(k,L){var A=T[k];return!!A&&!!A.queryPoint(L,r)}}(l)}function c(i){return 1}},{"binary-search-bounds":31,"interval-tree-1d":234,"robust-orientation":284,"slab-decomposition":299}],270:[function(m,b,v){var e=new Float64Array(4),n=new Float64Array(4),t=new Float64Array(4);b.exports=function(o,r,d,c,i){e.length<c.length&&(e=new Float64Array(c.length),n=new Float64Array(c.length),t=new Float64Array(c.length));for(var u=0;u<c.length;++u)e[u]=o[u]-c[u],n[u]=r[u]-o[u],t[u]=d[u]-o[u];var f=0,s=0,h=0,p=0,a=0,x=0;for(u=0;u<c.length;++u){var l=n[u],w=t[u],_=e[u];f+=l*l,s+=l*w,h+=w*w,p+=_*l,a+=_*w,x+=_*_}var T,k,L,A,I,P=Math.abs(f*h-s*s),S=s*a-h*p,E=s*p-f*a;if(S+E<=P)if(S<0)E<0&&p<0?(E=0,-p>=f?(S=1,T=f+2*p+x):T=p*(S=-p/f)+x):(S=0,a>=0?(E=0,T=x):-a>=h?(E=1,T=h+2*a+x):T=a*(E=-a/h)+x);else if(E<0)E=0,p>=0?(S=0,T=x):-p>=f?(S=1,T=f+2*p+x):T=p*(S=-p/f)+x;else{var D=1/P;T=(S*=D)*(f*S+s*(E*=D)+2*p)+E*(s*S+h*E+2*a)+x}else S<0?(L=h+a)>(k=s+p)?(A=L-k)>=(I=f-2*s+h)?(S=1,E=0,T=f+2*p+x):T=(S=A/I)*(f*S+s*(E=1-S)+2*p)+E*(s*S+h*E+2*a)+x:(S=0,L<=0?(E=1,T=h+2*a+x):a>=0?(E=0,T=x):T=a*(E=-a/h)+x):E<0?(L=f+p)>(k=s+a)?(A=L-k)>=(I=f-2*s+h)?(E=1,S=0,T=h+2*a+x):T=(S=1-(E=A/I))*(f*S+s*E+2*p)+E*(s*S+h*E+2*a)+x:(E=0,L<=0?(S=1,T=f+2*p+x):p>=0?(S=0,T=x):T=p*(S=-p/f)+x):(A=h+a-s-p)<=0?(S=0,E=1,T=h+2*a+x):A>=(I=f-2*s+h)?(S=1,E=0,T=f+2*p+x):T=(S=A/I)*(f*S+s*(E=1-S)+2*p)+E*(s*S+h*E+2*a)+x;var F=1-S-E;for(u=0;u<c.length;++u)i[u]=F*o[u]+S*r[u]+E*d[u];return T<0?0:T}},{}],271:[function(m,b,v){b.exports=m("gl-quat/slerp")},{"gl-quat/slerp":124}],272:[function(m,b,v){var e=m("big-rat/add");b.exports=function(n,t){for(var o=n.length,r=new Array(o),d=0;d<o;++d)r[d]=e(n[d],t[d]);return r}},{"big-rat/add":15}],273:[function(m,b,v){b.exports=function(n){for(var t=new Array(n.length),o=0;o<n.length;++o)t[o]=e(n[o]);return t};var e=m("big-rat")},{"big-rat":18}],274:[function(m,b,v){var e=m("big-rat"),n=m("big-rat/mul");b.exports=function(t,o){for(var r=e(o),d=t.length,c=new Array(d),i=0;i<d;++i)c[i]=n(t[i],r);return c}},{"big-rat":18,"big-rat/mul":27}],275:[function(m,b,v){var e=m("big-rat/sub");b.exports=function(n,t){for(var o=n.length,r=new Array(o),d=0;d<o;++d)r[d]=e(n[d],t[d]);return r}},{"big-rat/sub":29}],276:[function(m,b,v){var e=m("compare-cell"),n=m("compare-oriented-cell"),t=m("cell-orientation");b.exports=function(o){o.sort(n);for(var r=o.length,d=0,c=0;c<r;++c){var i=o[c],u=t(i);if(u!==0){if(d>0){var f=o[d-1];if(e(i,f)===0&&t(f)!==u){d-=1;continue}}o[d++]=i}}return o.length=d,o}},{"cell-orientation":47,"compare-cell":56,"compare-oriented-cell":57}],277:[function(m,b,v){var e,n="";b.exports=function(t,o){if(typeof t!="string")throw new TypeError("expected a string");if(o===1)return t;if(o===2)return t+t;var r=t.length*o;if(e!==t||e===void 0)e=t,n="";else if(n.length>=r)return n.substr(0,r);for(;r>n.length&&o>1;)1&o&&(n+=t),o>>=1,t+=t;return n=(n+=t).substr(0,r)}},{}],278:[function(m,b,v){(function(e){(function(){b.exports=e.performance&&e.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,g!==void 0?g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],279:[function(m,b,v){b.exports=function(e){for(var n=e.length,t=e[e.length-1],o=n,r=n-2;r>=0;--r){var d=t,c=e[r];(u=c-((t=d+c)-d))&&(e[--o]=t,t=u)}var i=0;for(r=o;r<n;++r){var u;d=e[r],(u=(c=t)-((t=d+c)-d))&&(e[i++]=u)}return e[i++]=t,e.length=i,e}},{}],280:[function(m,b,v){var e=m("two-product"),n=m("robust-sum"),t=m("robust-scale"),o=m("robust-compress");function r(h,p,a,x){return function(l){return x(h(a(l[0][0],l[1][1]),a(-l[0][1],l[1][0])))}}function d(h,p,a,x){return function(l){return x(h(p(h(a(l[1][1],l[2][2]),a(-l[1][2],l[2][1])),l[0][0]),h(p(h(a(l[1][0],l[2][2]),a(-l[1][2],l[2][0])),-l[0][1]),p(h(a(l[1][0],l[2][1]),a(-l[1][1],l[2][0])),l[0][2]))))}}function c(h,p,a,x){return function(l){return x(h(h(p(h(p(h(a(l[2][2],l[3][3]),a(-l[2][3],l[3][2])),l[1][1]),h(p(h(a(l[2][1],l[3][3]),a(-l[2][3],l[3][1])),-l[1][2]),p(h(a(l[2][1],l[3][2]),a(-l[2][2],l[3][1])),l[1][3]))),l[0][0]),p(h(p(h(a(l[2][2],l[3][3]),a(-l[2][3],l[3][2])),l[1][0]),h(p(h(a(l[2][0],l[3][3]),a(-l[2][3],l[3][0])),-l[1][2]),p(h(a(l[2][0],l[3][2]),a(-l[2][2],l[3][0])),l[1][3]))),-l[0][1])),h(p(h(p(h(a(l[2][1],l[3][3]),a(-l[2][3],l[3][1])),l[1][0]),h(p(h(a(l[2][0],l[3][3]),a(-l[2][3],l[3][0])),-l[1][1]),p(h(a(l[2][0],l[3][1]),a(-l[2][1],l[3][0])),l[1][3]))),l[0][2]),p(h(p(h(a(l[2][1],l[3][2]),a(-l[2][2],l[3][1])),l[1][0]),h(p(h(a(l[2][0],l[3][2]),a(-l[2][2],l[3][0])),-l[1][1]),p(h(a(l[2][0],l[3][1]),a(-l[2][1],l[3][0])),l[1][2]))),-l[0][3]))))}}function i(h,p,a,x){return function(l){return x(h(h(p(h(h(p(h(p(h(a(l[3][3],l[4][4]),a(-l[3][4],l[4][3])),l[2][2]),h(p(h(a(l[3][2],l[4][4]),a(-l[3][4],l[4][2])),-l[2][3]),p(h(a(l[3][2],l[4][3]),a(-l[3][3],l[4][2])),l[2][4]))),l[1][1]),p(h(p(h(a(l[3][3],l[4][4]),a(-l[3][4],l[4][3])),l[2][1]),h(p(h(a(l[3][1],l[4][4]),a(-l[3][4],l[4][1])),-l[2][3]),p(h(a(l[3][1],l[4][3]),a(-l[3][3],l[4][1])),l[2][4]))),-l[1][2])),h(p(h(p(h(a(l[3][2],l[4][4]),a(-l[3][4],l[4][2])),l[2][1]),h(p(h(a(l[3][1],l[4][4]),a(-l[3][4],l[4][1])),-l[2][2]),p(h(a(l[3][1],l[4][2]),a(-l[3][2],l[4][1])),l[2][4]))),l[1][3]),p(h(p(h(a(l[3][2],l[4][3]),a(-l[3][3],l[4][2])),l[2][1]),h(p(h(a(l[3][1],l[4][3]),a(-l[3][3],l[4][1])),-l[2][2]),p(h(a(l[3][1],l[4][2]),a(-l[3][2],l[4][1])),l[2][3]))),-l[1][4]))),l[0][0]),p(h(h(p(h(p(h(a(l[3][3],l[4][4]),a(-l[3][4],l[4][3])),l[2][2]),h(p(h(a(l[3][2],l[4][4]),a(-l[3][4],l[4][2])),-l[2][3]),p(h(a(l[3][2],l[4][3]),a(-l[3][3],l[4][2])),l[2][4]))),l[1][0]),p(h(p(h(a(l[3][3],l[4][4]),a(-l[3][4],l[4][3])),l[2][0]),h(p(h(a(l[3][0],l[4][4]),a(-l[3][4],l[4][0])),-l[2][3]),p(h(a(l[3][0],l[4][3]),a(-l[3][3],l[4][0])),l[2][4]))),-l[1][2])),h(p(h(p(h(a(l[3][2],l[4][4]),a(-l[3][4],l[4][2])),l[2][0]),h(p(h(a(l[3][0],l[4][4]),a(-l[3][4],l[4][0])),-l[2][2]),p(h(a(l[3][0],l[4][2]),a(-l[3][2],l[4][0])),l[2][4]))),l[1][3]),p(h(p(h(a(l[3][2],l[4][3]),a(-l[3][3],l[4][2])),l[2][0]),h(p(h(a(l[3][0],l[4][3]),a(-l[3][3],l[4][0])),-l[2][2]),p(h(a(l[3][0],l[4][2]),a(-l[3][2],l[4][0])),l[2][3]))),-l[1][4]))),-l[0][1])),h(p(h(h(p(h(p(h(a(l[3][3],l[4][4]),a(-l[3][4],l[4][3])),l[2][1]),h(p(h(a(l[3][1],l[4][4]),a(-l[3][4],l[4][1])),-l[2][3]),p(h(a(l[3][1],l[4][3]),a(-l[3][3],l[4][1])),l[2][4]))),l[1][0]),p(h(p(h(a(l[3][3],l[4][4]),a(-l[3][4],l[4][3])),l[2][0]),h(p(h(a(l[3][0],l[4][4]),a(-l[3][4],l[4][0])),-l[2][3]),p(h(a(l[3][0],l[4][3]),a(-l[3][3],l[4][0])),l[2][4]))),-l[1][1])),h(p(h(p(h(a(l[3][1],l[4][4]),a(-l[3][4],l[4][1])),l[2][0]),h(p(h(a(l[3][0],l[4][4]),a(-l[3][4],l[4][0])),-l[2][1]),p(h(a(l[3][0],l[4][1]),a(-l[3][1],l[4][0])),l[2][4]))),l[1][3]),p(h(p(h(a(l[3][1],l[4][3]),a(-l[3][3],l[4][1])),l[2][0]),h(p(h(a(l[3][0],l[4][3]),a(-l[3][3],l[4][0])),-l[2][1]),p(h(a(l[3][0],l[4][1]),a(-l[3][1],l[4][0])),l[2][3]))),-l[1][4]))),l[0][2]),h(p(h(h(p(h(p(h(a(l[3][2],l[4][4]),a(-l[3][4],l[4][2])),l[2][1]),h(p(h(a(l[3][1],l[4][4]),a(-l[3][4],l[4][1])),-l[2][2]),p(h(a(l[3][1],l[4][2]),a(-l[3][2],l[4][1])),l[2][4]))),l[1][0]),p(h(p(h(a(l[3][2],l[4][4]),a(-l[3][4],l[4][2])),l[2][0]),h(p(h(a(l[3][0],l[4][4]),a(-l[3][4],l[4][0])),-l[2][2]),p(h(a(l[3][0],l[4][2]),a(-l[3][2],l[4][0])),l[2][4]))),-l[1][1])),h(p(h(p(h(a(l[3][1],l[4][4]),a(-l[3][4],l[4][1])),l[2][0]),h(p(h(a(l[3][0],l[4][4]),a(-l[3][4],l[4][0])),-l[2][1]),p(h(a(l[3][0],l[4][1]),a(-l[3][1],l[4][0])),l[2][4]))),l[1][2]),p(h(p(h(a(l[3][1],l[4][2]),a(-l[3][2],l[4][1])),l[2][0]),h(p(h(a(l[3][0],l[4][2]),a(-l[3][2],l[4][0])),-l[2][1]),p(h(a(l[3][0],l[4][1]),a(-l[3][1],l[4][0])),l[2][2]))),-l[1][4]))),-l[0][3]),p(h(h(p(h(p(h(a(l[3][2],l[4][3]),a(-l[3][3],l[4][2])),l[2][1]),h(p(h(a(l[3][1],l[4][3]),a(-l[3][3],l[4][1])),-l[2][2]),p(h(a(l[3][1],l[4][2]),a(-l[3][2],l[4][1])),l[2][3]))),l[1][0]),p(h(p(h(a(l[3][2],l[4][3]),a(-l[3][3],l[4][2])),l[2][0]),h(p(h(a(l[3][0],l[4][3]),a(-l[3][3],l[4][0])),-l[2][2]),p(h(a(l[3][0],l[4][2]),a(-l[3][2],l[4][0])),l[2][3]))),-l[1][1])),h(p(h(p(h(a(l[3][1],l[4][3]),a(-l[3][3],l[4][1])),l[2][0]),h(p(h(a(l[3][0],l[4][3]),a(-l[3][3],l[4][0])),-l[2][1]),p(h(a(l[3][0],l[4][1]),a(-l[3][1],l[4][0])),l[2][3]))),l[1][2]),p(h(p(h(a(l[3][1],l[4][2]),a(-l[3][2],l[4][1])),l[2][0]),h(p(h(a(l[3][0],l[4][2]),a(-l[3][2],l[4][0])),-l[2][1]),p(h(a(l[3][0],l[4][1]),a(-l[3][1],l[4][0])),l[2][2]))),-l[1][3]))),l[0][4])))))}}
vendor: 10,456 bytes, line 3525
3525function u(h){return(h===2?r:h===3?d:h===4?c:h===5?i:void 0)(n,t,e,o)}var f=[function(){return[0]},function(h){return[h[0][0]]}];function s(h,p,a,x,l,w,_,T){return function(k){switch(k.length){case 0:return h(k);case 1:return p(k);case 2:return a(k);case 3:return x(k);case 4:return l(k);case 5:return w(k)}var L=_[k.length];return L||(L=_[k.length]=T(k.length)),L(k)}}(function(){for(;f.length<6;)f.push(u(f.length));b.exports=s.apply(void 0,f.concat([f,u]));for(var h=0;h<f.length;++h)b.exports[h]=f[h]})()},{"robust-compress":279,"robust-scale":286,"robust-sum":289,"two-product":306}],281:[function(m,b,v){var e=m("two-product"),n=m("robust-sum");b.exports=function(t,o){for(var r=e(t[0],o[0]),d=1;d<t.length;++d)r=n(r,e(t[d],o[d]));return r}},{"robust-sum":289,"two-product":306}],282:[function(m,b,v){var e=m("two-product"),n=m("robust-sum"),t=m("robust-subtract"),o=m("robust-scale");function r(p){return(p===3?d:p===4?c:p===5?i:u)(n,t,e,o)}function d(p,a,x,l){return function(w,_,T){var k=x(w[0],w[0]),L=l(k,_[0]),A=l(k,T[0]),I=x(_[0],_[0]),P=l(I,w[0]),S=l(I,T[0]),E=x(T[0],T[0]),D=l(E,w[0]),F=l(E,_[0]),H=p(a(F,S),a(P,L)),V=a(D,A),Z=a(H,V);return Z[Z.length-1]}}function c(p,a,x,l){return function(w,_,T,k){var L=p(x(w[0],w[0]),x(w[1],w[1])),A=l(L,_[0]),I=l(L,T[0]),P=l(L,k[0]),S=p(x(_[0],_[0]),x(_[1],_[1])),E=l(S,w[0]),D=l(S,T[0]),F=l(S,k[0]),H=p(x(T[0],T[0]),x(T[1],T[1])),V=l(H,w[0]),Z=l(H,_[0]),K=l(H,k[0]),q=p(x(k[0],k[0]),x(k[1],k[1])),W=l(q,w[0]),$=l(q,_[0]),R=l(q,T[0]),N=p(p(l(a(R,K),_[1]),p(l(a($,F),-T[1]),l(a(Z,D),k[1]))),p(l(a($,F),w[1]),p(l(a(W,P),-_[1]),l(a(E,A),k[1])))),U=p(p(l(a(R,K),w[1]),p(l(a(W,P),-T[1]),l(a(V,I),k[1]))),p(l(a(Z,D),w[1]),p(l(a(V,I),-_[1]),l(a(E,A),T[1])))),Q=a(N,U);return Q[Q.length-1]}}function i(p,a,x,l){return function(w,_,T,k,L){var A=p(x(w[0],w[0]),p(x(w[1],w[1]),x(w[2],w[2]))),I=l(A,_[0]),P=l(A,T[0]),S=l(A,k[0]),E=l(A,L[0]),D=p(x(_[0],_[0]),p(x(_[1],_[1]),x(_[2],_[2]))),F=l(D,w[0]),H=l(D,T[0]),V=l(D,k[0]),Z=l(D,L[0]),K=p(x(T[0],T[0]),p(x(T[1],T[1]),x(T[2],T[2]))),q=l(K,w[0]),W=l(K,_[0]),$=l(K,k[0]),R=l(K,L[0]),N=p(x(k[0],k[0]),p(x(k[1],k[1]),x(k[2],k[2]))),U=l(N,w[0]),Q=l(N,_[0]),j=l(N,T[0]),X=l(N,L[0]),J=p(x(L[0],L[0]),p(x(L[1],L[1]),x(L[2],L[2]))),re=l(J,w[0]),ne=l(J,_[0]),se=l(J,T[0]),oe=l(J,k[0]),pe=p(p(p(l(p(l(a(oe,X),T[1]),p(l(a(se,R),-k[1]),l(a(j,$),L[1]))),_[2]),p(l(p(l(a(oe,X),_[1]),p(l(a(ne,Z),-k[1]),l(a(Q,V),L[1]))),-T[2]),l(p(l(a(se,R),_[1]),p(l(a(ne,Z),-T[1]),l(a(W,H),L[1]))),k[2]))),p(l(p(l(a(j,$),_[1]),p(l(a(Q,V),-T[1]),l(a(W,H),k[1]))),-L[2]),p(l(p(l(a(oe,X),_[1]),p(l(a(ne,Z),-k[1]),l(a(Q,V),L[1]))),w[2]),l(p(l(a(oe,X),w[1]),p(l(a(re,E),-k[1]),l(a(U,S),L[1]))),-_[2])))),p(p(l(p(l(a(ne,Z),w[1]),p(l(a(re,E),-_[1]),l(a(F,I),L[1]))),k[2]),p(l(p(l(a(Q,V),w[1]),p(l(a(U,S),-_[1]),l(a(F,I),k[1]))),-L[2]),l(p(l(a(j,$),_[1]),p(l(a(Q,V),-T[1]),l(a(W,H),k[1]))),w[2]))),p(l(p(l(a(j,$),w[1]),p(l(a(U,S),-T[1]),l(a(q,P),k[1]))),-_[2]),p(l(p(l(a(Q,V),w[1]),p(l(a(U,S),-_[1]),l(a(F,I),k[1]))),T[2]),l(p(l(a(W,H),w[1]),p(l(a(q,P),-_[1]),l(a(F,I),T[1]))),-k[2]))))),ce=p(p(p(l(p(l(a(oe,X),T[1]),p(l(a(se,R),-k[1]),l(a(j,$),L[1]))),w[2]),l(p(l(a(oe,X),w[1]),p(l(a(re,E),-k[1]),l(a(U,S),L[1]))),-T[2])),p(l(p(l(a(se,R),w[1]),p(l(a(re,E),-T[1]),l(a(q,P),L[1]))),k[2]),l(p(l(a(j,$),w[1]),p(l(a(U,S),-T[1]),l(a(q,P),k[1]))),-L[2]))),p(p(l(p(l(a(se,R),_[1]),p(l(a(ne,Z),-T[1]),l(a(W,H),L[1]))),w[2]),l(p(l(a(se,R),w[1]),p(l(a(re,E),-T[1]),l(a(q,P),L[1]))),-_[2])),p(l(p(l(a(ne,Z),w[1]),p(l(a(re,E),-_[1]),l(a(F,I),L[1]))),T[2]),l(p(l(a(W,H),w[1]),p(l(a(q,P),-_[1]),l(a(F,I),T[1]))),-L[2])))),de=a(pe,ce);return de[de.length-1]}}function u(p,a,x,l){return function(w,_,T,k,L,A){var I=p(p(x(w[0],w[0]),x(w[1],w[1])),p(x(w[2],w[2]),x(w[3],w[3]))),P=l(I,_[0]),S=l(I,T[0]),E=l(I,k[0]),D=l(I,L[0]),F=l(I,A[0]),H=p(p(x(_[0],_[0]),x(_[1],_[1])),p(x(_[2],_[2]),x(_[3],_[3]))),V=l(H,w[0]),Z=l(H,T[0]),K=l(H,k[0]),q=l(H,L[0]),W=l(H,A[0]),$=p(p(x(T[0],T[0]),x(T[1],T[1])),p(x(T[2],T[2]),x(T[3],T[3]))),R=l($,w[0]),N=l($,_[0]),U=l($,k[0]),Q=l($,L[0]),j=l($,A[0]),X=p(p(x(k[0],k[0]),x(k[1],k[1])),p(x(k[2],k[2]),x(k[3],k[3]))),J=l(X,w[0]),re=l(X,_[0]),ne=l(X,T[0]),se=l(X,L[0]),oe=l(X,A[0]),pe=p(p(x(L[0],L[0]),x(L[1],L[1])),p(x(L[2],L[2]),x(L[3],L[3]))),ce=l(pe,w[0]),de=l(pe,_[0]),xe=l(pe,T[0]),we=l(pe,k[0]),be=l(pe,A[0]),Ee=p(p(x(A[0],A[0]),x(A[1],A[1])),p(x(A[2],A[2]),x(A[3],A[3]))),fe=l(Ee,w[0]),me=l(Ee,_[0]),Te=l(Ee,T[0]),_e=l(Ee,k[0]),Ae=l(Ee,L[0]),Pe=p(p(p(l(p(p(l(p(l(a(Ae,be),k[1]),p(l(a(_e,oe),-L[1]),l(a(we,se),A[1]))),T[2]),l(p(l(a(Ae,be),T[1]),p(l(a(Te,j),-L[1]),l(a(xe,Q),A[1]))),-k[2])),p(l(p(l(a(_e,oe),T[1]),p(l(a(Te,j),-k[1]),l(a(ne,U),A[1]))),L[2]),l(p(l(a(we,se),T[1]),p(l(a(xe,Q),-k[1]),l(a(ne,U),L[1]))),-A[2]))),_[3]),p(l(p(p(l(p(l(a(Ae,be),k[1]),p(l(a(_e,oe),-L[1]),l(a(we,se),A[1]))),_[2]),l(p(l(a(Ae,be),_[1]),p(l(a(me,W),-L[1]),l(a(de,q),A[1]))),-k[2])),p(l(p(l(a(_e,oe),_[1]),p(l(a(me,W),-k[1]),l(a(re,K),A[1]))),L[2]),l(p(l(a(we,se),_[1]),p(l(a(de,q),-k[1]),l(a(re,K),L[1]))),-A[2]))),-T[3]),l(p(p(l(p(l(a(Ae,be),T[1]),p(l(a(Te,j),-L[1]),l(a(xe,Q),A[1]))),_[2]),l(p(l(a(Ae,be),_[1]),p(l(a(me,W),-L[1]),l(a(de,q),A[1]))),-T[2])),p(l(p(l(a(Te,j),_[1]),p(l(a(me,W),-T[1]),l(a(N,Z),A[1]))),L[2]),l(p(l(a(xe,Q),_[1]),p(l(a(de,q),-T[1]),l(a(N,Z),L[1]))),-A[2]))),k[3]))),p(p(l(p(p(l(p(l(a(_e,oe),T[1]),p(l(a(Te,j),-k[1]),l(a(ne,U),A[1]))),_[2]),l(p(l(a(_e,oe),_[1]),p(l(a(me,W),-k[1]),l(a(re,K),A[1]))),-T[2])),p(l(p(l(a(Te,j),_[1]),p(l(a(me,W),-T[1]),l(a(N,Z),A[1]))),k[2]),l(p(l(a(ne,U),_[1]),p(l(a(re,K),-T[1]),l(a(N,Z),k[1]))),-A[2]))),-L[3]),l(p(p(l(p(l(a(we,se),T[1]),p(l(a(xe,Q),-k[1]),l(a(ne,U),L[1]))),_[2]),l(p(l(a(we,se),_[1]),p(l(a(de,q),-k[1]),l(a(re,K),L[1]))),-T[2])),p(l(p(l(a(xe,Q),_[1]),p(l(a(de,q),-T[1]),l(a(N,Z),L[1]))),k[2]),l(p(l(a(ne,U),_[1]),p(l(a(re,K),-T[1]),l(a(N,Z),k[1]))),-L[2]))),A[3])),p(l(p(p(l(p(l(a(Ae,be),k[1]),p(l(a(_e,oe),-L[1]),l(a(we,se),A[1]))),_[2]),l(p(l(a(Ae,be),_[1]),p(l(a(me,W),-L[1]),l(a(de,q),A[1]))),-k[2])),p(l(p(l(a(_e,oe),_[1]),p(l(a(me,W),-k[1]),l(a(re,K),A[1]))),L[2]),l(p(l(a(we,se),_[1]),p(l(a(de,q),-k[1]),l(a(re,K),L[1]))),-A[2]))),w[3]),l(p(p(l(p(l(a(Ae,be),k[1]),p(l(a(_e,oe),-L[1]),l(a(we,se),A[1]))),w[2]),l(p(l(a(Ae,be),w[1]),p(l(a(fe,F),-L[1]),l(a(ce,D),A[1]))),-k[2])),p(l(p(l(a(_e,oe),w[1]),p(l(a(fe,F),-k[1]),l(a(J,E),A[1]))),L[2]),l(p(l(a(we,se),w[1]),p(l(a(ce,D),-k[1]),l(a(J,E),L[1]))),-A[2]))),-_[3])))),p(p(p(l(p(p(l(p(l(a(Ae,be),_[1]),p(l(a(me,W),-L[1]),l(a(de,q),A[1]))),w[2]),l(p(l(a(Ae,be),w[1]),p(l(a(fe,F),-L[1]),l(a(ce,D),A[1]))),-_[2])),p(l(p(l(a(me,W),w[1]),p(l(a(fe,F),-_[1]),l(a(V,P),A[1]))),L[2]),l(p(l(a(de,q),w[1]),p(l(a(ce,D),-_[1]),l(a(V,P),L[1]))),-A[2]))),k[3]),l(p(p(l(p(l(a(_e,oe),_[1]),p(l(a(me,W),-k[1]),l(a(re,K),A[1]))),w[2]),l(p(l(a(_e,oe),w[1]),p(l(a(fe,F),-k[1]),l(a(J,E),A[1]))),-_[2])),p(l(p(l(a(me,W),w[1]),p(l(a(fe,F),-_[1]),l(a(V,P),A[1]))),k[2]),l(p(l(a(re,K),w[1]),p(l(a(J,E),-_[1]),l(a(V,P),k[1]))),-A[2]))),-L[3])),p(l(p(p(l(p(l(a(we,se),_[1]),p(l(a(de,q),-k[1]),l(a(re,K),L[1]))),w[2]),l(p(l(a(we,se),w[1]),p(l(a(ce,D),-k[1]),l(a(J,E),L[1]))),-_[2])),p(l(p(l(a(de,q),w[1]),p(l(a(ce,D),-_[1]),l(a(V,P),L[1]))),k[2]),l(p(l(a(re,K),w[1]),p(l(a(J,E),-_[1]),l(a(V,P),k[1]))),-L[2]))),A[3]),l(p(p(l(p(l(a(_e,oe),T[1]),p(l(a(Te,j),-k[1]),l(a(ne,U),A[1]))),_[2]),l(p(l(a(_e,oe),_[1]),p(l(a(me,W),-k[1]),l(a(re,K),A[1]))),-T[2])),p(l(p(l(a(Te,j),_[1]),p(l(a(me,W),-T[1]),l(a(N,Z),A[1]))),k[2]),l(p(l(a(ne,U),_[1]),p(l(a(re,K),-T[1]),l(a(N,Z),k[1]))),-A[2]))),w[3]))),p(p(l(p(p(l(p(l(a(_e,oe),T[1]),p(l(a(Te,j),-k[1]),l(a(ne,U),A[1]))),w[2]),l(p(l(a(_e,oe),w[1]),p(l(a(fe,F),-k[1]),l(a(J,E),A[1]))),-T[2])),p(l(p(l(a(Te,j),w[1]),p(l(a(fe,F),-T[1]),l(a(R,S),A[1]))),k[2]),l(p(l(a(ne,U),w[1]),p(l(a(J,E),-T[1]),l(a(R,S),k[1]))),-A[2]))),-_[3]),l(p(p(l(p(l(a(_e,oe),_[1]),p(l(a(me,W),-k[1]),l(a(re,K),A[1]))),w[2]),l(p(l(a(_e,oe),w[1]),p(l(a(fe,F),-k[1]),l(a(J,E),A[1]))),-_[2])),p(l(p(l(a(me,W),w[1]),p(l(a(fe,F),-_[1]),l(a(V,P),A[1]))),k[2]),l(p(l(a(re,K),w[1]),p(l(a(J,E),-_[1]),l(a(V,P),k[1]))),-A[2]))),T[3])),p(l(p(p(l(p(l(a(Te,j),_[1]),p(l(a(me,W),-T[1]),l(a(N,Z),A[1]))),w[2]),l(p(l(a(Te,j),w[1]),p(l(a(fe,F),-T[1]),l(a(R,S),A[1]))),-_[2])),p(l(p(l(a(me,W),w[1]),p(l(a(fe,F),-_[1]),l(a(V,P),A[1]))),T[2]),l(p(l(a(N,Z),w[1]),p(l(a(R,S),-_[1]),l(a(V,P),T[1]))),-A[2]))),-k[3]),l(p(p(l(p(l(a(ne,U),_[1]),p(l(a(re,K),-T[1]),l(a(N,Z),k[1]))),w[2]),l(p(l(a(ne,U),w[1]),p(l(a(J,E),-T[1]),l(a(R,S),k[1]))),-_[2])),p(l(p(l(a(re,K),w[1]),p(l(a(J,E),-_[1]),l(a(V,P),k[1]))),T[2]),l(p(l(a(N,Z),w[1]),p(l(a(R,S),-_[1]),l(a(V,P),T[1]))),-k[2]))),A[3]))))),De=p(p(p(l(p(p(l(p(l(a(Ae,be),k[1]),p(l(a(_e,oe),-L[1]),l(a(we,se),A[1]))),T[2]),l(p(l(a(Ae,be),T[1]),p(l(a(Te,j),-L[1]),l(a(xe,Q),A[1]))),-k[2])),p(l(p(l(a(_e,oe),T[1]),p(l(a(Te,j),-k[1]),l(a(ne,U),A[1]))),L[2]),l(p(l(a(we,se),T[1]),p(l(a(xe,Q),-k[1]),l(a(ne,U),L[1]))),-A[2]))),w[3]),p(l(p(p(l(p(l(a(Ae,be),k[1]),p(l(a(_e,oe),-L[1]),l(a(we,se),A[1]))),w[2]),l(p(l(a(Ae,be),w[1]),p(l(a(fe,F),-L[1]),l(a(ce,D),A[1]))),-k[2])),p(l(p(l(a(_e,oe),w[1]),p(l(a(fe,F),-k[1]),l(a(J,E),A[1]))),L[2]),l(p(l(a(we,se),w[1]),p(l(a(ce,D),-k[1]),l(a(J,E),L[1]))),-A[2]))),-T[3]),l(p(p(l(p(l(a(Ae,be),T[1]),p(l(a(Te,j),-L[1]),l(a(xe,Q),A[1]))),w[2]),l(p(l(a(Ae,be),w[1]),p(l(a(fe,F),-L[1]),l(a(ce,D),A[1]))),-T[2])),p(l(p(l(a(Te,j),w[1]),p(l(a(fe,F),-T[1]),l(a(R,S),A[1]))),L[2]),l(p(l(a(xe,Q),w[1]),p(l(a(ce,D),-T[1]),l(a(R,S),L[1]))),-A[2]))),k[3]))),p(p(l(p(p(l(p(l(a(_e,oe),T[1]),p(l(a(Te,j),-k[1]),l(a(ne,U),A[1]))),w[2]),l(p(l(a(_e,oe),w[1]),p(l(a(fe,F),-k[1]),l(a(J,E),A[1]))),-T[2])),p(l(p(l(a(Te,j),w[1]),p(l(a(fe,F),-T[1]),l(a(R,S),A[1]))),k[2]),l(p(l(a(ne,U),w[1]),p(l(a(J,E),-T[1]),l(a(R,S),k[1]))),-A[2]))),-L[3]),l(p(p(l(p(l(a(we,se),T[1]),p(l(a(xe,Q),-k[1]),l(a(ne,U),L[1]))),w[2]),l(p(l(a(we,se),w[1]),p(l(a(ce,D),-k[1]),l(a(J,E),L[1]))),-T[2])),p(l(p(l(a(xe,Q),w[1]),p(l(a(ce,D),-T[1]),l(a(R,S),L[1]))),k[2]),l(p(l(a(ne,U),w[1]),p(l(a(J,E),-T[1]),l(a(R,S),k[1]))),-L[2]))),A[3])),p(l(p(p(l(p(l(a(Ae,be),T[1]),p(l(a(Te,j),-L[1]),l(a(xe,Q),A[1]))),_[2]),l(p(l(a(Ae,be),_[1]),p(l(a(me,W),-L[1]),l(a(de,q),A[1]))),-T[2])),p(l(p(l(a(Te,j),_[1]),p(l(a(me,W),-T[1]),l(a(N,Z),A[1]))),L[2]),l(p(l(a(xe,Q),_[1]),p(l(a(de,q),-T[1]),l(a(N,Z),L[1]))),-A[2]))),w[3]),l(p(p(l(p(l(a(Ae,be),T[1]),p(l(a(Te,j),-L[1]),l(a(xe,Q),A[1]))),w[2]),l(p(l(a(Ae,be),w[1]),p(l(a(fe,F),-L[1]),l(a(ce,D),A[1]))),-T[2])),p(l(p(l(a(Te,j),w[1]),p(l(a(fe,F),-T[1]),l(a(R,S),A[1]))),L[2]),l(p(l(a(xe,Q),w[1]),p(l(a(ce,D),-T[1]),l(a(R,S),L[1]))),-A[2]))),-_[3]))
3525)),p(p(p(l(p(p(l(p(l(a(Ae,be),_[1]),p(l(a(me,W),-L[1]),l(a(de,q),A[1]))),w[2]),l(p(l(a(Ae,be),w[1]),p(l(a(fe,F),-L[1]),l(a(ce,D),A[1]))),-_[2])),p(l(p(l(a(me,W),w[1]),p(l(a(fe,F),-_[1]),l(a(V,P),A[1]))),L[2]),l(p(l(a(de,q),w[1]),p(l(a(ce,D),-_[1]),l(a(V,P),L[1]))),-A[2]))),T[3]),l(p(p(l(p(l(a(Te,j),_[1]),p(l(a(me,W),-T[1]),l(a(N,Z),A[1]))),w[2]),l(p(l(a(Te,j),w[1]),p(l(a(fe,F),-T[1]),l(a(R,S),A[1]))),-_[2])),p(l(p(l(a(me,W),w[1]),p(l(a(fe,F),-_[1]),l(a(V,P),A[1]))),T[2]),l(p(l(a(N,Z),w[1]),p(l(a(R,S),-_[1]),l(a(V,P),T[1]))),-A[2]))),-L[3])),p(l(p(p(l(p(l(a(xe,Q),_[1]),p(l(a(de,q),-T[1]),l(a(N,Z),L[1]))),w[2]),l(p(l(a(xe,Q),w[1]),p(l(a(ce,D),-T[1]),l(a(R,S),L[1]))),-_[2])),p(l(p(l(a(de,q),w[1]),p(l(a(ce,D),-_[1]),l(a(V,P),L[1]))),T[2]),l(p(l(a(N,Z),w[1]),p(l(a(R,S),-_[1]),l(a(V,P),T[1]))),-L[2]))),A[3]),l(p(p(l(p(l(a(we,se),T[1]),p(l(a(xe,Q),-k[1]),l(a(ne,U),L[1]))),_[2]),l(p(l(a(we,se),_[1]),p(l(a(de,q),-k[1]),l(a(re,K),L[1]))),-T[2])),p(l(p(l(a(xe,Q),_[1]),p(l(a(de,q),-T[1]),l(a(N,Z),L[1]))),k[2]),l(p(l(a(ne,U),_[1]),p(l(a(re,K),-T[1]),l(a(N,Z),k[1]))),-L[2]))),w[3]))),p(p(l(p(p(l(p(l(a(we,se),T[1]),p(l(a(xe,Q),-k[1]),l(a(ne,U),L[1]))),w[2]),l(p(l(a(we,se),w[1]),p(l(a(ce,D),-k[1]),l(a(J,E),L[1]))),-T[2])),p(l(p(l(a(xe,Q),w[1]),p(l(a(ce,D),-T[1]),l(a(R,S),L[1]))),k[2]),l(p(l(a(ne,U),w[1]),p(l(a(J,E),-T[1]),l(a(R,S),k[1]))),-L[2]))),-_[3]),l(p(p(l(p(l(a(we,se),_[1]),p(l(a(de,q),-k[1]),l(a(re,K),L[1]))),w[2]),l(p(l(a(we,se),w[1]),p(l(a(ce,D),-k[1]),l(a(J,E),L[1]))),-_[2])),p(l(p(l(a(de,q),w[1]),p(l(a(ce,D),-_[1]),l(a(V,P),L[1]))),k[2]),l(p(l(a(re,K),w[1]),p(l(a(J,E),-_[1]),l(a(V,P),k[1]))),-L[2]))),T[3])),p(l(p(p(l(p(l(a(xe,Q),_[1]),p(l(a(de,q),-T[1]),l(a(N,Z),L[1]))),w[2]),l(p(l(a(xe,Q),w[1]),p(l(a(ce,D),-T[1]),l(a(R,S),L[1]))),-_[2])),p(l(p(l(a(de,q),w[1]),p(l(a(ce,D),-_[1]),l(a(V,P),L[1]))),T[2]),l(p(l(a(N,Z),w[1]),p(l(a(R,S),-_[1]),l(a(V,P),T[1]))),-L[2]))),-k[3]),l(p(p(l(p(l(a(ne,U),_[1]),p(l(a(re,K),-T[1]),l(a(N,Z),k[1]))),w[2]),l(p(l(a(ne,U),w[1]),p(l(a(J,E),-T[1]),l(a(R,S),k[1]))),-_[2])),p(l(p(l(a(re,K),w[1]),p(l(a(J,E),-_[1]),l(a(V,P),k[1]))),T[2]),l(p(l(a(N,Z),w[1]),p(l(a(R,S),-_[1]),l(a(V,P),T[1]))),-k[2]))),L[3]))))),Ve=a(Pe,De);return Ve[Ve.length-1]}}var f=[function(){return 0},function(){return 0},function(){return 0}];function s(p){var a=f[p.length];return a||(a=f[p.length]=r(p.length)),a.apply(void 0,p)}function h(p,a,x,l,w,_,T,k){return function(L,A,I,P,S,E){switch(arguments.length){case 0:case 1:return 0;case 2:return l(L,A);case 3:return w(L,A,I);case 4:return _(L,A,I,P);case 5:return T(L,A,I,P,S);case 6:return k(L,A,I,P,S,E)}for(var D=new Array(arguments.length),F=0;F<arguments.length;++F)D[F]=arguments[F];return p(D)}}(function(){for(;f.length<=6;)f.push(r(f.length));b.exports=h.apply(void 0,[s].concat(f));for(var p=0;p<=6;++p)b.exports[p]=f[p]})()},{"robust-scale":286,"robust-subtract":288,"robust-sum":289,"two-product":306}],283:[function(m,b,v){var e=m("robust-determinant");function n(f){var s=f===2?t:f===3?o:f===4?r:f===5?d:c;return s(f<6?e[f]:e)}function t(f){return function(s,h){return[f([[+h[0],+s[0][1]],[+h[1],+s[1][1]]]),f([[+s[0][0],+h[0]],[+s[1][0],+h[1]]]),f(s)]}}function o(f){return function(s,h){return[f([[+h[0],+s[0][1],+s[0][2]],[+h[1],
vendor: 8,535 bytes, line 3525
3525+s[1][1],+s[1][2]],[+h[2],+s[2][1],+s[2][2]]]),f([[+s[0][0],+h[0],+s[0][2]],[+s[1][0],+h[1],+s[1][2]],[+s[2][0],+h[2],+s[2][2]]]),f([[+s[0][0],+s[0][1],+h[0]],[+s[1][0],+s[1][1],+h[1]],[+s[2][0],+s[2][1],+h[2]]]),f(s)]}}function r(f){return function(s,h){return[f([[+h[0],+s[0][1],+s[0][2],+s[0][3]],[+h[1],+s[1][1],+s[1][2],+s[1][3]],[+h[2],+s[2][1],+s[2][2],+s[2][3]],[+h[3],+s[3][1],+s[3][2],+s[3][3]]]),f([[+s[0][0],+h[0],+s[0][2],+s[0][3]],[+s[1][0],+h[1],+s[1][2],+s[1][3]],[+s[2][0],+h[2],+s[2][2],+s[2][3]],[+s[3][0],+h[3],+s[3][2],+s[3][3]]]),f([[+s[0][0],+s[0][1],+h[0],+s[0][3]],[+s[1][0],+s[1][1],+h[1],+s[1][3]],[+s[2][0],+s[2][1],+h[2],+s[2][3]],[+s[3][0],+s[3][1],+h[3],+s[3][3]]]),f([[+s[0][0],+s[0][1],+s[0][2],+h[0]],[+s[1][0],+s[1][1],+s[1][2],+h[1]],[+s[2][0],+s[2][1],+s[2][2],+h[2]],[+s[3][0],+s[3][1],+s[3][2],+h[3]]]),f(s)]}}function d(f){return function(s,h){return[f([[+h[0],+s[0][1],+s[0][2],+s[0][3],+s[0][4]],[+h[1],+s[1][1],+s[1][2],+s[1][3],+s[1][4]],[+h[2],+s[2][1],+s[2][2],+s[2][3],+s[2][4]],[+h[3],+s[3][1],+s[3][2],+s[3][3],+s[3][4]],[+h[4],+s[4][1],+s[4][2],+s[4][3],+s[4][4]]]),f([[+s[0][0],+h[0],+s[0][2],+s[0][3],+s[0][4]],[+s[1][0],+h[1],+s[1][2],+s[1][3],+s[1][4]],[+s[2][0],+h[2],+s[2][2],+s[2][3],+s[2][4]],[+s[3][0],+h[3],+s[3][2],+s[3][3],+s[3][4]],[+s[4][0],+h[4],+s[4][2],+s[4][3],+s[4][4]]]),f([[+s[0][0],+s[0][1],+h[0],+s[0][3],+s[0][4]],[+s[1][0],+s[1][1],+h[1],+s[1][3],+s[1][4]],[+s[2][0],+s[2][1],+h[2],+s[2][3],+s[2][4]],[+s[3][0],+s[3][1],+h[3],+s[3][3],+s[3][4]],[+s[4][0],+s[4][1],+h[4],+s[4][3],+s[4][4]]]),f([[+s[0][0],+s[0][1],+s[0][2],+h[0],+s[0][4]],[+s[1][0],+s[1][1],+s[1][2],+h[1],+s[1][4]],[+s[2][0],+s[2][1],+s[2][2],+h[2],+s[2][4]],[+s[3][0],+s[3][1],+s[3][2],+h[3],+s[3][4]],[+s[4][0],+s[4][1],+s[4][2],+h[4],+s[4][4]]]),f([[+s[0][0],+s[0][1],+s[0][2],+s[0][3],+h[0]],[+s[1][0],+s[1][1],+s[1][2],+s[1][3],+h[1]],[+s[2][0],+s[2][1],+s[2][2],+s[2][3],+h[2]],[+s[3][0],+s[3][1],+s[3][2],+s[3][3],+h[3]],[+s[4][0],+s[4][1],+s[4][2],+s[4][3],+h[4]]]),f(s)]}}function c(f){return function(s,h){return[f([[+h[0],+s[0][1],+s[0][2],+s[0][3],+s[0][4],+s[0][5]],[+h[1],+s[1][1],+s[1][2],+s[1][3],+s[1][4],+s[1][5]],[+h[2],+s[2][1],+s[2][2],+s[2][3],+s[2][4],+s[2][5]],[+h[3],+s[3][1],+s[3][2],+s[3][3],+s[3][4],+s[3][5]],[+h[4],+s[4][1],+s[4][2],+s[4][3],+s[4][4],+s[4][5]],[+h[5],+s[5][1],+s[5][2],+s[5][3],+s[5][4],+s[5][5]]]),f([[+s[0][0],+h[0],+s[0][2],+s[0][3],+s[0][4],+s[0][5]],[+s[1][0],+h[1],+s[1][2],+s[1][3],+s[1][4],+s[1][5]],[+s[2][0],+h[2],+s[2][2],+s[2][3],+s[2][4],+s[2][5]],[+s[3][0],+h[3],+s[3][2],+s[3][3],+s[3][4],+s[3][5]],[+s[4][0],+h[4],+s[4][2],+s[4][3],+s[4][4],+s[4][5]],[+s[5][0],+h[5],+s[5][2],+s[5][3],+s[5][4],+s[5][5]]]),f([[+s[0][0],+s[0][1],+h[0],+s[0][3],+s[0][4],+s[0][5]],[+s[1][0],+s[1][1],+h[1],+s[1][3],+s[1][4],+s[1][5]],[+s[2][0],+s[2][1],+h[2],+s[2][3],+s[2][4],+s[2][5]],[+s[3][0],+s[3][1],+h[3],+s[3][3],+s[3][4],+s[3][5]],[+s[4][0],+s[4][1],+h[4],+s[4][3],+s[4][4],+s[4][5]],[+s[5][0],+s[5][1],+h[5],+s[5][3],+s[5][4],+s[5][5]]]),f([[+s[0][0],+s[0][1],+s[0][2],+h[0],+s[0][4],+s[0][5]],[+s[1][0],+s[1][1],+s[1][2],+h[1],+s[1][4],+s[1][5]],[+s[2][0],+s[2][1],+s[2][2],+h[2],+s[2][4],+s[2][5]],[+s[3][0],+s[3][1],+s[3][2],+h[3],+s[3][4],+s[3][5]],[+s[4][0],+s[4][1],+s[4][2],+h[4],+s[4][4],+s[4][5]],[+s[5][0],+s[5][1],+s[5][2],+h[5],+s[5][4],+s[5][5]]]),f([[+s[0][0],+s[0][1],+s[0][2],+s[0][3],+h[0],+s[0][5]],[+s[1][0],+s[1][1],+s[1][2],+s[1][3],+h[1],+s[1][5]],[+s[2][0],+s[2][1],+s[2][2],+s[2][3],+h[2],+s[2][5]],[+s[3][0],+s[3][1],+s[3][2],+s[3][3],+h[3],+s[3][5]],[+s[4][0],+s[4][1],+s[4][2],+s[4][3],+h[4],+s[4][5]],[+s[5][0],+s[5][1],+s[5][2],+s[5][3],+h[5],+s[5][5]]]),f([[+s[0][0],+s[0][1],+s[0][2],+s[0][3],+s[0][4],+h[0]],[+s[1][0],+s[1][1],+s[1][2],+s[1][3],+s[1][4],+h[1]],[+s[2][0],+s[2][1],+s[2][2],+s[2][3],+s[2][4],+h[2]],[+s[3][0],+s[3][1],+s[3][2],+s[3][3],+s[3][4],+h[3]],[+s[4][0],+s[4][1],+s[4][2],+s[4][3],+s[4][4],+h[4]],[+s[5][0],+s[5][1],+s[5][2],+s[5][3],+s[5][4],+h[5]]]),f(s)]}}var i=[function(){return[[0]]},function(f,s){return[[s[0]],[f[0][0]]]}];function u(f,s,h,p,a,x,l,w){return function(_,T){switch(_.length){case 0:return f(_,T);case 1:return s(_,T);case 2:return h(_,T);case 3:return p(_,T);case 4:return a(_,T);case 5:return x(_,T)}var k=l[_.length];return k||(k=l[_.length]=w(_.length)),k(_,T)}}(function(){for(;i.length<6;)i.push(n(i.length));b.exports=u.apply(void 0,i.concat([i,n]));for(var f=0;f<6;++f)b.exports[f]=i[f]})()},{"robust-determinant":280}],284:[function(m,b,v){var e=m("two-product"),n=m("robust-sum"),t=m("robust-scale"),o=m("robust-subtract");function r(a,x,l,w){return function(_,T,k){var L=a(a(x(T[1],k[0]),x(-k[1],T[0])),a(x(_[1],T[0]),x(-T[1],_[0]))),A=a(x(_[1],k[0]),x(-k[1],_[0])),I=w(L,A);return I[I.length-1]}}function d(a,x,l,w){return function(_,T,k,L){var A=a(a(l(a(x(k[1],L[0]),x(-L[1],k[0])),T[2]),a(l(a(x(T[1],L[0]),x(-L[1],T[0])),-k[2]),l(a(x(T[1],k[0]),x(-k[1],T[0])),L[2]))),a(l(a(x(T[1],L[0]),x(-L[1],T[0])),_[2]),a(l(a(x(_[1],L[0]),x(-L[1],_[0])),-T[2]),l(a(x(_[1],T[0]),x(-T[1],_[0])),L[2])))),I=a(a(l(a(x(k[1],L[0]),x(-L[1],k[0])),_[2]),a(l(a(x(_[1],L[0]),x(-L[1],_[0])),-k[2]),l(a(x(_[1],k[0]),x(-k[1],_[0])),L[2]))),a(l(a(x(T[1],k[0]),x(-k[1],T[0])),_[2]),a(l(a(x(_[1],k[0]),x(-k[1],_[0])),-T[2]),l(a(x(_[1],T[0]),x(-T[1],_[0])),k[2])))),P=w(A,I);return P[P.length-1]}}function c(a,x,l,w){return function(_,T,k,L,A){var I=a(a(a(l(a(l(a(x(L[1],A[0]),x(-A[1],L[0])),k[2]),a(l(a(x(k[1],A[0]),x(-A[1],k[0])),-L[2]),l(a(x(k[1],L[0]),x(-L[1],k[0])),A[2]))),T[3]),a(l(a(l(a(x(L[1],A[0]),x(-A[1],L[0])),T[2]),a(l(a(x(T[1],A[0]),x(-A[1],T[0])),-L[2]),l(a(x(T[1],L[0]),x(-L[1],T[0])),A[2]))),-k[3]),l(a(l(a(x(k[1],A[0]),x(-A[1],k[0])),T[2]),a(l(a(x(T[1],A[0]),x(-A[1],T[0])),-k[2]),l(a(x(T[1],k[0]),x(-k[1],T[0])),A[2]))),L[3]))),a(l(a(l(a(x(k[1],L[0]),x(-L[1],k[0])),T[2]),a(l(a(x(T[1],L[0]),x(-L[1],T[0])),-k[2]),l(a(x(T[1],k[0]),x(-k[1],T[0])),L[2]))),-A[3]),a(l(a(l(a(x(L[1],A[0]),x(-A[1],L[0])),T[2]),a(l(a(x(T[1],A[0]),x(-A[1],T[0])),-L[2]),l(a(x(T[1],L[0]),x(-L[1],T[0])),A[2]))),_[3]),l(a(l(a(x(L[1],A[0]),x(-A[1],L[0])),_[2]),a(l(a(x(_[1],A[0]),x(-A[1],_[0])),-L[2]),l(a(x(_[1],L[0]),x(-L[1],_[0])),A[2]))),-T[3])))),a(a(l(a(l(a(x(T[1],A[0]),x(-A[1],T[0])),_[2]),a(l(a(x(_[1],A[0]),x(-A[1],_[0])),-T[2]),l(a(x(_[1],T[0]),x(-T[1],_[0])),A[2]))),L[3]),a(l(a(l(a(x(T[1],L[0]),x(-L[1],T[0])),_[2]),a(l(a(x(_[1],L[0]),x(-L[1],_[0])),-T[2]),l(a(x(_[1],T[0]),x(-T[1],_[0])),L[2]))),-A[3]),l(a(l(a(x(k[1],L[0]),x(-L[1],k[0])),T[2]),a(l(a(x(T[1],L[0]),x(-L[1],T[0])),-k[2]),l(a(x(T[1],k[0]),x(-k[1],T[0])),L[2]))),_[3]))),a(l(a(l(a(x(k[1],L[0]),x(-L[1],k[0])),_[2]),a(l(a(x(_[1],L[0]),x(-L[1],_[0])),-k[2]),l(a(x(_[1],k[0]),x(-k[1],_[0])),L[2]))),-T[3]),a(l(a(l(a(x(T[1],L[0]),x(-L[1],T[0])),_[2]),a(l(a(x(_[1],L[0]),x(-L[1],_[0])),-T[2]),l(a(x(_[1],T[0]),x(-T[1],_[0])),L[2]))),k[3]),l(a(l(a(x(T[1],k[0]),x(-k[1],T[0])),_[2]),a(l(a(x(_[1],k[0]),x(-k[1],_[0])),-T[2]),l(a(x(_[1],T[0]),x(-T[1],_[0])),k[2]))),-L[3]))))),P=a(a(a(l(a(l(a(x(L[1],A[0]),x(-A[1],L[0])),k[2]),a(l(a(x(k[1],A[0]),x(-A[1],k[0])),-L[2]),l(a(x(k[1],L[0]),x(-L[1],k[0])),A[2]))),_[3]),l(a(l(a(x(L[1],A[0]),x(-A[1],L[0])),_[2]),a(l(a(x(_[1],A[0]),x(-A[1],_[0])),-L[2]),l(a(x(_[1],L[0]),x(-L[1],_[0])),A[2]))),-k[3])),a(l(a(l(a(x(k[1],A[0]),x(-A[1],k[0])),_[2]),a(l(a(x(_[1],A[0]),x(-A[1],_[0])),-k[2]),l(a(x(_[1],k[0]),x(-k[1],_[0])),A[2]))),L[3]),l(a(l(a(x(k[1],L[0]),x(-L[1],k[0])),_[2]),a(l(a(x(_[1],L[0]),x(-L[1],_[0])),-k[2]),l(a(x(_[1],k[0]),x(-k[1],_[0])),L[2]))),-A[3]))),a(a(l(a(l(a(x(k[1],A[0]),x(-A[1],k[0])),T[2]),a(l(a(x(T[1],A[0]),x(-A[1],T[0])),-k[2]),l(a(x(T[1],k[0]),x(-k[1],T[0])),A[2]))),_[3]),l(a(l(a(x(k[1],A[0]),x(-A[1],k[0])),_[2]),a(l(a(x(_[1],A[0]),x(-A[1],_[0])),-k[2]),l(a(x(_[1],k[0]),x(-k[1],_[0])),A[2]))),-T[3])),a(l(a(l(a(x(T[1],A[0]),x(-A[1],T[0])),_[2]),a(l(a(x(_[1],A[0]),x(-A[1],_[0])),-T[2]),l(a(x(_[1],T[0]),x(-T[1],_[0])),A[2]))),k[3]),l(a(l(a(x(T[1],k[0]),x(-k[1],T[0])),_[2]),a(l(a(x(_[1],k[0]),x(-k[1],_[0])),-T[2]),l(a(x(_[1],T[0]),x(-T[1],_[0])),k[2]))),-A[3])))),S=w(I,P);return S[S.length-1]}}function i(a){return(a===3?r:a===4?d:c)(n,e,t,o)}var u=i(3),f=i(4),s=[function(){return 0},function(){return 0},function(a,x){return x[0]-a[0]},function(a,x,l){var w,_=(a[1]-l[1])*(x[0]-l[0]),T=(a[0]-l[0])*(x[1]-l[1]),k=_-T;if(_>0){if(T<=0)return k;w=_+T}else{if(!(_<0)||T>=0)return k;w=-(_+T)}var L=33306690738754716e-32*w;return k>=L||k<=-L?k:u(a,x,l)},function(a,x,l,w){var _=a[0]-w[0],T=x[0]-w[0],k=l[0]-w[0],L=a[1]-w[1],A=x[1]-w[1],I=l[1]-w[1],P=
3525a[2]-w[2],S=x[2]-w[2],E=l[2]-w[2],D=T*I,F=k*A,H=k*L,V=_*I,Z=_*A,K=T*L,q=P*(D-F)+S*(H-V)+E*(Z-K),W=7771561172376103e-31*((Math.abs(D)+Math.abs(F))*Math.abs(P)+(Math.abs(H)+Math.abs(V))*Math.abs(S)+(Math.abs(Z)+Math.abs(K))*Math.abs(E));return q>W||-q>W?q:f(a,x,l,w)}];function h(a){var x=s[a.length];return x||(x=s[a.length]=i(a.length)),x.apply(void 0,a)}function p(a,x,l,w,_,T,k){return function(L,A,I,P,S){switch(arguments.length){case 0:case 1:return 0;case 2:return w(L,A);case 3:return _(L,A,I);case 4:return T(L,A,I,P);case 5:return k(L,A,I,P,S)}for(var E=new Array(arguments.length),D=0;D<arguments.length;++D)E[D]=arguments[D];return a(E)}}(function(){for(;s.length<=5;)s.push(i(s.length));b.exports=p.apply(void 0,[h].concat(s));for(var a=0;a<=5;++a)b.exports[a]=s[a]})()},{"robust-scale":286,"robust-subtract":288,"robust-sum":289,"two-product":306}],285:[function(m,b,v){var e=m("robust-sum"),n=m("robust-scale");b.exports=function(t,o){if(t.length===1)return n(o,t[0]);if(o.length===1)return n(t,o[0]);if(t.length===0||o.length===0)return[0];var r=[0];if(t.length<o.length)for(var d=0;d<t.length;++d)r=e(r,n(o,t[d]));else for(d=0;d<o.length;++d)r=e(r,n(t,o[d]));return r}},{"robust-scale":286,"robust-sum":289}],286:[function(m,b,v){var e=m("two-product"),n=m("two-sum");b.exports=function(t,o){var r=t.length;if(r===1){var d=e(t[0],o);return d[0]?d:[d[1]]}var c=new Array(2*r),i=[.1,.1],u=[.1,.1],f=0;e(t[0],o,i),i[0]&&(c[f++]=i[0]);for(var s=1;s<r;++s){e(t[s],o,u);var h=i[1];n(h,u[0],i),i[0]&&(c[f++]=i[0]);var p=u[1],a=i[1],x=p+a,l=a-(x-p);i[1]=x,l&&(c[f++]=l)}return i[1]&&(c[f++]=i[1]),f===0&&(c[f++]=0),c.length=f,c}},{"two-product":306,"two-sum":307}],287:[function(m,b,v){b.exports=function(n,t,o,r){var d=e(n,o,r),c=e(t,o,r);if(d>0&&c>0||d<0&&c<0)return!1;var i=e(o,n,t),u=e(r,n,t);return i>0&&u>0||i<0&&u<0?!1:d===0&&c===0&&i===0&&u===0?function(f,s,h,p){for(var a=0;a<2;++a){var x=f[a],l=s[a],w=Math.min(x,l),_=Math.max(x,l),T=h[a],k=p[a],L=Math.min(T,k);if(Math.max(T,k)<w||_<L)return!1}return!0}(n,t,o,r):!0};var e=m("robust-orientation")[3]},{"robust-orientation":284}],288:[function(m,b,v){b.exports=function(e,n){var t=0|e.length,o=0|n.length;if(t===1&&o===1)return function(I,P){var S=I+P,E=S-I,D=I-(S-E)+(P-E);return D?[D,S]:[S]}(e[0],-n[0]);var r,d,c=new Array(t+o),i=0,u=0,f=0,s=Math.abs,h=e[u],p=s(h),a=-n[f],x=s(a);p<x?(d=h,(u+=1)<t&&(h=e[u],p=s(h))):(d=a,(f+=1)<o&&(a=-n[f],x=s(a))),u<t&&p<x||f>=o?(r=h,(u+=1)<t&&(h=e[u],p=s(h))):(r=a,(f+=1)<o&&(a=-n[f],x=s(a)));for(var l,w,_=r+d,T=_-r,k=d-T,L=k,A=_;u<t&&f<o;)p<x?(r=h,(u+=1)<t&&(h=e[u],p=s(h))):(r=a,(f+=1)<o&&(a=-n[f],x=s(a))),(k=(d=L)-(T=(_=r+d)-r))&&(c[i++]=k),L=A-((l=A+_)-(w=l-A))+(_-w),A=l;for(;u<t;)(k=(d=L)-(T=(_=(r=h)+d)-r))&&(c[i++]=k),L=A-((l=A+_)-(w=l-A))+(_-w),A=l,(u+=1)<t&&(h=e[u]);for(;f<o;)(k=(d=L)-(T=(_=(r=a)+d)-r))&&(c[i++]=k),L=A-((l=A+_)-(w=l-A))+(_-w),A=l,(f+=1)<o&&(a=-n[f]);return L&&(c[i++]=L),A&&(c[i++]=A),i||(c[i++]=0),c.length=i,c}},{}],289:[function(m,b,v){b.exports=function(e,n){var t=0|e.length,o=0|n.length;if(t===1&&o===1)return function(I,P){var S=I+P,E=S-I,D=I-(S-E)+(P-E);return D?[D,S]:[S]}(e[0],n[0]);var r,d,c=new Array(t+o),i=0,u=0,f=0,s=Math.abs,h=e[u],p=s(h),a=n[f],x=s(a);p<x?(d=h,(u+=1)<t&&(h=e[u],p=s(h))):(d=a,(f+=1)<o&&(a=n[f],x=s(a))),u<t&&p<x||f>=o?(r=h,(u+=1)<t&&(h=e[u],p=s(h))):(r=a,(f+=1)<o&&(a=n[f],x=s(a)));for(var l,w,_=r+d,T=_-r,k=d-T,L=k,A=_;u<t&&f<o;)p<x?(r=h,(u+=1)<t&&(h=e[u],p=s(h))):(r=a,(f+=1)<o&&(a=n[f],x=s(a))),(k=(d=L)-(T=(_=r+d)-r))&&(c[i++]=k),L=A-((l=A+_)-(w=l-A))+(_-w),A=l;for(;u<t;)(k=(d=L)-(T=(_=(r=h)+d)-r))&&(c[i++]=k),L=A-((l=A+_)-(w=l-A))+(_-w),A=l,(u+=1)<t&&(h=e[u]);for(;f<o;)(k=(d=L)-(T=(_=(r=a)+d)-r))&&(c[i++]=k),L=A-((l=A+_)-(w=l-A))+(_-w),A=l,(f+=1)<o&&(a=n[f]);return L&&(c[i++]=L),A&&(c[i++]=A),i||(c[i++]=0),c.length=i,c}},{}],290:[function(m,b,v){b.exports=function(t){return n(e(t))};var e=m("boundary-cells"),n=m("reduce-simplicial-complex")},{"boundary-cells":34,"reduce-simplicial-complex":276}],291:[function(m,b,v){b.exports=function(r,d,c,i){if(c=c||0,i===void 0&&(i=function(l){for(var w=l.length,_=0,T=0;T<w;++T)_=0|Math.max(_,l[T].length);return _-1}(r)),r.length===0||i<1)return{cells:[],vertexIds:[],vertexWeights:[]};var u=function(l,w){for(var _=l.length,T=n.mallocUint8(_),k=0;k<_;++k)T[k]=l[k]<w|0;return T}(d,+c),f=function(l,w){for(var _=l.length,T=w*(w+1)/2*_|0,k=n.mallocUint32(2*T),L=0,A=0;A<_;++A)for(var I=l[A],P=(w=I.length,0);P<w;++P)for(var S=0;S<P;++S){var E=I[S],D=I[P];k[L++]=0|Math.min(E,D),k[L++]=0|Math.max(E,D)}t(e(k,[L/2|0,2]));var F=2;for(A=2;A<L;A+=2)k[A-2]===k[A]&&k[A-1]===k[A+1]||(k[F++]=k[A],k[F++]=k[A+1]);return e(k,[F/2|0,2])}(r,i),s=function(l,w,_,T){for(var k=l.data,L=l.shape[0],A=n.mallocDouble(L),I=0,P=0;P<L;++P){var S=k[2*P],E=k[2*P+1];if(_[S]!==_[E]){var D=w[S],F=w[E];k[2*I]=S,k[2*I+1]=E,A[I++]=(F-T)/(F-D)}}return l.shape[0]=I,e(A,[I])}(f,d,u,+c),h=function(l,w){var _=n.mallocInt32(2*w),T=l.shape[0],k=l.data;_[0]=0;for(var L=0,A=0;A<T;++A){var I=k[2*A];if(I!==L){for(_[2*L+1]=A;++L<I;)_[2*L]=A,_[2*L+1]=A;_[2*L]=A}}for(_[2*L+1]=T;++L<w;)_[2*L]=_[2*L+1]=T;return _}(f,0|d.length),p=o(i)(r,f.data,h,u),a=function(l){for(var w=0|l.shape[0],_=l.data,T=new Array(w),k=0;k<w;++k)T[k]=[_[2*k],_[2*k+1]];return T}(f),x=[].slice.call(s.data,0,s.shape[0]);return n.free(u),n.free(f.data),n.free(s.data),n.free(h),{cells:p,vertexIds:a,vertexWeights:x}};var e=m("ndarray"),n=m("typedarray-pool"),t=m("ndarray-sort"),o=m("./lib/codegen")},{"./lib/codegen":292,ndarray:259,"ndarray-sort":258,"typedarray-pool":308}],292:[function(m,b,v){b.exports=function(n){return e[n]()};var e=[function(){return function(n,t,o,r){for(var d=n.length,c=0;c<d;++c)n[c].length;return[]}},function(){function n(t,o,r,d){for(var c=0|Math.min(r,d),i=0|Math.max(r,d),u=t[2*c],f=t[2*c+1];u<f;){var s=u+f>>1,h=o[2*s+1];if(h===i)return s;i<h?f=s:u=s+1}return u}return function(t,o,r,d){for(var c=t.length,i=[],u=0;u<c;++u){var f=t[u];if(f.length===2){var s=(d[f[0]]<<0)+(d[f[1]]<<1);if(s===0||s===3)continue;switch(s){case 0:break;case 1:i.push([n(r,o,f[0],f[1])]);break;case 2:i.push([n(r,o,f[1],f[0])])}}}return i}},function(){function n(t,o,r,d){for(var c=0|Math.min(r,d),i=0|Math.max(r,d),u=t[2*c],f=t[2*c+1];u<f;){var s=u+f>>1,h=o[2*s+1];if(h===i)return s;i<h?f=s:u=s+1}return u}return function(t,o,r,d){for(var c=t.length,i=[],u=0;u<c;++u){var f=t[u],s=f.length;if(s===3){if((h=(d[f[0]]<<0)+(d[f[1]]<<1)+(d[f[2]]<<2))===0||h===7)continue;switch(h){case 0:break;case 1:i.push([n(r,o,f[0],f[2]),n(r,o,f[0],f[1])]);break;case 2:i.push([n(r,o,f[1],f[0]),n(r,o,f[1],f[2])]);break;case 3:i.push([n(r,o,f[0],f[2]),n(r,o,f[1],f[2])]);break;case 4:i.push([n(r,o,f[2],f[1]),n(r,o,f[2],f[0])]);break;case 5:i.push([n(r,o,f[2],f[1]),n(r,o,f[0],f[1])]);break;case 6:i.push([n(r,o,f[1],f[0]),n(r,o,f[2],f[0])])}}else if(s===2){var h;if((h=(d[f[0]]<<0)+(d[f[1]]<<1))===0||h===3)continue;switch(h){case 0:break;case 1:i.push([n(r,o,f[0],f[1])]);break;case 2:i.push([n(r,o,f[1],f[0])])}}}return i}},function(){function n(t,o,r,d){for(var c=0|Math.min(r,d),i=0|Math.max(r,d),u=t[2*c],f=t[2*c+1];u<f;){var s=u+f>>1,h=o[2*s+1];if(h===i)return s;i<h?f=s:u=s+1}return u}return function(t,o,r,d){for(var c=t.length,i=[],u=0;u<c;++u){var f=t[u],s=f.length;if(s===4){if((h=(d[f[0]]<<0)+(d[f[1]]<<1)+(d[f[2]]<<2)+(d[f[3]]<<3))===0||h===15)continue;switch(h){case 0:break;case 1:i.push([n(r,o,f[0],f[1]),n(r,o,f[0],f[2]),n(r,o,f[0],f[3])]);break;case 2:i.push([n(r,o,f[1],f[2]),n(r,o,f[1],f[0]),n(r,o,f[1],f[3])]);break;case 3:i.push([n(r,o,f[1],f[2]),n(r,o,f[0],f[2]),n(r,o,f[0],f[3])],[n(r,o,f[1],f[3]),n(r,o,f[1],f[2]),n(r,o,f[0],f[3])]);break;case 4:i.push([n(r,o,f[2],f[0]),n(r,o,f[2],f[1]),n(r,o,f[2],f[3])]);break;case 5:i.push([n(r,o,f[0],f[1]),n(r,o,f[2],f[1]),n(r,o,f[0],f[3])],[n(r,o,f[2],f[1]),n(r,o,f[2],f[3]),n(r,o,f[0],f[3])]);break;case 6:i.push([n(r,o,f[2],f[0]),n(r,o,f[1],f[0]),n(r,o,f[1],f[3])],[n(r,o,f[2],f[3]),n(r,o,f[2],f[0]),n(r,o,f[1],f[3])]);break;case 7:i.push([n(r,o,f[0],f[3]),n(r,o,f[1],f[3]),n(r,o,f[2],f[3])]);break;case 8:i.push([n(r,o,f[3],f[1]),n(r,o,f[3],f[0]),n(r,o,f[3],f[2])]);break;case 9:i.push([n(r,o,f[3],f[1]),n(r,o,f[0],f[1]),n(r,o,f[0],f[2])],[n(r,o,f[3],f[2]),n(r,o,f[3],f[1]),n(r,o,f[0],f[2])]);break;case 10:i.push([n(r,o,f[1],f[0]),n(r,o,f[3],f[0]),n(r,o,f[1],f[2])],[n(r,o,f[3],f[0]),n(r,o,f[3],f[2]),n(r,o,f[1],f[2])]);break;case 11:i.push([n(r,o,f[1],f[2]),n(r,o,f[0],f[2]),n(r,o,f[3],f[2])]);break;case 12:i.push([n(r,o,f[3],f[0]),n(r,o,f[2],f[0]),n(r,o,f[2],f[1])],[n(r,o,f[3],f[1]),n(r,o,f[3],f[0]),n(r,o,f[2],f[1])]);break;case 13:i.push([n(r,o,f[0],f[1]),n(r,o,f[2],f[1]),n(r,o,f[3],f[1])]);break;case 14:i.push([n(r,o,f[2],f[0]),n(r,o,f[1],f[0]),n(r,o,f[3],f[0])])}}else if(s===3){if((h=(d[f[0]]<<0)+(d[f[1]]<<1)+(d[f[2]]<<2))===0||h===7)continue;switch(h){case 0:break;case 1:i.push([n(r,o,f[0],f[2]),n(r,o,f[0],f[1])]);break;case 2:i.push([n(r,o,f[1],f[0]),n(r,o,f[1],f[2])]);break;case 3:i.push([n(r,o,f[0],f[2]),n(r,o,f[1],f[2])]);break;case 4:i.push([n(r,o,f[2],f[1]),n(r,o,f[2],f[0])]);break;case 5:i.push([n(r,o,f[2],f[1]),n(r,o,f[0],f[1])]);break;case 6:i.push([n(r,o,f[1],f[0]),n(r,o,f[2],f[0])])}}else if(s===2){var h;if((h=(d[f[0]]<<0)+(d[f[1]]<<1))===0||h===3)continue;switch(h){case 0:break;case 1:i.push([n(r,o,f[0],f[1])]);break;case 2:i.push([n(r,o,f[1],f[0])])}}}return i}}]},{}],293:[function(m,b,v){var e=m("bit-twiddle"),n=m("union-find");function t(f,s){var h=f.length,p=f.length-s.length,a=Math.min;if(p)return p;switch(h){case 0:return 0;case 1:return f[0]-s[0];case 2:return(w=f[0]+f[1]-s[0]-s[1])||a(f[0],f[1])-a(s[0],s[1]);case 3:var x=f[0]+f[1],l=s[0]+s[1];if(w=x+f[2]-(l+s[2]))return w;var w,_=a(f[0],f[1]),T=a(s[0],s[1]);return(w=a(_,f[2])-a(T,s[2]))||a(_+f[2],x)-a(T+s[2],l);default:var k=f.slice(0);k.sort();var L=s.slice(0);L.sort();for(var A=0;A<h;++A)if(p=k[A]-L[A])return p;return 0}}function o(f,s){return t(f[0],s[0])}function r(f,s){if(s){for(var h=f.length,p=new Array(h),a=0;a<h;++a)p[a]=[f[a],s[a]];for(p.sort(o),a=0;a<h;++a)f[a]=p[a][0],s[a]=p[a][1];return f}return f.sort(t),f}function d(f){if(f.length===0)return[];for(var s=1,h=f.length,p=1;p<h;++p){var a=f[p];if(t(a,f[p-1])){if(p===s){s++;continue}f[s++]=a}}return f.length=s,f}function c(f,s){for(var h=0,p=f.length-1,a=-1;h<=p;){var x=h+p>>1,l=t(f[x],s);l<=0?(l===0&&(a=x),h=x+1):l>0&&(p=x-1)}return a}function i(f,s){for(var h=new Array(f.length),p=0,a=h.length;p<a;++p)h[p]=[];for(var x=[],l=(p=0,s.length);p<l;++p)for(var w=s[p],_=w.length,T=1,k=1<<_;T<k;++T){x.length=e.popCount(T);for(var L=0,A=0;A<_;++A)T&1<<A&&(x[L++]=w[A]);var I=c(f,x);if(!(I<0))for(;h[I++].push(p),!(I>=f.length||t(f[I],x)!==0););}return h}function u(f,s){if(s<0)return[];for(var h=[],p=(1<<s+1)-1,a=0;a<f.length;++a)for(var x=f[a],l=p;l<1<<x.length;l=e.nextCombination(l)){for(var w=new Array(s+1),_=0,T=0;T<x.length;++T)l&1<<T&&(w[_++]=x[T]);h.push(w)}return r(h)}v.dimension=function(f){for(var s=0,h=Math.max,p=0,a=f.length;p<a;++p)s=h(s,f[p].length);return s-1},v.countVertices=function(f){for(var s=-1,h=Math.max,p=0,a=f.length;p<a;++p)for(var x=f[p],l=0,w=x.length;l<w;++l)s=h(s,x[l]);return s+1},v.cloneCells=function(f){for(var s=new Array(f.length),h=0,p=f.length;h<p;++h)s[h]=f[h].slice(0);return s},v.compareCells=t,v.normalize=r,v.unique=d,v.findCell=c,v.incidence=i,v.dual=function(f,s){if(!s)return i(d(u(f,0)),f);for(var h=new Array(s),p=0;p<s;++p)h[p]=[];p=0;for(var a=f.length;p<a;++p)for(var x=f[p],l=0,w=x.length;l<w;++l)h[x[l]].push(p);return h},v.explode=function(f){for(var s=[],h=0,p=f.length;h<p;++h)for(var a=f[h],x=0|a.length,l=1,w=1<<x;l<w;++l){for(var _=[],T=0;T<x;++T)l>>>T&1&&_.push(a[T]);s.push(_)}return r(s)}
3525,v.skeleton=u,v.boundary=function(f){for(var s=[],h=0,p=f.length;h<p;++h)for(var a=f[h],x=0,l=a.length;x<l;++x){for(var w=new Array(a.length-1),_=0,T=0;_<l;++_)_!==x&&(w[T++]=a[_]);s.push(w)}return r(s)},v.connectedComponents=function(f,s){return s?function(h,p){for(var a=new n(p),x=0;x<h.length;++x)for(var l=h[x],w=0;w<l.length;++w)for(var _=w+1;_<l.length;++_)a.link(l[w],l[_]);var T=[],k=a.ranks;for(x=0;x<k.length;++x)k[x]=-1;for(x=0;x<h.length;++x){var L=a.find(h[x][0]);k[L]<0?(k[L]=T.length,T.push([h[x].slice(0)])):T[k[L]].push(h[x].slice(0))}return T}(f,s):function(h){for(var p=d(r(u(h,0))),a=new n(p.length),x=0;x<h.length;++x)for(var l=h[x],w=0;w<l.length;++w)for(var _=c(p,[l[w]]),T=w+1;T<l.length;++T)a.link(_,c(p,[l[T]]));var k=[],L=a.ranks;for(x=0;x<L.length;++x)L[x]=-1;for(x=0;x<h.length;++x){var A=a.find(c(p,[h[x][0]]));L[A]<0?(L[A]=k.length,k.push([h[x].slice(0)])):k[L[A]].push(h[x].slice(0))}return k}(f)}},{"bit-twiddle":32,"union-find":309}],294:[function(m,b,v){arguments[4][32][0].apply(v,arguments)},{dup:32}],295:[function(m,b,v){arguments[4][293][0].apply(v,arguments)},{"bit-twiddle":294,dup:293,"union-find":296}],296:[function(m,b,v){function e(n){this.roots=new Array(n),this.ranks=new Array(n);for(var t=0;t<n;++t)this.roots[t]=t,this.ranks[t]=0}b.exports=e,e.prototype.length=function(){return this.roots.length},e.prototype.makeSet=function(){var n=this.roots.length;return this.roots.push(n),this.ranks.push(0),n},e.prototype.find=function(n){for(var t=this.roots;t[n]!==n;){var o=t[n];t[n]=t[o],n=o}return n},e.prototype.link=function(n,t){var o=this.find(n),r=this.find(t);if(o!==r){var d=this.ranks,c=this.roots,i=d[o],u=d[r];i<u?c[o]=r:u<i?c[r]=o:(c[r]=o,++d[o])}}},{}],297:[function(m,b,v){b.exports=function(t,o,r){for(var d=o.length,c=t.length,i=new Array(d),u=new Array(d),f=new Array(d),s=new Array(d),h=0;h<d;++h)i[h]=u[h]=-1,f[h]=1/0,s[h]=!1;for(h=0;h<c;++h){var p=t[h];if(p.length!==2)throw new Error("Input must be a graph");var a=p[1],x=p[0];u[x]!==-1?u[x]=-2:u[x]=a,i[a]!==-1?i[a]=-2:i[a]=x}function l(K){if(s[K])return 1/0;var q,W,$,R,N,U=i[K],Q=u[K];return U<0||Q<0?1/0:(q=o[K],W=o[U],$=o[Q],R=Math.abs(e(q,W,$)),N=Math.sqrt(Math.pow(W[0]-$[0],2)+Math.pow(W[1]-$[1],2)),R/N)}function w(K,q){var W=S[K],$=S[q];S[K]=$,S[q]=W,E[W]=q,E[$]=K}function _(K){return f[S[K]]}function T(K){return 1&K?K-1>>1:(K>>1)-1}function k(K){for(var q=_(K);;){var W=q,$=2*K+1,R=2*(K+1),N=K;if($<D){var U=_($);U<W&&(N=$,W=U)}if(R<D&&_(R)<W&&(N=R),N===K)return K;w(K,N),K=N}}function L(K){for(var q=_(K);K>0;){var W=T(K);if(W>=0&&q<_(W)){w(K,W),K=W;continue}return K}}function A(){if(D>0){var K=S[0];return w(0,D-1),D-=1,k(0),K}return-1}function I(K,q){var W=S[K];return f[W]===q?K:(f[W]=-1/0,L(K),A(),f[W]=q,L((D+=1)-1))}function P(K){if(!s[K]){s[K]=!0;var q=i[K],W=u[K];i[W]>=0&&(i[W]=q),u[q]>=0&&(u[q]=W),E[q]>=0&&I(E[q],l(q)),E[W]>=0&&I(E[W],l(W))}}var S=[],E=new Array(d);for(h=0;h<d;++h)(f[h]=l(h))<1/0?(E[h]=S.length,S.push(h)):E[h]=-1;var D=S.length;for(h=D>>1;h>=0;--h)k(h);for(;;){var F=A();if(F<0||f[F]>r)break;P(F)}var H=[];for(h=0;h<d;++h)s[h]||(E[h]=H.length,H.push(o[h].slice()));H.length;function V(K,q){if(K[q]<0)return q;var W=q,$=q;do{var R=K[$];if(!s[$]||R<0||R===$||(R=K[$=R],!s[$]||R<0||R===$))break;$=R,W=K[W]}while(W!==$);for(var N=q;N!==$;N=K[N])K[N]=$;return $}var Z=[];return t.forEach(function(K){var q=V(i,K[0]),W=V(u,K[1]);if(q>=0&&W>=0&&q!==W){var $=E[q],R=E[W];$!==R&&Z.push([$,R])}}),n.unique(n.normalize(Z)),{positions:H,edges:Z}};var e=m("robust-orientation"),n=m("simplicial-complex")},{"robust-orientation":284,"simplicial-complex":295}],298:[function(m,b,v){b.exports=function(t,o){var r,d,c,i;if(o[0][0]<o[1][0])r=o[0],d=o[1];else{if(!(o[0][0]>o[1][0]))return n(o,t);r=o[1],d=o[0]}if(t[0][0]<t[1][0])c=t[0],i=t[1];else{if(!(t[0][0]>t[1][0]))return-n(t,o);c=t[1],i=t[0]}var u=e(r,d,i),f=e(r,d,c);if(u<0){if(f<=0)return u}else if(u>0){if(f>=0)return u}else if(f)return f;if(u=e(i,c,d),f=e(i,c,r),u<0){if(f<=0)return u}else if(u>0){if(f>=0)return u}else if(f)return f;return d[0]-i[0]};var e=m("robust-orientation");function n(t,o){var r,d,c,i;if(o[0][0]<o[1][0])r=o[0],d=o[1];else{if(!(o[0][0]>
3525o[1][0])){var u=Math.min(t[0][1],t[1][1]),f=Math.max(t[0][1],t[1][1]),s=Math.min(o[0][1],o[1][1]),h=Math.max(o[0][1],o[1][1]);return f<s?f-s:u>h?u-h:f-h}r=o[1],d=o[0]}t[0][1]<t[1][1]?(c=t[0],i=t[1]):(c=t[1],i=t[0]);var p=e(d,r,c);return p||(p=e(d,r,i))||i-d}},{"robust-orientation":284}],299:[function(m,b,v){b.exports=function(f){for(var s=f.length,h=2*s,p=new Array(h),a=0;a<s;++a){var x=f[a],l=x[0][0]<x[1][0];p[2*a]=new u(x[0][0],x,l,a),p[2*a+1]=new u(x[1][0],x,!l,a)}p.sort(function(P,S){var E=P.x-S.x;return E||(E=P.create-S.create)||Math.min(P.segment[0][1],P.segment[1][1])-Math.min(S.segment[0][1],S.segment[1][1])});var w=n(o),_=[],T=[],k=[];for(a=0;a<h;){for(var L=p[a].x,A=[];a<h;){var I=p[a];if(I.x!==L)break;a+=1,I.segment[0][0]===I.x&&I.segment[1][0]===I.x?I.create&&(I.segment[0][1]<I.segment[1][1]?(A.push(new i(I.segment[0][1],I.index,!0,!0)),A.push(new i(I.segment[1][1],I.index,!1,!1))):(A.push(new i(I.segment[1][1],I.index,!0,!1)),A.push(new i(I.segment[0][1],I.index,!1,!0)))):w=I.create?w.insert(I.segment,I.index):w.remove(I.segment)}_.push(w.root),T.push(L),k.push(A)}return new r(_,T,k)};var e=m("binary-search-bounds"),n=m("functional-red-black-tree"),t=m("robust-orientation"),o=m("./lib/order-segments");function r(f,s,h){this.slabs=f,this.coordinates=s,this.horizontal=h}function d(f,s){return f.y-s}function c(f,s){for(var h=null;f;){var p,a,x=f.key;x[0][0]<x[1][0]?(p=x[0],a=x[1]):(p=x[1],a=x[0]);var l=t(p,a,s);if(l<0)f=f.left;else if(l>0)if(s[0]!==x[1][0])h=f,f=f.right;else{if(w=c(f.right,s))return w;f=f.left}else{if(s[0]!==x[1][0])return f;var w;if(w=c(f.right,s))return w;f=f.left}}return h}function i(f,s,h,p){this.y=f,this.index=s,this.start=h,this.closed=p}function u(f,s,h,p){this.x=f,this.segment=s,this.create=h,this.index=p}r.prototype.castUp=function(f){var s=e.le(this.coordinates,f[0]);if(s<0)return-1;this.slabs[s];var h=c(this.slabs[s],f),p=-1;if(h&&(p=h.value),this.coordinates[s]===f[0]){var a=null;if(h&&(a=h.key),s>0){var x=c(this.slabs[s-1],f);x&&(a?o(x.key,a)>0&&(a=x.key,p=x.value):(p=x.value,a=x.key))}var l=this.horizontal[s];if(l.length>0){var w=e.ge(l,f[1],d);if(w<l.length){var _=l[w];if(f[1]===_.y){if(_.closed)return _.index;for(;w<l.length-1&&l[w+1].y===f[1];)if((_=l[w+=1]).closed)return _.index;if(_.y===f[1]&&!_.start){if((w+=1)>=l.length)return p;_=l[w]}}if(_.start)if(a){var T=t(a[0],a[1],[f[0],_.y]);a[0][0]>a[1][0]&&(T=-T),T>0&&(p=_.index)}else p=_.index;else _.y!==f[1]&&(p=_.index)}}}return p}},{"./lib/order-segments":298,"binary-search-bounds":31,"functional-red-black-tree":69,"robust-orientation":284}],300:[function(m,b,v){var e=m("robust-dot-product"),n=m("robust-sum");function t(r,d){var c=n(e(r,d),[d[d.length-1]]);return c[c.length-1]}function o(r,d,c,i){var u=-d/(i-d);u<0?u=0:u>1&&(u=1);for(var f=1-u,s=r.length,h=new Array(s),p=0;p<s;++p)h[p]=u*r[p]+f*c[p];return h}b.exports=function(r,d){for(var c=[],i=[],u=t(r[r.length-1],d),f=r[r.length-1],s=r[0],h=0;h<r.length;++h,f=s){var p=t(s=r[h],d);if(u<0&&p>0||u>0&&p<0){var a=o(f,p,s,u);c.push(a),i.push(a.slice())}p<0?i.push(s.slice()):p>0?c.push(s.slice()):(c.push(s.slice()),i.push(s.slice())),u=p}return{positive:c,negative:i}},b.exports.positive=function(r,d){for(var c=[],i=t(r[r.length-1],d),u=r[r.length-1],f=r[0],s=0;s<r.length;++s,u=f){var h=t(f=r[s],d);(i<0&&h>0||i>0&&h<0)&&c.push(o(u,h,f,i)),h>=0&&c.push(f.slice()),i=h}return c},b.exports.negative=function(r,d){for(var c=[],i=t(r[r.length-1],d),u=r[r.length-1],f=r[0],s=0;s<r.length;++s,u=f){var h=t(f=r[s],d);(i<0&&h>0||i>0&&h<0)&&c.push(o(u,h,f,i)),h<=0&&c.push(f.slice()),i=h}return c}},{"robust-dot-product":281,"robust-sum":289}],301:[function(m,b,v){(function(){var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(c){return o(d(c),arguments)}function t(c,i){return n.apply(null,[c].concat(i||[]))}function o(c,i){var u,f,s,h,p,a,x,l,w,_=1,T=c.length,k="";for(f=0;f<T;
3525f++)if(typeof c[f]=="string")k+=c[f];else if(typeof c[f]=="object"){if((h=c[f]).keys)for(u=i[_],s=0;s<h.keys.length;s++){if(u==null)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',h.keys[s],h.keys[s-1]));u=u[h.keys[s]]}else u=h.param_no?i[h.param_no]:i[_++];if(e.not_type.test(h.type)&&e.not_primitive.test(h.type)&&u instanceof Function&&(u=u()),e.numeric_arg.test(h.type)&&typeof u!="number"&&isNaN(u))throw new TypeError(n("[sprintf] expecting number but found %T",u));switch(e.number.test(h.type)&&(l=u>=0),h.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,h.width?parseInt(h.width):0);break;case"e":u=h.precision?parseFloat(u).toExponential(h.precision):parseFloat(u).toExponential();break;case"f":u=h.precision?parseFloat(u).toFixed(h.precision):parseFloat(u);break;case"g":u=h.precision?String(Number(u.toPrecision(h.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=h.precision?u.substring(0,h.precision):u;break;case"t":u=String(!!u),u=h.precision?u.substring(0,h.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=h.precision?u.substring(0,h.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=h.precision?u.substring(0,h.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase()}e.json.test(h.type)?k+=u:(!e.number.test(h.type)||l&&!h.sign?w="":(w=l?"+":"-",u=u.toString().replace(e.sign,"")),a=h.pad_char?h.pad_char==="0"?"0":h.pad_char.charAt(1):" ",x=h.width-(w+u).length,p=h.width&&x>0?a.repeat(x):"",k+=h.align?w+u+p:a==="0"?w+p+u:p+w+u)}return k}var r=Object.create(null);function d(c){if(r[c])return r[c];for(var i,u=c,f=[],s=0;u;){if((i=e.text.exec(u))!==null)f.push(i[0]);else if((i=e.modulo.exec(u))!==null)f.push("%");else{if((i=e.placeholder.exec(u))===null)throw new SyntaxError("[sprintf] unexpected placeholder");if(i[2]){s|=1;var h=[],p=i[2],a=[];if((a=e.key.exec(p))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");for(h.push(a[1]);(p=p.substring(a[0].length))!=="";)if((a=e.key_access.exec(p))!==null)h.push(a[1]);else{if((a=e.index_access.exec(p))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");h.push(a[1])}i[2]=h}else s|=2;if(s===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");f.push({placeholder:i[0],param_no:i[1],keys:i[2],sign:i[3],pad_char:i[4],align:i[5],width:i[6],precision:i[7],type:i[8]})}u=u.substring(i[0].length)}return r[c]=f}v!==void 0&&(v.sprintf=n,v.vsprintf=t),typeof window<"u"&&(window.sprintf=n,window.vsprintf=t)})()},{}],302:[function(m,b,v){b.exports=function(r,d){if(r.dimension<=0)return{positions:[],cells:[]};if(r.dimension===1)return function(u,f){for(var s=n(u,f),h=s.length,p=new Array(h),a=new Array(h),x=0;x<h;++x)p[x]=[s[x]],a[x]=[x];return{positions:p,cells:a}}(r,d);var c=r.order.join()+"-"+r.dtype,i=o[c];return d=+d||0,i||(i=o[c]=function(u,f){var s=u.length+"d",h=t[s];if(h)return h(e,u,f)}(r.order,r.dtype)),i(r,d)};var e=m("ndarray-extract-contour"),n=m("zero-crossings"),t={"2d":function(r,d,c){var i=r({order:d,scalarArguments:3,getters:c==="generic"?[0]:void 0,phase:function(u,f,s,h){return u>h|0},vertex:function(u,f,s,h,p,a,x,l,w,_,T,k,L){var A=(x<<0)+(l<<1)+(w<<2)+(_<<3)|0;if(A!==0&&A!==15)switch(A){case 0:T.push([u-.5,f-.5]);break;case 1:T.push([u-.25-.25*(h+s-2*L)/(s-h),f-.25-.25*(p+s-2*L)/(s-p)]);break;case 2:T.push([u-.75-.25*(-h-s+2*L)/(h-s),f-.25-.25*(a+h-2*L)/(h-a)]);break;case 3:T.push([u-.5,f-.5-.5*(p+s+a+h-4*L)/(s-p+h-a)]);break;case 4:T.push([u-.25-.25*(a+p-2*L)/(p-a),f-.75-.25*(-p-s+2*L)/(p-s)]);break;case 5:T.push([u-.5-.5*(h+s+a+p-4*L)/(s-h+p-a),f-.5]);break;case 6:T.push([u-.5-.25*(-h-s+a+p)/(h-s+p-a),f-.5-.25*(-p-s+a+h)/(p-s+h-a)]);break;case 7:T.push([u-.75-.25*(a+p-2*L)/(p-a),f-.75-.25*(a+h-2*L)/(h-a)]);break;case 8:T.push([u-.75-.25*(-a-p+2*L)/(a-p),f-.75-.25*(-a-h+2*L)/(a-h)]);break;
3525case 9:T.push([u-.5-.25*(h+s+-a-p)/(s-h+a-p),f-.5-.25*(p+s+-a-h)/(s-p+a-h)]);break;case 10:T.push([u-.5-.5*(-h-s-a-p+4*L)/(h-s+a-p),f-.5]);break;case 11:T.push([u-.25-.25*(-a-p+2*L)/(a-p),f-.75-.25*(p+s-2*L)/(s-p)]);break;case 12:T.push([u-.5,f-.5-.5*(-p-s-a-h+4*L)/(p-s+a-h)]);break;case 13:T.push([u-.75-.25*(h+s-2*L)/(s-h),f-.25-.25*(-a-h+2*L)/(a-h)]);break;case 14:T.push([u-.25-.25*(-h-s+2*L)/(h-s),f-.25-.25*(-p-s+2*L)/(p-s)]);break;case 15:T.push([u-.5,f-.5])}},cell:function(u,f,s,h,p,a,x,l,w){p?l.push([u,f]):l.push([f,u])}});return function(u,f){var s=[],h=[];return i(u,s,h,f),{positions:s,cells:h}}}},o={}},{"ndarray-extract-contour":251,"zero-crossings":318}],303:[function(m,b,v){(function(e){(function(){b.exports=function r(d,c,i){i=i||{};var u=o[d];u||(u=o[d]={" ":{data:new Float32Array(0),shape:.2}});var f=u[c];if(!f)if(c.length<=1||!/\d/.test(c))f=u[c]=function(L){for(var A=L.cells,I=L.positions,P=new Float32Array(6*A.length),S=0,E=0,D=0;D<A.length;++D)for(var F=A[D],H=0;H<3;++H){var V=I[F[H]];P[S++]=V[0],P[S++]=V[1]+1.4,E=Math.max(V[0],E)}return{data:P,shape:E}}(n(c,{triangles:!0,font:d,textAlign:i.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var s=c.split(/(\d|\s)/),h=new Array(s.length),p=0,a=0,x=0;x<s.length;++x)h[x]=r(d,s[x]),p+=h[x].data.length,a+=h[x].shape,x>0&&(a+=.02);var l=new Float32Array(p),w=0,_=-.5*a;for(x=0;x<h.length;++x){for(var T=h[x].data,k=0;k<T.length;k+=2)l[w++]=T[k]+_,l[w++]=T[k+1];_+=h[x].shape+.02}f=u[c]={data:l,shape:a}}return f};var n=m("vectorize-text"),t=window||e.global||{},o=t.__TEXT_CACHE||{};t.__TEXT_CACHE={}}).call(this)}).call(this,m("_process"))},{_process:5,"vectorize-text":311}],304:[function(m,b,v){var e=m("parse-unit");b.exports=t;function n(o,r){var d=e(getComputedStyle(o).getPropertyValue(r));return d[0]*t(d[1],o)}function t(o,r){switch(r=r||document.body,o=(o||"px").trim().toLowerCase(),r!==window&&r!==document||(r=document.body),o){case"%":return r.clientHeight/100;case"ch":case"ex":return function(d,c){var i=document.createElement("div");i.style["font-size"]="128"+d,c.appendChild(i);var u=n(i,"font-size")/128;return c.removeChild(i),u}(o,r);case"em":return n(r,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}},{"parse-unit":265}],305:[function(m,b,v){b.exports=function(p){var a=(p=p||{}).center||[0,0,0],x=p.up||[0,1,0],l=p.right||u(x),w=p.radius||1,_=p.theta||0,T=p.phi||0;if(a=[].slice.call(a,0,3),x=[].slice.call(x,0,3),r(x,x),l=[].slice.call(l,0,3),r(l,l),"eye"in p){var k=p.eye,L=[k[0]-a[0],k[1]-a[1],k[2]-a[2]];o(l,L,x),c(l[0],l[1],l[2])<1e-6?l=u(x):r(l,l),w=c(L[0],L[1],L[2]);var A=d(x,L)/w,I=d(l,L)/w;T=Math.acos(A),_=Math.acos(I)}return w=Math.log(w),new f(p.zoomMin,p.zoomMax,a,x,l,w,_,T)};var e=m("filtered-vector"),n=m("gl-mat4/invert"),t=m("gl-mat4/rotate"),o=m("gl-vec3/cross"),r=m("gl-vec3/normalize"),d=m("gl-vec3/dot");function c(p,a,x){return Math.sqrt(Math.pow(p,2)+Math.pow(a,2)+Math.pow(x,2))}function i(p){return Math.min(1,Math.max(-1,p))}function u(p){var a=Math.abs(p[0]),x=Math.abs(p[1]),l=Math.abs(p[2]),w=[0,0,0];a>Math.max(x,l)?w[2]=1:x>Math.max(a,l)?w[0]=1:w[1]=1;for(var _=0,T=0,k=0;k<3;++k)_+=p[k]*p[k],T+=w[k]*p[k];for(k=0;k<3;++k)w[k]-=T/_*p[k];return r(w,w),w}function f(p,a,x,l,w,_,T,k){this.center=e(x),this.up=e(l),this.right=e(w),this.radius=e([_]),this.angle=e([T,k]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(p,a),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 L=0;L<16;++L)this.computedMatrix[L]=.5;this.recalcMatrix(0)}var s=f.prototype;s.setDistanceLimits=function(p,a){p=p>0?Math.log(p):-1/0,a=a>0?Math.log(a):1/0,a=Math.max(a,p),this.radius.bounds[0][0]=p,this.radius.bounds[1][0]=a},s.getDistanceLimits=function(p){var a=this.radius.bounds[0];return p?(p[0]=Math.exp(a[0][0]),p[1]=Math.exp(a[1][0]),p):[Math.exp(a[0][0]),Math.exp(a[1][0])]},s.recalcMatrix=function(p){this.center.curve(p),this.up.curve(p),this.right.curve(p),this.radius.curve(p),this.angle.curve(p);for(var a=this.computedUp,x=this.computedRight,l=0,w=0,_=0;_<3;++_)w+=a[_]*x[_],l+=a[_]*a[_];var T=Math.sqrt(l),k=0;for(_=0;_<3;++_)x[_]-=a[_]*w/l,k+=x[_]*x[_],a[_]/=T;var L=Math.sqrt(k);for(_=0;_<3;++_)x[_]/=L;var A=this.computedToward;o(A,a,x),r(A,A);var I=Math.exp(this.computedRadius[0]),P=this.computedAngle[0],S=this.computedAngle[1],E=Math.cos(P),D=Math.sin(P),F=Math.cos(S),H=Math.sin(S),V=this.computedCenter,Z=E*F,K=D*F,q=H,W=-E*H,$=-D*H,R=F,N=this.computedEye,U=this.computedMatrix;for(_=0;_<3;++_){var Q=Z*x[_]+K*A[_]+q*a[_];U[4*_+1]=W*x[_]+$*A[_]+R*a[_],U[4*_+2]=Q,U[4*_+3]=0}var j=U[1],X=U[5],J=U[9],re=U[2],ne=U[6],se=U[10],oe=X*se-J*ne,pe=J*re-j*se,ce=j*ne-X*re,de=c(oe,pe,ce);for(oe/=de,pe/=de,ce/=de,U[0]=oe,U[4]=pe,U[8]=ce,_=0;_<3;++_)N[_]=V[_]+U[2+4*_]*I;for(_=0;_<3;++_){k=0;for(var xe=0;xe<3;++xe)k+=U[_+4*xe]*N[xe];U[12+_]=-k}U[15]=1},s.getMatrix=function(p,a){this.recalcMatrix(p);var x=this.computedMatrix;if(a){for(var l=0;l<16;++l)a[l]=x[l];return a}return x};var h=[0,0,0];s.rotate=function(p,a,x,l){if(this.angle.move(p,a,x),l){this.recalcMatrix(p);var w=this.computedMatrix;h[0]=w[2],h[1]=w[6],h[2]=w[10];for(var _=this.computedUp,T=this.computedRight,k=this.computedToward,L=0;L<3;++L)w[4*L]=_[L],w[4*L+1]=T[L],w[4*L+2]=k[L];for(t(w,w,l,h),L=0;L<3;++L)_[L]=w[4*L],T[L]=w[4*L+1];this.up.set(p,_[0],_[1],_[2]),this.right.set(p,T[0],T[1],T[2])}},s.pan=function(p,a,x,l){a=a||0,x=x||0,l=l||0,this.recalcMatrix(p);var w=this.computedMatrix,_=(Math.exp(this.computedRadius[0]),w[1]),T=w[5],k=w[9],L=c(_,T,k);_/=L,T/=L,k/=L;var A=w[0],I=w[4],P=w[8],S=A*_+I*T+P*k,E=c(A-=_*S,I-=T*S,P-=k*S),D=(A/=E)*a+_*x,F=(I/=E)*a+T*x,H=(P/=E)*a+k*
3525x;this.center.move(p,D,F,H);var V=Math.exp(this.computedRadius[0]);V=Math.max(1e-4,V+l),this.radius.set(p,Math.log(V))},s.translate=function(p,a,x,l){this.center.move(p,a||0,x||0,l||0)},s.setMatrix=function(p,a,x,l){var w=1;typeof x=="number"&&(w=0|x),(w<0||w>3)&&(w=1);var _=(w+2)%3;a||(this.recalcMatrix(p),a=this.computedMatrix);var T=a[w],k=a[w+4],L=a[w+8];if(l){var A=Math.abs(T),I=Math.abs(k),P=Math.abs(L),S=Math.max(A,I,P);A===S?(T=T<0?-1:1,k=L=0):P===S?(L=L<0?-1:1,T=k=0):(k=k<0?-1:1,T=L=0)}else{var E=c(T,k,L);T/=E,k/=E,L/=E}var D,F,H=a[_],V=a[_+4],Z=a[_+8],K=H*T+V*k+Z*L,q=c(H-=T*K,V-=k*K,Z-=L*K),W=k*(Z/=q)-L*(V/=q),$=L*(H/=q)-T*Z,R=T*V-k*H,N=c(W,$,R);if(W/=N,$/=N,R/=N,this.center.jump(p,fe,me,Te),this.radius.idle(p),this.up.jump(p,T,k,L),this.right.jump(p,H,V,Z),w===2){var U=a[1],Q=a[5],j=a[9],X=U*H+Q*V+j*Z,J=U*W+Q*$+j*R;D=oe<0?-Math.PI/2:Math.PI/2,F=Math.atan2(J,X)}else{var re=a[2],ne=a[6],se=a[10],oe=re*T+ne*k+se*L,pe=re*H+ne*V+se*Z,ce=re*W+ne*$+se*R;D=Math.asin(i(oe)),F=Math.atan2(ce,pe)}this.angle.jump(p,F,D),this.recalcMatrix(p);var de=a[2],xe=a[6],we=a[10],be=this.computedMatrix;n(be,a);var Ee=be[15],fe=be[12]/Ee,me=be[13]/Ee,Te=be[14]/Ee,_e=Math.exp(this.computedRadius[0]);this.center.jump(p,fe-de*_e,me-xe*_e,Te-we*_e)},s.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},s.idle=function(p){this.center.idle(p),this.up.idle(p),this.right.idle(p),this.radius.idle(p),this.angle.idle(p)},s.flush=function(p){this.center.flush(p),this.up.flush(p),this.right.flush(p),this.radius.flush(p),this.angle.flush(p)},s.setDistance=function(p,a){a>0&&this.radius.set(p,Math.log(a))},s.lookAt=function(p,a,x,l){this.recalcMatrix(p),a=a||this.computedEye,x=x||this.computedCenter;var w=(l=l||this.computedUp)[0],_=l[1],T=l[2],k=c(w,_,T);if(!(k<1e-6)){w/=k,_/=k,T/=k;var L=a[0]-x[0],A=a[1]-x[1],I=a[2]-x[2],P=c(L,A,I);if(!(P<1e-6)){L/=P,A/=P,I/=P;var S=this.computedRight,E=S[0],D=S[1],F=S[2],H=w*E+_*D+T*F,V=c(E-=H*w,D-=H*_,F-=H*T);if(!(V<.01&&(V=c(E=_*I-T*A,D=T*L-w*I,F=w*A-_*L))<1e-6)){E/=V,D/=V,F/=V,this.up.set(p,w,_,T),this.right.set(p,E,D,F),this.center.set(p,x[0],x[1],x[2]),this.radius.set(p,Math.log(P));var Z=_*F-T*D,K=T*E-w*F,q=w*D-_*E,W=c(Z,K,q),$=w*L+_*A+T*I,R=E*L+D*A+F*I,N=(Z/=W)*L+(K/=W)*A+(q/=W)*I,U=Math.asin(i($)),Q=Math.atan2(N,R),j=this.angle._state,X=j[j.length-1],J=j[j.length-2];X%=2*Math.PI;var re=Math.abs(X+2*Math.PI-Q),ne=Math.abs(X-Q),se=Math.abs(X-2*Math.PI-Q);re<ne&&(X+=2*Math.PI),se<ne&&(X-=2*Math.PI),this.angle.jump(this.angle.lastT(),X,J),this.angle.set(p,Q,U)}}}}},{"filtered-vector":68,"gl-mat4/invert":98,"gl-mat4/rotate":103,"gl-vec3/cross":157,"gl-vec3/dot":162,"gl-vec3/normalize":179}],306:[function(m,b,v){b.exports=function(n,t,o){var r=n*t,d=e*n,c=d-(d-n),i=n-c,u=e*t,f=u-(u-t),s=t-f,h=i*s-(r-c*f-i*f-c*s);return o?(o[0]=h,o[1]=r,o):[h,r]};var e=+(Math.pow(2,27)+1)},{}],307:[function(m,b,v){b.exports=function(e,n,t){var o=e+n,r=o-e,d=n-r,c=e-(o-r);return t?(t[0]=c+d,t[1]=o,t):[c+d,o]}},{}],308:[function(m,b,v){(function(e){(function(){var n=m("bit-twiddle"),t=m("dup"),o=m("buffer").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:t([32,0]),UINT16:t([32,0]),UINT32:t([32,0]),BIGUINT64:t([32,0]),INT8:t([32,0]),INT16:t([32,0]),INT32:t([32,0]),BIGINT64:t([32,0]),FLOAT:t([32,0]),DOUBLE:t([32,0]),DATA:t([32,0]),UINT8C:t([32,0]),BUFFER:t([32,0])});var r=typeof Uint8ClampedArray<"u",d=typeof BigUint64Array<"u",c=typeof BigInt64Array<"u",i=e.__TYPEDARRAY_POOL;i.UINT8C||(i.UINT8C=t([32,0])),i.BIGUINT64||(i.BIGUINT64=t([32,0])),i.BIGINT64||(i.BIGINT64=t([32,0])),i.BUFFER||(i.BUFFER=t([32,0]));var u=i.DATA,f=i.BUFFER;function s(E){if(E){var D=E.length||E.byteLength,F=n.log2(D);u[F].push(E)}}function h(E){E=n.nextPow2(E);var D=n.log2(E),F=u[D];return F.length>0?F.pop():new ArrayBuffer(E)}function p(E){return new Uint8Array(h(E),0,E)}function a(E){return new Uint16Array(h(2*E),0,E)}function x(E){return new Uint32Array(h(4*E),0,E)}function l(E){return new Int8Array(h(E),0,E)}function w(E){return new Int16Array(h(2*E),0,E)}function _(E){return new Int32Array(h(4*E),0,E)}function T(E){return new Float32Array(h(4*E),0,E)}function k(E){return new Float64Array(h(8*E),0,E)}function L(E){return r?new Uint8ClampedArray(h(E),0,E):p(E)}function A(E){return d?new BigUint64Array(h(8*E),0,E):null}function I(E){return c?new BigInt64Array(h(8*E),0,E):null}
3525function P(E){return new DataView(h(E),0,E)}function S(E){E=n.nextPow2(E);var D=n.log2(E),F=f[D];return F.length>0?F.pop():new o(E)}v.free=function(E){if(o.isBuffer(E))f[n.log2(E.length)].push(E);else{if(Object.prototype.toString.call(E)!=="[object ArrayBuffer]"&&(E=E.buffer),!E)return;var D=E.length||E.byteLength,F=0|n.log2(D);u[F].push(E)}},v.freeUint8=v.freeUint16=v.freeUint32=v.freeBigUint64=v.freeInt8=v.freeInt16=v.freeInt32=v.freeBigInt64=v.freeFloat32=v.freeFloat=v.freeFloat64=v.freeDouble=v.freeUint8Clamped=v.freeDataView=function(E){s(E.buffer)},v.freeArrayBuffer=s,v.freeBuffer=function(E){f[n.log2(E.length)].push(E)},v.malloc=function(E,D){if(D===void 0||D==="arraybuffer")return h(E);switch(D){case"uint8":return p(E);case"uint16":return a(E);case"uint32":return x(E);case"int8":return l(E);case"int16":return w(E);case"int32":return _(E);case"float":case"float32":return T(E);case"double":case"float64":return k(E);case"uint8_clamped":return L(E);case"bigint64":return I(E);case"biguint64":return A(E);case"buffer":return S(E);case"data":case"dataview":return P(E);default:return null}return null},v.mallocArrayBuffer=h,v.mallocUint8=p,v.mallocUint16=a,v.mallocUint32=x,v.mallocInt8=l,v.mallocInt16=w,v.mallocInt32=_,v.mallocFloat32=v.mallocFloat=T,v.mallocFloat64=v.mallocDouble=k,v.mallocUint8Clamped=L,v.mallocBigUint64=A,v.mallocBigInt64=I,v.mallocDataView=P,v.mallocBuffer=S,v.clearCache=function(){for(var E=0;E<32;++E)i.UINT8[E].length=0,i.UINT16[E].length=0,i.UINT32[E].length=0,i.INT8[E].length=0,i.INT16[E].length=0,i.INT32[E].length=0,i.FLOAT[E].length=0,i.DOUBLE[E].length=0,i.BIGUINT64[E].length=0,i.BIGINT64[E].length=0,i.UINT8C[E].length=0,u[E].length=0,f[E].length=0}}).call(this)}).call(this,g!==void 0?g:typeof self<"u"?self:typeof window<"u"?window:{})},{"bit-twiddle":32,buffer:3,dup:65}],309:[function(m,b,v){function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var o=0;o<t;++o)this.roots[o]=o,this.ranks[o]=0}b.exports=e;var n=e.prototype;Object.defineProperty(n,"length",{get:function(){return this.roots.length}}),n.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},n.find=function(t){for(var o=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[o]!==t;){var d=r[o];r[o]=t,o=d}return t},n.link=function(t,o){var r=this.find(t),d=this.find(o);if(r!==d){var c=this.ranks,i=this.roots,u=c[r],f=c[d];u<f?i[r]=d:f<u?i[d]=r:(i[d]=r,++c[r])}}},{}],310:[function(m,b,v){b.exports=function(e,n,t){return e.length===0?e:n?(t||e.sort(n),function(o,r){for(var d=1,c=o.length,i=o[0],u=o[0],f=1;f<c;++f)if(u=i,r(i=o[f],u)){if(f===d){d++;continue}o[d++]=i}return o.length=d,o}(e,n)):(t||e.sort(),function(o){for(var r=1,d=o.length,c=o[0],i=o[0],u=1;u<d;++u,i=c)if(i=c,(c=o[u])!==i){if(u===r){r++;continue}o[r++]=c}return o.length=r,o}(e))}},{}],311:[function(m,b,v){b.exports=function(o,r){return typeof r=="object"&&r!==null||(r={}),e(o,r.canvas||n,r.context||t,r)};var e=m("./lib/vtext"),n=null,t=null;typeof document<"u"&&((n=document.createElement("canvas")).width=8192,n.height=1024,t=n.getContext("2d"))},{"./lib/vtext":312}],312:[function(m,b,v){b.exports=function(s,h,p,a){var x=64,l=1.25,w={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return a&&(a.size&&a.size>0&&(x=a.size),a.lineSpacing&&a.lineSpacing>0&&(l=a.lineSpacing),a.styletags&&a.styletags.breaklines&&(w.breaklines=!!a.styletags.breaklines),a.styletags&&a.styletags.bolds&&(w.bolds=!!a.styletags.bolds),a.styletags&&a.styletags.italics&&(w.italics=!!a.styletags.italics),a.styletags&&a.styletags.subscripts&&(w.subscripts=!!a.styletags.subscripts),a.styletags&&a.styletags.superscripts&&(w.superscripts=!!a.styletags.superscripts)),p.font=[a.fontStyle,a.fontVariant,a.fontWeight,x+"px",a.font].filter(function(_){return _}).join(" "),p.textAlign="start",p.textBaseline="alphabetic",p.direction="ltr",f(function(_,T,k,L,A,I){k=k.replace(/\n/g,""),k=I.breaklines===!0?k.replace(/\<br\>/g,`
3526`):k.replace(/\<br\>/g," ");var P="",S=[];for(H=0;H<k.length;++H)S[H]=P;I.bolds===!0&&(S=c("b","b|",k,S)),I.italics===!0&&(S=c("i","i|",k,S)),I.superscripts===!0&&(S=c("sup","+1",k,S)),I.subscripts===!0&&(S=c("sub","-1",k,S));var E=[],D="";for(H=0;H<k.length;++H)S[H]!==null&&(D+=k[H],E.push(S[H]));var F,H,V,Z,K,q=D.split(`
3527`),W=q.length,$=Math.round(A*L),R=L,N=2*L,U=0,Q=W*$+N;_.height<Q&&(_.height=Q),T.fillStyle="#000",T.fillRect(0,0,_.width,_.height),T.fillStyle="#fff";var j=0,X="";function J(){if(X!==""){var xe=T.measureText(X).width;
3527T.fillText(X,R+V,N+Z),V+=xe}}function re(){return Math.round(K)+"px "}function ne(xe,we){var be=""+T.font;if(I.subscripts===!0){var Ee=xe.indexOf("-"),fe=we.indexOf("-"),me=Ee>-1?parseInt(xe[1+Ee]):0,Te=fe>-1?parseInt(we[1+fe]):0;me!==Te&&(be=be.replace(re(),"?px "),K*=Math.pow(.75,Te-me),be=be.replace("?px ",re())),Z+=.25*$*(Te-me)}if(I.superscripts===!0){var _e=xe.indexOf("+"),Ae=we.indexOf("+"),Pe=_e>-1?parseInt(xe[1+_e]):0,De=Ae>-1?parseInt(we[1+Ae]):0;Pe!==De&&(be=be.replace(re(),"?px "),K*=Math.pow(.75,De-Pe),be=be.replace("?px ",re())),Z-=.25*$*(De-Pe)}if(I.bolds===!0){var Ve=xe.indexOf("b|")>-1,Qe=we.indexOf("b|")>-1;!Ve&&Qe&&(be=Oe?be.replace("italic ","italic bold "):"bold "+be),Ve&&!Qe&&(be=be.replace("bold ",""))}if(I.italics===!0){var Oe=xe.indexOf("i|")>-1,Ue=we.indexOf("i|")>-1;!Oe&&Ue&&(be="italic "+be),Oe&&!Ue&&(be=be.replace("italic ",""))}T.font=be}for(F=0;F<W;++F){var se=q[F]+`
3528`;for(V=0,Z=F*$,K=L,X="",H=0;H<se.length;++H){var oe=H+j<E.length?E[H+j]:E[E.length-1];P===oe?X+=se[H]:(J(),X=se[H],oe!==void 0&&(ne(P,oe),P=oe))}J(),j+=se.length;var pe=0|Math.round(V+2*R);U<pe&&(U=pe)}var ce=U,de=N+$*W;return n(T.getImageData(0,0,ce,de).data,[de,ce,4]).pick(-1,-1,0).transpose(1,0)}(h,p,s,x,l,w),a,x)},b.exports.processPixels=f;var e=m("surface-nets"),n=m("ndarray"),t=m("simplify-planar-graph"),o=m("clean-pslg"),r=m("cdt2d"),d=m("planar-graph-to-polyline");function c(s,h,p,a){for(var x="<"+s+">",l="</"+s+">",w=x.length,_=l.length,T=h[0]==="+"||h[0]==="-",k=0,L=-_;k>-1&&(k=p.indexOf(x,k))!==-1&&(L=p.indexOf(l,k+w))!==-1&&!(L<=k);){for(var A=k;A<L+_;++A)if(A<k+w||A>=L)a[A]=null,p=p.substr(0,A)+" "+p.substr(A+1);else if(a[A]!==null){var I=a[A].indexOf(h[0]);I===-1?a[A]+=h:T&&(a[A]=a[A].substr(0,I+1)+(1+parseInt(a[A][I+1]))+a[A].substr(I+2))}var P=k+w,S=p.substr(P,L-P).indexOf(x);k=S!==-1?S:L+_}return a}function i(s,h){var p=e(s,128);return h?t(p.cells,p.positions,.25):{edges:p.cells,positions:p.positions}}function u(s,h,p,a){var x=i(s,a),l=function(F,H,V){for(var Z=H.textAlign||"start",K=H.textBaseline||"alphabetic",q=[1<<30,1<<30],W=[0,0],$=F.length,R=0;R<$;++R)for(var N=F[R],U=0;U<2;++U)q[U]=0|Math.min(q[U],N[U]),W[U]=0|Math.max(W[U],N[U]);var Q=0;switch(Z){case"center":Q=-.5*(q[0]+W[0]);break;case"right":case"end":Q=-W[0];break;case"left":case"start":Q=-q[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+Z+"'")}var j=0;switch(K){case"hanging":case"top":j=-q[1];break;case"middle":j=-.5*(q[1]+W[1]);break;case"alphabetic":case"ideographic":j=-3*V;break;case"bottom":j=-W[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+K+"'")}var X=1/V;return"lineHeight"in H?X*=+H.lineHeight:"width"in H?X=H.width/(W[0]-q[0]):"height"in H&&(X=H.height/(W[1]-q[1])),F.map(function(J){return[X*(J[0]+Q),X*(J[1]+j)]})}(x.positions,h,p),w=x.edges,_=h.orientation==="ccw";if(o(l,w),h.polygons||h.polygon||h.polyline){for(var T=d(w,l),k=new Array(T.length),L=0;L<T.length;++L){for(var A=T[L],I=new Array(A.length),P=0;P<A.length;++P){for(var S=A[P],E=new Array(S.length),D=0;D<S.length;++D)E[D]=l[S[D]].slice();_&&E.reverse(),I[P]=E}k[L]=I}return k}return h.triangles||h.triangulate||h.triangle?{cells:r(l,w,{delaunay:!1,exterior:!1,interior:!0}),positions:l}:{edges:w,positions:l}}function f(s,h,p){try{return u(s,h,p,!0)}catch{}try{return u(s,h,p,!1)}catch{}return h.polygons||h.polyline||h.polygon?[]:h.triangles||h.triangulate||h.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},{cdt2d:42,"clean-pslg":50,ndarray:259,"planar-graph-to-polyline":268,"simplify-planar-graph":297,"surface-nets":302}],313:[function(m,b,v){(function(){if(typeof ses>"u"||!ses.ok||ses.ok()){typeof ses<"u"&&(ses.weakMapPermitHostObjects=x);var e=!1;if(typeof WeakMap=="function"){var n=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var t=new n,o=Object.freeze({});if(t.set(o,1),t.get(o)===1)return void(b.exports=WeakMap);e=!0}}var r=Object.getOwnPropertyNames,d=Object.defineProperty,c=Object.isExtensible,i="weakmap:ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var u=new ArrayBuffer(25),f=new Uint8Array(u);crypto.getRandomValues(f),i="weakmap:rand:"+Array.prototype.map.call(f,function(k){return(k%36).toString(36)}).join("")+"___"}if(d(Object,"getOwnPropertyNames",{value:function(k){return r(k).filter(l)}}),"getPropertyNames"in Object){var s=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(k){return s(k).filter(l)}})}(function(){var k=Object.freeze;d(Object,"freeze",{value:function(I){return w(I),k(I)}});
3528var L=Object.seal;d(Object,"seal",{value:function(I){return w(I),L(I)}});var A=Object.preventExtensions;d(Object,"preventExtensions",{value:function(I){return w(I),A(I)}})})();var h=!1,p=0,a=function(){this instanceof a||T();var k=[],L=[],A=p++;return Object.create(a.prototype,{get___:{value:_(function(I,P){var S,E=w(I);return E?A in E?E[A]:P:(S=k.indexOf(I))>=0?L[S]:P})},has___:{value:_(function(I){var P=w(I);return P?A in P:k.indexOf(I)>=0})},set___:{value:_(function(I,P){var S,E=w(I);return E?E[A]=P:(S=k.indexOf(I))>=0?L[S]=P:(S=k.length,L[S]=P,k[S]=I),this})},delete___:{value:_(function(I){var P,S,E=w(I);return E?A in E&&delete E[A]:!((P=k.indexOf(I))<0)&&(S=k.length-1,k[P]=void 0,L[P]=L[S],k[P]=k[S],k.length=S,L.length=S,!0)})}})};a.prototype=Object.create(Object.prototype,{get:{value:function(k,L){return this.get___(k,L)},writable:!0,configurable:!0},has:{value:function(k){return this.has___(k)},writable:!0,configurable:!0},set:{value:function(k,L){return this.set___(k,L)},writable:!0,configurable:!0},delete:{value:function(k){return this.delete___(k)},writable:!0,configurable:!0}}),typeof n=="function"?function(){function k(){this instanceof a||T();var L,A=new n,I=void 0,P=!1;return L=e?function(S,E){return A.set(S,E),A.has(S)||(I||(I=new a),I.set(S,E)),this}:function(S,E){if(P)try{A.set(S,E)}catch{I||(I=new a),I.set___(S,E)}else A.set(S,E);return this},Object.create(a.prototype,{get___:{value:_(function(S,E){return I?A.has(S)?A.get(S):I.get___(S,E):A.get(S,E)})},has___:{value:_(function(S){return A.has(S)||!!I&&I.has___(S)})},set___:{value:_(L)},delete___:{value:_(function(S){var E=!!A.delete(S);return I&&I.delete___(S)||E})},permitHostObjects___:{value:_(function(S){if(S!==x)throw new Error("bogus call to permitHostObjects___");P=!0})}})}e&&typeof Proxy<"u"&&(Proxy=void 0),k.prototype=a.prototype,b.exports=k,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),b.exports=a)}function x(k){k.permitHostObjects___&&k.permitHostObjects___(x)}function l(k){return!(k.substr(0,8)=="weakmap:"&&k.substr(k.length-3)==="___")}function w(k){if(k!==Object(k))throw new TypeError("Not an object: "+k);var L=k[i];if(L&&L.key===k)return L;if(c(k)){L={key:k};try{return d(k,i,{value:L,writable:!1,enumerable:!1,configurable:!1}),L}catch{return}}}function _(k){return k.prototype=null,Object.freeze(k)}function T(){h||typeof console>"u"||(h=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}})()},{}],314:[function(m,b,v){var e=m("./hidden-store.js");b.exports=function(){var n={};return function(t){if((typeof t!="object"||t===null)&&typeof t!="function")throw new Error("Weakmap-shim: Key must be object");var o=t.valueOf(n);return o&&o.identity===n?o:e(t,n)}}},{"./hidden-store.js":315}],315:[function(m,b,v){b.exports=function(e,n){var t={identity:n},o=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(r){return r!==n?o.apply(this,arguments):t},writable:!0}),t}},{}],316:[function(m,b,v){var e=m("./create-store.js");b.exports=function(){var n=e();return{get:function(t,o){var r=n(t);return r.hasOwnProperty("value")?r.value:o},set:function(t,o){return n(t).value=o,this},has:function(t){return"value"in n(t)},delete:function(t){return delete n(t).value}}}},{"./create-store.js":314}],317:[function(m,b,v){var e,n=function(){return function(t,o,r,d,c,i){var u=t[0],f=r[0],s=[0],h=f;d|=0;var p=0,a=f;for(p=0;p<u;++p){var x=o[d]-i,l=o[d+h]-i;x>=0!=l>=0&&c.push(s[0]+.5+.5*(x+l)/(x-l)),d+=a,++s[0]}}};b.exports=(e={funcName:"zeroCrossings"},function(t){var o={};return function(r,d,c){var i=r.dtype,u=r.order,f=[i,u.join()].join(),s=o[f];return s||(o[f]=s=t([i,u])),s(r.shape.slice(0),r.data,r.stride,0|r.offset,d,c)}}(n.bind(void 0,e)))},{}],318:[function(m,b,v){b.exports=function(n,t){var o=[];return t=+t||0,e(n.hi(n.shape[0]-1),o,t),o};var e=m("./lib/zc-core")},{"./lib/zc-core":317}]},{},[6])(6)})}).call(this)}).call(this,typeof Bi<"u"?Bi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[27])(27)})})(dh);var Wp=dh.exports;const hh=Yp(Wp),{SvelteComponent:Zp,attr:Xp,binding_callbacks:Jp,detach:Kp,element:Qp,flush:ph,init:$p,insert:ed,noop:Bu,safe_not_equal:td}=window.__gradio__svelte__internal,{afterUpdate:rd,createEventDispatcher:nd}=window.__gradio__svelte__internal;function ad(Vs){let Xo;return{c(){Xo=Qp("div"),Xp(Xo,"data-testid","plotly")},m(y,ee){ed(y,Xo,ee),Vs[3](Xo)},p:Bu,i:Bu,o:Bu,d(y){y&&Kp(Xo),Vs[3](null)}}}function id(Vs,Xo,y){let ee,{value:te}=Xo,{show_label:g}=Xo,m,b;const v=nd();function e(){if(!b){b=document.getElementById("plotly.js-style-global");const t=b.cloneNode();m.appendChild(t);for(const o of b.sheet.cssRules)t.sheet.insertRule(o.cssText)}}rd(async()=>{e();let t=JSON.parse(ee);t.config=t.config||{},t.config.responsive=!0,t.responsive=!0,t.layout.autosize=!0,t.layout.margin==null&&(t.layout.margin={}),t.layout.title&&g&&(t.layout.margin.t=Math.max(100,t.layout.margin.t||0)),t.layout.margin.autoexpand=!0,hh.react(m,t.data,t.layout,t.config),hh.Plots.resize(m),m.on("plotly_afterplot",()=>{v("load")})});function n(t){Jp[t?"unshift":"push"](()=>{m=t,y(0,m)})}return Vs.$$set=t=>{"value"in t&&y(1,te=t.value),"show_label"in t&&y(2,g=t.show_label)},Vs.$$.update=()=>{Vs.$$.dirty&2&&(ee=te?.plot)},[m,te,g,n]}class cd extends Zp{constructor(Xo){super(),$p(this,Xo,id,ad,td,{value:1,show_label:2})}get value(){return this.$$.ctx[1]}set value(Xo){this.$$set({value:Xo}),ph()}get show_label(){return this.$$.ctx[2]}set show_label(Xo){this.$$set({show_label:Xo}),ph()}}export{cd as default};
3529//# sourceMappingURL=PlotlyPlot-B7svdT9W.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.