1import{S as Ju,i as Ku,s as Qu,v as Ml,b as ri,f as cl,g as ll,w as _s,n as ul,A as sd,C as ld,k as Al,D as cd,j as Sl,a2 as ud,I as fd,H as hd,e as tc,c as Mc,m as Ac,o as Sc,L as Ah,P as pd,Q as dd,a as Sh,R as md,T as gd,J as vd}from"./index.c601c0b4.js";import{c as Gi,a as fu,g as yd}from"./_commonjsHelpers.88e99c8f.js";import{B as xd}from"./Block.d4427dc6.js";import{B as bd}from"./BlockLabel.6b751704.js";import"./styles.ed3b21b5.js";function _d(di){let Kn,v,$,te,m,g,b;return{c(){Kn=Ml("svg"),v=Ml("circle"),$=Ml("circle"),te=Ml("circle"),m=Ml("circle"),g=Ml("circle"),b=Ml("path"),ri(v,"cx","20"),ri(v,"cy","4"),ri(v,"r","2"),ri(v,"fill","currentColor"),ri($,"cx","8"),ri($,"cy","16"),ri($,"r","2"),ri($,"fill","currentColor"),ri(te,"cx","28"),ri(te,"cy","12"),ri(te,"r","2"),ri(te,"fill","currentColor"),ri(m,"cx","11"),ri(m,"cy","7"),ri(m,"r","2"),ri(m,"fill","currentColor"),ri(g,"cx","16"),ri(g,"cy","24"),ri(g,"r","2"),ri(g,"fill","currentColor"),ri(b,"fill","currentColor"),ri(b,"d","M30 3.413L28.586 2L4 26.585V2H2v26a2 2 0 0 0 2 2h26v-2H5.413Z"),ri(Kn,"xmlns","http://www.w3.org/2000/svg"),ri(Kn,"xmlns:xlink","http://www.w3.org/1999/xlink"),ri(Kn,"aria-hidden","true"),ri(Kn,"role","img"),ri(Kn,"class","iconify iconify--carbon"),ri(Kn,"width","100%"),ri(Kn,"height","100%"),ri(Kn,"preserveAspectRatio","xMidYMid meet"),ri(Kn,"viewBox","0 0 32 32")},m(y,e){cl(y,Kn,e),ll(Kn,v),ll(Kn,$),ll(Kn,te),ll(Kn,m),ll(Kn,g),ll(Kn,b)},p:_s,i:_s,o:_s,d(y){y&&ul(Kn)}}}class Eh extends Ju{constructor(Kn){super(),Ku(this,Kn,null,_d,Qu,{})}}var Lh={exports:{}};(function(di,Kn){(function(v){di.exports=v()})(function(){return function v($,te,m){function g(e,n){if(!te[e]){if(!$[e]){var t=typeof fu=="function"&&fu;if(!n&&t)return t(e,!0);if(b)return b(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var r=te[e]={exports:{}};$[e][0].call(r.exports,function(d){return g($[e][1][d]||d)},r,r.exports,v,$,te,m)}return te[e].exports}for(var b=typeof fu=="function"&&fu,y=0;y<m.length;y++)g(m[y]);return g}({1:[function(v,$,te){var m=v("../src/lib"),g={"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;
1cursor: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;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var b in g){var y=b.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");m.addStyleRule(y,g[b])}},{"../src/lib":503}],2:[function(v,$,te){$.exports=v("../src/transforms/aggregate")},{"../src/transforms/aggregate":1118}],3:[function(v,$,te){$.exports=v("../src/traces/bar")},{"../src/traces/bar":656}],4:[function(v,$,te){$.exports=v("../src/traces/barpolar")},{"../src/traces/barpolar":669}],5:[function(v,$,te){$.exports=v("../src/traces/box")},{"../src/traces/box":679}],6:[function(v,$,te){$.exports=v("../src/components/calendars")},{"../src/components/calendars":364}],7:[function(v,$,te){$.exports=v("../src/traces/candlestick")},{"../src/traces/candlestick":688}],8:[function(v,$,te){$.exports=v("../src/traces/carpet")},{"../src/traces/carpet":707}],9:[function(v,$,te){$.exports=v("../src/traces/choropleth")},{"../src/traces/choropleth":721}],10:[function(v,$,te){$.exports=v("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":728}],11:[function(v,$,te){$.exports=v("../src/traces/cone")},{"../src/traces/cone":734}],12:[function(v,$,te){$.exports=v("../src/traces/contour")},{"../src/traces/contour":749}],13:[function(v,$,te){$.exports=v("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":760}],14:[function(v,$,te){$.exports=v("../src/core")},{"../src/core":481}],15:[function(v,$,te){$.exports=v("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":768}],16:[function(v,$,te){$.exports=v("../src/transforms/filter")},{"../src/transforms/filter":1119}],17:[function(v,$,te){$.exports=v("../src/traces/funnel")},{"../src/traces/funnel":778}],18:[function(v,$,te){$.exports=v("../src/traces/funnelarea")},{"../src/traces/funnelarea":787}],19:[function(v,$,te){$.exports=v("../src/transforms/groupby")},{"../src/transforms/groupby":1120}],20:[function(v,$,te){$.exports=v("../src/traces/heatmap")},{"../src/traces/heatmap":800}],21:[function(v,$,te){$.exports=v("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":811}],22:[function(v,$,te){$.exports=v("../src/traces/histogram")},{"../src/traces/histogram":823}],23:[function(v,$,te){$.exports=v("../src/traces/histogram2d")},{"../src/traces/histogram2d":829}],24:[function(v,$,te){$.exports=v("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":833}],25:[function(v,$,te){$.exports=v("../src/traces/icicle")},{"../src/traces/icicle":839}],26:[function(v,$,te){$.exports=v("../src/traces/image")},{"../src/traces/image":852}],27:[function(v,$,te){var m=v("./core");m.register([v("./bar"),v("./box"),v("./heatmap"),v("./histogram"),v("./histogram2d"),v("./histogram2dcontour"),v("./contour"),v("./scatterternary"),v("./violin"),v("./funnel"),v("./waterfall"),v("./image"),v("./pie"),v("./sunburst"),v("./treemap"),v("./icicle"),v("./funnelarea"),v("./scatter3d"),v("./surface"),v("./isosurface"),v("./volume"),v("./mesh3d"),v("./cone"),v("./streamtube"),v("./scattergeo"),v("./choropleth"),v("./scattergl"),v("./splom"),v("./pointcloud"),v("./heatmapgl"),v("./parcoords"),v("./parcats"),v("./scattermapbox"),v("./choroplethmapbox"),v("./densitymapbox"),v("./sankey"),v("./indicator"),v("./table"),v("./carpet"),v("./scattercarpet"),v("./contourcarpet"),v("./ohlc"),v("./candlestick"),v("./scatterpolar"),v("./scatterpolargl"),v("./barpolar"),v("./scattersmith"),v("./aggregate"),v("./filter"),v("./groupby"),v("./sort"),v("./calendars")]),$.exports=m},{"./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(v,$,te){$.exports=v("../src/traces/indicator")},{"../src/traces/indicator":860}],29:[function(v,$,te){$.exports=v("../src/traces/isosurface")},{"../src/traces/isosurface":866}],30:[function(v,$,te){$.exports=v("../src/traces/mesh3d")},{"../src/traces/mesh3d":871}],31:[function(v,$,te){$.exports=v("../src/traces/ohlc")},{"../src/traces/ohlc":876}],32:[function(v,$,te){$.exports=v("../src/traces/parcats")},{"../src/traces/parcats":885}],33:[function(v,$,te){$.exports=v("../src/traces/parcoords")},{"../src/traces/parcoords":896}],34:[function(v,$,te){$.exports=v("../src/traces/pie")},{"../src/traces/pie":907}],35:[function(v,$,te){$.exports=v("../src/traces/pointcloud")},{"../src/traces/pointcloud":916}],36:[function(v,$,te){$.exports=v("../src/traces/sankey")},{"../src/traces/sankey":922}],37:[function(v,$,te){$.exports=v("../src/traces/scatter3d")},{"../src/traces/scatter3d":960}],38:[function(v,$,te){$.exports=v("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":967}],39:[function(v,$,te){$.exports=v("../src/traces/scattergeo")},{"../src/traces/scattergeo":975}],40:[function(v,$,te){$.exports=v("../src/traces/scattergl")},{"../src/traces/scattergl":989}],41:[function(v,$,te){$.exports=v("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":999}],42:[function(v,$,te){$.exports=v("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1007}],43:[function(v,$,te){$.exports=v("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1015}],44:[function(v,$,te){$.exports=v("../src/traces/scattersmith")},{"../src/traces/scattersmith":1022}],45:[function(v,$,te){$.exports=v("../src/traces/scatterternary")},{"../src/traces/scatterternary":1030}],46:[function(v,$,te){$.exports=v("../src/transforms/sort")},{"../src/transforms/sort":1122}],47:[function(v,$,te){$.exports=v("../src/traces/splom")},{"../src/traces/splom":1040}],48:[function(v,$,te){$.exports=v("../src/traces/streamtube")},{"../src/traces/streamtube":1048}
1],49:[function(v,$,te){$.exports=v("../src/traces/sunburst")},{"../src/traces/sunburst":1056}],50:[function(v,$,te){$.exports=v("../src/traces/surface")},{"../src/traces/surface":1065}],51:[function(v,$,te){$.exports=v("../src/traces/table")},{"../src/traces/table":1073}],52:[function(v,$,te){$.exports=v("../src/traces/treemap")},{"../src/traces/treemap":1084}],53:[function(v,$,te){$.exports=v("../src/traces/violin")},{"../src/traces/violin":1097}],54:[function(v,$,te){$.exports=v("../src/traces/volume")},{"../src/traces/volume":1105}],55:[function(v,$,te){$.exports=v("../src/traces/waterfall")},{"../src/traces/waterfall":1113}],56:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?g(te,v("d3-array"),v("d3-collection"),v("d3-shape"),v("elementary-circuits-directed-graph")):g(m.d3=m.d3||{},m.d3,m.d3,m.d3,null)})(this,function(m,g,b,y,e){function n(re){return re.target.depth}function t(re,ne){return re.sourceLinks.length?re.depth:ne-1}function i(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 a(re.source,ne.source)||re.index-ne.index}function l(re,ne){return a(re.target,ne.target)||re.index-ne.index}function a(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 o(re){return f(re.source)}function h(re){return f(re.target)}function p(re){return re.index}function s(re){return re.nodes}function x(re){return re.links}function c(re,ne){var se=re.get(ne);if(!se)throw new Error("missing: "+ne);return se}function T(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,_e=de.target.index;pe[xe]||(pe[xe]=[]),pe[_e]||(pe[_e]=[]),pe[xe].indexOf(_e)===-1&&pe[xe].push(_e)}var we=e(pe);we.sort(function(ge,ke){return ge.length-ke.length});var Ee={};for(ce=0;ce<we.length;ce++){var fe=we[ce].slice(-2);Ee[fe[0]]||(Ee[fe[0]]={}),Ee[fe[0]][fe[1]]=!0}re.links.forEach(function(ge){var ke=ge.target.index,be=ge.source.index;ke===be||Ee[be]&&Ee[be][ke]?(ge.circular=!0,ge.circularLinkID=oe,oe+=1):ge.circular=!1})}else re.links.forEach(function(ge){ge.source[se]<ge.target[se]?ge.circular=!1:(ge.circular=!0,ge.circularLinkID=oe,oe+=1)})}function w(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.forEach(function(ce){T(ce,ne)!=T(pe.source,ne)&&T(ce,ne)!=T(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 _e=0;_e<pe;_e++)if(ce=re[pe],de=re[_e],!(ce.source.column<de.target.column||ce.target.column>de.source.column)){var we=re[_e].circularPathData.verticalBuffer+re[_e].width/2+ne;xe=we>xe?we:xe}oe.circularPathData.verticalBuffer=xe+oe.width/2}}),re}function P(re,ne,se,oe){var pe=g.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.cir
1cularPathData.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,_e=re.links.filter(function(fe){return fe.source.column==de&&fe.circularLinkType==xe});ce.circularLinkType=="bottom"?_e.sort(D):_e.sort(E);var we=0;_e.forEach(function(fe,ge){fe.circularLinkID==ce.circularLinkID&&(ce.circularPathData.leftSmallArcRadius=10+ce.width/2+we,ce.circularPathData.leftLargeArcRadius=10+ce.width/2+ge*ne+we),we+=fe.width}),de=ce.target.column,_e=re.links.filter(function(fe){return fe.target.column==de&&fe.circularLinkType==xe}),ce.circularLinkType=="bottom"?_e.sort(H):_e.sort(F),we=0,_e.forEach(function(fe,ge){fe.circularLinkID==ce.circularLinkID&&(ce.circularPathData.rightSmallArcRadius=10+ce.width/2+we,ce.circularPathData.rightLargeArcRadius=10+ce.width/2+ge*ne+we),we+=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 ge="";return ge=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,ge}(ce);else{var Ee=y.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 G(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,_e=de-ce+1;for(xe=1;ce<=de;ce++,xe++)re.nodes.forEach(function(we){if(we.column==ce){var Ee,fe=xe/(_e+1),ge=Math.pow(1-fe,3),ke=3*fe*Math.pow(1-fe,2),be=3*Math.pow(fe,2)*(1-fe),Se=Math.pow(fe,3),Oe=ge*pe.y0+ke*pe.y0+be*pe.y1+Se*pe.y1,De=Oe-pe.width/2,je=Oe+pe.width/2;De>we.y0&&De<we.y1?(Ee=we.y1-De+10,Ee=we.circularLinkType=="bottom"?Ee:-Ee,we=R(we,Ee,ne,se),re.nodes.forEach(function(Je){T(Je,oe)!=T(we,oe)&&Je.column==we.column&&Q(we,Je)&&R(Je,Ee,ne,se)})):(je>we.y0&&je<we.y1||De<we.y0&&je>we.y1)&&(Ee=je-we.y0+10,we=R(we,Ee,ne,se),re.nodes.forEach(function(Je){T(Je,oe)!=T(we,oe)&&Je.column==we.column&&Je.y0<we.y1&&Je.y1>we.y1&&R(Je,Ee,ne,se)}))}})}})}function Q(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(_e){return T(_e.source,se)==T(pe,se)}),de=ce.length;de>1&&ce.sort(function(_e,we){if(!_e.circular&&!we.circular){if(_e.target.column==we.target.column||!ee(_e,we))return _e.y1-we.y1;if(_e.target.column>we.target.column){var Ee=G(we,_e);return _e.y1-Ee}if(we.target.column>_e.target.column)return G(_e,we)-we.y1}return _e.circular&&!we.circular?_e.circularLinkType=="top"?-1:1:we.circular&&!_e.circular?we.circularLinkType=="top"?1:-1:_e.circular&&we.circular?_e.circularLinkType===we.circularLinkType&&_e.circularLinkType=="top"?_e.target.column===we.target.column?_e.target.y1-we.target.y1:we.target.column-_e.target.column:_e.circularLinkType===we.circularLinkType&&_e.circularLinkType=="bottom"?_e.target.column===we.target.column?we.target.y1-_e.target.y1:_e.target.column-we.target.column:_e.circularLinkType=="top"?-1:1:void 0});var xe=pe.y0;ce.forEach(function(_e){_e.y0=xe+_e.width/2,xe+=_e.width}),ce.forEach(function(_e,we){if(_e.circularLinkType=="bottom"){for(var Ee=we+1,fe=0;Ee<de;Ee++)fe+=ce[Ee].width;_e.y0=pe.y1-fe-_e.width/2}})})}function U(re,ne,se){re.nodes.forEach(function(oe){var pe=re.links.filter(function(xe){return T(xe.target,se)==T(oe,se)}),ce=pe.length;ce>1&&pe.sort(function(xe,_e){if(!xe.circular&&!_e.circular){if(xe.source.column==_e.source.column||!ee(xe,_e))return xe.y0-_e.y0;if(_e.source.column<xe.source.column){var we=K(_e,xe);return xe.y0-we}if(xe.source.column<_e.source.column)return K(xe,_e)-_e.y0}return xe.circular&&!_e.circular?xe.circularLinkType=="top"?-1:1:_e.circular&&!xe.circular?_e.circularLinkType=="top"?1:-1:xe.circular&&_e.circular?xe.circularLinkType===_e.circularLinkType&&xe.circularLinkType=="top"?xe.source.column===_e.source.column?xe.s
1ource.y1-_e.source.y1:xe.source.column-_e.source.column:xe.circularLinkType===_e.circularLinkType&&xe.circularLinkType=="bottom"?xe.source.column===_e.source.column?xe.source.y1-_e.source.y1:_e.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,_e){if(xe.circularLinkType=="bottom"){for(var we=_e+1,Ee=0;we<ce;we++)Ee+=pe[we].width;xe.y1=oe.y1-Ee-xe.width/2}})})}function ee(re,ne){return j(re)==j(ne)}function j(re){return re.y0-re.y1>0?"up":"down"}function X(re,ne){return T(re.source,ne)==T(re.target,ne)}function J(re,ne,se){var oe=re.nodes,pe=re.links,ce=!1,de=!1;if(pe.forEach(function(we){we.circularLinkType=="top"?ce=!0:we.circularLinkType=="bottom"&&(de=!0)}),ce==0||de==0){var xe=g.min(oe,function(we){return we.y0}),_e=(se-ne)/(g.max(oe,function(we){return we.y1})-xe);oe.forEach(function(we){var Ee=(we.y1-we.y0)*_e;we.y0=(we.y0-xe)*_e,we.y1=we.y0+Ee}),pe.forEach(function(we){we.y0=(we.y0-xe)*_e,we.y1=(we.y1-xe)*_e,we.width=we.width*_e})}}m.sankeyCircular=function(){var re,ne,se=0,oe=0,pe=1,ce=1,de=24,xe=p,_e=t,we=s,Ee=x,fe=32,ge=2,ke=null;function be(){var ze={nodes:we.apply(null,arguments),links:Ee.apply(null,arguments)};Se(ze),_(ze,xe,ke),Oe(ze),De(ze),w(ze,xe),je(ze,fe,xe),Je(ze);for(var Ue=4,Ge=0;Ge<Ue;Ge++)N(ze,ce,xe),U(ze,ce,xe),W(ze,oe,ce,xe),N(ze,ce,xe),U(ze,ce,xe);return J(ze,oe,ce),P(ze,ge,ce,xe),ze}function Se(ze){ze.nodes.forEach(function(Ge,Ye){Ge.index=Ye,Ge.sourceLinks=[],Ge.targetLinks=[]});var Ue=b.map(ze.nodes,xe);return ze.links.forEach(function(Ge,Ye){Ge.index=Ye;var et=Ge.source,ct=Ge.target;(et===void 0?"undefined":r(et))!=="object"&&(et=Ge.source=c(Ue,et)),(ct===void 0?"undefined":r(ct))!=="object"&&(ct=Ge.target=c(Ue,ct)),et.sourceLinks.push(Ge),ct.targetLinks.push(Ge)}),ze}function Oe(ze){ze.nodes.forEach(function(Ue){Ue.partOfCycle=!1,Ue.value=Math.max(g.sum(Ue.sourceLinks,u),g.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(ze){var Ue,Ge,Ye;for(Ue=ze.nodes,Ge=[],Ye=0;Ue.length;++Ye,Ue=Ge,Ge=[])Ue.forEach(function(et){et.depth=Ye,et.sourceLinks.forEach(function(ct){Ge.indexOf(ct.target)<0&&!ct.circular&&Ge.push(ct.target)})});for(Ue=ze.nodes,Ge=[],Ye=0;Ue.length;++Ye,Ue=Ge,Ge=[])Ue.forEach(function(et){et.height=Ye,et.targetLinks.forEach(function(ct){Ge.indexOf(ct.source)<0&&!ct.circular&&Ge.push(ct.source)})});ze.nodes.forEach(function(et){et.column=Math.floor(_e.call(null,et,Ye))})}function je(ze,Ue,Ge){var Ye=b.nest().key(function(Tt){return Tt.column}).sortKeys(g.ascending).entries(ze.nodes).map(function(Tt){return Tt.values});(function(Tt){if(ne){var nt=1/0;Ye.forEach(function(Xt){var Fe=ce*ne/(Xt.length+1);nt=Fe<nt?Fe:nt}),re=nt}var Qe=g.min(Ye,function(Xt){return(ce-oe-(Xt.length-1)*re)/g.sum(Xt,u)});Qe*=.3,ze.links.forEach(function(Xt){Xt.width=Xt.value*Qe});var Et=function(Xt){var Fe=0,qe=0,wt=0,ft=0,Ce=g.max(Xt.nodes,function(Ie){return Ie.column});return Xt.links.forEach(function(Ie){Ie.circular&&(Ie.circularLinkType=="top"?Fe+=Ie.width:qe+=Ie.width,Ie.target.column==0&&(ft+=Ie.width),Ie.source.column==Ce&&(wt+=Ie.width))}),{top:Fe=Fe>0?Fe+25+10:Fe,bottom:qe=qe>0?qe+25+10:qe,left:ft=ft>0?ft+25+10:ft,right:wt=wt>0?wt+25+10:wt}}(ze),Gt=function(Xt,Fe){var qe=g.max(Xt.nodes,function(Te){return Te.column}),wt=pe-se,ft=ce-oe,Ce=wt/(wt+Fe.right+Fe.left),Ie=ft/(ft+Fe.top+Fe.bottom);return se=se*Ce+Fe.left,pe=Fe.right==0?pe:pe*Ce,oe=oe*Ie+Fe.top,ce*=Ie,Xt.nodes.forEach(function(Te){Te.x0=se+Te.column*((pe-se-de)/qe),Te.x1=Te.x0+de}),Ie}(ze,Et);Qe*=Gt,ze.links.forEach(function(Xt){Xt.width=Xt.value*Qe}),Ye.forEach(function(Xt){var Fe=Xt.length;Xt.forEach(function(qe,wt){qe.depth==Ye.length-1&&Fe==1||qe.depth==0&&Fe==1?(qe.y0=ce/2-qe.value*Qe,qe.y1=qe.y0+qe.value*Qe):qe.partOfCycle?L(qe,Tt)==0?(qe.y0=ce/2+wt,qe.y1=qe.y0+qe.value*Qe):qe.circularLinkType=="top"?(qe.y0=oe+wt,qe.y1=qe.y0+qe.value*Qe):(qe.y0=ce-qe.value*Qe-wt,qe.y1=qe.y0+qe.value*Qe):Et.top==0||Et.bottom==0?(qe.y0=(ce-oe)/Fe*wt,qe.y1=qe.y0+qe.value*Qe):(qe.y0=(ce-oe)/2-Fe/2+wt,qe.y1=qe.y0+qe.value*Qe)})})})(Ge),Ct();for(var et=1,ct=Ue;ct>0;--ct)mt(et*=.99,Ge),Ct();function mt(Tt,nt){var Qe=Ye.length;Ye.forEach(function(Et){var Gt=Et.length,Xt=Et[0].depth;Et.forEach(function(Fe){var qe;if((Fe.sourceLinks.length||Fe.targetLinks.length)&&!(Fe.partOfCycle&&L(Fe,nt)>0))if(Xt==0&&Gt==1)qe=Fe.y1-Fe.y0,Fe.y0=ce/2-qe/2,Fe.y1=ce/2+qe/2;else if(Xt==Qe-1&&Gt==1)qe=Fe.y1-Fe.y0,Fe.y0=ce/2-qe/2,Fe.y1=ce/2+qe/2;else{var wt=g.mean(Fe.sourceLinks,h),ft=g.mean(Fe.targetLinks,o),Ce=((wt&&ft?(wt+ft)/2:wt||ft)-f(Fe))*Tt;Fe.y0+=Ce,Fe.y1+=Ce}})})}function Ct(){Ye.forEach(function(Tt){var nt,Qe,Et,Gt=oe,Xt=Tt.length;for(Tt.sort(a),Et=0;Et<Xt;++Et)(Qe=Gt-(nt=Tt[Et]).y0)>0&&(nt.y0+=Qe,nt.y1+=Qe),Gt=nt.y1+re;if((Qe=Gt-re-ce)>0)for(Gt=nt.y0-=Qe,nt.y1-=Qe,Et=Xt-2;Et>=0;--Et)(Qe=(nt=Tt[Et]).y1+re-Gt)>0&&(nt.y0-=Qe,nt.y1-=Qe),Gt=nt.y0})}}
1function Je(ze){ze.nodes.forEach(function(Ue){Ue.sourceLinks.sort(l),Ue.targetLinks.sort(d)}),ze.nodes.forEach(function(Ue){var Ge=Ue.y0,Ye=Ge,et=Ue.y1,ct=et;Ue.sourceLinks.forEach(function(mt){mt.circular?(mt.y0=et-mt.width/2,et-=mt.width):(mt.y0=Ge+mt.width/2,Ge+=mt.width)}),Ue.targetLinks.forEach(function(mt){mt.circular?(mt.y1=ct-mt.width/2,ct-=mt.width):(mt.y1=Ye+mt.width/2,Ye+=mt.width)})})}return be.nodeId=function(ze){return arguments.length?(xe=typeof ze=="function"?ze:i(ze),be):xe},be.nodeAlign=function(ze){return arguments.length?(_e=typeof ze=="function"?ze:i(ze),be):_e},be.nodeWidth=function(ze){return arguments.length?(de=+ze,be):de},be.nodePadding=function(ze){return arguments.length?(re=+ze,be):re},be.nodes=function(ze){return arguments.length?(we=typeof ze=="function"?ze:i(ze),be):we},be.links=function(ze){return arguments.length?(Ee=typeof ze=="function"?ze:i(ze),be):Ee},be.size=function(ze){return arguments.length?(se=oe=0,pe=+ze[0],ce=+ze[1],be):[pe-se,ce-oe]},be.extent=function(ze){return arguments.length?(se=+ze[0][0],pe=+ze[1][0],oe=+ze[0][1],ce=+ze[1][1],be):[[se,oe],[pe,ce]]},be.iterations=function(ze){return arguments.length?(fe=+ze,be):fe},be.circularLinkGap=function(ze){return arguments.length?(ge=+ze,be):ge},be.nodePaddingRatio=function(ze){return arguments.length?(ne=+ze,be):ne},be.sortNodes=function(ze){return arguments.length?(ke=ze,be):ke},be.update=function(ze){return w(ze,xe),Je(ze),ze.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(ze,ce,xe,!1),U(ze,ce,xe),P(ze,ge,ce,xe),ze},be},m.sankeyCenter=function(re){return re.targetLinks.length?re.depth:re.sourceLinks.length?g.min(re.sourceLinks,n)-1:0},m.sankeyLeft=function(re){return re.depth},m.sankeyRight=function(re,ne){return ne-1-re.height},m.sankeyJustify=t,Object.defineProperty(m,"__esModule",{value:!0})})},{"d3-array":107,"d3-collection":108,"d3-shape":119,"elementary-circuits-directed-graph":130}],57:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?g(te,v("d3-array"),v("d3-collection"),v("d3-shape")):g(m.d3=m.d3||{},m.d3,m.d3,m.d3)})(this,function(m,g,b,y){function e(T){return T.target.depth}function n(T,_){return T.sourceLinks.length?T.depth:_-1}function t(T){return function(){return T}}function i(T,_){return d(T.source,_.source)||T.index-_.index}function r(T,_){return d(T.target,_.target)||T.index-_.index}function d(T,_){return T.y0-_.y0}function l(T){return T.value}function a(T){return(T.y0+T.y1)/2}function u(T){return a(T.source)*T.value}function f(T){return a(T.target)*T.value}function o(T){return T.index}function h(T){return T.nodes}function p(T){return T.links}function s(T,_){var w=T.get(_);if(!w)throw new Error("missing: "+_);return w}function x(T){return[T.source.x1,T.y0]}function c(T){return[T.target.x0,T.y1]}m.sankey=function(){var T=0,_=0,w=1,k=1,L=24,A=8,I=o,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),G(W),W}function H(W){W.nodes.forEach(function(R,N){R.index=N,R.sourceLinks=[],R.targetLinks=[]});var Q=b.map(W.nodes,I);W.links.forEach(function(R,N){R.index=N;var U=R.source,ee=R.target;typeof U!="object"&&(U=R.source=s(Q,U)),typeof ee!="object"&&(ee=R.target=s(Q,ee)),U.sourceLinks.push(R),ee.targetLinks.push(R)})}function V(W){W.nodes.forEach(function(Q){Q.value=Math.max(g.sum(Q.sourceLinks,l),g.sum(Q.targetLinks,l))})}function Z(W){var Q,R,N;for(Q=W.nodes,R=[],N=0;Q.length;++N,Q=R,R=[])Q.forEach(function(ee){ee.depth=N,ee.sourceLinks.forEach(function(j){R.indexOf(j.target)<0&&R.push(j.target)})});for(Q=W.nodes,R=[],N=0;Q.length;++N,Q=R,R=[])Q.forEach(function(ee){ee.height=N,ee.targetLinks.forEach(function(j){R.indexOf(j.source)<0&&R.push(j.source)})});var U=(w-T-L)/(N-1);W.nodes.forEach(function(ee){ee.x1=(ee.x0=T+Math.max(0,Math.min(N-1,Math.floor(P.call(null,ee,N))))*U)+L})}function K(W){var Q=b.nest().key(function(X){return X.x0}).sortKeys(g.ascending).entries(W.nodes).map(function(X){return X.values});(function(){var X=g.max(Q,function(ne){return ne.length}),J=2/3*(k-_)/(X-1);A>J&&(A=J);var re=g.min(Q,function(ne){return(k-_-(ne.length-1)*A)/g.sum(ne,l)});Q.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)ee(R*=.99),j(),U(R),j();function U(X){Q.forEach(function(J){J.forEach(function(re){if(re.targetLinks.length){var ne=(g.sum(re.targetLinks,u)/g.sum(re.targetLinks,l)-a(re))*X;re.y0+=ne,re.y1+=ne}})})}
1function ee(X){Q.slice().reverse().forEach(function(J){J.forEach(function(re){if(re.sourceLinks.length){var ne=(g.sum(re.sourceLinks,f)/g.sum(re.sourceLinks,l)-a(re))*X;re.y0+=ne,re.y1+=ne}})})}function j(){Q.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 G(W){W.nodes.forEach(function(Q){Q.sourceLinks.sort(r),Q.targetLinks.sort(i)}),W.nodes.forEach(function(Q){var R=Q.y0,N=R;Q.sourceLinks.forEach(function(U){U.y0=R+U.width/2,R+=U.width}),Q.targetLinks.forEach(function(U){U.y1=N+U.width/2,N+=U.width})})}return F.update=function(W){return G(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?(T=_=0,w=+W[0],k=+W[1],F):[w-T,k-_]},F.extent=function(W){return arguments.length?(T=+W[0][0],w=+W[1][0],_=+W[0][1],k=+W[1][1],F):[[T,_],[w,k]]},F.iterations=function(W){return arguments.length?(D=+W,F):D},F},m.sankeyCenter=function(T){return T.targetLinks.length?T.depth:T.sourceLinks.length?g.min(T.sourceLinks,e)-1:0},m.sankeyLeft=function(T){return T.depth},m.sankeyRight=function(T,_){return _-1-T.height},m.sankeyJustify=n,m.sankeyLinkHorizontal=function(){return y.linkHorizontal().source(x).target(c)},Object.defineProperty(m,"__esModule",{value:!0})})},{"d3-array":107,"d3-collection":108,"d3-shape":119}],58:[function(v,$,te){(function(){var m={version:"3.8.0"},g=[].slice,b=function(le){return g.call(le)},y=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(y)try{b(y.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}),y)try{y.createElement("DIV").style.setProperty("opacity",0,"")}catch{var t=this.Element.prototype,i=t.setAttribute,r=t.setAttributeNS,d=this.CSSStyleDeclaration.prototype,l=d.setProperty;t.setAttribute=function(C,z){i.call(this,C,z+"")},t.setAttributeNS=function(C,z,B){r.call(this,C,z,B+"")},d.setProperty=function(C,z,B){l.call(this,C,z+"",B)}}function a(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 o(le){return{left:function(C,z,B,q){for(arguments.length<3&&(B=0),arguments.length<4&&(q=C.length);B<q;){var ie=B+q>>>1;le(C[ie],z)<0?B=ie+1:q=ie}return B},right:function(C,z,B,q){for(arguments.length<3&&(B=0),arguments.length<4&&(q=C.length);B<q;){var ie=B+q>>>1;le(C[ie],z)>0?q=ie:B=ie+1}return B}}}m.ascending=a,m.descending=function(le,C){return C<le?-1:C>le?1:C>=le?0:NaN},m.min=function(le,C){var z,B,q=-1,ie=le.length;if(arguments.length===1){for(;++q<ie;)if((B=le[q])!=null&&B>=B){z=B;break}for(;++q<ie;)(B=le[q])!=null&&z>B&&(z=B)}else{for(;++q<ie;)if((B=C.call(le,le[q],q))!=null&&B>=B){z=B;break}for(;++q<ie;)(B=C.call(le,le[q],q))!=null&&z>B&&(z=B)}return z},m.max=function(le,C){var z,B,q=-1,ie=le.length;if(arguments.length===1){for(;++q<ie;)if((B=le[q])!=null&&B>=B){z=B;break}for(;++q<ie;)(B=le[q])!=null&&B>z&&(z=B)}else{for(;++q<ie;)if((B=C.call(le,le[q],q))!=null&&B>=B){z=B;break}for(;++q<ie;)(B=C.call(le,le[q],q))!=null&&B>z&&(z=B)}return z},m.extent=function(le,C){var z,B,q,ie=-1,ue=le.length;if(arguments.length===1){for(;++ie<ue;)if((B=le[ie])!=null&&B>=B){z=q=B;break}for(;++ie<ue;)(B=le[ie])!=null&&(z>B&&(z=B),q<B&&(q=B))}else{for(;++ie<ue;)if((B=C.call(le,le[ie],ie))!=null&&B>=B){z=q=B;break}for(;++ie<ue;)(B=C.call(le,le[ie],ie))!=null&&(z>B&&(z=B),q<B&&(q=B))}return[z,q]},m.sum=function(le,C){var z,B=0,q=le.length,ie=-1;if(arguments.length===1)for(;++ie<q;)f(z=+le[ie])&&(B+=z);else for(;++ie<q;)f(z=+C.call(le,le[ie],ie))&&(B+=z);return B},m.mean=function(le,C){var z,B=0,q=le.length,ie=-1,ue=q;if(arguments.length===1)for(;++ie<q;)f(z=u(le[ie]))?B+=z:--ue;else for(;++ie<q;)f(z=u(C.call(le,le[ie],ie)))?B+=z:--ue;if(ue)return B/ue},m.quantile=function(le,C){var z=(le.length-1)*C+1,B=Math.floor(z),q=+le[B-1],ie=z-B;return ie?q+ie*(le[B]-q):q},m.median=function(le,C){var z,B=[],q=le.length,ie=-1;if(arguments.length===1)for(;++ie<q;)f(z=u(le[ie]))&&B.push(z);else for(;++ie<q;)f(z=u(C.call(le,le[ie],ie)))&&B.push(z);if(B.length)return m.quantile(B.sort(a),.5)},m.variance=function(le,C){var z,B,q=le.length,ie=0,ue=0,me=-1,ye=0;if(arguments.length===1)for(;++me<q;)f(z=u(le[me]))&&(ue+=(B=z-ie)*(z-(ie+=B/++ye)));else for(;++me<q;)f(z=u(C.call(le,le[me],me)))&&(ue+=(B=z-ie)*(z-(ie+=B/++ye)));if(ye>1)return ue/(ye-1)},m.deviation=function(){var le=m.variance.apply(this,arguments);return le&&Math.sqrt(le)};var h=o(a);function p(le){return le.length}m.bisectLeft=h.left,m.bisect=m.bisectRight=h.right,m.bisector=function(le){return o(le.length===1?function(C,z){return a(le(C),z)}:le)},m.shuffle=function(le,C,z){(ie=arguments.length)<3&&(z=le.length,ie<2&&(C=0));for(var B,q,ie=z-C;ie;)q=Math.random()*ie--|0,B=le[ie+C],le[ie+C]=le[q+C],le[q+C]=B;return le},m.permute=function(le,C){for(var z=C.length,B=new Array(z);z--;)B[z]=le[C[z]];return B},m.pairs=function(le){for(var C=0,z=le.length-1,B=le[0],q=new Array(z<0?0:z);C<z;)q[C]=[B,B=le[++C]];return q},m.transpose=function(le){if(!(q=le.length))return[];for(var C=-1,z=m.min(le,p),B=new Array(z);++C<z;)for(var q,ie=-1,ue=B[C]=new Array(q);++ie<q;)ue[ie]=le[ie][C];return B},m.zip=function(){return m.transpose(arguments)},m.keys=function(le){var C=[];for(var z in le)C.push(z);return C},m.values=function(le){var C=[];for(var z in le)C.push(le[z]);return C},m.entries=function(le){var C=[];for(var z in le)C.push({key:z,value:le[z]});return C},m.merge=function(le){for(var C,z,B,q=le.length,ie=-1,ue=0;++ie<q;)ue+=le[ie].length;for(z=new Array(ue);--q>=0;)for(C=(B=le[q]).length;--C>=0;)z[--ue]=B[C];return z};var s=Math.abs;function x(le){for(var C=1;le*C%1;)C*=10;return C}function c(le,C){for(var z in C)Object.defineProperty(le.prototype,z,{value:C[z],enumerable:!1})}function T(){this._=Object.create(null)}m.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,q=[],ie=x(s(z)),ue=-1;if(le*=ie,C*=ie,(z*=ie)<0)for(;(B=le+z*++ue)>C;)q.push(B/ie);else for(;(B=le+z*++ue)<C;)q.push(B/ie);return q},m.map=function(le,C){var z=new T;if(le instanceof T)le.forEach(function(me,ye){z.set(me,ye)}
1);else if(Array.isArray(le)){var B,q=-1,ie=le.length;if(arguments.length===1)for(;++q<ie;)z.set(q,le[q]);else for(;++q<ie;)z.set(C.call(le,B=le[q],q),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 w(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(w(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 q=H[z]+C;if(q in le)return q}}c(T,{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:w(C),value:this._[C]});return le},size:I,empty:P,forEach:function(le){for(var C in this._)le.call(this,w(C),this._[C])}}),m.nest=function(){var le,C,z={},B=[],q=[];function ie(ue,me,ye){if(ye>=B.length)return C?C.call(z,me):le?me.sort(le):me;for(var Me,Ne,We,rt,vt=-1,Lt=me.length,xt=B[ye++],kt=new T;++vt<Lt;)(rt=kt.get(Me=xt(Ne=me[vt])))?rt.push(Ne):kt.set(Me,[Ne]);return ue?(Ne=ue(),We=function(gt,Rt){Ne.set(gt,ie(ue,Rt,ye))}):(Ne={},We=function(gt,Rt){Ne[gt]=ie(ue,Rt,ye)}),kt.forEach(We),Ne}return z.map=function(ue,me){return ie(me,ue,0)},z.entries=function(ue){return function me(ye,Me){if(Me>=B.length)return ye;var Ne=[],We=q[Me++];return ye.forEach(function(rt,vt){Ne.push({key:rt,values:me(vt,Me)})}),We?Ne.sort(function(rt,vt){return We(rt.key,vt.key)}):Ne}(ie(m.map,ue,0),0)},z.key=function(ue){return B.push(ue),z},z.sortKeys=function(ue){return q[B.length-1]=ue,z},z.sortValues=function(ue){return le=ue,z},z.rollup=function(ue){return C=ue,z},z},m.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},c(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,w(C))}}),m.behavior={},m.rebind=function(le,C){for(var z,B=1,q=arguments.length;++B<q;)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 T;function B(){for(var q,ie=C,ue=-1,me=ie.length;++ue<me;)(q=ie[ue].on)&&q.apply(this,arguments);return le}return B.on=function(q,ie){var ue,me=z.get(q);return arguments.length<2?me&&me.on:(me&&(me.on=null,C=C.slice(0,ue=C.indexOf(me)).concat(C.slice(ue+1)),z.remove(q)),ie&&C.push(z.set(q,{on:ie})),le)},B}function G(){m.event.preventDefault()}function W(){for(var le,C=m.event;le=C.sourceEvent;)C=le;return C}function Q(le){for(var C=new Z,z=0,B=arguments.length;++z<B;)C[arguments[z]]=K(C);return C.of=function(q,ie){return function(ue){try{var me=ue.sourceEvent=m.event;ue.target=le,m.event=ue,C[ue.type].apply(q,ie)}finally{m.event=me}}},C}m.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}},m.event=null,m.requote=function(le){return le.replace(R,"\\$&")};var R=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,N=function(le,C){for(var z in C)le[z]=C[z]};function U(le){return N(le,J),le}var ee=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,q){return z.call(B,q)})(le,C)};typeof Sizzle=="function"&&(ee=function(le,C){return Sizzle(le,C)[0]||null},j=Sizzle,X=Sizzle.matchesSelector),m.selection=function(){return m.select(y.documentElement)};var J=m.selection.prototype=[];function re(le){return typeof le=="function"?le:function(){return ee(le,this)}}function ne(le){return typeof le=="function"?le:function(){return j(le,this)}}J.select=function(le){var C,z,B,q,ie=[];le=re(le);for(var ue=-1,me=this.length;++ue<me;){ie.push(C=[]),C.parentNode=(B=this[ue]).parentNode;for(var ye=-1,Me=B.length;++ye<Me;)(q=B[ye])?(C.push(z=le.call(q,q.__data__,ye,ue)),z&&"__data__"in q&&(z.__data__=q.__data__)):C.push(null)}return U(ie)},J.selectAll=function(le){var C,z,B=[];le=ne(le);for(var q=-1,ie=this.length;++q<ie;)for(var ue=this[q],me=-1,ye=ue.length;++me<ye;)(z=ue[me])&&(B.push(C=b(le.call(z,z.__data__,me,q))),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=m.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+)"+m.requote(le)+"(?:\\s+|$)","g")}function xe(le){return(le+"").trim().split(/^|\s+/)}function _e(le,C){var z=(le=xe(le).map(we)).length;return typeof C=="function"?function(){for(var B=-1,q=C.apply(this,arguments);++B<z;)le[B](this,q)}:function(){for(var B=-1;++B<z;)le[B](this,C)}}function we(le){var C=de(le);return function(z,B){if(q=z.classList)return B?q.add(le):q.remove(le);var q=z.getAttribute("class")||"";B?(C.lastIndex=0,C.test(q)||z.setAttribute("class",ce(q+" "+le))):z.setAttribute("class",ce(q.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 ge(le){return typeof le=="function"?le:(le=m.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 ke(){var le=this.parentNode;le&&le.removeChild(this)}function be(le){return{__data__:le}}function Se(le){return function(){return X(this,le)}}function Oe(le){return arguments.length||(le=a),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 q,ie=le[z],ue=0,me=ie.length;ue<me;ue++)(q=ie[ue])&&C(q,ue,z);return le}function je(le){return N(le,Je),le}m.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=m.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,q=-1;if(C=z.classList){for(;++q<B;)if(!C.contains(le[q]))return!1}else for(C=z.getAttribute("class");++q<B;)if(!de(le[q]).test(C))return!1;return!0}for(C in le)this.each(_e(C,le[C]));return this}return this.each(_e(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 q=this.node();return n(q).getComputedStyle(q,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=ge(le),this.select(function(){return this.appendChild(le.apply(this,arguments))})},J.insert=function(le,C){return le=ge(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(ke)},J.data=function(le,C){var z,B,q=-1,ie=this.length;if(!arguments.length){for(le=new Array(ie=(z=this[0]).length);++q<ie;)(B=z[q])&&(le[q]=B.__data__);return le}
1function ue(Ne,We){var rt,vt,Lt,xt=Ne.length,kt=We.length,gt=Math.min(xt,kt),Rt=new Array(kt),zt=new Array(kt),Ut=new Array(xt);if(C){var tr,ur=new T,kr=new Array(xt);for(rt=-1;++rt<xt;)(vt=Ne[rt])&&(ur.has(tr=C.call(vt,vt.__data__,rt))?Ut[rt]=vt:ur.set(tr,vt),kr[rt]=tr);for(rt=-1;++rt<kt;)(vt=ur.get(tr=C.call(We,Lt=We[rt],rt)))?vt!==!0&&(Rt[rt]=vt,vt.__data__=Lt):zt[rt]=be(Lt),ur.set(tr,!0);for(rt=-1;++rt<xt;)rt in kr&&ur.get(kr[rt])!==!0&&(Ut[rt]=Ne[rt])}else{for(rt=-1;++rt<gt;)vt=Ne[rt],Lt=We[rt],vt?(vt.__data__=Lt,Rt[rt]=vt):zt[rt]=be(Lt);for(;rt<kt;++rt)zt[rt]=be(We[rt]);for(;rt<xt;++rt)Ut[rt]=Ne[rt]}zt.update=Rt,zt.parentNode=Rt.parentNode=Ut.parentNode=Ne.parentNode,me.push(zt),ye.push(Rt),Me.push(Ut)}var me=je([]),ye=U([]),Me=U([]);if(typeof le=="function")for(;++q<ie;)ue(z=this[q],le.call(z,z.parentNode.__data__,q));else for(;++q<ie;)ue(z=this[q],le);return ye.enter=function(){return me},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,q=[];typeof le!="function"&&(le=Se(le));for(var ie=0,ue=this.length;ie<ue;ie++){q.push(C=[]),C.parentNode=(z=this[ie]).parentNode;for(var me=0,ye=z.length;me<ye;me++)(B=z[me])&&le.call(B,B.__data__,me,ie)&&C.push(B)}return U(q)},J.order=function(){for(var le=-1,C=this.length;++le<C;)for(var z,B=this[le],q=B.length-1,ie=B[q];--q>=0;)(z=B[q])&&(ie&&ie!==z.nextSibling&&ie.parentNode.insertBefore(z,ie),ie=z);return this},J.sort=function(le){le=Oe.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,q=z.length;B<q;B++){var ie=z[B];if(ie)return ie}return null},J.size=function(){var le=0;return De(this,function(){++le}),le};var Je=[];function ze(le){var C,z;return function(B,q,ie){var ue,me=le[ie].update,ye=me.length;for(ie!=z&&(z=ie,C=0),q>=C&&(C=q+1);!(ue=me[C])&&++C<ye;);return ue}}function Ue(le,C,z){var B="__on"+le,q=le.indexOf("."),ie=Ye;q>0&&(le=le.slice(0,q));var ue=Ge.get(le);function me(){var ye=this[B];ye&&(this.removeEventListener(le,ye,ye.$),delete this[B])}return ue&&(le=ue,ie=et),q?C?function(){var ye=ie(C,b(arguments));me.call(this),this.addEventListener(le,this[B]=ye,ye.$=z),ye._=C}:me:C?V:function(){var ye,Me=new RegExp("^__on([^.]+)"+m.requote(le)+"$");for(var Ne in this)if(ye=Ne.match(Me)){var We=this[Ne];this.removeEventListener(ye[1],We,We.$),delete this[Ne]}}}m.selection.enter=je,m.selection.enter.prototype=Je,Je.append=J.append,Je.empty=J.empty,Je.node=J.node,Je.call=J.call,Je.size=J.size,Je.select=function(le){for(var C,z,B,q,ie,ue=[],me=-1,ye=this.length;++me<ye;){B=(q=this[me]).update,ue.push(C=[]),C.parentNode=q.parentNode;for(var Me=-1,Ne=q.length;++Me<Ne;)(ie=q[Me])?(C.push(B[Me]=z=le.call(q.parentNode,ie.__data__,Me,me)),z.__data__=ie.__data__):C.push(null)}return U(ue)},Je.insert=function(le,C){return arguments.length<2&&(C=ze(this)),J.insert.call(this,le,C)},m.select=function(le){var C;return typeof le=="string"?(C=[ee(le,y)]).parentNode=y.documentElement:(C=[le]).parentNode=e(le),U([C])},m.selectAll=function(le){var C;return typeof le=="string"?(C=b(j(le,y))).parentNode=y.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=m.map({mouseenter:"mouseover",mouseleave:"mouseout"});function Ye(le,C){return function(z){var B=m.event;m.event=z,C[0]=this.__data__;try{le.apply(this,C)}finally{m.event=B}}}function et(le,C){var z=Ye(le,C);return function(B){var q=B.relatedTarget;q&&(q===this||8&q.compareDocumentPosition(this))||z.call(this,B)}}y&&Ge.forEach(function(le){"on"+le in y&&Ge.remove(le)});var ct,mt=0;function Ct(le){var C=".dragsuppress-"+ ++mt,z="click"+C,B=m.select(n(le)).on("touchmove"+C,G).on("dragstart"+C,G).on("selectstart"+C,G);if(ct==null&&(ct=!("onselectstart"in le)&&F(le.style,"userSelect")),ct){var q=e(le).style,ie=q[ct];q[ct]="none"}return function(ue){if(B.on(C,null),ct&&(q[ct]=ie),ue){var me=function(){B.on(z,null)};B.on(z,function(){G(),me()},!0),setTimeout(me,0)}}}m.mouse=function(le){return nt(le,W())};var Tt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function nt(le,C){C.changedTouches&&(C=C.changedTouches[0]);var z=le.ownerSVGElement||le;if(z.createSVGPoint){var B=z.createSVGPoint();if(Tt<0){var q=n(le);if(q.scrollX||q.scrollY){var ie=(z=m.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Tt=!(ie.f||ie.e),z.remove()}}return Tt?(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 Qe(){return m.event.changedTouches[0].identifier}m.touch=function(le,C,z){if(arguments.length<3&&(z=C,C=W().changedTouches),C){for(var B,q=0,ie=C.length;q<ie;++q)if((B=C[q]).identifier===z)return nt(le,B)}},m.behavior.drag=function(){var le=Q(q,"drag","dragstart","dragend"),C=null,z=ie(V,m.mouse,n,"mousemove","mouseup"),B=ie(Qe,m.touch,E,"touchmove","touchend");function q(){this.on("mousedown.drag",z).on("touchstart.drag",B)}function ie(ue,me,ye,Me,Ne){return function(){var We,rt=this,vt=m.event.target.correspondingElement||m.event.target,Lt=rt.parentNode,xt=le.of(rt,arguments),kt=0,gt=ue(),Rt=".drag"+(gt==null?"":"-"+gt),zt=m.select(ye(vt)).on(Me+Rt,ur).on(Ne+Rt,kr),Ut=Ct(vt),tr=me(Lt,gt);function ur(){var wr,Qr,Kr=me(Lt,gt);Kr&&(wr=Kr[0]-tr[0],Qr=Kr[1]-tr[1],kt|=wr|Qr,tr=Kr,xt({type:"drag",x:Kr[0]+We[0],y:Kr[1]+We[1],dx:wr,dy:Qr}))}function kr(){me(Lt,gt)&&(zt.on(Me+Rt,null).on(Ne+Rt,null),Ut(kt),xt({type:"dragend"}))}We=C?[(We=C.apply(rt,arguments)).x-tr[0],We.y-tr[1]]:[0,0],xt({type:"dragstart"})}}return q.origin=function(ue){return arguments.length?(C=ue,q):C},m.rebind(q,le,"on")},m.touches=function(le,C){return arguments.length<2&&(C=W().touches),C?b(C).map(function(z){var B=nt(le,z);return B.identifier=z.identifier,B}):[]};var Et=1e-6,Gt=Math.PI,Xt=2*Gt,Fe=Xt-Et,qe=Gt/2,wt=Gt/180,ft=180/Gt;function Ce(le){return le>1?qe:le<-1?-qe:Math.asin(le)}function Ie(le){return((le=Math.exp(le))+1/le)/2}var Te=Math.SQRT2;m.interpolateZoom=function(le,C){var z,B,q=le[0],ie=le[1],ue=le[2],me=C[0],ye=C[1],Me=C[2],Ne=me-q,We=ye-ie,rt=Ne*Ne+We*We;if(rt<1e-12)B=Math.log(Me/ue)/Te,z=function(Rt){return[q+Rt*Ne,ie+Rt*We,ue*Math.exp(Te*Rt*B)]};else{var vt=Math.sqrt(rt),Lt=(Me*Me-ue*ue+4*rt)/(2*ue*2*vt),xt=(Me*Me-ue*ue-4*rt)/(2*Me*2*vt),kt=Math.log(Math.sqrt(Lt*Lt+1)-Lt),gt=Math.log(Math.sqrt(xt*xt+1)-xt);B=(gt-kt)/Te,z=function(Rt){var zt,Ut=Rt*B,tr=Ie(kt),ur=ue/(2*vt)*(tr*(zt=Te*Ut+kt,((zt=Math.exp(2*zt))-1)/(zt+1))-function(kr){return((kr=Math.exp(kr))-1/kr)/2}(kt));return[q+ur*Ne,ie+ur*We,ue*tr/Ie(Te*Ut+kt)]}}return z.duration=1e3*B,z},m.behavior.zoom=function(){var le,C,z,B,q,ie,ue,me,ye,Me={x:0,y:0,k:1},Ne=[960,500],We=tt,rt=250,vt=0,Lt="mousedown.zoom",xt="mousemove.zoom",kt="mouseup.zoom",gt="touchstart.zoom",Rt=Q(zt,"zoomstart","zoom","zoomend");function zt(Hr){Hr.on(Lt,ln).on(Ve+".zoom",Zn).on("dblclick.zoom",fa).on(gt,Vn)}function Ut(Hr){return[(Hr[0]-Me.x)/Me.k,(Hr[1]-Me.y)/Me.k]}function tr(Hr){Me.k=Math.max(We[0],Math.min(We[1],Hr))}function ur(Hr,Tn){Tn=function(Xn){return[Xn[0]*Me.k+Me.x,Xn[1]*Me.k+Me.y]}(Tn),Me.x+=Hr[0]-Tn[0],Me.y+=Hr[1]-Tn[1]}function kr(Hr,Tn,Xn,Gn){Hr.__chart__={x:Me.x,y:Me.y,k:Me.k},tr(Math.pow(2,Gn)),ur(C=Tn,Xn),Hr=m.select(Hr),rt>0&&(Hr=Hr.transition().duration(rt)),Hr.call(zt.event)}function wr(){ue&&ue.domain(ie.range().map(function(Hr){return(Hr-Me.x)/Me.k}).map(ie.invert)),ye&&ye.domain(me.range().map(function(Hr){return(Hr-Me.y)/Me.k}).map(me.invert))}function Qr(Hr){vt++||Hr({type:"zoomstart"})}function Kr(Hr){wr(),Hr({type:"zoom",scale:Me.k,translate:[Me.x,Me.y]})}function pn(Hr){--vt||(Hr({type:"zoomend"}),C=null)}function ln(){var Hr=this,Tn=Rt.of(Hr,arguments),Xn=0,Gn=m.select(n(Hr)).on(xt,Ea).on(kt,ea),aa=Ut(m.mouse(Hr)),pa=Ct(Hr);function Ea(){Xn=1,ur(m.mouse(Hr),aa),Kr(Tn)}function ea(){Gn.on(xt,null).on(kt,null),pa(Xn),pn(Tn)}As.call(Hr),Qr(Tn)}function Vn(){var Hr,Tn=this,Xn=Rt.of(Tn,arguments),Gn={},aa=0,pa=".zoom-"+m.event.changedTouches[0].identifier,Ea="touchmove"+pa,ea="touchend"+pa,ba=[],va=m.select(Tn),Pa=Ct(Tn);function _a(){var Oi=m.touches(Tn);
vendor: 5,319 bytes, line 1
1return Hr=Me.k,Oi.forEach(function(zi){zi.identifier in Gn&&(Gn[zi.identifier]=Ut(zi))}),Oi}function Ia(){var Oi=m.event.target;m.select(Oi).on(Ea,Va).on(ea,fi),ba.push(Oi);for(var zi=m.event.changedTouches,ui=0,Ai=zi.length;ui<Ai;++ui)Gn[zi[ui].identifier]=null;var yi=_a(),_o=Date.now();if(yi.length===1){if(_o-q<500){var Wi=yi[0];kr(Tn,Wi,Gn[Wi.identifier],Math.floor(Math.log(Me.k)/Math.LN2)+1),G()}q=_o}else if(yi.length>1){Wi=yi[0];var Fo=yi[1],bs=Wi[0]-Fo[0],Us=Wi[1]-Fo[1];aa=bs*bs+Us*Us}}function Va(){var Oi,zi,ui,Ai,yi=m.touches(Tn);As.call(Tn);for(var _o=0,Wi=yi.length;_o<Wi;++_o,Ai=null)if(ui=yi[_o],Ai=Gn[ui.identifier]){if(zi)break;Oi=ui,zi=Ai}if(Ai){var Fo=(Fo=ui[0]-Oi[0])*Fo+(Fo=ui[1]-Oi[1])*Fo,bs=aa&&Math.sqrt(Fo/aa);Oi=[(Oi[0]+ui[0])/2,(Oi[1]+ui[1])/2],zi=[(zi[0]+Ai[0])/2,(zi[1]+Ai[1])/2],tr(bs*Hr)}q=null,ur(Oi,zi),Kr(Xn)}function fi(){if(m.event.touches.length){for(var Oi=m.event.changedTouches,zi=0,ui=Oi.length;zi<ui;++zi)delete Gn[Oi[zi].identifier];for(var Ai in Gn)return void _a()}m.selectAll(ba).on(pa,null),va.on(Lt,ln).on(gt,Vn),Pa(),pn(Xn)}Ia(),Qr(Xn),va.on(Lt,null).on(gt,Ia)}function Zn(){var Hr=Rt.of(this,arguments);B?clearTimeout(B):(As.call(this),le=Ut(C=z||m.mouse(this)),Qr(Hr)),B=setTimeout(function(){B=null,pn(Hr)},50),G(),tr(Math.pow(2,.002*Pe())*Me.k),ur(C,le),Kr(Hr)}function fa(){var Hr=m.mouse(this),Tn=Math.log(Me.k)/Math.LN2;kr(this,Hr,Ut(Hr),m.event.shiftKey?Math.ceil(Tn)-1:Math.floor(Tn)+1)}return Ve||(Ve="onwheel"in y?(Pe=function(){return-m.event.deltaY*(m.event.deltaMode?120:1)},"wheel"):"onmousewheel"in y?(Pe=function(){return m.event.wheelDelta},"mousewheel"):(Pe=function(){return-m.event.detail},"MozMousePixelScroll")),zt.event=function(Hr){Hr.each(function(){var Tn=Rt.of(this,arguments),Xn=Me;ds?m.select(this).transition().each("start.zoom",function(){Me=this.__chart__||{x:0,y:0,k:1},Qr(Tn)}).tween("zoom:zoom",function(){var Gn=Ne[0],aa=Ne[1],pa=C?C[0]:Gn/2,Ea=C?C[1]:aa/2,ea=m.interpolateZoom([(pa-Me.x)/Me.k,(Ea-Me.y)/Me.k,Gn/Me.k],[(pa-Xn.x)/Xn.k,(Ea-Xn.y)/Xn.k,Gn/Xn.k]);return function(ba){var va=ea(ba),Pa=Gn/va[2];this.__chart__=Me={x:pa-va[0]*Pa,y:Ea-va[1]*Pa,k:Pa},Kr(Tn)}}).each("interrupt.zoom",function(){pn(Tn)}).each("end.zoom",function(){pn(Tn)}):(this.__chart__=Me,Qr(Tn),Kr(Tn),pn(Tn))})},zt.translate=function(Hr){return arguments.length?(Me={x:+Hr[0],y:+Hr[1],k:Me.k},wr(),zt):[Me.x,Me.y]},zt.scale=function(Hr){return arguments.length?(Me={x:Me.x,y:Me.y,k:null},tr(+Hr),wr(),zt):Me.k},zt.scaleExtent=function(Hr){return arguments.length?(We=Hr==null?tt:[+Hr[0],+Hr[1]],zt):We},zt.center=function(Hr){return arguments.length?(z=Hr&&[+Hr[0],+Hr[1]],zt):z},zt.size=function(Hr){return arguments.length?(Ne=Hr&&[+Hr[0],+Hr[1]],zt):Ne},zt.duration=function(Hr){return arguments.length?(rt=+Hr,zt):rt},zt.x=function(Hr){return arguments.length?(ue=Hr,ie=Hr.copy(),Me={x:0,y:0,k:1},zt):ue},zt.y=function(Hr){return arguments.length?(ye=Hr,me=Hr.copy(),Me={x:0,y:0,k:1},zt):ye},m.rebind(zt,Rt,"on")};var Pe,Ve,tt=[0,1/0];function ot(){}function at(le,C,z){return this instanceof at?(this.h=+le,this.s=+C,void(this.l=+z)):arguments.length<2?le instanceof at?new at(le.h,le.s,le.l):Ir(""+le,fr,at):new at(le,C,z)}m.color=ot,ot.prototype.toString=function(){return this.rgb()+""},m.hsl=at;var _t=at.prototype=new ot;function bt(le,C,z){var B,q;function ie(ue){return Math.round(255*function(me){return me>360?me-=360:me<0&&(me+=360),me<60?B+(q-B)*me/60:me<180?q:me<240?B+(q-B)*(240-me)/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)-(q=z<=.5?z*(1+C):z+C-z*C),new It(ie(le+120),ie(le),ie(le-120))}function jt(le,C,z){return this instanceof jt?(this.h=+le,this.c=+C,void(this.l=+z)):arguments.length<2?le instanceof jt?new jt(le.h,le.c,le.l):Le(le instanceof yt?le.l:(le=$t((le=m.rgb(le)).r,le.g,le.b)).l,le.a,le.b):new jt(le,C,z)}_t.brighter=function(le){return le=Math.pow(.7,arguments.length?le:1),new at(this.h,this.s,this.l/le)},_t.darker=function(le){return le=Math.pow(.7,arguments.length?le:1),new at(this.h,this.s,le*this.l)},_t.rgb=function(){return bt(this.h,this.s,this.l)},m.hcl=jt;var Nt=jt.prototype=new ot;function $e(le,C,z){return isNaN(le)&&(le=0),isNaN(C)&&(C=0),new yt(z,Math.cos(le*=wt)*C,Math.sin(le)*C)}function yt(le,C,z){return this instanceof yt?(this.l=+le,this.a=+C,void(this.b=+z)):arguments.length<2?le instanceof yt?new yt(le.l,le.a,le.b):le instanceof jt?$e(le.h,le.c,le.l):$t((le=It(le)).r,le.g,le.b):new yt(le,C,z)}Nt.brighter=function(le){return new jt(this.h,this.c,Math.min(100,this.l+Ot*(arguments.length?le:1)))},Nt.darker=function(le){return new jt(this.h,this.c,Math.max(0,this.l-Ot*(arguments.length?le:1)))},Nt.rgb=function(){return $e(this.h,this.c,this.l).rgb()},m.lab=yt;var Ot=18,Mt=yt.prototype=new ot;function Pt(le,C,z){var B=(le+16)/116,q=B+C/500,ie=B-z/200;return new It(At(3.2404542*(q=.95047*Xe(q))-1.5371385*(B=1*Xe(B))-.4985314*(ie=1.08883*Xe(ie))),At(-.969266*q+1.8760108*B+.041556*ie),At(.0556434*q-.2040259*B+1.0572252*ie))}function Le(le,C,z){return le>0?new jt(Math.atan2(z,C)*ft,Math.sqrt(C*C+z*z),le):new jt(NaN,NaN,le)}function Xe(le){return le>.206893034?le*le*le:(le-4/29)/7.787037}function it(le){return le>.008856?Math.pow(le,1/3):7.787037*le+4/29}function At(le){return Math.round(255*(le<=.00304?12.92*le:1.055*M
1ath.pow(le,1/2.4)-.055))}function It(le,C,z){return this instanceof It?(this.r=~~le,this.g=~~C,void(this.b=~~z)):arguments.length<2?le instanceof It?new It(le.r,le.g,le.b):Ir(""+le,It,bt):new It(le,C,z)}function Zt(le){return new It(le>>16,le>>8&255,255&le)}function Jt(le){return Zt(le)+""}Mt.brighter=function(le){return new yt(Math.min(100,this.l+Ot*(arguments.length?le:1)),this.a,this.b)},Mt.darker=function(le){return new yt(Math.max(0,this.l-Ot*(arguments.length?le:1)),this.a,this.b)},Mt.rgb=function(){return Pt(this.l,this.a,this.b)},m.rgb=It;var Vt=It.prototype=new ot;function pr(le){return le<16?"0"+Math.max(0,le).toString(16):Math.min(255,le).toString(16)}function Ir(le,C,z){var B,q,ie,ue=0,me=0,ye=0;if(B=/([a-z]+)\((.*)\)/.exec(le=le.toLowerCase()))switch(q=B[2].split(","),B[1]){case"hsl":return z(parseFloat(q[0]),parseFloat(q[1])/100,parseFloat(q[2])/100);case"rgb":return C(ar(q[0]),ar(q[1]),ar(q[2]))}return(ie=hr.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,me=240&ie,me|=me>>4,ye=15&ie,ye|=ye<<4):le.length===7&&(ue=(16711680&ie)>>16,me=(65280&ie)>>8,ye=255&ie)),C(ue,me,ye))}function fr(le,C,z){var B,q,ie=Math.min(le/=255,C/=255,z/=255),ue=Math.max(le,C,z),me=ue-ie,ye=(ue+ie)/2;return me?(q=ye<.5?me/(ue+ie):me/(2-ue-ie),B=le==ue?(C-z)/me+(C<z?6:0):C==ue?(z-le)/me+2:(le-C)/me+4,B*=60):(B=NaN,q=ye>0&&ye<1?0:B),new at(B,q,ye)}function $t(le,C,z){var B=it((.4124564*(le=er(le))+.3575761*(C=er(C))+.1804375*(z=er(z)))/.95047),q=it((.2126729*le+.7151522*C+.072175*z)/1);return yt(116*q-16,500*(B-q),200*(q-it((.0193339*le+.119192*C+.9503041*z)/1.08883)))}function er(le){return(le/=255)<=.04045?le/12.92:Math.pow((le+.055)/1.055,2.4)}function ar(le){var C=parseFloat(le);return le.charAt(le.length-1)==="%"?Math.round(2.55*C):C}Vt.brighter=function(le){le=Math.pow(.7,arguments.length?le:1);var C=this.r,z=this.g,B=this.b,q=30;return C||z||B?(C&&C<q&&(C=q),z&&z<q&&(z=q),B&&B<q&&(B=q),new It(Math.min(255,C/le),Math.min(255,z/le),Math.min(255,B/le))):new It(q,q,q)},Vt.darker=function(le){return new It((le=Math.pow(.7,arguments.length?le:1))*this.r,le*this.g,le*this.b)},Vt.hsl=function(){return fr(this.r,this.g,this.b)},Vt.toString=function(){return"#"+pr(this.r)+pr(this.g)+pr(this.b)};var hr=m.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 vr(le){return typeof le=="function"?le:function(){return le}}function Pr(le){return function(C,z,B){return arguments.length===2&&typeof z=="function"&&(B=z,z=null),Ur(C,z,le,B)}}function Ur(le,C,z,B){var q={},ie=m.dispatch("beforesend","progress","load","error"),ue={},me=new XMLHttpRequest,ye=null;function Me(){var Ne,We=me.status;if(!We&&function(rt){var vt=rt.responseType;return vt&&vt!=="text"?rt.response:rt.responseText}(me)||We>=200&&We<300||We===304){try{Ne=z.call(q,me)}catch(rt){return void ie.error.call(q,rt)}ie.load.call(q,Ne)}else ie.error.call(q,me)}return self.XDomainRequest&&!("withCredentials"in me)&&/^(http(s)?:)?\/\//.test(le)&&(me=new XDomainRequest),"onload"in me?me.onload=me.onerror=Me:me.onreadystatechange=function(){me.readyState>3&&Me()},me.onprogress=function(Ne){var We=m.event;m.event=Ne;try{ie.progress.call(q,me)}finally{m.event=We}},q.header=function(Ne,We){return Ne=(Ne+"").toLowerCase(),arguments.length<2?ue[Ne]:(We==null?delete ue[
vendor: 5,464 bytes, lines 1-4
1Ne]:ue[Ne]=We+"",q)},q.mimeType=function(Ne){return arguments.length?(C=Ne==null?null:Ne+"",q):C},q.responseType=function(Ne){return arguments.length?(ye=Ne,q):ye},q.response=function(Ne){return z=Ne,q},["get","post"].forEach(function(Ne){q[Ne]=function(){return q.send.apply(q,[Ne].concat(b(arguments)))}}),q.send=function(Ne,We,rt){if(arguments.length===2&&typeof We=="function"&&(rt=We,We=null),me.open(Ne,le,!0),C==null||"accept"in ue||(ue.accept=C+",*/*"),me.setRequestHeader)for(var vt in ue)me.setRequestHeader(vt,ue[vt]);return C!=null&&me.overrideMimeType&&me.overrideMimeType(C),ye!=null&&(me.responseType=ye),rt!=null&&q.on("error",rt).on("load",function(Lt){rt(null,Lt)}),ie.beforesend.call(q,me),me.send(We??null),q},q.abort=function(){return me.abort(),q},m.rebind(q,ie,"on"),B==null?q:q.get(function(Ne){return Ne.length===1?function(We,rt){Ne(We==null?rt:null)}:Ne}(B))}hr.forEach(function(le,C){hr.set(le,Zt(C))}),m.functor=vr,m.xhr=Pr(E),m.dsv=function(le,C){var z=new RegExp('["'+le+` 2]`),B=le.charCodeAt(0);function q(Me,Ne,We){arguments.length<3&&(We=Ne,Ne=null);var rt=Ur(Me,C,Ne==null?ie:ue(Ne),We);return rt.row=function(vt){return arguments.length?rt.response((Ne=vt)==null?ie:ue(vt)):Ne},rt}function ie(Me){return q.parse(Me.responseText)}function ue(Me){return function(Ne){return q.parse(Ne.responseText,Me)}}function me(Me){return Me.map(ye).join(le)}function ye(Me){return z.test(Me)?'"'+Me.replace(/\"/g,'""')+'"':Me}return q.parse=function(Me,Ne){var We;return q.parseRows(Me,function(rt,vt){if(We)return We(rt,vt-1);var Lt=function(xt){for(var kt={},gt=rt.length,Rt=0;Rt<gt;++Rt)kt[rt[Rt]]=xt[Rt];return kt};We=Ne?function(xt,kt){return Ne(Lt(xt),kt)}:Lt})},q.parseRows=function(Me,Ne){var We,rt,vt={},Lt={},xt=[],kt=Me.length,gt=0,Rt=0;function zt(){if(gt>=kt)return Lt;if(rt)return rt=!1,vt;var tr=gt;if(Me.charCodeAt(tr)===34){for(var ur=tr;ur++<kt;)if(Me.charCodeAt(ur)===34){if(Me.charCodeAt(ur+1)!==34)break;++ur}return gt=ur+2,(kr=Me.charCodeAt(ur+1))===13?(rt=!0,Me.charCodeAt(ur+2)===10&&++gt):kr===10&&(rt=!0),Me.slice(tr+1,ur).replace(/""/g,'"')}for(;gt<kt;){var kr,wr=1;if((kr=Me.charCodeAt(gt++))===10)rt=!0;else if(kr===13)rt=!0,Me.charCodeAt(gt)===10&&(++gt,++wr);else if(kr!==B)continue;return Me.slice(tr,gt-wr)}return Me.slice(tr)}for(;(We=zt())!==Lt;){for(var Ut=[];We!==vt&&We!==Lt;)Ut.push(We),We=zt();Ne&&(Ut=Ne(Ut,Rt++))==null||xt.push(Ut)}return xt},q.format=function(Me){if(Array.isArray(Me[0]))return q.formatRows(Me);var Ne=new S,We=[];return Me.forEach(function(rt){for(var vt in rt)Ne.has(vt)||We.push(Ne.add(vt))}),[We.map(ye).join(le)].concat(Me.map(function(rt){return We.map(function(vt){return ye(rt[vt])}).join(le)})).join(` 3`)},q.formatRows=function(Me){return Me.map(me).join(` 4`)},q},m.csv=m.dsv(",","text/csv"),m.tsv=m.dsv(" ","text/tab-separated-values");var qr,rn,An,mn,Mn=this[F(this,"requestAnimationFrame")]||function(le){setTimeout(le,17)};function Xr(le,C,z){var B=arguments.length;B<2&&(C=0),B<3&&(z=Date.now());var q=z+C,ie={c:le,t:q,n:null};return rn?rn.n=ie:qr=ie,rn=ie,An||(mn=clearTimeout(mn),An=1,Mn(Er)),ie}function Er(){var le=on(),C=Un()-le;C>24?(isFinite(C)&&(clearTimeout(mn),mn=setTimeout(Er,C)),An=0):(An=1,Mn(Er))}function on(){for(var le=Date.now(),C=qr;C;)le>=C.t&&C.c(le-C.t)&&(C.c=null),C=C.n;return le}function Un(){for(var le,C=qr,z=1/0;C;)C.c?(C.t<z&&(z=C.t),C=(le=C).n):C=le?le.n=C.n:qr=C.n;return rn=le,z}function Tr(le){return le[0]}function en(le){return le[1]}function $r(le){for(var C,z,B,q=le.length,ie=[0,1],ue=2,me=2;me<q;me++){for(;ue>1&&(C=le[ie[ue-2]],z=le[ie[ue-1]],B=le[me],(z[0]-C[0])*(B[1]-C[1])-(z[1]-C[1])*(B[0]-C[0])<=0);)--ue;ie[ue++]=me}return ie.slice(0,ue)}function Rr(le,C){return le[0]-C[0]||le[1]-C[1]}m.timer=function(){Xr.apply(this,arguments)},m.timer.flush=function(){on(),Un()},m.round=function(le,C){return C?Math.round(le*(C=Math.pow(10,C)))/C:Math.round(le)},m.geom={},m.geom.hull=function(le){var C=Tr,z=en;if(arguments.length)return B(le);function B(q){if(q.length<3)return[];var ie,ue=vr(C),me=vr(z),ye=q.length,Me=[],Ne=[];for(ie=0;ie<ye;ie++)Me.push([+ue.call(this,q[ie],ie),+me.call(this,q[ie],ie),ie]);for(Me.sort(Rr),ie=0;ie<ye;ie++)Ne.push([Me[ie][0],-Me[ie][1]]);var We=$r(Me),rt=$r(Ne),vt=rt[0]===We[0],Lt=rt[rt.length-1]===We[We.length-1],xt=[];for(ie=We.length-1;ie>=0;--ie)xt.push(q[Me[We[ie]][2]]);for(ie=+vt;ie<rt.length-Lt;++ie)xt.push(q[Me[rt[ie]][2]]);return xt}return B.x=function(q){return arguments.length?(C=q,B):C},B.y=function(q){return arguments.length?(z=q,B):z},B},m.geom.polygon=function(le){return N(le,Pn),le};var Pn=m.geom.polygon.prototype=[];function Nn(le,C,z){return(z[0]-C[0])*(le[1]-C[1])<(z[1]-C[1])*(le[0]-C[0])}function hn(le,C,z,B){var q=le[0],ie=z[0],ue=C[0]-q,me=B[0]-ie,ye=le[1],Me=z[1],Ne=C[1]-ye,We=B[1]-Me,rt=(me*(ye-Me)-We*(q-ie))/(We*ue-me*Ne);return[q+rt*ue,ye+rt*Ne]}function Fn(le){var C=le[0],z=le[le.length-1];return!(C[0]-z[0]||C[1]-z[1])}Pn.area=function(){for(var le,C=-1,z=this.length,B=this[z-1],q=0;++C<z;)le=B,B=this[C],q+=le[1]*B[0]-le[0]*B[1];return .5*q},Pn.centroid=function(le){var C,z,B=-1,q=this.length,ie=0,ue=0,me=this[q-1];for(arguments.length||(le=-1/(6*this.area()));++B<q;)C=me,me=this[B],z=C[0]*me[1]-me[0]*C[1],ie+=(C[0]+me[0])*z,ue+=(C[1]+me[1])*z;return[ie*le,ue*le]},Pn.clip=function(le){for(var C,z,B,q,ie,ue,me=Fn(le),ye=-1,Me=this.length-Fn(this),Ne=this[Me-1];++ye<Me;){for(C=le.slice(),le.length=0,q=this[ye],ie=C[(B=C.length-me)-1],z=-1;++z<B;
4)Nn(ue=C[z],Ne,q)?(Nn(ie,Ne,q)||le.push(hn(ie,ue,Ne,q)),le.push(ue)):Nn(ie,Ne,q)&&le.push(hn(ie,ue,Ne,q)),ie=ue;me&&le.push(le[0]),Ne=q}return le};var ca,sr,Fr,Bt,lr,mr=[],Vr=[];function Br(){kn(this),this.edge=this.site=this.circle=null}function Dr(le){var C=mr.pop()||new Br;return C.site=le,C}function Or(le){vn(le),Fr.remove(le),mr.push(le),kn(le)}function xr(le){var C=le.circle,z=C.x,B=C.cy,q={x:z,y:B},ie=le.P,ue=le.N,me=[le];Or(le);for(var ye=ie;ye.circle&&s(z-ye.circle.x)<Et&&s(B-ye.circle.cy)<Et;)ie=ye.P,me.unshift(ye),Or(ye),ye=ie;me.unshift(ye),vn(ye);for(var Me=ue;Me.circle&&s(z-Me.circle.x)<Et&&s(B-Me.circle.cy)<Et;)ue=Me.N,me.push(Me),Or(Me),Me=ue;me.push(Me),vn(Me);var Ne,We=me.length;for(Ne=1;Ne<We;++Ne)Me=me[Ne],ye=me[Ne-1],Wn(Me.edge,ye.site,Me.site,q);ye=me[0],(Me=me[We-1]).edge=En(ye.site,Me.site,null,q),nn(ye),nn(Me)}function br(le){for(var C,z,B,q,ie=le.x,ue=le.y,me=Fr._;me;)if((B=_r(me,ue)-ie)>Et)me=me.L;else{if(!((q=ie-Cr(me,ue))>Et)){B>-Et?(C=me.P,z=me):q>-Et?(C=me,z=me.N):C=z=me;break}if(!me.R){C=me;break}me=me.R}var ye=Dr(le);if(Fr.insert(C,ye),C||z){if(C===z)return vn(C),z=Dr(C.site),Fr.insert(ye,z),ye.edge=z.edge=En(C.site,ye.site),nn(C),void nn(z);if(z){vn(C),vn(z);var Me=C.site,Ne=Me.x,We=Me.y,rt=le.x-Ne,vt=le.y-We,Lt=z.site,xt=Lt.x-Ne,kt=Lt.y-We,gt=2*(rt*kt-vt*xt),Rt=rt*rt+vt*vt,zt=xt*xt+kt*kt,Ut={x:(kt*Rt-vt*zt)/gt+Ne,y:(rt*zt-xt*Rt)/gt+We};Wn(z.edge,Me,Lt,Ut),ye.edge=En(Me,le,null,Ut),z.edge=En(le,Lt,null,Ut),nn(C),nn(z)}else ye.edge=En(C.site,ye.site)}}function _r(le,C){var z=le.site,B=z.x,q=z.y,ie=q-C;if(!ie)return B;var ue=le.P;if(!ue)return-1/0;var me=(z=ue.site).x,ye=z.y,Me=ye-C;if(!Me)return me;var Ne=me-B,We=1/ie-1/Me,rt=Ne/Me;return We?(-rt+Math.sqrt(rt*rt-2*We*(Ne*Ne/(-2*Me)-ye+Me/2+q-ie/2)))/We+B:(B+me)/2}function Cr(le,C){var z=le.N;if(z)return _r(z,C);var B=le.site;return B.y===C?B.x:1/0}function Wr(le){this.site=le,this.edges=[]}function Gr(le,C){return C.angle-le.angle}function tn(){kn(this),this.x=this.y=this.arc=this.site=this.cy=null}function nn(le){var C=le.P,z=le.N;if(C&&z){var B=C.site,q=le.site,ie=z.site;if(B!==ie){var ue=q.x,me=q.y,ye=B.x-ue,Me=B.y-me,Ne=ie.x-ue,We=2*(ye*(kt=ie.y-me)-Me*Ne);if(!(We>=-1e-12)){var rt=ye*ye+Me*Me,vt=Ne*Ne+kt*kt,Lt=(kt*rt-Me*vt)/We,xt=(ye*vt-Ne*rt)/We,kt=xt+me,gt=Vr.pop()||new tn;gt.arc=le,gt.site=q,gt.x=Lt+ue,gt.y=kt+Math.sqrt(Lt*Lt+xt*xt),gt.cy=kt,le.circle=gt;for(var Rt=null,zt=lr._;zt;)if(gt.y<zt.y||gt.y===zt.y&>.x<=zt.x){if(!zt.L){Rt=zt.P;break}zt=zt.L}else{if(!zt.R){Rt=zt;break}zt=zt.R}lr.insert(Rt,gt),Rt||(Bt=gt)}}}}function vn(le){var C=le.circle;C&&(C.P||(Bt=C.N),lr.remove(C),Vr.push(C),kn(C),le.circle=null)}function xn(le,C){var z=le.b;if(z)return!0;var B,q,ie=le.a,ue=C[0][0],me=C[1][0],ye=C[0][1],Me=C[1][1],Ne=le.l,We=le.r,rt=Ne.x,vt=Ne.y,Lt=We.x,xt=We.y,kt=(rt+Lt)/2,gt=(vt+xt)/2;if(xt===vt){if(kt<ue||kt>=me)return;if(rt>Lt){if(ie){if(ie.y>=Me)return}else ie={x:kt,y:ye};z={x:kt,y:Me}}else{if(ie){if(ie.y<ye)return}else ie={x:kt,y:Me};z={x:kt,y:ye}}}else if(q=gt-(B=(rt-Lt)/(xt-vt))*kt,B<-1||B>1)if(rt>Lt){if(ie){if(ie.y>=Me)return}else ie={x:(ye-q)/B,y:ye};z={x:(Me-q)/B,y:Me}}else{if(ie){if(ie.y<ye)return}else ie={x:(Me-q)/B,y:Me};z={x:(ye-q)/B,y:ye}}else if(vt<xt){if(ie){if(ie.x>=me)return}else ie={x:ue,y:B*ue+q};z={x:me,y:B*me+q}}else{if(ie){if(ie.x<ue)return}else ie={x:me,y:B*me+q};z={x:ue,y:B*ue+q}}return le.a=ie,le.b=z,!0}function bn(le,C){this.l=le,this.r=C,this.a=this.b=null}function En(le,C,z,B){var q=new bn(le,C);return ca.push(q),z&&Wn(q,le,C,z),B&&Wn(q,C,le,B),sr[le.i].edges.push(new Ma(q,le,C)),sr[C.i].edges.push(new Ma(q,C,le)),q}function In(le,C,z){var B=new bn(le,null);return B.a=C,B.b=z,ca.push(B),B}function Wn(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 Ma(le,C,z){var B=le.a,q=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(q.x-B.x,B.y-q.y):Math.atan2(B.x-q.x,q.y-B.y)}function ka(){this._=null}function kn(le){le.U=le.C=le.L=le.R=le.P=le.N=null}function $n(le,C){var z=C,B=C.R,q=z.U;q?q.L===z?q.L=B:q.R=B:le._=B,B.U=q,z.U=B,z.R=B.L,z.R&&(z.R.U=z),B.L=z}function Jn(le,C){var z=C,B=C.L,q=z.U;q?q.L===z?q.L=B:q.R=B:le._=B,B.U=q,z.U=B,z.L=B.R,z.L&&(z.L.U=z),B.R=z}function Oa(le){for(;le.L;)le=le.L;return le}function mi(le,C){var z,B,q,ie=le.sort(Di).pop();for(ca=[],sr=new Array(le.length),Fr=new ka,lr=new ka;;)if(q=Bt,ie&&(!q||ie.y<q.y||ie.y===q.y&&ie.x<q.x))ie.x===z&&ie.y===B||(sr[ie.i]=new Wr(ie),br(ie),z=ie.x,B=ie.y),ie=le.pop();else{if(!q)break;xr(q.arc)}C&&(function(me){for(var ye,Me,Ne,We,rt,vt=ca,Lt=(Me=me[0][0],Ne=me[0][1],We=me[1][0],rt=me[1][1],function(kt){var gt,Rt=kt.a,zt=kt.b,Ut=Rt.x,tr=Rt.y,ur=0,kr=1,wr=zt.x-Ut,Qr=zt.y-tr;if(gt=Me-Ut,wr||!(gt>
40)){if(gt/=wr,wr<0){if(gt<ur)return;gt<kr&&(kr=gt)}else if(wr>0){if(gt>kr)return;gt>ur&&(ur=gt)}if(gt=We-Ut,wr||!(gt<0)){if(gt/=wr,wr<0){if(gt>kr)return;gt>ur&&(ur=gt)}else if(wr>0){if(gt<ur)return;gt<kr&&(kr=gt)}if(gt=Ne-tr,Qr||!(gt>0)){if(gt/=Qr,Qr<0){if(gt<ur)return;gt<kr&&(kr=gt)}else if(Qr>0){if(gt>kr)return;gt>ur&&(ur=gt)}if(gt=rt-tr,Qr||!(gt<0)){if(gt/=Qr,Qr<0){if(gt>kr)return;gt>ur&&(ur=gt)}else if(Qr>0){if(gt<ur)return;gt<kr&&(kr=gt)}return ur>0&&(kt.a={x:Ut+ur*wr,y:tr+ur*Qr}),kr<1&&(kt.b={x:Ut+kr*wr,y:tr+kr*Qr}),kt}}}}}),xt=vt.length;xt--;)(!xn(ye=vt[xt],me)||!Lt(ye)||s(ye.a.x-ye.b.x)<Et&&s(ye.a.y-ye.b.y)<Et)&&(ye.a=ye.b=null,vt.splice(xt,1))}(C),function(me){for(var ye,Me,Ne,We,rt,vt,Lt,xt,kt,gt,Rt=me[0][0],zt=me[1][0],Ut=me[0][1],tr=me[1][1],ur=sr,kr=ur.length;kr--;)if((rt=ur[kr])&&rt.prepare())for(xt=(Lt=rt.edges).length,vt=0;vt<xt;)Ne=(gt=Lt[vt].end()).x,We=gt.y,ye=(kt=Lt[++vt%xt].start()).x,Me=kt.y,(s(Ne-ye)>Et||s(We-Me)>Et)&&(Lt.splice(vt,0,new Ma(In(rt.site,gt,s(Ne-Rt)<Et&&tr-We>Et?{x:Rt,y:s(ye-Rt)<Et?Me:tr}:s(We-tr)<Et&&zt-Ne>Et?{x:s(Me-tr)<Et?ye:zt,y:tr}:s(Ne-zt)<Et&&We-Ut>Et?{x:zt,y:s(ye-zt)<Et?Me:Ut}:s(We-Ut)<Et&&Ne-Rt>Et?{x:s(Me-Ut)<Et?ye:Rt,y:Ut}:null),rt.site,null)),++xt)}(C));var ue={cells:sr,edges:ca};return Fr=lr=ca=sr=null,ue}function Di(le,C){return C.y-le.y||C.x-le.x}Wr.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(Gr),C.length},Ma.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}},ka.prototype={insert:function(le,C){var z,B,q;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=Oa(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?(q=B.R)&&q.C?(z.C=q.C=!1,B.C=!0,le=B):(le===z.R&&($n(this,z),z=(le=z).U),z.C=!1,B.C=!0,Jn(this,B)):(q=B.L)&&q.C?(z.C=q.C=!1,B.C=!0,le=B):(le===z.L&&(Jn(this,z),z=(le=z).U),z.C=!1,B.C=!0,$n(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,q=le.U,ie=le.L,ue=le.R;if(z=ie?ue?Oa(ue):ie:ue,q?q.L===le?q.L=z:q.R=z:this._=z,ie&&ue?(B=z.C,z.C=le.C,z.L=ie,ie.U=z,z!==ue?(q=z.U,z.U=le.U,le=z.R,q.L=le,z.R=ue,ue.U=z):(z.U=q,q=z,le=z.R)):(B=le.C,le=z),le&&(le.U=q),!B)if(le&&le.C)le.C=!1;else{do{if(le===this._)break;if(le===q.L){if((C=q.R).C&&(C.C=!1,q.C=!0,$n(this,q),C=q.R),C.L&&C.L.C||C.R&&C.R.C){C.R&&C.R.C||(C.L.C=!1,C.C=!0,Jn(this,C),C=q.R),C.C=q.C,q.C=C.R.C=!1,$n(this,q),le=this._;break}}else if((C=q.L).C&&(C.C=!1,q.C=!0,Jn(this,q),C=q.L),C.L&&C.L.C||C.R&&C.R.C){C.L&&C.L.C||(C.R.C=!1,C.C=!0,$n(this,C),C=q.L),C.C=q.C,q.C=C.L.C=!1,Jn(this,q),le=this._;break}C.C=!0,le=q,q=q.U}while(!le.C);le&&(le.C=!1)}}},m.geom.voronoi=function(le){var C=Tr,z=en,B=C,q=z,ie=uo;if(le)return ue(le);function ue(ye){var Me=new Array(ye.length),Ne=ie[0][0],We=ie[0][1],rt=ie[1][0],vt=ie[1][1];return mi(me(ye),ie).cells.forEach(function(Lt,xt){var kt=Lt.edges,gt=Lt.site;(Me[xt]=kt.length?kt.map(function(Rt){var zt=Rt.start();return[zt.x,zt.y]}):gt.x>=Ne&>.x<=rt&>.y>=We&>.y<=vt?[[Ne,vt],[rt,vt],[rt,We],[Ne,We]]:[]).point=ye[xt]}),Me}function me(ye){return ye.map(function(Me,Ne){return{x:Math.round(B(Me,Ne)/Et)*Et,y:Math.round(q(Me,Ne)/Et)*Et,i:Ne}})}return ue.links=function(ye){return mi(me(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 mi(me(ye)).cells.forEach(function(Ne,We){for(var rt,vt,Lt,xt,kt=Ne.site,gt=Ne.edges.sort(Gr),Rt=-1,zt=gt.length,Ut=gt[zt-1].edge,tr=Ut.l===kt?Ut.r:Ut.l;++Rt<zt;)rt=tr,tr=(Ut=gt[Rt].edge).l===kt?Ut.r:Ut.l,We<rt.i&&We<tr.i&&(Lt=rt,xt=tr,((vt=kt).x-xt.x)*(Lt.y-vt.y)-(vt.x-Lt.x)*(xt.y-vt.y)<0)&&Me.push([ye[We],ye[rt.i],ye[tr.i]])}),Me},ue.x=function(ye){return arguments.length?(B=vr(C=ye),ue):C},ue.y=function(ye){return arguments.length?(q=vr(z=ye),ue):z},ue.clipExtent=function(ye){return arguments.length?(ie=ye??uo,ue):ie===uo?null:ie},ue.size=function(ye){return arguments.length?ue.clipExtent(ye&&[[0,0],ye]):ie===uo?null:ie&&ie[1]},ue};var uo=[[-1e6,-1e6],[1e6,1e6]];function Ya(le){return le.x}function Wa(le){return le.y}function Ki(le,C,z,B,q,ie){if(!le(C,z,B,q,ie)){var ue=.5*(z+q),me=.5*(B+ie),ye=C.nodes;ye[0]&&Ki(le,ye[0],z,B,ue,me),ye[1]&&Ki(le,ye[1],ue,B,q,me),ye[2]&&Ki(le,ye[2],z,me,ue,ie),ye[3]&&Ki(le,ye[3],ue,me,q,ie)}}function Ba(le,C,z,B,q,ie,ue){var me,ye=1/0;return function Me(Ne,We,rt,vt,Lt){if(!(We>ie||rt>ue||vt<B||Lt<q)){if(xt=Ne.point){var xt,kt=C-Ne.x,gt=z-Ne.y,Rt=kt*kt+gt*gt;
4if(Rt<ye){var zt=Math.sqrt(ye=Rt);B=C-zt,q=z-zt,ie=C+zt,ue=z+zt,me=xt}}for(var Ut=Ne.nodes,tr=.5*(We+vt),ur=.5*(rt+Lt),kr=(z>=ur)<<1|C>=tr,wr=kr+4;kr<wr;++kr)if(Ne=Ut[3&kr])switch(3&kr){case 0:Me(Ne,We,rt,tr,ur);break;case 1:Me(Ne,tr,rt,vt,ur);break;case 2:Me(Ne,We,ur,tr,Lt);break;case 3:Me(Ne,tr,ur,vt,Lt)}}}(le,B,q,ie,ue),me}function fo(le,C){le=m.rgb(le),C=m.rgb(C);var z=le.r,B=le.g,q=le.b,ie=C.r-z,ue=C.g-B,me=C.b-q;return function(ye){return"#"+pr(Math.round(z+ie*ye))+pr(Math.round(B+ue*ye))+pr(Math.round(q+me*ye))}}function go(le,C){var z,B={},q={};for(z in le)z in C?B[z]=Ni(le[z],C[z]):q[z]=le[z];for(z in C)z in le||(q[z]=C[z]);return function(ie){for(z in B)q[z]=B[z](ie);return q}}function Ti(le,C){return le=+le,C=+C,function(z){return le*(1-z)+C*z}}function Qi(le,C){var z,B,q,ie=vo.lastIndex=Ao.lastIndex=0,ue=-1,me=[],ye=[];for(le+="",C+="";(z=vo.exec(le))&&(B=Ao.exec(C));)(q=B.index)>ie&&(q=C.slice(ie,q),me[ue]?me[ue]+=q:me[++ue]=q),(z=z[0])===(B=B[0])?me[ue]?me[ue]+=B:me[++ue]=B:(me[++ue]=null,ye.push({i:ue,x:Ti(z,B)})),ie=Ao.lastIndex;return ie<C.length&&(q=C.slice(ie),me[ue]?me[ue]+=q:me[++ue]=q),me.length<2?ye[0]?(C=ye[0].x,function(Me){return C(Me)+""}):function(){return C}:(C=ye.length,function(Me){for(var Ne,We=0;We<C;++We)me[(Ne=ye[We]).i]=Ne.x(Me);return me.join("")})}m.geom.delaunay=function(le){return m.geom.voronoi().triangles(le)},m.geom.quadtree=function(le,C,z,B,q){var ie,ue=Tr,me=en;if(ie=arguments.length)return ue=Ya,me=Wa,ie===3&&(q=z,B=C,z=C=0),ye(le);function ye(Me){var Ne,We,rt,vt,Lt,xt,kt,gt,Rt,zt=vr(ue),Ut=vr(me);if(C!=null)xt=C,kt=z,gt=B,Rt=q;else if(gt=Rt=-(xt=kt=1/0),We=[],rt=[],Lt=Me.length,ie)for(vt=0;vt<Lt;++vt)(Ne=Me[vt]).x<xt&&(xt=Ne.x),Ne.y<kt&&(kt=Ne.y),Ne.x>gt&&(gt=Ne.x),Ne.y>Rt&&(Rt=Ne.y),We.push(Ne.x),rt.push(Ne.y);else for(vt=0;vt<Lt;++vt){var tr=+zt(Ne=Me[vt],vt),ur=+Ut(Ne,vt);tr<xt&&(xt=tr),ur<kt&&(kt=ur),tr>gt&&(gt=tr),ur>Rt&&(Rt=ur),We.push(tr),rt.push(ur)}var kr=gt-xt,wr=Rt-kt;function Qr(ln,Vn,Zn,fa,Hr,Tn,Xn,Gn){if(!isNaN(Zn)&&!isNaN(fa))if(ln.leaf){var aa=ln.x,pa=ln.y;if(aa!=null)if(s(aa-Zn)+s(pa-fa)<.01)Kr(ln,Vn,Zn,fa,Hr,Tn,Xn,Gn);else{var Ea=ln.point;ln.x=ln.y=ln.point=null,Kr(ln,Ea,aa,pa,Hr,Tn,Xn,Gn),Kr(ln,Vn,Zn,fa,Hr,Tn,Xn,Gn)}else ln.x=Zn,ln.y=fa,ln.point=Vn}else Kr(ln,Vn,Zn,fa,Hr,Tn,Xn,Gn)}function Kr(ln,Vn,Zn,fa,Hr,Tn,Xn,Gn){var aa=.5*(Hr+Xn),pa=.5*(Tn+Gn),Ea=Zn>=aa,ea=fa>=pa,ba=ea<<1|Ea;ln.leaf=!1,Ea?Hr=aa:Xn=aa,ea?Tn=pa:Gn=pa,Qr(ln=ln.nodes[ba]||(ln.nodes[ba]={leaf:!0,nodes:[],point:null,x:null,y:null}),Vn,Zn,fa,Hr,Tn,Xn,Gn)}kr>wr?Rt=kt+kr:gt=xt+wr;var pn={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(ln){Qr(pn,ln,+zt(ln,++vt),+Ut(ln,vt),xt,kt,gt,Rt)},visit:function(ln){Ki(ln,pn,xt,kt,gt,Rt)},find:function(ln){return Ba(pn,ln[0],ln[1],xt,kt,gt,Rt)}};if(vt=-1,C==null){for(;++vt<Lt;)Qr(pn,Me[vt],We[vt],rt[vt],xt,kt,gt,Rt);--vt}else Me.forEach(pn.add);return We=rt=Me=Ne=null,pn}return ye.x=function(Me){return arguments.length?(ue=Me,ye):ue},ye.y=function(Me){return arguments.length?(me=Me,ye):me},ye.extent=function(Me){return arguments.length?(Me==null?C=z=B=q=null:(C=+Me[0][0],z=+Me[0][1],B=+Me[1][0],q=+Me[1][1]),ye):C==null?null:[[C,z],[B,q]]},ye.size=function(Me){return arguments.length?(Me==null?C=z=B=q=null:(C=z=0,B=+Me[0],q=+Me[1]),ye):C==null?null:[B-C,q-z]},ye},m.interpolateRgb=fo,m.interpolateObject=go,m.interpolateNumber=Ti,m.interpolateString=Qi;var vo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ao=new RegExp(vo.source,"g");function Ni(le,C){for(var z,B=m.interpolators.length;--B>=0&&!(z=m.interpolators[B](le,C)););return z}function gi(le,C){var z,B=[],q=[],ie=le.length,ue=C.length,me=Math.min(le.length,C.length);for(z=0;z<me;++z)B.push(Ni(le[z],C[z]));for(;z<ie;++z)q[z]=le[z];for(;z<ue;++z)q[z]=C[z];return function(ye){for(z=0;z<me;++z)q[z]=B[z](ye);return q}}m.interpolate=Ni,m.interpolators=[function(le,C){var z=typeof C;return(z==="string"?hr.has(C.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(C)?fo:Qi:C instanceof ot?fo:Array.isArray(C)?gi:z==="object"&&isNaN(C)?go:Ti)(le,C)}],m.interpolateArray=gi;var Xi=function(){return E},vs=m.map({linear:Xi,poly:function(le){return function(C){return Math.pow(C,le)}},quad:function(){return Ts},cubic:function(){return ks},sin:function(){return Ms},exp:function(){return Lo},circle:function(){return Co},elastic:function(le,C){var z;return arguments.length<2&&(C=.45),arguments.length?z=C/Xt*Math.asin(1/le):(le=1,z=C/4),function(B){return 1+le*Math.pow(2,-10*B)*Math.sin((B-z)*Xt/C)}},back:function(le){return le||(le=1.70158),function(C){return C*C*((le+1)*C-le)}},bounce:function(){return Uo}}),ws=m.map({in:E,out:fs,"in-out":Qo,"out-in":function(le){return Qo(fs(le))}});function Za(le){return function(C){return C<=0?0:C>=1?1:le(C)}}function fs(le){return function(C){return 1-le(1-C)}}function Qo(le){return function(C){return .5*(C<.5?le(2*C):2-le(2-2*C))}}function Ts(le){return le*le}function ks(le){return le*le*le}function ys(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 Ms(le){return 1-Math.cos(le*qe)}function Lo(le){return Math.pow(2,10*(le-1))}function Co(le){return 1-Math.sqrt(1-le*le)}function Uo(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 Vo(le,C){return C-=le,function(z){return Math.round(le+C*z)}}function Ho(le){var C,z,B,q=[le.a,le.b],ie=[le.c,le.d],ue=yo(q),me=$o(q,ie),ye=yo(((C=ie)[0]+=(B=-me)*(z=q)[0],C[1]+=B*z[1],C))||0;q[0]*ie[1]<ie[0]*q[1]&&(q[0]*=-1,q[1]*=-1,ue*=-1,me*=-1),this.rotate=(ue?Math.atan2(q[1],q[0]):Math.atan2(-ie[0],ie[1]))*ft,this.translate=[le.e,le.f],this.scale=[ue,ye],this.skew=ye?Math.atan2(me,ye)*ft:0}function $o(le,C){return le[0]*C[0]+le[1]*C[1]}function yo(le){var C=Math.sqrt($o(le,le));return C&&(le[0]/=C,le[1]/=C),C}m.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=vs.get(z)||Xi,Za((B=ws.get(B)||E)(z.apply(null,g.call(arguments,1
vendor: 1,742 bytes, line 4
4))))},m.interpolateHcl=function(le,C){le=m.hcl(le),C=m.hcl(C);var z=le.h,B=le.c,q=le.l,ie=C.h-z,ue=C.c-B,me=C.l-q;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 $e(z+ie*ye,B+ue*ye,q+me*ye)+""}},m.interpolateHsl=function(le,C){le=m.hsl(le),C=m.hsl(C);var z=le.h,B=le.s,q=le.l,ie=C.h-z,ue=C.s-B,me=C.l-q;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 bt(z+ie*ye,B+ue*ye,q+me*ye)+""}},m.interpolateLab=function(le,C){le=m.lab(le),C=m.lab(C);var z=le.l,B=le.a,q=le.b,ie=C.l-z,ue=C.a-B,me=C.b-q;return function(ye){return Pt(z+ie*ye,B+ue*ye,q+me*ye)+""}},m.interpolateRound=Vo,m.transform=function(le){var C=y.createElementNS(m.ns.prefix.svg,"g");return(m.transform=function(z){if(z!=null){C.setAttribute("transform",z);var B=C.transform.baseVal.consolidate()}return new Ho(B?B.matrix:hs)})(le)},Ho.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var hs={a:1,b:0,c:0,d:1,e:0,f:0};function ho(le){return le.length?le.pop()+",":""}function qo(le,C){var z=[],B=[];return le=m.transform(le),C=m.transform(C),function(q,ie,ue,me){if(q[0]!==ie[0]||q[1]!==ie[1]){var ye=ue.push("translate(",null,",",null,")");me.push({i:ye-4,x:Ti(q[0],ie[0])},{i:ye-2,x:Ti(q[1],ie[1])})}else(ie[0]||ie[1])&&ue.push("translate("+ie+")")}(le.translate,C.translate,z,B),function(q,ie,ue,me){q!==ie?(q-ie>180?ie+=360:ie-q>180&&(q+=360),me.push({i:ue.push(ho(ue)+"rotate(",null,")")-2,x:Ti(q,ie)})):ie&&ue.push(ho(ue)+"rotate("+ie+")")}(le.rotate,C.rotate,z,B),function(q,ie,ue,me){q!==ie?me.push({i:ue.push(ho(ue)+"skewX(",
vendor: 4,930 bytes, line 4
4null,")")-2,x:Ti(q,ie)}):ie&&ue.push(ho(ue)+"skewX("+ie+")")}(le.skew,C.skew,z,B),function(q,ie,ue,me){if(q[0]!==ie[0]||q[1]!==ie[1]){var ye=ue.push(ho(ue)+"scale(",null,",",null,")");me.push({i:ye-4,x:Ti(q[0],ie[0])},{i:ye-2,x:Ti(q[1],ie[1])})}else ie[0]===1&&ie[1]===1||ue.push(ho(ue)+"scale("+ie+")")}(le.scale,C.scale,z,B),le=C=null,function(q){for(var ie,ue=-1,me=B.length;++ue<me;)z[(ie=B[ue]).i]=ie.x(q);return z.join("")}}function ps(le,C){return C=(C-=le=+le)||1/C,function(z){return(z-le)/C}}function Po(le,C){return C=(C-=le=+le)||1/C,function(z){return Math.max(0,Math.min(1,(z-le)/C))}}function qa(le){for(var C=le.source,z=le.target,B=function(ue,me){if(ue===me)return ue;for(var ye=Be(ue),Me=Be(me),Ne=ye.pop(),We=Me.pop(),rt=null;Ne===We;)rt=Ne,Ne=ye.pop(),We=Me.pop();return rt}(C,z),q=[C];C!==B;)C=C.parent,q.push(C);for(var ie=q.length;z!==B;)q.splice(ie,0,z),z=z.parent;return q}function Be(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 Ke(le){le.fixed&=-7}function st(le){le.fixed|=4,le.px=le.x,le.py=le.y}function dt(le){le.fixed&=-5}m.interpolateTransform=qo,m.layout={},m.layout.bundle=function(){return function(le){for(var C=[],z=-1,B=le.length;++z<B;)C.push(qa(le[z]));return C}},m.layout.chord=function(){var le,C,z,B,q,ie,ue,me={},ye=0;function Me(){var We,rt,vt,Lt,xt,kt={},gt=[],Rt=m.range(B),zt=[];for(le=[],C=[],We=0,Lt=-1;++Lt<B;){for(rt=0,xt=-1;++xt<B;)rt+=z[Lt][xt];gt.push(rt),zt.push(m.range(B)),We+=rt}for(q&&Rt.sort(function(pn,ln){return q(gt[pn],gt[ln])}),ie&&zt.forEach(function(pn,ln){pn.sort(function(Vn,Zn){return ie(z[ln][Vn],z[ln][Zn])})}),We=(Xt-ye*B)/We,rt=0,Lt=-1;++Lt<B;){for(vt=rt,xt=-1;++xt<B;){var Ut=Rt[Lt],tr=zt[Ut][xt],ur=z[Ut][tr],kr=rt,wr=rt+=ur*We;kt[Ut+"-"+tr]={index:Ut,subindex:tr,startAngle:kr,endAngle:wr,value:ur}}C[Ut]={index:Ut,startAngle:vt,endAngle:rt,value:gt[Ut]},rt+=ye}for(Lt=-1;++Lt<B;)for(xt=Lt-1;++xt<B;){var Qr=kt[Lt+"-"+xt],Kr=kt[xt+"-"+Lt];(Qr.value||Kr.value)&&le.push(Qr.value<Kr.value?{source:Kr,target:Qr}:{source:Qr,target:Kr})}ue&&Ne()}function Ne(){le.sort(function(We,rt){return ue((We.source.value+We.target.value)/2,(rt.source.value+rt.target.value)/2)})}return me.matrix=function(We){return arguments.length?(B=(z=We)&&z.length,le=C=null,me):z},me.padding=function(We){return arguments.length?(ye=We,le=C=null,me):ye},me.sortGroups=function(We){return arguments.length?(q=We,le=C=null,me):q},me.sortSubgroups=function(We){return arguments.length?(ie=We,le=null,me):ie},me.sortChords=function(We){return arguments.length?(ue=We,le&&Ne(),me):ue},me.chords=function(){return le||Me(),le},me.groups=function(){return C||Me(),C},me},m.layout.force=function(){var le,C,z,B,q,ie,ue={},me=m.dispatch("start","tick","end"),ye=[1,1],Me=.9,Ne=ht,We=St,rt=-30,vt=Kt,Lt=.1,xt=.64,kt=[],gt=[];function Rt(Ut){return function(tr,ur,kr,wr){if(tr.point!==Ut){var Qr=tr.cx-Ut.x,Kr=tr.cy-Ut.y,pn=wr-ur,ln=Qr*Qr+Kr*Kr;if(pn*pn/xt<ln){if(ln<vt){var Vn=tr.charge/ln;Ut.px-=Qr*Vn,Ut.py-=Kr*Vn}return!0}tr.point&&ln&&ln<vt&&(Vn=tr.pointCharge/ln,Ut.px-=Qr*Vn,Ut.py-=Kr*Vn)}return!tr.charge}}function zt(Ut){Ut.px=m.event.x,Ut.py=m.event.y,ue.resume()}return ue.tick=function(){if((z*=.99)<.005)return le=null,me.end({type:"end",alpha:z=0}),!0;var Ut,tr,ur,kr,wr,Qr,Kr,pn,ln,Vn=kt.length,Zn=gt.length;for(tr=0;tr<Zn;++tr)kr=(ur=gt[tr]).source,(Qr=(pn=(wr=ur.target).x-kr.x)*pn+(ln=wr.y-kr.y)*ln)&&(pn*=Qr=z*q[tr]*((Qr=Math.sqrt(Qr))-B[tr])/Qr,ln*=Qr,wr.x-=pn*(Kr=kr.weight+wr.weight?kr.weight/(kr.weight+wr.weight):.5),wr.y-=ln*Kr,kr.x+=pn*(Kr=1-Kr),kr.y+=ln*Kr);if((Kr=z*Lt)&&(pn=ye[0]/2,ln=ye[1]/2,tr=-1,Kr))for(;++tr<Vn;)(ur=kt[tr]).x+=(pn-ur.x)*Kr,ur.y+=(ln-ur.y)*Kr;if(rt)for(function fa(Hr,Tn,Xn){var Gn=0,aa=0;if(Hr.charge=0,!Hr.leaf)for(var pa,Ea=Hr.nodes,ea=Ea.length,ba=-1;++ba<ea;)(pa=Ea[ba])!=null&&(fa(pa,Tn,Xn),Hr.charge+=pa.charge,Gn+=pa.charge*pa.cx,aa+=pa.charge*pa.cy);if(Hr.point){Hr.leaf||(Hr.point.x+=Math.random()-.5,Hr.point.y+=Math.random()-.5);var va=Tn*Xn[Hr.point.index];Hr.charge+=Hr.pointCharge=va,Gn+=va*Hr.point.x,aa+=va*Hr.point.y}Hr.cx=Gn/Hr.charge,Hr.cy=aa/Hr.charge}(Ut=m.geom.quadtree(kt),z,ie),tr=-1;++tr<Vn;)(ur=kt[tr]).fixed||Ut.visit(Rt(ur));for(tr=-1;++tr<Vn;)(ur=kt[tr]).fixed?(ur.x=ur.px,ur.y=ur.py):(ur.x-=(ur.px-(ur.px=ur.x))*Me,ur.y-=(ur.py-(ur.py=ur.y))*Me);me.tick({type:"tick",alpha:z})},ue.nodes=function(Ut){return arguments.length?(kt=Ut,ue):kt},ue.links=function(Ut){return arguments.length?(gt=Ut,ue):gt},ue.size=function(Ut){return arguments.length?(ye=Ut,ue):ye},ue.linkDistance=function(Ut){return arguments.length?(Ne=typeof Ut=="function"?Ut:+Ut,ue):Ne},ue.distance=ue.linkDistance,ue.linkStrength=function(Ut){return arguments.length?(We=typeof Ut=="function"?Ut:+Ut,ue):We},ue.friction=function(Ut){return arguments.length?(Me=+Ut,ue):Me},ue.charge=function(Ut){return arguments.length?(rt=typeof Ut=="function"?Ut:+Ut,ue):rt}
vendor: 5,896 bytes, line 4
4,ue.chargeDistance=function(Ut){return arguments.length?(vt=Ut*Ut,ue):Math.sqrt(vt)},ue.gravity=function(Ut){return arguments.length?(Lt=+Ut,ue):Lt},ue.theta=function(Ut){return arguments.length?(xt=Ut*Ut,ue):Math.sqrt(xt)},ue.alpha=function(Ut){return arguments.length?(Ut=+Ut,z?Ut>0?z=Ut:(le.c=null,le.t=NaN,le=null,me.end({type:"end",alpha:z=0})):Ut>0&&(me.start({type:"start",alpha:z=Ut}),le=Xr(ue.tick)),ue):z},ue.start=function(){var Ut,tr,ur,kr=kt.length,wr=gt.length,Qr=ye[0],Kr=ye[1];for(Ut=0;Ut<kr;++Ut)(ur=kt[Ut]).index=Ut,ur.weight=0;for(Ut=0;Ut<wr;++Ut)typeof(ur=gt[Ut]).source=="number"&&(ur.source=kt[ur.source]),typeof ur.target=="number"&&(ur.target=kt[ur.target]),++ur.source.weight,++ur.target.weight;for(Ut=0;Ut<kr;++Ut)ur=kt[Ut],isNaN(ur.x)&&(ur.x=pn("x",Qr)),isNaN(ur.y)&&(ur.y=pn("y",Kr)),isNaN(ur.px)&&(ur.px=ur.x),isNaN(ur.py)&&(ur.py=ur.y);if(B=[],typeof Ne=="function")for(Ut=0;Ut<wr;++Ut)B[Ut]=+Ne.call(this,gt[Ut],Ut);else for(Ut=0;Ut<wr;++Ut)B[Ut]=Ne;if(q=[],typeof We=="function")for(Ut=0;Ut<wr;++Ut)q[Ut]=+We.call(this,gt[Ut],Ut);else for(Ut=0;Ut<wr;++Ut)q[Ut]=We;if(ie=[],typeof rt=="function")for(Ut=0;Ut<kr;++Ut)ie[Ut]=+rt.call(this,kt[Ut],Ut);else for(Ut=0;Ut<kr;++Ut)ie[Ut]=rt;function pn(ln,Vn){if(!tr){for(tr=new Array(kr),Tn=0;Tn<kr;++Tn)tr[Tn]=[];for(Tn=0;Tn<wr;++Tn){var Zn=gt[Tn];tr[Zn.source.index].push(Zn.target),tr[Zn.target.index].push(Zn.source)}}for(var fa,Hr=tr[Ut],Tn=-1,Xn=Hr.length;++Tn<Xn;)if(!isNaN(fa=Hr[Tn][ln]))return fa;return Math.random()*Vn}return ue.resume()},ue.resume=function(){return ue.alpha(.1)},ue.stop=function(){return ue.alpha(0)},ue.drag=function(){if(C||(C=m.behavior.drag().origin(E).on("dragstart.force",He).on("drag.force",zt).on("dragend.force",Ke)),!arguments.length)return C;this.on("mouseover.force",st).on("mouseout.force",dt).call(C)},m.rebind(ue,me,"on")};var ht=20,St=1,Kt=1/0;function Qt(le,C){return m.rebind(le,C,"sort","children","value"),le.nodes=le,le.links=Lr,le}function Yt(le,C){for(var z=[le];(le=z.pop())!=null;)if(C(le),(q=le.children)&&(B=q.length))for(var B,q;--B>=0;)z.push(q[B])}function rr(le,C){for(var z=[le],B=[];(le=z.pop())!=null;)if(B.push(le),(ie=le.children)&&(q=ie.length))for(var q,ie,ue=-1;++ue<q;)z.push(ie[ue]);for(;(le=B.pop())!=null;)C(le)}function cr(le){return le.children}function gr(le){return le.value}function yr(le,C){return C.value-le.value}function Lr(le){return m.merge(le.map(function(C){return(C.children||[]).map(function(z){return{source:C,target:z}})}))}m.layout.hierarchy=function(){var le=yr,C=cr,z=gr;function B(q){var ie,ue=[q],me=[];for(q.depth=0;(ie=ue.pop())!=null;)if(me.push(ie),(Me=C.call(B,ie,ie.depth))&&(ye=Me.length)){for(var ye,Me,Ne;--ye>=0;)ue.push(Ne=Me[ye]),Ne.parent=ie,Ne.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 rr(q,function(We){var rt,vt;le&&(rt=We.children)&&rt.sort(le),z&&(vt=We.parent)&&(vt.value+=We.value)}),me}return B.sort=function(q){return arguments.length?(le=q,B):le},B.children=function(q){return arguments.length?(C=q,B):C},B.value=function(q){return arguments.length?(z=q,B):z},B.revalue=function(q){return z&&(Yt(q,function(ie){ie.children&&(ie.value=0)}),rr(q,function(ie){var ue;ie.children||(ie.value=+z.call(B,ie,ie.depth)||0),(ue=ie.parent)&&(ue.value+=ie.value)})),q},B},m.layout.partition=function(){var le=m.layout.hierarchy(),C=[1,1];function z(B,q){var ie=le.call(this,B,q);return function ue(me,ye,Me,Ne){var We=me.children;if(me.x=ye,me.y=me.depth*Ne,me.dx=Me,me.dy=Ne,We&&(rt=We.length)){var rt,vt,Lt,xt=-1;for(Me=me.value?Me/me.value:0;++xt<rt;)ue(vt=We[xt],ye,Lt=vt.value*Me,Ne),ye+=Lt}}(ie[0],0,C[0],C[1]/function ue(me){var ye=me.children,Me=0;if(ye&&(Ne=ye.length))for(var Ne,We=-1;++We<Ne;)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},Qt(z,le)},m.layout.pie=function(){var le=Number,C=an,z=0,B=Xt,q=0;function ie(ue){var me,ye=ue.length,Me=ue.map(function(Rt,zt){return+le.call(ie,Rt,zt)}),Ne=+(typeof z=="function"?z.apply(this,arguments):z),We=(typeof B=="function"?B.apply(this,arguments):B)-Ne,rt=Math.min(Math.abs(We)/ye,+(typeof q=="function"?q.apply(this,arguments):q)),vt=rt*(We<0?-1:1),Lt=m.sum(Me),xt=Lt?(We-ye*vt)/Lt:0,kt=m.range(ye),gt=[];return C!=null&&kt.sort(C===an?function(Rt,zt){return Me[zt]-Me[Rt]}:function(Rt,zt){return C(ue[Rt],ue[zt])}),kt.forEach(function(Rt){gt[Rt]={data:ue[Rt],value:me=Me[Rt],startAngle:Ne,endAngle:Ne+=me*xt+vt,padAngle:rt}}),gt}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?(q=ue,ie):q},ie};var an={};function dn(le){return le.x}function Ln(le){return le.y}function On(le,C,z){le.y0=C,le.y=z}m.layout.stack=function(){var le=E,C=ga,z=Aa,B=On,q=dn,ie=Ln;function ue(me,ye){if(!(rt=me.length))return me;var Me=me.map(function(Rt,zt){return le.call(ue,Rt,zt)}),Ne=Me.map(function(Rt){return Rt.map(function(zt,Ut){return[q.call(ue,zt,Ut),ie.call(ue,zt,Ut)]})}),We=C.call(ue,Ne,ye);Me=m.permute(Me,We),Ne=m.permute(Ne,We);var rt,vt,Lt,xt,kt=z.call(ue,Ne,ye),gt=Me[0].length;for(Lt=0;Lt<gt;++Lt)for(B.call(ue,Me[0][Lt],xt=kt[Lt],Ne[0][Lt][1]),vt=1;vt<rt;++vt)B.call(ue,Me[vt][Lt],xt+=Ne[vt-1][Lt][1],Ne[vt][Lt][1]);return me}return ue.values=function(me){return arguments.length?(le=me,ue):le},ue.order=function(me){return arguments.length?(C=typeof me=="function"?me:qn.get(me)||ga,ue):C},ue.offset=function(me){return arguments.length?(z=typeof me=="function"?me:zn.get(me)||Aa,ue):z},ue.x=function(me){return arguments.length?(q=me,ue):q},ue.y=function(me){return arguments.length?(ie=me,ue):ie},ue.out=function(me){return arguments.length?(B=me,ue):B},ue};
vendor: 6,919 bytes, line 4
4var qn=m.map({"inside-out":function(le){var C,z,B=le.length,q=le.map(ja),ie=le.map(Na),ue=m.range(B).sort(function(We,rt){return q[We]-q[rt]}),me=0,ye=0,Me=[],Ne=[];for(C=0;C<B;++C)z=ue[C],me<ye?(me+=ie[z],Me.push(z)):(ye+=ie[z],Ne.push(z));return Ne.reverse().concat(Me)},reverse:function(le){return m.range(le.length).reverse()},default:ga}),zn=m.map({silhouette:function(le){var C,z,B,q=le.length,ie=le[0].length,ue=[],me=0,ye=[];for(z=0;z<ie;++z){for(C=0,B=0;C<q;C++)B+=le[C][z][1];B>me&&(me=B),ue.push(B)}for(z=0;z<ie;++z)ye[z]=(me-ue[z])/2;return ye},wiggle:function(le){var C,z,B,q,ie,ue,me,ye,Me,Ne=le.length,We=le[0],rt=We.length,vt=[];for(vt[0]=ye=Me=0,z=1;z<rt;++z){for(C=0,q=0;C<Ne;++C)q+=le[C][z][1];for(C=0,ie=0,me=We[z][0]-We[z-1][0];C<Ne;++C){for(B=0,ue=(le[C][z][1]-le[C][z-1][1])/(2*me);B<C;++B)ue+=(le[B][z][1]-le[B][z-1][1])/me;ie+=ue*le[C][z][1]}vt[z]=ye-=q?ie/q*me:0,ye<Me&&(Me=ye)}for(z=0;z<rt;++z)vt[z]-=Me;return vt},expand:function(le){var C,z,B,q=le.length,ie=le[0].length,ue=1/q,me=[];for(z=0;z<ie;++z){for(C=0,B=0;C<q;C++)B+=le[C][z][1];if(B)for(C=0;C<q;C++)le[C][z][1]/=B;else for(C=0;C<q;C++)le[C][z][1]=ue}for(z=0;z<ie;++z)me[z]=0;return me},zero:Aa});function ga(le){return m.range(le.length)}function Aa(le){for(var C=-1,z=le[0].length,B=[];++C<z;)B[C]=0;return B}function ja(le){for(var C,z=1,B=0,q=le[0][1],ie=le.length;z<ie;++z)(C=le[z][1])>q&&(B=z,q=C);return B}function Na(le){return le.reduce(Ua,0)}function Ua(le,C){return le+C[1]}function ki(le,C){return _i(le,Math.ceil(Math.log(C.length)/Math.LN2+1))}function _i(le,C){for(var z=-1,B=+le[0],q=(le[1]-B)/C,ie=[];++z<=C;)ie[z]=q*z+B;return ie}function si(le){return[m.min(le),m.max(le)]}function li(le,C){return le.value-C.value}function wi(le,C){var z=le._pack_next;le._pack_next=C,C._pack_prev=le,C._pack_next=z,z._pack_prev=C}function ji(le,C){le._pack_next=C,C._pack_prev=le}function $i(le,C){var z=C.x-le.x,B=C.y-le.y,q=le.r+C.r;return .999*q*q>z*z+B*B}function eo(le){if((C=le.children)&&(ye=C.length)){var C,z,B,q,ie,ue,me,ye,Me=1/0,Ne=-1/0,We=1/0,rt=-1/0;if(C.forEach(to),(z=C[0]).x=-z.r,z.y=0,zt(z),ye>1&&((B=C[1]).x=B.r,B.y=0,zt(B),ye>2))for(za(z,B,q=C[2]),zt(q),wi(z,q),z._pack_prev=q,wi(q,B),B=z._pack_next,ie=3;ie<ye;ie++){za(z,B,q=C[ie]);var vt=0,Lt=1,xt=1;for(ue=B._pack_next;ue!==B;ue=ue._pack_next,Lt++)if($i(ue,q)){vt=1;break}if(vt==1)for(me=z._pack_prev;me!==ue._pack_prev&&!$i(me,q);me=me._pack_prev,xt++);vt?(Lt<xt||Lt==xt&&B.r<z.r?ji(z,B=ue):ji(z=me,B),ie--):(wi(z,q),B=q,zt(q))}var kt=(Me+Ne)/2,gt=(We+rt)/2,Rt=0;for(ie=0;ie<ye;ie++)(q=C[ie]).x-=kt,q.y-=gt,Rt=Math.max(Rt,q.r+Math.sqrt(q.x*q.x+q.y*q.y));le.r=Rt,C.forEach(ro)}function zt(Ut){Me=Math.min(Ut.x-Ut.r,Me),Ne=Math.max(Ut.x+Ut.r,Ne),We=Math.min(Ut.y-Ut.r,We),rt=Math.max(Ut.y+Ut.r,rt)}}function to(le){le._pack_next=le._pack_prev=le}function ro(le){delete le._pack_next,delete le._pack_prev}function za(le,C,z){var B=le.r+z.r,q=C.x-le.x,ie=C.y-le.y;if(B&&(q||ie)){var ue=C.r+z.r,me=q*q+ie*ie,ye=.5+((B*=B)-(ue*=ue))/(2*me),Me=Math.sqrt(Math.max(0,2*ue*(B+me)-(B-=me)*B-ue*ue))/(2*me);z.x=le.x+ye*q+Me*ie,z.y=le.y+ye*ie-Me*q}else z.x=le.x+B,z.y=le.y}function ut(le,C){return le.parent==C.parent?1:2}function Dt(le){var C=le.children;return C.length?C[0]:le.t}function ir(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 or(le,C,z){return le.a.parent===C.parent?le.a:z}function Sr(le){return{x:le.x,y:le.y,dx:le.dx,dy:le.dy}}function zr(le,C){var z=le.x+C[3],B=le.y+C[0],q=le.dx-C[1]-C[3],ie=le.dy-C[0]-C[2];return q<0&&(z+=q/2,q=0),ie<0&&(B+=ie/2,ie=0),{x:z,y:B,dx:q,dy:ie}}function Zr(le){var C=le[0],z=le[le.length-1];return C<z?[C,z]:[z,C]}function cn(le){return le.rangeExtent?le.rangeExtent():Zr(le.range())}function sn(le,C,z,B){var q=z(le[0],le[1]),ie=B(C[0],C[1]);return function(ue){return ie(q(ue))}}function gn(le,C){var z,B=0,q=le.length-1,ie=le[B],ue=le[q];return ue<ie&&(z=B,B=q,q=z,z=ie,ie=ue,ue=z),le[B]=C.floor(ie),le[q]=C.ceil(ue),le}function _n(le){return le?{floor:function(C){return Math.floor(C/le)*le},ceil:function(C){return Math.ceil(C/le)*le}}:un}m.layout.histogram=function(){var le=!0,C=Number,z=si,B=ki;function q(ie,ue){for(var me,ye,Me=[],Ne=ie.map(C,this),We=z.call(this,Ne,ue),rt=B.call(this,We,Ne,ue),vt=(ue=-1,Ne.length),Lt=rt.length-1,xt=le?1:1/vt;++ue<Lt;)(me=Me[ue]=[]).dx=rt[ue+1]-(me.x=rt[ue]),me.y=0;if(Lt>0)for(ue=-1;++ue<vt;)(ye=Ne[ue])>=We[0]&&ye<=We[1]&&((me=Me[m.bisect(rt,ye,1,Lt)-1]).y+=xt,me.push(ie[ue]));return Me}return q.value=function(ie){return arguments.length?(C=ie,q):C},q.range=function(ie){return arguments.length?(z=vr(ie),q):z},q.bins=function(ie){return arguments.length?(B=typeof ie=="number"?function(ue){return _i(ue,ie)}:vr(ie),q):B},q.frequency=function(ie){return arguments.length?(le=!!ie,q):le},q},m.layout.pack=function(){var le,C=m.layout.hierarchy().sort(li),z=0,B=[1,1];function q(ie,ue){var me=C.call(this,ie,ue),ye=me[0],Me=B[0],Ne=B[1],We=le==null?Math.sqrt:typeof le=="function"?le:function(){return le};if(ye.x=ye.y=0,rr(ye,function(vt){vt.r=+We(vt.value)}),rr(ye,eo),z){var rt=z*(le?1:Math.max(2*ye.r/Me,2*ye.r/Ne))/2;rr(ye,function(vt){vt.r+=rt}),rr(ye,eo),rr(ye,function(vt){vt.r-=rt})}return function vt(Lt,xt,kt,gt){var Rt=Lt.children;if(Lt.x=xt+=gt*Lt.x,Lt.y=kt+=gt*Lt.y,Lt.r*=gt,Rt)for(var zt=-1,Ut=Rt.length;++zt<Ut;)vt(Rt[zt],xt,kt,gt)}(ye,Me/2,Ne/2,le?1:1/Math.max(2*ye.r/Me,2*ye.r/Ne)),me}return q.size=function(ie){return arguments.length?(B=ie,q):B},q.radius=function(ie){return arguments.length?(le=ie==null||typeof ie=="function"?ie:+ie,q):le},q.padding=function(ie){return arguments.length?(z=+ie,q):z},Qt(q,C)},m.layout.tree=function(){var le=m.layout.hierarchy().sort(null).value(null),C=ut,z=[1,1],B=null;function q(ye,Me){var Ne=le.call(this,ye,Me),We=Ne[0],rt=function(zt){for(var Ut,tr={A:null,children:[zt]},ur=[tr];(Ut=ur.pop())!=null;)for(var kr,wr=Ut.children,Qr=0,Kr=wr.length;Qr<Kr;++Qr)ur.push((wr[Qr]=kr={_:wr[Qr],parent:Ut,children:(kr=wr[Qr].children)&&kr.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:Qr}).a=kr);return tr.children[0]}(We);if(rr(rt,ie),rt.parent.m=-rt.z,Yt(rt,ue),B)Yt(We,me);else{var vt=We,Lt=We,xt=We;Yt(We,function(zt){zt.x<vt.x&&(vt=zt),zt.x>Lt.x&&(Lt=zt),zt.depth>xt.depth&&(xt=zt)});var kt=C(vt,Lt)/2-vt.x,gt=z[0]/(Lt.x+C(Lt,vt)/2+kt),Rt=z[1]/(xt.depth||1);Yt(We,function(zt){zt.x=(zt.x+kt)*gt,zt.y=zt.depth*Rt})}return Ne}function ie(ye){var Me=ye.children,Ne=ye.parent.children,We=ye.i?Ne[ye.i-1]:null;if(Me.length){(function(vt){for(var Lt,xt=0,kt=0,gt=vt.children,Rt=gt.length;--Rt>=0;)(Lt=gt[Rt]).z+=xt,Lt.m+=xt,xt+=Lt.s+(kt+=Lt.c)})(ye);var rt=(Me[0].z+Me[Me.length-1].z)/2;We?(ye.z=We.z+C(ye._,We._),ye.m=ye.z-rt):ye.z=rt}else We&&(ye.z=We.z+C(ye._,We._));ye.parent.A=function(vt,Lt,xt){if(Lt){for(var kt,gt=vt,Rt=vt,zt=Lt,Ut=gt.parent.children[0],tr=gt.m,ur=Rt.m,kr=zt.m,wr=Ut.m;zt=ir(zt),gt=Dt(gt),zt&>
vendor: 8,874 bytes, line 4
4)Ut=Dt(Ut),(Rt=ir(Rt)).a=vt,(kt=zt.z+kr-gt.z-tr+C(zt._,gt._))>0&&(Ht(or(zt,vt,xt),vt,kt),tr+=kt,ur+=kt),kr+=zt.m,tr+=gt.m,wr+=Ut.m,ur+=Rt.m;zt&&!ir(Rt)&&(Rt.t=zt,Rt.m+=kr-ur),gt&&!Dt(Ut)&&(Ut.t=gt,Ut.m+=tr-wr,xt=vt)}return xt}(ye,We,ye.parent.A||Ne[0])}function ue(ye){ye._.x=ye.z+ye.parent.m,ye.m+=ye.parent.m}function me(ye){ye.x*=z[0],ye.y=ye.depth*z[1]}return q.separation=function(ye){return arguments.length?(C=ye,q):C},q.size=function(ye){return arguments.length?(B=(z=ye)==null?me:null,q):B?null:z},q.nodeSize=function(ye){return arguments.length?(B=(z=ye)==null?null:me,q):B?z:null},Qt(q,le)},m.layout.cluster=function(){var le=m.layout.hierarchy().sort(null).value(null),C=ut,z=[1,1],B=!1;function q(ie,ue){var me,ye=le.call(this,ie,ue),Me=ye[0],Ne=0;rr(Me,function(xt){var kt=xt.children;kt&&kt.length?(xt.x=function(gt){return gt.reduce(function(Rt,zt){return Rt+zt.x},0)/gt.length}(kt),xt.y=function(gt){return 1+m.max(gt,function(Rt){return Rt.y})}(kt)):(xt.x=me?Ne+=C(xt,me):0,xt.y=0,me=xt)});var We=function xt(kt){var gt=kt.children;return gt&>.length?xt(gt[0]):kt}(Me),rt=function xt(kt){var gt,Rt=kt.children;return Rt&&(gt=Rt.length)?xt(Rt[gt-1]):kt}(Me),vt=We.x-C(We,rt)/2,Lt=rt.x+C(rt,We)/2;return rr(Me,B?function(xt){xt.x=(xt.x-Me.x)*z[0],xt.y=(Me.y-xt.y)*z[1]}:function(xt){xt.x=(xt.x-vt)/(Lt-vt)*z[0],xt.y=(1-(Me.y?xt.y/Me.y:1))*z[1]}),ye}return q.separation=function(ie){return arguments.length?(C=ie,q):C},q.size=function(ie){return arguments.length?(B=(z=ie)==null,q):B?null:z},q.nodeSize=function(ie){return arguments.length?(B=(z=ie)!=null,q):B?z:null},Qt(q,le)},m.layout.treemap=function(){var le,C=m.layout.hierarchy(),z=Math.round,B=[1,1],q=null,ie=Sr,ue=!1,me="squarify",ye=.5*(1+Math.sqrt(5));function Me(xt,kt){for(var gt,Rt,zt=-1,Ut=xt.length;++zt<Ut;)Rt=(gt=xt[zt]).value*(kt<0?0:kt),gt.area=isNaN(Rt)||Rt<=0?0:Rt}function Ne(xt){var kt=xt.children;if(kt&&kt.length){var gt,Rt,zt,Ut=ie(xt),tr=[],ur=kt.slice(),kr=1/0,wr=me==="slice"?Ut.dx:me==="dice"?Ut.dy:me==="slice-dice"?1&xt.depth?Ut.dy:Ut.dx:Math.min(Ut.dx,Ut.dy);for(Me(ur,Ut.dx*Ut.dy/xt.value),tr.area=0;(zt=ur.length)>0;)tr.push(gt=ur[zt-1]),tr.area+=gt.area,me!=="squarify"||(Rt=rt(tr,wr))<=kr?(ur.pop(),kr=Rt):(tr.area-=tr.pop().area,vt(tr,wr,Ut,!1),wr=Math.min(Ut.dx,Ut.dy),tr.length=tr.area=0,kr=1/0);tr.length&&(vt(tr,wr,Ut,!0),tr.length=tr.area=0),kt.forEach(Ne)}}function We(xt){var kt=xt.children;if(kt&&kt.length){var gt,Rt=ie(xt),zt=kt.slice(),Ut=[];for(Me(zt,Rt.dx*Rt.dy/xt.value),Ut.area=0;gt=zt.pop();)Ut.push(gt),Ut.area+=gt.area,gt.z!=null&&(vt(Ut,gt.z?Rt.dx:Rt.dy,Rt,!zt.length),Ut.length=Ut.area=0);kt.forEach(We)}}function rt(xt,kt){for(var gt,Rt=xt.area,zt=0,Ut=1/0,tr=-1,ur=xt.length;++tr<ur;)(gt=xt[tr].area)&&(gt<Ut&&(Ut=gt),gt>zt&&(zt=gt));return kt*=kt,(Rt*=Rt)?Math.max(kt*zt*ye/Rt,Rt/(kt*Ut*ye)):1/0}function vt(xt,kt,gt,Rt){var zt,Ut=-1,tr=xt.length,ur=gt.x,kr=gt.y,wr=kt?z(xt.area/kt):0;if(kt==gt.dx){for((Rt||wr>gt.dy)&&(wr=gt.dy);++Ut<tr;)(zt=xt[Ut]).x=ur,zt.y=kr,zt.dy=wr,ur+=zt.dx=Math.min(gt.x+gt.dx-ur,wr?z(zt.area/wr):0);zt.z=!0,zt.dx+=gt.x+gt.dx-ur,gt.y+=wr,gt.dy-=wr}else{for((Rt||wr>gt.dx)&&(wr=gt.dx);++Ut<tr;)(zt=xt[Ut]).x=ur,zt.y=kr,zt.dx=wr,kr+=zt.dy=Math.min(gt.y+gt.dy-kr,wr?z(zt.area/wr):0);zt.z=!1,zt.dy+=gt.y+gt.dy-kr,gt.x+=wr,gt.dx-=wr}}function Lt(xt){var kt=le||C(xt),gt=kt[0];return gt.x=gt.y=0,gt.value?(gt.dx=B[0],gt.dy=B[1]):gt.dx=gt.dy=0,le&&C.revalue(gt),Me([gt],gt.dx*gt.dy/gt.value),(le?We:Ne)(gt),ue&&(le=kt),kt}return Lt.size=function(xt){return arguments.length?(B=xt,Lt):B},Lt.padding=function(xt){if(!arguments.length)return q;function kt(zt){var Ut=xt.call(Lt,zt,zt.depth);return Ut==null?Sr(zt):zr(zt,typeof Ut=="number"?[Ut,Ut,Ut,Ut]:Ut)}function gt(zt){return zr(zt,xt)}var Rt;return ie=(q=xt)==null?Sr:(Rt=typeof xt)=="function"?kt:(Rt==="number"&&(xt=[xt,xt,xt,xt]),gt),Lt},Lt.round=function(xt){return arguments.length?(z=xt?Math.round:Number,Lt):z!=Number},Lt.sticky=function(xt){return arguments.length?(ue=xt,le=null,Lt):ue},Lt.ratio=function(xt){return arguments.length?(ye=xt,Lt):ye},Lt.mode=function(xt){return arguments.length?(me=xt+"",Lt):me},Qt(Lt,C)},m.random={normal:function(le,C){var z=arguments.length;return z<2&&(C=1),z<1&&(le=0),function(){var B,q,ie;do ie=(B=2*Math.random()-1)*B+(q=2*Math.random()-1)*q;while(!ie||ie>1);return le+C*B*Math.sqrt(-2*Math.log(ie)/ie)}},logNormal:function(){var le=m.random.normal.apply(m,arguments);return function(){return Math.exp(le())}},bates:function(le){var C=m.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}}},m.scale={};var un={floor:E,ceil:E};function wn(le,C,z,B){var q=[],ie=[],ue=0,me=Math.min(le.length,C.length)-1;for(le[me]<le[0]&&(le=le.slice().reverse(),C=C.slice().reverse());++ue<=me;)q.push(z(le[ue-1],le[ue])),ie.push(B(C[ue-1],C[ue]));return function(ye){var Me=m.bisect(le,ye,1,me)-1;return ie[Me](q[Me](ye))}}function Dn(le,C){return m.rebind(le,C,"range","rangeRound","interpolate","clamp")}function Hn(le,C){return gn(le,_n(ia(le,C)[2])),gn(le,_n(ia(le,C)[2])),le}function ia(le,C){C==null&&(C=10);var z=Zr(le),B=z[1]-z[0],q=Math.pow(10,Math.floor(Math.log(B/C)/Math.LN10)),ie=C/B*q;return ie<=.15?q*=10:ie<=.35?q*=5:ie<=.75&&(q*=2),z[0]=Math.ceil(z[0]/q)*q,z[1]=Math.floor(z[1]/q)*q+.5*q,z[2]=q,z}function Jr(le,C){return m.range.apply(m,ia(le,C))}m.scale.linear=function(){return function le(C,z,B,q){var ie,ue;function me(){var Me=Math.min(C.length,z.length)>2?wn:sn,Ne=q?Po:ps;return ie=Me(C,z,Ne,B),ue=Me(z,C,Ne,Ni),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),me()):C},ye.range=function(Me){return arguments.length?(z=Me,me()):z},ye.rangeRound=function(Me){return ye.range(Me).interpolate(Vo)},ye.clamp=function(Me){return arguments.length?(q=Me,me()):q},ye.interpolate=function(Me){return arguments.length?(B=Me,me()):B},ye.ticks=function(Me){return Jr(C,Me)},ye.tickFormat=function(Me,Ne){return d3_scale_linearTickFormat(C,Me,Ne)},ye.nice=function(Me){return Hn(C,Me),me()},ye.copy=function(){return le(C,z,B,q)},me()}([0,1],[0,1],Ni,!1)},m.scale.log=function(){return function le(C,z,B,q){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 me(ye){return C(ie(ye))}return me.invert=function(ye){return ue(C.invert(ye))},me.domain=function(ye){return arguments.length?(B=ye[0]>=0,C.domain((q=ye.map(Number)).map(ie)),me):q},me.base=function(ye){return arguments.length?(z=+ye,C.domain(q.map(ie)),me):z},me.nice=function(){var ye=gn(q.map(ie),B?Math:ra);return C.domain(ye),q=ye.map(ue),me},me.ticks=function(){var ye=Zr(q),Me=[],Ne=ye[0],We=ye[1],rt=Math.floor(ie(Ne)),vt=Math.ceil(ie(We)),Lt=z%1?2:z;if(isFinite(vt-rt)){if(B){for(;rt<vt;rt++)for(var xt=1;xt<Lt;xt++)Me.push(ue(rt)*xt);Me.push(ue(rt))}else for(Me.push(ue(rt));rt++<vt;)for(xt=Lt-1;xt>0;xt--)Me.push(ue(rt)*xt);for(rt=0;Me[rt]<Ne;rt++);for(vt=Me.length;Me[vt-1]>We;vt--);Me=Me.slice(rt,vt)}return Me},me.copy=function(){return le(C.copy(),z,B,q)},Dn(me,C)}(m.scale.linear().domain([0,1]),10,!0,[1,10])};var ra={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)}}m.scale.pow=function(){return function le(C,z,B){var q=Cn(z),ie=Cn(1/z);function ue(me){return C(q(me))}return ue.invert=function(me){return ie(C.invert(me))},ue.domain=function(me){return arguments.length?(C.domain((B=me.map(Number)).map(q)),ue):B},ue.ticks=function(me){return Jr(B,me)},ue.tickFormat=function(me,ye){return d3_scale_linearTickFormat(B,me,ye)},ue.nice=function(me){return ue.domain(Hn(B,me))},ue.exponent=function(me){return arguments.length?(q=Cn(z=me),ie=Cn(1/z),C.domain(B.map(q)),ue):z},ue.copy=function(){return le(C.copy(),z,B)},Dn(ue,C)}(m.scale.linear(),1,[0,1])},m.scale.sqrt=function(){return m.scale.pow().exponent(.5)},m.scale.ordinal=function(){return function le(C,z){var B,q,ie;function ue(ye){return q[((B.get(ye)||(z.t==="range"?B.set(ye,C.push(ye)):NaN))-1)%q.length]}function me(ye,Me){return m.range(C.length).map(function(Ne){return ye+Me*Ne})}return ue.domain=function(ye){if(!arguments.length)return C;C=[],B=new T;for(var Me,Ne=-1,We=ye.length;++Ne<We;)B.has(Me=ye[Ne])||B.set(Me,C.push(Me));return ue[z.t].apply(ue,z.a)},ue.range=function(ye){return arguments.length?(q=ye,ie=0,z={t:"range",a:arguments},ue):q},ue.rangePoints=function(ye,Me){arguments.length<2&&(Me=0);var Ne=ye[0],We=ye[1],rt=C.length<2?(Ne=(Ne+We)/2,0):(We-Ne)/(C.length-1+Me);return q=me(Ne+rt*Me/2,rt),ie=0,z={t:"rangePoints",a:arguments},ue},ue.rangeRoundPoints=function(ye,Me){arguments.length<2&&(Me=0);var Ne=ye[0],We=ye[1],rt=C.length<2?(Ne=We=Math.round((Ne+We)/2),
vendor: 11,190 bytes, line 4
40):(We-Ne)/(C.length-1+Me)|0;return q=me(Ne+Math.round(rt*Me/2+(We-Ne-(C.length-1+Me)*rt)/2),rt),ie=0,z={t:"rangeRoundPoints",a:arguments},ue},ue.rangeBands=function(ye,Me,Ne){arguments.length<2&&(Me=0),arguments.length<3&&(Ne=Me);var We=ye[1]<ye[0],rt=ye[We-0],vt=ye[1-We],Lt=(vt-rt)/(C.length-Me+2*Ne);return q=me(rt+Lt*Ne,Lt),We&&q.reverse(),ie=Lt*(1-Me),z={t:"rangeBands",a:arguments},ue},ue.rangeRoundBands=function(ye,Me,Ne){arguments.length<2&&(Me=0),arguments.length<3&&(Ne=Me);var We=ye[1]<ye[0],rt=ye[We-0],vt=ye[1-We],Lt=Math.floor((vt-rt)/(C.length-Me+2*Ne));return q=me(rt+Math.round((vt-rt-(C.length-Me)*Lt)/2),Lt),We&&q.reverse(),ie=Math.round(Lt*(1-Me)),z={t:"rangeRoundBands",a:arguments},ue},ue.rangeBand=function(){return ie},ue.rangeExtent=function(){return Zr(z.a[0])},ue.copy=function(){return le(C,z)},ue.domain(C)}([],{t:"range",a:[[]]})},m.scale.category10=function(){return m.scale.ordinal().range(jn)},m.scale.category20=function(){return m.scale.ordinal().range(ta)},m.scale.category20b=function(){return m.scale.ordinal().range(Ta)},m.scale.category20c=function(){return m.scale.ordinal().range(Ca)};var jn=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Jt),ta=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Jt),Ta=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Jt),Ca=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Jt);function Sn(){return 0}m.scale.quantile=function(){return function le(C,z){var B;function q(){var ue=0,me=z.length;for(B=[];++ue<me;)B[ue-1]=m.quantile(C,ue/me);return ie}function ie(ue){if(!isNaN(ue=+ue))return z[m.bisect(B,ue)]}return ie.domain=function(ue){return arguments.length?(C=ue.map(u).filter(f).sort(a),q()):C},ie.range=function(ue){return arguments.length?(z=ue,q()):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)},q()}([],[])},m.scale.quantize=function(){return function le(C,z,B){var q,ie;function ue(ye){return B[Math.max(0,Math.min(ie,Math.floor(q*(ye-C))))]}function me(){return q=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],me()):[C,z]},ue.range=function(ye){return arguments.length?(B=ye,me()):B},ue.invertExtent=function(ye){return[ye=(ye=B.indexOf(ye))<0?NaN:ye/q+C,ye+1/q]},ue.copy=function(){return le(C,z,B)},me()}(0,1,[0,1])},m.scale.threshold=function(){return function le(C,z){function B(q){if(q<=q)return z[m.bisect(C,q)]}return B.domain=function(q){return arguments.length?(C=q,B):C},B.range=function(q){return arguments.length?(z=q,B):z},B.invertExtent=function(q){return q=z.indexOf(q),[C[q-1],C[q]]},B.copy=function(){return le(C,z)},B}([.5],[0,1])},m.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 Jr(C,B)},z.tickFormat=function(B,q){return d3_scale_linearTickFormat(C,B,q)},z.copy=function(){return le(C)},z}([0,1])},m.svg={},m.svg.arc=function(){var le=La,C=ma,z=Sn,B=Da,q=Ra,ie=Sa,ue=ei;function me(){var Me=Math.max(0,+le.apply(this,arguments)),Ne=Math.max(0,+C.apply(this,arguments)),We=q.apply(this,arguments)-qe,rt=ie.apply(this,arguments)-qe,vt=Math.abs(rt-We),Lt=We>rt?0:1;if(Ne<Me&&(xt=Ne,Ne=Me,Me=xt),vt>=Fe)return ye(Ne,Lt)+(Me?ye(Me,1-Lt):"")+"Z";var xt,kt,gt,Rt,zt,Ut,tr,ur,kr,wr,Qr,Kr,pn=0,ln=0,Vn=[];if((Rt=(+ue.apply(this,arguments)||0)/2)&&(gt=B===Da?Math.sqrt(Me*Me+Ne*Ne):+B.apply(this,arguments),Lt||(ln*=-1),Ne&&(ln=Ce(gt/Ne*Math.sin(Rt))),Me&&(pn=Ce(gt/Me*Math.sin(Rt)))),Ne){zt=Ne*Math.cos(We+ln),Ut=Ne*Math.sin(We+ln),tr=Ne*Math.cos(rt-ln),ur=Ne*Math.sin(rt-ln);var Zn=Math.abs(rt-We-2*ln)<=Gt?0:1;if(ln&&na(zt,Ut,tr,ur)===Lt^Zn){var fa=(We+rt)/2;zt=Ne*Math.cos(fa),Ut=Ne*Math.sin(fa),tr=ur=null}}else zt=Ut=0;if(Me){kr=Me*Math.cos(rt-pn),wr=Me*Math.sin(rt-pn),Qr=Me*Math.cos(We+pn),Kr=Me*Math.sin(We+pn);var Hr=Math.abs(We-rt+2*pn)<=Gt?0:1;if(pn&&na(kr,wr,Qr,Kr)===1-Lt^Hr){var Tn=(We+rt)/2;kr=Me*Math.cos(Tn),wr=Me*Math.sin(Tn),Qr=Kr=null}}else kr=wr=0;if(vt>Et&&(xt=Math.min(Math.abs(Ne-Me)/2,+z.apply(this,arguments)))>.001){kt=Me<Ne^Lt?0:1;var Xn=xt,Gn=xt;if(vt<Gt){var aa=Qr==null?[kr,wr]:tr==null?[zt,Ut]:hn([zt,Ut],[Qr,Kr],[tr,ur],[kr,wr]),pa=zt-aa[0],Ea=Ut-aa[1],ea=tr-aa[0],ba=ur-aa[1],va=1/Math.sin(Math.acos((pa*ea+Ea*ba)/(Math.sqrt(pa*pa+Ea*Ea)*Math.sqrt(ea*ea+ba*ba)))/2),Pa=Math.sqrt(aa[0]*aa[0]+aa[1]*aa[1]);Gn=Math.min(xt,(Me-Pa)/(va-1)),Xn=Math.min(xt,(Ne-Pa)/(va+1))}if(tr!=null){var _a=Xa(Qr==null?[kr,wr]:[Qr,Kr],[zt,Ut],Ne,Xn,Lt),Ia=Xa([tr,ur],[kr,wr],Ne,Xn,Lt);xt===Xn?Vn.push("M",_a[0],"A",Xn,",",Xn," 0 0,",kt," ",_a[1],"A",Ne,",",Ne," 0 ",1-Lt^na(_a[1][0],_a[1][1],Ia[1][0],Ia[1][1]),",",Lt," ",Ia[1],"A",Xn,",",Xn," 0 0,",kt," ",Ia[0]):Vn.push("M",_a[0],"A",Xn,",",Xn," 0 1,",kt," ",Ia[0])}else Vn.push("M",zt,",",Ut);if(Qr!=null){var Va=Xa([zt,Ut],[Qr,Kr],Me,-Gn,Lt),fi=Xa([kr,wr],tr==null?[zt,Ut]:[tr,ur],Me,-Gn,Lt);xt===Gn?Vn.push("L",fi[0],"A",Gn,",",Gn," 0 0,",kt," ",fi[1],"A",Me,",",Me," 0 ",Lt^na(fi[1][0],fi[1][1],Va[1][0],Va[1][1]),",",1-Lt," ",Va[1],"A",Gn,",",Gn," 0 0,",kt," ",Va[0]):Vn.push("L",fi[0],"A",Gn,",",Gn," 0 0,",kt," ",Va[0])}else Vn.push("L",kr,",",wr)}else Vn.push("M",zt,",",Ut),tr!=null&&Vn.push("A",Ne,",",Ne," 0 ",Zn,",",Lt," ",tr,",",ur),Vn.push("L",kr,",",wr),Qr!=null&&Vn.push("A",Me,",",Me," 0 ",Hr,",",1-Lt," ",Qr,",",Kr);return Vn.push("Z"),Vn.join("")}function ye(Me,Ne){return"M0,"+Me+"A"+Me+","+Me+" 0 1,"+Ne+" 0,"+-Me+"A"+Me+","+Me+" 0 1,"+Ne+" 0,"+Me}return me.innerRadius=function(Me){return arguments.length?(le=vr(Me),me):le},me.outerRadius=function(Me){return arguments.length?(C=vr(Me),me):C},me.cornerRadius=function(Me){return arguments.length?(z=vr(Me),me):z},me.padRadius=function(Me){return arguments.length?(B=Me==Da?Da:vr(Me),me):B},me.startAngle=function(Me){return arguments.length?(q=vr(Me),me):q},me.endAngle=function(Me){return arguments.length?(ie=vr(Me),me):ie},me.padAngle=function(Me){return arguments.length?(ue=vr(Me),me):ue},me.centroid=function(){var Me=(+le.apply(this,arguments)+ +C.apply(this,arguments))/2,Ne=(+q.apply(this,arguments)+ +ie.apply(this,arguments))/2-qe;return[Math.cos(Ne)*Me,Math.sin(Ne)*Me]},me};var Da="auto";function La(le){return le.innerRadius}function ma(le){return le.outerRadius}function Ra(le){return le.startAngle}function Sa(le){return le.endAngle}function ei(le){return le&&le.padAngle}function na(le,C,z,B){return(le-z)*C-(C-B)*le>0?0:1}function Xa(le,C,z,B,q){var ie=le[0]-C[0],ue=le[1]-C[1],me=(q?B:-B)/Math.sqrt(ie*ie+ue*ue),ye=me*ue,Me=-me*ie,Ne=le[0]+ye,We=le[1]+Me,rt=C[0]+ye,vt=C[1]+Me,Lt=(Ne+rt)/2,xt=(We+vt)/2,kt=rt-Ne,gt=vt-We,Rt=kt*kt+gt*gt,zt=z-B,Ut=Ne*vt-rt*We,tr=(gt<0?-1:1)*Math.sqrt(Math.max(0,zt*zt*Rt-Ut*Ut)),ur=(Ut*gt-kt*tr)/Rt,kr=(-Ut*kt-gt*tr)/Rt,wr=(Ut*gt+kt*tr)/Rt,Qr=(-Ut*kt+gt*tr)/Rt,Kr=ur-Lt,pn=kr-xt,ln=wr-Lt,Vn=Qr-xt;return Kr*Kr+pn*pn>ln*ln+Vn*Vn&&(ur=wr,kr=Qr),[[ur-ye,kr-Me],[ur*z/zt,kr*z/zt]]}function Ui(){return!0}function Zo(le){var C=Tr,z=en,B=Ui,q=xo,ie=q.key,ue=.7;function me(ye){var Me,Ne=[],We=[],rt=-1,vt=ye.length,Lt=vr(C),xt=vr(z);function kt(){Ne.push("M",q(le(We),ue))}for(;++rt<vt;)B.call(this,Me=ye[rt],rt)?We.push([+Lt.call(this,Me,rt),+xt.call(this,Me,rt)]):We.length&&(kt(),We=[]);return We.length&&kt(),Ne.length?Ne.join(""):null}return me.x=function(ye){return arguments.length?(C=ye,me):C},me.y=function(ye){return arguments.length?(z=ye,me):z},me.defined=function(ye){return arguments.length?(B=ye,me):B},me.interpolate=function(ye){return arguments.length?(ie=typeof ye=="function"?q=ye:(q=Ro.get(ye)||xo).key,me):ie},me.tension=function(ye){return arguments.length?(ue=ye,me):ue},me}m.svg.line=function(){return Zo(E)};var Ro=m.map({linear:xo,"linear-closed":ya,step:function(le){for(var C=0,z=le.length,B=le[0],q=[B[0],",",B[1]];++C<z;)q.push("H",(B[0]+(B=le[C])[0])/2,"V",B[1]);return z>1&&q.push("H",B[0]),q.join("")},"step-before":vi,"step-after":bo,basis:Yi,"basis-open":function(le){if(le.length<4)return xo(le);for(var C,z=[],B=-1,q=le.length,ie=[0],ue=[0];++B<3;)C=le[B],ie.push(C[0]),ue.push(C[1]);for(z.push(ni(no,ie)+","+ni(no,ue)),--B;++B<q;)C=le[B],ie.shift(),ie.push(C[0]),ue.shift(),ue.push(C[1]),os(z,ie,ue);return z.join("")},"basis-closed":function(le){for(var C,z,B=-1,q=le.length,ie=q+4,ue=[],me=[];++B<4;)z=le[B%q],ue.push(z[0]),me.push(z[1]);for(C=[ni(no,ue),",",ni(no,me)],--B;++B<ie;)z=le[B%q],ue.shift(),ue.push(z[0]),me.shift(),me.push(z[1]),os(C,ue,me);return C.join("")},bundle:function(le,C){var z=le.length-1;if(z)for(var B,q,ie=le[0][0],ue=le[0][1],me=le[z][0]-ie,ye=le[z][1]-ue,Me=-1;++Me<=z;)B=le[Me],q=Me/z,B[0]=C*B[0]+(1-C)*(ie+q*me),B[1]=C*B[1]+(1-C)*(ue+q*ye);return Yi(le)},cardinal:function(le,C){return le.length<3?xo(le):le[0]+Ja(le,Mi(le,C))},"cardinal-open":function(le,C){return le.length<4?xo(le):le[1]+Ja(le.slice(1,-1),Mi(le,C))},"cardinal-closed":function(le,C){return le.length<3?ya(le):le[0]+Ja((le.push(le[0]),le),Mi([le[le.length-2]].concat(le,[le[1]]),C))},monotone:function(le){return le.length<3?xo(le):le[0]+Ja(le,function(C){for(var z,B,q,ie,ue=[],me=function(Ne){for(var We=0,rt=Ne.length-1,vt=[],Lt=Ne[0],xt=Ne[1],kt=vt[0]=es(Lt,xt);++We<rt;)vt[We]=(kt+(kt=es(Lt=xt,xt=Ne[We+1])))/2;return vt[We]=kt,vt}(C),ye=-1,Me=C.length-1;++ye<Me;)z=es(C[ye],C[ye+1]),s(z)<Et?me[ye]=me[ye+1]=0:(B=me[ye]/z,q=me[ye+1]/z,(ie=B*B+q*q)>9&&(ie=3*z/Math.sqrt(ie),me[ye]=ie*B,me[ye+1]=ie*q));for(ye=-1;++ye<=Me;)ie=(C[Math.min(Me,ye+1)][0]-C[Math.max(0,ye-1)][0])/(6*(1+me[ye]*me[ye])),ue.push([ie||0,me[ye]*ie||0]);return ue}(le))}});function xo(le){return le.length>1?le.join("L"):le+"Z"}function ya(le){return le.join("L")+"Z"}function vi(le){for(var C=0,z=le.length,B=le[0],q=[B[0],",",B[1]];++C<z;)q.push("V",(B=le[C])[1],"H",B[0]);return q.join("")}function bo(le){for(var C=0,z=le.length,B=le[0],q=[B[0],",",B[1]];++C<z;)q.push("H",(B=le[C])[0],"V",B[1]);return q.join("")}function Ja(le,C){if(C.length<1||le.length!=C.length&&le.length!=C.length+2)return xo(le);var z=le.length!=C.length,B="",q=le[0],ie=le[1],ue=C[0],me=ue,ye=1;if(z&&(B+="Q"+(ie[0]-2*ue[0]/3)+","+(ie[1]-2*ue[1]/3)+","+ie[0]+","+ie[1],q=le[1],ye=2),C.length>1){me=C[1],ie=le[ye],ye++,B+="C"+(q[0]+ue[0])+","+(q[1]+ue[1])+","+(ie[0]-me[0])+","+(ie[1]-me[1])+","+ie[0]+","+ie[1];for(var Me=2;Me<C.length;Me++,ye++)ie=le[ye],me=C[Me],B+="S"+(ie[0]-me[0])+","+(ie[1]-me[1])+","+ie[0]+","+ie[1]}if(z){var Ne=le[ye];B+="Q"+(ie[0]+2*me[0]/3)+","+(ie[1]+2*me[1]/3)+","+Ne[0]+","+Ne[1]}return B}function Mi(le,C){for(var z,B=[],q=(1-C)/2,ie=le[0],ue=le[1],me=1,ye=le.length;++me<ye;)z=ie,ie=ue,ue=le[me],B.push([q*(ue[0]-z[0]),q*(ue[1]-z[1])]);return B}function Yi(le){if(le.length<3)return xo(le);
vendor: 4,709 bytes, line 4
4var C=1,z=le.length,B=le[0],q=B[0],ie=B[1],ue=[q,q,q,(B=le[1])[0]],me=[ie,ie,ie,B[1]],ye=[q,",",ie,"L",ni(no,ue),",",ni(no,me)];for(le.push(le[z-1]);++C<=z;)B=le[C],ue.shift(),ue.push(B[0]),me.shift(),me.push(B[1]),os(ye,ue,me);return le.pop(),ye.push("L",B),ye.join("")}function ni(le,C){return le[0]*C[0]+le[1]*C[1]+le[2]*C[2]+le[3]*C[3]}Ro.forEach(function(le,C){C.key=le,C.closed=/-closed$/.test(le)});var po=[0,2/3,1/3,0],ai=[0,1/3,2/3,0],no=[0,1/6,2/3,1/6];function os(le,C,z){le.push("C",ni(po,C),",",ni(po,z),",",ni(ai,C),",",ni(ai,z),",",ni(no,C),",",ni(no,z))}function es(le,C){return(C[1]-le[1])/(C[0]-le[0])}function Fs(le){for(var C,z,B,q=-1,ie=le.length;++q<ie;)z=(C=le[q])[0],B=C[1]-qe,C[0]=z*Math.cos(B),C[1]=z*Math.sin(B);return le}function Ri(le){var C=Tr,z=Tr,B=0,q=en,ie=Ui,ue=xo,me=ue.key,ye=ue,Me="L",Ne=.7;function We(rt){var vt,Lt,xt,kt=[],gt=[],Rt=[],zt=-1,Ut=rt.length,tr=vr(C),ur=vr(B),kr=C===z?function(){return Lt}:vr(z),wr=B===q?function(){return xt}:vr(q);function Qr(){kt.push("M",ue(le(Rt),Ne),Me,ye(le(gt.reverse()),Ne),"Z")}for(;++zt<Ut;)ie.call(this,vt=rt[zt],zt)?(gt.push([Lt=+tr.call(this,vt,zt),xt=+ur.call(this,vt,zt)]),Rt.push([+kr.call(this,vt,zt),+wr.call(this,vt,zt)])):gt.length&&(Qr(),gt=[],Rt=[]);return gt.length&&Qr(),kt.length?kt.join(""):null}return We.x=function(rt){return arguments.length?(C=z=rt,We):z},We.x0=function(rt){return arguments.length?(C=rt,We):C},We.x1=function(rt){return arguments.length?(z=rt,We):z},We.y=function(rt){return arguments.length?(B=q=rt,We):q},We.y0=function(rt){return arguments.length?(B=rt,We):B},We.y1=function(rt){return arguments.length?(q=rt,We):q},We.defined=function(rt){return arguments.length?(ie=rt,We):ie},We.interpolate=function(rt){return arguments.length?(me=typeof rt=="function"?ue=rt:(ue=Ro.get(rt)||xo).key,ye=ue.reverse||ue,Me=ue.closed?"M":"L",We):me},We.tension=function(rt){return arguments.length?(Ne=rt,We):Ne},We}function Bs(le){return le.source}function Fi(le){return le.target}function ts(le){return le.radius}function ua(le){return[le.x,le.y]}function xa(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 Ns(){return 64}function js(){return"circle"}function rs(le){var C=Math.sqrt(le/Gt);return"M0,"+C+"A"+C+","+C+" 0 1,1 0,"+-C+"A"+C+","+C+" 0 1,1 0,"+C+"Z"}m.svg.line.radial=function(){var le=Zo(Fs);return le.radius=le.x,delete le.x,le.angle=le.y,delete le.y,le},vi.reverse=bo,bo.reverse=vi,m.svg.area=function(){return Ri(E)},m.svg.area.radial=function(){var le=Ri(Fs);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},m.svg.chord=function(){var le=Bs,C=Fi,z=ts,B=Ra,q=Sa;function ie(Me,Ne){var We,rt,vt=ue(this,le,Me,Ne),Lt=ue(this,C,Me,Ne);return"M"+vt.p0+me(vt.r,vt.p1,vt.a1-vt.a0)+(rt=Lt,((We=vt).a0==rt.a0&&We.a1==rt.a1?ye(vt.r,vt.p1,vt.r,vt.p0):ye(vt.r,vt.p1,Lt.r,Lt.p0)+me(Lt.r,Lt.p1,Lt.a1-Lt.a0)+ye(Lt.r,Lt.p1,vt.r,vt.p0))+"Z")}function ue(Me,Ne,We,rt){var vt=Ne.call(Me,We,rt),Lt=z.call(Me,vt,rt),xt=B.call(Me,vt,rt)-qe,kt=q.call(Me,vt,rt)-qe;return{r:Lt,a0:xt,a1:kt,p0:[Lt*Math.cos(xt),Lt*Math.sin(xt)],p1:[Lt*Math.cos(kt),Lt*Math.sin(kt)]}}function me(Me,Ne,We){return"A"+Me+","+Me+" 0 "+ +(We>Gt)+",1 "+Ne}function ye(Me,Ne,We,rt){return"Q 0,0 "+rt}return ie.radius=function(Me){return arguments.length?(z=vr(Me),ie):z},ie.source=function(Me){return arguments.length?(le=vr(Me),ie):le},ie.target=function(Me){return arguments.length?(C=vr(Me),ie):C},ie.startAngle=function(Me){return arguments.length?(B=vr(Me),ie):B},ie.endAngle=function(Me){return arguments.length?(q=vr(Me),ie):q},ie},m.svg.diagonal=function(){var le=Bs,C=Fi,z=ua;function B(q,ie){var ue=le.call(this,q,ie),me=C.call(this,q,ie),ye=(ue.y+me.y)/2,Me=[ue,{x:ue.x,y:ye},{x:me.x,y:ye},me];return"M"+(Me=Me.map(z))[0]+"C"+Me[1]+" "+Me[2]+" "+Me[3]}return B.source=function(q){return arguments.length?(le=vr(q),B):le},B.target=function(q){return arguments.length?(C=vr(q),B):C},B.projection=function(q){return arguments.length?(z=q,B):z},B},m.svg.diagonal.radial=function(){var le=m.svg.diagonal(),C=ua,z=le.projection;return le.projection=function(B){return arguments.length?z(xa(C=B)):C},le},m.svg.symbol=function(){var le=js,C=Ns;function z(B,q){return(Io.get(le.call(this,B,q))||rs)(C.call(this,B,q))}return z.type=function(B){return arguments.length?(le=vr(B),z):le},z.size=function(B){return arguments.length?(C=vr(B),z):C},z};var Io=m.map({circle:rs,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"}
vendor: 11,545 bytes, line 4
4,diamond:function(le){var C=Math.sqrt(le/(2*Qs)),z=C*Qs;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/Go),z=C*Go/2;return"M0,"+z+"L"+C+","+-z+" "+-C+","+-z+"Z"},"triangle-up":function(le){var C=Math.sqrt(le/Go),z=C*Go/2;return"M0,"+-z+"L"+C+","+z+" "+-C+","+z+"Z"}});m.svg.symbolTypes=Io.keys();var Go=Math.sqrt(3),Qs=Math.tan(30*wt);J.transition=function(le){for(var C,z,B=ds||++ms,q=Es(le),ie=[],ue=ss||{time:Date.now(),ease:ys,delay:0,duration:250},me=-1,ye=this.length;++me<ye;){ie.push(C=[]);for(var Me=this[me],Ne=-1,We=Me.length;++Ne<We;)(z=Me[Ne])&&ls(z,Ne,q,B,ue),C.push(z)}return ii(ie,q,B)},J.interrupt=function(le){return this.each(le==null?As:Ka(Es(le)))};var As=Ka(Es());function Ka(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 ii(le,C,z){return N(le,Ii),le.namespace=C,le.id=z,le}var ds,ss,Ii=[],ms=0;function Ss(le,C,z,B){var q=le.id,ie=le.namespace;return De(le,typeof z=="function"?function(ue,me,ye){ue[ie][q].tween.set(C,B(z.call(ue,ue.__data__,me,ye)))}:(z=B(z),function(ue){ue[ie][q].tween.set(C,z)}))}function xs(le){return le==null&&(le=""),function(){this.textContent=le}}function Es(le){return le==null?"__transition__":"__transition_"+le+"__"}function ls(le,C,z,B,q){var ie,ue,me,ye,Me,Ne=le[z]||(le[z]={active:0,count:0}),We=Ne[B];function rt(Lt){var xt=Ne.active,kt=Ne[xt];for(var gt in kt&&(kt.timer.c=null,kt.timer.t=NaN,--Ne.count,delete Ne[xt],kt.event&&kt.event.interrupt.call(le,le.__data__,kt.index)),Ne)if(+gt<B){var Rt=Ne[gt];Rt.timer.c=null,Rt.timer.t=NaN,--Ne.count,delete Ne[gt]}ue.c=vt,Xr(function(){return ue.c&&vt(Lt||1)&&(ue.c=null,ue.t=NaN),1},0,ie),Ne.active=B,We.event&&We.event.start.call(le,le.__data__,C),Me=[],We.tween.forEach(function(zt,Ut){(Ut=Ut.call(le,le.__data__,C))&&Me.push(Ut)}),ye=We.ease,me=We.duration}function vt(Lt){for(var xt=Lt/me,kt=ye(xt),gt=Me.length;gt>0;)Me[--gt].call(le,kt);if(xt>=1)return We.event&&We.event.end.call(le,le.__data__,C),--Ne.count?delete Ne[B]:delete le[z],1}We||(ie=q.time,ue=Xr(function(Lt){var xt=We.delay;if(ue.t=xt+ie,xt<=Lt)return rt(Lt-xt);ue.c=rt},0,ie),We=Ne[B]={tween:new T,time:ie,timer:ue,delay:q.delay,duration:q.duration,ease:q.ease,index:C},q=null,++Ne.count)}Ii.call=J.call,Ii.empty=J.empty,Ii.node=J.node,Ii.size=J.size,m.transition=function(le,C){return le&&le.transition?ds?le.transition(C):le:m.selection().transition(le)},m.transition.prototype=Ii,Ii.select=function(le){var C,z,B,q=this.id,ie=this.namespace,ue=[];le=re(le);for(var me=-1,ye=this.length;++me<ye;){ue.push(C=[]);for(var Me=this[me],Ne=-1,We=Me.length;++Ne<We;)(B=Me[Ne])&&(z=le.call(B,B.__data__,Ne,me))?("__data__"in B&&(z.__data__=B.__data__),ls(z,Ne,ie,q,B[ie][q]),C.push(z)):C.push(null)}return ii(ue,ie,q)},Ii.selectAll=function(le){var C,z,B,q,ie,ue=this.id,me=this.namespace,ye=[];le=ne(le);for(var Me=-1,Ne=this.length;++Me<Ne;)for(var We=this[Me],rt=-1,vt=We.length;++rt<vt;)if(B=We[rt]){ie=B[me][ue],z=le.call(B,B.__data__,rt,Me),ye.push(C=[]);for(var Lt=-1,xt=z.length;++Lt<xt;)(q=z[Lt])&&ls(q,Lt,me,ue,ie),C.push(q)}return ii(ye,me,ue)},Ii.filter=function(le){var C,z,B=[];typeof le!="function"&&(le=Se(le));for(var q=0,ie=this.length;q<ie;q++){B.push(C=[]);for(var ue,me=0,ye=(ue=this[q]).length;me<ye;me++)(z=ue[me])&&le.call(z,z.__data__,me,q)&&C.push(z)}return ii(B,this.namespace,this.id)},Ii.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(q){q[B][z].tween.remove(le)}:function(q){q[B][z].tween.set(le,C)})},Ii.attr=function(le,C){if(arguments.length<2){for(C in le)this.attr(C,le[C]);return this}var z=le=="transform"?qo:Ni,B=m.ns.qualify(le);function q(){this.removeAttribute(B)}function ie(){this.removeAttributeNS(B.space,B.local)}function ue(ye){return ye==null?q:(ye+="",function(){var Me,Ne=this.getAttribute(B);return Ne!==ye&&(Me=z(Ne,ye),function(We){this.setAttribute(B,Me(We))})})}function me(ye){return ye==null?ie:(ye+="",function(){var Me,Ne=this.getAttributeNS(B.space,B.local);return Ne!==ye&&(Me=z(Ne,ye),function(We){this.setAttributeNS(B.space,B.local,Me(We))})})}return Ss(this,"attr."+le,C,B.local?me:ue)},Ii.attrTween=function(le,C){var z=m.ns.qualify(le);return this.tween("attr."+le,z.local?function(B,q){var ie=C.call(this,B,q,this.getAttributeNS(z.space,z.local));return ie&&function(ue){this.setAttributeNS(z.space,z.local,ie(ue))}}:function(B,q){var ie=C.call(this,B,q,this.getAttribute(z));return ie&&function(ue){this.setAttribute(z,ie(ue))}})},Ii.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 q(){this.style.removeProperty(le)}function ie(ue){return ue==null?q:(ue+="",function(){var me,ye=n(this).getComputedStyle(this,null).getPropertyValue(le);return ye!==ue&&(me=Ni(ye,ue),function(Me){this.style.setProperty(le,me(Me),z)})})}return Ss(this,"style."+le,C,ie)},Ii.styleTween=function(le,C,z){function B(q,ie){var ue=C.call(this,q,ie,n(this).getComputedStyle(this,null).getPropertyValue(le));return ue&&function(me){this.style.setProperty(le,ue(me),z)}}return arguments.length<3&&(z=""),this.tween("style."+le,B)},Ii.text=function(le){return Ss(this,"text",le,xs)},Ii.remove=function(){var le=this.namespace;return this.each("end.transition",function(){var C;this[le].count<2&&(C=this.parentNode)&&C.removeChild(this)})},Ii.ease=function(le){var C=this.id,z=this.namespace;return arguments.length<1?this.node()[z][C].ease:(typeof le!="function"&&(le=m.ease.apply(m,arguments)),De(this,function(B){B[z][C].ease=le}))},Ii.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,q,ie){B[z][C].delay=+le.call(B,B.__data__,q,ie)}:(le=+le,function(B){B[z][C].delay=le}))},Ii.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,q,ie){B[z][C].duration=Math.max(1,le.call(B,B.__data__,q,ie))}:(le=Math.max(1,le),function(B){B[z][C].duration=le}))},Ii.each=function(le,C){var z=this.id,B=this.namespace;if(arguments.length<2){var q=ss,ie=ds;try{ds=z,De(this,function(ue,me,ye){ss=ue[B][z],le.call(ue,ue.__data__,me,ye)})}finally{ss=q,ds=ie}}else De(this,function(ue){var me=ue[B][z];(me.event||(me.event=m.dispatch("start","end","interrupt"))).on(le,C)});return this},Ii.transition=function(){for(var le,C,z,B=this.id,q=++ms,ie=this.namespace,ue=[],me=0,ye=this.length;me<ye;me++){ue.push(le=[]);for(var Me,Ne=0,We=(Me=this[me]).length;Ne<We;Ne++)(C=Me[Ne])&&ls(C,Ne,ie,q,{time:(z=C[ie][B]).time,ease:z.ease,delay:z.delay+z.duration,duration:z.duration}),le.push(C)}return ii(ue,ie,q)},m.svg.axis=function(){var le,C=m.scale.linear(),z=$s,B=6,q=6,ie=3,ue=[10],me=null;function ye(Me){Me.each(function(){var Ne,We=m.select(this),rt=this.__chart__||C,vt=this.__chart__=C.copy(),Lt=me??(vt.ticks?vt.ticks.apply(vt,ue):vt.domain()),xt=le??(vt.tickFormat?vt.tickFormat.apply(vt,ue):E),kt=We.selectAll(".tick").data(Lt,vt),gt=kt.enter().insert("g",".domain").attr("class","tick").style("opacity",Et),Rt=m.transition(kt.exit()).style("opacity",Et).remove(),zt=m.transition(kt.order()).style("opacity",1),Ut=Math.max(B,0)+ie,tr=cn(vt),ur=We.selectAll(".domain").data([0]),kr=(ur.enter().append("path").attr("class","domain"),m.transition(ur));gt.append("line"),gt.append("text");var wr,Qr,Kr,pn,ln=gt.select("line"),Vn=zt.select("line"),Zn=kt.select("text").text(xt),fa=gt.select("text"),Hr=zt.select("text"),Tn=z==="top"||z==="left"?-1:1;if(z==="bottom"||z==="top"?(Ne=gs,wr="x",Kr="y",Qr="x2",pn="y2",Zn.attr("dy",Tn<0?"0em":".71em").style("text-anchor","middle"),kr.attr("d","M"+tr[0]+","+Tn*q+"V0H"+tr[1]+"V"+Tn*q)):(Ne=el,wr="y",Kr="x",Qr="y2",pn="x2",Zn.attr("dy",".32em").style("text-anchor",Tn<0?"end":"start"),kr.attr("d","M"+Tn*q+","+tr[0]+"H0V"+tr[1]+"H"+Tn*q)),ln.attr(pn,Tn*B),fa.attr(Kr,Tn*Ut),Vn.attr(Qr,0).attr(pn,Tn*B),Hr.attr(wr,0).attr(Kr,Tn*Ut),vt.rangeBand){var Xn=vt,Gn=Xn.rangeBand()/2;rt=vt=function(aa){return Xn(aa)+Gn}}else rt.rangeBand?rt=vt:Rt.call(Ne,vt,rt);gt.call(Ne,rt,vt),zt.call(Ne,vt,vt)})}return ye.scale=function(Me){return arguments.length?(C=Me,ye):C},ye.orient=function(Me){return arguments.length?(z=Me in fl?Me+"":$s,ye):z},ye.ticks=function(){return arguments.length?(ue=b(arguments),ye):ue},ye.tickValues=function(Me){return arguments.length?(me=Me,ye):me},ye.tickFormat=function(Me){return arguments.length?(le=Me,ye):le},ye.tickSize=function(Me){var Ne=arguments.length;return Ne?(B=+Me,q=+arguments[Ne-1],ye):B},ye.innerTickSize=function(Me){return arguments.length?(B=+Me,ye):B},ye.outerTickSize=function(Me){return arguments.length?(q=+Me,ye):q},ye.tickPadding=function(Me){return arguments.length?(ie=+Me,ye):ie},ye.tickSubdivide=function(){return arguments.length&&ye},ye};var $s="bottom",fl={top:1,right:1,bottom:1,left:1};function gs(le,C,z){le.attr("transform",function(B){var q=C(B);return"translate("+(isFinite(q)?q:z(B))+",0)"})}function el(le,C,z){le.attr("transform",function(B){var q=C(B);return"translate(0,"+(isFinite(q)?q:z(B))+")"})}m.svg.brush=function(){var le,C,z=Q(Ne,"brushstart","brush","brushend"),B=null,q=null,ie=[0,0],ue=[0,0],me=!0,ye=!0,Me=ao[0];function Ne(xt){xt.each(function(){var kt=m.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Lt).on("touchstart.brush",Lt),gt=kt.selectAll(".background").data([0]);gt.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),kt.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Rt=kt.selectAll(".resize").data(Me,E);Rt.exit().remove(),Rt.enter().append("g").attr("class",function(ur){return"resize "+ur}).style("cursor",function(ur){return Ls[ur]}).append("rect").attr("x",function(ur){return/[ew]$/.test(ur)?-3:null}).attr("y",function(ur){return/^[ns]/.test(ur)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Rt.style("display",Ne.empty()?"none":null);var zt,Ut=m.transition(kt),tr=m.transition(gt);B&&(zt=cn(B),tr.attr("x",zt[0]).attr("width",zt[1]-zt[0]),rt(Ut)),q&&(zt=cn(q),tr.attr("y",zt[0]).attr("height",zt[1]-zt[0]),vt(Ut)),We(Ut)})}function We(xt){xt.selectAll(".resize").attr("transform",function(kt){return"translate("+ie[+/e$/.test(kt)]+","+ue[+/^s/.test(kt)]+")"})}function rt(xt){xt.select(".extent").attr("x",ie[0]),xt.selectAll(".extent,.n>rect,.s>rect").attr("width",ie[1]-ie[0])}function vt(xt){xt.select(".extent").attr("y",ue[0]),xt.selectAll(".extent,.e>rect,.w>rect").attr("height",ue[1]-ue[0])}function Lt(){var xt,kt,gt=this,Rt=m.select(m.event.target),zt=z.of(gt,arguments),Ut=m.select(gt),tr=Rt.datum(),ur=!/^(n|s)$/.test(tr)&&B,kr=!/^(e|w)$/.test(tr)&&q,wr=Rt.classed("extent"),Qr=Ct(gt),Kr=m.mouse(gt),pn=m.select(n(gt)).on("keydown.brush",Zn).on("keyup.brush",fa);if(m.event.changedTouches?pn.on("touchmove.brush",Hr).on("touchend.brush",Xn):pn.on("mousemove.brush",Hr).on("mouseup.brush",Xn),Ut.interrupt().selectAll("*").interrupt(),wr)Kr[0]=ie[0]-Kr[0],Kr[1]=ue[0]-Kr[1];else if(tr){var ln=+/w$/.test(tr),Vn=+/^n/.test(tr);kt=[ie[1-ln]-Kr[0],ue[1-Vn]-Kr[1]],Kr[0]=ie[ln],Kr[1]=ue[Vn]}
4else m.event.altKey&&(xt=Kr.slice());function Zn(){m.event.keyCode==32&&(wr||(xt=null,Kr[0]-=ie[1],Kr[1]-=ue[1],wr=2),G())}function fa(){m.event.keyCode==32&&wr==2&&(Kr[0]+=ie[1],Kr[1]+=ue[1],wr=0,G())}function Hr(){var Gn=m.mouse(gt),aa=!1;kt&&(Gn[0]+=kt[0],Gn[1]+=kt[1]),wr||(m.event.altKey?(xt||(xt=[(ie[0]+ie[1])/2,(ue[0]+ue[1])/2]),Kr[0]=ie[+(Gn[0]<xt[0])],Kr[1]=ue[+(Gn[1]<xt[1])]):xt=null),ur&&Tn(Gn,B,0)&&(rt(Ut),aa=!0),kr&&Tn(Gn,q,1)&&(vt(Ut),aa=!0),aa&&(We(Ut),zt({type:"brush",mode:wr?"move":"resize"}))}function Tn(Gn,aa,pa){var Ea,ea,ba=cn(aa),va=ba[0],Pa=ba[1],_a=Kr[pa],Ia=pa?ue:ie,Va=Ia[1]-Ia[0];if(wr&&(va-=_a,Pa-=Va+_a),Ea=(pa?ye:me)?Math.max(va,Math.min(Pa,Gn[pa])):Gn[pa],wr?ea=(Ea+=_a)+Va:(xt&&(_a=Math.max(va,Math.min(Pa,2*xt[pa]-Ea))),_a<Ea?(ea=Ea,Ea=_a):ea=_a),Ia[0]!=Ea||Ia[1]!=ea)return pa?C=null:le=null,Ia[0]=Ea,Ia[1]=ea,!0}function Xn(){Hr(),Ut.style("pointer-events","all").selectAll(".resize").style("display",Ne.empty()?"none":null),m.select("body").style("cursor",null),pn.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),Qr(),zt({type:"brushend"})}Ut.style("pointer-events","none").selectAll(".resize").style("display",null),m.select("body").style("cursor",Rt.style("cursor")),zt({type:"brushstart"}),Hr()}return Ne.event=function(xt){xt.each(function(){var kt=z.of(this,arguments),gt={x:ie,y:ue,i:le,j:C},Rt=this.__chart__||gt;this.__chart__=gt,ds?m.select(this).transition().each("start.brush",function(){le=Rt.i,C=Rt.j,ie=Rt.x,ue=Rt.y,kt({type:"brushstart"})}).tween("brush:brush",function(){var zt=gi(ie,gt.x),Ut=gi(ue,gt.y);return le=C=null,function(tr){ie=gt.x=zt(tr),ue=gt.y=Ut(tr),kt({type:"brush",mode:"resize"})}}).each("end.brush",function(){le=gt.i,C=gt.j,kt({type:"brush",mode:"resize"}),kt({type:"brushend"})}):(kt({type:"brushstart"}),kt({type:"brush",mode:"resize"}),kt({type:"brushend"}))})},Ne.x=function(xt){return arguments.length?(Me=ao[!(B=xt)<<1|!q],Ne):B},Ne.y=function(xt){return arguments.length?(Me=ao[!B<<1|!(q=xt)],Ne):q},Ne.clamp=function(xt){return arguments.length?(B&&q?(me=!!xt[0],ye=!!xt[1]):B?me=!!xt:q&&(ye=!!xt),Ne):B&&q?[me,ye]:B?me:q?ye:null},Ne.extent=function(xt){var kt,gt,Rt,zt,Ut;return arguments.length?(B&&(kt=xt[0],gt=xt[1],q&&(kt=kt[0],gt=gt[0]),le=[kt,gt],B.invert&&(kt=B(kt),gt=B(gt)),gt<kt&&(Ut=kt,kt=gt,gt=Ut),kt==ie[0]&>==ie[1]||(ie=[kt,gt])),q&&(Rt=xt[0],zt=xt[1],B&&(Rt=Rt[1],zt=zt[1]),C=[Rt,zt],q.invert&&(Rt=q(Rt),zt=q(zt)),zt<Rt&&(Ut=Rt,Rt=zt,zt=Ut),Rt==ue[0]&&zt==ue[1]||(ue=[Rt,zt])),Ne):(B&&(le?(kt=le[0],gt=le[1]):(kt=ie[0],gt=ie[1],B.invert&&(kt=B.invert(kt),gt=B.invert(gt)),gt<kt&&(Ut=kt,kt=gt,gt=Ut))),q&&(C?(Rt=C[0],zt=C[1]):(Rt=ue[0],zt=ue[1],q.invert&&(Rt=q.invert(Rt),zt=q.invert(zt)),zt<Rt&&(Ut=Rt,Rt=zt,zt=Ut))),B&&q?[[kt,Rt],[gt,zt]]:B?[kt,gt]:q&&[Rt,zt])},Ne.clear=function(){return Ne.empty()||(ie=[0,0],ue=[0,0],le=C=null),Ne},Ne.empty=function(){return!!B&&ie[0]==ie[1]||!!q&&ue[0]==ue[1]},m.rebind(Ne,z,"on")};var Ls={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ao=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function hl(le){return JSON.parse(le.responseText)}function pl(le){var C=y.createRange();return C.selectNode(y.body),C.createContextualFragment(le.responseText)}m.text=Pr(function(le){return le.responseText}),m.json=function(le,C){return Ur(le,"application/json",hl,C)},m.html=function(le,C){return Ur(le,"text/html",pl,C)},m.xml=Pr(function(le){return le.responseXML}),typeof $=="object"&&$.exports?$.exports=m:this.d3=m}).apply(self)},{}],59:[function(v,$,te){$.exports=v("./quad")},{"./quad":60}],60:[function(v,$,te){var m=v("binary-search-bounds"),g=v("clamp"),b=v("parse-rect"),y=v("array-bounds"),e=v("pick-by-alias"),n=v("defined"),t=v("flatten-vertex-data"),i=v("is-obj"),r=v("dtype"),d=v("math-log2");function l(a,u){for(var f=u[0],o=u[1],h=1/(u[2]-f),p=1/(u[3]-o),s=new Array(a.length),x=0,c=a.length/2;x<c;x++)s[2*x]=g((a[2*x]-f)*h,0,1),s[2*x+1]=g((a[2*x+1]-o)*p,0,1);return s}$.exports=function(a,u){u||(u={}),a=t(a,"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),o=n(u.bounds,y(a,2));o[0]===o[2]&&o[2]++,o[1]===o[3]&&o[3]++;var h,p=l(a,o),s=a.length>>>1;u.dtype||(u.dtype="array"),typeof u.dtype=="string"?h=new(r(u.dtype))(s):u.dtype&&(h=u.dtype,Array.isArray(h)&&(h.length=s));for(var x=0;x<s;++x)h[x]=x;var c=[],T=[],_=[],w=[];(function F(H,V,Z,K,G,W){if(!K.length)return null;var Q=c[G]||(c[G]=[]),R=_[G]||(_[G]=[]),N=T[G]||(T[G]=[]),U=Q.length;if(++G>f||W>1073741824){for(var ee=0;ee<K.length;ee++)Q.push(K[ee]),R.push(W),N.push(null,null,null,null);return U}if(Q.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],_e=p[2*de+1];xe<X?_e<J?re.push(de):ne.push(de):_e<J?se.push(de):oe.push(de)}return W<<=2,N.push(F(H,V,j,re,G,W),F(H,J,j,ne,G,W+1),F(X,V,j,se,G,W+2),F(X,J,j,oe,G,W+3)),U})(0,0,1,h,0,1);for(var k=0,L=0;L<c.length;L++){var A=c[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+c[L].length;w[L]=[k,S],k=S}return h.range=function(){for(var F,H=[],V=arguments.length;V--;)H[V]=arguments[V];if(i(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=o);var K=b.apply(void 0,H),G=[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=G[0],Q=G[1],R=G[2],N=G[3],U=l([W,Q,R,N],o),ee=U[0],j=U[1],X=U[2],J=U[3],re=n(F.level,c.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])/(o[2]-o[0]))),Math.ceil(-d(Math.abs(ne[1])/(o[3]-o[1])))),re)}if(re=Math.min(re,c.length),F.lod)return E(ee,j,X,J,re);var se=[];function oe(ce,de,xe,_e,we,Ee){if(we!==null&&Ee!==null&&!(ee>ce+xe||j>de+xe||X<ce||J<de||_e>=re||we===Ee)){var fe=c[_e];Ee===void 0&&(Ee=fe.length);for(var ge=we;ge<Ee;ge++){var ke=fe[ge],be=a[2*ke],Se=a[2*ke+1];be>=W&&be<=R&&Se>=Q&&Se<=N&&se.push(ke)}var Oe=T[_e],De=Oe[4*we+0],je=Oe[4*we+1],Je=Oe[4*we+2],ze=Oe[4*we+3],Ue=pe(Oe,we+1),Ge=.5*xe,Ye=_e+1;oe(ce,de,Ge,Ye,De,je||Je||ze||Ue),oe(ce,de+Ge,Ge,Ye,je,Je||ze||Ue),oe(ce+Ge,de,Ge,Ye,Je,ze||Ue),oe(ce+Ge,de+Ge,Ge,Ye,ze,Ue)}}function pe(ce,de){for(var xe=null,_e=0;xe===null;)if(xe=ce[4*de+_e],++_e>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 G=[],W=0;W<K;W++){var Q=_[W],R=w[W][0],N=D(F,H,W),U=D(V,Z,W),ee=m.ge(Q,N),j=m.gt(Q,U,ee,Q.length-1);G[W]=[ee+R,j+R]}return G}function D(F,H,V){for(var Z=1,K=.5,G=.5,W=.5,Q=0;Q<V;Q++)Z<<=2,Z+=F<K?H<G?0:1:H<G?2:3,W*=.5,K+=F<K?-W:W,G+=H<G?-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(v,$,te){Object.defineProperty(te,"__esModule",{value:!0});var m=v("@turf/meta");function g(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,i,r,d,l,a=0,u=e.length;if(u>2){for(l=0;l<u;l++)l===u-2?(i=u-2,r=u-1,d=0):l===u-1?(i=u-1,r=0,d=1):(i=l,r=l+1,d=l+2),n=e[i],t=e[r],a+=(y(e[d][0])-y(n[0]))*Math.sin(y(t[1]));a=6378137*a*6378137/2}return a}function y(e){return e*Math.PI/180}te.default=function(e){return m.geomReduce(e,function(n,t){return n+function(i){var r,d=0;switch(i.type){case"Polygon":return g(i.coordinates);case"MultiPolygon":for(r=0;r<i.coordinates.length;r++)d+=g(i.coordinates[r]);return d;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)},0)}},{"@turf/meta":63}],62:[function(v,$,te){function m(u,f,o){o===void 0&&(o={});var h={type:"Feature"};return(o.id===0||o.id)&&(h.id=o.id),o.bbox&&(h.bbox=o.bbox),h.properties=f||{},h.geometry=u,h}function g(u,f,o){if(o===void 0&&(o={}),!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(!a(u[0])||!a(u[1]))throw new Error("coordinates must contain numbers");return m({type:"Point",coordinates:u},f,o)}function b(u,f,o){o===void 0&&(o={});for(var h=0,p=u;h<p.length;h++){var s=p[h];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var x=0;x<s[s.length-1].length;x++)if(s[s.length-1][x]!==s[0][x])throw new Error("First and last Position are not equivalent.")}return m({type:"Polygon",coordinates:u},f,o)}function y(u,f,o){if(o===void 0&&(o={}),u.length<2)throw new Error("coordinates must be an array of two or more positions");return m({type:"LineString",coordinates:u},f,o)}function e(u,f){f===void 0&&(f={});var o={type:"FeatureCollection"};return f.id&&(o.id=f.id),f.bbox&&(o.bbox=f.bbox),o.features=u,o}function n(u,f,o){return o===void 0&&(o={}),m({type:"MultiLineString",coordinates:u},f,o)}function t(u,f,o){return o===void 0&&(o={}),m({type:"MultiPoint",coordinates:u},f,o)}function i(u,f,o){return o===void 0&&(o={}),m({type:"MultiPolygon",coordinates:u},f,o)}function r(u,f){f===void 0&&(f="kilometers");var o=te.factors[f];
4if(!o)throw new Error(f+" units is invalid");return u*o}function d(u,f){f===void 0&&(f="kilometers");var o=te.factors[f];if(!o)throw new Error(f+" units is invalid");return u/o}function l(u){return 180*(u%(2*Math.PI))/Math.PI}function a(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=m,te.geometry=function(u,f,o){switch(u){case"Point":return g(f).geometry;case"LineString":return y(f).geometry;case"Polygon":return b(f).geometry;case"MultiPoint":return t(f).geometry;case"MultiLineString":return n(f).geometry;case"MultiPolygon":return i(f).geometry;default:throw new Error(u+" is invalid")}},te.point=g,te.points=function(u,f,o){return o===void 0&&(o={}),e(u.map(function(h){return g(h,f)}),o)},te.polygon=b,te.polygons=function(u,f,o){return o===void 0&&(o={}),e(u.map(function(h){return b(h,f)}),o)},te.lineString=y,te.lineStrings=function(u,f,o){return o===void 0&&(o={}),e(u.map(function(h){return y(h,f)}),o)},te.featureCollection=e,te.multiLineString=n,te.multiPoint=t,te.multiPolygon=i,te.geometryCollection=function(u,f,o){return o===void 0&&(o={}),m({type:"GeometryCollection",geometries:u},f,o)},te.round=function(u,f){if(f===void 0&&(f=0),f&&!(f>=0))throw new Error("precision must be a positive number");var o=Math.pow(10,f||0);return Math.round(u*o)/o},te.radiansToLength=r,te.lengthToRadians=d,te.lengthToDegrees=function(u,f){return l(d(u,f))},te.bearingToAzimuth=function(u){var f=u%360;return f<0&&(f+=360),f},te.radiansToDegrees=l,te.degreesToRadians=function(u){return u%360*Math.PI/180},te.convertLength=function(u,f,o){if(f===void 0&&(f="kilometers"),o===void 0&&(o="kilometers"),!(u>=0))throw new Error("length must be a positive number");return r(d(u,f),o)},te.convertArea=function(u,f,o){if(f===void 0&&(f="meters"),o===void 0&&(o="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[o];if(!p)throw new Error("invalid final units");return u/h*p},te.isNumber=a,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(!a(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(v,$,te){Object.defineProperty(te,"__esModule",{value:!0});var m=v("@turf/helpers");function g(r,d,l){if(r!==null)for(var a,u,f,o,h,p,s,x,c=0,T=0,_=r.type,w=_==="FeatureCollection",k=_==="Feature",L=w?r.features.length:1,A=0;A<L;A++){h=(x=!!(s=w?r.features[A].geometry:k?r.geometry:r)&&s.type==="GeometryCollection")?s.geometries.length:1;for(var I=0;I<h;I++){var P=0,S=0;if((o=x?s.geometries[I]:s)!==null){p=o.coordinates;var E=o.type;switch(c=!l||E!=="Polygon"&&E!=="MultiPolygon"?0:1,E){case null:break;case"Point":if(d(p,T,A,P,S)===!1)return!1;T++,P++;break;case"LineString":case"MultiPoint":for(a=0;a<p.length;a++){if(d(p[a],T,A,P,S)===!1)return!1;T++,E==="MultiPoint"&&P++}E==="LineString"&&P++;break;case"Polygon":case"MultiLineString":for(a=0;a<p.length;a++){for(u=0;
4u<p[a].length-c;u++){if(d(p[a][u],T,A,P,S)===!1)return!1;T++}E==="MultiLineString"&&P++,E==="Polygon"&&S++}E==="Polygon"&&P++;break;case"MultiPolygon":for(a=0;a<p.length;a++){for(S=0,u=0;u<p[a].length;u++){for(f=0;f<p[a][u].length-c;f++){if(d(p[a][u][f],T,A,P,S)===!1)return!1;T++}S++}P++}break;case"GeometryCollection":for(a=0;a<o.geometries.length;a++)if(g(o.geometries[a],d,l)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function b(r,d){var l;switch(r.type){case"FeatureCollection":for(l=0;l<r.features.length&&d(r.features[l].properties,l)!==!1;l++);break;case"Feature":d(r.properties,0)}}function y(r,d){if(r.type==="Feature")d(r,0);else if(r.type==="FeatureCollection")for(var l=0;l<r.features.length&&d(r.features[l],l)!==!1;l++);}function e(r,d){var l,a,u,f,o,h,p,s,x,c,T=0,_=r.type==="FeatureCollection",w=r.type==="Feature",k=_?r.features.length:1;for(l=0;l<k;l++){for(h=_?r.features[l].geometry:w?r.geometry:r,s=_?r.features[l].properties:w?r.properties:{},x=_?r.features[l].bbox:w?r.bbox:void 0,c=_?r.features[l].id:w?r.id:void 0,o=(p=!!h&&h.type==="GeometryCollection")?h.geometries.length:1,u=0;u<o;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,T,s,x,c)===!1)return!1;break;case"GeometryCollection":for(a=0;a<f.geometries.length;a++)if(d(f.geometries[a],T,s,x,c)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}else if(d(null,T,s,x,c)===!1)return!1;T++}}function n(r,d){e(r,function(l,a,u,f,o){var h,p=l===null?null:l.type;switch(p){case null:case"Point":case"LineString":case"Polygon":return d(m.feature(l,u,{bbox:f,id:o}),a,0)!==!1&&void 0}switch(p){case"MultiPoint":h="Point";break;case"MultiLineString":h="LineString";break;case"MultiPolygon":h="Polygon"}for(var s=0;s<l.coordinates.length;s++){var x={type:h,coordinates:l.coordinates[s]};if(d(m.feature(x,u),a,s)===!1)return!1}})}function t(r,d){n(r,function(l,a,u){var f=0;if(l.geometry){var o=l.geometry.type;if(o!=="Point"&&o!=="MultiPoint"){var h,p=0,s=0,x=0;return g(l,function(c,T,_,w,k){if(h===void 0||a>p||w>s||k>x)return h=c,p=a,s=w,x=k,void(f=0);var L=m.lineString([h,c],l.properties);if(d(L,a,u,k,f)===!1)return!1;f++,h=c})!==!1&&void 0}}})}function i(r,d){if(!r)throw new Error("geojson is required");n(r,function(l,a,u){if(l.geometry!==null){var f=l.geometry.type,o=l.geometry.coordinates;switch(f){case"LineString":if(d(l,a,u,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h<o.length;h++)if(d(m.lineString(o[h],l.properties),a,u,h)===!1)return!1}}})}te.coordEach=g,te.coordReduce=function(r,d,l,a){var u=l;return g(r,function(f,o,h,p,s){u=o===0&&l===void 0?f:d(u,f,o,h,p,s)},a),u},te.propEach=b,te.propReduce=function(r,d,l){var a=l;return b(r,function(u,f){a=f===0&&l===void 0?u:d(a,u,f)}),a},te.featureEach=y,te.featureReduce=function(r,d,l){var a=l;return y(r,function(u,f){a=f===0&&l===void 0?u:d(a,u,f)}),a},te.coordAll=function(r){var d=[];return g(r,function(l){d.push(l)}),d},te.geomEach=e,te.geomReduce=function(r,d,l){var a=l;return e(r,function(u,f,o,h,p){a=f===0&&l===void 0?u:d(a,u,f,o,h,p)}),a},te.flattenEach=n,te.flattenReduce=function(r,d,l){var a=l;return n(r,function(u,f,o){a=f===0&&o===0&&l===void 0?u:d(a,u,f,o)}),a},te.segmentEach=t,te.segmentReduce=function(r,d,l){var a=l,u=!1;return t(r,function(f,o,h,p,s){a=u===!1&&l===void 0?f:d(a,f,o,h,p,s),u=!0}),a},te.lineEach=i,te.lineReduce=function(r,d,l){var a=l;return i(r,function(u,f,o,h){a=f===0&&l===void 0?u:d(a,u,f,o,h)}),a},te.findSegment=function(r,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var l,a=d.featureIndex||0,u=d.multiFeatureIndex||0,f=d.geometryIndex||0,o=d.segmentIndex||0,h=d.properties;switch(r.type){case"FeatureCollection":a<0&&(a=r.features.length+a),h=h||r.features[a].properties,l=r.features[a].geometry;break;case"Feature":h=h||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;
4default:throw new Error("geojson is invalid")}if(l===null)return null;var p=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=p.length+o-1),m.lineString([p[o],p[o+1]],h,d);case"Polygon":return f<0&&(f=p.length+f),o<0&&(o=p[f].length+o-1),m.lineString([p[f][o],p[f][o+1]],h,d);case"MultiLineString":return u<0&&(u=p.length+u),o<0&&(o=p[u].length+o-1),m.lineString([p[u][o],p[u][o+1]],h,d);case"MultiPolygon":return u<0&&(u=p.length+u),f<0&&(f=p[u].length+f),o<0&&(o=p[u][f].length-o-1),m.lineString([p[u][f][o],p[u][f][o+1]],h,d)}throw new Error("geojson is invalid")},te.findPoint=function(r,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var l,a=d.featureIndex||0,u=d.multiFeatureIndex||0,f=d.geometryIndex||0,o=d.coordIndex||0,h=d.properties;switch(r.type){case"FeatureCollection":a<0&&(a=r.features.length+a),h=h||r.features[a].properties,l=r.features[a].geometry;break;case"Feature":h=h||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var p=l.coordinates;switch(l.type){case"Point":return m.point(p,h,d);case"MultiPoint":return u<0&&(u=p.length+u),m.point(p[u],h,d);case"LineString":return o<0&&(o=p.length+o),m.point(p[o],h,d);case"Polygon":return f<0&&(f=p.length+f),o<0&&(o=p[f].length+o),m.point(p[f][o],h,d);case"MultiLineString":return u<0&&(u=p.length+u),o<0&&(o=p[u].length+o),m.point(p[u][o],h,d);case"MultiPolygon":return u<0&&(u=p.length+u),f<0&&(f=p[u].length+f),o<0&&(o=p[u][f].length-o),m.point(p[u][f][o],h,d)}throw new Error("geojson is invalid")}},{"@turf/helpers":62}],64:[function(v,$,te){Object.defineProperty(te,"__esModule",{value:!0});var m=v("@turf/meta");function g(b){var y=[1/0,1/0,-1/0,-1/0];return m.coordEach(b,function(e){y[0]>e[0]&&(y[0]=e[0]),y[1]>e[1]&&(y[1]=e[1]),y[2]<e[0]&&(y[2]=e[0]),y[3]<e[1]&&(y[3]=e[1])}),y}g.default=g,te.default=g},{"@turf/meta":66}],65:[function(v,$,te){arguments[4][62][0].apply(te,arguments)},{dup:62}],66:[function(v,$,te){arguments[4][63][0].apply(te,arguments)},{"@turf/helpers":65,dup:63}],67:[function(v,$,te){Object.defineProperty(te,"__esModule",{value:!0});var m=v("@turf/meta"),g=v("@turf/helpers");te.default=function(b,y){y===void 0&&(y={});var e=0,n=0,t=0;return m.coordEach(b,function(i){e+=i[0],n+=i[1],t++}),g.point([e/t,n/t],y.properties)}},{"@turf/helpers":68,"@turf/meta":69}],68:[function(v,$,te){function m(u,f,o){o===void 0&&(o={});var h={type:"Feature"};return(o.id===0||o.id)&&(h.id=o.id),o.bbox&&(h.bbox=o.bbox),h.properties=f||{},h.geometry=u,h}function g(u,f,o){return o===void 0&&(o={}),m({type:"Point",coordinates:u},f,o)}function b(u,f,o){o===void 0&&(o={});for(var h=0,p=u;h<p.length;h++){var s=p[h];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var x=0;x<s[s.length-1].length;x++)if(s[s.length-1][x]!==s[0][x])throw new Error("First and last Position are not equivalent.")}return m({type:"Polygon",coordinates:u},f,o)}function y(u,f,o){if(o===void 0&&(o={}),u.length<2)throw new Error("coordinates must be an array of two or more positions");return m({type:"LineString",coordinates:u},f,o)}function e(u,f){f===void 0&&(f={});var o={type:"FeatureCollection"};return f.id&&(o.id=f.id),f.bbox&&(o.bbox=f.bbox),o.features=u,o}function n(u,f,o){return o===void 0&&(o={}),m({type:"MultiLineString",coordinates:u},f,o)}function t(u,f,o){return o===void 0&&(o={}),m({type:"MultiPoint",coordinates:u},f,o)}function i(u,f,o){return o===void 0&&(o={}),m({type:"MultiPolygon",coordinates:u},f,o)}function r(u,f){f===void 0&&(f="kilometers");var o=te.factors[f];
4if(!o)throw new Error(f+" units is invalid");return u*o}function d(u,f){f===void 0&&(f="kilometers");var o=te.factors[f];if(!o)throw new Error(f+" units is invalid");return u/o}function l(u){return 180*(u%(2*Math.PI))/Math.PI}function a(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=m,te.geometry=function(u,f,o){switch(u){case"Point":return g(f).geometry;case"LineString":return y(f).geometry;case"Polygon":return b(f).geometry;case"MultiPoint":return t(f).geometry;case"MultiLineString":return n(f).geometry;case"MultiPolygon":return i(f).geometry;default:throw new Error(u+" is invalid")}},te.point=g,te.points=function(u,f,o){return o===void 0&&(o={}),e(u.map(function(h){return g(h,f)}),o)},te.polygon=b,te.polygons=function(u,f,o){return o===void 0&&(o={}),e(u.map(function(h){return b(h,f)}),o)},te.lineString=y,te.lineStrings=function(u,f,o){return o===void 0&&(o={}),e(u.map(function(h){return y(h,f)}),o)},te.featureCollection=e,te.multiLineString=n,te.multiPoint=t,te.multiPolygon=i,te.geometryCollection=function(u,f,o){return o===void 0&&(o={}),m({type:"GeometryCollection",geometries:u},f,o)},te.round=function(u,f){if(f===void 0&&(f=0),f&&!(f>=0))throw new Error("precision must be a positive number");var o=Math.pow(10,f||0);return Math.round(u*o)/o},te.radiansToLength=r,te.lengthToRadians=d,te.lengthToDegrees=function(u,f){return l(d(u,f))},te.bearingToAzimuth=function(u){var f=u%360;return f<0&&(f+=360),f},te.radiansToDegrees=l,te.degreesToRadians=function(u){return u%360*Math.PI/180},te.convertLength=function(u,f,o){if(f===void 0&&(f="kilometers"),o===void 0&&(o="kilometers"),!(u>=0))throw new Error("length must be a positive number");return r(d(u,f),o)},te.convertArea=function(u,f,o){if(f===void 0&&(f="meters"),o===void 0&&(o="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[o];if(!p)throw new Error("invalid final units");return u/h*p},te.isNumber=a,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(!a(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(v,$,te){Object.defineProperty(te,"__esModule",{value:!0});var m=v("@turf/helpers");function g(r,d,l){if(r!==null)for(var a,u,f,o,h,p,s,x,c=0,T=0,_=r.type,w=_==="FeatureCollection",k=_==="Feature",L=w?r.features.length:1,A=0;A<L;A++){h=(x=!!(s=w?r.features[A].geometry:k?r.geometry:r)&&s.type==="GeometryCollection")?s.geometries.length:1;for(var I=0;I<h;I++){var P=0,S=0;if((o=x?s.geometries[I]:s)!==null){p=o.coordinates;var E=o.type;switch(c=!l||E!=="Polygon"&&E!=="MultiPolygon"?0:1,E){case null:break;case"Point":if(d(p,T,A,P,S)===!1)return!1;T++,P++;break;case"LineString":case"MultiPoint":for(a=0;a<p.length;a++){if(d(p[a],T,A,P,S)===!1)return!1;T++,E==="MultiPoint"&&P++}E==="LineString"&&P++;break;case"Polygon":case"MultiLineString":for(a=0;a<p.length;a++){for(u=0;u<p[a].length-c;u++){if(d(p[a][u],T,A,P,S)===!1)return!1;T++}E==="MultiLineString"&&P++,E==="Polygon"&&S++}E==="Polygon"&&P++;break;case"MultiPolygon":for(a=0;a<p.length;a++){for(S=0,u=0;u<p[a].length;u++){for(f=0;f<p[a][u].length-c;f++){if(d(p[a][u][f],T,A,P,S)===!1)return!1;T++}S++}P++}break;case"GeometryCollection":for(a=0;a<o.geometries.length;a++)if(g(o.geometries[a],d,l)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function b(r,d){var l;switch(r.type){case"FeatureCollection":for(l=0;l<r.features.length&&d(r.features[l].properties,l)!==!1;l++);break;case"Feature":d(r.properties,0)}}function y(r,d){if(r.type==="Feature")d(r,0);else if(r.type==="FeatureCollection")for(var l=0;l<r.features.length&&d(r.features[l],l)!==!1;l++);}function e(r,d){var l,a,u,f,o,h,p,s,x,c,T=0,_=r.type==="FeatureCollection",w=r.type==="Feature",k=_?r.features.length:1;for(l=0;l<k;l++){for(h=_?r.features[l].geometry:w?r.geometry:r,s=_?r.features[l].properties:w?r.properties:{},x=_?r.features[l].bbox:w?r.bbox:void 0,c=_?r.features[l].id:w?r.id:void 0,o=(p=!!h&&h.type==="GeometryCollection")?h.geometries.length:1,u=0;u<o;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,T,s,x,c)===!1)return!1;break;case"GeometryCollection":for(a=0;a<f.geometries.length;a++)if(d(f.geometries[a],T,s,x,c)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}else if(d(null,T,s,x,c)===!1)return!1;T++}}function n(r,d){e(r,function(l,a,u,f,o){var h,p=l===null?null:l.type;switch(p){case null:case"Point":case"LineString":case"Polygon":return d(m.feature(l,u,{bbox:f,id:o}),a,0)!==!1&&void 0}switch(p){case"MultiPoint":h="Point";break;case"MultiLineString":h="LineString";break;case"MultiPolygon":h="Polygon"}for(var s=0;s<l.coordinates.length;s++){var x={type:h,coordinates:l.coordinates[s]};if(d(m.feature(x,u),a,s)===!1)return!1}})}function t(r,d){n(r,function(l,a,u){var f=0;if(l.geometry){var o=l.geometry.type;if(o!=="Point"&&o!=="MultiPoint"){var h,p=0,s=0,x=0;return g(l,function(c,T,_,w,k){if(h===void 0||a>p||w>s||k>x)return h=c,p=a,s=w,x=k,void(f=0);var L=m.lineString([h,c],l.properties);if(d(L,a,u,k,f)===!1)return!1;f++,h=c})!==!1&&void 0}}})}function i(r,d){if(!r)throw new Error("geojson is required");n(r,function(l,a,u){if(l.geometry!==null){var f=l.geometry.type,o=l.geometry.coordinates;switch(f){case"LineString":if(d(l,a,u,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h<o.length;h++)if(d(m.lineString(o[h],l.properties),a,u,h)===!1)return!1}}})}te.coordEach=g,te.coordReduce=function(r,d,l,a){var u=l;return g(r,function(f,o,h,p,s){u=o===0&&l===void 0?f:d(u,f,o,h,p,s)},a),u},te.propEach=b,te.propReduce=function(r,d,l){var a=l;return b(r,function(u,f){a=f===0&&l===void 0?u:d(a,u,f)}),a},te.featureEach=y,te.featureReduce=function(r,d,l){var a=l;return y(r,function(u,f){a=f===0&&l===void 0?u:d(a,u,f)}),a},te.coordAll=function(r){var d=[];return g(r,function(l){d.push(l)}),d},te.geomEach=e,te.geomReduce=function(r,d,l){var a=l;return e(r,function(u,f,o,h,p){a=f===0&&l===void 0?u:d(a,u,f,o,h,p)}),a},te.flattenEach=n,te.flattenReduce=function(r,d,l){var a=l;return n(r,function(u,f,o){a=f===0&&o===0&&l===void 0?u:d(a,u,f,o)}),a},te.segmentEach=t,te.segmentReduce=function(r,d,l){var a=l,u=!1;return t(r,function(f,o,h,p,s){a=u===!1&&l===void 0?f:d(a,f,o,h,p,s),u=!0}),a},te.lineEach=i,te.lineReduce=function(r,d,l){var a=l;return i(r,function(u,f,o,h){a=f===0&&l===void 0?u:d(a,u,f,o,h)}),a},te.findSegment=function(r,d){if(d=d||{}
4,!m.isObject(d))throw new Error("options is invalid");var l,a=d.featureIndex||0,u=d.multiFeatureIndex||0,f=d.geometryIndex||0,o=d.segmentIndex||0,h=d.properties;switch(r.type){case"FeatureCollection":a<0&&(a=r.features.length+a),h=h||r.features[a].properties,l=r.features[a].geometry;break;case"Feature":h=h||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var p=l.coordinates;switch(l.type){case"Point":case"MultiPoint":return null;case"LineString":return o<0&&(o=p.length+o-1),m.lineString([p[o],p[o+1]],h,d);case"Polygon":return f<0&&(f=p.length+f),o<0&&(o=p[f].length+o-1),m.lineString([p[f][o],p[f][o+1]],h,d);case"MultiLineString":return u<0&&(u=p.length+u),o<0&&(o=p[u].length+o-1),m.lineString([p[u][o],p[u][o+1]],h,d);case"MultiPolygon":return u<0&&(u=p.length+u),f<0&&(f=p[u].length+f),o<0&&(o=p[u][f].length-o-1),m.lineString([p[u][f][o],p[u][f][o+1]],h,d)}throw new Error("geojson is invalid")},te.findPoint=function(r,d){if(d=d||{},!m.isObject(d))throw new Error("options is invalid");var l,a=d.featureIndex||0,u=d.multiFeatureIndex||0,f=d.geometryIndex||0,o=d.coordIndex||0,h=d.properties;switch(r.type){case"FeatureCollection":a<0&&(a=r.features.length+a),h=h||r.features[a].properties,l=r.features[a].geometry;break;case"Feature":h=h||r.properties,l=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":l=r;break;default:throw new Error("geojson is invalid")}if(l===null)return null;var p=l.coordinates;switch(l.type){case"Point":return m.point(p,h,d);case"MultiPoint":return u<0&&(u=p.length+u),m.point(p[u],h,d);case"LineString":return o<0&&(o=p.length+o),m.point(p[o],h,d);case"Polygon":return f<0&&(f=p.length+f),o<0&&(o=p[f].length+o),m.point(p[f][o],h,d);case"MultiLineString":return u<0&&(u=p.length+u),o<0&&(o=p[u].length+o),m.point(p[u][o],h,d);case"MultiPolygon":return u<0&&(u=p.length+u),f<0&&(f=p[u].length+f),o<0&&(o=p[u][f].length-o),m.point(p[u][f][o],h,d)}throw new Error("geojson is invalid")}},{"@turf/helpers":68}],70:[function(v,$,te){$.exports=function(m){var g=0,b=0,y=0,e=0;return m.map(function(n){var t=(n=n.slice())[0],i=t.toUpperCase();if(t!=i)switch(n[0]=i,t){case"a":n[6]+=y,n[7]+=e;break;case"v":n[1]+=e;break;case"h":n[1]+=y;break;default:for(var r=1;r<n.length;)n[r++]+=y,n[r++]+=e}switch(i){case"Z":y=g,e=b;break;case"H":y=n[1];break;case"V":e=n[1];break;case"M":y=g=n[1],e=b=n[2];break;default:y=n[n.length-2],e=n[n.length-1]}return n})}},{}],71:[function(v,$,te){$.exports=function(m,g){if(!m||m.length==null)throw Error("Argument should be an array");g=g==null?1:Math.floor(g);for(var b=Array(2*g),y=0;y<g;y++){for(var e=-1/0,n=1/0,t=y,i=m.length;t<i;t+=g)m[t]>e&&(e=m[t]),m[t]<n&&(n=m[t]);b[y]=n,b[g+y]=e}return b}},{}],72:[function(v,$,te){$.exports=function(m,g,b){if(typeof Array.prototype.findIndex=="function")return m.findIndex(g,b);if(typeof g!="function")throw new TypeError("predicate must be a function");var y=Object(m),e=y.length;if(e===0)return-1;for(var n=0;n<e;n++)if(g.call(b,y[n],n,y))return n;return-1}},{}],73:[function(v,$,te){var m=v("array-bounds");$.exports=function(g,b,y){if(!g||g.length==null)throw Error("Argument should be an array");b==null&&(b=1),y==null&&(y=m(g,b));for(var e=0;e<b;e++){var n=y[b+e],t=y[e],i=e,r=g.length;if(n===1/0&&t===-1/0)for(i=e;i<r;i+=b)g[i]=g[i]===n?1:g[i]===t?0:.5;else if(n===1/0)for(i=e;i<r;i+=b)g[i]=g[i]===n?1:0;else if(t===-1/0)for(i=e;i<r;i+=b)g[i]=g[i]===t?0:1;else{var d=n-t;for(i=e;i<r;i+=b)isNaN(g[i])||(g[i]=d===0?.5:(g[i]-t)/d)}}return g}},{"array-bounds":71}],74:[function(v,$,te){$.exports=function(m,g){var b=typeof m=="number",y=typeof g=="number";b&&!y?(g=m,m=0):b||y||(m=0,g=0);var e=(g|=0)-(m|=0);if(e<0)throw new Error("array length must be positive");for(var n=new Array(e),t=0,i=m;t<e;t++,i++)n[t]=i;return n}},{}],75:[function(v,$,te){(function(m){(function(){var g=v("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(w,k){if(w===k)return 0;for(var L=w.length,A=k.length,I=0,P=Math.min(L,A);I<P;++I)if(w[I]!==k[I]){L=w[I],A=k[I];break}return L<A?-1:A<L?1:0}function y(w){return m.Buffer&&typeof m.Buffer.isBuffer=="function"?m.Buffer.isBuffer(w):!(w==null||!w._isBuffer)}var e=v("util/"),n=Object.prototype.hasOwnProperty,t=Array.prototype.slice,i=function(){}.name==="foo";function r(w){return Object.prototype.toString.call(w)}function d(w){return!y(w)&&typeof m.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(w):!!w&&(w instanceof DataView||!!(w.buffer&&w.buffer instanceof ArrayBuffer)))}var l=$.exports=p,a=/\s*function\s+([^\(\s]*)\s*/;function u(w){if(e.isFunction(w)){if(i)return w.name;var k=w.toString().match(a);return k&&k[1]}}function f(w,k){return typeof w=="string"?w.length<k?w:w.slice(0,k):w}function o(w){if(i||!e.isFunction(w))return e.inspect(w);var k=u(w);return"[Function"+(k?": "+k:"")+"]"}function h(w,k,L,A,I){throw new l.AssertionError({message:L,actual:w,expected:k,operator:A,stackStartFunction:I})}function p(w,k){w||h(w,!0,k,"==",l.ok)}function s(w,k,L,A){if(w===k)return!0;
9if(y(w)&&y(k))return b(w,k)===0;if(e.isDate(w)&&e.isDate(k))return w.getTime()===k.getTime();if(e.isRegExp(w)&&e.isRegExp(k))return w.source===k.source&&w.global===k.global&&w.multiline===k.multiline&&w.lastIndex===k.lastIndex&&w.ignoreCase===k.ignoreCase;if(w!==null&&typeof w=="object"||k!==null&&typeof k=="object"){if(d(w)&&d(k)&&r(w)===r(k)&&!(w instanceof Float32Array||w instanceof Float64Array))return b(new Uint8Array(w.buffer),new Uint8Array(k.buffer))===0;if(y(w)!==y(k))return!1;var I=(A=A||{actual:[],expected:[]}).actual.indexOf(w);return I!==-1&&I===A.expected.indexOf(k)||(A.actual.push(w),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),s(P,S,E);var V,Z,K=_(P),G=_(S);if(K.length!==G.length)return!1;for(K.sort(),G.sort(),Z=K.length-1;Z>=0;Z--)if(K[Z]!==G[Z])return!1;for(Z=K.length-1;Z>=0;Z--)if(V=K[Z],!s(P[V],S[V],E,D))return!1;return!0}(w,k,L,A))}return L?w===k:w==k}function x(w){return Object.prototype.toString.call(w)=="[object Arguments]"}function c(w,k){if(!w||!k)return!1;if(Object.prototype.toString.call(k)=="[object RegExp]")return k.test(w);try{if(w instanceof k)return!0}catch{}return!Error.isPrototypeOf(k)&&k.call({},w)===!0}function T(w,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:"."),w&&!I&&h(I,L,"Missing expected exception"+A);var P=typeof A=="string",S=!w&&I&&!L;if((!w&&e.isError(I)&&P&&c(I,L)||S)&&h(I,L,"Got unwanted exception"+A),w&&I&&L&&!c(I,L)||!w&&I)throw I}l.AssertionError=function(w){this.name="AssertionError",this.actual=w.actual,this.expected=w.expected,this.operator=w.operator,w.message?(this.message=w.message,this.generatedMessage=!1):(this.message=function(E){return f(o(E.actual),128)+" "+E.operator+" "+f(o(E.expected),128)}(this),this.generatedMessage=!0);var k=w.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(l.AssertionError,Error),l.fail=h,l.ok=p,l.equal=function(w,k,L){w!=k&&h(w,k,L,"==",l.equal)},l.notEqual=function(w,k,L){w==k&&h(w,k,L,"!=",l.notEqual)},l.deepEqual=function(w,k,L){s(w,k,!1)||h(w,k,L,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(w,k,L){s(w,k,!0)||h(w,k,L,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(w,k,L){s(w,k,!1)&&h(w,k,L,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function w(k,L,A){s(k,L,!0)&&h(k,L,A,"notDeepStrictEqual",w)},l.strictEqual=function(w,k,L){w!==k&&h(w,k,L,"===",l.strictEqual)},l.notStrictEqual=function(w,k,L){w===k&&h(w,k,L,"!==",l.notStrictEqual)},l.throws=function(w,k,L){T(!0,w,k,L)},l.doesNotThrow=function(w,k,L){T(!1,w,k,L)},l.ifError=function(w){if(w)throw w},l.strict=g(function w(k,L){k||h(k,!0,L,"==",w)},l,{equal:l.strictEqual,deepEqual:l.deepStrictEqual,notEqual:l.notStrictEqual,notDeepEqual:l.notDeepStrictEqual}),l.strict.strict=l.strict;var _=Object.keys||function(w){var k=[];for(var L in w)n.call(w,L)&&k.push(L);return k}}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{"object-assign":247,"util/":78}],76:[function(v,$,te){typeof Object.create=="function"?$.exports=function(m,g){m.super_=g,m.prototype=Object.create(g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})}:$.exports=function(m,g){m.super_=g;var b=function(){};b.prototype=g.prototype,m.prototype=new b,m.prototype.constructor=m}},{}],77:[function(v,$,te){$.exports=function(m){return m&&typeof m=="object"&&typeof m.copy=="function"&&typeof m.fill=="function"&&typeof m.readUInt8=="function"}},{}],78:[function(v,$,te){(function(m,g){(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(g.process))return function(){return te.deprecate(P,S).apply(this,arguments)};if(m.noDeprecation===!0)return P;var E=!1;return function(){if(!E){if(m.throwDeprecation)throw new Error(S);m.traceDeprecation?console.trace(S):console.error(S),E=!0}return P.apply(this,arguments)}};var y,e={};function n(P,S){var E={seen:[],stylize:i};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 i(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,113 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(o(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,ee){N[U]=!0}),N}(H);if(P.showHidden&&(H=Object.getOwnPropertyNames(S)),T(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(s(S))return P.stylize(RegExp.prototype.toString.call(S),"regexp");if(c(S))return P.stylize(Date.prototype.toString.call(S),"date");if(T(S))return d(S)}var K,G="",W=!1,Q=["{","}"];return a(S)&&(W=!0,Q=["[","]"]),_(S)&&(G=" [Function"+(S.name?": "+S.name:"")+"]"),s(S)&&(G=" "+RegExp.prototype.toString.call(S)),c(S)&&(G=" "+Date.prototype.toUTCString.call(S)),T(S)&&(G=" "+d(S)),H.length!==0||W&&S.length!=0?E<0?s(S)?P.stylize(RegExp.prototype.toString.call(S),"regexp"):P.stylize("[Object]","special"):(P.seen.push(S),K=W?function(R,N,U,ee,j){for(var X=[],J=0,re=N.length;J<re;++J)I(N,String(J))?X.push(l(R,N,U,ee,String(J),!0)):X.push("");return j.forEach(function(ne){ne.match(/^\d+$/)||X.push(l(R,N,U,ee,ne,!0))}),X}(P,S,E,V,H):H.map(function(R){return l(P,S,E,V,R,W)}),P.seen.pop(),function(R,N,U){return R.reduce(function(ee,j){return j.indexOf(` 12`)>=0,ee+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,G,Q)):Q[0]+G+Q[1]}function d(P){return"["+Error.prototype.toString.call(P)+"]"}function l(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(G){return" "+G}).join(` 17`).substr(2):` 18`+Z.split(` 19`).map(function(G){return" "+G}).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 a(P){return Array.isArray(P)}function u(P){return typeof P=="boolean"}function f(P){return P===null}function o(P){return typeof P=="number"}function h(P){return typeof P=="string"}function p(P){return P===void 0}function s(P){return x(P)&&w(P)==="[object RegExp]"}function x(P){return typeof P=="object"&&P!==null}function c(P){return x(P)&&w(P)==="[object Date]"}function T(P){return x(P)&&(w(P)==="[object Error]"||P instanceof Error)}function _(P){return typeof P=="function"}function w(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(y)&&(y=m.env.NODE_DEBUG||""),P=P.toUpperCase(),!e[P])if(new RegExp("\\b"+P+"\\b","i").test(y)){var S=m.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=a,te.isBoolean=u,te.isNull=f,te.isNullOrUndefined=function(P){return P==null},te.isNumber=o,te.isString=h,te.isSymbol=function(P){return typeof P=="symbol"},te.isUndefined=p,te.isRegExp=s,te.isObject=x,te.isDate=c,te.isError=T,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=v("./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=v("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,v("_process"),typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":77,_process:277,inherits:76}],79:[function(v,$,te){te.byteLength=function(r){var d=t(r),l=d[0],a=d[1];return 3*(l+a)/4-a},te.toByteArray=function(r){var d,l,a=t(r),u=a[0],f=a[1],o=new b(function(s,x,c){return 3*(x+c)/4-c}(0,u,f)),h=0,p=f>0?u-4:u;for(l=0;l<p;l+=4)d=g[r.charCodeAt(l)]<<18|g[r.charCodeAt(l+1)]<<12|g[r.charCodeAt(l+2)]<<6|g[r.charCodeAt(l+3)],o[h++]=d>>16&255,o[h++]=d>>8&255,o[h++]=255&d;return f===2&&(d=g[r.charCodeAt(l)]<<2|g[r.charCodeAt(l+1)]>>4,o[h++]=255&d),f===1&&(d=g[r.charCodeAt(l)]<<10|g[r.charCodeAt(l+1)]<<4|g[r.charCodeAt(l+2)]>>2,o[h++]=d>>8&255,o[h++]=255&d),o},te.fromByteArray=function(r){for(var d,l=r.length,a=l%3,u=[],f=0,o=l-a;f<o;f+=16383)u.push(i(r,f,f+16383>o?o:f+16383));return a===1?(d=r[l-1],u.push(m[d>>2]+m[d<<4&63]+"==")):a===2&&(d=(r[l-2]<<8)+r[l-1],u.push(m[d>>10]+m[d>>4&63]+m[d<<2&63]+"=")),u.join("")};for(var m=[],g=[],b=typeof Uint8Array<"u"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=y.length;e<n;++e)m[e]=y[e],g[y.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 l=r.indexOf("=");return l===-1&&(l=d),[l,l===d?0:4-l%4]}function i(r,d,l){for(var a,u,f=[],o=d;o<l;o+=3)a=(r[o]<<16&16711680)+(r[o+1]<<8&65280)+(255&r[o+2]),f.push(m[(u=a)>>18&63]+m[u>>12&63]+m[u>>6&63]+m[63&u]);return f.join("")}g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63},{}],80:[function(v,$,te){function m(t,i,r,d,l){for(var a=l+1;d<=l;){var u=d+l>>>1,f=t[u];(r!==void 0?r(f,i):f-i)>=0?(a=u,l=u-1):d=u+1}return a}function g(t,i,r,d,l){for(var a=l+1;d<=l;){var u=d+l>>>1,f=t[u];(r!==void 0?r(f,i):f-i)>0?(a=u,l=u-1):d=u+1}return a}function b(t,i,r,d,l){for(var a=d-1;d<=l;){var u=d+l>>>1,f=t[u];(r!==void 0?r(f,i):f-i)<0?(a=u,d=u+1):l=u-1}return a}function y(t,i,r,d,l){for(var a=d-1;d<=l;){var u=d+l>>>1,f=t[u];(r!==void 0?r(f,i):f-i)<=0?(a=u,d=u+1):l=u-1}return a}function e(t,i,r,d,l){for(;d<=l;){var a=d+l>>>1,u=t[a],f=r!==void 0?r(u,i):u-i;if(f===0)return a;f<=0?d=a+1:l=a-1}return-1}function n(t,i,r,d,l,a){return typeof r=="function"?a(t,i,r,d===void 0?0:0|d,l===void 0?t.length-1:0|l):a(t,i,void 0,r===void 0?0:0|r,d===void 0?t.length-1:0|d)}$.exports={ge:function(t,i,r,d,l){return n(t,i,r,d,l,m)},gt:function(t,i,r,d,l){return n(t,i,r,d,l,g)},lt:function(t,i,r,d,l){return n(t,i,r,d,l,b)},le:function(t,i,r,d,l){return n(t,i,r,d,l,y)},eq:function(t,i,r,d,l){return n(t,i,r,d,l,e)}}},{}],81:[function(v,$,te){function m(b){var y=32;return(b&=-b)&&y--,65535&b&&(y-=16),16711935&b&&(y-=8),252645135&b&&(y-=4),858993459&b&&(y-=2),1431655765&b&&(y-=1),y}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 y=b>>31;return(b^y)-y},te.min=function(b,y){return y^(b^y)&-(b<y)},te.max=function(b,y){return b^(b^y)&-(b<y)},te.isPow2=function(b){return!(b&b-1||!b)},te.log2=function(b){var y,e;return y=(b>65535)<<4,y|=e=((b>>>=y)>255)<<3,y|=e=((b>>>=e)>
vendor: 1,774 bytes, line 20
2015)<<2,(y|=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=m,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 g=new Array(256);(function(b){for(var y=0;y<256;++y){var e=y,n=y,t=7;for(e>>>=1;e;e>>>=1)n<<=1,n|=1&e,--t;b[y]=n<<t&255}})(g),te.reverse=function(b){return g[255&b]<<24|g[b>>>8&255]<<16|g[b>>>16&255]<<8|g[b>>>24&255]},te.interleave2=function(b,y){return(b=1431655765&((b=858993459&((b=252645135&((b=16711935&((b&=65535)|b<<8))|b<<4))|b<<2))|b<<1))|(y=1431655765&((y=858993459&((y=252645135&((y=16711935&((y&=65535)|y<<8))|y<<4))|y<<2))|y<<1))<<1},te.deinterleave2=function(b,y){return(b=65535&((b=16711935&((b=252645135&((b=858993459&((b=b>>>y&1431655765)|b>>>1))|b>>>2))|b>>>4))|b>>>16))<<16>>16},te.interleave3=function(b,y,e){return b=1227133513&((b=3272356035&((b=251719695&((b=4278190335&((b&=1023)|b<<16))|b<<8))|b<<4))|b<<2),(b|=(y=1227133513&((y=3272356035&((y=251719695&((y=4278190335&((y&=1023)|y<<16))|y<<8))|y<<4))|y<<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,y){return(b=1023&((b=4278190335&((b=251719695&((b=3272356035&((b=b>>>y&1227133513)|b>>>2))|b>>>4))|b>>>8))|b>>>16))<<22>>22},te.nextCombination=function(b){var y=b|b-1;return y+1|(~y&-~y)-1>>>m(b)+1}},{}],82:[function(v,$,te){var m=v("clamp");
20$.exports=function(e,n){n||(n={});var t,i,r,d,l,a,u,f,o,h,p,s=n.cutoff==null?.25:n.cutoff,x=n.radius==null?8:n.radius,c=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,i=n.height,d=e,a=n.stride?n.stride:Math.floor(e.length/t/i)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=(f=e).getContext("2d"),t=f.width,i=f.height,o=u.getImageData(0,0,t,i),d=o.data,a=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(f=e.canvas,u=e,t=f.width,i=f.height,o=u.getImageData(0,0,t,i),d=o.data,a=4):window.ImageData&&e instanceof window.ImageData&&(o=e,t=e.width,i=e.height,d=o.data,a=4);if(r=Math.max(t,i),window.Uint8ClampedArray&&d instanceof window.Uint8ClampedArray||window.Uint8Array&&d instanceof window.Uint8Array)for(l=d,d=Array(t*i),h=0,p=l.length;h<p;h++)d[h]=l[h*a+c]/255;else if(a!==1)throw Error("Raw data can have only 1 value per pixel");var T=Array(t*i),_=Array(t*i),w=Array(r),k=Array(r),L=Array(r+1),A=Array(r);for(h=0,p=t*i;h<p;h++){var I=d[h];T[h]=I===1?0:I===0?g:Math.pow(Math.max(0,.5-I),2),_[h]=I===1?g:I===0?0:Math.pow(Math.max(0,I-.5),2)}b(T,t,i,w,k,A,L),b(_,t,i,w,k,A,L);var P=window.Float32Array?new Float32Array(t*i):new Array(t*i);for(h=0,p=t*i;h<p;h++)P[h]=m(1-((T[h]-_[h])/x+s),0,1);return P};var g=1e20;function b(e,n,t,i,r,d,l){for(var a=0;a<n;a++){for(var u=0;u<t;u++)i[u]=e[u*n+a];for(y(i,r,d,l,t),u=0;u<t;u++)e[u*n+a]=r[u]}for(u=0;u<t;u++){for(a=0;a<n;a++)i[a]=e[u*n+a];for(y(i,r,d,l,n),a=0;a<n;a++)e[u*n+a]=Math.sqrt(r[a])}}function y(e,n,t,i,r){t[0]=0,i[0]=-g,i[1]=+g;for(var d=1,l=0;d<r;d++){for(var a=(e[d]+d*d-(e[t[l]]+t[l]*t[l]))/(2*d-2*t[l]);a<=i[l];)l--,a=(e[d]+d*d-(e[t[l]]+t[l]*t[l]))/(2*d-2*t[l]);t[++l]=d,i[l]=a,i[l+1]=+g}for(d=0,l=0;d<r;d++){for(;i[l+1]<d;)l++;n[d]=(d-t[l])*(d-t[l])+e[t[l]]}}},{clamp:86}],83:[function(v,$,te){},{}],84:[function(v,$,te){var m,g=typeof Reflect=="object"?Reflect:null,b=g&&typeof g.apply=="function"?g.apply:function(o,h,p){return Function.prototype.apply.call(o,h,p)};m=g&&typeof g.ownKeys=="function"?g.ownKeys:Object.getOwnPropertySymbols?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:function(o){return Object.getOwnPropertyNames(o)};var y=Number.isNaN||function(o){return o!=o};function e(){e.init.call(this)}$.exports=e,$.exports.once=function(o,h){return new Promise(function(p,s){function x(){c!==void 0&&o.removeListener("error",c),p([].slice.call(arguments))}var c;h!=="error"&&(c=function(T){o.removeListener(h,x),s(T)},o.once("error",c)),o.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(o){if(typeof o!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}function i(o){return o._maxListeners===void 0?e.defaultMaxListeners:o._maxListeners}function r(o,h,p,s){var x,c,T,_;if(t(p),(c=o._events)===void 0?(c=o._events=Object.create(null),o._eventsCount=0):(c.newListener!==void 0&&(o.emit("newListener",h,p.listener?p.listener:p),c=o._events),T=c[h]),T===void 0)T=c[h]=p,++o._eventsCount;else if(typeof T=="function"?T=c[h]=s?[p,T]:[T,p]:s?T.unshift(p):T.push(p),(x=i(o))>0&&T.length>x&&!T.warned){T.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+T.length+" "+String(h)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=o,w.type=h,w.count=T.length,_=w,console&&console.warn&&console.warn(_)}return o}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 l(o,h,p){var s={fired:!1,wrapFn:void 0,target:o,type:h,listener:p},x=d.bind(s);return x.listener=p,s.wrapFn=x,x}function a(o,h,p){var s=o._events;if(s===void 0)return[];var x=s[h];return x===void 0?[]:typeof x=="function"?p?[x.listener||x]:[x]:p?function(c){for(var T=new Array(c.length),_=0;_<T.length;++_)T[_]=c[_].listener||c[_];return T}(x):f(x,x.length)}function u(o){var h=this._events;if(h!==void 0){var p=h[o];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}function f(o,h){for(var p=new Array(h),s=0;s<h;++s)p[s]=o[s];return p}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return n}
vendor: 3,617 bytes, line 20
20,set:function(o){if(typeof o!="number"||o<0||y(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");n=o}}),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(o){if(typeof o!="number"||o<0||y(o))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+o+".");return this._maxListeners=o,this},e.prototype.getMaxListeners=function(){return i(this)},e.prototype.emit=function(o){for(var h=[],p=1;p<arguments.length;p++)h.push(arguments[p]);var s=o==="error",x=this._events;if(x!==void 0)s=s&&x.error===void 0;else if(!s)return!1;if(s){var c;if(h.length>0&&(c=h[0]),c instanceof Error)throw c;var T=new Error("Unhandled error."+(c?" ("+c.message+")":""));throw T.context=c,T}var _=x[o];if(_===void 0)return!1;if(typeof _=="function")b(_,this,h);else{var w=_.length,k=f(_,w);for(p=0;p<w;++p)b(k[p],this,h)}return!0},e.prototype.addListener=function(o,h){return r(this,o,h,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(o,h){return r(this,o,h,!0)},e.prototype.once=function(o,h){return t(h),this.on(o,l(this,o,h)),this},e.prototype.prependOnceListener=function(o,h){return t(h),this.prependListener(o,l(this,o,h)),this},e.prototype.removeListener=function(o,h){var p,s,x,c,T;if(t(h),(s=this._events)===void 0)return this;if((p=s[o])===void 0)return this;if(p===h||p.listener===h)--this._eventsCount==0?this._events=Object.create(null):(delete s[o],s.removeListener&&this.emit("removeListener",o,p.listener||h));else if(typeof p!="function"){for(x=-1,c=p.length-1;c>=0;c--)if(p[c]===h||p[c].listener===h){T=p[c].listener,x=c;break}if(x<0)return this;x===0?p.shift():function(_,w){for(;w+1<_.length;w++)_[w]=_[w+1];_.pop()}(p,x),p.length===1&&(s[o]=p[0]),s.removeListener!==void 0&&this.emit("removeListener",o,T||h)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(o){var h,p,s;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[o]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete p[o]),this;if(arguments.length===0){var x,c=Object.keys(p);for(s=0;s<c.length;++s)(x=c[s])!=="removeListener"&&this.removeAllListeners(x);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(h=p[o])=="function")this.removeListener(o,h);else if(h!==void 0)for(s=h.length-1;s>=0;s--)this.removeListener(o,h[s]);return this},e.prototype.listeners=function(o){return a(this,o,!0)},e.prototype.rawListeners=function(o){return a(this,o,!1)},e.listenerCount=function(o,h){return typeof o.listenerCount=="function"?o.listenerCount(h):u.call(o,h)},e.prototype.listenerCount=u,e.prototype.eventNames=function(){return this._eventsCount>0?m(this._events):[]}},{}],85:[function(v,$,te){(function(m){(function(){var g=v("base64-js"),b=v("ieee754");te.Buffer=e,te.SlowBuffer=function(R){return+R!=R&&(R=0),e.alloc(+R)},te.INSPECT_MAX_BYTES=50;function y(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 i(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|l(X,J),ne=y(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 ee=R.valueOf&&R.valueOf();if(ee!=null&&ee!==R)return e.from(ee,N,U);var j=function(X){if(e.isBuffer(X)){var J=0|d(X.length),re=y(J);return re.length===0||X.copy(re,0,0,J),re}if(X.length!==void 0)return typeof X.length!="number"||Q(X.length)?y(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 i(R){return t(R),y(R<0?0:0|d(R))}function r(R){for(var N=R.length<0?0:0|d(R.length),U=y(N),ee=0;ee<N;ee+=1)U[ee]=255&R[ee];return U}function d(R){if(R>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|R}function l(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,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&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 ee?-1:Z(R).length;N=(""+N).toLowerCase(),j=!0}}function a(R,N,U){var ee=!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 w(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(ee)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),ee=!0}}function u(R,N,U){var ee=R[N];R[N]=R[U],R[U]=ee}function f(R,N,U,ee,j){if(R.length===0)return-1;if(typeof U=="string"?(ee=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),Q(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,ee)),e.isBuffer(N))return N.length===0?-1:o(R,N,U,ee,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):o(R,[N],U,ee,j);throw new TypeError("val must be string, number or Buffer")}function o(R,N,U,ee,j){var X,J=1,re=R.length,ne=N.length;if(ee!==void 0&&((ee=String(ee).toLowerCase())==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="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,ee){U=Number(U)||0;var j=R.length-U;ee?(ee=Number(ee))>j&&(ee=j):ee=j;var X=N.length;ee>X/2&&(ee=X/2);for(var J=0;J<ee;++J){var re=parseInt(N.substr(2*J,2),16);if(Q(re))return J;R[U+J]=re}return J}function p(R,N,U,ee){return G(Z(N,R.length-U),R,U,ee)}function s(R,N,U,ee){return G(function(j){for(var X=[],J=0;J<j.length;
20++J)X.push(255&j.charCodeAt(J));return X}(N),R,U,ee)}function x(R,N,U,ee){return s(R,N,U,ee)}function c(R,N,U,ee){return G(K(N),R,U,ee)}function T(R,N,U,ee){return G(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,ee)}function _(R,N,U){return N===0&&U===R.length?g.fromByteArray(R):g.fromByteArray(R.slice(N,U))}function w(R,N,U){U=Math.min(R.length,U);for(var ee=[],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,ee.push(oe>>>10&1023|55296),oe=56320|1023&oe),ee.push(oe),j+=pe}return function(ce){var de=ce.length;if(de<=4096)return String.fromCharCode.apply(String,ce);for(var xe="",_e=0;_e<de;)xe+=String.fromCharCode.apply(String,ce.slice(_e,_e+=4096));return xe}(ee)}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(ee,j,X){return t(ee),ee<=0?y(ee):j!==void 0?typeof X=="string"?y(ee).fill(j,X):y(ee).fill(j):y(ee)}(R,N,U)},e.allocUnsafe=function(R){return i(R)},e.allocUnsafeSlow=function(R){return i(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,ee=N.length,j=0,X=Math.min(U,ee);j<X;++j)if(R[j]!==N[j]){U=R[j],ee=N[j];break}return U<ee?-1:ee<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 ee=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(ee,j),j+=X.length}return ee},e.byteLength=l,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?w(this,0,R):a.apply(this,arguments)}
vendor: 7,779 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,ee,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),ee===void 0&&(ee=0),j===void 0&&(j=this.length),N<0||U>R.length||ee<0||j>this.length)throw new RangeError("out of range index");if(ee>=j&&N>=U)return 0;if(ee>=j)return-1;if(N>=U)return 1;if(this===R)return 0;for(var X=(j>>>=0)-(ee>>>=0),J=(U>>>=0)-(N>>>=0),re=Math.min(X,J),ne=this.slice(ee,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,ee){if(N===void 0)ee="utf8",U=this.length,N=0;else if(U===void 0&&typeof N=="string")ee=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,ee===void 0&&(ee="utf8")):(ee=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");ee||(ee="utf8");for(var X=!1;;)switch(ee){case"hex":return h(this,R,N,U);case"utf8":case"utf-8":return p(this,R,N,U);case"ascii":return s(this,R,N,U);case"latin1":case"binary":return x(this,R,N,U);case"base64":return c(this,R,N,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,R,N,U);default:if(X)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).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 ee="";U=Math.min(R.length,U);for(var j=N;j<U;++j)ee+=String.fromCharCode(127&R[j]);return ee}function L(R,N,U){var ee="";U=Math.min(R.length,U);for(var j=N;j<U;++j)ee+=String.fromCharCode(R[j]);return ee}function A(R,N,U){var ee=R.length;(!N||N<0)&&(N=0),(!U||U<0||U>ee)&&(U=ee);for(var j="",X=N;X<U;++X)j+=V(R[X]);return j}function I(R,N,U){for(var ee=R.slice(N,U),j="",X=0;X<ee.length;X+=2)j+=String.fromCharCode(ee[X]+256*ee[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,ee,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+ee>R.length)throw new RangeError("Index out of range")}function E(R,N,U,ee,j,X){if(U+ee>R.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function D(R,N,U,ee,j){return N=+N,U>>>=0,j||E(R,0,U,4),b.write(R,N,U,ee,23,4),U+4}function F(R,N,U,ee,j){return N=+N,U>>>=0,j||E(R,0,U,8),b.write(R,N,U,ee,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 ee=this.subarray(R,N);return ee.__proto__=e.prototype,ee},e.prototype.readUIntLE=function(R,N,U){R>>>=0,N>>>=0,U||P(R,N,this.length);for(var ee=this[R],j=1,X=0;++X<N&&(j*=256);)ee+=this[R+X]*j;return ee},e.prototype.readUIntBE=function(R,N,U){R>>>=0,N>>>=0,U||P(R,N,this.length);for(var ee=this[R+--N],j=1;N>0&&(j*=256);)ee+=this[R+--N]*j;return ee},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 ee=this[R],j=1,X=0;++X<N&&(j*=256);)ee+=this[R+X]*j;return ee>=(j*=128)&&(ee-=Math.pow(2,8*N)),ee},e.prototype.readIntBE=function(R,N,U){R>>>=0,N>>>=0,U||P(R,N,this.length);for(var ee=N,j=1,X=this[R+--ee];ee>0&&(j*=256);)X+=this[R+--ee]*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,ee){R=+R,N>>>=0,U>>>=0,ee||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,ee){R=+R,N>>>=0,U>>>=0,ee||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,ee){if(R=+R,N>>>=0,!ee){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,ee){if(R=+R,N>>>=0,!ee){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,ee){if(!e.isBuffer(R))throw new TypeError("argument should be a Buffer");if(U||(U=0),ee||ee===0||(ee=this.length),N>=R.length&&(N=R.length),N||(N=0),ee>0&&ee<U&&(ee=U),ee===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(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),R.length-N<ee-U&&(ee=R.length-N+U);var j=ee-U;if(this===R&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(N,U,ee);else if(this===R&&U<N&&N<ee)for(var X=j-1;X>=0;--X)R[X+N]=this[X+U];else Uint8Array.prototype.set.call(R,this.subarray(U,ee),N);return j},e.prototype.fill=function(R,N,U,ee){if(typeof R=="string"){if(typeof N=="string"?(ee=N,N=0,U=this.length):typeof U=="string"&&(ee=U,U=this.length),ee!==void 0&&typeof ee!="string")throw new TypeError("encoding must be a string");if(typeof ee=="string"&&!e.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);if(R.length===1){var j=R.charCodeAt(0);(ee==="utf8"&&j<128||ee==="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,ee),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 ee=R.length,j=null,X=[],J=0;J<ee;++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===ee){(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 g.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 G(R,N,U,ee){for(var j=0;j<ee&&!(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 Q(R){return R!=R}}).call(this)}).call(this,v("buffer").Buffer)},{"base64-js":79,buffer:85,ieee754:230}],86:[function(v,$,te){$.exports=function(m,g,b){return g<b?m<g?g:m>b?b:m:m<b?b:m>g?g:m}},{}],87:[function(v,$,te){var m=v("clamp");function g(b,y){y==null&&(y=!0);var e=b[0],n=b[1],t=b[2],i=b[3];return i==null&&(i=y?1:255),y&&(e*=255,n*=255,t*=255,i*=255),16777216*(e=255&m(e,0,255))+((n=255&m(n,0,255))<<16)+((t=255&m(t,0,255))<<8)+(i=255&m(i,0,255))}$.exports=g,$.exports.to=g,$.exports.from=function(b,y){var e=(b=+b)>>>24,n=(16711680&b)>>>16,t=(65280&b)>>>8,i=255&b;return y===!1?[e,n,t,i]:[e/255,n/255,t/255,i/255]}},{clamp:86}],88:[function(v,$,te){$.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(v,$,te){var m=v("color-rgba"),g=v("clamp"),b=v("dtype");$.exports=function(y,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 y.length&&typeof y!="string"||((y=m(y))[0]/=255,y[1]/=255,y[2]/=255),function(i){return i instanceof Uint8Array||i instanceof Uint8ClampedArray||!!(Array.isArray(i)&&(i[0]>1||i[0]===0)&&(i[1]>1||i[1]===0)&&(i[2]>1||i[2]===0)&&(!i[3]||i[3]>1))}(y)?(n[0]=y[0],n[1]=y[1],n[2]=y[2],n[3]=y[3]!=null?y[3]:255,t&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(t?(n[0]=y[0],n[1]=y[1],n[2]=y[2],n[3]=y[3]!=null?y[3]:1):(n[0]=g(Math.floor(255*y[0]),0,255),n[1]=g(Math.floor(255*y[1]),0,255),n[2]=g(Math.floor(255*y[2]),0,255),n[3]=y[3]==null?255:g(Math.floor(255*y[3]),0,255)),n)}},{clamp:86,"color-rgba":91,dtype:127}],90:[function(v,$,te){(function(m){(function(){var g=v("color-name"),b=v("is-plain-obj"),y=v("defined");$.exports=function(n){var t,i,r=[],d=1;if(typeof n=="string")if(g[n])r=g[n].slice(),i="rgb";else if(n==="transparent")d=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(n)){var l=(f=n.slice(1)).length;d=1,l<=4?(r=[parseInt(f[0]+f[0],16),parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16)],l===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)],l===8&&(d=parseInt(f[6]+f[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(n)){var a=t[1],u=a==="rgb",f=a.replace(/a$/,"");i=f,l=f==="cmyk"?4:f==="gray"?1:3,r=t[2].trim().split(/\s*,\s*/).map(function(h,p){if(/%$/.test(h))return p===l?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)}),a===f&&r.push(1),d=u||r[l]===void 0?1:r[l],r=r.slice(0,l)}else n.length>10&&/[0-9](?:\s|\/)/.test(n)&&(r=n.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=n.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(n))if(b(n)){var o=y(n.r,n.red,n.R,null);o!==null?(i="rgb",r=[o,y(n.g,n.green,n.G),y(n.b,n.blue,n.B)]):(i="hsl",r=[y(n.h,n.hue,n.H),y(n.s,n.saturation,n.S),y(n.l,n.lightness,n.L,n.b,n.brightness)]),d=y(n.a,n.alpha,n.opacity,1),n.opacity!=null&&(d/=100)}else(Array.isArray(n)||m.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(n))&&(r=[n[0],n[1],n[2]],i="rgb",d=n.length===4?n[3]:1);else i="rgb",r=[n>>>16,(65280&n)>>>8,255&n];return{space:i,values:r,alpha:d}};var e={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{"color-name":88,defined:124,"is-plain-obj":236}],91:[function(v,$,te){var m=v("color-parse"),g=v("color-space/hsl"),b=v("clamp");$.exports=function(y){var e,n=m(y);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=g.rgb(e)),e.push(b(n.alpha,0,1)),e):[]}},{clamp:86,"color-parse":90,"color-space/hsl":92}],92:[function(v,$,te){var m=v("./rgb");$.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(g){var b,y,e,n,t,i=g[0]/360,r=g[1]/100,d=g[2]/100;if(r===0)return[t=255*d,t,t];b=2*d-(y=d<.5?d*(1+r):d+r-d*r),n=[0,0,0];for(var l=0;l<3;l++)(e=i+1/3*-(l-1))<0?e++:e>1&&e--,t=6*e<1?b+6*(y-b)*e:2*e<1?y:3*e<2?b+(y-b)*(2/3-e)*6:b,n[l]=255*t;return n}},m.hsl=function(g){var b,y,e=g[0]/255,n=g[1]/255,t=g[2]/255,i=Math.min(e,n,t),r=Math.max(e,n,t),d=r-i;return r===i?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),y=(i+r)/2,[b,100*(r===i?0:y<=.5?d/(r+i):d/(2-r-i)),100*y]}},{"./rgb":93}],93:[function(v,$,te){$.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],94:[function(v,$,te){$.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|\xE7)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|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)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|\xE3)o.?tom(e|\xE9)",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(v,$,te){$.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],96:[function(v,$,te){$.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],97:[function(v,$,te){$.exports=["normal","italic","oblique"]},{}],98:[function(v,$,te){$.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],99:[function(v,$,te){$.exports={parse:v("./parse"),stringify:v("./stringify")}},{"./parse":101,"./stringify":102}],100:[function(v,$,te){var m=v("css-font-size-keywords");$.exports={isSize:function(g){return/^[\d\.]/.test(g)||g.indexOf("/")!==-1||m.indexOf(g)!==-1}}},{"css-font-size-keywords":95}],101:[function(v,$,te){var m=v("unquote"),g=v("css-global-keywords"),b=v("css-system-font-keywords"),y=v("css-font-weight-keywords"),e=v("css-font-style-keywords"),n=v("css-font-stretch-keywords"),t=v("string-split-by"),i=v("./lib/util").isSize;$.exports=d;var r=d.cache={};function d(a){if(typeof a!="string")throw new Error("Font argument must be a string.");if(r[a])return r[a];if(a==="")throw new Error("Cannot parse an empty string.");if(b.indexOf(a)!==-1)return r[a]={system:a};for(var u,f={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},o=t(a,/\s+/);u=o.shift();){if(g.indexOf(u)!==-1)return["style","variant","weight","stretch"].forEach(function(p){f[p]=u}),r[a]=f;if(e.indexOf(u)===-1)if(u!=="normal"&&u!=="small-caps")if(n.indexOf(u)===-1){if(y.indexOf(u)===-1){if(i(u)){var h=t(u,"/");if(f.size=h[0],h[1]!=null?f.lineHeight=l(h[1]):o[0]==="/"&&(o.shift(),f.lineHeight=l(o.shift())),!o.length)throw new Error("Missing required font-family.");
20return f.family=t(o.join(" "),/\s*,\s*/).map(m),r[a]=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 l(a){var u=parseFloat(a);return u.toString()===a?u:a}},{"./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(v,$,te){var m=v("pick-by-alias"),g=v("./lib/util").isSize,b=u(v("css-global-keywords")),y=u(v("css-system-font-keywords")),e=u(v("css-font-weight-keywords")),n=u(v("css-font-style-keywords")),t=u(v("css-font-stretch-keywords")),i={normal:1,"small-caps":1},r={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},d="1rem",l="serif";function a(f,o){if(f&&!o[f]&&!b[f])throw Error("Unknown keyword `"+f+"`");return f}function u(f){for(var o={},h=0;h<f.length;h++)o[f[h]]=1;return o}$.exports=function(f){if((f=m(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&&a(f.system,y),f.system;if(a(f.style,n),a(f.variant,i),a(f.weight,e),a(f.stretch,t),f.size==null&&(f.size=d),typeof f.size=="number"&&(f.size+="px"),!g)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=l),Array.isArray(f.family)&&(f.family.length||(f.family=[l]),f.family=f.family.map(function(h){return r[h]?h:'"'+h+'"'}).join(", "));var o=[];return o.push(f.style),f.variant!==f.style&&o.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&o.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&o.push(f.stretch),o.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),o.push(f.family),o.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(v,$,te){$.exports=["inherit","initial","unset"]},{}],104:[function(v,$,te){$.exports=["caption","icon","menu","message-box","small-caption","status-bar"]},{}],105:[function(v,$,te){var m,g=v("type/value/is"),b=v("type/value/ensure"),y=v("type/plain-function/ensure"),e=v("es5-ext/object/copy"),n=v("es5-ext/object/normalize-options"),t=v("es5-ext/object/map"),i=Function.prototype.bind,r=Object.defineProperty,d=Object.prototype.hasOwnProperty;m=function(l,a,u){var f,o=b(a)&&y(a.value);return delete(f=e(a)).writable,delete f.value,f.get=function(){return!u.overwriteDefinition&&d.call(this,l)?o:(a.value=i.call(o,u.resolveContext?u.resolveContext(this):this),r(this,l,a),this[l])},f},$.exports=function(l){var a=n(arguments[1]);return g(a.resolveContext)&&y(a.resolveContext),t(l,function(u,f){return m(f,u,a)})}},{"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(v,$,te){var m=v("type/value/is"),g=v("type/plain-function/is"),b=v("es5-ext/object/assign"),y=v("es5-ext/object/normalize-options"),e=v("es5-ext/string/#/contains");($.exports=function(n,t){var i,r,d,l,a;return arguments.length<2||typeof n!="string"?(l=t,t=n,n=null):l=arguments[2],m(n)?(i=e.call(n,"c"),r=e.call(n,"e"),d=e.call(n,"w")):(i=d=!0,r=!1),a={value:t,configurable:i,enumerable:r,writable:d},l?b(y(l),a):a}).gs=function(n,t,i){var r,d,l,a;return typeof n!="string"?(l=i,i=t,t=n,n=null):l=arguments[3],m(t)?g(t)?m(i)?g(i)||(l=i,i=void 0):i=void 0:(l=t,t=i=void 0):t=void 0,m(n)?(r=e.call(n,"c"),d=e.call(n,"e")):(r=!0,d=!1),a={get:t,set:i,configurable:r,enumerable:d},l?b(y(l),a):a}},{"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(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:m.d3=m.d3||{})})(this,function(m){function g(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 g(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 y=b(g),e=y.right,n=y.left;function t(P,S){return[P,S]}function i(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=i(P[V]))||(K+=(D=E-Z)*(E-(Z+=D/++H)));else for(;++V<F;)isNaN(E=i(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 l(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 a=Array.prototype,u=a.slice,f=a.map;function o(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 s=Math.sqrt(50),x=Math.sqrt(10),c=Math.sqrt(2);function T(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>=s?10:H>=x?5:H>=c?2:1)*Math.pow(10,F):-Math.pow(10,-F)/(H>=s?10:H>=x?5:H>=c?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>=s?F*=10:H>=x?F*=5:H>=c&&(F*=2),S<P?-F:F}function w(P){return Math.ceil(Math.log(P.length)/Math.LN2)+1}function k(P,S,E){if(E==null&&(E=i),D=P.length){if((S=+S)<=0||D<2)return+E(P[0],0,P);
20if(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}m.bisect=e,m.bisectRight=e,m.bisectLeft=n,m.ascending=g,m.bisector=b,m.cross=function(P,S,E){var D,F,H,V,Z=P.length,K=S.length,G=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)G[H]=E(V,S[F]);return G},m.descending=function(P,S){return S<P?-1:S>P?1:S>=P?0:NaN},m.deviation=d,m.extent=l,m.histogram=function(){var P=h,S=l,E=w;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 G=S(K),W=G[0],Q=G[1],R=E(K,W,Q);Array.isArray(R)||(R=_(W,Q,R),R=p(Math.ceil(W/R)*R,Q,R));for(var N=R.length;R[0]<=W;)R.shift(),--N;for(;R[N-1]>Q;)R.pop(),--N;var U,ee=new Array(N+1);for(H=0;H<=N;++H)(U=ee[H]=[]).x0=H>0?R[H-1]:W,U.x1=H<N?R[H]:Q;for(H=0;H<Z;++H)W<=(V=K[H])&&V<=Q&&ee[e(R,V,0,N)].push(F[H]);return ee}return D.value=function(F){return arguments.length?(P=typeof F=="function"?F:o(F),D):P},D.domain=function(F){return arguments.length?(S=typeof F=="function"?F:o([F[0],F[1]]),D):S},D.thresholds=function(F){return arguments.length?(E=typeof F=="function"?F:Array.isArray(F)?o(u.call(F)):o(F),D):E},D},m.thresholdFreedmanDiaconis=function(P,S,E){return P=f.call(P,i).sort(g),Math.ceil((E-S)/(2*(k(P,.75)-k(P,.25))*Math.pow(P.length,-1/3)))},m.thresholdScott=function(P,S,E){return Math.ceil((E-S)/(3.5*d(P)*Math.pow(P.length,-1/3)))},m.thresholdSturges=w,m.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},m.mean=function(P,S){var E,D=P.length,F=D,H=-1,V=0;if(S==null)for(;++H<D;)isNaN(E=i(P[H]))?--F:V+=E;else for(;++H<D;)isNaN(E=i(S(P[H],H,P)))?--F:V+=E;if(F)return V/F},m.median=function(P,S){var E,D=P.length,F=-1,H=[];if(S==null)for(;++F<D;)isNaN(E=i(P[F]))||H.push(E);else for(;++F<D;)isNaN(E=i(S(P[F],F,P)))||H.push(E);return k(H.sort(g),.5)},m.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},m.min=L,m.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},m.permute=function(P,S){for(var E=S.length,D=new Array(E);E--;)D[E]=P[S[E]];return D},m.quantile=k,m.range=p,m.scan=function(P,S){if(E=P.length){var E,D,F=0,H=0,V=P[H];for(S==null&&(S=g);++F<E;)(S(D=P[F],V)<0||S(V,V)!==0)&&(V=D,H=F);return S(V,V)===0?H:void 0}},m.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},m.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},m.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=T(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},m.tickIncrement=T,m.tickStep=_,m.transpose=A,m.variance=r,m.zip=function(){return A(arguments)},Object.defineProperty(m,"__esModule",{value:!0})})},{}],108:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:m.d3=m.d3||{})})(this,function(m){function g(){}function b(l,a){var u=new g;if(l instanceof g)l.each(function(s,x){u.set(x,s)});else if(Array.isArray(l)){var f,o=-1,h=l.length;if(a==null)for(;++o<h;)u.set(o,l[o]);else for(;++o<h;)u.set(a(f=l[o],o,l),f)}else if(l)for(var p in l)u.set(p,l[p]);return u}function y(){return{}}function e(l,a,u){l[a]=u}function n(){return b()}function t(l,a,u){l.set(a,u)}function i(){}g.prototype=b.prototype={constructor:g,has:function(l){return"$"+l in this},get:function(l){return this["$"+l]},set:function(l,a){return this["$"+l]=a,this},remove:function(l){var a="$"+l;return a in this&&delete this[a]},clear:function(){for(var l in this)l[0]==="$"&&delete this[l]},keys:function(){var l=[];for(var a in this)a[0]==="$"&&l.push(a.slice(1));return l},values:function(){var l=[];for(var a in this)a[0]==="$"&&l.push(this[a]);return l},entries:function(){var l=[];for(var a in this)a[0]==="$"&&l.push({key:a.slice(1),value:this[a]});return l},size:function(){var l=0;for(var a in this)a[0]==="$"&&++l;return l},empty:function(){for(var l in this)if(l[0]==="$")return!1;return!0},each:function(l){for(var a in this)a[0]==="$"&&l(this[a],a.slice(1),this)}};var r=b.prototype;function d(l,a){var u=new i;if(l instanceof i)l.each(function(h){u.add(h)});else if(l){var f=-1,o=l.length;if(a==null)for(;++f<o;)u.add(l[f]);else for(;++f<o;)u.add(a(l[f],f,l))}return u}i.prototype=d.prototype={constructor:i,has:r.has,add:function(l){return this["$"+(l+="")]=l,this},remove:r.remove,clear:r.clear,values:r.keys,size:r.size,empty:r.empty,each:r.each},m.nest=function(){var l,a,u,f=[],o=[];function h(p,s,x,c){if(s>=f.length)return l!=null&&p.sort(l),a!=null?a(p):p;for(var T,_,w,k=-1,L=p.length,A=f[s++],I=b(),P=x();++k<L;)(w=I.get(T=A(_=p[k])+""))?w.push(_):I.set(T,[_]);return I.each(function(S,E){c(P,E,h(S,s,x,c))}),P}return u={object:function(p){return h(p,0,y,e)},map:function(p){return h(p,0,n,t)},entries:function(p){return function s(x,c){if(++c>f.length)return x;var T,_=o[c-1];return a!=null&&c>
20=f.length?T=x.entries():(T=[],x.each(function(w,k){T.push({key:k,values:s(w,c)})})),_!=null?T.sort(function(w,k){return _(w.key,k.key)}):T}(h(p,0,n,t),0)},key:function(p){return f.push(p),u},sortKeys:function(p){return o[f.length-1]=p,u},sortValues:function(p){return l=p,u},rollup:function(p){return a=p,u}}},m.set=d,m.map=b,m.keys=function(l){var a=[];for(var u in l)a.push(u);return a},m.values=function(l){var a=[];for(var u in l)a.push(l[u]);return a},m.entries=function(l){var a=[];for(var u in l)a.push({key:u,value:l[u]});return a},Object.defineProperty(m,"__esModule",{value:!0})})},{}],109:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=m||self).d3=m.d3||{})})(this,function(m){function g(fe,ge,ke){fe.prototype=ge.prototype=ke,ke.constructor=fe}function b(fe,ge){var ke=Object.create(fe.prototype);for(var be in ge)ke[be]=ge[be];return ke}function y(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),d=new RegExp("^rgb\\("+[t,t,t]+"\\)$"),l=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),a=new RegExp("^rgba\\("+[t,t,t,n]+"\\)$"),u=new RegExp("^hsl\\("+[n,t,t]+"\\)$"),f=new RegExp("^hsla\\("+[n,t,t,n]+"\\)$"),o={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 s(fe){var ge,ke;return fe=(fe+"").trim().toLowerCase(),(ge=i.exec(fe))?(ke=ge[1].length,ge=parseInt(ge[1],16),ke===6?x(ge):ke===3?new w(ge>>8&15|ge>>4&240,ge>>4&15|240&ge,(15&ge)<<4|15&ge,1):ke===8?c(ge>>24&255,ge>>16&255,ge>>8&255,(255&ge)/255):ke===4?c(ge>>12&15|ge>>8&240,ge>>8&15|ge>>4&240,ge>>4&15|240&ge,((15&ge)<<4|15&ge)/255):null):(ge=r.exec(fe))?new w(ge[1],ge[2],ge[3],1):(ge=d.exec(fe))?new w(255*ge[1]/100,255*ge[2]/100,255*ge[3]/100,1):(ge=l.exec(fe))?c(ge[1],ge[2],ge[3],ge[4]):(ge=a.exec(fe))?c(255*ge[1]/100,255*ge[2]/100,255*ge[3]/100,ge[4]):(ge=u.exec(fe))?I(ge[1],ge[2]/100,ge[3]/100,1):(ge=f.exec(fe))?I(ge[1],ge[2]/100,ge[3]/100,ge[4]):o.hasOwnProperty(fe)?x(o[fe]):fe==="transparent"?new w(NaN,NaN,NaN,0):null}function x(fe){return new w(fe>>16&255,fe>>8&255,255&fe,1)}function c(fe,ge,ke,be){return be<=0&&(fe=ge=ke=NaN),new w(fe,ge,ke,be)}function T(fe){return fe instanceof y||(fe=s(fe)),fe?new w((fe=fe.rgb()
vendor: 4,346 bytes, line 20
20).r,fe.g,fe.b,fe.opacity):new w}function _(fe,ge,ke,be){return arguments.length===1?T(fe):new w(fe,ge,ke,be??1)}function w(fe,ge,ke,be){this.r=+fe,this.g=+ge,this.b=+ke,this.opacity=+be}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,ge,ke,be){return be<=0?fe=ge=ke=NaN:ke<=0||ke>=1?fe=ge=NaN:ge<=0&&(fe=NaN),new E(fe,ge,ke,be)}function P(fe){if(fe instanceof E)return new E(fe.h,fe.s,fe.l,fe.opacity);if(fe instanceof y||(fe=s(fe)),!fe)return new E;if(fe instanceof E)return fe;var ge=(fe=fe.rgb()).r/255,ke=fe.g/255,be=fe.b/255,Se=Math.min(ge,ke,be),Oe=Math.max(ge,ke,be),De=NaN,je=Oe-Se,Je=(Oe+Se)/2;return je?(De=ge===Oe?(ke-be)/je+6*(ke<be):ke===Oe?(be-ge)/je+2:(ge-ke)/je+4,je/=Je<.5?Oe+Se:2-Oe-Se,De*=60):je=Je>0&&Je<1?0:De,new E(De,je,Je,fe.opacity)}function S(fe,ge,ke,be){return arguments.length===1?P(fe):new E(fe,ge,ke,be??1)}function E(fe,ge,ke,be){this.h=+fe,this.s=+ge,this.l=+ke,this.opacity=+be}function D(fe,ge,ke){return 255*(fe<60?ge+(ke-ge)*fe/60:fe<180?ke:fe<240?ge+(ke-ge)*(240-fe)/60:ge)}g(y,s,{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}),g(w,_,b(y,{brighter:function(fe){return fe=fe==null?1/.7:Math.pow(1/.7,fe),new w(this.r*fe,this.g*fe,this.b*fe,this.opacity)},darker:function(fe){return fe=fe==null?.7:Math.pow(.7,fe),new w(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})),g(E,S,b(y,{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),ge=isNaN(fe)||isNaN(this.s)?0:this.s,ke=this.l,be=ke+(ke<.5?ke:1-ke)*ge,Se=2*ke-be;return new w(D(fe>=240?fe-240:fe+120,Se,be),D(fe,Se,be),D(fe<120?fe+240:fe-120,Se,be),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 w||(fe=T(fe));var ge,ke,be=U(fe.r),Se=U(fe.g),Oe=U(fe.b),De=Q((.2225045*be+.7168786*Se+.0606169*Oe)/1);return be===Se&&Se===Oe?ge=ke=De:(ge=Q((.4360747*be+.3850649*Se+.1430804*Oe)/.96422),ke=Q((.0139322*be+.0971045*Se+.7141733*Oe)/.82521)),new W(116*De-16,500*(ge-De),200*(De-ke),fe.opacity)}function G(fe,ge,ke,be){return arguments.length===1?K(fe):new W(fe,ge,ke,be??1)}function W(fe,ge,ke,be){this.l=+fe,this.a=+ge,this.b=+ke,this.opacity=+be}function Q(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)}function 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 ee(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 ge=Math.atan2(fe.b,fe.a)*H;return new X(ge<0?ge+360:ge,Math.sqrt(fe.a*fe.a+fe.b*fe.b),fe.l,fe.opacity)}function j(fe,ge,ke,be){return arguments.length===1?ee(fe):new X(fe,ge,ke,be??1)}function X(fe,ge,ke,be){this.h=+fe,this.c=+ge,this.l=+ke,this.opacity=+be}function J(fe){if(isNaN(fe.h))return new W(fe.l,0,0,fe.opacity);var ge=fe.h*F;return new W(fe.l,Math.cos(ge)*fe.c,Math.sin(ge)*fe.c,fe.opacity)}
20g(W,G,b(y,{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,ge=isNaN(this.a)?fe:fe+this.a/500,ke=isNaN(this.b)?fe:fe-this.b/200;return new w(N(3.1338561*(ge=.96422*R(ge))-1.6168667*(fe=1*R(fe))-.4906146*(ke=.82521*R(ke))),N(-.9787684*ge+1.9161415*fe+.033454*ke),N(.0719453*ge-.2289914*fe+1.4052427*ke),this.opacity)}})),g(X,j,b(y,{brighter:function(fe){return new X(this.h,this.c,this.l+18*(fe??1),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 _e(fe){if(fe instanceof Ee)return new Ee(fe.h,fe.s,fe.l,fe.opacity);fe instanceof w||(fe=T(fe));var ge=fe.r/255,ke=fe.g/255,be=fe.b/255,Se=(xe*be+ce*ge-de*ke)/(xe+ce-de),Oe=be-Se,De=(pe*(ke-Se)-se*Oe)/oe,je=Math.sqrt(De*De+Oe*Oe)/(pe*Se*(1-Se)),Je=je?Math.atan2(De,Oe)*H-120:NaN;return new Ee(Je<0?Je+360:Je,je,Se,fe.opacity)}function we(fe,ge,ke,be){return arguments.length===1?_e(fe):new Ee(fe,ge,ke,be??1)}function Ee(fe,ge,ke,be){this.h=+fe,this.s=+ge,this.l=+ke,this.opacity=+be}g(Ee,we,b(y,{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,ge=+this.l,ke=isNaN(this.s)?0:this.s*ge*(1-ge),be=Math.cos(fe),Se=Math.sin(fe);return new w(255*(ge+ke*(re*be+ne*Se)),255*(ge+ke*(se*be+oe*Se)),255*(ge+ke*(pe*be)),this.opacity)}})),m.color=s,m.cubehelix=we,m.gray=function(fe,ge){return new W(fe,0,0,ge??1)},m.hcl=j,m.hsl=S,m.lab=G,m.lch=function(fe,ge,ke,be){return arguments.length===1?ee(fe):new X(ke,ge,fe,be??1)},m.rgb=_,Object.defineProperty(m,"__esModule",{value:!0})})},{}],110:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=m||self).d3=m.d3||{})})(this,function(m){var g={value:function(){}};function b(){for(var i,r=0,d=arguments.length,l={};r<d;++r){if(!(i=arguments[r]+"")||i in l||/[\s.]/.test(i))throw new Error("illegal type: "+i);l[i]=[]}return new y(l)}function y(i){this._=i}function e(i,r){return i.trim().split(/^|\s+/).map(function(d){var l="",a=d.indexOf(".");if(a>=0&&(l=d.slice(a+1),d=d.slice(0,a)),d&&!r.hasOwnProperty(d))throw new Error("unknown type: "+d);return{type:d,name:l}})}function n(i,r){for(var d,l=0,a=i.length;l<a;++l)if((d=i[l]).name===r)return d.value}function t(i,r,d){for(var l=0,a=i.length;l<a;++l)if(i[l].name===r){i[l]=g,i=i.slice(0,l).concat(i.slice(l+1));break}return d!=null&&i.push({name:r,value:d}),i}y.prototype=b.prototype={constructor:y,on:function(i,r){var d,l=this._,a=e(i+"",l),u=-1,f=a.length;if(!(arguments.length<2)){if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++u<f;)if(d=(i=a[u]).type)l[d]=t(l[d],i.name,r);else if(r==null)for(d in l)l[d]=t(l[d],i.name,null);return this}for(;++u<f;)if((d=(i=a[u]).type)&&(d=n(l[d],i.name)))return d},copy:function(){var i={},r=this._;for(var d in r)i[d]=r[d].slice();return new y(i)},call:function(i,r){if((d=arguments.length-2)>0)for(var d,l,a=new Array(d),u=0;u<d;++u)a[u]=arguments[u+2];if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(u=0,d=(l=this._[i]).length;u<d;++u)l[u].value.apply(r,a)},apply:function(i,r,d){if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(var l=this._[i],a=0,u=l.length;a<u;++a)l[a].value.apply(r,d)}},m.dispatch=b,Object.defineProperty(m,"__esModule",{value:!0})})},{}],111:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?g(te,v("d3-quadtree"),v("d3-collection"),v("d3-dispatch"),v("d3-timer")):g(m.d3=m.d3||{},m.d3,m.d3,m.d3,m.d3)})(this,function(m,g,b,y,e){function n(o){return function(){return o}}function t(){return 1e-6*(Math.random()-.5)}function i(o){return o.x+o.vx}function r(o){return o.y+o.vy}function d(o){return o.index}function l(o,h){var p=o.get(h);if(!p)throw new Error("missing: "+h);return p}function a(o){return o.x}function u(o){return o.y}var f=Math.PI*(3-Math.sqrt(5));m.forceCenter=function(o,h){var p;function s(){var x,c,T=p.length,_=0,w=0;for(x=0;x<T;++x)_+=(c=p[x]).x,w+=c.y;for(_=_/T-o,w=w/T-h,x=0;x<T;++x)(c=p[x]).x-=_,c.y-=w}return o==null&&(o=0),h==null&&(h=0),s.initialize=function(x){p=x},s.x=function(x){return arguments.length?(o=+x,s):o},s.y=function(x){return arguments.length?(h=+x,s):h},s},m.forceCollide=function(o){var h,p,s=1,x=1;function c(){for(var w,k,L,A,I,P,S,E=h.length,D=0;D<x;++D)for(k=g.quadtree(h,i,r).visitAfter(T),w=0;w<E;++w)L=h[w],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,G){var W=H.data,Q=H.r,R=P+Q;if(!W)return V>A+R||K<A-R||Z>I+R||G<I-R;if(W.index>L.index){var N=A-W.x-W.vx,U=I-W.y-W.vy,ee=N*N+U*U;ee<R*R&&(N===0&&(ee+=(N=t())*N),U===0&&(ee+=(U=t())*U),ee=(R-(ee=Math.sqrt(ee)))/ee*s,L.vx+=(N*=ee)*(R=(Q*=Q)/(S+Q)),L.vy+=(U*=ee)*R,W.vx-=N*(R=1-R),W.vy-=U*R)}}}function T(w){if(w.data)return w.r=p[w.data.index];for(var k=w.r=0;k<4;++k)w[k]&&w[k].r>w.r&&(w.r=w[k].r)}function _(){if(h){var w,k,L=h.length;for(p=new Array(L),w=0;w<L;++w)k=h[w],p[k.index]=+o(k,w,h)}}return typeof o!="function"&&(o=n(o==null?1:+o)),c.initialize=function(w){h=w,_()},c.iterations=function(w){return arguments.length?(x=+w,c):x},c.strength=function(w){return arguments.length?(s=+w,c):s},c.radius=function(w){return arguments.length?(o=typeof w=="function"?w:n(+w),_(),c):o},c},m.forceLink=function(o){var h,p,s,x,c,T=d,_=function(S){return 1/Math.min(x[S.source.index],x[S.target.index])},w=n(30),k=1;function L(S){for(var E=0,D=o.length;E<k;++E)for(var F,H,V,Z,K,G,W,Q=0;Q<D;++Q)H=(F=o[Q]).source,Z=(V=F.target).x+V.vx-H.x-H.vx||t(),K=V.y+V.vy-H.y-H.vy||t(),Z*=G=((G=Math.sqrt(Z*Z+K*K))-p[Q])/G*S*h[Q],K*=G,V.vx-=Z*(W=c[Q]),V.vy-=K*W,H.vx+=Z*(W=1-W),H.vy+=K*W}function A(){if(s){var S,E,D=s.length,F=o.length,H=b.map(s,T);for(S=0,x=new Array(D);S<F;++S)(E=o[S]).index=S,typeof E.source!="object"&&(E.source=l(H,E.source)),typeof E.target!="object"&&(E.target=l(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,c=new Array(F);S<F;++S)E=o[S],c[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(s)for(var S=0,E=o.length;S<E;++S)h[S]=+_(o[S],S,o)}function P(){if(s)for(var S=0,E=o.length;S<E;++S)p[S]=+w(o[S],S,o)}return o==null&&(o=[]),L.initialize=function(S){s=S,A()},L.links=function(S){return arguments.length?(o=S,A(),L):o},L.id=function(S){return arguments.length?(T=S,L):T},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?(w=typeof S=="function"?S:n(+S),P(),L):w},L},m.forceManyBody=function(){var o,h,p,s,x=n(-30),c=1,T=1/0,_=.81;function w(I){var P,S=o.length,E=g.quadtree(o,a,u).visitAfter(L);for(p=I,P=0;P<S;++P)h=o[P],E.visit(A)}function k(){if(o){var I,P,S=o.length;for(s=new Array(S),I=0;I<S;++I)P=o[I],s[P.index]=+x(P,I,o)}}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+=s[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<T&&(D===0&&(V+=(D=t())*D),F===0&&(V+=(F=t())*F),V<c&&(V=Math.sqrt(c*V)),h.vx+=D*I.value*p/V,h.vy+=F*I.value*p/V),!0;if(!(I.length||V>=T)){(I.data!==h||I.next)&&(D===0&&(V+=(D=t())*D),F===0&&(V+=(F=t())*F),V<c&&(V=Math.sqrt(c*V)));do I.data!==h&&(H=s[I.data.index]*p/V,h.vx+=D*H,h.vy+=F*H);while(I=I.next)}}return w.initialize=function(I){o=I,k()},w.strength=function(I){return arguments.length?(x=typeof I=="function"?I:n(+I),k(),w):x},w.distanceMin=function(I){return arguments.length?(c=I*I,w):Math.sqrt(c)},w.distanceMax=function(I){return arguments.length?(T=I*I,w):Math.sqrt(T)},w.theta=function(I){return arguments.length?(_=I*I,w):Math.sqrt(_)},w},m.forceRadial=function(o,h,p){var s,x,c,T=n(.1);function _(k){for(var L=0,A=s.length;L<A;++L){var I=s[L],P=I.x-h||1e-6,S=I.y-p||1e-6,E=Math.sqrt(P*P+S*S),D=(c[L]-E)*x[L]*k/E;I.vx+=P*D,I.vy+=S*D}}function w(){if(s){var k,L=s.length;for(x=new Array(L),c=new Array(L),k=0;k<L;++k)c[k]=+o(s[k],k,s),x[k]=isNaN(c[k])?0:+T(s[k],k,s)}}return typeof o!="function"&&(o=n(+o)),h==null&&(h=0),p==null&&(p=0),_.initialize=function(k){s=k,w()},_.strength=function(k){return arguments.length?(T=typeof k=="function"?k:n(+k),w(),_):T},_.radius=function(k){return arguments.length?(o=typeof k=="function"?k:n(+k),w(),_):o},_.x=function(k){return arguments.length?(h=+k,_):h},_.y=function(k){return arguments.length?(p=+k,_):p},_},m.forceSimulation=function(o){var h,p=1,s=.001,x=1-Math.pow(s,1/300),c=0,T=.6,_=b.map(),w=e.timer(L),k=y.dispatch("tick","end");function L(){A(),k.call("tick",h),p<s&&(w.stop(),k.call("end",h))}function A(S){var E,D,F=o.length;S===void 0&&(S=1);for(var H=0;H<S;++H)for(p+=(c-p)*x,_.each(function(V){V(p)}),E=0;E<F;++E)(D=o[E]).fx==null?D.x+=D.vx*=T:(D.x=D.fx,D.vx=0),D.fy==null?D.y+=D.vy*=T:(D.y=D.fy,D.vy=0);return h}function I(){for(var S,E=0,D=o.length;E<D;++E){if((S=o[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(o),S}return o==null&&(o=[]),I(),h={tick:A,restart:function(){return w.restart(L),h},stop:function(){return w.stop(),h},nodes:function(S){return arguments.length?(o=S,I(),_.each(P),h):o},alpha:function(S){return arguments.length?(p=+S,h):p},alphaMin:function(S){return arguments.length?(s=+S,h):s},alphaDecay:function(S){return arguments.length?(x=+S,h):+x},alphaTarget:function(S){return arguments.length?(c=+S,h):c},velocityDecay:function(S){return arguments.length?(T=1-S,h):1-T},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,G=0,W=o.length;for(D==null?D=1/0:D*=D,G=0;G<W;++G)(V=(F=S-(Z=o[G]).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)}}},m.forceX=function(o){var h,p,s,x=n(.1);function c(_){for(var w,k=0,L=h.length;k<L;++k)(w=h[k]).vx+=(s[k]-w.x)*p[k]*_}function T(){if(h){var _,w=h.length;for(p=new Array(w),s=new Array(w),_=0;_<w;++_)p[_]=isNaN(s[_]=+o(h[_],_,h))?0:+x(h[_],_,h)}}return typeof o!="function"&&(o=n(o==null?0:+o)),c.initialize=function(_){h=_,T()},c.strength=function(_){return arguments.length?(x=typeof _=="function"?_:n(+_),T(),c):x},c.x=function(_){return arguments.length?(o=typeof _=="function"?_:n(+_),T(),c):o},c},m.forceY=function(o){var h,p,s,x=n(.1);function c(_){for(var w,k=0,L=h.length;k<L;++k)(w=h[k]).vy+=(s[k]-w.y)*p[k]*_}function T(){if(h){var _,w=h.length;for(p=new Array(w),s=new Array(w),_=0;_<w;++_)p[_]=isNaN(s[_]=+o(h[_],_,h))?0:+x(h[_],_,h)}}return typeof o!="function"&&(o=n(o==null?0:+o)),c.initialize=function(_){h=_,T()},c.strength=function(_){return arguments.length?(x=typeof _=="function"?_:n(+_),T(),c):x},c.y=function(_){return arguments.length?(o=typeof _=="function"?_:n(+_),T(),c):o},c},Object.defineProperty(m,"__esModule",{value:!0})})},{"d3-collection":108,"d3-dispatch":110,"d3-quadtree":118,"d3-timer":123}],112:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=typeof globalThis<"u"?globalThis:m||self).d3=m.d3||{})})(this,function(m){function g(h,p){if((s=(h=p?h.toExponential(p-1):h.toExponential()).indexOf("e"))<0)return null;var s,x=h.slice(0,s);return[x.length>1?x[0]+x.slice(2):x,+h.slice(s+1)]}
20function b(h){return(h=g(Math.abs(h)))?h[1]:NaN}var y,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 i(h,p){var s=g(h,p);if(!s)return h+"";var x=s[0],c=s[1];return c<0?"0."+new Array(-c).join("0")+x:x.length>c+1?x.slice(0,c+1)+"."+x.slice(c+1):x+new Array(c-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 i(100*h,p)},r:i,s:function(h,p){var s=g(h,p);if(!s)return h+"";var x=s[0],c=s[1],T=c-(y=3*Math.max(-8,Math.min(8,Math.floor(c/3))))+1,_=x.length;return T===_?x:T>_?x+new Array(T-_+1).join("0"):T>0?x.slice(0,T)+"."+x.slice(T):"0."+new Array(1-T).join("0")+g(h,Math.max(0,p+T-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 l,a=Array.prototype.map,u=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function f(h){var p,s,x=h.grouping===void 0||h.thousands===void 0?d:(p=a.call(h.grouping,Number),s=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(s)}),c=h.currency===void 0?"":h.currency[0]+"",T=h.currency===void 0?"":h.currency[1]+"",_=h.decimal===void 0?".":h.decimal+"",w=h.numerals===void 0?d:function(P){return function(S){return S.replace(/[0-9]/g,function(E){return P[+E]})}}(a.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,G=P.trim,W=P.type;W==="n"?(Z=!0,W="g"):r[W]||(K===void 0&&(K=12),G=!0,W="g"),(H||S==="0"&&E==="=")&&(H=!0,S="0",E="=");var Q=F==="$"?c:F==="#"&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",R=F==="$"?T:/[%p]/.test(W)?k:"",N=r[W],U=/[defgprs%]/.test(W);function ee(j){var X,J,re,ne=Q,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),G&&(j=function(de){e:for(var xe,_e=de.length,we=1,Ee=-1;we<_e;++we)switch(de[we]){case".":Ee=xe=we;break;case"0":Ee===0&&(Ee=we),xe=we;break;default:if(!+de[we])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+y/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 w(j)}return K=K===void 0?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,K)):Math.max(0,Math.min(20,K)),ee.toString=function(){return P+""},ee}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 o(h){return l=f(h),m.format=l.format,m.formatPrefix=l.formatPrefix,l}o({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),m.FormatSpecifier=t,m.formatDefaultLocale=o,m.formatLocale=f,m.formatSpecifier=n,m.precisionFixed=function(h){return Math.max(0,-b(Math.abs(h)))},m.precisionPrefix=function(h,p){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(b(p)/3)))-b(Math.abs(h)))},m.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(m,"__esModule",{value:!0})})},{}],113:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?g(te,v("d3-geo"),v("d3-array")):g(m.d3=m.d3||{},m.d3,m.d3)})(this,function(m,g,b){var y=Math.abs,e=Math.atan,n=Math.atan2,t=Math.cos,i=Math.exp,r=Math.floor,d=Math.log,l=Math.max,a=Math.min,u=Math.pow,f=Math.round,o=Math.sign||function(Be){return Be>0?1:Be<0?-1:0},h=Math.sin,p=Math.tan,s=1e-6,x=Math.PI,c=x/2,T=x/4,_=Math.SQRT1_2,w=E(2),k=E(x),L=2*x,A=180/x,I=x/180;function P(Be){return Be>1?c:Be<-1?-c:Math.asin(Be)}function S(Be){return Be>1?0:Be<-1?x:Math.acos(Be)}function E(Be){return Be>0?Math.sqrt(Be):0}function D(Be){return(i(Be)-i(-Be))/2}function F(Be){return(i(Be)+i(-Be))/2}function H(Be){var He=p(Be/2),Ke=2*d(t(Be/2))/(He*He);function st(dt,ht){var St=t(dt),Kt=t(ht),Qt=h(ht),Yt=Kt*St,rr=-((1-Yt?d((1+Yt)/2)/(1-Yt):-.5)+Ke/(1+Yt));return[rr*Kt*h(dt),rr*Qt]}return st.invert=function(dt,ht){var St,Kt=E(dt*dt+ht*ht),Qt=-Be/2,Yt=50;if(!Kt)return[0,0];do{var rr=Qt/2,cr=t(rr),gr=h(rr),yr=gr/cr,Lr=-d(y(cr));Qt-=St=(2/yr*Lr-Ke*yr-Kt)/(-Lr/(gr*gr)+1-Ke/(2*cr*cr))*(cr<0?.7:1)}while(y(St)>s&&--Yt>0);var an=h(Qt);return[n(dt*an,Kt*t(Qt)),P(ht*an/Kt)]},st}function V(Be,He){var Ke=t(He),st=function(dt){return dt?dt/Math.sin(dt):1}(S(Ke*t(Be/=2)));return[2*Ke*h(Be)*st,h(He)*st]}function Z(Be){var He=h(Be),Ke=t(Be),st=Be>=0?1:-1,dt=p(st*Be),ht=(1+He-Ke)/2;function St(Kt,Qt){var Yt=t(Qt),rr=t(Kt/=2);return[(1+Yt)*h(Kt),(st*Qt>-n(rr,dt)-.001?0:10*-st)+ht+h(Qt)*Ke-(1+Yt)*He*rr]}return St.invert=function(Kt,Qt){var Yt=0,rr=0,cr=50;do{var gr=t(Yt),yr=h(Yt),Lr=t(rr),an=h(rr),dn=1+Lr,Ln=dn*yr-Kt,On=ht+an*Ke-dn*He*gr-Qt,qn=dn*gr/2,zn=-yr*an,ga=He*dn*yr/2,Aa=Ke*Lr+He*gr*an,ja=zn*ga-Aa*qn,Na=(On*zn-Ln*Aa)/ja/2,Ua=(Ln*ga-On*qn)/ja;y(Ua)>2&&(Ua/=2),Yt-=Na,rr-=Ua}while((y(Na)>s||y(Ua)>s)&&--cr>0);return st*rr>-n(t(Yt),dt)-.001?[2*Yt,rr]:null},St}function K(Be,He){var Ke=p(He/2),st=E(1-Ke*Ke),dt=1+st*t(Be/=2),ht=h(Be)*st/dt,St=Ke/dt,Kt=ht*ht,Qt=St*St;return[4/3*ht*(3+Kt-3*Qt),4/3*St*(3+3*Kt-Qt)]}V.invert=function(Be,He){if(!(Be*Be+4*He*He>x*x+s)){var Ke=Be,st=He,dt=25;do{var ht,St=h(Ke),Kt=h(Ke/2),Qt=t(Ke/2),Yt=h(st),rr=t(st),cr=h(2*st),gr=Yt*Yt,yr=rr*rr,Lr=Kt*Kt,an=1-yr*Qt*Qt,dn=an?S(rr*Qt)*E(ht=1/an):ht=0,Ln=2*dn*rr*Kt-Be,On=dn*Yt-He,qn=ht*(yr*Lr+dn*rr*Qt*gr),zn=ht*(.5*St*cr-2*dn*Yt*Kt),ga=.25*ht*(cr*Kt-dn*Yt*yr*St),Aa=ht*(gr*Qt+dn*Lr*rr),ja=zn*ga-Aa*qn;if(!ja)break;var Na=(On*zn-Ln*Aa)/ja,Ua=(Ln*ga-On*qn)/ja;Ke-=Na,st-=Ua}while((y(Na)>s||y(Ua)>s)&&--dt>0);return[Ke,st]}},K.invert=function(Be,He){if(He*=3/8,!(Be*=3/8)&&y(He)>1)return null;var Ke=1+Be*Be+He*He,st=E((Ke-E(Ke*Ke-4*He*He))/2),dt=P(st)/3,ht=st?function(Yt){return d(Yt+E(Yt*Yt-1))}(y(He/st))/3:function(Yt){return d(Yt+E(Yt*Yt+1))}(y(Be))/3,St=t(dt),Kt=F(ht),Qt=Kt*Kt-St*St;return[2*o(Be)*n(D(ht)*St,.25-Qt),2*o(He)*n(Kt*h(dt),.25+Qt)]};var G=E(8),W=d(1+w);function Q(Be,He){var Ke=y(He);return Ke<T?[Be,d(p(T+He/2))]:[Be*t(Ke)*(2*w-1/h(Ke)),o(He)*(2*w*(Ke-T)-d(p(Ke/2)))]}function R(Be){var He=2*x/Be;function Ke(st,dt){var ht=g.geoAzimuthalEquidistantRaw(st,dt);if(y(st)>c){var St=n(ht[1],ht[0]),Kt=E(ht[0]*ht[0]+ht[1]*ht[1]),Qt=He*f((St-c)/He)+c,Yt=n(h(St-=Qt),2-t(St));St=Qt+P(x/Kt*h(Yt))-Yt,ht[0]=Kt*t(St),ht[1]=Kt*h(St)}return ht}return Ke.invert=function(st,dt){var ht=E(st*st+dt*dt);if(ht>c){var St=n(dt,st),Kt=He*f((St-c)/He)+c,Qt=St>Kt?-1:1,Yt=ht*t(Kt-St),rr=1/p(Qt*S((Yt-x)/E(x*(x-2*Yt)+ht*ht)));St=Kt+2*e((rr+Qt*E(rr*rr-3))/3),st=ht*t(St),dt=ht*h(St)}return g.geoAzimuthalEquidistantRaw.invert(st,dt)},Ke}function N(Be,He){if(arguments.length<2&&(He=Be),He===1)return g.geoAzimuthalEqualAreaRaw;if(He===1/0)return U;function Ke(st,dt){var ht=g.geoAzimuthalEqualAreaRaw(st/He,dt);return ht[0]*=Be,ht}return Ke.invert=function(st,dt){var ht=g.geoAzimuthalEqualAreaRaw.invert(st/Be,dt);return ht[0]*=He,ht},Ke}function U(Be,He){return[Be*t(He)/t(He/=2),2*h(He)]}function ee(Be,He,Ke){var st,dt,ht,St=100;Ke=Ke===void 0?0:+Ke,He=+He;do(dt=Be(Ke))===(ht=Be(Ke+s))&&(ht=dt+s),Ke-=st=-1*s*(dt-He)/(dt-ht);while(St-- >0&&y(st)>s);return St<0?NaN:Ke}function j(Be,He,Ke){return He===void 0&&(He=40),Ke===void 0&&(Ke=1e-12),function(st,dt,ht,St){var Kt,Qt,Yt;ht=ht===void 0?0:+ht,St=St===void 0?0:+St;for(var rr=0;rr<He;rr++){var cr=Be(ht,St),gr=cr[0]-st,yr=cr[1]-dt;if(y(gr)<Ke&&y(yr)<Ke)break;var Lr=gr*gr+yr*yr;if(Lr>Kt)ht-=Qt/=2,St-=Yt/=2;else{Kt=Lr;var an=(ht>0?-1:1)*Ke,dn=(St>0?-1:1)*Ke,Ln=Be(ht+an,St),On=Be(ht,St+dn),qn=(Ln[0]-cr[0])/an,zn=(Ln[1]-cr[1])/an,ga=(On[0]-cr[0])/dn,Aa=(On[1]-cr[1])/dn,ja=Aa*qn-zn*ga,Na=(y(ja)<.5?.5:1)/ja;if(ht+=Qt=(yr*ga-gr*Aa)*Na,St+=Yt=(gr*zn-yr*qn)*Na,y(Qt)<Ke&&y(Yt)<Ke)break}}return[ht,St]}}function X(){var Be=N(1.68,2);function He(Ke,st){if(Ke+st<-1.4){var dt=(Ke-st+1.6)*(Ke+st+1.4)/8;Ke+=dt,st-=.8*dt*h(st+x/2)}var ht=Be(Ke,st),St=(1-t(Ke*st))/12;return ht[1]<0&&(ht[0]*=1+St),ht[1]>0&&(ht[1]*=1+St/1.5*ht[0]*ht[0]),ht}return He.invert=j(He),He}function J(Be,He){var Ke,st=Be*h(He),dt=30;do He-=Ke=(He+h(He)-st)/(1+t(He));while(y(Ke)>s&&--dt>0);return He/2}function re(Be,He,Ke){function st(dt,ht){return[Be*dt*t(ht=J(Ke,ht)),He*h(ht)]}return st.invert=function(dt,ht){return ht=P(ht/He),[dt/(Be*t(ht)),P((2*ht+h(2*ht))/Ke)]},st}Q.invert=function(Be,He){if((st=y(He))<W)return[Be,2*e(i(He))-c];var Ke,st,dt=T,ht=25;do{var St=t(dt/2),Kt=p(dt/2);dt-=Ke=(G*(dt-T)-d(Kt)-st)/(G-St*St/(2*Kt))}while(y(Ke)>1e-12&&--ht>0);return[Be/(t(dt)*(G-1/h(dt))),o(He)*dt]},U.invert=function(Be,He){var Ke=2*P(He/2);return[Be*t(Ke/2)/t(Ke),Ke]};var ne=re(w/c,w,x),se=2.00276,oe=1.11072;function pe(Be,He){var Ke=J(x,He);return[se*Be/(1/t(He)+oe/t(Ke)),(He+w*h(Ke))/se]}function ce(Be){var He=0,Ke=g.geoProjectionMutator(Be),st=Ke(He);return st.parallel=function(dt){return arguments.length?Ke(He=dt*I):He*A},st}function de(Be,He){return[Be*t(He),He]}function xe(Be){if(!Be)return de;var He=1/p(Be);function Ke(st,dt){var ht=He+Be-dt,St=ht&&st*t(dt)/ht;return[ht*h(St),He-ht*t(St)]}return Ke.invert=function(st,dt){var ht=E(st*st+(dt=He-dt)*dt),St=He+Be-ht;return[ht/t(St)*n(st,dt),St]},Ke}function _e(Be){function He(Ke,st){var dt=c-st,ht=dt&&Ke*Be*h(dt)/dt;return[dt*h(ht)/Be,c-dt*t(ht)]}return He.invert=function(Ke,st){var dt=Ke*Be,ht=c-st,St=E(dt*dt+ht*ht),Kt=n(dt,ht);return[(St?St/h(St):1)*Kt/Be,c-St]},He}pe.invert=function(Be,He){var Ke,st,dt=se*He,ht=He<0?-T:T,St=25;do st=dt-w*h(ht),ht-=Ke=(h(2*ht)+2*ht-x*h(st))/(2*t(2*ht)+2+x*t(st)*w*t(ht));while(y(Ke)>s&&--St>0);return st=dt-w*h(ht),[Be*(1/t(st)+oe/t(ht))/se,st]},de.invert=function(Be,He){return[Be/t(He),He]};var we=re(1,4/x,x);function Ee(Be,He,Ke,st,dt,ht){var St,Kt=t(ht);if(y(Be)>1||y(ht)>1)St=S(Ke*dt+He*st*Kt);else{var Qt=h(Be/2),Yt=h(ht/2);St=2*P(E(Qt*Qt+He*st*Yt*Yt))}return y(St)>s?[St,n(st*h(ht),He*dt-Ke*st*Kt)]:[0,0]}function fe(Be,He,Ke){return S((Be*Be+He*He-Ke*Ke)/(2*Be*He))}function ge(Be){return Be-2*x*r((Be+x)/(2*x))}function ke(Be,He,Ke){for(var st,dt=[[Be[0],Be[1],h(Be[1]),t(Be[1])],[He[0],He[1],h(He[1]),t(He[1])],[Ke[0],Ke[1],h(Ke[1]),t(Ke[1])]],ht=dt[2],St=0;St<3;++St,ht=st)st=dt[St],ht.v=Ee(st[1]-ht[1],ht[3],ht[2],st[3],st[2],st[0]-ht[0]),ht.point=[0,0];var Kt=fe(dt[0].v[0],dt[2].v[0],dt[1].v[0]),Qt=fe(dt[0].v[0],dt[1].v[0],dt[2].v[0]),Yt=x-Kt;dt[2].point[1]=0,dt[0].point[0]=-(dt[1].point[0]=dt[0].v[0]/2);var rr=[dt[2].point[0]=dt[0].point[0]+dt[2].v[0]*t(Kt),2*(dt[0].point[1]=dt[1].point[1]=dt[2].v[0]*h(Kt))];return function(cr,gr){var yr,Lr=h(gr),an=t(gr),dn=new Array(3);for(yr=0;yr<3;++yr){var Ln=dt[yr];if(dn[yr]=Ee(gr-Ln[1],Ln[3],Ln[2],an,Lr,cr-Ln[0]),!dn[yr][0])return Ln.point;dn[yr][1]=ge(dn[yr][1]-Ln.v[1])}var On=rr.slice();for(yr=0;yr<3;++yr){var qn=yr==2?0:yr+1,zn=fe(dt[yr].v[0],dn[yr][0],dn[qn][0]);dn[yr][1]<0&&(zn=-zn),yr?yr==1?(zn=Qt-zn,On[0]-=dn[yr][0]*t(zn),On[1]-=dn[yr][0]*h(zn)):(zn=Yt-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 be(Be){return Be[0]*=I,Be[1]*=I,Be}function Se(Be,He,Ke){var st=g.geoCentroid({type:"MultiPoint",coordinates:[Be,He,Ke]}),dt=[-st[0],-st[1]],ht=g.geoRotation(dt),St=ke(be(ht(Be)),be(ht(He)),be(ht(Ke)));St.invert=j(St);var Kt=g.geoProjection(St).rotate(dt),Qt=Kt.center;return delete Kt.rotate,Kt.center=function(Yt){return arguments.length?Qt(ht(Yt)):ht.invert(Qt())},Kt.clipAngle(90)}function Oe(Be,He){var Ke=E(1-h(He));return[2/k*Be*Ke,k*(1-Ke)]}function De(Be){var He=p(Be);function Ke(st,dt){return[st,(st?st/h(st):1)*(h(dt)*t(st)-He*t(dt))]}return Ke.invert=He?function(st,dt){st&&(dt*=h(st)/st);var ht=t(st);return[st,2*n(E(ht*ht+He*He-dt*dt)-ht,He-dt)]}:function(st,dt){return[st,P(st?dt*p(st)/st:dt)]},Ke}Oe.invert=function(Be,He){var Ke=(Ke=He/k-1)*Ke;return[Ke>0?Be*E(x/Ke)/2:0,P(1-Ke)]};var je=E(3);function Je(Be,He){return[je*Be*(2*t(2*He/3)-1)/k,je*k*h(He/3)]}function ze(Be){var He=t(Be);function Ke(st,dt){return[st*He,h(dt)/He]}return Ke.invert=function(st,dt){return[st/He,P(dt*He)]},Ke}function Ue(Be){var He=t(Be);function Ke(st,dt){return[st*He,(1+He)*p(dt/2)]}return Ke.invert=function(st,dt){return[st/He,2*e(dt/(1+He))]},Ke}function Ge(Be,He){var Ke=E(8/(3*x));return[Ke*Be*(1-y(He)/x),Ke*He]}function Ye(Be,He){var Ke=E(4-3*h(y(He)));return[2/E(6*x)*Be*Ke,o(He)*E(2*x/3)*(2-Ke)]}function et(Be,He){var Ke=E(x*(4+x));return[2/Ke*Be*(1+E(1-4*He*He/(x*x))),4/Ke*He]}function ct(Be,He){var Ke=(2+c)*h(He);He/=2;for(var st=0,dt=1/0;st<10&&y(dt)>s;st++){var ht=t(He);He-=dt=(He+h(He)*(ht+2)-Ke)/(2*ht*(1+ht))}return[2/E(x*(4+x))*Be*(1+t(He)),2*E(x/(4+x))*h(He)]}function mt(Be,He){return[Be*(1+t(He))/E(2+x),2*He/E(2+x)]}function Ct(Be,He){for(var Ke=(1+c)*h(He),st=0,dt=1/0;st<10&&y(dt)>s;st++)He-=dt=(He+h(He)-Ke)/(1+t(He));return Ke=E(2+x),[Be*(1+t(He))/Ke,2*He/Ke]}Je.invert=function(Be,He){var Ke=3*P(He/(je*k));return[k*Be/(je*(2*t(2*Ke/3)-1)),Ke]},Ge.invert=function(Be,He){var Ke=E(8/(3*x)),st=He/Ke;return[Be/(Ke*(1-y(st)/x)),st]},Ye.invert=function(Be,He){var Ke=2-y(He)/E(2*x/3);return[Be*E(6*x)/(2*Ke),o(He)*P((4-Ke*Ke)/3)]},et.invert=function(Be,He){var Ke=E(x*(4+x))/2;return[Be*Ke/(1+E(1-He*He*(4+x)/(4*x))),He*Ke/2]},ct.invert=function(Be,He){var Ke=He*E((4+x)/x)/2,st=P(Ke),dt=t(st);return[Be/(2/E(x*(4+x))*(1+dt)),P((st+Ke*(dt+2))/(2+c))]},mt.invert=function(Be,He){var Ke=E(2+x),st=He*Ke/2;return[Ke*Be/(1+t(st)),st]},Ct.invert=function(Be,He){var Ke=1+c,st=E(Ke/2);return[2*Be*st/(1+t(He*=st)),P((He+h(He))/Ke)]};var Tt=3+2*w;function nt(Be,He){var Ke=h(Be/=2),st=t(Be),dt=E(t(He)),ht=t(He/=2),St=h(He)/(ht+w*st*dt),Kt=E(2/(1+St*St)),Qt=E((w*ht+(st+Ke)*dt)/(w*ht+(st-Ke)*dt));return[Tt*(Kt*(Qt-1/Qt)-2*d(Qt)),Tt*(Kt*St*(Qt+1/Qt)-2*e(St))]}nt.invert=function(Be,He){if(!(Ke=K.invert(Be/1.2,1.065*He)))return null;var Ke,st=Ke[0],dt=Ke[1],ht=20;Be/=Tt,He/=Tt;do{var St=st/2,Kt=dt/2,Qt=h(St),Yt=t(St),rr=h(Kt),cr=t(Kt),gr=t(dt),yr=E(gr),Lr=rr/(cr+w*Yt*yr),an=Lr*Lr,dn=E(2/(1+an)),Ln=(w*cr+(Yt+Qt)*yr)/(w*cr+(Yt-Qt)*yr),On=E(Ln),qn=On-1/On,zn=On+1/On,ga=dn*qn-2*d(On)-Be,Aa=dn*Lr*zn-2*e(Lr)-He,ja=rr&&_*yr*Qt*an/rr,Na=(w*Yt*cr+yr)/(2*(cr+w*Yt*yr)*(cr+w*Yt*yr)*yr),Ua=-.5*Lr*dn*dn*dn,ki=Ua*ja,_i=Ua*Na,si=(si=2*cr+w*yr*(Yt-Qt))*si*On,li=(w*Yt*cr*yr+gr)/si,wi=-w*Qt*rr/(yr*si),ji=qn*ki-2*li/On+dn*(li+li/Ln),$i=qn*_i-2*wi/On+dn*(wi+wi/Ln),eo=Lr*zn*ki-2*ja/(1+an)+dn*zn*ja+dn*Lr*(li-li/Ln),to=Lr*zn*_i-2*Na/(1+an)+dn*zn*Na+dn*Lr*(wi-wi/Ln),ro=$i*eo-to*ji;if(!ro)break;var za=(Aa*$i-ga*to)/ro,ut=(ga*eo-Aa*ji)/ro;st-=za,dt=l(-c,a(c,dt-ut))}while((y(za)>s||y(ut)>s)&&--ht>0);return y(y(dt)-c)<s?[0,dt]:ht&&[st,dt]};var Qe=t(35*I);function Et(Be,He){var Ke=p(He/2);return[Be*Qe*E(1-Ke*Ke),(1+Qe)*Ke]}function Gt(Be,He){var Ke=He/2,st=t(Ke);return[2*Be/k*t(He)*st*st,k*p(Ke)]}function Xt(Be){var He=1-Be,Ke=dt(x,0)[0]-dt(-x,0)[0],st=E(2*(dt(0,c)[1]-dt(0,-c)[1])/Ke);function dt(Kt,Qt){var Yt=t(Qt),rr=h(Qt);return[Yt/(He+Be*Yt)*Kt,He*Qt+Be*rr]}function ht(Kt,Qt){var Yt=dt(Kt,Qt);return[Yt[0]*st,Yt[1]/st]}function St(Kt){return ht(0,Kt)[1]}return ht.invert=function(Kt,Qt){var Yt=ee(St,Qt);return[Kt/st*(Be+He/t(Yt)),Yt]},ht}function Fe(Be){return[Be[0]/2,P(p(Be[1]/2*I))*A]}function qe(Be){return[2*Be[0],2*e(h(Be[1]*I))*A]}function wt(Be,He){var Ke=2*x/He,st=Be*Be;function dt(ht,St){var Kt=g.geoAzimuthalEquidistantRaw(ht,St),Qt=Kt[0],Yt=Kt[1],rr=Qt*Qt+Yt*Yt;if(rr>st){var cr=E(rr),gr=n(Yt,Qt),yr=Ke*f(gr/Ke),Lr=gr-yr,an=Be*t(Lr),dn=(Be*h(Lr)-Lr*h(an))/(c-an),Ln=ft(Lr,dn),On=(x-Be)/Ce(Ln,an,x);Qt=cr;var qn,zn=50;do Qt-=qn=(Be+Ce(Ln,an,Qt)*On-cr)/(Ln(Qt)*On);while(y(qn)>s&&--zn>0);Yt=Lr*h(Qt),Qt<c&&(Yt-=dn*(Qt-c));var ga=h(yr),Aa=t(yr);Kt[0]=Qt*Aa-Yt*ga,Kt[1]=Qt*ga+Yt*Aa}return Kt}return dt.invert=function(ht,St){var Kt=ht*ht+St*St;if(Kt>st){var Qt=E(Kt),Yt=n(St,ht),rr=Ke*f(Yt/Ke),cr=Yt-rr;ht=Qt*t(cr),St=Qt*h(cr);for(var gr=ht-c,yr=h(ht),Lr=St/yr,an=ht<c?1/0:0,dn=10;;){var Ln=Be*h(Lr),On=Be*t(Lr),qn=h(On),zn=c-On,ga=(Ln-Lr*qn)/zn,Aa=ft(Lr,ga);if(y(an)<1e-12||!--dn)break;Lr-=an=(Lr*yr-ga*gr-St)/(yr-2*gr*(zn*(On+Lr*Ln*t(On)-qn)-Ln*(Ln-Lr*qn))/(zn*zn))}ht=(Qt=Be+Ce(Aa,On,ht)*(x-Be)/Ce(Aa,On,x))*t(Yt=rr+Lr),St=Qt*h(Yt)}return g.geoAzimuthalEquidistantRaw.invert(ht,St)},dt}function ft(Be,He){return function(Ke){var st=Be*t(Ke);return Ke<c&&(st-=He),E(1+st*st)}}function Ce(Be,He,Ke){for(var st=(Ke-He)/50,dt=Be(He)+Be(Ke),ht=1,St=He;ht<50;++ht)dt+=2*Be(St+=st);return .5*dt*st}function Ie(Be,He,Ke,st,dt,ht,St,Kt){function Qt(Yt,rr){if(!rr)return[Be*Yt/x,0];var cr=rr*rr,gr=Be+cr*(He+cr*(Ke+cr*st)),yr=rr*(dt-1+cr*(ht-Kt+cr*St)),Lr=(gr*gr+yr*yr)/(2*yr),an=Yt*P(gr/Lr)/x;return[Lr*h(an),rr*(1+cr*Kt)+Lr*(1-t(an))]}return arguments.length<8&&(Kt=0),Qt.invert=function(Yt,rr){var cr,gr,yr=x*Yt/Be,Lr=rr,an=50;do{var dn=Lr*Lr,Ln=Be+dn*(He+dn*(Ke+dn*st)),On=Lr*(dt-1+dn*(ht-Kt+dn*St)),qn=Ln*Ln+On*On,zn=2*On,ga=qn/zn,Aa=ga*ga,ja=P(Ln/ga)/x,Na=yr*ja,Ua=Ln*Ln,ki=(2*He+dn*(4*Ke+6*dn*st))*Lr,_i=dt+dn*(3*ht+5*dn*St),si=(2*(Ln*ki+On*(_i-1))*zn-qn*(2*(_i-1)))/(zn*zn),li=t(Na),wi=h(Na),ji=ga*li,$i=ga*wi,eo=yr/x*(1/E(1-Ua/Aa))*(ki*ga-Ln*si)/Aa,to=$i-Yt,ro=Lr*(1+dn*Kt)+ga-ji-rr,za=si*wi+ji*eo,ut=ji*ja,Dt=1+si-(si*li-$i*eo),ir=$i*ja,Ht=za*ir-Dt*ut;if(!Ht)break;yr-=cr=(ro*za-to*Dt)/Ht,Lr-=gr=(to*ir-ro*ut)/Ht}while((y(cr)>s||y(gr)>s)&&--an>0);return[yr,Lr]},Qt}Et.invert=function(Be,He){var Ke=He/(1+Qe);return[Be&&Be/(Qe*E(1-Ke*Ke)),2*e(Ke)]},Gt.invert=function(Be,He){var Ke=e(He/k),st=t(Ke),dt=2*Ke;return[Be*k/2/(t(dt)*st*st),dt]};
vendor: 4,581 bytes, line 20
20var Te=Ie(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),Pe=Ie(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),Ve=Ie(5/6*x,-.62636,-.0344,0,1.3493,-.05524,0,.045);function tt(Be,He){var Ke=Be*Be,st=He*He;return[Be*(1-.162388*st)*(.87-952426e-9*Ke*Ke),He*(1+st/12)]}tt.invert=function(Be,He){var Ke,st=Be,dt=He,ht=50;do{var St=dt*dt;dt-=Ke=(dt*(1+St/12)-He)/(1+St/4)}while(y(Ke)>s&&--ht>0);ht=50,Be/=1-.162388*St;do{var Kt=(Kt=st*st)*Kt;st-=Ke=(st*(.87-952426e-9*Kt)-Be)/(.87-.00476213*Kt)}while(y(Ke)>s&&--ht>0);return[st,dt]};var ot=Ie(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function at(Be){var He=Be(c,0)[0]-Be(-c,0)[0];function Ke(st,dt){var ht=st>0?-.5:.5,St=Be(st+ht*x,dt);return St[0]-=ht*He,St}return Be.invert&&(Ke.invert=function(st,dt){var ht=st>0?-.5:.5,St=Be.invert(st+ht*He,dt),Kt=St[0]-ht*x;return Kt<-x?Kt+=2*x:Kt>x&&(Kt-=2*x),St[0]=Kt,St}),Ke}function _t(Be,He){var Ke=o(Be),st=o(He),dt=t(He),ht=t(Be)*dt,St=h(Be)*dt,Kt=h(st*He);Be=y(n(St,Kt)),He=P(ht),y(Be-c)>s&&(Be%=c);var Qt=function(Yt,rr){if(rr===c)return[0,0];var cr,gr,yr=h(rr),Lr=yr*yr,an=Lr*Lr,dn=1+an,Ln=1+3*an,On=1-an,qn=P(1/E(dn)),zn=On+Lr*dn*qn,ga=(1-yr)/zn,Aa=E(ga),ja=ga*dn,Na=E(ja),Ua=Aa*On;if(Yt===0)return[0,-(Ua+Lr*Na)];var ki,_i=t(rr),si=1/_i,li=2*yr*_i,wi=(-zn*_i-(-3*Lr+qn*Ln)*li*(1-yr))/(zn*zn),ji=-si*li,$i=-si*(Lr*dn*wi+ga*Ln*li),eo=-2*si*(On*(.5*wi/Aa)-2*Lr*Aa*li),to=4*Yt/x;if(Yt>.222*x||rr<x/4&&Yt>.175*x){if(cr=(Ua+Lr*E(ja*(1+an)-Ua*Ua))/(1+an),Yt>x/4)return[cr,cr];var ro=cr,za=.5*cr;cr=.5*(za+ro),gr=50;do{var ut=E(ja-cr*cr),Dt=cr*(eo+ji*ut)+$i*P(cr/Na)-to;if(!Dt)break;Dt<0?za=cr:ro=cr,cr=.5*(za+ro)}while(y(ro-za)>s&&--gr>0)}else{cr=s,gr=25;do{var ir=cr*cr,Ht=E(ja-ir),or=eo+ji*Ht,Sr=cr*or+$i*P(cr/Na)-to,zr=or+($i-ji*ir)/Ht;cr-=ki=Ht?Sr/zr:0}while(y(ki)>s&&--gr>0)}return[cr,-Ua-Lr*E(ja-cr*cr)]}(Be>x/4?c-Be:Be,He);return Be>x/4&&(Kt=Qt[0],Qt[0]=-Qt[1],Qt[1]=-Kt),Qt[0]*=Ke,Qt[1]*=-st,Qt}function bt(Be,He){var Ke,st,dt,ht,St,Kt;if(He<s)return[(ht=h(Be))-(Ke=He*(Be-ht*(st=t(Be)))/4)*st,st+Ke*ht,1-He*ht*ht/2,Be-Ke];if(He>=1-s)return Ke=(1-He)/4,dt=1/(st=F(Be)),[(ht=((Kt=i(2*(Kt=Be)))-1)/(Kt+1))+Ke*((St=st*D(Be))-Be)/(st*st),dt-Ke*ht*dt*(St-Be),dt+Ke*ht*dt*(St+Be),2*e(i(Be))-c+Ke*(St-Be)/st];var Qt=[1,0,0,0,0,0,0,0,0],Yt=[E(He),0,0,0,0,0,0,0,0],rr=0;for(st=E(1-He),St=1;y(Yt[rr]/Qt[rr])>s&&rr<8;)Ke=Qt[rr++],Yt[rr]=(Ke-st)/2,Qt[rr]=(Ke+st)/2,st=E(Ke*st),St*=2;dt=St*Qt[rr]*Be;do dt=(P(ht=Yt[rr]*h(st=dt)/Qt[rr])+dt)/2;while(--rr);return[h(dt),ht=t(dt),ht/t(dt-st),dt]}function jt(Be,He){if(!He)return Be;if(He===1)return d(p(Be/2+T));for(var Ke=1,st=E(1-He),dt=E(He),ht=0;y(dt)>s;ht++){if(Be%x){var St=e(st*p(Be)/Ke);St<0&&(St+=x),Be+=St+~~(Be/x)*x}else Be+=Be;dt=(Ke+st)/2,st=E(Ke*st),dt=((Ke=dt)-st)/2}return Be/(u(2,ht)*Ke)}function Nt(Be,He){var Ke=(w-1)/(w+1),st=E(1-Ke*Ke),dt=jt(c,st*st),ht=d(p(x/4+y(He)/2)),St=i(-1*ht)/E(Ke),Kt=function(Yt,rr){var cr=Yt*Yt,gr=rr+1,yr=1-cr-rr*rr;return[.5*((Yt>=0?c:-c)-n(yr,2*Yt)),-.25*d(yr*yr+4*cr)+.5*d(gr*gr+cr)]}(St*t(-1*Be),St*h(-1*Be)),Qt=function(Yt,rr,cr){var gr=y(Yt),yr=D(y(rr));if(gr){var Lr=1/h(gr),an=1/(p(gr)*p(gr)),dn=-(an+cr*(yr*yr*Lr*Lr)-1+cr),Ln=(-dn+E(dn*dn-4*((cr-1)*an)))/2;return[jt(e(1/E(Ln)),cr)*o(Yt),jt(e(E((Ln/an-1)/cr)),1-cr)*o(rr)]}return[0,jt(e(yr),1-cr)*o(rr)]}(Kt[0],Kt[1],st*st);return[-Qt[1],(He>=0?1:-1)*(.5*dt-Qt[0])]}function $e(Be){var He=h(Be),Ke=t(Be),st=yt(Be);function dt(ht,St){var Kt=st(ht,St);ht=Kt[0],St=Kt[1];var Qt=h(St),Yt=t(St),rr=t(ht),cr=S(He*Qt+Ke*Yt*rr),gr=h(cr),yr=y(gr)>s?cr/gr:1;return[yr*Ke*h(ht),(y(ht)>c?yr:-yr)*(He*Yt-Ke*Qt*rr)]}return st.invert=yt(-Be),dt.invert=function(ht,St){var Kt=E(ht*ht+St*St),Qt=-h(Kt),Yt=t(Kt),rr=Kt*Yt,cr=-St*Qt,gr=Kt*He,yr=E(rr*rr+cr*cr-gr*gr),Lr=n(rr*gr+cr*yr,cr*gr-rr*yr),an=(Kt>c?-1:1)*n(ht*Qt,Kt*t(Lr)*Yt+St*h(Lr)*Qt);return st.invert(an,Lr)},dt}function yt(Be){var He=h(Be),Ke=t(Be);return function(st,dt){var ht=t(dt),St=t(st)*ht,Kt=h(st)*ht,Qt=h(dt);return[n(Kt,St*Ke-Qt*He),P(Qt*Ke+St*He)]}}_t.invert=function(Be,He){y(Be)>1&&(Be=2*o(Be)-Be),y(He)>1&&(He=2*o(He)-He);var Ke=o(Be),st=o(He),dt=-Ke*Be,ht=-st*He,St=ht/dt<1,Kt=function(cr,gr){for(var yr=0,Lr=1,an=.5,dn=50;;){var Ln=an*an,On=E(an),qn=P(1/E(1+Ln)),zn=1-Ln+an*(1+Ln)*qn,ga=(1-On)/zn,Aa=E(ga),ja=ga*(1+Ln),Na=Aa*(1-Ln),Ua=E(ja-cr*cr),ki=gr+Na+an*Ua;if(y(Lr-yr)<1e-12||--dn==0||ki===0)break;ki>0?yr=an:Lr=an,an=.5*(yr+Lr)}if(!dn)return null;var _i=P(On),si=t(_i),li=1/si,wi=2*On*si,ji=(-zn*si-(-3*an+qn*(1+3*Ln))*wi*(1-On))/(zn*zn);return[x/4*(cr*(-2*li*(.5*ji/Aa*(1-Ln)-2*an*Aa*wi)+-li*wi*Ua)+-li*(an*(1+Ln)*ji+ga*(1+3*Ln)*wi)*P(cr/E(ja)
vendor: 16,061 bytes, line 20
20)),_i]}(St?ht:dt,St?dt:ht),Qt=Kt[0],Yt=Kt[1],rr=t(Yt);return St&&(Qt=-c-Qt),[Ke*(n(h(Qt)*rr,-h(Yt))+x),st*P(t(Qt)*rr)]},Nt.invert=function(Be,He){var Ke,st,dt,ht,St,Kt,Qt=(w-1)/(w+1),Yt=E(1-Qt*Qt),rr=jt(c,Yt*Yt),cr=(st=-Be,dt=Yt*Yt,(Ke=.5*rr-He)?(ht=bt(Ke,dt),st?(Kt=(St=bt(st,1-dt))[1]*St[1]+dt*ht[0]*ht[0]*St[0]*St[0],[[ht[0]*St[2]/Kt,ht[1]*ht[2]*St[0]*St[1]/Kt],[ht[1]*St[1]/Kt,-ht[0]*ht[2]*St[0]*St[2]/Kt],[ht[2]*St[1]*St[2]/Kt,-dt*ht[0]*ht[1]*St[0]/Kt]]):[[ht[0],0],[ht[1],0],[ht[2],0]]):[[0,(St=bt(st,1-dt))[0]/St[1]],[1/St[1],0],[St[2]/St[1],0]]),gr=function(yr,Lr){var an=Lr[0]*Lr[0]+Lr[1]*Lr[1];return[(yr[0]*Lr[0]+yr[1]*Lr[1])/an,(yr[1]*Lr[0]-yr[0]*Lr[1])/an]}(cr[0],cr[1]);return[n(gr[1],gr[0])/-1,2*e(i(-.5*d(Qt*gr[0]*gr[0]+Qt*gr[1]*gr[1])))-c]};var Ot=P(1-1/3)*A,Mt=ze(0);function Pt(Be){var He=Ot*I,Ke=Oe(x,He)[0]-Oe(-x,He)[0],st=Mt(0,He)[1],dt=Oe(0,He)[1],ht=k-dt,St=L/Be,Kt=4/L,Qt=st+ht*ht*4/L;function Yt(rr,cr){var gr,yr=y(cr);if(yr>He){var Lr=a(Be-1,l(0,r((rr+x)/St)));(gr=Oe(rr+=x*(Be-1)/Be-Lr*St,yr))[0]=gr[0]*L/Ke-L*(Be-1)/(2*Be)+Lr*L/Be,gr[1]=st+4*(gr[1]-dt)*ht/L,cr<0&&(gr[1]=-gr[1])}else gr=Mt(rr,cr);return gr[0]*=Kt,gr[1]/=Qt,gr}return Yt.invert=function(rr,cr){rr/=Kt;var gr=y(cr*=Qt);if(gr>st){var yr=a(Be-1,l(0,r((rr+x)/St)));rr=(rr+x*(Be-1)/Be-yr*St)*Ke/L;var Lr=Oe.invert(rr,.25*(gr-st)*L/ht+dt);return Lr[0]-=x*(Be-1)/Be-yr*St,cr<0&&(Lr[1]=-Lr[1]),Lr}return Mt.invert(rr,cr)},Yt}function Le(Be,He){return[Be,1&He?90-s:Ot]}function Xe(Be,He){return[Be,1&He?-90+s:-Ot]}function it(Be){return[Be[0]*(1-s),Be[1]]}function At(Be){var He,Ke=1+Be,st=P(h(1/Ke)),dt=2*E(x/(He=x+4*st*Ke)),ht=.5*dt*(Ke+E(Be*(2+Be))),St=Be*Be,Kt=Ke*Ke;function Qt(Yt,rr){var cr,gr,yr=1-h(rr);if(yr&&yr<2){var Lr,an=c-rr,dn=25;do{var Ln=h(an),On=t(an),qn=st+n(Ln,Ke-On),zn=1+Kt-2*Ke*On;an-=Lr=(an-St*st-Ke*Ln+zn*qn-.5*yr*He)/(2*Ke*Ln*qn)}while(y(Lr)>1e-12&&--dn>0);cr=dt*E(zn),gr=Yt*qn/x}else cr=dt*(Be+yr),gr=Yt*st/x;return[cr*h(gr),ht-cr*t(gr)]}return Qt.invert=function(Yt,rr){var cr=Yt*Yt+(rr-=ht)*rr,gr=(1+Kt-cr/(dt*dt))/(2*Ke),yr=S(gr),Lr=h(yr),an=st+n(Lr,Ke-gr);return[P(Yt/E(cr))*x/an,P(1-2*(yr-St*st-Ke*Lr+(1+Kt-2*Ke*gr)*an)/He)]},Qt}function It(Be,He){return He>-.7109889596207567?((Be=ne(Be,He))[1]+=.0528035274542,Be):de(Be,He)}function Zt(Be,He){return y(He)>.7109889596207567?((Be=ne(Be,He))[1]-=He>0?.0528035274542:-.0528035274542,Be):de(Be,He)}function Jt(Be,He,Ke,st){var dt=E(4*x/(2*Ke+(1+Be-He/2)*h(2*Ke)+(Be+He)/2*h(4*Ke)+He/2*h(6*Ke))),ht=E(st*h(Ke)*E((1+Be*t(2*Ke)+He*t(4*Ke))/(1+Be+He))),St=Ke*Qt(1);function Kt(cr){return E(1+Be*t(2*cr)+He*t(4*cr))}function Qt(cr){var gr=cr*Ke;return(2*gr+(1+Be-He/2)*h(2*gr)+(Be+He)/2*h(4*gr)+He/2*h(6*gr))/Ke}function Yt(cr){return Kt(cr)*h(cr)}var rr=function(cr,gr){var yr=Ke*ee(Qt,St*h(gr)/Ke,gr/x);isNaN(yr)&&(yr=Ke*o(gr));var Lr=dt*Kt(yr);return[Lr*ht*cr/x*t(yr),Lr/ht*h(yr)]};return rr.invert=function(cr,gr){var yr=ee(Yt,gr*ht/dt);return[cr*x/(t(yr)*dt*ht*Kt(yr)),P(Ke*Qt(yr/Ke)/St)]},Ke===0&&(dt=E(st/x),(rr=function(cr,gr){return[cr*dt,h(gr)/dt]}).invert=function(cr,gr){return[cr/dt,P(gr*dt)]}),rr}function Vt(Be,He,Ke,st,dt){st===void 0&&(st=1e-8),dt===void 0&&(dt=20);var ht=Be(He),St=Be(.5*(He+Ke)),Kt=Be(Ke);return function Qt(Yt,rr,cr,gr,yr,Lr,an,dn,Ln,On,qn){if(qn.nanEncountered)return NaN;var zn,ga,Aa,ja,Na,Ua,ki,_i,si,li;if(ga=Yt(rr+.25*(zn=cr-rr)),Aa=Yt(cr-.25*zn),isNaN(ga))qn.nanEncountered=!0;else{if(!isNaN(Aa))return li=((Ua=(ja=zn*(gr+4*ga+yr)/12)+(Na=zn*(yr+4*Aa+Lr)/12))-an)/15,On>Ln?(qn.maxDepthCount++,Ua+li):Math.abs(li)<dn?Ua+li:(_i=Qt(Yt,rr,ki=rr+.5*zn,gr,ga,yr,ja,.5*dn,Ln,On+1,qn),isNaN(_i)?(qn.nanEncountered=!0,NaN):(si=Qt(Yt,ki,cr,yr,Aa,Lr,Na,.5*dn,Ln,On+1,qn),isNaN(si)?(qn.nanEncountered=!0,NaN):_i+si));qn.nanEncountered=!0}}(Be,He,Ke,ht,St,Kt,(ht+4*St+Kt)*(Ke-He)/6,st,dt,1,{maxDepthCount:0,nanEncountered:!1})}function pr(Be,He,Ke){function st(yr){return Be+(1-Be)*u(1-u(yr,He),1/He)}function dt(yr){return Vt(st,0,yr,1e-4)}for(var ht=1/dt(1),St=1e3,Kt=(1+1e-8)*ht,Qt=[],Yt=0;Yt<=St;Yt++)Qt.push(dt(Yt/St)*Kt);function rr(yr){var Lr=0,an=St,dn=500;do Qt[dn]>yr?an=dn:Lr=dn,dn=Lr+an>>1;while(dn>Lr);var Ln=Qt[dn+1]-Qt[dn];return Ln&&(Ln=(yr-Qt[dn+1])/Ln),(dn+1+Ln)/St}var cr=2*rr(1)/x*ht/Ke,gr=function(yr,Lr){var an=rr(y(h(Lr))),dn=st(an)*yr;return an/=cr,[dn,Lr>=0?an:-an]};return gr.invert=function(yr,Lr){var an;return y(Lr*=cr)<1&&(an=o(Lr)*P(dt(y(Lr))*ht)),[yr/st(y(Lr)),an]},gr}function Ir(Be,He){return y(Be[0]-He[0])<s&&y(Be[1]-He[1])<s}function fr(Be,He){for(var Ke,st,dt,ht=-1,St=Be.length,Kt=Be[0],Qt=[];++ht<St;){st=((Ke=Be[ht])[0]-Kt[0])/He,dt=(Ke[1]-Kt[1])/He;for(var Yt=0;Yt<He;++Yt)Qt.push([Kt[0]+Yt*st,Kt[1]+Yt*dt]);Kt=Ke}return Qt.push(Ke),Qt}function $t(Be){var He,Ke,st,dt,ht,St,Kt,Qt=[],Yt=Be[0].length;for(Kt=0;Kt<Yt;++Kt)Ke=(He=Be[0][Kt])[0][0],st=He[0][1],dt=He[1][1],ht=He[2][0],St=He[2][1],Qt.push(fr([[Ke+s,st+s],[Ke+s,dt-s],[ht-s,dt-s],[ht-s,St+s]],30));for(Kt=Be[1].length-1;Kt>=0;--Kt)Ke=(He=Be[1][Kt])[0][0],st=He[0][1],dt=He[1][1],ht=He[2][0],St=He[2][1],Qt.push(fr([[ht-s,St-s],[ht-s,dt+s],[Ke+s,dt+s],[Ke+s,st-s]],30));return{type:"Polygon",coordinates:[b.merge(Qt)]}}function er(Be,He,Ke){var st,dt;function ht(Qt,Yt){for(var rr=Yt<0?-1:1,cr=He[+(Yt<0)],gr=0,yr=cr.length-1;gr<yr&&Qt>cr[gr][2][0];++gr);var Lr=Be(Qt-cr[gr][1][0],Yt);return Lr[0]+=Be(cr[gr][1][0],rr*Yt>rr*cr[gr][0][1]?cr[gr][0][1]:Yt)[0],Lr}Ke?ht.invert=Ke(ht):Be.invert&&(ht.invert=function(Qt,Yt){for(var rr=dt[+(Yt<0)],cr=He[+(Yt<0)],gr=0,yr=rr.length;gr<yr;++gr){var Lr=rr[gr];if(Lr[0][0]<=Qt&&Qt<Lr[1][0]&&Lr[0][1]<=Yt&&Yt<Lr[1][1]){var an=Be.invert(Qt-Be(cr[gr][1][0],0)[0],Yt);return an[0]+=cr[gr][1][0],Ir(ht(an[0],an[1]),[Qt,Yt])?an:null}}});var St=g.geoProjection(ht),Kt=St.stream;return St.stream=function(Qt){var Yt=St.rotate(),rr=Kt(Qt),cr=(St.rotate([0,0]),Kt(Qt));return St.rotate(Yt),rr.sphere=function(){g.geoStream(st,cr)},rr},St.lobes=function(Qt){return arguments.length?(st=$t(Qt),He=Qt.map(function(Yt){return Yt.map(function(rr){return[[rr[0][0]*I,rr[0][1]*I],[rr[1][0]*I,rr[1][1]*I],[rr[2][0]*I,rr[2][1]*I]]})}),dt=He.map(function(Yt){return Yt.map(function(rr){var cr,gr=Be(rr[0][0],rr[0][1])[0],yr=Be(rr[2][0],rr[2][1])[0],Lr=Be(rr[1][0],rr[0][1])[1],an=Be(rr[1][0],rr[1][1])[1];return Lr>an&&(cr=Lr,Lr=an,an=cr),[[gr,Lr],[yr,an]]})}),St):He.map(function(Yt){return Yt.map(function(rr){return[[rr[0][0]*A,rr[0][1]*A],[rr[1][0]*A,rr[1][1]*A],[rr[2][0]*A,rr[2][1]*A]]})})},He!=null&&St.lobes(He),St}It.invert=function(Be,He){return He>-.7109889596207567?ne.invert(Be,He-.0528035274542):de.invert(Be,He)},Zt.invert=function(Be,He){return y(He)>.7109889596207567?ne.invert(Be,He+(He>0?.0528035274542:-.0528035274542)):de.invert(Be,He)};var ar=[[[[-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]]]],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]]]],vr=[[[[-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]]]],Pr=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],Ur=[[[[-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]]]],qr=[[[[-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 rn(Be,He){return[3/L*Be*E(x*x/3-He*He),He]}function An(Be){function He(Ke,st){if(y(y(st)-c)<s)return[0,st<0?-2:2];var dt=h(st),ht=u((1+dt)/(1-dt),Be/2),St=.5*(ht+1/ht)+t(Ke*=Be);return[2*h(Ke)/St,(ht-1/ht)/St]}return He.invert=function(Ke,st){var dt=y(st);if(y(dt-2)<s)return Ke?null:[0,o(st)*c];if(dt>2)return null;var ht=(Ke/=2)*Ke,St=(st/=2)*st,Kt=2*st/(1+ht+St);return Kt=u((1+Kt)/(1-Kt),1/Be),[n(2*Ke,1-ht-St)/Be,P((Kt-1)/(Kt+1))]},He}rn.invert=function(Be,He){return[L/3*Be/E(x*x/3-He*He),He]};var mn=x/w;function Mn(Be,He){return[Be*(1+E(t(He)))/2,He/(t(He/2)*t(Be/6))]}function Xr(Be,He){var Ke=Be*Be,st=He*He;return[Be*(.975534+st*(-.0143059*Ke-.119161+-.0547009*st)),He*(1.00384+Ke*(.0802894+-.02855*st+199025e-9*Ke)+st*(.0998909+-.0491032*st))]}function Er(Be,He){return[h(Be)/t(He),p(He)*t(Be)]}function on(Be){var He=t(Be),Ke=p(T+Be/2);function st(dt,ht){var St=ht-Be,Kt=y(St)<s?dt*He:y(Kt=T+ht/2)<s||y(y(Kt)-c)<s?0:dt*St/d(p(Kt)/Ke);return[Kt,St]}return st.invert=function(dt,ht){var St,Kt=ht+Be;return[y(ht)<s?dt/He:y(St=T+Kt/2)<s||y(y(St)-c)<s?0:dt*d(p(St)/Ke)/ht,Kt]},st}function Un(Be,He){return[Be,1.25*d(p(T+.4*He))]}function Tr(Be){var He=Be.length-1;function Ke(st,dt){for(var ht,St=t(dt),Kt=2/(1+St*t(st)),Qt=Kt*St*h(st),Yt=Kt*h(dt),rr=He,cr=Be[rr],gr=cr[0],yr=cr[1];--rr>=0;)gr=(cr=Be[rr])[0]+Qt*(ht=gr)-Yt*yr,yr=cr[1]+Qt*yr+Yt*ht;return[gr=Qt*(ht=gr)-Yt*yr,yr=Qt*yr+Yt*ht]}return Ke.invert=function(st,dt){var ht=20,St=st,Kt=dt;do{for(var Qt,Yt=He,rr=Be[Yt],cr=rr[0],gr=rr[1],yr=0,Lr=0;--Yt>=0;)yr=cr+St*(Qt=yr)-Kt*Lr,Lr=gr+St*Lr+Kt*Qt,cr=(rr=Be[Yt])[0]+St*(Qt=cr)-Kt*gr,gr=rr[1]+St*gr+Kt*Qt;var an,dn,Ln=(yr=cr+St*(Qt=yr)-Kt*Lr)*yr+(Lr=gr+St*Lr+Kt*Qt)*Lr;St-=an=((cr=St*(Qt=cr)-Kt*gr-st)*yr+(gr=St*gr+Kt*Qt-dt)*Lr)/Ln,Kt-=dn=(gr*yr-cr*Lr)/Ln}while(y(an)+y(dn)>1e-12&&--ht>0);if(ht){var On=E(St*St+Kt*Kt),qn=2*e(.5*On),zn=h(qn);return[n(St*zn,On*t(qn)),On?P(Kt*zn/On):0]}},Ke}Mn.invert=function(Be,He){var Ke=y(Be),st=y(He),dt=s,ht=c;st<mn?ht*=st/mn:dt+=6*S(mn/st);for(var St=0;St<25;St++){var Kt=h(ht),Qt=E(t(ht)),Yt=h(ht/2),rr=t(ht/2),cr=h(dt/6),gr=t(dt/6),yr=.5*dt*(1+Qt)-Ke,Lr=ht/(rr*gr)-st,an=Qt?-.25*dt*Kt/Qt:0,dn=.5*(1+Qt),Ln=(1+.5*ht*Yt/rr)/(rr*gr),On=ht/rr*(cr/6)/(gr*gr),qn=an*On-Ln*dn,zn=(yr*On-Lr*dn)/qn,ga=(Lr*an-yr*Ln)/qn;if(ht-=zn,dt-=ga,y(zn)<s&&y(ga)<s)break}return[Be<0?-dt:dt,He<0?-ht:ht]},Xr.invert=function(Be,He){var Ke=o(Be)*x,st=He/2,dt=50;do{var ht=Ke*Ke,St=st*st,Kt=Ke*st,Qt=Ke*(.975534+St*(-.0143059*ht-.119161+-.0547009*St))-Be,Yt=st*(1.00384+ht*(.0802894+-.02855*St+199025e-9*ht)+St*(.0998909+-.0491032*St))-He,rr=.975534-St*(.119161+3*ht*.0143059+.0547009*St),cr=-Kt*(.238322+.2188036*St+.0286118*ht),gr=Kt*(.1605788+7961e-7*ht+-.0571*St),yr=1.00384+ht*(.0802894+199025e-9*ht)+St*(3*(.0998909-.02855*ht)-.245516*St),Lr=cr*gr-yr*rr,an=(Yt*cr-Qt*yr)/Lr,dn=(Qt*gr-Yt*rr)/Lr;Ke-=an,st-=dn}while((y(an)>s||y(dn)>s)&&--dt>0);return dt&&[Ke,st]},Er.invert=function(Be,He){var Ke=Be*Be,st=He*He+1,dt=Ke+st,ht=Be?_*E((dt-E(dt*dt-4*Ke))/Ke):1/E(st);return[P(Be*ht),o(He)*S(ht)]},Un.invert=function(Be,He){return[Be,2.5*e(i(.8*He))-.625*x]};var en=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],$r=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Rr=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Pn=[[.9245,0],[0,0],[.01943,0]],Nn=[[.721316,0],[0,0],[-.00881625,-.00617325]];function hn(Be,He){var Ke=g.geoProjection(Tr(Be)).rotate(He).clipAngle(90),st=g.geoRotation(He),dt=Ke.center;return delete Ke.rotate,Ke.center=function(ht){return arguments.length?dt(st(ht)):st.invert(dt())},Ke}var Fn=E(6),ca=E(7);function sr(Be,He){var Ke=P(7*h(He)/(3*Fn));return[Fn*Be*(2*t(2*Ke/3)-1)/ca,9*h(Ke/3)/ca]}function Fr(Be,He){for(var Ke,st=(1+_)*h(He),dt=He,ht=0;ht<25&&(dt-=Ke=(h(dt/2)+h(dt)-st)/(.5*t(dt/2)+t(dt)),!(y(Ke)<s));ht++);return[Be*(1+2*t(dt)/t(dt/2))/(3*w),2*E(3)*h(dt/2)/E(2+w)]}function Bt(Be,He){for(var Ke,st=E(6/(4+x)),dt=(1+x/4)*h(He),ht=He/2,St=0;St<25&&(ht-=Ke=(ht/2+h(ht)-dt)/(.5+t(ht)),!(y(Ke)<s));St++);return[st*(.5+t(ht))*Be/1.5,st*ht]}function lr(Be,He){var Ke=He*He,st=Ke*Ke,dt=Ke*st;return[Be*(.84719-.13063*Ke+dt*dt*(.05494*Ke-.04515-.02326*st+.00331*dt)),He*(1.01183+st*st*(.01926*Ke-.02625-.00396*st))]}function mr(Be,He){return[Be*(1+t(He))/2,2*(He-p(He/2))]}sr.invert=function(Be,He){var Ke=3*P(He*ca/9);return[Be*ca/(Fn*(2*t(2*Ke/3)-1)),P(3*h(Ke)*Fn/7)]},Fr.invert=function(Be,He){var Ke=He*E(2+w)/(2*E(3)),st=2*P(Ke);return[3*w*Be/(1+2*t(st)/t(st/2)),P((Ke+h(st))/(1+_))]},Bt.invert=function(Be,He){var Ke=E(6/(4+x)),st=He/Ke;return y(y(st)-c)<s&&(st=st<0?-c:c),[1.5*Be/(Ke*(.5+t(st))),P((st/2+h(st))/(1+x/4))]},lr.invert=function(Be,He){var Ke,st,dt,ht,St=He,Kt=25;do St-=Ke=(St*(1.01183+(dt=(st=St*St)*st)*dt*(.01926*st-.02625-.00396*dt))-He)/(1.01183+dt*dt*(.21186*st-.23625+-.05148*dt));while(y(Ke)>1e-12&&--Kt>0);return[Be/(.84719-.13063*(st=St*St)+(ht=st*(dt=st*st))*ht*(.05494*st-.04515-.02326*dt+.00331*ht)),St]},mr.invert=function(Be,He){for(var Ke=He/2,st=0,dt=1/0;st<10&&y(dt)>s;++st){var ht=t(He/2);He-=dt=(He-p(He/2)-Ke)/(1-.5/(ht*ht))}return[2*Be/(1+t(He)),He]};var Vr=[[[[-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 Br(Be,He){var Ke=h(He),st=t(He),dt=o(Be);if(Be===0||y(He)===c)return[0,He];if(He===0)return[Be,0];if(y(Be)===c)return[Be*st,c*Ke];var ht=x/(2*Be)-2*Be/x,St=2*He/x,Kt=(1-St*St)/(Ke-St),Qt=ht*ht,Yt=Kt*Kt,rr=1+Qt/Yt,cr=1+Yt/Qt,gr=(ht*Ke/Kt-ht/2)/rr,yr=(Yt*Ke/Qt+Kt/2)/cr,Lr=yr*yr-(Yt*Ke*Ke/Qt+Kt*Ke-1)/cr;return[c*(gr+E(gr*gr+st*st/rr)*dt),c*(yr+E(Lr<0?0:Lr)*o(-He*ht)*dt)]}Br.invert=function(Be,He){var Ke=(Be/=c)*Be,st=Ke+(He/=c)*He,dt=x*x;return[Be?(st-1+E((1-st)*(1-st)+4*Ke))/(2*Be)*c:0,ee(function(ht){return st*(x*h(ht)-2*ht)*x+4*ht*ht*(He-h(ht))+2*x*ht-dt*He},0)]};function Dr(Be,He){var Ke=He*He;return[Be,He*(1.0148+Ke*Ke*(.23185+Ke*(.02406*Ke-.14499)))]}function Or(Be,He){if(y(He)<s)return[Be,0];var Ke=p(He),st=Be*h(He);return[h(st)/Ke,He+(1-t(st))/Ke]}function xr(Be,He){var Ke=_r(Be[1],Be[0]),st=_r(He[1],He[0]),dt=function(St,Kt){return n(St[0]*Kt[1]-St[1]*Kt[0],St[0]*Kt[0]+St[1]*Kt[1])}(Ke,st),ht=Cr(Ke)/Cr(st);return br([1,0,Be[0][0],0,1,Be[0][1]],br([ht,0,0,0,ht,0],br([t(dt),h(dt),0,-h(dt),t(dt),0],[1,0,-He[0][0],0,1,-He[0][1]])))}function br(Be,He){return[Be[0]*He[0]+Be[1]*He[3],Be[0]*He[1]+Be[1]*He[4],Be[0]*He[2]+Be[1]*He[5]+Be[2],Be[3]*He[0]+Be[4]*He[3],Be[3]*He[1]+Be[4]*He[4],Be[3]*He[2]+Be[4]*He[5]+Be[5]]}function _r(Be,He){return[Be[0]-He[0],Be[1]-He[1]]}function Cr(Be){return E(Be[0]*Be[0]+Be[1]*Be[1])}function Wr(Be,He,Ke){function st(St,Kt){var Qt,Yt=He(St,Kt),rr=Yt.project([St*A,Kt*A]);return(Qt=Yt.transform)?[Qt[0]*rr[0]+Qt[1]*rr[1]+Qt[2],-(Qt[3]*rr[0]+Qt[4]*rr[1]+Qt[5])]:(rr[1]=-rr[1],rr)}(function St(Kt,Qt){if(Kt.edges=function(Lr){for(var an=Lr.length,dn=[],Ln=Lr[an-1],On=0;On<an;++On)dn.push([Ln,Ln=Lr[On]]);return dn}(Kt.face),Qt.face){var Yt=Kt.shared=function(Lr,an){for(var dn,Ln,On=Lr.length,qn=null,zn=0;zn<On;++zn){dn=Lr[zn];for(var ga=an.length;--ga>=0;)if(Ln=an[ga],dn[0]===Ln[0]&&dn[1]===Ln[1]){if(qn)return[qn,dn];qn=dn}}}(Kt.face,Qt.face),rr=xr(Yt.map(Qt.project),Yt.map(Kt.project));Kt.transform=Qt.transform?br(Qt.transform,rr):rr;for(var cr=Qt.edges,gr=0,yr=cr.length;gr<yr;++gr)Gr(Yt[0],cr[gr][1])&&Gr(Yt[1],cr[gr][0])&&(cr[gr]=Kt),Gr(Yt[0],cr[gr][0])&&Gr(Yt[1],cr[gr][1])&&(cr[gr]=Kt);for(cr=Kt.edges,gr=0,yr=cr.length;gr<yr;++gr)Gr(Yt[0],cr[gr][0])&&Gr(Yt[1],cr[gr][1])&&(cr[gr]=Qt),Gr(Yt[0],cr[gr][1])&&Gr(Yt[1],cr[gr][0])&&(cr[gr]=Qt)}else Kt.transform=Qt.transform;return Kt.children&&Kt.children.forEach(function(Lr){St(Lr,Kt)}),Kt})(Be,{transform:null}),tn(Be)&&(st.invert=function(St,Kt){var Qt=function Yt(rr,cr){var gr=rr.project.invert,yr=rr.transform,Lr=cr;if(yr&&(yr=function(qn){var zn=1/(qn[0]*qn[4]-qn[1]*qn[3]);return[zn*qn[4],-zn*qn[1],zn*(qn[1]*qn[5]-qn[2]*qn[4]),-zn*qn[3],zn*qn[0],zn*(qn[2]*qn[3]-qn[0]*qn[5])]}(yr),Lr=[yr[0]*Lr[0]+yr[1]*Lr[1]+yr[2],yr[3]*Lr[0]+yr[4]*Lr[1]+yr[5]]),gr&&rr===function(qn){return He(qn[0]*I,qn[1]*I)}(an=gr(Lr)))return an;for(var an,dn=rr.children,Ln=0,On=dn&&dn.length;Ln<On;++Ln)if(an=Yt(dn[Ln],cr))return an}(Be,[St,-Kt]);return Qt&&(Qt[0]*=I,Qt[1]*=I,Qt)});var dt=g.geoProjection(st),ht=dt.stream;
vendor: 5,096 bytes, line 20
20return dt.stream=function(St){var Kt=dt.rotate(),Qt=ht(St),Yt=(dt.rotate([0,0]),ht(St));return dt.rotate(Kt),Qt.sphere=function(){Yt.polygonStart(),Yt.lineStart(),function rr(cr,gr,yr){var Lr,an,dn=gr.edges,Ln=dn.length,On={type:"MultiPoint",coordinates:gr.face},qn=gr.face.filter(function(ki){return y(ki[1])!==90}),zn=g.geoBounds({type:"MultiPoint",coordinates:qn}),ga=!1,Aa=-1,ja=zn[1][0]-zn[0][0],Na=ja===180||ja===360?[(zn[0][0]+zn[1][0])/2,(zn[0][1]+zn[1][1])/2]:g.geoCentroid(On);if(yr)for(;++Aa<Ln&&dn[Aa]!==yr;);++Aa;for(var Ua=0;Ua<Ln;++Ua)an=dn[(Ua+Aa)%Ln],Array.isArray(an)?(ga||(cr.point((Lr=g.geoInterpolate(an[0],Na)(s))[0],Lr[1]),ga=!0),cr.point((Lr=g.geoInterpolate(an[1],Na)(s))[0],Lr[1])):(ga=!1,an!==yr&&rr(cr,an,gr))}(Yt,Be),Yt.lineEnd(),Yt.polygonEnd()},Qt},dt.angle(Ke==null?-30:Ke*A)}function Gr(Be,He){return Be&&He&&Be[0]===He[0]&&Be[1]===He[1]}function tn(Be){return Be.project.invert||Be.children&&Be.children.some(tn)}Dr.invert=function(Be,He){He>1.790857183?He=1.790857183:He<-1.790857183&&(He=-1.790857183);var Ke,st=He;do{var dt=st*st;st-=Ke=(st*(1.0148+dt*dt*(.23185+dt*(.02406*dt-.14499)))-He)/(1.0148+dt*dt*(5*.23185+dt*(.21654*dt-1.01493)))}while(y(Ke)>s);return[Be,st]},Or.invert=function(Be,He){if(y(He)<s)return[Be,0];var Ke,st=Be*Be+He*He,dt=.5*He,ht=10;do{var St=p(dt),Kt=1/t(dt),Qt=st-2*He*dt+dt*dt;dt-=Ke=(St*Qt+2*(dt-He))/(2+Qt*Kt*Kt+2*(dt-He)*St)}while(y(Ke)>s&&--ht>0);return St=p(dt),[(y(He)<y(dt+1/St)?P(Be*St):o(He)*o(Be)*(S(y(Be*St))+c))/h(dt),dt]};var nn=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],vn=[[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(Be){return Be.map(function(He){return nn[He]})}),xn=2/E(3);function bn(Be,He){var Ke=Oe(Be,He);return[Ke[0]*xn,Ke[1]]}function En(Be,He){for(var Ke=0,st=Be.length,dt=0;Ke<st;++Ke)dt+=Be[Ke]*He[Ke];return dt}function In(Be){return[n(Be[1],Be[0])*A,P(l(-1,a(1,Be[2])))*A]}function Wn(Be){var He=Be[0]*I,Ke=Be[1]*I,st=t(Ke);return[st*t(He),st*h(He),h(Ke)]}function Ma(){}function ka(Be,He){return{type:"FeatureCollection",features:Be.features.map(function(Ke){return kn(Ke,He)})}}function kn(Be,He){return{type:"Feature",id:Be.id,properties:Be.properties,geometry:$n(Be.geometry,He)}}function $n(Be,He){if(!Be)return null;if(Be.type==="GeometryCollection")return function(st,dt){return{type:"GeometryCollection",geometries:st.geometries.map(function(ht){return $n(ht,dt)})}}(Be,He);var Ke;switch(Be.type){case"Point":case"MultiPoint":Ke=mi;break;case"LineString":case"MultiLineString":Ke=Di;break;case"Polygon":case"MultiPolygon":case"Sphere":Ke=uo;break;default:return null}return g.geoStream(Be,He(Ke)),Ke.result()}bn.invert=function(Be,He){return Oe.invert(Be/xn,He)};var Jn=[],Oa=[],mi={point:function(Be,He){Jn.push([Be,He])},result:function(){var Be=Jn.length?Jn.length<2?{type:"Point",coordinates:Jn[0]}:{type:"MultiPoint",coordinates:Jn}:null;return Jn=[],Be}},Di={lineStart:Ma,point:function(Be,He){Jn.push([Be,He])},lineEnd:function(){Jn.length&&(Oa.push(Jn),Jn=[])},result:function(){var Be=Oa.length?Oa.length<2?{type:"LineString",coordinates:Oa[0]}:{type:"MultiLineString",coordinates:Oa}:null;return Oa=[],Be}},uo={polygonStart:Ma,lineStart:Ma,point:function(Be,He){Jn.push([Be,He])},lineEnd:function(){var Be=Jn.length;if(Be){do Jn.push(Jn[0].slice());while(++Be<4);Oa.push(Jn),Jn=[]}},polygonEnd:Ma,result:function(){if(!Oa.length)return null;var Be=[],He=[];return Oa.forEach(function(Ke){(function(st){if((dt=st.length)<4)return!1;for(var dt,ht=0,St=st[dt-1][1]*st[0][0]-st[dt-1][0]*st[0][1];++ht<dt;)St+=st[ht-1][1]*st[ht][0]-st[ht-1][0]*st[ht][1];return St<=0})(Ke)?Be.push([Ke]):He.push(Ke)}),He.forEach(function(Ke){var st=Ke[0];Be.some(function(dt){if(function(ht,St){for(var Kt=St[0],Qt=St[1],Yt=!1,rr=0,cr=ht.length,gr=cr-1;rr<cr;gr=rr++){var yr=ht[rr],Lr=yr[0],an=yr[1],dn=ht[gr],Ln=dn[0],On=dn[1];an>Qt^On>Qt&&Kt<(Ln-Lr)*(Qt-an)/(On-an)+Lr&&(Yt=!Yt)}return Yt}(dt[0],st))return dt.push(Ke),!0})||Be.push([Ke])}),Oa=[],Be.length?Be.length>1?{type:"MultiPolygon",coordinates:Be}:{type:"Polygon",coordinates:Be[0]}:null}};function Ya(Be){var He=Be(c,0)[0]-Be(-c,0)[0];function Ke(st,dt){var ht=y(st)<c,St=Be(ht?st:st>0?st-x:st+x,dt),Kt=(St[0]-St[1])*_,Qt=(St[0]+St[1])*_;if(ht)return[Kt,Qt];var Yt=He*_,rr=Kt>0^Qt>0?-1:1;return[rr*Kt-o(Qt)*Yt,rr*Qt-o(Kt)*Yt]}return Be.invert&&(Ke.invert=function(st,dt){var ht=(st+dt)*_,St=(dt-st)*_,Kt=y(ht)<.5*He&&y(St)<.5*He;if(!Kt){var Qt=He*_,Yt=ht>0^St>0?-1:1,rr=-Yt*st+(St>0?1:-1)*Qt,cr=-Yt*dt+(ht>0?1:-1)*Qt;ht=(-rr-cr)*_,St=(rr-cr)*_}var gr=Be.invert(ht,St);return Kt||(gr[0]+=ht>0?x:-x),gr}),g.geoProjection(Ke).rotate([-90,-90,45]).clipAngle(179.999)}function Wa(){return Ya(Nt).scale(111.48)}function Ki(Be){var He=h(Be);function Ke(st,dt){var ht=He?p(st*He/2)/He:st/2;if(!dt)return[2*ht,-Be];var St=2*e(ht*h(dt)),Kt=1/p(dt);return[h(St)*Kt,dt+(1-t(St))*Kt-Be]}return Ke.invert=function(st,dt){if(y(dt+=Be)<s)return[He?2*e(He*st/2)/He:st,0];var ht,St=st*st+dt*dt,Kt=0,Qt=10;do{var Yt=p(Kt),rr=1/t(Kt),cr=St-2*dt*Kt+Kt*Kt;Kt-=ht=(Yt*cr+2*(Kt-dt))/(2+cr*rr*rr+2*(Kt-dt)*Yt)}while(y(ht)>s&&--Qt>0);
vendor: 4,149 bytes, line 20
20var gr=st*(Yt=p(Kt)),yr=p(y(dt)<y(Kt+1/Yt)?.5*P(gr):.5*S(gr)+x/4)/h(Kt);return[He?2*e(He*yr)/He:2*yr,Kt]},Ke}var Ba=[[.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 fo(Be,He){var Ke,st=a(18,36*y(He)/x),dt=r(st),ht=st-dt,St=(Ke=Ba[dt])[0],Kt=Ke[1],Qt=(Ke=Ba[++dt])[0],Yt=Ke[1],rr=(Ke=Ba[a(19,++dt)])[0],cr=Ke[1];return[Be*(Qt+ht*(rr-St)/2+ht*ht*(rr-2*Qt+St)/2),(He>0?c:-c)*(Yt+ht*(cr-Kt)/2+ht*ht*(cr-2*Yt+Kt)/2)]}function go(Be,He){var Ke=function(St){function Kt(Qt,Yt){var rr=t(Yt),cr=(St-1)/(St-rr*t(Qt));return[cr*rr*h(Qt),cr*h(Yt)]}return Kt.invert=function(Qt,Yt){var rr=Qt*Qt+Yt*Yt,cr=E(rr),gr=(St-E(1-rr*(St+1)/(St-1)))/((St-1)/cr+cr/(St-1));return[n(Qt*gr,cr*E(1-gr*gr)),cr?P(Yt*gr/cr):0]},Kt}(Be);if(!He)return Ke;var st=t(He),dt=h(He);function ht(St,Kt){var Qt=Ke(St,Kt),Yt=Qt[1],rr=Yt*dt/(Be-1)+st;return[Qt[0]*st/rr,Yt/rr]}return ht.invert=function(St,Kt){var Qt=(Be-1)/(Be-1-Kt*dt);return Ke.invert(Qt*St,Qt*Kt*st)},ht}Ba.forEach(function(Be){Be[1]*=1.0144}),fo.invert=function(Be,He){var Ke=He/c,st=90*Ke,dt=a(18,y(st/5)),ht=l(0,r(dt));do{var St=Ba[ht][1],Kt=Ba[ht+1][1],Qt=Ba[a(19,ht+2)][1],Yt=Qt-St,rr=Qt-2*Kt+St,cr=2*(y(Ke)-Kt)/Yt,gr=rr/Yt,yr=cr*(1-gr*cr*(1-2*gr*cr));if(yr>=0||ht===1){st=(He>=0?5:-5)*(yr+dt);var Lr,an=50;do yr=(dt=a(18,y(st)/5))-(ht=r(dt)),St=Ba[ht][1],Kt=Ba[ht+1][1],Qt=Ba[a(19,ht+2)][1],st-=(Lr=(He>=0?c:-c)*(Kt+yr*(Qt-St)/2+yr*yr*(Qt-2*Kt+St)/2)-He)*A;while(y(Lr)>1e-12&&--an>0);break}}while(--ht>=0);var dn=Ba[ht][0],Ln=Ba[ht+1][0],On=Ba[a(19,ht+2)][0];return[Be/(Ln+yr*(On-dn)/2+yr*yr*(On-2*Ln+dn)/2),st*I]};var Ti=-179.9999,Qi=179.9999,vo=-89.9999;function Ao(Be){return Be.length>0}function Ni(Be){return Be===-90||Be===90?[0,Be]:[-180,(He=Be,Math.floor(1e4*He)/1e4)];var He}function gi(Be){var He=Be[0],Ke=Be[1],st=!1;return He<=Ti?(He=-180,st=!0):He>=Qi&&(He=180,st=!0),Ke<=vo?(Ke=-90,st=!0):Ke>=89.9999&&(Ke=90,st=!0),st?[He,Ke]:Be}function Xi(Be){return Be.map(gi)}function vs(Be,He,Ke){for(var st=0,dt=Be.length;st<dt;++st){var ht=Be[st].slice();Ke.push({index:-1,polygon:He,ring:ht});for(var St=0,Kt=ht.length;St<Kt;++St){var Qt=ht[St],Yt=Qt[0],rr=Qt[1];if(Yt<=Ti||Yt>=Qi||rr<=vo||rr>=89.9999){ht[St]=gi(Qt);for(var cr=St+1;cr<Kt;++cr){var gr=ht[cr],yr=gr[0],Lr=gr[1];if(yr>Ti&&yr<Qi&&Lr>vo&&Lr<89.9999)break}if(cr===St+1)continue;if(St){var an={index:-1,polygon:He,ring:ht.slice(0,St+1)};an.ring[an.ring.length-1]=Ni(rr),Ke[Ke.length-1]=an}else Ke.pop();if(cr>=Kt)break;Ke.push({index:-1,polygon:He,ring:ht=ht.slice(cr-1)}),ht[0]=Ni(ht[0][1]),St=-1,Kt=ht.length}}}}function ws(Be){var He,Ke,st,dt,ht,St,Kt=Be.length,Qt={},Yt={};for(He=0;He<Kt;++He)st=(Ke=Be[He]).ring[0],ht=Ke.ring[Ke.ring.length-1],st[0]!==ht[0]||st[1]!==ht[1]?(Ke.index=He,Qt[st]=Yt[ht]=Ke):(Ke.polygon.push(Ke.ring),Be[He]=null);for(He=0;He<Kt;++He)if(Ke=Be[He]){if(st=Ke.ring[0],ht=Ke.ring[Ke.ring.length-1],dt=Yt[st],St=Qt[ht],delete Qt[st],delete Yt[ht],st[0]===ht[0]&&st[1]===ht[1]){Ke.polygon.push(Ke.ring);continue}dt?(delete Yt[st],delete Qt[dt.ring[0]],dt.ring.pop(),Be[dt.index]=null,Ke={index:-1,polygon:dt.polygon,ring:dt.ring.concat(Ke.ring)},dt===St?Ke.polygon.push(Ke.ring):(Ke.index=Kt++,Be.push(Qt[Ke.ring[0]]=Yt[Ke.ring[Ke.ring.length-1]]=Ke))):St?(delete Qt[ht],delete Yt[St.ring[St.ring.length-1]],Ke.ring.pop(),Ke={index:Kt++,polygon:St.polygon,ring:Ke.ring.concat(St.ring)},Be[St.index]=null,Be.push(Qt[Ke.ring[0]]=Yt[Ke.ring[Ke.ring.length-1]]=Ke)):(Ke.ring.push(Ke.ring[0]),Ke.polygon.push(Ke.ring))}}function Za(Be){var He={type:"Feature",geometry:fs(Be.geometry)};return Be.id!=null&&(He.id=Be.id),Be.bbox!=null&&(He.bbox=Be.bbox),Be.properties!=null&&(He.properties=Be.properties),He}function fs(Be){if(Be==null)return Be;var He,Ke,st,dt;switch(Be.type){case"GeometryCollection":He={type:"GeometryCollection",geometries:Be.geometries.map(fs)};break;case"Point":He={type:"Point",coordinates:gi(Be.coordinates)};break;case"MultiPoint":case"LineString":He={type:Be.type,coordinates:Xi(Be.co
vendor: 4,831 bytes, line 20
20ordinates)};break;case"MultiLineString":He={type:"MultiLineString",coordinates:Be.coordinates.map(Xi)};break;case"Polygon":var ht=[];vs(Be.coordinates,ht,Ke=[]),ws(Ke),He={type:"Polygon",coordinates:ht};break;case"MultiPolygon":Ke=[],st=-1,dt=Be.coordinates.length;for(var St=new Array(dt);++st<dt;)vs(Be.coordinates[st],St[st]=[],Ke);ws(Ke),He={type:"MultiPolygon",coordinates:St.filter(Ao)};break;default:return Be}return Be.bbox!=null&&(He.bbox=Be.bbox),He}function Qo(Be,He){var Ke=p(He/2),st=h(T*Ke);return[Be*(.74482-.34588*st*st),1.70711*Ke]}function Ts(Be,He,Ke){var st=g.geoInterpolate(He,Ke),dt=st(.5),ht=g.geoRotation([-dt[0],-dt[1]])(He),St=st.distance/2,Kt=-P(h(ht[1]*I)/h(St)),Qt=[-dt[0],-dt[1],-(ht[0]>0?x-Kt:Kt)*A],Yt=g.geoProjection(Be(St)).rotate(Qt),rr=g.geoRotation(Qt),cr=Yt.center;return delete Yt.rotate,Yt.center=function(gr){return arguments.length?cr(rr(gr)):rr.invert(cr())},Yt.clipAngle(90)}function ks(Be){var He=t(Be);function Ke(st,dt){var ht=g.geoGnomonicRaw(st,dt);return ht[0]*=He,ht}return Ke.invert=function(st,dt){return g.geoGnomonicRaw.invert(st/He,dt)},Ke}function ys(Be,He){return Ts(ks,Be,He)}function Ms(Be){if(!(Be*=2))return g.geoAzimuthalEquidistantRaw;var He=-Be/2,Ke=-He,st=Be*Be,dt=p(Ke),ht=.5/h(Ke);function St(Kt,Qt){var Yt=S(t(Qt)*t(Kt-He)),rr=S(t(Qt)*t(Kt-Ke));return[((Yt*=Yt)-(rr*=rr))/(2*Be),(Qt<0?-1:1)*E(4*st*rr-(st-Yt+rr)*(st-Yt+rr))/(2*Be)]}return St.invert=function(Kt,Qt){var Yt,rr,cr=Qt*Qt,gr=t(E(cr+(Yt=Kt+He)*Yt)),yr=t(E(cr+(Yt=Kt+Ke)*Yt));return[n(rr=gr-yr,Yt=(gr+yr)*dt),(Qt<0?-1:1)*S(E(Yt*Yt+rr*rr)*ht)]},St}function Lo(Be,He){return Ts(Ms,Be,He)}function Co(Be,He){if(y(He)<s)return[Be,0];var Ke=y(He/c),st=P(Ke);if(y(Be)<s||y(y(He)-c)<s)return[0,o(He)*x*p(st/2)];var dt=t(st),ht=y(x/Be-Be/x)/2,St=ht*ht,Kt=dt/(Ke+dt-1),Qt=Kt*(2/Ke-1),Yt=Qt*Qt,rr=Yt+St,cr=Kt-Yt,gr=St+Kt;return[o(Be)*x*(ht*cr+E(St*cr*cr-rr*(Kt*Kt-Yt)))/rr,o(He)*x*(Qt*gr-ht*E((St+1)*rr-gr*gr))/rr]}function Uo(Be,He){if(y(He)<s)return[Be,0];var Ke=y(He/c),st=P(Ke);if(y(Be)<s||y(y(He)-c)<s)return[0,o(He)*x*p(st/2)];var dt=t(st),ht=y(x/Be-Be/x)/2,St=ht*ht,Kt=dt*(E(1+St)-ht*dt)/(1+St*Ke*Ke);return[o(Be)*x*Kt,o(He)*x*E(1-Kt*(2*ht+Kt))]}function Vo(Be,He){if(y(He)<s)return[Be,0];var Ke=He/c,st=P(Ke);if(y(Be)<s||y(y(He)-c)<s)return[0,x*p(st/2)];var dt=(x/Be-Be/x)/2,ht=Ke/(1+t(st));return[x*(o(Be)*E(dt*dt+1-ht*ht)-dt),x*ht]}function Ho(Be,He){if(!He)return[Be,0];var Ke=y(He);if(!Be||Ke===c)return[0,He];var st=Ke/c,dt=st*st,ht=(8*st-dt*(dt+2)-5)/(2*dt*(st-1)),St=ht*ht,Kt=st*ht,Qt=dt+St+2*Kt,Yt=st+3*ht,rr=Be/c,cr=rr+1/rr,gr=o(y(Be)-c)*E(cr*cr-4),yr=gr*gr,Lr=(gr*(Qt+St-1)+2*E(Qt*(dt+St*yr-1)+(1-dt)*(dt*(Yt*Yt+4*St)+12*Kt*St+4*St*St)))/(4*Qt+yr);return[o(Be)*c*Lr,o(He)*c*E(1+gr*y(Lr)-Lr*Lr)]}function $o(Be,He,Ke,st){var dt=x/3;Be=l(Be,s),He=l(He,s),Be=a(Be,c),He=a(He,x-s),Ke=l(Ke,0),Ke=a(Ke,100-s);var ht=(st=l(st,s))/100,St=S((Ke/100+1)*t(dt))/dt,Kt=h(Be)/h(St*c),Qt=He/x,Yt=E(ht*h(Be/2)/h(He/2));return function(rr,cr,gr,yr,Lr){function an(dn,Ln){var On=gr*h(yr*Ln),qn=E(1-On*On),zn=E(2/(1+qn*t(dn*=Lr)));return[rr*qn*zn*h(dn),cr*On*zn]}return an.invert=function(dn,Ln){var On=dn/rr,qn=Ln/cr,zn=E(On*On+qn*qn),ga=2*P(zn/2);return[n(dn*p(ga),rr*zn)/Lr,zn&&P(Ln*h(ga)/(cr*gr*zn))/yr]},an}(Yt/E(Qt*Kt*St),1/(Yt*E(Qt*Kt*St)),Kt,St,Qt)}function yo(){var Be=65*I,He=60*I,Ke=20,st=200,dt=g.geoProjectionMutator($o),ht=dt(Be,He,Ke,st);return ht.poleline=function(St){return arguments.length?dt(Be=+St*I,He,Ke,st):Be*A},ht.parallels=function(St){return arguments.length?dt(Be,He=+St*I,Ke,st):He*A},ht.inflation=function(St){return arguments.length?dt(Be,He,Ke=+St,st):Ke},ht.ratio=function(St){return arguments.length?dt(Be,He,Ke,st=+St):st},ht.scale(163.775)}Qo.invert=function(Be,He){var Ke=He/1.70711,st=h(T*Ke);return[Be/(.74482-.34588*st*st),2*e(Ke)]},Co.invert=function(Be,He){if(y(He)<s)return[Be,0];if(y(Be)<s)return[0,c*h(2*e(He/x))];var Ke=(Be/=x)*Be,st=(He/=x)*He,dt=Ke+st,ht=dt*dt,St=-y(He)*(1+dt),Kt=St-2*st+Ke,Qt=-2*St+1+2*st+ht,Yt=st/Qt+(2*Kt*Kt*Kt/(Qt*Qt*Qt)-9*St*Kt/(Qt*Qt))/27,rr=(St-Kt*Kt/(3*Qt))/Qt,cr=2*E(-rr/3),gr=S(3*Yt/(rr*cr))/3;return[x*(dt-1+E(1+2*(Ke-st)+ht))/(2*Be),o(He)*x*(-cr*t(gr+x/3)-Kt/(3*Qt))]},Uo.invert=function(Be,He){if(!Be)return[0,c*h(2*e(He/x))];var Ke=y(Be/x),st=(1-Ke*Ke-(He/=x)*He)/(2*Ke),dt=E(st*st+1);return[o(Be)*x*(dt-st),o(He)*c*h(2*n(E((1-2*st*Ke)*(st+dt)-Ke),E(dt+st+Ke)))]},Vo.invert=function(Be,He){if(!He)return[Be,0];var Ke=He/x,st=(x*x*(1-Ke*Ke)-Be*Be)/(2*x*Be);return[Be?x*(o(Be)*E(st*st+1)-st):0,c*h(2*e(Ke))]},Ho.invert=function(Be,He){var Ke;if(!Be||!He)return[Be,He];He/=x;var st=o(Be)*Be/c,dt=(st*st-1+4*He*He)/y(st),ht=dt*dt,St=2*He,Kt=50;do{var Qt=St*St,Yt=(8*St-Qt*(Qt+2)-5)/(2*Qt*(St-1)),rr=(3*St-Qt*St-10)/(2*Qt*St),cr=Yt*Yt,gr=St*Yt,yr=St+Yt,Lr=yr*yr,an=St+3*Yt,dn=-2*yr*(4*gr*cr+(1-4*Qt+3*Qt*Qt)*(1+rr)+cr*(14*Qt-6-ht+(8*Qt-8
vendor: 1,866 bytes, line 20
20-2*ht)*rr)+gr*(12*Qt-8+(10*Qt-10-ht)*rr)),Ln=E(Lr*(Qt+cr*ht-1)+(1-Qt)*(Qt*(an*an+4*cr)+cr*(12*gr+4*cr)));St-=Ke=(dt*(Lr+cr-1)+2*Ln-st*(4*Lr+ht))/(dt*(2*Yt*rr+2*yr*(1+rr))+dn/Ln-8*yr*(dt*(-1+cr+Lr)+2*Ln)*(1+rr)/(ht+4*Lr))}while(Ke>s&&--Kt>0);return[o(Be)*(E(dt*dt+4)+dt)*x/4,c*St]};var hs=4*x+3*E(3),ho=2*E(2*x*E(3)/hs),qo=re(ho*E(3)/x,ho,hs/6);function ps(Be,He){return[Be*E(1-3*He*He/(x*x)),He]}function Po(Be,He){var Ke=t(He),st=t(Be)*Ke,dt=1-st,ht=t(Be=n(h(Be)*Ke,-h(He))),St=h(Be);return[St*(Ke=E(1-st*st))-ht*dt,-ht*Ke-St*dt]}function qa(Be,He){var Ke=V(Be,He);return[(Ke[0]+Be/c)/2,(Ke[1]+He)/2]}ps.invert=function(Be,He){return[Be/E(1-3*He*He/(x*x)),He]},Po.invert=function(Be,He){var Ke=(Be*Be+He*He)/-2,st=E(-Ke*(2+Ke)),dt=He*Ke+Be*st,ht=Be*Ke-He*st,St=E(ht*ht+dt*dt);return[n(st*dt,St*(1+Ke)),St?-P(st*ht/St):0]},qa.invert=function(Be,He){var Ke=Be,st=He,dt=25;do{var ht,St=t(st),Kt=h(st),Qt=h(2*st),Yt=Kt*Kt,rr=St*St,cr=h(Ke),gr=t(Ke/2),yr=h(Ke/2),Lr=yr*yr,an=1-rr*gr*gr,dn=an?S(St*gr)*E(ht=1/an):ht=0,Ln=.5*(2*dn*St*yr+Ke/c)-Be,On=.5*(dn*Kt+st)-He,qn=.5*ht*(rr*Lr+dn*St*gr*Yt)+.5/c,zn=ht*(cr*Qt/4-dn*Kt*yr),ga=.125*ht*(Qt*yr-dn*Kt*rr*cr),Aa=.5*ht*(Yt*gr+dn*Lr*St)+.5,ja=zn*ga-Aa*qn,Na=(On*zn-Ln*Aa)/ja,Ua=(Ln*ga-On*qn)/ja;Ke-=Na,st-=Ua}while((y(Na)>s||y(Ua)>s)&&--dt>0);return[Ke,st]},m.geoNaturalEarth=g.geoNaturalEarth1,m.geoNaturalEarthRaw=g.geoNaturalEarth1Raw,m.geoAiry=function(){var Be=c,He=g.geoProjectionMutator(H),Ke=He(Be);return Ke.radius=function(st){return arguments.length?He(Be=st*I):Be*A},Ke.scale(179.976).clipAngle(147)},m.geoAiryRaw=H,m.geoAitoff=function(){return g.geoProjection(V).scale(152.63)},m.geoAitoffRaw=V,m.geoArmadillo=function(){var Be=20*I,He=Be>=0?1:-1,Ke=p(He*Be),st=g.geoProjectionMutator(Z),dt=st(Be),ht=dt.stream;return dt.parallel=function(St){return arguments.length?(Ke=p((He=(Be=St*I)>=0?1:-1)*Be),st(Be)):Be*A}
vendor: 16,285 bytes, line 20
20,dt.stream=function(St){var Kt=dt.rotate(),Qt=ht(St),Yt=(dt.rotate([0,0]),ht(St)),rr=dt.precision();return dt.rotate(Kt),Qt.sphere=function(){Yt.polygonStart(),Yt.lineStart();for(var cr=-180*He;He*cr<180;cr+=90*He)Yt.point(cr,90*He);if(Be)for(;He*(cr-=3*He*rr)>=-180;)Yt.point(cr,He*-n(t(cr*I/2),Ke)*A);Yt.lineEnd(),Yt.polygonEnd()},Qt},dt.scale(218.695).center([0,28.0974])},m.geoArmadilloRaw=Z,m.geoAugust=function(){return g.geoProjection(K).scale(66.1603)},m.geoAugustRaw=K,m.geoBaker=function(){return g.geoProjection(Q).scale(112.314)},m.geoBakerRaw=Q,m.geoBerghaus=function(){var Be=5,He=g.geoProjectionMutator(R),Ke=He(Be),st=Ke.stream,dt=-t(.01*I),ht=h(.01*I);return Ke.lobes=function(St){return arguments.length?He(Be=+St):Be},Ke.stream=function(St){var Kt=Ke.rotate(),Qt=st(St),Yt=(Ke.rotate([0,0]),st(St));return Ke.rotate(Kt),Qt.sphere=function(){Yt.polygonStart(),Yt.lineStart();for(var rr=0,cr=360/Be,gr=2*x/Be,yr=90-180/Be,Lr=c;rr<Be;++rr,yr-=cr,Lr-=gr)Yt.point(n(ht*t(Lr),dt)*A,P(ht*h(Lr))*A),yr<-90?(Yt.point(-90,-180-yr-.01),Yt.point(-90,-180-yr+.01)):(Yt.point(90,yr+.01),Yt.point(90,yr-.01));Yt.lineEnd(),Yt.polygonEnd()},Qt},Ke.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},m.geoBerghausRaw=R,m.geoBertin1953=function(){return g.geoProjection(X()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])},m.geoBertin1953Raw=X,m.geoBoggs=function(){return g.geoProjection(pe).scale(160.857)},m.geoBoggsRaw=pe,m.geoBonne=function(){return ce(xe).scale(123.082).center([0,26.1441]).parallel(45)},m.geoBonneRaw=xe,m.geoBottomley=function(){var Be=.5,He=g.geoProjectionMutator(_e),Ke=He(Be);return Ke.fraction=function(st){return arguments.length?He(Be=+st):Be},Ke.scale(158.837)},m.geoBottomleyRaw=_e,m.geoBromley=function(){return g.geoProjection(we).scale(152.63)},m.geoBromleyRaw=we,m.geoChamberlin=Se,m.geoChamberlinRaw=ke,m.geoChamberlinAfrica=function(){return Se([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},m.geoCollignon=function(){return g.geoProjection(Oe).scale(95.6464).center([0,30])},m.geoCollignonRaw=Oe,m.geoCraig=function(){return ce(De).scale(249.828).clipAngle(90)},m.geoCraigRaw=De,m.geoCraster=function(){return g.geoProjection(Je).scale(156.19)},m.geoCrasterRaw=Je,m.geoCylindricalEqualArea=function(){return ce(ze).parallel(38.58).scale(195.044)},m.geoCylindricalEqualAreaRaw=ze,m.geoCylindricalStereographic=function(){return ce(Ue).scale(124.75)},m.geoCylindricalStereographicRaw=Ue,m.geoEckert1=function(){return g.geoProjection(Ge).scale(165.664)},m.geoEckert1Raw=Ge,m.geoEckert2=function(){return g.geoProjection(Ye).scale(165.664)},m.geoEckert2Raw=Ye,m.geoEckert3=function(){return g.geoProjection(et).scale(180.739)},m.geoEckert3Raw=et,m.geoEckert4=function(){return g.geoProjection(ct).scale(180.739)},m.geoEckert4Raw=ct,m.geoEckert5=function(){return g.geoProjection(mt).scale(173.044)},m.geoEckert5Raw=mt,m.geoEckert6=function(){return g.geoProjection(Ct).scale(173.044)},m.geoEckert6Raw=Ct,m.geoEisenlohr=function(){return g.geoProjection(nt).scale(62.5271)},m.geoEisenlohrRaw=nt,m.geoFahey=function(){return g.geoProjection(Et).scale(137.152)},m.geoFaheyRaw=Et,m.geoFoucaut=function(){return g.geoProjection(Gt).scale(135.264)},m.geoFoucautRaw=Gt,m.geoFoucautSinusoidal=function(){var Be=.5,He=g.geoProjectionMutator(Xt),Ke=He(Be);return Ke.alpha=function(st){return arguments.length?He(Be=+st):Be},Ke.scale(168.725)},m.geoFoucautSinusoidalRaw=Xt,m.geoGilbert=function(Be){Be==null&&(Be=g.geoOrthographic);var He=Be(),Ke=g.geoEquirectangular().scale(A).precision(0).clipAngle(null).translate([0,0]);function st(ht){return He(Fe(ht))}function dt(ht){st[ht]=function(){return arguments.length?(He[ht].apply(He,arguments),st):He[ht]()}}return He.invert&&(st.invert=function(ht){return qe(He.invert(ht))}),st.stream=function(ht){var St=He.stream(ht),Kt=Ke.stream({point:function(Qt,Yt){St.point(Qt/2,P(p(-Yt/2*I))*A)},lineStart:function(){St.lineStart()},lineEnd:function(){St.lineEnd()},polygonStart:function(){St.polygonStart()},polygonEnd:function(){St.polygonEnd()}});return Kt.sphere=St.sphere,Kt},st.rotate=function(ht){return arguments.length?(Ke.rotate(ht),st):Ke.rotate()},st.center=function(ht){return arguments.length?(He.center(Fe(ht)),st):qe(He.center())},dt("angle"),dt("clipAngle"),dt("clipExtent"),dt("fitExtent"),dt("fitHeight"),dt("fitSize"),dt("fitWidth"),dt("scale"),dt("translate"),dt("precision"),st.scale(249.5)},m.geoGingery=function(){var Be=6,He=30*I,Ke=t(He),st=h(He),dt=g.geoProjectionMutator(wt),ht=dt(He,Be),St=ht.stream,Kt=-t(.01*I),Qt=h(.01*I);return ht.radius=function(Yt){return arguments.length?(Ke=t(He=Yt*I),st=h(He),dt(He,Be)):He*A},ht.lobes=function(Yt){return arguments.length?dt(He,Be=+Yt):Be},ht.stream=function(Yt){var rr=ht.rotate(),cr=St(Yt),gr=(ht.rotate([0,0]),St(Yt));return ht.rotate(rr),cr.sphere=function(){gr.polygonStart(),gr.lineStart();for(var yr=0,Lr=2*x/Be,an=0;yr<Be;++yr,an-=Lr)gr.point(n(Qt*t(an),Kt)*A,P(Qt*h(an))*A),gr.point(n(st*t(an-Lr/2),Ke)*A,P(st*h(an-Lr/2))*A);gr.lineEnd(),gr.polygonEnd()},cr},ht.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},m.geoGingeryRaw=wt,m.geoGinzburg4=function(){return g.geoProjection(Te).scale(149.995)},m.geoGinzburg4Raw=Te,m.geoGinzburg5=function(){return g.geoProjection(Pe).scale(153.93)},m.geoGinzburg5Raw=Pe,m.geoGinzburg6=function(){return g.geoProjection(Ve).scale(130.945)},m.geoGinzburg6Raw=Ve,m.geoGinzburg8=function(){return g.geoProjection(tt).scale(131.747)},m.geoGinzburg8Raw=tt,m.geoGinzburg9=function(){return g.geoProjection(ot).scale(131.087)},m.geoGinzburg9Raw=ot,m.geoGringorten=function(){return g.geoProjection(at(_t)).scale(239.75)},m.geoGringortenRaw=_t,m.geoGuyou=function(){return g.geoProjection(at(Nt)).scale(151.496)},m.geoGuyouRaw=Nt,m.geoHammer=function(){var Be=2,He=g.geoProjectionMutator(N),Ke=He(Be);return Ke.coefficient=function(st){return arguments.length?He(Be=+st):Be},Ke.scale(169.529)},m.geoHammerRaw=N,m.geoHammerRetroazimuthal=function(){var Be=0,He=g.geoProjectionMutator($e),Ke=He(Be),st=Ke.rotate,dt=Ke.stream,ht=g.geoCircle();return Ke.parallel=function(St){if(!arguments.length)return Be*A;var Kt=Ke.rotate();return He(Be=St*I).rotate(Kt)},Ke.rotate=function(St){return arguments.length?(st.call(Ke,[St[0],St[1]-Be*A]),ht.center([-St[0],-St[1]]),Ke):((St=st.call(Ke))[1]+=Be*A,St)},Ke.stream=function(St){return(St=dt(St)).sphere=function(){St.polygonStart();var Kt,Qt=ht.radius(89.99)().coordinates[0],Yt=Qt.length-1,rr=-1;for(St.lineStart();++rr<Yt;)St.point((Kt=Qt[rr])[0],Kt[1]);for(St.lineEnd(),Yt=(Qt=ht.radius(90.01)().coordinates[0]).length-1,St.lineStart();--rr>=0;)St.point((Kt=Qt[rr])[0],Kt[1]);St.lineEnd(),St.polygonEnd()},St},Ke.scale(79.4187).parallel(45).clipAngle(179.999)},m.geoHammerRetroazimuthalRaw=$e,m.geoHealpix=function(){var Be=4,He=g.geoProjectionMutator(Pt),Ke=He(Be),st=Ke.stream;return Ke.lobes=function(dt){return arguments.length?He(Be=+dt):Be},Ke.stream=function(dt){var ht=Ke.rotate(),St=st(dt),Kt=(Ke.rotate([0,0]),st(dt));return Ke.rotate(ht),St.sphere=function(){var Qt,Yt;g.geoStream((Qt=180/Be,Yt=[].concat(b.range(-180,180+Qt/2,Qt).map(Le),b.range(180,-180-Qt/2,-Qt).map(Xe)),{type:"Polygon",coordinates:[Qt===180?Yt.map(it):Yt]}),Kt)},St},Ke.scale(239.75)},m.geoHealpixRaw=Pt,m.geoHill=function(){var Be=1,He=g.geoProjectionMutator(At),Ke=He(Be);return Ke.ratio=function(st){return arguments.length?He(Be=+st):Be},Ke.scale(167.774).center([0,18.67])},m.geoHillRaw=At,m.geoHomolosine=function(){return g.geoProjection(Zt).scale(152.63)},m.geoHomolosineRaw=Zt,m.geoHufnagel=function(){var Be=1,He=0,Ke=45*I,st=2,dt=g.geoProjectionMutator(Jt),ht=dt(Be,He,Ke,st);return ht.a=function(St){return arguments.length?dt(Be=+St,He,Ke,st):Be},ht.b=function(St){return arguments.length?dt(Be,He=+St,Ke,st):He},ht.psiMax=function(St){return arguments.length?dt(Be,He,Ke=+St*I,st):Ke*A},ht.ratio=function(St){return arguments.length?dt(Be,He,Ke,st=+St):st},ht.scale(180.739)},m.geoHufnagelRaw=Jt,m.geoHyperelliptical=function(){var Be=0,He=2.5,Ke=1.183136,st=g.geoProjectionMutator(pr),dt=st(Be,He,Ke);return dt.alpha=function(ht){return arguments.length?st(Be=+ht,He,Ke):Be},dt.k=function(ht){return arguments.length?st(Be,He=+ht,Ke):He},dt.gamma=function(ht){return arguments.length?st(Be,He,Ke=+ht):Ke},dt.scale(152.63)},m.geoHyperellipticalRaw=pr,m.geoInterrupt=er,m.geoInterruptedBoggs=function(){return er(pe,ar).scale(160.857)},m.geoInterruptedHomolosine=function(){return er(Zt,hr).scale(152.63)},m.geoInterruptedMollweide=function(){return er(ne,vr).scale(169.529)},m.geoInterruptedMollweideHemispheres=function(){return er(ne,Pr).scale(169.529).rotate([20,0])},m.geoInterruptedSinuMollweide=function(){return er(It,Ur,j).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},m.geoInterruptedSinusoidal=function(){return er(de,qr).scale(152.63).rotate([-20,0])},m.geoKavrayskiy7=function(){return g.geoProjection(rn).scale(158.837)},m.geoKavrayskiy7Raw=rn,m.geoLagrange=function(){var Be=.5,He=g.geoProjectionMutator(An),Ke=He(Be);return Ke.spacing=function(st){return arguments.length?He(Be=+st):Be},Ke.scale(124.75)},m.geoLagrangeRaw=An,m.geoLarrivee=function(){return g.geoProjection(Mn).scale(97.2672)},m.geoLarriveeRaw=Mn,m.geoLaskowski=function(){return g.geoProjection(Xr).scale(139.98)},m.geoLaskowskiRaw=Xr,m.geoLittrow=function(){return g.geoProjection(Er).scale(144.049).clipAngle(89.999)},m.geoLittrowRaw=Er,m.geoLoximuthal=function(){return ce(on).parallel(40).scale(158.837)},m.geoLoximuthalRaw=on,m.geoMiller=function(){return g.geoProjection(Un).scale(108.318)},m.geoMillerRaw=Un,m.geoModifiedStereographic=hn,m.geoModifiedStereographicRaw=Tr,m.geoModifiedStereographicAlaska=function(){return hn(en,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},m.geoModifiedStereographicGs48=function(){return hn($r,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},m.geoModifiedStereographicGs50=function(){return hn(Rr,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},m.geoModifiedStereographicMiller=function(){return hn(Pn,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},m.geoModifiedStereographicLee=function(){return hn(Nn,[165,10]).scale(250).clipAngle(130).center([-165,-10])},m.geoMollweide=function(){return g.geoProjection(ne).scale(169.529)},m.geoMollweideRaw=ne,m.geoMtFlatPolarParabolic=function(){return g.geoProjection(sr).scale(164.859)},m.geoMtFlatPolarParabolicRaw=sr,m.geoMtFlatPolarQuartic=function(){return g.geoProjection(Fr).scale(188.209)},m.geoMtFlatPolarQuarticRaw=Fr,m.geoMtFlatPolarSinusoidal=function(){return g.geoProjection(Bt).scale(166.518)},m.geoMtFlatPolarSinusoidalRaw=Bt,m.geoNaturalEarth2=function(){return g.geoProjection(lr).scale(175.295)},m.geoNaturalEarth2Raw=lr,m.geoNellHammer=function(){return g.geoProjection(mr).scale(152.63)},m.geoNellHammerRaw=mr,m.geoInterruptedQuarticAuthalic=function(){return er(N(1/0),Vr).rotate([20,0]).scale(152.63)},m.geoNicolosi=function(){return g.geoProjection(Br).scale(127.267)},m.geoNicolosiRaw=Br,m.geoPatterson=function(){return g.geoProjection(Dr).scale(139.319)},m.geoPattersonRaw=Dr,m.geoPolyconic=function(){return g.geoProjection(Or).scale(103.74)},m.geoPolyconicRaw=Or,m.geoPolyhedral=Wr,m.geoPolyhedralButterfly=function(Be){Be=Be||function(Ke){var st=g.geoCentroid({type:"MultiPoint",coordinates:Ke});return g.geoGnomonic().scale(1).translate([0,0]).rotate([-st[0],-st[1]])};var He=vn.map(function(Ke){return{face:Ke,project:Be(Ke)}});return[-1,0,0,1,0,1,4,5].forEach(function(Ke,st){var dt=He[Ke];dt&&(dt.children||(dt.children=[])).push(He[st])}),Wr(He[0],function(Ke,st){return He[Ke<-x/2?st<0?6:4:Ke<0?st<0?2:0:Ke<x/2?st<0?3:1:st<0?7:5]}).angle(-30).scale(101.858).center([0,45])},m.geoPolyhedralCollignon=function(Be){Be=Be||function(Ke){var st=g.geoCentroid({type:"MultiPoint",coordinates:Ke});return g.geoProjection(bn).translate([0,0]).scale(1).rotate(st[1]>0?[-st[0],0]:[180-st[0],180])};var He=vn.map(function(Ke){return{face:Ke,project:Be(Ke)}});return[-1,0,0,1,0,1,4,5].forEach(function(Ke,st){var dt=He[Ke];dt&&(dt.children||(dt.children=[])).push(He[st])}),Wr(He[0],function(Ke,st){return He[Ke<-x/2?st<0?6:4:Ke<0?st<0?2:0:Ke<x/2?st<0?3:1:st<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])},m.geoPolyhedralWaterman=function(Be){Be=Be||function(ht){var St=ht.length===6?g.geoCentroid({type:"MultiPoint",coordinates:ht}):ht[0];return g.geoGnomonic().scale(1).translate([0,0]).rotate([-St[0],-St[1]])};var He=vn.map(function(ht){for(var St,Kt=ht.map(Wn),Qt=Kt.length,Yt=Kt[Qt-1],rr=[],cr=0;cr<Qt;++cr)St=Kt[cr],rr.push(In([.9486832980505138*Yt[0]+.31622776601683794*St[0],.9486832980505138*Yt[1]+.31622776601683794*St[1],.9486832980505138*Yt[2]+.31622776601683794*St[2]]),In([.9486832980505138*St[0]+.31622776601683794*Yt[0],.9486832980505138*St[1]+.31622776601683794*Yt[1],.9486832980505138*St[2]+.31622776601683794*Yt[2]])),Yt=St;return rr}),Ke=[],st=[-1,0,0,1,0,1,4,5];He.forEach(function(ht,St){for(var Kt,Qt,Yt=vn[St],rr=Yt.length,cr=Ke[St]=[],gr=0;gr<rr;++gr)He.push([Yt[gr],ht[(2*gr+2)%(2*rr)],ht[(2*gr+1)%(2*rr)]]),st.push(St),cr.push((Kt=Wn(ht[(2*gr+2)%(2*rr)]),Qt=Wn(ht[(2*gr+1)%(2*rr)]),[Kt[1]*Qt[2]-Kt[2]*Qt[1],Kt[2]*Qt[0]-Kt[0]*Qt[2],Kt[0]*Qt[1]-Kt[1]*Qt[0]]))});var dt=He.map(function(ht){return{project:Be(ht),face:ht}});return st.forEach(function(ht,St){var Kt=dt[ht];Kt&&(Kt.children||(Kt.children=[])).push(dt[St])}),Wr(dt[0],function(ht,St){var Kt=t(St),Qt=[Kt*t(ht),Kt*h(ht),h(St)],Yt=ht<-x/2?St<0?6:4:ht<0?St<0?2:0:ht<x/2?St<0?3:1:St<0?7:5,rr=Ke[Yt];return dt[En(rr[0],Qt)<0?8+3*Yt:En(rr[1],Qt)<0?8+3*Yt+1:En(rr[2],Qt)<0?8+3*Yt+2:Yt]}).angle(-30).scale(110.625).center([0,45])},m.geoProject=function(Be,He){var Ke,st=He.stream;if(!st)throw new Error("invalid projection");switch(Be&&Be.type){case"Feature":Ke=kn;break;case"FeatureCollection":Ke=ka;break;default:Ke=$n}return Ke(Be,st)},m.geoGringortenQuincuncial=function(){return Ya(_t).scale(176.423)},m.geoPeirceQuincuncial=Wa,m.geoPierceQuincuncial=Wa,m.geoQuantize=function(Be,He){if(!(0<=(He=+He)&&He<=20))throw new Error("invalid digits");function Ke(Yt){var rr=Yt.length,cr=2,gr=new Array(rr);for(gr[0]=+Yt[0].toFixed(He),gr[1]=+Yt[1].toFixed(He);cr<rr;)gr[cr]=Yt[cr],++cr;return gr}function st(Yt){return Yt.map(Ke)}function dt(Yt){for(var rr=Ke(Yt[0]),cr=[rr],gr=1;gr<Yt.length;gr++){var yr=Ke(Yt[gr]);(yr.length>2||yr[0]!=rr[0]||yr[1]!=rr[1])&&(cr.push(yr),rr=yr)}return cr.length===1&&Yt.length>1&&cr.push(Ke(Yt[Yt.length-1])),cr}function ht(Yt){return Yt.map(dt)}function St(Yt){if(Yt==null)return Yt;var rr;switch(Yt.type){case"GeometryCollection":rr={type:"GeometryCollection",geometries:Yt.geometries.map(St)};break;case"Point":rr={type:"Point",coordinates:Ke(Yt.coordinates)};break;case"MultiPoint":rr={type:Yt.type,coordinates:st(Yt.coordinates)};break;case"LineString":rr={type:Yt.type,coordinates:dt(Yt.coordinates)};break;case"MultiLineString":case"Polygon":rr={type:Yt.type,coordinates:ht(Yt.coordinates)};break;case"MultiPolygon":rr={type:"MultiPolygon",coordinates:Yt.coordinates.map(ht)};break;default:return Yt}return Yt.bbox!=null&&(rr.bbox=Yt.bbox),rr}function Kt(Yt){var rr={type:"Feature",properties:Yt.properties,geometry:St(Yt.geometry)};return Yt.id!=null&&(rr.id=Yt.id),Yt.bbox!=null&&(rr.bbox=Yt.bbox),rr}if(Be!=null)switch(Be.type){case"Feature":return Kt(Be);case"FeatureCollection":var Qt={type:"FeatureCollection",features:Be.features.map(Kt)};return Be.bbox!=null&&(Qt.bbox=Be.bbox),Qt;default:return St(Be)}return Be},m.geoQuincuncial=Ya,m.geoRectangularPolyconic=function(){return ce(Ki).scale(131.215)},m.geoRectangularPolyconicRaw=Ki,m.geoRobinson=function(){return g.geoProjection(fo).scale(152.63)},m.geoRobinsonRaw=fo,m.geoSatellite=function(){var Be=2,He=0,Ke=g.geoProjectionMutator(go),st=Ke(Be,He);return st.distance=function(dt){return arguments.length?Ke(Be=+dt,He):Be},st.tilt=function(dt){return arguments.length?Ke(Be,He=dt*I):He*A},st.scale(432.147).clipAngle(S(1/Be)*A-1e-6)},m.geoSatelliteRaw=go,m.geoSinuMollweide=function(){return g.geoProjection(It).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},m.geoSinuMollweideRaw=It,m.geoSinusoidal=function(){return g.geoProjection(de).scale(152.63)},m.geoSinusoidalRaw=de,m.geoStitch=function(Be){if(Be==null)return Be;switch(Be.type){case"Feature":return Za(Be);
vendor: 11,981 bytes, line 20
20case"FeatureCollection":var He={type:"FeatureCollection",features:Be.features.map(Za)};return Be.bbox!=null&&(He.bbox=Be.bbox),He;default:return fs(Be)}},m.geoTimes=function(){return g.geoProjection(Qo).scale(146.153)},m.geoTimesRaw=Qo,m.geoTwoPointAzimuthal=ys,m.geoTwoPointAzimuthalRaw=ks,m.geoTwoPointAzimuthalUsa=function(){return ys([-158,21.5],[-77,39]).clipAngle(60).scale(400)},m.geoTwoPointEquidistant=Lo,m.geoTwoPointEquidistantRaw=Ms,m.geoTwoPointEquidistantUsa=function(){return Lo([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},m.geoVanDerGrinten=function(){return g.geoProjection(Co).scale(79.4183)},m.geoVanDerGrintenRaw=Co,m.geoVanDerGrinten2=function(){return g.geoProjection(Uo).scale(79.4183)},m.geoVanDerGrinten2Raw=Uo,m.geoVanDerGrinten3=function(){return g.geoProjection(Vo).scale(79.4183)},m.geoVanDerGrinten3Raw=Vo,m.geoVanDerGrinten4=function(){return g.geoProjection(Ho).scale(127.16)},m.geoVanDerGrinten4Raw=Ho,m.geoWagner=yo,m.geoWagner7=function(){return yo().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},m.geoWagnerRaw=$o,m.geoWagner4=function(){return g.geoProjection(qo).scale(176.84)},m.geoWagner4Raw=qo,m.geoWagner6=function(){return g.geoProjection(ps).scale(152.63)},m.geoWagner6Raw=ps,m.geoWiechel=function(){return g.geoProjection(Po).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},m.geoWiechelRaw=Po,m.geoWinkel3=function(){return g.geoProjection(qa).scale(158.837)},m.geoWinkel3Raw=qa,Object.defineProperty(m,"__esModule",{value:!0})})},{"d3-array":107,"d3-geo":114}],114:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?g(te,v("d3-array")):g((m=m||self).d3=m.d3||{},m.d3)})(this,function(m,g){function b(){return new y}function y(){this.reset()}y.prototype={constructor:y,reset:function(){this.s=this.t=0},add:function(ut){n(e,ut,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 y;function n(ut,Dt,ir){var Ht=ut.s=Dt+ir,or=Ht-Dt,Sr=Ht-or;ut.t=Dt-Sr+(ir-or)}var t=1e-6,i=Math.PI,r=i/2,d=i/4,l=2*i,a=180/i,u=i/180,f=Math.abs,o=Math.atan,h=Math.atan2,p=Math.cos,s=Math.ceil,x=Math.exp,c=Math.log,T=Math.pow,_=Math.sin,w=Math.sign||function(ut){return ut>0?1:ut<0?-1:0},k=Math.sqrt,L=Math.tan;function A(ut){return ut>1?0:ut<-1?i:Math.acos(ut)}function I(ut){return ut>1?r:ut<-1?-r:Math.asin(ut)}function P(ut){return(ut=_(ut/2))*ut}function S(){}function E(ut,Dt){ut&&F.hasOwnProperty(ut.type)&&F[ut.type](ut,Dt)}var D={Feature:function(ut,Dt){E(ut.geometry,Dt)},FeatureCollection:function(ut,Dt){for(var ir=ut.features,Ht=-1,or=ir.length;++Ht<or;)E(ir[Ht].geometry,Dt)}},F={Sphere:function(ut,Dt){Dt.sphere()},Point:function(ut,Dt){ut=ut.coordinates,Dt.point(ut[0],ut[1],ut[2])},MultiPoint:function(ut,Dt){for(var ir=ut.coordinates,Ht=-1,or=ir.length;++Ht<or;)ut=ir[Ht],Dt.point(ut[0],ut[1],ut[2])},LineString:function(ut,Dt){H(ut.coordinates,Dt,0)},MultiLineString:function(ut,Dt){for(var ir=ut.coordinates,Ht=-1,or=ir.length;++Ht<or;)H(ir[Ht],Dt,0)},Polygon:function(ut,Dt){V(ut.coordinates,Dt)},MultiPolygon:function(ut,Dt){for(var ir=ut.coordinates,Ht=-1,or=ir.length;++Ht<or;)V(ir[Ht],Dt)},GeometryCollection:function(ut,Dt){for(var ir=ut.geometries,Ht=-1,or=ir.length;++Ht<or;)E(ir[Ht],Dt)}};function H(ut,Dt,ir){var Ht,or=-1,Sr=ut.length-ir;for(Dt.lineStart();++or<Sr;)Ht=ut[or],Dt.point(Ht[0],Ht[1],Ht[2]);Dt.lineEnd()}function V(ut,Dt){var ir=-1,Ht=ut.length;for(Dt.polygonStart();++ir<Ht;)H(ut[ir],Dt,1);Dt.polygonEnd()}function Z(ut,Dt){ut&&D.hasOwnProperty(ut.type)?D[ut.type](ut,Dt):E(ut,Dt)}var K,G,W,Q,R,N=b(),U=b(),ee={point:S,lineStart:S,lineEnd:S,polygonStart:function(){N.reset(),ee.lineStart=j,ee.lineEnd=X},polygonEnd:function(){var ut=+N;U.add(ut<0?l+ut:ut),this.lineStart=this.lineEnd=this.point=S},sphere:function(){U.add(l)}};function j(){ee.point=J}function X(){re(K,G)}function J(ut,Dt){ee.point=re,K=ut,G=Dt,W=ut*=u,Q=p(Dt=(Dt*=u)/2+d),R=_(Dt)}function re(ut,Dt){var ir=(ut*=u)-W,Ht=ir>=0?1:-1,or=Ht*ir,Sr=p(Dt=(Dt*=u)/2+d),zr=_(Dt),Zr=R*zr,cn=Q*Sr+Zr*p(or),sn=Zr*Ht*_(or);N.add(h(sn,cn)),W=ut,Q=Sr,R=zr}function ne(ut){return[h(ut[1],ut[0]),I(ut[2])]}function se(ut){var Dt=ut[0],ir=ut[1],Ht=p(ir);return[Ht*p(Dt),Ht*_(Dt),_(ir)]}function oe(ut,Dt){return ut[0]*Dt[0]+ut[1]*Dt[1]+ut[2]*Dt[2]}function pe(ut,Dt){return[ut[1]*Dt[2]-ut[2]*Dt[1],ut[2]*Dt[0]-ut[0]*Dt[2],ut[0]*Dt[1]-ut[1]*Dt[0]]}function ce(ut,Dt){ut[0]+=Dt[0],ut[1]+=Dt[1],ut[2]+=Dt[2]}function de(ut,Dt){return[ut[0]*Dt,ut[1]*Dt,ut[2]*Dt]}function xe(ut){var Dt=k(ut[0]*ut[0]+ut[1]*ut[1]+ut[2]*ut[2]);ut[0]/=Dt,ut[1]/=Dt,ut[2]/=Dt}var _e,we,Ee,fe,ge,ke,be,Se,Oe,De,je,Je,ze,Ue,Ge,Ye,et,ct,mt,Ct,Tt,nt,Qe,Et,Gt,Xt,Fe=b(),qe={point:wt,lineStart:Ce,lineEnd:Ie,polygonStart:function(){qe.point=Te,qe.lineStart=Pe,qe.lineEnd=Ve,Fe.reset(),ee.polygonStart()},polygonEnd:function(){ee.polygonEnd(),qe.point=wt,qe.lineStart=Ce,qe.lineEnd=Ie,N<0?(_e=-(Ee=180),we=-(fe=90)):Fe>t?fe=90:Fe<-t&&(we=-90),De[0]=_e,De[1]=Ee},sphere:function(){_e=-(Ee=180),we=-(fe=90)}};function wt(ut,Dt){Oe.push(De=[_e=ut,Ee=ut]),Dt<we&&(we=Dt),Dt>fe&&(fe=Dt)}function ft(ut,Dt){var ir=se([ut*u,Dt*u]);if(Se){var Ht=pe(Se,ir),or=pe([Ht[1],-Ht[0],0],Ht);xe(or),or=ne(or);var Sr,zr=ut-ge,Zr=zr>0?1:-1,cn=or[0]*a*Zr,sn=f(zr)>180;sn^(Zr*ge<cn&&cn<Zr*ut)?(Sr=or[1]*a)>fe&&(fe=Sr):sn^(Zr*ge<(cn=(cn+360)%360-180)&&cn<Zr*ut)?(Sr=-or[1]*a)<we&&(we=Sr):(Dt<we&&(we=Dt),Dt>fe&&(fe=Dt)),sn?ut<ge?tt(_e,ut)>tt(_e,Ee)&&(Ee=ut):tt(ut,Ee)>tt(_e,Ee)&&(_e=ut):Ee>=_e?(ut<_e&&(_e=ut),ut>Ee&&(Ee=ut)):ut>ge?tt(_e,ut)>tt(_e,Ee)&&(Ee=ut):tt(ut,Ee)>tt(_e,Ee)&&(_e=ut)}else Oe.push(De=[_e=ut,Ee=ut]);Dt<we&&(we=Dt),Dt>fe&&(fe=Dt),Se=ir,ge=ut}function Ce(){qe.point=ft}function Ie(){De[0]=_e,De[1]=Ee,qe.point=wt,Se=null}function Te(ut,Dt){if(Se){var ir=ut-ge;Fe.add(f(ir)>180?ir+(ir>0?360:-360):ir)}else ke=ut,be=Dt;ee.point(ut,Dt),ft(ut,Dt)}function Pe(){ee.lineStart()}function Ve(){Te(ke,be),ee.lineEnd(),f(Fe)>t&&(_e=-(Ee=180)),De[0]=_e,De[1]=Ee,Se=null}function tt(ut,Dt){return(Dt-=ut)<0?Dt+360:Dt}function ot(ut,Dt){return ut[0]-Dt[0]}function at(ut,Dt){return ut[0]<=ut[1]?ut[0]<=Dt&&Dt<=ut[1]:Dt<ut[0]||ut[1]<Dt}var _t={sphere:S,point:bt,lineStart:Nt,lineEnd:Ot,polygonStart:function(){_t.lineStart=Mt,_t.lineEnd=Pt},polygonEnd:function(){_t.lineStart=Nt,_t.lineEnd=Ot}};function bt(ut,Dt){ut*=u;var ir=p(Dt*=u);jt(ir*p(ut),ir*_(ut),_(Dt))}function jt(ut,Dt,ir){++je,ze+=(ut-ze)/je,Ue+=(Dt-Ue)/je,Ge+=(ir-Ge)/je}function Nt(){_t.point=$e}function $e(ut,Dt){ut*=u;var ir=p(Dt*=u);Et=ir*p(ut),Gt=ir*_(ut),Xt=_(Dt),_t.point=yt,jt(Et,Gt,Xt)}function yt(ut,Dt){ut*=u;var ir=p(Dt*=u),Ht=ir*p(ut),or=ir*_(ut),Sr=_(Dt),zr=h(k((zr=Gt*Sr-Xt*or)*zr+(zr=Xt*Ht-Et*Sr)*zr+(zr=Et*or-Gt*Ht)*zr),Et*Ht+Gt*or+Xt*Sr);Je+=zr,Ye+=zr*(Et+(Et=Ht)),et+=zr*(Gt+(Gt=or)),ct+=zr*(Xt+(Xt=Sr)),jt(Et,Gt,Xt)}function Ot(){_t.point=bt}function Mt(){_t.point=Le}function Pt(){Xe(nt,Qe),_t.point=bt}function Le(ut,Dt){nt=ut,Qe=Dt,ut*=u,Dt*=u,_t.point=Xe;var ir=p(Dt);Et=ir*p(ut),Gt=ir*_(ut),Xt=_(Dt),jt(Et,Gt,Xt)}function Xe(ut,Dt){ut*=u;var ir=p(Dt*=u),Ht=ir*p(ut),or=ir*_(ut),Sr=_(Dt),zr=Gt*Sr-Xt*or,Zr=Xt*Ht-Et*Sr,cn=Et*or-Gt*Ht,sn=k(zr*zr+Zr*Zr+cn*cn),gn=I(sn),_n=sn&&-gn/sn;mt+=_n*zr,Ct+=_n*Zr,Tt+=_n*cn,Je+=gn,Ye+=gn*(Et+(Et=Ht)),et+=gn*(Gt+(Gt=or)),ct+=gn*(Xt+(Xt=Sr)),jt(Et,Gt,Xt)}function it(ut){return function(){return ut}}function At(ut,Dt){function ir(Ht,or){return Ht=ut(Ht,or),Dt(Ht[0],Ht[1])}return ut.invert&&Dt.invert&&(ir.invert=function(Ht,or){return(Ht=Dt.invert(Ht,or))&&ut.invert(Ht[0],Ht[1])}),ir}function It(ut,Dt){return[f(ut)>i?ut+Math.round(-ut/l)*l:ut,Dt]}function Zt(ut,Dt,ir){return(ut%=l)?Dt||ir?At(Vt(ut),pr(Dt,ir)):Vt(ut):Dt||ir?pr(Dt,ir):It}function Jt(ut){return function(Dt,ir){return[(Dt+=ut)>i?Dt-l:Dt<-i?Dt+l:Dt,ir]}}function Vt(ut){var Dt=Jt(ut);return Dt.invert=Jt(-ut),Dt}function pr(ut,Dt){var ir=p(ut),Ht=_(ut),or=p(Dt),Sr=_(Dt);function zr(Zr,cn){var sn=p(cn),gn=p(Zr)*sn,_n=_(Zr)*sn,un=_(cn),wn=un*ir+gn*Ht;return[h(_n*or-wn*Sr,gn*ir-un*Ht),I(wn*or+_n*Sr)]}return zr.invert=function(Zr,cn){var sn=p(cn),gn=p(Zr)*sn,_n=_(Zr)*sn,un=_(cn),wn=un*or-_n*Sr;return[h(_n*or+un*Sr,gn*ir+wn*Ht),I(wn*ir-gn*Ht)]},zr}function Ir(ut){function Dt(ir){return(ir=ut(ir[0]*u,ir[1]*u))[0]*=a,ir[1]*=a,ir}return ut=Zt(ut[0]*u,ut[1]*u,ut.length>2?ut[2]*u:0),Dt.invert=function(ir){return(ir=ut.invert(ir[0]*u,ir[1]*u))[0]*=a,ir[1]*=a,ir},Dt}function fr(ut,Dt,ir,Ht,or,Sr){if(ir){var zr=p(Dt),Zr=_(Dt),cn=Ht*ir;or==null?(or=Dt+Ht*l,Sr=Dt-cn/2):(or=$t(zr,or),Sr=$t(zr,Sr),(Ht>0?or<Sr:or>Sr)&&(or+=Ht*l));for(var sn,gn=or;Ht>0?gn>Sr:gn<Sr;gn-=cn)sn=ne([zr,-Zr*p(gn),-Zr*_(gn)]),ut.point(sn[0],sn[1])}}function $t(ut,Dt){(Dt=se(Dt))[0]-=ut,xe(Dt);var ir=A(-Dt[1]);return((-Dt[2]<0?-ir:ir)+l-t)%l}function er(){var ut,Dt=[];return{point:function(ir,Ht,or){ut.push([ir,Ht,or])},lineStart:function(){Dt.push(ut=[])},lineEnd:S,rejoin:function(){Dt.length>1&&Dt.push(Dt.pop().concat(Dt.shift()))},result:function(){var ir=Dt;return Dt=[],ut=null,ir}}}function ar(ut,Dt){return f(ut[0]-Dt[0])<t&&f(ut[1]-Dt[1])<t}function hr(ut,Dt,ir,Ht){this.x=ut,this.z=Dt,this.o=ir,this.e=Ht,this.v=!1,this.n=this.p=null}function vr(ut,Dt,ir,Ht,or){var Sr,zr,Zr=[],cn=[];if(ut.forEach(function(Dn){if(!((Hn=Dn.length-1)<=0)){var Hn,ia,Jr=Dn[0],ra=Dn[Hn];if(ar(Jr,ra)){if(!Jr[2]&&!ra[2]){for(or.lineStart(),Sr=0;Sr<Hn;++Sr)or.point((Jr=Dn[Sr])[0],Jr[1]);return void or.lineEnd()}ra[0]+=2*t}Zr.push(ia=new hr(Jr,Dn,null,!0)),cn.push(ia.o=new hr(Jr,null,ia,!1)),Zr.push(ia=new hr(ra,Dn,null,!1)),cn.push(ia.o=new hr(ra,null,ia,!0))}}),Zr.length){for(cn.sort(Dt),Pr(Zr),Pr(cn),Sr=0,zr=cn.length;Sr<zr;++Sr)cn[Sr].e=ir=!ir;for(var sn,gn,_n=Zr[0];;){for(var un=_n,wn=!0;un.v;)if((un=un.n)===_n)return;sn=un.z,or.lineStart();do{if(un.v=un.o.v=!0,un.e){if(wn)for(Sr=0,zr=sn.length;Sr<zr;++Sr)or.point((gn=sn[Sr])[0],gn[1]);else Ht(un.x,un.n.x,1,or);un=un.n}else{if(wn)for(sn=un.p.z,Sr=sn.length-1;Sr>=0;--Sr)or.point((gn=sn[Sr])[0],gn[1]);else Ht(un.x,un.p.x,-1,or);un=un.p}sn=(un=un.o).z,wn=!wn}while(!un.v);or.lineEnd()}}}function Pr(ut){if(Dt=ut.length){for(var Dt,ir,Ht=0,or=ut[0];++Ht<Dt;)or.n=ir=ut[Ht],ir.p=or,or=ir;or.n=ir=ut[0],ir.p=or}}It.invert=It;var Ur=b();function qr(ut){return f(ut[0])<=i?ut[0]:w(ut[0])*((f(ut[0])+i)%l-i)}function rn(ut,Dt){var ir=qr(Dt),Ht=Dt[1],or=_(Ht),Sr=[_(ir),-p(ir),0],zr=0,Zr=0;Ur.reset(),or===1?Ht=r+t:or===-1&&(Ht=-r-t);for(var cn=0,sn=ut.length;cn<sn;++cn)if(_n=(gn=ut[cn]).length)for(var gn,_n,un=gn[_n-1],wn=qr(un),Dn=un[1]/2+d,Hn=_(Dn),ia=p(Dn),Jr=0;Jr<_n;++Jr,wn=Cn,Hn=ta,ia=Ta,un=ra){var ra=gn[Jr],Cn=qr(ra),jn=ra[1]/2+d,ta=_(jn),Ta=p(jn),Ca=Cn-wn,Sn=Ca>=0?1:-1,Da=Sn*Ca,La=Da>i,ma=Hn*ta;if(Ur.add(h(ma*Sn*_(Da),ia*Ta+ma*p(Da))),zr+=La?Ca+Sn*l:Ca,La^wn>=ir^Cn>=ir){var Ra=pe(se(un),se(ra));xe(Ra);var Sa=pe(Sr,Ra);xe(Sa);var ei=(La^Ca>=0?-1:1)*I(Sa[2]);(Ht>ei||Ht===ei&&(Ra[0]||Ra[1]))&&(Zr+=La^Ca>=0?1:-1)}}return(zr<-t||zr<t&&Ur<-t)^1&Zr}function An(ut,Dt,ir,Ht){return function(or){var Sr,zr,Zr,cn=Dt(or),sn=er(),gn=Dt(sn),_n=!1,un={point:wn,lineStart:Hn,lineEnd:ia,polygonStart:function(){un.point=Jr,un.lineStart=ra,un.lineEnd=Cn,zr=[],Sr=[]},polygonEnd:function(){un.point=wn,un.lineStart=Hn,un.lineEnd=ia,zr=g.merge(zr);var jn=rn(Sr,Ht);zr.length?(_n||(or.polygonStart(),_n=!0),vr(zr,Mn,jn,ir,or)):jn&&(_n||(or.polygonStart(),_n=!0),or.lineStart(),ir(null,null,1,or),or.lineEnd()),_n&&(or.polygonEnd(),_n=!1),zr=Sr=null},sphere:function(){or.polygonStart(),or.lineStart(),ir(null,null,1,or),or.lineEnd(),or.polygonEnd()}};function wn(jn,ta){ut(jn,ta)&&or.point(jn,ta)}function Dn(jn,ta){cn.point(jn,ta)}function Hn(){un.point=Dn,cn.lineStart()}function ia(){un.point=wn,cn.lineEnd()}function Jr(jn,ta){Zr.push([jn,ta]),gn.point(jn,ta)}function ra(){gn.lineStart(),Zr=[]}function Cn(){Jr(Zr[0][0],Zr[0][1]),gn.lineEnd();var jn,ta,Ta,Ca,Sn=gn.clean(),Da=sn.result(),La=Da.length;if(Zr.pop(),Sr.push(Zr),Zr=null,La)if(1&Sn){if((ta=(Ta=Da[0]).length-1)>0){for(_n||(or.polygonStart(),_n=!0),or.lineStart(),jn=0;jn<ta;++jn)or.point((Ca=Ta[jn])[0],Ca[1]);or.lineEnd()}}else La>
vendor: 4,825 bytes, line 20
201&&2&Sn&&Da.push(Da.pop().concat(Da.shift())),zr.push(Da.filter(mn))}return un}}function mn(ut){return ut.length>1}function Mn(ut,Dt){return((ut=ut.x)[0]<0?ut[1]-r-t:r-ut[1])-((Dt=Dt.x)[0]<0?Dt[1]-r-t:r-Dt[1])}var Xr=An(function(){return!0},function(ut){var Dt,ir=NaN,Ht=NaN,or=NaN;return{lineStart:function(){ut.lineStart(),Dt=1},point:function(Sr,zr){var Zr=Sr>0?i:-i,cn=f(Sr-ir);f(cn-i)<t?(ut.point(ir,Ht=(Ht+zr)/2>0?r:-r),ut.point(or,Ht),ut.lineEnd(),ut.lineStart(),ut.point(Zr,Ht),ut.point(Sr,Ht),Dt=0):or!==Zr&&cn>=i&&(f(ir-or)<t&&(ir-=or*t),f(Sr-Zr)<t&&(Sr-=Zr*t),Ht=function(sn,gn,_n,un){var wn,Dn,Hn=_(sn-_n);return f(Hn)>t?o((_(gn)*(Dn=p(un))*_(_n)-_(un)*(wn=p(gn))*_(sn))/(wn*Dn*Hn)):(gn+un)/2}(ir,Ht,Sr,zr),ut.point(or,Ht),ut.lineEnd(),ut.lineStart(),ut.point(Zr,Ht),Dt=0),ut.point(ir=Sr,Ht=zr),or=Zr},lineEnd:function(){ut.lineEnd(),ir=Ht=NaN},clean:function(){return 2-Dt}}},function(ut,Dt,ir,Ht){var or;if(ut==null)or=ir*r,Ht.point(-i,or),Ht.point(0,or),Ht.point(i,or),Ht.point(i,0),Ht.point(i,-or),Ht.point(0,-or),Ht.point(-i,-or),Ht.point(-i,0),Ht.point(-i,or);else if(f(ut[0]-Dt[0])>t){var Sr=ut[0]<Dt[0]?i:-i;or=ir*Sr/2,Ht.point(-Sr,or),Ht.point(0,or),Ht.point(Sr,or)}else Ht.point(Dt[0],Dt[1])},[-i,-r]);function Er(ut){var Dt=p(ut),ir=6*u,Ht=Dt>0,or=f(Dt)>t;function Sr(cn,sn){return p(cn)*p(sn)>Dt}function zr(cn,sn,gn){var _n=[1,0,0],un=pe(se(cn),se(sn)),wn=oe(un,un),Dn=un[0],Hn=wn-Dn*Dn;if(!Hn)return!gn&&cn;var ia=Dt*wn/Hn,Jr=-Dt*Dn/Hn,ra=pe(_n,un),Cn=de(_n,ia);ce(Cn,de(un,Jr));var jn=ra,ta=oe(Cn,jn),Ta=oe(jn,jn),Ca=ta*ta-Ta*(oe(Cn,Cn)-1);if(!(Ca<0)){var Sn=k(Ca),Da=de(jn,(-ta-Sn)/Ta);if(ce(Da,Cn),Da=ne(Da),!gn)return Da;var La,ma=cn[0],Ra=sn[0],Sa=cn[1],ei=sn[1];Ra<ma&&(La=ma,ma=Ra,Ra=La);var na=Ra-ma,Xa=f(na-i)<t;if(!Xa&&ei<Sa&&(La=Sa,Sa=ei,ei=La),Xa||na<t?Xa?Sa+ei>0^Da[1]<(f(Da[0]-ma)<t?Sa:ei):Sa<=Da[1]&&Da[1]<=ei:na>i^(ma<=Da[0]&&Da[0]<=Ra)){var Ui=de(jn,(-ta+Sn)/Ta);return ce(Ui,Cn),[Da,ne(Ui)]}}}function Zr(cn,sn){var gn=Ht?ut:i-ut,_n=0;return cn<-gn?_n|=1:cn>gn&&(_n|=2),sn<-gn?_n|=4:sn>gn&&(_n|=8),_n}return An(Sr,function(cn){var sn,gn,_n,un,wn;return{lineStart:function(){un=_n=!1,wn=1},point:function(Dn,Hn){var ia,Jr=[Dn,Hn],ra=Sr(Dn,Hn),Cn=Ht?ra?0:Zr(Dn,Hn):ra?Zr(Dn+(Dn<0?i:-i),Hn):0;if(!sn&&(un=_n=ra)&&cn.lineStart(),ra!==_n&&(!(ia=zr(sn,Jr))||ar(sn,ia)||ar(Jr,ia))&&(Jr[2]=1),ra!==_n)wn=0,ra?(cn.lineStart(),ia=zr(Jr,sn),cn.point(ia[0],ia[1])):(ia=zr(sn,Jr),cn.point(ia[0],ia[1],2),cn.lineEnd()),sn=ia;else if(or&&sn&&Ht^ra){var jn;Cn&gn||!(jn=zr(Jr,sn,!0))||(wn=0,Ht?(cn.lineStart(),cn.point(jn[0][0],jn[0][1]),cn.point(jn[1][0],jn[1][1]),cn.lineEnd()):(cn.point(jn[1][0],jn[1][1]),cn.lineEnd(),cn.lineStart(),cn.point(jn[0][0],jn[0][1],3)))}!ra||sn&&ar(sn,Jr)||cn.point(Jr[0],Jr[1]),sn=Jr,_n=ra,gn=Cn},lineEnd:function(){_n&&cn.lineEnd(),sn=null},clean:function(){return wn|(un&&_n)<<1}}},function(cn,sn,gn,_n){fr(_n,ut,ir,gn,cn,sn)},Ht?[0,-ut]:[-i,ut-i])}function on(ut,Dt,ir,Ht){function or(sn,gn){return ut<=sn&&sn<=ir&&Dt<=gn&&gn<=Ht}function Sr(sn,gn,_n,un){var wn=0,Dn=0;if(sn==null||(wn=zr(sn,_n))!==(Dn=zr(gn,_n))||cn(sn,gn)<0^_n>0)do un.point(wn===0||wn===3?ut:ir,wn>1?Ht:Dt);while((wn=(wn+_n+4)%4)!==Dn);else un.point(gn[0],gn[1])}function zr(sn,gn){return f(sn[0]-ut)<t?gn>0?0:3:f(sn[0]-ir)<t?gn>0?2:1:f(sn[1]-Dt)<t?gn>0?1:0:gn>0?3:2}function Zr(sn,gn){return cn(sn.x,gn.x)}function cn(sn,gn){var _n=zr(sn,1),un=zr(gn,1);return _n!==un?_n-un:_n===0?gn[1]-sn[1]:_n===1?sn[0]-gn[0]:_n===2?sn[1]-gn[1]:gn[0]-sn[0]}return function(sn){var gn,_n,un,wn,Dn,Hn,ia,Jr,ra,Cn,jn,ta=sn,Ta=er(),Ca={point:Sn,lineStart:function(){Ca.point=Da,_n&&_n.push(un=[]),Cn=!0,ra=!1,ia=Jr=NaN},lineEnd:function(){gn&&(Da(wn,Dn),Hn&&ra&&Ta.rejoin(),gn.push(Ta.result())),Ca.point=Sn,ra&&ta.lineEnd()},polygonStart:function(){ta=Ta,gn=[],_n=[],jn=!0},polygonEnd:function(){var La=function(){for(var Sa=0,ei=0,na=_n.length;ei<na;++ei)for(var Xa,Ui,Zo=_n[ei],Ro=1,xo=Zo.length,ya=Zo[0],vi=ya[0],bo=ya[1];Ro<xo;++Ro)Xa=vi,Ui=bo,ya=Zo[Ro],vi=ya[0],bo=ya[1],Ui<=Ht?bo>Ht&&(vi-Xa)*(Ht-Ui)>(bo-Ui)*(ut-Xa)&&++Sa:bo<=Ht&&(vi-Xa)*(Ht-Ui)<(bo-Ui)*(ut-Xa)&&--Sa;return Sa}(),ma=jn&&La,Ra=(gn=g.merge(gn)).length;(ma||Ra)&&(sn.polygonStart(),ma&&(sn.lineStart(),Sr(null,null,1,sn),sn.lineEnd()),Ra&&vr(gn,Zr,La,Sr,sn),sn.polygonEnd()),ta=sn,gn=_n=un=null}};function Sn(La,ma){or(La,ma)&&ta.point(La,ma)}function Da(La,ma){var Ra=or(La,ma);if(_n&&un.push([La,ma]),Cn)wn=La,Dn=ma,Hn=Ra,Cn=!1,Ra&&(ta.lineStart(),ta.point(La,ma));else if(Ra&&ra)ta.point(La,ma);else{var Sa=[ia=Math.max(-1e9,Math.min(1e9,ia)),Jr=Math.max(-1e9,Math.min(1e9,Jr))],ei=[La=Math.max(-1e9,Math.min(1e9,La)),ma=Math.max(-1e9,Math.min(1e9,ma))];(function(na,Xa,Ui,Zo,Ro,xo){var ya,vi=na[0],bo=na[1],Ja=0,Mi=1,Yi=Xa[0]-vi,ni=Xa[1]-bo;if(ya=Ui-vi,Yi||!(ya>0)){if(ya/=Yi,Yi<0){if(ya<Ja)return;ya<Mi&&(Mi=ya)}else if(Yi>0){if(ya>
vendor: 10,652 bytes, line 20
20Mi)return;ya>Ja&&(Ja=ya)}if(ya=Ro-vi,Yi||!(ya<0)){if(ya/=Yi,Yi<0){if(ya>Mi)return;ya>Ja&&(Ja=ya)}else if(Yi>0){if(ya<Ja)return;ya<Mi&&(Mi=ya)}if(ya=Zo-bo,ni||!(ya>0)){if(ya/=ni,ni<0){if(ya<Ja)return;ya<Mi&&(Mi=ya)}else if(ni>0){if(ya>Mi)return;ya>Ja&&(Ja=ya)}if(ya=xo-bo,ni||!(ya<0)){if(ya/=ni,ni<0){if(ya>Mi)return;ya>Ja&&(Ja=ya)}else if(ni>0){if(ya<Ja)return;ya<Mi&&(Mi=ya)}return Ja>0&&(na[0]=vi+Ja*Yi,na[1]=bo+Ja*ni),Mi<1&&(Xa[0]=vi+Mi*Yi,Xa[1]=bo+Mi*ni),!0}}}}})(Sa,ei,ut,Dt,ir,Ht)?(ra||(ta.lineStart(),ta.point(Sa[0],Sa[1])),ta.point(ei[0],ei[1]),Ra||ta.lineEnd(),jn=!1):Ra&&(ta.lineStart(),ta.point(La,ma),jn=!1)}ia=La,Jr=ma,ra=Ra}return Ca}}var Un,Tr,en,$r=b(),Rr={sphere:S,point:S,lineStart:function(){Rr.point=Nn,Rr.lineEnd=Pn},lineEnd:S,polygonStart:S,polygonEnd:S};function Pn(){Rr.point=Rr.lineEnd=S}function Nn(ut,Dt){Un=ut*=u,Tr=_(Dt*=u),en=p(Dt),Rr.point=hn}function hn(ut,Dt){ut*=u;var ir=_(Dt*=u),Ht=p(Dt),or=f(ut-Un),Sr=p(or),zr=Ht*_(or),Zr=en*ir-Tr*Ht*Sr,cn=Tr*ir+en*Ht*Sr;$r.add(h(k(zr*zr+Zr*Zr),cn)),Un=ut,Tr=ir,en=Ht}function Fn(ut){return $r.reset(),Z(ut,Rr),+$r}var ca=[null,null],sr={type:"LineString",coordinates:ca};function Fr(ut,Dt){return ca[0]=ut,ca[1]=Dt,Fn(sr)}var Bt={Feature:function(ut,Dt){return mr(ut.geometry,Dt)},FeatureCollection:function(ut,Dt){for(var ir=ut.features,Ht=-1,or=ir.length;++Ht<or;)if(mr(ir[Ht].geometry,Dt))return!0;return!1}},lr={Sphere:function(){return!0},Point:function(ut,Dt){return Vr(ut.coordinates,Dt)},MultiPoint:function(ut,Dt){for(var ir=ut.coordinates,Ht=-1,or=ir.length;++Ht<or;)if(Vr(ir[Ht],Dt))return!0;return!1},LineString:function(ut,Dt){return Br(ut.coordinates,Dt)},MultiLineString:function(ut,Dt){for(var ir=ut.coordinates,Ht=-1,or=ir.length;++Ht<or;)if(Br(ir[Ht],Dt))return!0;return!1},Polygon:function(ut,Dt){return Dr(ut.coordinates,Dt)},MultiPolygon:function(ut,Dt){for(var ir=ut.coordinates,Ht=-1,or=ir.length;++Ht<or;)if(Dr(ir[Ht],Dt))return!0;return!1},GeometryCollection:function(ut,Dt){for(var ir=ut.geometries,Ht=-1,or=ir.length;++Ht<or;)if(mr(ir[Ht],Dt))return!0;return!1}};function mr(ut,Dt){return!(!ut||!lr.hasOwnProperty(ut.type))&&lr[ut.type](ut,Dt)}function Vr(ut,Dt){return Fr(ut,Dt)===0}function Br(ut,Dt){for(var ir,Ht,or,Sr=0,zr=ut.length;Sr<zr;Sr++){if((Ht=Fr(ut[Sr],Dt))===0||Sr>0&&(or=Fr(ut[Sr],ut[Sr-1]))>0&&ir<=or&&Ht<=or&&(ir+Ht-or)*(1-Math.pow((ir-Ht)/or,2))<1e-12*or)return!0;ir=Ht}return!1}function Dr(ut,Dt){return!!rn(ut.map(Or),xr(Dt))}function Or(ut){return(ut=ut.map(xr)).pop(),ut}function xr(ut){return[ut[0]*u,ut[1]*u]}function br(ut,Dt,ir){var Ht=g.range(ut,Dt-t,ir).concat(Dt);return function(or){return Ht.map(function(Sr){return[or,Sr]})}}function _r(ut,Dt,ir){var Ht=g.range(ut,Dt-t,ir).concat(Dt);return function(or){return Ht.map(function(Sr){return[Sr,or]})}}function Cr(){var ut,Dt,ir,Ht,or,Sr,zr,Zr,cn,sn,gn,_n,un=10,wn=un,Dn=90,Hn=360,ia=2.5;function Jr(){return{type:"MultiLineString",coordinates:ra()}}function ra(){return g.range(s(Ht/Dn)*Dn,ir,Dn).map(gn).concat(g.range(s(Zr/Hn)*Hn,zr,Hn).map(_n)).concat(g.range(s(Dt/un)*un,ut,un).filter(function(Cn){return f(Cn%Dn)>t}).map(cn)).concat(g.range(s(Sr/wn)*wn,or,wn).filter(function(Cn){return f(Cn%Hn)>t}).map(sn))}return Jr.lines=function(){return ra().map(function(Cn){return{type:"LineString",coordinates:Cn}})},Jr.outline=function(){return{type:"Polygon",coordinates:[gn(Ht).concat(_n(zr).slice(1),gn(ir).reverse().slice(1),_n(Zr).reverse().slice(1))]}},Jr.extent=function(Cn){return arguments.length?Jr.extentMajor(Cn).extentMinor(Cn):Jr.extentMinor()},Jr.extentMajor=function(Cn){return arguments.length?(Ht=+Cn[0][0],ir=+Cn[1][0],Zr=+Cn[0][1],zr=+Cn[1][1],Ht>ir&&(Cn=Ht,Ht=ir,ir=Cn),Zr>zr&&(Cn=Zr,Zr=zr,zr=Cn),Jr.precision(ia)):[[Ht,Zr],[ir,zr]]},Jr.extentMinor=function(Cn){return arguments.length?(Dt=+Cn[0][0],ut=+Cn[1][0],Sr=+Cn[0][1],or=+Cn[1][1],Dt>ut&&(Cn=Dt,Dt=ut,ut=Cn),Sr>or&&(Cn=Sr,Sr=or,or=Cn),Jr.precision(ia)):[[Dt,Sr],[ut,or]]},Jr.step=function(Cn){return arguments.length?Jr.stepMajor(Cn).stepMinor(Cn):Jr.stepMinor()},Jr.stepMajor=function(Cn){return arguments.length?(Dn=+Cn[0],Hn=+Cn[1],Jr):[Dn,Hn]},Jr.stepMinor=function(Cn){return arguments.length?(un=+Cn[0],wn=+Cn[1],Jr):[un,wn]},Jr.precision=function(Cn){return arguments.length?(ia=+Cn,cn=br(Sr,or,90),sn=_r(Dt,ut,ia),gn=br(Zr,zr,90),_n=_r(Ht,ir,ia),Jr):ia},Jr.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function Wr(ut){return ut}var Gr,tn,nn,vn,xn=b(),bn=b(),En={point:S,lineStart:S,lineEnd:S,polygonStart:function(){En.lineStart=In,En.lineEnd=ka},polygonEnd:function(){En.lineStart=En.lineEnd=En.point=S,xn.add(f(bn)),bn.reset()},result:function(){var ut=xn/2;return xn.reset(),ut}};function In(){En.point=Wn}function Wn(ut,Dt){En.point=Ma,Gr=nn=ut,tn=vn=Dt}function Ma(ut,Dt){bn.add(vn*ut-nn*Dt),nn=ut,vn=Dt}function ka(){Ma(Gr,tn)}var kn=1/0,$n=kn,Jn=-kn,Oa=Jn,mi={point:function(ut,Dt){ut<kn&&(kn=ut),ut>Jn&&(Jn=ut),Dt<$n&&($n=Dt),Dt>Oa&&(Oa=Dt)},lineStart:S,lineEnd:S,polygonStart:S,polygonEnd:S,result:function(){var ut=[[kn,$n],[Jn,Oa]];return Jn=Oa=-($n=kn=1/0),ut}},Di,uo,Ya,Wa,Ki=0,Ba=0,fo=0,go=0,Ti=0,Qi=0,vo=0,Ao=0,Ni=0,gi={point:Xi,lineStart:vs,lineEnd:fs,polygonStart:function(){gi.lineStart=Qo,gi.lineEnd=Ts},polygonEnd:function(){gi.point=Xi,gi.lineStart=vs,gi.lineEnd=fs},result:function(){var ut=Ni?[vo/Ni,Ao/Ni]:Qi?[go/Qi,Ti/Qi]:fo?[Ki/fo,Ba/fo]:[NaN,NaN];return Ki=Ba=fo=go=Ti=Qi=vo=Ao=Ni=0,ut}};function Xi(ut,Dt){Ki+=ut,Ba+=Dt,++fo}function vs(){gi.point=ws}function ws(ut,Dt){gi.point=Za,Xi(Ya=ut,Wa=Dt)}function Za(ut,Dt){var ir=ut-Ya,Ht=Dt-Wa,or=k(ir*ir+Ht*Ht);go+=or*(Ya+ut)/2,Ti+=or*(Wa+Dt)/2,Qi+=or,Xi(Ya=ut,Wa=Dt)}function fs(){gi.point=Xi}function Qo(){gi.point=ks}function Ts(){ys(Di,uo)}function ks(ut,Dt){gi.point=ys,Xi(Di=Ya=ut,uo=Wa=Dt)}function ys(ut,Dt){var ir=ut-Ya,Ht=Dt-Wa,or=k(ir*ir+Ht*Ht);go+=or*(Ya+ut)/2,Ti+=or*(Wa+Dt)/2,Qi+=or,vo+=(or=Wa*ut-Ya*Dt)*(Ya+ut),Ao+=or*(Wa+Dt),Ni+=3*or,Xi(Ya=ut,Wa=Dt)}function Ms(ut){this._context=ut}Ms.prototype={_radius:4.5,pointRadius:function(ut){return this._radius=ut,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(ut,Dt){switch(this._point){case 0:this._context.moveTo(ut,Dt),this._point=1;break;case 1:this._context.lineTo(ut,Dt);break;default:this._context.moveTo(ut+this._radius,Dt),this._context.arc(ut,Dt,this._radius,0,l)}},result:S};var Lo,Co,Uo,Vo,Ho,$o=b(),yo={point:S,lineStart:function(){yo.point=hs},lineEnd:function(){Lo&&ho(Co,Uo),yo.point=S},polygonStart:function(){Lo=!0},polygonEnd:function(){Lo=null},result:function(){var ut=+$o;return $o.reset(),ut}};function hs(ut,Dt){yo.point=ho,Co=Vo=ut,Uo=Ho=Dt}function ho(ut,Dt){Vo-=ut,Ho-=Dt,$o.add(k(Vo*Vo+Ho*Ho)),Vo=ut,Ho=Dt}function qo(){this._string=[]}function ps(ut){return"m0,"+ut+"a"+ut+","+ut+" 0 1,1 0,"+-2*ut+"a"+ut+","+ut+" 0 1,1 0,"+2*ut+"z"}function Po(ut){return function(Dt){var ir=new qa;for(var Ht in ut)ir[Ht]=ut[Ht];return ir.stream=Dt,ir}}function qa(){}function Be(ut,Dt,ir){var Ht=ut.clipExtent&&ut.clipExtent();return ut.scale(150).translate([0,0]),Ht!=null&&ut.clipExtent(null),Z(ir,ut.stream(mi)),Dt(mi.result()),Ht!=null&&ut.clipExtent(Ht),ut}function He(ut,Dt,ir){return Be(ut,function(Ht){var or=Dt[1][0]-Dt[0][0],Sr=Dt[1][1]-Dt[0][1],zr=Math.min(or/(Ht[1][0]-Ht[0][0]),Sr/(Ht[1][1]-Ht[0][1])),Zr=+Dt[0][0]+(or-zr*(Ht[1][0]+Ht[0][0]))/2,cn=+Dt[0][1]+(Sr-zr*(Ht[1][1]+Ht[0][1]))/2;ut.scale(150*zr).translate([Zr,cn])},ir)}function Ke(ut,Dt,ir){return He(ut,[[0,0],Dt],ir)}function st(ut,Dt,ir){return Be(ut,function(Ht){var or=+Dt,Sr=or/(Ht[1][0]-Ht[0][0]),zr=(or-Sr*(Ht[1][0]+Ht[0][0]))/2,Zr=-Sr*Ht[0][1];ut.scale(150*Sr).translate([zr,Zr])},ir)}function dt(ut,Dt,ir){return Be(ut,function(Ht){var or=+Dt,Sr=or/(Ht[1][1]-Ht[0][1]),zr=-Sr*Ht[0][0],Zr=(or-Sr*(Ht[1][1]+Ht[0][1]))/2;ut.scale(150*Sr).translate([zr,Zr])},ir)}qo.prototype={_radius:4.5,_circle:ps(4.5),pointRadius:function(ut){return(ut=+ut)!==this._radius&&(this._radius=ut,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(ut,Dt){switch(this._point){case 0:this._string.push("M",ut,",",Dt),this._point=1;break;case 1:this._string.push("L",ut,",",Dt);break;default:this._circle==null&&(this._circle=ps(this._radius)),this._string.push("M",ut,",",Dt,this._circle)}},result:function(){if(this._string.length){var ut=this._string.join("");return this._string=[],ut}return null}},qa.prototype={constructor:qa,point:function(ut,Dt){this.stream.point(ut,Dt)},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 ht=p(30*u);function St(ut,Dt){return+Dt?function(ir,Ht){function or(Sr,zr,Zr,cn,sn,gn,_n,un,wn,Dn,Hn,ia,Jr,ra){var Cn=_n-Sr,jn=un-zr,ta=Cn*Cn+jn*jn;if(ta>4*Ht&&Jr--){var Ta=cn+Dn,Ca=sn+Hn,Sn=gn+ia,Da=k(Ta*Ta+Ca*Ca+Sn*Sn),La=I(Sn/=Da),ma=f(f(Sn)-1)<t||f(Zr-wn)<t?(Zr+wn)/2:h(Ca,Ta),Ra=ir(ma,La),Sa=Ra[0],ei=Ra[1],na=Sa-Sr,Xa=ei-zr,Ui=jn*na-Cn*Xa;(Ui*Ui/ta>Ht||f((Cn*na+jn*Xa)/ta-.5)>.3||cn*Dn+sn*Hn+gn*ia<ht)&&(or(Sr,zr,Zr,cn,sn,gn,Sa,ei,ma,Ta/=Da,Ca/=Da,Sn,Jr,ra),ra.point(Sa,ei),or(Sa,ei,ma,Ta,Ca,Sn,_n,un,wn,Dn,Hn,ia,Jr,ra))}}return function(Sr){var zr,Zr,cn,sn,gn,_n,un,wn,Dn,Hn,ia,Jr,ra={point:Cn,lineStart:jn,lineEnd:Ta,polygonStart:function(){Sr.polygonStart(),ra.lineStart=Ca},polygonEnd:function(){Sr.polygonEnd(),ra.lineStart=jn}};function Cn(La,ma){La=ir(La,ma),Sr.point(La[0],La[1])}function jn(){wn=NaN,ra.point=ta,Sr.lineStart()}function ta(La,ma){var Ra=se([La,ma]),Sa=ir(La,ma);or(wn,Dn,un,Hn,ia,Jr,wn=Sa[0],Dn=Sa[1],un=La,Hn=Ra[0],ia=Ra[1],Jr=Ra[2],16,Sr),Sr.point(wn,Dn)}function Ta(){ra.point=Cn,Sr.lineEnd()}function Ca(){jn(),ra.point=Sn,ra.lineEnd=Da}function Sn(La,ma){ta(zr=La,ma),Zr=wn,cn=Dn,sn=Hn,gn=ia,_n=Jr,ra.point=ta}function Da(){or(wn,Dn,un,Hn,ia,Jr,Zr,cn,zr,sn,gn,_n,16,Sr),ra.lineEnd=Ta,Ta()}return ra}}(ut,Dt):function(ir){return Po({point:function(Ht,or){Ht=ir(Ht,or),this.stream.point(Ht[0],Ht[1])}})}(ut)}var Kt=Po({point:function(ut,Dt){this.stream.point(ut*u,Dt*u)}});function Qt(ut,Dt,ir,Ht,or){function Sr(zr,Zr){return[Dt+ut*(zr*=Ht),ir-ut*(Zr*=or)]}return Sr.invert=function(zr,Zr){return[(zr-Dt)/ut*Ht,(ir-Zr)/ut*or]},Sr}function Yt(ut,Dt,ir,Ht,or,Sr){var zr=p(Sr),Zr=_(Sr),cn=zr*ut,sn=Zr*ut,gn=zr/ut,_n=Zr/ut,un=(Zr*ir-zr*Dt)/ut,wn=(Zr*Dt+zr*ir)/ut;
vendor: 5,834 bytes, line 20
20function Dn(Hn,ia){return[cn*(Hn*=Ht)-sn*(ia*=or)+Dt,ir-sn*Hn-cn*ia]}return Dn.invert=function(Hn,ia){return[Ht*(gn*Hn-_n*ia+un),or*(wn-_n*Hn-gn*ia)]},Dn}function rr(ut){return cr(function(){return ut})()}function cr(ut){var Dt,ir,Ht,or,Sr,zr,Zr,cn,sn,gn,_n=150,un=480,wn=250,Dn=0,Hn=0,ia=0,Jr=0,ra=0,Cn=0,jn=1,ta=1,Ta=null,Ca=Xr,Sn=null,Da=Wr,La=.5;function ma(na){return cn(na[0]*u,na[1]*u)}function Ra(na){return(na=cn.invert(na[0],na[1]))&&[na[0]*a,na[1]*a]}function Sa(){var na=Yt(_n,0,0,jn,ta,Cn).apply(null,Dt(Dn,Hn)),Xa=(Cn?Yt:Qt)(_n,un-na[0],wn-na[1],jn,ta,Cn);return ir=Zt(ia,Jr,ra),Zr=At(Dt,Xa),cn=At(ir,Zr),zr=St(Zr,La),ei()}function ei(){return sn=gn=null,ma}return ma.stream=function(na){return sn&&gn===na?sn:sn=Kt(function(Xa){return Po({point:function(Ui,Zo){var Ro=Xa(Ui,Zo);return this.stream.point(Ro[0],Ro[1])}})}(ir)(Ca(zr(Da(gn=na)))))},ma.preclip=function(na){return arguments.length?(Ca=na,Ta=void 0,ei()):Ca},ma.postclip=function(na){return arguments.length?(Da=na,Sn=Ht=or=Sr=null,ei()):Da},ma.clipAngle=function(na){return arguments.length?(Ca=+na?Er(Ta=na*u):(Ta=null,Xr),ei()):Ta*a},ma.clipExtent=function(na){return arguments.length?(Da=na==null?(Sn=Ht=or=Sr=null,Wr):on(Sn=+na[0][0],Ht=+na[0][1],or=+na[1][0],Sr=+na[1][1]),ei()):Sn==null?null:[[Sn,Ht],[or,Sr]]},ma.scale=function(na){return arguments.length?(_n=+na,Sa()):_n},ma.translate=function(na){return arguments.length?(un=+na[0],wn=+na[1],Sa()):[un,wn]},ma.center=function(na){return arguments.length?(Dn=na[0]%360*u,Hn=na[1]%360*u,Sa()):[Dn*a,Hn*a]},ma.rotate=function(na){return arguments.length?(ia=na[0]%360*u,Jr=na[1]%360*u,ra=na.length>2?na[2]%360*u:0,Sa()):[ia*a,Jr*a,ra*a]},ma.angle=function(na){return arguments.length?(Cn=na%360*u,Sa()):Cn*a},ma.reflectX=function(na){return arguments.length?(jn=na?-1:1,Sa()):jn<0},ma.reflectY=function(na){return arguments.length?(ta=na?-1:1,Sa()):ta<0},ma.precision=function(na){return arguments.length?(zr=St(Zr,La=na*na),ei()):k(La)},ma.fitExtent=function(na,Xa){return He(ma,na,Xa)},ma.fitSize=function(na,Xa){return Ke(ma,na,Xa)},ma.fitWidth=function(na,Xa){return st(ma,na,Xa)},ma.fitHeight=function(na,Xa){return dt(ma,na,Xa)},function(){return Dt=ut.apply(this,arguments),ma.invert=Dt.invert&&Ra,Sa()}}function gr(ut){var Dt=0,ir=i/3,Ht=cr(ut),or=Ht(Dt,ir);return or.parallels=function(Sr){return arguments.length?Ht(Dt=Sr[0]*u,ir=Sr[1]*u):[Dt*a,ir*a]},or}function yr(ut,Dt){var ir=_(ut),Ht=(ir+_(Dt))/2;if(f(Ht)<t)return function(Zr){var cn=p(Zr);function sn(gn,_n){return[gn*cn,_(_n)/cn]}return sn.invert=function(gn,_n){return[gn/cn,I(_n*cn)]},sn}(ut);var or=1+ir*(2*Ht-ir),Sr=k(or)/Ht;function zr(Zr,cn){var sn=k(or-2*Ht*_(cn))/Ht;return[sn*_(Zr*=Ht),Sr-sn*p(Zr)]}return zr.invert=function(Zr,cn){var sn=Sr-cn,gn=h(Zr,f(sn))*w(sn);return sn*Ht<0&&(gn-=i*w(Zr)*w(sn)),[gn/Ht,I((or-(Zr*Zr+sn*sn)*Ht*Ht)/(2*Ht))]},zr}function Lr(){return gr(yr).scale(155.424).center([0,33.6442])}function an(){return Lr().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function dn(ut){return function(Dt,ir){var Ht=p(Dt),or=p(ir),Sr=ut(Ht*or);return[Sr*or*_(Dt),Sr*_(ir)]}}function Ln(ut){return function(Dt,ir){var Ht=k(Dt*Dt+ir*ir),or=ut(Ht),Sr=_(or),zr=p(or);return[h(Dt*Sr,Ht*zr),I(Ht&&ir*Sr/Ht)]}}var On=dn(function(ut){return k(2/(1+ut))});On.invert=Ln(function(ut){return 2*I(ut/2)});var qn=dn(function(ut){return(ut=A(ut))&&ut/_(ut)});function zn(ut,Dt){return[ut,c(L((r+Dt)/2))]}function ga(ut){var Dt,ir,Ht,or=rr(ut),Sr=or.center,zr=or.scale,Zr=or.translate,cn=or.clipExtent,sn=null;function gn(){var _n=i*zr(),un=or(Ir(or.rotate()).invert([0,0]));return cn(sn==null?[[un[0]-_n,un[1]-_n],[un[0]+_n,un[1]+_n]]:ut===zn?[[Math.max(un[0]-_n,sn),Dt],[Math.min(un[0]+_n,ir),Ht]]:[[sn,Math.max(un[1]-_n,Dt)],[ir,Math.min(un[1]+_n,Ht)]])}return or.scale=function(_n){return arguments.length?(zr(_n),gn()):zr()},or.translate=function(_n){return arguments.length?(Zr(_n),gn()):Zr()},or.center=function(_n){return arguments.length?(Sr(_n),gn()):Sr()},or.clipExtent=function(_n){return arguments.length?(_n==null?sn=Dt=ir=Ht=null:(sn=+_n[0][0],Dt=+_n[0][1],ir=+_n[1][0],Ht=+_n[1][1]),gn()):sn==null?null:[[sn,Dt],[ir,Ht]]},gn()}function Aa(ut){return L((r+ut)/2)}function ja(ut,Dt){var ir=p(ut),Ht=ut===Dt?_(ut):c(ir/p(Dt))/c(Aa(Dt)/Aa(ut)),or=ir*T(Aa(ut),Ht)/Ht;if(!Ht)return zn;function Sr(zr,Zr){or>0?Zr<-r+t&&(Zr=-r+t):Zr>r-t&&(Zr=r-t);var cn=or/T(Aa(Zr),Ht);return[cn*_(Ht*zr),or-cn*p(Ht*zr)]}return Sr.invert=function(zr,Zr){var cn=or-Zr,sn=w(Ht)*k(zr*zr+cn*cn),gn=h(zr,f(cn))*w(cn);return cn*Ht<0&&(gn-=i*w(zr)*w(cn)),[gn/Ht,2*o(T(or/sn,1/Ht))-r]},Sr}function Na(ut,Dt){return[ut,Dt]}function Ua(ut,Dt){var ir=p(ut),Ht=ut===Dt?_(ut):(ir-p(Dt))/(Dt-ut),or=ir/Ht+ut;if(f(Ht)<t)return Na;function Sr(zr,Zr){var cn=or-Zr,sn=Ht*zr;return[cn*_(sn),or-cn*p(sn)]}return Sr.invert=function(zr,Zr){var cn=or-Zr,sn=h(zr,f(cn))*w(cn);return cn*Ht<0&&(sn-=i*w(zr)*w(cn)),[sn/Ht,or-w(Ht)*k(zr*zr+cn*cn)]},Sr}qn.invert=Ln(function(ut){return ut}),zn.invert=function(ut,Dt){return[ut,2*o(x(Dt))-r]},Na.invert=Na;var ki=1.340264,_i=-.081106,si=893e-6,li=.003796,wi=k(3)/2;function ji(ut,Dt){var ir=I(wi*_(Dt)),Ht=ir*ir,or=Ht*Ht*Ht;return[ut*p(ir)/(wi*(ki+3*_i*Ht+or*(7*si+9*li*Ht))),ir*(ki+_i*Ht+or*(si+li*Ht))]}function $i(ut,Dt){var ir=p(Dt),Ht=p(ut)*ir;return[ir*_(ut)/Ht,_(Dt)/Ht]}function eo(ut,Dt){var ir=Dt*Dt,Ht=ir*ir;return[ut*(.8707-.131979*ir+Ht*(Ht*(.003971*ir-.001529*Ht)-.013791)),Dt*(1.007226+ir*(.015085+Ht*(.028874*ir-.044475-.005916*Ht)))]}function to(ut,Dt){return[p(Dt)*_(ut),_(Dt)]}function ro(ut,Dt){var ir=p(Dt),Ht=1+p(ut)*ir;return[ir*_(ut)/Ht,_(Dt)/Ht]}function za(ut,Dt){return[c(L((r+Dt)/2)),-ut]}ji.invert=function(ut,Dt){for(var ir,Ht=Dt,or=Ht*Ht,Sr=or*or*or,zr=0;zr<12&&(Sr=(or=(Ht-=ir=(Ht*(ki+_i*or+Sr*(si+li*or))-Dt)/(ki+3*_i*or+Sr*(7*si+9*li*
vendor: 24,263 bytes, line 20
20or)))*Ht)*or*or,!(f(ir)<1e-12));++zr);return[wi*ut*(ki+3*_i*or+Sr*(7*si+9*li*or))/p(Ht),I(_(Ht)/wi)]},$i.invert=Ln(o),eo.invert=function(ut,Dt){var ir,Ht=Dt,or=25;do{var Sr=Ht*Ht,zr=Sr*Sr;Ht-=ir=(Ht*(1.007226+Sr*(.015085+zr*(.028874*Sr-.044475-.005916*zr)))-Dt)/(1.007226+Sr*(.045255+zr*(.259866*Sr-.311325-.005916*11*zr)))}while(f(ir)>t&&--or>0);return[ut/(.8707+(Sr=Ht*Ht)*(Sr*(Sr*Sr*Sr*(.003971-.001529*Sr)-.013791)-.131979)),Ht]},to.invert=Ln(I),ro.invert=Ln(function(ut){return 2*o(ut)}),za.invert=function(ut,Dt){return[-Dt,2*o(x(ut))-r]},m.geoAlbers=an,m.geoAlbersUsa=function(){var ut,Dt,ir,Ht,or,Sr,zr=an(),Zr=Lr().rotate([154,0]).center([-2,58.5]).parallels([55,65]),cn=Lr().rotate([157,0]).center([-3,19.9]).parallels([8,18]),sn={point:function(un,wn){Sr=[un,wn]}};function gn(un){var wn=un[0],Dn=un[1];return Sr=null,ir.point(wn,Dn),Sr||(Ht.point(wn,Dn),Sr)||(or.point(wn,Dn),Sr)}function _n(){return ut=Dt=null,gn}return gn.invert=function(un){var wn=zr.scale(),Dn=zr.translate(),Hn=(un[0]-Dn[0])/wn,ia=(un[1]-Dn[1])/wn;return(ia>=.12&&ia<.234&&Hn>=-.425&&Hn<-.214?Zr:ia>=.166&&ia<.234&&Hn>=-.214&&Hn<-.115?cn:zr).invert(un)},gn.stream=function(un){return ut&&Dt===un?ut:(wn=[zr.stream(Dt=un),Zr.stream(un),cn.stream(un)],Dn=wn.length,ut={point:function(Hn,ia){for(var Jr=-1;++Jr<Dn;)wn[Jr].point(Hn,ia)},sphere:function(){for(var Hn=-1;++Hn<Dn;)wn[Hn].sphere()},lineStart:function(){for(var Hn=-1;++Hn<Dn;)wn[Hn].lineStart()},lineEnd:function(){for(var Hn=-1;++Hn<Dn;)wn[Hn].lineEnd()},polygonStart:function(){for(var Hn=-1;++Hn<Dn;)wn[Hn].polygonStart()},polygonEnd:function(){for(var Hn=-1;++Hn<Dn;)wn[Hn].polygonEnd()}});var wn,Dn},gn.precision=function(un){return arguments.length?(zr.precision(un),Zr.precision(un),cn.precision(un),_n()):zr.precision()},gn.scale=function(un){return arguments.length?(zr.scale(un),Zr.scale(.35*un),cn.scale(un),gn.translate(zr.translate())):zr.scale()},gn.translate=function(un){if(!arguments.length)return zr.translate();var wn=zr.scale(),Dn=+un[0],Hn=+un[1];return ir=zr.translate(un).clipExtent([[Dn-.455*wn,Hn-.238*wn],[Dn+.455*wn,Hn+.238*wn]]).stream(sn),Ht=Zr.translate([Dn-.307*wn,Hn+.201*wn]).clipExtent([[Dn-.425*wn+t,Hn+.12*wn+t],[Dn-.214*wn-t,Hn+.234*wn-t]]).stream(sn),or=cn.translate([Dn-.205*wn,Hn+.212*wn]).clipExtent([[Dn-.214*wn+t,Hn+.166*wn+t],[Dn-.115*wn-t,Hn+.234*wn-t]]).stream(sn),_n()},gn.fitExtent=function(un,wn){return He(gn,un,wn)},gn.fitSize=function(un,wn){return Ke(gn,un,wn)},gn.fitWidth=function(un,wn){return st(gn,un,wn)},gn.fitHeight=function(un,wn){return dt(gn,un,wn)},gn.scale(1070)},m.geoArea=function(ut){return U.reset(),Z(ut,ee),2*U},m.geoAzimuthalEqualArea=function(){return rr(On).scale(124.75).clipAngle(179.999)},m.geoAzimuthalEqualAreaRaw=On,m.geoAzimuthalEquidistant=function(){return rr(qn).scale(79.4188).clipAngle(179.999)},m.geoAzimuthalEquidistantRaw=qn,m.geoBounds=function(ut){var Dt,ir,Ht,or,Sr,zr,Zr;if(fe=Ee=-(_e=we=1/0),Oe=[],Z(ut,qe),ir=Oe.length){for(Oe.sort(ot),Dt=1,Sr=[Ht=Oe[0]];Dt<ir;++Dt)at(Ht,(or=Oe[Dt])[0])||at(Ht,or[1])?(tt(Ht[0],or[1])>tt(Ht[0],Ht[1])&&(Ht[1]=or[1]),tt(or[0],Ht[1])>tt(Ht[0],Ht[1])&&(Ht[0]=or[0])):Sr.push(Ht=or);for(zr=-1/0,Dt=0,Ht=Sr[ir=Sr.length-1];Dt<=ir;Ht=or,++Dt)or=Sr[Dt],(Zr=tt(Ht[1],or[0]))>zr&&(zr=Zr,_e=or[0],Ee=Ht[1])}return Oe=De=null,_e===1/0||we===1/0?[[NaN,NaN],[NaN,NaN]]:[[_e,we],[Ee,fe]]},m.geoCentroid=function(ut){je=Je=ze=Ue=Ge=Ye=et=ct=mt=Ct=Tt=0,Z(ut,_t);var Dt=mt,ir=Ct,Ht=Tt,or=Dt*Dt+ir*ir+Ht*Ht;return or<1e-12&&(Dt=Ye,ir=et,Ht=ct,Je<t&&(Dt=ze,ir=Ue,Ht=Ge),(or=Dt*Dt+ir*ir+Ht*Ht)<1e-12)?[NaN,NaN]:[h(ir,Dt)*a,I(Ht/k(or))*a]},m.geoCircle=function(){var ut,Dt,ir=it([0,0]),Ht=it(90),or=it(6),Sr={point:function(Zr,cn){ut.push(Zr=Dt(Zr,cn)),Zr[0]*=a,Zr[1]*=a}};function zr(){var Zr=ir.apply(this,arguments),cn=Ht.apply(this,arguments)*u,sn=or.apply(this,arguments)*u;return ut=[],Dt=Zt(-Zr[0]*u,-Zr[1]*u,0).invert,fr(Sr,cn,sn,1),Zr={type:"Polygon",coordinates:[ut]},ut=Dt=null,Zr}return zr.center=function(Zr){return arguments.length?(ir=typeof Zr=="function"?Zr:it([+Zr[0],+Zr[1]]),zr):ir},zr.radius=function(Zr){return arguments.length?(Ht=typeof Zr=="function"?Zr:it(+Zr),zr):Ht},zr.precision=function(Zr){return arguments.length?(or=typeof Zr=="function"?Zr:it(+Zr),zr):or},zr},m.geoClipAntimeridian=Xr,m.geoClipCircle=Er,m.geoClipExtent=function(){var ut,Dt,ir,Ht=0,or=0,Sr=960,zr=500;return ir={stream:function(Zr){return ut&&Dt===Zr?ut:ut=on(Ht,or,Sr,zr)(Dt=Zr)},extent:function(Zr){return arguments.length?(Ht=+Zr[0][0],or=+Zr[0][1],Sr=+Zr[1][0],zr=+Zr[1][1],ut=Dt=null,ir):[[Ht,or],[Sr,zr]]}}},m.geoClipRectangle=on,m.geoConicConformal=function(){return gr(ja).scale(109.5).parallels([30,30])},m.geoConicConformalRaw=ja,m.geoConicEqualArea=Lr,m.geoConicEqualAreaRaw=yr,m.geoConicEquidistant=function(){return gr(Ua).scale(131.154).center([0,13.9389])},m.geoConicEquidistantRaw=Ua,m.geoContains=function(ut,Dt){return(ut&&Bt.hasOwnProperty(ut.type)?Bt[ut.type]:mr)(ut,Dt)},m.geoDistance=Fr,m.geoEqualEarth=function(){return rr(ji).scale(177.158)},m.geoEqualEarthRaw=ji,m.geoEquirectangular=function(){return rr(Na).scale(152.63)},m.geoEquirectangularRaw=Na,m.geoGnomonic=function(){return rr($i).scale(144.049).clipAngle(60)},m.geoGnomonicRaw=$i,m.geoGraticule=Cr,m.geoGraticule10=function(){return Cr()()},m.geoIdentity=function(){var ut,Dt,ir,Ht,or,Sr,zr,Zr=1,cn=0,sn=0,gn=1,_n=1,un=0,wn=null,Dn=1,Hn=1,ia=Po({point:function(jn,ta){var Ta=Cn([jn,ta]);this.stream.point(Ta[0],Ta[1])}}),Jr=Wr;function ra(){return Dn=Zr*gn,Hn=Zr*_n,Sr=zr=null,Cn}function Cn(jn){var ta=jn[0]*Dn,Ta=jn[1]*Hn;if(un){var Ca=Ta*ut-ta*Dt;ta=ta*ut+Ta*Dt,Ta=Ca}return[ta+cn,Ta+sn]}return Cn.invert=function(jn){var ta=jn[0]-cn,Ta=jn[1]-sn;if(un){var Ca=Ta*ut+ta*Dt;ta=ta*ut-Ta*Dt,Ta=Ca}return[ta/Dn,Ta/Hn]},Cn.stream=function(jn){return Sr&&zr===jn?Sr:Sr=ia(Jr(zr=jn))},Cn.postclip=function(jn){return arguments.length?(Jr=jn,wn=ir=Ht=or=null,ra()):Jr},Cn.clipExtent=function(jn){return arguments.length?(Jr=jn==null?(wn=ir=Ht=or=null,Wr):on(wn=+jn[0][0],ir=+jn[0][1],Ht=+jn[1][0],or=+jn[1][1]),ra()):wn==null?null:[[wn,ir],[Ht,or]]},Cn.scale=function(jn){return arguments.length?(Zr=+jn,ra()):Zr},Cn.translate=function(jn){return arguments.length?(cn=+jn[0],sn=+jn[1],ra()):[cn,sn]},Cn.angle=function(jn){return arguments.length?(Dt=_(un=jn%360*u),ut=p(un),ra()):un*a},Cn.reflectX=function(jn){return arguments.length?(gn=jn?-1:1,ra()):gn<0},Cn.reflectY=function(jn){return arguments.length?(_n=jn?-1:1,ra()):_n<0},Cn.fitExtent=function(jn,ta){return He(Cn,jn,ta)},Cn.fitSize=function(jn,ta){return Ke(Cn,jn,ta)},Cn.fitWidth=function(jn,ta){return st(Cn,jn,ta)},Cn.fitHeight=function(jn,ta){return dt(Cn,jn,ta)},Cn},m.geoInterpolate=function(ut,Dt){var ir=ut[0]*u,Ht=ut[1]*u,or=Dt[0]*u,Sr=Dt[1]*u,zr=p(Ht),Zr=_(Ht),cn=p(Sr),sn=_(Sr),gn=zr*p(ir),_n=zr*_(ir),un=cn*p(or),wn=cn*_(or),Dn=2*I(k(P(Sr-Ht)+zr*cn*P(or-ir))),Hn=_(Dn),ia=Dn?function(Jr){var ra=_(Jr*=Dn)/Hn,Cn=_(Dn-Jr)/Hn,jn=Cn*gn+ra*un,ta=Cn*_n+ra*wn,Ta=Cn*Zr+ra*sn;return[h(ta,jn)*a,h(Ta,k(jn*jn+ta*ta))*a]}:function(){return[ir*a,Ht*a]};return ia.distance=Dn,ia},m.geoLength=Fn,m.geoMercator=function(){return ga(zn).scale(961/l)},m.geoMercatorRaw=zn,m.geoNaturalEarth1=function(){return rr(eo).scale(175.295)},m.geoNaturalEarth1Raw=eo,m.geoOrthographic=function(){return rr(to).scale(249.5).clipAngle(90+t)},m.geoOrthographicRaw=to,m.geoPath=function(ut,Dt){var ir,Ht,or=4.5;function Sr(zr){return zr&&(typeof or=="function"&&Ht.pointRadius(+or.apply(this,arguments)),Z(zr,ir(Ht))),Ht.result()}return Sr.area=function(zr){return Z(zr,ir(En)),En.result()},Sr.measure=function(zr){return Z(zr,ir(yo)),yo.result()},Sr.bounds=function(zr){return Z(zr,ir(mi)),mi.result()},Sr.centroid=function(zr){return Z(zr,ir(gi)),gi.result()},Sr.projection=function(zr){return arguments.length?(ir=zr==null?(ut=null,Wr):(ut=zr).stream,Sr):ut},Sr.context=function(zr){return arguments.length?(Ht=zr==null?(Dt=null,new qo):new Ms(Dt=zr),typeof or!="function"&&Ht.pointRadius(or),Sr):Dt},Sr.pointRadius=function(zr){return arguments.length?(or=typeof zr=="function"?zr:(Ht.pointRadius(+zr),+zr),Sr):or},Sr.projection(ut).context(Dt)},m.geoProjection=rr,m.geoProjectionMutator=cr,m.geoRotation=Ir,m.geoStereographic=function(){return rr(ro).scale(250).clipAngle(142)},m.geoStereographicRaw=ro,m.geoStream=Z,m.geoTransform=function(ut){return{stream:Po(ut)}},m.geoTransverseMercator=function(){var ut=ga(za),Dt=ut.center,ir=ut.rotate;return ut.center=function(Ht){return arguments.length?Dt([-Ht[1],Ht[0]]):[(Ht=Dt())[1],-Ht[0]]},ut.rotate=function(Ht){return arguments.length?ir([Ht[0],Ht[1],Ht.length>2?Ht[2]+90:90]):[(Ht=ir())[0],Ht[1],Ht[2]-90]},ir([0,0,90]).scale(159.155)},m.geoTransverseMercatorRaw=za,Object.defineProperty(m,"__esModule",{value:!0})})},{"d3-array":107}],115:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=m||self).d3=m.d3||{})})(this,function(m){function g(oe,pe){return oe.parent===pe.parent?1:2}function b(oe,pe){return oe+pe.x}function y(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,_e,we,Ee=new d(oe),fe=+oe.value&&(Ee.value=oe.value),ge=[Ee];for(pe==null&&(pe=t);ce=ge.pop();)if(fe&&(ce.value=+ce.data.value),(xe=pe(ce.data))&&(we=xe.length))for(ce.children=new Array(we),_e=we-1;_e>=0;--_e)ge.push(de=ce.children[_e]=new d(xe[_e])),de.parent=ce,de.depth=ce.depth+1;return Ee.eachBefore(r)}function t(oe){return oe.children}function i(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,_e=this,we=[_e];do for(pe=we.reverse(),we=[];_e=pe.pop();)if(oe(_e),ce=_e.children)for(de=0,xe=ce.length;de<xe;++de)we.push(ce[de]);while(we.length);return this},eachAfter:function(oe){for(var pe,ce,de,xe=this,_e=[xe],we=[];xe=_e.pop();)if(we.push(xe),pe=xe.children)for(ce=0,de=pe.length;ce<de;++ce)_e.push(pe[ce]);for(;xe=we.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(_e,we){if(_e===we)return _e;var Ee=_e.ancestors(),fe=we.ancestors(),ge=null;for(_e=Ee.pop(),we=fe.pop();_e===we;)ge=_e,_e=Ee.pop(),we=fe.pop();return ge}(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(i)}};var l=Array.prototype.slice;function a(oe){for(var pe,ce,de=0,xe=(oe=function(we){for(var Ee,fe,ge=we.length;ge;)fe=Math.random()*ge--|0,Ee=we[ge],we[ge]=we[fe],we[fe]=Ee;return we}(l.call(oe))).length,_e=[];de<xe;)pe=oe[de],ce&&o(ce,pe)?++de:(ce=p(_e=u(_e,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(s(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(s(oe[ce],oe[de]),pe)&&f(s(oe[ce],pe),oe[de])&&f(s(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 o(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(!o(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 s(oe[0],oe[1]);case 3:return x(oe[0],oe[1],oe[2])}var pe}function s(oe,pe){var ce=oe.x,de=oe.y,xe=oe.r,_e=pe.x,we=pe.y,Ee=pe.r,fe=_e-ce,ge=we-de,ke=Ee-xe,be=Math.sqrt(fe*fe+ge*ge);return{x:(ce+_e+fe/be*ke)/2,y:(de+we+ge/be*ke)/2,r:(be+xe+Ee)/2}}function x(oe,pe,ce){var de=oe.x,xe=oe.y,_e=oe.r,we=pe.x,Ee=pe.y,fe=pe.r,ge=ce.x,ke=ce.y,be=ce.r,Se=de-we,Oe=de-ge,De=xe-Ee,je=xe-ke,Je=fe-_e,ze=be-_e,Ue=de*de+xe*xe-_e*_e,Ge=Ue-we*we-Ee*Ee+fe*fe,Ye=Ue-ge*ge-ke*ke+be*be,et=Oe*De-Se*je,ct=(De*Ye-je*Ge)/(2*et)-de,mt=(je*Je-De*ze)/et,Ct=(Oe*Ge-Se*Ye)/(2*et)-xe,Tt=(Se*ze-Oe*Je)/et,nt=mt*mt+Tt*Tt-1,Qe=2*(_e+ct*mt+Ct*Tt),Et=ct*ct+Ct*Ct-_e*_e,Gt=-(nt?(Qe+Math.sqrt(Qe*Qe-4*nt*Et))/(2*nt):Et/Qe);return{x:de+ct+mt*Gt,y:xe+Ct+Tt*Gt,r:Gt}}function c(oe,pe,ce){var de,xe,_e,we,Ee=oe.x-pe.x,fe=oe.y-pe.y,ge=Ee*Ee+fe*fe;ge?(xe=pe.r+ce.r,xe*=xe,we=oe.r+ce.r,xe>(we*=we)?(de=(ge+we-xe)/(2*ge),_e=Math.sqrt(Math.max(0,we/ge-de*de)),ce.x=oe.x-de*Ee-_e*fe,ce.y=oe.y-de*fe+_e*Ee):(de=(ge+xe-we)/(2*ge),_e=Math.sqrt(Math.max(0,xe/ge-de*de)),ce.x=pe.x+de*Ee-_e*fe,ce.y=pe.y+de*fe+_e*Ee)):(ce.x=pe.x+ce.r,ce.y=pe.y)}function T(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,_e=(pe.y*ce.r+ce.y*pe.r)/de;return xe*xe+_e*_e}function w(oe){this._=oe,this.next=null,this.previous=null}function k(oe){if(!(xe=oe.length))return 0;var pe,ce,de,xe,_e,we,Ee,fe,ge,ke,be;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;c(ce,pe,de=oe[2]),pe=new w(pe),ce=new w(ce),de=new w(de),pe.next=de.previous=ce,ce.next=pe.previous=de,de.next=ce.previous=pe;e:for(Ee=3;Ee<xe;++Ee){c(pe._,ce._,de=oe[Ee]),de=new w(de),fe=ce.next,ge=pe.previous,ke=ce._.r,be=pe._.r;do if(ke<=be){if(T(fe._,de._)){ce=fe,pe.next=ce,ce.previous=pe,--Ee;continue e}ke+=fe._.r,fe=fe.next}else{if(T(ge._,de._)){(pe=ge).next=ce,ce.previous=pe,--Ee;continue e}be+=ge._.r,ge=ge.previous}while(fe!==ge.next);for(de.previous=pe,de.next=ce,pe.next=ce.previous=ce=de,_e=_(pe);(de=de.next)!==ce;)(we=_(de))<_e&&(pe=de,_e=we);ce=pe.next}for(pe=[ce._],de=ce;(de=de.next)!==ce;)pe.push(de._);for(de=a(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,_e,we=de.length,Ee=oe(ce)*pe||0;if(Ee)for(xe=0;xe<we;++xe)de[xe].r+=Ee;if(_e=k(de),Ee)for(xe=0;xe<we;++xe)de[xe].r-=Ee;ce.r=_e+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 _e,we=oe.children,Ee=-1,fe=we.length,ge=oe.value&&(de-pe)/oe.value;++Ee<fe;)(_e=we[Ee]).y0=ce,_e.y1=xe,_e.x0=pe,_e.x1=pe+=_e.value*ge}var Z={depth:-1},K={};function G(oe){return oe.id}function W(oe){return oe.parentId}function Q(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 ee(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 _e,we=oe.children,Ee=-1,fe=we.length,ge=oe.value&&(xe-ce)/oe.value;++Ee<fe;)(_e=we[Ee]).x0=pe,_e.x1=de,_e.y0=ce,_e.y1=ce+=_e.value*ge}j.prototype=Object.create(d.prototype);var J=(1+Math.sqrt(5))/2;function re(oe,pe,ce,de,xe,_e){for(var we,Ee,fe,ge,ke,be,Se,Oe,De,je,Je,ze=[],Ue=pe.children,Ge=0,Ye=0,et=Ue.length,ct=pe.value;Ge<et;){fe=xe-ce,ge=_e-de;do ke=Ue[Ye++].value;while(!ke&&Ye<et);for(be=Se=ke,Je=ke*ke*(je=Math.max(ge/fe,fe/ge)/(ct*oe)),De=Math.max(Se/Je,Je/be);Ye<et;++Ye){if(ke+=Ee=Ue[Ye].value,Ee<be&&(be=Ee),Ee>Se&&(Se=Ee),Je=ke*ke*je,(Oe=Math.max(Se/Je,Je/be))>De){ke-=Ee;break}De=Oe}ze.push(we={value:ke,dice:fe<ge,children:Ue.slice(Ge,Ye)}),we.dice?V(we,ce,de,xe,ct?de+=ge*ke/ct:_e):X(we,ce,de,ct?ce+=fe*ke/ct:xe,_e),ct-=ke,Ge=Ye}return ze}var ne=function oe(pe){function ce(de,xe,_e,we,Ee){re(pe,de,xe,_e,we,Ee)}return ce.ratio=function(de){return oe((de=+de)>1?de:1)},ce}(J),se=function oe(pe){function ce(de,xe,_e,we,Ee){if((fe=de._squarify)&&fe.ratio===pe)for(var fe,ge,ke,be,Se,Oe=-1,De=fe.length,je=de.value;++Oe<De;){for(ke=(ge=fe[Oe]).children,be=ge.value=0,Se=ke.length;be<Se;++be)ge.value+=ke[be].value;ge.dice?V(ge,xe,_e,we,_e+=(Ee-_e)*ge.value/je):X(ge,xe,_e,xe+=(we-xe)*ge.value/je,Ee),je-=ge.value}else de._squarify=fe=re(pe,de,xe,_e,we,Ee),fe.ratio=pe}return ce.ratio=function(de){return oe((de=+de)>1?de:1)},ce}(J);m.cluster=function(){var oe=g,pe=1,ce=1,de=!1;function xe(_e){var we,Ee=0;_e.eachAfter(function(Se){var Oe=Se.children;Oe?(Se.x=function(De){return De.reduce(b,0)/De.length}(Oe),Se.y=function(De){return 1+De.reduce(y,0)}(Oe)):(Se.x=we?Ee+=oe(Se,we):0,Se.y=0,we=Se)});var fe=function(Se){for(var Oe;Oe=Se.children;)Se=Oe[0];return Se}(_e),ge=function(Se){for(var Oe;Oe=Se.children;)Se=Oe[Oe.length-1];return Se}(_e),ke=fe.x-oe(fe,ge)/2,be=ge.x+oe(ge,fe)/2;return _e.eachAfter(de?function(Se){Se.x=(Se.x-_e.x)*pe,Se.y=(_e.y-Se.y)*ce}:function(Se){Se.x=(Se.x-ke)/(be-ke)*pe,Se.y=(1-(_e.y?Se.y/_e.y:1))*ce})}return xe.separation=function(_e){return arguments.length?(oe=_e,xe):oe},xe.size=function(_e){return arguments.length?(de=!1,pe=+_e[0],ce=+_e[1],xe):de?null:[pe,ce]},xe.nodeSize=function(_e){return arguments.length?(de=!0,pe=+_e[0],ce=+_e[1],xe):de?[pe,ce]:null},xe},m.hierarchy=n,m.pack=function(){var oe=null,pe=1,ce=1,de=I;function xe(_e){return _e.x=pe/2,_e.y=ce/2,oe?_e.eachBefore(E(oe)).eachAfter(D(de,.5)).eachBefore(F(1)):_e.eachBefore(E(S)).eachAfter(D(I,1)).eachAfter(D(de,_e.r/Math.min(pe,ce))).eachBefore(F(Math.min(pe,ce)/(2*_e.r))),_e}return xe.radius=function(_e){return arguments.length?(oe=L(_e),xe):oe},xe.size=function(_e){return arguments.length?(pe=+_e[0],ce=+_e[1],xe):[pe,ce]},xe.padding=function(_e){return arguments.length?(de=typeof _e=="function"?_e:P(+_e),xe):de},xe},m.packEnclose=a,m.packSiblings=function(oe){return k(oe),oe},m.partition=function(){var oe=1,pe=1,ce=0,de=!1;function xe(_e){var we=_e.height+1;return _e.x0=_e.y0=ce,_e.x1=oe,_e.y1=pe/we,_e.eachBefore(function(Ee,fe){return function(ge){ge.children&&V(ge,ge.x0,Ee*(ge.depth+1)/fe,ge.x1,Ee*(ge.depth+2)/fe);var ke=ge.x0,be=ge.y0,Se=ge.x1-ce,Oe=ge.y1-ce;Se<ke&&(ke=Se=(ke+Se)/2),Oe<be&&(be=Oe=(be+Oe)/2),ge.x0=ke,ge.y0=be,ge.x1=Se,ge.y1=Oe}}(pe,we)),de&&_e.eachBefore(H),_e}return xe.round=function(_e){return arguments.length?(de=!!_e,xe):de},xe.size=function(_e){return arguments.length?(oe=+_e[0],pe=+_e[1],xe):[oe,pe]},xe.padding=function(_e){return arguments.length?(ce=+_e,xe):ce},xe},m.stratify=function(){var oe=G,pe=W;function ce(de){var xe,_e,we,Ee,fe,ge,ke,be=de.length,Se=new Array(be),Oe={};for(_e=0;_e<be;++_e)xe=de[_e],fe=Se[_e]=new d(xe),(ge=oe(xe,_e,de))!=null&&(ge+="")&&(Oe[ke="$"+(fe.id=ge)]=ke in Oe?K:fe);for(_e=0;_e<be;++_e)if(fe=Se[_e],(ge=pe(de[_e],_e,de))!=null&&(ge+="")){if(!(Ee=Oe["$"+ge]))throw new Error("missing: "+ge);if(Ee===K)throw new Error("ambiguous: "+ge);Ee.children?Ee.children.push(fe):Ee.children=[fe],fe.parent=Ee}else{if(we)throw new Error("multiple roots");we=fe}if(!we)throw new Error("no root");if(we.parent=Z,we.eachBefore(function(De){De.depth=De.parent.depth+1,--be}).eachBefore(r),we.parent=null,be>0)throw new Error("cycle");return we}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},m.tree=function(){var oe=Q,pe=1,ce=1,de=null;function xe(fe){var ge=function(ze){for(var Ue,Ge,Ye,et,ct,mt=new j(ze,0),Ct=[mt];Ue=Ct.pop();)if(Ye=Ue._.children)for(Ue.children=new Array(ct=Ye.length),et=ct-1;et>=0;--et)Ct.push(Ge=Ue.children[et]=new j(Ye[et],et)),Ge.parent=Ue;return(mt.parent=new j(null,0)).children=[mt],mt}(fe);if(ge.eachAfter(_e),ge.parent.m=-ge.z,ge.eachBefore(we),de)fe.eachBefore(Ee);else{var ke=fe,be=fe,Se=fe;fe.eachBefore(function(ze){ze.x<ke.x&&(ke=ze),ze.x>be.x&&(be=ze),ze.depth>Se.depth&&(Se=ze)});var Oe=ke===be?1:oe(ke,be)/2,De=Oe-ke.x,je=pe/(be.x+Oe+De),Je=ce/(Se.depth||1);fe.eachBefore(function(ze){ze.x=(ze.x+De)*je,ze.y=ze.depth*Je})}return fe}function _e(fe){var ge=fe.children,ke=fe.parent.children,be=fe.i?ke[fe.i-1]:null;if(ge){(function(Oe){for(var De,je=0,Je=0,ze=Oe.children,Ue=ze.length;--Ue>=0;)(De=ze[Ue]).z+=je,De.m+=je,je+=De.s+(Je+=De.c)})(fe);var Se=(ge[0].z+ge[ge.length-1].z)/2;be?(fe.z=be.z+oe(fe._,be._),fe.m=fe.z-Se):fe.z=Se}else be&&(fe.z=be.z+oe(fe._,be._));fe.parent.A=function(Oe,De,je){if(De){for(var Je,ze=Oe,Ue=Oe,Ge=De,Ye=ze.parent.children[0],et=ze.m,ct=Ue.m,mt=Ge.m,Ct=Ye.m;Ge=N(Ge),ze=R(ze),Ge&&ze;)Ye=R(Ye),(Ue=N(Ue)).a=Oe,(Je=Ge.z+mt-ze.z-et+oe(Ge._,ze._))>0&&(U(ee(Ge,Oe,je),Oe,Je),et+=Je,ct+=Je),mt+=Ge.m,et+=ze.m,Ct+=Ye.m,ct+=Ue.m;Ge&&!N(Ue)&&(Ue.t=Ge,Ue.m+=mt-ct),ze&&!R(Ye)&&(Ye.t=ze,Ye.m+=et-Ct,je=Oe)}return je}(fe,be,fe.parent.A||ke[0])}function we(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},m.treemap=function(){var oe=ne,pe=!1,ce=1,de=1,xe=[0],_e=I,we=I,Ee=I,fe=I,ge=I;function ke(Se){return Se.x0=Se.y0=0,Se.x1=ce,Se.y1=de,Se.eachBefore(be),xe=[0],pe&&Se.eachBefore(H),Se}function be(Se){var Oe=xe[Se.depth],De=Se.x0+Oe,je=Se.y0+Oe,Je=Se.x1-Oe,ze=Se.y1-Oe;Je<De&&(De=Je=(De+Je)/2),ze<je&&(je=ze=(je+ze)/2),Se.x0=De,Se.y0=je,Se.x1=Je,Se.y1=ze,Se.children&&(Oe=xe[Se.depth+1]=_e(Se)/2,De+=ge(Se)-Oe,je+=we(Se)-Oe,(Je-=Ee(Se)-Oe)<De&&(De=Je=(De+Je)/2),(ze-=fe(Se)-Oe)<je&&(je=ze=(je+ze)/2),oe(Se,De,je,Je,ze))}return ke.round=function(Se){return arguments.length?(pe=!!Se,ke):pe},ke.size=function(Se){return arguments.length?(ce=+Se[0],de=+Se[1],ke):[ce,de]},ke.tile=function(Se){return arguments.length?(oe=A(Se),ke):oe},ke.padding=function(Se){return arguments.length?ke.paddingInner(Se).paddingOuter(Se):ke.paddingInner()},ke.paddingInner=function(Se){return arguments.length?(_e=typeof Se=="function"?Se:P(+Se),ke):_e},ke.paddingOuter=function(Se){return arguments.length?ke.paddingTop(Se).paddingRight(Se).paddingBottom(Se).paddingLeft(Se):ke.paddingTop()},ke.paddingTop=function(Se){return arguments.length?(we=typeof Se=="function"?Se:P(+Se),ke):we},ke.paddingRight=function(Se){return arguments.length?(Ee=typeof Se=="function"?Se:P(+Se),ke):Ee},ke.paddingBottom=function(Se){return arguments.length?(fe=typeof Se=="function"?Se:P(+Se),ke):fe},ke.paddingLeft=function(Se){return arguments.length?(ge=typeof Se=="function"?Se:P(+Se),ke):ge},ke},m.treemapBinary=function(oe,pe,ce,de,xe){var _e,we,Ee=oe.children,fe=Ee.length,ge=new Array(fe+1);for(ge[0]=we=_e=0;_e<fe;++_e)ge[_e+1]=we+=Ee[_e].value;(function ke(be,Se,Oe,De,je,Je,ze){if(be>=Se-1){var Ue=Ee[be];return Ue.x0=De,Ue.y0=je,Ue.x1=Je,void(Ue.y1=ze)}for(var Ge=ge[be],Ye=Oe/2+Ge,et=be+1,ct=Se-1;et<ct;){var mt=et+ct>>>1;ge[mt]<Ye?et=mt+1:ct=mt}Ye-ge[et-1]<ge[et]-Ye&&be+1<et&&--et;var Ct=ge[et]-Ge,Tt=Oe-Ct;if(Je-De>ze-je){var nt=(De*Tt+Je*Ct)/Oe;ke(be,et,Ct,De,je,nt,ze),ke(et,Se,Tt,nt,je,Je,ze)}else{var Qe=(je*Tt+ze*Ct)/Oe;ke(be,et,Ct,De,je,Je,Qe),ke(et,Se,Tt,De,Qe,Je,ze)}})(0,fe,oe.value,pe,ce,de,xe)},m.treemapDice=V,m.treemapResquarify=se,m.treemapSlice=X,m.treemapSliceDice=function(oe,pe,ce,de,xe){(1&oe.depth?X:V)(oe,pe,ce,de,xe)}
vendor: 4,316 bytes, line 20
20,m.treemapSquarify=ne,Object.defineProperty(m,"__esModule",{value:!0})})},{}],116:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?g(te,v("d3-color")):g((m=m||self).d3=m.d3||{},m.d3)})(this,function(m,g){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 y(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 i(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 l=function J(re){var ne=r(re);function se(oe,pe){var ce=ne((oe=g.rgb(oe)).r,(pe=g.rgb(pe)).r),de=ne(oe.g,pe.g),xe=ne(oe.b,pe.b),_e=d(oe.opacity,pe.opacity);return function(we){return oe.r=ce(we),oe.g=de(we),oe.b=xe(we),oe.opacity=_e(we),oe+""}}return se.gamma=J,se}(1);function a(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=g.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=a(y),f=a(e);function o(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 s(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 c(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 T=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(T.source,"g");function w(J,re){var ne,se,oe,pe=T.lastIndex=_.lastIndex=0,ce=-1,de=[],xe=[];for(J+="",re+="";(ne=T.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(_e){return function(we){return _e(we)+""}}(xe[0].x):function(_e){return function(){return _e}}(re):(re=xe.length,function(_e){for(var we,Ee=0;Ee<re;++Ee)de[(we=xe[Ee]).i]=we.x(_e);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=g.color(re))?(re=ne,l):w:re instanceof g.color?l:re instanceof Date?s:h(re)?o:Array.isArray(re)?p:typeof re.valueOf!="function"&&typeof re.toString!="function"||isNaN(re)?c: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(_e,we,Ee,fe,ge,ke){if(_e!==Ee||we!==fe){var be=ge.push("translate(",null,re,null,ne);
20ke.push({i:be-4,x:x(_e,Ee)},{i:be-2,x:x(we,fe)})}else(Ee||fe)&&ge.push("translate("+Ee+re+fe+ne)}(pe.translateX,pe.translateY,ce.translateX,ce.translateY,de,xe),function(_e,we,Ee,fe){_e!==we?(_e-we>180?we+=360:we-_e>180&&(_e+=360),fe.push({i:Ee.push(oe(Ee)+"rotate(",null,se)-2,x:x(_e,we)})):we&&Ee.push(oe(Ee)+"rotate("+we+se)}(pe.rotate,ce.rotate,de,xe),function(_e,we,Ee,fe){_e!==we?fe.push({i:Ee.push(oe(Ee)+"skewX(",null,se)-2,x:x(_e,we)}):we&&Ee.push(oe(Ee)+"skewX("+we+se)}(pe.skewX,ce.skewX,de,xe),function(_e,we,Ee,fe,ge,ke){if(_e!==Ee||we!==fe){var be=ge.push(oe(ge)+"scale(",null,",",null,")");ke.push({i:be-4,x:x(_e,Ee)},{i:be-2,x:x(we,fe)})}else Ee===1&&fe===1||ge.push(oe(ge)+"scale("+Ee+","+fe+")")}(pe.scaleX,pe.scaleY,ce.scaleX,ce.scaleY,de,xe),pe=ce=null,function(_e){for(var we,Ee=-1,fe=xe.length;++Ee<fe;)de[(we=xe[Ee]).i]=we.x(_e);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]
20))},"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 G(J){return function(re,ne){var se=J((re=g.hsl(re)).h,(ne=g.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=G(i),Q=G(d);function R(J){return function(re,ne){var se=J((re=g.hcl(re)).h,(ne=g.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(i),U=R(d);function ee(J){return function re(ne){function se(oe,pe){var ce=J((oe=g.cubehelix(oe)).h,(pe=g.cubehelix(pe)).h),de=d(oe.s,pe.s),xe=d(oe.l,pe.l),_e=d(oe.opacity,pe.opacity);return function(we){return oe.h=ce(we),oe.s=de(we),oe.l=xe(Math.pow(we,ne)),oe.opacity=_e(we),oe+""}}return ne=+ne,se.gamma=re,se}(1)}var j=ee(i),X=ee(d);m.interpolate=k,m.interpolateArray=function(J,re){return(h(re)?o:p)(J,re)},m.interpolateBasis=y,m.interpolateBasisClosed=e,m.interpolateCubehelix=j,m.interpolateCubehelixLong=X,m.interpolateDate=s,m.interpolateDiscrete=function(J){var re=J.length;return function(ne){return J[Math.max(0,Math.min(re-1,Math.floor(ne*re)))]}},m.interpolateHcl=N,m.interpolateHclLong=U,m.interpolateHsl=W,m.interpolateHslLong=Q,m.interpolateHue=function(J,re){var ne=i(+J,+re);return function(se){var oe=ne(se);return oe-360*Math.floor(oe/360)}},m.interpolateLab=function(J,re){var ne=d((J=g.lab(J)).l,(re=g.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+""}},m.interpolateNumber=x,m.interpolateNumberArray=o,m.interpolateObject=c,m.interpolateRgb=l,m.interpolateRgbBasis=u,m.interpolateRgbBasisClosed=f,m.interpolateRound=function(J,re){return J=+J,re=+re,function(ne){return Math.round(J*(1-ne)+re*ne)}},m.interpolateString=w,m.interpolateTransformCss=H,m.interpolateTransformSvg=V,m.interpolateZoom=function(J,re){var ne,se,oe=J[0],pe=J[1],ce=J[2],de=re[0],xe=re[1],_e=re[2],we=de-oe,Ee=xe-pe,fe=we*we+Ee*Ee;if(fe<1e-12)se=Math.log(_e/ce)/Z,ne=function(De){return[oe+De*we,pe+De*Ee,ce*Math.exp(Z*De*se)]};else{var ge=Math.sqrt(fe),ke=(_e*_e-ce*ce+4*fe)/(2*ce*2*ge),be=(_e*_e-ce*ce-4*fe)/(2*_e*2*ge),Se=Math.log(Math.sqrt(ke*ke+1)-ke),Oe=Math.log(Math.sqrt(be*be+1)-be);se=(Oe-Se)/Z,ne=function(De){var je,Je=De*se,ze=K(Se),Ue=ce/(2*ge)*(ze*(je=Z*Je+Se,((je=Math.exp(2*je))-1)/(je+1))-function(Ge){return((Ge=Math.exp(Ge))-1/Ge)/2}(Se));return[oe+Ue*we,pe+Ue*Ee,ce*ze/K(Z*Je+Se)]}}return ne.duration=1e3*se,ne},m.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)}},m.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(m,"__esModule",{value:!0})})},{"d3-color":109}],117:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=m||self).d3=m.d3||{})})(this,function(m){var g=Math.PI,b=2*g,y=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,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,r,d){this._+="Q"+ +t+","+ +i+","+(this._x1=+r)+","+(this._y1=+d)},bezierCurveTo:function(t,i,r,d,l,a){this._+="C"+ +t+","+ +i+","+ +r+","+ +d+","+(this._x1=+l)+","+(this._y1=+a)},arcTo:function(t,i,r,d,l){t=+t,i=+i,r=+r,d=+d,l=+l;var a=this._x1,u=this._y1,f=r-t,o=d-i,h=a-t,p=u-i,s=h*h+p*p;if(l<0)throw new Error("negative radius: "+l);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(s>1e-6)if(Math.abs(p*f-o*h)>1e-6&&l){var x=r-a,c=d-u,T=f*f+o*o,_=x*x+c*c,w=Math.sqrt(T),k=Math.sqrt(s),L=l*Math.tan((g-Math.acos((T+s-_)/(2*w*k)))
20/2),A=L/k,I=L/w;Math.abs(A-1)>1e-6&&(this._+="L"+(t+A*h)+","+(i+A*p)),this._+="A"+l+","+l+",0,0,"+ +(p*x>h*c)+","+(this._x1=t+I*f)+","+(this._y1=i+I*o)}else this._+="L"+(this._x1=t)+","+(this._y1=i)},arc:function(t,i,r,d,l,a){t=+t,i=+i,a=!!a;var u=(r=+r)*Math.cos(d),f=r*Math.sin(d),o=t+u,h=i+f,p=1^a,s=a?d-l:l-d;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+o+","+h:(Math.abs(this._x1-o)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+o+","+h),r&&(s<0&&(s=s%b+b),s>y?this._+="A"+r+","+r+",0,1,"+p+","+(t-u)+","+(i-f)+"A"+r+","+r+",0,1,"+p+","+(this._x1=o)+","+(this._y1=h):s>1e-6&&(this._+="A"+r+","+r+",0,"+ +(s>=g)+","+p+","+(this._x1=t+r*Math.cos(l))+","+(this._y1=i+r*Math.sin(l))))},rect:function(t,i,r,d){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +r+"v"+ +d+"h"+-r+"Z"},toString:function(){return this._}},m.path=n,Object.defineProperty(m,"__esModule",{value:!0})})},{}],118:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=m||self).d3=m.d3||{})})(this,function(m){function g(d,l,a,u){if(isNaN(l)||isNaN(a))return d;var f,o,h,p,s,x,c,T,_,w=d._root,k={data:u},L=d._x0,A=d._y0,I=d._x1,P=d._y1;if(!w)return d._root=k,d;for(;w.length;)if((x=l>=(o=(L+I)/2))?L=o:I=o,(c=a>=(h=(A+P)/2))?A=h:P=h,f=w,!(w=w[T=c<<1|x]))return f[T]=k,d;if(p=+d._x.call(null,w.data),s=+d._y.call(null,w.data),l===p&&a===s)return k.next=w,f?f[T]=k:d._root=k,d;do f=f?f[T]=new Array(4):d._root=new Array(4),(x=l>=(o=(L+I)/2))?L=o:I=o,(c=a>=(h=(A+P)/2))?A=h:P=h;while((T=c<<1|x)==(_=(s>=h)<<1|p>=o));return f[_]=w,f[T]=k,d}function b(d,l,a,u,f){this.node=d,this.x0=l,this.y0=a,this.x1=u,this.y1=f}function y(d){return d[0]}function e(d){return d[1]}function n(d,l,a){var u=new t(l??y,a??e,NaN,NaN,NaN,NaN);return d==null?u:u.addAll(d)}function t(d,l,a,u,f,o){this._x=d,this._y=l,this._x0=a,this._y0=u,this._x1=f,this._y1=o,this._root=void 0}function i(d){for(var l={data:d.data},a=l;d=d.next;)a=a.next={data:d.data};return l}var r=n.prototype=t.prototype;r.copy=function(){var d,l,a=new t(this._x,this._y,this._x0,this._y0,this._x1,this._y1),u=this._root;if(!u)return a;
vendor: 1,525 bytes, line 20
20if(!u.length)return a._root=i(u),a;for(d=[{source:u,target:a._root=new Array(4)}];u=d.pop();)for(var f=0;f<4;++f)(l=u.source[f])&&(l.length?d.push({source:l,target:u.target[f]=new Array(4)}):u.target[f]=i(l));return a},r.add=function(d){var l=+this._x.call(null,d),a=+this._y.call(null,d);return g(this.cover(l,a),l,a,d)},r.addAll=function(d){var l,a,u,f,o=d.length,h=new Array(o),p=new Array(o),s=1/0,x=1/0,c=-1/0,T=-1/0;for(a=0;a<o;++a)isNaN(u=+this._x.call(null,l=d[a]))||isNaN(f=+this._y.call(null,l))||(h[a]=u,p[a]=f,u<s&&(s=u),u>c&&(c=u),f<x&&(x=f),f>T&&(T=f));if(s>c||x>T)return this;for(this.cover(s,x).cover(c,T),a=0;a<o;++a)g(this,h[a],p[a],d[a]);return this},r.cover=function(d,l){if(isNaN(d=+d)||isNaN(l=+l))return this;var a=this._x0,u=this._y0,f=this._x1,o=this._y1;if(isNaN(a))f=(a=Math.floor(d))+1,o=(u=Math.floor(l))+1;else{for(var h,p,s=f-a,x=this._root;a>d||d>=f||u>l||l>=o;)switch(p=(l<u)<<1|d<a,(h=new Array(4))[p]=x,x=h,s*=2,p){case 0:f=a+s,o=u+s;break;case 1:a=f-s,o=u+s;break;case 2:f=a+s,u=o-s;break;case 3:a=f-s,u=o-s}this._root&&this._root.length&&(this._root=x)}return this._x0=a,this._y0=u,this._x1=f,this._y1=o,this},r.data=function(){var d=[];return this.visit(function(l){if(!l.length)do d.push(l.data);while(l=l.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,l,a){var u,f,o,h,p,s,x,c=this._x0,T=this._y0,_=this._x1,w=this._y1,k=[],L=this._root;
vendor: 4,276 bytes, line 20
20for(L&&k.push(new b(L,c,T,_,w)),a==null?a=1/0:(c=d-a,T=l-a,_=d+a,w=l+a,a*=a);s=k.pop();)if(!(!(L=s.node)||(f=s.x0)>_||(o=s.y0)>w||(h=s.x1)<c||(p=s.y1)<T))if(L.length){var A=(f+h)/2,I=(o+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,o,h,I),new b(L[0],f,o,A,I)),(x=(l>=I)<<1|d>=A)&&(s=k[k.length-1],k[k.length-1]=k[k.length-1-x],k[k.length-1-x]=s)}else{var P=d-+this._x.call(null,L.data),S=l-+this._y.call(null,L.data),E=P*P+S*S;if(E<a){var D=Math.sqrt(a=E);c=d-D,T=l-D,_=d+D,w=l+D,u=L.data}}return u},r.remove=function(d){if(isNaN(o=+this._x.call(null,d))||isNaN(h=+this._y.call(null,d)))return this;var l,a,u,f,o,h,p,s,x,c,T,_,w=this._root,k=this._x0,L=this._y0,A=this._x1,I=this._y1;if(!w)return this;if(w.length)for(;;){if((x=o>=(p=(k+A)/2))?k=p:A=p,(c=h>=(s=(L+I)/2))?L=s:I=s,l=w,!(w=w[T=c<<1|x]))return this;if(!w.length)break;(l[T+1&3]||l[T+2&3]||l[T+3&3])&&(a=l,_=T)}for(;w.data!==d;)if(u=w,!(w=w.next))return this;return(f=w.next)&&delete w.next,u?(f?u.next=f:delete u.next,this):l?(f?l[T]=f:delete l[T],(w=l[0]||l[1]||l[2]||l[3])&&w===(l[3]||l[2]||l[1]||l[0])&&!w.length&&(a?a[_]=w:this._root=w),this):(this._root=f,this)},r.removeAll=function(d){for(var l=0,a=d.length;l<a;++l)this.remove(d[l]);return this},r.root=function(){return this._root},r.size=function(){var d=0;return this.visit(function(l){if(!l.length)do++d;while(l=l.next)}),d},r.visit=function(d){var l,a,u,f,o,h,p=[],s=this._root;for(s&&p.push(new b(s,this._x0,this._y0,this._x1,this._y1));l=p.pop();)if(!d(s=l.node,u=l.x0,f=l.y0,o=l.x1,h=l.y1)&&s.length){var x=(u+o)/2,c=(f+h)/2;(a=s[3])&&p.push(new b(a,x,c,o,h)),(a=s[2])&&p.push(new b(a,u,c,x,h)),(a=s[1])&&p.push(new b(a,x,f,o,c)),(a=s[0])&&p.push(new b(a,u,f,x,c))}return this},r.visitAfter=function(d){var l,a=[],u=[];for(this._root&&a.push(new b(this._root,this._x0,this._y0,this._x1,this._y1));l=a.pop();){var f=l.node;if(f.length){var o,h=l.x0,p=l.y0,s=l.x1,x=l.y1,c=(h+s)/2,T=(p+x)/2;(o=f[0])&&a.push(new b(o,h,p,c,T)),(o=f[1])&&a.push(new b(o,c,p,s,T)),(o=f[2])&&a.push(new b(o,h,T,c,x)),(o=f[3])&&a.push(new b(o,c,T,s,x))}u.push(l)}for(;l=u.pop();)d(l.node,l.x0,l.y0,l.x1,l.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},m.quadtree=n,Object.defineProperty(m,"__esModule",{value:!0})})},{}],119:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?g(te,v("d3-path")):g((m=m||self).d3=m.d3||{},m.d3)})(this,function(m,g){function b(Le){return function(){return Le}}var y=Math.abs,e=Math.atan2,n=Math.cos,t=Math.max,i=Math.min,r=Math.sin,d=Math.sqrt,l=Math.PI,a=l/2,u=2*l;function f(Le){return Le>1?0:Le<-1?l:Math.acos(Le)}function o(Le){return Le>=1?a:Le<=-1?-a:Math.asin(Le)}function h(Le){return Le.innerRadius}function p(Le){return Le.outerRadius}function s(Le){return Le.startAngle}function x(Le){return Le.endAngle}function c(Le){return Le&&Le.padAngle}function T(Le,Xe,it,At,It,Zt,Jt,Vt){var pr=it-Le,Ir=At-Xe,fr=Jt-It,$t=Vt-Zt,er=$t*pr-fr*Ir;if(!(er*er<1e-12))return[Le+(er=(fr*(Xe-Zt)-$t*(Le-It))/er)*pr,Xe+er*Ir]}function _(Le,Xe,it,At,It,Zt,Jt){var Vt=Le-it,pr=Xe-At,Ir=(Jt?Zt:-Zt)/d(Vt*Vt+pr*pr),fr=Ir*pr,$t=-Ir*Vt,er=Le+fr,ar=Xe+$t,hr=it+fr,vr=At+$t,Pr=(er+hr)/2,Ur=(ar+vr)/2,qr=hr-er,rn=vr-ar,An=qr*qr+rn*rn,mn=It-Zt,Mn=er*vr-hr*ar,Xr=(rn<0?-1:1)*d(t(0,mn*mn*An-Mn*Mn)),Er=(Mn*rn-qr*Xr)/An,on=(-Mn*qr-rn*Xr)/An,Un=(Mn*rn+qr*Xr)/An,Tr=(-Mn*qr+rn*Xr)/An,en=Er-Pr,$r=on-Ur,Rr=Un-Pr,Pn=Tr-Ur;return en*en+$r*$r>Rr*Rr+Pn*Pn&&(Er=Un,on=Tr),{cx:Er,cy:on,x01:-fr,y01:-$t,x11:Er*(It/mn-1),y11:on*(It/mn-1)}}function w(Le){this._context=Le}function k(Le){return new w(Le)}function L(Le){return Le[0]}function A(Le){return Le[1]}function I(){var Le=L,Xe=A,it=b(!0),At=null,It=k,Zt=null;function Jt(Vt){var pr,Ir,fr,$t=Vt.length,er=!1;for(At==null&&(Zt=It(fr=g.path())),pr=0;pr<=$t;++pr)!(pr<$t&&it(Ir=Vt[pr],pr,Vt))===er&&((er=!er)?Zt.lineStart():Zt.lineEnd()),er&&Zt.point(+Le(Ir,pr,Vt),+Xe(Ir,pr,Vt));if(fr)return Zt=null,fr+""||null}return Jt.x=function(Vt){return arguments.length?(Le=typeof Vt=="function"?Vt:b(+Vt),Jt):Le},Jt.y=function(Vt){return arguments.length?(Xe=typeof Vt=="function"?Vt:b(+Vt),Jt):Xe},Jt.defined=function(Vt){return arguments.length?(it=typeof Vt=="function"?Vt:b(!!Vt),Jt):it}
vendor: 26,189 bytes, line 20
20,Jt.curve=function(Vt){return arguments.length?(It=Vt,At!=null&&(Zt=It(At)),Jt):It},Jt.context=function(Vt){return arguments.length?(Vt==null?At=Zt=null:Zt=It(At=Vt),Jt):At},Jt}function P(){var Le=L,Xe=null,it=b(0),At=A,It=b(!0),Zt=null,Jt=k,Vt=null;function pr(fr){var $t,er,ar,hr,vr,Pr=fr.length,Ur=!1,qr=new Array(Pr),rn=new Array(Pr);for(Zt==null&&(Vt=Jt(vr=g.path())),$t=0;$t<=Pr;++$t){if(!($t<Pr&&It(hr=fr[$t],$t,fr))===Ur)if(Ur=!Ur)er=$t,Vt.areaStart(),Vt.lineStart();else{for(Vt.lineEnd(),Vt.lineStart(),ar=$t-1;ar>=er;--ar)Vt.point(qr[ar],rn[ar]);Vt.lineEnd(),Vt.areaEnd()}Ur&&(qr[$t]=+Le(hr,$t,fr),rn[$t]=+it(hr,$t,fr),Vt.point(Xe?+Xe(hr,$t,fr):qr[$t],At?+At(hr,$t,fr):rn[$t]))}if(vr)return Vt=null,vr+""||null}function Ir(){return I().defined(It).curve(Jt).context(Zt)}return pr.x=function(fr){return arguments.length?(Le=typeof fr=="function"?fr:b(+fr),Xe=null,pr):Le},pr.x0=function(fr){return arguments.length?(Le=typeof fr=="function"?fr:b(+fr),pr):Le},pr.x1=function(fr){return arguments.length?(Xe=fr==null?null:typeof fr=="function"?fr:b(+fr),pr):Xe},pr.y=function(fr){return arguments.length?(it=typeof fr=="function"?fr:b(+fr),At=null,pr):it},pr.y0=function(fr){return arguments.length?(it=typeof fr=="function"?fr:b(+fr),pr):it},pr.y1=function(fr){return arguments.length?(At=fr==null?null:typeof fr=="function"?fr:b(+fr),pr):At},pr.lineX0=pr.lineY0=function(){return Ir().x(Le).y(it)},pr.lineY1=function(){return Ir().x(Le).y(At)},pr.lineX1=function(){return Ir().x(Xe).y(it)},pr.defined=function(fr){return arguments.length?(It=typeof fr=="function"?fr:b(!!fr),pr):It},pr.curve=function(fr){return arguments.length?(Jt=fr,Zt!=null&&(Vt=Jt(Zt)),pr):Jt},pr.context=function(fr){return arguments.length?(fr==null?Zt=Vt=null:Vt=Jt(Zt=fr),pr):Zt},pr}function S(Le,Xe){return Xe<Le?-1:Xe>Le?1:Xe>=Le?0:NaN}function E(Le){return Le}w.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(Le,Xe){switch(Le=+Le,Xe=+Xe,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Xe):this._context.moveTo(Le,Xe);break;case 1:this._point=2;default:this._context.lineTo(Le,Xe)}}};var D=H(k);function F(Le){this._curve=Le}function H(Le){function Xe(it){return new F(Le(it))}return Xe._curve=Le,Xe}function V(Le){var Xe=Le.curve;return Le.angle=Le.x,delete Le.x,Le.radius=Le.y,delete Le.y,Le.curve=function(it){return arguments.length?Xe(H(it)):Xe()._curve},Le}function Z(){return V(I().curve(D))}function K(){var Le=P().curve(D),Xe=Le.curve,it=Le.lineX0,At=Le.lineX1,It=Le.lineY0,Zt=Le.lineY1;return Le.angle=Le.x,delete Le.x,Le.startAngle=Le.x0,delete Le.x0,Le.endAngle=Le.x1,delete Le.x1,Le.radius=Le.y,delete Le.y,Le.innerRadius=Le.y0,delete Le.y0,Le.outerRadius=Le.y1,delete Le.y1,Le.lineStartAngle=function(){return V(it())},delete Le.lineX0,Le.lineEndAngle=function(){return V(At())},delete Le.lineX1,Le.lineInnerRadius=function(){return V(It())},delete Le.lineY0,Le.lineOuterRadius=function(){return V(Zt())},delete Le.lineY1,Le.curve=function(Jt){return arguments.length?Xe(H(Jt)):Xe()._curve},Le}function G(Le,Xe){return[(Xe=+Xe)*Math.cos(Le-=Math.PI/2),Xe*Math.sin(Le)]}F.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Le,Xe){this._curve.point(Xe*Math.sin(Le),Xe*-Math.cos(Le))}};var W=Array.prototype.slice;function Q(Le){return Le.source}function R(Le){return Le.target}function N(Le){var Xe=Q,it=R,At=L,It=A,Zt=null;function Jt(){var Vt,pr=W.call(arguments),Ir=Xe.apply(this,pr),fr=it.apply(this,pr);if(Zt||(Zt=Vt=g.path()),Le(Zt,+At.apply(this,(pr[0]=Ir,pr)),+It.apply(this,pr),+At.apply(this,(pr[0]=fr,pr)),+It.apply(this,pr)),Vt)return Zt=null,Vt+""||null}return Jt.source=function(Vt){return arguments.length?(Xe=Vt,Jt):Xe},Jt.target=function(Vt){return arguments.length?(it=Vt,Jt):it},Jt.x=function(Vt){return arguments.length?(At=typeof Vt=="function"?Vt:b(+Vt),Jt):At},Jt.y=function(Vt){return arguments.length?(It=typeof Vt=="function"?Vt:b(+Vt),Jt):It},Jt.context=function(Vt){return arguments.length?(Zt=Vt??null,Jt):Zt},Jt}function U(Le,Xe,it,At,It){Le.moveTo(Xe,it),Le.bezierCurveTo(Xe=(Xe+At)/2,it,Xe,It,At,It)}function ee(Le,Xe,it,At,It){Le.moveTo(Xe,it),Le.bezierCurveTo(Xe,it=(it+It)/2,At,it,At,It)}function j(Le,Xe,it,At,It){var Zt=G(Xe,it),Jt=G(Xe,it=(it+It)/2),Vt=G(At,it),pr=G(At,It);Le.moveTo(Zt[0],Zt[1]),Le.bezierCurveTo(Jt[0],Jt[1],Vt[0],Vt[1],pr[0],pr[1])}var X={draw:function(Le,Xe){var it=Math.sqrt(Xe/l);Le.moveTo(it,0),Le.arc(0,0,it,0,u)}},J={draw:function(Le,Xe){var it=Math.sqrt(Xe/5)/2;Le.moveTo(-3*it,-it),Le.lineTo(-it,-it),Le.lineTo(-it,-3*it),Le.lineTo(it,-3*it),Le.lineTo(it,-it),Le.lineTo(3*it,-it),Le.lineTo(3*it,it),Le.lineTo(it,it),Le.lineTo(it,3*it),Le.lineTo(-it,3*it),Le.lineTo(-it,it),Le.lineTo(-3*it,it),Le.closePath()}},re=Math.sqrt(1/3),ne=2*re,se={draw:function(Le,Xe){var it=Math.sqrt(Xe/ne),At=it*re;Le.moveTo(0,-it),Le.lineTo(At,0),Le.lineTo(0,it),Le.lineTo(-At,0),Le.closePath()}},oe=Math.sin(l/10)/Math.sin(7*l/10),pe=Math.sin(u/10)*oe,ce=-Math.cos(u/10)*oe,de={draw:function(Le,Xe){var it=Math.sqrt(.8908130915292852*Xe),At=pe*it,It=ce*it;Le.moveTo(0,-it),Le.lineTo(At,It);for(var Zt=1;Zt<5;++Zt){var Jt=u*Zt/5,Vt=Math.cos(Jt),pr=Math.sin(Jt);Le.lineTo(pr*it,-Vt*it),Le.lineTo(Vt*At-pr*It,pr*At+Vt*It)}Le.closePath()}},xe={draw:function(Le,Xe){var it=Math.sqrt(Xe),At=-it/2;Le.rect(At,At,it,it)}},_e=Math.sqrt(3),we={draw:function(Le,Xe){var it=-Math.sqrt(Xe/(3*_e));Le.moveTo(0,2*it),Le.lineTo(-_e*it,-it),Le.lineTo(_e*it,-it),Le.closePath()}},Ee=-.5,fe=Math.sqrt(3)/2,ge=1/Math.sqrt(12),ke=3*(ge/2+1),be={draw:function(Le,Xe){var it=Math.sqrt(Xe/ke),At=it/2,It=it*ge,Zt=At,Jt=it*ge+it,Vt=-Zt,pr=Jt;Le.moveTo(At,It),Le.lineTo(Zt,Jt),Le.lineTo(Vt,pr),Le.lineTo(Ee*At-fe*It,fe*At+Ee*It),Le.lineTo(Ee*Zt-fe*Jt,fe*Zt+Ee*Jt),Le.lineTo(Ee*Vt-fe*pr,fe*Vt+Ee*pr),Le.lineTo(Ee*At+fe*It,Ee*It-fe*At),Le.lineTo(Ee*Zt+fe*Jt,Ee*Jt-fe*Zt),Le.lineTo(Ee*Vt+fe*pr,Ee*pr-fe*Vt),Le.closePath()}},Se=[X,J,se,xe,de,we,be];function Oe(){}function De(Le,Xe,it){Le._context.bezierCurveTo((2*Le._x0+Le._x1)/3,(2*Le._y0+Le._y1)/3,(Le._x0+2*Le._x1)/3,(Le._y0+2*Le._y1)/3,(Le._x0+4*Le._x1+Xe)/6,(Le._y0+4*Le._y1+it)/6)}function je(Le){this._context=Le}function Je(Le){this._context=Le}function ze(Le){this._context=Le}function Ue(Le,Xe){this._basis=new je(Le),this._beta=Xe}je.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(Le,Xe){switch(Le=+Le,Xe=+Xe,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Xe):this._context.moveTo(Le,Xe);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,Le,Xe)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Xe}},Je.prototype={areaStart:Oe,areaEnd:Oe,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(Le,Xe){switch(Le=+Le,Xe=+Xe,this._point){case 0:this._point=1,this._x2=Le,this._y2=Xe;break;case 1:this._point=2,this._x3=Le,this._y3=Xe;break;case 2:this._point=3,this._x4=Le,this._y4=Xe,this._context.moveTo((this._x0+4*this._x1+Le)/6,(this._y0+4*this._y1+Xe)/6);break;default:De(this,Le,Xe)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Xe}},ze.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(Le,Xe){switch(Le=+Le,Xe=+Xe,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var it=(this._x0+4*this._x1+Le)/6,At=(this._y0+4*this._y1+Xe)/6;this._line?this._context.lineTo(it,At):this._context.moveTo(it,At);break;case 3:this._point=4;default:De(this,Le,Xe)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Xe}},Ue.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Le=this._x,Xe=this._y,it=Le.length-1;if(it>0)for(var At,It=Le[0],Zt=Xe[0],Jt=Le[it]-It,Vt=Xe[it]-Zt,pr=-1;++pr<=it;)At=pr/it,this._basis.point(this._beta*Le[pr]+(1-this._beta)*(It+At*Jt),this._beta*Xe[pr]+(1-this._beta)*(Zt+At*Vt));this._x=this._y=null,this._basis.lineEnd()},point:function(Le,Xe){this._x.push(+Le),this._y.push(+Xe)}};var Ge=function Le(Xe){function it(At){return Xe===1?new je(At):new Ue(At,Xe)}return it.beta=function(At){return Le(+At)},it}(.85);function Ye(Le,Xe,it){Le._context.bezierCurveTo(Le._x1+Le._k*(Le._x2-Le._x0),Le._y1+Le._k*(Le._y2-Le._y0),Le._x2+Le._k*(Le._x1-Xe),Le._y2+Le._k*(Le._y1-it),Le._x2,Le._y2)}function et(Le,Xe){this._context=Le,this._k=(1-Xe)/6}et.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(Le,Xe){switch(Le=+Le,Xe=+Xe,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Xe):this._context.moveTo(Le,Xe);break;case 1:this._point=2,this._x1=Le,this._y1=Xe;break;case 2:this._point=3;default:Ye(this,Le,Xe)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Xe}};var ct=function Le(Xe){function it(At){return new et(At,Xe)}return it.tension=function(At){return Le(+At)},it}(0);function mt(Le,Xe){this._context=Le,this._k=(1-Xe)/6}mt.prototype={areaStart:Oe,areaEnd:Oe,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(Le,Xe){switch(Le=+Le,Xe=+Xe,this._point){case 0:this._point=1,this._x3=Le,this._y3=Xe;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=Xe);break;case 2:this._point=3,this._x5=Le,this._y5=Xe;break;default:Ye(this,Le,Xe)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Xe}};var Ct=function Le(Xe){function it(At){return new mt(At,Xe)}return it.tension=function(At){return Le(+At)},it}(0);function Tt(Le,Xe){this._context=Le,this._k=(1-Xe)/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(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Xe){switch(Le=+Le,Xe=+Xe,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,Le,Xe)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Xe}};var nt=function Le(Xe){function it(At){return new Tt(At,Xe)}return it.tension=function(At){return Le(+At)},it}(0);function Qe(Le,Xe,it){var At=Le._x1,It=Le._y1,Zt=Le._x2,Jt=Le._y2;if(Le._l01_a>1e-12){var Vt=2*Le._l01_2a+3*Le._l01_a*Le._l12_a+Le._l12_2a,pr=3*Le._l01_a*(Le._l01_a+Le._l12_a);At=(At*Vt-Le._x0*Le._l12_2a+Le._x2*Le._l01_2a)/pr,It=(It*Vt-Le._y0*Le._l12_2a+Le._y2*Le._l01_2a)/pr}if(Le._l23_a>1e-12){var Ir=2*Le._l23_2a+3*Le._l23_a*Le._l12_a+Le._l12_2a,fr=3*Le._l23_a*(Le._l23_a+Le._l12_a);Zt=(Zt*Ir+Le._x1*Le._l23_2a-Xe*Le._l12_2a)/fr,Jt=(Jt*Ir+Le._y1*Le._l23_2a-it*Le._l12_2a)/fr}Le._context.bezierCurveTo(At,It,Zt,Jt,Le._x2,Le._y2)}function Et(Le,Xe){this._context=Le,this._alpha=Xe}Et.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(Le,Xe){if(Le=+Le,Xe=+Xe,this._point){var it=this._x2-Le,At=this._y2-Xe;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(it*it+At*At,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Xe):this._context.moveTo(Le,Xe);break;case 1:this._point=2;break;case 2:this._point=3;default:Qe(this,Le,Xe)}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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Xe}};var Gt=function Le(Xe){function it(At){return Xe?new Et(At,Xe):new et(At,0)}return it.alpha=function(At){return Le(+At)},it}(.5);function Xt(Le,Xe){this._context=Le,this._alpha=Xe}Xt.prototype={areaStart:Oe,areaEnd:Oe,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(Le,Xe){if(Le=+Le,Xe=+Xe,this._point){var it=this._x2-Le,At=this._y2-Xe;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(it*it+At*At,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Le,this._y3=Xe;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=Xe);break;case 2:this._point=3,this._x5=Le,this._y5=Xe;break;default:Qe(this,Le,Xe)}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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Xe}};var Fe=function Le(Xe){function it(At){return Xe?new Xt(At,Xe):new mt(At,0)}return it.alpha=function(At){return Le(+At)},it}(.5);function qe(Le,Xe){this._context=Le,this._alpha=Xe}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(Le,Xe){if(Le=+Le,Xe=+Xe,this._point){var it=this._x2-Le,At=this._y2-Xe;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(it*it+At*At,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:Qe(this,Le,Xe)}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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Xe}};var wt=function Le(Xe){function it(At){return Xe?new qe(At,Xe):new Tt(At,0)}return it.alpha=function(At){return Le(+At)},it}(.5);function ft(Le){this._context=Le}function Ce(Le){return Le<0?-1:1}function Ie(Le,Xe,it){var At=Le._x1-Le._x0,It=Xe-Le._x1,Zt=(Le._y1-Le._y0)/(At||It<0&&-0),Jt=(it-Le._y1)/(It||At<0&&-0),Vt=(Zt*It+Jt*At)/(At+It);return(Ce(Zt)+Ce(Jt))*Math.min(Math.abs(Zt),Math.abs(Jt),.5*Math.abs(Vt))||0}function Te(Le,Xe){var it=Le._x1-Le._x0;return it?(3*(Le._y1-Le._y0)/it-Xe)/2:Xe}function Pe(Le,Xe,it){var At=Le._x0,It=Le._y0,Zt=Le._x1,Jt=Le._y1,Vt=(Zt-At)/3;Le._context.bezierCurveTo(At+Vt,It+Vt*Xe,Zt-Vt,Jt-Vt*it,Zt,Jt)}function Ve(Le){this._context=Le}function tt(Le){this._context=new ot(Le)}function ot(Le){this._context=Le}function at(Le){this._context=Le}function _t(Le){var Xe,it,At=Le.length-1,It=new Array(At),Zt=new Array(At),Jt=new Array(At);for(It[0]=0,Zt[0]=2,Jt[0]=Le[0]+2*Le[1],Xe=1;Xe<At-1;++Xe)It[Xe]=1,Zt[Xe]=4,Jt[Xe]=4*Le[Xe]+2*Le[Xe+1];for(It[At-1]=2,Zt[At-1]=7,Jt[At-1]=8*Le[At-1]+Le[At],Xe=1;Xe<At;++Xe)it=It[Xe]/Zt[Xe-1],Zt[Xe]-=it,Jt[Xe]-=it*Jt[Xe-1];for(It[At-1]=Jt[At-1]/Zt[At-1],Xe=At-2;Xe>=0;--Xe)It[Xe]=(Jt[Xe]-It[Xe+1])/Zt[Xe];for(Zt[At-1]=(Le[At]+It[At-1])/2,Xe=0;Xe<At-1;++Xe)Zt[Xe]=2*Le[Xe+1]-It[Xe+1];return[It,Zt]}function bt(Le,Xe){this._context=Le,this._t=Xe}function jt(Le,Xe){if((It=Le.length)>1)for(var it,At,It,Zt=1,Jt=Le[Xe[0]],Vt=Jt.length;Zt<It;++Zt)for(At=Jt,Jt=Le[Xe[Zt]],it=0;it<Vt;++it)Jt[it][1]+=Jt[it][0]=isNaN(At[it][1])?At[it][0]:At[it][1]}function Nt(Le){for(var Xe=Le.length,it=new Array(Xe);--Xe>=0;)it[Xe]=Xe;return it}function $e(Le,Xe){return Le[Xe]}function yt(Le){var Xe=Le.map(Ot);return Nt(Le).sort(function(it,At){return Xe[it]-Xe[At]})}function Ot(Le){for(var Xe,it=-1,At=0,It=Le.length,Zt=-1/0;++it<It;)(Xe=+Le[it][1])>Zt&&(Zt=Xe,At=it);return At}function Mt(Le){var Xe=Le.map(Pt);return Nt(Le).sort(function(it,At){return Xe[it]-Xe[At]})}function Pt(Le){for(var Xe,it=0,At=-1,It=Le.length;++At<It;)(Xe=+Le[At][1])&&(it+=Xe);return it}ft.prototype={areaStart:Oe,areaEnd:Oe,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Le,Xe){Le=+Le,Xe=+Xe,this._point?this._context.lineTo(Le,Xe):(this._point=1,this._context.moveTo(Le,Xe))}},Ve.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:Pe(this,this._t0,Te(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Xe){var it=NaN;if(Xe=+Xe,(Le=+Le)!==this._x1||Xe!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Xe):this._context.moveTo(Le,Xe);break;case 1:this._point=2;break;case 2:this._point=3,Pe(this,Te(this,it=Ie(this,Le,Xe)),it);break;default:Pe(this,this._t0,it=Ie(this,Le,Xe))}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Xe,this._t0=it}}},(tt.prototype=Object.create(Ve.prototype)).point=function(Le,Xe){Ve.prototype.point.call(this,Xe,Le)},ot.prototype={moveTo:function(Le,Xe){this._context.moveTo(Xe,Le)},closePath:function(){this._context.closePath()},lineTo:function(Le,Xe){this._context.lineTo(Xe,Le)},bezierCurveTo:function(Le,Xe,it,At,It,Zt){this._context.bezierCurveTo(Xe,Le,At,it,Zt,It)}},at.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Le=this._x,Xe=this._y,it=Le.length;if(it)if(this._line?this._context.lineTo(Le[0],Xe[0]):this._context.moveTo(Le[0],Xe[0]),it===2)this._context.lineTo(Le[1],Xe[1]);else for(var At=_t(Le),It=_t(Xe),Zt=0,Jt=1;Jt<it;++Zt,++Jt)this._context.bezierCurveTo(At[0][Zt],It[0][Zt],At[1][Zt],It[1][Zt],Le[Jt],Xe[Jt]);(this._line||this._line!==0&&it===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(Le,Xe){this._x.push(+Le),this._y.push(+Xe)}},bt.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(Le,Xe){switch(Le=+Le,Xe=+Xe,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Xe):this._context.moveTo(Le,Xe);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,Xe),this._context.lineTo(Le,Xe);else{var it=this._x*(1-this._t)+Le*this._t;this._context.lineTo(it,this._y),this._context.lineTo(it,Xe)}}this._x=Le,this._y=Xe}},m.arc=function(){var Le=h,Xe=p,it=b(0),At=null,It=s,Zt=x,Jt=c,Vt=null;function pr(){var Ir,fr,$t=+Le.apply(this,arguments),er=+Xe.apply(this,arguments),ar=It.apply(this,arguments)-a,hr=Zt.apply(this,arguments)-a,vr=y(hr-ar),Pr=hr>ar;if(Vt||(Vt=Ir=g.path()),er<$t&&(fr=er,er=$t,$t=fr),er>1e-12)if(vr>u-1e-12)Vt.moveTo(er*n(ar),er*r(ar)),Vt.arc(0,0,er,ar,hr,!Pr),$t>1e-12&&(Vt.moveTo($t*n(hr),$t*r(hr)),Vt.arc(0,0,$t,hr,ar,Pr));else{var Ur,qr,rn=ar,An=hr,mn=ar,Mn=hr,Xr=vr,Er=vr,on=Jt.apply(this,arguments)/2,Un=on>1e-12&&(At?+At.apply(this,arguments):d($t*$t+er*er)),Tr=i(y(er-$t)/2,+it.apply(this,arguments)),en=Tr,$r=Tr;if(Un>1e-12){var Rr=o(Un/$t*r(on)),Pn=o(Un/er*r(on));(Xr-=2*Rr)>1e-12?(mn+=Rr*=Pr?1:-1,Mn-=Rr):(Xr=0,mn=Mn=(ar+hr)/2),(Er-=2*Pn)>1e-12?(rn+=Pn*=Pr?1:-1,An-=Pn):(Er=0,rn=An=(ar+hr)/2)}var Nn=er*n(rn),hn=er*r(rn),Fn=$t*n(Mn),ca=$t*r(Mn);if(Tr>1e-12){var sr,Fr=er*n(An),Bt=er*r(An),lr=$t*n(mn),mr=$t*r(mn);if(vr<l&&(sr=T(Nn,hn,lr,mr,Fr,Bt,Fn,ca))){var Vr=Nn-sr[0],Br=hn-sr[1],Dr=Fr-sr[0],Or=Bt-sr[1],xr=1/r(f((Vr*Dr+Br*Or)/(d(Vr*Vr+Br*Br)*d(Dr*Dr+Or*Or)))/2),br=d(sr[0]*sr[0]+sr[1]*sr[1]);en=i(Tr,($t-br)/(xr-1)),$r=i(Tr,(er-br)/(xr+1))}}Er>1e-12?$r>1e-12?(Ur=_(lr,mr,Nn,hn,er,$r,Pr),qr=_(Fr,Bt,Fn,ca,er,$r,Pr),Vt.moveTo(Ur.cx+Ur.x01,Ur.cy+Ur.y01),$r<Tr?Vt.arc(Ur.cx,Ur.cy,$r,e(Ur.y01,Ur.x01),e(qr.y01,qr.x01),!Pr):(Vt.arc(Ur.cx,Ur.cy,$r,e(Ur.y01,Ur.x01),e(Ur.y11,Ur.x11),!Pr),Vt.arc(0,0,er,e(Ur.cy+Ur.y11,Ur.cx+Ur.x11),e(qr.cy+qr.y11,qr.cx+qr.x11),!Pr),Vt.arc(qr.cx,qr.cy,$r,e(qr.y11,qr.x11),e(qr.y01,qr.x01),!Pr))):(Vt.moveTo(Nn,hn),Vt.arc(0,0,er,rn,An,!Pr)):Vt.moveTo(Nn,hn),$t>1e-12&&Xr>1e-12?en>1e-12?(Ur=_(Fn,ca,Fr,Bt,$t,-en,Pr),qr=_(Nn,hn,lr,mr,$t,-en,Pr),Vt.lineTo(Ur.cx+Ur.x01,Ur.cy+Ur.y01),en<Tr?Vt.arc(Ur.cx,Ur.cy,en,e(Ur.y01,Ur.x01),e(qr.y01,qr.x01),!Pr):(Vt.arc(Ur.cx,Ur.cy,en,e(Ur.y01,Ur.x01),e(Ur.y11,Ur.x11),!Pr),Vt.arc(0,0,$t,e(Ur.cy+Ur.y11,Ur.cx+Ur.x11),e(qr.cy+qr.y11,qr.cx+qr.x11),Pr),Vt.arc(qr.cx,qr.cy,en,e(qr.y11,qr.x11),e(qr.y01,qr.x01),!Pr))):Vt.arc(0,0,$t,Mn,mn,Pr):Vt.lineTo(Fn,ca)}else Vt.moveTo(0,0);if(Vt.closePath(),Ir)return Vt=null,Ir+""||null}return pr.centroid=function(){var Ir=(+Le.apply(this,arguments)+ +Xe.apply(this,arguments))/2,fr=(+It.apply(this,arguments)+ +Zt.apply(this,arguments))/2-l/2;return[n(fr)*Ir,r(fr)*Ir]},pr.innerRadius=function(Ir){return arguments.length?(Le=typeof Ir=="function"?Ir:b(+Ir),pr):Le},pr.outerRadius=function(Ir){return arguments.length?(Xe=typeof Ir=="function"?Ir:b(+Ir),pr):Xe},pr.cornerRadius=function(Ir){return arguments.length?(it=typeof Ir=="function"?Ir:b(+Ir),pr):it},pr.padRadius=function(Ir){return arguments.length?(At=Ir==null?null:typeof Ir=="function"?Ir:b(+Ir),pr):At},pr.startAngle=function(Ir){return arguments.length?(It=typeof Ir=="function"?Ir:b(+Ir),pr):It},pr.endAngle=function(Ir){return arguments.length?(Zt=typeof Ir=="function"?Ir:b(+Ir),pr):Zt},pr.padAngle=function(Ir){return arguments.length?(Jt=typeof Ir=="function"?Ir:b(+Ir),pr):Jt},pr.context=function(Ir){return arguments.length?(Vt=Ir??null,pr):Vt},pr},m.area=P,m.areaRadial=K,m.curveBasis=function(Le){return new je(Le)},m.curveBasisClosed=function(Le){return new Je(Le)},m.curveBasisOpen=function(Le){return new ze(Le)},m.curveBundle=Ge,m.curveCardinal=ct,m.curveCardinalClosed=Ct,m.curveCardinalOpen=nt,m.curveCatmullRom=Gt,m.curveCatmullRomClosed=Fe,m.curveCatmullRomOpen=wt,m.curveLinear=k,m.curveLinearClosed=function(Le){return new ft(Le)},m.curveMonotoneX=function(Le){return new Ve(Le)},m.curveMonotoneY=function(Le){return new tt(Le)},m.curveNatural=function(Le){return new at(Le)},m.curveStep=function(Le){return new bt(Le,.5)},m.curveStepAfter=function(Le){return new bt(Le,1)},m.curveStepBefore=function(Le){return new bt(Le,0)},m.line=I,m.lineRadial=Z,m.linkHorizontal=function(){return N(U)},m.linkRadial=function(){var Le=N(j);return Le.angle=Le.x,delete Le.x,Le.radius=Le.y,delete Le.y,Le},m.linkVertical=function(){return N(ee)},m.pie=function(){var Le=E,Xe=S,it=null,At=b(0),It=b(u),Zt=b(0);function Jt(Vt){var pr,Ir,fr,$t,er,ar=Vt.length,hr=0,vr=new Array(ar),Pr=new Array(ar),Ur=+At.apply(this,arguments),qr=Math.min(u,Math.max(-u,It.apply(this,arguments)-Ur)),rn=Math.min(Math.abs(qr)/ar,Zt.apply(this,arguments)),An=rn*(qr<0?-1:1);for(pr=0;pr<ar;++pr)(er=Pr[vr[pr]=pr]=+Le(Vt[pr],pr,Vt))>0&&(hr+=er);for(Xe!=null?vr.sort(function(mn,Mn){return Xe(Pr[mn],Pr[Mn])}):it!=null&&vr.sort(function(mn,Mn){return it(Vt[mn],Vt[Mn])}),pr=0,fr=hr?(qr-ar*An)/hr:0;pr<ar;++pr,Ur=$t)Ir=vr[pr],$t=Ur+((er=Pr[Ir])>0?er*fr:0)+An,Pr[Ir]={data:Vt[Ir],index:pr,value:er,startAngle:Ur,endAngle:$t,padAngle:rn};return Pr}return Jt.value=function(Vt){return arguments.length?(Le=typeof Vt=="function"?Vt:b(+Vt),Jt):Le},Jt.sortValues=function(Vt){return arguments.length?(Xe=Vt,it=null,Jt):Xe},Jt.sort=function(Vt){return arguments.length?(it=Vt,Xe=null,Jt):it},Jt.startAngle=function(Vt){return arguments.length?(At=typeof Vt=="function"?Vt:b(+Vt),Jt):At}
20,Jt.endAngle=function(Vt){return arguments.length?(It=typeof Vt=="function"?Vt:b(+Vt),Jt):It},Jt.padAngle=function(Vt){return arguments.length?(Zt=typeof Vt=="function"?Vt:b(+Vt),Jt):Zt},Jt},m.pointRadial=G,m.radialArea=K,m.radialLine=Z,m.stack=function(){var Le=b([]),Xe=Nt,it=jt,At=$e;function It(Zt){var Jt,Vt,pr=Le.apply(this,arguments),Ir=Zt.length,fr=pr.length,$t=new Array(fr);for(Jt=0;Jt<fr;++Jt){for(var er,ar=pr[Jt],hr=$t[Jt]=new Array(Ir),vr=0;vr<Ir;++vr)hr[vr]=er=[0,+At(Zt[vr],ar,vr,Zt)],er.data=Zt[vr];hr.key=ar}for(Jt=0,Vt=Xe($t);Jt<fr;++Jt)$t[Vt[Jt]].index=Jt;return it($t,Vt),$t}return It.keys=function(Zt){return arguments.length?(Le=typeof Zt=="function"?Zt:b(W.call(Zt)),It):Le},It.value=function(Zt){return arguments.length?(At=typeof Zt=="function"?Zt:b(+Zt),It):At},It.order=function(Zt){return arguments.length?(Xe=Zt==null?Nt:typeof Zt=="function"?Zt:b(W.call(Zt)),It):Xe},It.offset=function(Zt){return arguments.length?(it=Zt??jt,It):it},It},m.stackOffsetDiverging=function(Le,Xe){if((Vt=Le.length)>0)for(var it,At,It,Zt,Jt,Vt,pr=0,Ir=Le[Xe[0]].length;pr<Ir;++pr)for(Zt=Jt=0,it=0;it<Vt;++it)(It=(At=Le[Xe[it]][pr])[1]-At[0])>0?(At[0]=Zt,At[1]=Zt+=It):It<0?(At[1]=Jt,At[0]=Jt+=It):(At[0]=0,At[1]=It)},m.stackOffsetExpand=function(Le,Xe){if((At=Le.length)>0){for(var it,At,It,Zt=0,Jt=Le[0].length;Zt<Jt;++Zt){for(It=it=0;it<At;++it)It+=Le[it][Zt][1]||0;if(It)for(it=0;it<At;++it)Le[it][Zt][1]/=It}jt(Le,Xe)}},m.stackOffsetNone=jt,m.stackOffsetSilhouette=function(Le,Xe){if((it=Le.length)>0){for(var it,At=0,It=Le[Xe[0]],Zt=It.length;At<Zt;++At){for(var Jt=0,Vt=0;Jt<it;++Jt)Vt+=Le[Jt][At][1]||0;It[At][1]+=It[At][0]=-Vt/2}jt(Le,Xe)}},m.stackOffsetWiggle=function(Le,Xe){if((It=Le.length)>0&&(At=(it=Le[Xe[0]]).length)>0){for(var it,At,It,Zt=0,Jt=1;Jt<At;++Jt){for(var Vt=0,pr=0,Ir=0;Vt<It;++Vt){for(var fr=Le[Xe[Vt]],$t=fr[Jt][1]||0,er=($t-(fr[Jt-1][1]||0))/2,ar=0;ar<Vt;++ar){var hr=Le[Xe[ar]];er+=(hr[Jt][1]||0)-(hr[Jt-1][1]||0)}pr+=$t,Ir+=er*$t}it[Jt-1][1]+=it[Jt-1][0]=Zt,pr&&(Zt-=Ir/pr)}it[Jt-1][1]+=it[Jt-1][0]=Zt,jt(Le,Xe)}},m.stackOrderAppearance=yt,m.stackOrderAscending=Mt,m.stackOrderDescending=function(Le){return Mt(Le).reverse()},m.stackOrderInsideOut=function(Le){var Xe,it,At=Le.length,It=Le.map(Pt),Zt=yt(Le),Jt=0,Vt=0,pr=[],Ir=[];for(Xe=0;Xe<At;++Xe)it=Zt[Xe],Jt<Vt?(Jt+=It[it],pr.push(it)):(Vt+=It[it],Ir.push(it));return Ir.reverse().concat(pr)},m.stackOrderNone=Nt,m.stackOrderReverse=function(Le){return Nt(Le).reverse()},m.symbol=function(){var Le=b(X),Xe=b(64),it=null;function At(){var It;if(it||(it=It=g.path()),Le.apply(this,arguments).draw(it,+Xe.apply(this,arguments)),It)return it=null,It+""||null}return At.type=function(It){return arguments.length?(Le=typeof It=="function"?It:b(It),At):Le},At.size=function(It){return arguments.length?(Xe=typeof It=="function"?It:b(+It),At):Xe},At.context=function(It){return arguments.length?(it=It??null,At):it},At},m.symbolCircle=X,m.symbolCross=J,m.symbolDiamond=se,m.symbolSquare=xe,m.symbolStar=de,m.symbolTriangle=we,m.symbolWye=be,m.symbols=Se,Object.defineProperty(m,"__esModule",{value:!0})})},{"d3-path":117}],120:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?g(te,v("d3-time")):g((m=m||self).d3=m.d3||{},m.d3)})(this,function(m,g){function b(nt){if(0<=nt.y&&nt.y<100){var Qe=new Date(-1,nt.m,nt.d,nt.H,nt.M,nt.S,nt.L);return Qe.setFullYear(nt.y),Qe}return new Date(nt.y,nt.m,nt.d,nt.H,nt.M,nt.S,nt.L)}function y(nt){if(0<=nt.y&&nt.y<100){var Qe=new Date(Date.UTC(-1,nt.m,nt.d,nt.H,nt.M,nt.S,nt.L));return Qe.setUTCFullYear(nt.y),Qe}return new Date(Date.UTC(nt.y,nt.m,nt.d,nt.H,nt.M,nt.S,nt.L))}function e(nt,Qe,Et){return{y:nt,m:Qe,d:Et,H:0,M:0,S:0,L:0}}function n(nt){var Qe=nt.dateTime,Et=nt.date,Gt=nt.time,Xt=nt.periods,Fe=nt.days,qe=nt.shortDays,wt=nt.months,ft=nt.shortMonths,Ce=f(Xt),Ie=o(Xt),Te=f(Fe),Pe=o(Fe),Ve=f(qe),tt=o(qe),ot=f(wt),at=o(wt),_t=f(ft),bt=o(ft),jt={a:function(Pt){return qe[Pt.getDay()]},A:function(Pt){return Fe[Pt.getDay()]},b:function(Pt){return ft[Pt.getMonth()]},B:function(Pt){return wt[Pt.getMonth()]},c:null,d:K,e:K,f:N,H:G,I:W,j:Q,L:R,m:U,M:ee,p:function(Pt){return Xt[+(Pt.getHours()>=12)]},q:function(Pt){return 1+~~(Pt.getMonth()/3)},Q:et,s:ct,S:j,u:X,U:J,V:re,w:ne,W:se,x:null,X:null,y:oe,Y:pe,Z:ce,"%":Ye},Nt={a:function(Pt){return qe[Pt.getUTCDay()]},A:function(Pt){return Fe[Pt.getUTCDay()]},b:function(Pt){return ft[Pt.getUTCMonth()]},B:function(Pt){return wt[Pt.getUTCMonth()]},c:null,d:de,e:de,f:fe,H:xe,I:_e,j:we,L:Ee,m:ge,M:ke,p:function(Pt){return Xt[+(Pt.getUTCHours()>=12)]},q:function(Pt){return 1+~~(Pt.getUTCMonth()/3)},Q:et,s:ct,S:be,u:Se,U:Oe,V:De,w:je,W:Je,x:null,X:null,y:ze,Y:Ue,Z:Ge,"%":Ye},$e={a:function(Pt,Le,Xe){var it=Ve.exec(Le.slice(Xe));return it?(Pt.w=tt[it[0].toLowerCase()],Xe+it[0].length):-1},A:function(Pt,Le,Xe){var it=Te.exec(Le.slice(Xe));return it?(Pt.w=Pe[it[0].toLowerCase()],Xe+it[0].length):-1},b:function(Pt,Le,Xe){var it=_t.exec(Le.slice(Xe));return it?(Pt.m=bt[it[0].toLowerCase()],Xe+it[0].length):-1},B:function(Pt,Le,Xe){var it=ot.exec(Le.slice(Xe));return it?(Pt.m=at[it[0].toLowerCase()],Xe+it[0].length):-1},c:function(Pt,Le,Xe){return Mt(Pt,Qe,Le,Xe)}
vendor: 7,322 bytes, line 20
20,d:A,e:A,f:F,H:P,I:P,j:I,L:D,m:L,M:S,p:function(Pt,Le,Xe){var it=Ce.exec(Le.slice(Xe));return it?(Pt.p=Ie[it[0].toLowerCase()],Xe+it[0].length):-1},q:k,Q:V,s:Z,S:E,u:p,U:s,V:x,w:h,W:c,x:function(Pt,Le,Xe){return Mt(Pt,Et,Le,Xe)},X:function(Pt,Le,Xe){return Mt(Pt,Gt,Le,Xe)},y:_,Y:T,Z:w,"%":H};function yt(Pt,Le){return function(Xe){var it,At,It,Zt=[],Jt=-1,Vt=0,pr=Pt.length;for(Xe instanceof Date||(Xe=new Date(+Xe));++Jt<pr;)Pt.charCodeAt(Jt)===37&&(Zt.push(Pt.slice(Vt,Jt)),(At=i[it=Pt.charAt(++Jt)])!=null?it=Pt.charAt(++Jt):At=it==="e"?" ":"0",(It=Le[it])&&(it=It(Xe,At)),Zt.push(it),Vt=Jt+1);return Zt.push(Pt.slice(Vt,Jt)),Zt.join("")}}function Ot(Pt,Le){return function(Xe){var it,At,It=e(1900,void 0,1);if(Mt(It,Pt,Xe+="",0)!=Xe.length)return null;if("Q"in It)return new Date(It.Q);if("s"in It)return new Date(1e3*It.s+("L"in It?It.L:0));if(Le&&!("Z"in It)&&(It.Z=0),"p"in It&&(It.H=It.H%12+12*It.p),It.m===void 0&&(It.m="q"in It?It.q:0),"V"in It){if(It.V<1||It.V>53)return null;"w"in It||(It.w=1),"Z"in It?(At=(it=y(e(It.y,0,1))).getUTCDay(),it=At>4||At===0?g.utcMonday.ceil(it):g.utcMonday(it),it=g.utcDay.offset(it,7*(It.V-1)),It.y=it.getUTCFullYear(),It.m=it.getUTCMonth(),It.d=it.getUTCDate()+(It.w+6)%7):(At=(it=b(e(It.y,0,1))).getDay(),it=At>4||At===0?g.timeMonday.ceil(it):g.timeMonday(it),it=g.timeDay.offset(it,7*(It.V-1)),It.y=it.getFullYear(),It.m=it.getMonth(),It.d=it.getDate()+(It.w+6)%7)}else("W"in It||"U"in It)&&("w"in It||(It.w="u"in It?It.u%7:"W"in It?1:0),At="Z"in It?y(e(It.y,0,1)).getUTCDay():b(e(It.y,0,1)).getDay(),It.m=0,It.d="W"in It?(It.w+6)%7+7*It.W-(At+5)%7:It.w+7*It.U-(At+6)%7);return"Z"in It?(It.H+=It.Z/100|0,It.M+=It.Z%100,y(It)):b(It)}}function Mt(Pt,Le,Xe,it){for(var At,It,Zt=0,Jt=Le.length,Vt=Xe.length;Zt<Jt;){if(it>=Vt)return-1;if((At=Le.charCodeAt(Zt++))===37){if(At=Le.charAt(Zt++),!(It=$e[At in i?Le.charAt(Zt++):At])||(it=It(Pt,Xe,it))<0)return-1}else if(At!=Xe.charCodeAt(it++))return-1}return it}return jt.x=yt(Et,jt),jt.X=yt(Gt,jt),jt.c=yt(Qe,jt),Nt.x=yt(Et,Nt),Nt.X=yt(Gt,Nt),Nt.c=yt(Qe,Nt),{format:function(Pt){var Le=yt(Pt+="",jt);return Le.toString=function(){return Pt},Le},parse:function(Pt){var Le=Ot(Pt+="",!1);return Le.toString=function(){return Pt},Le},utcFormat:function(Pt){var Le=yt(Pt+="",Nt);return Le.toString=function(){return Pt},Le},utcParse:function(Pt){var Le=Ot(Pt+="",!0);return Le.toString=function(){return Pt},Le}}}var t,i={"-":"",_:" ",0:"0"},r=/^\s*\d+/,d=/^%/,l=/[\\^$*+?|[\]().{}]/g;function a(nt,Qe,Et){var Gt=nt<0?"-":"",Xt=(Gt?-nt:nt)+"",Fe=Xt.length;return Gt+(Fe<Et?new Array(Et-Fe+1).join(Qe)+Xt:Xt)}function u(nt){return nt.replace(l,"\\$&")}function f(nt){return new RegExp("^(?:"+nt.map(u).join("|")+")","i")}function o(nt){for(var Qe={},Et=-1,Gt=nt.length;++Et<Gt;)Qe[nt[Et].toLowerCase()]=Et;return Qe}function h(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+1));return Gt?(nt.w=+Gt[0],Et+Gt[0].length):-1}function p(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+1));return Gt?(nt.u=+Gt[0],Et+Gt[0].length):-1}function s(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.U=+Gt[0],Et+Gt[0].length):-1}function x(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.V=+Gt[0],Et+Gt[0].length):-1}function c(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.W=+Gt[0],Et+Gt[0].length):-1}function T(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+4));return Gt?(nt.y=+Gt[0],Et+Gt[0].length):-1}function _(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.y=+Gt[0]+(+Gt[0]>68?1900:2e3),Et+Gt[0].length):-1}function w(nt,Qe,Et){var Gt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Qe.slice(Et,Et+6));return Gt?(nt.Z=Gt[1]?0:-(Gt[2]+(Gt[3]||"00")),Et+Gt[0].length):-1}function k(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+1));return Gt?(nt.q=3*Gt[0]-3,Et+Gt[0].length):-1}function L(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.m=Gt[0]-1,Et+Gt[0].length):-1}function A(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.d=+Gt[0],Et+Gt[0].length):-1}function I(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+3));return Gt?(nt.m=0,nt.d=+Gt[0],Et+Gt[0].length):-1}function P(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.H=+Gt[0],Et+Gt[0].length):-1}function S(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.M=+Gt[0],Et+Gt[0].length):-1}function E(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+2));return Gt?(nt.S=+Gt[0],Et+Gt[0].length):-1}function D(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+3));return Gt?(nt.L=+Gt[0],Et+Gt[0].length):-1}function F(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et,Et+6));return Gt?(nt.L=Math.floor(Gt[0]/1e3),Et+Gt[0].length):-1}function H(nt,Qe,Et){var Gt=d.exec(Qe.slice(Et,Et+1));return Gt?Et+Gt[0].length:-1}function V(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et));return Gt?(nt.Q=+Gt[0],Et+Gt[0].length):-1}function Z(nt,Qe,Et){var Gt=r.exec(Qe.slice(Et));return Gt?(nt.s=+Gt[0],Et+Gt[0].length):-1}function K(nt,Qe){return a(nt.getDate(),Qe,2)}function G(nt,Qe){return a(nt.getHours(),Qe,2)}function W(nt,Qe){return a(nt.getHours()%12||12,Qe,2)}function Q(nt,Qe){return a(1+g.timeDay.count(g.timeYear(nt),nt),Qe,3)}function R(nt,Qe){return a(nt.getMilliseconds(),Qe,3)}function N(nt,Qe){return R(nt,Qe)+"000"}function U(nt,Qe){return a(nt.getMonth()+1,Qe,2)}function ee(nt,Qe){return a(nt.getMinutes(),Qe,2)}function j(nt,Qe){return a(nt.getSeconds(),Qe,2)}function X(nt){var Qe=nt.getDay();return Qe===0?7:Qe}function J(nt,Qe){return a(g.timeSunday.count(g.timeYear(nt)-1,nt),Qe,2)}function re(nt,Qe){var Et=nt.getDay();return nt=Et>=4||Et===0?g.timeThursday(nt):g.timeThursday.ceil(nt),a(g.timeThursday.count(g.timeYear(nt),nt)+(g.timeYear(nt).getDay()===4),Qe,2)}function ne(nt){return nt.getDay()}function se(nt,Qe){return a(g.timeMonday.count(g.timeYear(nt)-1,nt),Qe,2)}function oe(nt,Qe){return a(nt.getFullYear()%100,Qe,2)}function pe(nt,Qe){return a(nt.getFullYear()%1e4,Qe,4)}function ce(nt){var Qe=nt.getTimezoneOffset();return(Qe>0?"-":(Qe*=-1,"+"))+a(Qe/60|0,"0",2)+a(Qe%60,"0",2)}function de(nt,Qe){return a(nt.getUTCDate(),Qe,2)}function xe(nt,Qe){return a(nt.getUTCHours(),Qe,2)}function _e(nt,Qe){return a(nt.getUTCHours()%12||12,Qe,2)}function we(nt,Qe){return a(1+g.utcDay.count(g.utcYear(nt),nt),Qe,3)}function Ee(nt,Qe){return a(nt.getUTCMilliseconds(),Qe,3)}function fe(nt,Qe){return Ee(nt,Qe)+"000"}function ge(nt,Qe){return a(nt.getUTCMonth()+1,Qe,2)}function ke(nt,Qe){return a(nt.getUTCMinutes(),Qe,2)}function be(nt,Qe){return a(nt.getUTCSeconds(),Qe,2)}function Se(nt){var Qe=nt.getUTCDay();return Qe===0?7:Qe}function Oe(nt,Qe){return a(g.utcSunday.count(g.utcYear(nt)-1,nt),Qe,2)}function De(nt,Qe){var Et=nt.getUTCDay();return nt=Et>=4||Et===0?g.utcThursday(nt):g.utcThursday.ceil(nt),a(g.utcThursday.count(g.utcYear(nt),nt)+(g.utcYear(nt).getUTCDay()===4),Qe,2)}function je(nt){return nt.getUTCDay()}function Je(nt,Qe){return a(g.utcMonday.count(g.utcYear(nt)-1,nt),Qe,2)}function ze(nt,Qe){return a(nt.getUTCFullYear()%100,Qe,2)}function Ue(nt,Qe){return a(nt.getUTCFullYear()%1e4,Qe,4)}function Ge(){return"+0000"}function Ye(){return"%"}function et(nt){return+nt}function ct(nt){return Math.floor(+nt/1e3)}function mt(nt){return t=n(nt),m.timeFormat=t.format,m.timeParse=t.parse,m.utcFormat=t.utcFormat,m.utcParse=t.utcParse,t}mt({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 Ct=Date.prototype.toISOString?function(nt){return nt.toISOString()}:m.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"),Tt=+new Date("2000-01-01T00:00:00.000Z")?function(nt){var Qe=new Date(nt);return isNaN(Qe)?null:Qe}:m.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");m.isoFormat=Ct,m.isoParse=Tt,m.timeFormatDefaultLocale=mt,m.timeFormatLocale=n,Object.defineProperty(m,"__esModule",{value:!0})})},{"d3-time":121}],121:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=m||self).d3=m.d3||{})})(this,function(m){var g=new Date,b=new Date;function y(ge,ke,be,Se){function Oe(De){return ge(De=arguments.length===0?new Date:new Date(+De)),De}return Oe.floor=function(De){return ge(De=new Date(+De)),De},Oe.ceil=function(De){return ge(De=new Date(De-1)),ke(De,1),ge(De),De},Oe.round=function(De){var je=Oe(De),Je=Oe.ceil(De);return De-je<Je-De?je:Je},Oe.offset=function(De,je){return ke(De=new Date(+De),je==null?1:Math.floor(je)),De},Oe.range=function(De,je,Je){var ze,Ue=[];if(De=Oe.ceil(De),Je=Je==null?1:Math.floor(Je),!(De<je&&Je>0))return Ue;do Ue.push(ze=new Date(+De)),ke(De,Je),ge(De);while(ze<De&&De<je);return Ue},Oe.filter=function(De){return y(function(je){if(je>=je)for(;ge(je),!De(je);)je.setTime(je-1)},function(je,Je){if(je>=je)if(Je<0)for(;++Je<=0;)for(;ke(je,-1),!De(je););else for(;--Je>=0;)for(;ke(je,1),!De(je););})},be&&(Oe.count=function(De,je){return g.setTime(+De),b.setTime(+je),ge(g),ge(b),Math.floor(be(g,b))},Oe.every=function(De){return De=Math.floor(De),isFinite(De)&&De>0?De>1?Oe.filter(Se?function(je){return Se(je)%De==0}:function(je){return Oe.count(0,je)%De==0}):Oe:null}),Oe}var e=y(function(){},function(ge,ke){ge.setTime(+ge+ke)},function(ge,ke){return ke-ge});e.every=function(ge){return ge=Math.floor(ge),isFinite(ge)&&ge>0?ge>1?y(function(ke){ke.setTime(Math.floor(ke/ge)*ge)},function(ke,be){ke.setTime(+ke+be*ge)},function(ke,be){return(be-ke)/ge}):e:null};var n=e.range,t=y(function(ge){ge.setTime(ge-ge.getMilliseconds())},function(ge,ke){ge.setTime(+ge+1e3*ke)},function(ge,ke){return(ke-ge)/1e3},function(ge){return ge.getUTCSeconds()}),i=t.range,r=y(function(ge){ge.setTime(ge-ge.getMilliseconds()-1e3*ge.getSeconds())},function(ge,ke){ge.setTime(+ge+6e4*ke)},function(ge,ke){return(ke-ge)/6e4},function(ge){return ge.getMinutes()}),d=r.range,l=y(function(ge){ge.setTime(ge-ge.getMilliseconds()-1e3*ge.getSeconds()-6e4*ge.getMinutes())},function(ge,ke){ge.setTime(+ge+36e5*ke)},function(ge,ke){return(ke-ge)/36e5},function(ge){return ge.getHours()}),a=l.range,u=y(function(ge){ge.setHours(0,0,0,0)},function(ge,ke){ge.setDate(ge.getDate()+ke)},function(ge,ke){return(ke-ge-6e4*(ke.getTimezoneOffset()-ge.getTimezoneOffset()))/864e5},function(ge){return ge.getDate()-1}),f=u.range;function o(ge){return y(function(ke){ke.setDate(ke.getDate()-(ke.getDay()+7-ge)%7),ke.setHours(0,0,0,0)},function(ke,be){ke.setDate(ke.getDate()+7*be)},function(ke,be){return(be-ke-6e4*(be.getTimezoneOffset()-ke.getTimezoneOffset()))/6048e5})}var h=o(0),p=o(1),s=o(2),x=o(3),c=o(4),T=o(5),_=o(6),w=h.range,k=p.range,L=s.range,A=x.range,I=c.range,P=T.range,S=_.range,E=y(function(ge){ge.setDate(1),ge.setHours(0,0,0,0)},function(ge,ke){ge.setMonth(ge.getMonth()+ke)},function(ge,ke){return ke.getMonth()-ge.getMonth()+12*(ke.getFullYear()-ge.getFullYear())},function(ge){return ge.getMonth()}),D=E.range,F=y(function(ge){ge.setMonth(0,1),ge.setHours(0,0,0,0)},function(ge,ke){ge.setFullYear(ge.getFullYear()+ke)},function(ge,ke){return ke.getFullYear()-ge.getFullYear()},function(ge){return ge.getFullYear()});F.every=function(ge){return isFinite(ge=Math.floor(ge))&&ge>0?y(function(ke){ke.setFullYear(Math.floor(ke.getFullYear()/ge)*ge),ke.setMonth(0,1),ke.setHours(0,0,0,0)},function(ke,be){ke.setFullYear(ke.getFullYear()+be*ge)}):null};var H=F.range,V=y(function(ge){ge.setUTCSeconds(0,0)},function(ge,ke){ge.setTime(+ge+6e4*ke)},function(ge,ke){return(ke-ge)/6e4},function(ge){return ge.getUTCMinutes()}),Z=V.range,K=y(function(ge){ge.setUTCMinutes(0,0,0)},function(ge,ke){ge.setTime(+ge+36e5*ke)},function(ge,ke){return(ke-ge)/36e5},function(ge){return ge.getUTCHours()}),G=K.range,W=y(function(ge){ge.setUTCHours(0,0,0,0)},function(ge,ke){ge.setUTCDate(ge.getUTCDate()+ke)},function(ge,ke){return(ke-ge)/864e5},function(ge){return ge.getUTCDate()-1}
20),Q=W.range;function R(ge){return y(function(ke){ke.setUTCDate(ke.getUTCDate()-(ke.getUTCDay()+7-ge)%7),ke.setUTCHours(0,0,0,0)},function(ke,be){ke.setUTCDate(ke.getUTCDate()+7*be)},function(ke,be){return(be-ke)/6048e5})}var N=R(0),U=R(1),ee=R(2),j=R(3),X=R(4),J=R(5),re=R(6),ne=N.range,se=U.range,oe=ee.range,pe=j.range,ce=X.range,de=J.range,xe=re.range,_e=y(function(ge){ge.setUTCDate(1),ge.setUTCHours(0,0,0,0)},function(ge,ke){ge.setUTCMonth(ge.getUTCMonth()+ke)},function(ge,ke){return ke.getUTCMonth()-ge.getUTCMonth()+12*(ke.getUTCFullYear()-ge.getUTCFullYear())},function(ge){return ge.getUTCMonth()}),we=_e.range,Ee=y(function(ge){ge.setUTCMonth(0,1),ge.setUTCHours(0,0,0,0)},function(ge,ke){ge.setUTCFullYear(ge.getUTCFullYear()+ke)},function(ge,ke){return ke.getUTCFullYear()-ge.getUTCFullYear()},function(ge){return ge.getUTCFullYear()});Ee.every=function(ge){return isFinite(ge=Math.floor(ge))&&ge>0?y(function(ke){ke.setUTCFullYear(Math.floor(ke.getUTCFullYear()/ge)*ge),ke.setUTCMonth(0,1),ke.setUTCHours(0,0,0,0)},function(ke,be){ke.setUTCFullYear(ke.getUTCFullYear()+be*ge)}):null};var fe=Ee.range;m.timeDay=u,m.timeDays=f,m.timeFriday=T,m.timeFridays=P,m.timeHour=l,m.timeHours=a,m.timeInterval=y,m.timeMillisecond=e,m.timeMilliseconds=n,m.timeMinute=r,m.timeMinutes=d,m.timeMonday=p,m.timeMondays=k,m.timeMonth=E,m.timeMonths=D,m.timeSaturday=_,m.timeSaturdays=S,m.timeSecond=t,m.timeSeconds=i,m.timeSunday=h,m.timeSundays=w,m.timeThursday=c,m.timeThursdays=I,m.timeTuesday=s,m.timeTuesdays=L,m.timeWednesday=x,m.timeWednesdays=A,m.timeWeek=h,m.timeWeeks=w,m.timeYear=F,m.timeYears=H,m.utcDay=W,m.utcDays=Q,m.utcFriday=J,m.utcFridays=de,m.utcHour=K,m.utcHours=G,m.utcMillisecond=e,m.utcMilliseconds=n,m.utcMinute=V,m.utcMinutes=Z,m.utcMonday=U,m.utcMondays=se,m.utcMonth=_e,m.utcMonths=we,m.utcSaturday=re,m.utcSaturdays=xe,m.utcSecond=t,m.utcSeconds=i,m.utcSunday=N,m.utcSundays=ne,m.utcThursday=X,m.utcThursdays=ce,m.utcTuesday=ee,m.utcTuesdays=oe,m.utcWednesday=j,m.utcWednesdays=pe,m.utcWeek=N,m.utcWeeks=ne,m.utcYear=Ee,m.utcYears=fe,Object.defineProperty(m,"__esModule",{value:!0})})},{}],122:[function(v,$,te){arguments[4][121][0].apply(te,arguments)},{dup:121}],123:[function(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=m||self).d3=m.d3||{})})(this,function(m){var g,b,y=0,e=0,n=0,t=0,i=0,r=0,d=typeof performance=="object"&&performance.now?performance:Date,l=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(c){setTimeout(c,17)};function a(){return i||(l(u),i=d.now()+r)}function u(){i=0}function f(){this._call=this._time=this._next=null}function o(c,T,_){var w=new f;return w.restart(c,T,_),w}function h(){a(),++y;for(var c,T=g;T;)(c=i-T._time)>=0&&T._call.call(null,c),T=T._next;--y}function p(){i=(t=d.now())+r,y=e=0;try{h()}finally{y=0,function(){for(var c,T,_=g,w=1/0;_;)_._call?(w>_._time&&(w=_._time),c=_,_=_._next):(T=_._next,_._next=null,_=c?c._next=T:g=T);b=c,x(w)}(),i=0}}function s(){var c=d.now(),T=c-t;T>1e3&&(r-=T,t=c)}function x(c){y||(e&&(e=clearTimeout(e)),c-i>24?(c<1/0&&(e=setTimeout(p,c-d.now()-r)),n&&(n=clearInterval(n))):(n||(t=d.now(),n=setInterval(s,1e3)),y=1,l(p)))}f.prototype=o.prototype={constructor:f,restart:function(c,T,_){if(typeof c!="function")throw new TypeError("callback is not a function");_=(_==null?a():+_)+(T==null?0:+T),this._next||b===this||(b?b._next=this:g=this,b=this),this._call=c,this._time=_,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}},m.interval=function(c,T,_){var w=new f,k=T;return T==null?(w.restart(c,T,_),w):(T=+T,_=_==null?a():+_,w.restart(function L(A){A+=k,w.restart(L,k+=T,_),c(A)},T,_),w)},m.now=a,m.timeout=function(c,T,_){var w=new f;return T=T==null?0:+T,w.restart(function(k){w.stop(),c(k+T)},T,_),w},m.timer=o,m.timerFlush=h,Object.defineProperty(m,"__esModule",{value:!0})})},{}],124:[function(v,$,te){$.exports=function(){for(var m=0;m<arguments.length;m++)if(arguments[m]!==void 0)return arguments[m]}},{}],125:[function(v,$,te){$.exports=b;var m=(b.canvas=document.createElement("canvas")).getContext("2d"),g=y([32,126]);function b(e,n){Array.isArray(e)&&(e=e.join(", "));var t,i={},r=16,d=.05;n&&(n.length===2&&typeof n[0]=="number"?t=y(n):Array.isArray(n)?t=n:(n.o?t=y(n.o):n.pairs&&(t=n.pairs),n.fontSize&&(r=n.fontSize),n.threshold!=null&&(d=n.threshold))),t||(t=g),m.font=r+"px "+e;for(var l=0;l<t.length;l++){var a=t[l],u=m.measureText(a[0]).width+m.measureText(a[1]).width,f=m.measureText(a).width;if(Math.abs(u-f)>r*d){var o=(f-u)/r;i[a]=1e3*o}}return i}function y(e){for(var n=[],t=e[0];t<=e[1];t++)for(var i=String.fromCharCode(t),r=e[0];r<e[1];r++){var d=i+String.fromCharCode(r);n.push(d)}return n}b.createPairs=y,b.ascii=g},{}],126:[function(v,$,te){var m=v("abs-svg-path"),g=v("normalize-svg-path"),b={M:"moveTo",C:"bezierCurveTo"};
20$.exports=function(y,e){y.beginPath(),g(m(e)).forEach(function(n){var t=n[0],i=n.slice(1);y[b[t]].apply(y,i)}),y.closePath()}},{"abs-svg-path":70,"normalize-svg-path":246}],127:[function(v,$,te){$.exports=function(m){switch(m){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(v,$,te){$.exports=function(m,g){switch(g===void 0&&(g=0),typeof m){case"number":if(m>0)return function(b,y){var e,n;for(e=new Array(b),n=0;n<b;++n)e[n]=y;return e}(0|m,g);break;case"object":if(typeof m.length=="number")return function b(y,e,n){var t=0|y[n];if(t<=0)return[];var i,r=new Array(t);if(n===y.length-1)for(i=0;i<t;++i)r[i]=e;else for(i=0;i<t;++i)r[i]=b(y,e,n+1);return r}(m,g,0)}return[]}},{}],129:[function(v,$,te){function m(I,P,S){S=S||2;var E,D,F,H,V,Z,K,G=P&&P.length,W=G?P[0]*S:I.length,Q=g(I,0,W,S,!0),R=[];if(!Q||Q.next===Q.prev)return R;if(G&&(Q=function(U,ee,j,X){var J,re,ne,se,oe,pe=[];for(J=0,re=ee.length;J<re;J++)ne=ee[J]*X,se=J<re-1?ee[J+1]*X:U.length,(oe=g(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,Q,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 y(Q,R,S,E,D,K),R}function g(I,P,S,E,D){var F,H;if(D===A(I,P,S,E)>0)for(F=P;F<S;F+=E)H=w(F,I[F],I[F+1],H);else for(F=S-E;F>=P;F-=E)H=w(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 y(I,P,S,E,D,F,H){if(I){!H&&F&&function(G,W,Q,R){var N=G;do N.z===null&&(N.z=a(N.x,N.y,W,Q,R)),N.prevZ=N.prev,N.nextZ=N.next,N=N.next;while(N!==G);N.prevZ.nextZ=null,N.prevZ=null,function(U){var ee,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,ee=0;ee<pe&&(se++,X=X.nextZ);ee++);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?y(I=t(b(I),P,S),P,S,E,D,F,2):H===2&&i(I,P,S,E,D,F):y(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,G=D.y>F.y?D.y>H.y?D.y:H.y:F.y>H.y?F.y:H.y,W=a(V,Z,P,S,E),Q=a(K,G,P,S,E),R=I.prevZ,N=I.nextZ;R&&R.z>=W&&N&&N.z<=Q;){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<=Q;){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)&&s(D,E,E.next,F)&&T(D,F)&&T(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 i(I,P,S,E,D,F){var H=I;do{for(var V=H.next.next;V!==H.prev;){if(H.i!==V.i&&o(H,V)){var Z=_(H,V);return H=b(H,H.next),Z=b(Z,Z.next),y(H,P,S,E,D,F),void y(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 G=H.x+(Z-H.y)*(H.next.x-H.x)/(H.next.y-H.y);if(G<=V&&G>K){if(K=G,G===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,Q=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),T(H,E)&&(W<U||W===U&&(H.x>F.x||H.x===F.x&&l(F,H)))&&(F=H,U=W)),H=H.next;while(H!==Q);return F}(I,P)){var S=_(P,I);b(P,P.next),b(S,S.next)}}function l(I,P){return h(I.prev,I,P.prev)<0&&h(P.next,I,I.next)<0}function a(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 o(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&&s(D,D.next,S,E))return!0;D=D.next}while(D!==S);return!1}(I,P)&&(T(I,P)&&T(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 s(I,P,S,E){var D=c(h(I,P,S)),F=c(h(I,P,E)),H=c(h(S,E,I)),V=c(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 c(I){return I>0?1:I<0?-1:0}function T(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 w(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}$.exports=m,$.exports.default=m,m.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,G=V<Z-1?P[V+1]*S:I.length;H-=Math.abs(A(I,K,G,S))}var W=0;for(V=0;V<E.length;V+=3){var Q=E[V]*S,R=E[V+1]*S,N=E[V+2]*S;W+=Math.abs((I[Q]-I[N])*(I[R+1]-I[Q+1])-(I[Q]-I[R])*(I[N+1]-I[Q+1]))}return H===0&&W===0?0:Math.abs((W-H)/H)},m.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(v,$,te){var m=v("strongly-connected-components");$.exports=function(g,b){var y,e=[],n=[],t=[],i={},r=[];function d(s){var x,c,T=!1;for(n.push(s),t[s]=!0,x=0;x<r[s].length;x++)(c=r[s][x])===y?(l(y,n),T=!0):t[c]||(T=d(c));if(T)(function w(k){t[k]=!1,i.hasOwnProperty(k)&&Object.keys(i[k]).forEach(function(L){delete i[k][L],t[L]&&w(L)})})(s);else for(x=0;x<r[s].length;x++){c=r[s][x];var _=i[c];_||(_={},i[c]=_),_[c]=!0}return n.pop(),T}function l(s,x){var c=[].concat(x).concat(s);b?b(d):e.push(c)}function a(s){(function(L){for(var A=0;A<g.length;A++)A<L&&(g[A]=[]),g[A]=g[A].filter(function(I){return I>=L})})(s);for(var x,c=m(g).components.filter(function(L){return L.length>1}),T=1/0,_=0;_<c.length;_++)for(var w=0;w<c[_].length;w++)c[_][w]<T&&(T=c[_][w],x=_);var k=c[x];return!!k&&{leastVertex:T,adjList:g.map(function(L,A){return k.indexOf(A)===-1?[]:L.filter(function(I){return k.indexOf(I)!==-1})})}}y=0;for(var u=g.length;y<u;){var f=a(y);if(y=f.leastVertex,r=f.adjList){for(var o=0;o<r.length;o++)for(var h=0;h<r[o].length;h++){var p=r[o][h];t[+p]=!1,i[p]={}}d(y),y+=1}else y=u}return b?void 0:e}},{"strongly-connected-components":306}],131:[function(v,$,te){var m=v("../../object/valid-value");$.exports=function(){return m(this).length=0,this}},{"../../object/valid-value":162}],132:[function(v,$,te){$.exports=v("./is-implemented")()?Array.from:v("./shim")},{"./is-implemented":133,"./shim":134}],133:[function(v,$,te){$.exports=function(){var m,g,b=Array.from;return typeof b=="function"&&(g=b(m=["raz","dwa"]),Boolean(g&&g!==m&&g[1]==="dwa"))}},{}],134:[function(v,$,te){var m=v("es6-symbol").iterator,g=v("../../function/is-arguments"),b=v("../../function/is-function"),y=v("../../number/to-pos-integer"),e=v("../../object/valid-callable"),n=v("../../object/valid-value"),t=v("../../object/is-value"),i=v("../../string/is-string"),r=Array.isArray,d=Function.prototype.call,l={configurable:!0,enumerable:!0,writable:!0,value:null},a=Object.defineProperty;$.exports=function(u){var f,o,h,p,s,x,c,T,_,w,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(g(u))return(s=u.length)!==1?Array.apply(null,u):((p=new Array(1))[0]=u[0],p);if(r(u)){for(p=new Array(s=u.length),o=0;o<s;++o)p[o]=u[o];return p}}p=[]}if(!r(u)){if((_=u[m])!==void 0){for(c=e(_).call(u),f&&(p=new f),T=c.next(),o=0;!T.done;)w=k?d.call(k,L,T.value,o):T.value,f?(l.value=w,a(p,o,l)):p[o]=w,T=c.next(),++o;s=o}else if(i(u)){for(s=u.length,f&&(p=new f),o=0,h=0;o<s;++o)w=u[o],o+1<s&&(x=w.charCodeAt(0))>=55296&&x<=56319&&(w+=u[++o]),w=k?d.call(k,L,w,h):w,f?(l.value=w,a(p,h,l)):p[h]=w,++h;s=h}}if(s===void 0)for(s=y(u.length),f&&(p=new f(s)),o=0;o<s;++o)w=k?d.call(k,L,u[o],o):u[o],f?(l.value=w,a(p,o,l)):p[o]=w;return f&&(l.value=null,p.length=s),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(v,$,te){var m=Object.prototype.toString,g=m.call(function(){return arguments}());$.exports=function(b){return m.call(b)===g}},{}],136:[function(v,$,te){var m=Object.prototype.toString,g=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);$.exports=function(b){return typeof b=="function"&&g(m.call(b))}},{}],137:[function(v,$,te){$.exports=function(){}},{}],138:[function(v,$,te){$.exports=v("./is-implemented")()?Math.sign:v("./shim")},{"./is-implemented":139,"./shim":140}],139:[function(v,$,te){$.exports=function(){var m=Math.sign;return typeof m=="function"&&m(10)===1&&m(-20)===-1}},{}],140:[function(v,$,te){$.exports=function(m){return m=Number(m),isNaN(m)||m===0?m:m>0?1:-1}},{}],141:[function(v,$,te){var m=v("../math/sign"),g=Math.abs,b=Math.floor;$.exports=function(y){return isNaN(y)?0:(y=Number(y))!==0&&isFinite(y)?m(y)*b(g(y)):y}},{"../math/sign":138}],142:[function(v,$,te){var m=v("./to-integer"),g=Math.max;$.exports=function(b){return g(0,m(b))}},{"./to-integer":141}],143:[function(v,$,te){var m=v("./valid-callable"),g=v("./valid-value"),b=Function.prototype.bind,y=Function.prototype.call,e=Object.keys,n=Object.prototype.propertyIsEnumerable;$.exports=function(t,i){return function(r,d){var l,a=arguments[2],u=arguments[3];return r=Object(g(r)),m(d),l=e(r),u&&l.sort(typeof u=="function"?b.call(u,r):void 0),typeof t!="function"&&(t=l[t]),y.call(t,l,function(f,o){return n.call(r,f)?y.call(d,a,r[f],f,r,o):i})}}},{"./valid-callable":160,"./valid-value":162}],144:[function(v,$,te){$.exports=v("./is-implemented")()?Object.assign:v("./shim")},{"./is-implemented":145,"./shim":146}],145:[function(v,$,te){$.exports=function(){var m,g=Object.assign;return typeof g=="function"&&(g(m={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),m.foo+m.bar+m.trzy==="razdwatrzy")}},{}],146:[function(v,$,te){var m=v("../keys"),g=v("../valid-value"),b=Math.max;$.exports=function(y,e){var n,t,i,r=b(arguments.length,2);for(y=Object(g(y)),i=function(d){try{y[d]=e[d]}catch(l){n||(n=l)}},t=1;t<r;++t)m(e=arguments[t]).forEach(i);if(n!==void 0)throw n;return y}},{"../keys":152,"../valid-value":162}],147:[function(v,$,te){var m=v("../array/from"),g=v("./assign"),b=v("./valid-value");$.exports=function(y){var e=Object(b(y)),n=arguments[1],t=Object(arguments[2]);if(e!==y&&!n)return e;var i={};return n?m(n,function(r){(t.ensure||r in y)&&(i[r]=y[r])}):g(i,y),i}},{"../array/from":132,"./assign":144,"./valid-value":162}],148:[function(v,$,te){var m,g,b,y,e=Object.create;v("./set-prototype-of/is-implemented")()||(m=v("./set-prototype-of/shim")),$.exports=m?m.level!==1?e:(g={},b={},y={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){b[n]=n!=="__proto__"?y:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(g,b),Object.defineProperty(m,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:g}),function(n,t){return e(n===null?g:n,t)}):e},{"./set-prototype-of/is-implemented":158,"./set-prototype-of/shim":159}],149:[function(v,$,te){$.exports=v("./_iterate")("forEach")},{"./_iterate":143}],150:[function(v,$,te){var m=v("./is-value"),g={function:!0,object:!0};$.exports=function(b){return m(b)&&g[typeof b]||!1}},{"./is-value":151}],151:[function(v,$,te){var m=v("../function/noop")();$.exports=function(g){return g!==m&&g!==null}},{"../function/noop":137}],152:[function(v,$,te){$.exports=v("./is-implemented")()?Object.keys:v("./shim")},{"./is-implemented":153,"./shim":154}],153:[function(v,$,te){$.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}},{}],154:[function(v,$,te){var m=v("../is-value"),g=Object.keys;$.exports=function(b){return g(m(b)?Object(b):b)}},{"../is-value":151}],155:[function(v,$,te){var m=v("./valid-callable"),g=v("./for-each"),b=Function.prototype.call;$.exports=function(y,e){var n={},t=arguments[2];return m(e),g(y,function(i,r,d,l){n[r]=b.call(e,t,i,r,d,l)}),n}},{"./for-each":149,"./valid-callable":160}],156:[function(v,$,te){var m=v("./is-value"),g=Array.prototype.forEach,b=Object.create,y=function(e,n){var t;for(t in e)n[t]=e[t]};$.exports=function(e){var n=b(null);return g.call(arguments,function(t){m(t)&&y(Object(t),n)}),n}},{"./is-value":151}],157:[function(v,$,te){$.exports=v("./is-implemented")()?Object.setPrototypeOf:v("./shim")},{"./is-implemented":158,"./shim":159}],158:[function(v,$,te){var m=Object.create,g=Object.getPrototypeOf,b={};
20$.exports=function(){var y=Object.setPrototypeOf,e=arguments[0]||m;return typeof y=="function"&&g(y(e(null),b))===b}},{}],159:[function(v,$,te){var m,g=v("../is-object"),b=v("../valid-value"),y=Object.prototype.isPrototypeOf,e=Object.defineProperty,n={configurable:!0,enumerable:!1,writable:!0,value:void 0};m=function(t,i){if(b(t),i===null||g(i))return t;throw new TypeError("Prototype must be null or an object")},$.exports=function(t){var i,r;return t?(t.level===2?t.set?(r=t.set,i=function(d,l){return r.call(m(d,l),l),d}):i=function(d,l){return m(d,l).__proto__=l,d}:i=function d(l,a){var u;return m(l,a),(u=y.call(d.nullPolyfill,l))&&delete d.nullPolyfill.__proto__,a===null&&(a=d.nullPolyfill),l.__proto__=a,u&&e(d.nullPolyfill,"__proto__",n),l},Object.defineProperty(i,"level",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,i=Object.create(null),r={},d=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(d){try{(t=d.set).call(i,r)}catch{}if(Object.getPrototypeOf(i)===r)return{set:t,level:2}}return i.__proto__=r,Object.getPrototypeOf(i)===r?{level:2}:((i={}).__proto__=r,Object.getPrototypeOf(i)===r&&{level:1})}()),v("../create")},{"../create":148,"../is-object":150,"../valid-value":162}],160:[function(v,$,te){$.exports=function(m){if(typeof m!="function")throw new TypeError(m+" is not a function");return m}},{}],161:[function(v,$,te){var m=v("./is-object");$.exports=function(g){if(!m(g))throw new TypeError(g+" is not an Object");return g}},{"./is-object":150}],162:[function(v,$,te){var m=v("./is-value");$.exports=function(g){if(!m(g))throw new TypeError("Cannot use null or undefined");return g}},{"./is-value":151}],163:[function(v,$,te){$.exports=v("./is-implemented")()?String.prototype.contains:v("./shim")},{"./is-implemented":164,"./shim":165}],164:[function(v,$,te){var m="razdwatrzy";$.exports=function(){return typeof m.contains=="function"&&m.contains("dwa")===!0&&m.contains("foo")===!1}},{}],165:[function(v,$,te){var m=String.prototype.indexOf;$.exports=function(g){return m.call(this,g,arguments[1])>-1}},{}],166:[function(v,$,te){var m=Object.prototype.toString,g=m.call("");$.exports=function(b){return typeof b=="string"||b&&typeof b=="object"&&(b instanceof String||m.call(b)===g)||!1}},{}],167:[function(v,$,te){var m=Object.create(null),g=Math.random;$.exports=function(){var b;do b=g().toString(36).slice(2);while(m[b]);return b}},{}],168:[function(v,$,te){var m,g=v("es5-ext/object/set-prototype-of"),b=v("es5-ext/string/#/contains"),y=v("d"),e=v("es6-symbol"),n=v("./"),t=Object.defineProperty;m=$.exports=function(i,r){if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");n.call(this,i),r=r?b.call(r,"key+value")?"key+value":b.call(r,"key")?"key":"value":"value",t(this,"__kind__",y("",r))},g&&g(m,n),delete m.prototype.constructor,m.prototype=Object.create(n.prototype,{_resolve:y(function(i){return this.__kind__==="value"?this.__list__[i]:this.__kind__==="key+value"?[i,this.__list__[i]]:i})}),t(m.prototype,e.toStringTag,y("c","Array Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es5-ext/string/#/contains":163,"es6-symbol":175}],169:[function(v,$,te){var m=v("es5-ext/function/is-arguments"),g=v("es5-ext/object/valid-callable"),b=v("es5-ext/string/is-string"),y=v("./get"),e=Array.isArray,n=Function.prototype.call,t=Array.prototype.some;$.exports=function(i,r){var d,l,a,u,f,o,h,p,s=arguments[2];if(e(i)||m(i)?d="array":b(i)?d="string":i=y(i),g(r),a=function(){u=!0},d!=="array")if(d!=="string")for(l=i.next();!l.done;){if(n.call(r,s,l.value,a),u)return;l=i.next()}else for(o=i.length,f=0;f<o&&(h=i[f],f+1<o&&(p=h.charCodeAt(0))>=55296&&p<=56319&&(h+=i[++f]),n.call(r,s,h,a),!u);++f);else t.call(i,function(x){return n.call(r,s,x,a),u})}},{"./get":170,"es5-ext/function/is-arguments":135,"es5-ext/object/valid-callable":160,"es5-ext/string/is-string":166}],170:[function(v,$,te){var m=v("es5-ext/function/is-arguments"),g=v("es5-ext/string/is-string"),b=v("./array"),y=v("./string"),e=v("./valid-iterable"),n=v("es6-symbol").iterator;$.exports=function(t){return typeof e(t)[n]=="function"?t[n]():m(t)?new b(t):g(t)?new y(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(v,$,te){var m,g=v("es5-ext/array/#/clear"),b=v("es5-ext/object/assign"),y=v("es5-ext/object/vali
20d-callable"),e=v("es5-ext/object/valid-value"),n=v("d"),t=v("d/auto-bind"),i=v("es6-symbol"),r=Object.defineProperty,d=Object.defineProperties;$.exports=m=function(l,a){if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");d(this,{__list__:n("w",e(l)),__context__:n("w",a),__nextIndex__:n("w",0)}),a&&(y(a.on),a.on("_add",this._onAdd),a.on("_delete",this._onDelete),a.on("_clear",this._onClear))},delete m.prototype.constructor,d(m.prototype,b({_next:n(function(){var l;if(this.__list__)return this.__redo__&&(l=this.__redo__.shift())!==void 0?l:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:n(function(){return this._createResult(this._next())}),_createResult:n(function(l){return l===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(l)}}),_resolve:n(function(l){return this.__list__[l]}),_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[i.toStringTag]||"Object")+"]"})},t({_onAdd:n(function(l){l>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(a,u){a>=l&&(this.__redo__[u]=++a)},this),this.__redo__.push(l)):r(this,"__redo__",n("c",[l])))}),_onDelete:n(function(l){var a;l>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((a=this.__redo__.indexOf(l))!==-1&&this.__redo__.splice(a,1),this.__redo__.forEach(function(u,f){u>l&&(this.__redo__[f]=--u)},this)))}),_onClear:n(function(){this.__redo__&&g.call(this.__redo__),this.__nextIndex__=0})}))),r(m.prototype,i.iterator,n(function(){return this}))},{d:106,"d/auto-bind":105,"es5-ext/array/#/clear":131,"es5-ext/object/assign":144,"es5-ext/object/valid-callable":160,"es5-ext/object/valid-value":162,"es6-symbol":175}],172:[function(v,$,te){var m=v("es5-ext/function/is-arguments"),g=v("es5-ext/object/is-value"),b=v("es5-ext/string/is-string"),y=v("es6-symbol").iterator,e=Array.isArray;$.exports=function(n){return!!g(n)&&(!!e(n)||!!b(n)||!!m(n)||typeof n[y]=="function")}},{"es5-ext/function/is-arguments":135,"es5-ext/object/is-value":151,"es5-ext/string/is-string":166,"es6-symbol":175}],173:[function(v,$,te){var m,g=v("es5-ext/object/set-prototype-of"),b=v("d"),y=v("es6-symbol"),e=v("./"),n=Object.defineProperty;m=$.exports=function(t){if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");t=String(t),e.call(this,t),n(this,"__length__",b("",t.length))},g&&g(m,e),delete m.prototype.constructor,m.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 i,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(i=r.charCodeAt(0))>=55296&&i<=56319?r+this.__list__[this.__nextIndex__++]:r})}),n(m.prototype,y.toStringTag,b("c","String Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es6-symbol":175}],174:[function(v,$,te){var m=v("./is-iterable");$.exports=function(g){if(!m(g))throw new TypeError(g+" is not iterable");return g}},{"./is-iterable":172}],175:[function(v,$,te){$.exports=v("./is-implemented")()?v("ext/global-this").Symbol:v("./polyfill")},{"./is-implemented":176,"./polyfill":181,"ext/global-this":188}],176:[function(v,$,te){var m=v("ext/global-this"),g={object:!0,symbol:!0};
20$.exports=function(){var b,y=m.Symbol;if(typeof y!="function")return!1;b=y("test symbol");try{String(b)}catch{return!1}return!!g[typeof y.iterator]&&!!g[typeof y.toPrimitive]&&!!g[typeof y.toStringTag]}},{"ext/global-this":188}],177:[function(v,$,te){$.exports=function(m){return!!m&&(typeof m=="symbol"||!!m.constructor&&m.constructor.name==="Symbol"&&m[m.constructor.toStringTag]==="Symbol")}},{}],178:[function(v,$,te){var m=v("d"),g=Object.create,b=Object.defineProperty,y=Object.prototype,e=g(null);$.exports=function(n){for(var t,i,r=0;e[n+(r||"")];)++r;return e[n+=r||""]=!0,b(y,t="@@"+n,m.gs(null,function(d){i||(i=!0,b(this,t,m(d)),i=!1)})),t}},{d:106}],179:[function(v,$,te){var m=v("d"),g=v("ext/global-this").Symbol;$.exports=function(b){return Object.defineProperties(b,{hasInstance:m("",g&&g.hasInstance||b("hasInstance")),isConcatSpreadable:m("",g&&g.isConcatSpreadable||b("isConcatSpreadable")),iterator:m("",g&&g.iterator||b("iterator")),match:m("",g&&g.match||b("match")),replace:m("",g&&g.replace||b("replace")),search:m("",g&&g.search||b("search")),species:m("",g&&g.species||b("species")),split:m("",g&&g.split||b("split")),toPrimitive:m("",g&&g.toPrimitive||b("toPrimitive")),toStringTag:m("",g&&g.toStringTag||b("toStringTag")),unscopables:m("",g&&g.unscopables||b("unscopables"))})}},{d:106,"ext/global-this":188}],180:[function(v,$,te){var m=v("d"),g=v("../../../validate-symbol"),b=Object.create(null);$.exports=function(y){return Object.defineProperties(y,{for:m(function(e){return b[e]?b[e]:b[e]=y(String(e))}),keyFor:m(function(e){var n;for(n in g(e),b)if(b[n]===e)return n})})}},{"../../../validate-symbol":182,d:106}],181:[function(v,$,te){var m,g,b,y=v("d"),e=v("./validate-symbol"),n=v("ext/global-this").Symbol,t=v("./lib/private/generate-name"),i=v("./lib/private/setup/standard-symbols"),r=v("./lib/private/setup/symbol-registry"),d=Object.create,l=Object.defineProperties,a=Object.defineProperty;if(typeof n=="function")try{String(n()),b=!0}catch{}else n=null;g=function(u){if(this instanceof g)throw new TypeError("Symbol is not a constructor");return m(u)},$.exports=m=function u(f){var o;if(this instanceof u)throw new TypeError("Symbol is not a constructor");return b?n(f):(o=d(g.prototype),f=f===void 0?"":String(f),l(o,{__description__:y("",f),__name__:y("",t(f))}))},i(m),r(m),l(g.prototype,{constructor:y(m),toString:y("",function(){return this.__name__})}),l(m.prototype,{toString:y(function(){return"Symbol ("+e(this).__description__+")"}),valueOf:y(function(){return e(this)})}),a(m.prototype,m.toPrimitive,y("",function(){var u=e(this);return typeof u=="symbol"?u:u.toString()})),a(m.prototype,m.toStringTag,y("c","Symbol")),a(g.prototype,m.toStringTag,y("c",m.prototype[m.toStringTag])),a(g.prototype,m.toPrimitive,y("c",m.prototype[m.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(v,$,te){var m=v("./is-symbol");$.exports=function(g){if(!m(g))throw new TypeError(g+" is not a symbol");return g}},{"./is-symbol":177}],183:[function(v,$,te){$.exports=v("./is-implemented")()?WeakMap:v("./polyfill")},{"./is-implemented":184,"./polyfill":186}],184:[function(v,$,te){$.exports=function(){var m,g;if(typeof WeakMap!="function")return!1;try{m=new WeakMap([[g={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return String(m)==="[object WeakMap]"&&typeof m.set=="function"&&m.set({},1)===m&&typeof m.delete=="function"&&typeof m.has=="function"&&m.get(g)==="one"}},{}],185:[function(v,$,te){$.exports=typeof WeakMap=="function"&&Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"},{}],186:[function(v,$,te){var m,g=v("es5-ext/object/is-value"),b=v("es5-ext/object/set-prototype-of"),y=v("es5-ext/object/valid-object"),e=v("es5-ext/object/valid-value"),n=v("es5-ext/string/random-uniq"),t=v("d"),i=v("es6-iterator/get"),r=v("es6-iterator/for-of"),d=v("es6-symbol").toStringTag,l=v("./is-native-implemented"),a=Array.isArray,u=Object.defineProperty,f=Object.prototype.hasOwnProperty,o=Object.getPrototypeOf;$.exports=m=function(){var h,p=arguments[0];if(!(this instanceof m))throw new TypeError("Constructor requires 'new'");return h=l&&b&&WeakMap!==m?b(new WeakMap,o(this)):this,g(p)&&(a(p)||(p=i(p))),u(h,"__weakMapData__",t("c","$weakMap$"+n())),p&&r(p,function(s){e(s),h.set(s[0],s[1])}),h},l&&(b&&b(m,WeakMap),m.prototype=Object.create(WeakMap.prototype,{constructor:t(m)})),Object.defineProperties(m.prototype,{delete:t(function(h){return!!f.call(y(h
20),this.__weakMapData__)&&(delete h[this.__weakMapData__],!0)}),get:t(function(h){if(f.call(y(h),this.__weakMapData__))return h[this.__weakMapData__]}),has:t(function(h){return f.call(y(h),this.__weakMapData__)}),set:t(function(h,p){return u(y(h),this.__weakMapData__,t("c",p)),this}),toString:t(function(){return"[object WeakMap]"})}),u(m.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(v,$,te){var m=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};$.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return m()}try{return __global__||m()}finally{delete Object.prototype.__global__}}()},{}],188:[function(v,$,te){$.exports=v("./is-implemented")()?globalThis:v("./implementation")},{"./implementation":187,"./is-implemented":189}],189:[function(v,$,te){$.exports=function(){return typeof globalThis=="object"&&!!globalThis&&globalThis.Array===Array}},{}],190:[function(v,$,te){var m=v("is-string-blank");$.exports=function(g){var b=typeof g;if(b==="string"){var y=g;if((g=+g)==0&&m(y))return!1}else if(b!=="number")return!1;return g-g<1}},{"is-string-blank":237}],191:[function(v,$,te){var m=v("dtype");$.exports=function(g,b,y){if(!g)throw new TypeError("must specify data as first parameter");if(y=0|+(y||0),Array.isArray(g)&&g[0]&&typeof g[0][0]=="number"){var e,n,t,i,r=g[0].length,d=g.length*r;b&&typeof b!="string"||(b=new(m(b||"float32"))(d+y));var l=b.length-y;if(d!==l)throw new Error("source length "+d+" ("+r+"x"+g.length+") does not match destination length "+l);for(e=0,t=y;e<g.length;e++)for(n=0;n<r;n++)b[t++]=g[e][n]===null?NaN:g[e][n]}else if(b&&typeof b!="string")b.set(g,y);else{var a=m(b||"float32");if(Array.isArray(g)||b==="array")for(b=new a(g.length+y),e=0,t=y,i=b.length;t<i;t++,e++)b[t]=g[e]===null?NaN:g[e];else y===0?b=new a(g):(b=new a(g.length+y)).set(g,y)}return b}},{dtype:127}],192:[function(v,$,te){var m=v("css-font/stringify"),g=[32,126];$.exports=function(b){var y=(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],i=b.chars||g;if(n&&typeof n!="string"&&(n=m(n)),Array.isArray(i)){if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var r=[],d=i[0],l=0;d<=i[1];d++)r[l++]=String.fromCharCode(d);i=r}}else i=String(i).split("");y=y.slice(),e.width=y[0],e.height=y[1];var a=e.getContext("2d");a.fillStyle="#000",a.fillRect(0,0,e.width,e.height),a.font=n,a.textAlign="center",a.textBaseline="middle",a.fillStyle="#fff";var u=t[0]/2,f=t[1]/2;for(d=0;d<i.length;d++)a.fillText(i[d],u,f),(u+=t[0])>y[0]-t[0]/2&&(u=t[0]/2,f+=t[1]);return e}},{"css-font/stringify":102}],193:[function(v,$,te){function m(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 i=n.size||n.fontSize||n.em||48,r=n.weight||n.fontWeight||"",d=(e=[n.style||n.fontStyle||"",r,i].join(" ")+"px "+t,n.origin||"top");if(m.cache[t]&&i<=m.cache[t].em)return g(m.cache[t],d);var l=n.canvas||m.canvas,a=l.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*i);l.height=f,l.width=.5*f,a.font=e;var o={top:0};a.clearRect(0,0,f,f),a.textBaseline="top",a.fillStyle="black",a.fillText("H",0,0);var h=b(a.getImageData(0,0,f,f));a.clearRect(0,0,f,f),a.textBaseline="bottom",a.fillText("H",0,f);var p=b(a.getImageData(0,0,f,f));o.lineHeight=o.bottom=f-p+h,a.clearRect(0,0,f,f),a.textBaseline="alphabetic",a.fillText("H",0,f);var s=f-b(a.getImageData(0,0,f,f))-1+h;o.baseline=o.alphabetic=s,a.clearRect(0,0,f,f),a.textBaseline="middle",a.fillText("H",0,.5*f);var x=b(a.getImageData(0,0,f,f));o.median=o.middle=f-x-1+h-.5*f,a.clearRect(0,0,f,f),a.textBaseline="hanging",a.fillText("H",0,.5*f);var c=b(a.getImageData(0,0,f,f));o.hanging=f-c-1+h-.5*f,a.clearRect(0,0,f,f),a.textBaseline="ideographic",a.fillText("H",0,f);var T=b(a.getImageData(0,0,f,f));if(o.ideographic=f-T-1+h,u.upper&&(a.clearRect(0,0,f,f),a.textBaseline="top",a.fillText(u.upper,0,0),o.upper=b(a.getImageData(0,0,f,f)),o.capHeight=o.baseline-o.upper),u.lower&&(a.clearRect(0,0,f,f),a.textBaseline="top",a.fillText(u.lower,0,0),o.lower=b(a.getImageData(0,0,f,f)),o.xHeight=o.baseline-o.lower),u.tittle&&(
20a.clearRect(0,0,f,f),a.textBaseline="top",a.fillText(u.tittle,0,0),o.tittle=b(a.getImageData(0,0,f,f))),u.ascent&&(a.clearRect(0,0,f,f),a.textBaseline="top",a.fillText(u.ascent,0,0),o.ascent=b(a.getImageData(0,0,f,f))),u.descent&&(a.clearRect(0,0,f,f),a.textBaseline="top",a.fillText(u.descent,0,0),o.descent=y(a.getImageData(0,0,f,f))),u.overshoot){a.clearRect(0,0,f,f),a.textBaseline="top",a.fillText(u.overshoot,0,0);var _=y(a.getImageData(0,0,f,f));o.overshoot=_-s}for(var w in o)o[w]/=i;return o.em=i,m.cache[t]=o,g(o,d)}function g(e,n){var t={};for(var i in typeof n=="string"&&(n=e[n]),e)i!=="em"&&(t[i]=e[i]-n);return t}function b(e){for(var n=e.height,t=e.data,i=3;i<t.length;i+=4)if(t[i]!==0)return Math.floor(.25*(i-3)/n)}function y(e){for(var n=e.height,t=e.data,i=t.length-1;i>0;i-=4)if(t[i]!==0)return Math.floor(.25*(i-3)/n)}$.exports=m,m.canvas=document.createElement("canvas"),m.cache={}},{}],194:[function(v,$,te){$.exports=function(m,g){if(typeof m!="string")throw new TypeError("must specify type string");if(g=g||{},typeof document>"u"&&!g.canvas)return null;var b=g.canvas||document.createElement("canvas");typeof g.width=="number"&&(b.width=g.width),typeof g.height=="number"&&(b.height=g.height);var y,e=g;try{var n=[m];m.indexOf("webgl")===0&&n.push("experimental-"+m);for(var t=0;t<n.length;t++)if(y=b.getContext(n[t],e))return y}catch{y=null}return y||null}},{}],195:[function(v,$,te){$.exports=function(m,g){var b=g[0],y=g[1],e=g[2],n=g[3],t=g[4],i=g[5],r=g[6],d=g[7],l=g[8],a=g[9],u=g[10],f=g[11],o=g[12],h=g[13],p=g[14],s=g[15];return m[0]=i*(u*s-f*p)-a*(r*s-d*p)+h*(r*f-d*u),m[1]=-(y*(u*s-f*p
20)-a*(e*s-n*p)+h*(e*f-n*u)),m[2]=y*(r*s-d*p)-i*(e*s-n*p)+h*(e*d-n*r),m[3]=-(y*(r*f-d*u)-i*(e*f-n*u)+a*(e*d-n*r)),m[4]=-(t*(u*s-f*p)-l*(r*s-d*p)+o*(r*f-d*u)),m[5]=b*(u*s-f*p)-l*(e*s-n*p)+o*(e*f-n*u),m[6]=-(b*(r*s-d*p)-t*(e*s-n*p)+o*(e*d-n*r)),m[7]=b*(r*f-d*u)-t*(e*f-n*u)+l*(e*d-n*r),m[8]=t*(a*s-f*h)-l*(i*s-d*h)+o*(i*f-d*a),m[9]=-(b*(a*s-f*h)-l*(y*s-n*h)+o*(y*f-n*a)),m[10]=b*(i*s-d*h)-t*(y*s-n*h)+o*(y*d-n*i),m[11]=-(b*(i*f-d*a)-t*(y*f-n*a)+l*(y*d-n*i)),m[12]=-(t*(a*p-u*h)-l*(i*p-r*h)+o*(i*u-r*a)),m[13]=b*(a*p-u*h)-l*(y*p-e*h)+o*(y*u-e*a),m[14]=-(b*(i*p-r*h)-t*(y*p-e*h)+o*(y*r-e*i)),m[15]=b*(i*u-r*a)-t*(y*u-e*a)+l*(y*r-e*i),m}},{}],196:[function(v,$,te){$.exports=function(m){var g=new Float32Array(16);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}},{}],197:[function(v,$,te){$.exports=function(m,g){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}},{}],198:[function(v,$,te){$.exports=function(){var m=new Float32Array(16);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}},{}],199:[function(v,$,te){$.exports=function(m){var g=m[0],b=m[1],y=m[2],e=m[3],n=m[4],t=m[5],i=m[6],r=m[7],d=m[8],l=m[9],a=m[10],u=m[11],f=m[12],o=m[13],h=m[14],p=m[15];return(g*t-b*n)*(a*p-u*h)-(g*i-y*n)*(l*p-u*o)+(g*r-e*n)*(l*h-a*o)+(b*i-y*t)*(d*p-u*f)-(b*r-e*t)*(d*h-a*f)+(y*r-e*i)*(d*o-l*f)}},{}],200:[function(v,$,te){$.exports=function(m,g){var b=g[0],y=g[1],e=g[2],n=g[3],t=b+b,i=y+y,r=e+e,d=b*t,l=y*t,a=y*i,u=e*t,f=e*i,o=e*r,h=n*t,p=n*i,s=n*r;return m[0]=1-a-o,m[1]=l+s,m[2]=u-p,m[3]=0,m[4]=l-s,m[5]=1-d-o,m[6]=f+h,m[7]=0,m[8]=u+p,m[9]=f-h,m[10]=1-d-a,m[11]=0,m[12]=0,m[13]=0,m[14]=0,m[15]=1,m}},{}],201:[function(v,$,te){$.exports=function(m,g,b){var y,e,n,t=b[0],i=b[1],r=b[2],d=Math.sqrt(t*t+i*i+r*r);return Math.abs(d)<1e-6?null:(t*=d=1/d,i*=d,r*=d,y=Math.sin(g),e=Math.cos(g),n=1-e,m[0]=t*t*n+e,m[1]=i*t*n+r*y,m[2]=r*t*n-i*y,m[3]=0,m[4]=t*i*n-r*y,m[5]=i*i*n+e,m[6]=r*i*n+t*y,m[7]=0,m[8]=t*r*n+i*y,m[9]=i*r*n-t*y,m[10]=r*r*n+e,m[11]=0,m[12]=0,m[13]=0,m[14]=0,m[15]=1,m)}},{}],202:[function(v,$,te){$.exports=function(m,g,b){var y=g[0],e=g[1],n=g[2],t=g[3],i=y+y,r=e+e,d=n+n,l=y*i,a=y*r,u=y*d,f=e*r,o=e*d,h=n*d,p=t*i,s=t*r,x=t*d;return m[0]=1-(f+h),m[1]=a+x,m[2]=u-s,m[3]=0,m[4]=a-x,m[5]=1-(l+h),m[6]=o+p,m[7]=0,m[8]=u+s,m[9]=o-p,m[10]=1-(l+f),m[11]=0,m[12]=b[0],m[13]=b[1],m[14]=b[2],m[15]=1,m}},{}],203:[function(v,$,te){$.exports=function(m,g){return m[0]=g[0],m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=g[1],m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[10]=g[2],m[11]=0,m[12]=0,m[13]=0,m[14]=0,m[15]=1,m}},{}],204:[function(v,$,te){$.exports=function(m,g){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]=g[0],m[13]=g[1],m[14]=g[2],m[15]=1,m}},{}],205:[function(v,$,te){$.exports=function(m,g){var b=Math.sin(g),y=Math.cos(g);return m[0]=1,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=y,m[6]=b,m[7]=0,m[8]=0,m[9]=-b,m[10]=y,m[11]=0,m[12]=0,m[13]=0,m[14]=0,m[15]=1,m}},{}],206:[function(v,$,te){$.exports=function(m,g){var b=Math.sin(g),y=Math.cos(g);return m[0]=y,m[1]=0,m[2]=-b,m[3]=0,m[4]=0,m[5]=1,m[6]=0,m[7]=0,m[8]=b,m[9]=0,m[10]=y,m[11]=0,m[12]=0,m[13]=0,m[14]=0,m[15]=1,m}},{}],207:[function(v,$,te){$.exports=function(m,g){var b=Math.sin(g),y=Math.cos(g);return m[0]=y,m[1]=b,m[2]=0,m[3]=0,m[4]=-b,m[5]=y,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}},{}],208:[function(v,$,te){$.exports=function(m,g,b,y,e,n,t){var i=1/(b-g),r=1/(e-y),d=1/(n-t);return m[0]=2*n*i,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=2*n*r,m[6]=0,m[7]=0,m[8]=(b+g)*i,m[9]=(e+y)*r,m[10]=(t+n)*d,m[11]=-1,m[12]=0,m[13]=0,m[14]=t*n*2*d,m[15]=0,m}},{}],209:[function(v,$,te){$.exports=function(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}},{}],210:[function(v,$,te){$.exports={create:v("./create"),clone:v("./clone"),copy:v("./copy"),identity:v("./identity"),transpose:v("./transpose"),invert:v("./invert"),adjoint:v("./adjoint"),determinant:v("./determinant"),multiply:v("./multiply"),translate:v("./translate"),scale:v("./scale"),rotate:v("./rotate"),rotateX:v("./rotateX"),rotateY:v("./rotateY"),rotateZ:v("./rotateZ"),fromRotation:v("./fromRotation"),fromRotationTranslation:v("./fromRotationTranslation"),fromScaling:v("./fromScaling"),fromTranslation:v("./fromTranslation"),fromXRotation:v("./fromXRotation"),fromYRotation:v("./fromYRotation"),fromZRotation:v("./fromZRotation"),fromQuat:v("./fromQuat"),frustum:v("./frustum"),perspective:v("./perspective"),perspectiveFromFieldOfView:v("./perspectiveFromFieldOfView"),ortho:v("./ortho"),lookAt:v("./lookAt"),str:v("./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(v,$,te){$.exports=function(m,g){var b=g[0],y=g[1],e=g[2],n=g[3],t=g[4],i=g[5],r=g[6],d=g[7],l=g[8],a=g[9],u=g[10],f=g[11],o=g[12],h=g[13],p=g[14],s=g[15],x=b*i-y*t,c=b*r-e*t,T=b*d-n*t,_=y*r-e*i,w=y*d-n*i,k=e*d-n*r,L=l*h-a*o,A=l*p-u*o,I=l*s-f*o,P=a*p-u*h,S=a*s-f*h,E=u*s-f*p,D=x*E-c*S+T*P+_*I-w*A+k*L;return D?(D=1/D,m[0]=(i*E-r*S+d*P)*D,m[1]=(e*S-y*E-n*P)*D,m[2]=(h*k-p*w+s*_)*D,m[3]=(u*w-a*k-f*_)*D,m[4]=(r*I-t*E-d*A)*D,m[5]=(b*E-e*I+n*A)*D,m[6]=(p*T-o*k-s*c)*D,m[7]=(l*k-u*T+f*c)*D,m[8]=(t*S-i*I+d*L)
vendor: 6,977 bytes, line 20
20*D,m[9]=(y*I-b*S-n*L)*D,m[10]=(o*w-h*T+s*x)*D,m[11]=(a*T-l*w-f*x)*D,m[12]=(i*A-t*P-r*L)*D,m[13]=(b*P-y*A+e*L)*D,m[14]=(h*c-o*_-p*x)*D,m[15]=(l*_-a*c+u*x)*D,m):null}},{}],212:[function(v,$,te){var m=v("./identity");$.exports=function(g,b,y,e){var n,t,i,r,d,l,a,u,f,o,h=b[0],p=b[1],s=b[2],x=e[0],c=e[1],T=e[2],_=y[0],w=y[1],k=y[2];return Math.abs(h-_)<1e-6&&Math.abs(p-w)<1e-6&&Math.abs(s-k)<1e-6?m(g):(a=h-_,u=p-w,f=s-k,o=1/Math.sqrt(a*a+u*u+f*f),n=c*(f*=o)-T*(u*=o),t=T*(a*=o)-x*f,i=x*u-c*a,(o=Math.sqrt(n*n+t*t+i*i))?(n*=o=1/o,t*=o,i*=o):(n=0,t=0,i=0),r=u*i-f*t,d=f*n-a*i,l=a*t-u*n,(o=Math.sqrt(r*r+d*d+l*l))?(r*=o=1/o,d*=o,l*=o):(r=0,d=0,l=0),g[0]=n,g[1]=r,g[2]=a,g[3]=0,g[4]=t,g[5]=d,g[6]=u,g[7]=0,g[8]=i,g[9]=l,g[10]=f,g[11]=0,g[12]=-(n*h+t*p+i*s),g[13]=-(r*h+d*p+l*s),g[14]=-(a*h+u*p+f*s),g[15]=1,g)}},{"./identity":209}],213:[function(v,$,te){$.exports=function(m,g,b){var y=g[0],e=g[1],n=g[2],t=g[3],i=g[4],r=g[5],d=g[6],l=g[7],a=g[8],u=g[9],f=g[10],o=g[11],h=g[12],p=g[13],s=g[14],x=g[15],c=b[0],T=b[1],_=b[2],w=b[3];return m[0]=c*y+T*i+_*a+w*h,m[1]=c*e+T*r+_*u+w*p,m[2]=c*n+T*d+_*f+w*s,m[3]=c*t+T*l+_*o+w*x,c=b[4],T=b[5],_=b[6],w=b[7],m[4]=c*y+T*i+_*a+w*h,m[5]=c*e+T*r+_*u+w*p,m[6]=c*n+T*d+_*f+w*s,m[7]=c*t+T*l+_*o+w*x,c=b[8],T=b[9],_=b[10],w=b[11],m[8]=c*y+T*i+_*a+w*h,m[9]=c*e+T*r+_*u+w*p,m[10]=c*n+T*d+_*f+w*s,m[11]=c*t+T*l+_*o+w*x,c=b[12],T=b[13],_=b[14],w=b[15],m[12]=c*y+T*i+_*a+w*h,m[13]=c*e+T*r+_*u+w*p,m[14]=c*n+T*d+_*f+w*s,m[15]=c*t+T*l+_*o+w*x,m}},{}],214:[function(v,$,te){$.exports=function(m,g,b,y,e,n,t){var i=1/(g-b),r=1/(y-e),d=1/(n-t);return m[0]=-2*i,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=-2*r,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[10]=2*d,m[11]=0,m[12]=(g+b)*i,m[13]=(e+y)*r,m[14]=(t+n)*d,m[15]=1,m}},{}],215:[function(v,$,te){$.exports=function(m,g,b,y,e){var n=1/Math.tan(g/2),t=1/(y-e);return m[0]=n/b,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=n,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[10]=(e+y)*t,m[11]=-1,m[12]=0,m[13]=0,m[14]=2*e*y*t,m[15]=0,m}},{}],216:[function(v,$,te){$.exports=function(m,g,b,y){var e=Math.tan(g.upDegrees*Math.PI/180),n=Math.tan(g.downDegrees*Math.PI/180),t=Math.tan(g.leftDegrees*Math.PI/180),i=Math.tan(g.rightDegrees*Math.PI/180),r=2/(t+i),d=2/(e+n);return m[0]=r,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=d,m[6]=0,m[7]=0,m[8]=-(t-i)*r*.5,m[9]=(e-n)*d*.5,m[10]=y/(b-y),m[11]=-1,m[12]=0,m[13]=0,m[14]=y*b/(b-y),m[15]=0,m}},{}],217:[function(v,$,te){$.exports=function(m,g,b,y){var e,n,t,i,r,d,l,a,u,f,o,h,p,s,x,c,T,_,w,k,L,A,I,P,S=y[0],E=y[1],D=y[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,i=g[0],r=g[1],d=g[2],l=g[3],a=g[4],u=g[5],f=g[6],o=g[7],h=g[8],p=g[9],s=g[10],x=g[11],c=S*S*t+n,T=E*S*t+D*e,_=D*S*t-E*e,w=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,m[0]=i*c+a*T+h*_,m[1]=r*c+u*T+p*_,m[2]=d*c+f*T+s*_,m[3]=l*c+o*T+x*_,m[4]=i*w+a*k+h*L,m[5]=r*w+u*k+p*L,m[6]=d*w+f*k+s*L,m[7]=l*w+o*k+x*L,m[8]=i*A+a*I+h*P,m[9]=r*A+u*I+p*P,m[10]=d*A+f*I+s*P,m[11]=l*A+o*I+x*P,g!==m&&(m[12]=g[12],m[13]=g[13],m[14]=g[14],m[15]=g[15]),m)}},{}],218:[function(v,$,te){$.exports=function(m,g,b){var y=Math.sin(b),e=Math.cos(b),n=g[4],t=g[5],i=g[6],r=g[7],d=g[8],l=g[9],a=g[10],u=g[11];return g!==m&&(m[0]=g[0],m[1]=g[1],m[2]=g[2],m[3]=g[3],m[12]=g[12],m[13]=g[13],m[14]=g[14],m[15]=g[15]),m[4]=n*e+d*y,m[5]=t*e+l*y,m[6]=i*e+a*y,m[7]=r*e+u*y,m[8]=d*e-n*y,m[9]=l*e-t*y,m[10]=a*e-i*y,m[11]=u*e-r*y,m}},{}],219:[function(v,$,te){$.exports=function(m,g,b){var y=Math.sin(b),e=Math.cos(b),n=g[0],t=g[1],i=g[2],r=g[3],d=g[8],l=g[9],a=g[10],u=g[11];return g!==m&&(m[4]=g[4],m[5]=g[5],m[6]=g[6],m[7]=g[7],m[12]=g[12],m[13]=g[13],m[14]=g[14],m[15]=g[15]),m[0]=n*e-d*y,m[1]=t*e-l*y,m[2]=i*e-a*y,m[3]=r*e-u*y,m[8]=n*y+d*e,m[9]=t*y+l*e,m[10]=i*y+a*e,m[11]=r*y+u*e,m}},{}],220:[function(v,$,te){$.exports=function(m,g,b){var y=Math.sin(b),e=Math.cos(b),n=g[0],t=g[1],i=g[2],r=g[3],d=g[4],l=g[5],a=g[6],u=g[7];return g!==m&&(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[0]=n*e+d*y,m[1]=t*e+l*y,m[2]=i*e+a*y,m[3]=r*e+u*y,m[4]=d*e-n*y,m[5]=l*e-t*y,m[6]=a*e-i*y,m[7]=u*e-r*y,m}},{}],221:[function(v,$,te){$.exports=function(m,g,b){var y=b[0],e=b[1],n=b[2];return m[0]=g[0]*y,m[1]=g[1]*y,m[2]=g[2]*y,m[3]=g[3]*y,m[4]=g[4]*e,m[5]=g[5]*e,m[6]=g[6]*e,m[7]=g[7]*e,m[8]=g[8]*n,m[9]=g[9]*n,m[10]=g[10]*n,m[11]=g[11]*n,m[12]=g[12],m[13]=g[13],m[14]=g[14],m[15]=g[15],m}},{}],222:[function(v,$,te){$.exports=function(m){return"mat4("+m[0]+", "+m[1]+", "+m[2]+", "+m[3]+", "+m[4]+", "+m[5]+", "+m[6]+", "+m[7]+", "+m[8]+", "+m[9]+", "+m[10]+", "+m[11]+", "+m[12]+", "+m[13]+", "+m[14]+", "+m[15]+")"}},{}],223:[function(v,$,te){$.exports=function(m,g,b){var y,e,n,t,i,r,d,l,a,u,f,o,h=b[0],p=b[1],s=b[2];return g===m?(m[12]=g[0]*h+g[4]*p+g[8]*s+g[12],m[13]=g[1]*h+g[5]*p+g[9]*s+g[13],m[14]=g[2]*h+g[6]*p+g[10]*s+g[14],m[15]=g[3]*h+g[7]*p+g[11]*s+g[15]):(y=g[0],e=g[1],n=g[2],t=g[3],i=g[4],r=g[5],d=g[6],l=g[7],a=g[8],u=g[9],f=g[10],o=g[11],m[0]=y,m[1]=e,m[2]=n,m[3]=t,m[4]=i,m[5]=r,m[6]=d,m[7]=l,m[8]=a,m[9]=u,m[10]=f,m[11]=o,m[12]=y*h+i*p+a*s+g[12],m[13]=e*h+r*p+u*s+g[13],m[14]=n*h+d*p+f*s+g[14],m[15]=t*h+l*p+o*s+g[15]),m}},{}],224:[function(v,$,te){$.exports=function(m,g){if(m===g){var b=g[1],y=g[2],e=g[3],n=g[6],t=g[7],i=g[11];m[1]=g[4],m[2]=g[8],m[3]=g[12],m[4]=b,m[6]=g[9],m[7]=g[13],m[8]=y,m[9]=n,m[11]=g[14],m[12]=e,m[13]=t,m[14]=i}else m[0]=g[0],m[1]=g[4],m[2]=g[8],m[3]=g[12],m[4]=g[1],m[5]=g[5],m[6]=g[9],m[7]=g[13],m[8]=g[2],m[9]=g[6],m[10]=g[10],m[11]=g[14],m[12]=g[3],m[13]=g[7],m[14]=g[11],m[15]=g[15];return m}},{}],225:[function(v,$,te){var m=v("css-font"),g=v("pick-by-alias"),b=v("regl"),y=v("gl-util/context"),e=v("es6-weak-map"),n=v("color-normalize"),t=v("font-atlas"),i=v("typedarray-pool"),r=v("parse-rect"),d=v("is-plain-obj"),l=v("parse-unit"),a=v("to-px"),u=v("detect-kerning"),f=v("object-assign"),o=v("font-measure"),h=v("flatten-vertex-data"),p=v("bit-twiddle").nextPow2,s=new e,x=!1;if(document.body){var c=document.body.appendChild(document.createElement("div"));c.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(c).fontStretch&&(x=!0),document.body.removeChild(c)}var T=function(_){(function(w){return typeof w=="function"&&w._gl&&w.prop&&w.texture&&w.buffer})(_)?(_={regl:_},this.gl=_.regl._gl):this.gl=y(_),this.shader=s.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(),s.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(_)?_:{})};T.prototype.createShader=function(){var _=this.regl,w=_({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:w,atlas:{}}},T.prototype.update=function(_){var w=this;if(typeof _=="string")_={text:_};else if(!_)return;(_=g(_,{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(ge){return parseFloat(ge)}):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=T.baseFontSize+"px sans-serif");var k,L=!1,A=!1;
94if(_.font&&(Array.isArray(_.font)?_.font:[_.font]).forEach(function(ge,ke){if(typeof ge=="string")try{ge=m.parse(ge)}catch{ge=m.parse(T.baseFontSize+"px "+ge)}else ge=m.parse(m.stringify(ge));var be=m.stringify({size:T.baseFontSize,family:ge.family,stretch:x?ge.stretch:void 0,variant:ge.variant,weight:ge.weight,style:ge.style}),Se=l(ge.size),Oe=Math.round(Se[0]*a(Se[1]));if(Oe!==w.fontSize[ke]&&(A=!0,w.fontSize[ke]=Oe),!(w.font[ke]&&be==w.font[ke].baseString||(L=!0,w.font[ke]=T.fonts[be],w.font[ke]))){var De=ge.family.join(", "),je=[ge.style];ge.style!=ge.variant&&je.push(ge.variant),ge.variant!=ge.weight&&je.push(ge.weight),x&&ge.weight!=ge.stretch&&je.push(ge.stretch),w.font[ke]={baseString:be,family:De,weight:ge.weight,stretch:ge.stretch,style:ge.style,variant:ge.variant,width:{},kerning:{},metrics:o(De,{origin:"top",fontSize:T.baseFontSize,fontStyle:je.join(" ")})},T.fonts[be]=w.font[ke]}}),(L||A)&&this.font.forEach(function(ge,ke){var be=m.stringify({size:w.fontSize[ke],family:ge.family,stretch:x?ge.stretch:void 0,variant:ge.variant,weight:ge.weight,style:ge.style});if(w.fontAtlas[ke]=w.shader.atlas[be],!w.fontAtlas[ke]){var Se=ge.metrics;w.shader.atlas[be]=w.fontAtlas[ke]={fontString:be,step:2*Math.ceil(w.fontSize[ke]*Se.bottom*.5),em:w.fontSize[ke],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:w.regl.texture()}}_.text==null&&(_.text=w.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(ge,ke){T.atlasContext.font=ge.baseString;for(var be=w.fontAtlas[ke],Se=0;Se<w.text.length;Se++){var Oe=w.text.charAt(Se);if(be.ids[Oe]==null&&(be.ids[Oe]=be.chars.length,be.chars.push(Oe),k.push(Oe)),ge.width[Oe]==null&&(ge.width[Oe]=T.atlasContext.measureText(Oe).width/T.baseFontSize,w.kerning)){var De=[];for(var je in ge.width)De.push(je+Oe,Oe+je);f(ge.kerning,u(ge.family,{pairs:De}))}}})}if(_.position)if(_.position.length>2){for(var E=!_.position[0].length,D=i.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}),i.freeFloat(D)}else this.position.destroy&&this.position.destroy(),this.position={constant:_.position};if(_.text||L){var G=i.mallocUint8(this.count),W=i.mallocFloat(2*this.count);this.textWidth=[];for(var Q=0,R=0;Q<this.counts.length;Q++){for(var N=this.counts[Q],U=this.font[Q]||this.font[0],ee=this.fontAtlas[Q]||this.fontAtlas[0],j=0;j<N;j++){var X=this.text.charAt(R),J=this.text.charAt(R-1);if(G[R]=ee.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:G,type:"uint8",usage:"stream"}),this.sizeBuffer({data:W,type:"float",usage:"stream"}),i.freeUint8(G),i.freeFloat(W),k.length&&this.font.forEach(function(ge,ke){var be=w.fontAtlas[ke],Se=be.step,Oe=Math.floor(T.maxAtlasSize/Se),De=Math.min(Oe,be.chars.length),je=Math.ceil(be.chars.length/De),Je=p(De*Se),ze=p(je*Se);be.width=Je,be.height=ze,be.rows=je,be.cols=De,be.em&&be.texture({data:t({canvas:T.atlasCanvas,font:be.fontString,chars:be.chars,shape:[Je,ze],step:[Se,Se]})})})}if(_.align&&(this.align=_.align,this.alignOffset=this.textWidth.map(function(ge,ke){var be=Array.isArray(w.align)?w.align.length>1?w.align[ke]:w.align[0]:w.align;if(typeof be=="number")return be;switch(be){case"right":case"end":return-ge;case"center":case"centre":case"middle":return .5*-ge}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(ge,ke){var be=(w.font[ke]||w.font[0]).metrics,Se=0;return Se+=.5*be.bottom,Se+=typeof ge=="number"?ge-be.baseline:-be[ge],Se*=-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=i.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 _e=_.color.length;pe=i.mallocUint8(4*_e);for(var we=0;we<_e;we++)pe.set(n(_.color[we]||0,"uint8"),4*we)}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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text="",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement("canvas"),T.atlasContext=T.atlasCanvas.getContext("2d",{alpha:!1}),T.baseFontSize=64,T.fonts={},$.exports=T},{"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(v,$,te){(function(m){(function(){var g=v("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*m.innerWidth),document.body.style.height||(n.canvas.height=n.height||n.pixelRatio*m.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 y(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}$.exports=function(n){var t;if(n?typeof n=="string"&&(n={container:n}):n={},y(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}:g(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=m.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var i=document.querySelector(n.container);if(!i)throw Error("Element "+n.container+" is not found");n.container=i}y(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 Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{"pick-by-alias":253}],227:[function(v,$,te){$.exports=function(m){typeof m=="string"&&(m=[m]);
94for(var g=[].slice.call(arguments,1),b=[],y=0;y<m.length-1;y++)b.push(m[y],g[y]||"");return b.push(m[y]),b.join("")}},{}],228:[function(v,$,te){(function(m){(function(){var g,b=v("is-browser");g=typeof m.matchMedia=="function"?!m.matchMedia("(hover: none)").matches:b,$.exports=g}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{"is-browser":232}],229:[function(v,$,te){var m=v("is-browser");$.exports=m&&function(){var g=!1;try{var b=Object.defineProperty({},"passive",{get:function(){g=!0}});window.addEventListener("test",null,b),window.removeEventListener("test",null,b)}catch{g=!1}return g}()},{"is-browser":232}],230:[function(v,$,te){te.read=function(m,g,b,y,e){var n,t,i=8*e-y-1,r=(1<<i)-1,d=r>>1,l=-7,a=b?e-1:0,u=b?-1:1,f=m[g+a];for(a+=u,n=f&(1<<-l)-1,f>>=-l,l+=i;l>0;n=256*n+m[g+a],a+=u,l-=8);for(t=n&(1<<-l)-1,n>>=-l,l+=y;l>0;t=256*t+m[g+a],a+=u,l-=8);if(n===0)n=1-d;else{if(n===r)return t?NaN:1/0*(f?-1:1);t+=Math.pow(2,y),n-=d}return(f?-1:1)*t*Math.pow(2,n-y)},te.write=function(m,g,b,y,e,n){var t,i,r,d=8*n-e-1,l=(1<<d)-1,a=l>>1,u=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=y?0:n-1,o=y?1:-1,h=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(i=isNaN(g)?1:0,t=l):(t=Math.floor(Math.log(g)/Math.LN2),g*(r=Math.pow(2,-t))<1&&(t--,r*=2),(g+=t+a>=1?u/r:u*Math.pow(2,1-a))*r>=2&&(t++,r/=2),t+a>=l?(i=0,t=l):t+a>=1?(i=(g*r-1)*Math.pow(2,e),t+=a):(i=g*Math.pow(2,a-1)*Math.pow(2,e),t=0));e>=8;m[b+f]=255&i,f+=o,i/=256,e-=8);for(t=t<<e|i,d+=e;d>0;m[b+f]=255&t,f+=o,t/=256,d-=8);m[b+f-o]|=128*h}},{}],231:[function(v,$,te){typeof Object.create=="function"?$.exports=function(m,g){g&&(m.super_=g,m.prototype=Object.create(g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}))}:$.exports=function(m,g){if(g){m.super_=g;var b=function(){};b.prototype=g.prototype,m.prototype=new b,m.prototype.constructor=m}}},{}],232:[function(v,$,te){$.exports=!0},{}],233:[function(v,$,te){$.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],234:[function(v,$,te){$.exports=b,$.exports.isMobile=b,$.exports.default=b;var 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/i,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|android|ipad|playbook|silk/i;function b(y){y||(y={});var e=y.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=y.tablet?g.test(e):m.test(e);return!n&&y.tablet&&y.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(n=!0),n}},{}],235:[function(v,$,te){$.exports=function(m){var g=typeof m;return m!==null&&(g==="object"||g==="function")}},{}],236:[function(v,$,te){var m=Object.prototype.toString;$.exports=function(g){var b;return m.call(g)==="[object Object]"&&((b=Object.getPrototypeOf(g))===null||b===Object.getPrototypeOf({}))}},{}],237:[function(v,$,te){$.exports=function(m){for(var g,b=m.length,y=0;y<b;y++)if(((g=m.charCodeAt(y))<9||g>13)&&g!==32&&g!==133&&g!==160&&g!==5760&&g!==6158&&(g<8192||g>8205)&&g!==8232&&g!==8233&&g!==8239&&g!==8287&&g!==8288&&g!==12288&&g!==65279)return!1;return!0}},{}],238:[function(v,$,te){$.exports=function(m){return typeof m=="string"&&(m=m.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(m)&&/[\dz]$/i.test(m)&&m.length>4))}},{}],239:[function(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?$.exports=g():(m=m||self).mapboxgl=g()})(this,function(){var m,g,b;function y(e,n){if(m)if(g){var t="var sharedChunk = {}; ("+m+")(sharedChunk); ("+g+")(sharedChunk);",i={};m(i),(b=n(i)).workerUrl=window.URL.createObjectURL(new Blob([t],{type:"text/javascript"}))}else g=n;else m=n}return y(0,function(e){function n(M,O){return M(O={exports:{}},O.exports),O.exports}var t=i;function i(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}i.prototype.sampleCurveX=function(M){return((this.ax*M+this.bx)*M+this.cx)*M},i.prototype.sampleCurveY=function(M){return((this.ay*M+this.by)*M+this.cy)*M},i.prototype.sampleCurveDerivativeX=function(M){return(3*this.ax*M+2*this.bx)*M+this.cx},i.prototype.solveCurveX=function(M,O){var Y,ae,he,ve,Ae;for(O===void 0&&(O=1e-6),he=M,Ae=0;Ae<8;Ae++){if(ve=this.sampleCurveX(he)-M,Math.abs(ve)<O)return he;var Re=this.sampleCurveDerivativeX(he);
vendor: 5,210 bytes, line 94
94if(Math.abs(Re)<1e-6)break;he-=ve/Re}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},i.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 l(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 a=l(.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 o(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 Ae in ve)M[Ae]=ve[Ae]}return M}var h=1;function p(){return h++}function s(){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 c(M,O){M.forEach(function(Y){O[Y]&&(O[Y]=O[Y].bind(O))})}function T(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 w(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,Ae=void 0;Y<ae;he=Y++)ve=M[Y],O+=((Ae=M[he]).x-ve.x)*(ve.y+Ae.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,Ae){var Re=ve||Ae;return O[he]=!Re||Re.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,G,W=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),Q=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=Q(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},ee={supported:!1,testSupport:function(M){j||!G||(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,G),M.isContextLost())return;ee.supported=!0}
94catch{}M.deleteTexture(O),j=!0}self.document&&((G=self.document.createElement("img")).onload=function(){K&&J(K),K=null,X=!0},G.onerror=function(){j=!0,K=null},G.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=ee.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(Ae){for(var Re=0,Ze=Ae;Re<Ze.length;Re+=1){var lt=Ze[Re].match(/^access_token=(.*)$/);if(lt)return lt[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 Ae=ve[he];pe(Ae)?ae.push(this.canonicalizeTileURL(Ae,Y)):ae.push(Ae)}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 _e(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 we=function(M){this.type=M,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};we.prototype.getStorageKey=function(M){var O,Y=_e(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(Number("0x"+ve))}
94))):ae=U.ACCESS_TOKEN||"",M?"mapbox.eventData."+M+":"+ae:"mapbox.eventData:"+ae},we.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")}},we.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")}},we.prototype.processRequests=function(M){},we.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 Ae={event:this.type,created:new Date(M).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.1",skuId:re,userId:this.anonId},Re=O?o(Ae,O):Ae,Ze={url:xe(ve),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Re])};this.pendingRequest=Gt(Ze,function(lt){he.pendingRequest=null,Y(lt),he.saveEventData(),he.processRequests(ae)})}},we.prototype.queueRequest=function(M,O){this.queue.push(M),this.processRequests(O)};var Ee,fe,ge=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(Ae){return se(Ae)||pe(Ae)}))&&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,Ae=he.timestamp;ve&&this.success[ve]||(this.anonId||this.fetchEventData(),x(this.anonId)||(this.anonId=s()),this.postEvent(Ae,{skuToken:this.skuToken},function(Re){Re||ve&&(ae.success[ve]=!0)},Y))}},O}(we),ke=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=_e(U.ACCESS_TOKEN),ve=he?he.u:U.ACCESS_TOKEN,Ae=ve!==this.eventData.tokenU;x(this.anonId)||(this.anonId=s(),Ae=!0);var Re=this.queue.shift();if(this.eventData.lastSuccess){var Ze=new Date(this.eventData.lastSuccess),lt=new Date(Re),pt=(Re-this.eventData.lastSuccess)/864e5;Ae=Ae||pt>=1||pt<-1||Ze.getDate()!==lt.getDate()}else Ae=!0;if(!Ae)return this.processRequests();this.postEvent(Re,{"enabled.telemetry":!1},function(Ft){Ft||(ae.eventData.lastSuccess=Re,ae.eventData.tokenU=ve)},Y)}},O}(we)),be=ke.postTurnstileEvent.bind(ke),Se=new ge,Oe=Se.postMapLoadEvent.bind(Se),De=500,je=50;function Je(){self.caches&&!Ee&&(Ee=self.caches.open("mapbox-tiles"))}function ze(M,O,Y){if(Je(),Ee){var ae={status:O.status,statusText:O.statusText,headers:new self.Headers};O.headers.forEach(function(ve,Ae){return ae.headers.set(Ae,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,Ae){if(fe===void 0)try{new Response(new ReadableStream),fe=!0}catch{fe=!1}fe?Ae(ve.body):ve.blob().then(Ae)}(O,function(ve){var Ae=new self.Response(ve,ae);
94Je(),Ee&&Ee.then(function(Re){return Re.put(Ue(M.url),Ae)}).catch(function(Re){return A(Re.message)})}))}}function Ue(M){var O=M.indexOf("?");return O<0?M:M.slice(0,O)}function Ge(M,O){if(Je(),!Ee)return O(null);var Y=Ue(M.url);Ee.then(function(ae){ae.match(Y).then(function(he){var ve=function(Ae){if(!Ae)return!1;var Re=new Date(Ae.headers.get("Expires")||0),Ze=E(Ae.headers.get("Cache-Control")||"");return Re>Date.now()&&!Ze["no-cache"]}(he);ae.delete(Y),ve&&ae.put(Y,he.clone()),O(null,he,ve)}).catch(O)}).catch(O)}var Ye,et=1/0;function ct(){return Ye==null&&(Ye=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Ye}var mt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(mt);var Ct=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),Tt=S()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href};function nt(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:Tt(),signal:ae.signal}),ve=!1,Ae=!1,Re=(Y=he.url).indexOf("sku=")>0&&pe(Y);M.type==="json"&&he.headers.set("Accept","application/json");var Ze=function(pt,Ft,Wt){if(!Ae){if(pt&&pt.message!=="SecurityError"&&A(pt),Ft&&Wt)return lt(Ft);var qt=Date.now();self.fetch(he).then(function(nr){if(nr.ok){var dr=Re?nr.clone():null;return lt(nr,dr,qt)}return O(new Ct(nr.statusText,nr.status,M.url))}).catch(function(nr){nr.code!==20&&O(new Error(nr.message))})}},lt=function(pt,Ft,Wt){(M.type==="arrayBuffer"?pt.arrayBuffer():M.type==="json"?pt.json():pt.text()).then(function(qt){Ae||(Ft&&Wt&&ze(he,Ft,Wt),ve=!0,O(null,qt,pt.headers.get("Cache-Control"),pt.headers.get("Expires")))}).catch(function(qt){Ae||O(new Error(qt.message))})};return Re?Ge(he,Ze):Ze(null,null),{cancel:function(){Ae=!0,ve||ae.abort()}}}var Qe=function(M,O){if(Y=M.url,!(/^file:/.test(Y)||/^file:/.test(Tt())&&!/^\w+:/.test(Y))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return nt(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 Ae in ve.open(ae.method||"GET",ae.url,!0),ae.type==="arrayBuffer"&&(ve.responseType="arraybuffer"),ae.headers)ve.setRequestHeader(Ae,ae.headers[Ae]);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 Re=ve.response;if(ae.type==="json")try{Re=JSON.parse(ve.response)}catch(Ze){return he(Ze)}he(null,Re,ve.getResponseHeader("Cache-Control"),ve.getResponseHeader("Expires"))}else he(new Ct(ve.statusText,ve.status,ae.url))},ve.send(ae.body),{cancel:function(){return ve.abort()}}}(M,O)},Et=function(M,O){return Qe(o(M,{type:"arrayBuffer"}),O)},Gt=function(M,O){return Qe(o(M,{method:"POST"}),O)},Xt,Fe;Xt=[],Fe=0;var qe=function(M,O){if(ee.supported&&(M.headers||(M.headers={}),M.headers.accept="image/webp,*/*"),Fe>=U.MAX_PARALLEL_IMAGE_REQUESTS){var Y={requestParameters:M,callback:O,cancelled:!1,cancel:function(){this.cancelled=!0}};return Xt.push(Y),Y}Fe++;var ae=!1,he=function(){if(!ae)for(ae=!0,Fe--;Xt.length&&Fe<U.MAX_PARALLEL_IMAGE_REQUESTS;){var Ae=Xt.shift(),Re=Ae.requestParameters,Ze=Ae.callback;Ae.cancelled||(Ae.cancel=qe(Re,Ze).cancel)}},ve=Et(M,function(Ae,Re,Ze,lt){he(),Ae?O(Ae):Re&&(ct()?function(pt,Ft){var Wt=new self.Blob([new Uint8Array(pt)],{type:"image/png"});self.createImageBitmap(Wt).then(function(qt){Ft(null,qt)}).catch(function(qt){Ft(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."))})}(Re,O):function(pt,Ft,Wt,qt){var nr=new self.Image,dr=self.URL;nr.onload=function(){Ft(null,nr),dr.revokeObjectURL(nr.src)},nr.onerror=function(){return Ft(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 Ar=new self.Blob([new Uint8Array(pt)],{type:"image/png"});nr.cacheControl=Wt,nr.expires=qt,nr.src=pt.byteLength?dr.createObjectURL(Ar):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(Re,O,Ze,lt))});return{cancel:function(){ve.cancel(),he()}}};function wt(M,O,Y){Y[M]&&Y[M].indexOf(O)!==-1||(Y[M]=Y[M]||[],Y[M].push(O))}
vendor: 3,891 bytes, line 94
94function ft(M,O,Y){if(Y&&Y[M]){var ae=Y[M].indexOf(O);ae!==-1&&Y[M].splice(ae,1)}}var Ce=function(M,O){O===void 0&&(O={}),o(this,O),this.type=M},Ie=function(M){function O(Y,ae){ae===void 0&&(ae={}),M.call(this,"error",o({error:Y},ae))}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O}(Ce),Te=function(){};Te.prototype.on=function(M,O){return this._listeners=this._listeners||{},wt(M,O,this._listeners),this},Te.prototype.off=function(M,O){return ft(M,O,this._listeners),ft(M,O,this._oneTimeListeners),this},Te.prototype.once=function(M,O){return this._oneTimeListeners=this._oneTimeListeners||{},wt(M,O,this._oneTimeListeners),this},Te.prototype.fire=function(M,O){typeof M=="string"&&(M=new Ce(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,Ae=this._oneTimeListeners&&this._oneTimeListeners[Y]?this._oneTimeListeners[Y].slice():[];ve<Ae.length;ve+=1){var Re=Ae[ve];ft(Y,Re,this._oneTimeListeners),Re.call(this,M)}var Ze=this._eventedParent;Ze&&(o(M,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ze.fire(M))}else M instanceof Ie&&console.error(M.error);return this},Te.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)},Te.prototype.setEventedParent=function(M,O){return this._eventedParent=M,this._eventedParentData=O,this};var Pe={$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"}}}
94,Ve=function(M,O,Y,ae){this.message=(M?M+": ":"")+Y,ae&&(this.identifier=ae),O!=null&&O.__line__&&(this.line=O.__line__)};function tt(M){var O=M.key,Y=M.value;return Y?[new Ve(O,Y,"constants have been deprecated as of v8")]:[]}function ot(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 Ae in ve)M[Ae]=ve[Ae]}return M}function at(M){return M instanceof Number||M instanceof String||M instanceof Boolean?M.valueOf():M}function _t(M){if(Array.isArray(M))return M.map(_t);if(M instanceof Object&&!(M instanceof Number||M instanceof String||M instanceof Boolean)){var O={};for(var Y in M)O[Y]=_t(M[Y]);return O}return at(M)}var bt=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),jt=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],Ae=he[1];this.bindings[ve]=Ae}};jt.prototype.concat=function(M){return new jt(this,M)},jt.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.")},jt.prototype.has=function(M){return!!this.bindings[M]||!!this.parent&&this.parent.has(M)};var Nt={kind:"null"},$e={kind:"number"},yt={kind:"string"},Ot={kind:"boolean"},Mt={kind:"color"},Pt={kind:"object"},Le={kind:"value"},Xe={kind:"collator"},it={kind:"formatted"},At={kind:"resolvedImage"};function It(M,O){return{kind:"array",itemType:M,N:O}}function Zt(M){if(M.kind==="array"){var O=Zt(M.itemType);return typeof M.N=="number"?"array<"+O+", "+M.N+">":M.itemType.kind==="value"?"array":"array<"+O+">"}return M.kind}var Jt=[Nt,$e,yt,Ot,Mt,it,Pt,It(Le),At];function Vt(M,O){if(O.kind==="error")return null;if(M.kind==="array"){if(O.kind==="array"&&(O.N===0&&O.itemType.kind==="value"||!Vt(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=Jt;Y<ae.length;Y+=1)if(!Vt(ae[Y],O))return null}}return"Expected "+Zt(M)+" but found "+Zt(O)+" instead."}function pr(M,O){return O.some(function(Y){return Y.kind===M.kind})}function Ir(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 fr=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]};function ae(Ze){return(Ze=Math.round(Ze))<0?0:Ze>255?255:Ze}function he(Ze){return Ze<0?0:Ze>1?1:Ze}function ve(Ze){return Ze[Ze.length-1]==="%"?ae(parseFloat(Ze)/100*255):ae(parseInt(Ze))}function Ae(Ze){return Ze[Ze.length-1]==="%"?he(parseFloat(Ze)/100):he(parseFloat(Ze))}function Re(Ze,lt,pt){return pt<0?pt+=1:pt>1&&(pt-=1),6*pt<1?Ze+(lt-Ze)*pt*6:2*pt<1?lt:3*pt<2?Ze+(lt-Ze)*(2/3-pt)*6:Ze}try{O.parseCSSColor=function(Ze){var lt,pt=Ze.replace(/ /g,"").toLowerCase();if(pt in Y)return Y[pt].slice();if(pt[0]==="#")return pt.length===4?(lt=parseInt(pt.substr(1),16))>=0&<<=4095?[(3840<)>>4|(3840<)>>8,240<|(240<)>>4,15<|(15<)<<4,1]:null:pt.length===7&&(lt=parseInt(pt.substr(1),16))>=0&<<=16777215?[(16711680<)>>16,(65280<)>>8,255<,1]:null;var Ft=pt.indexOf("("),Wt=pt.indexOf(")");if(Ft!==-1&&Wt+1===pt.length){var qt=pt.substr(0,Ft),nr=pt.substr(Ft+1,Wt-(Ft+1)).split(","),dr=1;switch(qt){case"rgba":if(nr.length!==4)return null;dr=Ae(nr.pop());case"rgb":return nr.length!==3?null:[ve(nr[0]),ve(nr[1]),ve(nr[2]),dr];case"hsla":if(nr.length!==4)return null;dr=Ae(nr.pop());case"hsl":if(nr.length!==3)return null;var Ar=(parseFloat(nr[0])%360+360)%360/360,Mr=Ae(nr[1]),Nr=Ae(nr[2]),jr=Nr<=.5?Nr*(Mr+1):Nr+Mr-Nr*Mr,Yr=2*Nr-jr;return[ae(255*Re(Yr,jr,Ar+1/3)),ae(255*Re(Yr,jr,Ar)),ae(255*Re(Yr,jr,Ar-1/3)),dr];default:return null}}return null}}catch{}}).parseCSSColor,$t=function(M,O,Y,ae){ae===void 0&&(ae=1),this.r=M,this.g=O,this.b=Y,this.a=ae};$t.parse=function(M){if(M){if(M instanceof $t)return M;
94if(typeof M=="string"){var O=fr(M);if(O)return new $t(O[0]/255*O[3],O[1]/255*O[3],O[2]/255*O[3],O[3])}}},$t.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+")"},$t.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]},$t.black=new $t(0,0,0,1),$t.white=new $t(1,1,1,1),$t.transparent=new $t(0,0,0,0),$t.red=new $t(1,0,0,1);var er=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"})};er.prototype.compare=function(M,O){return this.collator.compare(M,O)},er.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ar=function(M,O,Y,ae,he){this.text=M,this.image=O,this.scale=Y,this.fontStack=ae,this.textColor=he},hr=function(M){this.sections=M};hr.fromString=function(M){return new hr([new ar(M,null,null,null,null)])},hr.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})},hr.factory=function(M){return M instanceof hr?M:hr.fromString(M)},hr.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(M){return M.text}).join("")},hr.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 vr=function(M){this.name=M.name,this.available=M.available};function Pr(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 Ur(M){if(M===null||typeof M=="string"||typeof M=="boolean"||typeof M=="number"||M instanceof $t||M instanceof er||M instanceof hr||M instanceof vr)return!0;if(Array.isArray(M)){for(var O=0,Y=M;O<Y.length;O+=1)if(!Ur(Y[O]))return!1;return!0}if(typeof M=="object"){for(var ae in M)if(!Ur(M[ae]))return!1;return!0}return!1}function qr(M){if(M===null)return Nt;if(typeof M=="string")return yt;if(typeof M=="boolean")return Ot;if(typeof M=="number")return $e;if(M instanceof $t)return Mt;if(M instanceof er)return Xe;if(M instanceof hr)return it;if(M instanceof vr)return At;if(Array.isArray(M)){for(var O,Y=M.length,ae=0,he=M;ae<he.length;ae+=1){var ve=qr(he[ae]);if(O){if(O===ve)continue;O=Le;break}O=ve}return It(O||Le,Y)}return Pt}function rn(M){var O=typeof M;return M===null?"":O==="string"||O==="number"||O==="boolean"?String(M):M instanceof $t||M instanceof hr||M instanceof vr?M.toString():JSON.stringify(M)}vr.prototype.toString=function(){return this.name},vr.fromString=function(M){return M?new vr({name:M,available:!1}):null},vr.prototype.serialize=function(){return["image",this.name]};var An=function(M,O){this.type=M,this.value=O};An.parse=function(M,O){if(M.length!==2)return O.error("'literal' expression requires exactly one argument, but found "+(M.length-1)+" instead.");
vendor: 4,921 bytes, line 94
94if(!Ur(M[1]))return O.error("invalid value");var Y=M[1],ae=qr(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 An(ae,Y)},An.prototype.evaluate=function(){return this.value},An.prototype.eachChild=function(){},An.prototype.outputDefined=function(){return!0},An.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof $t?["rgba"].concat(this.value.toArray()):this.value instanceof hr?this.value.serialize():this.value};var mn=function(M){this.name="ExpressionEvaluationError",this.message=M};mn.prototype.toJSON=function(){return this.message};var Mn={string:yt,number:$e,boolean:Ot,object:Pt},Xr=function(M,O){this.type=M,this.args=O};Xr.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,Ae;if(M.length>2){var Re=M[1];if(typeof Re!="string"||!(Re in Mn)||Re==="object")return O.error('The item type argument of "array" must be one of string, number, boolean',1);ve=Mn[Re],ae++}else ve=Le;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);Ae=M[2],ae++}Y=It(ve,Ae)}else Y=Mn[he];for(var Ze=[];ae<M.length;ae++){var lt=O.parse(M[ae],ae,Le);if(!lt)return null;Ze.push(lt)}return new Xr(Y,Ze)},Xr.prototype.evaluate=function(M){for(var O=0;O<this.args.length;O++){var Y=this.args[O].evaluate(M);if(!Vt(this.type,qr(Y)))return Y;if(O===this.args.length-1)throw new mn("Expected value to be of type "+Zt(this.type)+", but found "+Zt(qr(Y))+" instead.")}return null},Xr.prototype.eachChild=function(M){this.args.forEach(M)},Xr.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},Xr.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 Er=function(M){this.type=it,this.sections=M};Er.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 Ae=M[ve];if(he&&typeof Ae=="object"&&!Array.isArray(Ae)){he=!1;var Re=null;if(Ae["font-scale"]&&!(Re=O.parse(Ae["font-scale"],1,$e)))return null;var Ze=null;if(Ae["text-font"]&&!(Ze=O.parse(Ae["text-font"],1,It(yt))))return null;var lt=null;if(Ae["text-color"]&&!(lt=O.parse(Ae["text-color"],1,Mt)))return null;var pt=ae[ae.length-1];pt.scale=Re,pt.font=Ze,pt.textColor=lt}else{var Ft=O.parse(M[ve],1,Le);if(!Ft)return null;var Wt=Ft.type.kind;if(Wt!=="string"&&Wt!=="value"&&Wt!=="null"&&Wt!=="resolvedImage")return O.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");he=!0,ae.push({content:Ft,scale:null,font:null,textColor:null})}}return new Er(ae)},Er.prototype.evaluate=function(M){return new hr(this.sections.map(function(O){var Y=O.content.evaluate(M);return qr(Y)===At?new ar("",Y,null,null,null):new ar(rn(Y),null,O.scale?O.scale.evaluate(M):null,O.font?O.font.evaluate(M).join(","):null,O.textColor?O.textColor.evaluate(M):null)}))},Er.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)}},Er.prototype.outputDefined=function(){return!1},Er.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 on=function(M){this.type=At,this.input=M};on.parse=function(M,O){if(M.length!==2)return O.error("Expected two arguments.");var Y=O.parse(M[1],1,yt);return Y?new on(Y):O.error("No image name provided.")},on.prototype.evaluate=function(M){var O=this.input.evaluate(M),Y=vr.fromString(O);return Y&&M.availableImages&&(Y.available=M.availableImages.indexOf(O)>-1),Y},on.prototype.eachChild=function(M){M(this.input)},on.prototype.outputDefined=function(){return!1},on.prototype.serialize=function(){return["image",this.input.serialize()]};var Un={"to-boolean":Ot,"to-color":Mt,"to-number":$e,"to-string":yt},Tr=function(M,O){this.type=M,this.args=O};Tr.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=Un[Y],he=[],ve=1;ve<M.length;ve++){var Ae=O.parse(M[ve],ve,Le);
94if(!Ae)return null;he.push(Ae)}return new Tr(ae,he)},Tr.prototype.evaluate=function(M){if(this.type.kind==="boolean")return Boolean(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 $t)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.":Pr(O[0],O[1],O[2],O[3])))return new $t(O[0]/255,O[1]/255,O[2]/255,O[3])}throw new mn(Y||"Could not parse color from value '"+(typeof O=="string"?O:String(JSON.stringify(O)))+"'")}if(this.type.kind==="number"){for(var Ae=null,Re=0,Ze=this.args;Re<Ze.length;Re+=1){if((Ae=Ze[Re].evaluate(M))===null)return 0;var lt=Number(Ae);if(!isNaN(lt))return lt}throw new mn("Could not convert "+JSON.stringify(Ae)+" to number.")}return this.type.kind==="formatted"?hr.fromString(rn(this.args[0].evaluate(M))):this.type.kind==="resolvedImage"?vr.fromString(rn(this.args[0].evaluate(M))):rn(this.args[0].evaluate(M))},Tr.prototype.eachChild=function(M){this.args.forEach(M)},Tr.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},Tr.prototype.serialize=function(){if(this.type.kind==="formatted")return new Er([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new on(this.args[0]).serialize();var M=["to-"+this.type.kind];return this.eachChild(function(O){M.push(O.serialize())}),M};var en=["Unknown","Point","LineString","Polygon"],$r=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};$r.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},$r.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?en[this.feature.type]:this.feature.type:null},$r.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},$r.prototype.canonicalID=function(){return this.canonical},$r.prototype.properties=function(){return this.feature&&this.feature.properties||{}},$r.prototype.parseColor=function(M){var O=this._parseColorCache[M];return O||(O=this._parseColorCache[M]=$t.parse(M)),O};var Rr=function(M,O,Y,ae){this.name=M,this.type=O,this._evaluate=Y,this.args=ae};Rr.prototype.evaluate=function(M){return this._evaluate(M,this.args)},Rr.prototype.eachChild=function(M){this.args.forEach(M)},Rr.prototype.outputDefined=function(){return!1},Rr.prototype.serialize=function(){return[this.name].concat(this.args.map(function(M){return M.serialize()}))}
94,Rr.parse=function(M,O){var Y,ae=M[0],he=Rr.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,Ae=Array.isArray(he)?[[he[1],he[2]]]:he.overloads,Re=Ae.filter(function(sa){var Qn=sa[0];return!Array.isArray(Qn)||Qn.length===M.length-1}),Ze=null,lt=0,pt=Re;lt<pt.length;lt+=1){var Ft=pt[lt],Wt=Ft[0],qt=Ft[1];Ze=new nn(O.registry,O.path,null,O.scope);for(var nr=[],dr=!1,Ar=1;Ar<M.length;Ar++){var Mr=M[Ar],Nr=Array.isArray(Wt)?Wt[Ar-1]:Wt.type,jr=Ze.parse(Mr,1+nr.length,Nr);if(!jr){dr=!0;break}nr.push(jr)}if(!dr)if(Array.isArray(Wt)&&Wt.length!==nr.length)Ze.error("Expected "+Wt.length+" arguments, but found "+nr.length+" instead.");else{for(var Yr=0;Yr<nr.length;Yr++){var fn=Array.isArray(Wt)?Wt[Yr]:Wt.type,yn=nr[Yr];Ze.concat(Yr+1).checkSubtype(fn,yn.type)}if(Ze.errors.length===0)return new Rr(ae,ve,qt,nr)}}if(Re.length===1)(Y=O.errors).push.apply(Y,Ze.errors);else{for(var Bn=(Re.length?Re:Ae).map(function(sa){var Qn,da=sa[0];return Qn=da,Array.isArray(Qn)?"("+Qn.map(Zt).join(", ")+")":"("+Zt(Qn.type)+"...)"}).join(" | "),Rn=[],Yn=1;Yn<M.length;Yn++){var oa=O.parse(M[Yn],1+Rn.length);if(!oa)return null;Rn.push(Zt(oa.type))}O.error("Expected arguments of type "+Bn+", but found ("+Rn.join(", ")+") instead.")}return null},Rr.register=function(M,O){for(var Y in Rr.definitions=O,O)M[Y]=Rr};var Pn=function(M,O,Y){this.type=Xe,this.locale=Y,this.caseSensitive=M,this.diacriticSensitive=O};Pn.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,Ot);if(!ae)return null;var he=O.parse(Y["diacritic-sensitive"]!==void 0&&Y["diacritic-sensitive"],1,Ot);if(!he)return null;var ve=null;return Y.locale&&!(ve=O.parse(Y.locale,1,yt))?null:new Pn(ae,he,ve)},Pn.prototype.evaluate=function(M){return new er(this.caseSensitive.evaluate(M),this.diacriticSensitive.evaluate(M),this.locale?this.locale.evaluate(M):null)},Pn.prototype.eachChild=function(M){M(this.caseSensitive),M(this.diacriticSensitive),this.locale&&M(this.locale)},Pn.prototype.outputDefined=function(){return!1},Pn.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 Nn(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 hn(M,O){return!(M[0]<=O[0])&&!(M[2]>=O[2])&&!(M[1]<=O[1])&&!(M[3]>=O[3])}function Fn(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 ca(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 sr(M,O){for(var Y,ae,he,ve,Ae,Re,Ze,lt=!1,pt=0,Ft=O.length;pt<Ft;pt++)for(var Wt=O[pt],qt=0,nr=Wt.length;qt<nr-1;qt++){if(Y=M,ae=Wt[qt],he=Wt[qt+1],ve=void 0,Ae=void 0,Re=void 0,Ze=void 0,ve=Y[0]-ae[0],Ae=Y[1]-ae[1],Re=Y[0]-he[0],Ze=Y[1]-he[1],ve*Ze-Re*Ae==0&&ve*Re<=0&&Ae*Ze<=0)return!1;ca(M,Wt[qt],Wt[qt+1])&&(lt=!lt)}return lt}function Fr(M,O){for(var Y=0;Y<O.length;Y++)if(sr(M,O[Y]))return!0;return!1}function Bt(M,O,Y,ae){var he=M[0]-Y[0],ve=M[1]-Y[1],Ae=O[0]-Y[0],Re=O[1]-Y[1],Ze=ae[0]-Y[0],lt=ae[1]-Y[1],pt=he*lt-Ze*ve,Ft=Ae*lt-Ze*Re;return pt>0&&Ft<0||pt<0&&Ft>0}function lr(M,O,Y){for(var ae=0,he=Y;ae<he.length;ae+=1)for(var ve=he[ae],Ae=0;Ae<ve.length-1;++Ae)if(Re=M,Ze=O,lt=ve[Ae],pt=ve[Ae+1],Ft=void 0,Wt=void 0,qt=void 0,nr=void 0,qt=[Ze[0]-Re[0],Ze[1]-Re[1]],nr=[pt[0]-lt[0],pt[1]-lt[1]],(Ft=nr)[0]*(Wt=qt)[1]-Ft[1]*Wt[0]!=0&&Bt(Re,Ze,lt,pt)&&Bt(lt,pt,Re,Ze))return!0;var Re,Ze,lt,pt,Ft,Wt,qt,nr;return!1}function mr(M,O){for(var Y=0;Y<M.length;++Y)if(!sr(M[Y],O))return!1;for(var ae=0;ae<M.length-1;++ae)if(lr(M[ae],M[ae+1],O))return!1;return!0}function Vr(M,O){for(var Y=0;Y<O.length;Y++)if(mr(M,O[Y]))return!0;return!1}function Br(M,O,Y){for(var ae=[],he=0;he<M.length;he++){for(var ve=[],Ae=0;Ae<M[he].length;Ae++){var Re=Fn(M[he][Ae],Y);Nn(O,Re),ve.push(Re)}ae.push(ve)}return ae}function Dr(M,O,Y){for(var ae=[],he=0;he<M.length;he++){var ve=Br(M[he],O,Y);ae.push(ve)}return ae}function Or(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}Nn(O,M)}function xr(M,O,Y,ae){for(var he=8192*Math.pow(2,ae.z),ve=[8192*ae.x,8192*ae.y],Ae=[],Re=0,Ze=M;Re<Ze.length;Re+=1)for(var lt=0,pt=Ze[Re];lt<pt.length;lt+=1){var Ft=pt[lt],Wt=[Ft.x+ve[0],Ft.y+ve[1]];Or(Wt,O,Y,he),Ae.push(Wt)}return Ae}function br(M,O,Y,ae){for(var he,ve=8192*Math.pow(2,ae.z),Ae=[8192*ae.x,8192*ae.y],Re=[],Ze=0,lt=M;Ze<lt.length;Ze+=1){for(var pt=[],Ft=0,Wt=lt[Ze];Ft<Wt.length;Ft+=1){var qt=Wt[Ft],nr=[qt.x+Ae[0],qt.y+Ae[1]];Nn(O,nr),pt.push(nr)}Re.push(pt)}if(O[2]-O[0]<=ve/2){(he=O)[0]=he[1]=1/0,he[2]=he[3]=-1/0;for(var dr=0,Ar=Re;dr<Ar.length;dr+=1)for(var Mr=0,Nr=Ar[dr];Mr<Nr.length;Mr+=1)Or(Nr[Mr],O,Y,ve)}return Re}var _r=function(M,O){this.type=Ot,this.geojson=M,this.geometries=O};function Cr(M){if(M instanceof Rr&&(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 _r)return!1;var O=!0;return M.eachChild(function(Y){O&&!Cr(Y)&&(O=!1)}),O}function Wr(M){if(M instanceof Rr&&M.name==="feature-state")return!1;var O=!0;return M.eachChild(function(Y){O&&!Wr(Y)&&(O=!1)}),O}function Gr(M,O){if(M instanceof Rr&&O.indexOf(M.name)>=0)return!1;var Y=!0;return M.eachChild(function(ae){Y&&!Gr(ae,O)&&(Y=!1)}),Y}_r.parse=function(M,O){if(M.length!==2)return O.error("'within' expression requires exactly one argument, but found "+(M.length-1)+" instead.");if(Ur(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 _r(Y,Y.features[ae].geometry)}else if(Y.type==="Feature"){var ve=Y.geometry.type;if(ve==="Polygon"||ve==="MultiPolygon")return new _r(Y,Y.geometry)}else if(Y.type==="Polygon"||Y.type==="MultiPolygon")return new _r(Y,Y)}return O.error("'within' expression requires valid geojson object that contains polygon geometry type.")},_r.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 Ae=Br(Y.coordinates,he,ve),Re=xr(O.geometry(),ae,he,ve);if(!hn(ae,he))return!1;for(var Ze=0,lt=Re;Ze<lt.length;Ze+=1)if(!sr(lt[Ze],Ae))return!1}if(Y.type==="MultiPolygon"){var pt=Dr(Y.coordinates,he,ve),Ft=xr(O.geometry(),ae,he,ve);if(!hn(ae,he))return!1;for(var Wt=0,qt=Ft;Wt<qt.length;Wt+=1)if(!Fr(qt[Wt],pt))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 Ae=Br(Y.coordinates,he,ve),Re=br(O.geometry(),ae,he,ve);if(!hn(ae,he))return!1;for(var Ze=0,lt=Re;Ze<lt.length;Ze+=1)if(!mr(lt[Ze],Ae))return!1}if(Y.type==="MultiPolygon"){var pt=Dr(Y.coordinates,he,ve),Ft=br(O.geometry(),ae,he,ve);if(!hn(ae,he))return!1;for(var Wt=0,qt=Ft;Wt<qt.length;Wt+=1)if(!Vr(qt[Wt],pt))return!1}return!0}(M,this.geometries)}return!1},_r.prototype.eachChild=function(){},_r.prototype.outputDefined=function(){return!0},_r.prototype.serialize=function(){return["within",this.geojson]};var tn=function(M,O){this.type=O.type,this.name=M,this.boundExpression=O};tn.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 tn(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)},tn.prototype.evaluate=function(M){return this.boundExpression.evaluate(M)},tn.prototype.eachChild=function(){},tn.prototype.outputDefined=function(){return!1},tn.prototype.serialize=function(){return["var",this.name]};var nn=function(M,O,Y,ae,he){O===void 0&&(O=[]),ae===void 0&&(ae=new jt),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 vn(M,O){for(var Y,ae,he=M.length-1,ve=0,Ae=he,Re=0;ve<=Ae;)if(Y=M[Re=Math.floor((ve+Ae)/2)],ae=M[Re+1],Y<=O){if(Re===he||O<ae)return Re;ve=Re+1}else{if(!(Y>O))throw new mn("Input is not a number.");Ae=Re-1}return 0}nn.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)},nn.prototype._parse=function(M,O){function Y(lt,pt,Ft){return Ft==="assert"?new Xr(pt,[lt]):Ft==="coerce"?new Tr(pt,[lt]):lt}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 Ae=this.expectedType,Re=ve.type;if(Ae.kind!=="string"&&Ae.kind!=="number"&&Ae.kind!=="boolean"&&Ae.kind!=="object"&&Ae.kind!=="array"||Re.kind!=="value")if(Ae.kind!=="color"&&Ae.kind!=="formatted"&&Ae.kind!=="resolvedImage"||Re.kind!=="value"&&Re.kind!=="string"){if(this.checkSubtype(Ae,Re))return null}else ve=Y(ve,Ae,O.typeAnnotation||"coerce");else ve=Y(ve,Ae,O.typeAnnotation||"assert")}if(!(ve instanceof An)&&ve.type.kind!=="resolvedImage"&&function lt(pt){if(pt instanceof tn)return lt(pt.boundExpression);if(pt instanceof Rr&&pt.name==="error"||pt instanceof Pn||pt instanceof _r)return!1;var Ft=pt instanceof Tr||pt instanceof Xr,Wt=!0;return pt.eachChild(function(qt){Wt=Ft?Wt&<(qt):Wt&&qt instanceof An}),Wt?Cr(pt)&&Gr(pt,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}(ve)){var Ze=new $r;try{ve=new An(ve.type,ve.evaluate(Ze))}catch(lt){return this.error(lt.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.")},nn.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 nn(this.registry,ae,O||null,he,this.errors)},nn.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 bt(ae,M))},nn.prototype.checkSubtype=function(M,O){var Y=Vt(M,O);return Y&&this.error(Y),Y};var xn=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],Ae=ve[0],Re=ve[1];this.labels.push(Ae),this.outputs.push(Re)}};function bn(M,O,Y){return M*(1-Y)+O*Y}xn.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,$e);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 Ae=ve===1?-1/0:M[ve],Re=M[ve+1],Ze=ve,lt=ve+1;if(typeof Ae!="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.',Ze);if(ae.length&&ae[ae.length-1][0]>=Ae)return O.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ze);var pt=O.parse(Re,lt,he);if(!pt)return null;he=he||pt.type,ae.push([Ae,pt])}return new xn(he,Y,ae)},xn.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[vn(O,ae)].evaluate(M)},xn.prototype.eachChild=function(M){M(this.input);for(var O=0,Y=this.outputs;O<Y.length;O+=1)M(Y[O])},xn.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})},xn.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 En=Object.freeze({__proto__:null,number:bn,color:function(M,O,Y){return new $t(bn(M.r,O.r,Y),bn(M.g,O.g,Y),bn(M.b,O.b,Y),bn(M.a,O.a,Y))},array:function(M,O,Y){return M.map(function(ae,he){return bn(ae,O[he],Y)})}}),In=6/29,Wn=3*In*In,Ma=Math.PI/180,ka=180/Math.PI;function kn(M){return M>.008856451679035631?Math.pow(M,1/3):M/Wn+4/29}function $n(M){return M>In?M*M*M:Wn*(M-4/29)}function Jn(M){return 255*(M<=.0031308?12.92*M:1.055*Math.pow(M,1/2.4)-.055)}function Oa(M){return(M/=255)<=.04045?M/12.92:Math.pow((M+.055)/1.055,2.4)}function mi(M){var O=Oa(M.r),Y=Oa(M.g),ae=Oa(M.b),he=kn((.4124564*O+.3575761*Y+.1804375*ae)/.95047),ve=kn((.2126729*O+.7151522*Y+.072175*ae)/1);return{l:116*ve-16,a:500*(he-ve),b:200*(ve-kn((.0193339*O+.119192*Y+.9503041*ae)/1.08883)),alpha:M.a}}function Di(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*$n(O),Y=.95047*$n(Y),ae=1.08883*$n(ae),new $t(Jn(3.2404542*Y-1.5371385*O-.4985314*ae),Jn(-.969266*Y+1.8760108*O+.041556*ae),Jn(.0556434*Y-.2040259*O+1.0572252*ae),M.alpha)}function uo(M,O,Y){var ae=O-M;return M+Y*(ae>180||ae<-180?ae-360*Math.round(ae/360):ae)}var Ya={forward:mi,reverse:Di,interpolate:function(M,O,Y){return{l:bn(M.l,O.l,Y),a:bn(M.a,O.a,Y),b:bn(M.b,O.b,Y),alpha:bn(M.alpha,O.alpha,Y)}}},Wa={forward:function(M){var O=mi(M),Y=O.l,ae=O.a,he=O.b,ve=Math.atan2(he,ae)*ka;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*Ma,Y=M.c;return Di({l:M.l,a:Math.cos(O)*Y,b:Math.sin(O)*Y,alpha:M.alpha})},interpolate:function(M,O,Y){return{h:uo(M.h,O.h,Y),c:bn(M.c,O.c,Y),l:bn(M.l,O.l,Y),alpha:bn(M.alpha,O.alpha,Y)}}},Ki=Object.freeze({__proto__:null,lab:Ya,hcl:Wa}),Ba=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,Ae=he;ve<Ae.length;ve+=1){var Re=Ae[ve],Ze=Re[0],lt=Re[1];this.labels.push(Ze),this.outputs.push(lt)}};function fo(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)}Ba.interpolationFactor=function(M,O,Y,ae){var he=0;if(M.name==="exponential")he=fo(O,M.base,Y,ae);else if(M.name==="linear")he=fo(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(fo(O,1,Y,ae))}return he},Ba.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 Ae=ae[1];if(typeof Ae!="number")return O.error("Exponential interpolation requires a numeric base.",1,1);ae={name:"exponential",base:Ae}}else{if(ae[0]!=="cubic-bezier")return O.error("Unknown interpolation type "+String(ae[0]),1,0);var Re=ae.slice(1);if(Re.length!==4||Re.some(function(Ar){return typeof Ar!="number"||Ar<0||Ar>1}))return O.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ae={name:"cubic-bezier",controlPoints:Re}}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,$e)))return null;var Ze=[],lt=null;Y==="interpolate-hcl"||Y==="interpolate-lab"?lt=Mt:O.expectedType&&O.expectedType.kind!=="value"&&(lt=O.expectedType);for(var pt=0;pt<ve.length;pt+=2){var Ft=ve[pt],Wt=ve[pt+1],qt=pt+3,nr=pt+4;if(typeof Ft!="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(Ze.length&&Ze[Ze.length-1][0]>=Ft)return O.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',qt);var dr=O.parse(Wt,nr,lt);if(!dr)return null;lt=lt||dr.type,Ze.push([Ft,dr])}return lt.kind==="number"||lt.kind==="color"||lt.kind==="array"&<.itemType.kind==="number"&&typeof lt.N=="number"?new Ba(lt,Y,ae,he,Ze):O.error("Type "+Zt(lt)+" is not interpolatable.")},Ba.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=vn(O,ae),Ae=O[ve],Re=O[ve+1],Ze=Ba.interpolationFactor(this.interpolation,ae,Ae,Re),lt=Y[ve].evaluate(M),pt=Y[ve+1].evaluate(M);return this.operator==="interpolate"?En[this.type.kind.toLowerCase()](lt,pt,Ze):this.operator==="interpolate-hcl"?Wa.reverse(Wa.interpolate(Wa.forward(lt),Wa.forward(pt),Ze)):Ya.reverse(Ya.interpolate(Ya.forward(lt),Ya.forward(pt),Ze))},Ba.prototype.eachChild=function(M){M(this.input);for(var O=0,Y=this.outputs;O<Y.length;O+=1)M(Y[O])},Ba.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})},Ba.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 go=function(M,O){this.type=M,this.args=O};go.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,Ae=M.slice(1);ve<Ae.length;ve+=1){var Re=Ae[ve],Ze=O.parse(Re,1+he.length,Y,void 0,{typeAnnotation:"omit"});if(!Ze)return null;Y=Y||Ze.type,he.push(Ze)}var lt=ae&&he.some(function(pt){return Vt(ae,pt.type)});return new go(lt?Le:Y,he)},go.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 vr&&!Y.available&&(O||(O=Y.name),Y=null,ae===this.args.length&&(Y=O)),Y===null);he+=1);return Y},go.prototype.eachChild=function(M){this.args.forEach(M)},go.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},go.prototype.serialize=function(){var M=["coalesce"];return this.eachChild(function(O){M.push(O.serialize())}),M};var Ti=function(M,O){this.type=O.type,this.bindings=[].concat(M),this.result=O};Ti.prototype.evaluate=function(M){return this.result.evaluate(M)},Ti.prototype.eachChild=function(M){for(var O=0,Y=this.bindings;O<Y.length;O+=1)M(Y[O][1]);M(this.result)},Ti.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 Ae=O.parse(M[M.length-1],M.length-1,O.expectedType,Y);return Ae?new Ti(Y,Ae):null},Ti.prototype.outputDefined=function(){return this.result.outputDefined()},Ti.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 Qi=function(M,O,Y){this.type=M,this.index=O,this.input=Y};Qi.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,$e),ae=O.parse(M[2],2,It(O.expectedType||Le));if(!Y||!ae)return null;var he=ae.type;return new Qi(he.itemType,Y,ae)},Qi.prototype.evaluate=function(M){var O=this.index.evaluate(M),Y=this.input.evaluate(M);if(O<0)throw new mn("Array index out of bounds: "+O+" < 0.");if(O>=Y.length)throw new mn("Array index out of bounds: "+O+" > "+(Y.length-1)+".");if(O!==Math.floor(O))throw new mn("Array index must be an integer, but found "+O+" instead.");return Y[O]},Qi.prototype.eachChild=function(M){M(this.index),M(this.input)},Qi.prototype.outputDefined=function(){return!1},Qi.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var vo=function(M,O){this.type=Ot,this.needle=M,this.haystack=O};vo.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,Le),ae=O.parse(M[2],2,Le);return Y&&ae?pr(Y.type,[Ot,yt,$e,Nt,Le])?new vo(Y,ae):O.error("Expected first argument to be of type boolean, string, number or null, but found "+Zt(Y.type)+" instead"):null},vo.prototype.evaluate=function(M){var O=this.needle.evaluate(M),Y=this.haystack.evaluate(M);if(!Y)return!1;if(!Ir(O,["boolean","string","number","null"]))throw new mn("Expected first argument to be of type boolean, string, number or null, but found "+Zt(qr(O))+" instead.");if(!Ir(Y,["string","array"]))throw new mn("Expected second argument to be of type array or string, but found "+Zt(qr(Y))+" instead.");return Y.indexOf(O)>=0},vo.prototype.eachChild=function(M){M(this.needle),M(this.haystack)},vo.prototype.outputDefined=function(){return!0},vo.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Ao=function(M,O,Y){this.type=$e,this.needle=M,this.haystack=O,this.fromIndex=Y};Ao.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,Le),ae=O.parse(M[2],2,Le);if(!Y||!ae)return null;if(!pr(Y.type,[Ot,yt,$e,Nt,Le]))return O.error("Expected first argument to be of type boolean, string, number or null, but found "+Zt(Y.type)+" instead");if(M.length===4){var he=O.parse(M[3],3,$e);return he?new Ao(Y,ae,he):null}return new Ao(Y,ae)},Ao.prototype.evaluate=function(M){var O=this.needle.evaluate(M),Y=this.haystack.evaluate(M);if(!Ir(O,["boolean","string","number","null"]))throw new mn("Expected first argument to be of type boolean, string, number or null, but found "+Zt(qr(O))+" instead.");if(!Ir(Y,["string","array"]))throw new mn("Expected second argument to be of type array or string, but found "+Zt(qr(Y))+" instead.");if(this.fromIndex){var ae=this.fromIndex.evaluate(M);return Y.indexOf(O,ae)}return Y.indexOf(O)},Ao.prototype.eachChild=function(M){M(this.needle),M(this.haystack),this.fromIndex&&M(this.fromIndex)},Ao.prototype.outputDefined=function(){return!1},Ao.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 Ni=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};Ni.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=[],Ae=2;Ae<M.length-1;Ae+=2){var Re=M[Ae],Ze=M[Ae+1];Array.isArray(Re)||(Re=[Re]);var lt=O.concat(Ae);if(Re.length===0)return lt.error("Expected at least one branch label.");for(var pt=0,Ft=Re;pt<Ft.length;pt+=1){var Wt=Ft[pt];if(typeof Wt!="number"&&typeof Wt!="string")return lt.error("Branch labels must be numbers or strings.");if(typeof Wt=="number"&&Math.abs(Wt)>Number.MAX_SAFE_INTEGER)return lt.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Wt=="number"&&Math.floor(Wt)!==Wt)return lt.error("Numeric branch labels must be integer values.");if(Y){if(lt.checkSubtype(Y,qr(Wt)))return null}else Y=qr(Wt);if(he[String(Wt)]!==void 0)return lt.error("Branch labels must be unique.");he[String(Wt)]=ve.length}var qt=O.parse(Ze,Ae,ae);if(!qt)return null;ae=ae||qt.type,ve.push(qt)}var nr=O.parse(M[1],1,Le);if(!nr)return null;var dr=O.parse(M[M.length-1],M.length-1,ae);return dr?nr.type.kind!=="value"&&O.concat(1).checkSubtype(Y,nr.type)?null:new Ni(Y,ae,nr,he,ve,dr):null},Ni.prototype.evaluate=function(M){var O=this.input.evaluate(M);return(qr(O)===this.inputType&&this.outputs[this.cases[O]]||this.otherwise).evaluate(M)},Ni.prototype.eachChild=function(M){M(this.input),this.outputs.forEac
vendor: 7,657 bytes, line 94
94h(M),M(this.otherwise)},Ni.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})&&this.otherwise.outputDefined()},Ni.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 Ae=ve[he];(Ft=ae[this.cases[Ae]])===void 0?(ae[this.cases[Ae]]=Y.length,Y.push([this.cases[Ae],[Ae]])):Y[Ft][1].push(Ae)}for(var Re=function(qt){return M.inputType.kind==="number"?Number(qt):qt},Ze=0,lt=Y;Ze<lt.length;Ze+=1){var pt=lt[Ze],Ft=pt[0],Wt=pt[1];Wt.length===1?O.push(Re(Wt[0])):O.push(Wt.map(Re)),O.push(this.outputs[outputIndex$1].serialize())}return O.push(this.otherwise.serialize()),O};var gi=function(M,O,Y){this.type=M,this.branches=O,this.otherwise=Y};gi.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,Ot);if(!ve)return null;var Ae=O.parse(M[he+1],he+1,Y);if(!Ae)return null;ae.push([ve,Ae]),Y=Y||Ae.type}var Re=O.parse(M[M.length-1],M.length-1,Y);return Re?new gi(Y,ae,Re):null},gi.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)},gi.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)},gi.prototype.outputDefined=function(){return this.branches.every(function(M){return M[0],M[1].outputDefined()})&&this.otherwise.outputDefined()},gi.prototype.serialize=function(){var M=["case"];return this.eachChild(function(O){M.push(O.serialize())}),M};var Xi=function(M,O,Y,ae){this.type=M,this.input=O,this.beginIndex=Y,this.endIndex=ae};function vs(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 ws(M,O,Y,ae){return ae.compare(O,Y)===0}function Za(M,O,Y){var ae=M!=="=="&&M!=="!=";return function(){function he(ve,Ae,Re){this.type=Ot,this.lhs=ve,this.rhs=Ae,this.collator=Re,this.hasUntypedArgument=ve.type.kind==="value"||Ae.type.kind==="value"}return he.parse=function(ve,Ae){if(ve.length!==3&&ve.length!==4)return Ae.error("Expected two or three arguments.");var Re=ve[0],Ze=Ae.parse(ve[1],1,Le);if(!Ze)return null;if(!vs(Re,Ze.type))return Ae.concat(1).error('"'+Re+`" comparisons are not supported for type '`+Zt(Ze.type)+"'.");var lt=Ae.parse(ve[2],2,Le);if(!lt)return null;if(!vs(Re,lt.type))return Ae.concat(2).error('"'+Re+`" comparisons are not supported for type '`+Zt(lt.type)+"'.");if(Ze.type.kind!==lt.type.kind&&Ze.type.kind!=="value"&<.type.kind!=="value")return Ae.error("Cannot compare types '"+Zt(Ze.type)+"' and '"+Zt(lt.type)+"'.");ae&&(Ze.type.kind==="value"&<.type.kind!=="value"?Ze=new Xr(lt.type,[Ze]):Ze.type.kind!=="value"&<.type.kind==="value"&&(lt=new Xr(Ze.type,[lt])));var pt=null;if(ve.length===4){if(Ze.type.kind!=="string"&<.type.kind!=="string"&&Ze.type.kind!=="value"&<.type.kind!=="value")return Ae.error("Cannot use collator to compare non-string types.");if(!(pt=Ae.parse(ve[3],3,Xe)))return null}return new he(Ze,lt,pt)},he.prototype.evaluate=function(ve){var Ae=this.lhs.evaluate(ve),Re=this.rhs.evaluate(ve);if(ae&&this.hasUntypedArgument){var Ze=qr(Ae),lt=qr(Re);if(Ze.kind!==lt.kind||Ze.kind!=="string"&&Ze.kind!=="number")throw new mn('Expected arguments for "'+M+'" to be (string, string) or (number, number), but found ('+Ze.kind+", "+lt.kind+") instead.")}if(this.collator&&!ae&&this.hasUntypedArgument){var pt=qr(Ae),Ft=qr(Re);if(pt.kind!=="string"||Ft.kind!=="string")return O(ve,Ae,Re)}return this.collator?Y(ve,Ae,Re,this.collator.evaluate(ve)):O(ve,Ae,Re)},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(Ae){ve.push(Ae.serialize())}),ve},he}()}Xi.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,Le),ae=O.parse(M[2],2,$e);if(!Y||!ae)return null;if(!pr(Y.type,[It(Le),yt,Le]))return O.error("Expected first argument to be of type array or string, but found "+Zt(Y.type)+" instead");if(M.length===4){var he=O.parse(M[3],3,$e);return he?new Xi(Y.type,Y,ae,he):null}return new Xi(Y.type,Y,ae)},Xi.prototype.evaluate=function(M){var O=this.input.evaluate(M),Y=this.beginIndex.evaluate(M);if(!Ir(O,["string","array"]))throw new mn("Expected first argument to be of type array or string, but found "+Zt(qr(O))+" instead.");if(this.endIndex){var ae=this.endIndex.evaluate(M);return O.slice(Y,ae)}return O.slice(Y)},Xi.prototype.eachChild=function(M){M(this.input),M(this.beginIndex),this.endIndex&&M(this.endIndex)},Xi.prototype.outputDefined=function(){return!1},Xi.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 fs=Za("==",function(M,O,Y){return O===Y},ws),Qo=Za("!=",function(M,O,Y){return O!==Y},function(M,O,Y,ae){return!ws(0,O,Y,ae)}),Ts=Za("<",function(M,O,Y){return O<Y},function(M,O,Y,ae){return ae.compare(O,Y)<0}),ks=Za(">",function(M,O,Y){return O>Y},function(M,O,Y,ae){return ae.compare(O,Y)>0}),ys=Za("<=",function(M,O,Y){return O<=Y},function(M,O,Y,ae){return ae.compare(O,Y)<=0}),Ms=Za(">=",function(M,O,Y){return O>=Y},function(M,O,Y,ae){return ae.compare(O,Y)>=0}),Lo=function(M,O,Y,ae,he){this.type=yt,this.number=M,this.locale=O,this.currency=Y,this.minFractionDigits=ae,this.maxFractionDigits=he};Lo.parse=function(M,O){if(M.length!==3)return O.error("Expected two arguments.");var Y=O.parse(M[1],1,$e);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,yt)))return null;var ve=null;if(ae.currency&&!(ve=O.parse(ae.currency,1,yt)))return null;var Ae=null;if(ae["min-fraction-digits"]&&!(Ae=O.parse(ae["min-fraction-digits"],1,$e)))return null;var Re=null;return ae["max-fraction-digits"]&&!(Re=O.parse(ae["max-fraction-digits"],1,$e))?null:new Lo(Y,he,ve,Ae,Re)},Lo.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))},Lo.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)},Lo.prototype.outputDefined=function(){return!1},Lo.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]};
94var Co=function(M){this.type=$e,this.input=M};Co.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 "+Zt(Y.type)+" instead."):new Co(Y):null},Co.prototype.evaluate=function(M){var O=this.input.evaluate(M);if(typeof O=="string"||Array.isArray(O))return O.length;throw new mn("Expected value to be of type string or array, but found "+Zt(qr(O))+" instead.")},Co.prototype.eachChild=function(M){M(this.input)},Co.prototype.outputDefined=function(){return!1},Co.prototype.serialize=function(){var M=["length"];return this.eachChild(function(O){M.push(O.serialize())}),M};var Uo={"==":fs,"!=":Qo,">":ks,"<":Ts,">=":Ms,"<=":ys,array:Xr,at:Qi,boolean:Xr,case:gi,coalesce:go,collator:Pn,format:Er,image:on,in:vo,"index-of":Ao,interpolate:Ba,"interpolate-hcl":Ba,"interpolate-lab":Ba,length:Co,let:Ti,literal:An,match:Ni,number:Xr,"number-format":Lo,object:Xr,slice:Xi,step:xn,string:Xr,"to-boolean":Tr,"to-color":Tr,"to-number":Tr,"to-string":Tr,var:tn,within:_r};function Vo(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 Ae=ve?ve.evaluate(M):1,Re=Pr(Y,ae,he,Ae);if(Re)throw new mn(Re);return new $t(Y/255*Ae,ae/255*Ae,he/255*Ae,Ae)}function Ho(M,O){return M in O}function $o(M,O){var Y=O[M];return Y===void 0?null:Y}function yo(M){return{type:M}}function hs(M){return{result:"success",value:M}}function ho(M){return{result:"error",value:M}}function qo(M){return M["property-type"]==="data-driven"||M["property-type"]==="cross-faded-data-driven"}function ps(M){return!!M.expression&&M.expression.parameters.indexOf("zoom")>-1}function Po(M){return!!M.expression&&M.expression.interpolated}function qa(M){return M instanceof Number?"number":M instanceof String?"string":M instanceof Boolean?"boolean":Array.isArray(M)?"array":M===null?"null":typeof M}function Be(M){return typeof M=="object"&&M!==null&&!Array.isArray(M)}function He(M){return M}function Ke(M,O,Y){return M!==void 0?M:O!==void 0?O:Y!==void 0?Y:void 0}function st(M,O,Y,ae,he){return Ke(typeof Y===he?ae[Y]:void 0,M.default,O.default)}function dt(M,O,Y){if(qa(Y)!=="number")return Ke(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=vn(M.stops.map(function(ve){return ve[0]}),Y);return M.stops[he][1]}function ht(M,O,Y){var ae=M.base!==void 0?M.base:1;if(qa(Y)!=="number")return Ke(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=vn(M.stops.map(function(Ft){return Ft[0]}),Y),Ae=function(Ft,Wt,qt,nr){var dr=nr-qt,Ar=Ft-qt;return dr===0?0:Wt===1?Ar/dr:(Math.pow(Wt,Ar)-1)/(Math.pow(Wt,dr)-1)}(Y,ae,M.stops[ve][0],M.stops[ve+1][0]),Re=M.stops[ve][1],Ze=M.stops[ve+1][1],lt=En[O.type]||He;if(M.colorSpace&&M.colorSpace!=="rgb"){var pt=Ki[M.colorSpace];lt=function(Ft,Wt){return pt.reverse(pt.interpolate(pt.forward(Ft),pt.forward(Wt),Ae))}}return typeof Re.evaluate=="function"?{evaluate:function(){for(var Ft=[],Wt=arguments.length;Wt--;)Ft[Wt]=arguments[Wt];var qt=Re.evaluate.apply(void 0,Ft),nr=Ze.evaluate.apply(void 0,Ft);if(qt!==void 0&&nr!==void 0)return lt(qt,nr,Ae)}}:lt(Re,Ze,Ae)}function St(M,O,Y){return O.type==="color"?Y=$t.parse(Y):O.type==="formatted"?Y=hr.fromString(Y.toString()):O.type==="resolvedImage"?Y=vr.fromString(Y.toString()):qa(Y)===O.type||O.type==="enum"&&O.values[Y]||(Y=void 0),Ke(Y,M.default,O.default)}Rr.register(Uo,{error:[{kind:"error"},[yt],function(M,O){var Y=O[0];throw new mn(Y.evaluate(M))}],typeof:[yt,[Le],function(M,O){return Zt(qr(O[0].evaluate(M)))}],"to-rgba":[It($e,4),[Mt],function(M,O){return O[0].evaluate(M).toArray()}],rgb:[Mt,[$e,$e,$e],Vo],rgba:[Mt,[$e,$e,$e,$e],Vo],has:{type:Ot,overloads:[[[yt],function(M,O){return Ho(O[0].evaluate(M),M.properties())}],[[yt,Pt],function(M,O){var Y=O[0],ae=O[1];return Ho(Y.evaluate(M),ae.evaluate(M))}]]},get:{type:Le,overloads:[[[yt],function(M,O){return $o(O[0].evaluate(M),M.properties())}],[[yt,Pt],function(M,O){var Y=O[0],ae=O[1];return $o(Y.evaluate(M),ae.evaluate(M))}]]},"feature-state":[Le,[yt],function(M,O){return $o(O[0].evaluate(M),M.featureState||{})}],properties:[Pt,[],function(M){return M.properties()}],"geometry-type":[yt,[],function(M){return M.geometryType()}],id:[Le,[],function(M){return M.id()}],zoom:[$e,[],function(M){return M.globals.zoom}],"heatmap-density":[$e,[],function(M){return M.globals.heatmapDensity||0}],"line-progress":[$e,[],function(M){return M.globals.lineProgress||0}],accumulated:[Le,[],function(M){return M.globals.accumulated===void 0?null:M.globals.accumulated}],"+":[$e,yo($e),function(M,O){for(var Y=0,ae=0,he=O;ae<he.length;ae+=1)Y+=he[ae].evaluate(M);return Y}],"*":[$e,yo($e),function(M,O){for(var Y=1,ae=0,he=O;ae<he.length;ae+=1)Y*=he[ae].evaluate(M);return Y}],"-":{type:$e,overloads:[[[$e,$e],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)-ae.evaluate(M)}],[[$e],function(M,O){return-O[0].evaluate(M)}]]},"/":[$e,[$e,$e],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)/ae.evaluate(M)}],"%":[$e,[$e,$e],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)%ae.evaluate(M)}],ln2:[$e,[],function(){return Math.LN2}],pi:[$e,[],function(){return Math.PI}],e:[$e,[],function(){return Math.E}],"^":[$e,[$e,$e],function(M,O){var Y=O[0],ae=O[1];return Math.pow(Y.evaluate(M),ae.evaluate(M))}],sqrt:[$e,[$e],function(M,O){var Y=O[0];return Math.sqrt(Y.evaluate(M))}],log10:[$e,[$e],function(M,O){var Y=O[0];
94return Math.log(Y.evaluate(M))/Math.LN10}],ln:[$e,[$e],function(M,O){var Y=O[0];return Math.log(Y.evaluate(M))}],log2:[$e,[$e],function(M,O){var Y=O[0];return Math.log(Y.evaluate(M))/Math.LN2}],sin:[$e,[$e],function(M,O){var Y=O[0];return Math.sin(Y.evaluate(M))}],cos:[$e,[$e],function(M,O){var Y=O[0];return Math.cos(Y.evaluate(M))}],tan:[$e,[$e],function(M,O){var Y=O[0];return Math.tan(Y.evaluate(M))}],asin:[$e,[$e],function(M,O){var Y=O[0];return Math.asin(Y.evaluate(M))}],acos:[$e,[$e],function(M,O){var Y=O[0];return Math.acos(Y.evaluate(M))}],atan:[$e,[$e],function(M,O){var Y=O[0];return Math.atan(Y.evaluate(M))}],min:[$e,yo($e),function(M,O){return Math.min.apply(Math,O.map(function(Y){return Y.evaluate(M)}))}],max:[$e,yo($e),function(M,O){return Math.max.apply(Math,O.map(function(Y){return Y.evaluate(M)}))}],abs:[$e,[$e],function(M,O){var Y=O[0];return Math.abs(Y.evaluate(M))}],round:[$e,[$e],function(M,O){var Y=O[0].evaluate(M);return Y<0?-Math.round(-Y):Math.round(Y)}],floor:[$e,[$e],function(M,O){var Y=O[0];return Math.floor(Y.evaluate(M))}],ceil:[$e,[$e],function(M,O){var Y=O[0];return Math.ceil(Y.evaluate(M))}],"filter-==":[Ot,[yt,Le],function(M,O){var Y=O[0],ae=O[1];return M.properties()[Y.value]===ae.value}],"filter-id-==":[Ot,[Le],function(M,O){var Y=O[0];return M.id()===Y.value}],"filter-type-==":[Ot,[yt],function(M,O){var Y=O[0];return M.geometryType()===Y.value}],"filter-<":[Ot,[yt,Le],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-<":[Ot,[Le],function(M,O){var Y=O[0],ae=M.id(),he=Y.value;return typeof ae==typeof he&&ae<he}],"filter->":[Ot,[yt,Le],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->":[Ot,[Le],function(M,O){var Y=O[0],ae=M.id(),he=Y.value;return typeof ae==typeof he&&ae>he}],"filter-<=":[Ot,[yt,Le],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-<=":[Ot,[Le],function(M,O){var Y=O[0],ae=M.id(),he=Y.value;return typeof ae==typeof he&&ae<=he}],"filter->=":[Ot,[yt,Le],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->=":[Ot,[Le],function(M,O){var Y=O[0],ae=M.id(),he=Y.value;return typeof ae==typeof he&&ae>=he}],"filter-has":[Ot,[Le],function(M,O){return O[0].value in M.properties()}],"filter-has-id":[Ot,[],function(M){return M.id()!==null&&M.id()!==void 0}],"filter-type-in":[Ot,[It(yt)],function(M,O){return O[0].value.indexOf(M.geometryType())>=0}],"filter-id-in":[Ot,[It(Le)],function(M,O){return O[0].value.indexOf(M.id())>=0}],"filter-in-small":[Ot,[yt,It(Le)],function(M,O){var Y=O[0];return O[1].value.indexOf(M.properties()[Y.value])>=0}],"filter-in-large":[Ot,[yt,It(Le)],function(M,O){var Y=O[0],ae=O[1];return function(he,ve,Ae,Re){for(;Ae<=Re;){var Ze=Ae+Re>>1;if(ve[Ze]===he)return!0;ve[Ze]>he?Re=Ze-1:Ae=Ze+1}return!1}(M.properties()[Y.value],ae.value,0,ae.value.length-1)}],all:{type:Ot,overloads:[[[Ot,Ot],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)&&ae.evaluate(M)}],[yo(Ot),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:Ot,overloads:[[[Ot,Ot],function(M,O){var Y=O[0],ae=O[1];return Y.evaluate(M)||ae.evaluate(M)}],[yo(Ot),function(M,O){for(var Y=0,ae=O;Y<ae.length;Y+=1)if(ae[Y].evaluate(M))return!0;return!1}]]},"!":[Ot,[Ot],function(M,O){return!O[0].evaluate(M)}],"is-supported-script":[Ot,[yt],function(M,O){var Y=O[0],ae=M.globals&&M.globals.isSupportedScript;return!ae||ae(Y.evaluate(M))}],upcase:[yt,[yt],function(M,O){return O[0].evaluate(M).toUpperCase()}],downcase:[yt,[yt],function(M,O){return O[0].evaluate(M).toLowerCase()}],concat:[yt,yo(Le),function(M,O){return O.map(function(Y){return rn(Y.evaluate(M))}).join("")}],"resolved-locale":[yt,[Xe],function(M,O){return O[0].evaluate(M).resolvedLocale()}]});var Kt=function(M,O){this.expression=M,this._warningHistory={},this._evaluator=new $r,this._defaultValue=O?function(Y){return Y.type==="color"&&Be(Y.default)?new $t(0,0,0,0):Y.type==="color"?$t.parse(Y.default)||null:Y.default===void 0?null:Y.default}(O):null,this._enumValues=O&&O.type==="enum"?O.values:null};function Qt(M){return Array.isArray(M)&&M.length>0&&typeof M[0]=="string"&&M[0]in Uo}function Yt(M,O){var Y=new nn(Uo,[],O?function(he){var ve={color:Mt,string:yt,number:$e,enum:yt,boolean:Ot,formatted:it,resolvedImage:At};return he.type==="array"?It(ve[he.value]||Le,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);
94return ae?hs(new Kt(ae,O)):ho(Y.errors)}Kt.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)},Kt.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 Ae=this.expression.evaluate(this._evaluator);if(Ae==null||typeof Ae=="number"&&Ae!=Ae)return this._defaultValue;if(this._enumValues&&!(Ae in this._enumValues))throw new mn("Expected value to be one of "+Object.keys(this._enumValues).map(function(Re){return JSON.stringify(Re)}).join(", ")+", but found "+JSON.stringify(Ae)+" instead.");return Ae}catch(Re){return this._warningHistory[Re.message]||(this._warningHistory[Re.message]=!0,typeof console<"u"&&console.warn(Re.message)),this._defaultValue}};var rr=function(M,O){this.kind=M,this._styleExpression=O,this.isStateDependent=M!=="constant"&&!Wr(O.expression)};rr.prototype.evaluateWithoutErrorHandling=function(M,O,Y,ae,he,ve){return this._styleExpression.evaluateWithoutErrorHandling(M,O,Y,ae,he,ve)},rr.prototype.evaluate=function(M,O,Y,ae,he,ve){return this._styleExpression.evaluate(M,O,Y,ae,he,ve)};var cr=function(M,O,Y,ae){this.kind=M,this.zoomStops=Y,this._styleExpression=O,this.isStateDependent=M!=="camera"&&!Wr(O.expression),this.interpolationType=ae};function gr(M,O){if((M=Yt(M,O)).result==="error")return M;var Y=M.value.expression,ae=Cr(Y);if(!ae&&!qo(O))return ho([new bt("","data expressions not supported")]);var he=Gr(Y,["zoom"]);if(!he&&!ps(O))return ho([new bt("","zoom expressions not supported")]);var ve=function Re(Ze){var lt=null;if(Ze instanceof Ti)lt=Re(Ze.result);else if(Ze instanceof go)for(var pt=0,Ft=Ze.args;pt<Ft.length;pt+=1){var Wt=Ft[pt];if(lt=Re(Wt))break}else(Ze instanceof xn||Ze instanceof Ba)&&Ze.input instanceof Rr&&Ze.input.name==="zoom"&&(lt=Ze);return lt instanceof bt||Ze.eachChild(function(qt){var nr=Re(qt);nr instanceof bt?lt=nr:!lt&&nr?lt=new bt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):lt&&nr&<!==nr&&(lt=new bt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),lt}(Y);if(!ve&&!he)return ho([new bt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ve instanceof bt)return ho([ve]);if(ve instanceof Ba&&!Po(O))return ho([new bt("",'"interpolate" expressions cannot be used with this property')]);if(!ve)return hs(new rr(ae?"constant":"source",M.value));var Ae=ve instanceof Ba?ve.interpolation:void 0;return hs(new cr(ae?"camera":"composite",M.value,ve.labels,Ae))}cr.prototype.evaluateWithoutErrorHandling=function(M,O,Y,ae,he,ve){return this._styleExpression.evaluateWithoutErrorHandling(M,O,Y,ae,he,ve)},cr.prototype.evaluate=function(M,O,Y,ae,he,ve){return this._styleExpression.evaluate(M,O,Y,ae,he,ve)},cr.prototype.interpolationFactor=function(M,O,Y){return this.interpolationType?Ba.interpolationFactor(this.interpolationType,M,O,Y):0};var yr=function(M,O){this._parameters=M,this._specification=O,ot(this,function Y(ae,he){var ve,Ae,Re,Ze=he.type==="color",lt=ae.stops&&typeof ae.stops[0][0]=="object",pt=lt||ae.property!==void 0,Ft=lt||!pt,Wt=ae.type||(Po(he)?"exponential":"interval");if(Ze&&((ae=ot({},ae)).stops&&(ae.stops=ae.stops.map(function(sa){return[sa[0],$t.parse(sa[1])]})),ae.default?ae.default=$t.parse(ae.default):ae.default=$t.parse(he.default)),ae.colorSpace&&ae.colorSpace!=="rgb"&&!Ki[ae.colorSpace])throw new Error("Unknown color space: "+ae.colorSpace);if(Wt==="exponential")ve=ht;else if(Wt==="interval")ve=dt;else if(Wt==="categorical"){ve=st,Ae=Object.create(null);for(var qt=0,nr=ae.stops;qt<nr.length;qt+=1){var dr=nr[qt];Ae[dr[0]]=dr[1]}Re=typeof ae.stops[0][0]}else{if(Wt!=="identity")throw new Error('Unknown function type "'+Wt+'"');ve=St}if(lt){for(var Ar={},Mr=[],Nr=0;Nr<ae.stops.length;Nr++){var jr=ae.stops[Nr],Yr=jr[0].zoom;Ar[Yr]===void 0&&(Ar[Yr]={zoom:Yr,type:ae.type,property:ae.property,default:ae.default,stops:[]},Mr.push(Yr)),Ar[Yr].stops.push([jr[0].value,jr[1]])}for(var fn=[],yn=0,Bn=Mr;yn<Bn.length;yn+=1){var Rn=Bn[yn];fn.push([Ar[Rn].zoom,Y(Ar[Rn],he)])}var Yn={name:"linear"};return{kind:"composite",interpolationType:Yn,interpolationFactor:Ba.interpolationFactor.bind(void 0,Yn),zoomStops:fn.map(function(sa){return sa[0]}),evaluate:function(sa,Qn){var da=sa.zoom;return ht({stops:fn,base:ae.base},he,da).evaluate(da,Qn)}}}if(Ft){var oa=Wt==="exponential"?{name:"exponential",base:ae.base!==void 0?ae.base:1}:null;return{kind:"camera",interpolationType:oa,interpolationFactor:Ba.interpolationFactor.bind(void 0,oa),zoomStops:ae.stops.map(function(sa){return sa[0]}),evaluate:function(sa){var Qn=sa.zoom;
vendor: 12,394 bytes, line 94
94return ve(ae,he,Qn,Ae,Re)}}}return{kind:"source",evaluate:function(sa,Qn){var da=Qn&&Qn.properties?Qn.properties[ae.property]:void 0;return da===void 0?Ke(ae.default,he.default):ve(ae,he,da,Ae,Re)}}}(this._parameters,this._specification))};function Lr(M){var O=M.key,Y=M.value,ae=M.valueSpec||{},he=M.objectElementValidators||{},ve=M.style,Ae=M.styleSpec,Re=[],Ze=qa(Y);if(Ze!=="object")return[new Ve(O,Y,"object expected, "+Ze+" found")];for(var lt in Y){var pt=lt.split(".")[0],Ft=ae[pt]||ae["*"],Wt=void 0;if(he[pt])Wt=he[pt];else if(ae[pt])Wt=ir;else if(he["*"])Wt=he["*"];else{if(!ae["*"]){Re.push(new Ve(O,Y[lt],'unknown property "'+lt+'"'));continue}Wt=ir}Re=Re.concat(Wt({key:(O&&O+".")+lt,value:Y[lt],valueSpec:Ft,style:ve,styleSpec:Ae,object:Y,objectKey:lt},Y))}for(var qt in ae)he[qt]||ae[qt].required&&ae[qt].default===void 0&&Y[qt]===void 0&&Re.push(new Ve(O,Y,'missing required property "'+qt+'"'));return Re}function an(M){var O=M.value,Y=M.valueSpec,ae=M.style,he=M.styleSpec,ve=M.key,Ae=M.arrayElementValidator||ir;if(qa(O)!=="array")return[new Ve(ve,O,"array expected, "+qa(O)+" found")];if(Y.length&&O.length!==Y.length)return[new Ve(ve,O,"array length "+Y.length+" expected, length "+O.length+" found")];if(Y["min-length"]&&O.length<Y["min-length"])return[new Ve(ve,O,"array length at least "+Y["min-length"]+" expected, length "+O.length+" found")];var Re={type:Y.value,values:Y.values};he.$version<7&&(Re.function=Y.function),qa(Y.value)==="object"&&(Re=Y.value);for(var Ze=[],lt=0;lt<O.length;lt++)Ze=Ze.concat(Ae({array:O,arrayIndex:lt,value:O[lt],valueSpec:Re,style:ae,styleSpec:he,key:ve+"["+lt+"]"}));return Ze}function dn(M){var O=M.key,Y=M.value,ae=M.valueSpec,he=qa(Y);return he==="number"&&Y!=Y&&(he="NaN"),he!=="number"?[new Ve(O,Y,"number expected, "+he+" found")]:"minimum"in ae&&Y<ae.minimum?[new Ve(O,Y,Y+" is less than the minimum value "+ae.minimum)]:"maximum"in ae&&Y>ae.maximum?[new Ve(O,Y,Y+" is greater than the maximum value "+ae.maximum)]:[]}function Ln(M){var O,Y,ae,he=M.valueSpec,ve=at(M.value.type),Ae={},Re=ve!=="categorical"&&M.value.property===void 0,Ze=!Re,lt=qa(M.value.stops)==="array"&&qa(M.value.stops[0])==="array"&&qa(M.value.stops[0][0])==="object",pt=Lr({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 Ve(qt.key,qt.value,'identity function may not have a "stops" property')];var nr=[],dr=qt.value;return nr=nr.concat(an({key:qt.key,value:dr,valueSpec:qt.valueSpec,style:qt.style,styleSpec:qt.styleSpec,arrayElementValidator:Ft})),qa(dr)==="array"&&dr.length===0&&nr.push(new Ve(qt.key,dr,"array must have at least one stop")),nr},default:function(qt){return ir({key:qt.key,value:qt.value,valueSpec:he,style:qt.style,styleSpec:qt.styleSpec})}}});return ve==="identity"&&Re&&pt.push(new Ve(M.key,M.value,'missing required property "property"')),ve==="identity"||M.value.stops||pt.push(new Ve(M.key,M.value,'missing required property "stops"')),ve==="exponential"&&M.valueSpec.expression&&!Po(M.valueSpec)&&pt.push(new Ve(M.key,M.value,"exponential functions not supported")),M.styleSpec.$version>=8&&(Ze&&!qo(M.valueSpec)?pt.push(new Ve(M.key,M.value,"property functions not supported")):Re&&!ps(M.valueSpec)&&pt.push(new Ve(M.key,M.value,"zoom functions not supported"))),ve!=="categorical"&&!lt||M.value.property!==void 0||pt.push(new Ve(M.key,M.value,'"property" property is required')),pt;function Ft(qt){var nr=[],dr=qt.value,Ar=qt.key;if(qa(dr)!=="array")return[new Ve(Ar,dr,"array expected, "+qa(dr)+" found")];if(dr.length!==2)return[new Ve(Ar,dr,"array length 2 expected, length "+dr.length+" found")];if(lt){if(qa(dr[0])!=="object")return[new Ve(Ar,dr,"object expected, "+qa(dr[0])+" found")];if(dr[0].zoom===void 0)return[new Ve(Ar,dr,"object stop key must have zoom")];if(dr[0].value===void 0)return[new Ve(Ar,dr,"object stop key must have value")];if(ae&&ae>at(dr[0].zoom))return[new Ve(Ar,dr[0].zoom,"stop zoom values must appear in ascending order")];at(dr[0].zoom)!==ae&&(ae=at(dr[0].zoom),Y=void 0,Ae={}),nr=nr.concat(Lr({key:Ar+"[0]",value:dr[0],valueSpec:{zoom:{}},style:qt.style,styleSpec:qt.styleSpec,objectElementValidators:{zoom:dn,value:Wt}}))}else nr=nr.concat(Wt({key:Ar+"[0]",value:dr[0],valueSpec:{},style:qt.style,styleSpec:qt.styleSpec},dr));return Qt(_t(dr[1]))?nr.concat([new Ve(Ar+"[1]",dr[1],"expressions are not allowed in function stops.")]):nr.concat(ir({key:Ar+"[1]",value:dr[1],valueSpec:he,style:qt.style,styleSpec:qt.styleSpec}))}function Wt(qt,nr){var dr=qa(qt.value),Ar=at(qt.value),Mr=qt.value!==null?qt.value:nr;if(O){if(dr!==O)return[new Ve(qt.key,Mr,dr+" stop domain type must match previous stop domain type "+O)]}else O=dr;if(dr!=="number"&&dr!=="string"&&dr!=="boolean")return[new Ve(qt.key,Mr,"stop domain value must be a number, string, or boolean")];if(dr!=="number"&&ve!=="categorical"){var Nr="number expected, "+dr+" found";return qo(he)&&ve===void 0&&(Nr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ve(qt.key,Mr,Nr)]}return ve!=="categorical"||dr!=="number"||isFinite(Ar)&&Math.floor(Ar)===Ar?ve!=="categorical"&&dr==="number"&&Y!==void 0&&Ar<Y?[new Ve(qt.key,Mr,"stop domain values must appear in ascending order")]:(Y=Ar,ve==="categorical"&&Ar in Ae?[new Ve(qt.key,Mr,"stop domain values must be unique")]:(Ae[Ar]=!0,[])):[new Ve(qt.key,Mr,"integer expected, found "+Ar)]}}function On(M){var O=(M.expressionContext==="property"?gr:Yt)(_t(M.value),M.valueSpec);if(O.result==="error")return O.value.map(function(ae){return new Ve(""+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 Ve(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"&&!Wr(Y))return[new Ve(M.key,M.value,'"feature-state" data expressions are not supported with layout properties.')];if(M.expressionContext==="filter"&&!Wr(Y))return[new Ve(M.key,M.value,'"feature-state" data expressions are not supported with filters.')];if(M.expressionContext&&M.expressionContext.indexOf("cluster")===0){if(!Gr(Y,["zoom","feature-state"]))return[new Ve(M.key,M.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(M.expressionContext==="cluster-initial"&&!Cr(Y))return[new Ve(M.key,M.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function qn(M){var O=M.key,Y=M.value,ae=M.valueSpec,he=[];return Array.isArray(ae.values)?ae.values.indexOf(at(Y))===-1&&he.push(new Ve(O,Y,"expected one of ["+ae.values.join(", ")+"], "+JSON.stringify(Y)+" found")):Object.keys(ae.values).indexOf(at(Y))===-1&&he.push(new Ve(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 ga={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Aa(M){if(M==null)return{filter:function(){return!0},needGeometry:!1};zn(M)||(M=Na(M));var O=Yt(M,ga);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 ja(M,O){return M<O?-1:M>O?1:0}function Na(M){if(!M)return!0;var O,Y=M[0];return M.length<=1?Y!=="any":Y==="=="?Ua(M[1],M[2],"=="):Y==="!="?si(Ua(M[1],M[2],"==")):Y==="<"||Y===">"||Y==="<="||Y===">="?Ua(M[1],M[2],Y):Y==="any"?(O=M.slice(1),["any"].concat(O.map(Na))):Y==="all"?["all"].concat(M.slice(1).map(Na)):Y==="none"?["all"].concat(M.slice(1).map(Na).map(si)):Y==="in"?ki(M[1],M.slice(2)):Y==="!in"?si(ki(M[1],M.slice(2))):Y==="has"?_i(M[1]):Y==="!has"?si(_i(M[1])):Y!=="within"||M}function Ua(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 ki(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(ja)]]:["filter-in-small",M,["literal",O]]}}function _i(M){switch(M){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",M]}}function si(M){return["!",M]}function li(M){return zn(_t(M.value))?On(ot({},M,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function O(Y){var ae=Y.value,he=Y.key;if(qa(ae)!=="array")return[new Ve(he,ae,"array expected, "+qa(ae)+" found")];var ve,Ae=Y.styleSpec,Re=[];if(ae.length<1)return[new Ve(he,ae,"filter array must have at least 1 element")];switch(Re=Re.concat(qn({key:he+"[0]",value:ae[0],valueSpec:Ae.filter_operator,style:Y.style,styleSpec:Y.styleSpec})),at(ae[0])){case"<":case"<=":case">":case">=":ae.length>=2&&at(ae[1])==="$type"&&Re.push(new Ve(he,ae,'"$type" cannot be use with operator "'+ae[0]+'"'));case"==":case"!=":ae.length!==3&&Re.push(new Ve(he,ae,'filter array for operator "'+ae[0]+'" must have 3 elements'));case"in":case"!in":ae.length>=2&&(ve=qa(ae[1]))!=="string"&&Re.push(new Ve(he+"[1]",ae[1],"string expected, "+ve+" found"));for(var Ze=2;Ze<ae.length;Ze++)ve=qa(ae[Ze]),at(ae[1])==="$type"?Re=Re.concat(qn({key:he+"["+Ze+"]",value:ae[Ze],valueSpec:Ae.geometry_type,style:Y.style,styleSpec:Y.styleSpec})):ve!=="string"&&ve!=="number"&&ve!=="boolean"&&Re.push(new Ve(he+"["+Ze+"]",ae[Ze],"string, number, or boolean expected, "+ve+" found"));break;case"any":case"all":case"none":for(var lt=1;lt<ae.length;lt++)Re=Re.concat(O({key:he+"["+lt+"]",value:ae[lt],style:Y.style,styleSpec:Y.styleSpec}));break;case"has":case"!has":ve=qa(ae[1]),ae.length!==2?Re.push(new Ve(he,ae,'filter array for "'+ae[0]+'" operator must have 2 elements')):ve!=="string"&&Re.push(new Ve(he+"[1]",ae[1],"string expected, "+ve+" found"));break;case"within":ve=qa(ae[1]),ae.length!==2?Re.push(new Ve(he,ae,'filter array for "'+ae[0]+'" operator must have 2 elements')):ve!=="object"&&Re.push(new Ve(he+"[1]",ae[1],"object expected, "+ve+" found"))}return Re}(M)}function wi(M,O){var Y=M.key,ae=M.style,he=M.styleSpec,ve=M.value,Ae=M.objectKey,Re=he[O+"_"+M.layerType];if(!Re)return[];var Ze=Ae.match(/^(.*)-transition$/);if(O==="paint"&&Ze&&Re[Ze[1]]&&Re[Ze[1]].transition)return ir({key:Y,value:ve,valueSpec:he.transition,style:ae,styleSpec:he});var lt,pt=M.valueSpec||Re[Ae];if(!pt)return[new Ve(Y,ve,'unknown property "'+Ae+'"')];if(qa(ve)==="string"&&qo(pt)&&!pt.tokens&&(lt=/^{([^}]+)}$/.exec(ve)))return[new Ve(Y,ve,'"'+Ae+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(lt[1])+" }`.")];var Ft=[];return M.layerType==="symbol"&&(Ae==="text-field"&&ae&&!ae.glyphs&&Ft.push(new Ve(Y,ve,'use of "text-field" requires a style "glyphs" property')),Ae==="text-font"&&Be(_t(ve))&&at(ve.type)==="identity"&&Ft.push(new Ve(Y,ve,'"text-font" does not support identity functions'))),Ft.concat(ir({key:M.key,value:ve,valueSpec:pt,style:ae,styleSpec:he,expressionContext:"property",propertyType:O,propertyKey:Ae}))}function ji(M){return wi(M,"paint")}function $i(M){return wi(M,"layout")}function eo(M){var O=[],Y=M.value,ae=M.key,he=M.style,ve=M.styleSpec;Y.type||Y.ref||O.push(new Ve(ae,Y,'either "type" or "ref" is required'));
94var Ae,Re=at(Y.type),Ze=at(Y.ref);if(Y.id)for(var lt=at(Y.id),pt=0;pt<M.arrayIndex;pt++){var Ft=he.layers[pt];at(Ft.id)===lt&&O.push(new Ve(ae,Y.id,'duplicate layer id "'+Y.id+'", previously used at line '+Ft.id.__line__))}if("ref"in Y)["type","source","source-layer","filter","layout"].forEach(function(nr){nr in Y&&O.push(new Ve(ae,Y[nr],'"'+nr+'" is prohibited for ref layers'))}),he.layers.forEach(function(nr){at(nr.id)===Ze&&(Ae=nr)}),Ae?Ae.ref?O.push(new Ve(ae,Y.ref,"ref cannot reference another ref layer")):Re=at(Ae.type):O.push(new Ve(ae,Y.ref,'ref layer "'+Ze+'" not found'));else if(Re!=="background")if(Y.source){var Wt=he.sources&&he.sources[Y.source],qt=Wt&&at(Wt.type);Wt?qt==="vector"&&Re==="raster"?O.push(new Ve(ae,Y.source,'layer "'+Y.id+'" requires a raster source')):qt==="raster"&&Re!=="raster"?O.push(new Ve(ae,Y.source,'layer "'+Y.id+'" requires a vector source')):qt!=="vector"||Y["source-layer"]?qt==="raster-dem"&&Re!=="hillshade"?O.push(new Ve(ae,Y.source,"raster-dem source can only be used with layer type 'hillshade'.")):Re!=="line"||!Y.paint||!Y.paint["line-gradient"]||qt==="geojson"&&Wt.lineMetrics||O.push(new Ve(ae,Y,'layer "'+Y.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):O.push(new Ve(ae,Y,'layer "'+Y.id+'" must specify a "source-layer"')):O.push(new Ve(ae,Y.source,'source "'+Y.source+'" not found'))}else O.push(new Ve(ae,Y,'missing required property "source"'));return O=O.concat(Lr({key:ae,value:Y,valueSpec:ve.layer,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return ir({key:ae+".type",value:Y.type,valueSpec:ve.layer.type,style:M.style,styleSpec:M.styleSpec,object:Y,objectKey:"type"})},filter:li,layout:function(nr){return Lr({layer:Y,key:nr.key,value:nr.value,style:nr.style,styleSpec:nr.styleSpec,objectElementValidators:{"*":function(dr){return $i(ot({layerType:Re},dr))}}})},paint:function(nr){return Lr({layer:Y,key:nr.key,value:nr.value,style:nr.style,styleSpec:nr.styleSpec,objectElementValidators:{"*":function(dr){return ji(ot({layerType:Re},dr))}}})}}}))}function to(M){var O=M.value,Y=M.key,ae=qa(O);return ae!=="string"?[new Ve(Y,O,"string expected, "+ae+" found")]:[]}var ro={promoteId:function(M){var O=M.key,Y=M.value;if(qa(Y)==="string")return to({key:O,value:Y});var ae=[];for(var he in Y)ae.push.apply(ae,to({key:O+"."+he,value:Y[he]}));return ae}};function za(M){var O=M.value,Y=M.key,ae=M.styleSpec,he=M.style;if(!O.type)return[new Ve(Y,O,'"type" is required')];var ve,Ae=at(O.type);switch(Ae){case"vector":case"raster":case"raster-dem":return ve=Lr({key:Y,value:O,valueSpec:ae["source_"+Ae.replace("-","_")],style:M.style,styleSpec:ae,objectElementValidators:ro});case"geojson":if(ve=Lr({key:Y,value:O,valueSpec:ae.source_geojson,style:he,styleSpec:ae,objectElementValidators:ro}),O.cluster)for(var Re in O.clusterProperties){var Ze=O.clusterProperties[Re],lt=Ze[0],pt=Ze[1],Ft=typeof lt=="string"?[lt,["accumulated"],["get",Re]]:lt;ve.push.apply(ve,On({key:Y+"."+Re+".map",value:pt,expressionContext:"cluster-map"})),ve.push.apply(ve,On({key:Y+"."+Re+".reduce",value:Ft,expressionContext:"cluster-reduce"}))}return ve;case"video":return Lr({key:Y,value:O,valueSpec:ae.source_video,style:he,styleSpec:ae});case"image":return Lr({key:Y,value:O,valueSpec:ae.source_image,style:he,styleSpec:ae});case"canvas":return[new Ve(Y,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return qn({key:Y+".type",value:O.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:he,styleSpec:ae})}}function ut(M){var O=M.value,Y=M.styleSpec,ae=Y.light,he=M.style,ve=[],Ae=qa(O);if(O===void 0)return ve;if(Ae!=="object")return ve=ve.concat([new Ve("light",O,"object expected, "+Ae+" found")]);for(var Re in O){var Ze=Re.match(/^(.*)-transition$/);ve=Ze&&ae[Ze[1]]&&ae[Ze[1]].transition?ve.concat(ir({key:Re,value:O[Re],valueSpec:Y.transition,style:he,styleSpec:Y})):ae[Re]?ve.concat(ir({key:Re,value:O[Re],valueSpec:ae[Re],style:he,styleSpec:Y})):ve.concat([new Ve(Re,O[Re],'unknown property "'+Re+'"')])}return ve}var Dt={"*":function(){return[]},array:an,boolean:function(M){var O=M.value,Y=M.key,ae=qa(O);return ae!=="boolean"?[new Ve(Y,O,"boolean expected, "+ae+" found")]:[]},number:dn,color:function(M){var O=M.key,Y=M.value,ae=qa(Y);return ae!=="string"?[new Ve(O,Y,"color expected, "+ae+" found")]:fr(Y)===null?[new Ve(O,Y,'color expected, "'+Y+'" found')]:[]},constants:tt,enum:qn,filter:li,function:Ln,layer:eo,object:Lr,source:za,light:ut,string:to,formatted:function(M){return to(M).length===0?[]:On(M)},resolvedImage:function(M){return to(M).length===0?[]:On(M)}};function ir(M){var O=M.value,Y=M.valueSpec,ae=M.styleSpec;return Y.expression&&Be(at(O))?Ln(M):Y.expression&&Qt(_t(O))?On(M):Y.type&&Dt[Y.type]?Dt[Y.type](M):Lr(ot({},M,{valueSpec:Y.type?ae[Y.type]:Y}))}function Ht(M){var O=M.value,Y=M.key,ae=to(M);return ae.length||(O.indexOf("{fontstack}")===-1&&ae.push(new Ve(Y,O,'"glyphs" url must include a "{fontstack}" token')),O.indexOf("{range}")===-1&&ae.push(new Ve(Y,O,'"glyphs" url must include a "{range}" token'))),ae}function or(M,O){O===void 0&&(O=Pe);var Y=[];return Y=Y.concat(ir({key:"",value:M,valueSpec:O.$root,styleSpec:O,style:M,objectElementValidators:{glyphs:Ht,"*":function(){return[]}}})),M.constants&&(Y=Y.concat(tt({key:"constants",value:M.constants,style:M,styleSpec:O}))),Sr(Y)}function Sr(M){return[].concat(M).sort(function(O,Y){return O.line-Y.line})}function zr(M){return function(){for(var O=[],Y=arguments.length;Y--;)O[Y]=arguments[Y];return Sr(M.apply(this,O))}}or.source=zr(za),or.light=zr(ut),or.layer=zr(eo),or.filter=zr(li),or.paintProperty=zr(ji),or.layoutProperty=zr($i);var Zr=or,cn=Zr.light,sn=Zr.paintProperty,gn=Zr.layoutProperty;function _n(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 Ie(new Error(ve.message))),Y=!0}return Y}var un=wn;function wn(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 Ae=he[3+ve],Re=he[3+ve+1];ae.push(Ae===Re?null:he.subarray(Ae,Re))}var Ze=he[3+ae.length],lt=he[3+ae.length+1];this.keys=he.subarray(Ze,lt),this.bboxes=he.subarray(lt),this.insert=this._insertReadonly}else{this.d=O+2*Y;for(var pt=0;pt<this.d*this.d;pt++)ae.push([]);this.keys=[],this.bboxes=[]}this.n=O,this.extent=M,this.padding=Y,this.scale=O/M,this.uid=0;var Ft=Y/O*M;this.min=-Ft,this.max=M+Ft}
vendor: 4,096 bytes, line 94
94wn.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)},wn.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},wn.prototype._insertCell=function(M,O,Y,ae,he,ve){this.cells[he].push(ve)},wn.prototype.query=function(M,O,Y,ae,he){var ve=this.min,Ae=this.max;if(M<=ve&&O<=ve&&Ae<=Y&&Ae<=ae&&!he)return Array.prototype.slice.call(this.keys);var Re=[];return this._forEachCell(M,O,Y,ae,this._queryCell,Re,{},he),Re},wn.prototype._queryCell=function(M,O,Y,ae,he,ve,Ae,Re){var Ze=this.cells[he];if(Ze!==null)for(var lt=this.keys,pt=this.bboxes,Ft=0;Ft<Ze.length;Ft++){var Wt=Ze[Ft];if(Ae[Wt]===void 0){var qt=4*Wt;(Re?Re(pt[qt+0],pt[qt+1],pt[qt+2],pt[qt+3]):M<=pt[qt+2]&&O<=pt[qt+3]&&Y>=pt[qt+0]&&ae>=pt[qt+1])?(Ae[Wt]=!0,ve.push(lt[Wt])):Ae[Wt]=!1}}},wn.prototype._forEachCell=function(M,O,Y,ae,he,ve,Ae,Re){for(var Ze=this._convertToCellCoord(M),lt=this._convertToCellCoord(O),pt=this._convertToCellCoord(Y),Ft=this._convertToCellCoord(ae),Wt=Ze;Wt<=pt;Wt++)for(var qt=lt;qt<=Ft;qt++){var nr=this.d*qt+Wt;if((!Re||Re(this._convertFromCellCoord(Wt),this._convertFromCellCoord(qt),this._convertFromCellCoord(Wt+1),this._convertFromCellCoord(qt+1)))&&he.call(this,M,O,Y,ae,nr,ve,Ae,Re))return}},wn.prototype._convertFromCellCoord=function(M){return(M-this.padding)/this.scale},wn.prototype._convertToCellCoord=function(M){return Math.max(0,Math.min(this.d-1,Math.floor(M*this.scale)+this.padding))},wn.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,Ae=0;Ae<M.length;Ae++){var Re=M[Ae];he[3+Ae]=ve,he.set(Re,ve),ve+=Re.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,Hn=self.ImageBitmap,ia={};function Jr(M,O,Y){Y===void 0&&(Y={}),Object.defineProperty(O,"_classRegistryKey",{value:M,writeable:!1}),ia[M]={klass:O,omit:Y.omit||[],shallow:Y.shallow||[]}}for(var ra in Jr("Object",Object),un.serialize=function(M,O){var Y=M.toArrayBuffer();return O&&O.push(Y),{buffer:Y}},un.deserialize=function(M){return new un(M.buffer)},Jr("Grid",un),Jr("Color",$t),Jr("Error",Error),Jr("ResolvedImage",vr),Jr("StylePropertyFunction",yr),Jr("StyleExpression",Kt,{omit:["_evaluator"]}),Jr("ZoomDependentExpression",cr),Jr("ZoomConstantExpression",rr),Jr("CompoundExpression",Rr,{omit:["_evaluate"]}),Uo)Uo[ra]._classRegistryKey||Jr("Expression_"+ra,Uo[ra]);function Cn(M){return M&&typeof ArrayBuffer<"u"&&(M instanceof ArrayBuffer||M.constructor&&M.constructor.name==="ArrayBuffer")}function jn(M){return Hn&&M instanceof Hn}function ta(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)||jn(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 Ae=ve[he];ae.push(ta(Ae,O))}return ae}if(typeof M=="object"){var Re=M.constructor,Ze=Re._classRegistryKey;if(!Ze)throw new Error("can't serialize object of unregistered class");var lt=Re.serialize?Re.serialize(M,O):{};if(!Re.serialize){for(var pt in M)if(M.hasOwnProperty(pt)&&!(ia[Ze].omit.indexOf(pt)>=0)){var Ft=M[pt];lt[pt]=ia[Ze].shallow.indexOf(pt)>=0?Ft:ta(Ft,O)}M instanceof Error&&(lt.message=M.message)}if(lt.$name)throw new Error("$name property is reserved for worker serialization logic.");return Ze!=="Object"&&(lt.$name=Ze),lt}throw new Error("can't serialize object of type "+typeof M)}function Ta(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)||jn(M)||ArrayBuffer.isView(M)||M instanceof Dn)return M;if(Array.isArray(M))return M.map(Ta);if(typeof M=="object"){var O=M.$name||"Object",Y=ia[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 Ae=ve[he];if(Ae!=="$name"){var Re=M[Ae];ae[Ae]=ia[O].shallow.indexOf(Ae)>=0?Re:Ta(Re)}}return ae}throw new Error("can't deserialize object of type "+typeof M)}var Ca=function(){this.first=!0};Ca.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 Da(M){for(var O=0,Y=M;O<Y.length;O+=1)if(ma(Y[O].charCodeAt(0)))return!0;return!1}function La(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 ma(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 Ra(M){return!(ma(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 Sa(M){return M>=1424&&M<=2303||Sn["Arabic Presentation Forms-A"](M)||Sn["Arabic Presentation Forms-B"](M)}function ei(M,O){return!(!O&&Sa(M))&&!(M>=2304&&M<=3583||M>=3840&&M<=4255||Sn.Khmer(M))}function na(M){for(var O=0,Y=M;O<Y.length;O+=1)if(Sa(Y[O].charCodeAt(0)))return!0;return!1}var Xa="deferred",Ui="loading",Zo="loaded",Ro="error",xo=null,ya="unavailable",vi=null,bo=function(M){M&&typeof M=="string"&&M.indexOf("NetworkError")>-1&&(ya=Ro),xo&&xo(M)};function Ja(){Mi.fire(new Ce("pluginStateChange",{pluginStatus:ya,pluginURL:vi}))}var Mi=new Te,Yi=function(){return ya},ni=function(){if(ya!==Xa||!vi)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ya=Ui,Ja(),vi&&Et({url:vi},function(M){M?bo(M):(ya=Zo,Ja())})},po={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ya===Zo||po.applyArabicShaping!=null},isLoading:function(){return ya===Ui},setState:function(M){ya=M.pluginStatus,vi=M.pluginURL},isParsed:function(){return po.applyArabicShaping!=null&&po.processBidirectionalText!=null&&po.processStyledBidirectionalText!=null},getPluginURL:function(){return vi}},ai=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 Ca,this.transition={})};ai.prototype.isSupportedScript=function(M){return function(O,Y){for(var ae=0,he=O;ae<he.length;ae+=1)if(!ei(he[ae].charCodeAt(0),Y))return!1;return!0}(M,po.isLoaded())},ai.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},ai.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 no=function(M,O){this.property=M,this.value=O,this.expression=function(Y,ae){if(Be(Y))return new yr(Y,ae);if(Qt(Y)){var he=gr(Y,ae);if(he.result==="error")throw new Error(he.value.map(function(Ae){return Ae.key+": "+Ae.message}).join(", "));return he.value}var ve=Y;return typeof Y=="string"&&ae.type==="color"&&(ve=$t.parse(Y)),{kind:"constant",evaluate:function(){return ve}}}(O===void 0?M.specification.default:O,M.specification)};no.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},no.prototype.possiblyEvaluate=function(M,O,Y){return this.property.possiblyEvaluate(this,M,O,Y)};var os=function(M){this.property=M,this.value=new no(M,void 0)};os.prototype.transitioned=function(M,O){return new Fs(this.property,this.value,O,o({},M.transition,this.transition),M.now)},os.prototype.untransitioned=function(){return new Fs(this.property,this.value,
94null,{},0)};var es=function(M){this._properties=M,this._values=Object.create(M.defaultTransitionablePropertyValues)};es.prototype.getValue=function(M){return k(this._values[M].value.value)},es.prototype.setValue=function(M,O){this._values.hasOwnProperty(M)||(this._values[M]=new os(this._values[M].property)),this._values[M].value=new no(this._values[M].property,O===null?void 0:k(O))},es.prototype.getTransition=function(M){return k(this._values[M].transition)},es.prototype.setTransition=function(M,O){this._values.hasOwnProperty(M)||(this._values[M]=new os(this._values[M].property)),this._values[M].transition=k(O)||void 0},es.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},es.prototype.transitioned=function(M,O){for(var Y=new Ri(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},es.prototype.untransitioned=function(){for(var M=new Ri(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 Fs=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)};Fs.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 Ae=(ae-this.begin)/(this.end-this.begin);return this.property.interpolate(ve.possiblyEvaluate(M,O,Y),he,function(Re){if(Re<=0)return 0;if(Re>=1)return 1;var Ze=Re*Re,lt=Ze*Re;return 4*(Re<.5?lt:3*(Re-Ze)+lt-.75)}(Ae))}return he};var Ri=function(M){this._properties=M,this._values=Object.create(M.defaultTransitioningPropertyValues)};Ri.prototype.possiblyEvaluate=function(M,O,Y){for(var ae=new ts(this._properties),he=0,ve=Object.keys(this._values);he<ve.length;he+=1){var Ae=ve[he];ae._values[Ae]=this._values[Ae].possiblyEvaluate(M,O,Y)}return ae},Ri.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 Bs=function(M){this._properties=M,this._values=Object.create(M.defaultPropertyValues)};Bs.prototype.getValue=function(M){return k(this._values[M].value)},Bs.prototype.setValue=function(M,O){this._values[M]=new no(this._values[M].property,O===null?void 0:k(O))},Bs.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},Bs.prototype.possiblyEvaluate=function(M,O,Y){for(var ae=new ts(this._properties),he=0,ve=Object.keys(this._values);he<ve.length;he+=1){var Ae=ve[he];ae._values[Ae]=this._values[Ae].possiblyEvaluate(M,O,Y)}return ae};var Fi=function(M,O,Y){this.property=M,this.value=O,this.parameters=Y};Fi.prototype.isConstant=function(){return this.value.kind==="constant"},Fi.prototype.constantOr=function(M){return this.value.kind==="constant"?this.value.value:M},Fi.prototype.evaluate=function(M,O,Y,ae){return this.property.evaluate(this.value,this.parameters,M,O,Y,ae)};var ts=function(M){this._properties=M,this._values=Object.create(M.defaultPossiblyEvaluatedValues)};ts.prototype.get=function(M){return this._values[M]};var ua=function(M){this.specification=M};ua.prototype.possiblyEvaluate=function(M,O){return M.expression.evaluate(O)},ua.prototype.interpolate=function(M,O,Y){var ae=En[this.specification.type];return ae?ae(M,O,Y):M};var xa=function(M,O){this.specification=M,this.overrides=O};xa.prototype.possiblyEvaluate=function(M,O,Y,ae){return M.expression.kind==="constant"||M.expression.kind==="camera"?new Fi(this,{kind:"constant",value:M.expression.evaluate(O,null,{},Y,ae)},O):new Fi(this,M.expression,O)},xa.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 Fi(this,{kind:"constant",value:void 0},M.parameters);var ae=En[this.specification.type];return ae?new Fi(this,{kind:"constant",value:ae(M.value.value,O.value.value,Y)},M.parameters):M},xa.prototype.evaluate=function(M,O,Y,ae,he,ve){return M.kind==="constant"?M.value:M.evaluate(O,Y,ae,he,ve)};var Ns=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 Fi(this,{kind:"constant",value:void 0},ae);if(Y.expression.kind==="constant"){var Ae=Y.expression.evaluate(ae,null,{},he,ve),Re=Y.property.specification.type==="resolvedImage"&&typeof Ae!="string"?Ae.name:Ae,Ze=this._calculate(Re,Re,Re,ae);return new Fi(this,{kind:"constant",value:Ze},ae)}if(Y.expression.kind==="camera"){var lt=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 Fi(this,{kind:"constant",value:lt},ae)}return new Fi(this,Y.expression,ae)},O.prototype.evaluate=function(Y,ae,he,ve,Ae,Re){if(Y.kind==="source"){var Ze=Y.evaluate(ae,he,ve,Ae,Re);return this._calculate(Ze,Ze,Ze,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}(xa),js=function(M){this.specification=M};js.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 ai(Math.floor(O.zoom-1),O)),M.expression.evaluate(new ai(Math.floor(O.zoom),O)),M.expression.evaluate(new ai(Math.floor(O.zoom+1),O)),O)}},js.prototype._calculate=function(M,O,Y,ae){return ae.zoom>ae.zoomHistory.lastIntegerZoom?{from:M,to:O}:{from:Y,to:O}},js.prototype.interpolate=function(M){return M};var rs=function(M){this.specification=M};rs.prototype.possiblyEvaluate=function(M,O,Y,ae){return!!M.expression.evaluate(O,null,{},Y,ae)}
94,rs.prototype.interpolate=function(){return!1};var Io=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 no(Y,void 0),he=this.defaultTransitionablePropertyValues[O]=new os(Y);this.defaultTransitioningPropertyValues[O]=he.untransitioned(),this.defaultPossiblyEvaluatedValues[O]=ae.possiblyEvaluate({})}};Jr("DataDrivenProperty",xa),Jr("DataConstantProperty",ua),Jr("CrossFadedDataDrivenProperty",Ns),Jr("CrossFadedProperty",js),Jr("ColorRampProperty",rs);var Go=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 Bs(ae.layout)),ae.paint)){for(var he in this._transitionablePaint=new es(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 ts(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;if(this._validate(gn,ve,Y,ae,he))return}Y!=="visibility"?this._unevaluatedLayout.setValue(Y,ae):this.visibility=ae},O.prototype.getPaintProperty=function(Y){return T(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(sn,ve,Y,ae,he))return!1}if(T(Y,"-transition"))return this._transitionablePaint.setTransition(Y.slice(0,-11),ae||void 0),!1;var Ae=this._transitionablePaint._values[Y],Re=Ae.property.specification["property-type"]==="cross-faded-data-driven",Ze=Ae.value.isDataDriven(),lt=Ae.value;this._transitionablePaint.setValue(Y,ae),this._handleSpecialPaintPropertyUpdate(Y);var pt=this._transitionablePaint._values[Y].value;return pt.isDataDriven()||Ze||Re||this._handleOverridablePaintPropertyUpdate(Y,lt,pt)},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: 11,623 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),w(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,Ae){return Ae===void 0&&(Ae={}),(!Ae||Ae.validate!==!1)&&_n(this,Y.call(Zr,{key:ae,layerType:this.type,objectKey:he,value:ve,styleSpec:Pe,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 Fi&&qo(ae.property.specification)&&(ae.value.kind==="source"||ae.value.kind==="composite")&&ae.value.isStateDependent)return!0}return!1},O}(Te),Qs={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},As=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},Ka=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function ii(M,O){O===void 0&&(O=1);var Y=0,ae=0;return{members:M.map(function(he){var ve,Ae=(ve=he.type,Qs[ve].BYTES_PER_ELEMENT),Re=Y=ds(Y,Math.max(O,Ae)),Ze=he.components||1;return ae=Math.max(ae,Ae),Y+=Ae*Ze,{name:he.name,type:he.type,components:Ze,offset:Re}}),size:ds(Y,Math.max(ae,O)),alignment:O}}function ds(M,O){return Math.ceil(M/O)*O}Ka.serialize=function(M,O){return M._trim(),O&&(M.isTransferred=!0,O.push(M.arrayBuffer)),{length:M.length,arrayBuffer:M.arrayBuffer}},Ka.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},Ka.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ka.prototype.clear=function(){this.length=0},Ka.prototype.resize=function(M){this.reserve(M),this.length=M},Ka.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)}},Ka.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ss=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}(Ka);ss.prototype.bytesPerElement=4,Jr("StructArrayLayout2i4",ss);var Ii=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 Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,Y,ae,he,ve)},O.prototype.emplace=function(Y,ae,he,ve,Ae){var Re=4*Y;return this.int16[Re+0]=ae,this.int16[Re+1]=he,this.int16[Re+2]=ve,this.int16[Re+3]=Ae,Y},O}(Ka);Ii.prototype.bytesPerElement=8,Jr("StructArrayLayout4i8",Ii);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)},O.prototype.emplaceBack=function(Y,ae,he,ve,Ae,Re){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,Y,ae,he,ve,Ae,Re)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re,Ze){var lt=6*Y;return this.int16[lt+0]=ae,this.int16[lt+1]=he,this.int16[lt+2]=ve,this.int16[lt+3]=Ae,this.int16[lt+4]=Re,this.int16[lt+5]=Ze,Y},O}(Ka);ms.prototype.bytesPerElement=12,Jr("StructArrayLayout2i4i12",ms);var Ss=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,Ae,Re){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,Y,ae,he,ve,Ae,Re)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re,Ze){var lt=4*Y,pt=8*Y;return this.int16[lt+0]=ae,this.int16[lt+1]=he,this.uint8[pt+4]=ve,this.uint8[pt+5]=Ae,this.uint8[pt+6]=Re,this.uint8[pt+7]=Ze,Y},O}(Ka);Ss.prototype.bytesPerElement=8,Jr("StructArrayLayout2i4ub8",Ss);var xs=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,Ae,Re,Ze,lt,pt,Ft){var Wt=this.length;return this.resize(Wt+1),this.emplace(Wt,Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt){var qt=9*Y,nr=18*Y;return this.uint16[qt+0]=ae,this.uint16[qt+1]=he,this.uint16[qt+2]=ve,this.uint16[qt+3]=Ae,this.uint16[qt+4]=Re,this.uint16[qt+5]=Ze,this.uint16[qt+6]=lt,this.uint16[qt+7]=pt,this.uint8[nr+16]=Ft,this.uint8[nr+17]=Wt,Y},O}(Ka);xs.prototype.bytesPerElement=18,Jr("StructArrayLayout8ui2ub18",xs);var Es=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,Ae,Re,Ze,lt,pt,Ft,Wt,qt){var nr=this.length;return this.resize(nr+1),this.emplace(nr,Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr){var dr=12*Y;return this.int16[dr+0]=ae,this.int16[dr+1]=he,this.int16[dr+2]=ve,this.int16[dr+3]=Ae,this.uint16[dr+4]=Re,this.uint16[dr+5]=Ze,this.uint16[dr+6]=lt,this.uint16[dr+7]=pt,this.int16[dr+8]=Ft,this.int16[dr+9]=Wt,this.int16[dr+10]=qt,this.int16[dr+11]=nr,Y},O}(Ka);Es.prototype.bytesPerElement=24,Jr("StructArrayLayout4i4ui4i24",Es);var ls=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 Ae=3*Y;return this.float32[Ae+0]=ae,this.float32[Ae+1]=he,this.float32[Ae+2]=ve,Y},O}(Ka);ls.prototype.bytesPerElement=12,Jr("StructArrayLayout3f12",ls);var $s=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}(Ka);$s.prototype.bytesPerElement=4,Jr("StructArrayLayout1ul4",$s);var fl=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,Ae,Re,Ze,lt,pt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,Y,ae,he,ve,Ae,Re,Ze,lt,pt)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft){var Wt=10*Y,qt=5*Y;return this.int16[Wt+0]=ae,this.int16[Wt+1]=he,this.int16[Wt+2]=ve,this.int16[Wt+3]=Ae,this.int16[Wt+4]=Re,this.int16[Wt+5]=Ze,this.uint32[qt+3]=lt,this.uint16[Wt+8]=pt,this.uint16[Wt+9]=Ft,Y},O}(Ka);fl.prototype.bytesPerElement=20,Jr("StructArrayLayout6i1ul2ui20",fl);var gs=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,Ae,Re){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,Y,ae,he,ve,Ae,Re)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re,Ze){var lt=6*Y;return this.int16[lt+0]=ae,this.int16[lt+1]=he,this.int16[lt+2]=ve,this.int16[lt+3]=Ae,this.int16[lt+4]=Re,this.int16[lt+5]=Ze,Y},O}(Ka);gs.prototype.bytesPerElement=12,Jr("StructArrayLayout2i2i2i12",gs);var el=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,Ae){var Re=this.length;return this.resize(Re+1),this.emplace(Re,Y,ae,he,ve,Ae)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re){var Ze=4*Y,lt=8*Y;return this.float32[Ze+0]=ae,this.float32[Ze+1]=he,this.float32[Ze+2]=ve,this.int16[lt+6]=Ae,this.int16[lt+7]=Re,Y},O}(Ka);el.prototype.bytesPerElement=16,Jr("StructArrayLayout2f1f2i16",el);var Ls=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 Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,Y,ae,he,ve)},O.prototype.emplace=function(Y,ae,he,ve,Ae){var Re=12*Y,Ze=3*Y;return this.uint8[Re+0]=ae,this.uint8[Re+1]=he,this.float32[Ze+1]=ve,this.float32[Ze+2]=Ae,Y},O}(Ka);Ls.prototype.bytesPerElement=12,Jr("StructArrayLayout2ub2f12",Ls);var ao=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 Ae=3*Y;return this.uint16[Ae+0]=ae,this.uint16[Ae+1]=he,this.uint16[Ae+2]=ve,Y},O}(Ka);ao.prototype.bytesPerElement=6,Jr("StructArrayLayout3ui6",ao);
vendor: 17,687 bytes, line 94
94var hl=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,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr,dr,Ar,Mr,Nr){var jr=this.length;return this.resize(jr+1),this.emplace(jr,Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr,dr,Ar,Mr,Nr)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr,dr,Ar,Mr,Nr,jr){var Yr=24*Y,fn=12*Y,yn=48*Y;return this.int16[Yr+0]=ae,this.int16[Yr+1]=he,this.uint16[Yr+2]=ve,this.uint16[Yr+3]=Ae,this.uint32[fn+2]=Re,this.uint32[fn+3]=Ze,this.uint32[fn+4]=lt,this.uint16[Yr+10]=pt,this.uint16[Yr+11]=Ft,this.uint16[Yr+12]=Wt,this.float32[fn+7]=qt,this.float32[fn+8]=nr,this.uint8[yn+36]=dr,this.uint8[yn+37]=Ar,this.uint8[yn+38]=Mr,this.uint32[fn+10]=Nr,this.int16[Yr+22]=jr,Y},O}(Ka);hl.prototype.bytesPerElement=48,Jr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",hl);var pl=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,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr,dr,Ar,Mr,Nr,jr,Yr,fn,yn,Bn,Rn,Yn,oa,sa,Qn,da){var ha=this.length;return this.resize(ha+1),this.emplace(ha,Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr,dr,Ar,Mr,Nr,jr,Yr,fn,yn,Bn,Rn,Yn,oa,sa,Qn,da)},O.prototype.emplace=function(Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr,dr,Ar,Mr,Nr,jr,Yr,fn,yn,Bn,Rn,Yn,oa,sa,Qn,da,ha){var la=34*Y,Qa=17*Y;return this.int16[la+0]=ae,this.int16[la+1]=he,this.int16[la+2]=ve,this.int16[la+3]=Ae,this.int16[la+4]=Re,this.int16[la+5]=Ze,this.int16[la+6]=lt,this.int16[la+7]=pt,this.uint16[la+8]=Ft,this.uint16[la+9]=Wt,this.uint16[la+10]=qt,this.uint16[la+11]=nr,this.uint16[la+12]=dr,this.uint16[la+13]=Ar,this.uint16[la+14]=Mr,this.uint16[la+15]=Nr,this.uint16[la+16]=jr,this.uint16[la+17]=Yr,this.uint16[la+18]=fn,this.uint16[la+19]=yn,this.uint16[la+20]=Bn,this.uint16[la+21]=Rn,this.uint16[la+22]=Yn,this.uint32[Qa+12]=oa,this.float32[Qa+13]=sa,this.float32[Qa+14]=Qn,this.float32[Qa+15]=da,this.float32[Qa+16]=ha,Y},O}(Ka);pl.prototype.bytesPerElement=68,Jr("StructArrayLayout8i15ui1ul4f68",pl);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}(Ka);le.prototype.bytesPerElement=4,Jr("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 Ae=3*Y;return this.int16[Ae+0]=ae,this.int16[Ae+1]=he,this.int16[Ae+2]=ve,Y},O}(Ka);C.prototype.bytesPerElement=6,Jr("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 Ae=2*Y,Re=4*Y;return this.uint32[Ae+0]=ae,this.uint16[Re+2]=he,this.uint16[Re+3]=ve,Y},O}(Ka);z.prototype.bytesPerElement=8,Jr("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;return 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}(Ka);B.prototype.bytesPerElement=4,Jr("StructArrayLayout2ui4",B);var q=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}(Ka);q.prototype.bytesPerElement=2,Jr("StructArrayLayout1ui2",q);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}(Ka);ie.prototype.bytesPerElement=8,Jr("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 Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,Y,ae,he,ve)},O.prototype.emplace=function(Y,ae,he,ve,Ae){var Re=4*Y;return this.float32[Re+0]=ae,this.float32[Re+1]=he,this.float32[Re+2]=ve,this.float32[Re+3]=Ae,Y},O}(Ka);ue.prototype.bytesPerElement=16,Jr("StructArrayLayout4f16",ue);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={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}(As);me.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 me(this,Y)},O}(fl);Jr("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}(As);Me.prototype.size=48;var Ne=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}(hl);Jr("PlacedSymbolArray",Ne);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}(As);We.prototype.size=68;var rt=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}(pl);Jr("SymbolInstanceArray",rt);var vt=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);Jr("GlyphOffsetArray",vt);var Lt=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);Jr("SymbolLineVertexArray",Lt);var xt=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}(As);xt.prototype.size=8;var kt=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 xt(this,Y)},O}(z);Jr("FeatureIndexArray",kt);var gt=ii([{name:"a_pos",components:2,type:"Int16"}],4).members,Rt=function(M){M===void 0&&(M=[]),this.segments=M};function zt(M,O){return 256*(M=u(Math.floor(M),0,255))+(O=u(Math.floor(O),0,255))}Rt.prototype.prepareSegment=function(M,O,Y,ae){var he=this.segments[this.segments.length-1];return M>Rt.MAX_VERTEX_ARRAY_LENGTH&&A("Max vertices per segment is "+Rt.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+M),(!he||he.vertexLength+M>Rt.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},Rt.prototype.get=function(){return this.segments},Rt.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()}},Rt.simpleSegment=function(M,O,Y,ae){return new Rt([{vertexOffset:M,primitiveOffset:O,vertexLength:Y,primitiveLength:ae,vaos:{},sortKey:0}])},Rt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Jr("SegmentVector",Rt);var Ut=ii([{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"}]),tr=n(function(M){M.exports=function(O,Y){var ae,he,ve,Ae,Re,Ze,lt,pt;for(ae=3&O.length,he=O.length-ae,ve=Y,Re=3432918353,Ze=461845907,pt=0;pt<he;)lt=255&O.charCodeAt(pt)|(255&O.charCodeAt(++pt))<<8|(255&O.charCodeAt(++pt))<<16|(255&O.charCodeAt(++pt))<<24,++pt,ve=27492+(65535&(Ae=5*(65535&(ve=(ve^=lt=(65535&(lt=(lt=(65535<)*Re+(((lt>>>16)*Re&65535)<<16)&4294967295)<<15|lt>>>17))*Ze+(((lt>>>16)*Ze&65535)<<16)&4294967295)<<13|ve>>
vendor: 6,372 bytes, line 94
94>19))+((5*(ve>>>16)&65535)<<16)&4294967295))+((58964+(Ae>>>16)&65535)<<16);switch(lt=0,ae){case 3:lt^=(255&O.charCodeAt(pt+2))<<16;case 2:lt^=(255&O.charCodeAt(pt+1))<<8;case 1:ve^=lt=(65535&(lt=(lt=(65535&(lt^=255&O.charCodeAt(pt)))*Re+(((lt>>>16)*Re&65535)<<16)&4294967295)<<15|lt>>>17))*Ze+(((lt>>>16)*Ze&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}}),ur=n(function(M){M.exports=function(O,Y){for(var ae,he=O.length,ve=Y^he,Ae=0;he>=4;)ae=1540483477*(65535&(ae=255&O.charCodeAt(Ae)|(255&O.charCodeAt(++Ae))<<8|(255&O.charCodeAt(++Ae))<<16|(255&O.charCodeAt(++Ae))<<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,++Ae;switch(he){case 3:ve^=(255&O.charCodeAt(Ae+2))<<16;case 2:ve^=(255&O.charCodeAt(Ae+1))<<8;case 1:ve=1540483477*(65535&(ve^=255&O.charCodeAt(Ae)))+((1540483477*(ve>>>16)&65535)<<16)}return ve=1540483477*(65535&(ve^=ve>>>13))+((1540483477*(ve>>>16)&65535)<<16),(ve^=ve>>>15)>>>0}}),kr=tr,wr=tr,Qr=ur;kr.murmur3=wr,kr.murmur2=Qr;var Kr=function(){this.ids=[],this.positions=[],this.indexed=!1};Kr.prototype.add=function(M,O,Y,ae){this.ids.push(ln(M)),this.positions.push(O,Y,ae)},Kr.prototype.getPositions=function(M){for(var O=ln(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 Ae=this.positions[3*Y],Re=this.positions[3*Y+1],Ze=this.positions[3*Y+2];ve.push({index:Ae,start:Re,end:Ze}),Y++}return ve},Kr.serialize=function(M,O){var Y=new Float64Array(M.ids),ae=new Uint32Array(M.positions);return function he(ve,Ae,Re,Ze){for(;Re<Ze;){for(var lt=ve[Re+Ze>>1],pt=Re-1,Ft=Ze+1;;){do pt++;while(ve[pt]<lt);do Ft--;while(ve[Ft]>lt);if(pt>=Ft)break;Vn(ve,pt,Ft),Vn(Ae,3*pt,3*Ft),Vn(Ae,3*pt+1,3*Ft+1),Vn(Ae,3*pt+2,3*Ft+2)}Ft-Re<Ze-Ft?(he(ve,Ae,Re,Ft),Re=Ft+1):(he(ve,Ae,Ft+1,Ze),Ze=Ft)}}(Y,ae,0,Y.length-1),O&&O.push(Y.buffer,ae.buffer),{ids:Y,positions:ae}},Kr.deserialize=function(M){var O=new Kr;return O.ids=M.ids,O.positions=M.positions,O.indexed=!0,O};var pn=Math.pow(2,53)-1;function ln(M){var O=+M;return!isNaN(O)&&O<=pn?O:kr(String(M))}function Vn(M,O,Y){var ae=M[O];M[O]=M[Y],M[Y]=ae}Jr("FeaturePositionMap",Kr);var Zn=function(M,O){this.gl=M.gl,this.location=O},fa=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}(Zn),Hr=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}(Zn),Tn=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}(Zn),Xn=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}(Zn),Gn=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}(Zn),aa=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=$t.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}(Zn),pa=new Float32Array(16),Ea=function(M){function O(Y,ae){M.call(this,Y,ae),this.current=pa}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}(Zn);function ea(M){return[zt(255*M.r,255*M.g),zt(255*M.b,255*M.a)]}var ba=function(M,O,Y){this.value=M,this.uniformNames=O.map(function(ae){return"u_"+ae}),this.type=Y};ba.prototype.setUniform=function(M,O,Y){M.set(Y.constantOr(this.value))},ba.prototype.getBinding=function(M,O,Y){return this.type==="color"?new aa(M,O):new Hr(M,O)};var va=function(M,O){this.uniformNames=O.map(function(Y){return"u_"+Y}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};va.prototype.setConstantPatternPositions=function(M,O){this.pixelRatioFrom=O.pixelRatio,this.pixelRatioTo=M.pixelRatio,this.patternFrom=O.tlbr,this.patternTo=M.tlbr},va.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)},va.prototype.getBinding=function(M,O,Y){return Y.substr(0,9)==="u_pattern"?new Gn(M,O):new Hr(M,O)};var Pa=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};Pa.prototype.populatePaintArray=function(M,O,Y,ae,he){var ve=this.paintVertexArray.length,Ae=this.expression.evaluate(new ai(0),O,{},ae,[],he);this.paintVertexArray.resize(M),this._setPaintValue(ve,M,Ae)},Pa.prototype.updatePaintArray=function(M,O,Y,ae){var he=this.expression.evaluate({zoom:0},Y,ae);this._setPaintValue(M,O,he)}
94,Pa.prototype._setPaintValue=function(M,O,Y){if(this.type==="color")for(var ae=ea(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))}},Pa.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))},Pa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var _a=function(M,O,Y,ae,he,ve){this.expression=M,this.uniformNames=O.map(function(Ae){return"u_"+Ae+"_t"}),this.type=Y,this.useIntegerZoom=ae,this.zoom=he,this.maxValue=0,this.paintVertexAttributes=O.map(function(Ae){return{name:"a_"+Ae,type:"Float32",components:Y==="color"?4:2,offset:0}}),this.paintVertexArray=new ve};_a.prototype.populatePaintArray=function(M,O,Y,ae,he){var ve=this.expression.evaluate(new ai(this.zoom),O,{},ae,[],he),Ae=this.expression.evaluate(new ai(this.zoom+1),O,{},ae,[],he),Re=this.paintVertexArray.length;this.paintVertexArray.resize(M),this._setPaintValue(Re,M,ve,Ae)},_a.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)},_a.prototype._setPaintValue=function(M,O,Y,ae){if(this.type==="color")for(var he=ea(Y),ve=ea(ae),Ae=M;Ae<O;Ae++)this.paintVertexArray.emplace(Ae,he[0],he[1],ve[0],ve[1]);else{for(var Re=M;Re<O;Re++)this.paintVertexArray.emplace(Re,Y,ae);this.maxValue=Math.max(this.maxValue,Math.abs(Y),Math.abs(ae))}},_a.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))},_a.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},_a.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)},_a.prototype.getBinding=function(M,O,Y){return new Hr(M,O)};var Ia=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};Ia.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)},Ia.prototype.updatePaintArray=function(M,O,Y,ae,he){this._setPaintValues(M,O,Y.patterns&&Y.patterns[this.layerId],he)},Ia.prototype._setPaintValues=function(M,O,Y,ae){if(ae&&Y){var he=Y.min,ve=Y.mid,Ae=Y.max,Re=ae[he],Ze=ae[ve],lt=ae[Ae];if(Re&&Ze&<)for(var pt=M;pt<O;pt++)this.zoomInPaintVertexArray.emplace(pt,Ze.tl[0],Ze.tl[1],Ze.br[0],Ze.br[1],Re.tl[0],Re.tl[1],Re.br[0],Re.br[1],Ze.pixelRatio,Re.pixelRatio),this.zoomOutPaintVertexArray.emplace(pt,Ze.tl[0],Ze.tl[1],Ze.br[0],Ze.br[1],lt.tl[0],lt.tl[1],lt.br[0],lt.br[1],Ze.pixelRatio,lt.pixelRatio)}},Ia.prototype.upload=function(M){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=M.createVertexBuffer(this.zoomInPaintVertexArray,Ut.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=M.createVertexBuffer(this.zoomOutPaintVertexArray,Ut.members,this.expression.isStateDependent))},Ia.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Va=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 Ae=M.paint.get(ve);if(Ae instanceof Fi&&qo(Ae.property.specification)){var Re=Oi(ve,M.type),Ze=Ae.value,lt=Ae.property.specification.type,pt=Ae.property.useIntegerZoom,Ft=Ae.property.specification["property-type"],Wt=Ft==="cross-faded"||Ft==="cross-faded-data-driven";if(Ze.kind==="constant")this.binders[ve]=Wt?new va(Ze.value,Re):new ba(Ze.value,Re,lt),he.push("/u_"+ve);else if(Ze.kind==="source"||Wt){var qt=zi(ve,lt,"source");this.binders[ve]=Wt?new Ia(Ze,lt,pt,O,qt,M.id):new Pa(Ze,Re,lt,qt),he.push("/a_"+ve)}else{var nr=zi(ve,lt,"composite");this.binders[ve]=new _a(Ze,Re,lt,pt,O,nr),he.push("/z_"+ve)}
vendor: 4,730 bytes, line 94
94}}this.cacheKey=he.sort().join("")};Va.prototype.getMaxValue=function(M){var O=this.binders[M];return O instanceof Pa||O instanceof _a?O.maxValue:0},Va.prototype.populatePaintArrays=function(M,O,Y,ae,he){for(var ve in this.binders){var Ae=this.binders[ve];(Ae instanceof Pa||Ae instanceof _a||Ae instanceof Ia)&&Ae.populatePaintArray(M,O,Y,ae,he)}},Va.prototype.setConstantPatternPositions=function(M,O){for(var Y in this.binders){var ae=this.binders[Y];ae instanceof va&&ae.setConstantPatternPositions(M,O)}},Va.prototype.updatePaintArrays=function(M,O,Y,ae,he){var ve=!1;for(var Ae in M)for(var Re=0,Ze=O.getPositions(Ae);Re<Ze.length;Re+=1){var lt=Ze[Re],pt=Y.feature(lt.index);for(var Ft in this.binders){var Wt=this.binders[Ft];if((Wt instanceof Pa||Wt instanceof _a||Wt instanceof Ia)&&Wt.expression.isStateDependent===!0){var qt=ae.paint.get(Ft);Wt.expression=qt.value,Wt.updatePaintArray(lt.start,lt.end,pt,M[Ae],he),ve=!0}}}return ve},Va.prototype.defines=function(){var M=[];for(var O in this.binders){var Y=this.binders[O];(Y instanceof ba||Y instanceof va)&&M.push.apply(M,Y.uniformNames.map(function(ae){return"#define HAS_UNIFORM_"+ae}))}return M},Va.prototype.getPaintVertexBuffers=function(){return this._buffers},Va.prototype.getUniforms=function(M,O){var Y=[];for(var ae in this.binders){var he=this.binders[ae];if(he instanceof ba||he instanceof va||he instanceof _a)for(var ve=0,Ae=he.uniformNames;ve<Ae.length;ve+=1){var Re=Ae[ve];if(O[Re]){var Ze=he.getBinding(M,O[Re],Re);Y.push({name:Re,property:ae,binding:Ze})}}}return Y},Va.prototype.setUniforms=function(M,O,Y,ae){for(var he=0,ve=O;he<ve.length;he+=1){var Ae=ve[he],Re=Ae.name,Ze=Ae.property,lt=Ae.binding;this.binders[Ze].setUniform(lt,ae,Y.get(Ze),Re)}},Va.prototype.updatePaintBuffers=function(M){for(var O in this._buffers=[],this.binders){var Y=this.binders[O];if(M&&Y instanceof Ia){var ae=M.fromScale===2?Y.zoomInPaintVertexBuffer:Y.zoomOutPaintVertexBuffer;ae&&this._buffers.push(ae)}else(Y instanceof Pa||Y instanceof _a)&&Y.paintVertexBuffer&&this._buffers.push(Y.paintVertexBuffer)}},Va.prototype.upload=function(M){for(var O in this.binders){var Y=this.binders[O];(Y instanceof Pa||Y instanceof _a||Y instanceof Ia)&&Y.upload(M)}this.updatePaintBuffers()},Va.prototype.destroy=function(){for(var M in this.binders){var O=this.binders[M];(O instanceof Pa||O instanceof _a||O instanceof Ia)&&O.destroy()}};var fi=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 Ae=ve[he];this.programConfigurations[Ae.id]=new Va(Ae,Y,ae,M)}this.needsUpload=!1,this._featureMap=new Kr,this._bufferOffset=0};function Oi(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 zi(M,O,Y){var ae={color:{source:ie,composite:ue},number:{source:le,composite:ie}},he=function(ve){return{"line-pattern":{source:xs,composite:xs},"fill-pattern":{source:xs,composite:xs},"fill-extrusion-pattern":{source:xs,composite:xs}}[ve]}(M);return he&&he[Y]||ae[O][Y]}fi.prototype.populatePaintArrays=function(M,O,Y,ae,he,ve){for(var Ae in this.programConfigurations)this.programConfigurations[Ae].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},fi.prototype.updatePaintArrays=function(M,O,Y,ae){for(var he=0,ve=Y;he<ve.length;he+=1){var Ae=ve[he];this.needsUpload=this.programConfigurations[Ae.id].updatePaintArrays(M,this._featureMap,O,Ae,ae)||this.needsUpload}},fi.prototype.get=function(M){return this.programConfigurations[M]},fi.prototype.upload=function(M){if(this.needsUpload){for(var O in this.programConfigurations)this.programConfigurations[O].upload(M);this.needsUpload=!1}},fi.prototype.destroy=function(){for(var M in this.programConfigurations)this.programConfigurations[M].destroy()},Jr("ConstantBinder",ba),Jr("CrossFadedConstantBinder",va),Jr("SourceExpressionBinder",Pa),Jr("CrossFadedCompositeBinder",Ia),Jr("CompositeExpressionBinder",_a),Jr("ProgramConfiguration",Va,{omit:["_buffers"]}),Jr("ProgramConfigurationSet",fi);var ui,Ai=(ui=15,{min:-1*Math.pow(2,ui-1),max:Math.pow(2,ui-1)-1});
94function yi(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 Ae=he[ve];Ae.x=Math.round(Ae.x*O),Ae.y=Math.round(Ae.y*O),(Ae.x<Ai.min||Ae.x>Ai.max||Ae.y<Ai.min||Ae.y>Ai.max)&&(A("Geometry exceeds allowed extent, reduce your vector tile buffer size"),Ae.x=u(Ae.x,Ai.min,Ai.max),Ae.y=u(Ae.y,Ai.min,Ai.max))}return Y}function _o(M,O,Y,ae,he){M.emplaceBack(2*O+(ae+1)/2,2*Y+(he+1)/2)}var Wi=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 ss,this.indexArray=new ao,this.segments=new Rt,this.programConfigurations=new fi(gt,M.layers,M.zoom),this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};function Fo(M,O){for(var Y=0;Y<M.length;Y++)if(ns(O,M[Y]))return!0;for(var ae=0;ae<O.length;ae++)if(ns(M,O[ae]))return!0;return!!tl(M,O)}function bs(M,O,Y){return!!ns(M,O)||!!wo(O,M,Y)}function Us(M,O){if(M.length===1)return ml(O,M[0]);for(var Y=0;Y<O.length;Y++)for(var ae=O[Y],he=0;he<ae.length;he++)if(ns(M,ae[he]))return!0;for(var ve=0;ve<M.length;ve++)if(ml(O,M[ve]))return!0;for(var Ae=0;Ae<O.length;Ae++)if(tl(M,O[Ae]))return!0;return!1}function dl(M,O,Y){if(M.length>1){if(tl(M,O))return!0;for(var ae=0;ae<O.length;ae++)if(wo(O[ae],M,Y))return!0}for(var he=0;he<M.length;he++)if(wo(M[he],O,Y))return!0;return!1}function tl(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(rl(ae,he,O[ve],O[ve+1]))return!0;return!1}function rl(M,O,Y,ae){return I(M,Y,ae)!==I(O,Y,ae)&&I(M,O,Y)!==I(M,O,ae)}function wo(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(Gs(M,O[he-1],O[he])<ae)return!0;return!1}function Gs(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 ml(M,O){for(var Y,ae,he,ve=!1,Ae=0;Ae<M.length;Ae++)for(var Re=0,Ze=(Y=M[Ae]).length-1;Re<Y.length;Ze=Re++)ae=Y[Re],he=Y[Ze],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 ns(M,O){for(var Y=!1,ae=0,he=M.length-1;ae<M.length;he=ae++){var ve=M[ae],Ae=M[he];ve.y>O.y!=Ae.y>O.y&&O.x<(Ae.x-ve.x)*(O.y-ve.y)/(Ae.y-ve.y)+ve.x&&(Y=!Y)}return Y}function vl(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 Si(M,O,Y){var ae=O.paint.get(M).value;return ae.kind==="constant"?ae.value:Y.programConfigurations.get(O.id).getMaxValue(M)}function Oo(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])}function zo(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 Ae=[],Re=0;Re<M.length;Re++){var Ze=M[Re];Ae.push(Ze.sub(ve))}return Ae}
94Wi.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 Ae=0,Re=M;Ae<Re.length;Ae+=1){var Ze=Re[Ae],lt=Ze.feature,pt=Ze.id,Ft=Ze.index,Wt=Ze.sourceLayerIndex,qt=this.layers[0]._featureFilter.needGeometry,nr={type:lt.type,id:pt,properties:lt.properties,geometry:qt?yi(lt):[]};if(this.layers[0]._featureFilter.filter(new ai(this.zoom),nr,Y)){qt||(nr.geometry=yi(lt));var dr=ve?ve.evaluate(nr,{},Y):void 0,Ar={id:pt,properties:lt.properties,type:lt.type,sourceLayerIndex:Wt,index:Ft,geometry:nr.geometry,patterns:{},sortKey:dr};he.push(Ar)}}ve&&he.sort(function(Yn,oa){return Yn.sortKey-oa.sortKey});for(var Mr=0,Nr=he;Mr<Nr.length;Mr+=1){var jr=Nr[Mr],Yr=jr,fn=Yr.geometry,yn=Yr.index,Bn=Yr.sourceLayerIndex,Rn=M[yn].feature;this.addFeature(jr,fn,yn,Y),O.featureIndex.insert(Rn,fn,yn,Bn,this.index)}},Wi.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Y)},Wi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Wi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Wi.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,gt),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},Wi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Wi.prototype.addFeature=function(M,O,Y,ae){for(var he=0,ve=O;he<ve.length;he+=1)for(var Ae=0,Re=ve[he];Ae<Re.length;Ae+=1){var Ze=Re[Ae],lt=Ze.x,pt=Ze.y;if(!(lt<0||lt>=8192||pt<0||pt>=8192)){var Ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,M.sortKey),Wt=Ft.vertexLength;_o(this.layoutVertexArray,lt,pt,-1,-1),_o(this.layoutVertexArray,lt,pt,1,-1),_o(this.layoutVertexArray,lt,pt,1,1),_o(this.layoutVertexArray,lt,pt,-1,1),this.indexArray.emplaceBack(Wt,Wt+1,Wt+2),this.indexArray.emplaceBack(Wt,Wt+3,Wt+2),Ft.vertexLength+=4,Ft.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Y,{},ae)},Jr("CircleBucket",Wi,{omit:["layers"]});var El=new Io({"circle-sort-key":new xa(Pe.layout_circle["circle-sort-key"])}),hu={paint:new Io({"circle-radius":new xa(Pe.paint_circle["circle-radius"]),"circle-color":new xa(Pe.paint_circle["circle-color"]),"circle-blur":new xa(Pe.paint_circle["circle-blur"]),"circle-opacity":new xa(Pe.paint_circle["circle-opacity"]),"circle-translate":new ua(Pe.paint_circle["circle-translate"]),"circle-translate-anchor":new ua(Pe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ua(Pe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ua(Pe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new xa(Pe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new xa(Pe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new xa(Pe.paint_circle["circle-stroke-opacity"])}),layout:El},Xo=typeof Float32Array<"u"?Float32Array:Array;function rc(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 yl(M,O,Y){var ae=O[0],he=O[1],ve=O[2],Ae=O[3],Re=O[4],Ze=O[5],lt=O[6],pt=O[7],Ft=O[8],Wt=O[9],qt=O[10],nr=O[11],dr=O[12],Ar=O[13],Mr=O[14],Nr=O[15],jr=Y[0],Yr=Y[1],fn=Y[2],yn=Y[3];return M[0]=jr*ae+Yr*Re+fn*Ft+yn*dr,M[1]=jr*he+Yr*Ze+fn*Wt+yn*Ar,M[2]=jr*ve+Yr*lt+fn*qt+yn*Mr,M[3]=jr*Ae+Yr*pt+fn*nr+yn*Nr,jr=Y[4],Yr=Y[5],fn=Y[6],yn=Y[7],M[4]=jr*ae+Yr*Re+fn*Ft+yn*dr,M[5]=jr*he+Yr*Ze+fn*Wt+yn*Ar,M[6]=jr*ve+Yr*lt+fn*qt+yn*Mr,M[7]=jr*Ae+Yr*pt+fn*nr+yn*Nr,jr=Y[8],Yr=Y[9],fn=Y[10],yn=Y[11],M[8]=jr*ae+Yr*Re+fn*Ft+yn*dr,M[9]=jr*he+Yr*Ze+fn*Wt+yn*Ar,M[10]=jr*ve+Yr*lt+fn*qt+yn*Mr,M[11]=jr*Ae+Yr*pt+fn*nr+yn*Nr,jr=Y[12],Yr=Y[13],fn=Y[14],yn=Y[15],M[12]=jr*ae+Yr*Re+fn*Ft+yn*dr,M[13]=jr*he+Yr*Ze+fn*Wt+yn*Ar,M[14]=jr*ve+Yr*lt+fn*qt+yn*Mr,M[15]=jr*Ae+Yr*pt+fn*nr+yn*Nr,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 pu=yl,Ys,du=function(M,O,Y){return M[0]=O[0]-Y[0],M[1]=O[1]-Y[1],M[2]=O[2]-Y[2],M};Ys=new Xo(3),Xo!=Float32Array&&(Ys[0]=0,Ys[1]=0,Ys[2]=0);function Ll(M,O,Y){var ae=O[0],he=O[1],ve=O[2],Ae=O[3];return M[0]=Y[0]*ae+Y[4]*he+Y[8]*ve+Y[12]*Ae,M[1]=Y[1]*ae+Y[5]*he+Y[9]*ve+Y[13]*Ae,M[2]=Y[2]*ae+Y[6]*he+Y[10]*ve+Y[14]*Ae,M[3]=Y[3]*ae+Y[7]*he+Y[11]*ve+Y[15]*Ae,M}(function(){(function(){var M=new Xo(4);return Xo!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0,M[3]=0),M})()})();var nc=function(M){var O=M[0],Y=M[1];return O*O+Y*Y},Ch=(function(){(function(){var M=new Xo(2);return Xo!=Float32Array&&(M[0]=0,M[1]=0),M})()}(),function(M){function O(Y){M.call(this,Y,hu)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.createBucket=function(Y){return new Wi(Y)},O.prototype.queryRadius=function(Y){var ae=Y;return Si("circle-radius",this,ae)+Si("circle-stroke-width",this,ae)+Oo(this.paint.get("circle-translate"))},O.prototype.queryIntersectsFeature=function(Y,ae,he,ve,Ae,Re,Ze,lt){for(var pt=zo(Y,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Re.angle,Ze),Ft=this.paint.get("circle-radius").evaluate(ae,he)+this.paint.get("circle-stroke-width").evaluate(ae,he),Wt=this.paint.get("circle-pitch-alignment")==="map",qt=Wt?pt:function(Bn,Rn){return Bn.map(function(Yn){return $u(Yn,Rn)})}(pt,lt),nr=Wt?Ft*Ze:Ft,dr=0,Ar=ve;dr<Ar.length;dr+=1)for(var Mr=0,Nr=Ar[dr];Mr<Nr.length;Mr+=1){var jr=Nr[Mr],Yr=Wt?jr:$u(jr,lt),fn=nr,yn=Ll([],[jr.x,jr.y,0,1],lt);
vendor: 4,871 bytes, line 94
94if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?fn*=yn[3]/Re.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(fn*=Re.cameraToCenterDistance/yn[3]),bs(qt,Yr,fn))return!0}return!1},O}(Go));function $u(M,O){var Y=Ll([],[M.x,M.y,0,1],O);return new r(Y[0]/Y[3],Y[1]/Y[3])}var ef=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}(Wi);function mu(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 tf(M,O,Y){var ae=O.width,he=O.height;if(ae!==M.width||he!==M.height){var ve=mu({},{width:ae,height:he},Y);gu(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 gu(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 Ae=M.data,Re=O.data,Ze=0;Ze<he.height;Ze++)for(var lt=((Y.y+Ze)*M.width+Y.x)*ve,pt=((ae.y+Ze)*O.width+ae.x)*ve,Ft=0;Ft<he.width*ve;Ft++)Re[pt+Ft]=Ae[lt+Ft];return O}Jr("HeatmapBucket",ef,{omit:["layers"]});var xl=function(M,O){mu(this,M,1,O)};xl.prototype.resize=function(M){tf(this,M,1)},xl.prototype.clone=function(){return new xl({width:this.width,height:this.height},new Uint8Array(this.data))},xl.copy=function(M,O,Y,ae,he){gu(M,O,Y,ae,he,1)};var Jo=function(M,O){mu(this,M,4,O)};Jo.prototype.resize=function(M){tf(this,M,4)},Jo.prototype.replace=function(M,O){O?this.data.set(M):M instanceof Uint8ClampedArray?this.data=new Uint8Array(M.buffer):this.data=M},Jo.prototype.clone=function(){return new Jo({width:this.width,height:this.height},new Uint8Array(this.data))},Jo.copy=function(M,O,Y,ae,he){gu(M,O,Y,ae,he,4)},Jr("AlphaImage",xl),Jr("RGBAImage",Jo);var Ph={paint:new Io({"heatmap-radius":new xa(Pe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new xa(Pe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ua(Pe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new rs(Pe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ua(Pe.paint_heatmap["heatmap-opacity"])})};function rf(M,O){for(var Y=new Uint8Array(1024),ae={},he=0,ve=0;he<256;he++,ve+=4){ae[O]=he/255;var Ae=M.evaluate(ae);Y[ve+0]=Math.floor(255*Ae.r/Ae.a),Y[ve+1]=Math.floor(255*Ae.g/Ae.a),Y[ve+2]=Math.floor(255*Ae.b/Ae.a),Y[ve+3]=Math.floor(255*Ae.a)}return new Jo({width:256,height:1},Y)}var Ih=function(M){function O(Y){M.call(this,Y,Ph),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 ef(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=rf(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}(Go),Oh={paint:new Io({"hillshade-illumination-direction":new ua(Pe.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new ua(Pe.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ua(Pe.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ua(Pe.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ua(Pe.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ua(Pe.paint_hillshade["hillshade-accent-color"])})},zh=function(M){function O(Y){M.call(this,Y,Oh)}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}(Go),nf=ii([{name:"a_pos",components:2,type:"Int16"}],4).members,vu=Ec,Dh=Ec;function Ec(M,O,Y){Y=Y||2;var ae,he,ve,Ae,Re,Ze,lt,pt=O&&O.length,Ft=pt?O[0]*Y:M.length,Wt=af(M,0,Ft,Y,!0),qt=[];if(!Wt||Wt.next===Wt.prev)return qt;if(pt&&(Wt=function(dr,Ar,Mr,Nr){var jr,Yr,fn,yn,Bn,Rn=[];for(jr=0,Yr=Ar.length;jr<Yr;
vendor: 4,415 bytes, line 94
94jr++)fn=Ar[jr]*Nr,yn=jr<Yr-1?Ar[jr+1]*Nr:dr.length,(Bn=af(dr,fn,yn,Nr,!1))===Bn.next&&(Bn.steiner=!0),Rn.push(Hh(Bn));for(Rn.sort(jh),jr=0;jr<Rn.length;jr++)Uh(Rn[jr],Mr),Mr=nl(Mr,Mr.next);return Mr}(M,O,Wt,Y)),M.length>80*Y){ae=ve=M[0],he=Ae=M[1];for(var nr=Y;nr<Ft;nr+=Y)(Re=M[nr])<ae&&(ae=Re),(Ze=M[nr+1])<he&&(he=Ze),Re>ve&&(ve=Re),Ze>Ae&&(Ae=Ze);lt=(lt=Math.max(ve-ae,Ae-he))!==0?1/lt:0}return ac(Wt,qt,Y,ae,he,lt),qt}function af(M,O,Y,ae,he){var ve,Ae;if(he===bu(M,O,Y,ae)>0)for(ve=O;ve<Y;ve+=ae)Ae=lf(ve,M[ve],M[ve+1],Ae);else for(ve=Y-ae;ve>=O;ve-=ae)Ae=lf(ve,M[ve],M[ve+1],Ae);return Ae&&Lc(Ae,Ae.next)&&(oc(Ae),Ae=Ae.next),Ae}function nl(M,O){if(!M)return M;O||(O=M);var Y,ae=M;do if(Y=!1,ae.steiner||!Lc(ae,ae.next)&&io(ae.prev,ae,ae.next)!==0)ae=ae.next;else{if(oc(ae),(ae=O=ae.prev)===ae.next)break;Y=!0}while(Y||ae!==O);return O}function ac(M,O,Y,ae,he,ve,Ae){if(M){!Ae&&ve&&function(pt,Ft,Wt,qt){var nr=pt;do nr.z===null&&(nr.z=yu(nr.x,nr.y,Ft,Wt,qt)),nr.prevZ=nr.prev,nr.nextZ=nr.next,nr=nr.next;while(nr!==pt);nr.prevZ.nextZ=null,nr.prevZ=null,function(dr){var Ar,Mr,Nr,jr,Yr,fn,yn,Bn,Rn=1;do{for(Mr=dr,dr=null,Yr=null,fn=0;Mr;){for(fn++,Nr=Mr,yn=0,Ar=0;Ar<Rn&&(yn++,Nr=Nr.nextZ);Ar++);for(Bn=Rn;yn>0||Bn>0&&Nr;)yn!==0&&(Bn===0||!Nr||Mr.z<=Nr.z)?(jr=Mr,Mr=Mr.nextZ,yn--):(jr=Nr,Nr=Nr.nextZ,Bn--),Yr?Yr.nextZ=jr:dr=jr,jr.prevZ=Yr,Yr=jr;Mr=Nr}Yr.nextZ=null,Rn*=2}while(fn>1)}(nr)}(M,ae,he,ve);for(var Re,Ze,lt=M;M.prev!==M.next;)if(Re=M.prev,Ze=M.next,ve?Fh(M,ae,he,ve):Rh(M))O.push(Re.i/Y),O.push(M.i/Y),O.push(Ze.i/Y),oc(M),M=Ze.next,lt=Ze.next;else if((M=Ze)===lt){Ae?Ae===1?ac(M=Bh(nl(M),O,Y),O,Y,ae,he,ve,2):Ae===2&&Nh(M,O,Y,ae,he,ve):ac(nl(M),O,Y,ae,he,ve,1);break}}}function Rh(M){var O=M.prev,Y=M,ae=M.next;if(io(O,Y,ae)>=0)return!1;for(var he=M.next.next;he!==M.prev;){if(Cl(O.x,O.y,Y.x,Y.y,ae.x,ae.y,he.x,he.y)&&io(he.prev,he,he.next)>=0)return!1;he=he.next}return!0}function Fh(M,O,Y,ae){var he=M.prev,ve=M,Ae=M.next;if(io(he,ve,Ae)>=0)return!1;for(var Re=he.x<ve.x?he.x<Ae.x?he.x:Ae.x:ve.x<Ae.x?ve.x:Ae.x,Ze=he.y<ve.y?he.y<Ae.y?he.y:Ae.y:ve.y<Ae.y?ve.y:Ae.y,lt=he.x>ve.x?he.x>Ae.x?he.x:Ae.x:ve.x>Ae.x?ve.x:Ae.x,pt=he.y>ve.y?he.y>Ae.y?he.y:Ae.y:ve.y>Ae.y?ve.y:Ae.y,Ft=yu(Re,Ze,O,Y,ae),Wt=yu(lt,pt,O,Y,ae),qt=M.prevZ,nr=M.nextZ;qt&&qt.z>=Ft&&nr&&nr.z<=Wt;){if(qt!==M.prev&&qt!==M.next&&Cl(he.x,he.y,ve.x,ve.y,Ae.x,Ae.y,qt.x,qt.y)&&io(qt.prev,qt,qt.next)>=0||(qt=qt.prevZ,nr!==M.prev&&nr!==M.next&&Cl(he.x,he.y,ve.x,ve.y,Ae.x,Ae.y,nr.x,nr.y)&&io(nr.prev,nr,nr.next)>=0))return!1;nr=nr.nextZ}for(;qt&&qt.z>=Ft;){if(qt!==M.prev&&qt!==M.next&&Cl(he.x,he.y,ve.x,ve.y,Ae.x,Ae.y,qt.x,qt.y)&&io(qt.prev,qt,qt.next)>=0)return!1;qt=qt.prevZ}for(;nr&&nr.z<=Wt;){if(nr!==M.prev&&nr!==M.next&&Cl(he.x,he.y,ve.x,ve.y,Ae.x,Ae.y,nr.x,nr.y)&&io(nr.prev,nr,nr.next)>=0)return!1;nr=nr.nextZ}return!0}function Bh(M,O,Y){var ae=M;do{var he=ae.prev,ve=ae.next.next;!Lc(he,ve)&&of(he,ae,ae.next,ve)&&ic(he,ve)&&ic(ve,he)&&(O.push(he.i/Y),O.push(ae.i/Y),O.push(ve.i/Y),oc(ae),oc(ae.next),ae=M=ve),ae=ae.next}while(ae!==M);return nl(ae)}function Nh(M,O,Y,ae,he,ve){var Ae=M;do{for(var Re=Ae.next.next;Re!==Ae.prev;){if(Ae.i!==Re.i&&qh(Ae,Re)){var Ze=sf(Ae,Re);return Ae=nl(Ae,Ae.next),Ze=nl(Ze,Ze.next),ac(Ae,O,Y,ae,he,ve),void ac(Ze,O,Y,ae,he,ve)}Re=Re.next}Ae=Ae.next}while(Ae!==M)}function jh(M,O){return M.x-O.x}function Uh(M,O){if(O=function(ae,he){var ve,Ae=he,Re=ae.x,Ze=ae.y,lt=-1/0;do{if(Ze<=Ae.y&&Ze>=Ae.next.y&&Ae.next.y!==Ae.y){var pt=Ae.x+(Ze-Ae.y)*(Ae.next.x-Ae.x)/(Ae.next.y-Ae.y);if(pt<=Re&&pt>lt){if(lt=pt,pt===Re){if(Ze===Ae.y)return Ae;if(Ze===Ae.next.y)return Ae.next}ve=Ae.x<Ae.next.x?Ae:Ae.next}}Ae=Ae.next}while(Ae!==he);if(!ve)return null;if(Re===lt)return ve;var Ft,Wt=ve,qt=ve.x,nr=ve.y,dr=1/0;Ae=ve;do Re>=Ae.x&&Ae.x>=qt&&Re!==Ae.x&&Cl(Ze<nr?Re:lt,Ze,qt,nr,Ze<nr?lt:Re,Ze,Ae.x,Ae.y)&&(Ft=Math.abs(Ze-Ae.y)/(Re-Ae.x),ic(Ae,ae)&&(Ft<dr||Ft===dr&&(Ae.x>ve.x||Ae.x===ve.x&&Vh(ve,Ae)))&&(ve=Ae,dr=Ft)),Ae=Ae.next;while(Ae!==Wt);return ve}(M,O)){var Y=sf(O,M);nl(O,O.next),nl(Y,Y.next)}}function Vh(M,O){return io(M.prev,M,O.prev)<0&&io(O.next,M,M.next)<0}function yu(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 Hh(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: 4,110 bytes, line 94
94function Cl(M,O,Y,ae,he,ve,Ae,Re){return(he-Ae)*(O-Re)-(M-Ae)*(ve-Re)>=0&&(M-Ae)*(ae-Re)-(Y-Ae)*(O-Re)>=0&&(Y-Ae)*(ve-Re)-(he-Ae)*(ae-Re)>=0}function qh(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&&of(he,he.next,Y,ae))return!0;he=he.next}while(he!==Y);return!1}(M,O)&&(ic(M,O)&&ic(O,M)&&function(Y,ae){var he=Y,ve=!1,Ae=(Y.x+ae.x)/2,Re=(Y.y+ae.y)/2;do he.y>Re!=he.next.y>Re&&he.next.y!==he.y&&Ae<(he.next.x-he.x)*(Re-he.y)/(he.next.y-he.y)+he.x&&(ve=!ve),he=he.next;while(he!==Y);return ve}(M,O)&&(io(M.prev,M,O.prev)||io(M,O.prev,O))||Lc(M,O)&&io(M.prev,M,M.next)>0&&io(O.prev,O,O.next)>0)}function io(M,O,Y){return(O.y-M.y)*(Y.x-O.x)-(O.x-M.x)*(Y.y-O.y)}function Lc(M,O){return M.x===O.x&&M.y===O.y}function of(M,O,Y,ae){var he=Pc(io(M,O,Y)),ve=Pc(io(M,O,ae)),Ae=Pc(io(Y,ae,M)),Re=Pc(io(Y,ae,O));return he!==ve&&Ae!==Re||!(he!==0||!Cc(M,Y,O))||!(ve!==0||!Cc(M,ae,O))||!(Ae!==0||!Cc(Y,M,ae))||!(Re!==0||!Cc(Y,O,ae))}function Cc(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 Pc(M){return M>0?1:M<0?-1:0}function ic(M,O){return io(M.prev,M,M.next)<0?io(M,O,M.next)>=0&&io(M,M.prev,O)>=0:io(M,O,M.prev)<0||io(M,M.next,O)<0}function sf(M,O){var Y=new xu(M.i,M.x,M.y),ae=new xu(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 lf(M,O,Y,ae){var he=new xu(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 oc(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 xu(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 bu(M,O,Y,ae){for(var he=0,ve=O,Ae=Y-ae;ve<Y;ve+=ae)he+=(M[Ae]-M[ve])*(M[ve+1]+M[Ae+1]),Ae=ve;return he}function Gh(M,O,Y,ae,he){(function ve(Ae,Re,Ze,lt,pt){for(;lt>Ze;){if(lt-Ze>600){var Ft=lt-Ze+1,Wt=Re-Ze+1,qt=Math.log(Ft),nr=.5*Math.exp(2*qt/3),dr=.5*Math.sqrt(qt*nr*(Ft-nr)/Ft)*(Wt-Ft/2<0?-1:1),Ar=Math.max(Ze,Math.floor(Re-Wt*nr/Ft+dr)),Mr=Math.min(lt,Math.floor(Re+(Ft-Wt)*nr/Ft+dr));ve(Ae,Re,Ar,Mr,pt)}var Nr=Ae[Re],jr=Ze,Yr=lt;for(sc(Ae,Ze,Re),pt(Ae[lt],Nr)>0&&sc(Ae,Ze,lt);jr<Yr;){for(sc(Ae,jr,Yr),jr++,Yr--;pt(Ae[jr],Nr)<0;)jr++;for(;pt(Ae[Yr],Nr)>0;)Yr--}pt(Ae[Ze],Nr)===0?sc(Ae,Ze,Yr):(Yr++,sc(Ae,Yr,lt)),Yr<=Re&&(Ze=Yr+1),Re<=Yr&&(lt=Yr-1)}})(M,O,Y||0,ae||M.length-1,he||Yh)}function sc(M,O,Y){var ae=M[O];M[O]=M[Y],M[Y]=ae}function Yh(M,O){return M<O?-1:M>O?1:0}function _u(M,O){var Y=M.length;if(Y<=1)return[M];for(var ae,he,ve=[],Ae=0;Ae<Y;Ae++){var Re=P(M[Ae]);Re!==0&&(M[Ae].area=Math.abs(Re),he===void 0&&(he=Re<0),he===Re<0?(ae&&ve.push(ae),ae=[M[Ae]]):ae.push(M[Ae]))}if(ae&&ve.push(ae),O>1)for(var Ze=0;Ze<ve.length;Ze++)ve[Ze].length<=O||(Gh(ve[Ze],O,1,ve[Ze].length-1,Wh),ve[Ze]=ve[Ze].slice(0,O));return ve}function Wh(M,O){return O.area-M.area}function wu(M,O,Y){for(var ae=Y.patternDependencies,he=!1,ve=0,Ae=O;ve<Ae.length;ve+=1){var Re=Ae[ve].paint.get(M+"-pattern");Re.isConstant()||(he=!0);var Ze=Re.constantOr(null);Ze&&(he=!0,ae[Ze.to]=!0,ae[Ze.from]=!0)}return he}function Tu(M,O,Y,ae,he){for(var ve=he.patternDependencies,Ae=0,Re=O;Ae<Re.length;Ae+=1){var Ze=Re[Ae],lt=Ze.paint.get(M+"-pattern").value;if(lt.kind!=="constant"){var pt=lt.evaluate({zoom:ae-1},Y,{},he.availableImages),Ft=lt.evaluate({zoom:ae},Y,{},he.availableImages),Wt=lt.evaluate({zoom:ae+1},Y,{},he.availableImages);pt=pt&&pt.name?pt.name:pt,Ft=Ft&&Ft.name?Ft.name:Ft,Wt=Wt&&Wt.name?Wt.name:Wt,ve[pt]=!0,ve[Ft]=!0,ve[Wt]=!0,Y.patterns[Ze.id]={min:pt,mid:Ft,max:Wt}}}return Y}Ec.deviation=function(M,O,Y,ae){var he=O&&O.length,ve=he?O[0]*Y:M.length,Ae=Math.abs(bu(M,0,ve,Y));if(he)for(var Re=0,Ze=O.length;Re<Ze;Re++){var lt=O[Re]*Y,pt=Re<Ze-1?O[Re+1]*Y:M.length;Ae-=Math.abs(bu(M,lt,pt,Y))}var Ft=0;for(Re=0;Re<ae.length;Re+=3){var Wt=ae[Re]*Y,qt=ae[Re+1]*Y,nr=ae[Re+2]*Y;Ft+=Math.abs((M[Wt]-M[nr])*(M[qt+1]-M[Wt+1])-(M[Wt]-M[qt])*(M[nr+1]-M[Wt+1
94]))}return Ae===0&&Ft===0?0:Math.abs((Ft-Ae)/Ae)},Ec.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 Ae=0;Ae<O;Ae++)Y.vertices.push(M[he][ve][Ae]);he>0&&(ae+=M[he-1].length,Y.holes.push(ae))}return Y},vu.default=Dh;var Cs=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 ss,this.indexArray=new ao,this.indexArray2=new B,this.programConfigurations=new fi(nf,M.layers,M.zoom),this.segments=new Rt,this.segments2=new Rt,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};Cs.prototype.populate=function(M,O,Y){this.hasPattern=wu("fill",this.layers,O);for(var ae=this.layers[0].layout.get("fill-sort-key"),he=[],ve=0,Ae=M;ve<Ae.length;ve+=1){var Re=Ae[ve],Ze=Re.feature,lt=Re.id,pt=Re.index,Ft=Re.sourceLayerIndex,Wt=this.layers[0]._featureFilter.needGeometry,qt={type:Ze.type,id:lt,properties:Ze.properties,geometry:Wt?yi(Ze):[]};if(this.layers[0]._featureFilter.filter(new ai(this.zoom),qt,Y)){Wt||(qt.geometry=yi(Ze));var nr=ae?ae.evaluate(qt,{},Y,O.availableImages):void 0,dr={id:lt,properties:Ze.properties,type:Ze.type,sourceLayerIndex:Ft,index:pt,geometry:qt.geometry,patterns:{},sortKey:nr};he.push(dr)}}ae&&he.sort(function(Yn,oa){return Yn.sortKey-oa.sortKey});for(var Ar=0,Mr=he;Ar<Mr.length;Ar+=1){var Nr=Mr[Ar],jr=Nr,Yr=jr.geometry,fn=jr.index,yn=jr.sourceLayerIndex;if(this.hasPattern){var Bn=Tu("fill",this.layers,Nr,this.zoom,O);this.patternFeatures.push(Bn)}else this.addFeature(Nr,Yr,fn,Y,{});var Rn=M[fn].feature;O.featureIndex.insert(Rn,Yr,fn,yn,this.index)}},Cs.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Y)},Cs.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)}},Cs.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Cs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Cs.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,nf),this.indexBuffer=M.createIndexBuffer(this.indexArray),this.indexBuffer2=M.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(M),this.uploaded=!0},Cs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Cs.prototype.addFeature=function(M,O,Y,ae,he){for(var ve=0,Ae=_u(O,500);ve<Ae.length;ve+=1){for(var Re=Ae[ve],Ze=0,lt=0,pt=Re;lt<pt.length;lt+=1)Ze+=pt[lt].length;for(var Ft=this.segments.prepareSegment(Ze,this.layoutVertexArray,this.indexArray),Wt=Ft.vertexLength,qt=[],nr=[],dr=0,Ar=Re;dr<Ar.length;dr+=1){var Mr=Ar[dr];if(Mr.length!==0){Mr!==Re[0]&&nr.push(qt.length/2);var Nr=this.segments2.prepareSegment(Mr.length,this.layoutVertexArray,this.indexArray2),jr=Nr.vertexLength;this.layoutVertexArray.emplaceBack(Mr[0].x,Mr[0].y),this.indexArray2.emplaceBack(jr+Mr.length-1,jr),qt.push(Mr[0].x),qt.push(Mr[0].y);for(var Yr=1;Yr<Mr.length;Yr++)this.layoutVertexArray.emplaceBack(Mr[Yr].x,Mr[Yr].y),this.indexArray2.emplaceBack(jr+Yr-1,jr+Yr),qt.push(Mr[Yr].x),qt.push(Mr[Yr].y);Nr.vertexLength+=Mr.length,Nr.primitiveLength+=Mr.length}}for(var fn=vu(qt,nr),yn=0;yn<fn.length;yn+=3)this.indexArray.emplaceBack(Wt+fn[yn],Wt+fn[yn+1],Wt+fn[yn+2]);Ft.vertexLength+=Ze,Ft.primitiveLength+=fn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Y,he,ae)},Jr("FillBucket",Cs,{omit:["layers","patternFeatures"]});var Zh=new Io({"fill-sort-key":new xa(Pe.layout_fill["fill-sort-key"])}),Xh={paint:new Io({"fill-antialias":new ua(Pe.paint_fill["fill-antialias"]),"fill-opacity":new xa(Pe.paint_fill["fill-opacity"]),"fill-color":new xa(Pe.paint_fill["fill-color"]),"fill-outline-color":new xa(Pe.paint_fill["fill-outline-color"]),"fill-translate":new ua(Pe.paint_fill["fill-translate"]),"fill-translate-anchor":new ua(Pe.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ns(Pe.paint_fill["fill-pattern"])}),layout:Zh},Jh=function(M){function O(Y){M.call(this,Y,Xh)}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 Cs(Y)},O.prototype.queryRadius=function(){return Oo(this.paint.get("fill-translate"))},O.prototype.queryIntersectsFeature=function(Y,ae,he,ve,Ae,Re,Ze){return Us(zo(Y,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Re.angle,Ze),ve)},O.prototype.isTileClipped=function(){return!0},O}(Go),cf=ii([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,uf=Pl;function Pl(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(Kh,this,O)}function Kh(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 Ae=he._keys[ae.readVarint()],Re=he._values[ae.readVarint()];he.properties[Ae]=Re}}(Y,O):M==3?O.type=Y.readVarint():M==4&&(O._geometry=Y.pos)}function Qh(M){for(var O,Y,ae=0,he=0,ve=M.length,Ae=ve-1;he<ve;Ae=he++)O=M[he],ae+=((Y=M[Ae]).x-O.x)*(O.y+Y.y);return ae}Pl.types=["Unknown","Point","LineString","Polygon"],Pl.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,Ae=0,Re=[];M.pos<Y;){if(he<=0){var Ze=M.readVarint();ae=7&Ze,he=Ze>>3}if(he--,ae===1||ae===2)ve+=M.readSVarint(),Ae+=M.readSVarint(),ae===1&&(O&&Re.push(O),O=[]),O.push(new r(ve,Ae));else{if(ae!==7)throw new Error("unknown command "+ae);O&&O.push(O[0].clone())}}return O&&Re.push(O),Re},Pl.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,Ae=1/0,Re=-1/0,Ze=1/0,lt=-1/0;M.pos<O;){if(ae<=0){var pt=M.readVarint();Y=7&pt,ae=pt>>3}if(ae--,Y===1||Y===2)(he+=M.readSVarint())<Ae&&(Ae=he),he>Re&&(Re=he),(ve+=M.readSVarint())<Ze&&(Ze=ve),ve>lt&&(lt=ve);else if(Y!==7)throw new Error("unknown command "+Y)}return[Ae,Ze,Re,lt]},Pl.prototype.toGeoJSON=function(M,O,Y){var ae,he,ve=this.extent*Math.pow(2,Y),Ae=this.extent*M,Re=this.extent*O,Ze=this.loadGeometry(),lt=Pl.types[this.type];function pt(qt){for(var nr=0;nr<qt.length;nr++){var dr=qt[nr],Ar=180-360*(dr.y+Re)/ve;qt[nr]=[360*(dr.x+Ae)/ve-180,360/Math.PI*Math.atan(Math.exp(Ar*Math.PI/180)
94)-90]}}switch(this.type){case 1:var Ft=[];for(ae=0;ae<Ze.length;ae++)Ft[ae]=Ze[ae][0];pt(Ze=Ft);break;case 2:for(ae=0;ae<Ze.length;ae++)pt(Ze[ae]);break;case 3:for(Ze=function(qt){var nr=qt.length;if(nr<=1)return[qt];for(var dr,Ar,Mr=[],Nr=0;Nr<nr;Nr++){var jr=Qh(qt[Nr]);jr!==0&&(Ar===void 0&&(Ar=jr<0),Ar===jr<0?(dr&&Mr.push(dr),dr=[qt[Nr]]):dr.push(qt[Nr]))}return dr&&Mr.push(dr),Mr}(Ze),ae=0;ae<Ze.length;ae++)for(he=0;he<Ze[ae].length;he++)pt(Ze[ae][he])}Ze.length===1?Ze=Ze[0]:lt="Multi"+lt;var Wt={type:"Feature",geometry:{type:lt,coordinates:Ze},properties:this.properties};return"id"in this&&(Wt.id=this.id),Wt};var ff=hf;function hf(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($h,this,O),this.length=this._features.length}function $h(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 Ae=ae.readVarint()>>3;he=Ae===1?ae.readString():Ae===2?ae.readFloat():Ae===3?ae.readDouble():Ae===4?ae.readVarint64():Ae===5?ae.readVarint():Ae===6?ae.readSVarint():Ae===7?ae.readBoolean():null}return he}(Y))}function ep(M,O,Y){if(M===3){var ae=new ff(Y,Y.readVarint()+Y.pos);ae.length&&(O[ae.name]=ae)}}hf.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 uf(this._pbf,O,this.extent,this._keys,this._values)};var Il={VectorTile:function(M,O){this.layers=M.readFields(ep,{},O)},VectorTileFeature:uf,VectorTileLayer:ff},tp=Il.VectorTileFeature.types,ku=Math.pow(2,13);function lc(M,O,Y,ae,he,ve,Ae,Re){M.emplaceBack(O,Y,2*Math.floor(ae*ku)+Ae,he*ku*2,ve*ku*2,Math.round(Re))}var Ps=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 ms,this.indexArray=new ao,this.programConfigurations=new fi(cf,M.layers,M.zoom),this.segments=new Rt,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};function rp(M,O){return M.x===O.x&&(M.x<0||M.x>8192)||M.y===O.y&&(M.y<0||M.y>8192)}function np(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})}Ps.prototype.populate=function(M,O,Y){this.features=[],this.hasPattern=wu("fill-extrusion",this.layers,O);for(var ae=0,he=M;ae<he.length;ae+=1){var ve=he[ae],Ae=ve.feature,Re=ve.id,Ze=ve.index,lt=ve.sourceLayerIndex,pt=this.layers[0]._featureFilter.needGeometry,Ft={type:Ae.type,id:Re,properties:Ae.properties,geometry:pt?yi(Ae):[]};if(this.layers[0]._featureFilter.filter(new ai(this.zoom),Ft,Y)){var Wt={id:Re,sourceLayerIndex:lt,index:Ze,geometry:pt?Ft.geometry:yi(Ae),properties:Ae.properties,type:Ae.type,patterns:{}};Ae.id!==void 0&&(Wt.id=Ae.id),this.hasPattern?this.features.push(Tu("fill-extrusion",this.layers,Wt,this.zoom,O)):this.addFeature(Wt,Wt.geometry,Ze,Y,{}),O.featureIndex.insert(Ae,Wt.geometry,Ze,lt,this.index,!0)}}},Ps.prototype.addFeatures=function(M,O,Y){for(var ae=0,he=this.features;ae<he.length;ae+=1){var ve=he[ae],Ae=ve.geometry;this.addFeature(ve,Ae,ve.index,O,Y)}},Ps.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Y)},Ps.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ps.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ps.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,cf),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},Ps.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ps.prototype.addFeature=function(M,O,Y,ae,he){for(var ve=0,Ae=_u(O,500);ve<Ae.length;ve+=1){for(var Re=Ae[ve],Ze=0,lt=0,pt=Re;lt<pt.length;lt+=1)Ze+=pt[lt].length;for(var Ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),Wt=0,qt=Re;Wt<qt.length;Wt+=1){var nr=qt[Wt];if(nr.length!==0&&!np(nr))for(var dr=0,Ar=0;Ar<nr.length;Ar++){var Mr=nr[Ar];if(Ar>=1){var Nr=nr[Ar-1];if(!rp(Mr,Nr)){Ft.vertexLength+4>Rt.MAX_VERTEX_ARRAY_LENGTH&&(Ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var jr=Mr.sub(Nr)._perp()._unit(),Yr=Nr.dist(Mr);dr+Yr>32768&&(dr=0),lc(this.layoutVertexArray,Mr.x,Mr.y,jr.x,jr.y,0,0,dr),lc(this.layoutVertexArray,Mr.x,Mr.y,jr.x,jr.y,0,1,dr),dr+=Yr,lc(this.layoutVertexArray,Nr.x,Nr.y,jr.x,jr.y,0,0,dr),lc(this.layoutVertexArray,Nr.x,Nr.y,jr.x,jr.y,0,1,dr);var fn=Ft.vertexLength;this.indexArray.emplaceBack(fn,fn+2,fn+1),this.indexArray.emplaceBack(fn+1,fn+2,f
94n+3),Ft.vertexLength+=4,Ft.primitiveLength+=2}}}}if(Ft.vertexLength+Ze>Rt.MAX_VERTEX_ARRAY_LENGTH&&(Ft=this.segments.prepareSegment(Ze,this.layoutVertexArray,this.indexArray)),tp[M.type]==="Polygon"){for(var yn=[],Bn=[],Rn=Ft.vertexLength,Yn=0,oa=Re;Yn<oa.length;Yn+=1){var sa=oa[Yn];if(sa.length!==0){sa!==Re[0]&&Bn.push(yn.length/2);for(var Qn=0;Qn<sa.length;Qn++){var da=sa[Qn];lc(this.layoutVertexArray,da.x,da.y,0,0,1,1,0),yn.push(da.x),yn.push(da.y)}}}for(var ha=vu(yn,Bn),la=0;la<ha.length;la+=3)this.indexArray.emplaceBack(Rn+ha[la],Rn+ha[la+2],Rn+ha[la+1]);Ft.primitiveLength+=ha.length/3,Ft.vertexLength+=Ze}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Y,he,ae)},Jr("FillExtrusionBucket",Ps,{omit:["layers","features"]});var ap={paint:new Io({"fill-extrusion-opacity":new ua(Pe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new xa(Pe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ua(Pe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ua(Pe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ns(Pe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new xa(Pe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new xa(Pe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ua(Pe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},ip=function(M){function O(Y){M.call(this,Y,ap)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O.prototype.createBucket=function(Y){return new Ps(Y)},O.prototype.queryRadius=function(){return Oo(this.paint.get("fill-extrusion-translate"))},O.prototype.is3D=function(){return!0},O.prototype.queryIntersectsFeature=function(Y,ae,he,ve,Ae,Re,Ze,lt){var pt=zo(Y,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Re.angle,Ze),Ft=this.paint.get("fill-extrusion-height").evaluate(ae,he),Wt=this.paint.get("fill-extrusion-base").evaluate(ae,he),qt=function(dr,Ar,Mr,Nr){for(var jr=[],Yr=0,fn=dr;Yr<fn.length;Yr+=1){var yn=fn[Yr],Bn=[yn.x,yn.y,Nr,1];Ll(Bn,Bn,Ar),jr.push(new r(Bn[0]/Bn[3],Bn[1]/Bn[3]))}return jr}(pt,lt,0,0),nr=function(dr,Ar,Mr,Nr){for(var jr=[],Yr=[],fn=Nr[8]*Ar,yn=Nr[9]*Ar,Bn=Nr[10]*Ar,Rn=Nr[11]*Ar,Yn=Nr[8]*Mr,oa=Nr[9]*Mr,sa=Nr[10]*Mr,Qn=Nr[11]*Mr,da=0,ha=dr;da<ha.length;da+=1){for(var la=ha[da],Qa=[],Ha=[],ti=0,wa=la;ti<wa.length;ti+=1){var Ga=wa[ti],bi=Ga.x,hi=Ga.y,Li=Nr[0]*bi+Nr[4]*hi+Nr[12],pi=Nr[1]*bi+Nr[5]*hi+Nr[13],lo=Nr[2]*bi+Nr[6]*hi+Nr[14],Ci=Nr[3]*bi+Nr[7]*hi+Nr[15],Do=lo+Bn,ko=Ci+Rn,So=Li+Yn,Yo=pi+oa,No=lo+sa,co=Ci+Qn,Eo=new r((Li+fn)/ko,(pi+yn)/ko);Eo.z=Do/ko,Qa.push(Eo);var Ji=new r(So/co,Yo/co);Ji.z=No/co,Ha.push(Ji)}jr.push(Qa),Yr.push(Ha)}return[jr,Yr]}(ve,Wt,Ft,lt);return function(dr,Ar,Mr){var Nr=1/0;Us(Mr,Ar)&&(Nr=pf(Mr,Ar[0]));for(var jr=0;jr<Ar.length;jr++)for(var Yr=Ar[jr],fn=dr[jr],yn=0;yn<Yr.length-1;yn++){var Bn=Yr[yn],Rn=Yr[yn+1],Yn=fn[yn],oa=fn[yn+1],sa=[Bn,Rn,oa,Yn,Bn];Fo(Mr,sa)&&(Nr=Math.min(Nr,pf(Mr,sa)))}return Nr!==1/0&&Nr}(nr[0],nr[1],qt)},O}(Go);function cc(M,O){return M.x*O.x+M.y*O.y}function pf(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],Ae=M[0],Re=Y.sub(he),Ze=ve.sub(he),lt=Ae.sub(he),pt=cc(Re,Re),Ft=cc(Re,Ze),Wt=cc(Ze,Ze),qt=cc(lt,Re),nr=cc(lt,Ze),dr=pt*Wt-Ft*Ft,Ar=(Wt*qt-Ft*nr)/dr,Mr=(pt*nr-Ft*qt)/dr,Nr=1-Ar-Mr,jr=he.z*Nr+Y.z*Ar+ve.z*Mr;if(isFinite(jr))return jr}return 1/0}for(var Yr=1/0,fn=0,yn=O;fn<yn.length;fn+=1){var Bn=yn[fn];Yr=Math.min(Yr,Bn.z)}return Yr}var df=ii([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,op=Il.VectorTileFeature.types,sp=Math.cos(Math.PI/180*37.5),mf=Math.pow(2,14)/.5,Ko=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 Ss,this.indexArray=new ao,this.programConfigurations=new fi(df,M.layers,M.zoom),this.segments=new Rt,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};Ko.prototype.populate=function(M,O,Y){this.hasPattern=wu("line",this.layers,O);for(var ae=this.layers[0].layout.get("line-sort-key"),he=[],ve=0,Ae=M;ve<Ae.length;ve+=1){var Re=Ae[ve],Ze=Re.feature,lt=Re.id,pt=Re.index,Ft=Re.sourceLayerIndex,Wt=this.layers[0]._featureFilter.needGeometry,qt={type:Ze.type,id:lt,properties:Ze.properties,geometry:Wt?yi(Ze):[]};if(this.layers[0]._featureFilter.filter(new ai(this.zoom),qt,Y)){Wt||(qt.geometry=yi(Ze));var nr=ae?ae.evaluate(qt,{},Y):void 0,dr={id:lt,properties:Ze.properties,type:Ze.type,sourceLayerIndex:Ft,index:
94pt,geometry:qt.geometry,patterns:{},sortKey:nr};he.push(dr)}}ae&&he.sort(function(Yn,oa){return Yn.sortKey-oa.sortKey});for(var Ar=0,Mr=he;Ar<Mr.length;Ar+=1){var Nr=Mr[Ar],jr=Nr,Yr=jr.geometry,fn=jr.index,yn=jr.sourceLayerIndex;if(this.hasPattern){var Bn=Tu("line",this.layers,Nr,this.zoom,O);this.patternFeatures.push(Bn)}else this.addFeature(Nr,Yr,fn,Y,{});var Rn=M[fn].feature;O.featureIndex.insert(Rn,Yr,fn,yn,this.index)}},Ko.prototype.update=function(M,O,Y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Y)},Ko.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)}},Ko.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ko.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ko.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,df),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},Ko.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ko.prototype.addFeature=function(M,O,Y,ae,he){for(var ve=this.layers[0].layout,Ae=ve.get("line-join").evaluate(M,{}),Re=ve.get("line-cap"),Ze=ve.get("line-miter-limit"),lt=ve.get("line-round-limit"),pt=0,Ft=O;pt<Ft.length;pt+=1){var Wt=Ft[pt];this.addLine(Wt,M,Ae,Re,Ze,lt)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Y,he,ae)},Ko.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 Ae=0;Ae<M.length-1;Ae++)this.totalDistance+=M[Ae].dist(M[Ae+1]);this.updateScaledDistance()}for(var Re=op[O.type]==="Polygon",Ze=M.length;Ze>=2&&M[Ze-1].equals(M[Ze-2]);)Ze--;for(var lt=0;lt<Ze-1&&M[lt].equals(M[lt+1]);)lt++;if(!(Ze<(Re?3:2))){Y==="bevel"&&(he=1.05);var pt,Ft=this.overscaling<=16?122880/(512*this.overscaling):0,Wt=this.segments.prepareSegment(10*Ze,this.layoutVertexArray,this.indexArray),qt=void 0,nr=void 0,dr=void 0,Ar=void 0;this.e1=this.e2=-1,Re&&(pt=M[Ze-2],Ar=M[lt].sub(pt)._unit()._perp());for(var Mr=lt;Mr<Ze;Mr++)if(!(nr=Mr===Ze-1?Re?M[lt+1]:void 0:M[Mr+1])||!M[Mr].equals(nr)){Ar&&(dr=Ar),pt&&(qt=pt),pt=M[Mr],Ar=nr?nr.sub(pt)._unit()._perp():dr;var Nr=(dr=dr||Ar).add(Ar);Nr.x===0&&Nr.y===0||Nr._unit();var jr=dr.x*Ar.x+dr.y*Ar.y,Yr=Nr.x*Ar.x+Nr.y*Ar.y,fn=Yr!==0?1/Yr:1/0,yn=2*Math.sqrt(2-2*Yr),Bn=Yr<sp&&qt&&nr,Rn=dr.x*Ar.y-dr.y*Ar.x>0;if(Bn&&Mr>lt){var Yn=pt.dist(qt);if(Yn>2*Ft){var oa=pt.sub(pt.sub(qt)._mult(Ft/Yn)._round());this.updateDistance(qt,oa),this.addCurrentVertex(oa,dr,0,0,Wt),qt=oa}}var sa=qt&&nr,Qn=sa?Y:Re?"butt":ae;if(sa&&Qn==="round"&&(fn<ve?Qn="miter":fn<=2&&(Qn="fakeround")),Qn==="miter"&&fn>he&&(Qn="bevel"),Qn==="bevel"&&(fn>2&&(Qn="flipbevel"),fn<he&&(Qn="miter")),qt&&this.updateDistance(qt,pt),Qn==="miter")Nr._mult(fn),this.addCurrentVertex(pt,Nr,0,0,Wt);else if(Qn==="flipbevel"){if(fn>100)Nr=Ar.mult(-1);else{var da=fn*dr.add(Ar).mag()/dr.sub(Ar).mag();Nr._perp()._mult(da*(Rn?-1:1))}this.addCurrentVertex(pt,Nr,0,0,Wt),this.addCurrentVertex(pt,Nr.mult(-1),0,0,Wt)}else if(Qn==="bevel"||Qn==="fakeround"){var ha=-Math.sqrt(fn*fn-1),la=Rn?ha:0,Qa=Rn?0:ha;if(qt&&this.addCurrentVertex(pt,dr,la,Qa,Wt),Qn==="fakeround")for(var Ha=Math.round(180*yn/Math.PI/20),ti=1;ti<Ha;ti++){var wa=ti/Ha;if(wa!==.5){var Ga=wa-.5;wa+=wa*Ga*(wa-1)*((1.0904+jr*(jr*(3.55645-1.43519*jr)-3.2452))*Ga*Ga+(.848013+jr*(.215638*jr-1.06021)))}var bi=Ar.sub(dr)._mult(wa)._add(dr)._unit()._mult(Rn?-1:1);this.addHalfVertex(pt,bi.x,bi.y,!1,Rn,0,Wt)}nr&&this.addCurrentVertex(pt,Ar,-la,-Qa,Wt)}else if(Qn==="butt")this.addCurrentVertex(pt,Nr,0,0,Wt);else if(Qn==="square"){var hi=qt?1:-1;this.addCurrentVertex(pt,Nr,hi,hi,Wt)}else Qn==="round"&&(qt&&(this.addCurrentVertex(pt,dr,0,0,Wt),this.addCurrentVertex(pt,dr,1,1,Wt,!0)),nr&&(this.addCurrentVertex(pt,Ar,-1,-1,Wt,!0),this.addCurrentVertex(pt,Ar,0,0,Wt)));if(Bn&&Mr<Ze-1){var Li=pt.dist(nr);if(Li>2*Ft){var pi=pt.add(nr.sub(pt)._mult(Ft/Li)._round());this.updateDistance(pt,pi),this.addCurrentVertex(pi,Ar,0,0,Wt),pt=pi}}}}},Ko.prototype.addCurrentVertex=function(M,O,Y,ae,he,ve){ve===void 0&&(ve=!1);var Ae=O.x+O.y*Y,Re=O.y-O.x*Y,Ze=-O.x+O.y*ae,lt=-O.y-O.x*ae;this.addHalfVertex(M,Ae,Re,ve,!1,Y,he),this.addHalfVertex(M,Ze,lt,ve,!0,-ae,he),this.distance>mf/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(M,O,Y,ae,he,ve))},Ko.prototype.addHalfVertex=function(M,O,Y,ae,he,ve,Ae){var Re=M.x,Ze=M.y,lt=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((Re<<1)+(ae?1:0),(Ze<<1)+(he?1:0),Math.round(63*O)+128,Math.round(63*Y)+128,1+(ve===0?0:ve<0?-1:1)|(63<)<<2,lt>>6);var pt=Ae.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,pt),Ae.primitiveLength++),he?this.e2=pt:this.e1=pt},Ko.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(mf-1):this.distance},Ko.prototype.updateDistance=function(M,O){this.distance+=M.dist(O),this.updateScaledDistance()},Jr("LineBucket",Ko,{omit:["layers","patternFeatures"]});var lp=new Io({"line-cap":new ua(Pe.layout_line["line-cap"]),"line-join":new xa(Pe.layout_line["line-join"]),"line-miter-limit":new ua(Pe.layout_line["line-miter-limit"]),"line-round-limit":new ua(Pe.layout_line["line-round-limit"]),"line-sort-key":new xa(Pe.layout_line["line-sort-key"])}),gf={paint:new Io({"line-opacity":new xa(Pe.paint_line["line-opacity"]),"line-color":new xa(Pe.paint_line["line-color"]),"line-translate":new ua(Pe.paint_line["line-translate"]),"line-translate-anchor":new ua(Pe.paint_line["line-translate-anchor"]),"line-width":new xa(Pe.paint_line["line-width"]),"line-gap-width":new xa(Pe.paint_line["line-gap-width"]),"line-offset":new xa(Pe.paint_line["line-offset"]),"line-blur"
vendor: 2,109 bytes, line 94
94:new xa(Pe.paint_line["line-blur"]),"line-dasharray":new js(Pe.paint_line["line-dasharray"]),"line-pattern":new Ns(Pe.paint_line["line-pattern"]),"line-gradient":new rs(Pe.paint_line["line-gradient"])}),layout:lp},vf=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 ai(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=o({},ae,{zoom:Math.floor(ae.zoom)}),M.prototype.evaluate.call(this,Y,ae,he,ve)},O}(xa))(gf.paint.properties["line-width"].specification);vf.useIntegerZoom=!0;var cp=function(M){function O(Y){M.call(this,Y,gf)}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=rf(Y,"lineProgress"),this.gradientTexture=null},O.prototype.recalculate=function(Y,ae){M.prototype.recalculate.call(this,Y,ae),this.paint._values["line-floorwidth"]=vf.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Y)},O.prototype.createBucket=function(Y){return new Ko(Y)},O.prototype.queryRadius=function(Y){var ae=Y,he=yf(Si("line-width",this,ae),Si("line-gap-width",this,ae)),ve=Si("line-offset",this,ae);return he/2+Math.abs(ve)+Oo(this.paint.get("line-translate"))},O.prototype.queryIntersectsFeature=function(Y,ae,he,ve,Ae,Re,Ze){var lt=zo(Y,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Re.angle,Ze),pt=Ze/2*yf(this.paint.get("line-width").evaluate(ae,he),this.paint.get("line-gap-width").evaluate(ae,he)),Ft=this.paint.get("line-offset").evaluate(ae,he);return Ft&&(ve=function(Wt,qt){for(var nr=[],dr=new r(0,0),Ar=0;Ar<Wt.length;Ar++){for(var Mr=Wt[Ar],Nr=[],jr=0;jr<Mr.length;
94jr++){var Yr=Mr[jr-1],fn=Mr[jr],yn=Mr[jr+1],Bn=jr===0?dr:fn.sub(Yr)._unit()._perp(),Rn=jr===Mr.length-1?dr:yn.sub(fn)._unit()._perp(),Yn=Bn._add(Rn)._unit(),oa=Yn.x*Rn.x+Yn.y*Rn.y;Yn._mult(1/oa),Nr.push(Yn._mult(qt)._add(fn))}nr.push(Nr)}return nr}(ve,Ft*Ze)),function(Wt,qt,nr){for(var dr=0;dr<qt.length;dr++){var Ar=qt[dr];if(Wt.length>=3){for(var Mr=0;Mr<Ar.length;Mr++)if(ns(Wt,Ar[Mr]))return!0}if(dl(Wt,Ar,nr))return!0}return!1}(lt,ve,pt)},O.prototype.isTileClipped=function(){return!0},O}(Go);function yf(M,O){return O>0?O+2*M:M}var Mu=ii([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),up=ii([{name:"a_projected_pos",components:3,type:"Float32"}],4),fp=(ii([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ii([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),xf=(ii([{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"}]),ii([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),hp=ii([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);ii([{name:"triangle",components:3,type:"Uint16"}]),ii([{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"}]),ii([{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"}]),ii([{type:"Float32",name:"offsetX"}]),ii([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function pp(M,O,Y){return M.sections.forEach(function(ae){ae.text=function(he,ve,Ae){var Re=ve.layout.get("text-transform").evaluate(Ae,{});return Re==="uppercase"?he=he.toLocaleUpperCase():Re==="lowercase"&&(he=he.toLocaleLowerCase()),po.applyArabicShaping&&(he=po.applyArabicShaping(he)),he}(ae.text,O,Y)}),M}var uc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63"
vendor: 10,751 bytes, line 94
94:"\uFE42"},bf=function(M,O,Y,ae,he){var ve,Ae,Re=8*he-ae-1,Ze=(1<<Re)-1,lt=Ze>>1,pt=-7,Ft=Y?he-1:0,Wt=Y?-1:1,qt=M[O+Ft];for(Ft+=Wt,ve=qt&(1<<-pt)-1,qt>>=-pt,pt+=Re;pt>0;ve=256*ve+M[O+Ft],Ft+=Wt,pt-=8);for(Ae=ve&(1<<-pt)-1,ve>>=-pt,pt+=ae;pt>0;Ae=256*Ae+M[O+Ft],Ft+=Wt,pt-=8);if(ve===0)ve=1-lt;else{if(ve===Ze)return Ae?NaN:1/0*(qt?-1:1);Ae+=Math.pow(2,ae),ve-=lt}return(qt?-1:1)*Ae*Math.pow(2,ve-ae)},_f=function(M,O,Y,ae,he,ve){var Ae,Re,Ze,lt=8*ve-he-1,pt=(1<<lt)-1,Ft=pt>>1,Wt=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,qt=ae?0:ve-1,nr=ae?1:-1,dr=O<0||O===0&&1/O<0?1:0;for(O=Math.abs(O),isNaN(O)||O===1/0?(Re=isNaN(O)?1:0,Ae=pt):(Ae=Math.floor(Math.log(O)/Math.LN2),O*(Ze=Math.pow(2,-Ae))<1&&(Ae--,Ze*=2),(O+=Ae+Ft>=1?Wt/Ze:Wt*Math.pow(2,1-Ft))*Ze>=2&&(Ae++,Ze/=2),Ae+Ft>=pt?(Re=0,Ae=pt):Ae+Ft>=1?(Re=(O*Ze-1)*Math.pow(2,he),Ae+=Ft):(Re=O*Math.pow(2,Ft-1)*Math.pow(2,he),Ae=0));he>=8;M[Y+qt]=255&Re,qt+=nr,Re/=256,he-=8);for(Ae=Ae<<he|Re,lt+=he;lt>0;M[Y+qt]=255&Ae,qt+=nr,Ae/=256,lt-=8);M[Y+qt-nr]|=128*dr},Ic=xi;function xi(M){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(M)?M:new Uint8Array(M||0),this.pos=0,this.type=0,this.length=this.buf.length}xi.Varint=0,xi.Fixed64=1,xi.Bytes=2,xi.Fixed32=5;var wf=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Ws(M){return M.type===xi.Bytes?M.readVarint()+M.pos:M.pos+1}function Ol(M,O,Y){return Y?4294967296*O+(M>>>0):4294967296*(O>>>0)+(M>>>0)}function Tf(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 dp(M,O){for(var Y=0;Y<M.length;Y++)O.writeVarint(M[Y])}function mp(M,O){for(var Y=0;Y<M.length;Y++)O.writeSVarint(M[Y])}function gp(M,O){for(var Y=0;Y<M.length;Y++)O.writeFloat(M[Y])}function vp(M,O){for(var Y=0;Y<M.length;Y++)O.writeDouble(M[Y])}function yp(M,O){for(var Y=0;Y<M.length;Y++)O.writeBoolean(M[Y])}function xp(M,O){for(var Y=0;Y<M.length;Y++)O.writeFixed32(M[Y])}function bp(M,O){for(var Y=0;Y<M.length;Y++)O.writeSFixed32(M[Y])}function _p(M,O){for(var Y=0;Y<M.length;Y++)O.writeFixed64(M[Y])}function wp(M,O){for(var Y=0;Y<M.length;Y++)O.writeSFixed64(M[Y])}function Oc(M,O){return(M[O]|M[O+1]<<8|M[O+2]<<16)+16777216*M[O+3]}function zl(M,O,Y){M[Y]=O,M[Y+1]=O>>>8,M[Y+2]=O>>>16,M[Y+3]=O>>>24}function kf(M,O){return(M[O]|M[O+1]<<8|M[O+2]<<16)+(M[O+3]<<24)}xi.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=Oc(this.buf,this.pos);return this.pos+=4,M},readSFixed32:function(){var M=kf(this.buf,this.pos);return this.pos+=4,M},readFixed64:function(){var M=Oc(this.buf,this.pos)+4294967296*Oc(this.buf,this.pos+4);return this.pos+=8,M},readSFixed64:function(){var M=Oc(this.buf,this.pos)+4294967296*kf(this.buf,this.pos+4);return this.pos+=8,M},readFloat:function(){var M=bf(this.buf,this.pos,!0,23,4);return this.pos+=4,M},readDouble:function(){var M=bf(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,Ae){var Re,Ze,lt=Ae.buf;if(Ze=lt[Ae.pos++],Re=(112&Ze)>>4,Ze<128||(Ze=lt[Ae.pos++],Re|=(127&Ze)<<3,Ze<128)||(Ze=lt[Ae.pos++],Re|=(127&Ze)<<10,Ze<128)||(Ze=lt[Ae.pos++],Re|=(127&Ze)<<17,Ze<128)||(Ze=lt[Ae.pos++],Re|=(127&Ze)<<24,Ze<128)||(Ze=lt[Ae.pos++],Re|=(1&Ze)<<31,Ze<128))return Ol(he,Re,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 Boolean(this.readVarint())},readString:function(){var M=this.readVarint()+this.pos,O=this.pos;return this.pos=M,M-O>=12&&wf?function(Y,ae,he){return wf.decode(Y.subarray(ae,he))}(this.buf,O,M):function(Y,ae,he){for(var ve="",Ae=ae;Ae<he;){var Re,Ze,lt,pt=Y[Ae],Ft=null,Wt=pt>239?4:pt>223?3:pt>191?2:1;if(Ae+Wt>he)break;Wt===1?pt<128&&(Ft=pt):Wt===2?(192&(Re=Y[Ae+1]))==128&&(Ft=(31&pt)<<6|63&Re)<=127&&(Ft=null):Wt===3?(Re=Y[Ae+1],Ze=Y[Ae+2],(192&Re)==128&&(192&Ze)==128&&((Ft=(15&pt)<<12|(63&Re)<<6|63&Ze)<=2047||Ft>=55296&&Ft<=57343)&&(Ft=null)):Wt===4&&(Re=Y[Ae+1],Ze=Y[Ae+2],lt=Y[Ae+3],(192&Re)==128&&(192&Ze)==128&&(192<)==128&&((Ft=(15&pt)<<18|(63&Re)<<12|(63&Ze)<<6|63<)<=65535||Ft>=1114112)&&(Ft=null)),Ft===null?(Ft=65533,Wt=1):Ft>65535&&(Ft-=65536,ve+=String.fromCharCode(Ft>>>10&1023|55296),Ft=56320|1023&Ft),ve+=String.fromCharCode(Ft),Ae+=Wt}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!==xi.Bytes)return M.push(this.readVarint(O));var Y=Ws(this);for(M=M||[];this.pos<Y;)M.push(this.readVarint(O));return M},readPackedSVarint:function(M){if(this.type!==xi.Bytes)return M.push(this.readSVarint());var O=Ws(this);for(M=M||[];this.pos<O;)M.push(this.readSVarint());return M},readPackedBoolean:function(M){if(this.type!==xi.Bytes)return M.push(this.readBoolean());var O=Ws(this);for(M=M||[];this.pos<O;)M.push(this.readBoolean());return M},readPackedFloat:function(M){if(this.type!==xi.Bytes)return M.push(this.readFloat());var O=Ws(this);for(M=M||[];this.pos<O;)M.push(this.readFloat());return M},readPackedDouble:function(M){if(this.type!==xi.Bytes)return M.push(this.readDouble());var O=Ws(this);for(M=M||[];this.pos<O;)M.push(this.readDouble());return M},readPackedFixed32:function(M){if(this.type!==xi.Bytes)return M.push(this.readFixed32());var O=Ws(this);for(M=M||[];this.pos<O;)M.push(this.readFixed32());return M},readPackedSFixed32:function(M){if(this.type!==xi.Bytes)return M.push(this.readSFixed32());var O=Ws(this);for(M=M||[];this.pos<O;)M.push(this.readSFixed32());return M},readPackedFixed64:function(M){if(this.type!==xi.Bytes)return M.push(this.readFixed64());var O=Ws(this);for(M=M||[];this.pos<O;)M.push(this.readFixed64());return M},readPackedSFixed64:function(M){if(this.type!==xi.Bytes)return M.push(this.readSFixed64());var O=Ws(this);for(M=M||[];this.pos<O;)M.push(this.readSFixed64());return M},skip:function(M){var O=7&M;if(O===xi.Varint)for(;this.buf[this.pos++]>127;);else if(O===xi.Bytes)this.pos=this.readVarint()+this.pos;else if(O===xi.Fixed32)this.pos+=4;else{if(O!==xi.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),zl(this.buf,M,this.pos),this.pos+=4},writeSFixed32:function(M){this.realloc(4),zl(this.buf,M,this.pos),this.pos+=4},writeFixed64:function(M){this.realloc(8),zl(this.buf,-1&M,this.pos),zl(this.buf,Math.floor(M*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(M){this.realloc(8),zl(this.buf,-1&M,this.pos),zl(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,Ae,Re){Re.buf[Re.pos++]=127&ve|128,ve>>>=7,Re.buf[Re.pos++]=127&ve|128,ve>>>=7,Re.buf[Re.pos++]=127&ve|128,ve>>>=7,Re.buf[Re.pos++]=127&ve|128,ve>>>=7,Re.buf[Re.pos]=127&ve}(ae,0,Y),function(ve,Ae){var Re=(7&ve)<<4;Ae.buf[Ae.pos++]|=Re|((ve>>>=3)?128:0),ve&&(Ae.buf[Ae.pos++]=127&ve|((ve>>>=7)?128:0),ve&&(Ae.buf[Ae.pos++]=127&ve|((ve>>>=7)?128:0),ve&&(Ae.buf[Ae.pos++]=127&ve|((ve>>>=7)?128:0),ve&&(Ae.buf[Ae.pos++]=127&ve|((ve>>>=7)?128:0),ve&&(Ae.buf[Ae.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(Boolean(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 Ae,Re,Ze=0;Ze<he.length;Ze++){if((Ae=he.charCodeAt(Ze))>55295&&Ae<57344){if(!Re){Ae>56319||Ze+1===he.length?(ae[ve++]=239,ae[ve++]=191,ae[ve++]=189):Re=Ae;continue}if(Ae<56320){ae[ve++]=239,ae[ve++]=191,ae[ve++]=189,Re=Ae;continue}Ae=Re-55296<<10|Ae-56320|65536,Re=null}else Re&&(ae[ve++]=239,ae[ve++]=191,ae[ve++]=189,Re=null);Ae<128?ae[ve++]=Ae:(Ae<2048?ae[ve++]=Ae>>6|192:(Ae<65536?ae[ve++]=Ae>>12|224:(ae[ve++]=Ae>>18|240,ae[ve++]=Ae>>12&63|128),ae[ve++]=Ae>>6&63|128),ae[ve++]=63&Ae|128)}return ve}(this.buf,M,this.pos);var Y=this.pos-O;Y>=128&&Tf(O,Y,this),this.pos=O-1,this.writeVarint(Y),this.pos+=Y},writeFloat:function(M){this.realloc(4),_f(this.buf,M,this.pos,!0,23,4),this.pos+=4},writeDouble:function(M){this.realloc(8),_f(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&&Tf(Y,ae,this),this.pos=Y-1,this.writeVarint(ae),this.pos+=ae},writeMessage:function(M,O,Y){this.writeTag(M,xi.Bytes),this.writeRawMessage(O,Y)},writePackedVarint:function(M,O){O.length&&this.writeMessage(M,dp,O)},writePackedSVarint:function(M,O){O.length&&this.writeMessage(M,mp,O)},writePackedBoolean:function(M,O){O.length&&this.writeMessage(M,yp,O)},writePackedFloat:function(M,O){O.length&&this.writeMessage(M,gp,O)},writePackedDouble:function(M,O){O.length&&this.writeMessage(M,vp,O)},writePackedFixed32:function(M,O){O.length&&this.writeMessage(M,xp,O)},writePackedSFixed32:function(M,O){O.length&&this.writeMessage(M,bp,O)},writePackedFixed64:function(M,O){O.length&&this.writeMessage(M,_p,O)},writePackedSFixed64:function(M,O){O.length&&this.writeMessage(M,wp,O)},writeBytesField:function(M,O){this.writeTag(M,xi.Bytes),this.writeBytes(O)},writeFixed32Field:function(M,O){this.writeTag(M,xi.Fixed32),this.writeFixed32(O)},writeSFixed32Field:function(M,O){this.writeTag(M,xi.Fixed32),this.writeSFixed32(O)},writeFixed64Field:function(M,O){this.writeTag(M,xi.Fixed64),this.writeFixed64
94(O)},writeSFixed64Field:function(M,O){this.writeTag(M,xi.Fixed64),this.writeSFixed64(O)},writeVarintField:function(M,O){this.writeTag(M,xi.Varint),this.writeVarint(O)},writeSVarintField:function(M,O){this.writeTag(M,xi.Varint),this.writeSVarint(O)},writeStringField:function(M,O){this.writeTag(M,xi.Bytes),this.writeString(O)},writeFloatField:function(M,O){this.writeTag(M,xi.Fixed32),this.writeFloat(O)},writeDoubleField:function(M,O){this.writeTag(M,xi.Fixed64),this.writeDouble(O)},writeBooleanField:function(M,O){this.writeVarintField(M,Boolean(O))}};function Tp(M,O,Y){M===1&&Y.readMessage(kp,O)}function kp(M,O,Y){if(M===3){var ae=Y.readMessage(Mp,{}),he=ae.id,ve=ae.bitmap,Ae=ae.width,Re=ae.height,Ze=ae.left,lt=ae.top,pt=ae.advance;O.push({id:he,bitmap:new xl({width:Ae+6,height:Re+6},ve),metrics:{width:Ae,height:Re,left:Ze,top:lt,advance:pt}})}}function Mp(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 Mf(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(dr,Ar){return Ar.h-dr.h});for(var Ae=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(O/.95)),Y),h:1/0}],Re=0,Ze=0,lt=0,pt=M;lt<pt.length;lt+=1)for(var Ft=pt[lt],Wt=Ae.length-1;Wt>=0;Wt--){var qt=Ae[Wt];if(!(Ft.w>qt.w||Ft.h>qt.h)){if(Ft.x=qt.x,Ft.y=qt.y,Ze=Math.max(Ze,Ft.y+Ft.h),Re=Math.max(Re,Ft.x+Ft.w),Ft.w===qt.w&&Ft.h===qt.h){var nr=Ae.pop();Wt<Ae.length&&(Ae[Wt]=nr)}
vendor: 10,786 bytes, line 94
94else Ft.h===qt.h?(qt.x+=Ft.w,qt.w-=Ft.w):Ft.w===qt.w?(qt.y+=Ft.h,qt.h-=Ft.h):(Ae.push({x:qt.x+Ft.w,y:qt.y,w:qt.w-Ft.w,h:Ft.h}),qt.y+=Ft.h,qt.h-=Ft.h);break}}return{w:Re,h:Ze,fill:O/(Re*Ze)||0}}var zc=function(M,O){var Y=O.pixelRatio,ae=O.version,he=O.stretchX,ve=O.stretchY,Ae=O.content;this.paddedRect=M,this.pixelRatio=Y,this.stretchX=he,this.stretchY=ve,this.content=Ae,this.version=ae},fc={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};fc.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},fc.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},fc.tlbr.get=function(){return this.tl.concat(this.br)},fc.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(zc.prototype,fc);var hc=function(M,O){var Y={},ae={};this.haveRenderCallbacks=[];var he=[];this.addImages(M,Y,he),this.addImages(O,ae,he);var ve=Mf(he),Ae=ve.w,Re=ve.h,Ze=new Jo({width:Ae||1,height:Re||1});for(var lt in M){var pt=M[lt],Ft=Y[lt].paddedRect;Jo.copy(pt.data,Ze,{x:0,y:0},{x:Ft.x+1,y:Ft.y+1},pt.data)}for(var Wt in O){var qt=O[Wt],nr=ae[Wt].paddedRect,dr=nr.x+1,Ar=nr.y+1,Mr=qt.data.width,Nr=qt.data.height;Jo.copy(qt.data,Ze,{x:0,y:0},{x:dr,y:Ar},qt.data),Jo.copy(qt.data,Ze,{x:0,y:Nr-1},{x:dr,y:Ar-1},{width:Mr,height:1}),Jo.copy(qt.data,Ze,{x:0,y:0},{x:dr,y:Ar+Nr},{width:Mr,height:1}),Jo.copy(qt.data,Ze,{x:Mr-1,y:0},{x:dr-1,y:Ar},{width:1,height:Nr}),Jo.copy(qt.data,Ze,{x:0,y:0},{x:dr+Mr,y:Ar},{width:1,height:Nr})}this.image=Ze,this.iconPositions=Y,this.patternPositions=ae};hc.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 zc(ve,he),he.hasRenderCallback&&this.haveRenderCallbacks.push(ae)}},hc.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)},hc.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})}},Jr("ImagePosition",zc),Jr("ImageAtlas",hc);var cs={horizontal:1,vertical:2,horizontalOnly:3},Dl=function(){this.scale=1,this.fontStack="",this.imageName=null};Dl.forText=function(M,O){var Y=new Dl;return Y.scale=M||1,Y.fontStack=O,Y},Dl.forImage=function(M){var O=new Dl;return O.imageName=M,O};var Bo=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Dc(M,O,Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr,dr){var Ar,Mr=Bo.fromFeature(M,he);Ft===cs.vertical&&Mr.verticalizePunctuation();var Nr=po.processBidirectionalText,jr=po.processStyledBidirectionalText;if(Nr&&Mr.sections.length===1){Ar=[];for(var Yr=0,fn=Nr(Mr.toString(),Au(Mr,lt,ve,O,ae,qt,nr));Yr<fn.length;Yr+=1){var yn=fn[Yr],Bn=new Bo;Bn.text=yn,Bn.sections=Mr.sections;for(var Rn=0;Rn<yn.length;Rn++)Bn.sectionIndex.push(0);Ar.push(Bn)}}else if(jr){Ar=[];for(var Yn=0,oa=jr(Mr.text,Mr.sectionIndex,Au(Mr,lt,ve,O,ae,qt,nr));Yn<oa.length;Yn+=1){var sa=oa[Yn],Qn=new Bo;Qn.text=sa[0],Qn.sectionIndex=sa[1],Qn.sections=Mr.sections,Ar.push(Qn)}}else Ar=function(la,Qa){for(var Ha=[],ti=la.text,wa=0,Ga=0,bi=Qa;Ga<bi.length;Ga+=1){var hi=bi[Ga];Ha.push(la.substring(wa,hi)),wa=hi}return wa<ti.length&&Ha.push(la.substring(wa,ti.length)),Ha}(Mr,Au(Mr,lt,ve,O,ae,qt,nr));var da=[],ha={positionedLines:da,text:Mr.toString(),top:pt[1],bottom:pt[1],left:pt[0],right:pt[0],writingMode:Ft,iconsInText:!1,verticalizable:!1};return function(la,Qa,Ha,ti,wa,Ga,bi,hi,Li,pi,lo,Ci){for(var Do=0,ko=-17,So=0,Yo=0,No=hi==="right"?1:hi==="left"?0:.5,co=0,Eo=0,Ji=wa;Eo<Ji.length;Eo+=1){var mo=Ji[Eo];mo.trim();var Fa=mo.getMaxScale(),$a=24*(Fa-1),Vi={positionedGlyphs:[],lineOffset:0};la.positionedLines[co]=Vi;var Hi=Vi.positionedGlyphs,Bi=0;if(mo.length()){for(var Pi=0;Pi<mo.length();Pi++){var oi=mo.getSection(Pi),qi=mo.getSectionIndex(Pi),Wo=mo.getCharCode(Pi),is=0,jo=null,Is=null,Js=null,Mo=24,Os=!(Li===cs.horizontal||!lo&&!ma(Wo)||lo&&(Rc[Wo]||(il=Wo,Sn.Arabic(il)||Sn["Arabic Supplement"](il)||Sn["Arabic Extended-A"](il)||Sn["Arabic Presentation Forms-A"](il)||Sn["Arabic Presentation Forms-B"](il))));if(oi.imageName){var zs=ti[oi.imageName];if(!zs)continue;Js=oi.imageName,la.iconsInText=la.iconsInText||!0,Is=zs.paddedRect;var Ds=zs.displaySize;oi.scale=24*oi.scale/Ci,jo={width:Ds[0],height:Ds[1],left:1,top:-3,advance:Os?Ds[1]:Ds[0]};var Ru=24-Ds[1]*oi.scale;is=$a+Ru,Mo=jo.advance;var Hl=Os?Ds[0]*oi.scale-24*Fa:Ds[1]*oi.scale-24*Fa;Hl>0&&Hl>Bi&&(Bi=Hl)}else{var Gc=Ha[oi.fontStack],Tl=Gc&&Gc[Wo];if(Tl&&Tl.rect)Is=Tl.rect,jo=Tl.metrics;else{var Yc=Qa[oi.fontStack],Wc=Yc&&Yc[Wo];if(!Wc)continue;jo=Wc.metrics}is=24*(Fa-oi.scale)}Os?(la.verticalizable=!0,Hi.push({glyph:Wo,imageName:Js,x:Do,y:ko+is,vertical:Os,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:qi,metrics:jo,rect:Is}),Do+=Mo*oi.scale+pi):(Hi.push({glyph:Wo,imageName:Js,x:Do,y:ko+is,vertical:Os,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:qi,metrics:jo,rect:Is}),Do+=jo.advance*oi.scale+pi)}if(Hi.length!==0){var Zc=Do-pi;So=Math.max(Zc,So),Sp(Hi,0,Hi.length-1,No,Bi)}Do=0;var Xc=Ga*Fa+Bi;Vi.lineOffset=Math.max(Bi,$a),ko+=Xc,Yo=Math.max(Xc,Yo),++co}else ko+=Ga,++co}var il,ql=ko- -17,Jc=Su(bi),Gl=Jc.horizontalAlign,ol=Jc.verticalAlign;(function(mc,Kc,Qc,$c,gc,eu,vc,tu,yc){var ru=(Kc-Qc)*gc,Yl=0;Yl=eu!==vc?-tu*$c- -17:(-$c*yc+.5)*vc;for(var Wl=0,Zl=mc;Wl<Zl.length;Wl+=1)for(var nu=Zl[Wl],Xl=0,xc=nu.positionedGlyphs;Xl<xc.length;Xl+=1){var Jl=xc[Xl];Jl.x+=ru,Jl.y+=Yl}})(la.positionedLines,No,Gl,ol,So,Yo,Ga,ql,wa.length),la.top+=-ol*ql,la.bottom=la.top+ql,la.left+=-Gl*So,la.right=la.left+So}(ha,O,Y,ae,Ar,Ae,Re,Ze,Ft,lt,Wt,dr),!function(la){for(var Qa=0,Ha=la;Qa<Ha.length;Qa+=1)if(Ha[Qa].positionedGlyphs.length!==0)return!1;return!0}(da)&&ha}Bo.fromFeature=function(M,O){for(var Y=new Bo,ae=0;ae<M.sections.length;ae++){var he=M.sections[ae];he.image?Y.addImageSection(he):Y.addTextSection(he,O)}return Y},Bo.prototype.length=function(){return this.text.length},Bo.prototype.getSection=function(M){return this.sections[this.sectionIndex[M]]},Bo.prototype.getSectionIndex=function(M){return this.sectionIndex[M]},Bo.prototype.getCharCode=function(M){return this.text.charCodeAt(M)},Bo.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||!Ra(ae)||uc[M[Y+1]])&&(!he||!Ra(he)||uc[M[Y-1]])&&uc[M[Y]]?O+=uc[M[Y]]:O+=M[Y]}return O}(this.text)},Bo.prototype.trim=function(){for(var M=0,O=0;O<this.text.length&&Rc[this.text.charCodeAt(O)];O++)M++;for(var Y=this.text.length,ae=this.text.length-1;ae>=0&&ae>=M&&Rc[this.text.charCodeAt(ae)];ae--)Y--;this.text=this.text.substring(M,Y),this.sectionIndex=this.sectionIndex.slice(M,Y)},Bo.prototype.substring=function(M,O){var Y=new Bo;return Y.text=this.text.substring(M,O),Y.sectionIndex=this.sectionIndex.slice(M,O),Y.sections=this.sections,Y},Bo.prototype.toString=function(){return this.text},Bo.prototype.getMaxScale=function(){var M=this;return this.sectionIndex.reduce(function(O,Y){return Math.max(O,M.sections[Y].scale)},0)},Bo.prototype.addTextSection=function(M,O){this.text+=M.text,this.sections.push(Dl.forText(M.scale,M.fontStack||O));for(var Y=this.sections.length-1,ae=0;ae<M.text.length;++ae)this.sectionIndex.push(Y)},Bo.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(Dl.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.")},Bo.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var Rc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},as={};function Af(M,O,Y,ae,he,ve){if(O.imageName){var Ae=ae[O.imageName];return Ae?Ae.displaySize[0]*O.scale*24/ve+he:0}var Re=Y[O.fontStack],Ze=Re&&Re[M];return Ze?Ze.metrics.advance*O.scale+he:0}function Sf(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 Ap(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 Ef(M,O,Y,ae,he,ve){for(var Ae=null,Re=Sf(O,Y,he,ve),Ze=0,lt=ae;Ze<lt.length;Ze+=1){var pt=lt[Ze],Ft=Sf(O-pt.x,Y,he,ve)+pt.badness;Ft<=Re&&(Ae=pt,Re=Ft)}return{index:M,x:O,priorBreak:Ae,badness:Re}}function Au(M,O,Y,ae,he,ve,Ae){if(ve!=="point")return[];if(!M)return[];for(var Re,Ze=[],lt=function(Ar,Mr,Nr,jr,Yr,fn){for(var yn=0,Bn=0;Bn<Ar.length();Bn++){var Rn=Ar.getSection(Bn);yn+=Af(Ar.getCharCode(Bn),Rn,jr,Yr,Mr,fn)}return yn/Math.max(1,Math.ceil(yn/Nr))}(M,O,Y,ae,he,Ae),pt=M.text.indexOf("\u200B")>=0,Ft=0,Wt=0;Wt<M.length();Wt++){var qt=M.getSection(Wt),nr=M.getCharCode(Wt);if(Rc[nr]||(Ft+=Af(nr,qt,ae,he,O,Ae)),Wt<M.length()-1){var dr=!!(!((Re=nr)<11904)&&(Sn["Bopomofo Extended"](Re)||Sn.Bopomofo(Re)||Sn["CJK Compatibility Forms"](Re)||Sn["CJK Compatibility Ideographs"](Re)||Sn["CJK Compatibility"](Re)||Sn["CJK Radicals Supplement"](Re)||Sn["CJK Strokes"](Re)||Sn["CJK Symbols and Punctuation"](Re)||Sn["CJK Unified Ideographs Extension A"](Re)||Sn["CJK Unified Ideographs"](Re)||Sn["Enclosed CJK Letters and Months"](Re)||Sn["Halfwidth and Fullwidth Forms"](Re)||Sn.Hiragana(Re)||Sn["Ideographic Description Characters"](Re)||Sn["Kangxi Radicals"](Re)||Sn["Katakana Phonetic Extensions"](Re)||Sn.Katakana(Re)||Sn["Vertical Forms"](Re)||Sn["Yi Radicals"](Re)||Sn["Yi Syllables"](Re)));(as[nr]||dr||qt.imageName)&&Ze.push(Ef(Wt+1,Ft,lt,Ze,Ap(nr,M.getCharCode(Wt+1),dr&&pt),!1))}}return function Ar(Mr){return Mr?Ar(Mr.priorBreak).concat(Mr.index):[]}(Ef(M.length(),Ft,lt,Ze,0,!0))}function Su(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 Sp(M,O,Y,ae,he){if(ae||he)for(var ve=M[Y],Ae=ve.metrics.advance*ve.scale,Re=(M[Y].x+Ae)*ae,Ze=O;Ze<=Y;Ze++)M[Ze].x-=Re,M[Ze].y+=he}function Lf(M,O,Y,ae,he,ve){var Ae,Re=M.image;if(Re.content){var Ze=Re.content,lt=Re.pixelRatio||1;Ae=[Ze[0]/lt,Ze[1]/lt,Re.displaySize[0]-Ze[2]/lt,Re.displaySize[1]-Ze[3]/lt]}var pt,Ft,Wt,qt,nr=O.left*ve,dr=O.right*ve;Y==="width"||Y==="both"?(qt=he[0]+nr-ae[3],Ft=he[0]+dr+ae[1]):Ft=(qt=he[0]+(nr+dr-Re.dis
94playSize[0])/2)+Re.displaySize[0];var Ar=O.top*ve,Mr=O.bottom*ve;return Y==="height"||Y==="both"?(pt=he[1]+Ar-ae[0],Wt=he[1]+Mr+ae[2]):Wt=(pt=he[1]+(Ar+Mr-Re.displaySize[1])/2)+Re.displaySize[1],{image:Re,top:pt,right:Ft,bottom:Wt,left:qt,collisionPadding:Ae}}as[10]=!0,as[32]=!0,as[38]=!0,as[40]=!0,as[41]=!0,as[43]=!0,as[45]=!0,as[47]=!0,as[173]=!0,as[183]=!0,as[8203]=!0,as[8208]=!0,as[8211]=!0,as[8231]=!0;var Rl=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);Jr("Anchor",Rl);function Eu(M,O){var Y=O.expression;if(Y.kind==="constant")return{kind:"constant",layoutSize:Y.evaluate(new ai(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 Ae=ve=Math.max(0,ve-1);Ae<ae.length&&ae[Ae]<M+1;)Ae++;Ae=Math.min(ae.length-1,Ae);var Re=ae[ve],Ze=ae[Ae];return Y.kind==="composite"?{kind:"composite",minZoom:Re,maxZoom:Ze,interpolationType:he}:{kind:"camera",minZoom:Re,maxZoom:Ze,minSize:Y.evaluate(new ai(Re)),maxSize:Y.evaluate(new ai(Ze)),interpolationType:he}}function Cf(M,O,Y){var ae=O.uSize,he=O.uSizeT,ve=Y.lowerSize,Ae=Y.upperSize;return M.kind==="source"?ve/128:M.kind==="composite"?bn(ve/128,Ae/128,he):ae}function Pf(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,Ae=M.maxZoom,Re=he?u(Ba.interpolationFactor(he,O,ve,Ae),0,1):0;M.kind==="camera"?ae=bn(M.minSize,M.maxSize,Re):Y=Re}return{uSizeT:Y,uSize:ae}}var Ep=Object.freeze({__proto__:null,getSizeData:Eu,evaluateSizeForFeature:Cf,evaluateSizeForZoom:Pf,SIZE_PACK_FACTOR:128});function If(M,O,Y,ae,he){if(O.segment===void 0)return!0;for(var ve=O,Ae=O.segment+1,Re=0;Re>-Y/2;){if(--Ae<0)return!1;Re-=M[Ae].dist(ve),ve=M[Ae]}Re+=M[Ae].dist(M[Ae+1]),Ae++;for(var Ze=[],lt=0;Re<Y/2;){var pt=M[Ae-1],Ft=M[Ae],Wt=M[Ae+1];if(!Wt)return!1;var qt=pt.angleTo(Ft)-Ft.angleTo(Wt);for(qt=Math.abs((qt+3*Math.PI)%(2*Math.PI)-Math.PI),Ze.push({distance:Re,angleDelta:qt}),lt+=qt;Re-Ze[0].distance>ae;)lt-=Ze.shift().angleDelta;if(lt>he)return!1;Ae++,Re+=Ft.dist(Wt)}return!0}function Of(M){for(var O=0,Y=0;Y<M.length-1;Y++)O+=M[Y].dist(M[Y+1]);return O}function zf(M,O,Y){return M?.6*O*Y:0}function Df(M,O){return Math.max(M?M.right-M.left:0,O?O.right-O.left:0)}function Lp(M,O,Y,ae,he,ve){for(var Ae=zf(Y,he,ve),Re=Df(Y,ae)*ve,Ze=0,lt=Of(M)/2,pt=0;pt<M.length-1;pt++){var Ft=M[pt],Wt=M[pt+1],qt=Ft.dist(Wt);if(Ze+qt>lt){var nr=(lt-Ze)/qt,dr=bn(Ft.x,Wt.x,nr),Ar=bn(Ft.y,Wt.y,nr),Mr=new Rl(dr,Ar,Wt.angleTo(Ft),pt);return Mr._round(),!Ae||If(M,Mr,Re,Ae,O)?Mr:void 0}Ze+=qt}}function Cp(M,O,Y,ae,he,ve,Ae,Re,Ze){var lt=zf(ae,ve,Ae),pt=Df(ae,he),Ft=pt*Ae,Wt=M[0].x===0||M[0].x===Ze||M[0].y===0||M[0].y===Ze;return O-Ft<O/4&&(O=Ft+O/4),function qt(nr,dr,Ar,Mr,Nr,jr,Yr,fn,yn){for(var Bn=jr/2,Rn=Of(nr),Yn=0,oa=dr-Ar,sa=[],Qn=0;Qn<nr.length-1;Qn++){for(var da=nr[Qn],ha=nr[Qn+1],la=da.dist(ha),Qa=ha.angleTo(da);oa+Ar<Yn+la;){var Ha=((oa+=Ar)-Yn)/la,ti=bn(da.x,ha.x,Ha),wa=bn(da.y,ha.y,Ha);if(ti>=0&&ti<yn&&wa>=0&&wa<yn&&oa-Bn>=0&&oa+Bn<=Rn){var Ga=new Rl(ti,wa,Qa,Qn);Ga._round(),Mr&&!If(nr,Ga,jr,Mr,Nr)||sa.push(Ga)}}Yn+=la}return fn||sa.length||Yr||(sa=qt(nr,Yn/2,Ar,Mr,Nr,jr,Yr,!0,yn)),sa}(M,Wt?O/2*Re%O:(pt/2+2*ve)*Ae*Re%O,O,lt,Y,Ft,Wt,!1,Ze)}function Rf(M,O,Y,ae,he){for(var ve=[],Ae=0;Ae<M.length;Ae++)for(var Re=M[Ae],Ze=void 0,lt=0;lt<Re.length-1;lt++){var pt=Re[lt],Ft=Re[lt+1];pt.x<O&&Ft.x<O||(pt.x<O?pt=new r(O,pt.y+(Ft.y-pt.y)*((O-pt.x)/(Ft.x-pt.x)))._round():Ft.x<O&&(Ft=new r(O,pt.y+(Ft.y-pt.y)*((O-pt.x)/(Ft.x-pt.x)))._round()),pt.y<Y&&Ft.y<Y||(pt.y<Y?pt=new r(pt.x+(Ft.x-pt.x)*((Y-pt.y)/(Ft.y-pt.y)),Y)._round():Ft.y<Y&&(Ft=new r(pt.x+(Ft.x-pt.x)*((Y-pt.y)/(Ft.y-pt.y)),Y)._round()),pt.x>=ae&&Ft.x>=ae||(pt.x>=ae?pt=new r(ae,pt.y+(Ft.y-pt.y)*((ae-pt.x)/(Ft.x-pt.x)))._round():Ft.x>=ae&&(Ft=new r(ae,pt.y+(Ft.y-pt.y)*((ae-pt.x)/(Ft.x-pt.x)))._round()),pt.y>=he&&Ft.y>=he||(pt.y>=he?pt=new r(pt.x+(Ft.x-pt.x)*((he-pt.y)/(Ft.y-pt.y)),he)._round():Ft.y>=he&&(Ft=new r(pt.x+(Ft.x-pt.x)*((he-pt.y)/(Ft.y-pt.y)),he)._round()),Ze&&pt.equals(
vendor: 7,167 bytes, line 94
94Ze[Ze.length-1])||(Ze=[pt],ve.push(Ze)),Ze.push(Ft)))))}return ve}function Ff(M,O,Y,ae){var he=[],ve=M.image,Ae=ve.pixelRatio,Re=ve.paddedRect.w-2,Ze=ve.paddedRect.h-2,lt=M.right-M.left,pt=M.bottom-M.top,Ft=ve.stretchX||[[0,Re]],Wt=ve.stretchY||[[0,Ze]],qt=function(Ga,bi){return Ga+bi[1]-bi[0]},nr=Ft.reduce(qt,0),dr=Wt.reduce(qt,0),Ar=Re-nr,Mr=Ze-dr,Nr=0,jr=nr,Yr=0,fn=dr,yn=0,Bn=Ar,Rn=0,Yn=Mr;if(ve.content&&ae){var oa=ve.content;Nr=Fc(Ft,0,oa[0]),Yr=Fc(Wt,0,oa[1]),jr=Fc(Ft,oa[0],oa[2]),fn=Fc(Wt,oa[1],oa[3]),yn=oa[0]-Nr,Rn=oa[1]-Yr,Bn=oa[2]-oa[0]-jr,Yn=oa[3]-oa[1]-fn}var sa=function(Ga,bi,hi,Li){var pi=Bc(Ga.stretch-Nr,jr,lt,M.left),lo=Nc(Ga.fixed-yn,Bn,Ga.stretch,nr),Ci=Bc(bi.stretch-Yr,fn,pt,M.top),Do=Nc(bi.fixed-Rn,Yn,bi.stretch,dr),ko=Bc(hi.stretch-Nr,jr,lt,M.left),So=Nc(hi.fixed-yn,Bn,hi.stretch,nr),Yo=Bc(Li.stretch-Yr,fn,pt,M.top),No=Nc(Li.fixed-Rn,Yn,Li.stretch,dr),co=new r(pi,Ci),Eo=new r(ko,Ci),Ji=new r(ko,Yo),mo=new r(pi,Yo),Fa=new r(lo/Ae,Do/Ae),$a=new r(So/Ae,No/Ae),Vi=O*Math.PI/180;if(Vi){var Hi=Math.sin(Vi),Bi=Math.cos(Vi),Pi=[Bi,-Hi,Hi,Bi];co._matMult(Pi),Eo._matMult(Pi),mo._matMult(Pi),Ji._matMult(Pi)}var oi=Ga.stretch+Ga.fixed,qi=hi.stretch+hi.fixed,Wo=bi.stretch+bi.fixed,is=Li.stretch+Li.fixed;return{tl:co,tr:Eo,bl:mo,br:Ji,tex:{x:ve.paddedRect.x+1+oi,y:ve.paddedRect.y+1+Wo,w:qi-oi,h:is-Wo},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Fa,pixelOffsetBR:$a,minFontScaleX:Bn/Ae/lt,minFontScaleY:Yn/Ae/pt,isSDF:Y}};if(ae&&(ve.stretchX||ve.stretchY))for(var Qn=Bf(Ft,Ar,nr),da=Bf(Wt,Mr,dr),ha=0;ha<Qn.length-1;ha++)for(var la=Qn[ha],Qa=Qn[ha+1],Ha=0;Ha<da.length-1;Ha++){var ti=da[Ha],wa=da[Ha+1];he.push(sa(la,ti,Qa,wa))}else he.push(sa({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Re+1},{fixed:0,stretch:Ze+1}));return he}function Fc(M,O,Y){for(var ae=0,he=0,ve=M;he<ve.length;he+=1){var Ae=ve[he];ae+=Math.max(O,Math.min(Y,Ae[1]))-Math.max(O,Math.min(Y,Ae[0]))}return ae}function Bf(M,O,Y){for(var ae=[{fixed:-1,stretch:0}],he=0,ve=M;he<ve.length;he+=1){var Ae=ve[he],Re=Ae[0],Ze=Ae[1],lt=ae[ae.length-1];ae.push({fixed:Re-lt.stretch,stretch:lt.stretch}),ae.push({fixed:Re-lt.stretch,stretch:lt.stretch+(Ze-Re)})}return ae.push({fixed:O+1,stretch:Y}),ae}function Bc(M,O,Y,ae){return M/O*Y+ae}function Nc(M,O,Y,ae){return M-O*Y/ae}var jc=function(M,O,Y,ae,he,ve,Ae,Re,Ze,lt){if(this.boxStartIndex=M.length,Ze){var pt=ve.top,Ft=ve.bottom,Wt=ve.collisionPadding;Wt&&(pt-=Wt[1],Ft+=Wt[3]);var qt=Ft-pt;qt>0&&(qt=Math.max(10,qt),this.circleDiameter=qt)}else{var nr=ve.top*Ae-Re,dr=ve.bottom*Ae+Re,Ar=ve.left*Ae-Re,Mr=ve.right*Ae+Re,Nr=ve.collisionPadding;if(Nr&&(Ar-=Nr[0]*Ae,nr-=Nr[1]*Ae,Mr+=Nr[2]*Ae,dr+=Nr[3]*Ae),lt){var jr=new r(Ar,nr),Yr=new r(Mr,nr),fn=new r(Ar,dr),yn=new r(Mr,dr),Bn=lt*Math.PI/180;jr._rotate(Bn),Yr._rotate(Bn),fn._rotate(Bn),yn._rotate(Bn),Ar=Math.min(jr.x,Yr.x,fn.x,yn.x),Mr=Math.max(jr.x,Yr.x,fn.x,yn.x),nr=Math.min(jr.y,Yr.y,fn.y,yn.y),dr=Math.max(jr.y,Yr.y,fn.y,yn.y)}M.emplaceBack(O.x,O.y,Ar,nr,Mr,dr,Y,ae,he)}this.boxEndIndex=M.length},Fl=function(M,O){if(M===void 0&&(M=[]),O===void 0&&(O=Pp),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 Pp(M,O){return M<O?-1:M>O?1:0}function Ip(M,O,Y){O===void 0&&(O=1),Y===void 0&&(Y=!1);for(var ae=1/0,he=1/0,ve=-1/0,Ae=-1/0,Re=M[0],Ze=0;Ze<Re.length;Ze++){var lt=Re[Ze];(!Ze||lt.x<ae)&&(ae=lt.x),(!Ze||lt.y<he)&&(he=lt.y),(!Ze||lt.x>ve)&&(ve=lt.x),(!Ze||lt.y>Ae)&&(Ae=lt.y)}var pt=ve-ae,Ft=Ae-he,Wt=Math.min(pt,Ft),qt=Wt/2,nr=new Fl([],Op);if(Wt===0)return new r(ae,he);for(var dr=ae;dr<ve;dr+=Wt)for(var Ar=he;Ar<Ae;Ar+=Wt)nr.push(new Bl(dr+qt,Ar+qt,qt,M));for(var Mr=function(Yr){for(var fn=0,yn=0,Bn=0,Rn=Yr[0],Yn=0,oa=Rn.length,sa=oa-1;Yn<oa;sa=Yn++){var Qn=Rn[Yn],da=Rn[sa],ha=Qn.x*da.y-da.x*Qn.y;yn+=(Qn.x+da.x)*ha,Bn+=(Qn.y+da.y)*ha,fn+=3*ha}return new Bl(yn/fn,Bn/fn,0,Yr)}(M),Nr=nr.length;nr.length;){var jr=nr.pop();(jr.d>Mr.d||!Mr.d)&&(Mr=jr,Y&&console.log("found best %d after %d probes",Math.round(1e4*jr.d)/1e4,Nr)),jr.max-Mr.d<=O||(qt=jr.h/2,nr.push(new Bl(jr.p.x-qt,jr.p.y-qt,qt,M)),nr.push(new Bl(jr.p.x+qt,jr.p.y-qt,qt,M)),nr.push(new Bl(jr.p.x-qt,jr.p.y+qt,qt,M)),nr.push(new Bl(jr.p.x+qt,jr.p.y+qt,qt,M)),Nr+=4)}return Y&&(console.log("num probes: "+Nr),console.log("best distance: "+Mr.d)),Mr.p}function Op(M,O){return O.max-M.max}function Bl(M,O,Y,ae){this.p=new r(M,O),this.h=Y,this.d=function(he,ve){for(var Ae=!1,Re=1/0,Ze=0;Ze<ve.length;Ze++)for(var lt=ve[Ze],pt=0,Ft=lt.length,Wt=Ft-1;pt<Ft;Wt=pt++){var qt=lt[pt],nr=lt[Wt];qt.y>he.y!=nr.y>he.y&&he.x<(nr.x-qt.x)*(he.y-qt.y)/(nr.y-qt.y)+qt.x&&(Ae=!Ae),Re=Math.min(Re,Gs(he,qt,nr))}return(Ae?1:-1)*Math.sqrt(Re)}(this.p,ae),this.max=this.d+this.h*Math.SQRT2}Fl.prototype.push=function(M){this.data.push(M),this.length++,this._up(this.length-1)},Fl.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}},Fl.prototype.peek=function(){return this.data[0]},Fl.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},Fl.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),Ae=O[ve],Re=ve+1;if(Re<this.length&&Y(O[Re],Ae)<0&&(ve=Re,Ae=O[Re]),Y(Ae,he)>=0)break;O[M]=Ae,M=ve}O[M]=he};var Lu=Number.POSITIVE_INFINITY;function Nf(M,O){return O[1]!==Lu?function(Y,ae,he){var ve=0,Ae=0;switch(ae=Math.abs(ae),he=Math.abs(he),Y){case"top-right":case"top-left":case"top":Ae=he-7;break;case"bottom-right":case"bottom-left":case"bottom":Ae=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,Ae]}(M,O[0],O[1]):function(Y,ae){var he=0,ve=0;ae<0&&(ae=0);var Ae=ae/Math.sqrt(2);switch(Y){case"top-right":case"top-left":ve=Ae-7;break;case"bottom-right":case"bottom-left":ve=7-Ae;break;case"bottom":ve=7-ae;break;case"top":ve=ae-7}switch(Y){case"top-right":case"bottom-right":he=-Ae;break;case"top-left":case"bottom-left":he=Ae;break;case"left":he=ae;break;case"right":he=-ae}return[he,ve]}(M,O[0])}function Cu(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 jf(M,O,Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr){var dr=function(Yr,fn,yn,Bn,Rn,Yn,oa,sa){for(var Qn=Bn.layout.get("text-rotate").evaluate(Yn,{})*Math.PI/180,da=[],ha=0,la=fn.positionedLines;ha<la.length;ha+=1)for(var Qa=la[ha],Ha=0,ti=Qa.positionedGlyphs;Ha<ti.length;Ha+=1){var wa=ti[Ha];if(wa.rect){var Ga=wa.rect||{},bi=4,hi=!0,Li=1,pi=0,lo=(Rn||sa)&&wa.vertical,Ci=wa.metrics.advance*wa.scale/2;if(sa&&fn.verticalizable){var Do=24*(wa.scale-1),ko=(24-wa.metrics.width*wa.scale)/2;pi=Qa.lineOffset/2-(wa.imageName?-ko:Do)}if(wa.imageName){var So=oa[wa.imageName];hi=So.sdf,bi=1/(Li=So.pixelRatio)}var Yo=Rn?[wa.x+Ci,wa.y]:[0,0],No=Rn?[0,0]:[wa.x+Ci+yn[0],wa.y+yn[1]-pi],co=[0,0];lo&&(co=No,No=[0,0]);var Eo=(wa.metrics.left-bi)*wa.scale-Ci+No[0],Ji=(-wa.metrics.top-bi)*wa.scale+No[1],mo=Eo+Ga.w
94*wa.scale/Li,Fa=Ji+Ga.h*wa.scale/Li,$a=new r(Eo,Ji),Vi=new r(mo,Ji),Hi=new r(Eo,Fa),Bi=new r(mo,Fa);if(lo){var Pi=new r(-Ci,Ci- -17),oi=-Math.PI/2,qi=12-Ci,Wo=wa.imageName?qi:0,is=new r(22-qi,-Wo),jo=new(Function.prototype.bind.apply(r,[null].concat(co)));$a._rotateAround(oi,Pi)._add(is)._add(jo),Vi._rotateAround(oi,Pi)._add(is)._add(jo),Hi._rotateAround(oi,Pi)._add(is)._add(jo),Bi._rotateAround(oi,Pi)._add(is)._add(jo)}if(Qn){var Is=Math.sin(Qn),Js=Math.cos(Qn),Mo=[Js,-Is,Is,Js];$a._matMult(Mo),Vi._matMult(Mo),Hi._matMult(Mo),Bi._matMult(Mo)}var Os=new r(0,0),zs=new r(0,0);da.push({tl:$a,tr:Vi,bl:Hi,br:Bi,tex:Ga,writingMode:fn.writingMode,glyphOffset:Yo,sectionIndex:wa.sectionIndex,isSDF:hi,pixelOffsetTL:Os,pixelOffsetBR:zs,minFontScaleX:0,minFontScaleY:0})}}return da}(0,Y,Re,he,ve,Ae,ae,M.allowVerticalPlacement),Ar=M.textSizeData,Mr=null;Ar.kind==="source"?(Mr=[128*he.layout.get("text-size").evaluate(Ae,{})])[0]>32640&&A(M.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Ar.kind==="composite"&&((Mr=[128*qt.compositeTextSizes[0].evaluate(Ae,{},nr),128*qt.compositeTextSizes[1].evaluate(Ae,{},nr)])[0]>32640||Mr[1]>32640)&&A(M.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),M.addSymbols(M.text,dr,Mr,Re,ve,Ae,lt,O,Ze.lineStartIndex,Ze.lineLength,Wt,nr);for(var Nr=0,jr=pt;Nr<jr.length;Nr+=1)Ft[jr[Nr]]=M.text.placedSymbolArray.length-1;return 4*dr.length}function Uf(M){for(var O in M)return M[O];return null}function zp(M,O,Y,ae){var he=M.compareText;if(O in he){for(var ve=he[O],Ae=ve.length-1;Ae>=0;Ae--)if(ae.dist(ve[Ae])<Y)return!0}else he[O]=[];return he[O].push(ae),!1}var Dp=Il.VectorTileFeature.types,Rp=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Uc(M,O,Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt){var qt=Re?Math.min(32640,Math.round(Re[0])):0,nr=Re?Math.min(32640,Math.round(Re[1])):0;M.emplaceBack(O,Y,Math.round(32*ae),Math.round(32*he),ve,Ae,(qt<<1)+(Ze?1:0),nr,16*lt,16*pt,256*Ft,256*Wt)}function Pu(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 Fp(M){for(var O=0,Y=M.sections;O<Y.length;O+=1)if(na(Y[O].text))return!0;return!1}var Nl=function(M){this.layoutVertexArray=new Es,this.indexArray=new ao,this.programConfigurations=M,this.segments=new Rt,this.dynamicLayoutVertexArray=new ls,this.opacityVertexArray=new $s,this.placedSymbolArray=new Ne};Nl.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},Nl.prototype.upload=function(M,O,Y,ae){this.isEmpty()||(Y&&(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,Mu.members),this.indexBuffer=M.createIndexBuffer(this.indexArray,O),this.dynamicLayoutVertexBuffer=M.createVertexBuffer(this.dynamicLayoutVertexArray,up.members,!0),this.opacityVertexBuffer=M.createVertexBuffer(this.opacityVertexArray,Rp,!0),this.opacityVertexBuffer.itemSize=1),(Y||ae)&&this.programConfigurations.upload(M))},Nl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Jr("SymbolBuffers",Nl);var pc=function(M,O,Y){this.layoutVertexArray=new M,this.layoutAttributes=O,this.indexArray=new Y,this.segments=new Rt,this.collisionVertexArray=new Ls};pc.prototype.upload=function(M){this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=M.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=M.createVertexBuffer(this.collisionVertexArray,fp.members,!0)},pc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Jr("CollisionBuffers",pc);var ci=function(M){this.collisionBoxArray=M.collisionBoxArray,this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(Ae){return Ae.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=rc([]),this.placementViewportMatrix=rc([]);var O=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Eu(this.zoom,O["text-size"]),this.iconSizeData=Eu(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(Ae){return cs[Ae]})),this.stateDependentLayerIds=this.layers.filter(function(Ae){return Ae.isStateDependent()}).map(function(Ae){return Ae.id}),this.sourceID=M.sourceID};ci.prototype.createArrays=function(){this.text=new Nl(new fi(Mu.members,this.layers,this.zoom,function(M){return/^text/.test(M)})),this.icon=new Nl(new fi(Mu.members,this.layers,this.zoom,function(M){return/^icon/.test(M)})),this.glyphOffsetArray=new vt,this.lineVertexArray=new Lt,this.symbolInstances=new rt},ci.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 Ae=uc[M.charAt(ve)];Ae&&(O[Ae.charCodeAt(0)]=!0)}}
vendor: 2,001 bytes, line 94
94,ci.prototype.populate=function(M,O,Y){var ae=this.layers[0],he=ae.layout,ve=he.get("text-font"),Ae=he.get("text-field"),Re=he.get("icon-image"),Ze=(Ae.value.kind!=="constant"||Ae.value.value instanceof hr&&!Ae.value.value.isEmpty()||Ae.value.value.toString().length>0)&&(ve.value.kind!=="constant"||ve.value.value.length>0),lt=Re.value.kind!=="constant"||!!Re.value.value||Object.keys(Re.parameters).length>0,pt=he.get("symbol-sort-key");if(this.features=[],Ze||lt){for(var Ft=O.iconDependencies,Wt=O.glyphDependencies,qt=O.availableImages,nr=new ai(this.zoom),dr=0,Ar=M;dr<Ar.length;dr+=1){var Mr=Ar[dr],Nr=Mr.feature,jr=Mr.id,Yr=Mr.index,fn=Mr.sourceLayerIndex,yn=ae._featureFilter.needGeometry,Bn={type:Nr.type,id:jr,properties:Nr.properties,geometry:yn?yi(Nr):[]};if(ae._featureFilter.filter(nr,Bn,Y)){yn||(Bn.geometry=yi(Nr));var Rn=void 0;if(Ze){var Yn=ae.getValueAndResolveTokens("text-field",Bn,Y,qt),oa=hr.factory(Yn);Fp(oa)&&(this.hasRTLText=!0),(!this.hasRTLText||Yi()==="unavailable"||this.hasRTLText&&po.isParsed())&&(Rn=pp(oa,ae,Bn))}var sa=void 0;if(lt){var Qn=ae.getValueAndResolveTokens("icon-image",Bn,Y,qt);sa=Qn instanceof vr?Qn:vr.fromString(Qn)}if(Rn||sa){var da=this.sortFeaturesByKey?pt.evaluate(Bn,{},Y):void 0,ha={id:jr,text:Rn,icon:sa,index:Yr,sourceLayerIndex:fn,geometry:yi(Nr),properties:Nr.properties,type:Dp[Nr.type],sortKey:da};if(this.features.push(ha),sa&&(Ft[sa.name]=!0),Rn){var la=ve.evaluate(Bn,{},Y).join(","),Qa=he.get("text-rotation-alignment")==="map"&&he.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(cs.vertical)>=0;for(var Ha=0,ti=Rn.sections;Ha<ti.length;Ha+=1){var wa=ti[Ha];if(wa.image)Ft[wa.image.name]=!0;else{var Ga=Da(Rn.toString()),bi=wa.fontStack||la,hi=Wt[bi]=Wt[bi]||{};this.calculateGlyphDependencies(wa.text,hi,Qa,this.allowVerticalPlacement,Ga)}}}}}}he.get("symbol-placement")==="line"&&(this.features=function(Li){var pi={},lo={},Ci=[],Do=0;function ko(Bi){Ci.push(Li[Bi]),Do++}
vendor: 13,117 bytes, line 94
94function So(Bi,Pi,oi){var qi=lo[Bi];return delete lo[Bi],lo[Pi]=qi,Ci[qi].geometry[0].pop(),Ci[qi].geometry[0]=Ci[qi].geometry[0].concat(oi[0]),qi}function Yo(Bi,Pi,oi){var qi=pi[Pi];return delete pi[Pi],pi[Bi]=qi,Ci[qi].geometry[0].shift(),Ci[qi].geometry[0]=oi[0].concat(Ci[qi].geometry[0]),qi}function No(Bi,Pi,oi){var qi=oi?Pi[0][Pi[0].length-1]:Pi[0][0];return Bi+":"+qi.x+":"+qi.y}for(var co=0;co<Li.length;co++){var Eo=Li[co],Ji=Eo.geometry,mo=Eo.text?Eo.text.toString():null;if(mo){var Fa=No(mo,Ji),$a=No(mo,Ji,!0);if(Fa in lo&&$a in pi&&lo[Fa]!==pi[$a]){var Vi=Yo(Fa,$a,Ji),Hi=So(Fa,$a,Ci[Vi].geometry);delete pi[Fa],delete lo[$a],lo[No(mo,Ci[Hi].geometry,!0)]=Hi,Ci[Vi].geometry=null}else Fa in lo?So(Fa,$a,Ji):$a in pi?Yo(Fa,$a,Ji):(ko(co),pi[Fa]=Do-1,lo[$a]=Do-1)}else ko(co)}return Ci.filter(function(Bi){return Bi.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Li,pi){return Li.sortKey-pi.sortKey})}},ci.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))},ci.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},ci.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},ci.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},ci.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},ci.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},ci.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={},Ae=M.segment+1;Ae<O.length;Ae++)ve[Ae]={x:O[Ae].x,y:O[Ae].y,tileUnitDistanceFromAnchor:ae},Ae<O.length-1&&(ae+=O[Ae+1].dist(O[Ae]));for(var Re=M.segment||0;Re>=0;Re--)ve[Re]={x:O[Re].x,y:O[Re].y,tileUnitDistanceFromAnchor:he},Re>0&&(he+=O[Re-1].dist(O[Re]));for(var Ze=0;Ze<O.length;Ze++){var lt=ve[Ze];this.lineVertexArray.emplaceBack(lt.x,lt.y,lt.tileUnitDistanceFromAnchor)}}return{lineStartIndex:Y,lineLength:this.lineVertexArray.length-Y}},ci.prototype.addSymbols=function(M,O,Y,ae,he,ve,Ae,Re,Ze,lt,pt,Ft){for(var Wt=M.indexArray,qt=M.layoutVertexArray,nr=M.segments.prepareSegment(4*O.length,qt,Wt,ve.sortKey),dr=this.glyphOffsetArray.length,Ar=nr.vertexLength,Mr=this.allowVerticalPlacement&&Ae===cs.vertical?Math.PI/2:0,Nr=ve.text&&ve.text.sections,jr=0;jr<O.length;jr++){var Yr=O[jr],fn=Yr.tl,yn=Yr.tr,Bn=Yr.bl,Rn=Yr.br,Yn=Yr.tex,oa=Yr.pixelOffsetTL,sa=Yr.pixelOffsetBR,Qn=Yr.minFontScaleX,da=Yr.minFontScaleY,ha=Yr.glyphOffset,la=Yr.isSDF,Qa=Yr.sectionIndex,Ha=nr.vertexLength,ti=ha[1];Uc(qt,Re.x,Re.y,fn.x,ti+fn.y,Yn.x,Yn.y,Y,la,oa.x,oa.y,Qn,da),Uc(qt,Re.x,Re.y,yn.x,ti+yn.y,Yn.x+Yn.w,Yn.y,Y,la,sa.x,oa.y,Qn,da),Uc(qt,Re.x,Re.y,Bn.x,ti+Bn.y,Yn.x,Yn.y+Yn.h,Y,la,oa.x,sa.y,Qn,da),Uc(qt,Re.x,Re.y,Rn.x,ti+Rn.y,Yn.x+Yn.w,Yn.y+Yn.h,Y,la,sa.x,sa.y,Qn,da),Pu(M.dynamicLayoutVertexArray,Re,Mr),Wt.emplaceBack(Ha,Ha+1,Ha+2),Wt.emplaceBack(Ha+1,Ha+2,Ha+3),nr.vertexLength+=4,nr.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(ha[0]),jr!==O.length-1&&Qa===O[jr+1].sectionIndex||M.programConfigurations.populatePaintArrays(qt.length,ve,ve.index,{},Ft,Nr&&Nr[Qa])}M.placedSymbolArray.emplaceBack(Re.x,Re.y,dr,this.glyphOffsetArray.length-dr,Ar,Ze,lt,Re.segment,Y?Y[0]:0,Y?Y[1]:0,ae[0],ae[1],Ae,0,!1,0,pt)},ci.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))},ci.prototype.addCollisionDebugVertices=function(M,O,Y,ae,he,ve,Ae){var Re=he.segments.prepareSegment(4,he.layoutVertexArray,he.indexArray),Ze=Re.vertexLength,lt=he.layoutVertexArray,pt=he.collisionVertexArray,Ft=Ae.anchorX,Wt=Ae.anchorY;this._addCollisionDebugVertex(lt,pt,ve,Ft,Wt,new r(M,O)),this._addCollisionDebugVertex(lt,pt,ve,Ft,Wt,new r(Y,O)),this._addCollisionDebugVertex(lt,pt,ve,Ft,Wt,new r(Y,ae)),this._addCollisionDebugVertex(lt,pt,ve,Ft,Wt,new r(M,ae)),Re.vertexLength+=4;var qt=he.indexArray;qt.emplaceBack(Ze,Ze+1),qt.emplaceBack(Ze+1,Ze+2),qt.emplaceBack(Ze+2,Ze+3),qt.emplaceBack(Ze+3,Ze),Re.primitiveLength+=4},ci.prototype.addDebugCollisionBoxes=function(M,O,Y,ae){for(var he=M;he<O;he++){var ve=this.collisionBoxArray.get(he),Ae=ve.x1,Re=ve.y1,Ze=ve.x2,lt=ve.y2;this.addCollisionDebugVertices(Ae,Re,Ze,lt,ae?this.textCollisionBox:this.iconCollisionBox,ve.anchorPoint,Y)}},ci.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new pc(gs,xf.members,B),this.iconCollisionBox=new pc(gs,xf.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)}},ci.prototype._deserializeCollisionBoxesForSymbol=function(M,O,Y,ae,he,ve,Ae,Re,Ze){for(var lt={},pt=O;pt<Y;pt++){var Ft=M.get(pt);lt.textBox={x1:Ft.x1,y1:Ft.y1,x2:Ft.x2,y2:Ft.y2,anchorPointX:Ft.anchorPointX,anchorPointY:Ft.anchorPointY},lt.textFeatureIndex=Ft.featureIndex;break}for(var Wt=ae;Wt<he;Wt++){var qt=M.get(Wt);lt.verticalTextBox={x1:qt.x1,y1:qt.y1,x2:qt.x2,y2:qt.y2,anchorPointX:qt.anchorPointX,anchorPointY:qt.anchorPointY},lt.verticalTextFeatureIndex=qt.featureIndex;break}for(var nr=ve;nr<Ae;nr++){var dr=M.get(nr);lt.iconBox={x1:dr.x1,y1:dr.y1,x2:dr.x2,y2:dr.y2,anchorPointX:dr.anchorPointX,anchorPointY:dr.anchorPointY},lt.iconFeatureIndex=dr.featureIndex;break}for(var Ar=Re;Ar<Ze;Ar++){var Mr=M.get(Ar);lt.verticalIconBox={x1:Mr.x1,y1:Mr.y1,x2:Mr.x2,y2:Mr.y2,anchorPointX:Mr.anchorPointX,anchorPointY:Mr.anchorPointY},lt.verticalIconFeatureIndex=Mr.featureIndex;break}return lt},ci.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))}},ci.prototype.hasTextData=function(){return this.text.segments.get().length>0},ci.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ci.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ci.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ci.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ci.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)},ci.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=[],Ae=0;Ae<this.symbolInstances.length;++Ae){ve.push(Ae);var Re=this.symbolInstances.get(Ae);ae.push(0|Math.round(O*Re.anchorX+Y*Re.anchorY)),he.push(Re.featureIndex)}return ve.sort(function(Ze,lt){return ae[Ze]-ae[lt]||he[lt]-he[Ze]}),ve},ci.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})},ci.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(Ae,Re,Ze){Ae>=0&&Ze.indexOf(Ae)===Re&&O.addIndicesForPlacedSymbol(O.text,Ae)}),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)}},Jr("SymbolBucket",ci,{omit:["layers","collisionBoxArray","features","compareText"]}),ci.MAX_GLYPHS=65535,ci.addDynamicAttributes=Pu;var Bp=new Io({"symbol-placement":new ua(Pe.layout_symbol["symbol-placement"]),"symbol-spacing":new ua(Pe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ua(Pe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new xa(Pe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ua(Pe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ua(Pe.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ua(Pe.layout_symbol["icon-ignore-placement"]),"icon-optional":new ua(Pe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ua(Pe.layout_symbol["icon-rotation-alignment"]),"icon-size":new xa(Pe.layout_symbol["icon-size"]),"icon-text-fit":new ua(Pe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ua(Pe.layout_symbol["icon-text-fit-padding"]),"icon-image":new xa(Pe.layout_symbol["icon-image"]),"icon-rotate":new xa(Pe.layout_symbol["icon-rotate"]),"icon-padding":new ua(Pe.layout_symbol["icon-padding"]),"icon-keep-upright":new ua(Pe.layout_symbol["icon-keep-upright"]),"icon-offset":new xa(Pe.layout_symbol["icon-offset"]),"icon-anchor":new xa(Pe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ua(Pe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ua(Pe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ua(Pe.layout_symbol["text-rotation-alignment"]),"text-field":new xa(Pe.layout_symbol["text-field"]),"text-font":new xa(Pe.layout_symbol["text-font"]),"text-size":new xa(Pe.layout_symbol["text-size"]),"text-max-width":new xa(Pe.layout_symbol["text-max-width"]),"text-line-height":new ua(Pe.layout_symbol["text-line-height"]),"text-letter-spacing":new xa(Pe.layout_symbol["text-letter-spacing"]),"text-justify":new xa(Pe.layout_symbol["text-justify"]),"text-radial-offset":new xa(Pe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ua(Pe.layout_symbol["text-variable-anchor"]),"text-anchor":new xa(Pe.layout_symbol["text-anchor"]),"text-max-angle":new ua(Pe.layout_symbol["text-max-angle"]),"text-writing-mode":new ua(Pe.layout_symbol["text-writing-mode"]),"text-rotate":new xa(Pe.layout_symbol["text-rotate"]),"text-padding":new ua(Pe.layout_symbol["text-padding"]),"text-keep-upright":new ua(Pe.layout_symbol["text-keep-upright"]),"text-transform":new xa(Pe.layout_symbol["text-transform"]),"text-offset":new xa(Pe.layout_symbol["text-offset"]),"text-allow-overlap":new ua(Pe.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ua(Pe.layout_symbol["text-ignore-placement"]),"text-optional":new ua(Pe.layout_symbol["text-optional"])}),Iu={paint:new Io({"icon-opacity":new xa(Pe.paint_symbol["icon-opacity"]),"icon-color":new xa(Pe.paint_symbol["icon-color"]),"icon-halo-color":new xa(Pe.paint_symbol["icon-halo-color"]),"icon-halo-width":new xa(Pe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new xa(Pe.paint_symbol["icon-halo-blur"]),"icon-translate":new ua(Pe.paint_symbol["icon-translate"]),"icon-translate-anchor":new ua(Pe.paint_symbol["icon-translate-anchor"]),"text-opacity":new xa(Pe.paint_symbol["text-opacity"]),"text-color":new xa(Pe.paint_symbol["text-color"],{runtimeType:Mt,getOverride:function(M){return M.textColor},hasOverride:function(M){return!!M.textColor}}),"text-halo-color":new xa(Pe.paint_symbol["text-halo-color"]),"text-halo-width":new xa(Pe.paint_symbol["text-halo-width"]),"text-halo-blur":new xa(Pe.paint_symbol["text-halo-blur"]),"text-translate":new ua(Pe.paint_symbol["text-translate"]),"text-translate-anchor":new ua(Pe.paint_symbol["text-translate-anchor"])}),layout:Bp},jl=function(M){this.type=M.property.overrides?M.property.overrides.runtimeType:Nt,this.defaultValue=
94M};jl.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},jl.prototype.eachChild=function(M){this.defaultValue.isConstant()||M(this.defaultValue.value._styleExpression.expression)},jl.prototype.outputDefined=function(){return!1},jl.prototype.serialize=function(){return null},Jr("FormatSectionOverride",jl,{omit:["defaultValue"]});var Np=function(M){function O(Y){M.call(this,Y,Iu)}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=[],Ae=0,Re=he;Ae<Re.length;Ae+=1){var Ze=Re[Ae];ve.indexOf(Ze)<0&&ve.push(Ze)}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 Ae=this.layout.get(Y).evaluate(ae,{},he,ve),Re=this._unevaluatedLayout._values[Y];return Re.isDataDriven()||Qt(Re.value)||!Ae?Ae:function(Ze,lt){return lt.replace(/{([^{}]+)}/g,function(pt,Ft){return Ft in Ze?String(Ze[Ft]):""})}(ae.properties,Ae)},O.prototype.createBucket=function(Y){return new ci(Y)},O.prototype.queryRadius=function(){return 0},O.prototype.queryIntersectsFeature=function(){return!1},O.prototype._setPaintOverrides=function(){for(var Y=0,ae=Iu.paint.overridableProperties;Y<ae.length;Y+=1){var he=ae[Y];if(O.hasPaintOverride(this.layout,he)){var ve=this.paint.get(he),Ae=new jl(ve),Re=new Kt(Ae,ve.property.specification),Ze=null;Ze=ve.value.kind==="constant"||ve.value.kind==="source"?new rr("source",Re):new cr("composite",Re,ve.value.zoomStops,ve.value._interpolationType),this.paint._values[he]=new Fi(ve.property,Ze,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=Iu.paint.properties[ae],Ae=!1,Re=function(pt){for(var Ft=0,Wt=pt;Ft<Wt.length;Ft+=1){var qt=Wt[Ft];if(ve.overrides&&ve.overrides.hasOverride(qt))return void(Ae=!0)}};if(he.value.kind==="constant"&&he.value.value instanceof hr)Re(he.value.value.sections);else if(he.value.kind==="source"){var Ze=function(pt){if(!Ae)if(pt instanceof An&&qr(pt.value)===it){var Ft=pt.value;Re(Ft.sections)}else pt instanceof Er?Re(pt.sections):pt.eachChild(Ze)},lt=he.value;lt._styleExpression&&Ze(lt._styleExpression.expression)}return Ae},O}(Go),jp={paint:new Io({"background-color":new ua(Pe.paint_background["background-color"]),"background-pattern":new js(Pe.paint_background["background-pattern"]),"background-opacity":new ua(Pe.paint_background["background-opacity"])})},Up=function(M){function O(Y){M.call(this,Y,jp)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O}(Go),Vp={paint:new Io({"raster-opacity":new ua(Pe.paint_raster["raster-opacity"]),"raster-hue-rotate":new ua(Pe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ua(Pe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ua(Pe.paint_raster["raster-brightness-max"]),"raster-saturation":new ua(Pe.paint_raster["raster-saturation"]),"raster-contrast":new ua(Pe.paint_raster["raster-contrast"]),"raster-resampling":new ua(Pe.paint_raster["raster-resampling"]),"raster-fade-duration":new ua(Pe.paint_raster["raster-fade-duration"])})},Hp=function(M){function O(Y){M.call(this,Y,Vp)}return M&&(O.__proto__=M),O.prototype=Object.create(M&&M.prototype),O.prototype.constructor=O,O}(Go),qp=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}(Go),Gp={circle:Ch,heatmap:Ih,hillshade:zh,fill:Jh,"fill-extrusion":ip,line:cp,symbol:Np,background:Up,raster:Hp},Vf=self.HTMLImageElement,Hf=self.HTMLCanvasElement,qf=self.HTMLVideoElement,Gf=self.ImageData,Vc=self.ImageBitmap,bl=function(M,O,Y,ae){this.context=M,this.format=Y,this.texture=M.gl.createTexture(),this.update(O,ae)};bl.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),Ae=this.context,Re=Ae.gl;
vendor: 4,253 bytes, line 94
94if(this.useMipmap=Boolean(O&&O.useMipmap),Re.bindTexture(Re.TEXTURE_2D,this.texture),Ae.pixelStoreUnpackFlipY.set(!1),Ae.pixelStoreUnpack.set(1),Ae.pixelStoreUnpackPremultiplyAlpha.set(this.format===Re.RGBA&&(!O||O.premultiply!==!1)),ve)this.size=[ae,he],M instanceof Vf||M instanceof Hf||M instanceof qf||M instanceof Gf||Vc&&M instanceof Vc?Re.texImage2D(Re.TEXTURE_2D,0,this.format,this.format,Re.UNSIGNED_BYTE,M):Re.texImage2D(Re.TEXTURE_2D,0,this.format,ae,he,0,this.format,Re.UNSIGNED_BYTE,M.data);else{var Ze=Y||{x:0,y:0},lt=Ze.x,pt=Ze.y;M instanceof Vf||M instanceof Hf||M instanceof qf||M instanceof Gf||Vc&&M instanceof Vc?Re.texSubImage2D(Re.TEXTURE_2D,0,lt,pt,Re.RGBA,Re.UNSIGNED_BYTE,M):Re.texSubImage2D(Re.TEXTURE_2D,0,lt,pt,ae,he,Re.RGBA,Re.UNSIGNED_BYTE,M.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Re.generateMipmap(Re.TEXTURE_2D)},bl.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)},bl.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},bl.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Ou=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()})};Ou.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))},Ou.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Ul=function(M,O,Y){this.target=M,this.parent=O,this.mapId=Y,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},c(["receive","process"],this),this.invoker=new Ou(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=S()?M:self};function Yf(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]}Ul.prototype.send=function(M,O,Y,ae,he){var ve=this;he===void 0&&(he=!1);var Ae=Math.round(1e18*Math.random()).toString(36).substring(0,10);Y&&(this.callbacks[Ae]=Y);var Re=F(this.globalScope)?void 0:[];return this.target.postMessage({id:Ae,type:M,hasCallback:!!Y,targetMapId:ae,mustQueue:he,sourceMapId:this.mapId,data:ta(O,Re)},Re),{cancel:function(){Y&&delete ve.callbacks[Ae],ve.target.postMessage({id:Ae,type:"<cancel>",targetMapId:ae,sourceMapId:ve.mapId})}}},Ul.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)},Ul.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)}},Ul.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(Ta(O.error)):ae(null,Ta(O.data)))}else{var he=!1,ve=F(this.globalScope)?void 0:[],Ae=O.hasCallback?function(pt,Ft){he=!0,delete Y.cancelCallbacks[M],Y.target.postMessage({id:M,type:"<response>",sourceMapId:Y.mapId,error:pt?ta(pt):null,data:ta(Ft,ve)},ve)}:function(pt){he=!0},Re=null,Ze=Ta(O.data);if(this.parent[O.type])Re=this.parent[O.type](O.sourceMapId,Ze,Ae);else if(this.parent.getWorkerSource){var lt=O.type.split(".");Re=this.parent.getWorkerSource(O.sourceMapId,lt[0],Ze.source)[lt[1]](Ze,Ae)}else Ae(new Error("Could not find function "+O.type));!he&&Re&&Re.cancel&&(this.cancelCallbacks[M]=Re.cancel)}},Ul.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};
vendor: 6,404 bytes, line 94
94var oo=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]))};oo.prototype.setNorthEast=function(M){return this._ne=M instanceof Ei?new Ei(M.lng,M.lat):Ei.convert(M),this},oo.prototype.setSouthWest=function(M){return this._sw=M instanceof Ei?new Ei(M.lng,M.lat):Ei.convert(M),this},oo.prototype.extend=function(M){var O,Y,ae=this._sw,he=this._ne;if(M instanceof Ei)O=M,Y=M;else{if(!(M instanceof oo)){if(Array.isArray(M)){if(M.length===4||M.every(Array.isArray)){var ve=M;return this.extend(oo.convert(ve))}var Ae=M;return this.extend(Ei.convert(Ae))}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 Ei(O.lng,O.lat),this._ne=new Ei(Y.lng,Y.lat)),this},oo.prototype.getCenter=function(){return new Ei((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},oo.prototype.getSouthWest=function(){return this._sw},oo.prototype.getNorthEast=function(){return this._ne},oo.prototype.getNorthWest=function(){return new Ei(this.getWest(),this.getNorth())},oo.prototype.getSouthEast=function(){return new Ei(this.getEast(),this.getSouth())},oo.prototype.getWest=function(){return this._sw.lng},oo.prototype.getSouth=function(){return this._sw.lat},oo.prototype.getEast=function(){return this._ne.lng},oo.prototype.getNorth=function(){return this._ne.lat},oo.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},oo.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},oo.prototype.isEmpty=function(){return!(this._sw&&this._ne)},oo.prototype.contains=function(M){var O=Ei.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},oo.convert=function(M){return!M||M instanceof oo?M:new oo(M)};var Ei=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")};Ei.prototype.wrap=function(){return new Ei(f(this.lng,-180,180),this.lat)},Ei.prototype.toArray=function(){return[this.lng,this.lat]},Ei.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ei.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))},Ei.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 oo(new Ei(this.lng-Y,this.lat-O),new Ei(this.lng+Y,this.lat+O))},Ei.convert=function(M){if(M instanceof Ei)return M;if(Array.isArray(M)&&(M.length===2||M.length===3))return new Ei(Number(M[0]),Number(M[1]));if(!Array.isArray(M)&&typeof M=="object"&&M!==null)return new Ei(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 Wf=2*Math.PI*63710088e-1;function Zf(M){return Wf*Math.cos(M*Math.PI/180)}function Xf(M){return(180+M)/360}function Jf(M){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M*Math.PI/360)))/360}function Kf(M,O){return M/Zf(O)}function zu(M){var O=180-360*M;return 360/Math.PI*Math.atan(Math.exp(O*Math.PI/180))-90}var _l=function(M,O,Y){Y===void 0&&(Y=0),this.x=+M,this.y=+O,this.z=+Y};_l.fromLngLat=function(M,O){O===void 0&&(O=0);var Y=Ei.convert(M);return new _l(Xf(Y.lng),Jf(Y.lat),Kf(O,Y.lat))},_l.prototype.toLngLat=function(){return new Ei(360*this.x-180,zu(this.y))},_l.prototype.toAltitude=function(){return M=this.z,O=this.y,M*Zf(zu(O));var M,O},_l.prototype.meterInMercatorCoordinateUnits=function(){return 1/Wf*(M=zu(this.y),1/Math.cos(M*Math.PI/180));var M};var wl=function(M,O,Y){this.z=M,this.x=O,this.y=Y,this.key=dc(0,M,M,O,Y)};wl.prototype.equals=function(M){return this.z===M.z&&this.x===M.x&&this.y===M.y},wl.prototype.url=function(M,O){var Y,ae,he,ve,Ae,Re=(Y=this.x,ae=this.y,he=this.z,ve=Yf(256*Y,256*(ae=Math.pow(2,he)-ae-1),he),Ae=Yf(256*(Y+1),256*(ae+1),he),ve[0]+","+ve[1]+","+Ae[0]+","+Ae[1]),Ze=function(lt,pt,Ft){for(var Wt,qt="",nr=lt;nr>0;nr--)qt+=(pt&(Wt=1<<nr-1)?1:0)+(Ft&Wt?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}",Ze).replace("{bbox-epsg-3857}",Re)},wl.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))},wl.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Qf=function(M,O){this.wrap=M,this.canonical=O,this.key=dc(M,O.z,O.z,O.x,O.y)},so=function(M,O,Y,ae,he){this.overscaledZ=M,this.wrap=O,this.canonical=new wl(Y,+ae,+he),this.key=dc(O,M,Y,ae,he)};function dc(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)}so.prototype.equals=function(M){return this.overscaledZ===M.overscaledZ&&this.wrap===M.wrap&&this.canonical.equals(M.canonical)},so.prototype.scaledTo=function(M){var O=this.canonical.z-M;return M>this.canonical.z?new so(M,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new so(M,this.wrap,M,this.canonical.x>>O,this.canonical.y>>O)},so.prototype.calculateScaledKey=function(M,O){var Y=this.canonical.z-M;return M>this.canonical.z?dc(this.wrap*+O,M,this.canonical.z,this.canonical.x,this.canonical.y):dc(this.wrap*+O,M,M,this.canonical.x>>Y,this.canonical.y>>Y)},so.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},so.prototype.children=function(M){if(this.overscaledZ>=M)return[new so(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: 7,275 bytes, line 94
94return[new so(O,this.wrap,O,Y,ae),new so(O,this.wrap,O,Y+1,ae),new so(O,this.wrap,O,Y,ae+1),new so(O,this.wrap,O,Y+1,ae+1)]},so.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))},so.prototype.wrapped=function(){return new so(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},so.prototype.unwrapTo=function(M){return new so(this.overscaledZ,M,this.canonical.z,this.canonical.x,this.canonical.y)},so.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},so.prototype.toUnwrapped=function(){return new Qf(this.wrap,this.canonical)},so.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},so.prototype.getTilePoint=function(M){return this.canonical.getTilePoint(new _l(M.x-this.wrap,M.y))},Jr("CanonicalTileID",wl),Jr("OverscaledTileID",so,{omit:["posMatrix"]});var Zs=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)]};Zs.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])},Zs.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Zs.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)},Zs.prototype._unpackMapbox=function(M,O,Y){return(256*M*256+256*O+Y)/10-1e4},Zs.prototype._unpackTerrarium=function(M,O,Y){return 256*M+O+Y/256-32768},Zs.prototype.getPixels=function(){return new Jo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Zs.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,Ae=Y*this.dim+this.dim;switch(O){case-1:ae=he-1;break;case 1:he=ae+1}switch(Y){case-1:ve=Ae-1;break;case 1:Ae=ve+1}for(var Re=-O*this.dim,Ze=-Y*this.dim,lt=ve;lt<Ae;lt++)for(var pt=ae;pt<he;pt++)this.data[this._idx(pt,lt)]=M.data[this._idx(pt+Re,lt+Ze)]},Jr("DEMData",Zs);var Hc=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}};Hc.prototype.encode=function(M){return this._stringToNumber[M]},Hc.prototype.decode=function(M){return this._numberToString[M]};var qc=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},Du={geometry:{configurable:!0}};Du.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},Du.geometry.set=function(M){this._geometry=M},qc.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(qc.prototype,Du);var Vl=function(){this.state={},this.stateChanges={},this.deletedStates={}};Vl.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]||{},o(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 Ae in Y)this.deletedStates[M]&&this.deletedStates[M][ae]&&this.deletedStates[M][ae][Ae]===null&&delete this.deletedStates[M][ae][Ae]},Vl.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}},Vl.prototype.getState=function(M,O){var Y=String(O),ae=this.state[M]||{},he=this.stateChanges[M]||{},ve=o({},ae[Y],he[Y]);if(this.deletedStates[M]===null)return{};if(this.deletedStates[M]){var Ae=this.deletedStates[M][O];if(Ae===null)return{};for(var Re in Ae)delete ve[Re]}return ve},Vl.prototype.initializeTileState=function(M,O){M.setFeatureState(this.state,O)},Vl.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]={}),o(this.state[ae][ve],this.stateChanges[ae][ve]),he[ve]=this.state[ae][ve];Y[ae]=he}for(var Ae in this.deletedStates){this.state[Ae]=this.state[Ae]||{};var Re={};if(this.deletedStates[Ae]===null)for(var Ze in this.state[Ae])Re[Ze]={},this.state[Ae][Ze]={};else for(var lt in this.deletedStates[Ae]){if(this.deletedStates[Ae][lt]===null)this.state[Ae][lt]={};else for(var pt=0,Ft=Object.keys(this.deletedStates[Ae][lt]);pt<Ft.length;pt+=1){var Wt=Ft[pt];delete this.state[Ae][lt][Wt]}Re[lt]=this.state[Ae][lt]}Y[Ae]=Y[Ae]||{},o(Y[Ae],Re)}if(this.stateChanges={},this.deletedStates={},Object.keys(Y).length!==0)for(var qt in M)M[qt].setFeatureState(Y,O)};var Xs=function(M,O){this.tileID=M,this.x=M.canonical.x,this.y=M.canonical.y,this.z=M.canonical.z,this.grid=new un(8192,16,0),this.grid3D=new un(8192,16,0),this.featureIndexArray=new kt,this.promoteId=O};function $f(M,O,Y,ae,he){return _(M,function(ve,Ae){var Re=O instanceof ts?O.get(Ae):null;return Re&&Re.evaluate?Re.evaluate(Y,ae,he):Re})}function eh(M){for(var O=1/0,Y=1/0,ae=-1/0,he=-1/0,ve=0,Ae=M;ve<Ae.length;ve+=1){var Re=Ae[ve];O=Math.min(O,Re.x),Y=Math.min(Y,Re.y),ae=Math.max(ae,Re.x),he=Math.max(he,Re.y)}return{minX:O,minY:Y,maxX:ae,maxY:he}}function Yp(M,O){return O-M}Xs.prototype.insert=function(M,O,Y,ae,he,ve){var Ae=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Y,ae,he);for(var Re=ve?this.grid3D:this.grid,Ze=0;Ze<O.length;Ze++){for(var lt=O[Ze],pt=[1/0,1/0,-1/0,-1/0],Ft=0;Ft<lt.length;
94Ft++){var Wt=lt[Ft];pt[0]=Math.min(pt[0],Wt.x),pt[1]=Math.min(pt[1],Wt.y),pt[2]=Math.max(pt[2],Wt.x),pt[3]=Math.max(pt[3],Wt.y)}pt[0]<8192&&pt[1]<8192&&pt[2]>=0&&pt[3]>=0&&Re.insert(Ae,pt[0],pt[1],pt[2],pt[3])}},Xs.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Il.VectorTile(new Ic(this.rawTileData)).layers,this.sourceLayerCoder=new Hc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Xs.prototype.query=function(M,O,Y,ae){var he=this;this.loadVTLayers();for(var ve=M.params||{},Ae=8192/M.tileSize/M.scale,Re=Aa(ve.filter),Ze=M.queryGeometry,lt=M.queryPadding*Ae,pt=eh(Ze),Ft=this.grid.query(pt.minX-lt,pt.minY-lt,pt.maxX+lt,pt.maxY+lt),Wt=eh(M.cameraQueryGeometry),qt=this.grid3D.query(Wt.minX-lt,Wt.minY-lt,Wt.maxX+lt,Wt.maxY+lt,function(fn,yn,Bn,Rn){return function(Yn,oa,sa,Qn,da){for(var ha=0,la=Yn;ha<la.length;ha+=1){var Qa=la[ha];if(oa<=Qa.x&&sa<=Qa.y&&Qn>=Qa.x&&da>=Qa.y)return!0}var Ha=[new r(oa,sa),new r(oa,da),new r(Qn,da),new r(Qn,sa)];if(Yn.length>2){for(var ti=0,wa=Ha;ti<wa.length;ti+=1)if(ns(Yn,wa[ti]))return!0}for(var Ga=0;Ga<Yn.length-1;Ga++)if(vl(Yn[Ga],Yn[Ga+1],Ha))return!0;return!1}(M.cameraQueryGeometry,fn-lt,yn-lt,Bn+lt,Rn+lt)}),nr=0,dr=qt;nr<dr.length;nr+=1){var Ar=dr[nr];Ft.push(Ar)}Ft.sort(Yp);for(var Mr,Nr={},jr=function(fn){var yn=Ft[fn];if(yn!==Mr){Mr=yn;var Bn=he.featureIndexArray.get(yn),Rn=null;he.loadMatchingFeature(Nr,Bn.bucketIndex,Bn.sourceLayerIndex,Bn.featureIndex,Re,ve.layers,ve.availableImages,O,Y,ae,function(Yn,oa,sa){return Rn||(Rn=yi(Yn)),oa.queryIntersectsFeature(Ze,Yn,sa,Rn,he.z,M.transform,Ae,M.pixelPosMatrix)})}},Yr=0;Yr<Ft.length;Yr++)jr(Yr);return Nr},Xs.prototype.loadMatchingFeature=function(M,O,Y,ae,he,ve,Ae,Re,Ze,lt,pt){var Ft=this.bucketLayerIDs[O];if(!ve||function(Bn,Rn){for(var Yn=0;Yn<Bn.length;Yn++)if(Rn.indexOf(Bn[Yn])>=0)return!0;return!1}(ve,Ft)){var Wt=this.sourceLayerCoder.decode(Y),qt=this.vtLayers[Wt].feature(ae);if(he.filter(new ai(this.tileID.overscaledZ),qt))for(var nr=this.getId(qt,Wt),dr=0;dr<Ft.length;dr++){var Ar=Ft[dr];if(!(ve&&ve.indexOf(Ar)<0)){var Mr=Re[Ar];if(Mr){var Nr={};nr!==void 0&<&&(Nr=lt.getState(Mr.sourceLayer||"_geojsonTileLayer",nr));var jr=Ze[Ar];jr.paint=$f(jr.paint,Mr.paint,qt,Nr,Ae),jr.layout=$f(jr.layout,Mr.layout,qt,Nr,Ae);var Yr=!pt||pt(qt,Mr,Nr);if(Yr){var fn=new qc(qt,this.z,this.x,this.y,nr);fn.layer=jr;var yn=M[Ar];yn===void 0&&(yn=M[Ar]=[]),yn.push({featureIndex:ae,feature:fn,intersectionZ:Yr})}}}}}},Xs.prototype.lookupSymbolFeatures=function(M,O,Y,ae,he,ve,Ae,Re){var Ze={};this.loadVTLayers();for(var lt=Aa(he),pt=0,Ft=M;pt<Ft.length;pt+=1){var Wt=Ft[pt];this.loadMatchingFeature(Ze,Y,ae,Wt,lt,ve,Ae,Re,O)}return Ze},Xs.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},Xs.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},Jr("FeatureIndex",Xs,{omit:["rawTileData","sourceLayerCoder"]});var To=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"};To.prototype.registerFadeDuration=function(M){var O=M+this.timeAdded;O<N.now()||this.fadeEndTime&&O<this.fadeEndTime||(this.fadeEndTime=O)},To.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},To.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(lt,pt){var Ft={};if(!pt)return Ft;
vendor: 12,608 bytes, line 94
94for(var Wt=function(){var dr=nr[qt],Ar=dr.layerIds.map(function(Yr){return pt.getLayer(Yr)}).filter(Boolean);if(Ar.length!==0){dr.layers=Ar,dr.stateDependentLayerIds&&(dr.stateDependentLayers=dr.stateDependentLayerIds.map(function(Yr){return Ar.filter(function(fn){return fn.id===Yr})[0]}));for(var Mr=0,Nr=Ar;Mr<Nr.length;Mr+=1){var jr=Nr[Mr];Ft[jr.id]=dr}}},qt=0,nr=lt;qt<nr.length;qt+=1)Wt();return Ft}(M.buckets,O.style),this.hasSymbolBuckets=!1,this.buckets){var he=this.buckets[ae];if(he instanceof ci){if(this.hasSymbolBuckets=!0,!Y)break;he.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var ve in this.buckets){var Ae=this.buckets[ve];if(Ae instanceof ci&&Ae.hasRTLText){this.hasRTLText=!0,po.isLoading()||po.isLoaded()||Yi()!=="deferred"||ni();break}}for(var Re in this.queryPadding=0,this.buckets){var Ze=this.buckets[Re];this.queryPadding=Math.max(this.queryPadding,O.style.getLayer(Re).queryRadius(Ze))}M.imageAtlas&&(this.imageAtlas=M.imageAtlas),M.glyphAtlasImage&&(this.glyphAtlasImage=M.glyphAtlasImage)}else this.collisionBoxArray=new ye},To.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"},To.prototype.getBucket=function(M){return this.buckets[M.id]},To.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 bl(M,this.imageAtlas.image,ae.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new bl(M,this.glyphAtlasImage,ae.ALPHA),this.glyphAtlasImage=null)},To.prototype.prepare=function(M){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(M,this.imageAtlasTexture)},To.prototype.queryRenderedFeatures=function(M,O,Y,ae,he,ve,Ae,Re,Ze,lt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ae,cameraQueryGeometry:he,scale:ve,tileSize:this.tileSize,pixelPosMatrix:lt,transform:Re,params:Ae,queryPadding:this.queryPadding*Ze},M,O,Y):{}},To.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 Ae=Aa(O&&O.filter),Re=this.tileID.canonical,Ze=Re.z,lt=Re.x,pt=Re.y,Ft={z:Ze,x:lt,y:pt},Wt=0;Wt<ve.length;Wt++){var qt=ve.feature(Wt);if(Ae.filter(new ai(this.tileID.overscaledZ),qt)){var nr=Y.getId(qt,he),dr=new qc(qt,Ze,lt,pt,nr);dr.tile=Ft,M.push(dr)}}}},To.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},To.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},To.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}},To.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)},To.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",Ae=Y[ve],Re=M[ve];if(Ae&&Re&&Object.keys(Re).length!==0){he.update(Re,Ae,this.imageAtlas&&this.imageAtlas.patternPositions||{});var Ze=O&&O.style&&O.style.getLayer(ae);Ze&&(this.queryPadding=Math.max(this.queryPadding,Ze.queryRadius(he)))}}}},To.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},To.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<N.now()},To.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},To.prototype.setHoldDuration=function(M){this.symbolFadeHoldUntil=N.now()+M},To.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},To.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 Ae=0,Re=O;Ae<Re.length;Ae+=1)if(ve[Re[Ae]])return!0}}return!1};var al=self.performance,th=function(M){this._marks={start:[M.url,"start"].join("#"),end:[M.url,"end"].join("#"),measure:M.url.toString()},al.mark(this._marks.start)};th.prototype.finish=function(){al.mark(this._marks.end);var M=al.getEntriesByName(this._marks.measure);return M.length===0&&(al.measure(this._marks.measure,this._marks.start,this._marks.end),M=al.getEntriesByName(this._marks.measure),al.clearMarks(this._marks.start),al.clearMarks(this._marks.end),al.clearMeasures(this._marks.measure)),M},e.Actor=Ul,e.AlphaImage=xl,e.CanonicalTileID=wl,e.CollisionBoxArray=ye,e.Color=$t,e.DEMData=Zs,e.DataConstantProperty=ua,e.DictionaryCoder=Hc,e.EXTENT=8192,e.ErrorEvent=Ie,e.EvaluationParameters=ai,e.Event=Ce,e.Evented=Te,e.FeatureIndex=Xs,e.FillBucket=Cs,e.FillExtrusionBucket=Ps,e.ImageAtlas=hc,e.ImagePosition=zc,e.LineBucket=Ko,e.LngLat=Ei,e.LngLatBounds=oo,e.MercatorCoordinate=_l,e.ONE_EM=24,e.OverscaledTileID=so,e.Point=r,e.Point$1=r,e.Properties=Io,e.Protobuf=Ic,e.RGBAImage=Jo,e.RequestManager=ne,e.RequestPerformance=th,e.ResourceType=mt,e.SegmentVector=Rt,e.SourceFeatureState=Vl,e.StructArrayLayout1ui2=q,e.StructArrayLayout2f1f2i16=el,e.StructArrayLayout2i4=ss,e.StructArrayLayout3ui6=ao,e.StructArrayLayout4i8=Ii,e.SymbolBucket=ci,e.Texture=bl,e.Tile=To,e.Transitionable=es,e.Uniform1f=Hr,e.Uniform1i=fa,e.Uniform2f=Tn,e.Uniform3f=Xn,e.Uniform4f=Gn,e.UniformColor=aa,e.UniformMatrix4f=Ea,e.UnwrappedTileID=Qf,e.ValidationError=Ve,e.WritingMode=cs,e.ZoomHistory=Ca,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=Pu,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(Ae,Re){O(Ae,function(Ze,lt){Ze&&(ve=Ze),he[Re]=lt,--ae==0&&Y(ve,he)})})},e.bezier=l,e.bindAll=c,e.browser=N,e.cacheEntryPossiblyAdded=function(M){++et>je&&(M.getActor().send("enforceCacheSizeLimit",De),et=0)},e.clamp=u,e.clearTileCache=function(M){var O=self.caches.delete("mapbox-tiles");M&&O.catch(M).then(function(){return M()})},e.clipLine=Rf,e.clone=function(M){var O=new Xo(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 Xo(3);return O[0]=M[0],O[1]=M[1],O[2]=M[2],O},e.collisionCircleLayout=hp,e.config=U,e.create=function(){var M=new Xo(16);return Xo!=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 Xo(9);return Xo!=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 Xo(4);return Xo!=Float32Array&&(M[1]=0,M[2]=0),M[0]=1,M[3]=1,M},e.createCommonjsModule=n,e.createExpression=Yt,e.createLayout=ii,e.createStyleLayer=function(M){return M.type==="custom"?new qp(M):new Gp[M.type](M)},e.cross=function(M,O,Y){var ae=O[0],he=O[1],ve=O[2],Ae=Y[0],Re=Y[1],Ze=Y[2];return M[0]=he*Ze-ve*Re,M[1]=ve*Ae-ae*Ze,M[2]=ae*Re-he*Ae,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=a,e.emitValidationErrors=_n,e.endsWith=T,e.enforceCacheSizeLimit=function(M){Je(),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=Cf,e.evaluateSizeForZoom=Pf,e.evaluateVariableOffset=Nf,e.evented=Mi,e.extend=o,e.featureFilter=Aa,e.filterObject=w,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=Su,e.getAnchorJustification=Cu,e.getArrayBuffer=Et,e.getImage=qe,e.getJSON=function(M,O){return Qe(o(M,{type:"json"}),O)},e.getRTLTextPluginStatus=Yi,e.getReferrer=Tt,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 Ae=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"),Ae.src=M[ve],he.appendChild(Ae)}return{cancel:function(){}}},e.identity=rc,e.invert=function(M,O){var Y=O[0],ae=O[1],he=O[2],ve=O[3],Ae=O[4],Re=O[5],Ze=O[6],lt=O[7],pt=O[8],Ft=O[9],Wt=O[10],qt=O[11],nr=O[12],dr=O[13],Ar=O[14],Mr=O[15],Nr=Y*Re-ae*Ae,jr=Y*Ze-he*Ae,Yr=Y*lt-ve*Ae,fn=ae*Ze-he*Re,yn=ae*lt-ve*Re,Bn=he*lt-ve*Ze,Rn=pt*dr-Ft*nr,Yn=pt*Ar-Wt*nr,oa=pt*Mr-qt*nr,sa=Ft*Ar-Wt*dr,Qn=Ft*Mr-qt*dr,da=Wt*Mr-qt*Ar,ha=Nr*da-jr*Qn+Yr*sa+fn*oa-yn*Yn+Bn*Rn;return ha?(ha=1/ha,M[0]=(Re*da-Ze*Qn+lt*sa)*ha,M[1]=(he*Qn-ae*da-ve*sa)*ha,M[2]=(dr*Bn-Ar*yn+Mr*fn)*ha,M[3]=(Wt*yn-Ft*Bn-qt*fn)*ha,M[4]=(Ze*oa-Ae*da-lt*Yn)*ha,M[5]=(Y*da-he*oa+ve*Yn)*ha,M[6]=(Ar*Yr-nr*Bn-Mr*jr)*ha,M[7]=(pt*Bn-Wt*Yr+qt*jr)*ha,M[8]=(Ae*Qn-Re*oa+lt*Rn)*ha,M[9]=(ae*oa-Y*Qn-ve*Rn)*ha,M[10]=(nr*yn-dr*Yr+Mr*Nr)*ha,M[11]=(Ft*Yr-pt*yn-qt*Nr)*ha,M[12]=(Re*Yn-Ae*sa-Ze*Rn)*ha,M[13]=(Y*sa-ae*Yn+he*Rn)*ha,M[14]=(dr*jr-nr*fn-Ar*Nr)*ha,M[15]=(pt*fn-Ft*jr+Wt*Nr)*ha,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=Qe,e.mapObject=_,e.mercatorXfromLng=Xf,e.mercatorYfromLat=Jf,e.mercatorZfromAltitude=Kf,e.mul=pu,e.multiply=yl,e.mvt=Il,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=bn,e.offscreenCanvasSupported=ct,e.ortho=function(M,O,Y,ae,he,ve,Ae){var Re=1/(O-Y),Ze=1/(ae-he),lt=1/(ve-Ae);return M[0]=-2*Re,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*Ze,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=2*lt,M[11]=0,M[12]=(O+Y)*Re,M[13]=(he+ae)*Ze,M[14]=(Ae+ve)*lt,M[15]=1,M},e.parseGlyphPBF=function(M){return new Ic(M).readFields(Tp,[])},e.pbf=Ic,e.performSymbolLayout=function(M,O,Y,ae,he,ve,Ae){M.createArrays();var Re=512*M.overscaling;M.tilePixelRatio=8192/Re,M.compareText={},M.iconsNeedLinear=!1;var Ze=M.layers[0].layout,lt=M.layers[0]._unevaluatedLayout._values,pt={};if(M.textSizeData.kind==="composite"){var Ft=M.textSizeData,Wt=Ft.minZoom,qt=Ft.maxZoom;pt.compositeTextSizes=[lt["text-size"].possiblyEvaluate(new ai(Wt),Ae),lt["text-size"].possiblyEvaluate(new ai(qt),Ae)]}if(M.iconSizeData.kind==="composite"){var nr=M.iconSizeData,dr=nr.minZoom,Ar=nr.maxZoom;pt.compositeIconSizes=[lt["icon-size"].possiblyEvaluate(new ai(dr),Ae),lt["icon-size"].possiblyEvaluate(new ai(Ar),Ae)]}pt.layoutTextSize=lt["text-size"].possiblyEvaluate(new ai(M.zoom+1),Ae),pt.layoutIconSize=lt["icon-size"].possiblyEvaluate(new ai(M.zoom+1),Ae),pt.textMaxSize=lt["text-size"].possiblyEvaluate(new ai(18));for(var Mr=24*Ze.get("text-line-height"),Nr=Ze.get("text-rotation-alignment")==="map"&&Ze.get("symbol-placement")!=="point",jr=Ze.get("text-keep-upright"),Yr=Ze.get("text-size"),fn=function(){var Rn=Bn[yn],Yn=Ze.get("text-font").evaluate(Rn,{},Ae).join(","),oa=Yr.evaluate(Rn,{},Ae),sa=pt.layoutTextSize.evaluate(Rn,{},Ae),Qn=pt.layoutIconSize.evaluate(Rn,{},Ae),da={horizontal:{},vertical:void 0},ha=Rn.text,la=[0,0];if(ha){var Qa=ha.toString(),Ha=24*Ze.get("text-letter-spacing").evaluate(Rn,{},Ae),ti=function(Fa){for(var $a=0,Vi=Fa;$a<Vi.length;
94$a+=1)if(!La(Vi[$a].charCodeAt(0)))return!1;return!0}(Qa)?Ha:0,wa=Ze.get("text-anchor").evaluate(Rn,{},Ae),Ga=Ze.get("text-variable-anchor");if(!Ga){var bi=Ze.get("text-radial-offset").evaluate(Rn,{},Ae);la=bi?Nf(wa,[24*bi,Lu]):Ze.get("text-offset").evaluate(Rn,{},Ae).map(function(Fa){return 24*Fa})}var hi=Nr?"center":Ze.get("text-justify").evaluate(Rn,{},Ae),Li=Ze.get("symbol-placement"),pi=Li==="point"?24*Ze.get("text-max-width").evaluate(Rn,{},Ae):0,lo=function(){M.allowVerticalPlacement&&Da(Qa)&&(da.vertical=Dc(ha,O,Y,he,Yn,pi,Mr,wa,"left",ti,la,cs.vertical,!0,Li,sa,oa))};if(!Nr&&Ga){for(var Ci=hi==="auto"?Ga.map(function(Fa){return Cu(Fa)}):[hi],Do=!1,ko=0;ko<Ci.length;ko++){var So=Ci[ko];if(!da.horizontal[So])if(Do)da.horizontal[So]=da.horizontal[0];else{var Yo=Dc(ha,O,Y,he,Yn,pi,Mr,"center",So,ti,la,cs.horizontal,!1,Li,sa,oa);Yo&&(da.horizontal[So]=Yo,Do=Yo.positionedLines.length===1)}}lo()}else{hi==="auto"&&(hi=Cu(wa));var No=Dc(ha,O,Y,he,Yn,pi,Mr,wa,hi,ti,la,cs.horizontal,!1,Li,sa,oa);No&&(da.horizontal[hi]=No),lo(),Da(Qa)&&Nr&&jr&&(da.vertical=Dc(ha,O,Y,he,Yn,pi,Mr,wa,hi,ti,la,cs.vertical,!1,Li,sa,oa))}}var co=void 0,Eo=!1;if(Rn.icon&&Rn.icon.name){var Ji=ae[Rn.icon.name];Ji&&(co=function(Fa,$a,Vi){var Hi=Su(Vi),Bi=Hi.horizontalAlign,Pi=Hi.verticalAlign,oi=$a[0],qi=$a[1],Wo=oi-Fa.displaySize[0]*Bi,is=Wo+Fa.displaySize[0],jo=qi-Fa.displaySize[1]*Pi;return{image:Fa,top:jo,bottom:jo+Fa.displaySize[1],left:Wo,right:is}}(he[Rn.icon.name],Ze.get("icon-offset").evaluate(Rn,{},Ae),Ze.get("icon-anchor").evaluate(Rn,{},Ae)),Eo=Ji.sdf,M.sdfIcons===void 0?M.sdfIcons=Ji.sdf:M.sdfIcons!==Ji.sdf&&A("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Ji.pixelRatio!==M.pixelRatio||Ze.get("icon-rotate").constantOr(1)!==0)&&(M.iconsNeedLinear=!0))}var mo=Uf(da.horizontal)||da.vertical;M.iconsInText=!!mo&&mo.iconsInText,(mo||co)&&function(Fa,$a,Vi,Hi,Bi,Pi,oi,qi,Wo,is,jo){var Is=Pi.textMaxSize.evaluate($a,{});Is===void 0&&(Is=oi);var Js,Mo=Fa.layers[0].layout,Os=Mo.get("icon-offset").evaluate($a,{},jo),zs=Uf(Vi.horizontal),Ds=oi/24,Ru=Fa.tilePixelRatio*Ds,Hl=Fa.tilePixelRatio*Is/24,Gc=Fa.tilePixelRatio*qi,Tl=Fa.tilePixelRatio*Mo.get("symbol-spacing"),Yc=Mo.get("text-padding")*Fa.tilePixelRatio,Wc=Mo.get("icon-padding")*Fa.tilePixelRatio,Zc=Mo.get("text-max-angle")/180*Math.PI,Xc=Mo.get("text-rotation-alignment")==="map"&&Mo.get("symbol-placement")!=="point",il=Mo.get("icon-rotation-alignment")==="map"&&Mo.get("symbol-placement")!=="point",ql=Mo.get("symbol-placement"),Jc=Tl/2,Gl=Mo.get("icon-text-fit");Hi&&Gl!=="none"&&(Fa.allowVerticalPlacement&&Vi.vertical&&(Js=Lf(Hi,Vi.vertical,Gl,Mo.get("icon-text-fit-padding"),Os,Ds)),zs&&(Hi=Lf(Hi,zs,Gl,Mo.get("icon-text-fit-padding"),Os,Ds)));var ol=function(Zp,bc){bc.x<0||bc.x>=8192||bc.y<0||bc.y>=8192||function(Zi,Rs,Xp,sl,Uu,ih,au,Vs,iu,_c,ou,su,Vu,oh,wc,sh,lh,ch,uh,fh,us,lu,hh,Hs,Jp){var Hu,kl,Kl,Ql,$l,ec=Zi.addToLineVertexArray(Rs,Xp),ph=0,dh=0,mh=0,gh=0,qu=-1,Gu=-1,Ks={},vh=kr(""),Yu=0,Wu=0;if(Vs._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Hu=Vs.layout.get("text-offset").evaluate(us,{},Hs).map(function(kc){return 24*kc}),Yu=Hu[0],Wu=Hu[1]):(Yu=24*Vs.layout.get("text-radial-offset").evaluate(us,{},Hs),Wu=Lu),Zi.allowVerticalPlacement&&sl.vertical){var yh=Vs.layout.get("text-rotate").evaluate(us,{},Hs)+90,Kp=sl.vertical;Ql=new jc(iu,Rs,_c,ou,su,Kp,Vu,oh,wc,yh),au&&($l=new jc(iu,Rs,_c,ou,su,au,lh,ch,wc,yh))}if(Uu){var Zu=Vs.layout.get("icon-rotate").evaluate(us,{}),xh=Vs.layout.get("icon-text-fit")!=="none",bh=Ff(Uu,Zu,hh,xh),Xu=au?Ff(au,Zu,hh,xh):void 0;Kl=new jc(iu,Rs,_c,ou,su,Uu,lh,ch,!1,Zu),ph=4*bh.length;var _h=Zi.iconSizeData,Tc=null;_h.kind==="source"?(Tc=[128*Vs.layout.get("icon-size").evaluate(us,{})])[0]>32640&&A(Zi.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):_h.kind==="composite"&&((Tc=[128*lu.compositeIconSizes[0].evaluate(us,{},Hs),128*lu.compositeIconSizes[1].evaluate(us,{},Hs)])[0]>32640||Tc[1]>32640)&&A(Zi.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Zi.addSymbols(Zi.icon,bh,Tc,fh,uh,us,!1,Rs,ec.lineStartIndex,ec.lineLength,-1,Hs),qu=Zi.icon.placedSymbolArray.length-1,Xu&&(dh=4*Xu.length,Zi.addSymbols(Zi.icon,Xu,Tc,fh,uh,us,cs.vertical,Rs,ec.lineStartIndex,ec.lineLength,-1,Hs),Gu=Zi.icon.placedSymbolArray.length-1)}for(var wh in sl.horizontal){var cu=sl.horizontal[wh];if(!kl){vh=kr(cu.text);var Qp=Vs.layout.get("text-rotate").evaluate(us,{},Hs);kl=new jc(iu,Rs,_c,ou,su,cu,Vu,oh,wc,Qp)}var Th=cu.positionedLines.length===1;if(mh+=jf(Zi,Rs,cu,ih,Vs,wc,us,sh,ec,sl.vertical?cs.horizontal:cs.horizontalOnly,Th?Object.keys(sl.horizontal):[wh],Ks,qu,lu,Hs),Th)break}sl.vertical&&(gh+=jf(Zi,Rs,sl.vertical,ih,Vs,wc,us,sh,ec,cs.vertical,["vertical"],Ks,Gu,lu,Hs));var $p=kl?kl.boxStartIndex:Zi.collisionBoxArray.length,ed=kl?kl.boxEndIndex:Zi.collisionBoxArray.length,td=Ql?Ql.boxStartIndex:Zi.collisionBoxArray.length,rd=Ql?Ql.boxEndIndex:Zi.collisionBoxArray.length,nd=Kl?Kl.boxStartIndex:Zi.collisionBoxArray.length,ad=Kl?Kl.boxEndIndex:Zi.collisionBoxArray.length,id=$l?$l.boxStartIndex:Zi.collisionBoxArray.length,od=$l?$l.boxEndIndex:Zi.collisionBoxArray.length,qs=-1,uu=function(kc,Mh){return kc&&kc.circleDiameter?Math.max(kc.circleDiameter,Mh):Mh};qs=uu(kl,qs),qs=uu(Ql,qs),qs=uu(Kl,qs);var kh=(qs=uu($l,qs))>-1?1:0;kh&&(qs*=Jp/24),Zi.glyphOffsetArray.length>=ci.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),us.sortKey!==void 0&&Zi.addToSortKey
vendor: 4,531 bytes, line 94
94Ranges(Zi.symbolInstances.length,us.sortKey),Zi.symbolInstances.emplaceBack(Rs.x,Rs.y,Ks.right>=0?Ks.right:-1,Ks.center>=0?Ks.center:-1,Ks.left>=0?Ks.left:-1,Ks.vertical||-1,qu,Gu,vh,$p,ed,td,rd,nd,ad,id,od,_c,mh,gh,ph,dh,kh,0,Vu,Yu,Wu,qs)}(Fa,bc,Zp,Vi,Hi,Bi,Js,Fa.layers[0],Fa.collisionBoxArray,$a.index,$a.sourceLayerIndex,Fa.index,Ru,Yc,Xc,Wo,Gc,Wc,il,Os,$a,Pi,is,jo,oi)};if(ql==="line")for(var mc=0,Kc=Rf($a.geometry,0,0,8192,8192);mc<Kc.length;mc+=1)for(var Qc=Kc[mc],$c=Cp(Qc,Tl,Zc,Vi.vertical||zs,Hi,24,Hl,Fa.overscaling,8192),gc=0,eu=$c;gc<eu.length;gc+=1){var vc=eu[gc],tu=zs;tu&&zp(Fa,tu.text,Jc,vc)||ol(Qc,vc)}else if(ql==="line-center")for(var yc=0,ru=$a.geometry;yc<ru.length;yc+=1){var Yl=ru[yc];if(Yl.length>1){var Wl=Lp(Yl,Zc,Vi.vertical||zs,Hi,24,Hl);Wl&&ol(Yl,Wl)}}else if($a.type==="Polygon")for(var Zl=0,nu=_u($a.geometry,0);Zl<nu.length;Zl+=1){var Xl=nu[Zl],xc=Ip(Xl,16);ol(Xl[0],new Rl(xc.x,xc.y,0))}else if($a.type==="LineString")for(var Jl=0,rh=$a.geometry;Jl<rh.length;Jl+=1){var Fu=rh[Jl];ol(Fu,new Rl(Fu[0].x,Fu[0].y,0))}else if($a.type==="Point")for(var Bu=0,nh=$a.geometry;Bu<nh.length;Bu+=1)for(var Wp=nh[Bu],Nu=0,ah=Wp;Nu<ah.length;Nu+=1){var ju=ah[Nu];ol([ju],new Rl(ju.x,ju.y,0))}}(M,Rn,da,co,ae,pt,sa,Qn,la,Eo,Ae)},yn=0,Bn=M.features;yn<Bn.length;yn+=1)fn();ve&&M.generateCollisionDebugBuffers()},e.perspective=function(M,O,Y,ae,he){var ve,Ae=1/Math.tan(O/2);return M[0]=Ae/Y,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=Ae,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=po,e.polygonIntersectsPolygon=Fo,e.postMapLoadEvent=Oe,e.postTurnstileEvent=be,e.potpack=Mf,e.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],e.register=Jr,e.registerForPluginStateChange=function(M){return M({pluginStatus:ya,pluginURL:vi}),Mi.on("pluginStateChange",M),M},e.rotate=function(M,O,Y){var ae=O[0],he=O[1],ve=O[2],Ae=O[3],Re=Math.sin(Y),Ze=Math.cos(Y);return M[0]=ae*Ze+ve*Re,M[1]=he*Ze+Ae*Re,M[2]=ae*-Re+ve*Ze,M[3]=he*-Re+Ae*Ze,M},e.rotateX=function(M,O,Y){var ae=Math.sin(Y),he=Math.cos(Y),ve=O[4],Ae=O[5],Re=O[6],Ze=O[7],lt=O[8],pt=O[9],Ft=O[10],Wt=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+lt*ae,M[5]=Ae*he+pt*ae,M[6]=Re*he+Ft*ae,M[7]=Ze*he+Wt*ae,M[8]=lt*he-ve*ae,M[9]=pt*he-Ae*ae,M[10]=Ft*he-Re*ae,M[11]=Wt*he-Ze*ae,M},e.rotateZ=function(M,O,Y){var ae=Math.sin(Y),he=Math.cos(Y),ve=O[0],Ae=O[1],Re=O[2],Ze=O[3],lt=O[4],pt=O[5],Ft=O[6],Wt=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+lt*ae,M[1]=Ae*he+pt*ae,M[2]=Re*he+Ft*ae,M[3]=Ze*he+Wt*ae,M[4]=lt*he-ve*ae,M[5]=pt*he-Ae*ae,M[6]=Ft*he-Re*ae,M[7]=Wt*he-Ze*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,je=O},e.setRTLTextPlugin=function(M,O,Y){if(Y===void 0&&(Y=!1),ya===Xa||ya===Ui||ya===Zo)throw new Error("setRTLTextPlugin cannot be called multiple times.");vi=N.resolveURL(M),ya=Xa,xo=O,Ja(),Y||ni()},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=nc,e.styleSpec=Pe,e.sub=du,e.symbolSize=Ep,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=Ll,e.translate=function(M,O,Y){var ae,he,ve,Ae,Re,Ze,lt,pt,Ft,Wt,qt,nr,dr=Y[0],Ar=Y[1],Mr=Y[2];return O===M?(M[12]=O[0]*dr+O[4]*Ar+O[8]*Mr+O[12],M[13]=O[1]*dr+O[5]*Ar+O[9]*Mr+O[13],M[14]=O[2]*dr+O[6]*Ar+O[10]*Mr+O[14],M[15]=O[3]*dr+O[7]*Ar+O[11]*Mr+O[15]):(ae=O[0],he=O[1],ve=O[2],Ae=O[3],Re=O[4],Ze=O[5],lt=O[6],pt=O[7],Ft=O[8],Wt=O[9],qt=O[10],nr=O[11],M[0]=ae,M[1]=he,M[2]=ve,M[3]=Ae,M[4]=Re,M[5]=Ze,M[6]=lt,M[7]=pt,M[8]=Ft,M[9]=Wt,M[10]=qt,M[11]=nr,M[12]=ae*dr+Re*Ar+Ft*Mr+O[12],M[13]=he*dr+Ze*Ar+Wt*Mr+O[13],M[14]=ve*dr
94+lt*Ar+qt*Mr+O[14],M[15]=Ae*dr+pt*Ar+nr*Mr+O[15]),M},e.triggerPluginCompletionEvent=bo,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=cn,e.validateStyle=Zr,e.values=function(M){var O=[];for(var Y in M)O.push(M[Y]);return O},e.vectorTile=Il,e.version="1.10.1",e.warnOnce=A,e.webpSupported=ee,e.window=self,e.wrap=f}),y(0,function(e){function n(Ce){var Ie=typeof Ce;if(Ie==="number"||Ie==="boolean"||Ie==="string"||Ce==null)return JSON.stringify(Ce);if(Array.isArray(Ce)){for(var Te="[",Pe=0,Ve=Ce;Pe<Ve.length;Pe+=1)Te+=n(Ve[Pe])+",";return Te+"]"}for(var tt=Object.keys(Ce).sort(),ot="{",at=0;at<tt.length;at++)ot+=JSON.stringify(tt[at])+":"+n(Ce[tt[at]])+",";return ot+"}"}function t(Ce){for(var Ie="",Te=0,Pe=e.refProperties;Te<Pe.length;Te+=1)Ie+="/"+n(Ce[Pe[Te]]);return Ie}var i=function(Ce){this.keyCache={},Ce&&this.replace(Ce)};i.prototype.replace=function(Ce){this._layerConfigs={},this._layers={},this.update(Ce,[])},i.prototype.update=function(Ce,Ie){for(var Te=this,Pe=0,Ve=Ce;Pe<Ve.length;Pe+=1){var tt=Ve[Pe];this._layerConfigs[tt.id]=tt;var ot=this._layers[tt.id]=e.createStyleLayer(tt);ot._featureFilter=e.featureFilter(ot.filter),this.keyCache[tt.id]&&delete this.keyCache[tt.id]}for(var at=0,_t=Ie;at<_t.length;at+=1){var bt=_t[at];delete this.keyCache[bt],delete this._layerConfigs[bt],delete this._layers[bt]}this.familiesBySource={};for(var jt=0,Nt=function(Xe,it){for(var At={},It=0;It<Xe.length;It++){var Zt=it&&it[Xe[It].id]||t(Xe[It]);it&&(it[Xe[It].id]=Zt);var Jt=At[Zt];Jt||(Jt=At[Zt]=[]),Jt.push(Xe[It])}var Vt=[];for(var pr in At)Vt.push(At[pr]);return Vt}(e.values(this._layerConfigs),this.keyCache);jt<Nt.length;jt+=1){var $e=Nt[jt].map(function(Xe){return Te._layers[Xe.id]}),yt=$e[0];if(yt.visibility!=="none"){var Ot=yt.source||"",Mt=this.familiesBySource[Ot];Mt||(Mt=this.familiesBySource[Ot]={});var Pt=yt.sourceLayer||"_geojsonTileLayer",Le=Mt[Pt];Le||(Le=Mt[Pt]=[]),Le.push($e)}}};var r=function(Ce){var Ie={},Te=[];for(var Pe in Ce){var Ve=Ce[Pe],tt=Ie[Pe]={};for(var ot in Ve){var at=Ve[+ot];if(at&&at.bitmap.width!==0&&at.bitmap.height!==0){var _t={x:0,y:0,w:at.bitmap.width+2,h:at.bitmap.height+2};Te.push(_t),tt[ot]={rect:_t,metrics:at.metrics}}}}var bt=e.potpack(Te),jt=bt.w,Nt=bt.h,$e=new e.AlphaImage({width:jt||1,height:Nt||1});for(var yt in Ce){var Ot=Ce[yt];for(var Mt in Ot){var Pt=Ot[+Mt];if(Pt&&Pt.bitmap.width!==0&&Pt.bitmap.height!==0){var Le=Ie[yt][Mt].rect;e.AlphaImage.copy(Pt.bitmap,$e,{x:0,y:0},{x:Le.x+1,y:Le.y+1},Pt.bitmap)}}}this.image=$e,this.positions=Ie};e.register("GlyphAtlas",r);var d=function(Ce){this.tileID=new e.OverscaledTileID(Ce.tileID.overscaledZ,Ce.tileID.wrap,Ce.tileID.canonical.z,Ce.tileID.canonical.x,Ce.tileID.canonical.y),this.uid=Ce.uid,this.zoom=Ce.zoom,this.pixelRatio=Ce.pixelRatio,this.tileSize=Ce.tileSize,this.source=Ce.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ce.showCollisionBoxes,this.collectResourceTiming=!!Ce.collectResourceTiming,this.returnDependencies=!!Ce.returnDependencies,this.promoteId=Ce.promoteId};function l(Ce,Ie,Te){for(var Pe=new e.EvaluationParameters(Ie),Ve=0,tt=Ce;Ve<tt.length;Ve+=1)tt[Ve].recalculate(Pe,Te)}function a(Ce,Ie){var Te=e.getArrayBuffer(Ce.request,function(Pe,Ve,tt,ot){Pe?Ie(Pe):Ve&&Ie(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(Ve)),rawData:Ve,cac
94heControl:tt,expires:ot})});return function(){Te.cancel(),Ie()}}d.prototype.parse=function(Ce,Ie,Te,Pe,Ve){var tt=this;this.status="parsing",this.data=Ce,this.collisionBoxArray=new e.CollisionBoxArray;var ot=new e.DictionaryCoder(Object.keys(Ce.layers).sort()),at=new e.FeatureIndex(this.tileID,this.promoteId);at.bucketLayerIDs=[];var _t,bt,jt,Nt,$e={},yt={featureIndex:at,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Te},Ot=Ie.familiesBySource[this.source];for(var Mt in Ot){var Pt=Ce.layers[Mt];if(Pt){Pt.version===1&&e.warnOnce('Vector tile source "'+this.source+'" layer "'+Mt+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Le=ot.encode(Mt),Xe=[],it=0;it<Pt.length;it++){var At=Pt.feature(it),It=at.getId(At,Mt);Xe.push({feature:At,id:It,index:it,sourceLayerIndex:Le})}for(var Zt=0,Jt=Ot[Mt];Zt<Jt.length;Zt+=1){var Vt=Jt[Zt],pr=Vt[0];pr.minzoom&&this.zoom<Math.floor(pr.minzoom)||pr.maxzoom&&this.zoom>=pr.maxzoom||pr.visibility!=="none"&&(l(Vt,this.zoom,Te),($e[pr.id]=pr.createBucket({index:at.bucketLayerIDs.length,layers:Vt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Le,sourceID:this.source})).populate(Xe,yt,this.tileID.canonical),at.bucketLayerIDs.push(Vt.map(function(ar){return ar.id})))}}}var Ir=e.mapObject(yt.glyphDependencies,function(ar){return Object.keys(ar).map(Number)});Object.keys(Ir).length?Pe.send("getGlyphs",{uid:this.uid,stacks:Ir},function(ar,hr){_t||(_t=ar,bt=hr,er.call(tt))}):bt={};var fr=Object.keys(yt.iconDependencies);fr.length?Pe.send("getImages",{icons:fr,source:this.source,tileID:this.tileID,type:"icons"},function(ar,hr){_t||(_t=ar,jt=hr,er.call(tt))}):jt={};var $t=Object.keys(yt.patternDependencies);function er(){if(_t)return Ve(_t);if(bt&&jt&&Nt){var ar=new r(bt),hr=new e.ImageAtlas(jt,Nt);for(var vr in $e){var Pr=$e[vr];Pr instanceof e.SymbolBucket?(l(Pr.layers,this.zoom,Te),e.performSymbolLayout(Pr,bt,ar.positions,jt,hr.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Pr.hasPattern&&(Pr instanceof e.LineBucket||Pr instanceof e.FillBucket||Pr instanceof e.FillExtrusionBucket)&&(l(Pr.layers,this.zoom,Te),Pr.addFeatures(yt,this.tileID.canonical,hr.patternPositions))}this.status="done",Ve(null,{buckets:e.values($e).filter(function(Ur){return!Ur.isEmpty()}),featureIndex:at,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ar.image,imageAtlas:hr,glyphMap:this.returnDependencies?bt:null,iconMap:this.returnDependencies?jt:null,glyphPositions:this.returnDependencies?ar.positions:null})}}$t.length?Pe.send("getImages",{icons:$t,source:this.source,tileID:this.tileID,type:"patterns"},function(ar,hr){_t||(_t=ar,Nt=hr,er.call(tt))}):Nt={},er.call(this)};var u=function(Ce,Ie,Te,Pe){this.actor=Ce,this.layerIndex=Ie,this.availableImages=Te,this.loadVectorData=Pe||a,this.loading={},this.loaded={}};u.prototype.loadTile=function(Ce,Ie){var Te=this,Pe=Ce.uid;this.loading||(this.loading={});var Ve=!!(Ce&&Ce.request&&Ce.request.collectResourceTiming)&&new e.RequestPerformance(Ce.request),tt=this.loading[Pe]=new d(Ce);tt.abort=this.loadVectorData(Ce,function(ot,at){if(delete Te.loading[Pe],ot||!at)return tt.status="done",Te.loaded[Pe]=tt,Ie(ot);var _t=at.rawData,bt={};at.expires&&(bt.expires=at.expires),at.cacheControl&&(bt.cacheControl=at.cacheControl);var jt={};if(Ve){var Nt=Ve.finish();Nt&&(jt.resourceTiming=JSON.parse(JSON.stringify(Nt)))}tt.vectorTile=at.vectorTile,tt.parse(at.vectorTile,Te.layerIndex,Te.availableImages,Te.actor,function($e,yt){if($e||!yt)return Ie($e);Ie(null,e.extend({rawTileData:_t.slice(0)},yt,bt,jt))}),Te.loaded=Te.loaded||{},Te.loaded[Pe]=tt})},u.prototype.reloadTile=function(Ce,Ie){var Te=this,Pe=this.loaded,Ve=Ce.uid,tt=this;if(Pe&&Pe[Ve]){var ot=Pe[Ve];ot.showCollisionBoxes=Ce.showCollisionBoxes;var at=function(_t,bt){var jt=ot.reloadCallback;jt&&(delete ot.reloadCallback,ot.parse(ot.vectorTile,tt.layerIndex,Te.availableImages,tt.actor,jt)),Ie(_t,bt)};ot.status==="parsing"?ot.reloadCallback=at:ot.status==="done"&&(ot.vectorTile?ot.parse(ot.vectorTile,this.layerIndex,this.availableImages,this.actor,at):at
vendor: 4,606 bytes, line 94
94())}},u.prototype.abortTile=function(Ce,Ie){var Te=this.loading,Pe=Ce.uid;Te&&Te[Pe]&&Te[Pe].abort&&(Te[Pe].abort(),delete Te[Pe]),Ie()},u.prototype.removeTile=function(Ce,Ie){var Te=this.loaded,Pe=Ce.uid;Te&&Te[Pe]&&delete Te[Pe],Ie()};var f=e.window.ImageBitmap,o=function(){this.loaded={}};o.prototype.loadTile=function(Ce,Ie){var Te=Ce.uid,Pe=Ce.encoding,Ve=Ce.rawImageData,tt=f&&Ve instanceof f?this.getImageData(Ve):Ve,ot=new e.DEMData(Te,tt,Pe);this.loaded=this.loaded||{},this.loaded[Te]=ot,Ie(null,ot)},o.prototype.getImageData=function(Ce){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Ce.width,Ce.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Ce.width,this.offscreenCanvas.height=Ce.height,this.offscreenCanvasContext.drawImage(Ce,0,0,Ce.width,Ce.height);var Ie=this.offscreenCanvasContext.getImageData(-1,-1,Ce.width+2,Ce.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:Ie.width,height:Ie.height},Ie.data)},o.prototype.removeTile=function(Ce){var Ie=this.loaded,Te=Ce.uid;Ie&&Ie[Te]&&delete Ie[Te]};var h=function Ce(Ie,Te){var Pe,Ve=Ie&&Ie.type;if(Ve==="FeatureCollection")for(Pe=0;Pe<Ie.features.length;Pe++)Ce(Ie.features[Pe],Te);else if(Ve==="GeometryCollection")for(Pe=0;Pe<Ie.geometries.length;Pe++)Ce(Ie.geometries[Pe],Te);else if(Ve==="Feature")Ce(Ie.geometry,Te);else if(Ve==="Polygon")p(Ie.coordinates,Te);else if(Ve==="MultiPolygon")for(Pe=0;Pe<Ie.coordinates.length;Pe++)p(Ie.coordinates[Pe],Te);return Ie};function p(Ce,Ie){if(Ce.length!==0){s(Ce[0],Ie);for(var Te=1;Te<Ce.length;Te++)s(Ce[Te],!Ie)}}function s(Ce,Ie){for(var Te=0,Pe=0,Ve=Ce.length,tt=Ve-1;Pe<Ve;tt=Pe++)Te+=(Ce[Pe][0]-Ce[tt][0])*(Ce[tt][1]+Ce[Pe][1]);Te>=0!=!!Ie&&Ce.reverse()}var x=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,c=function(Ce){this._feature=Ce,this.extent=e.EXTENT,this.type=Ce.type,this.properties=Ce.tags,"id"in Ce&&!isNaN(Ce.id)&&(this.id=parseInt(Ce.id,10))};c.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Ce=[],Ie=0,Te=this._feature.geometry;Ie<Te.length;Ie+=1){var Pe=Te[Ie];Ce.push([new e.Point$1(Pe[0],Pe[1])])}return Ce}for(var Ve=[],tt=0,ot=this._feature.geometry;tt<ot.length;tt+=1){for(var at=[],_t=0,bt=ot[tt];_t<bt.length;_t+=1){var jt=bt[_t];at.push(new e.Point$1(jt[0],jt[1]))}Ve.push(at)}return Ve},c.prototype.toGeoJSON=function(Ce,Ie,Te){return x.call(this,Ce,Ie,Te)};var T=function(Ce){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=Ce.length,this._features=Ce};T.prototype.feature=function(Ce){return new c(this._features[Ce])};var _=e.vectorTile.VectorTileFeature,w=k;function k(Ce,Ie){this.options=Ie||{},this.features=Ce,this.length=Ce.length}function L(Ce,Ie){this.id=typeof Ce.id=="number"?Ce.id:void 0,this.type=Ce.type,this.rawGeometry=Ce.type===1?[Ce.geometry]:Ce.geometry,this.properties=Ce.tags,this.extent=Ie||4096}k.prototype.feature=function(Ce){return new L(this.features[Ce],this.options.extent)},L.prototype.loadGeometry=function(){var Ce=this.rawGeometry;this.geometry=[];for(var Ie=0;Ie<Ce.length;Ie++){for(var Te=Ce[Ie],Pe=[],Ve=0;Ve<Te.length;Ve++)Pe.push(new e.Point$1(Te[Ve][0],Te[Ve][1]));this.geometry.push(Pe)}return this.geometry},L.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Ce=this.geometry,Ie=1/0,Te=-1/0,Pe=1/0,Ve=-1/0,tt=0;tt<Ce.length;tt++)for(var ot=Ce[tt],at=0;at<ot.length;at++){var _t=ot[at];Ie=Math.min(Ie,_t.x),Te=Math.max(Te,_t.x),Pe=Math.min(Pe,_t.y),Ve=Math.max(Ve,_t.y)}return[Ie,Pe,Te,Ve]},L.prototype.toGeoJSON=_.prototype.toGeoJSON;var A=E,I=E,P=function(Ce,Ie){Ie=Ie||{};var Te={};for(var Pe in Ce)Te[Pe]=new w(Ce[Pe].features,Ie),Te[Pe].name=Pe,Te[Pe].version=Ie.version,Te[Pe].extent=Ie.extent;return E({layers:Te})},S=w;function E(Ce){var Ie=new e.pbf;return function(Te,Pe){for(var Ve in Te.layers)Pe.writeMessage(3,D,Te.layers[Ve])}(Ce,Ie),Ie.finish()}function D(Ce,Ie){var Te;Ie.writeVarintField(15,Ce.version||1),Ie.writeStringField(1,Ce.name||""),Ie.writeVarintField(5,Ce.extent||4096);var Pe={keys:[],values:[],keycache:{},valuecache:{}};for(Te=0;Te<Ce.length;Te++)Pe.feature=Ce.feature(Te),Ie.writeMessage(2,F,Pe);var Ve=Pe.keys;for(Te=0;Te<Ve.length;Te++)Ie.writeStringField(3,Ve[Te]);var tt=Pe.values;for(Te=0;Te<tt.length;Te++)Ie.writeMessage(4,G,tt[Te])}function F(Ce,Ie){var Te=Ce.feature;Te.id!==void 0&&Ie.writeVarintField(1,Te.id),Ie.writeMessage(2,H,Ce),Ie.writeVarintField(3,Te.type),Ie.writeMessage(4,K,Te)}
94function H(Ce,Ie){var Te=Ce.feature,Pe=Ce.keys,Ve=Ce.values,tt=Ce.keycache,ot=Ce.valuecache;for(var at in Te.properties){var _t=tt[at];_t===void 0&&(Pe.push(at),_t=Pe.length-1,tt[at]=_t),Ie.writeVarint(_t);var bt=Te.properties[at],jt=typeof bt;jt!=="string"&&jt!=="boolean"&&jt!=="number"&&(bt=JSON.stringify(bt));var Nt=jt+":"+bt,$e=ot[Nt];$e===void 0&&(Ve.push(bt),$e=Ve.length-1,ot[Nt]=$e),Ie.writeVarint($e)}}function V(Ce,Ie){return(Ie<<3)+(7&Ce)}function Z(Ce){return Ce<<1^Ce>>31}function K(Ce,Ie){for(var Te=Ce.loadGeometry(),Pe=Ce.type,Ve=0,tt=0,ot=Te.length,at=0;at<ot;at++){var _t=Te[at],bt=1;Pe===1&&(bt=_t.length),Ie.writeVarint(V(1,bt));for(var jt=Pe===3?_t.length-1:_t.length,Nt=0;Nt<jt;Nt++){Nt===1&&Pe!==1&&Ie.writeVarint(V(2,jt-1));var $e=_t[Nt].x-Ve,yt=_t[Nt].y-tt;Ie.writeVarint(Z($e)),Ie.writeVarint(Z(yt)),Ve+=$e,tt+=yt}Pe===3&&Ie.writeVarint(V(7,1))}}function G(Ce,Ie){var Te=typeof Ce;Te==="string"?Ie.writeStringField(1,Ce):Te==="boolean"?Ie.writeBooleanField(7,Ce):Te==="number"&&(Ce%1!=0?Ie.writeDoubleField(3,Ce):Ce<0?Ie.writeSVarintField(6,Ce):Ie.writeVarintField(5,Ce))}function W(Ce,Ie,Te,Pe,Ve,tt){if(!(Ve-Pe<=Te)){var ot=Pe+Ve>>1;(function at(_t,bt,jt,Nt,$e,yt){for(;$e>Nt;){if($e-Nt>600){var Ot=$e-Nt+1,Mt=jt-Nt+1,Pt=Math.log(Ot),Le=.5*Math.exp(2*Pt/3),Xe=.5*Math.sqrt(Pt*Le*(Ot-Le)/Ot)*(Mt-Ot/2<0?-1:1),it=Math.max(Nt,Math.floor(jt-Mt*Le/Ot+Xe)),At=Math.min($e,Math.floor(jt+(Ot-Mt)*Le/Ot+Xe));at(_t,bt,jt,it,At,yt)}var It=bt[2*jt+yt],Zt=Nt,Jt=$e;for(Q(_t,bt,Nt,jt),bt[2*$e+yt]>It&&Q(_t,bt,Nt,$e);Zt<Jt;){for(Q(_t,bt,Zt,Jt),Zt++,Jt--;bt[2*Zt+yt]<It;)Zt++;for(;bt[2*Jt+yt]>It;)Jt--}bt[2*Nt+yt]===It?Q(_t,bt,Nt,Jt):(Jt++,Q(_t,bt,Jt,$e)),Jt<=jt&&(Nt=Jt+1),jt<=Jt&&($e=Jt-1)}})(Ce,Ie,ot,Pe,Ve,tt%2),W(Ce,Ie,Te,Pe,ot-1,tt+1),W(Ce,Ie,Te,ot+1,Ve,tt+1)}}function Q(Ce,Ie,Te,Pe){R(Ce,Te,Pe),R(Ie,2*Te,2*Pe),R(Ie,2*Te+1,2*Pe+1)}function R(Ce,Ie,Te){var Pe=Ce[Ie];Ce[Ie]=Ce[Te],Ce[Te]=Pe}
vendor: 5,678 bytes, line 94
94function N(Ce,Ie,Te,Pe){var Ve=Ce-Te,tt=Ie-Pe;return Ve*Ve+tt*tt}A.fromVectorTileJs=I,A.fromGeojsonVt=P,A.GeoJSONWrapper=S;var U=function(Ce){return Ce[0]},ee=function(Ce){return Ce[1]},j=function(Ce,Ie,Te,Pe,Ve){Ie===void 0&&(Ie=U),Te===void 0&&(Te=ee),Pe===void 0&&(Pe=64),Ve===void 0&&(Ve=Float64Array),this.nodeSize=Pe,this.points=Ce;for(var tt=Ce.length<65536?Uint16Array:Uint32Array,ot=this.ids=new tt(Ce.length),at=this.coords=new Ve(2*Ce.length),_t=0;_t<Ce.length;_t++)ot[_t]=_t,at[2*_t]=Ie(Ce[_t]),at[2*_t+1]=Te(Ce[_t]);W(ot,at,Pe,0,ot.length-1,0)};j.prototype.range=function(Ce,Ie,Te,Pe){return function(Ve,tt,ot,at,_t,bt,jt){for(var Nt,$e,yt=[0,Ve.length-1,0],Ot=[];yt.length;){var Mt=yt.pop(),Pt=yt.pop(),Le=yt.pop();if(Pt-Le<=jt)for(var Xe=Le;Xe<=Pt;Xe++)Nt=tt[2*Xe],$e=tt[2*Xe+1],Nt>=ot&&Nt<=_t&&$e>=at&&$e<=bt&&Ot.push(Ve[Xe]);else{var it=Math.floor((Le+Pt)/2);Nt=tt[2*it],$e=tt[2*it+1],Nt>=ot&&Nt<=_t&&$e>=at&&$e<=bt&&Ot.push(Ve[it]);var At=(Mt+1)%2;(Mt===0?ot<=Nt:at<=$e)&&(yt.push(Le),yt.push(it-1),yt.push(At)),(Mt===0?_t>=Nt:bt>=$e)&&(yt.push(it+1),yt.push(Pt),yt.push(At))}}return Ot}(this.ids,this.coords,Ce,Ie,Te,Pe,this.nodeSize)},j.prototype.within=function(Ce,Ie,Te){return function(Pe,Ve,tt,ot,at,_t){for(var bt=[0,Pe.length-1,0],jt=[],Nt=at*at;bt.length;){var $e=bt.pop(),yt=bt.pop(),Ot=bt.pop();if(yt-Ot<=_t)for(var Mt=Ot;Mt<=yt;Mt++)N(Ve[2*Mt],Ve[2*Mt+1],tt,ot)<=Nt&&jt.push(Pe[Mt]);else{var Pt=Math.floor((Ot+yt)/2),Le=Ve[2*Pt],Xe=Ve[2*Pt+1];N(Le,Xe,tt,ot)<=Nt&&jt.push(Pe[Pt]);var it=($e+1)%2;($e===0?tt-at<=Le:ot-at<=Xe)&&(bt.push(Ot),bt.push(Pt-1),bt.push(it)),($e===0?tt+at>=Le:ot+at>=Xe)&&(bt.push(Pt+1),bt.push(yt),bt.push(it))}}return jt}(this.ids,this.coords,Ce,Ie,Te,this.nodeSize)};var X={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Ce){return Ce}},J=function(Ce){this.options=de(Object.create(X),Ce),this.trees=new Array(this.options.maxZoom+1)};function re(Ce,Ie,Te,Pe,Ve){return{x:Ce,y:Ie,zoom:1/0,id:Te,parentId:-1,numPoints:Pe,properties:Ve}}function ne(Ce,Ie){var Te=Ce.geometry.coordinates,Pe=Te[0],Ve=Te[1];return{x:pe(Pe),y:ce(Ve),zoom:1/0,index:Ie,parentId:-1}}function se(Ce){return{type:"Feature",id:Ce.id,properties:oe(Ce),geometry:{type:"Point",coordinates:[(Pe=Ce.x,360*(Pe-.5)),(Ie=Ce.y,Te=(180-360*Ie)*Math.PI/180,360*Math.atan(Math.exp(Te))/Math.PI-90)]}};var Ie,Te,Pe}function oe(Ce){var Ie=Ce.numPoints,Te=Ie>=1e4?Math.round(Ie/1e3)+"k":Ie>=1e3?Math.round(Ie/100)/10+"k":Ie;return de(de({},Ce.properties),{cluster:!0,cluster_id:Ce.id,point_count:Ie,point_count_abbreviated:Te})}function pe(Ce){return Ce/360+.5}function ce(Ce){var Ie=Math.sin(Ce*Math.PI/180),Te=.5-.25*Math.log((1+Ie)/(1-Ie))/Math.PI;return Te<0?0:Te>1?1:Te}function de(Ce,Ie){for(var Te in Ie)Ce[Te]=Ie[Te];return Ce}function xe(Ce){return Ce.x}function _e(Ce){return Ce.y}function we(Ce,Ie,Te,Pe,Ve,tt){var ot=Ve-Te,at=tt-Pe;if(ot!==0||at!==0){var _t=((Ce-Te)*ot+(Ie-Pe)*at)/(ot*ot+at*at);_t>1?(Te=Ve,Pe=tt):_t>0&&(Te+=ot*_t,Pe+=at*_t)}return(ot=Ce-Te)*ot+(at=Ie-Pe)*at}function Ee(Ce,Ie,Te,Pe){var Ve={id:Ce===void 0?null:Ce,type:Ie,geometry:Te,tags:Pe,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(tt){var ot=tt.geometry,at=tt.type;if(at==="Point"||at==="MultiPoint"||at==="LineString")fe(tt,ot);else if(at==="Polygon"||at==="MultiLineString")for(var _t=0;_t<ot.length;_t++)fe(tt,ot[_t]);else if(at==="MultiPolygon")for(_t=0;_t<ot.length;_t++)for(var bt=0;bt<ot[_t].length;bt++)fe(tt,ot[_t][bt])}(Ve),Ve}function fe(Ce,Ie){for(var Te=0;Te<Ie.length;Te+=3)Ce.minX=Math.min(Ce.minX,Ie[Te]),Ce.minY=Math.min(Ce.minY,Ie[Te+1]),Ce.maxX=Math.max(Ce.maxX,Ie[Te]),Ce.maxY=Math.max(Ce.maxY,Ie[Te+1])}function ge(Ce,Ie,Te,Pe){if(Ie.geometry){var Ve=Ie.geometry.coordinates,tt=Ie.geometry.type,ot=Math.pow(Te.tolerance/((1<<Te.maxZoom)*Te.extent),2),at=[],_t=Ie.id;if(Te.promoteId?_t=Ie.properties[Te.promoteId]:Te.generateId&&(_t=Pe||0),tt==="Point")ke(Ve,at);else if(tt==="MultiPoint")for(var bt=0;bt<Ve.length;bt++)ke(Ve[bt],at);else if(tt==="LineString")be(Ve,at,ot,!1);else if(tt==="MultiLineString"){if(Te.lineMetrics){for(bt=0;bt<Ve.length;bt++)at=[],be(Ve[bt],at,ot,!1),Ce.push(Ee(_t,"LineString",at,Ie.properties));return}Se(Ve,at,ot,!1)}else if(tt==="Polygon")Se(Ve,at,ot,!0);else{if(tt!=="MultiPolygon"){if(tt==="GeometryCollection"){for(bt=0;bt<Ie.geometry.geometries.length;bt++)ge(Ce,{id:_t,geometry:Ie.geometry.geometries[bt],properties:Ie.properties},Te,Pe);return}throw new Error("Input data is not a valid GeoJSON object.")}for(bt=0;bt<Ve.length;bt++){var jt=[];Se(Ve[bt],jt,ot,!0),at.push(jt)}}Ce.push(Ee(_t,tt,at,Ie.properties))}}function ke(Ce,Ie){Ie.push(Oe(Ce[0])),Ie.push(De(Ce[1])),Ie.push(0)}function be(Ce,Ie,Te,Pe){for(var Ve,tt,ot=0,at=0;at<Ce.length;at++){var _t=Oe(Ce[at][0]),bt=De(Ce[at][1]);Ie.push(_t),Ie.push(bt),Ie.push(0),at>0&&(ot+=Pe?(Ve*bt-_t*tt)/2:Math.sqrt(Math.pow(_t-Ve,2)+Math.pow(bt-tt,2))),Ve=_t,tt=bt}var jt=Ie.length-3;Ie[2]=1,function Nt($e,yt,Ot,Mt){for(var Pt,Le=Mt,Xe=Ot-yt>>1,it=Ot-yt,At=$e[yt],It=$e[yt+1],Zt=$e[Ot],Jt=$e[Ot+1],Vt=yt+3;Vt<Ot;Vt+=3){var pr=we($e[Vt],$e[Vt+1],At,It,Zt,Jt);if(pr>Le)Pt=Vt,Le=pr;else if(pr===Le){var Ir=Math.abs(Vt-Xe);Ir<it&&(Pt=Vt,it=Ir)}}Le>Mt&&(Pt-yt>3&&Nt($e,yt,Pt,Mt),$e[Pt+2]=Le,Ot-Pt>3&&Nt($e,Pt,Ot,Mt))}(Ie,0,jt,Te),Ie[jt+2]=1,Ie.size=Math.abs(ot),Ie.start=0,Ie.end=Ie.size}function Se(Ce,Ie,Te,Pe){for(var Ve=0;Ve<Ce.length;Ve++){var tt=[];be(Ce[Ve],tt,Te,Pe),Ie.push(tt)}}function Oe(Ce){return Ce/360+.5}function De(Ce){var Ie=Math.sin(Ce*Math.PI/180),Te=.5-.25*Math.log((1+Ie)/(1-Ie))/Math.PI;return Te<0?0:Te>1?1:Te}function je(Ce,Ie,Te,Pe,Ve,tt,ot,at){if(Pe/=Ie,tt>=(Te/=Ie)&&ot<Pe)return Ce;
vendor: 4,570 bytes, line 94
94if(ot<Te||tt>=Pe)return null;for(var _t=[],bt=0;bt<Ce.length;bt++){var jt=Ce[bt],Nt=jt.geometry,$e=jt.type,yt=Ve===0?jt.minX:jt.minY,Ot=Ve===0?jt.maxX:jt.maxY;if(yt>=Te&&Ot<Pe)_t.push(jt);else if(!(Ot<Te||yt>=Pe)){var Mt=[];if($e==="Point"||$e==="MultiPoint")Je(Nt,Mt,Te,Pe,Ve);else if($e==="LineString")ze(Nt,Mt,Te,Pe,Ve,!1,at.lineMetrics);else if($e==="MultiLineString")Ge(Nt,Mt,Te,Pe,Ve,!1);else if($e==="Polygon")Ge(Nt,Mt,Te,Pe,Ve,!0);else if($e==="MultiPolygon")for(var Pt=0;Pt<Nt.length;Pt++){var Le=[];Ge(Nt[Pt],Le,Te,Pe,Ve,!0),Le.length&&Mt.push(Le)}if(Mt.length){if(at.lineMetrics&&$e==="LineString"){for(Pt=0;Pt<Mt.length;Pt++)_t.push(Ee(jt.id,$e,Mt[Pt],jt.tags));continue}$e!=="LineString"&&$e!=="MultiLineString"||(Mt.length===1?($e="LineString",Mt=Mt[0]):$e="MultiLineString"),$e!=="Point"&&$e!=="MultiPoint"||($e=Mt.length===3?"Point":"MultiPoint"),_t.push(Ee(jt.id,$e,Mt,jt.tags))}}}return _t.length?_t:null}function Je(Ce,Ie,Te,Pe,Ve){for(var tt=0;tt<Ce.length;tt+=3){var ot=Ce[tt+Ve];ot>=Te&&ot<=Pe&&(Ie.push(Ce[tt]),Ie.push(Ce[tt+1]),Ie.push(Ce[tt+2]))}}function ze(Ce,Ie,Te,Pe,Ve,tt,ot){for(var at,_t,bt=Ue(Ce),jt=Ve===0?et:ct,Nt=Ce.start,$e=0;$e<Ce.length-3;$e+=3){var yt=Ce[$e],Ot=Ce[$e+1],Mt=Ce[$e+2],Pt=Ce[$e+3],Le=Ce[$e+4],Xe=Ve===0?yt:Ot,it=Ve===0?Pt:Le,At=!1;ot&&(at=Math.sqrt(Math.pow(yt-Pt,2)+Math.pow(Ot-Le,2))),Xe<Te?it>Te&&(_t=jt(bt,yt,Ot,Pt,Le,Te),ot&&(bt.start=Nt+at*_t)):Xe>Pe?it<Pe&&(_t=jt(bt,yt,Ot,Pt,Le,Pe),ot&&(bt.start=Nt+at*_t)):Ye(bt,yt,Ot,Mt),it<Te&&Xe>=Te&&(_t=jt(bt,yt,Ot,Pt,Le,Te),At=!0),it>Pe&&Xe<=Pe&&(_t=jt(bt,yt,Ot,Pt,Le,Pe),At=!0),!tt&&At&&(ot&&(bt.end=Nt+at*_t),Ie.push(bt),bt=Ue(Ce)),ot&&(Nt+=at)}var It=Ce.length-3;yt=Ce[It],Ot=Ce[It+1],Mt=Ce[It+2],(Xe=Ve===0?yt:Ot)>=Te&&Xe<=Pe&&Ye(bt,yt,Ot,Mt),It=bt.length-3,tt&&It>=3&&(bt[It]!==bt[0]||bt[It+1]!==bt[1])&&Ye(bt,bt[0],bt[1],bt[2]),bt.length&&Ie.push(bt)}function Ue(Ce){var Ie=[];return Ie.size=Ce.size,Ie.start=Ce.start,Ie.end=Ce.end,Ie}function Ge(Ce,Ie,Te,Pe,Ve,tt){for(var ot=0;ot<Ce.length;ot++)ze(Ce[ot],Ie,Te,Pe,Ve,tt,!1)}function Ye(Ce,Ie,Te,Pe){Ce.push(Ie),Ce.push(Te),Ce.push(Pe)}function et(Ce,Ie,Te,Pe,Ve,tt){var ot=(tt-Ie)/(Pe-Ie);return Ce.push(tt),Ce.push(Te+(Ve-Te)*ot),Ce.push(1),ot}function ct(Ce,Ie,Te,Pe,Ve,tt){var ot=(tt-Te)/(Ve-Te);return Ce.push(Ie+(Pe-Ie)*ot),Ce.push(tt),Ce.push(1),ot}function mt(Ce,Ie){for(var Te=[],Pe=0;Pe<Ce.length;Pe++){var Ve,tt=Ce[Pe],ot=tt.type;if(ot==="Point"||ot==="MultiPoint"||ot==="LineString")Ve=Ct(tt.geometry,Ie);else if(ot==="MultiLineString"||ot==="Polygon"){Ve=[];for(var at=0;at<tt.geometry.length;at++)Ve.push(Ct(tt.geometry[at],Ie))}else if(ot==="MultiPolygon")for(Ve=[],at=0;at<tt.geometry.length;at++){for(var _t=[],bt=0;bt<tt.geometry[at].length;bt++)_t.push(Ct(tt.geometry[at][bt],Ie));Ve.push(_t)}Te.push(Ee(tt.id,ot,Ve,tt.tags))}return Te}function Ct(Ce,Ie){var Te=[];Te.size=Ce.size,Ce.start!==void 0&&(Te.start=Ce.start,Te.end=Ce.end);for(var Pe=0;Pe<Ce.length;Pe+=3)Te.push(Ce[Pe]+Ie,Ce[Pe+1],Ce[Pe+2]);return Te}function Tt(Ce,Ie){if(Ce.transformed)return Ce;var Te,Pe,Ve,tt=1<<Ce.z,ot=Ce.x,at=Ce.y;for(Te=0;Te<Ce.features.length;Te++){var _t=Ce.features[Te],bt=_t.geometry,jt=_t.type;if(_t.geometry=[],jt===1)for(Pe=0;Pe<bt.length;Pe+=2)_t.geometry.push(nt(bt[Pe],bt[Pe+1],Ie,tt,ot,at));else for(Pe=0;Pe<bt.length;Pe++){var Nt=[];for(Ve=0;Ve<bt[Pe].length;Ve+=2)Nt.push(nt(bt[Pe][Ve],bt[Pe][Ve+1],Ie,tt,ot,at));_t.geometry.push(Nt)}}return Ce.transformed=!0,Ce}function nt(Ce,Ie,Te,Pe,Ve,tt){return[Math.round(Te*(Ce*Pe-Ve)),Math.round(Te*(Ie*Pe-tt))]}function Qe(Ce,Ie,Te,Pe,Ve){for(var tt=Ie===Ve.maxZoom?0:Ve.tolerance/((1<<Ie)*Ve.extent),ot={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:Te,y:Pe,z:Ie,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},at=0;at<Ce.length;at++){ot.numFeatures++,Et(ot,Ce[at],tt,Ve);var _t=Ce[at].minX,bt=Ce[at].minY,jt=Ce[at].maxX,Nt=Ce[at].maxY;_t<ot.minX&&(ot.minX=_t),bt<ot.minY&&(ot.minY=bt),jt>ot.maxX&&(ot.maxX=jt),Nt>ot.maxY&&(ot.maxY=Nt)}return ot}function Et(Ce,Ie,Te,Pe){var Ve=Ie.geometry,tt=Ie.type,ot=[];if(tt==="Point"||tt==="MultiPoint")for(var at=0;at<Ve.length;at+=3)ot.push(Ve[at]),ot.push(Ve[at+1]),Ce.numPoints++,Ce.numSimplified++;else if(tt==="LineString")Gt(ot,Ve,Ce,Te,!1,!1);else if(tt==="MultiLineString"||tt==="Polygon")for(at=0;at<Ve.length;at++)Gt(ot,Ve[at],Ce,Te,tt==="Polygon",at===0);else if(tt==="MultiPolygon")for(var _t=0;_t<Ve.length;_t++){var bt=Ve[_t];for(at=0;at<bt.length;at++)Gt(ot,bt[at],Ce,Te,!0,at===0)}if(ot.length){var jt=Ie.tags||null;if(tt==="LineString"&&Pe.lineMetrics){for(var Nt in jt={}
vendor: 4,347 bytes, line 94
94,Ie.tags)jt[Nt]=Ie.tags[Nt];jt.mapbox_clip_start=Ve.start/Ve.size,jt.mapbox_clip_end=Ve.end/Ve.size}var $e={geometry:ot,type:tt==="Polygon"||tt==="MultiPolygon"?3:tt==="LineString"||tt==="MultiLineString"?2:1,tags:jt};Ie.id!==null&&($e.id=Ie.id),Ce.features.push($e)}}function Gt(Ce,Ie,Te,Pe,Ve,tt){var ot=Pe*Pe;if(Pe>0&&Ie.size<(Ve?ot:Pe))Te.numPoints+=Ie.length/3;else{for(var at=[],_t=0;_t<Ie.length;_t+=3)(Pe===0||Ie[_t+2]>ot)&&(Te.numSimplified++,at.push(Ie[_t]),at.push(Ie[_t+1])),Te.numPoints++;Ve&&function(bt,jt){for(var Nt=0,$e=0,yt=bt.length,Ot=yt-2;$e<yt;Ot=$e,$e+=2)Nt+=(bt[$e]-bt[Ot])*(bt[$e+1]+bt[Ot+1]);if(Nt>0===jt)for($e=0,yt=bt.length;$e<yt/2;$e+=2){var Mt=bt[$e],Pt=bt[$e+1];bt[$e]=bt[yt-2-$e],bt[$e+1]=bt[yt-1-$e],bt[yt-2-$e]=Mt,bt[yt-1-$e]=Pt}}(at,tt),Ce.push(at)}}function Xt(Ce,Ie){var Te=(Ie=this.options=function(Ve,tt){for(var ot in tt)Ve[ot]=tt[ot];return Ve}(Object.create(this.options),Ie)).debug;if(Te&&console.time("preprocess data"),Ie.maxZoom<0||Ie.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Ie.promoteId&&Ie.generateId)throw new Error("promoteId and generateId cannot be used together.");var Pe=function(Ve,tt){var ot=[];if(Ve.type==="FeatureCollection")for(var at=0;at<Ve.features.length;at++)ge(ot,Ve.features[at],tt,at);else Ve.type==="Feature"?ge(ot,Ve,tt):ge(ot,{geometry:Ve},tt);return ot}(Ce,Ie);this.tiles={},this.tileCoords=[],Te&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Ie.indexMaxZoom,Ie.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(Pe=function(Ve,tt){var ot=tt.buffer/tt.extent,at=Ve,_t=je(Ve,1,-1-ot,ot,0,-1,2,tt),bt=je(Ve,1,1-ot,2+ot,0,-1,2,tt);return(_t||bt)&&(at=je(Ve,1,-ot,1+ot,0,-1,2,tt)||[],_t&&(at=mt(_t,1).concat(at)),bt&&(at=at.concat(mt(bt,-1)))),at}(Pe,Ie)).length&&this.splitTile(Pe,0,0,0),Te&&(Pe.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 Fe(Ce,Ie,Te){return 32*((1<<Ce)*Te+Ie)+Ce}function qe(Ce,Ie){var Te=Ce.tileID.canonical;if(!this._geoJSONIndex)return Ie(null,null);var Pe=this._geoJSONIndex.getTile(Te.z,Te.x,Te.y);if(!Pe)return Ie(null,null);var Ve=new T(Pe.features),tt=A(Ve);tt.byteOffset===0&&tt.byteLength===tt.buffer.byteLength||(tt=new Uint8Array(tt)),Ie(null,{vectorTile:Ve,rawData:tt.buffer})}J.prototype.load=function(Ce){var Ie=this.options,Te=Ie.log,Pe=Ie.minZoom,Ve=Ie.maxZoom,tt=Ie.nodeSize;Te&&console.time("total time");var ot="prepare "+Ce.length+" points";Te&&console.time(ot),this.points=Ce;for(var at=[],_t=0;_t<Ce.length;_t++)Ce[_t].geometry&&at.push(ne(Ce[_t],_t));this.trees[Ve+1]=new j(at,xe,_e,tt,Float32Array),Te&&console.timeEnd(ot);for(var bt=Ve;bt>=Pe;bt--){var jt=+Date.now();at=this._cluster(at,bt),this.trees[bt]=new j(at,xe,_e,tt,Float32Array),Te&&console.log("z%d: %d clusters in %dms",bt,at.length,+Date.now()-jt)}return Te&&console.timeEnd("total time"),this},J.prototype.getClusters=function(Ce,Ie){var Te=((Ce[0]+180)%360+360)%360-180,Pe=Math.max(-90,Math.min(90,Ce[1])),Ve=Ce[2]===180?180:((Ce[2]+180)%360+360)%360-180,tt=Math.max(-90,Math.min(90,Ce[3]));if(Ce[2]-Ce[0]>=360)Te=-180,Ve=180;else if(Te>Ve){var ot=this.getClusters([Te,Pe,180,tt],Ie),at=this.getClusters([-180,Pe,Ve,tt],Ie);return ot.concat(at)}for(var _t=this.trees[this._limitZoom(Ie)],bt=[],jt=0,Nt=_t.range(pe(Te),ce(tt),pe(Ve),ce(Pe));jt<Nt.length;jt+=1){var $e=Nt[jt],yt=_t.points[$e];bt.push(yt.numPoints?se(yt):this.points[yt.index])}return bt},J.prototype.getChildren=function(Ce){var Ie=this._getOriginId(Ce),Te=this._getOriginZoom(Ce),Pe="No cluster with the specified id.",Ve=this.trees[Te];if(!Ve)throw new Error(Pe);var tt=Ve.points[Ie];if(!tt)throw new Error(Pe);for(var ot=this.options.radius/(this.options.extent*Math.pow(2,Te-1)),at=[],_t=0,bt=Ve.within(tt.x,tt.y,ot);_t<bt.length;_t+=1){var jt=bt[_t],Nt=Ve.points[jt];Nt.parentId===Ce&&at.push(Nt.numPoints?se(Nt):this.points[Nt.index])}if(at.length===0)throw new Error(Pe);return at},J.prototype.getLeaves=function(Ce,Ie,Te){Ie=Ie||10,Te=Te||0;var Pe=[];return this._appendLeaves(Pe,Ce,Ie,Te,0),Pe},J.prototype.getTile=function(Ce,Ie,Te){var Pe=this.trees[this._limitZoom(Ce)],Ve=Math.pow(2,Ce),tt=this.options,ot=tt.extent,at=tt.radiu
vendor: 9,244 bytes, line 94
94s/ot,_t=(Te-at)/Ve,bt=(Te+1+at)/Ve,jt={features:[]};return this._addTileFeatures(Pe.range((Ie-at)/Ve,_t,(Ie+1+at)/Ve,bt),Pe.points,Ie,Te,Ve,jt),Ie===0&&this._addTileFeatures(Pe.range(1-at/Ve,_t,1,bt),Pe.points,Ve,Te,Ve,jt),Ie===Ve-1&&this._addTileFeatures(Pe.range(0,_t,at/Ve,bt),Pe.points,-1,Te,Ve,jt),jt.features.length?jt:null},J.prototype.getClusterExpansionZoom=function(Ce){for(var Ie=this._getOriginZoom(Ce)-1;Ie<=this.options.maxZoom;){var Te=this.getChildren(Ce);if(Ie++,Te.length!==1)break;Ce=Te[0].properties.cluster_id}return Ie},J.prototype._appendLeaves=function(Ce,Ie,Te,Pe,Ve){for(var tt=0,ot=this.getChildren(Ie);tt<ot.length;tt+=1){var at=ot[tt],_t=at.properties;if(_t&&_t.cluster?Ve+_t.point_count<=Pe?Ve+=_t.point_count:Ve=this._appendLeaves(Ce,_t.cluster_id,Te,Pe,Ve):Ve<Pe?Ve++:Ce.push(at),Ce.length===Te)break}return Ve},J.prototype._addTileFeatures=function(Ce,Ie,Te,Pe,Ve,tt){for(var ot=0,at=Ce;ot<at.length;ot+=1){var _t=Ie[at[ot]],bt=_t.numPoints,jt={type:1,geometry:[[Math.round(this.options.extent*(_t.x*Ve-Te)),Math.round(this.options.extent*(_t.y*Ve-Pe))]],tags:bt?oe(_t):this.points[_t.index].properties},Nt=void 0;bt?Nt=_t.id:this.options.generateId?Nt=_t.index:this.points[_t.index].id&&(Nt=this.points[_t.index].id),Nt!==void 0&&(jt.id=Nt),tt.features.push(jt)}},J.prototype._limitZoom=function(Ce){return Math.max(this.options.minZoom,Math.min(Ce,this.options.maxZoom+1))},J.prototype._cluster=function(Ce,Ie){for(var Te=[],Pe=this.options,Ve=Pe.radius,tt=Pe.extent,ot=Pe.reduce,at=Ve/(tt*Math.pow(2,Ie)),_t=0;_t<Ce.length;_t++){var bt=Ce[_t];if(!(bt.zoom<=Ie)){bt.zoom=Ie;for(var jt=this.trees[Ie+1],Nt=jt.within(bt.x,bt.y,at),$e=bt.numPoints||1,yt=bt.x*$e,Ot=bt.y*$e,Mt=ot&&$e>1?this._map(bt,!0):null,Pt=(_t<<5)+(Ie+1)+this.points.length,Le=0,Xe=Nt;Le<Xe.length;Le+=1){var it=Xe[Le],At=jt.points[it];if(!(At.zoom<=Ie)){At.zoom=Ie;var It=At.numPoints||1;yt+=At.x*It,Ot+=At.y*It,$e+=It,At.parentId=Pt,ot&&(Mt||(Mt=this._map(bt,!0)),ot(Mt,this._map(At)))}}$e===1?Te.push(bt):(bt.parentId=Pt,Te.push(re(yt/$e,Ot/$e,Pt,$e,Mt)))}}return Te},J.prototype._getOriginId=function(Ce){return Ce-this.points.length>>5},J.prototype._getOriginZoom=function(Ce){return(Ce-this.points.length)%32},J.prototype._map=function(Ce,Ie){if(Ce.numPoints)return Ie?de({},Ce.properties):Ce.properties;var Te=this.points[Ce.index].properties,Pe=this.options.map(Te);return Ie&&Pe===Te?de({},Pe):Pe},Xt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Xt.prototype.splitTile=function(Ce,Ie,Te,Pe,Ve,tt,ot){for(var at=[Ce,Ie,Te,Pe],_t=this.options,bt=_t.debug;at.length;){Pe=at.pop(),Te=at.pop(),Ie=at.pop(),Ce=at.pop();var jt=1<<Ie,Nt=Fe(Ie,Te,Pe),$e=this.tiles[Nt];if(!$e&&(bt>1&&console.time("creation"),$e=this.tiles[Nt]=Qe(Ce,Ie,Te,Pe,_t),this.tileCoords.push({z:Ie,x:Te,y:Pe}),bt)){bt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ie,Te,Pe,$e.numFeatures,$e.numPoints,$e.numSimplified),console.timeEnd("creation"));var yt="z"+Ie;this.stats[yt]=(this.stats[yt]||0)+1,this.total++}if($e.source=Ce,Ve){if(Ie===_t.maxZoom||Ie===Ve)continue;var Ot=1<<Ve-Ie;if(Te!==Math.floor(tt/Ot)||Pe!==Math.floor(ot/Ot))continue}else if(Ie===_t.indexMaxZoom||$e.numPoints<=_t.indexMaxPoints)continue;if($e.source=null,Ce.length!==0){bt>1&&console.time("clipping");var Mt,Pt,Le,Xe,it,At,It=.5*_t.buffer/_t.extent,Zt=.5-It,Jt=.5+It,Vt=1+It;Mt=Pt=Le=Xe=null,it=je(Ce,jt,Te-It,Te+Jt,0,$e.minX,$e.maxX,_t),At=je(Ce,jt,Te+Zt,Te+Vt,0,$e.minX,$e.maxX,_t),Ce=null,it&&(Mt=je(it,jt,Pe-It,Pe+Jt,1,$e.minY,$e.maxY,_t),Pt=je(it,jt,Pe+Zt,Pe+Vt,1,$e.minY,$e.maxY,_t),it=null),At&&(Le=je(At,jt,Pe-It,Pe+Jt,1,$e.minY,$e.maxY,_t),Xe=je(At,jt,Pe+Zt,Pe+Vt,1,$e.minY,$e.maxY,_t),At=null),bt>1&&console.timeEnd("clipping"),at.push(Mt||[],Ie+1,2*Te,2*Pe),at.push(Pt||[],Ie+1,2*Te,2*Pe+1),at.push(Le||[],Ie+1,2*Te+1,2*Pe),at.push(Xe||[],Ie+1,2*Te+1,2*Pe+1)}}},Xt.prototype.getTile=function(Ce,Ie,Te){var Pe=this.options,Ve=Pe.extent,tt=Pe.debug;if(Ce<0||Ce>24)return null;var ot=1<<Ce,at=Fe(Ce,Ie=(Ie%ot+ot)%ot,Te);if(this.tiles[at])return Tt(this.tiles[at],Ve);tt>1&&console.log("drilling down to z%d-%d-%d",Ce,Ie,Te);for(var _t,bt=Ce,jt=Ie,Nt=Te;!_t&&bt>0;)bt--,jt=Math.floor(jt/2),Nt=Math.floor(Nt/2),_t=this.tiles[Fe(bt,jt,Nt)];return _t&&_t.source?(tt>1&&console.log("found parent tile z%d-%d-%d",bt,jt,Nt),tt>1&&console.time("drilling down"),this.splitTile(_t.source,bt,jt,Nt,Ce,Ie,Te),tt>1&&console.timeEnd("drilling down"),this.tiles[at]?Tt(this.tiles[at],Ve):null):null};var wt=function(Ce){function Ie(Te,Pe,Ve,tt){Ce.call(this,Te,Pe,Ve,qe),tt&&(this.loadGeoJSON=tt)}return Ce&&(Ie.__proto__=Ce),Ie.prototype=Object.create(Ce&&Ce.prototype),Ie.prototype.constructor=Ie,Ie.prototype.loadData=function(Te,Pe){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Pe,this._pendingLoadDataParams=Te,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Ie.prototype._loadData=function(){var Te=this;if(this._pendingCallback&&this._pendingLoadDataParams){var Pe=this._pendingCallback,Ve=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var tt=!!(Ve&&Ve.request&&Ve.request.collectResourceTiming)&&new e.RequestPerformance(Ve.request);this.loadGeoJSON(Ve,function(ot,at){if(ot||!at)return Pe(ot);if(typeof at!="object")return Pe(new Error("Input data given to '"+Ve.source+"' is not a valid GeoJSON object."));h(at,!0);try{Te._geoJSONIndex=Ve.cluster?new J(function(jt){var Nt=jt.superclusterOptions,$e=jt.clusterProperties;if(!$e||!Nt)return Nt;for(var yt={},Ot={},Mt={accumulated:null,zoom:0},Pt={properties:null},Le=Object.keys($e),Xe=0,it=Le;Xe<it.length;Xe+=1){var At=it[Xe],It=$e[At],Zt=It[0],Jt=It[1],Vt=e.createExpression(Jt),pr=e.createExpression(typeof Zt=="string"?[Zt,["accumulated"],["get",At]]:Zt);yt[At]=Vt.value,Ot[At]=pr.value}return Nt.map=function(Ir){Pt.properties=Ir;for(var fr={},$t=0,er=Le;$t<er.length;$t+=1){var ar=er[$t];fr[ar]=yt[ar].evaluate(Mt,Pt)}return fr},Nt.reduce=function(Ir,fr){Pt.properties=fr;for(var $t=0,er=Le;$t<er.length;$t+=1){var ar=er[$t];Mt.accumulated=Ir[ar],Ir[ar]=Ot[ar].evaluate(Mt,Pt)}},Nt}(Ve)).load(at.features):function(jt,Nt){return new Xt(jt,Nt)}(at,Ve.geojsonVtOptions)}catch(jt){return Pe(jt)}Te.loaded={};var _t={};if(tt){var bt=tt.finish();bt&&(_t.resourceTiming={},_t.resourceTiming[Ve.source]=JSON.parse(JSON.stringify(bt)))}Pe(null,_t)})}},Ie.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Ie.prototype.reloadTile=function(Te,Pe){var Ve=this.loaded,tt=Te.uid;return Ve&&Ve[tt]?Ce.prototype.reloadTile.call(this,Te,Pe):this.loadTile(Te,Pe)},Ie.prototype.loadGeoJSON=function(Te,Pe){if(Te.request)e.getJSON(Te.request,Pe);else{if(typeof Te.data!="string")return Pe(new Error("Input data given to '"+Te.source+"' is not a valid GeoJSON object."));try{return Pe(null,JSON.parse(Te.data))}catch{return Pe(new Error("Input data given to '"+Te.source+"' is not a valid GeoJSON object."))}}},Ie.prototype.removeSource=function(Te,Pe){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Pe()},Ie.prototype.getClusterExpansionZoom=function(Te,Pe){try{Pe(null,this._geoJSONIndex.getClusterExpansionZoom(Te.clusterId))}catch(Ve){Pe(Ve)}},Ie.prototype.getClusterChildren=function(Te,Pe){try{Pe(null,this._geoJSONIndex.getChildren(Te.clusterId))}catch(Ve){Pe(Ve)}},Ie.prototype.getClusterLeaves=function(Te,Pe){try{Pe(null,this._geoJSONIndex.getLeaves(Te.clusterId,Te.limit,Te.offset))}catch(Ve){Pe(Ve)}},Ie}(u),ft=function(Ce){var Ie=this;this.self=Ce,this.actor=new e.Actor(Ce,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:u,geojson:wt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Te,Pe){if(Ie.workerSourceTypes[Te])throw new Error('Worker source with name "'+Te+'" already registered.');Ie.workerSourceTypes[Te]=Pe},this.self.registerRTLTextPlugin=function(Te){if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=Te.applyArabicShaping,e.plugin.processBidirectionalText=Te.processBidirectionalText,e.plugin.processStyledBidirectionalText=Te.processStyledBidirectionalText}};return ft.prototype.setReferrer=function(Ce,Ie){this.referrer=Ie},ft.prototype.setImages=function(Ce,Ie,Te){for(var Pe in this.availableImages[Ce]=Ie,this.workerSources[Ce]){var Ve=this.workerSources[Ce][Pe];for(var tt in Ve)Ve[tt].availableImages=Ie}Te()},ft.prototype.setLayers=function(Ce,Ie,Te){this.getLayerIndex(Ce).replace(Ie),Te()},ft.prototype.updateLayers=function(Ce,Ie,Te){this.getLayerIndex(Ce).update(Ie.layers,Ie.removedIds),Te()},ft.prototype.loadTile=function(Ce,Ie,Te){this.getWorkerSource(Ce,Ie.type,Ie.source).loadTile(Ie,Te)},ft.prototype.loadDEMTile=function(Ce,Ie,Te){this.getDEMWorkerSource(Ce,Ie.source).loadTile(Ie,Te)},ft.prototype.reloadTile=function(Ce,Ie,Te){this.getWorkerSource(Ce,Ie.type,Ie.source).reloadTile(Ie,Te)},ft.prototype.abortTile=function(Ce,Ie,Te){this.getWorkerSource(Ce,Ie.type,Ie.s
94ource).abortTile(Ie,Te)},ft.prototype.removeTile=function(Ce,Ie,Te){this.getWorkerSource(Ce,Ie.type,Ie.source).removeTile(Ie,Te)},ft.prototype.removeDEMTile=function(Ce,Ie){this.getDEMWorkerSource(Ce,Ie.source).removeTile(Ie)},ft.prototype.removeSource=function(Ce,Ie,Te){if(this.workerSources[Ce]&&this.workerSources[Ce][Ie.type]&&this.workerSources[Ce][Ie.type][Ie.source]){var Pe=this.workerSources[Ce][Ie.type][Ie.source];delete this.workerSources[Ce][Ie.type][Ie.source],Pe.removeSource!==void 0?Pe.removeSource(Ie,Te):Te()}},ft.prototype.loadWorkerSource=function(Ce,Ie,Te){try{this.self.importScripts(Ie.url),Te()}catch(Pe){Te(Pe.toString())}},ft.prototype.syncRTLPluginState=function(Ce,Ie,Te){try{e.plugin.setState(Ie);var Pe=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&Pe!=null){this.self.importScripts(Pe);var Ve=e.plugin.isParsed();Te(Ve?void 0:new Error("RTL Text Plugin failed to import scripts from "+Pe),Ve)}}catch(tt){Te(tt.toString())}},ft.prototype.getAvailableImages=function(Ce){var Ie=this.availableImages[Ce];return Ie||(Ie=[]),Ie},ft.prototype.getLayerIndex=function(Ce){var Ie=this.layerIndexes[Ce];return Ie||(Ie=this.layerIndexes[Ce]=new i),Ie},ft.prototype.getWorkerSource=function(Ce,Ie,Te){var Pe=this;if(this.workerSources[Ce]||(this.workerSources[Ce]={}),this.workerSources[Ce][Ie]||(this.workerSources[Ce][Ie]={}),!this.workerSources[Ce][Ie][Te]){var Ve={send:function(tt,ot,at){Pe.actor.send(tt,ot,at,Ce)}};this.workerSources[Ce][Ie][Te]=new this.workerSourceTypes[Ie](Ve,this.getLayerIndex(Ce),this.getAvailableImages(Ce))}return this.workerSources[Ce][Ie][Te]},ft.prototype.getDEMWorkerSource=function(Ce,Ie){return this.demWorkerSources[Ce]||(this.demWorkerSources[Ce]={}),this.demWorkerSources[Ce][Ie]||(this.demWorkerSources[Ce][Ie]=new o),this.demWorkerSources[Ce][Ie]},ft.prototype.enforceCacheSizeLimit=function(Ce,Ie){e.enforceCacheSizeLimit(Ie)},typeof WorkerGlobalScope<"u"&&e.window!==void 0&&e.window instanceof WorkerGlobalScope&&(e.window.worker=new ft(e.window)),ft}),y(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,me,ye=new Blob([""],{type:"text/javascript"}),Me=URL.createObjectURL(ye);try{me=new Worker(Me),ue=!0}catch{ue=!1}return me&&me.terminate(),URL.revokeObjectURL(Me),ue}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var ue=document.createElement("canvas");ue.width=ue.height=1;var me=ue.getContext("2d");if(!me)return!1;var ye=me.getImageData(0,0,1,1);return ye&&ye.width===ue.width}()?function(ue){return q[ue]===void 0&&(q[ue]=function(me){var ye=function(Ne){var We=document.createElement("canvas"),rt=Object.create(z.webGLContextAttributes);return rt.failIfMajorPerformanceCaveat=Ne,We.probablySupportsContext?We.probablySupportsContext("webgl",rt)||We.probablySupportsContext("experimental-webgl",rt):We.supportsContext?We.supportsContext("webgl",rt)||We.supportsContext("experimental-webgl",rt):We.getContext("webgl",rt)||We.getContext("experimental-webgl",rt)}(me);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)),q[ue]}(ie&&ie.failIfMajorPerformanceCaveat)?void 0:"insufficient WebGL support":"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray supp
94ort":"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 q={};z.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),t={create:function(C,z,B){var q=e.window.document.createElement(C);return z!==void 0&&(q.className=z),B&&B.appendChild(q),q},createNS:function(C,z){return e.window.document.createElementNS(C,z)}},i=e.window.document.documentElement.style;function r(C){if(!i)return C[0];for(var z=0;z<C.length;z++)if(C[z]in i)return C[z];return C[0]}var d,l=r(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);t.disableDrag=function(){i&&l&&(d=i[l],i[l]="none")},t.enableDrag=function(){i&&l&&(i[l]=d)};var a=r(["transform","WebkitTransform"]);t.setTransform=function(C,z){C.style[a]=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,q){q===void 0&&(q={}),"passive"in q&&u?C.addEventListener(z,B,q):C.addEventListener(z,B,q.capture)},t.removeEventListener=function(C,z,B,q){q===void 0&&(q={}),"passive"in q&&u?C.removeEventListener(z,B,q):C.removeEventListener(z,B,q.capture)};var o=function(C){C.preventDefault(),C.stopPropagation(),e.window.removeEventListener("click",o,!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",o,!0),e.window.setTimeout(function(){e.window.removeEventListener("click",o,!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(),q=[],ie=0;ie<z.length;ie++)q.push(new e.Point(z[ie].clientX-B.left-C.clientLeft,z[ie].clientY-B.top-C.clientTop));return q},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 q=0,ie=this.requestors;q<ie.length;q+=1){var ue=ie[q],me=ue.ids,ye=ue.callback;this._notify(me,ye)}this.requestors=[]}},z.prototype.getImage=function(B){return this.images[B]},z.prototype.addImage=function(B,q){this._validate(B,q)&&(this.images[B]=q)},z.prototype._validate=function(B,q){var ie=!0;return this._validateStretch(q.stretchX,q.data&&q.data.width)||(this.fire(new e.ErrorEvent(new Error('Image "'+B+'" has invalid "stretchX" value'))),ie=!1),this._validateStretch(q.stretchY,q.data&&q.data.height)||(this.fire(new e.ErrorEvent(new Error('Image "'+B+'" has invalid "stretchY" value'))),ie=!1),this._validateContent(q.content,q)||(this.fire(new e.ErrorEvent(new Error('Image "'+B+'" has invalid "content" value'))),ie=!1),ie},z.prototype._validateStretch=function(B,q){if(!B)return!0;for(var ie=0,ue=0,me=B;ue<me.length;ue+=1){var ye=me[ue];if(ye[0]<ie||ye[1]<ye[0]||q<ye[1])return!1;ie=ye[1]}return!0},z.prototype._validateContent=function(B,q){return!B||B.length===4&&!(B[0]<0||q.data.width<B[0])&&!(B[1]<0||q.data.height<B[1])&&!(B[2]<0||q.data.width<B[2])&&!(B[3]<0||q.data.height<B[3])&&!(B[2]<B[0])&&!(B[3]<B[1])},z.prototype.updateImage=function(B,q){var ie=this.images[B];q.version=ie.version+1,this.images[B]=q,this.updatedImages[B]=!0},z.prototype.removeImage=function(B){var q=this.images[B];delete this.images[B],delete this.patterns[B],q.userImage&&q.userImage.onRemove&&q.userImage.onRemove()},z.prototype.listImages=function(){return Object.keys(this.images)},z.prototype.getImages=function(B,q){var ie=!0;if(!this.isLoaded())for(var ue=0,me=B;ue<me.length;ue+=1){var ye=me[ue];this.images[ye]||(ie=!1)}this.isLoaded()||ie?this._notify(B,q):this.requestors.push({ids:B,callback:q})},z.prototype._notify=function(B,q){for(var ie={},ue=0,me=B;ue<me.length;ue+=1){var ye=me[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:Boolean(Me.userImage&&Me.userImage.render)}
vendor: 10,614 bytes, line 94
94: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.')}q(null,ie)},z.prototype.getPixelSize=function(){var B=this.atlasImage;return{width:B.width,height:B.height}},z.prototype.getPattern=function(B){var q=this.patterns[B],ie=this.getImage(B);if(!ie)return null;if(q&&q.position.version===ie.version)return q.position;if(q)q.position.version=ie.version;else{var ue={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},me=new e.ImagePosition(ue,ie);this.patterns[B]={bin:ue,position:me}}return this._updatePatternAtlas(),this.patterns[B].position},z.prototype.bind=function(B){var q=B.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.Texture(B,this.atlasImage,q.RGBA),this.atlasTexture.bind(q.LINEAR,q.CLAMP_TO_EDGE)},z.prototype._updatePatternAtlas=function(){var B=[];for(var q in this.patterns)B.push(this.patterns[q].bin);var ie=e.potpack(B),ue=ie.w,me=ie.h,ye=this.atlasImage;for(var Me in ye.resize({width:ue||1,height:me||1}),this.patterns){var Ne=this.patterns[Me].bin,We=Ne.x+1,rt=Ne.y+1,vt=this.images[Me].data,Lt=vt.width,xt=vt.height;e.RGBAImage.copy(vt,ye,{x:0,y:0},{x:We,y:rt},{width:Lt,height:xt}),e.RGBAImage.copy(vt,ye,{x:0,y:xt-1},{x:We,y:rt-1},{width:Lt,height:1}),e.RGBAImage.copy(vt,ye,{x:0,y:0},{x:We,y:rt+xt},{width:Lt,height:1}),e.RGBAImage.copy(vt,ye,{x:Lt-1,y:0},{x:We-1,y:rt},{width:1,height:xt}),e.RGBAImage.copy(vt,ye,{x:0,y:0},{x:We+Lt,y:rt},{width:1,height:xt})}this.dirty=!0},z.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},z.prototype.dispatchRenderCallbacks=function(B){for(var q=0,ie=B;q<ie.length;q+=1){var ue=ie[q];if(!this.callbackDispatchedThisFrame[ue]){this.callbackDispatchedThisFrame[ue]=!0;var me=this.images[ue];h(me)&&this.updateImage(ue,me)}}},z}(e.Evented),s=T,x=T,c=1e20;function T(C,z,B,q,ie,ue){this.fontSize=C||24,this.buffer=z===void 0?3:z,this.cutoff=q||.25,this.fontFamily=ie||"sans-serif",this.fontWeight=ue||"normal",this.radius=B||8;var me=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=me,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(me*me),this.gridInner=new Float64Array(me*me),this.f=new Float64Array(me),this.d=new Float64Array(me),this.z=new Float64Array(me+1),this.v=new Int16Array(me),this.middle=Math.round(me/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function _(C,z,B,q,ie,ue,me){for(var ye=0;ye<z;ye++){for(var Me=0;Me<B;Me++)q[Me]=C[Me*z+ye];for(w(q,ie,ue,me,B),Me=0;Me<B;Me++)C[Me*z+ye]=ie[Me]}for(Me=0;Me<B;Me++){for(ye=0;ye<z;ye++)q[ye]=C[Me*z+ye];for(w(q,ie,ue,me,z),ye=0;ye<z;ye++)C[Me*z+ye]=Math.sqrt(ie[ye])}}function w(C,z,B,q,ie){B[0]=0,q[0]=-c,q[1]=+c;for(var ue=1,me=0;ue<ie;ue++){for(var ye=(C[ue]+ue*ue-(C[B[me]]+B[me]*B[me]))/(2*ue-2*B[me]);ye<=q[me];)me--,ye=(C[ue]+ue*ue-(C[B[me]]+B[me]*B[me]))/(2*ue-2*B[me]);B[++me]=ue,q[me]=ye,q[me+1]=+c}for(ue=0,me=0;ue<ie;ue++){for(;q[me+1]<ue;)me++;z[ue]=(ue-B[me])*(ue-B[me])+C[B[me]]}}T.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),q=0;q<this.size*this.size;q++){var ie=z.data[4*q+3]/255;this.gridOuter[q]=ie===1?0:ie===0?c:Math.pow(Math.max(0,.5-ie),2),this.gridInner[q]=ie===1?c: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),q=0;q<this.size*this.size;q++){var ue=this.gridOuter[q]-this.gridInner[q];B[q]=Math.max(0,Math.min(255,Math.round(255-255*(ue/this.radius+this.cutoff))))}return B},s.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,q=[];for(var ie in C)for(var ue=0,me=C[ie];ue<me.length;ue+=1){var ye=me[ue];q.push({stack:ie,id:ye})}e.asyncAll(q,function(Me,Ne){var We=Me.stack,rt=Me.id,vt=B.entries[We];vt||(vt=B.entries[We]={glyphs:{},requests:{},ranges:{}});var Lt=vt.glyphs[rt];if(Lt===void 0){if(Lt=B._tinySDF(vt,We,rt))return vt.glyphs[rt]=Lt,void Ne(null,{stack:We,id:rt,glyph:Lt});var xt=Math.floor(rt/256);if(256*xt>65535)Ne(new Error("glyphs > 65535 not supported"));else if(vt.ranges[xt])Ne(null,{stack:We,id:rt,glyph:Lt});else{var kt=vt.requests[xt];kt||(kt=vt.requests[xt]=[],k.loadGlyphRange(We,xt,B.url,B.requestManager,function(gt,Rt){if(Rt){for(var zt in Rt)B._doesCharSupportLocalGlyph(+zt)||(vt.glyphs[+zt]=Rt[+zt]);vt.ranges[xt]=!0}for(var Ut=0,tr=kt;Ut<tr.length;Ut+=1)(0,tr[Ut])(gt,Rt);delete vt.requests[xt]})),kt.push(function(gt,Rt){gt?Ne(gt):Rt&&Ne(null,{stack:We,id:rt,glyph:Rt[rt]||null})})}}else Ne(null,{stack:We,id:rt,glyph:Lt})},function(Me,Ne){if(Me)z(Me);else if(Ne){for(var We={},rt=0,vt=Ne;rt<vt.length;rt+=1){var Lt=vt[rt],xt=Lt.stack,kt=Lt.id,gt=Lt.glyph;(We[xt]||(We[xt]={}))[kt]=gt&&{id:gt.id,bitmap:gt.bitmap.clone(),metrics:gt.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 q=this.localIdeographFontFamily;if(q&&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,q,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,q,ie){var ue=256*z,me=ue+255,ye=q.transformRequest(q.normalizeGlyphsURL(B).replace("{fontstack}",C).replace("{range}",ue+"-"+me),e.ResourceType.Glyphs);e.getArrayBuffer(ye,function(Me,Ne){if(Me)ie(Me);else if(Ne){for(var We={},rt=0,vt=e.parseGlyphPBF(Ne);rt<vt.length;rt+=1){var Lt=vt[rt];We[Lt.id]=Lt}ie(null,We)}})},k.TinySDF=s;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,q){if(q===void 0&&(q={}),!this._validate(e.validateLight,B,q))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,q,ie){return(!ie||ie.validate!==!1)&&e.emitValidationErrors(this,B.call(e.validateStyle,e.extend({value:q,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 q=[],ie=C.length%2==1?-C[C.length-1]*B:0,ue=C[0]*B,me=!0;q.push({left:ie,right:ue,isDash:me,zeroLength:C[0]===0});for(var ye=C[0],Me=1;Me<C.length;Me++){me=!me;var Ne=C[Me];ie=ye*B,ue=(ye+=Ne)*B,q.push({left:ie,right:ue,isDash:me,zeroLength:Ne===0})}return q},P.prototype.addRoundDash=function(C,z,B){for(var q=z/2,ie=-B;ie<=B;ie++)for(var ue=this.nextRow+B+ie,me=this.width*ue,ye=0,Me=C[ye],Ne=0;Ne<this.width;Ne++){Ne/Me.right>1&&(Me=C[++ye]);var We=Math.abs(Ne-Me.left),rt=Math.abs(Ne-Me.right),vt=Math.min(We,rt),Lt=void 0,xt=ie/B*(q+1);if(Me.isDash){var kt=q-Math.abs(xt);Lt=Math.sqrt(vt*vt+kt*kt)}else Lt=q-Math.sqrt(vt*vt+xt*xt);this.data[me+Ne]=Math.max(0,Math.min(255,Lt+128))}},P.prototype.addRegularDash=function(C){for(var z=C.length-1;z>=0;--z){var B=C[z],q=C[z+1];B.zeroLength?C.splice(z,1):q&&q.isDash===B.isDash&&(q.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 me=this.width*this.nextRow,ye=0,Me=C[ye],Ne=0;Ne<this.width;Ne++){Ne/Me.right>1&&(Me=C[++ye]);var We=Math.abs(Ne-Me.left),rt=Math.abs(Ne-Me.right),vt=Math.min(We,rt),Lt=Me.isDash?vt:-vt;this.data[me+Ne]=Math.max(0,Math.min(255,Lt+128))}},P.prototype.addDash=function(C,z){var B=z?7:0,q=2*B+1;if(this.nextRow+q>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 me=this.width/ie,ye=this.getDashRanges(C,this.width,me);z?this.addRoundDash(ye,me,B):this.addRegularDash(ye)}var Me={y:(this.nextRow+B+.5)/this.height,height:2*B/this.height,width:ie};return this.nextRow+=q,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 q=this.workerPool.acquire(this.id),ie=0;ie<q.length;ie++){var ue=q[ie],me=new C.Actor(ue,B,this.id);me.name="Worker "+ie,this.actors.push(me)}};function E(C,z,B){var q=function(ie,ue){if(ie)return B(ie);if(ue){var me=e.pick(e.extend(ue,C),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);ue.vector_layers&&(me.vectorLayers=ue.vector_layers,me.vectorLayerIds=me.vectorLayers.map(function(ye){return ye.id})),me.tiles=z.canonicalizeTileset(me,C.url),B(null,me)}};return C.url?e.getJSON(z.transformRequest(z.normalizeSourceURL(C.url),e.ResourceType.Source),q):e.browser.frame(function(){return q(null,C)})}S.prototype.broadcast=function(C,z,B){B=B||function(){},e.asyncAll(this.actors,function(q,ie){q.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),q=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>=q&&C.y<ue};var F=function(C){function z(B,q,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(q,["url","scheme","tileSize","promoteId"])),this._options=e.extend({type:"vector"},q),this._collectResourceTiming=q.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(q,ie){B._tileJSONRequest=null,B._loaded=!0,q?B.fire(new e.ErrorEvent(q)):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,q){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 me(ye,Me){return delete B.request,B.aborted?q(null):ye&&ye.status!==404?q(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),q(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=q:B.request=B.actor.send("reloadTile",ue,me.bind(this)):(B.actor=this.dispatcher.getActor(),B.request=B.actor.send("loadTile",ue,me.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,q,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"},q),e.extend(this,e.pick(q,["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(q,ie){B._tileJSONRequest=null,B._loaded=!0,q?B.fire(new e.ErrorEvent(q)):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,q){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(me,ye){if(delete B.request,B.aborted)B.state="unloaded",q(null);else if(me)B.state="errored",q(me);else if(ye){ie.map._refreshExpiredTiles&&B.setExpiryData(ye),delete ye.cacheControl,delete ye.expires;var Me=ie.map.painter.context,Ne=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,Ne.RGBA,{useMipmap:!0}),B.texture.bind(Ne.LINEAR,Ne.CLAMP_TO_EDGE,Ne.LINEAR_MIPMAP_NEAREST),Me.extTextureFilterAnisotropic&&Ne.texParameterf(Ne.TEXTURE_2D,Me.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Me.extTextureFilterAnisotropicMax)),B.state="loaded",e.cacheEntryPossiblyAdded(ie.dispatcher),q(null)}})},z.prototype.abortTile=function(B,q){B.request&&(B.request.cancel(),delete B.request),q()},z.prototype.unloadTile=function(B,q){B.texture&&this.map.painter.saveTileTexture(B.texture),q()},z.prototype.hasTransition=function(){return!1},z}(e.Evented),V=function(C){function z(B,q,ie,ue){C.call(this,B,q,ie,ue),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},q),this.encoding=q.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,q){var ie=this.map._requestManager.normalizeTileURL(B.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function ue(me,ye){me&&(B.state="errored",q(me)),ye&&(B.dem=ye,B.needsHillshadePrepare=!0,B.state="loaded",q(null))}B.request=e.getImage(this.map._requestManager.transformRequest(ie,e.ResourceType.Tile),function(me,ye){if(delete B.request,B.aborted)B.state="unloaded",q(null);else if(me)B.state="errored",q(me);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),Ne={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",Ne,ue.bind(this)))}}.bind(this)),B.neighboringTiles=this._getNeighboringTiles(B.tileID)},z.prototype._getNeighboringTiles=function(B){var q=B.canonical,ie=Math.pow(2,q.z),ue=(q.x-1+ie)%ie,me=q.x===0?B.wrap-1:B.wrap,ye=(q.x+1+ie)%ie,Me=q.x+1===ie?B.wrap+1:B.wrap,Ne={};return Ne[new e.OverscaledTileID(B.overscaledZ,me,q.z,ue,q.y).key]={backfilled:!1},Ne[new e.OverscaledTileID(B.overscaledZ,Me,q.z,ye,q.y).key]={backfilled:!1},q.y>0&&(Ne[new e.OverscaledTileID(B.overscaledZ,me,q.z,ue,q.y-1).key]={backfilled:!1},Ne[new e.OverscaledTileID(B.overscaledZ,B.wrap,q.z,q.x,q.y-1).key]={backfilled:!1},Ne[new e.OverscaledTileID(B.overscaledZ,Me,q.z,ye,q.y-1).key]={backfilled:!1}),q.y+1<ie&&(Ne[new e.OverscaledTileID(B.overscaledZ,me,q.z,ue,q.y+1).key]={backfilled:!1},Ne[new e.OverscaledTileID(B.overscaledZ,B.wrap,q.z,q.x,q.y+1).key]={backfilled:!1},Ne[new e.OverscaledTileID(B.overscaledZ,Me,q.z,ye,q.y+1).key]={backfilled:!1}),Ne},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,q,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=q.data,this._options=e.extend({},q),this._collectResourceTiming=q.collectResourceTiming,this._resourceTiming=[],q.maxzoom!==void 0&&(this.maxzoom=q.maxzoom),q.type&&(this.type=q.type),q.attribution&&(this.attribution=q.attribution),this.promoteId=q.promoteId;var me=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:q.cluster||!1,geojsonVtOptions:{buffer:(q.buffer!==void 0?q.buffer:128)*me,tolerance:(q.tolerance!==void 0?q.tolerance:.375)*me,extent:e.EXTENT,maxZoom:this.maxzoom,lineMetrics:q.lineMetrics||!1,generateId:q.generateId||!1},superclusterOptions:{maxZoom:q.clusterMaxZoom!==void 0?Math.min(q.clusterMa
94xZoom,this.maxzoom-1):this.maxzoom-1,extent:e.EXTENT,radius:(q.clusterRadius||50)*me,log:!1,generateId:q.generateId||!1},clusterProperties:q.clusterProperties},q.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(q){if(q)B.fire(new e.ErrorEvent(q));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 q=this;return this._data=B,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ie){if(ie)q.fire(new e.ErrorEvent(ie));else{var ue={dataType:"source",sourceDataType:"content"};q._collectResourceTiming&&q._resourceTiming&&q._resourceTiming.length>0&&(ue.resourceTiming=q._resourceTiming,q._resourceTiming=[]),q.fire(new e.Event("data",ue))}}),this},z.prototype.getClusterExpansionZoom=function(B,q){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:B,source:this.id},q),this},z.prototype.getClusterChildren=function(B,q){return this.actor.send("geojson.getClusterChildren",{clusterId:B,source:this.id},q),this},z.prototype.getClusterLeaves=function(B,q,ie,ue){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:B,limit:q,offset:ie},ue),this},z.prototype._updateWorkerData=function(B){var q=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(me,ye){q._removed||ye&&ye.abandoned||(q._loaded=!0,ye&&ye.resourceTiming&&ye.resourceTiming[q.id]&&(q._resourceTiming=ye.resourceTiming[q.id].slice(0)),q.actor.send(q.type+".coalesce",{source:ie.source},null),B(me))})},z.prototype.loaded=function(){return this._loaded},z.prototype.loadTile=function(B,q){var ie=this,ue=B.actor?"reloadTile":"loadTile";B.actor=this.actor;var me={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,me,function(ye,Me){return delete B.request,B.unloadVectorData(),B.aborted?q(null):ye?q(ye):(B.loadVectorData(Me,ie.map.painter,ue==="reloadTile"),q(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.t
vendor: 4,584 bytes, line 94
94ype,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}]),G=function(C){function z(B,q,ie,ue){C.call(this),this.id=B,this.dispatcher=ie,this.coordinates=q.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ue),this.options=q}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.load=function(B,q){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,me){ie._loaded=!0,ue?ie.fire(new e.ErrorEvent(ue)):me&&(ie.image=me,B&&(ie.coordinates=B),q&&q(),ie._finishLoading())})},z.prototype.loaded=function(){return this._loaded},z.prototype.updateImage=function(B){var q=this;return this.image&&B.url?(this.options.url=B.url,this.load(B.coordinates,function(){q.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 q=this;this.coordinates=B;var ie=B.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(me){for(var ye=1/0,Me=1/0,Ne=-1/0,We=-1/0,rt=0,vt=me;rt<vt.length;rt+=1){var Lt=vt[rt];ye=Math.min(ye,Lt.x),Me=Math.min(Me,Lt.y),Ne=Math.max(Ne,Lt.x),We=Math.max(We,Lt.y)}var xt=Ne-ye,kt=We-Me,gt=Math.max(xt,kt),Rt=Math.max(0,Math.floor(-Math.log(gt)/Math.LN2)),zt=Math.pow(2,Rt);return new e.CanonicalTileID(Rt,Math.floor((ye+Ne)/2*zt),Math.floor((Me+We)/2*zt))}(ie),this.minzoom=this.maxzoom=this.tileID.z;var ue=ie.map(function(me){return q.tileID.getTilePoint(me)._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,q=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,q.RGBA),this.texture.bind(q.LINEAR,q.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,q){this.tileID&&this.tileID.equals(B.tileID.canonical)?(this.tiles[String(B.tileID.wrap)]=B,B.buckets={},q(null)):(B.state="errored",q(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,q,ie,ue){C.call(this,B,q,ie,ue),this.roundZoom=!0,this.type="video",this.options=q}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 q=this.options;this.urls=[];for(var ie=0,ue=q.urls;ie<ue.length;ie+=1){var me=ue[ie];this.urls.push(this.map._requestManager.transformRequest(me,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 q=this.video.seekable;B<q.start(0)||B>q.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+q.start(0)+" and "+q.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,q=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(q.LINEAR,q.CLAMP_TO_EDGE),q.texSubImage2D(q.TEXTURE_2D,0,0,0,q.RGBA,q.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(B,this.video,q.RGBA),this.texture.bind(q.LINEAR,q.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}(G),Q=function(C){function z(B,q,ie,ue){C.call(this,B,q,ie,ue),q.coordinates?Array.isArray(q.coordinates)&&q.coordinates.length===4&&!q.coordinates.some(function(me){return!Array.isArray(me)||me.length!==2||me.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"'))),q.animate&&typeof q.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+B,null,'optional "animate" property must be a boolean value'))),q.canvas?typeof q.canvas=="string"||q.canvas instanceof e.
vendor: 7,306 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=q,this.animate=q.animate===void 0||q.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 q=this.map.painter.context,ie=q.gl;for(var ue in this.boundsBuffer||(this.boundsBuffer=q.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(q,this.canvas,ie.RGBA,{premultiply:!0}),this.tiles){var me=this.tiles[ue];me.state!=="loaded"&&(me.state="loaded",me.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,q=[this.canvas.width,this.canvas.height];B<q.length;B+=1){var ie=q[B];if(isNaN(ie)||ie<=0)return!0}return!1},z}(G),R={vector:F,raster:H,"raster-dem":V,geojson:Z,video:W,image:G,canvas:Q};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,q,ie,ue){var me=function(kt,gt,Rt){if(kt)for(var zt=0,Ut=kt;zt<Ut.length;zt+=1){var tr=gt[Ut[zt]];if(tr&&tr.source===Rt&&tr.type==="fill-extrusion")return!0}else for(var ur in gt){var kr=gt[ur];if(kr.source===Rt&&kr.type==="fill-extrusion")return!0}return!1}(ie&&ie.layers,z,C.id),ye=ue.maxPitchScaleFactor(),Me=C.tilesIn(q,ye,me);Me.sort(ee);for(var Ne=[],We=0,rt=Me;We<rt.length;We+=1){var vt=rt[We];Ne.push({wrappedTileID:vt.tileID.wrapped().key,queryResults:vt.tile.queryRenderedFeatures(z,B,C._state,vt.queryGeometry,vt.cameraQueryGeometry,vt.scale,ie,ue,ye,N(C.transform,vt.tileID))})}var Lt=function(kt){for(var gt={},Rt={},zt=0,Ut=kt;zt<Ut.length;zt+=1){var tr=Ut[zt],ur=tr.queryResults,kr=tr.wrappedTileID,wr=Rt[kr]=Rt[kr]||{};for(var Qr in ur)for(var Kr=ur[Qr],pn=wr[Qr]=wr[Qr]||{},ln=gt[Qr]=gt[Qr]||[],Vn=0,Zn=Kr;Vn<Zn.length;Vn+=1){var fa=Zn[Vn];pn[fa.featureIndex]||(pn[fa.featureIndex]=!0,ln.push(fa))}}return gt}(Ne);for(var xt in Lt)Lt[xt].forEach(function(kt){var gt=kt.feature,Rt=C.getFeatureState(gt.layer["source-layer"],gt.id);gt.source=gt.layer.source,gt.layer["source-layer"]&&(gt.sourceLayer=gt.layer["source-layer"]),gt.state=Rt});return Lt}function ee(C,z){var B=C.tileID,q=z.tileID;return B.overscaledZ-q.overscaledZ||B.canonical.y-q.canonical.y||B.wrap-q.wrap||B.canonical.x-q.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 q=B[z];q.timeout&&clearTimeout(q.timeout),this.onRemove(q.value)}return this.data={},this.order=[],this},j.prototype.add=function(C,z,B){var q=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(){q.remove(C,ue)},B)),this.data[ie].push(ue),this.order.push(ie),this.order.length>this.max){var me=this._getAndRemoveByKey(this.order[0]);me&&this.onRemove(me)}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,q=z===void 0?0:this.data[B].indexOf(z),ie=this.data[B][q];return this.data[B].splice(q,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 q=0,ie=this.data[B];q<ie.length;q+=1){var ue=ie[q];C(ue.value)||z.push(ue)}for(var me=0,ye=z;me<ye.length;me+=1){var Me=ye[me];this.remove(Me.value.tileID,Me)}};var X=function(C,z,B){this.context=C;var q=C.gl;this.buffer=q.createBuffer(),this.dynamicDraw=Boolean(B),this.context.unbindVAO(),C.bindElementBuffer.set(this.buffer),q.bufferData(q.ELEMENT_ARRAY_BUFFER,z.arrayBuffer,this.dynamicDraw?q.DYNAMIC_DRAW:q.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,q){this.length=z.length,this.attributes=B,this.itemSize=z.bytesPerElement,this.dynamicDraw=q,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 q=this.attributes[B],ie=z.attributes[q.name];ie!==void 0&&C.enableVertexAttribArray(ie)}},re.prototype.setVertexAttribPointers=function(C,z,B){for(var q=0;q<this.attributes.length;
vendor: 10,333 bytes, line 94
94q++){var ie=this.attributes[q],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 q=this.current;(B.r!==q.r||B.g!==q.g||B.b!==q.b||B.a!==q.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 q=this.current;(B[0]!==q[0]||B[1]!==q[1]||B[2]!==q[2]||B[3]!==q[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),_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{func:this.gl.ALWAYS,ref:0,mask:255}},z.prototype.set=function(B){var q=this.current;(B.func!==q.func||B.ref!==q.ref||B.mask!==q.mask||this.dirty)&&(this.gl.stencilFunc(B.func,B.ref,B.mask),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(){var B=this.gl;return[B.KEEP,B.KEEP,B.KEEP]},z.prototype.set=function(B){var q=this.current;(B[0]!==q[0]||B[1]!==q[1]||B[2]!==q[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 q=this.gl;B?q.enable(q.STENCIL_TEST):q.disable(q.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 q=this.current;(B[0]!==q[0]||B[1]!==q[1]||this.dirty)&&(this.gl.depthRange(B[0],B[1]),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!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var q=this.gl;B?q.enable(q.DEPTH_TEST):q.disable(q.DEPTH_TEST),this.current=B,this.dirty=!1}},z}(ne),ke=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),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(){return!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var q=this.gl;B?q.enable(q.BLEND):q.disable(q.BLEND),this.current=B,this.dirty=!1}},z}(ne),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(){var B=this.gl;return[B.ONE,B.ZERO]},z.prototype.set=function(B){var q=this.current;(B[0]!==q[0]||B[1]!==q[1]||this.dirty)&&(this.gl.blendFunc(B[0],B[1]),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 e.Color.transparent},z.prototype.set=function(B){var q=this.current;(B.r!==q.r||B.g!==q.g||B.b!==q.b||B.a!==q.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),je=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 q=this.gl;B?q.enable(q.CULL_FACE):q.disable(q.CULL_FACE),this.current=B,this.dirty=!1}},z}(ne),Je=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),ze=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 q=this.current;(B[0]!==q[0]||B[1]!==q[1]||B[2]!==q[2]||B[3]!==q[3]||this.dirty)&&(this.gl.viewport(B[0],B[1],B[2],B[3]),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 null},z.prototype.set=function(B){if(B!==this.current||this.dirty){var q=this.gl;q.bindFramebuffer(q.FRAMEBUFFER,B),this.current=B,this.dirty=!1}},z}(ne),ct=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 q=this.gl;q.bindRenderbuffer(q.RENDERBUFFER,B),this.current=B,this.dirty=!1}},z}(ne),mt=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 q=this.gl;q.bindTexture(q.TEXTURE_2D,B),this.current=B,this.dirty=!1}},z}(ne),Ct=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 q=this.gl;q.bindBuffer(q.ARRAY_BUFFER,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 null},z.prototype.set=function(B){var q=this.gl;q.bindBuffer(q.ELEMENT_ARRAY_BUFFER,B),this.current=B,this.dirty=!1},z}(ne),nt=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}
vendor: 7,071 bytes, line 94
94(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 4},z.prototype.set=function(B){if(B!==this.current||this.dirty){var q=this.gl;q.pixelStorei(q.UNPACK_ALIGNMENT,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!1},z.prototype.set=function(B){if(B!==this.current||this.dirty){var q=this.gl;q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B),this.current=B,this.dirty=!1}},z}(ne),Gt=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 q=this.gl;q.pixelStorei(q.UNPACK_FLIP_Y_WEBGL,B),this.current=B,this.dirty=!1}},z}(ne),Xt=function(C){function z(B,q){C.call(this,B),this.context=B,this.parent=q}return C&&(z.__proto__=C),z.prototype=Object.create(C&&C.prototype),z.prototype.constructor=z,z.prototype.getDefault=function(){return null},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.setDirty=function(){this.dirty=!0},z.prototype.set=function(B){if(B!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var q=this.gl;q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_2D,B,0),this.current=B,this.dirty=!1}},z}(Xt),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 q=this.gl;q.framebufferRenderbuffer(q.FRAMEBUFFER,q.DEPTH_ATTACHMENT,q.RENDERBUFFER,B),this.current=B,this.dirty=!1}},z}(Xt),wt=function(C,z,B,q){this.context=C,this.width=z,this.height=B;var ie=C.gl,ue=this.framebuffer=ie.createFramebuffer();this.colorAttachment=new Fe(C,ue),q&&(this.depthAttachment=new qe(C,ue))};wt.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 ft=function(C,z,B){this.func=C,this.mask=z,this.range=B};ft.ReadOnly=!1,ft.ReadWrite=!0,ft.disabled=new ft(519,ft.ReadOnly,[0,1]);var Ce=function(C,z,B,q,ie,ue){this.test=C,this.ref=z,this.mask=B,this.fail=q,this.depthFail=ie,this.pass=ue};Ce.disabled=new Ce({func:519,mask:0},0,0,7680,7680,7680);var Ie=function(C,z,B){this.blendFunction=C,this.blendColor=z,this.mask=B};Ie.disabled=new Ie(Ie.Replace=[1,0],e.Color.transparent,[!1,!1,!1,!1]),Ie.unblended=new Ie(Ie.Replace,e.Color.transparent,[!0,!0,!0,!0]),Ie.alphaBlended=new Ie([1,771],e.Color.transparent,[!0,!0,!0,!0]);var Te=function(C,z,B){this.enable=C,this.mode=z,this.frontFace=B};Te.disabled=new Te(!1,1029,2305),Te.backCCW=new Te(!0,1029,2305);var Pe=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 _e(this),this.stencilOp=new we(this),this.stencilTest=new Ee(this),this.depthRange=new fe(this),this.depthTest=new ge(this),this.depthFunc=new ke(this),this.blend=new be(this),this.blendFunc=new Se(this),this.blendColor=new Oe(this),this.blendEquation=new De(this),this.cullFace=new je(this),this.cullFaceSide=new Je(this),this.frontFace=new ze(this),this.program=new Ue(this),this.activeTexture=new Ge(this),this.viewport=new Ye(this),this.bindFramebuffer=new et(this),this.bindRenderbuffer=new ct(this),this.bindTexture=new mt(this),this.bindVertexBuffer=new Ct(this),this.bindElementBuffer=new Tt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new nt(this),this.pixelStoreUnpack=new Qe(this),this.pixelStoreUnpackPremultiplyAlpha=new Et(this),this.pixelStoreUnpackFlipY=new Gt(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")};Pe.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()},Pe.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},Pe.prototype.createIndexBuffer=function(C,z){return new X(this,C,z)},Pe.prototype.createVertexBuffer=function(C,z,B){return new re(this,C,z,B)},Pe.prototype.createRenderbuffer=function(C,z,B){var q=this.gl,ie=q.createRenderbuffer();return this.bindRenderbuffer.set(ie),q.renderbufferStorage(q.RENDERBUFFER,C,z,B),this.bindRenderbuffer.set(null),ie},Pe.prototype.createFramebuffer=function(C,z,B){return new wt(this,C,z,B)}
94,Pe.prototype.clear=function(C){var z=C.color,B=C.depth,q=this.gl,ie=0;z&&(ie|=q.COLOR_BUFFER_BIT,this.clearColor.set(z),this.colorMask.set([!0,!0,!0,!0])),B!==void 0&&(ie|=q.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(B),this.depthMask.set(!0)),q.clear(ie)},Pe.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))},Pe.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)},Pe.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)},Pe.prototype.setColorMode=function(C){e.deepEqual(C.blendFunction,Ie.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(C.blendFunction),this.blendColor.set(C.blendColor)),this.colorMask.set(C.mask)},Pe.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ve=function(C){function z(B,q,ie){var ue=this;C.call(this),this.id=B,this.dispatcher=ie,this.on("data",function(me){me.dataType==="source"&&me.sourceDataType==="metadata"&&(ue._sourceLoaded=!0),ue._sourceLoaded&&!ue._paused&&me.dataType==="source"&&me.sourceDataType==="content"&&(ue.reload(),ue.transform&&ue.update(ue.transform))}),this.on("error",function(){ue._sourceErrored=!0}),this._source=function(me,ye,Me,Ne){var We=new R[ye.type](me,ye,Me,Ne);if(We.id!==me)throw new Error("Expected Source id to be "+me+" instead of "+We.id);return e.bindAll(["load","abort","unload","serialize","prepare"],We),We}(B,q,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 q=this._tiles[B];if(q.state!=="loaded"&&q.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,q){return this._source.loadTile(B,q)},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 q in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var ie=this._tiles[q];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(tt).map(function(B){return B.key})},z.prototype.getRenderableIds=function(B){var q=this,ie=[];for(var ue in this._tiles)this._isIdRenderable(ue,B)&&ie.push(this._tiles[ue]);return B?ie.sort(function(me,ye){var Me=me.tileID,Ne=ye.tileID,We=new e.Point(Me.canonical.x,Me.canonical.y)._rotate(q.transform.angle),rt=new e.Point(Ne.canonical.x,Ne.canonical.y)._rotate(q.transform.angle);return Me.overscaledZ-Ne.overscaledZ||rt.y-We.y||rt.x-We.x}).map(function(me){return me.tileID.key}):ie.map(function(me){return me.tileID}).sort(tt).map(function(me){return me.key})},z.prototype.hasRenderableParent=function(B){var q=this.findLoadedParent(B,0);return!!q&&this._isIdRenderable(q.tileID.key)},z.prototype._isIdRenderable=function(B,q){return this._tiles[B]&&this._tiles[B].hasData()&&!this._coveredTiles[B]&&(q||!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,q){var ie=this._tiles[B];ie&&(ie.state!=="loading"&&(ie.state=q),this._loadTile(ie,this._tileLoaded.bind(this,ie,B,q)))},z.prototype._tileLoaded=function(B,q,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(q,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 q=this.getRenderableIds(),ie=0;ie<q.length;ie++){var ue=q[ie];if(B.neighboringTiles&&B.neighboringTiles[ue]){var me=this.getTileByID(ue);ye(B,me),ye(me,B)}}function ye(Me,Ne){Me.needsHillshadePrepare=!0;var We=Ne.tileID.canonical.x-Me.tileID.canonical.x,rt=Ne.tileID.canonical.y-Me.tileID.canonical.y,vt=Math.pow(2,Me.tileID.canonical.z),Lt=Ne.tileID.key;We===0&&rt===0||Math.abs(rt)>1||(Math.abs(We)>1&&(Math.abs(We+vt)===1?We+=vt:Math.abs(We-vt)===1&&(We-=vt)),Ne.dem&&Me.dem&&(Me.dem.backfillBorder(Ne.dem,We,rt),Me.neighboringTiles&&Me.neighboringTiles[Lt]&&(Me.neighboringTiles[Lt].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,q,ie,ue){for(var me in this._tiles){var ye=this._tiles[me];if(!(ue[me]||!ye.hasData()||ye.tileID.overscaledZ<=q||ye.tileID.overscaledZ>ie)){for(var Me=ye.tileID;ye&&ye.tileID.overscaledZ>q+1;){var Ne=ye.tileID.scaledTo(ye.tileID.overscaledZ-1);(ye=this._tiles[Ne.key])&&ye.hasData()&&(Me=Ne)}for(var We=Me;We.overscaledZ>q;)if(B[(We=We.scaledTo(We.overscaledZ-1)).key]){ue[Me.key]=Me;break}}}},z.prototype.findLoadedParent=function(B,q){if(B.key in this._loadedParentTiles){var ie=this._loadedParentTiles[B.key];return ie&&ie.tileID.overscaledZ>=q?ie:null}for(var ue=B.overscaledZ-1;ue>=q;ue--){var me=B.scaledTo(ue),ye=this._getLoadedTile(me);if(ye)return ye}},z.prototype._getLoadedTile=function(B){var q=this._tiles[B.key];return q&&q.hasData()?q:this._cache.getByKey(B.wrapped().key)},z.prototype.updateCacheSize=function(B){var q=(Math.ceil(B.width/this._source.tileSize)+1)*(Math.ceil(B.height/this._source.tileSize)+1),ie=Math.floor(5*q),ue=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ie):ie;this._cache.setMaxSize(ue)},z.prototype.handleWrapJump=function(B){var q=(B-(this._prevLng===void 0?B:this._prevLng))/360,ie=Math.round(q);if(this._prevLng=B,ie){var ue={};for(var me in this._tiles){var ye=this._tiles[me];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 Ne in this._tiles){var We=this._tiles[Ne];this._setTileReloadTimer(Ne,We)}}},z.prototype.update=function(B){var q=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(wr){return new e.OverscaledTileID(wr.canonical.z,wr.wrap,wr.canonical.z,wr.canonical.x,wr.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(wr){return q._source.hasTile(wr)}))):ie=[];var ue=B.coveringZoomLevel(this._source),me=Math.max(ue-z.maxOverzooming,this._source.minzoom),ye=Math.max(ue+z.maxUnderzooming,this._source.minzoom),Me=this._updateRetainedTiles(ie,ue);if(ot(this._source.type)){for(var Ne={},We={},rt=0,vt=Object.keys(Me);rt<vt.length;rt+=1){var Lt=vt[rt],xt=Me[Lt],kt=this._tiles[Lt];if(kt&&!(kt.fadeEndTime&&kt.fadeEndTime<=e.browser.now())){var gt=this.findLoadedParent(xt,me);gt&&(this._addTile(gt.tileID),Ne[gt.tileID.key]=gt.tileID),We[Lt]=xt}}for(var Rt in this._retainLoadedChildren(We,ue,ye,Me),Ne)Me[Rt]||(this._coveredTiles[Rt]=!0,Me[Rt]=Ne[Rt])}for(var zt in Me)this._tiles[zt].clearFadeHold();for(var Ut=0,tr=e.keysDifference(this._tiles,Me);Ut<tr.length;Ut+=1){var ur=tr[Ut],kr=this._tiles[ur];kr.hasSymbolBuckets&&!kr.holdingForFade()?kr.setHoldDuration(this.map._fadeDuration):kr.hasSymbolBuckets&&!kr.symbolFadeFinished()||this._removeTile(ur)}this._updateLoadedParentTileCache()}},z.prototype.releaseSymbolFadeTiles=function(){for(var B in this._tiles)this._tiles[B].holdingForFade()&&this._removeTile(B)},z.prototype._updateRetainedTiles=function(B,q){for(var ie={},ue={},me=Math.max(q-z.maxOverzooming,this._source.minzoom),ye=Math.max(q+z.maxUnderzooming,this._source.minzoom),Me={},Ne=0,We=B;Ne<We.length;Ne+=1){var rt=We[Ne],vt=this._addTile(rt);ie[rt.key]=rt,vt.hasData()||q<this._source.maxzoom&&(Me[rt.key]=rt)}this._retainLoadedChildren(Me,q,ye,ie);for(var Lt=0,xt=B;Lt<xt.length;Lt+=1){var kt=xt[Lt],gt=this._tiles[kt.key];
vendor: 5,122 bytes, line 94
94if(!gt.hasData()){if(q+1>this._source.maxzoom){var Rt=kt.children(this._source.maxzoom)[0],zt=this.getTile(Rt);if(zt&&zt.hasData()){ie[Rt.key]=Rt;continue}}else{var Ut=kt.children(this._source.maxzoom);if(ie[Ut[0].key]&&ie[Ut[1].key]&&ie[Ut[2].key]&&ie[Ut[3].key])continue}for(var tr=gt.wasRequested(),ur=kt.overscaledZ-1;ur>=me;--ur){var kr=kt.scaledTo(ur);if(ue[kr.key]||(ue[kr.key]=!0,!(gt=this.getTile(kr))&&tr&&(gt=this._addTile(kr)),gt&&(ie[kr.key]=kr,tr=gt.wasRequested(),gt.hasData())))break}}}return ie},z.prototype._updateLoadedParentTileCache=function(){for(var B in this._loadedParentTiles={},this._tiles){for(var q=[],ie=void 0,ue=this._tiles[B].tileID;ue.overscaledZ>0;){if(ue.key in this._loadedParentTiles){ie=this._loadedParentTiles[ue.key];break}q.push(ue.key);var me=ue.scaledTo(ue.overscaledZ-1);if(ie=this._getLoadedTile(me))break;ue=me}for(var ye=0,Me=q;ye<Me.length;ye+=1){var Ne=Me[ye];this._loadedParentTiles[Ne]=ie}}},z.prototype._addTile=function(B){var q=this._tiles[B.key];if(q)return q;(q=this._cache.getAndRemove(B))&&(this._setTileReloadTimer(B.key,q),q.tileID=B,this._state.initializeTileState(q,this.map?this.map.painter:null),this._cacheTimers[B.key]&&(clearTimeout(this._cacheTimers[B.key]),delete this._cacheTimers[B.key],this._setTileReloadTimer(B.key,q)));var ie=Boolean(q);return ie||(q=new e.Tile(B,this._source.tileSize*B.overscaleFactor()),this._loadTile(q,this._tileLoaded.bind(this,q,B.key,q.state))),q?(q.uses++,this._tiles[B.key]=q,ie||this._source.fire(new e.Event("dataloading",{tile:q,coord:q.tileID,dataType:"source"})),q):null},z.prototype._setTileReloadTimer=function(B,q){var ie=this;B in this._timers&&(clearTimeout(this._timers[B]),delete this._timers[B]);var ue=q.getExpiryTimeout();ue&&(this._timers[B]=setTimeout(function(){ie._reloadTile(B,"expired"),delete ie._timers[B]},ue))},z.prototype._removeTile=function(B){var q=this._tiles[B];q&&(q.uses--,delete this._tiles[B],this._timers[B]&&(clearTimeout(this._timers[B]),delete this._timers[B]),q.uses>0||(q.hasData()&&q.state!=="reloading"?this._cache.add(q.tileID,q,q.getExpiryTimeout()):(q.aborted=!0,this._abortTile(q),this._unloadTile(q))))},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,q,ie){var ue=this,me=[],ye=this.transform;if(!ye)return me;for(var Me=ie?ye.getCameraQueryGeometry(B):B,Ne=B.map(function(ur){return ye.pointCoordinate(ur)}),We=Me.map(function(ur){return ye.pointCoordinate(ur)}),rt=this.getIds(),vt=1/0,Lt=1/0,xt=-1/0,kt=-1/0,gt=0,Rt=We;gt<Rt.length;gt+=1){var zt=Rt[gt];vt=Math.min(vt,zt.x),Lt=Math.min(Lt,zt.y),xt=Math.max(xt,zt.x),kt=Math.max(kt,zt.y)}for(var Ut=function(ur){var kr=ue._tiles[rt[ur]];if(!kr.holdingForFade()){var wr=kr.tileID,Qr=Math.pow(2,ye.zoom-kr.tileID.overscaledZ),Kr=q*kr.queryPadding*e.EXTENT/kr.tileSize/Qr,pn=[wr.getTilePoint(new e.MercatorCoordinate(vt,Lt)),wr.getTilePoint(new e.MercatorCoordinate(xt,kt))];if(pn[0].x-Kr<e.EXTENT&&pn[0].y-Kr<e.EXTENT&&pn[1].x+Kr>=0&&pn[1].y+Kr>=0){var ln=Ne.map(function(Zn){return wr.getTilePoint(Zn)}),Vn=We.map(function(Zn){return wr.getTilePoint(Zn)});me.push({tile:kr,tileID:wr,queryGeometry:ln,cameraQueryGeometry:Vn,scale:Qr})}}},tr=0;tr<rt.length;tr++)Ut(tr);return me},z.prototype.getVisibleCoordinates=function(B){for(var q=this,ie=this.getRenderableIds(B).map(function(Me){return q._tiles[Me].tileID}),ue=0,me=ie;ue<me.length;ue+=1){var ye=me[ue];ye.posMatrix=this.transform.calculatePosMatrix(ye.toUnwrapped())}return ie},z.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(ot(this._source.type))for(var B in this._tiles){var q=this._tiles[B];if(q.fadeEndTime!==void 0&&q.fadeEndTime>=e.browser.now())return!0}return!1},z.prototype.setFeatureState=function(B,q,ie){B=B||"_geojsonTileLayer",this._state.updateState(B,q,ie)},z.prototype.removeFeatureState=function(B,q,ie){B=B||"_geojsonTileLayer",this._state.removeFeatureState(B,q,ie)},z.prototype.getFeatureState=function(B,q){return B=B||"_geojsonTileLayer",this._state.getState(B,q)},z.prototype.setDependencies=function(B,q,ie){var ue=this._tiles[B];ue&&ue.setDependencies(q,ie)},z.prototype.reloadTilesForDependencies=function(B,q){for(var ie in this._tiles)this._tiles[ie].hasDependency(B,q)&&this._reloadTile(ie,"reloading");this._cache.filter(function(ue){return!ue.hasDependency(B,q)})},z}(e.Evented);function tt(C,z){var B=Math.abs(2*C.wrap)-+(C.wrap<0),q=Math.abs(2*z.wrap)-+(z.wrap<0);return C.overscaledZ-z.overscaledZ||q-B||z.canonical.y-C.canonical.y||z.canonical.x-C.canonical.x}function ot(C){return C==="raster"||C==="image"||C==="video"}function at(){return new e.window.Worker(le.workerUrl)}Ve.maxOverzooming=10,Ve.maxUnderzooming=3;var _t="mapboxgl_preloaded_worker_pool",bt=function(){this.active={}};bt.prototype.acquire=function(C){if(!this.workers)for(this.workers=[];this.workers.length<bt.workerCount;)this.workers.push(new at);return this.active[C]=!0,this.workers.slice()},bt.prototype.release=function(C){delete this.active[C],this.numActive()===0&&(this.workers.forEac
94h(function(z){z.terminate()}),this.workers=null)},bt.prototype.isPreloaded=function(){return!!this.active[_t]},bt.prototype.numActive=function(){return Object.keys(this.active).length};var jt,Nt=Math.floor(e.browser.hardwareConcurrency/2);function $e(){return jt||(jt=new bt),jt}function yt(C,z){var B={};for(var q in C)q!=="ref"&&(B[q]=C[q]);return e.refProperties.forEach(function(ie){ie in z&&(B[ie]=z[ie])}),B}function Ot(C){C=C.slice();for(var z=Object.create(null),B=0;B<C.length;B++)z[C[B].id]=C[B];for(var q=0;q<C.length;q++)"ref"in C[q]&&(C[q]=yt(C[q],z[C[q].ref]));return C}bt.workerCount=Math.max(Math.min(Nt,6),1);var Mt={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 Pt(C,z,B){B.push({command:Mt.addSource,args:[C,z[C]]})}function Le(C,z,B){z.push({command:Mt.removeSource,args:[C]}),B[C]=!0}function Xe(C,z,B,q){Le(C,B,q),Pt(C,z,B)}function it(C,z,B){var q;for(q in C[B])if(C[B].hasOwnProperty(q)&&q!=="data"&&!e.deepEqual(C[B][q],z[B][q]))return!1;for(q in z[B])if(z[B].hasOwnProperty(q)&&q!=="data"&&!e.deepEqual(C[B][q],z[B][q]))return!1;return!0}function At(C,z,B,q,ie,ue){var me;
vendor: 9,094 bytes, line 94
94for(me in z=z||{},C=C||{})C.hasOwnProperty(me)&&(e.deepEqual(C[me],z[me])||B.push({command:ue,args:[q,me,z[me],ie]}));for(me in z)z.hasOwnProperty(me)&&!C.hasOwnProperty(me)&&(e.deepEqual(C[me],z[me])||B.push({command:ue,args:[q,me,z[me],ie]}))}function It(C){return C.id}function Zt(C,z){return C[z.id]=z,C}function Jt(C,z){if(!C)return[{command:Mt.setStyle,args:[z]}];var B=[];try{if(!e.deepEqual(C.version,z.version))return[{command:Mt.setStyle,args:[z]}];e.deepEqual(C.center,z.center)||B.push({command:Mt.setCenter,args:[z.center]}),e.deepEqual(C.zoom,z.zoom)||B.push({command:Mt.setZoom,args:[z.zoom]}),e.deepEqual(C.bearing,z.bearing)||B.push({command:Mt.setBearing,args:[z.bearing]}),e.deepEqual(C.pitch,z.pitch)||B.push({command:Mt.setPitch,args:[z.pitch]}),e.deepEqual(C.sprite,z.sprite)||B.push({command:Mt.setSprite,args:[z.sprite]}),e.deepEqual(C.glyphs,z.glyphs)||B.push({command:Mt.setGlyphs,args:[z.glyphs]}),e.deepEqual(C.transition,z.transition)||B.push({command:Mt.setTransition,args:[z.transition]}),e.deepEqual(C.light,z.light)||B.push({command:Mt.setLight,args:[z.light]});var q={},ie=[];(function(me,ye,Me,Ne){var We;for(We in ye=ye||{},me=me||{})me.hasOwnProperty(We)&&(ye.hasOwnProperty(We)||Le(We,Me,Ne));for(We in ye)ye.hasOwnProperty(We)&&(me.hasOwnProperty(We)?e.deepEqual(me[We],ye[We])||(me[We].type==="geojson"&&ye[We].type==="geojson"&&it(me,ye,We)?Me.push({command:Mt.setGeoJSONSourceData,args:[We,ye[We].data]}):Xe(We,ye,Me,Ne)):Pt(We,ye,Me))})(C.sources,z.sources,ie,q);var ue=[];C.layers&&C.layers.forEach(function(me){q[me.source]?B.push({command:Mt.removeLayer,args:[me.id]}):ue.push(me)}),B=B.concat(ie),function(me,ye,Me){ye=ye||[];var Ne,We,rt,vt,Lt,xt,kt,gt=(me=me||[]).map(It),Rt=ye.map(It),zt=me.reduce(Zt,{}),Ut=ye.reduce(Zt,{}),tr=gt.slice(),ur=Object.create(null);for(Ne=0,We=0;Ne<gt.length;Ne++)rt=gt[Ne],Ut.hasOwnProperty(rt)?We++:(Me.push({command:Mt.removeLayer,args:[rt]}),tr.splice(tr.indexOf(rt,We),1));for(Ne=0,We=0;Ne<Rt.length;Ne++)rt=Rt[Rt.length-1-Ne],tr[tr.length-1-Ne]!==rt&&(zt.hasOwnProperty(rt)?(Me.push({command:Mt.removeLayer,args:[rt]}),tr.splice(tr.lastIndexOf(rt,tr.length-We),1)):We++,xt=tr[tr.length-Ne],Me.push({command:Mt.addLayer,args:[Ut[rt],xt]}),tr.splice(tr.length-Ne,0,rt),ur[rt]=!0);for(Ne=0;Ne<Rt.length;Ne++)if(vt=zt[rt=Rt[Ne]],Lt=Ut[rt],!ur[rt]&&!e.deepEqual(vt,Lt))if(e.deepEqual(vt.source,Lt.source)&&e.deepEqual(vt["source-layer"],Lt["source-layer"])&&e.deepEqual(vt.type,Lt.type)){for(kt in At(vt.layout,Lt.layout,Me,rt,null,Mt.setLayoutProperty),At(vt.paint,Lt.paint,Me,rt,null,Mt.setPaintProperty),e.deepEqual(vt.filter,Lt.filter)||Me.push({command:Mt.setFilter,args:[rt,Lt.filter]}),e.deepEqual(vt.minzoom,Lt.minzoom)&&e.deepEqual(vt.maxzoom,Lt.maxzoom)||Me.push({command:Mt.setLayerZoomRange,args:[rt,Lt.minzoom,Lt.maxzoom]}),vt)vt.hasOwnProperty(kt)&&kt!=="layout"&&kt!=="paint"&&kt!=="filter"&&kt!=="metadata"&&kt!=="minzoom"&&kt!=="maxzoom"&&(kt.indexOf("paint.")===0?At(vt[kt],Lt[kt],Me,rt,kt.slice(6),Mt.setPaintProperty):e.deepEqual(vt[kt],Lt[kt])||Me.push({command:Mt.setLayerProperty,args:[rt,kt,Lt[kt]]}));for(kt in Lt)Lt.hasOwnProperty(kt)&&!vt.hasOwnProperty(kt)&&kt!=="layout"&&kt!=="paint"&&kt!=="filter"&&kt!=="metadata"&&kt!=="minzoom"&&kt!=="maxzoom"&&(kt.indexOf("paint.")===0?At(vt[kt],Lt[kt],Me,rt,kt.slice(6),Mt.setPaintProperty):e.deepEqual(vt[kt],Lt[kt])||Me.push({command:Mt.setLayerProperty,args:[rt,kt,Lt[kt]]}))}else Me.push({command:Mt.removeLayer,args:[rt]}),xt=tr[tr.lastIndexOf(rt)+1],Me.push({command:Mt.addLayer,args:[Lt,xt]})}(ue,z.layers,B)}catch(me){console.warn("Unable to compute style diff:",me),B=[{command:Mt.setStyle,args:[z]}]}return B}var Vt=function(C,z){this.reset(C,z)};Vt.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},Vt.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],q=C*this.paddedLength+this.padding;B<q&&z<this._distances.length;)B=this._distances[++z];var ie=z-1,ue=this._distances[ie],me=B-ue,ye=me>0?(q-ue)/me:0;return this.points[ie].mult(1-ye).add(this.points[z].mult(ye))};var pr=function(C,z,B){var q=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++)q.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 Ir(C,z,B,q,ie){var ue=e.create();return z?(e.scale(ue,ue,[1/ie,1/ie,1]),B||e.rotateZ(ue,ue,q.angle)):e.multiply(ue,q.labelPlaneMatrix,C),ue}function fr(C,z,B,q,ie){if(z){var ue=e.clone(C);return e.scale(ue,ue,[ie,ie,1]),B||e.rotateZ(ue,ue,-q.angle),ue}return q.glCoordMatrix}function $t(C,z){var B=[C.x,C.y,0,1];Mn(B,B,z);var q=B[3];return{point:new e.Point(B[0]/q,B[1]/q),signedDistanceFromCamera:q}}function er(C,z){return .5+C/z*.5}function ar(C,z){var B=C[0]/C[3],q=C[1]/C[3];return B>=-z[0]&&B<=z[0]&&q>=-z[1]&&q<=z[1]}function hr(C,z,B,q,ie,ue,me,ye){var Me=q?C.textSizeData:C.iconSizeData,Ne=e.evaluateSizeForZoom(Me,B.transform.zoom),We=[256/B.width*2+1,256/B.height*2+1],rt=q?C.text.dynamicLayoutVertexArray:C.icon.dynamicLayoutVertexArray;rt.clear();for(var vt=C.lineVertexArray,Lt=q?C.text.placedSymbolArray:C.icon.placedSymbolArray,xt=B.transform.width/B.transform.height,kt=!1,gt=0;gt<Lt.length;gt++){var Rt=Lt.get(gt);if(Rt.hidden||Rt.writingMode===e.WritingMode.vertical&&!kt)mn(Rt.numGlyphs,rt);else{kt=!1;var zt=[Rt.anchorX,Rt.anchorY,0,1];if(e.transformMat4(zt,zt,z),ar(zt,We)){var Ut=zt[3],tr=er(B.transform.cameraToCenterDistance,Ut),ur=e.evaluateSizeForFeature(Me,Ne,Rt),kr=me?ur/tr:ur*tr,wr=new e.Point(Rt.anchorX,Rt.anchorY),Qr=$t(wr,ie).point,Kr={},pn=Ur(Rt,kr,!1,ye,z,ie,ue,C.glyphOffsetArray,vt,rt,Qr,wr,Kr,xt);kt=pn.useVertical,(pn.notEnoughRoom||kt||pn.needsFlipping&&Ur(Rt,kr,!0,ye,z,ie,ue,C.glyphOffsetArray,vt,rt,Qr,wr,Kr,xt).notEnoughRoom)&&mn(Rt.numGlyphs,rt)}else mn(Rt.numGlyphs,rt)}}q?C.text.dynamicLayoutVertexBuffer.updateData(rt):C.icon.dynamicLayoutVertexBuffer.updateData(rt)}function vr(C,z,B,q,ie,ue,me,ye,Me,Ne,We){var rt=ye.glyphStartIndex+ye.numGlyphs,vt=ye.lineStartIndex,Lt=ye.lineStartIndex+ye.lineLength,xt=z.getoffsetX(ye.glyphStartIndex),kt=z.getoffsetX(rt-1),gt=rn(C*xt,B,q,ie,ue,me,ye.segment,vt,Lt,Me,Ne,We);if(!gt)return null;var Rt=rn(C*kt,B,q,ie,ue,me,ye.segment,vt,Lt,Me,Ne,We);return Rt?{first:gt,last:Rt}:null}function Pr(C,z,B,q){return C===e.WritingMode.horizontal&&Math.abs(B.y-z.y)>Math.abs(B.x-z.x)*q?{useVertical:!0}:(C===e.WritingMode.vertical?z.y<B.y:z.x>B.x)?{needsFlipping:!0}:null}function Ur(C,z,B,q,ie,ue,me,ye,Me,Ne,We,rt,vt,Lt){var xt,kt=z/24,gt=C.lineOffsetX*kt,Rt=C.lineOffsetY*kt;if(C.numGlyphs>1){var zt=C.glyphStartIndex+C.numGlyphs,Ut=C.lineStartIndex,tr=C.lineStartIndex+C.lineLength,ur=vr(kt,ye,gt,Rt,B,We,rt,C,Me,ue,vt);if(!ur)return{notEnoughRoom:!0};var kr=$t(ur.first.point,me).point,wr=$t(ur.last.point,me).point;if(q&&!B){var Qr=Pr(C.writingMode,kr,wr,Lt);if(Qr)return Qr}xt=[ur.first];for(var Kr=C.glyphStartIndex+1;Kr<zt-1;Kr++)xt.push(rn(kt*ye.getoffsetX(Kr),gt,Rt,B,We,rt,C.segment,Ut,tr,Me,ue,vt));xt.push(ur.last)}else{if(q&&!B){var pn=$t(rt,ie).point,ln=C.lineStartIndex+C.segment+1,Vn=new e.Point(Me.getx(ln),Me.gety(ln)),Zn=$t(Vn,ie),fa=Zn.signedDistanceFromCamera>0?Zn.point:qr(rt,Vn,pn,1,ie),Hr=Pr(C.writingMode,pn,fa,Lt);if(Hr)return Hr}var Tn=rn(kt*ye.getoffsetX(C.glyphStartIndex),gt,Rt,B,We,rt,C.segment,C.lineStartIndex,C.lineStartIndex+C.lineLength,Me,ue,vt);if(!Tn)return{notEnoughRoom:!0};xt=[Tn]}for(var Xn=0,Gn=xt;Xn<Gn.length;Xn+=1){var aa=Gn[Xn];e.addDynamicAttributes(Ne,aa.point,aa.angle)}return{}}function qr(C,z,B,q,ie){var ue=$t(C.add(C.sub(z)._unit()),ie).point,me=B.sub(ue);return B.add(me._mult(q/me.mag()))}function rn(C,z,B,q,ie,ue,me,ye,Me,Ne,We,rt){var vt=q?C-z:C+z,Lt=vt>0?1:-1,xt=0;q&&(Lt*=-1,xt=Math.PI),Lt<0&&(xt+=Math.PI);for(var kt=Lt>0?ye+me:ye+me+1,gt=ie,Rt=ie,zt=0,Ut=0,tr=Math.abs(vt),ur=[];zt+Ut<=tr;){if((kt+=Lt)<ye||kt>=Me)return null;if(Rt=gt,ur.push(gt),(gt=rt[kt])===void 0){var kr=new e.Point(Ne.getx(kt),Ne.gety(kt)),wr=$t(kr,We);if(wr.signedDistanceFromCamera>0)gt=rt[kt]=wr.point;else{var Qr=kt-Lt;gt=qr(zt===0?ue:new e.Point(Ne.getx(Qr),Ne.gety(Qr)),kr,Rt,tr-zt+1,We)}}zt+=Ut,Ut=Rt.dist(gt)}var Kr=(tr-zt)/Ut,pn=gt.sub(Rt),ln=pn.mult(Kr)._add(Rt);ln._add(pn._unit()._perp()._mult(B*Lt));var Vn=xt+Math.atan2(gt.y-Rt.y,gt.x-Rt.x);return ur.push(ln),{point:ln,angle:Vn,path:ur}}pr.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},pr.prototype.insert=function(C,z,B,q,ie){this._forEachCell(z,B,q,ie,this._insertBoxCell,this.boxUid++),this.boxKeys.push(C),this.bboxes.push(z),this.bboxes.push(B),this.bboxes.push(q),this.bboxes.push(ie)}
vendor: 4,184 bytes, line 94
94,pr.prototype.insertCircle=function(C,z,B,q){this._forEachCell(z-q,B-q,z+q,B+q,this._insertCircleCell,this.circleUid++),this.circleKeys.push(C),this.circles.push(z),this.circles.push(B),this.circles.push(q)},pr.prototype._insertBoxCell=function(C,z,B,q,ie,ue){this.boxCells[ie].push(ue)},pr.prototype._insertCircleCell=function(C,z,B,q,ie,ue){this.circleCells[ie].push(ue)},pr.prototype._query=function(C,z,B,q,ie,ue){if(B<0||C>this.width||q<0||z>this.height)return!ie&&[];var me=[];if(C<=0&&z<=0&&this.width<=B&&this.height<=q){if(ie)return!0;for(var ye=0;ye<this.boxKeys.length;ye++)me.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 Ne=this.circles[3*Me],We=this.circles[3*Me+1],rt=this.circles[3*Me+2];me.push({key:this.circleKeys[Me],x1:Ne-rt,y1:We-rt,x2:Ne+rt,y2:We+rt})}return ue?me.filter(ue):me}var vt={hitTest:ie,seenUids:{box:{},circle:{}}};return this._forEachCell(C,z,B,q,this._queryCell,me,vt,ue),ie?me.length>0:me},pr.prototype._queryCircle=function(C,z,B,q,ie){var ue=C-B,me=C+B,ye=z-B,Me=z+B;if(me<0||ue>this.width||Me<0||ye>this.height)return!q&&[];var Ne=[],We={hitTest:q,circle:{x:C,y:z,radius:B},seenUids:{box:{},circle:{}}};return this._forEachCell(ue,ye,me,Me,this._queryCellCircle,Ne,We,ie),q?Ne.length>0:Ne},pr.prototype.query=function(C,z,B,q,ie){return this._query(C,z,B,q,!1,ie)},pr.prototype.hitTest=function(C,z,B,q,ie){return this._query(C,z,B,q,!0,ie)},pr.prototype.hitTestCircle=function(C,z,B,q){return this._queryCircle(C,z,B,!0,q)},pr.prototype._queryCell=function(C,z,B,q,ie,ue,me,ye){var Me=me.seenUids,Ne=this.boxCells[ie];if(Ne!==null)for(var We=this.bboxes,rt=0,vt=Ne;rt<vt.length;rt+=1){var Lt=vt[rt];if(!Me.box[Lt]){Me.box[Lt]=!0;var xt=4*Lt;if(C<=We[xt+2]&&z<=We[xt+3]&&B>=We[xt+0]&&q>=We[xt+1]&&(!ye||ye(this.boxKeys[Lt]))){if(me.hitTest)return ue.push(!0),!0;ue.push({key:this.boxKeys[Lt],x1:We[xt],y1:We[xt+1],x2:We[xt+2],y2:We[xt+3]})}}}var kt=this.circleCells[ie];if(kt!==null)for(var gt=this.circles,Rt=0,zt=kt;Rt<zt.length;Rt+=1){var Ut=zt[Rt];if(!Me.circle[Ut]){Me.circle[Ut]=!0;var tr=3*Ut;if(this._circleAndRectCollide(gt[tr],gt[tr+1],gt[tr+2],C,z,B,q)&&(!ye||ye(this.circleKeys[Ut]))){if(me.hitTest)return ue.push(!0),!0;var ur=gt[tr],kr=gt[tr+1],wr=gt[tr+2];ue.push({key:this.circleKeys[Ut],x1:ur-wr,y1:kr-wr,x2:ur+wr,y2:kr+wr})}}}},pr.prototype._queryCellCircle=function(C,z,B,q,ie,ue,me,ye){var Me=me.circle,Ne=me.seenUids,We=this.boxCells[ie];if(We!==null)for(var rt=this.bboxes,vt=0,Lt=We;vt<Lt.length;vt+=1){var xt=Lt[vt];if(!Ne.box[xt]){Ne.box[xt]=!0;var kt=4*xt;if(this._circleAndRectCollide(Me.x,Me.y,Me.radius,rt[kt+0],rt[kt+1],rt[kt+2],rt[kt+3])&&(!ye||ye(this.boxKeys[xt])))return ue.push(!0),!0}}var gt=this.circleCells[ie];if(gt!==null)for(var Rt=this.circles,zt=0,Ut=gt;zt<Ut.length;zt+=1){var tr=Ut[zt];if(!Ne.circle[tr]){Ne.circle[tr]=!0;var ur=3*tr;if(this._circlesCollide(Rt[ur],Rt[ur+1],Rt[ur+2],Me.x,Me.y,Me.radius)&&(!ye||ye(this.circleKeys[tr])))return ue.push(!0),!0}}},pr.prototype._forEachCell=function(C,z,B,q,ie,ue,me,ye){for(var Me=this._convertToXCellCoord(C),Ne=this._convertToYCellCoord(z),We=this._convertToXCellCoord(B),rt=this._convertToYCellCoord(q),vt=Me;vt<=We;vt++)for(var Lt=Ne;Lt<=rt;Lt++){var xt=this.xCellCount*Lt+vt;if(ie.call(this,C,z,B,q,xt,ue,me,ye))return}},pr.prototype._convertToXCellCoord=function(C){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(C*this.xScale)))},pr.prototype._convertToYCellCoord=function(C){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(C*this.yScale)))},pr.prototype._circlesCollide=function(C,z,B,q,ie,ue){var me=q-C,ye=ie-z,Me=B+ue;return Me*Me>me*me+ye*ye},pr.prototype._circleAndRectCollide=function(C,z,B,q,ie,ue,me){var ye=(ue-q)/2,Me=Math.abs(C-(q+ye));if(Me>ye+B)return!1;var Ne=(me-ie)/2,We=Math.abs(z-(ie+Ne));if(We>Ne+B)return!1;if(Me<=ye||We<=Ne)return!0;var rt=Me-ye,vt=We-Ne;return rt*rt+vt*vt<=B*B};var An=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function mn(C,z){for(var B=0;B<C;B++){var q=z.length;z.resize(q+4),z.float32.set(An,3*q)}}function Mn(C,z,B){var q=z[0],ie=z[1];
vendor: 16,776 bytes, line 94
94return C[0]=B[0]*q+B[4]*ie+B[12],C[1]=B[1]*q+B[5]*ie+B[13],C[3]=B[3]*q+B[7]*ie+B[15],C}var Xr=function(C,z,B){z===void 0&&(z=new pr(C.width+200,C.height+200,25)),B===void 0&&(B=new pr(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 Er(C,z,B){return z*(e.EXTENT/(C.tileSize*Math.pow(2,B-C.tileID.overscaledZ)))}Xr.prototype.placeCollisionBox=function(C,z,B,q,ie){var ue=this.projectAndGetPerspectiveRatio(q,C.anchorPointX,C.anchorPointY),me=B*ue.perspectiveRatio,ye=C.x1*me+ue.point.x,Me=C.y1*me+ue.point.y,Ne=C.x2*me+ue.point.x,We=C.y2*me+ue.point.y;return!this.isInsideGrid(ye,Me,Ne,We)||!z&&this.grid.hitTest(ye,Me,Ne,We,ie)?{box:[],offscreen:!1}:{box:[ye,Me,Ne,We],offscreen:this.isOffscreen(ye,Me,Ne,We)}},Xr.prototype.placeCollisionCircles=function(C,z,B,q,ie,ue,me,ye,Me,Ne,We,rt,vt){var Lt=[],xt=new e.Point(z.anchorX,z.anchorY),kt=$t(xt,ue),gt=er(this.transform.cameraToCenterDistance,kt.signedDistanceFromCamera),Rt=(Ne?ie/gt:ie*gt)/e.ONE_EM,zt=$t(xt,me).point,Ut=vr(Rt,q,z.lineOffsetX*Rt,z.lineOffsetY*Rt,!1,zt,xt,z,B,me,{}),tr=!1,ur=!1,kr=!0;if(Ut){for(var wr=.5*rt*gt+vt,Qr=new e.Point(-100,-100),Kr=new e.Point(this.screenRightBoundary,this.screenBottomBoundary),pn=new Vt,ln=Ut.first,Vn=Ut.last,Zn=[],fa=ln.path.length-1;fa>=1;fa--)Zn.push(ln.path[fa]);for(var Hr=1;Hr<Vn.path.length;Hr++)Zn.push(Vn.path[Hr]);var Tn=2.5*wr;if(ye){var Xn=Zn.map(function(_o){return $t(_o,ye)});Zn=Xn.some(function(_o){return _o.signedDistanceFromCamera<=0})?[]:Xn.map(function(_o){return _o.point})}var Gn=[];if(Zn.length>0){for(var aa=Zn[0].clone(),pa=Zn[0].clone(),Ea=1;Ea<Zn.length;Ea++)aa.x=Math.min(aa.x,Zn[Ea].x),aa.y=Math.min(aa.y,Zn[Ea].y),pa.x=Math.max(pa.x,Zn[Ea].x),pa.y=Math.max(pa.y,Zn[Ea].y);Gn=aa.x>=Qr.x&&pa.x<=Kr.x&&aa.y>=Qr.y&&pa.y<=Kr.y?[Zn]:pa.x<Qr.x||aa.x>Kr.x||pa.y<Qr.y||aa.y>Kr.y?[]:e.clipLine([Zn],Qr.x,Qr.y,Kr.x,Kr.y)}for(var ea=0,ba=Gn;ea<ba.length;ea+=1){var va=ba[ea];pn.reset(va,.25*wr);var Pa=0;Pa=pn.length<=.5*wr?1:Math.ceil(pn.paddedLength/Tn)+1;for(var _a=0;_a<Pa;_a++){var Ia=_a/Math.max(Pa-1,1),Va=pn.lerp(Ia),fi=Va.x+100,Oi=Va.y+100;Lt.push(fi,Oi,wr,0);var zi=fi-wr,ui=Oi-wr,Ai=fi+wr,yi=Oi+wr;if(kr=kr&&this.isOffscreen(zi,ui,Ai,yi),ur=ur||this.isInsideGrid(zi,ui,Ai,yi),!C&&this.grid.hitTestCircle(fi,Oi,wr,We)&&(tr=!0,!Me))return{circles:[],offscreen:!1,collisionDetected:tr}}}}return{circles:!Me&&tr||!ur?[]:Lt,offscreen:kr,collisionDetected:tr}},Xr.prototype.queryRenderedSymbols=function(C){if(C.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var z=[],B=1/0,q=1/0,ie=-1/0,ue=-1/0,me=0,ye=C;me<ye.length;me+=1){var Me=ye[me],Ne=new e.Point(Me.x+100,Me.y+100);B=Math.min(B,Ne.x),q=Math.min(q,Ne.y),ie=Math.max(ie,Ne.x),ue=Math.max(ue,Ne.y),z.push(Ne)}for(var We={},rt={},vt=0,Lt=this.grid.query(B,q,ie,ue).concat(this.ignoredGrid.query(B,q,ie,ue));vt<Lt.length;vt+=1){var xt=Lt[vt],kt=xt.key;if(We[kt.bucketInstanceId]===void 0&&(We[kt.bucketInstanceId]={}),!We[kt.bucketInstanceId][kt.featureIndex]){var gt=[new e.Point(xt.x1,xt.y1),new e.Point(xt.x2,xt.y1),new e.Point(xt.x2,xt.y2),new e.Point(xt.x1,xt.y2)];e.polygonIntersectsPolygon(z,gt)&&(We[kt.bucketInstanceId][kt.featureIndex]=!0,rt[kt.bucketInstanceId]===void 0&&(rt[kt.bucketInstanceId]=[]),rt[kt.bucketInstanceId].push(kt.featureIndex))}}return rt},Xr.prototype.insertCollisionBox=function(C,z,B,q,ie){var ue={bucketInstanceId:B,featureIndex:q,collisionGroupID:ie};(z?this.ignoredGrid:this.grid).insert(ue,C[0],C[1],C[2],C[3])},Xr.prototype.insertCollisionCircles=function(C,z,B,q,ie){for(var ue=z?this.ignoredGrid:this.grid,me={bucketInstanceId:B,featureIndex:q,collisionGroupID:ie},ye=0;ye<C.length;ye+=4)ue.insertCircle(me,C[ye],C[ye+1],C[ye+2])},Xr.prototype.projectAndGetPerspectiveRatio=function(C,z,B){var q=[z,B,0,1];return Mn(q,q,C),{point:new e.Point((q[0]/q[3]+1)/2*this.transform.width+100,(-q[1]/q[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/q[3]*.5}},Xr.prototype.isOffscreen=function(C,z,B,q){return B<100||C>=this.screenRightBoundary||q<100||z>this.screenBottomBoundary},Xr.prototype.isInsideGrid=function(C,z,B,q){return B>=0&&C<this.gridRightBoundary&&q>=0&&z<this.gridBottomBoundary},Xr.prototype.getViewportMatrix=function(){var C=e.identity([]);return e.translate(C,C,[-100,-100,0]),C};var on=function(C,z,B,q){this.opacity=C?Math.max(0,Math.min(1,C.opacity+(C.placed?z:-z))):q&&B?1:0,this.placed=B};on.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Un=function(C,z,B,q,ie){this.text=new on(C?C.text:null,z,B,ie),this.icon=new on(C?C.icon:null,z,q,ie)};Un.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Tr=function(C,z,B){this.text=C,this.icon=z,this.skipFade=B},en=function(){this.invProjMatrix=e.create(),this.viewportMatrix=e.create(),this.circles=[]},$r=function(C,z,B,q,ie){this.bucketInstanceId=C,this.featureIndex=z,this.sourceLayerIndex=B,this.bucketIndex=q,this.tileID=ie},Rr=function(C){this.crossSourceCollisions=C,this.maxGroupID=0,this.collisionGroups={}};function Pn(C,z,B,q,ie){var ue=e.getAnchorAlignment(C),me=-(ue.horizontalAlign-.5)*z,ye=-(ue.verticalAlign-.5)*B,Me=e.evaluateVariableOffset(C,q);return new e.Point(me+Me[0]*ie,ye+Me[1]*ie)}function Nn(C,z,B,q,ie,ue){var me=C.x1,ye=C.x2,Me=C.y1,Ne=C.y2,We=C.anchorPointX,rt=C.anchorPointY,vt=new e.Point(z,B);return q&&vt._rotate(ie?ue:-ue),{x1:me+vt.x,y1:Me+vt.y,x2:ye+vt.x,y2:Ne+vt.y,anchorPointX:We,anchorPointY:rt}}Rr.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 hn=function(C,z,B,q){this.transform=C.clone(),this.collisionIndex=new Xr(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=z,this.retainedQueryData={},this.collisionGroups=new Rr(B),this.collisionCircleArrays={},this.prevPlacement=q,q&&(q.prevPlacement=void 0),this.placedOrientations={}};function Fn(C,z,B,q,ie){C.emplaceBack(z?1:0,B?1:0,q||0,ie||0),C.emplaceBack(z?1:0,B?1:0,q||0,ie||0),C.emplaceBack(z?1:0,B?1:0,q||0,ie||0),C.emplaceBack(z?1:0,B?1:0,q||0,ie||0)}hn.prototype.getBucketParts=function(C,z,B,q){var ie=B.getBucket(z),ue=B.latestFeatureIndex;if(ie&&ue&&z.id===ie.layerIds[0]){var me=B.collisionBoxArray,ye=ie.layers[0].layout,Me=Math.pow(2,this.transform.zoom-B.tileID.overscaledZ),Ne=B.tileSize/e.EXTENT,We=this.transform.calculatePosMatrix(B.tileID.toUnwrapped()),rt=ye.get("text-pitch-alignment")==="map",vt=ye.get("text-rotation-alignment")==="map",Lt=Er(B,1,this.transform.zoom),xt=Ir(We,rt,vt,this.transform,Lt),kt=null;if(rt){var gt=fr(We,rt,vt,this.transform,Lt);kt=e.multiply([],this.transform.labelPlaneMatrix,gt)}this.retainedQueryData[ie.bucketInstanceId]=new $r(ie.bucketInstanceId,ue,ie.sourceLayerIndex,ie.index,B.tileID);var Rt={bucket:ie,layout:ye,posMatrix:We,textLabelPlaneMatrix:xt,labelToScreenMatrix:kt,scale:Me,textPixelRatio:Ne,holdingForFade:B.holdingForFade(),collisionBoxArray:me,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(ie.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(ie.sourceID)};if(q)for(var zt=0,Ut=ie.sortKeyRanges;zt<Ut.length;zt+=1){var tr=Ut[zt],ur=tr.sortKey,kr=tr.symbolInstanceStart,wr=tr.symbolInstanceEnd;C.push({sortKey:ur,symbolInstanceStart:kr,symbolInstanceEnd:wr,parameters:Rt})}else C.push({symbolInstanceStart:0,symbolInstanceEnd:ie.symbolInstances.length,parameters:Rt})}},hn.prototype.attemptAnchorPlacement=function(C,z,B,q,ie,ue,me,ye,Me,Ne,We,rt,vt,Lt,xt){var kt,gt=[rt.textOffset0,rt.textOffset1],Rt=Pn(C,B,q,gt,ie),zt=this.collisionIndex.placeCollisionBox(Nn(z,Rt.x,Rt.y,ue,me,this.transform.angle),We,ye,Me,Ne.predicate);if(!(xt&&this.collisionIndex.placeCollisionBox(Nn(xt,Rt.x,Rt.y,ue,me,this.transform.angle),We,ye,Me,Ne.predicate).box.length===0)&&zt.box.length>0)return this.prevPlacement&&this.prevPlacement.variableOffsets[rt.crossTileID]&&this.prevPlacement.placements[rt.crossTileID]&&this.prevPlacement.placements[rt.crossTileID].text&&(kt=this.prevPlacement.variableOffsets[rt.crossTileID].anchor),this.variableOffsets[rt.crossTileID]={textOffset:gt,width:B,height:q,anchor:C,textBoxScale:ie,prevAnchor:kt},this.markUsedJustification(vt,C,rt,Lt),vt.allowVerticalPlacement&&(this.markUsedOrientation(vt,Lt,rt),this.placedOrientations[rt.crossTileID]=Lt),{shift:Rt,placedGlyphBoxes:zt}},hn.prototype.placeLayerBucketPart=function(C,z,B){var q=this,ie=C.parameters,ue=ie.bucket,me=ie.layout,ye=ie.posMatrix,Me=ie.textLabelPlaneMatrix,Ne=ie.labelToScreenMatrix,We=ie.textPixelRatio,rt=ie.holdingForFade,vt=ie.collisionBoxArray,Lt=ie.partiallyEvaluatedTextSize,xt=ie.collisionGroup,kt=me.get("text-optional"),gt=me.get("icon-optional"),Rt=me.get("text-allow-overlap"),zt=me.get("icon-allow-overlap"),Ut=me.get("text-rotation-alignment")==="map",tr=me.get("text-pitch-alignment")==="map",ur=me.get("icon-text-fit")!=="none",kr=me.get("symbol-z-order")==="viewport-y",wr=Rt&&(zt||!ue.hasIconData()||gt),Qr=zt&&(Rt||!ue.hasTextData()||kt);!ue.collisionArrays&&vt&&ue.deserializeCollisionBoxes(vt);var Kr=function(Hr,Tn){if(!z[Hr.crossTileID])if(rt)q.placements[Hr.crossTileID]=new Tr(!1,!1,!1);else{var Xn,Gn=!1,aa=!1,pa=!0,Ea=null,ea={box:null,offscreen:null},ba={box:null,offscreen:null},va=null,Pa=null,_a=0,Ia=0,Va=0;Tn.textFeatureIndex?_a=Tn.textFeatureIndex:Hr.useRuntimeCollisionCircles&&(_a=Hr.featureIndex),Tn.verticalTextFeatureIndex&&(Ia=Tn.verticalTextFeatureIndex);var fi=Tn.textBox;if(fi){var Oi=function(Si){var Oo=e.WritingMode.horizontal;if(ue.allowVerticalPlacement&&!Si&&q.prevPlacement){var zo=q.prevPlacement.placedOrientations[Hr.crossTileID];zo&&(q.placedOrientations[Hr.crossTileID]=zo,Oo=zo,q.markUsedOrientation(ue,Oo,Hr))}return Oo},zi=function(Si,Oo){if(ue.allowVerticalPlacement&&Hr.numVerticalGlyphVertices>0&&Tn.verticalTextBox)for(var zo=0,El=ue.writingModes;zo<El.length&&(El[zo]===e.WritingMode.vertical?(ea=Oo(),ba=ea):ea=Si(),!(ea&&ea.box&&ea.box.length));zo+=1);else ea=Si()};if(me.get("text-variable-anchor")){var ui=me.get("text-variable-anchor");if(q.prevPlacement&&q.prevPlacement.variableOffsets[Hr.crossTileID]){var Ai=q.prevPlacement.variableOffsets[Hr.crossTileID];ui.indexOf(Ai.anchor)>0&&(ui=ui.filter(function(Si){return Si!==Ai.anchor})).unshift(Ai.anchor)}var yi=function(Si,Oo,zo){for(var El=Si.x2-Si.x1,hu=Si.y2-Si.y1,Xo=Hr.textBoxScale,rc=ur&&!zt?Oo:null,yl={box:[],offscreen:!1},pu=Rt?2*ui.length:ui.length,Ys=0;Ys<pu;++Ys){var du=ui[Ys%ui.length],Ll=Ys>=ui.length,nc=q.attemptAnchorPlacement(du,Si,El,hu,Xo,Ut,tr,We,ye,xt,Ll,Hr,ue,zo,rc);if(nc&&(yl=nc.placedGlyphBoxes)&&yl.box&&yl.box.length){Gn=!0,Ea=nc.shift;break}}return yl};zi(function(){return yi(fi,Tn.iconBox,e.WritingMode.horizontal)},function(){var Si=Tn.verticalTextBox,Oo=ea&&ea.box&&ea.box.length;return ue.allowVerticalPlacement&&!Oo&&Hr.numVerticalGlyphVertices>0&&Si?yi(Si,Tn.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}}),ea&&(Gn=ea.box,pa=ea.offscreen);var _o=Oi(ea&&ea.box);if(!Gn&&q.prevPlacement){var Wi=q.prevPlacement.variableOffsets[Hr.crossTileID];Wi&&(q.variableOffsets[Hr.crossTileID]=Wi,q.markUsedJustification(ue,Wi.anchor,Hr,_o))}}else{var Fo=function(Si,Oo){var zo=q.collisionIndex.placeCollisionBox(Si,Rt,We,ye,xt.predicate);return zo&&zo.box&&zo.box.length&&(q.markUsedOrientation(ue,Oo,Hr),q.placedOrientations[Hr.crossTileID]=Oo),zo};zi(function(){return Fo(fi,e.WritingMode.horizontal)},function(){var Si=Tn.verticalTextBox;return ue.allowVerticalPlacement&&Hr.numVerticalGlyphVertices>0&&Si?Fo(Si,e.WritingMode.vertical):{box:null,offscreen:null}}),Oi(ea&&ea.box&&ea.box.length)}}if(Gn=(Xn=ea)&&Xn.box&&Xn.box.length>0,pa=Xn&&Xn.offscreen,Hr.useRuntimeCollisionCircles){var bs=ue.text.placedSymbolArray.get(Hr.centerJustifiedTextSymbolIndex),Us=e.evaluateSizeForFeature(ue.textSizeData,Lt,bs),dl=me.get("text-padding"),tl=Hr.collisionCircleDiameter;va=q.collisionIndex.placeCollisionCircles(Rt,bs,ue.lineVertexArray,ue.glyphOffsetArray,Us,ye,Me,Ne,B,tr,xt.predicate,tl,dl),Gn=Rt||va.circles.length>0&&!va.collisionDetected,pa=pa&&va.offscreen}if(Tn.iconFeatureIndex&&(Va=Tn.iconFeatureIndex),Tn.iconBox){var rl=function(Si){var Oo=ur&&Ea?Nn(Si,Ea.x,Ea.y,Ut,tr,q.transform.angle):Si;return q.collisionIndex.placeCollisionBox(Oo,zt,We,ye,xt.predicate)};aa=ba&&ba.box&&ba.box.length&&Tn.verticalIconBox?(Pa=rl(Tn.verticalIconBox)).box.length>0:(Pa=rl(Tn.iconBox)).box.length>0,pa=pa&&Pa.offscreen}var wo=kt||Hr.numHorizontalGlyphVertices===0&&Hr.numVerticalGlyphVertices===0,Gs=gt||Hr.numIconVertices===0;if(wo||Gs?Gs?wo||(aa=aa&&Gn):Gn=aa&&Gn:aa=Gn=aa&&Gn,Gn&&Xn&&Xn.box&&(ba&&ba.box&&Ia?q.collisionIndex.insertCollisionBox(Xn.box,me.get("text-ignore-placement"),ue.bucketInstanceId,Ia,xt.ID):q.collisionIndex.insertCollisionBox(Xn.box,me.get("text-ignore-placement"),ue.bucketInstanceId,_a,xt.ID)),aa&&Pa&&q.collisionIndex.insertCollisionBox(Pa.box,me.get("icon-ignore-placement"),ue.bucketInstanceId,Va,xt.ID),va&&(Gn&&q.collisionIndex.insertCollisionCircles(va.circles,me.get("text-ignore-placement"),ue.bucketInstanceId,_a,xt.ID),B)){var ml=ue.bucketInstanceId,ns=q.collisionCircleArrays[ml];ns===void 0&&(ns=q.collisionCircleArrays[ml]=new en);for(var vl=0;vl<va.circles.length;vl+=4)ns.circles.push(va.circles[vl+0]),ns.circles.push(va.circles[vl+1]),ns.circles.push(va.circles[vl+2]),ns.circles.push(va.collisionDetected?1:0)}q.placements[Hr.crossTileID]=new Tr(Gn||wr,aa||Qr,pa||ue.justReloaded),z[Hr.crossTileID]=!0}};if(kr)for(var pn=ue.getSortedSymbolIndexes(this.transform.angle),ln=pn.length-1;ln>=0;--ln){var Vn=pn[ln];Kr(ue.symbolInstances.get(Vn),ue.collisionArrays[Vn])}else for(var Zn=C.symbolInstanceStart;Zn<C.symbolInstanceEnd;Zn++)Kr(ue.symbolInstances.get(Zn),ue.collisionArrays[Zn]);if(B&&ue.bucketInstanceId in this.collisionCircleArrays){var fa=this.collisionCircleArrays[ue.bucketInstanceId];e.invert(fa.invProjMatrix,ye),fa.viewportMatrix=this.collisionIndex.getViewportMatrix()}ue.justReloaded=!1},hn.prototype.markUsedJustification=function(C,z,B,q){var ie,ue={left:B.leftJustifiedTextSymbolIndex,center:B.centerJustifiedTextSymbolIndex,right:B.rightJustifiedTextSymbolIndex};ie=q===e.WritingMode.vertical?B.verticalPlacedTextSymbolIndex:ue[e.getAnchorJustification(z)];for(var me=0,ye=[B.leftJustifiedTextSymbolIndex,B.centerJustifiedTextSymbolIndex,B.rightJustifiedTextSymbolIndex,B.verticalPlacedTextSymbolIndex];me<ye.length;me+=1){var Me=ye[me];Me>=0&&(C.text.placedSymbolArray.get(Me).crossTileID=ie>=0&&Me!==ie?0:B.crossTileID)}},hn.prototype.markUsedOrientation=function(C,z,B){for(var q=z===e.WritingMode.horizontal||z===e.WritingMode.horizontalOnly?z:0,ie=z===e.WritingMode.vertical?z:0,ue=0,me=[B.leftJustifiedTextSymbolIndex,B.centerJustifiedTextSymbolIndex,B.rightJustifiedTextSymbolIndex];ue<me.length;ue+=1){var ye=me[ue];C.text.placedSymbolArray.get(ye).placedOrientation=q}B.verticalPlacedTextSymbolIndex&&(C.text.placedSymbolArray.get(B.verticalPlacedTextSymbolIndex).placedOrientation=ie)},hn.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 q=z?z.symbolFadeChange(C):1,ie=z?z.opacities:{},ue=z?z.variableOffsets:{},me=z?z.placedOrientations:{};for(var ye in this.placements){var Me=this.placements[ye],Ne=ie[ye];Ne?(this.opacities[ye]=new Un(Ne,q,Me.text,Me.icon),B=B||Me.text!==Ne.text.placed||Me.icon!==Ne.icon.placed):(this.opacities[ye]=new Un(null,q,Me.text,Me.icon,Me.skipFade),B=B||Me.text||Me.icon)}for(var We in ie){var rt=ie[We];if(!this.opacities[We]){var vt=new Un(rt,q,!1,!1);vt.isHidden()||(this.opacities[We]=vt,B=B||rt.text.placed||rt.icon.placed)}}for(var Lt in ue)this.variableOffsets[Lt]||!this.opacities[Lt]||this.opacities[Lt].isHidden()||(this.variableOffsets[Lt]=ue[Lt]);for(var xt in me)this.placedOrientations[xt]||!this.opacities[xt]||this.opacities[xt].isHidden()||(this.placedOrientations[xt]=me[xt]);B?this.lastPlacementChangeTime=C:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=z?z.lastPlacementChangeTime:C)},hn.prototype.updateLayerOpacities=function(C,z){for(var B={},q=0,ie=z;q<ie.length;q+=1){var ue=ie[q],me=ue.getBucket(C);me&&ue.latestFeatureIndex&&C.id===me.layerIds[0]&&this.updateBucketOpacities(me,B,ue.collisionBoxArray)}},hn.prototype.updateBucketOpacities=function(C,z,B){var q=this;
vendor: 4,742 bytes, line 94
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 Un(null,0,!1,!1,!0),me=ie.get("text-allow-overlap"),ye=ie.get("icon-allow-overlap"),Me=ie.get("text-variable-anchor"),Ne=ie.get("text-rotation-alignment")==="map",We=ie.get("text-pitch-alignment")==="map",rt=ie.get("icon-text-fit")!=="none",vt=new Un(null,0,me&&(ye||!C.hasIconData()||ie.get("icon-optional")),ye&&(me||!C.hasTextData()||ie.get("text-optional")),!0);!C.collisionArrays&&B&&(C.hasIconCollisionBoxData()||C.hasTextCollisionBoxData())&&C.deserializeCollisionBoxes(B);for(var Lt=function(Rt,zt,Ut){for(var tr=0;tr<zt/4;tr++)Rt.opacityVertexArray.emplaceBack(Ut)},xt=function(Rt){var zt=C.symbolInstances.get(Rt),Ut=zt.numHorizontalGlyphVertices,tr=zt.numVerticalGlyphVertices,ur=zt.crossTileID,kr=z[ur],wr=q.opacities[ur];kr?wr=ue:wr||(wr=vt,q.opacities[ur]=wr),z[ur]=!0;var Qr=Ut>0||tr>0,Kr=zt.numIconVertices>0,pn=q.placedOrientations[zt.crossTileID],ln=pn===e.WritingMode.vertical,Vn=pn===e.WritingMode.horizontal||pn===e.WritingMode.horizontalOnly;if(Qr){var Zn=Br(wr.text),fa=ln?Dr:Zn;Lt(C.text,Ut,fa);var Hr=Vn?Dr:Zn;Lt(C.text,tr,Hr);var Tn=wr.text.isHidden();[zt.rightJustifiedTextSymbolIndex,zt.centerJustifiedTextSymbolIndex,zt.leftJustifiedTextSymbolIndex].forEach(function(Va){Va>=0&&(C.text.placedSymbolArray.get(Va).hidden=Tn||ln?1:0)}),zt.verticalPlacedTextSymbolIndex>=0&&(C.text.placedSymbolArray.get(zt.verticalPlacedTextSymbolIndex).hidden=Tn||Vn?1:0);var Xn=q.variableOffsets[zt.crossTileID];Xn&&q.markUsedJustification(C,Xn.anchor,zt,pn);var Gn=q.placedOrientations[zt.crossTileID];Gn&&(q.markUsedJustification(C,"left",zt,Gn),q.markUsedOrientation(C,Gn,zt))}if(Kr){var aa=Br(wr.icon),pa=!(rt&&zt.verticalPlacedIconSymbolIndex&&ln);if(zt.placedIconSymbolIndex>=0){var Ea=pa?aa:Dr;Lt(C.icon,zt.numIconVertices,Ea),C.icon.placedSymbolArray.get(zt.placedIconSymbolIndex).hidden=wr.icon.isHidden()}if(zt.verticalPlacedIconSymbolIndex>=0){var ea=pa?Dr:aa;Lt(C.icon,zt.numVerticalIconVertices,ea),C.icon.placedSymbolArray.get(zt.verticalPlacedIconSymbolIndex).hidden=wr.icon.isHidden()}}if(C.hasIconCollisionBoxData()||C.hasTextCollisionBoxData()){var ba=C.collisionArrays[Rt];if(ba){var va=new e.Point(0,0);if(ba.textBox||ba.verticalTextBox){var Pa=!0;if(Me){var _a=q.variableOffsets[ur];_a?(va=Pn(_a.anchor,_a.width,_a.height,_a.textOffset,_a.textBoxScale),Ne&&va._rotate(We?q.transform.angle:-q.transform.angle)):Pa=!1}ba.textBox&&Fn(C.textCollisionBox.collisionVertexArray,wr.text.placed,!Pa||ln,va.x,va.y),ba.verticalTextBox&&Fn(C.textCollisionBox.collisionVertexArray,wr.text.placed,!Pa||Vn,va.x,va.y)}var Ia=Boolean(!Vn&&ba.verticalIconBox);ba.iconBox&&Fn(C.iconCollisionBox.collisionVertexArray,wr.icon.placed,Ia,rt?va.x:0,rt?va.y:0),ba.verticalIconBox&&Fn(C.iconCollisionBox.collisionVertexArray,wr.icon.placed,!Ia,rt?va.x:0,rt?va.y:0)}}},kt=0;kt<C.symbolInstances.length;kt++)xt(kt);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 gt=this.collisionCircleArrays[C.bucketInstanceId];C.placementInvProjMatrix=gt.invProjMatrix,C.placementViewportMatrix=gt.viewportMatrix,C.collisionCircleArray=gt.circles,delete this.collisionCircleArrays[C.bucketInstanceId]}},hn.prototype.symbolFadeChange=function(C){return this.fadeDuration===0?1:(C-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},hn.prototype.zoomAdjustment=function(C){return Math.max(0,(this.transform.zoom-C)/1.5)},hn.prototype.hasTransitions=function(C){return this.stale||C-this.lastPlacementChangeTime<this.fadeDuration},hn.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},hn.prototype.setStale=function(){this.stale=!0};var ca=Math.pow(2,25),sr=Math.pow(2,24),Fr=Math.pow(2,17),Bt=Math.pow(2,16),lr=M
vendor: 5,504 bytes, line 94
94ath.pow(2,9),mr=Math.pow(2,8),Vr=Math.pow(2,1);function Br(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*ca+z*sr+B*Fr+z*Bt+B*lr+z*mr+B*Vr+z}var Dr=0,Or=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=[]};Or.prototype.continuePlacement=function(C,z,B,q,ie){for(var ue=this._bucketParts;this._currentTileIndex<C.length;){var me=C[this._currentTileIndex];if(z.getBucketParts(ue,q,me,this._sortAcrossTiles),this._currentTileIndex++,ie())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ue.sort(function(Me,Ne){return Me.sortKey-Ne.sortKey}));this._currentPartIndex<ue.length;){var ye=ue[this._currentPartIndex];if(z.placeLayerBucketPart(ye,this._seenCrossTileIDs,B),this._currentPartIndex++,ie())return!0}return!1};var xr=function(C,z,B,q,ie,ue,me){this.placement=new hn(C,ie,ue,me),this._currentPlacementIndex=z.length-1,this._forceFullPlacement=B,this._showCollisionBoxes=q,this._done=!1};xr.prototype.isDone=function(){return this._done},xr.prototype.continuePlacement=function(C,z,B){for(var q=this,ie=e.browser.now(),ue=function(){var Me=e.browser.now()-ie;return!q._forceFullPlacement&&Me>2};this._currentPlacementIndex>=0;){var me=z[C[this._currentPlacementIndex]],ye=this.placement.collisionIndex.transform.zoom;if(me.type==="symbol"&&(!me.minzoom||me.minzoom<=ye)&&(!me.maxzoom||me.maxzoom>ye)){if(this._inProgressLayer||(this._inProgressLayer=new Or(me)),this._inProgressLayer.continuePlacement(B[me.source],this.placement,this._showCollisionBoxes,me,ue))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},xr.prototype.commit=function(C){return this.placement.commit(C),this.placement};var br=512/e.EXTENT/2,_r=function(C,z,B){this.tileID=C,this.indexedSymbolInstances={},this.bucketInstanceId=B;for(var q=0;q<z.length;q++){var ie=z.get(q),ue=ie.key;this.indexedSymbolInstances[ue]||(this.indexedSymbolInstances[ue]=[]),this.indexedSymbolInstances[ue].push({crossTileID:ie.crossTileID,coord:this.getScaledCoordinates(ie,C)})}};_r.prototype.getScaledCoordinates=function(C,z){var B=z.canonical.z-this.tileID.canonical.z,q=br/Math.pow(2,B);return{x:Math.floor((z.canonical.x*e.EXTENT+C.anchorX)*q),y:Math.floor((z.canonical.y*e.EXTENT+C.anchorY)*q)}},_r.prototype.findMatches=function(C,z,B){for(var q=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 me=this.indexedSymbolInstances[ue.key];if(me)for(var ye=this.getScaledCoordinates(ue,z),Me=0,Ne=me;Me<Ne.length;Me+=1){var We=Ne[Me];if(Math.abs(We.coord.x-ye.x)<=q&&Math.abs(We.coord.y-ye.y)<=q&&!B[We.crossTileID]){B[We.crossTileID]=!0,ue.crossTileID=We.crossTileID;break}}}}};var Cr=function(){this.maxCrossTileID=0};Cr.prototype.generate=function(){return++this.maxCrossTileID};var Wr=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Wr.prototype.handleWrapJump=function(C){var z=Math.round((C-this.lng)/360);if(z!==0)for(var B in this.indexes){var q=this.indexes[B],ie={};for(var ue in q){var me=q[ue];me.tileID=me.tileID.unwrapTo(me.tileID.wrap+z),ie[me.tileID.key]=me}this.indexes[B]=ie}this.lng=C},Wr.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 q=0;q<z.symbolInstances.length;q++)z.symbolInstances.get(q).crossTileID=0;this.usedCrossTileIDs[C.overscaledZ]||(this.usedCrossTileIDs[C.overscaledZ]={});var ie=this.usedCrossTileIDs[C.overscaledZ];for(var ue in this.indexes){var me=this.indexes[ue];if(Number(ue)>C.overscaledZ)for(var ye in me){var Me=me[ye];Me.tileID.isChildOf(C)&&Me.findMatches(z.symbolInstances,C,ie)}else{var Ne=me[C.scaledTo(Number(ue)).key];Ne&&Ne.findMatches(z.symbolInstances,C,ie)}}for(var We=0;We<z.symbolInstances.length;We++){var rt=z.symbolInstances.get(We);rt.crossTileID||(rt.crossTileID=B.generate(),ie[rt.crossTileID]=!0)}return this.indexes[C.overscaledZ]===void 0&&(this.indexes[C.overscaledZ]={}),this.indexes[C.overscaledZ][C.key]=new _r(C,z.symbolInstances,z.bucketInstanceId),!0},Wr.prototype.removeBucketCrossTileIDs=function(C,z){for(var B in z.indexedSymbolInstances)for(var q=0,ie=z.indexedSymbolInstances[B];q<ie.length;q+=1){var ue=ie[q];delete this.usedCrossTileIDs[C][ue.crossTileID]}},Wr.prototype.removeStaleBuckets=function(C){var z=!1;for(var B in this.indexes){var q=this.indexes[B];for(var ie in q)C[q[ie].bucketInstanceId]||(this.removeBucketCrossTileIDs(B,q[ie]),delete q[ie],z=!0)}return z};var Gr=function(){this.layerIndexes={},this.crossTileIDs=new Cr,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Gr.prototype.addLayer=function(C,z,B){var q=this.layerIndexes[C.id];q===void 0&&(q=this.layerIndexes[C.id]=new Wr);var ie=!1,ue={};q.handleWrapJump(B);for(var me=0,ye=z;me<ye.length;me+=1){var Me=ye[me],Ne=Me.getBucket(C);Ne&&C.id===Ne.layerIds[0]&&(Ne.bucketInstanceId||(Ne.bucketInstanceId=++this.maxBucketInstanceId),q.addBucket(Me.tileID,Ne,this.crossTileIDs)&&(ie=!0),ue[Ne.bucketInstanceId]=!0)}return q.removeStaleBuckets(ue)&&(ie=!0),ie},Gr.prototype.pruneUnusedLayers=function(C){var z={};
94for(var B in C.forEach(function(q){z[q]=!0}),this.layerIndexes)z[B]||delete this.layerIndexes[B]};var tn=function(C,z){return e.emitValidationErrors(C,z&&z.filter(function(B){return B.identifier!=="source.canvas"}))},nn=e.pick(Mt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),vn=e.pick(Mt,["setCenter","setZoom","setBearing","setPitch"]),xn=function(){var C={},z=e.styleSpec.$version;for(var B in e.styleSpec.$root){var q=e.styleSpec.$root[B];if(q.required){var ie=null;(ie=B==="version"?z:q.type==="array"?[]:{})!=null&&(C[B]=ie)}}return C}(),bn=function(C){function z(B,q){var ie=this;q===void 0&&(q={}),C.call(this),this.map=B,this.dispatcher=new S($e(),this),this.imageManager=new p,this.imageManager.setEventedParent(this),this.glyphManager=new k(B._requestManager,q.localIdeographFontFamily),this.lineAtlas=new P(256,512),this.crossTileSymbolIndex=new Gr,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(me){var ye={pluginStatus:me.pluginStatus,pluginURL:me.pluginURL};ue.dispatcher.broadcast("syncRTLPluginState",ye,function(Me,Ne){if(e.triggerPluginCompletionEvent(Me),Ne&&Ne.every(function(rt){return rt}))for(var We in ue.sourceCaches)ue.sourceCaches[We].reload()})}),this.on("data",function(me){if(me.dataType==="source"&&me.sourceDataType==="metadata"){var ye=ie.sourceCaches[me.sourceId];if(ye){var Me=ye.getSource();if(Me&&Me.vectorLayerIds)for(var Ne in ie._layers){var We=ie._layers[Ne];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,q){var ie=this;q===void 0&&(q={}),this.fire(new e.Event("dataloading",{dataType:"style"}));var ue=typeof q.validate=="boolean"?q.validate:!e.isMapboxURL(B);B=this.map._requestManager.normalizeStyleURL(B,q.accessToken);var me=this.map._requestManager.transformRequest(B,e.ResourceType.Style);this._request=e.getJSON(me,function(ye,Me){ie._request=null,ye?ie.fire(new e.ErrorEvent(ye)):Me&&ie._load(Me,ue)})},z.prototype.loadJSON=function(B,q){var ie=this;q===void 0&&(q={}),this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.browser.frame(function(){ie._request=null,ie._load(B,q.validate!==!1)})},z.prototype.loadEmpty=function(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(xn,!1)},z.prototype._load=function(B,q){if(!q||!tn(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=Ot(this.stylesheet.layers);this._order=ue.map(function(Ne){return Ne.id}),this._layers={},this._serializedLayers={};for(var me=0,ye=ue;me<ye.length;me+=1){var Me=ye[me];(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 q=this;this._spriteRequest=function(ie,ue,me){var ye,Me,Ne,We=e.browser.devicePixelRatio>1?"@2x":"",rt=e.getJSON(ue.transformRequest(ue.normalizeSpriteURL(ie,We,".json"),e.ResourceType.SpriteJSON),function(xt,kt){rt=null,Ne||(Ne=xt,ye=kt,Lt())}),vt=e.getImage(ue.transformRequest(ue.normalizeSpriteURL(ie,We,".png"),e.ResourceType.SpriteImage),function(xt,kt){vt=null,Ne||(Ne=xt,Me=kt,Lt())});function Lt(){if(Ne)me(Ne);else if(ye&&Me){var xt=e.browser.getImageData(Me),kt={};for(var gt in ye){var Rt=ye[gt],zt=Rt.width,Ut=Rt.height,tr=Rt.x,ur=Rt.y,kr=Rt.sdf,wr=Rt.pixelRatio,Qr=Rt.stretchX,Kr=Rt.stretchY,pn=Rt.content,ln=new e.RGBAImage({width:zt,height:Ut});e.RGBAImage.copy(xt,ln,{x:tr,y:ur},{x:0,y:0},{width:zt,height:Ut}),kt[gt]={data:ln,pixelRatio:wr,sdf:kr,stretchX:Qr,stretchY:Kr,content:pn}}me(null,kt)}}return{cancel:function(){rt&&(rt.cancel(),rt=null),vt&&(vt.cancel(),vt=null)}}}(B,this.map._requestManager,function(ie,ue){if(q._spriteRequest=null,ie)q.fire(new e.ErrorEvent(ie));else if(ue)for(var me in ue)q.imageManager.addImage(me,ue[me]);q.imageManager.setLoaded(!0),q._availableImages=q.imageManager.listImages(),q.dispatcher.broadcast("setImages",q._availableImages),q.fire(new e.Event("data",{dataType:"style"}))})},z.prototype._validateLayer=function(B){var q=this.sourceCaches[B.source];if(q){var ie=B.sourceLayer;if(ie){var ue=q.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 q=[],ie=0,ue=B;ie<ue.length;ie+=1){var me=ue[ie],ye=this._layers[me];ye.type!=="custom"&&q.push(ye.serialize())}return q},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 q in this._layers)if(this._layers[q].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 q=this._changed;if(this._changed){var ie=Object.keys(this._updatedLayers),ue=Object.keys(this._removedLayers);for(var me in(ie.length||ue.length)&&this._updateWorkerLayers(ie,ue),this._updatedSources){var ye=this._updatedSources[me];ye==="reload"?this._reloadSource(me):ye==="clear"&&this._clearSource(me)}for(var Me in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[Me].updateTransitions(B);this.light.updateTransitions(B),this._resetUpdates()}for(var Ne in this.sourceCaches)this.sourceCaches[Ne].used=!1;for(var We=0,rt=this._order;We<rt.length;We+=1){var vt=rt[We],Lt=this._layers[vt];Lt.recalculate(B,this._availableImages),!Lt.isHidden(B.zoom)&&Lt.source&&(this.sourceCaches[Lt.source].used=!0)}this.light.recalculate(B),this.z=B.zoom,q&&this.fire(new e.Event("data",{dataType:"style"}))}},z.prototype._updateTilesForChangedImages=function(){var B=Object.keys(this._changedImages);if(B.length){for(var q in this.sourceCaches)this.sourceCaches[q].reloadTilesForDependencies(["icons","patterns"],B);this._changedImages={}}},z.prototype._updateWorkerLayers=function(B,q){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(B),removedIds:q})},z.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},z.prototype.setState=function(B){var q=this;if(this._checkLoaded(),tn(this,e.validateStyle(B)))return!1;(B=e.clone$1(B)).layers=Ot(B.layers);var ie=Jt(this.serialize(),B).filter(function(me){return!(me.command in vn)});if(ie.length===0)return!1;var ue=ie.filter(function(me){return!(me.command in nn)});if(ue.length>0)throw new Error("Unimplemented: "+ue.map(function(me){return me.command}).join(", ")+".");return ie.forEach(function(me){me.command!=="setTransition"&&q[me.command].apply(q,me.args)}),this.stylesheet=B,!0},z.prototype.addImage=function(B,q){if(this.getImage(B))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(B,q),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,q){this.imageManager.updateImage(B,q)},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,q,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(!q.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(q).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(q.type)>
94=0)||!this._validate(e.validateStyle.source,"sources."+B,q,null,ie)){this.map&&this.map._collectResourceTiming&&(q.collectResourceTiming=!0);var me=this.sourceCaches[B]=new Ve(B,q,this.dispatcher);me.style=this,me.setEventedParent(this,function(){return{isSourceLoaded:ue.loaded(),source:me.serialize(),sourceId:B}}),me.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 q in this._layers)if(this._layers[q].source===B)return this.fire(new e.ErrorEvent(new Error('Source "'+B+'" cannot be removed while layer "'+q+'" 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,q){this._checkLoaded(),this.sourceCaches[B].getSource().setData(q),this._changed=!0},z.prototype.getSource=function(B){return this.sourceCaches[B]&&this.sourceCaches[B].getSource()},z.prototype.addLayer=function(B,q,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 me;if(B.type==="custom"){if(tn(this,e.validateCustomStyleLayer(B)))return;me=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;me=e.createStyleLayer(B),this._validateLayer(me),me.setEventedParent(this,{layer:{id:ue}}),this._serializedLayers[me.id]=me.serialize()}var ye=q?this._order.indexOf(q):this._order.length;if(q&&ye===-1)this.fire(new e.ErrorEvent(new Error('Layer with id "'+q+'" does not exist on this map.')));else{if(this._order.splice(ye,0,ue),this._layerOrderChanged=!0,this._layers[ue]=me,this._removedLayers[ue]&&me.source&&me.type!=="custom"){var Me=this._removedLayers[ue];delete this._removedLayers[ue],Me.type!==me.type?this._updatedSources[me.source]="clear":(this._updatedSources[me.source]="reload",this.sourceCaches[me.source].pause())}this._updateLayer(me),me.onAdd&&me.onAdd(this.map)}}},z.prototype.moveLayer=function(B,q){if(this._checkLoaded(),this._changed=!0,this._layers[B]){if(B!==q){var ie=this._order.indexOf(B);this._order.splice(ie,1);var ue=q?this._order.indexOf(q):this._order.length;
94q&&ue===-1?this.fire(new e.ErrorEvent(new Error('Layer with id "'+q+'" 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 q=this._layers[B];if(q){q.setEventedParent(null);var ie=this._order.indexOf(B);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[B]=q,delete this._layers[B],delete this._serializedLayers[B],delete this._updatedLayers[B],delete this._updatedPaintProps[B],q.onRemove&&q.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,q,ie){this._checkLoaded();var ue=this.getLayer(B);ue?ue.minzoom===q&&ue.maxzoom===ie||(q!=null&&(ue.minzoom=q),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,q,ie){ie===void 0&&(ie={}),this._checkLoaded();var ue=this.getLayer(B);if(ue){if(!e.deepEqual(ue.filter,q))return q==null?(ue.filter=void 0,void this._updateLayer(ue)):void(this._validate(e.validateStyle.filter,"layers."+ue.id+".filter",q,null,ie)||(ue.filter=e.clone$1(q),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,q,ie,ue){ue===void 0&&(ue={}),this._checkLoaded();var me=this.getLayer(B);me?e.deepEqual(me.getLayoutProperty(q),ie)||(me.setLayoutProperty(q,ie,ue),this._updateLayer(me)):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,q){var ie=this.getLayer(B);if(ie)return ie.getLayoutProperty(q);this.fire(new e.ErrorEvent(new Error("The layer '"+B+"' does not exist in the map's style.")))},z.prototype.setPaintProperty=function(B,q,ie,ue){ue===void 0&&(ue={}),this._checkLoaded();var me=this.getLayer(B);me?e.deepEqual(me.getPaintProperty(q),ie)||(me.setPaintProperty(q,ie,ue)&&this._updateLayer(me),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,q){return this.getLayer(B).getPaintProperty(q)},z.prototype.setFeatureState=function(B,q){this._checkLoaded();var ie=B.source,ue=B.sourceLayer,me=this.sourceCaches[ie];if(me!==void 0){var ye=me.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."))),me.setFeatureState(ue,B.id,q)):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,q){this._checkLoaded();var ie=B.source,ue=this.sourceCaches[ie];if(ue!==void 0){var me=ue.getSource().type,ye=me==="vector"?B.sourceLayer:void 0;me!=="vector"||ye?q&&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,q):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 q=B.source,ie=B.sourceLayer,ue=this.sourceCaches[q];
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 '"+q+"' 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 q=this,ie=function(pn){return q._layers[pn].type==="fill-extrusion"},ue={},me=[],ye=this._order.length-1;ye>=0;ye--){var Me=this._order[ye];if(ie(Me)){ue[Me]=ye;for(var Ne=0,We=B;Ne<We.length;Ne+=1){var rt=We[Ne][Me];if(rt)for(var vt=0,Lt=rt;vt<Lt.length;vt+=1){var xt=Lt[vt];me.push(xt)}}}}me.sort(function(pn,ln){return ln.intersectionZ-pn.intersectionZ});for(var kt=[],gt=this._order.length-1;gt>=0;gt--){var Rt=this._order[gt];if(ie(Rt))for(var zt=me.length-1;zt>=0;zt--){var Ut=me[zt].feature;if(ue[Ut.layer.id]<gt)break;kt.push(Ut),me.pop()}else for(var tr=0,ur=B;tr<ur.length;tr+=1){var kr=ur[tr][Rt];if(kr)for(var wr=0,Qr=kr;wr<Qr.length;wr+=1){var Kr=Qr[wr];kt.push(Kr.feature)}}}return kt},z.prototype.queryRenderedFeatures=function(B,q,ie){q&&q.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",q.filter,null,q);var ue={};if(q&&q.layers){if(!Array.isArray(q.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var me=0,ye=q.layers;me<ye.length;me+=1){var Me=ye[me],Ne=this._layers[Me];if(!Ne)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[Ne.source]=!0}}var We=[];for(var rt in q.availableImages=this._availableImages,this.sourceCaches)q.layers&&!ue[rt]||We.push(U(this.sourceCaches[rt],this._layers,this._serializedLayers,B,q,ie));return this.placement&&We.push(function(vt,Lt,xt,kt,gt,Rt,zt){for(var Ut={},tr=Rt.queryRenderedSymbols(kt),ur=[],kr=0,wr=Object.keys(tr).map(Number);kr<wr.length;kr+=1){var Qr=wr[kr];ur.push(zt[Qr])}ur.sort(ee);for(var Kr=function(){var fa=ln[pn],Hr=fa.featureIndex.lookupSymbolFeatures(tr[fa.bucketInstanceId],Lt,fa.bucketIndex,fa.sourceLayerIndex,gt.filter,gt.layers,gt.availableImages,vt);for(var Tn in Hr){var Xn=Ut[Tn]=Ut[Tn]||[],Gn=Hr[Tn];Gn.sort(function(ea,ba){var va=fa.featureSortOrder;if(va){var Pa=va.indexOf(ea.featureIndex);return va.indexOf(ba.featureIndex)-Pa}return ba.featureIndex-ea.featureIndex});for(var aa=0,pa=Gn;aa<pa.length;aa+=1){var Ea=pa[aa];Xn.push(Ea)}}},pn=0,ln=ur;pn<ln.length;pn+=1)Kr();var Vn=function(fa){Ut[fa].forEach(function(Hr){var Tn=Hr.feature,Xn=vt[fa],Gn=xt[Xn.source].getFeatureState(Tn.layer["source-layer"],Tn.id);Tn.source=Tn.layer.source,Tn.layer["source-layer"]&&(Tn.sourceLayer=Tn.layer["source-layer"]),Tn.state=Gn})};for(var Zn in Ut)Vn(Zn);return Ut}(this._layers,this._serializedLayers,this.sourceCaches,B,q,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(We)},z.prototype.querySourceFeatures=function(B,q){q&&q.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",q.filter,null,q);var ie=this.sourceCaches[B];return ie?function(ue,me){for(var ye=ue.getRenderableIds().map(function(Lt){return ue.getTileByID(Lt)}),Me=[],Ne={},We=0;We<ye.length;We++){var rt=ye[We],vt=rt.tileID.canonical.key;Ne[vt]||(Ne[vt]=!0,rt.querySourceFeatures(Me,me))}return Me}(ie,q):[]},z.prototype.addSourceType=function(B,q,ie){return z.getSourceType(B)?ie(ne
vendor: 5,145 bytes, lines 94-120
94w Error('A source type called "'+B+'" already exists.')):(z.setSourceType(B,q),q.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:B,url:q.workerSourceURL},ie):ie(null,null))},z.prototype.getLight=function(){return this.light.getLight()},z.prototype.setLight=function(B,q){q===void 0&&(q={}),this._checkLoaded();var ie=this.light.getLight(),ue=!1;for(var me in B)if(!e.deepEqual(B[me],ie[me])){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,q),this.light.updateTransitions(ye)}},z.prototype._validate=function(B,q,ie,ue,me){return me===void 0&&(me={}),(!me||me.validate!==!1)&&tn(this,B.call(e.validateStyle,e.extend({key:q,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 q in this.sourceCaches)this.sourceCaches[q].clearTiles(),this.sourceCaches[q].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 q in this.sourceCaches)this.sourceCaches[q].update(B)},z.prototype._generateCollisionBoxes=function(){for(var B in this.sourceCaches)this._reloadSource(B)},z.prototype._updatePlacement=function(B,q,ie,ue,me){me===void 0&&(me=!1);for(var ye=!1,Me=!1,Ne={},We=0,rt=this._order;We<rt.length;We+=1){var vt=rt[We],Lt=this._layers[vt];if(Lt.type==="symbol"){if(!Ne[Lt.source]){var xt=this.sourceCaches[Lt.source];Ne[Lt.source]=xt.getRenderableIds(!0).map(function(tr){return xt.getTileByID(tr)}).sort(function(tr,ur){return ur.tileID.overscaledZ-tr.tileID.overscaledZ||(tr.tileID.isLessThan(ur.tileID)?-1:1)})}var kt=this.crossTileSymbolIndex.addLayer(Lt,Ne[Lt.source],B.center.lng);ye=ye||kt}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((me=me||this._layerOrderChanged||ie===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.browser.now(),B.zoom))&&(this.pauseablePlacement=new xr(B,this._order,me,q,ie,ue,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ne),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.browser.now()),Me=!0),ye&&this.pauseablePlacement.placement.setStale()),Me||ye)for(var gt=0,Rt=this._order;gt<Rt.length;gt+=1){var zt=Rt[gt],Ut=this._layers[zt];Ut.type==="symbol"&&this.placement.updateLayerOpacities(Ut,Ne[Ut.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,q,ie){this.imageManager.getImages(q.icons,ie),this._updateTilesForChangedImages();var ue=this.sourceCaches[q.source];ue&&ue.setDependencies(q.tileID.key,q.type,q.icons)},z.prototype.getGlyphs=function(B,q,ie){this.glyphManager.getGlyphs(q.stacks,ie)},z.prototype.getResource=function(B,q,ie){return e.makeRequest(q,ie)},z}(e.Evented);bn.getSourceType=function(C){return R[C]},bn.setSourceType=function(C,z){R[C]=z},bn.registerForPluginStateChange=e.registerForPluginStateChange;var En=e.createLayout([{name:"a_pos",type:"Int16",components:2}]),In=Za(`#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);
120return (tile_units_to_pixels*pos+offset)/pattern_size;}`),Wn=Za(`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);}"),Ma=Za(`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);}"),ka=Za(`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/(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);}`),kn=Za("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);}"),$n=Za(`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;}`),Jn=Za(`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;}"),Oa=Za("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;}"),mi=Za("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);}"),Di=Za("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);}"),uo=Za(`#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);}`),Ya=Za(`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;}`),Wa=Za(`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;}`),Ki=Za(`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);}`),Ba=Za(`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),
276directional);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;}`),fo=Za(`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 pattern_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;}`),go=Za(`#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;}"),Ti=Za(`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;
319float 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;}"),Qi=Za(`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);}`),vo=Za(`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);}`),Ao=Za(`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;}`),Ni=Za(`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);}`),gi=Za(`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;}"),Xi=Za(`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));}`),vs=Za(`#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);}`),ws=Za(`#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 Za(C,z){var B=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,q={};return{fragmentSource:C=C.replace(B,function(ie,ue,me,ye,Me){return q[Me]=!0,ue==="define"?` 541#ifndef HAS_UNIFORM_u_`+Me+` 542varying `+me+" "+ye+" "+Me+`; 543#else 544uniform `+me+" "+ye+" u_"+Me+`; 545#endif 546`:` 547#ifdef HAS_UNIFORM_u_`+Me+` 548 `+me+" "+ye+" "+Me+" = u_"+Me+`; 549#endif 550`}),vertexSource:z=z.replace(B,function(ie,ue,me,ye,Me){var Ne=ye==="float"?"vec2":"vec4",We=Me.match(/color/)?"color":Ne;return q[Me]?ue==="define"?` 551#ifndef HAS_UNIFORM_u_`+Me+` 552uniform lowp float u_`+Me+`_t; 553attribute `+me+" "+Ne+" a_"+Me+`; 554varying `+me+" "+ye+" "+Me+`; 555#else 556uniform `+me+" "+ye+" u_"+Me+`; 557#endif 558`:We==="vec4"?` 559#ifndef HAS_UNIFORM_u_`+Me+` 560 `+Me+" = a_"+Me+`; 561#else 562 `+me+" "+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 `+me+" "+ye+" "+Me+" = u_"+Me+`; 569#endif 570`:ue==="define"?` 571#ifndef HAS_UNIFORM_u_`+Me+` 572uniform lowp float u_`+Me+`_t; 573attribute `+me+" "+Ne+" a_"+Me+`; 574#else 575uniform `+me+" "+ye+" u_"+Me+`; 576#endif 577`:We==="vec4"?` 578#ifndef HAS_UNIFORM_u_`+Me+` 579 `+me+" "+ye+" "+Me+" = a_"+Me+`; 580#else 581 `+me+" "+ye+" "+Me+" = u_"+Me+`; 582#endif 583`:` 584#ifndef HAS_UNIFORM_u_`+Me+` 585 `+me+" "+ye+" "+Me+" = unpack_mix_"+We+"(a_"+Me+", u_"+Me+`_t); 586#else 587 `+me+" "+ye+" "+Me+" = u_"+Me+`; 588#endif 589`})}}var fs=Object.freeze({__proto__:null,prelude:In,background:Wn,backgroundPattern:Ma,circle:ka,clippingMask:kn,heatmap:$n,heatmapTexture:Jn,collisionBox:Oa,collisionCircle:mi,debug:Di,fill:uo,fillOutline:Ya,fillOutlinePattern:Wa,fillPattern:Ki,fillExtrusion:Ba,fillExtrusionPattern:fo,hillshadePrepare:go,hillshade:Ti,line:Qi,lineGradient:vo,linePattern:Ao,lineSDF:Ni,raster:gi,symbolIcon:Xi,symbolSDF:vs,symbolTextAndIcon:ws}),Qo=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Qo.prototype.bind=function(C,z,B,q,ie,ue,me,ye){this.context=C;for(var Me=this.boundPaintVertexBuffers.length!==q.length,Ne=0;!Me&&Ne<q.length;Ne++)this.boundPaintVertexBuffers[Ne]!==q[Ne]&&(Me=!0);var We=!this.vao||this.boundProgram!==z||this.boundLayoutVertexBuffer!==B||Me||this.boundIndexBuffer!==ie||this.boundVertexOffset!==ue||this.boundDynamicVertexBuffer!==me||this.boundDynamicVertexBuffer2!==ye;!C.extVertexArrayObject||We?this.freshBind(z,B,q,ie,ue,me,ye):(C.bindVertexArrayOES.set(this.vao),me&&me.bind(),ie&&ie.dynamicDraw&&ie.bind(),ye&&ye.bind())}
589,Qo.prototype.freshBind=function(C,z,B,q,ie,ue,me){var ye,Me=C.numAttributes,Ne=this.context,We=Ne.gl;if(Ne.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Ne.extVertexArrayObject.createVertexArrayOES(),Ne.bindVertexArrayOES.set(this.vao),ye=0,this.boundProgram=C,this.boundLayoutVertexBuffer=z,this.boundPaintVertexBuffers=B,this.boundIndexBuffer=q,this.boundVertexOffset=ie,this.boundDynamicVertexBuffer=ue,this.boundDynamicVertexBuffer2=me;else{ye=Ne.currentNumAttributes||0;for(var rt=Me;rt<ye;rt++)We.disableVertexAttribArray(rt)}z.enableAttributes(We,C);for(var vt=0,Lt=B;vt<Lt.length;vt+=1)Lt[vt].enableAttributes(We,C);ue&&ue.enableAttributes(We,C),me&&me.enableAttributes(We,C),z.bind(),z.setVertexAttribPointers(We,C,ie);for(var xt=0,kt=B;xt<kt.length;xt+=1){var gt=kt[xt];gt.bind(),gt.setVertexAttribPointers(We,C,ie)}ue&&(ue.bind(),ue.setVertexAttribPointers(We,C,ie)),q&&q.bind(),me&&(me.bind(),me.setVertexAttribPointers(We,C,ie)),Ne.currentNumAttributes=Me},Qo.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Ts=function(C,z,B,q,ie){var ue=C.gl;this.program=ue.createProgram();var me=B?B.defines():[];ie&&me.push("#define OVERDRAW_INSPECTOR;");var ye=me.concat(In.fragmentSource,z.fragmentSource).join(` 590`),Me=me.concat(In.vertexSource,z.vertexSource).join(` 591`),Ne=ue.createShader(ue.FRAGMENT_SHADER);if(ue.isContextLost())this.failedToCreate=!0;else{ue.shaderSource(Ne,ye),ue.compileShader(Ne),ue.attachShader(this.program,Ne);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 rt=B?B.layoutAttributes:[],vt=0;vt<rt.length;vt++)ue.bindAttribLocation(this.program,vt,rt[vt].name);ue.linkProgram(this.program),ue.deleteShader(We),ue.deleteShader(Ne),this.numAttributes=ue.getProgramParameter(this.program,ue.ACTIVE_ATTRIBUTES),this.attributes={};for(var Lt={},xt=0;xt<this.numAttributes;xt++){var kt=ue.getActiveAttrib(this.program,xt);kt&&(this.attributes[kt.name]=ue.getAttribLocation(this.program,kt.name))}for(var gt=ue.getProgramParameter(this.program,ue.ACTIVE_UNIFORMS),Rt=0;Rt<gt;Rt++){var zt=ue.getActiveUniform(this.program,Rt);zt&&(Lt[zt.name]=ue.getUniformLocation(this.program,zt.name))}this.fixedUniforms=q(C,Lt),this.binderUniforms=B?B.getUniforms(C,Lt):[]}}};function ks(C,z,B){var q=1/Er(B,1,z.transform.tileZoom),ie=Math.pow(2,B.tileID.overscaledZ),ue=B.tileSize*Math.pow(2,z.transform.tileZoom)/ie,me=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:[q,C.fromScale,C.toScale],u_fade:C.t,u_pixel_coord_upper:[me>>16,ye>>16],u_pixel_coord_lower:[65535&me,65535&ye]}}Ts.prototype.draw=function(C,z,B,q,ie,ue,me,ye,Me,Ne,We,rt,vt,Lt,xt,kt){var gt,Rt=C.gl;if(!this.failedToCreate){for(var zt in C.program.set(this.program),C.setDepthMode(B),C.setStencilMode(q),C.setColorMode(ie),C.setCullFace(ue),this.fixedUniforms)this.fixedUniforms[zt].set(me[zt]);Lt&&Lt.setUniforms(C,this.binderUniforms,rt,{zoom:vt});for(var Ut=(gt={},gt[Rt.LINES]=2,gt[Rt.TRIANGLES]=3,gt[Rt.LINE_STRIP]=1,gt)[z],tr=0,ur=We.get();tr<ur.length;tr+=1){var kr=ur[tr],wr=kr.vaos||(kr.vaos={});(wr[ye]||(wr[ye]=new Qo)).bind(C,this,Me,Lt?Lt.getPaintVertexBuffers():[],Ne,kr.vertexOffset,xt,kt),Rt.drawElements(z,kr.primitiveLength*Ut,Rt.UNSIGNED_SHORT,kr.primitiveOffset*Ut*2)}}};var ys=function(C,z,B,q){var ie=z.style.light,ue=ie.properties.get("position"),me=[ue.x,ue.y,ue.z],ye=e.create$1();ie.properties.get("anchor")==="viewport"&&e.fromRotation(ye,-z.transform.angle),e.transformMat3(me,me,ye);var Me=ie.properties.get("color");return{u_matrix:C,u_lightpos:me,u_lightintensity:ie.properties.get("intensity"),u_lightcolor:[Me.r,Me.g,Me.b],u_vertical_gradient:+B,u_opacity:q}},Ms=function(C,z,B,q,ie,ue,me){return e.extend(ys(C,z,B,q),ks(ue,z,me),{u_height_factor:-Math.pow(2,ie.overscaledZ)/me.tileSize/8})},Lo=function(C){return{u_matrix:C}},Co=function(C,z,B,q){return e.extend(Lo(C),ks(B,z,q))},Uo=function(C,z){return{u_matrix:C,u_world:z}},Vo=function(C,z,B,q,ie){return e.extend(Co(C,z,B,q),{u_world:ie})},Ho=function(C,z,B,q){var ie,ue,me=C.transform;if(q.paint.get("circle-pitch-alignment")==="map"){var ye=Er(B,1,me.zoom);ie=!0,ue=[ye,ye]}else ie=!1,ue=me.pixelsToGLUnits;return{u_camera_to_center_distance:me.cameraToCenterDistance,u_scale_with_map:+(q.paint.get("circle-pitch-scale")==="map"),u_matrix:C.translatePosMatrix(z.posMatrix,B,q.paint.get("circle-translate"),q.paint.get("circle-translate-anchor")),u_pitch_with_map:+ie,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:ue}},$o=function(C,z,B){var q=Er(B,1,z.zoom),ie=Math.pow(2,z.zoom-B.tileID.overscaledZ
vendor: 4,132 bytes, line 591
591),ue=B.tileID.overscaleFactor();return{u_matrix:C,u_camera_to_center_distance:z.cameraToCenterDistance,u_pixels_to_tile_units:q,u_extrude_scale:[z.pixelsToGLUnits[0]/(q*ie),z.pixelsToGLUnits[1]/(q*ie)],u_overscale_factor:ue}},yo=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]}},hs=function(C,z,B){return B===void 0&&(B=1),{u_matrix:C,u_color:z,u_overlay:0,u_overlay_scale:B}},ho=function(C){return{u_matrix:C}},qo=function(C,z,B,q){return{u_matrix:C,u_extrude_scale:Er(z,1,B),u_intensity:q}};function ps(C,z){var B=Math.pow(2,z.canonical.z),q=z.canonical.y;return[new e.MercatorCoordinate(0,q/B).toLngLat().lat,new e.MercatorCoordinate(0,(q+1)/B).toLngLat().lat]}var Po=function(C,z,B){var q=C.transform;return{u_matrix:st(C,z,B),u_ratio:1/Er(z,1,q.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/q.pixelsToGLUnits[0],1/q.pixelsToGLUnits[1]]}},qa=function(C,z,B){return e.extend(Po(C,z,B),{u_image:0})},Be=function(C,z,B,q){var ie=C.transform,ue=Ke(z,ie);return{u_matrix:st(C,z,B),u_texsize:z.imageAtlasTexture.size,u_ratio:1/Er(z,1,ie.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[ue,q.fromScale,q.toScale],u_fade:q.t,u_units_to_pixels:[1/ie.pixelsToGLUnits[0],1/ie.pixelsToGLUnits[1]]}},He=function(C,z,B,q,ie){var ue=C.transform,me=C.lineAtlas,ye=Ke(z,ue),Me=B.layout.get("line-cap")==="round",Ne=me.getDash(q.from,Me),We=me.getDash(q.to,Me),rt=Ne.width*ie.fromScale,vt=We.width*ie.toScale;return e.extend(Po(C,z,B),{u_patternscale_a:[ye/rt,-Ne.height/2],u_patternscale_b:[ye/vt,-We.height/2],u_sdfgamma:me.width/(256*Math.min(rt,vt)*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Ne.y,u_tex_y_b:We.y,u_mix:ie.t})};function Ke(C,z){return 1/Er(C,1,z.tileZoom)}function st(C,z,B){return C.translatePosMatrix(z.tileID.posMatrix,z,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}var dt=function(C,z,B,q,ie){return{u_matrix:C,u_tl_parent:z,u_scale_parent:B,u_buffer_scale:1,u_fade_t:q.mix,u_opacity:q.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:(me=ie.paint.get("raster-saturation"),me>0?1-1/(1.001-me):-me),u_contrast_factor:(ue=ie.paint.get("raster-contrast"),ue>0?1/(1-ue):1+ue),u_spin_weights:ht(ie.paint.get("raster-hue-rotate"))};var ue,me};function ht(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 St,Kt=function(C,z,B,q,ie,ue,me,ye,Me,Ne){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:me,u_coord_matrix:ye,u_is_text:+Me,u_pitch_with_map:+q,u_texsize:Ne,u_texture:0}},Qt=function(C,z,B,q,ie,ue,me,ye,Me,Ne,We){var rt=ie.transform;return e.extend(Kt(C,z,B,q,ie,ue,me,ye,Me,Ne),{u_gamma_scale:q?Math.cos(rt._pitch)*rt.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+We})},Yt=function(C,z,B,q,ie,ue,me,ye,Me,Ne){return e.extend(Qt(C,z,B,q,ie,ue,me,ye,!0,Me,!0),{u_texsize_icon:Ne,u_texture_icon:1})},rr=function(C,z,B){return{u_matrix:C,u_opacity:z,u_color:B}},cr=function(C,z,B,q,ie,ue){return e.extend(function(me,ye,Me,Ne){var We=Me.imageManager.getPattern(me.from.toString()),rt=Me.imageManager.getPattern(me.to.toString()),vt=Me.imageManager.getPixelSize(),Lt=vt.width,xt=vt.height,kt=Math.pow(2,Ne.tileID.overscaledZ),gt=Ne.tileSize*Math.pow(2,Me.transform.tileZoom)/kt,Rt=gt*(Ne.tileID.canonical.x+Ne.tileID.wrap*kt),zt=gt*Ne.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:We.tl,u_pattern_br_a:We.br,u_pattern_tl_b:rt.tl,u_pattern_br_b:rt.br,u_texsize:[Lt,xt],u_mix:ye.t,u_pattern_size_a:We.displaySize,u_pattern_size_b:rt.dis
vendor: 7,176 bytes, line 591
591playSize,u_scale_a:ye.fromScale,u_scale_b:ye.toScale,u_tile_units_to_pixels:1/Er(Ne,1,Me.transform.tileZoom),u_pixel_coord_upper:[Rt>>16,zt>>16],u_pixel_coord_lower:[65535&Rt,65535&zt]}}(q,ue,B,ie),{u_matrix:C,u_opacity:z})},gr={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),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,q,ie,ue,me){for(var ye=C.context,Me=ye.gl,Ne=C.useProgram("collisionBox"),We=[],rt=0,vt=0,Lt=0;Lt<q.length;Lt++){var xt=q[Lt],kt=z.getTile(xt),gt=kt.getBucket(B);if(gt){var Rt=xt.posMatrix;ie[0]===0&&ie[1]===0||(Rt=C.translatePosMatrix(xt.posMatrix,kt,ie,ue));var zt=me?gt.textCollisionBox:gt.iconCollisionBox,Ut=gt.collisionCircleArray;if(Ut.length>0){var tr=e.create(),ur=Rt;e.mul(tr,gt.placementInvProjMatrix,C.transform.glCoordMatrix),e.mul(tr,tr,gt.placementViewportMatrix),We.push({circleArray:Ut,circleOffset:vt,transform:ur,invTransform:tr}),vt=rt+=Ut.length/4}zt&&Ne.draw(ye,Me.LINES,ft.disabled,Ce.disabled,C.colorModeForRenderPass(),Te.disabled,$o(Rt,C.transform,kt),B.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,C.transform.zoom,null,null,zt.collisionVertexBuffer)}}if(me&&We.length){var kr=C.useProgram("collisionCircle"),wr=new e.StructArrayLayout2f1f2i16;wr.resize(4*rt),wr._trim();for(var Qr=0,Kr=0,pn=We;Kr<pn.length;Kr+=1)for(var ln=pn[Kr],Vn=0;Vn<ln.circleArray.length/4;Vn++){var Zn=4*Vn,fa=ln.circleArray[Zn+0],Hr=ln.circleArray[Zn+1],Tn=ln.circleArray[Zn+2],Xn=ln.circleArray[Zn+3];wr.emplace(Qr++,fa,Hr,Tn,Xn,0),wr.emplace(Qr++,fa,Hr,Tn,Xn,1),wr.emplace(Qr++,fa,Hr,Tn,Xn,2),wr.emplace(Qr++,fa,Hr,Tn,Xn,3)}(!St||St.length<2*rt)&&(St=function(va){var Pa=2*va,_a=new e.StructArrayLayout3ui6;_a.resize(Pa),_a._trim();for(var Ia=0;Ia<Pa;Ia++){var Va=6*Ia;_a.uint16[Va+0]=4*Ia+0,_a.uint16[Va+1]=4*Ia+1,_a.uint16[Va+2]=4*Ia+2,_a.uint16[Va+3]=4*Ia+2,_a.uint16[Va+4]=4*Ia+3,_a.uint16[Va+5]=4*Ia+0}return _a}(rt));for(var Gn=ye.createIndexBuffer(St,!0),aa=ye.createVertexBuffer(wr,e.collisionCircleLayout.members,!0),pa=0,Ea=We;pa<Ea.length;pa+=1){var ea=Ea[pa],ba=yo(ea.transform,ea.invTransform,C.transform);kr.draw(ye,Me.TRIANGLES,ft.disabled,Ce.disabled,C.colorModeForRenderPass(),Te.disabled,ba,B.id,aa,Gn,e.SegmentVector.simpleSegment(0,2*ea.circleOffset,ea.circleArray.length,ea.circleArray.length/2),null,C.transform.zoom,null,null,null)}aa.destroy(),Gn.destroy()}}var Lr=e.identity(new Float32Array(16));function an(C,z,B,q,ie,ue){var me=e.getAnchorAlignment(C),ye=-(me.horizontalAlign-.5)*z,Me=-(me.verticalAlign-.5)*B,Ne=e.evaluateVariableOffset(C,q);return new e.Point((ye/ie+Ne[0])*ue,(Me/ie+Ne[1])*ue)}function dn(C,z,B,q,ie,ue,me,ye,Me,Ne,We){var rt=C.text.placedSymbolArray,vt=C.text.dynamicLayoutVertexArray,Lt=C.icon.dynamicLayoutVertexArray,xt={};vt.clear();for(var kt=0;kt<rt.length;kt++){var gt=rt.get(kt),Rt=C.allowVerticalPlacement&&!gt.placedOrientation,zt=gt.hidden||!gt.crossTileID||Rt?null:q[gt.crossTileID];if(zt){var Ut=new e.Point(gt.anchorX,gt.anchorY),tr=$t(Ut,B?ye:me),ur=er(ue.cameraToCenterDistance,tr.signedDistanceFromCamera),kr=ie.evaluateSizeForFeature
591(C.textSizeData,Ne,gt)*ur/e.ONE_EM;B&&(kr*=C.tilePixelRatio/Me);for(var wr=zt.width,Qr=zt.height,Kr=an(zt.anchor,wr,Qr,zt.textOffset,zt.textBoxScale,kr),pn=B?$t(Ut.add(Kr),me).point:tr.point.add(z?Kr.rotate(-ue.angle):Kr),ln=C.allowVerticalPlacement&>.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,Vn=0;Vn<gt.numGlyphs;Vn++)e.addDynamicAttributes(vt,pn,ln);We&>.associatedIconIndex>=0&&(xt[gt.associatedIconIndex]={shiftedAnchor:pn,angle:ln})}else mn(gt.numGlyphs,vt)}if(We){Lt.clear();for(var Zn=C.icon.placedSymbolArray,fa=0;fa<Zn.length;fa++){var Hr=Zn.get(fa);if(Hr.hidden)mn(Hr.numGlyphs,Lt);else{var Tn=xt[fa];if(Tn)for(var Xn=0;Xn<Hr.numGlyphs;Xn++)e.addDynamicAttributes(Lt,Tn.shiftedAnchor,Tn.angle);else mn(Hr.numGlyphs,Lt)}}C.icon.dynamicLayoutVertexBuffer.updateData(Lt)}C.text.dynamicLayoutVertexBuffer.updateData(vt)}function Ln(C,z,B){return B.iconsInText&&z?"symbolTextAndIcon":C?"symbolSDF":"symbolIcon"}function On(C,z,B,q,ie,ue,me,ye,Me,Ne,We,rt){for(var vt=C.context,Lt=vt.gl,xt=C.transform,kt=ye==="map",gt=Me==="map",Rt=kt&&B.layout.get("symbol-placement")!=="point",zt=kt&&!gt&&!Rt,Ut=B.layout.get("symbol-sort-key").constantOr(1)!==void 0,tr=C.depthModeForSublayer(0,ft.ReadOnly),ur=B.layout.get("text-variable-anchor"),kr=[],wr=0,Qr=q;wr<Qr.length;wr+=1){var Kr=Qr[wr],pn=z.getTile(Kr),ln=pn.getBucket(B);if(ln){var Vn=ie?ln.text:ln.icon;if(Vn&&Vn.segments.get().length){var Zn=Vn.programConfigurations.get(B.id),fa=ie||ln.sdfIcons,Hr=ie?ln.textSizeData:ln.iconSizeData,Tn=gt||xt.pitch!==0,Xn=C.useProgram(Ln(fa,ie,ln),Zn),Gn=e.evaluateSizeForZoom(Hr,xt.zoom),aa=void 0,pa=[0,0],Ea=void 0,ea=void 0,ba=null,va=void 0;if(ie){if(Ea=pn.glyphAtlasTexture,ea=Lt.LINEAR,aa=pn.glyphAtlasTexture.size,ln.iconsInText){pa=pn.imageAtlasTexture.size,ba=pn.imageAtlasTexture;var Pa=Hr.kind==="composite"||Hr.kind==="camera";va=Tn||C.options.rotating||C.options.zooming||Pa?Lt.LINEAR:Lt.NEAREST}}else{var _a=B.layout.get("icon-size").constantOr(0)!==1||ln.iconsNeedLinear;Ea=pn.imageAtlasTexture,ea=fa||C.options.rotating||C.options.zooming||_a||Tn?Lt.LINEAR:Lt.NEAREST,aa=pn.imageAtlasTexture.size}var Ia=Er(pn,1,C.transform.zoom),Va=Ir(Kr.posMatrix,gt,kt,C.transform,Ia),fi=fr(Kr.posMatrix,gt,kt,C.transform,Ia),Oi=ur&&ln.hasTextData(),zi=B.layout.get("icon-text-fit")!=="none"&&Oi&&ln.hasIconData();Rt&&hr(ln,Kr.posMatrix,C,ie,Va,fi,gt,Ne);var ui=C.translatePosMatrix(Kr.posMatrix,pn,ue,me),Ai=Rt||ie&&ur||zi?Lr:Va,yi=C.translatePosMatrix(fi,pn,ue,me,!0),_o=fa&&B.paint.get(ie?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Wi={program:Xn,buffers:Vn,uniformValues:fa?ln.iconsInText?Yt(Hr.kind,Gn,zt,gt,C,ui,Ai,yi,aa,pa):Qt(Hr.kind,Gn,zt,gt,C,ui,Ai,yi,ie,aa,!0):Kt(Hr.kind,Gn,zt,gt,C,ui,Ai,yi,ie,aa),atlasTexture:Ea,atlasTextureIcon:ba,atlasInterpolation:ea,atlasInterpolationIcon:va,isSDF:fa,hasHalo:_o};if(Ut)for(var Fo=0,bs=Vn.segments.get();Fo<bs.length;Fo+=1){var Us=bs[Fo];kr.push({segments:new e.SegmentVector([Us]),sortKey:Us.sortKey,state:Wi})}else kr.push({segments:Vn.segments,sortKey:0,state:Wi})}}}Ut&&kr.sort(function(ml,ns){return ml.sortKey-ns.sortKey});for(var dl=0,tl=kr;dl<tl.length;dl+=1){var rl=tl[dl],wo=rl.state;if(vt.activeTexture.set(Lt.TEXTURE0),wo.atlasTexture.bind(wo.atlasInterpolation,Lt.CLAMP_TO_EDGE),wo.atlasTextureIcon&&(vt.activeTexture.set(Lt.TEXTURE1),wo.atlasTextureIcon&&wo.atlasTextureIcon.bind(wo.atlasInterpolationIcon,Lt.CLAMP_TO_EDGE)),wo.isSDF){var Gs=wo.uniformValues;wo.hasHalo&&(Gs.u_is_halo=1,qn(wo.buffers,rl.segments,B,C,wo.program,tr,We,rt,Gs)),Gs.u_is_halo=0}qn(wo.buffers,rl.segments,B,C,wo.program,tr,We,rt,wo.uniformValues)}}function qn(C,z,B,q,ie,ue,me,ye,Me){var Ne=q.context,We=Ne.gl;ie.draw(Ne,We.TRIANGLES,ue,me,ye,Te.disabled,Me,B.id,C.layoutVertexBuffer,C.indexBuffer,z,B.paint,q.transform.zoom,C.programConfigurations.get(B.id),C.dynamicLayoutVertexBuffer,C.opacityVertexBuffer)}function zn(C,z,B,q,ie,ue,me){var ye,Me,Ne,We,rt,vt=C.context.gl,Lt=B.paint.get("fill-pattern"),xt=Lt&&Lt.constantOr(1),kt=B.getCrossfadeParameters();me?(Me=xt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ye=vt.LINES):(Me=xt?"fillPattern":"fill",ye=vt.TRIANGLES);for(var gt=0,Rt=q;gt<Rt.length;gt+=1){var zt=Rt[gt],Ut=z.getTile(zt);if(!xt||Ut.patternsLoaded()){var tr=Ut.getBucket(B);if(tr){var ur=tr.programConfigurations.get(B.id),kr=C.useProgram(Me,ur);xt&&(C.context.activeTexture.set(vt.TEXTURE0),Ut.imageAtlasTexture.bind(vt.LINEAR,vt.CLAMP_TO_EDGE),ur.updatePaintBuffers(kt));var wr=Lt.constantOr(null);
vendor: 7,968 bytes, line 591
591if(wr&&Ut.imageAtlas){var Qr=Ut.imageAtlas,Kr=Qr.patternPositions[wr.to.toString()],pn=Qr.patternPositions[wr.from.toString()];Kr&&pn&&ur.setConstantPatternPositions(Kr,pn)}var ln=C.translatePosMatrix(zt.posMatrix,Ut,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(me){We=tr.indexBuffer2,rt=tr.segments2;var Vn=[vt.drawingBufferWidth,vt.drawingBufferHeight];Ne=Me==="fillOutlinePattern"&&xt?Vo(ln,C,kt,Ut,Vn):Uo(ln,Vn)}else We=tr.indexBuffer,rt=tr.segments,Ne=xt?Co(ln,C,kt,Ut):Lo(ln);kr.draw(C.context,ye,ie,C.stencilModeForClipping(zt),ue,Te.disabled,Ne,B.id,tr.layoutVertexBuffer,We,rt,B.paint,C.transform.zoom,ur)}}}}function ga(C,z,B,q,ie,ue,me){for(var ye=C.context,Me=ye.gl,Ne=B.paint.get("fill-extrusion-pattern"),We=Ne.constantOr(1),rt=B.getCrossfadeParameters(),vt=B.paint.get("fill-extrusion-opacity"),Lt=0,xt=q;Lt<xt.length;Lt+=1){var kt=xt[Lt],gt=z.getTile(kt),Rt=gt.getBucket(B);if(Rt){var zt=Rt.programConfigurations.get(B.id),Ut=C.useProgram(We?"fillExtrusionPattern":"fillExtrusion",zt);We&&(C.context.activeTexture.set(Me.TEXTURE0),gt.imageAtlasTexture.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),zt.updatePaintBuffers(rt));var tr=Ne.constantOr(null);if(tr&>.imageAtlas){var ur=gt.imageAtlas,kr=ur.patternPositions[tr.to.toString()],wr=ur.patternPositions[tr.from.toString()];kr&&wr&&zt.setConstantPatternPositions(kr,wr)}var Qr=C.translatePosMatrix(kt.posMatrix,gt,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Kr=B.paint.get("fill-extrusion-vertical-gradient"),pn=We?Ms(Qr,C,Kr,vt,kt,rt,gt):ys(Qr,C,Kr,vt);Ut.draw(ye,ye.gl.TRIANGLES,ie,ue,me,Te.backCCW,pn,B.id,Rt.layoutVertexBuffer,Rt.indexBuffer,Rt.segments,B.paint,C.transform.zoom,zt)}}}function Aa(C,z,B,q,ie,ue){var me=C.context,ye=me.gl,Me=z.fbo;if(Me){var Ne=C.useProgram("hillshade");me.activeTexture.set(ye.TEXTURE0),ye.bindTexture(ye.TEXTURE_2D,Me.colorAttachment.get());var We=function(rt,vt,Lt){var xt=Lt.paint.get("hillshade-shadow-color"),kt=Lt.paint.get("hillshade-highlight-color"),gt=Lt.paint.get("hillshade-accent-color"),Rt=Lt.paint.get("hillshade-illumination-direction")*(Math.PI/180);Lt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Rt-=rt.transform.angle);var zt=!rt.options.moving;return{u_matrix:rt.transform.calculatePosMatrix(vt.tileID.toUnwrapped(),zt),u_image:0,u_latrange:ps(rt,vt.tileID),u_light:[Lt.paint.get("hillshade-exaggeration"),Rt],u_shadow:xt,u_highlight:kt,u_accent:gt}}(C,z,B);Ne.draw(me,ye.TRIANGLES,q,ie,ue,Te.disabled,We,B.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments)}}function ja(C,z,B,q,ie,ue,me){var ye=C.context,Me=ye.gl,Ne=z.dem;if(Ne&&Ne.data){var We=Ne.dim,rt=Ne.stride,vt=Ne.getPixels();if(ye.activeTexture.set(Me.TEXTURE1),ye.pixelStoreUnpackPremultiplyAlpha.set(!1),z.demTexture=z.demTexture||C.getTileTexture(rt),z.demTexture){var Lt=z.demTexture;Lt.update(vt,{premultiply:!1}),Lt.bind(Me.NEAREST,Me.CLAMP_TO_EDGE)}else z.demTexture=new e.Texture(ye,vt,Me.RGBA,{premultiply:!1}),z.demTexture.bind(Me.NEAREST,Me.CLAMP_TO_EDGE);ye.activeTexture.set(Me.TEXTURE0);var xt=z.fbo;if(!xt){var kt=new e.Texture(ye,{width:We,height:We,data:null},Me.RGBA);kt.bind(Me.LINEAR,Me.CLAMP_TO_EDGE),(xt=z.fbo=ye.createFramebuffer(We,We,!0)).colorAttachment.set(kt.texture)}ye.bindFramebuffer.set(xt.framebuffer),ye.viewport.set([0,0,We,We]),C.useProgram("hillshadePrepare").draw(ye,Me.TRIANGLES,ie,ue,me,Te.disabled,function(gt,Rt,zt){var Ut=Rt.stride,tr=e.create();return e.ortho(tr,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(tr,tr,[0,-e.EXTENT,0]),{u_matrix:tr,u_image:1,u_dimension:[Ut,Ut],u_zoom:gt.overscaledZ,u_maxzoom:zt,u_unpack:Rt.getUnpackVector()}}(z.tileID,Ne,q),B.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments),z.needsHillshadePrepare=!1}}function Na(C,z,B,q,ie){var ue=q.paint.get("raster-fade-duration");if(ue>0){var me=e.browser.now(),ye=(me-C.timeAdded)/ue,Me=z?(me-z.timeAdded)/ue:-1,Ne=B.getSource(),We=ie.coveringZoomLevel({tileSize:Ne.tileSize,roundZoom:Ne.roundZoom}),rt=!z||Math.abs(z.tileID.overscaledZ-We)>Math.abs(C.tileID.overscaledZ-We),vt=rt&&C.refreshedUponExpiration?1:e.clamp(rt?ye:1-Me,0,1);return C.refreshedUponExpiration&&ye>=1&&(C.refreshedUponExpiration=!1),z?{opacity:1,mix:1-vt}:{opacity:vt,mix:0}}return{opacity:1,mix:0}}var Ua=new e.Color(1,0,0,1),ki=new e.Color(0,1,0,1),_i=new e.Color(0,0,1,1),si=new e.Color(1,0,1,1),li=new e.Color(0,1,1,1);function wi(C){var z=C.transform.padding;ji(C,C.transform.height-(z.top||0),3,Ua),ji(C,z.bottom||0,3,ki),$i(C,z.left||0,3,_i),$i(C,C.transform.width-(z.right||0),3,si);var B=C.transform.centerPoint;(function(q,ie,ue,me){eo(q,ie-1,ue-10,2,20,me),eo(q,ie-10,ue-1,20,2,me)})(C,B.x,C.transform.height-B.y,li)}function ji(C,z,B,q){eo(C,0,z+B/2,C.transform.width,B,q)}function $i(C,z,B,q){eo(C,z-B/2,0,B,C.transform.height,q)}function eo(C,z,B,q,ie,ue){var me=C.context,ye=me.gl;ye.enable(ye.SCISSOR_TEST),ye.scissor(z*e.browser.devicePixelRatio,B*e.browser.devicePixelRatio,q*e.browser.devicePixelRatio,ie*e.browser.devicePixelRatio),me.clear({color:ue}),ye.disable(ye.SCISSOR_TEST)}function to(C,z,B){var q=C.context,ie=q.gl,ue=B.posMatrix,me=C.useProgram("debug"),ye=ft.disabled,Me=Ce.disabled,Ne=C.colorModeForRenderPass();q.activeTexture.set(ie.TEXTURE0),C.emptyTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),me.draw(q,ie.LINE_STRIP,ye,Me,Ne,Te.disabled,hs(ue,e.Color.red),"$debug",C.debugBuffer,C.tileBorderIndexBuffer,C.debugSegments);var We=z.getTileByID(B.key).latestRawTileData,rt=We&&We.byteLength||0,vt=Math.floor(rt/1024),Lt=z.getTile(B).tileSize,xt=512/Math.min(Lt,512)*(B.overscaledZ/C.transform.zoom)*.5,kt=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(kt+=" => "+B.overscaledZ),function(gt,Rt){gt.initDebugOverlayCanvas();var zt=gt.debugOverlayCanvas,Ut=gt.context.gl,tr=gt.debugOverlayCanvas.getContext("2d");tr.clearRect(0,0,zt.width,zt.height),tr.shadowColor="white",tr.shadowBlur=2,tr.lineWidth=1.5,tr.strokeStyle="white",tr.textBaseline="top",tr.font="bold 36px Open Sans, sans-serif",tr.fillText(Rt,5,5),tr.strokeText(Rt,5,5),gt.debugOverlayTexture.update(zt),gt.debugOverlayTexture.bind(Ut.LINEAR,Ut.CLAMP_TO_EDGE)}(C,kt+" "+vt+"kb"),me.draw(q,ie.TRIANGLES,ye,Me,Ie.alphaBlended,Te.disabled,hs(ue,e.Color.transparent,xt),"$debug",C.debugBuffer,C.quadTriangleIndexBuffer,C.debugSegments)}var ro={symbol:function(C,z,B,q,ie){if(C.renderPass==="translucent"){var ue=Ce.disabled,me=C.colorModeForRenderPass();B.layout.get("text-variable-anchor")&&function(ye,Me,Ne,We,rt,vt,Lt){for(var xt=Me.transform,kt=rt==="map",gt=vt==="map",Rt=0,zt=ye;Rt<zt.length;Rt+=1){var Ut=zt[Rt],tr=We.getTile(Ut),ur=tr.getBucket(Ne);if(ur&&ur.text&&ur.text.segments.get().length){var kr=ur.textSizeData,wr=e.evaluateSizeForZoom(kr,xt.zoom),Qr=Er(tr,1,Me.transform.zoom),Kr=Ir(Ut.posMatrix,gt,kt,Me.transform,Qr),pn=Ne.layout.get("icon-text-fit")!=="none"&&ur.hasIconData();if(wr){var ln=Math.pow(2,xt.zoom-tr.tileID.overscaledZ);dn(ur,kt,gt,Lt,e.symbolSize,xt,Kr,Ut.posMatrix,ln,wr,pn)}}}}(q,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,q,!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,me),B.paint.get("text-opacity").constantOr(1)!==0&&On(C,z,B,q,!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,me),z.map.showCollisionBoxes&&(yr(C,z,B,q,B.paint.get("text-translate"),B.paint.get("text-translate-anchor"),!0),yr(C,z,B,q,B.paint.get("icon-translate"),B.paint.get("icon-translate-anchor"),!1))}},circle:function(C,z,B,q){if(C.renderPass==="translucent"){var ie=B.paint.get("circle-opacity"),ue=B.paint.get("circle-stroke-width"),me=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&&me.constantOr(1)!==0){for(var Me=C.context,Ne=Me.gl,We=C.depthModeForSublayer(0,ft.ReadOnly),rt=Ce.disabled,vt=C.colorModeForRenderPass(),Lt=[],xt=0;xt<q.length;xt++){var kt=q[xt],gt=z.getTile(kt),Rt=gt.getBucket(B);if(Rt){var zt=Rt.programConfigurations.get(B.id),Ut={programConfiguration:zt,program:C.useProgram("circle",zt),layoutVertexBuffer:Rt.layoutVertexBuffer,indexBuffer:Rt.indexBuffer,uniformValues:Ho(C,kt,gt,B)};if(ye)for(var tr=0,ur=Rt.segments.get();tr<ur.length;tr+=1){var kr=ur[tr];Lt.push({segments:new e.SegmentVector([kr]),sortKey:kr.sortKey,state:Ut})}else Lt.push({segments:Rt.segments,sortKey:0,state:Ut})}}ye&&Lt.sort(function(Xn,Gn){return Xn.sortKey-Gn.sortKey});for(var wr=0,Qr=Lt;wr<Qr.length;wr+=1){var Kr=Qr[wr],pn=Kr.state,ln=pn.programConfiguration,Vn=pn.program,Zn=pn.layoutVertexBuffer,fa=pn.indexBuffer,Hr=pn.uniformValues,Tn=Kr.segments;Vn.draw(Me,Ne.TRIANGLES,We,rt,vt,Te.disabled,Hr,B.id,Zn,fa,Tn,B.paint,C.transform.zoom,ln)}}}},heatmap:function(C,z,B,q){if(B.paint.get("heatmap-opacity")!==0)if(C.renderPass==="offscreen"){var ie=C.context,ue=ie.gl,me=Ce.disabled,ye=new Ie([ue.ONE,ue.ONE],e.Color.transparent,[!0,!0,!0,!0]);(function(kt,gt,Rt){var zt=kt.gl;kt.activeTexture.set(zt.TEXTURE1),kt.viewport.set([0,0,gt.width/4,gt.height/4]);var Ut=Rt.heatmapFbo;if(Ut)zt.bindTexture(zt.TEXTURE_2D,Ut.colorAttachment.get()),kt.bindFramebuffer.set(Ut.framebuffer);else{var tr=zt.createTexture();zt.bindTexture(zt.TEXTURE_2D,tr),zt.texParameteri(zt.TEXTURE_2D,zt.TEXTURE_WRAP_S,zt.CLAMP_TO_EDGE),zt.texParameteri(zt.TEXTURE_2D,zt.TEXTURE_WRAP_T,zt.CLAMP_TO_EDGE),zt.texParameteri(zt.TEXTURE_2D,zt.TEXTURE_MIN_FILTER,zt.LINEAR),zt.texParameteri(zt.TEXTURE_2D,zt.TEXTURE_MAG_FILTER,zt.LINEAR),Ut=Rt.heatmapFbo=kt.createFramebuffer(gt.width/4,gt.height/4,!1),function(ur,kr,wr,Qr){var Kr=ur.gl,pn=ur.extRenderToTextureHalfFloat?ur.extTextureHalfFloat.HALF_FLOAT_OES:Kr.UNSIGNED_BYTE;Kr.texImage2D(Kr.TEXTURE_2D,0,Kr.RGBA,kr.width/4,kr.height/4,0,Kr.RGBA,pn,null),Qr.colorAttachment.set(wr)}(kt,gt,tr,Ut)}})(ie,C,B),ie.clear({color:e.Color.transparent});for(var Me=0;Me<q.length;Me++){var Ne=q[Me];if(!z.hasRenderableParent(Ne)){var We=z.getTile(Ne),rt=We.getBucket(B);if(rt){var vt=rt.programConfigurations.get(B.id),Lt=C.useProgram("heatmap",vt),xt=C.transform.zoom;Lt.draw(ie,ue.TRIANGLES,ft.disabled,me,ye,Te.disabled,qo(Ne.posMatrix,We,xt,B.paint.get("heatmap-intensity")),B.id,rt.layoutVertexBuffer,rt.indexBuffer,rt.segments,B.paint,C.transform.zoom,vt)}}}ie.viewport.set([0,0,C.width,C.height])}else C.renderPass==="translucent"&&(C.context.setColorMode(C.colorModeForRenderPass()),function(kt,gt){var Rt=kt.context,zt=Rt.gl,Ut=gt.heatmapFbo;if(!!Ut){Rt.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Ut.colorAttachment.get()),Rt.activeTexture.set(zt.TEXTURE1);var tr=gt.colorRampTexture;tr||(tr=gt.colorRampTexture=new e.Texture(Rt,gt.colorRamp,zt.RGBA)),tr.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),kt.useProgram("heatmapTexture").draw(Rt,zt.TRIANGLES,ft.disabled,Ce.disabled,kt.colorModeForRenderPass(),Te.disabled,function(ur,kr,wr,Qr){var Kr=e.create();e.ortho(Kr,0,ur.width,ur.height,0,0,1);var pn=ur.context.gl;return{u_matrix:Kr,u_world:[pn.drawingBufferWidth,pn.drawingBufferHeight],u_image:wr,u_color_ramp:Qr,u_opacity:kr.paint.get("heatmap-opacity")}}(kt,gt,0,1),gt.id,kt.viewportBuffer,kt.quadTriangleIndexBuffer,kt.viewportSegments,gt.paint,kt.transform.zoom)}}(C,B))},line:function(C,z,B,q){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 me=C.depthModeForSublayer(0,ft.ReadOnly),ye=C.colorModeForRenderPass(),Me=B.paint.get("line-dasharray"),Ne=B.paint.get("line-pattern"),We=Ne.constantOr(1),rt=B.paint.get("line-gradient"),vt=B.getCrossfadeParameters(),Lt=We?"linePattern":Me?"lineSDF":rt?"lineGradient":"line",xt=C.context,kt=xt.gl,gt=!0;if(rt){xt.activeTexture.set(kt.TEXTURE0);var Rt=B.gradientTexture;if(!B.gradient)return;Rt||(Rt=B.gradientTexture=new e.Texture(xt,B.gradient,kt.RGBA)),Rt.bind(kt.LINEAR,kt.CLAMP_TO_EDGE)}for(var zt=0,Ut=q;zt<Ut.length;zt+=1){var tr=Ut[zt],ur=z.getTile(tr);if(!We||ur.patternsLoaded()){var kr=ur.getBucket(B);if(kr){var wr=kr.programConfigurations.get(B.id),Qr=C.context.program.get(),Kr=C.useProgram(Lt,wr),pn=gt||Kr.program!==Qr,ln=Ne.constantOr(null);if(ln&&ur.imageAtlas){var Vn=ur.imageAtlas,Zn=Vn.patternPositions[ln.to.toString()],fa=Vn.patternPositions[ln.from.toString()];Zn&&fa&&wr.setConstantPatternPositions(Zn,fa)}var Hr=We?Be(C,ur,B,vt):Me?He(C,ur,B,Me,vt):rt?qa(C,ur,B):Po(C,ur,B);We?(xt.activeTexture.set(kt.TEXTURE0),ur.imageAtlasTexture.bind(kt.LINEAR,kt.CLAMP_TO_EDGE),wr.updatePaintBuffers(vt)):Me&&(pn||C.lineAtlas.dirty)&&(xt.activeTexture.set(kt.TEXTURE0),C.lineAtlas.bind(xt)),Kr.draw(xt,kt.TRIANGLES,me,C.stencilModeForClipping(tr),ye,Te.disabled,Hr,B.id,kr.layoutVertexBuffer,kr.indexBuffer,kr.segments,B.paint,C.transform.zoom,wr),gt=!1}}}}}},fill:function(C,z,B,q){var ie=B.paint.get("fill-color"),ue=B.paint.get("fill-opacity");if(ue.constantOr(1)!==0){var me=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 Ne=C.depthModeForSublayer(1,C.renderPass==="opaque"?ft.ReadWrite:ft.ReadOnly);zn(C,z,B,q,Ne,me,!1)}if(C.renderPass==="translucent"&&B.paint.get("fill-antialias")){var We=C.depthModeForSublayer(B.getPaintProperty("fill-outline-color")?2:0,ft.ReadOnly);zn(C,z,B,q,We,me,!0)}}},"fill-extrusion":function(C,z,B,q){var ie=B.paint.get("fill-extrusion-opacity");if(ie!==0&&C.renderPass==="translucent"){var ue=new ft(C.context.gl.LEQUAL,ft.ReadWrite,C.depthRangeFor3D);if(ie!==1||B.paint.get("fill-extrusion-pattern").constantOr(1))ga(C,z,B,q,ue,Ce.disabled,Ie.disabled),ga(C,z,B,q,ue,C.stencilModeFor3D(),C.colorModeForRenderPass());else{var me=C.colorModeForRenderPass();ga(C,z,B,q,ue,Ce.disabled,me)}}},hillshade:function(C,z,B,q){if(C.renderPass==="offscreen"||C.renderPass==="translucent"){for(var ie=C.context,ue=z.getSource().maxzoom,me=C.depthModeForSublayer(0,ft.ReadOnly),ye=C.colorModeForRenderPass(),Me=C.renderPass==="translucent"?C.stencilConfigForOverlap(q):[{},q],Ne=Me[0],We=0,rt=Me[1];We<rt.length;We+=1){var vt=rt[We],Lt=z.getTile(vt);Lt.needsHillshadePrepare&&C.renderPass==="offscreen"?ja(C,Lt,B,ue,me,Ce.disabled,ye):C.renderPass==="translucent"&&Aa(C,Lt,B,me,Ne[vt.overscaledZ],ye)}ie.viewport.set([0,0,C.width,C.height])}},raster:function(C,z,B,q){if(C.renderPass==="translucent"&&B.paint.get("raster-opacity")!==0&&q.length)for(var ie=C.context,ue=ie.gl,me=z.getSource(),ye=C.useProgram("raster"),Me=C.colorModeForRenderPass(),Ne=me instanceof G?[{},q]:C.stencilConfigForOverlap(q),We=Ne[0],rt=Ne[1],vt=rt[rt.length-1].overscaledZ,Lt=!C.options.moving,xt=0,kt=rt;xt<kt.length;xt+=1){var gt=kt[xt],Rt=C.depthModeForSublayer(gt.overscaledZ-vt,B.paint.get("raster-opacity")===1?ft.ReadWrite:ft.ReadOnly,ue.LESS),zt=z.getTile(gt),Ut=C.transform.calculatePosMatrix(gt.toUnwrapped(),Lt);zt.registerFadeDuration(B.paint.get("raster-fade-duration"));var tr=z.findLoadedParent(gt,0),ur=Na(zt,tr,z,B,C.transform),kr=void 0,wr=void 0,Qr=B.paint.get("raster-resampling")==="nearest"?ue.NEAREST:ue.LINEAR;ie.activeTexture.set(ue.TEXTURE0),zt.texture.bind(Qr,ue.CLAMP_TO_EDGE,ue.LINEAR_MIPMAP_NEAREST),ie.activeTexture.set(ue.TEXTURE1),tr?(tr.texture.bind(Qr,ue.CLAMP_TO_EDGE,ue.LINEAR_MIPMAP_NEAREST),kr=Math.pow(2,tr.tileID.overscaledZ-zt.tileID.overscaledZ
vendor: 57,269 bytes, line 591
591),wr=[zt.tileID.canonical.x*kr%1,zt.tileID.canonical.y*kr%1]):zt.texture.bind(Qr,ue.CLAMP_TO_EDGE,ue.LINEAR_MIPMAP_NEAREST);var Kr=dt(Ut,wr||[0,0],kr||1,ur,B);me instanceof G?ye.draw(ie,ue.TRIANGLES,Rt,Ce.disabled,Me,Te.disabled,Kr,B.id,me.boundsBuffer,C.quadTriangleIndexBuffer,me.boundsSegments):ye.draw(ie,ue.TRIANGLES,Rt,We[gt.overscaledZ],Me,Te.disabled,Kr,B.id,C.rasterBoundsBuffer,C.quadTriangleIndexBuffer,C.rasterBoundsSegments)}},background:function(C,z,B){var q=B.paint.get("background-color"),ie=B.paint.get("background-opacity");if(ie!==0){var ue=C.context,me=ue.gl,ye=C.transform,Me=ye.tileSize,Ne=B.paint.get("background-pattern");if(!C.isPatternMissing(Ne)){var We=!Ne&&q.a===1&&ie===1&&C.opaquePassEnabledForLayer()?"opaque":"translucent";if(C.renderPass===We){var rt=Ce.disabled,vt=C.depthModeForSublayer(0,We==="opaque"?ft.ReadWrite:ft.ReadOnly),Lt=C.colorModeForRenderPass(),xt=C.useProgram(Ne?"backgroundPattern":"background"),kt=ye.coveringTiles({tileSize:Me});Ne&&(ue.activeTexture.set(me.TEXTURE0),C.imageManager.bind(C.context));for(var gt=B.getCrossfadeParameters(),Rt=0,zt=kt;Rt<zt.length;Rt+=1){var Ut=zt[Rt],tr=C.transform.calculatePosMatrix(Ut.toUnwrapped()),ur=Ne?cr(tr,ie,C,Ne,{tileID:Ut,tileSize:Me},gt):rr(tr,ie,q);xt.draw(ue,me.TRIANGLES,vt,rt,Lt,Te.disabled,ur,B.id,C.tileExtentBuffer,C.quadTriangleIndexBuffer,C.tileExtentSegments)}}}}},debug:function(C,z,B){for(var q=0;q<B.length;q++)to(C,z,B[q])},custom:function(C,z,B){var q=C.context,ie=B.implementation;if(C.renderPass==="offscreen"){var ue=ie.prerender;ue&&(C.setCustomLayerDefaults(),q.setColorMode(C.colorModeForRenderPass()),ue.call(ie,q.gl,C.transform.customLayerMatrix()),q.setDirty(),C.setBaseState())}else if(C.renderPass==="translucent"){C.setCustomLayerDefaults(),q.setColorMode(C.colorModeForRenderPass()),q.setStencilMode(Ce.disabled);var me=ie.renderingMode==="3d"?new ft(C.context.gl.LEQUAL,ft.ReadWrite,C.depthRangeFor3D):C.depthModeForSublayer(0,ft.ReadOnly);q.setDepthMode(me),ie.render(q.gl,C.transform.customLayerMatrix()),q.setDirty(),C.setBaseState(),q.bindFramebuffer.set(null)}}},za=function(C,z){this.context=new Pe(C),this.transform=z,this._tileTextures={},this.setup(),this.numSublayers=Ve.maxUnderzooming+Ve.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gr,this.gpuTimers={}};za.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,q=this.style._order;B<q.length;B+=1){var ie=q[B];this.style._layers[ie].resize()}},za.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,En.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(B,En.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);var q=new e.StructArrayLayout4i8;q.emplaceBack(0,0,0,0),q.emplaceBack(e.EXTENT,0,e.EXTENT,0),q.emplaceBack(0,e.EXTENT,0,e.EXTENT),q.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=C.createVertexBuffer(q,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,En.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 me=new e.StructArrayLayout3ui6;me.emplaceBack(0,1,2),me.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=C.createIndexBuffer(me),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 Ce({func:ye.ALWAYS,mask:0},0,255,ye.ZERO,ye.ZERO,ye.ZERO)},za.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,ft.disabled,this.stencilClearMode,Ie.disabled,Te.disabled,ho(B),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},za.prototype._renderTileClippingMasks=function(C,z){if(this.currentStencilSource!==C.source&&C.isTileClipped()&&z&&z.length){this.currentStencilSource=C.source;var B=this.context,q=B.gl;this.nextStencilID+z.length>256&&this.clearStencil(),B.setColorMode(Ie.disabled),B.setDepthMode(ft.disabled);var ie=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ue=0,me=z;ue<me.length;ue+=1){var ye=me[ue],Me=this._tileClippingMaskIDs[ye.key]=this.nextStencilID++;ie.draw(B,q.TRIANGLES,ft.disabled,new Ce({func:q.ALWAYS,mask:0},Me,255,q.KEEP,q.KEEP,q.REPLACE),Ie.disabled,Te.disabled,ho(ye.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},za.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var C=this.nextStencilID++,z=this.context.gl;return new Ce({func:z.NOTEQUAL,mask:255},C,255,z.KEEP,z.KEEP,z.REPLACE)},za.prototype.stencilModeForClipping=function(C){var z=this.context.gl;return new Ce({func:z.EQUAL,mask:255},this._tileClippingMaskIDs[C.key],0,z.KEEP,z.KEEP,z.REPLACE)},za.prototype.stencilConfigForOverlap=function(C){var z,B=this.context.gl,q=C.sort(function(Me,Ne){return Ne.overscaledZ-Me.overscaledZ}),ie=q[q.length-1].overscaledZ,ue=q[0].overscaledZ-ie+1;if(ue>1){this.currentStencilSource=void 0,this.nextStencilID+ue>256&&this.clearStencil();for(var me={},ye=0;ye<ue;ye++)me[ye+ie]=new Ce({func:B.GEQUAL,mask:255},ye+this.nextStencilID,255,B.KEEP,B.KEEP,B.REPLACE);return this.nextStencilID+=ue,[me,q]}return[(z={},z[ie]=Ce.disabled,z),q]},za.prototype.colorModeForRenderPass=function(){var C=this.context.gl;return this._showOverdrawInspector?new Ie([C.CONSTANT_COLOR,C.ONE],new e.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ie.unblended:Ie.alphaBlended},za.prototype.depthModeForSublayer=function(C,z,B){if(!this.opaquePassEnabledForLayer())return ft.disabled;var q=1-((1+this.currentLayer)*this.numSublayers+C)*this.depthEpsilon;return new ft(B||this.context.gl.LEQUAL,z,[q,q])},za.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},za.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 q=this.style._order,ie=this.style.sourceCaches;for(var ue in ie){var me=ie[ue];me.used&&me.prepare(this.context)}var ye,Me,Ne={},We={},rt={};for(var vt in ie){var Lt=ie[vt];Ne[vt]=Lt.getVisibleCoordinates(),We[vt]=Ne[vt].slice().reverse(),rt[vt]=Lt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var xt=0;xt<q.length;xt++){var kt=q[xt];if(this.style._layers[kt].is3D()){this.opaquePassCutoff=xt;break}}this.renderPass="offscreen";for(var gt=0,Rt=q;gt<Rt.length;gt+=1){var zt=Rt[gt],Ut=this.style._layers[zt];if(Ut.hasOffscreenPass()&&!Ut.isHidden(this.transform.zoom)){var tr=We[Ut.source];(Ut.type==="custom"||tr.length)&&this.renderLayer(this,ie[Ut.source],Ut,tr)}}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=q.length-1;this.currentLayer>=0;this.currentLayer--){var ur=this.style._layers[q[this.currentLayer]],kr=ie[ur.source],wr=Ne[ur.source];this._renderTileClippingMasks(ur,wr),this.renderLayer(this,kr,ur,wr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<q.length;this.currentLayer++){var Qr=this.style._layers[q[this.currentLayer]],Kr=ie[Qr.source],pn=(Qr.type==="symbol"?rt:We)[Qr.source];this._renderTileClippingMasks(Qr,Ne[Qr.source]),this.renderLayer(this,Kr,Qr,pn)}this.options.showTileBoundaries&&(e.values(this.style._layers).forEach(function(ln){ln.source&&!ln.isHidden(B.transform.zoom)&&(ln.source!==(Me&&Me.id)&&(Me=B.style.sourceCaches[ln.source]),(!ye||ye.getSource().maxzoom<Me.getSource().maxzoom)&&(ye=Me))}),ye&&ro.debug(this,ye,ye.getVisibleCoordinates())),this.options.showPadding&&wi(this),this.context.setDefault()},za.prototype.renderLayer=function(C,z,B,q){B.isHidden(this.transform.zoom)||(B.type==="background"||B.type==="custom"||q.length)&&(this.id=B.id,this.gpuTimingStart(B),ro[B.type](C,z,B,q,this.style.placement.variableOffsets),this.gpuTimingEnd())},za.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)}},za.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var C=this.context.extTimerQuery;C.endQueryEXT(C.TIME_ELAPSED_EXT)}},za.prototype.collectGpuTimers=function(){var C=this.gpuTimers;return this.gpuTimers={},C},za.prototype.queryGpuTimers=function(C){var z={};for(var B in C){var q=C[B],ie=this.context.extTimerQuery,ue=ie.getQueryObjectEXT(q.query,ie.QUERY_RESULT_EXT)/1e6;ie.deleteQueryEXT(q.query),z[B]=ue}return z},za.prototype.translatePosMatrix=function(C,z,B,q,ie){if(!B[0]&&!B[1])return C;var ue=ie?q==="map"?this.transform.angle:0:q==="viewport"?-this.transform.angle:0;if(ue){var me=Math.sin(ue),ye=Math.cos(ue);B=[B[0]*ye-B[1]*me,B[0]*me+B[1]*ye]}var Me=[ie?B[0]:Er(z,B[0],this.transform.zoom),ie?B[1]:Er(z,B[1],this.transform.zoom),0],Ne=new Float32Array(16);return e.translate(Ne,C,Me),Ne},za.prototype.saveTileTexture=function(C){var z=this._tileTextures[C.size[0]];z?z.push(C):this._tileTextures[C.size[0]]=[C]},za.prototype.getTileTexture=function(C){var z=this._tileTextures[C];return z&&z.length>0?z.pop():null},za.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},za.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 Ts(this.context,fs[C],z,gr[C],this._showOverdrawInspector)),this.cache[B]},za.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()},za.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)},za.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)}},za.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ut=function(C,z){this.points=C,this.planes=z};ut.fromInvProjectionMatrix=function(C,z,B){var q=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(me){return e.transformMat4([],me,C)}).map(function(me){return e.scale$1([],me,1/me[3]/z*q)}),ue=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(me){var ye=e.sub([],ie[me[0]],ie[me[1]]),Me=e.sub([],ie[me[2]],ie[me[1]]),Ne=e.normalize([],e.cross([],ye,Me)),We=-e.dot(Ne,ie[me[1]]);return Ne.concat(We)});return new ut(ie,ue)};var Dt=function(C,z){this.min=C,this.max=z,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};Dt.prototype.quadrant=function(C){for(var z=[C%2==0,C<2],B=e.clone$2(this.min),q=e.clone$2(this.max),ie=0;ie<z.length;ie++)B[ie]=z[ie]?this.min[ie]:this.center[ie],q[ie]=z[ie]?this.center[ie]:this.max[ie];return q[2]=this.max[2],new Dt(B,q)},Dt.prototype.distanceX=function(C){return Math.max(Math.min(this.max[0],C[0]),this.min[0])-C[0]},Dt.prototype.distanceY=function(C){return Math.max(Math.min(this.max[1],C[1]),this.min[1])-C[1]},Dt.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,q=0;q<C.planes.length;q++){for(var ie=C.planes[q],ue=0,me=0;me<z.length;me++)ue+=e.dot$1(ie,z[me])>=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,Ne=-Number.MAX_VALUE,We=0;We<C.points.length;We++){var rt=C.points[We][ye]-this.min[ye];Me=Math.min(Me,rt),Ne=Math.max(Ne,rt)}if(Ne<0||Me>this.max[ye]-this.min[ye])return 0}return 1};var ir=function(C,z,B,q){if(C===void 0&&(C=0),z===void 0&&(z=0),B===void 0&&(B=0),q===void 0&&(q=0),isNaN(C)||C<0||isNaN(z)||z<0||isNaN(B)||B<0||isNaN(q)||q<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=q};ir.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},ir.prototype.getCenter=function(C,z){var B=e.clamp((this.left+C-this.right)/2,0,C),q=e.clamp((this.top+z-this.bottom)/2,0,z);return new e.Point(B,q)},ir.prototype.equals=function(C){return this.top===C.top&&this.bottom===C.bottom&&this.left===C.left&&this.right===C.right},ir.prototype.clone=function(){return new ir(this.top,this.bottom,this.left,this.right)},ir.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Ht=function(C,z,B,q,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=q??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 ir,this._posMatrixCache={},this._alignedPosMatrixCache={}},or={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},or.minZoom.get=function(){return this._minZoom},or.minZoom.set=function(C){this._minZoom!==C&&(this._minZoom=C,this.zoom=Math.max(this.zoom,C))},or.maxZoom.get=function(){return this._maxZoom},or.maxZoom.set=function(C){this._maxZoom!==C&&(this._maxZoom=C,this.zoom=Math.min(this.zoom,C))},or.minPitch.get=function(){return this._minPitch},or.minPitch.set=function(C){this._minPitch!==C&&(this._minPitch=C,this.pitch=Math.max(this.pitch,C))},or.maxPitch.get=function(){return this._maxPitch},or.maxPitch.set=function(C){this._maxPitch!==C&&(this._maxPitch=C,this.pitch=Math.min(this.pitch,C))},or.renderWorldCopies.get=function(){return this._renderWorldCopies},or.renderWorldCopies.set=function(C){C===void 0?C=!0:C===null&&(C=!1),this._renderWorldCopies=C},or.worldSize.get=function(){return this.tileSize*this.scale},or.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},or.size.get=function(){return new e.Point(this.width,this.height)},or.bearing.get=function(){return-this.angle/Math.PI*180},or.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))},or.pitch.get=function(){return this._pitch/Math.PI*180},or.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())},or.fov.get=function(){return this._fov/Math.PI*180},or.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())},or.zoom.get=function(){return this._zoom},or.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())},or.center.get=function(){return this._center},or.center.set=function(C){C.lat===this._center.lat&&C.lng===this._center.lng||(this._unmodified=!1,this._center=C,this._constrain(),this._calcMatrices())},or.padding.get=function(){return this._edgeInsets.toJSON()},or.padding.set=function(C){this._edgeInsets.equals(C)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,C,1),this._calcMatrices())},or.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)),q=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)),me=Math.floor(Math.min(B.x,q.x,ie.x,ue.x)),ye=Math.floor(Math.max(B.x,q.x,ie.x,ue.x)),Me=me-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 q=e.MercatorCoordinate.fromLngLat(this.center),ie=Math.pow(2,z),ue=[ie*q.x,ie*q.y,0],me=ut.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,z),ye=C.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(ye=z);var Me=function(pn){return{aabb:new Dt([pn*ie,0,0],[(pn+1)*ie,ie,0]),zoom:0,x:0,y:0,wrap:pn,fullyVisible:!1}},Ne=[],We=[],rt=z,vt=C.reparseOverscaled?B:z;if(this._renderWorldCopies)for(var Lt=1;Lt<=3;Lt++)Ne.push(Me(-Lt)),Ne.push(Me(Lt));for(Ne.push(Me(0));Ne.length>0;){var xt=Ne.pop(),kt=xt.x,gt=xt.y,Rt=xt.fullyVisible;if(!Rt){var zt=xt.aabb.intersects(me);if(zt===0)continue;Rt=zt===2}var Ut=xt.aabb.distanceX(ue),tr=xt.aabb.distanceY(ue),ur=Math.max(Math.abs(Ut),Math.abs(tr)),kr=3+(1<<rt-xt.zoom)-2;if(xt.zoom===rt||ur>kr&&xt.zoom>=ye)We.push({tileID:new e.OverscaledTileID(xt.zoom===rt?vt:xt.zoom,xt.wrap,xt.zoom,kt,gt),distanceSq:e.sqrLen([ue[0]-.5-kt,ue[1]-.5-gt])});else for(var wr=0;wr<4;wr++){var Qr=(kt<<1)+wr%2,Kr=(gt<<1)+(wr>>1);Ne.push({aabb:xt.aabb.quadrant(wr),zoom:xt.zoom+1,x:Qr,y:Kr,wrap:xt.wrap,fullyVisible:Rt})}}return We.sort(function(pn,ln){return pn.distanceSq-ln.distanceSq}).map(function(pn){return pn.tileID})},Ht.prototype.resize=function(C,z){this.width=C,this.height=z,this.pixelsToGLUnits=[2/C,-2/z],this._constrain(),this._calcMatrices()},or.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()},or.point.get=function(){return this.project(this.center)},Ht.prototype.setLocationAtPoint=function(C,z){var B=this.pointCoordinate(z),q=this.pointCoordinate(this.centerPoint),ie=this.locationCoordinate(C),ue=new e.MercatorCoordinate(ie.x-(B.x-q.x),ie.y-(B.y-q.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 q=z[3],ie=B[3],ue=z[0]/q,me=B[0]/ie,ye=z[1]/q,Me=B[1]/ie,Ne=z[2]/q,We=B[2]/ie,rt=Ne===We?0:(0-Ne)/(We-Ne);return new e.MercatorCoordinate(e.number(ue,me,rt)/this.worldSize,e.number(ye,Me,rt)/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,q=z?this._alignedPosMatrixCache:this._posMatrixCache;if(q[B])return q[B];var ie=C.canonical,ue=this.worldSize/this.zoomScale(ie.z),me=ie.x+Math.pow(2,ie.z)*C.wrap,ye=e.identity(new Float64Array(16));return e.translate(ye,ye,[me*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),q[B]=new Float32Array(ye),q[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,q,ie=-90,ue=90,me=-180,ye=180,Me=this.size,Ne=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 rt=this.lngRange;me=e.mercatorXfromLng(rt[0])*this.worldSize,z=(ye=e.mercatorXfromLng(rt[1])*this.worldSize)-me<Me.x?Me.x/(ye-me):0}var vt=this.point,Lt=Math.max(z||0,C||0);if(Lt)return this.center=this.unproject(new e.Point(z?(ye+me)/2:vt.x,C?(ue+ie)/2:vt.y)),this.zoom+=this.scaleZoom(Lt),this._unmodified=Ne,void(this._constraining=!1);if(this.latRange){var xt=vt.y,kt=Me.y/2;xt-kt<ie&&(q=ie+kt),xt+kt>ue&&(q=ue-kt)}if(this.lngRange){var gt=vt.x,Rt=Me.x/2;gt-Rt<me&&(B=me+Rt),gt+Rt>ye&&(B=ye-Rt)}B===void 0&&q===void 0||(this.center=this.unproject(new e.Point(B!==void 0?B:vt.x,q!==void 0?q:vt.y))),this._unmodified=Ne,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,q=this._fov*(.5+z.y/this.height),ie=Math.sin(q)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-B-q,.01,Math.PI-.01)),ue=this.point,me=ue.x,ye=ue.y,Me=1.01*(Math.cos(Math.PI/2-this._pitch)*ie+this.cameraToCenterDistance),Ne=this.height/50,We=new Float64Array(16);e.perspective(We,this._fov,this.width/this.height,Ne,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,[-me,-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 rt=this.width%2/2,vt=this.height%2/2,Lt=Math.cos(this.angle),xt=Math.sin(this.angle),kt=me-Math.round(me)+Lt*rt+xt*vt,gt=ye-Math.round(ye)+Lt*vt+xt*rt,Rt=new Float64Array(We);if(e.translate(Rt,Rt,[kt>.5?kt-1:kt,gt>.5?gt-1:gt,0]),this.alignedProjMatrix=Rt,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,q=z.y,ie=z.x,ue=z.y,me=0,ye=C;me<ye.length;me+=1){var Me=ye[me];B=Math.min(B,Me.x),q=Math.min(q,Me.y),ie=Math.max(ie,Me.x),ue=Math.max(ue,Me.y)}return[new e.Point(B,q),new e.Point(ie,q),new e.Point(ie,ue),new e.Point(B,ue),new e.Point(B,q)]},Object.defineProperties(Ht.prototype,or);var Sr=function(C){var z,B,q,ie,ue;this._hashName=C&&encodeURIComponent(C),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(z=this._updateHashUnthrottled.bind(this),B=300,q=!1,ie=null,ue=function(){ie=null,q&&(z(),ie=setTimeout(ue,B),q=!1)},function(){return q=!0,ie||ue(),ie})};Sr.prototype.addTo=function(C){return this._map=C,e.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Sr.prototype.remove=function(){return e.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Sr.prototype.getHashString=function(C){var z=this._map.getCenter(),B=Math.round(100*this._map.getZoom())/100,q=Math.ceil((B*Math.LN2+Math.log(512/360/.5))/Math.LN10),ie=Math.pow(10,q),ue=Math.round(z.lng*ie)/ie,me=Math.round(z.lat*ie)/ie,ye=this._map.getBearing(),Me=this._map.getPitch(),Ne="";if(Ne+=C?"/"+ue+"/"+me+"/"+B:B+"/"+me+"/"+ue,(ye||Me)&&(Ne+="/"+Math.round(10*ye)/10),Me&&(Ne+="/"+Math.round(Me)),this._hashName){var We=this._hashName,rt=!1,vt=e.window.location.hash.slice(1).split("&").map(function(Lt){var xt=Lt.split("=")[0];return xt===We?(rt=!0,xt+"="+Ne):Lt}).filter(function(Lt){return Lt});return rt||vt.push(We+"="+Ne),"#"+vt.join("&")}return"#"+Ne},Sr.prototype._getCurrentHash=function(){var C,z=this,B=e.window.location.hash.replace("#","");return this._hashName?(B.split("&").map(function(q){return q.split("=")}).forEach(function(q){q[0]===z._hashName&&(C=q)}),(C&&C[1]||"").split("/")):B.split("/")},Sr.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},Sr.prototype._updateHashUnthrottled=function(){var C=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",C)}catch{}};var zr={linearity:.3,easing:e.bezier(0,0,.3,1)},Zr=e.extend({deceleration:2500,maxSpeed:1400},zr),cn=e.extend({deceleration:20,maxSpeed:1400},zr),sn=e.extend({deceleration:1e3,maxSpeed:360},zr),gn=e.extend({deceleration:1e3,maxSpeed:90},zr),_n=function(C){this._map=C,this.clear()};function un(C,z){(!C.duration||C.duration<z.duration)&&(C.duration=z.duration,C.easing=z.easing)}function wn(C,z,B){var q=B.maxSpeed,ie=B.linearity,ue=B.deceleration,me=e.clamp(C*ie/(z/1e3),-q,q),ye=Math.abs(me)/(ue*ie);return{easing:B.easing,duration:1e3*ye,amount:me*(ye/2)}}_n.prototype.clear=function(){this._inertiaBuffer=[]},_n.prototype.record=function(C){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:C})},_n.prototype._drainInertiaBuffer=function(){for(var C=this._inertiaBuffer,z=e.browser.now();C.length>0&&z-C[0].time>160;)C.shift()},_n.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,q=this._inertiaBuffer;B<q.length;B+=1){var ie=q[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,me={};if(z.pan.mag()){var ye=wn(z.pan.mag(),ue,e.extend({},Zr,C||{}));me.offset=z.pan.mult(ye.amount/z.pan.mag()),me.center=this._map.transform.center,un(me,ye)}if(z.zoom){var Me=wn(z.zoom,ue,cn);me.zoom=this._map.transform.zoom+Me.amount,un(me,Me)}if(z.bearing){var Ne=wn(z.bearing,ue,sn);me.bearing=this._map.transform.bearing+e.clamp(Ne.amount,-179,179),un(me,Ne)}if(z.pitch){var We=wn(z.pitch,ue,gn);me.pitch=this._map.transform.pitch+We.amount,un(me,We)}if(me.zoom||me.bearing){var rt=z.pinchAround===void 0?z.around:z.pinchAround;me.around=rt?this._map.unproject(rt):this._map.getCenter()}return this.clear(),e.extend(me,{noMoveStart:!0})}};var Dn=function(C){function z(q,ie,ue,me){me===void 0&&(me={});var ye=t.mousePos(ie.getCanvasContainer(),ue),Me=ie.unproject(ye);C.call(this,q,e.extend({point:ye,lngLat:Me,originalEvent:ue},me)),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),Hn=function(C){function z(q,ie,ue){var me=q==="touchend"?ue.changedTouches:ue.touches,ye=t.touchPos(ie.getCanvasContainer(),me),Me=ye.map(function(rt){return ie.unproject(rt)}),Ne=ye.reduce(function(rt,vt,Lt,xt){return rt.add(vt.div(xt.length))},new e.Point(0,0)),We=ie.unproject(Ne);C.call(this,q,{points:ye,point:Ne,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),ia=function(C){function z(q,ie,ue){C.call(this,q,{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),Jr=function(C,z){this._map=C,this._clickTolerance=z.clickTolerance};Jr.prototype.reset=function(){delete this._mousedownPos},Jr.prototype.wheel=function(C){return this._firePreventable(new ia(C.type,this._map,C))},Jr.prototype.mousedown=function(C,z){return this._mousedownPos=z,this._firePreventable(new Dn(C.type,this._map,C))},Jr.prototype.mouseup=function(C){this._map.fire(new Dn(C.type,this._map,C))},Jr.prototype.click=function(C,z){this._mousedownPos&&this._mousedownPos.dist(z)>=this._clickTolerance||this._map.fire(new Dn(C.type,this._map,C))},Jr.prototype.dblclick=function(C){return this._firePreventable(new Dn(C.type,this._map,C))},Jr.prototype.mouseover=function(C){this._map.fire(new Dn(C.type,this._map,C))},Jr.prototype.mouseout=function(C){this._map.fire(new Dn(C.type,this._map,C))},Jr.prototype.touchstart=function(C){return this._firePreventable(new Hn(C.type,this._map,C))},Jr.prototype.touchmove=function(C){this._map.fire(new Hn(C.type,this._map,C))},Jr.prototype.touchend=function(C){this._map.fire(new Hn(C.type,this._map,C))},Jr.prototype.touchcancel=function(C){this._map.fire(new Hn(C.type,this._map,C))},Jr.prototype._firePreventable=function(C){if(this._map.fire(C),C.defaultPrevented)return{}},Jr.prototype.isEnabled=function(){return!0},Jr.prototype.isActive=function(){return!1},Jr.prototype.enable=function(){},Jr.prototype.disable=function(){};var ra=function(C){this._map=C};ra.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},ra.prototype.mousemove=function(C){this._map.fire(new Dn(C.type,this._map,C))},ra.prototype.mousedown=function(){this._delayContextMenu=!0},ra.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Dn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},ra.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()},ra.prototype.isEnabled=function(){return!0},ra.prototype.isActive=function(){return!1},ra.prototype.enable=function(){},ra.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 jn(C,z){for(var B={},q=0;q<C.length;q++)B[C[q].identifier]=z[q];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 q=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(q.x,B.x),ue=Math.max(q.x,B.x),me=Math.min(q.y,B.y),ye=Math.max(q.y,B.y);t.setTransform(this._box,"translate("+ie+"px,"+me+"px)"),this._box.style.width=ue-ie+"px",this._box.style.height=ye-me+"px"}}},Cn.prototype.mouseupWindow=function(C,z){var B=this;if(this._active&&C.button===0){var q=this._startPos,ie=z;if(this.reset(),t.suppressClick(),q.x!==ie.x||q.y!==ie.y)return this._map.fire(new e.Event("boxzoomend",{originalEvent:C})),{cameraAnimation:function(ue){return ue.fitScreenCoordinates(q,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 ta=function(C){this.reset(),this.numTouches=C.numTouches};ta.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},ta.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(q){for(var ie=new e.Point(0,0),ue=0,me=q;ue<me.length;ue+=1){var ye=me[ue];ie._add(ye)}return ie.div(q.length)}(z),this.touches=jn(B,z)))},ta.prototype.touchmove=function(C,z,B){if(!this.aborted&&this.centroid){var q=jn(B,z);for(var ie in this.touches){var ue=this.touches[ie],me=q[ie];(!me||me.dist(ue)>30)&&(this.aborted=!0)}}},ta.prototype.touchend=function(C,z,B){if((!this.centroid||C.timeStamp-this.startTime>500)&&(this.aborted=!0),B.length===0){var q=!this.aborted&&this.centroid;if(this.reset(),q)return q}};var Ta=function(C){this.singleTap=new ta(C),this.numTaps=C.numTaps,this.reset()};Ta.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ta.prototype.touchstart=function(C,z,B){this.singleTap.touchstart(C,z,B)},Ta.prototype.touchmove=function(C,z,B){this.singleTap.touchmove(C,z,B)},Ta.prototype.touchend=function(C,z,B){var q=this.singleTap.touchend(C,z,B);if(q){var ie=C.timeStamp-this.lastTime<500,ue=!this.lastTap||this.lastTap.dist(q)<30;if(ie&&ue||this.reset(),this.count++,this.lastTime=C.timeStamp,this.lastTap=q,this.count===this.numTaps)return this.reset(),q}};var Ca=function(){this._zoomIn=new Ta({numTouches:1,numTaps:2}),this._zoomOut=new Ta({numTouches:2,numTaps:1}),this.reset()};Ca.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ca.prototype.touchstart=function(C,z,B){this._zoomIn.touchstart(C,z,B),this._zoomOut.touchstart(C,z,B)},Ca.prototype.touchmove=function(C,z,B){this._zoomIn.touchmove(C,z,B),this._zoomOut.touchmove(C,z,B)},Ca.prototype.touchend=function(C,z,B){var q=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 q.reset()},0),{cameraAnimation:function(me){return me.easeTo({duration:300,zoom:me.getZoom()+1,around:me.unproject(ie)},{originalEvent:C})}}):ue?(this._active=!0,C.preventDefault(),setTimeout(function(){return q.reset()},0),{cameraAnimation:function(me){return me.easeTo({duration:300,zoom:me.getZoom()-1,around:me.unproject(ue)},{originalEvent:C})}}):void 0},Ca.prototype.touchcancel=function(){this.reset()},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 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 Da=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,q){C.prototype.mousedown.call(this,B,q),this._lastPoint&&(this._active=!0)},z.prototype._correctButton=function(B,q){return q===0&&!B.ctrlKey},z.prototype._move=function(B,q){return{around:q,panDelta:q.sub(B)}},z}(Sn),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._correctButton=function(B,q){return q===0&&B.ctrlKey||q===2},z.prototype._move=function(B,q){var ie=.8*(q.x-B.x);if(ie)return this._active=!0,{bearingDelta:ie}},z.prototype.contextmenu=function(B){B.preventDefault()},z}(Sn),ma=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,q){return q===0&&B.ctrlKey||q===2},z.prototype._move=function(B,q){var ie=-.5*(q.y-B.y);if(ie)return this._active=!0,{pitchDelta:ie}},z.prototype.contextmenu=function(B){B.preventDefault()},z}(Sn),Ra=function(C){this._minTouches=1,this._clickTolerance=C.clickTolerance||1,this.reset()};Ra.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new e.Point(0,0)},Ra.prototype.touchstart=function(C,z,B){return this._calculateTransform(C,z,B)},Ra.prototype.touchmove=function(C,z,B){if(this._active)return C.preventDefault(),this._calculateTransform(C,z,B)},Ra.prototype.touchend=function(C,z,B){this._calculateTransform(C,z,B),this._active&&B.length<this._minTouches&&this.reset()},Ra.prototype.touchcancel=function(){this.reset()},Ra.prototype._calculateTransform=function(C,z,B){B.length>0&&(this._active=!0);var q=jn(B,z),ie=new e.Point(0,0),ue=new e.Point(0,0),me=0;for(var ye in q){var Me=q[ye],Ne=this._touches[ye];Ne&&(ie._add(Me),ue._add(Me.sub(Ne)),me++,q[ye]=Me)}if(this._touches=q,!(me<this._minTouches)&&ue.mag()){var We=ue.div(me);if(this._sum._add(We),!(this._sum.mag()<this._clickTolerance))return{around:ie.div(me),panDelta:We}}},Ra.prototype.enable=function(){this._enabled=!0},Ra.prototype.disable=function(){this._enabled=!1,this.reset()},Ra.prototype.isEnabled=function(){return this._enabled},Ra.prototype.isActive=function(){return this._active};var Sa=function(){this.reset()};function ei(C,z,B){for(var q=0;q<C.length;q++)if(C[q].identifier===B)return z[q]}Sa.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Sa.prototype._start=function(C){},Sa.prototype._move=function(C,z,B){return{}},Sa.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]]))},Sa.prototype.touchmove=function(C,z,B){if(this._firstTwoTouches){C.preventDefault();var q=this._firstTwoTouches,ie=q[0],ue=q[1],me=ei(B,z,ie),ye=ei(B,z,ue);if(me&&ye){var Me=this._aroundCenter?null:me.add(ye).div(2);return this._move([me,ye],Me,C)}}},Sa.prototype.touchend=function(C,z,B){if(this._firstTwoTouches){var q=this._firstTwoTouches,ie=q[0],ue=q[1],me=ei(B,z,ie),ye=ei(B,z,ue);me&&ye||(this._active&&t.suppressClick(),this.reset())}},Sa.prototype.touchcancel=function(){this.reset()},Sa.prototype.enable=function(C){this._enabled=!0,this._aroundCenter=!!C&&C.around==="center"},Sa.prototype.disable=function(){this._enabled=!1,this.reset()},Sa.prototype.isEnabled=function(){return this._enabled},Sa.prototype.isActive=function(){return this._active};function na(C,z){return Math.log(C/z)/Math.LN2}var Xa=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,q){var ie=this._distance;if(this._distance=B[0].dist(B[1]),this._active||!(Math.abs(na(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:na(this._distance,ie),pinchAround:q}},z}(Sa);function Ui(C,z){return 180*C.angleWith(z)/Math.PI}var Zo=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,q){var ie=this._vector;if(this._vector=B[0].sub(B[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ui(this._vector,ie),pinchAround:q}},z.prototype._isBelowThreshold=function(B){this._minDiameter=Math.min(this._minDiameter,B.mag());var q=25/(Math.PI*this._minDiameter)*360,ie=Ui(B,this._startVector);return Math.abs(ie)<q},z}(Sa);function Ro(C){return Math.abs(C.y)>Math.abs(C.x)}var xo=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,Ro(B[0].sub(B[1]))&&(this._valid=!1)},z.prototype._move=function(B,q,ie){var ue=B[0].sub(this._lastPoints[0]),me=B[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ue,me,ie.timeStamp),this._valid)return this._lastPoints=B,this._active=!0,{pitchDelta:-.5*((ue.y+me.y)/2)}},z.prototype.gestureBeginsVertically=function(B,q,ie){if(this._valid!==void 0)return this._valid;var ue=B.mag()>=2,me=q.mag()>=2;if(ue||me){if(!ue||!me)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;var ye=B.y>0==q.y>0;return Ro(B)&&Ro(q)&&ye}},z}(Sa),ya={panStep:100,bearingStep:15,pitchStep:10},vi=function(){var C=ya;this._panStep=C.panStep,this._bearingStep=C.bearingStep,this._pitchStep=C.pitchStep};function bo(C){return C*(2-C)}vi.prototype.reset=function(){this._active=!1},vi.prototype.keydown=function(C){var z=this;if(!(C.altKey||C.ctrlKey||C.metaKey)){var B=0,q=0,ie=0,ue=0,me=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?q=-1:(C.preventDefault(),ue=-1);break;case 39:C.shiftKey?q=1:(C.preventDefault(),ue=1);break;case 38:C.shiftKey?ie=1:(C.preventDefault(),me=-1);break;case 40:C.shiftKey?ie=-1:(C.preventDefault(),me=1);break;default:return}return{cameraAnimation:function(ye){var Me=ye.getZoom();ye.easeTo({duration:300,easeId:"keyboardHandler",easing:bo,zoom:B?Math.round(Me)+B*(C.shiftKey?2:1):Me,bearing:ye.getBearing()+q*z._bearingStep,pitch:ye.getPitch()+ie*z._pitchStep,offset:[-ue*z._panStep,-me*z._panStep],center:ye.getCenter()},{originalEvent:C})}}}},vi.prototype.enable=function(){this._enabled=!0},vi.prototype.disable=function(){this._enabled=!1,this.reset()},vi.prototype.isEnabled=function(){return this._enabled},vi.prototype.isActive=function(){return this._active};var Ja=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)};Ja.prototype.setZoomRate=function(C){this._defaultZoomRate=C},Ja.prototype.setWheelZoomRate=function(C){this._wheelZoomRate=C},Ja.prototype.isEnabled=function(){return!!this._enabled},Ja.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Ja.prototype.isZooming=function(){return!!this._zooming},Ja.prototype.enable=function(C){this.isEnabled()||(this._enabled=!0,this._aroundCenter=C&&C.around==="center")},Ja.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ja.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(),q=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":q>400?(this._type=null,this._lastValue=z,this._timeout=setTimeout(this._onTimeout,40,C)):this._type||(this._type=Math.abs(q*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()}},Ja.prototype._onTimeout=function(C){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(C)},Ja.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())}},Ja.prototype.renderFrame=function(){return this._onScrollFrame()},Ja.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,q=2/(1+Math.exp(-Math.abs(this._delta*B)));this._delta<0&&q!==0&&(q=1/q);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*q))),this._type==="wheel"&&(this._startZoom=z.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ue,me=typeof this._targetZoom=="number"?this._targetZoom:z.zoom,ye=this._startZoom,Me=this._easing,Ne=!1;if(this._type==="wheel"&&ye&&Me){var We=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),rt=Me(We);ue=e.number(ye,me,rt),We<1?this._frameId||(this._frameId=!0):Ne=!0}else ue=me,Ne=!0;return this._active=!0,Ne&&(this._active=!1,this._finishTimeout=setTimeout(function(){C._zooming=!1,C._handler._triggerRenderFrame(),delete C._targetZoom,delete C._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ne,zoomDelta:ue-z.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Ja.prototype._smoothOutEasing=function(C){var z=e.ease;if(this._prevEase){var B=this._prevEase,q=(e.browser.now()-B.start)/B.duration,ie=B.easing(q+.01)-B.easing(q),ue=.27/Math.sqrt(ie*ie+1e-4)*.01,me=Math.sqrt(.0729-ue*ue);z=e.bezier(ue,me,.25,1)}return this._prevEase={start:e.browser.now(),duration:C,easing:z},z},Ja.prototype.reset=function(){this._active=!1};var Mi=function(C,z){this._clickZoom=C,this._tapZoom=z};Mi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Mi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Mi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Mi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Yi=function(){this.reset()};Yi.prototype.reset=function(){this._active=!1},Yi.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})}}},Yi.prototype.enable=function(){this._enabled=!0},Yi.prototype.disable=function(){this._enabled=!1,this.reset()},Yi.prototype.isEnabled=function(){return this._enabled},Yi.prototype.isActive=function(){return this._active};var ni=function(){this._tap=new Ta({numTouches:1,numTaps:1}),this.reset()};ni.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ni.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))},ni.prototype.touchmove=function(C,z,B){if(this._tapTime){if(this._swipePoint){if(B[0].identifier!==this._swipeTouch)return;var q=z[0],ie=q.y-this._swipePoint.y;return this._swipePoint=q,C.preventDefault(),this._active=!0,{zoomDelta:ie/128}}}else this._tap.touchmove(C,z,B)},ni.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)},ni.prototype.touchcancel=function(){this.reset()},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 po=function(C,z,B){this._el=C,this._mousePan=z,this._touchPan=B};po.prototype.enable=function(C){this._inertiaOptions=C||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},po.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},po.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},po.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ai=function(C,z,B){this._pitchWithRotate=C.pitchWithRotate,this._mouseRotate=z,this._mousePitch=B};ai.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ai.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ai.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ai.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var no=function(C,z,B,q){this._el=C,this._touchZoom=z,this._touchRotate=B,this._tapDragZoom=q,this._rotationDisabled=!1,this._enabled=!0};no.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")},no.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},no.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},no.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},no.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},no.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var os=function(C){return C.zoom||C.drag||C.pitch||C.rotate},es=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 Fs(C){return C.panDelta&&C.panDelta.mag()||C.zoomDelta||C.bearingDelta||C.pitchDelta}var Ri=function(C,z){this._map=C,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new _n(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 q=0,ie=this._listeners;q<ie.length;q+=1){var ue=ie[q],me=ue[0],ye=ue[1],Me=ue[2];t.addEventListener(me,ye,me===e.window.document?this.handleWindowEvent:this.handleEvent,Me)}};Ri.prototype.destroy=function(){for(var C=0,z=this._listeners;C<z.length;
591C+=1){var B=z[C],q=B[0],ie=B[1],ue=B[2];t.removeEventListener(q,ie,q===e.window.document?this.handleWindowEvent:this.handleEvent,ue)}},Ri.prototype._addDefaultHandlers=function(C){var z=this._map,B=z.getCanvasContainer();this._add("mapEvent",new Jr(z,C));var q=z.boxZoom=new Cn(z,C);this._add("boxZoom",q);var ie=new Ca,ue=new Yi;z.doubleClickZoom=new Mi(ue,ie),this._add("tapZoom",ie),this._add("clickZoom",ue);var me=new ni;this._add("tapDragZoom",me);var ye=z.touchPitch=new xo;this._add("touchPitch",ye);var Me=new La(C),Ne=new ma(C);z.dragRotate=new ai(C,Me,Ne),this._add("mouseRotate",Me,["mousePitch"]),this._add("mousePitch",Ne,["mouseRotate"]);var We=new Da(C),rt=new Ra(C);z.dragPan=new po(B,We,rt),this._add("mousePan",We),this._add("touchPan",rt,["touchZoom","touchRotate"]);var vt=new Zo,Lt=new Xa;z.touchZoomRotate=new no(B,Lt,vt,me),this._add("touchRotate",vt,["touchPan","touchZoom"]),this._add("touchZoom",Lt,["touchPan","touchRotate"]);var xt=z.scrollZoom=new Ja(z,this);this._add("scrollZoom",xt,["mousePan"]);var kt=z.keyboard=new vi;this._add("keyboard",kt),this._add("blockableMapEvent",new ra(z));for(var gt=0,Rt=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];gt<Rt.length;gt+=1){var zt=Rt[gt];C.interactive&&C[zt]&&z[zt].enable(C[zt])}},Ri.prototype._add=function(C,z,B){this._handlers.push({handlerName:C,handler:z,allowed:B}),this._handlersById[C]=z},Ri.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=[]}},Ri.prototype.isActive=function(){for(var C=0,z=this._handlers;C<z.length;C+=1)if(z[C].handler.isActive())return!0;return!1},Ri.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ri.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ri.prototype.isMoving=function(){return Boolean(os(this._eventsInProgress))||this.isZooming()},Ri.prototype._blockedByActive=function(C,z,B){for(var q in C)if(q!==B&&(!z||z.indexOf(q)<0))return!0;return!1},Ri.prototype.handleWindowEvent=function(C){this.handleEvent(C,C.type+"Window")},Ri.prototype._getMapTouches=function(C){for(var z=[],B=0,q=C;B<q.length;B+=1){var ie=q[B],ue=ie.target;this._el.contains(ue)&&z.push(ie)}return z},Ri.prototype.handleEvent=function(C,z){if(C.type!=="blur"){this._updatingCamera=!0;for(var B=C.type==="renderFrame"?void 0:C,q={needsRenderFrame:!1},ie={},ue={},me=C.touches?this._getMapTouches(C.touches):void 0,ye=me?t.touchPos(this._el,me):t.mousePos(this._el,C),Me=0,Ne=this._handlers;Me<Ne.length;Me+=1){var We=Ne[Me],rt=We.handlerName,vt=We.handler,Lt=We.allowed;if(vt.isEnabled()){var xt=void 0;this._blockedByActive(ue,Lt,rt)?vt.reset():vt[z||C.type]&&(xt=vt[z||C.type](C,ye,me),this.mergeHandlerResult(q,ie,xt,rt,B),xt&&xt.needsRenderFrame&&this._triggerRenderFrame()),(xt||vt.isActive())&&(ue[rt]=vt)}}var kt={};for(var gt in this._previousActiveHandlers)ue[gt]||(kt[gt]=B);this._previousActiveHandlers=ue,(Object.keys(kt).length||Fs(q))&&(this._changes.push([q,ie,kt]),this._triggerRenderFrame()),(Object.keys(ue).length||Fs(q))&&this._map._stop(!0),this._updatingCamera=!1;var Rt=q.cameraAnimation;Rt&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],Rt(this._map))}else this.stop()},Ri.prototype.mergeHandlerResult=function(C,z,B,q,ie){if(B){e.extend(C,B);var ue={handlerName:q,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)}},Ri.prototype._applyChanges=function(){for(var C={},z={},B={},q=0,ie=this._changes;q<ie.length;q+=1){var ue=ie[q],me=ue[0],ye=ue[1],Me=ue[2];me.panDelta&&(C.panDelta=(C.panDelta||new e.Point(0,0))._add(me.panDelta)),me.zoomDelta&&(C.zoomDelta=(C.zoomDelta||0)+me.zoomDelta),me.bearingDelta&&(C.bearingDelta=(C.bearingDelta||0)+me.bearingDelta),me.pitchDelta&&(C.pitchDelta=(C.pitchDelta||0)+me.pitchDelta),me.around!==void 0&&(C.around=me.around),me.pinchAround!==void 0&&(C.pinchAround=me.pinchAround),me.noInertia&&(C.noInertia=me.noInertia),e.extend(z,ye),e.extend(B,Me)}this._updateMapTransform(C,z,B),this._changes=[]},Ri.prototype._updateMapTransform=function(C,z,B){var q=this._map,ie=q.transform;if(!Fs(C))return this._fireEvents(z,B);var ue=C.panDelta,me=C.zoomDelta,ye=C.bearingDelta,Me=C.pitchDelta,Ne=C.around,We=C.pinchAround;We!==void 0&&(Ne=We),q._stop(!0),Ne=Ne||q.transform.centerPoint;var rt=ie.pointLocation(ue?Ne.sub(ue):Ne);ye&&(ie.bearing+=ye),Me&&(ie.pitch+=Me),me&&(ie.zoom+=me),ie.setLocationAtPoint(rt,Ne),this._map._update(),C.noInertia||this._inertia.record(C),this._fireEvents(z,B)},Ri.prototype._fireEvents=function(C,z){var B=this,q=os(this._eventsInProgress),ie=os(C),ue={};for(var me in C){var ye=C[me].originalEvent;this._eventsInProgress[me]||(ue[me+"start"]=ye),this._eventsInProgress[me]=C[me]}for(var Me in!q&&ie&&this._fireEvent("movestart",ie.originalEvent),ue)this._fireEvent(Me,ue[Me]);for(var Ne in C.rotate&&(this._bearingChanged=!0),ie&&this._fireEvent("move",ie.originalEvent),C){var We=C[Ne].originalEvent;this._fireEvent(Ne,We)}var rt,vt={};for(var Lt in this._eventsInProgress){var xt=this._eventsInProgress[Lt],kt=xt.handlerName,gt=xt.originalEvent;this._handlersById[kt].isActive()||(delete this._eventsInProgress[Lt],rt=z[kt]||gt,vt[Lt+"end"]=rt)}for(var Rt in vt)this._fireEvent(Rt,vt[Rt]);var zt=os(this._eventsInProgress);if((q||ie)&&!zt){this._updatingCamera=!0;var Ut=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),tr=function(ur){return ur!==0&&-B._bearingSnap<ur&&ur<B._bearingSnap};
vendor: 17,124 bytes, line 591
591Ut?(tr(Ut.bearing||this._map.getBearing())&&(Ut.bearing=0),this._map.easeTo(Ut,{originalEvent:rt})):(this._map.fire(new e.Event("moveend",{originalEvent:rt})),tr(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},Ri.prototype._fireEvent=function(C,z){this._map.fire(new e.Event(C,z?{originalEvent:z}:{}))},Ri.prototype._triggerRenderFrame=function(){var C=this;this._frameId===void 0&&(this._frameId=this._map._requestRenderFrame(function(z){delete C._frameId,C.handleEvent(new es("renderFrame",{timeStamp:z})),C._applyChanges()}))};var Bs=function(C){function z(B,q){C.call(this),this._moving=!1,this._zooming=!1,this.transform=B,this._bearingSnap=q.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,q){return this.jumpTo({center:B},q)},z.prototype.panBy=function(B,q,ie){return B=e.Point.convert(B).mult(-1),this.panTo(this.transform.center,e.extend({offset:B},q),ie)},z.prototype.panTo=function(B,q,ie){return this.easeTo(e.extend({center:B},q),ie)},z.prototype.getZoom=function(){return this.transform.zoom},z.prototype.setZoom=function(B,q){return this.jumpTo({zoom:B},q),this},z.prototype.zoomTo=function(B,q,ie){return this.easeTo(e.extend({zoom:B},q),ie)},z.prototype.zoomIn=function(B,q){return this.zoomTo(this.getZoom()+1,B,q),this},z.prototype.zoomOut=function(B,q){return this.zoomTo(this.getZoom()-1,B,q),this},z.prototype.getBearing=function(){return this.transform.bearing},z.prototype.setBearing=function(B,q){return this.jumpTo({bearing:B},q),this},z.prototype.getPadding=function(){return this.transform.padding},z.prototype.setPadding=function(B,q){return this.jumpTo({padding:B},q),this},z.prototype.rotateTo=function(B,q,ie){return this.easeTo(e.extend({bearing:B},q),ie)},z.prototype.resetNorth=function(B,q){return this.rotateTo(0,e.extend({duration:1e3},B),q),this},z.prototype.resetNorthPitch=function(B,q){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},B),q),this},z.prototype.snapToNorth=function(B,q){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(B,q):this},z.prototype.getPitch=function(){return this.transform.pitch},z.prototype.setPitch=function(B,q){return this.jumpTo({pitch:B},q),this},z.prototype.cameraForBounds=function(B,q){return B=e.LngLatBounds.convert(B),this._cameraForBoxAndBearing(B.getNorthWest(),B.getSouthEast(),0,q)},z.prototype._cameraForBoxAndBearing=function(B,q,ie,ue){var me={top:0,bottom:0,right:0,left:0};if(typeof(ue=e.extend({padding:me,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(me,ue.padding);var Me=this.transform,Ne=Me.padding,We=Me.project(e.LngLat.convert(B)),rt=Me.project(e.LngLat.convert(q)),vt=We.rotate(-ie*Math.PI/180),Lt=rt.rotate(-ie*Math.PI/180),xt=new e.Point(Math.max(vt.x,Lt.x),Math.max(vt.y,Lt.y)),kt=new e.Point(Math.min(vt.x,Lt.x),Math.min(vt.y,Lt.y)),gt=xt.sub(kt),Rt=(Me.width-(Ne.left+Ne.right+ue.padding.left+ue.padding.right))/gt.x,zt=(Me.height-(Ne.top+Ne.bottom+ue.padding.top+ue.padding.bottom))/gt.y;if(!(zt<0||Rt<0)){var Ut=Math.min(Me.scaleZoom(Me.scale*Math.min(Rt,zt)),ue.maxZoom),tr=e.Point.convert(ue.offset),ur=(ue.padding.left-ue.padding.right)/2,kr=(ue.padding.top-ue.padding.bottom)/2,wr=new e.Point(tr.x+ur,tr.y+kr).mult(Me.scale/Me.zoomScale(Ut));return{center:Me.unproject(We.add(rt).div(2).sub(wr)),zoom:Ut,bearing:ie}}e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},z.prototype.fitBounds=function(B,q,ie){return this._fitInternal(this.cameraForBounds(B,q),q,ie)},z.prototype.fitScreenCoordinates=function(B,q,ie,ue,me){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(B)),this.transform.pointLocation(e.Point.convert(q)),ie,ue),ue,me)},z.prototype._fitInternal=function(B,q,ie){return B?(delete(q=e.extend(B,q)).padding,q.linear?this.easeTo(q,ie):this.flyTo(q,ie)):this},z.prototype.jumpTo=function(B,q){this.stop();var ie=this.transform,ue=!1,me=!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&&(me=!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",q)).fire(new e.Event("move",q)),ue&&this.fire(new e.Event("zoomstart",q)).fire(new e.Event("zoom",q)).fire(new e.Event("zoomend",q)),me&&this.fire(new e.Event("rotatestart",q)).fire(new e.Event("rotate",q)).fire(new e.Event("rotateend",q)),ye&&this.fire(new e.Event("pitchstart",q)).fire(new e.Event("pitch",q)).fire(new e.Event("pitchend",q)),this.fire(new e.Event("moveend",q))},z.prototype.easeTo=function(B,q){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,me=this.getZoom(),ye=this.getBearing(),Me=this.getPitch(),Ne=this.getPadding(),We="zoom"in B?+B.zoom:me,rt="bearing"in B?this._normalizeBearing(B.bearing,ye):ye,vt="pitch"in B?+B.pitch:Me,Lt="padding"in B?B.padding:ue.padding,xt=e.Point.convert(B.offset),kt=ue.centerPoint.add(xt),gt=ue.pointLocation(kt),Rt=e.LngLat.convert(B.center||gt);this._normalizeCenter(Rt);var zt,Ut,tr=ue.project(gt),ur=ue.project(Rt).sub(tr),kr=ue.zoomScale(We-me);B.around&&(zt=e.LngLat.convert(B.around),Ut=ue.locationPoint(zt));var wr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||We!==me,this._rotating=this._rotating||ye!==rt,this._pitching=this._pitching||vt!==Me,this._padding=!ue.isPaddingEqual(Lt),this._easeId=B.easeId,this._prepareEase(q,B.noMoveStart,wr),clearTimeout(this._easeEndTimeoutID),this._ease(function(Qr){if(ie._zooming&&(ue.zoom=e.number(me,We,Qr)),ie._rotating&&(ue.bearing=e.number(ye,rt,Qr)),ie._pitching&&(ue.pitch=e.number(Me,vt,Qr)),ie._padding&&(ue.interpolatePadding(Ne,Lt,Qr),kt=ue.centerPoint.add(xt)),zt)ue.setLocationAtPoint(zt,Ut);else{var Kr=ue.zoomScale(ue.zoom-me),pn=We>me?Math.min(2,kr):Math.max(.5,kr),ln=Math.pow(pn,1-Qr),Vn=ue.unproject(tr.add(ur.mult(Qr*ln)).mult(Kr));ue.setLocationAtPoint(ue.renderWorldCopies?Vn.wrap():Vn,kt)}ie._fireMoveEvents(q)},function(Qr){ie._afterEase(q,Qr)},B),this},z.prototype._prepareEase=function(B,q,ie){ie===void 0&&(ie={}),this._moving=!0,q||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))},z.prototype._afterEase=function(B,q){if(!this._easeId||!q||this._easeId!==q){delete this._easeId;var ie=this._zooming,ue=this._rotating,me=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)),me&&this.fire(new e.Event("pitchend",B)),this.fire(new e.Event("moveend",B))}},z.prototype.flyTo=function(B,q){var ie=this;if(!B.essential&&e.browser.prefersReducedMotion){var ue=e.pick(B,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ue,q)}this.stop(),B=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},B);var me=this.transform,ye=this.getZoom(),Me=this.getBearing(),Ne=this.getPitch(),We=this.getPadding(),rt="zoom"in B?e.clamp(+B.zoom,me.minZoom,me.maxZoom):ye,vt="bearing"in B?this._normalizeBearing(B.bearing,Me):Me,Lt="pitch"in B?+B.pitch:Ne,xt="padding"in B?B.padding:me.padding,kt=me.zoomScale(rt-ye),gt=e.Point.convert(B.offset),Rt=me.centerPoint.add(gt),zt=me.pointLocation(Rt),Ut=e.LngLat.convert(B.center||zt);this._normalizeCenter(Ut);var tr=me.project(zt),ur=me.project(Ut).sub(tr),kr=B.curve,wr=Math.max(me.width,me.height),Qr=wr/kt,Kr=ur.mag();if("minZoom"in B){var pn=e.clamp(Math.min(B.minZoom,ye,rt),me.minZoom,me.maxZoom),ln=wr/me.zoomScale(pn-ye);kr=Math.sqrt(ln/Kr*2)}var Vn=kr*kr;function Zn(ea){var ba=(Qr*Qr-wr*wr+(ea?-1:1)*Vn*Vn*Kr*Kr)/(2*(ea?Qr:wr)*Vn*Kr);return Math.log(Math.sqrt(ba*ba+1)-ba)}function fa(ea){return(Math.exp(ea)-Math.exp(-ea))/2}function Hr(ea){return(Math.exp(ea)+Math.exp(-ea))/2}var Tn=Zn(0),Xn=function(ea){return Hr(Tn)/Hr(Tn+kr*ea)},Gn=function(ea){return wr*((Hr(Tn)*(fa(ba=Tn+kr*ea)/Hr(ba))-fa(Tn))/Vn)/Kr;var ba},aa=(Zn(1)-Tn)/kr;if(Math.abs(Kr)<1e-6||!isFinite(aa)){if(Math.abs(wr-Qr)<1e-6)return this.easeTo(B,q);var pa=Qr<wr?-1:1;aa=Math.abs(Math.log(Qr/wr))/kr,Gn=function(){return 0},Xn=function(ea){return Math.exp(pa*kr*ea)}}if("duration"in B)B.duration=+B.duration;else{var Ea="screenSpeed"in B?+B.screenSpeed/kr:+B.speed;B.duration=1e3*aa/Ea}return B.maxDuration&&B.duration>B.maxDuration&&(B.duration=0),this._zooming=!0,this._rotating=Me!==vt,this._pitching=Lt!==Ne,this._padding=!me.isPaddingEqual(xt),this._prepareEase(q,!1),this._ease(function(ea){var ba=ea*aa,va=1/Xn(ba);me.zoom=ea===1?rt:ye+me.scaleZoom(va),ie._rotating&&(me.bearing=e.number(Me,vt,ea)),ie._pitching&&(me.pitch=e.number(Ne,Lt,ea)),ie._padding&&(me.interpolatePadding(We,xt,ea),Rt=me.centerPoint.add(gt));var Pa=ea===1?Ut:me.unproject(tr.add(ur.mult(Gn(ba))).mult(va));me.setLocationAtPoint(me.renderWorldCopies?Pa.wrap():Pa,Rt),ie._fireMoveEvents(q)},function(){return ie._afterEase(q)},B),this},z.prototype.isEasing=function(){return!!this._easeFrameId},z.prototype.stop=function(){return this._stop()},z.prototype._stop=function(B,q){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,q)}if(!B){var ue=this.handlers;ue&&ue.stop()}return this},z.prototype._ease=function(B,q,ie){ie.animate===!1||ie.duration===0?(B(1),q()):(this._easeStart=e.browser.now(),this._easeOptions=ie,this._onEaseFrame=B,this._onEaseEnd=q,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,q){B=e.wrap(B,-180,180);var ie=Math.abs(B-q);return Math.abs(B-360-q)<ie&&(B-=360),Math.abs(B+360-q)<ie&&(B+=360),B},z.prototype._normalizeCenter=function(B){var q=this.transform;if(q.renderWorldCopies&&!q.lngRange){var ie=B.lng-q.center.lng;B.lng+=ie>180?-360:ie<-180?360:0}},z}(e.Evented),Fi=function(C){C===void 0&&(C={}),this.options=C,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Fi.prototype.getDefaultPosition=function(){return"bottom-right"},Fi.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},Fi.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},Fi.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(q,ie,ue){return ie.value&&(q+=ie.key+"="+ie.value+(ue<z.length-1?"&":"")),q},"?");C.href=e.config.FEEDBACK_URL+"/"+B+(this._map._hash?this._map._hash.getHashString(!0):""),C.rel="noopener nofollow"}},Fi.prototype._updateData=function(C){!C||C.sourceDataType!=="metadata"&&C.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},Fi.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 q in B){var ie=B[q];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 me=(C=C.filter(function(ye,Me){for(var Ne=Me+1;Ne<C.length;Ne++)if(C[Ne].indexOf(ye)>=0)return!1;return!0})).join(" | ");me!==this._attribHTML&&(this._attribHTML=me,C.length?(this._innerContainer.innerHTML=me,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Fi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var ts=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};ts.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},ts.prototype.onRemove=function(){t.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ts.prototype.getDefaultPosition=function(){return"bottom-left"},ts.prototype._updateLogo=function(C){C&&C.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},ts.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}},ts.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 ua=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};ua.prototype.add=function(C){var z=++this._id;return this._queue.push({callback:C,id:z,cancelled:!1}),z},ua.prototype.remove=function(C){for(var z=this._currentlyRunning,B=0,q=z?this._queue.concat(z):this._queue;B<q.length;B+=1){var ie=q[B];if(ie.id===C)return void(ie.cancelled=!0)}},ua.prototype.run=function(C){C===void 0&&(C=0);var z=this._currentlyRunning=this._queue;this._queue=[];for(var B=0,q=z;B<q.length;B+=1){var ie=q[B];if(!ie.cancelled&&(ie.callback(C),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},ua.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var xa={"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"},Ns=e.window.HTMLImageElement,js=e.window.HTMLElement,rs=e.window.ImageBitmap,Io={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},Go=function(C){function z(q){var ie=this;if((q=e.extend({},Io,q)).minZoom!=null&&q.maxZoom!=null&&q.minZoom>q.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(q.minPitch!=null&&q.maxPitch!=null&&q.minPitch>q.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(q.minPitch!=null&&q.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(q.maxPitch!=null&&q.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var ue=new Ht(q.minZoom,q.maxZoom,q.minPitch,q.maxPitch,q.renderWorldCopies);if(C.call(this,ue,q),this._interactive=q.interactive,this._maxTileCacheSize=q.maxTileCacheSize,this._failIfMajorPerformanceCaveat=q.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=q.preserveDrawingBuffer,this._antialias=q.antialias,this._trackResize=q.trackResize,this._bearingSnap=q.bearingSnap,this._refreshExpiredTiles=q.refreshExpiredTiles,this._fadeDuration=q.fadeDuration,this._crossSourceCollisions=q.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=q.collectResourceTiming,this._renderTaskQueue=new ua,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},xa,q.locale),this._requestManager=new e.RequestManager(q.transformRequest,q.accessToken),typeof q.container=="string"){if(this._container=e.window.document.getElementById(q.container),!this._container)throw new Error("Container '"+q.container+"' not found.")}else{if(!(q.container instanceof js))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=q.container}if(q.maxBounds&&this.setMaxBounds(q.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 Ri(this,q);var me=typeof q.hash=="string"&&q.hash||void 0;this._hash=q.hash&&new Sr(me).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:q.center,zoom:q.zoom,bearing:q.bearing,pitch:q.pitch}
591),q.bounds&&(this.resize(),this.fitBounds(q.bounds,e.extend({},q.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=q.localIdeographFontFamily,q.style&&this.setStyle(q.style,{localIdeographFontFamily:q.localIdeographFontFamily}),q.attributionControl&&this.addControl(new Fi({customAttribution:q.customAttribution})),this.addControl(new ts,q.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(q,ie){if(ie===void 0&&q.getDefaultPosition&&(ie=q.getDefaultPosition()),ie===void 0&&(ie="top-right"),!q||!q.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=q.onAdd(this);this._controls.push(q);var me=this._controlPositions[ie];return ie.indexOf("bottom")!==-1?me.insertBefore(ue,me.firstChild):me.appendChild(ue),this},z.prototype.removeControl=function(q){if(!q||!q.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(q);return ie>-1&&this._controls.splice(ie,1),q.onRemove(this),this},z.prototype.resize=function(q){var ie=this._containerDimensions(),ue=ie[0],me=ie[1];this._resizeCanvas(ue,me),this.transform.resize(ue,me),this.painter.resize(ue,me);var ye=!this._moving;return ye&&(this.stop(),this.fire(new e.Event("movestart",q)).fire(new e.Event("move",q))),this.fire(new e.Event("resize",q)),ye&&this.fire(new e.Event("moveend",q)),this},z.prototype.getBounds=function(){return this.transform.getBounds()},z.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},z.prototype.setMaxBounds=function(q){return this.transform.setMaxBounds(e.LngLatBounds.convert(q)),this._update()},z.prototype.setMinZoom=function(q){if((q=q??-2)>=-2&&q<=this.transform.maxZoom)return this.transform.minZoom=q,this._update(),this.getZoom()<q&&this.setZoom(q),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},z.prototype.getMinZoom=function(){return this.transform.minZoom},z.prototype.setMaxZoom=function(q){if((q=q??22)>=this.transform.minZoom)return this.transform.maxZoom=q,this._update(),this.getZoom()>q&&this.setZoom(q),this;throw new Error("maxZoom must be greater than the current minZoom")},z.prototype.getMaxZoom=function(){return this.transform.maxZoom},z.prototype.setMinPitch=function(q){if((q=q??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(q>=0&&q<=this.transform.maxPitch)return this.transform.minPitch=q,this._update(),this.getPitch()<q&&this.setPitch(q),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(q){if((q=q??60)>60)throw new Error("maxPitch must be less than or equal to 60");if(q>=this.transform.minPitch)return this.transform.maxPitch=q,this._update(),this.getPitch()>q&&this.setPitch(q),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(q){return this.transform.renderWorldCopies=q,this._update()},z.prototype.project=function(q){return this.transform.locationPoint(e.LngLat.convert(q))},z.prototype.unproject=function(q){return this.transform.pointLocation(e.Point.convert(q))},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(q,ie,ue){var me,ye=this;
591if(q==="mouseenter"||q==="mouseover"){var Me=!1;return{layer:ie,listener:ue,delegates:{mousemove:function(We){var rt=ye.getLayer(ie)?ye.queryRenderedFeatures(We.point,{layers:[ie]}):[];rt.length?Me||(Me=!0,ue.call(ye,new Dn(q,ye,We.originalEvent,{features:rt}))):Me=!1},mouseout:function(){Me=!1}}}}if(q==="mouseleave"||q==="mouseout"){var Ne=!1;return{layer:ie,listener:ue,delegates:{mousemove:function(We){(ye.getLayer(ie)?ye.queryRenderedFeatures(We.point,{layers:[ie]}):[]).length?Ne=!0:Ne&&(Ne=!1,ue.call(ye,new Dn(q,ye,We.originalEvent)))},mouseout:function(We){Ne&&(Ne=!1,ue.call(ye,new Dn(q,ye,We.originalEvent)))}}}}return{layer:ie,listener:ue,delegates:(me={},me[q]=function(We){var rt=ye.getLayer(ie)?ye.queryRenderedFeatures(We.point,{layers:[ie]}):[];rt.length&&(We.features=rt,ue.call(ye,We),delete We.features)},me)}},z.prototype.on=function(q,ie,ue){if(ue===void 0)return C.prototype.on.call(this,q,ie);var me=this._createDelegatedListener(q,ie,ue);for(var ye in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[q]=this._delegatedListeners[q]||[],this._delegatedListeners[q].push(me),me.delegates)this.on(ye,me.delegates[ye]);return this},z.prototype.once=function(q,ie,ue){if(ue===void 0)return C.prototype.once.call(this,q,ie);var me=this._createDelegatedListener(q,ie,ue);for(var ye in me.delegates)this.once(ye,me.delegates[ye]);return this},z.prototype.off=function(q,ie,ue){var me=this;return ue===void 0?C.prototype.off.call(this,q,ie):(this._delegatedListeners&&this._delegatedListeners[q]&&function(ye){for(var Me=ye[q],Ne=0;Ne<Me.length;Ne++){var We=Me[Ne];if(We.layer===ie&&We.listener===ue){for(var rt in We.delegates)me.off(rt,We.delegates[rt]);return Me.splice(Ne,1),me}}}(this._delegatedListeners),this)},z.prototype.queryRenderedFeatures=function(q,ie){if(!this.style)return[];var ue;if(ie!==void 0||q===void 0||q instanceof e.Point||Array.isArray(q)||(ie=q,q=void 0),ie=ie||{},(q=q||[[0,0],[this.transform.width,this.transform.height]])instanceof e.Point||typeof q[0]=="number")ue=[e.Point.convert(q)];else{var me=e.Point.convert(q[0]),ye=e.Point.convert(q[1]);ue=[me,new e.Point(ye.x,me.y),ye,new e.Point(me.x,ye.y),me]}return this.style.queryRenderedFeatures(ue,ie,this.transform)},z.prototype.querySourceFeatures=function(q,ie){return this.style.querySourceFeatures(q,ie)},z.prototype.setStyle=function(q,ie){return(ie=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},ie)).diff!==!1&&ie.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&q?(this._diffStyle(q,ie),this):(this._localIdeographFontFamily=ie.localIdeographFontFamily,this._updateStyle(q,ie))},z.prototype._getUIString=function(q){var ie=this._locale[q];if(ie==null)throw new Error("Missing UI string '"+q+"'");return ie},z.prototype._updateStyle=function(q,ie){return this.style&&(this.style.setEventedParent(null),this.style._remove()),q?(this.style=new bn(this,ie||{}),this.style.setEventedParent(this,{style:this.style}),typeof q=="string"?this.style.loadURL(q):this.style.loadJSON(q),this):(delete this.style,this)},z.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new bn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},z.prototype._diffStyle=function(q,ie){var ue=this;if(typeof q=="string"){var me=this._requestManager.normalizeStyleURL(q),ye=this._requestManager.transformRequest(me,e.ResourceType.Style);e.getJSON(ye,function(Me,Ne){Me?ue.fire(new e.ErrorEvent(Me)):Ne&&ue._updateDiff(Ne,ie)})}else typeof q=="object"&&this._updateDiff(q,ie)},z.prototype._updateDiff=function(q,ie){try{this.style.setState(q)&&this._update(!0)}catch(ue){e.warnOnce("Unable to perform style diff: "+(ue.message||ue.error||ue)+". Rebuilding the style from scratch."),this._updateStyle(q,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(q,ie){return this._lazyInitEmptyStyle(),this.style.addSource(q,ie),this._update(!0)},z.prototype.isSourceLoaded=function(q){var ie=this.style&&this.style.sourceCaches[q];
591if(ie!==void 0)return ie.loaded();this.fire(new e.ErrorEvent(new Error("There is no source with ID '"+q+"'")))},z.prototype.areTilesLoaded=function(){var q=this.style&&this.style.sourceCaches;for(var ie in q){var ue=q[ie]._tiles;for(var me in ue){var ye=ue[me];if(ye.state!=="loaded"&&ye.state!=="errored")return!1}}return!0},z.prototype.addSourceType=function(q,ie,ue){return this._lazyInitEmptyStyle(),this.style.addSourceType(q,ie,ue)},z.prototype.removeSource=function(q){return this.style.removeSource(q),this._update(!0)},z.prototype.getSource=function(q){return this.style.getSource(q)},z.prototype.addImage=function(q,ie,ue){ue===void 0&&(ue={});var me=ue.pixelRatio;me===void 0&&(me=1);var ye=ue.sdf;ye===void 0&&(ye=!1);var Me=ue.stretchX,Ne=ue.stretchY,We=ue.content;if(this._lazyInitEmptyStyle(),ie instanceof Ns||rs&&ie instanceof rs){var rt=e.browser.getImageData(ie),vt=rt.width,Lt=rt.height,xt=rt.data;this.style.addImage(q,{data:new e.RGBAImage({width:vt,height:Lt},xt),pixelRatio:me,stretchX:Me,stretchY:Ne,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 kt=ie.width,gt=ie.height,Rt=ie.data,zt=ie;this.style.addImage(q,{data:new e.RGBAImage({width:kt,height:gt},new Uint8Array(Rt)),pixelRatio:me,stretchX:Me,stretchY:Ne,content:We,sdf:ye,version:0,userImage:zt}),zt.onAdd&&zt.onAdd(this,q)}},z.prototype.updateImage=function(q,ie){var ue=this.style.getImage(q);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 me=ie instanceof Ns||rs&&ie instanceof rs?e.browser.getImageData(ie):ie,ye=me.width,Me=me.height,Ne=me.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 Ns||rs&&ie instanceof rs);ue.data.replace(Ne,We),this.style.updateImage(q,ue)},z.prototype.hasImage=function(q){return q?!!this.style.getImage(q):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)},z.prototype.removeImage=function(q){this.style.removeImage(q)},z.prototype.loadImage=function(q,ie){e.getImage(this._requestManager.transformRequest(q,e.ResourceType.Image),ie)},z.prototype.listImages=function(){return this.style.listImages()},z.prototype.addLayer=function(q,ie){return this._lazyInitEmptyStyle(),this.style.addLayer(q,ie),this._update(!0)},z.prototype.moveLayer=function(q,ie){return this.style.moveLayer(q,ie),this._update(!0)},z.prototype.removeLayer=function(q){return this.style.removeLayer(q),this._update(!0)},z.prototype.getLayer=function(q){return this.style.getLayer(q)},z.prototype.setLayerZoomRange=function(q,ie,ue){return this.style.setLayerZoomRange(q,ie,ue),this._update(!0)},z.prototype.setFilter=function(q,ie,ue){return ue===void 0&&(ue={}),this.style.setFilter(q,ie,ue),this._update(!0)},z.prototype.getFilter=function(q){return this.style.getFilter(q)},z.prototype.setPaintProperty=function(q,ie,ue,me){return me===void 0&&(me={}),this.style.setPaintProperty(q,ie,ue,me),this._update(!0)},z.prototype.getPaintProperty=function(q,ie){return this.style.getPaintProperty(q,ie)},z.prototype.setLayoutProperty=function(q,ie,ue,me){return me===void 0&&(me={}),this.style.setLayoutProperty(q,ie,ue,me),this._update(!0)},z.prototype.getLayoutProperty=function(q,ie){return this.style.getLayoutProperty(q,ie)},z.prototype.setLight=function(q,ie){return ie===void 0&&(ie={}),this._lazyInitEmptyStyle(),this.style.setLight(q,ie),this._update(!0)},z.prototype.getLight=function(){return this.style.getLight()},z.prototype.setFeatureState=function(q,ie){return this.style.setFeatureState(q,ie),this._update()},z.prototype.removeFeatureState=function(q,ie){return this.style.removeFeatureState(q,ie),this._update()},z.prototype.getFeatureState=function(q){return this.style.getFeatureState(q)},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 q=0,ie=0;return this._container&&(q=this._container.clientWidth||400,ie=this._container.clientHeight||300),[q,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 q=this._container;q.classList.add("mapboxgl-map"),(this._missingCSSCanary=t.create("div","mapboxgl-canary",q)).style.visibility="hidden",this._detectMissingCSS();var ie=this._canvasContainer=t.create("div","mapboxgl-canvas-container",q);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 me=this._controlContainer=t.create("div","mapboxgl-control-container",q),ye=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Me){ye[Me]=t.create("div","mapboxgl-ctrl-"+Me,me)})},z.prototype._resizeCanvas=function(q,ie){var ue=e.browser.devicePixelRatio||1;this._canvas.width=ue*q,this._canvas.height=ue*ie,this._canvas.style.width=q+"px",this._canvas.style.height=ie+"px"},z.prototype._setupPainter=function(){var q=e.extend({},n.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),ie=this._canvas.getContext("webgl",q)||this._canvas.getContext("experimental-webgl",q);ie?(this.painter=new za(ie,this.transform),e.webpSupported.testSupport(ie)):this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")))},z.prototype._contextLost=function(q){q.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:q}))},z.prototype._contextRestored=function(q){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:q}))},z.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},z.prototype._update=function(q){return this.style?(this._styleDirty=this._styleDirty||q,this._sourcesDirty=!0,this.triggerRepaint(),this):this},z.prototype._requestRenderFrame=function(q){return this._update(),this._renderTaskQueue.add(q)},z.prototype._cancelRenderFrame=function(q){this._renderTaskQueue.remove(q)},z.prototype._render=function(q){var ie,ue=this,me=0,ye=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(ie=ye.createQueryEXT(),ye.beginQueryEXT(ye.TIME_ELAPSED_EXT,ie),me=e.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(q),!this._removed){var Me=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Ne=this.transform.zoom,We=e.browser.now();this.style.zoomHistory.update(Ne,We);var rt=new e.EvaluationParameters(Ne,{now:We,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),vt=rt.crossFadingFactor();vt===1&&vt===this._crossFadingFactor||(Me=!0,this._crossFadingFactor=vt),this.style.update(rt)}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 Lt=e.browser.now()-me;ye.endQueryEXT(ye.TIME_ELAPSED_EXT,ie),setTimeout(function(){var kt=ye.getQueryObjectEXT(ie,ye.QUERY_RESULT_EXT)/1e6;ye.deleteQueryEXT(ie),ue.fire(new e.Event("gpu-timing-frame",{cpuTime:Lt,gpuTime:kt}))},50)}if(this.listens("gpu-timing-layer")){var xt=this.painter.collectGpuTimers();setTimeout(function(){var kt=ue.painter.queryGpuTimers(xt);ue.fire(new e.Event("gpu-timing-layer",{layerTimes:kt}))},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 q=0,ie=this._controls;q<ie.length;q+=1)ie[q].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(),Qs(this._canvasContainer),Qs(this._controlContainer),Qs(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new e.Event("remove"))},z.prototype.triggerRepaint=function(){var q=this;this.style&&!this._frame&&(this._frame=e.browser.frame(function(ie){q._frame=null,q._render(ie)}))},z.prototype._onWindowOnline=function(){this._update()},z.prototype._onWindowResize=function(q){this._trackResize&&this.resize({originalEvent:q})._update()},B.showTileBoundaries.get=function(){return!!this._showTileBoundaries},B.showTileBoundaries.set=function(q){this._showTileBoundaries!==q&&(this._showTileBoundaries=q,this._update())},B.showPadding.get=function(){return!!this._showPadding},B.showPadding.set=function(q){this._showPadding!==q&&(this._showPadding=q,this._update())},B.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},B.showCollisionBoxes.set=function(q){this._showCollisionBoxes!==q&&(this._showCollisionBoxes=q,q?this.style._generateCollisionBoxes():this._update())},B.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},B.showOverdrawInspector.set=function(q){this._showOverdrawInspector!==q&&(this._showOverdrawInspector=q,this._update())},B.repaint.get=function(){return!!this._repaint},B.repaint.set=function(q){this._repaint!==q&&(this._repaint=q,this.triggerRepaint())},B.vertices.get=function(){return!!this._vertices}
vendor: 12,804 bytes, line 591
591,B.vertices.set=function(q){this._vertices=q,this._update()},z.prototype._setCacheLimits=function(q,ie){e.setCacheLimits(q,ie)},B.version.get=function(){return e.version},Object.defineProperties(z.prototype,B),z}(Bs);function Qs(C){C.parentNode&&C.parentNode.removeChild(C)}var As={showCompass:!0,showZoom:!0,visualizePitch:!1},Ka=function(C){var z=this;this.options=e.extend({},As,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))};Ka.prototype._updateZoomButtons=function(){var C=this._map.getZoom();this._zoomInButton.disabled=C===this._map.getMaxZoom(),this._zoomOutButton.disabled=C===this._map.getMinZoom()},Ka.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},Ka.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 ii(this._map,this._compass,this.options.visualizePitch)),this._container},Ka.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},Ka.prototype._createButton=function(C,z){var B=t.create("button",C,this._container);return B.type="button",B.addEventListener("click",z),B},Ka.prototype._setButtonTitle=function(C,z){var B=this._map._getUIString("NavigationControl."+z);C.title=B,C.setAttribute("aria-label",B)};var ii=function(C,z,B){B===void 0&&(B=!1),this._clickTolerance=10,this.element=z,this.mouseRotate=new La({clickTolerance:C.dragRotate._mouseRotate._clickTolerance}),this.map=C,B&&(this.mousePitch=new ma({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 ds(C,z,B){if(C=new e.LngLat(C.lng,C.lat),z){var q=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(q).distSqr(z)<ue?C=q:B.locationPoint(ie).distSqr(z)<ue&&(C=ie)}for(;Math.abs(C.lng-B.center.lng)>180;){var me=B.locationPoint(C);if(me.x>=0&&me.y>=0&&me.x<=B.width&&me.y<=B.height)break;C.lng>B.center.lng?C.lng-=360:C.lng+=360}return C}ii.prototype.down=function(C,z){this.mouseRotate.mousedown(C,z),this.mousePitch&&this.mousePitch.mousedown(C,z),t.disableDrag()},ii.prototype.move=function(C,z){var B=this.map,q=this.mouseRotate.mousemoveWindow(C,z);if(q&&q.bearingDelta&&B.setBearing(B.getBearing()+q.bearingDelta),this.mousePitch){var ie=this.mousePitch.mousemoveWindow(C,z);ie&&ie.pitchDelta&&B.setPitch(B.getPitch()+ie.pitchDelta)}},ii.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()},ii.prototype.offTemp=function(){t.enableDrag(),t.removeEventListener(e.window,"mousemove",this.mousemove),t.removeEventListener(e.window,"mouseup",this.mouseup)},ii.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)},ii.prototype.mousemove=function(C){this.move(C,t.mousePos(this.element,C))},ii.prototype.mouseup=function(C){this.mouseRotate.mouseupWindow(C),this.mousePitch&&this.mousePitch.mouseupWindow(C),this.offTemp()},ii.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))},ii.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))},ii.prototype.touchend=function(C){C.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},ii.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var ss={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 Ii(C,z,B){var q=C.classList;for(var ie in ss)q.remove("mapboxgl-"+B+"-anchor-"+ie);q.add("mapboxgl-"+B+"-anchor-"+z)}var ms,Ss=function(C){function z(B,q){var ie=this;if(C.call(this),(B instanceof e.window.HTMLElement||q)&&(B=e.extend({element:B},q)),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 me=t.createNS("http://www.w3.org/2000/svg","g");me.setAttributeNS(null,"stroke","none"),me.setAttributeNS(null,"stroke-width","1"),me.setAttributeNS(null,"fill","none"),me.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 Ne=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"}];Ne<We.length;Ne+=1){var rt=We[Ne],vt=t.createNS("http://www.w3.org/2000/svg","ellipse");vt.setAttributeNS(null,"opacity","0.04"),vt.setAttributeNS(null,"cx","10.5"),vt.setAttributeNS(null,"cy","5.80029008"),vt.setAttributeNS(null,"rx",rt.rx),vt.setAttributeNS(null,"ry",rt.ry),Me.appendChild(vt)}var Lt=t.createNS("http://www.w3.org/2000/svg","g");Lt.setAttributeNS(null,"fill",this._color);var xt=t.createNS("http://www.w3.org/2000/svg","path");xt.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"),Lt.appendChild(xt);var kt=t.createNS("http://www.w3.org/2000/svg","g");kt.setAttributeNS(null,"opacity","0.25"),kt.setAttributeNS(null,"fill","#000000");var gt=t.createNS("http://www.w3.org/2000/svg","path");gt.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"),kt.appendChild(gt);var Rt=t.createNS("http://www.w3.org/2000/svg","g");Rt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Rt.setAttributeNS(null,"fill","#FFFFFF");var zt=t.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Ut=t.createNS("http://www.w3.org/2000/svg","circle");Ut.setAttributeNS(null,"fill","#000000"),Ut.setAttributeNS(null,"opacity","0.25"),Ut.setAttributeNS(null,"cx","5.5"),Ut.setAttributeNS(null,"cy","5.5"),Ut.setAttributeNS(null,"r","5.4999962");var tr=t.createNS("http://www.w3.org/2000/svg","circle");tr.setAttributeNS(null,"fill","#FFFFFF"),tr.setAttributeNS(null,"cx","5.5"),tr.setAttributeNS(null,"cy","5.5"),tr.setAttributeNS(null,"r","5.4999962"),zt.appendChild(Ut),zt.appendChild(tr),ye.appendChild(Me),ye.appendChild(Lt),ye.appendChild(kt),ye.appendChild(Rt),ye.appendChild(zt),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(ur){ur.preventDefault()}),this._element.addEventListener("mousedown",function(ur){ur.preventDefault()}),this._element.addEventListener("focus",function(){var ur=ie._map.getContainer();ur.scrollTop=0,ur.scrollLeft=0}),Ii(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 q=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":[q,-1*(24.6+q)],"bottom-right":[-q,-1*(24.6+q)],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 q=B.code,ie=B.charCode||B.keyCode;q!=="Space"&&q!=="Enter"&&ie!==32&&ie!==13||this.togglePopup()},z.prototype._onMapClick=function(B){var q=B.originalEvent.target,ie=this._element;this._popup&&(q===ie||ie.contains(q))&&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=ds(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var q="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?q="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(q="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,ss[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+ie+" "+q)}},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),xs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Es=0,ls=!1,$s=function(C){function z(B){C.call(this),this.options=e.extend({},xs,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 q;return this._map=B,this._container=t.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),q=this._setupUI,ms!==void 0?q(ms):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(ie){ms=ie.state!=="denied",q(ms)}):(ms=!!e.window.navigator.geolocation,q(ms)),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,Es=0,ls=!1},z.prototype._isOutOfMapMaxBounds=function(B){var q=this._map.getMaxBounds(),ie=B.coords;return q&&(ie.longitude<q.getWest()||ie.longitude>q.getEast()||ie.latitude<q.getSouth()||ie.latitude>q.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 q=new e.LngLat(B.coords.longitude,B.coords.latitude),ie=B.coords.accuracy,ue=this._map.getBearing(),me=e.extend({bearing:ue},this.options.fitBoundsOptions);this._map.fitBounds(q.toBounds(ie),me,{geolocateSource:!0})},z.prototype._updateMarker=function(B){if(B){var q=new e.LngLat(B.coords.longitude,B.coords.latitude);this._accuracyCircleMarker.setLngLat(q).addTo(this._map),this._userLocationDotMarker.setLngLat(q).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,q=this._map.unproject([0,B]),ie=this._map.unproject([1,B]),ue=q.distanceTo(ie),me=Math.ceil(2*this._accuracy/ue);this._circleElement.style.width=me+"px",this._circleElement.style.height=me+"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 q=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=q,this._geolocateButton.setAttribute("aria-label",q),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(B.code===3&&ls)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 q=this;if(this._container.addEventListener("contextmenu",function(me){return me.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 Ss(this._dotElement),this._circleElement=t.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ss({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(me){var ye=me.originalEvent&&me.originalEvent.type==="resize";me.geolocateSource||q._watchState!=="ACTIVE_LOCK"||ye||(q._watchState="BACKGROUND",q._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),q._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),q.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":Es--,ls=!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"),++Es>1?(B={maximumAge:6e5,timeout:0},ls=!0):(B=this.options.positionOptions,ls=!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),fl={maxWidth:100,unit:"metric"},gs=function(C){this.options=e.extend({},fl,C),e.bindAll(["_onMove","setUnit"],this)};function el(C,z,B){var q=B&&B.maxWidth||100,ie=C._container.clientHeight/2,ue=C.unproject([0,ie]),me=C.unproject([q,ie]),ye=ue.distanceTo(me);if(B&&B.unit==="imperial"){var Me=3.2808*ye;Me>5280?Ls(z,q,Me/5280,C._getUIString("ScaleControl.Miles")):Ls(z,q,Me,C._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Ls(z,q,ye/1852,C._getUIString("ScaleControl.NauticalMiles")):ye>=1e3?Ls(z,q,ye/1e3,C._getUIString("ScaleControl.Kilometers")):Ls(z,q,ye,C._getUIString("ScaleControl.Meters"))}function Ls(C,z,B,q){var ie,ue,me,ye=(ie=B,ue=Math.pow(10,(""+Math.floor(ie)).length-1),me=(me=ie/ue)>=10?10:me>=5?5:me>=3?3:me>=2?2:me>=1?1:function(Ne){var We=Math.pow(10,Math.ceil(-Math.log(Ne)/Math.LN10));return Math.round(Ne*We)/We}(me),ue*me),Me=ye/B;C.style.width=z*Me+"px",C.innerHTML=ye+" "+q}gs.prototype.getDefaultPosition=function(){return"bottom-left"},gs.prototype._onMove=function(){el(this._map,this._container,this.options)},gs.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},gs.prototype.onRemove=function(){t.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},gs.prototype.setUnit=function(C){this.options.unit=C,el(this._map,this._container,this.options)};
vendor: 6,252 bytes, line 591
591var ao=function(C){this._fullscreen=!1,C&&C.container&&(C.container instanceof e.window.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")};ao.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},ao.prototype.onRemove=function(){t.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ao.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},ao.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)},ao.prototype._updateTitle=function(){var C=this._getTitle();this._fullscreenButton.setAttribute("aria-label",C),this._fullscreenButton.title=C},ao.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ao.prototype._isFullscreen=function(){return this._fullscreen},ao.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())},ao.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 hl={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},pl=function(C){function z(B){C.call(this),this.options=e.extend(Object.create(hl),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 q,ie=e.window.document.createDocumentFragment(),ue=e.window.document.createElement("body");for(ue.innerHTML=B;q=ue.firstChild;)ie.appendChild(q);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="×",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 q=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(vt){return q._container.classList.add(vt)}),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=ds(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||B)){var ue=this._pos=this._trackPointer&&B?B:this._map.project(this._lngLat),me=this.options.anchor,ye=function vt(Lt){if(Lt){if(typeof Lt=="number"){var xt=Math.round(Math.sqrt(.5*Math.pow(Lt,2)));return{center:new e.Point(0,0),top:new e.Point(0,Lt),"top-left":new e.Point(xt,xt),"top-right":new e.Point(-xt,xt),bottom:new e.Point(0,-Lt),"bottom-left":new e.Point(xt,-xt),"bottom-right":new e.Point(-xt,-xt),left:new e.Point(Lt,0),right:new e.Point(-Lt,0)}}if(Lt instanceof e.Point||Array.isArray(Lt)){var kt=e.Point.convert(Lt);return{center:kt,top:kt,"top-left":kt,"top-right":kt,bottom:kt,"bottom-left":kt,"bottom-right":kt,left:kt,right:kt}}return{center:e.Point.convert(Lt.center||[0,0]),top:e.Point.convert(Lt.top||[0,0]),"top-left":e.Point.convert(Lt["top-left"]||[0,0]),"top-right":e.Point.convert(Lt["top-right"]||[0,0]),bottom:e.Point.convert(Lt.bottom||[0,0]),"bottom-left":e.Point.convert(Lt["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(Lt["bottom-right"]||[0,0]),left:e.Point.convert(Lt.left||[0,0]),right:e.Point.convert(Lt.right||[0,0])}}return vt(new e.Point(0,0))}(this.options.offset);if(!me){var Me,Ne=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<Ne/2?Me.push("left"):ue.x>this._map.transform.width-Ne/2&&Me.push("right"),me=Me.length===0?"bottom":Me.join("-")}var rt=ue.add(ye[me]).round();t.setTransform(this._container,ss[me]+" translate("+rt.x+"px,"+rt.y+"px)"),Ii(this._container,me,"popup")}},z.prototype._onClose=function(){this.remove()},z}(e.Evented),le={version:e.version,supported:n,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Go,NavigationControl:Ka,GeolocateControl:$s,AttributionControl:Fi,ScaleControl:gs,FullscreenControl:ao,Popup:pl,Marker:Ss,Style:bn,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:function(){$e().acquire(_t)},clearPrewarmedResources:function(){var C=jt;C&&(C.isPreloaded()&&C.numActive()===1?(C.release(_t),jt=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 bt.workerCount},set workerCount(C){bt.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(v,$,te){$.exports=Math.log2||function(m){return Math.log(m)*Math.LOG2E}},{}],241:[function(v,$,te){$.exports=function(g,b){b||(b=g,g=window);var y=0,e=0,n=0,t={shift:!1,alt:!1,control:!1,meta:!1},i=!1;function r(x){var c=!1;return"altKey"in x&&(c=c||x.altKey!==t.alt,t.alt=!!x.altKey),"shiftKey"in x&&(c=c||x.shiftKey!==t.shift,t.shift=!!x.shiftKey),"ctrlKey"in x&&(c=c||x.ctrlKey!==t.control,t.control=!!x.ctrlKey),"metaKey"in x&&(c=c||x.metaKey!==t.meta,t.meta=!!x.metaKey),c}function d(x,c){var T=m.x(c),_=m.y(c);"buttons"in c&&(x=0|c.buttons),(x!==y||T!==e||_!==n||r(c))&&(y=0|x,e=T||0,n=_||0,b&&b(y,e,
591n,t))}function l(x){d(0,x)}function a(){(y||e||n||t.shift||t.alt||t.meta||t.control)&&(e=n=0,y=0,t.shift=t.alt=t.control=t.meta=!1,b&&b(0,0,0,t))}function u(x){r(x)&&b&&b(y,e,n,t)}function f(x){m.buttons(x)===0?d(0,x):d(y,x)}function o(x){d(y|m.buttons(x),x)}function h(x){d(y&~m.buttons(x),x)}function p(){i||(i=!0,g.addEventListener("mousemove",f),g.addEventListener("mousedown",o),g.addEventListener("mouseup",h),g.addEventListener("mouseleave",l),g.addEventListener("mouseenter",l),g.addEventListener("mouseout",l),g.addEventListener("mouseover",l),g.addEventListener("blur",a),g.addEventListener("keyup",u),g.addEventListener("keydown",u),g.addEventListener("keypress",u),g!==window&&(window.addEventListener("blur",a),window.addEventListener("keyup",u),window.addEventListener("keydown",u),window.addEventListener("keypress",u)))}p();var s={element:g};return Object.defineProperties(s,{enabled:{get:function(){return i},set:function(x){x?p():function(){!i||(i=!1,g.removeEventListener("mousemove",f),g.removeEventListener("mousedown",o),g.removeEventListener("mouseup",h),g.removeEventListener("mouseleave",l),g.removeEventListener("mouseenter",l),g.removeEventListener("mouseout",l),g.removeEventListener("mouseover",l),g.removeEventListener("blur",a),g.removeEventListener("keyup",u),g.removeEventListener("keydown",u),g.removeEventListener("keypress",u),g!==window&&(window.removeEventListener("blur",a),window.removeEventListener("keyup",u),window.removeEventListener("keydown",u),window.removeEventListener("keypress",u)))}()},enumerable:!0},buttons:{get:function(){return y},enumerable:!0},x:{get:function(){return e},enumerable:!0},y:{get:function(){return n},enumerable:!0},mods:{get:function(){return t},enumerable:!0}}),s};var m=v("mouse-event")},{"mouse-event":243}],242:[function(v,$,te){var m={left:0,top:0};$.exports=function(g,b,y){b=b||g.currentTarget||g.srcElement,Array.isArray(y)||(y=[0,0]);var e=g.clientX||0,n=g.clientY||0,t=(i=b,i===window||i===document||i===document.body?m:i.getBoundingClientRect()),i;return y[0]=e-t.left,y[1]=n-t.top,y}},{}],243:[function(v,$,te){function m(g){return g.target||g.srcElement||window}te.buttons=function(g){if(typeof g=="object"){if("buttons"in g)return g.buttons;if("which"in g){if((b=g.which)===2)return 4;if(b===3)return 2;if(b>0)return 1<<b-1}else if("button"in g){var b;if((b=g.button)===1)return 4;if(b===2)return 2;if(b>=0)return 1<<b}}return 0},te.element=m,te.x=function(g){if(typeof g=="object"){if("offsetX"in g)return g.offsetX;var b=m(g).getBoundingClientRect();return g.clientX-b.left}return 0},te.y=function(g){if(typeof g=="object"){if("offsetY"in g)return g.offsetY;var b=m(g).getBoundingClientRect();return g.clientY-b.top}return 0}},{}],244:[function(v,$,te){var m=v("to-px");$.exports=function(g,b,y){typeof g=="function"&&(y=!!b,b=g,g=window);var e=m("ex",g),n=function(t){y&&t.preventDefault();var i=t.deltaX||0,r=t.deltaY||0,d=t.deltaZ||0,l=1;switch(t.deltaMode){case 1:l=e;break;case 2:l=window.innerHeight}if(r*=l,d*=l,(i*=l)||r||d)return b(i,r,d,t)};return g.addEventListener("wheel",n),n}},{"to-px":314}],245:[function(v,$,te){(function(m,g){(function(){/*! Native Promise Only 592 v0.8.1 (c) Kyle Simpson 593 MIT License: http://getify.mit-license.org 594*/(function(b,y,e){y[b]=y[b]||e(),$!==void 0&&$.exports&&($.exports=y[b])})("Promise",m!==void 0?m:this,function(){var b,y,e,n=Object.prototype.toString,t=g!==void 0?function(x){return g(x)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(x,c,T,_){return Object.defineProperty(x,c,{value:T,writable:!0,configurable:_!==!1})}}catch{b=function(c,T,_){return c[T]=_,c}}function i(x,c){e.add(x,c),y||(y=t(e.drain))}function r(x){var c,T=typeof x;return x==null||T!="object"&&T!="function"||(c=x.then),typeof c=="function"&&c}function d(){for(var x=0;x<this.chain.length;x++)l(this,this.state===1?this.chain[x].success:this.chain[x].failure,this.chain[x]);this.chain.length=0}function l(x,c,T){var _,w;try{c===!1?T.reject(x.msg):(_=c===!0?x.msg:c.call(void 0,x.msg))===T.promise?T.reject(TypeError("Promise-chain cycle")):(w=r(_))?w.call(_,T.resolve,T.reject):T.resolve(_)}catch(k){T.reject(k)}}function a(x){var c,T=this;if(!T.triggered){T.triggered=!0,T.def&&(T=T.def);try{(c=r(x))?i(function(){var _=new o(T);try{c.call(x,function(){a.apply(_,arguments)},function(){u.apply(_,arguments)})}catch(w){u.call(_,w)}}):(T.msg=x,T.state=1,T.chain.length>0&&i(d,T))}catch(_){u.call(new o(T),_)}}}function u(x){var c=this;c.triggered||(c.triggered=!0,c.def&&(c=c.def),c.msg=x,c.state=2,c.chain.length>0&&i(d,c))}function f(x,c,T,_){for(var w=0;w<c.length;w++)(function(k){x.resolve(c[k]).then(function(L){T(k,L)},_)})(w)}function o(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 c=new h(this);this.then=function(T,_){var w={success:typeof T!="function"||T,failure:typeof _=="function"&&_};
594return w.promise=new this.constructor(function(k,L){if(typeof k!="function"||typeof L!="function")throw TypeError("Not a function");w.resolve=k,w.reject=L}),c.chain.push(w),c.state!==0&&i(d,c),w.promise},this.catch=function(T){return this.then(void 0,T)};try{x.call(void 0,function(T){a.call(c,T)},function(T){u.call(c,T)})}catch(T){u.call(c,T)}}e=function(){var x,c,T;function _(w,k){this.fn=w,this.self=k,this.next=void 0}return{add:function(w,k){T=new _(w,k),c?c.next=T:x=T,c=T,T=void 0},drain:function(){var w=x;for(x=c=y=void 0;w;)w.fn.call(w.self),w=w.next}}}();var s=b({},"constructor",p,!1);return p.prototype=s,b(s,"__NPO__",0,!1),b(p,"resolve",function(x){return x&&typeof x=="object"&&x.__NPO__===1?x:new this(function(c,T){if(typeof c!="function"||typeof T!="function")throw TypeError("Not a function");c(x)})}),b(p,"reject",function(x){return new this(function(c,T){if(typeof c!="function"||typeof T!="function")throw TypeError("Not a function");T(x)})}),b(p,"all",function(x){var c=this;return n.call(x)!="[object Array]"?c.reject(TypeError("Not an array")):x.length===0?c.resolve([]):new c(function(T,_){if(typeof T!="function"||typeof _!="function")throw TypeError("Not a function");var w=x.length,k=Array(w),L=0;f(c,x,function(A,I){k[A]=I,++L===w&&T(k)},_)})}),b(p,"race",function(x){var c=this;return n.call(x)!="[object Array]"?c.reject(TypeError("Not an array")):new c(function(T,_){if(typeof T!="function"||typeof _!="function")throw TypeError("Not a function");f(c,x,function(w,k){T(k)},_)})}),p})}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{},v("timers").setImmediate)},{timers:311}],246:[function(v,$,te){var m=Math.PI,g=t(120);function b(i,r,d,l){return["C",i,r,d,l,d,l]}function y(i,r,d,l,a,u){return["C",i/3+2/3*d,r/3+2/3*l,a/3+2/3*d,u/3+2/3*l,a,u]}function e(i,r,d,l,a,u,f,o,h,p){if(p)I=p[0],P=p[1],L=p[2],A=p[3];else{var s=n(i,r,-a);i=s.x,r=s.y;var x=(i-(o=(s=n(o,h,-a)).x))/2,c=(r-(h=s.y))/2,T=x*x/(d*d)+c*c/(l*l);T>1&&(d*=T=Math.sqrt(T),l*=T);var _=d*d,w=l*l,k=(u==f?-1:1)*Math.sqrt(Math.abs((_*w-_*c*c-w*x*x)/(_*c*c+w*x*x)));k==1/0&&(k=1);var L=k*d*c/l+(i+o)/2,A=k*-l*x/d+(r+h)/2,I=Math.asin(((r-A)/l).toFixed(9)),P=Math.asin(((h-A)/l).toFixed(9));(I=i<L?m-I:I)<0&&(I=2*m+I),(P=o<L?m-P:P)<0&&(P=2*m+P),f&&I>P&&(I-=2*m),!f&&P>I&&(P-=2*m)}if(Math.abs(P-I)>g){var S=P,E=o,D=h;P=I+g*(f&&P>I?1:-1);var F=e(o=L+d*Math.cos(P),h=A+l*Math.sin(P),d,l,a,0,f,E,D,[P,S,L,A])}var H=Math.tan((P-I)/4),V=4/3*d*H,Z=4/3*l*H,K=[2*i-(i+V*Math.sin(I)),2*r-(r-Z*Math.cos(I)),o+V*Math.sin(P),h-Z*Math.cos(P),o,h];if(p)return K;F&&(K=K.concat(F));for(var G=0;G<K.length;){var W=n(K[G],K[G+1],a);K[G++]=W.x,K[G++]=W.y}return K}function n(i,r,d){return{x:i*Math.cos(d)-r*Math.sin(d),y:i*Math.sin(d)+r*Math.cos(d)}}function t(i){return i*(m/180)}$.exports=function(i){for(var r,d=[],l=0,a=0,u=0,f=0,o=null,h=null,p=0,s=0,x=0,c=i.length;x<c;x++){var T=i[x],_=T[0];switch(_){case"M":u=T[1],f=T[2];break;case"A":(T=e(p,s,T[1],T[2],t(T[3]),T[4],T[5],T[6],T[7])).unshift("C"),T.length>7&&(d.push(T.splice(0,7)),T.unshift("C"));break;case"S":var w=p,k=s;r!="C"&&r!="S"||(w+=w-l,k+=k-a),T=["C",w,k,T[1],T[2],T[3],T[4]];break;case"T":r=="Q"||r=="T"?(o=2*p-o,h=2*s-h):(o=p,h=s),T=y(p,s,o,h,T[1],T[2]);break;case"Q":o=T[1],h=T[2],T=y(p,s,T[1],T[2],T[3],T[4]);break;case"L":T=b(p,s,T[1],T[2]);break;case"H":T=b(p,s,T[1],s);break;case"V":T=b(p,s,p,T[1]);break;case"Z":T=b(p,s,u,f)}r=_,p=T[T.length-2],s=T[T.length-1],T.length>4?(l=T[T.length-4],a=T[T.length-3]):(l=p,a=s),d.push(T)}return d}},{}],247:[function(v,$,te){var m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;function y(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}$.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 i={};return"abcdefghijklmnopqrst".split("").forEach(function(r){i[r]=r}
594),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(e,n){for(var t,i,r=y(e),d=1;d<arguments.length;d++){for(var l in t=Object(arguments[d]))g.call(t,l)&&(r[l]=t[l]);if(m){i=m(t);for(var a=0;a<i.length;a++)b.call(t,i[a])&&(r[i[a]]=t[i[a]])}}return r}},{}],248:[function(v,$,te){function m(y,e){if(typeof y!="string")return[y];var n=[y];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var t=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",r=!!e.flat;t.forEach(function(l){var a=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),u=[];function f(o,h,p){var s=n.push(o.slice(l[0].length,-l[1].length))-1;return u.push(s),i+s+i}n.forEach(function(o,h){for(var p,s=0;o!=p;)if(p=o,o=o.replace(a,f),s++>1e4)throw Error("References have circular dependency. Please, check them.");n[h]=o}),u=u.reverse(),n=n.map(function(o){return u.forEach(function(h){o=o.replace(new RegExp("(\\"+i+h+"\\"+i+")","g"),l[0]+"$1"+l[1])}),o})});var d=new RegExp("\\"+i+"([0-9]+)\\"+i);return r?n:function l(a,u,f){for(var o,h=[],p=0;o=d.exec(a);){if(p++>1e4)throw Error("Circular references in parenthesis");h.push(a.slice(0,o.index)),h.push(l(u[o[1]],u)),a=a.slice(o.index+o[0].length)}return h.push(a),h}(n[0],n)}function g(y,e){if(e&&e.flat){var n,t=e&&e.escape||"___",i=y[0];if(!i)return"";for(var r=new RegExp("\\"+t+"([0-9]+)\\"+t),d=0;i!=n;){if(d++>1e4)throw Error("Circular references in "+y);n=i,i=i.replace(r,l)}return i}return y.reduce(function a(u,f){return Array.isArray(f)&&(f=f.reduce(a,"")),u+f},"");function l(a,u){if(y[u]==null)throw Error("Reference "+u+"is undefined");return y[u]}}function b(y,e){return Array.isArray(y)?g(y,e):m(y,e)}b.parse=m,b.stringify=g,$.exports=b},{}],249:[function(v,$,te){var m=v("pick-by-alias");$.exports=function(g){var b;return arguments.length>1&&(g=arguments),typeof g=="string"?g=g.split(/\s/).map(parseFloat):typeof g=="number"&&(g=[g]),g.length&&typeof g[0]=="number"?b=g.length===1?{width:g[0],height:g[0],x:0,y:0}:g.length===2?{width:g[0],height:g[1],x:0,y:0}:{x:g[0],y:g[1],width:g[2]-g[0]||0,height:g[3]-g[1]||0}:g&&(g=m(g,{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:g.left||0,y:g.top||0},g.width==null?g.right?b.width=g.right-b.x:b.width=0:b.width=g.width,g.height==null?g.bottom?b.height=g.bottom-b.y:b.height=0:b.height=g.height),b}},{"pick-by-alias":253}],250:[function(v,$,te){$.exports=function(y){var e=[];return y.replace(g,function(n,t,i){var r=t.toLowerCase();for(i=function(d){var l=d.match(b);return l?l.map(Number):[]}(i),r=="m"&&i.length>2&&(e.push([t].concat(i.splice(0,2))),r="l",t=t=="m"?"l":"L");;){if(i.length==m[r])return i.unshift(t),e.push(i);if(i.length<m[r])throw new Error("malformed path data");e.push([t].concat(i.splice(0,m[r])))}}),e};var m={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},g=/([astvzqmhlc])([^astvzqmhlc]*)/gi,b=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},{}],251:[function(v,$,te){$.exports=function(m,g){g||(g=[0,""]),m=String(m);var b=parseFloat(m,10);return g[0]=b,g[1]=m.match(/[\d.\-\+]*\s*(.*)/)[1]||"",g}},{}],252:[function(v,$,te){(function(m){(function(){(function(){var g,b,y,e,n,t;typeof performance<"u"&&performance!==null&&performance.now?$.exports=function(){return performance.now()}:m!=null&&m.hrtime?($.exports=function(){return(g()-n)/1e6},b=m.hrtime,e=(g=function(){var i;return 1e9*(i=b())[0]+i[1]})(),t=1e9*m.uptime(),n=e-t):Date.now?($.exports=function(){return Date.now()-y},y=Date.now()):($.exports=function(){return new Date().getTime()-y},y=new Date().getTime())}).call(this)}).call(this)}).call(this,v("_process"))},{_process:277}],253:[function(v,$,te){$.exports=function(b,y,e){var n,t,i={};if(typeof y=="string"&&(y=g(y)),Array.isArray(y)){var r={};for(t=0;t<y.length;t++)r[y[t]]=!0;y=r}for(n in y)y[n]=g(y[n]);var d={};for(n in y){var l=y[n];if(Array.isArray(l))for(t=0;t<l.length;t++){var a=l[t];if(e&&(d[a]=!0),a in b){if(i[n]=b[a],e)for(var u=t;u<l.length;u++)d[l[u]]=!0;break}}else n in b&&(y[n]&&(i[n]=b[n]),e&&(d[n]=!0))}if(e)for(n in b)d[n]||(i[n]=b[n]);return i};var m={};function g(b){return m[b]?m[b]:(typeof b=="string"&&(b=m[b]=b.split(/\s*,\s*|\s+/)),b)}},{}],254:[function(v,$,te){/* 595 * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc 596 * @license MIT 597 * @preserve Project Home: https://github.com/voidqk/polybooljs 598 */var m,g=v("./lib/build-log"),b=v("./lib/epsilon"),y=v("./lib/intersecter"),e=v("./lib/segment-chainer"),n=v("./lib/segment-selector"),t=v("./lib/geojson"),i=!1,r=b();function d(l,a,u){var f=m.segments(l),o=m.segments(a),h=u(m.combine(f,o));return m.polygon(h)}m={buildLog:function(l){return l===!0?i=g():l===!1&&(i=!1),i!==!1&&i.list},epsilon:function(l){return r.epsilon(l)},segments:function(l){var a=y(!0,r,i);return l.regions.forEach(a.addRegion),{segments:a.calculate(l.inverted),inverted:l.inverted}},combine:function(l,a){return{combined:y(!1,r,i).calculate(l.segments,l.inverted,a.segments,a.inverted),inverted1:l.inverted,inverted2:a.inverted}}
598,selectUnion:function(l){return{segments:n.union(l.combined,i),inverted:l.inverted1||l.inverted2}},selectIntersect:function(l){return{segments:n.intersect(l.combined,i),inverted:l.inverted1&&l.inverted2}},selectDifference:function(l){return{segments:n.difference(l.combined,i),inverted:l.inverted1&&!l.inverted2}},selectDifferenceRev:function(l){return{segments:n.differenceRev(l.combined,i),inverted:!l.inverted1&&l.inverted2}},selectXor:function(l){return{segments:n.xor(l.combined,i),inverted:l.inverted1!==l.inverted2}},polygon:function(l){return{regions:e(l.segments,r,i),inverted:l.inverted}},polygonFromGeoJSON:function(l){return t.toPolygon(m,l)},polygonToGeoJSON:function(l){return t.fromPolygon(m,r,l)},union:function(l,a){return d(l,a,m.selectUnion)},intersect:function(l,a){return d(l,a,m.selectIntersect)},difference:function(l,a){return d(l,a,m.selectDifference)},differenceRev:function(l,a){return d(l,a,m.selectDifferenceRev)},xor:function(l,a){return d(l,a,m.selectXor)}},typeof window=="object"&&(window.PolyBool=m),$.exports=m},{"./lib/build-log":255,"./lib/epsilon":256,"./lib/geojson":257,"./lib/intersecter":258,"./lib/segment-chainer":260,"./lib/segment-selector":261}],255:[function(v,$,te){$.exports=function(){var m,g=0,b=!1;function y(e,n){return m.list.push({type:e,data:n?JSON.parse(JSON.stringify(n)):void 0}),m}return m={list:[],segmentId:function(){return g++},checkIntersection:function(e,n){return y("check",{seg1:e,seg2:n})},segmentChop:function(e,n){return y("div_seg",{seg:e,pt:n}),y("chop",{seg:e,pt:n})},statusRemove:function(e){return y("pop_seg",{seg:e})},segmentUpdate:function(e){return y("seg_update",{seg:e})},segmentNew:function(e,n){return y("new_seg",{seg:e,primary:n})},segmentRemove:function(e){return y("rem_seg",{seg:e})},tempStatus:function(e,n,t){return y("temp_status",{seg:e,above:n,below:t})},rewind:function(e){return y("rewind",{seg:e})},status:function(e,n,t){return y("status",{seg:e,above:n,below:t})},vert:function(e){return e===b?m:(b=e,y("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),y("log",{txt:e})},reset:function(){return y("reset")},selected:function(e){return y("selected",{segs:e})},chainStart:function(e){return y("chain_start",{seg:e})},chainRemoveHead:function(e,n){return y("chain_rem_head",{index:e,pt:n})},chainRemoveTail:function(e,n){return y("chain_rem_tail",{index:e,pt:n})},chainNew:function(e,n){return y("chain_new",{pt1:e,pt2:n})},chainMatch:function(e){return y("chain_match",{index:e})},chainClose:function(e){return y("chain_close",{index:e})},chainAddHead:function(e,n){return y("chain_add_head",{index:e,pt:n})},chainAddTail:function(e,n){return y("chain_add_tail",{index:e,pt:n})},chainConnect:function(e,n){return y("chain_con",{index1:e,index2:n})},chainReverse:function(e){return y("chain_rev",{index:e})},chainJoin:function(e,n){return y("chain_join",{index1:e,index2:n})},done:function(){return y("done")}}}},{}],256:[function(v,$,te){$.exports=function(m){typeof m!="number"&&(m=1e-10);var g={epsilon:function(b){return typeof b=="number"&&(m=b),m},pointAboveOrOnLine:function(b,y,e){var n=y[0],t=y[1],i=e[0],r=e[1],d=b[0];return(i-n)*(b[1]-t)-(r-t)*(d-n)>=-m},pointBetween:function(b,y,e){var n=b[1]-y[1],t=e[0]-y[0],i=b[0]-y[0],r=e[1]-y[1],d=i*t+n*r;return!(d<m)&&!(d-(t*t+r*r)>-m)},pointsSameX:function(b,y){return Math.abs(b[0]-y[0])<m},pointsSameY:function(b,y){return Math.abs(b[1]-y[1])<m},pointsSame:function(b,y){return g.pointsSameX(b,y)&&g.pointsSameY(b,y)},pointsCompare:function(b,y){return g.pointsSameX(b,y)?g.pointsSameY(b,y)?0:b[1]<y[1]?-1:1:b[0]<y[0]?-1:1},pointsCollinear:function(b,y,e){var n=b[0]-y[0],t=b[1]-y[1],i=y[0]-e[0],r=y[1]-e[1];return Math.abs(n*r-i*t)<m},linesIntersect:function(b,y,e,n){var t=y[0]-b[0],i=y[1]-b[1],r=n[0]-e[0],d=n[1]-e[1],l=t*d-i*r;if(Math.abs(l)<m)return!1;var a=b[0]-e[0],u=b[1]-e[1],f=(r*u-d*a)/l,o=(t*u-i*a)/l,h={alongA:0,alongB:0,pt:[b[0]+f*t,b[1]+f*i]};return h.alongA=f<=-m?-2:f<m?-1:f-1<=-m?0:f-1<m?1:2,h.alongB=o<=-m?-2:o<m?-1:o-1<=-m?0:o-1<m?1:2,h},pointInsideRegion:function(b,y){for(var e=b[0],n=b[1],t=y[y.length-1][0],i=y[y.length-1][1],r=!1,d=0;d<y.length;
598d++){var l=y[d][0],a=y[d][1];a-n>m!=i-n>m&&(t-l)*(n-a)/(i-a)+l-e>m&&(r=!r),t=l,i=a}return r}};return g}},{}],257:[function(v,$,te){var m={toPolygon:function(g,b){function y(t){if(t.length<=0)return g.segments({inverted:!1,regions:[]});function i(l){var a=l.slice(0,l.length-1);return g.segments({inverted:!1,regions:[a]})}for(var r=i(t[0]),d=1;d<t.length;d++)r=g.selectDifference(g.combine(r,i(t[d])));return r}if(b.type==="Polygon")return g.polygon(y(b.coordinates));if(b.type==="MultiPolygon"){for(var e=g.segments({inverted:!1,regions:[]}),n=0;n<b.coordinates.length;n++)e=g.selectUnion(g.combine(e,y(b.coordinates[n])));return g.polygon(e)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(g,b,y){function e(o,h){return b.pointInsideRegion([.5*(o[0][0]+o[1][0]),.5*(o[0][1]+o[1][1])],h)}function n(o){return{region:o,children:[]}}y=g.polygon(g.segments(y));var t=n(null);function i(o,h){for(var p=0;p<o.children.length;p++)if(e(h,(x=o.children[p]).region))return void i(x,h);var s=n(h);for(p=0;p<o.children.length;p++){var x;e((x=o.children[p]).region,h)&&(s.children.push(x),o.children.splice(p,1),p--)}o.children.push(s)}for(var r=0;r<y.regions.length;r++){var d=y.regions[r];d.length<3||i(t,d)}function l(o,h){for(var p=0,s=o[o.length-1][0],x=o[o.length-1][1],c=[],T=0;T<o.length;T++){var _=o[T][0],w=o[T][1];c.push([_,w]),p+=w*s-_*x,s=_,x=w}return p<0!==h&&c.reverse(),c.push([c[0][0],c[0][1]]),c}var a=[];function u(o){var h=[l(o.region,!1)];a.push(h);for(var p=0;p<o.children.length;p++)h.push(f(o.children[p]))}function f(o){for(var h=0;h<o.children.length;h++)u(o.children[h]);return l(o.region,!0)}for(r=0;r<t.children.length;r++)u(t.children[r]);return a.length<=0?{type:"Polygon",coordinates:[]}:a.length==1?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a}}};$.exports=m},{}],258:[function(v,$,te){var m=v("./linked-list");$.exports=function(g,b,y){function e(l,a,u){return{id:y?y.segmentId():-1,start:l,end:a,myFill:{above:u.myFill.above,below:u.myFill.below},otherFill:null}}var n=m.create();function t(l,a){n.insertBefore(l,function(u){return function(f,o,h,p,s,x){var c=b.pointsCompare(o,s);return c!==0?c:b.pointsSame(h,x)?0:f!==p?f?1:-1:b.pointAboveOrOnLine(h,p?s:x,p?x:s)?1:-1}(l.isStart,l.pt,a,u.isStart,u.pt,u.other.pt)<0})}function i(l,a){var u=function(f,o){var h=m.node({isStart:!0,pt:f.start,seg:f,primary:o,other:null,status:null});return t(h,f.end),h}(l,a);return function(f,o,h){var p=m.node({isStart:!1,pt:o.end,seg:o,primary:h,other:f,status:null});f.other=p,t(p,f.pt)}(u,l,a),u}function r(l,a){var u=e(a,l.seg.end,l.seg);return function(f,o){y&&y.segmentChop(f.seg,o),f.other.remove(),f.seg.end=o,f.other.pt=o,t(f.other,f.pt)}(l,a),i(u,l.primary)}function d(l,a){var u=m.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 o(A,I){var P=A.seg,S=I.seg,E=P.start,D=P.end,F=S.start,H=S.end;y&&y.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 G=!Z&&b.pointBetween(E,F,H),W=!K&&b.pointBetween(D,F,H);if(Z)return W?r(I,D):r(A,H),I;G&&(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(y&&y.vert(p.pt[0]),p.isStart){let A=function(){if(x){var I=o(p,x);if(I)return I}return!!c&&o(p,c)};y&&y.segmentNew(p.seg,p.primary);var s=f(p),x=s.before?s.before.ev:null,c=s.after?s.after.ev:null;y&&y.tempStatus(p.seg,!!x&&x.seg,!!c&&c.seg);var T,_=A();if(_){var w;g?(w=p.seg.myFill.below===null||p.seg.myFill.above!==p.seg.myFill.below)&&(_.seg.myFill.above=!_.seg.myFill.above):_.seg.otherFill=p.seg.myFill,y&&y.segmentUpdate(_.seg),p.other.remove(),p.remove()}if(n.getHead()!==p){y&&y.rewind(p.seg);continue}g?(w=p.seg.myFill.below===null||p.seg.myFill.above!==p.seg.myFill.below,p.seg.myFill.below=c?c.seg.myFill.above:l,p.seg.myFill.above=w?!p.seg.myFill.below:p.seg.myFill.below):p.seg.otherFill===null&&(T=c?p.primary===c.primary?c.seg.otherFill.above:c.seg.myFill.above:p.primary?a:l,p.seg.otherFill={above:T,below:T}),y&&y.status(p.seg,!!x&&x.seg,!!c&&c.seg),p.other.status=s.insert(m.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)&&o(k.prev.ev,k.next.ev),y&&y.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 y&&y.done(),h}return g?{addRegion:function(l){for(var a,u,f,o=l[l.length-1],h=0;h<l.length;h++){a=o,o=l[h];var p=b.pointsCompare(a,o);p!==0&&i((u=p<0?a:o,f=p<0?o:a,{id:y?y.segmentId():-1,start:u,end:f,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(l){return d(l,!1)}}:{calculate:function(l,a,u,f){return l.forEach(function(o){i(e(o.start,o.end,o),!0)}),u.forEach(function(o){i(e(o.start,o.end,o),!1)}),d(a,f)}}}},{"./linked-list":259}],259:[function(v,$,te){$.exports={create:function(){var m={root:{root:!0,next:null},exists:function(g){return g!==null&&g!==m.root},isEmpty:function(){return m.root.next===null},getHead:function(){return m.root.next},insertBefore:function(g,b){for(var y=m.root,e=m.root.next;e!==null;){if(b(e))return g.prev=e.prev,g.next=e,e.prev.next=g,void(e.prev=g);y=e,e=e.next}y.next=g,g.prev=y,g.next=null},findTransition:function(g){for(var b=m.root,y=m.root.next;y!==null&&!g(y);)b=y,y=y.next;return{before:b===m.root?null:b,after:y,insert:function(e){return e.prev=b,e.next=y,b.next=e,y!==null&&(y.prev=e),e}}}};return m},node:function(m){return m.prev=null,m.next=null,m.remove=function(){m.prev.next=m.next,m.next&&(m.next.prev=m.prev),m.prev=null,m.next=null},m}}},{}],260:[function(v,$,te){$.exports=function(m,g,b){var y=[],e=[];return m.forEach(function(n){var t=n.start,i=n.end;if(g.pointsSame(t,i))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},l=r,a=0;a<y.length;a++){var u=(s=y[a])[0],f=(s[1],s[s.length-1]);if(s[s.length-2],g.pointsSame(u,t)){if(A(a,!0,!0))break}else if(g.pointsSame(u,i)){if(A(a,!0,!1))break}else if(g.pointsSame(f,t)){if(A(a,!1,!0))break}else if(g.pointsSame(f,i)&&A(a,!1,!1))break}if(l===r)return y.push([t,i]),void(b&&b.chainNew(t,i));if(l===d){b&&b.chainMatch(r.index);var o=r.index,h=r.matches_pt1?i:t,p=r.matches_head,s=y[o],x=p?s[0]:s[s.length-1],c=p?s[1]:s[s.length-2],T=p?s[s.length-1]:s[0],_=p?s[s.length-2]:s[1];return g.pointsCollinear(c,x,h)&&(p?(b&&b.chainRemoveHead(r.index,h),s.shift()):(b&&b.chainRemoveTail(r.index,h),s.pop()),x=c),g.pointsSame(T,h)?(y.splice(o,1),g.pointsCollinear(_,T,x)&&(p?(b&&b.chainRemoveTail(r.index,x),s.pop()):(b&&b.chainRemoveHead(r.index,x),s.shift())),b&&b.chainClose(r.index),void e.push(s)):void(p?(b&&b.chainAddHead(r.index,h),s.unshift(h)):(b&&b.chainAddTail(r.index,h),s.push(h)))}var w=r.index,k=d.index;b&&b.chainConnect(w,k);var L=y[w].length<y[k].length;r.matches_head?d.matches_head?L?(I(w),P(w,k)):(I(k),P(k,w)):P(k,w):d.matches_head?P(w,k):L?(I(w),P(k,w)):(I(k),P(w,k))}function A(S,E,D){return l.index=S,l.matches_head=E,l.matches_pt1=D,l===r?(l=d,!1):(l=null,!0)}function I(S){b&&b.chainReverse(S),y[S].reverse()}function P(S,E){var D=y[S],F=y[E],H=D[D.length-1],V=D[D.length-2],Z=F[0],K=F[1];g.pointsCollinear(V,H,Z)&&(b&&b.chainRemoveTail(S,H),D.pop(),H=V),g.pointsCollinear(H,Z,K)&&(b&&b.chainRemoveHead(E,Z),F.shift()),b&&b.chainJoin(S,E),y[S]=D.concat(F),y.splice(E,1)}}),e}},{}],261:[function(v,$,te){function m(b,y,e){var n=[];return b.forEach(function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);y[i]!==0&&n.push({id:e?e.segmentId():-1,start:t.start,end:t.end,myFill:{above:y[i]===1,below:y[i]===2},otherFill:null})}),e&&e.selected(n),n}var g={union:function(b,y){return m(b,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],y)},intersect:function(b,y){return m(b,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],y)},difference:function(b,y){return m(b,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],y)},differenceRev:function(b,y){return m(b,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],y)},xor:function(b,y){return m(b,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],y)}};$.exports=g},{}],262:[function(v,$,te){var m=v("stream").Transform,g=v("stream-parser");function b(){m.call(this,{readableObjectMode:!0})}function y(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(m.prototype),b.prototype.constructor=b,g(b.prototype),te.ParserStream=b,te.sliceEq=function(e,n,t){for(var i=n,r=0;r<t.length;)if(e[i++]!==t[r++])return!1;return!0},te.str2arr=function(e,n){var t=[],i=0;if(n&&n==="hex")for(;i<e.length;)t.push(parseInt(e.slice(i,i+2),16)),i+=2;else for(;i<e.length;i++)t.push(255&e.charCodeAt(i));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]},y.prototype=Object.create(Error.prototype),y.prototype.constructor=y,te.ProbeError=y},{stream:285,"stream-parser":301}],263:[function(v,$,te){function m(y,e){var n=new Error(y);return n.code=e,n}function g(y){try{return decodeURIComponent(escape(y))}catch{return y}}function b(y,e,n){this.input=y.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 m("invalid TIFF signature","EBADDATA");this.big_endian=t[0]==="M"}b.prototype.each=function(y){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,y)}},b.prototype.read_uint16=function(y){var e=this.input;if(y+2>e.length)throw m("unexpected EOF","EBADDATA");return this.big_endian?256*e[y]+e[y+1]:e[y]+256*e[y+1]},b.prototype.read_uint32=function(y){var e=this.input;if(y+4>e.length)throw m("unexpected EOF","EBADDATA");return this.big_endian?16777216*e[y]+65536*e[y+1]+256*e[y+2]+e[y+3]:e[y]+256*e[y+1]+65536*e[y+2]+16777216*e[y+3]}
598,b.prototype.is_subifd_link=function(y,e){return y===0&&e===34665||y===0&&e===34853||y===34665&&e===40965},b.prototype.exif_format_length=function(y){switch(y){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(y,e){var n;switch(y){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(y,e,n){var t=this.read_uint16(e);e+=2;for(var i=0;i<t;i++){var r=this.read_uint16(e),d=this.read_uint16(e+2),l=this.read_uint32(e+4),a=this.exif_format_length(d),u=l*a,f=u<=4?e+8:this.read_uint32(e+8),o=!1;if(f+u>this.input.length)throw m("unexpected EOF","EBADDATA");for(var h=[],p=f,s=0;s<l;s++,p+=a){var x=this.exif_format_read(d,p);if(x===null){h=null;break}h.push(x)}if(Array.isArray(h)&&d===2&&(h=g(String.fromCharCode.apply(null,h)))&&h[h.length-1]==="\0"&&(h=h.slice(0,-1)),this.is_subifd_link(y,r)&&Array.isArray(h)&&Number.isInteger(h[0])&&h[0]>0&&(this.ifds_to_read.push({id:r,offset:h[0]}),o=!0),n({is_big_endian:this.big_endian,ifd:y,tag:r,format:d,count:l,entry_offset:e+this.start,data_length:u,data_offset:f+this.start,value:h,is_subifd_link:o})===!1)return void(this.aborted=!0);e+=12}y===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},$.exports.ExifParser=b,$.exports.get_orientation=function(y){var e=0;try{return new b(y,0,y.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(v,$,te){var m=v("./common").readUInt16BE,g=v("./common").readUInt32BE;function b(r,d){if(r.length<4+d)return null;var l=g(r,d);return r.length<l+d||l<8?null:{boxtype:String.fromCharCode.apply(null,r.slice(d+4,d+8)),data:r.slice(d+8,d+l),end:d+l}}function y(r,d){for(var l=0;;){var a=b(r,l);if(!a)break;switch(a.boxtype){case"ispe":d.sizes.push({width:g(a.data,4),height:g(a.data,8)});break;case"irot":d.transforms.push({type:"irot",value:3&a.data[0]});break;case"imir":d.transforms.push({type:"imir",value:1&a.data[0]})}l=a.end}}function e(r,d,l){for(var a=0,u=0;u<l;u++)a=256*a+(r[d+u]||0);return a}function n(r,d){for(var l=r[4]>>4&15,a=15&r[4],u=r[5]>>4&15,f=m(r,6),o=8,h=0;h<f;h++){var p=m(r,o),s=m(r,o+=2),x=e(r,o+=2,u),c=m(r,o+=u);if(o+=2,s===0&&c===1){var T=e(r,o,l),_=e(r,o+l,a);d.item_loc[p]={length:_,offset:T+x}}o+=c*(l+a)}}function t(r,d){for(var l=m(r,4),a=6,u=0;u<l;u++){var f=b(r,a);if(!f)break;if(f.boxtype==="infe"){for(var o=m(f.data,4),h="",p=8;p<f.data.length&&f.data[p];p++)h+=String.fromCharCode(f.data[p]);d.item_inf[h]=o}a=f.end}}function i(r,d){for(var l=0;;){var a=b(r,l);if(!a)break;a.boxtype==="ipco"&&y(a.data,d),l=a.end}}$.exports.unbox=b,$.exports.readSizeFromMeta=function(r){var d={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(function(p,s){for(var x=4;;){var c=b(p,x);if(!c)break;c.boxtype==="iprp"&&i(c.data,s),c.boxtype==="iloc"&&n(c.data,s),c.boxtype==="iinf"&&t(c.data,s),x=c.end}}(r,d),d.sizes.length){var l,a,u,f=(l=d.sizes,a=l.reduce(function(p,s){return p.width>s.width||p.width===s.width&&p.height>s.height?p:s}),u=l.reduce(function(p,s){return p.height>s.height||p.height===s.height&&p.width>s.width?p:s}),a.width>u.height||a.width===u.height&&a.height>u.width?a:u),o=1;
598d.transforms.forEach(function(p){var s={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"&&(o=p.value===0?x[o]:s[o=s[o=x[o]]]),p.type==="irot")for(var c=0;c<p.value;c++)o=s[o]});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?o:null,variants:d.sizes,exif_location:h}}},$.exports.getMimeType=function(r){var d=String.fromCharCode.apply(null,r.slice(0,4)),l={};l[d]=!0;for(var a=8;a<r.length;a+=4)l[String.fromCharCode.apply(null,r.slice(a,a+4))]=!0;if(l.mif1||l.msf1||l.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"}:l.avif||l.avis?{type:"avif",mime:"image/avif"}:l.heic||l.heix||l.hevc||l.hevx||l.heis?l.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}},{"./common":262}],265:[function(v,$,te){var m=v("../common").str2arr,g=v("../common").sliceEq,b=v("../common").readUInt32BE,y=v("../miaf_utils"),e=v("../exif_utils"),n=m("ftyp");$.exports=function(t){if(g(t,4,n)){var i=y.unbox(t,0);if(i){var r=y.getMimeType(i.data);if(r){for(var d,l=i.end;;){var a=y.unbox(t,l);if(!a)break;if(l=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){d=a.data;break}}if(d){var u=y.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 o=b(t,u.exif_location.offset),h=t.slice(u.exif_location.offset+o+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(v,$,te){var m=v("../common").str2arr,g=v("../common").sliceEq,b=v("../common").readUInt16LE,y=m("BM");$.exports=function(e){if(!(e.length<26)&&g(e,0,y))return{width:b(e,18),height:b(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},{"../common":262}],267:[function(v,$,te){var m=v("../common").str2arr,g=v("../common").sliceEq,b=v("../common").readUInt16LE,y=m("GIF87a"),e=m("GIF89a");$.exports=function(n){if(!(n.length<10)&&(g(n,0,y)||g(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(v,$,te){var m=v("../common").readUInt16LE;$.exports=function(g){var b=m(g,0),y=m(g,2),e=m(g,4);if(b===0&&y===1&&e){for(var n=[],t={width:0,height:0},i=0;i<e;i++){var r=g[6+16*i]||256,d=g[6+16*i+1]||256,l={width:r,height:d};n.push(l),(r>t.width||d>t.height)&&(t=l)}return{width:t.width,height:t.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},{"../common":262}],269:[function(v,$,te){var m=v("../common").readUInt16BE,g=v("../common").str2arr,b=v("../common").sliceEq,y=v("../exif_utils"),e=g("Exif\0\0");$.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 i,r,d=n[t++];d===255;)d=n[t++];if(208<=d&&d<=217||d===1)i=0;else{if(!(192<=d&&d<=254)||n.length-t<2)return;i=m(n,t)-2,t+=2}if(d===217||d===218)return;if(d===225&&i>=10&&b(n,t,e)&&(r=y.get_orientation(n.slice(t+6,t+i))),i>=5&&192<=d&&d<=207&&d!==196&&d!==200&&d!==204){if(n.length-t<i)return;var l={width:m(n,t+3),height:m(n,t+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return r>0&&(l.orientation=r),l}t+=i}}},{"../common":262,"../exif_utils":263}],270:[function(v,$,te){var m=v("../common").str2arr,g=v("../common").sliceEq,b=v("../common").readUInt32BE,y=m(`\x89PNG\r 599� 600`),e=m("IHDR");$.exports=function(n){if(!(n.length<24)&&g(n,0,y)&&g(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(v,$,te){var m=v("../common").str2arr,g=v("../common").sliceEq,b=v("../common").readUInt32BE,y=m("8BPS\0�");$.exports=function(e){if(!(e.length<22)&&g(e,0,y))return{width:b(e,18),height:b(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},{"../common":262}],272:[function(v,$,te){function m(r){return typeof r=="number"&&isFinite(r)&&r>0}var g=/<[-_.:a-zA-Z0-9][^>]*>/,b=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,y=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,e=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,n=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,t=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function i(r){return t.test(r)?r.match(t)[0]:"px"}$.exports=function(r){if(function(T){var _,w=0,k=T.length;for(T[0]===239&&T[1]===187&&T[2]===191&&(w=3);w<k&&((_=T[w])===32||_===9||_===13||_===10);)w++;return w!==k&&T[w]===60}(r)){for(var d="",l=0;l<r.length;l++)d+=String.fromCharCode(r[l]);var a=(d.match(g)||[""])[0];if(b.test(a)){var u=function(T){var _=T.match(y),w=T.match(e),k=T.match(n);return{width:_&&(_[1]||_[2]),height:w&&(w[1]||w[2]),viewbox:k&&(k[1]||k[2])}}(a),f=parseFloat(u.width),o=parseFloat(u.height);if(u.width&&u.height)return!m(f)||!m(o)?void 0:{width:f,height:o,type:"svg",mime:"image/svg+xml",wUnits:i(u.width),hUnits:i(u.height)};var h=(u.viewbox||"").split(" "),p={width:h[2],height:h[3]},s=parseFloat(p.width),x=parseFloat(p.height);if(m(s)&&m(x)&&i(p.width)===i(p.height)){var c=s/x;
600return u.width?m(f)?{width:f,height:f/c,type:"svg",mime:"image/svg+xml",wUnits:i(u.width),hUnits:i(u.width)}:void 0:u.height?m(o)?{width:o*c,height:o,type:"svg",mime:"image/svg+xml",wUnits:i(u.height),hUnits:i(u.height)}:void 0:{width:s,height:x,type:"svg",mime:"image/svg+xml",wUnits:i(p.width),hUnits:i(p.height)}}}}}},{}],273:[function(v,$,te){var m=v("../common").str2arr,g=v("../common").sliceEq,b=v("../common").readUInt16LE,y=v("../common").readUInt16BE,e=v("../common").readUInt32LE,n=v("../common").readUInt32BE,t=m("II*\0"),i=m("MM\0*");function r(a,u,f){return f?y(a,u):b(a,u)}function d(a,u,f){return f?n(a,u):e(a,u)}function l(a,u,f){var o=r(a,u+2,f);return d(a,u+4,f)!==1||o!==3&&o!==4?null:o===3?r(a,u+8,f):d(a,u+8,f)}$.exports=function(a){if(!(a.length<8)&&(g(a,0,t)||g(a,0,i))){var u=a[0]===77,f=d(a,4,u)-8;if(!(f<0)){var o=f+8;if(!(a.length-o<2)){var h=12*r(a,o+0,u);if(!(h<=0||(o+=2,a.length-o<h))){var p,s,x,c;for(p=0;p<h;p+=12)(c=r(a,o+p,u))===256?s=l(a,o+p,u):c===257&&(x=l(a,o+p,u));return s&&x?{width:s,height:x,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}:void 0}}}}}},{"../common":262}],274:[function(v,$,te){var m=v("../common").str2arr,g=v("../common").sliceEq,b=v("../common").readUInt16LE,y=v("../common").readUInt32LE,e=v("../exif_utils"),n=m("RIFF"),t=m("WEBP");function i(l,a){if(l[a+3]===157&&l[a+4]===1&&l[a+5]===42)return{width:16383&b(l,a+6),height:16383&b(l,a+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function r(l,a){if(l[a]===47){var u=y(l,a+1);return{width:1+(16383&u),height:1+(u>>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function d(l,a){return{width:1+(l[a+6]<<16|l[a+5]<<8|l[a+4]),height:1+(l[a+9]<<a|l[a+8]<<8|l[a+7]),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}$.exports=function(l){if(!(l.length<16)&&(g(l,0,n)||g(l,8,t))){var a=12,u=null,f=0,o=y(l,4)+8;if(!(o>l.length)){for(;a+8<o;)if(l[a]!==0){var h=String.fromCharCode.apply(null,l.slice(a,a+4)),p=y(l,a+4);h==="VP8 "&&p>=10?u=u||i(l,a+8):h==="VP8L"&&p>=9?u=u||r(l,a+8):h==="VP8X"&&p>=10?u=u||d(l,a+8):h==="EXIF"&&(f=e.get_orientation(l.slice(a+8,a+8+p)),a=1/0),a+=8+p}else a++;if(u)return f>0&&(u.orientation=f),u}}}},{"../common":262,"../exif_utils":263}],275:[function(v,$,te){$.exports={avif:v("./parse_sync/avif"),bmp:v("./parse_sync/bmp"),gif:v("./parse_sync/gif"),ico:v("./parse_sync/ico"),jpeg:v("./parse_sync/jpeg"),png:v("./parse_sync/png"),psd:v("./parse_sync/psd"),svg:v("./parse_sync/svg"),tiff:v("./parse_sync/tiff"),webp:v("./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(v,$,te){var m=v("./lib/parsers_sync");$.exports=function(g){return function(b){for(var y=Object.keys(m),e=0;e<y.length;e++){var n=m[y[e]](b);if(n)return n}return null}(g)},$.exports.parsers=m},{"./lib/parsers_sync":275}],277:[function(v,$,te){var m,g,b=$.exports={};function y(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function n(o){if(m===setTimeout)return setTimeout(o,0);if((m===y||!m)&&setTimeout)return m=setTimeout,setTimeout(o,0);try{return m(o,0)}catch{try{return m.call(null,o,0)}catch{return m.call(this,o,0)}}}(function(){try{m=typeof setTimeout=="function"?setTimeout:y}catch{m=y}try{g=typeof clearTimeout=="function"?clearTimeout:e}catch{g=e}})();var t,i=[],r=!1,d=-1;function l(){r&&t&&(r=!1,t.length?i=t.concat(i):d=-1,i.length&&a())}function a(){if(!r){var o=n(l);r=!0;for(var h=i.length;h;){for(t=i,i=[];++d<h;)t&&t[d].run();d=-1,h=i.length}t=null,r=!1,function(p){if(g===clearTimeout)return clearTimeout(p);if((g===e||!g)&&clearTimeout)return g=clearTimeout,clearTimeout(p);try{g(p)}catch{try{return g.call(null,p)}catch{return g.call(this,p)}}}(o)}}function u(o,h){this.fun=o,this.array=h}function f(){}b.nextTick=function(o){var h=new Array(arguments.length-1);if(arguments.length>1)for(var p=1;p<arguments.length;p++)h[p-1]=arguments[p];i.push(new u(o,h)),i.length!==1||r||n(a)},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(o){return[]},b.binding=function(o){throw new Error("process.binding is not supported")},b.cwd=function(){return"/"},b.chdir=function(o){throw new Error("process.chdir is not supported")},b.umask=function(){return 0}},{}],278:[function(v,$,te){(function(m){(function(){for(var g=v("performance-now"),b=typeof window>"u"?m:window,y=["moz","webkit"],e="AnimationFrame",n=b["request"+e],t=b["cancel"+e]||b["cancelRequest"+e],i=0;!n&&i<y.length;i++)n=b[y[i]+"Request"+e],t=b[y[i]+"Cancel"+e]||b[y[i]+"CancelRequest"+e];
600if(!n||!t){var r=0,d=0,l=[];n=function(a){if(l.length===0){var u=g(),f=Math.max(0,1e3/60-(u-r));r=f+u,setTimeout(function(){var o=l.slice(0);l.length=0;for(var h=0;h<o.length;h++)if(!o[h].cancelled)try{o[h].callback(r)}catch(p){setTimeout(function(){throw p},0)}},Math.round(f))}return l.push({handle:++d,callback:a,cancelled:!1}),d},t=function(a){for(var u=0;u<l.length;u++)l[u].handle===a&&(l[u].cancelled=!0)}}$.exports=function(a){return n.call(b,a)},$.exports.cancel=function(){t.apply(b,arguments)},$.exports.polyfill=function(a){a||(a=b),a.requestAnimationFrame=n,a.cancelAnimationFrame=t}}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{"performance-now":252}],279:[function(v,$,te){var m=v("array-bounds"),g=v("color-normalize"),b=v("update-diff"),y=v("pick-by-alias"),e=v("object-assign"),n=v("flatten-vertex-data"),t=v("to-float32"),i=t.float32,r=t.fract32;$.exports=function(l,a){if(typeof l=="function"?(a||(a={}),a.regl=l):a=l,a.length&&(a.positions=a),!(l=a.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var u,f,o,h,p,s,x=l._gl,c={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},T=[];return h=l.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=l.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),o=l.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=l.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=l.buffer({usage:"static",type:"float",data:d}),L(a),u=l({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:l.prop("range"),lineWidth:l.prop("lineWidth"),capSize:l.prop("capSize"),opacity:l.prop("opacity"),scale:l.prop("scale"),translate:l.prop("translate"),scaleFract:l.prop("scaleFract"),translateFract:l.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:o,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:s,stride:24,offset:0},lineOffset:{buffer:s,stride:24,offset:8},capOffset:{buffer:s,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:l.prop("viewport")},viewport:l.prop("viewport"),stencil:!1,instances:l.prop("count"),count:d.length}),e(_,{update:L,draw:w,destroy:A,regl:l,gl:x,canvas:x.canvas,groups:T}),_;function _(I){I?L(I):I===null&&A(),w()}function w(I){if(typeof I=="number")return k(I);I&&!Array.isArray(I)&&(I=[I]),l._refresh(),T.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=T[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=T=I.map(function(K,G){var W=T[G];return K&&(typeof K=="function"?K={after:K}:typeof K[0]=="number"&&(K={positions:K}),K=y(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||(T[G]=W={id:G,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},K=e({},c,K)),b(W,K,[{lineWidth:function(Q){return .5*+Q},capSize:function(Q){return .5*+Q},opacity:parseFloat,errors:function(Q){return Q=n(Q),S+=Q.length,Q},positions:function(Q,R){return Q=n(Q,"float64"),R.count=Math.floor(Q.length/2),R.bounds=m(Q,2),R.offset=P,P+=R.count,Q}},{color:function(Q,R){var N=R.count;if(Q||(Q="transparent"),!Array.isArray(Q)||typeof Q[0]=="number"){var U=Q;Q=Array(N);for(var ee=0;ee<N;ee++)Q[ee]=U}if(Q.length<N)throw Error("Not enough colors");for(var j=new Uint8Array(4*N),X=0;X<N;X++){var J=g(Q[X],"uint8");j.set(J,4*X)}return j},range:function(Q,R,N){var U=R.bounds;return Q||(Q=U),R.scale=[1/(Q[2]-Q[0]),1/(Q[3]-Q[1])],R.translate=[-Q[0],-Q[1]],R.scaleFract=r(R.scale),R.translateFract=r(R.translate),Q},viewport:function(Q){var R;return Array.isArray(Q)?R={x:Q[0],y:Q[1],width:Q[2]-Q[0],height:Q[3]-Q[1]}:Q?(R={x:Q.x||Q.left||0,y:Q.y||Q.top||0},Q.right?R.width=Q.right-R.x:R.width=Q.w||Q.width||0,Q.bottom?R.height=Q.bottom-R.y:R.height=Q.h||Q.height||0):R={x:0,y:0,width:x.drawingBufferWidth,height:x.drawingBufferHeight},R}}])),W}),P||S){var E=T.reduce(function(K,G,W){return K+(G?G.count:0)},0),D=new Float64Array(2*E),F=new Uint8Array(4*E),H=new Float32Array(4*E);T.forEach(function(K,G){if(K){var W=K.positions,Q=K.count,R=K.offset,N=K.color,U=K.errors;Q&&(F.set(N,4*R),H.set(U,4*R),D.set(W,2*R))}});var V=i(D);f(V);var Z=r(D,V);o(Z),h(F),p(H)}}}function A(){f.destroy(),o.destroy(),h.destroy(),p.destroy(),s.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(v,$,te){var m=v("color-normalize"),g=v("array-bounds"),b=v("object-assign"),y=v("glslify"),e=v("pick-by-alias"),n=v("flatten-vertex-data"),t=v("earcut"),i=v("array-normalize"),r=v("to-float32"),d=r.float32,l=r.fract32,a=v("es6-weak-map"),u=v("parse-rect"),f=v("array-find-index");function o(h,p){if(!(this instanceof o))return new o(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=o.shaders.has(h)?o.shaders.get(h):o.shaders.set(h,o.createShaders(h)).get(h),this.update(p)}$.exports=o,o.dashMult=2,o.maxPatternLength=256,o.precisionThreshold=3e6,o.maxPoints=1e4,o.maxLines=2048,o.shaders=new a,o.createShaders=function(h){var p,s=h.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}
644),x={primitive:"triangle strip",instances:h.prop("count"),count:4,offset:0,uniforms:{miterMode:function(T,_){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(T,_){return[_.viewport.x,_.viewport.y,T.viewportWidth,T.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(T,_){return!_.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:h.prop("viewport")},viewport:h.prop("viewport")},c=h(b({vert:y([`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:y([`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:s,divisor:0,stride:8,offset:0},lineTop:{buffer:s,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:y([`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:y([`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:s,divisor:0,stride:8,offset:0},lineTop:{buffer:s,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=c}return{fill:h({primitive:"triangle",elements:function(T,_){return _.triangles},offset:0,vert:y([`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:y([`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(T,_){return[_.viewport.x,_.viewport.y,T.viewportWidth,T.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:c,miter:p}},o.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},o.prototype.render=function(){for(var h,p=[],s=arguments.length;s--;)p[s]=arguments[s];p.length&&(h=this).update.apply(h,p),this.draw()},o.prototype.draw=function(){for(var h=this,p=[],s=arguments.length;s--;)p[s]=arguments[s];return(p.length?p:this.passes).forEach(function(x,c){var T;if(x&&Array.isArray(x))return(T=h).draw.apply(T,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>o.precisionThreshold||x.scale[1]*x.viewport.height>o.precisionThreshold||x.join==="rect"||!x.join&&(x.thickness<=2||x.count>=o.maxPoints)?h.shaders.rect(x):h.shaders.miter(x)))}),this},o.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 s=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:s.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:s.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:s.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:s.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},k=b({},o.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<o.maxLines&&(A.depth=2*(o.maxLines-1-L%o.maxLines)/o.maxLines-1)),k.join!=null&&(A.join=k.join),k.hole!=null&&(A.hole=k.hole),k.fill!=null&&(A.fill=k.fill?m(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=g(I,2);if(A.fill){for(var H=[],V={},Z=0,K=0,G=0,W=A.count;K<W;K++){var Q=I[2*K],R=I[2*K+1];isNaN(Q)||isNaN(R)||Q==null||R==null?(Q=I[2*Z],R=I[2*Z+1],V[K]=Z):Z=K,H[G++]=Q,H[G++]=R}if(k.splitNull){A.count-1 in V||(V[A.count]=A.count-1);var N=Object.keys(V).map(Number).sort(function(Et,Gt){return Et-Gt}),U=[],ee=0,j=A.hole!=null?A.hole[0]:null;if(j!=null){var X=f(N,function(Et){return Et>=j});(N=N.slice(0,X)).push(j)}for(var J=function(Et){var Gt=H.slice(2*ee,2*N[Et]).concat(j?H.slice(2*j):[]),Xt=(A.hole||[]).map(function(qe){return qe-j+(N[Et]-ee)}),Fe=t(Gt,Xt);Fe=Fe.map(function(qe){return qe+ee+(qe+ee<N[Et]?0:j-N[Et])}),U.push.apply(U,Fe),ee=N[Et]+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);i(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 _e=d(xe);A.positionBuffer(_e);var we=l(xe,_e);A.positionFractBuffer(we)}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],ge=Ee[3]-Ee[1],ke=A.range[2]-A.range[0],be=A.range[3]-A.range[1];A.scale=[fe/ke,ge/be],A.translate=[-A.range[0]/ke+Ee[0]/ke||0,-A.range[1]/be+Ee[1]/be||0],A.scaleFract=l(A.scale),A.translateFract=l(A.translate)}if(k.dashes){var Se,Oe=0;if(!k.dashes||k.dashes.length<2)Oe=1,Se=new Uint8Array([255,255,255,255,255,255,255,255]);else{Oe=0;for(var De=0;De<k.dashes.length;++De)Oe+=k.dashes[De];Se=new Uint8Array(Oe*o.dashMult);for(var je=0,Je=255,ze=0;ze<2;ze++)for(var Ue=0;Ue<k.dashes.length;++Ue){for(var Ge=0,Ye=k.dashes[Ue]*o.dashMult*.5;Ge<Ye;++Ge)Se[je++]=Je;Je^=255}}A.dashLength=Oe,A.dashTexture({channels:1,data:Se,width:Se.length,height:1,mag:"linear",min:"linear"},0,0)}if(k.color){var et=A.count,ct=k.color;ct||(ct="transparent");var mt=new Uint8Array(4*et+4);if(Array.isArray(ct)&&typeof ct[0]!="number"){for(var Ct=0;Ct<et;Ct++){var Tt=m(ct[Ct],"uint8");mt.set(Tt,4*Ct)}mt.set(m(ct[0],"uint8"),4*et)}else for(var nt=m(ct,"uint8"),Qe=0;Qe<et+1;Qe++)mt.set(nt,4*Qe);A.colorBuffer({usage:"dynamic",type:"uint8",data:mt})}}else p.passes[L]=null}),h.length<this.passes.length){for(var c=h.length;c<this.passes.length;c++){var T=this.passes[c];T&&(T.colorBuffer.destroy(),T.positionBuffer.destroy(),T.dashTexture.destroy())}this.passes.length=h.length}for(var _=[],w=0;w<this.passes.length;w++)this.passes[w]!==null&&_.push(this.passes[w]);return this.passes=_,this}},o.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(v,$,te){function m(c,T){return function(_){if(Array.isArray(_))return _}(c)||function(_,w){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),!w||I.length!==w);P=!0);}catch(E){S=!0,A=E}finally{try{P||k.return==null||k.return()}finally{if(S)throw A}}return I}}(c,T)||b(c,T)||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 g(c){return function(T){if(Array.isArray(T))return y(T)}(c)||function(T){if(typeof Symbol<"u"&&T[Symbol.iterator]!=null||T["@@iterator"]!=null)return Array.from(T)}(c)||b(c)||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(c,T){if(c){if(typeof c=="string")return y(c,T);var _=Object.prototype.toString.call(c).slice(8,-1);return _==="Object"&&c.constructor&&(_=c.constructor.name),_==="Map"||_==="Set"?Array.from(c):_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_)?y(c,T):void 0}}function y(c,T){(T==null||T>c.length)&&(T=c.length);for(var _=0,w=new Array(T);_<T;_++)w[_]=c[_];return w}var e=v("color-normalize"),n=v("array-bounds"),t=v("color-id"),i=v("@plotly/point-cluster"),r=v("object-assign"),d=v("glslify"),l=v("pick-by-alias"),a=v("update-diff"),u=v("flatten-vertex-data"),f=v("is-iexplorer"),o=v("to-float32"),h=v("parse-rect"),p=s;function s(c,T){var _=this;if(!(this instanceof s))return new s(c,T);typeof c=="function"?(T||(T={}),T.regl=c):(T=c,c=null),T&&T.length&&(T.positions=T);var w,k=(c=T.regl)._gl,L=[];this.tooManyColors=f,w=c.texture({data:new Uint8Array(1020),width:255,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),r(this,{regl:c,gl:k,groups:[],markerCache:[null],markerTextures:[null],palette:L,paletteIds:{},paletteTexture:w,maxColors:255,maxSize:100,canvas:k.canvas}),this.update(T);var A={uniforms:{constPointSize:!!T.constPointSize,opacity:c.prop("opacity"),paletteSize:function(S,E){return[_.tooManyColors?0:255,w.height]},pixelRatio:c.context("pixelRatio"),scale:c.prop("scale"),scaleFract:c.prop("scaleFract"),translate:c.prop("translate"),translateFract:c.prop("translateFract"),markerTexture:c.prop("markerTexture"),paletteTexture:w},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:c.prop("viewport")},viewport:c.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:c.prop("elements"),count:c.prop("count"),offset:c.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=c(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=c(P)}s.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},s.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},s.prototype.draw=function(){for(var c=this,T=arguments.length,_=new Array(T),w=0;w<T;w++)_[w]=arguments[w];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){c.drawItem(I)});return this},s.prototype.drawItem=function(c,T){var _=this.groups,w=_[c];if(typeof T=="number"&&(c=T,w=_[T],T=null),w&&w.count&&w.opacity){w.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,w,T));for(var k=[],L=1;L<w.activation.length;L++)w.activation[L]&&(w.activation[L]===!0||w.activation[L].data.length)&&k.push.apply(k,g(this.getMarkerDrawOptions(L,w,T)));k.length&&this.drawMarker(k)}},s.prototype.getMarkerDrawOptions=function(c,T,_){var w=T.range,k=T.tree,L=T.viewport,A=T.activation,I=T.selectionBuffer,P=T.count;if(this.regl,!k)return _?[r({},T,{markerTexture:this.markerTextures[c],activation:A[c],count:_.length,elements:_,offset:0})]:[r({},T,{markerTexture:this.markerTextures[c],activation:A[c],offset:0})];var S=[],E=k.range(w,{lod:!0,px:[(w[2]-w[0])/L.width,(w[3]-w[1])/L.height]});if(_){for(var D=A[c].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=m(E[Z],2),G=K[0],W=K[1];S.push(r({},T,{markerTexture:this.markerTextures[c],activation:_?I:A[c],offset:G,count:W-G}))}return S},s.prototype.update=function(){for(var c=this,T=arguments.length,_=new Array(T),w=0;w<T;w++)_[w]=arguments[w];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=l(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&&(c.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({},s.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(a(F,E,[{snap:!0,size:function(ce,de){return ce==null&&(ce=s.defaults.size),H+=ce&&ce.length?1:0,ce},borderSize:function(ce,de){return ce==null&&(ce=s.defaults.borderSize),H+=ce&&ce.length?1:0,ce},opacity:parseFloat,color:function(ce,de){return ce==null&&(ce=s.defaults.color),ce=c.updateColor(ce),V++,ce},borderColor:function(ce,de){return ce==null&&(ce=s.defaults.borderColor),ce=c.updateColor(ce),V++,ce},bounds:function(ce,de,xe){return"range"in xe||(xe.range=null),ce},positions:function(ce,de,xe){var _e=de.snap,we=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 ge=de.count=Math.floor(ce.length/2),ke=de.bounds=ge?n(ce,2):null;if(xe.range||de.range||(delete de.range,xe.range=ke),xe.marker||de.marker||(delete de.marker,xe.marker=null),_e&&(_e===!0||ge>_e)?de.tree=i(ce,{bounds:ke}):_e&&_e.length&&(de.tree=_e),de.tree){var be={primitive:"points",usage:"static",data:de.tree,type:"uint32"};de.elements?de.elements(be):de.elements=A.elements(be)}var Se=o.float32(ce);return we({data:Se,usage:"dynamic"}),Ee({data:o.fract32(ce,Se),usage:"dynamic"}),fe({data:new Uint8Array(ge),type:"uint8",usage:"stream"}),ce}},{marker:function(ce,de,xe){var _e=de.activation;if(_e.forEach(function(Se){return Se&&Se.destroy&&Se.destroy()}),_e.length=0,ce&&typeof ce[0]!="number"){for(var we=[],Ee=0,fe=Math.min(ce.length,de.count);Ee<fe;Ee++){var ge=c.addMarker(ce[Ee]);we[ge]||(we[ge]=new Uint8Array(de.count)),we[ge][Ee]=1}for(var ke=0;ke<we.length;ke++)if(we[ke]){var be={data:we[ke],type:"uint8",usage:"static"};_e[ke]?_e[ke](be):_e[ke]=A.buffer(be),_e[ke].data=we[ke]}}else _e[c.addMarker(ce)]=!0;return ce},range:function(ce,de,xe){var _e=de.bounds;if(_e)return ce||(ce=_e),de.scale=[1/(ce[2]-ce[0]),1/(ce[3]-ce[1])],de.translate=[-ce[0],-ce[1]],de.scaleFract=o.fract(de.scale),de.translateFract=o.fract(de.translate),ce},viewport:function(ce){return h(ce||[L.drawingBufferWidth,L.drawingBufferHeight])}}]),H){var Z=F,K=Z.count,G=Z.size,W=Z.borderSize,Q=Z.sizeBuffer,R=new Uint8Array(2*K);if(G.length||W.length)for(var N=0;N<K;
1209N++)R[2*N]=Math.round(255*(G[N]==null?G:G[N])/I),R[2*N+1]=Math.round(255*(W[N]==null?W:W[N])/I);Q({data:R,usage:"dynamic"})}if(V){var U,ee=F,j=ee.count,X=ee.color,J=ee.borderColor,re=ee.colorBuffer;if(c.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})}},s.prototype.addMarker=function(c){var T,_=this.markerTextures,w=this.regl,k=this.markerCache,L=c==null?0:k.indexOf(c);if(L>=0)return L;if(c instanceof Uint8Array||c instanceof Uint8ClampedArray)T=c;else{T=new Uint8Array(c.length);for(var A=0,I=c.length;A<I;A++)T[A]=255*c[A]}var P=Math.floor(Math.sqrt(T.length));return L=_.length,k.push(c),_.push(w.texture({channels:1,data:T,radius:P,mag:"linear",min:"linear"})),L},s.prototype.updateColor=function(c){var T=this.paletteIds,_=this.palette,w=this.maxColors;Array.isArray(c)||(c=[c]);var k=[];if(typeof c[0]=="number"){var L=[];if(Array.isArray(c))for(var A=0;A<c.length;A+=4)L.push(c.slice(A,A+4));else for(var I=0;I<c.length;I+=4)L.push(c.subarray(I,I+4));c=L}for(var P=0;P<c.length;P++){var S=c[P];S=e(S,"uint8");var E=t(S,!1);if(T[E]==null){var D=_.length;T[E]=Math.floor(D/4),_[D]=S[0],_[D+1]=S[1],_[D+2]=S[2],_[D+3]=S[3]}k[P]=T[E]}return!this.tooManyColors&&_.length>4*w&&(this.tooManyColors=!0),this.updatePalette(_),k.length===1?k[0]:k},s.prototype.updatePalette=function(c){if(!this.tooManyColors){var T=this.maxColors,_=this.paletteTexture,w=Math.ceil(.25*c.length/T);if(w>1)for(var k=.25*(c=c.slice()).length%T;k<w*T;k++)c.push(0,0,0,0);_.height<w&&_.resize(T,w),_.subimage({width:Math.min(.25*c.length,T),height:w,data:c},0,0)}},s.prototype.destroy=function(){return this.groups.forEach(function(c){c.sizeBuffer.destroy(),c.positionBuffer.destroy(),c.positionFractBuffer.destroy(),c.colorBuffer.destroy(),c.activation.forEach(function(T){return T&&T.destroy&&T.destroy()}),c.selectionBuffer.destroy(),c.elements&&c.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(c){return c&&c.destroy&&c.destroy()}),this};var x=v("object-assign");$.exports=function(c,T){var _=new p(c,T),w=_.render.bind(_);return x(w,{render:w,update:_.update.bind(_),draw:_.draw.bind(_),destroy:_.destroy.bind(_),regl:_.regl,gl:_.gl,canvas:_.gl.canvas,groups:_.groups,markers:_.markerCache,palette:_.palette}),w}},{"@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(v,$,te){var m=v("regl-scatter2d"),g=v("pick-by-alias"),b=v("array-bounds"),y=v("raf"),e=v("array-range"),n=v("parse-rect"),t=v("flatten-vertex-data");function i(a,u){if(!(this instanceof i))return new i(a,u);this.traces=[],this.passes={},this.regl=a,this.scatter=m(a),this.canvas=this.scatter.canvas}function r(a,u,f){return(a.id!=null?a.id:a)<<16|(255&u)<<8|255&f}function d(a,u,f){var o,h,p,s,x=a[u],c=a[f];return x.length>2?(x[0],x[2],o=x[1],h=x[3]):x.length?(o=x[0],h=x[1]):(x.x,o=x.y,x.x+x.width,h=x.y+x.height),c.length>2?(p=c[0],s=c[2],c[1],c[3]):c.length?(p=c[0],s=c[1]):(p=c.x,c.y,s=c.x+c.width,c.y+c.height),[p,o,s,h]}function l(a){if(typeof a=="number")return[a,a,a,a];if(a.length===2)return[a[0],a[1],a[0],a[1]];var u=n(a);return[u.x,u.y,u.x+u.width,u.y+u.height]}$.exports=i,i.prototype.render=function(){for(var a,u=this,f=[],o=arguments.length;o--;)f[o]=arguments[o];return f.length&&(a=this).update.apply(a,f),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=y(function(){u.draw(),u.dirty=!0,u.planned=null})):(this.draw(),this.dirty=!0,y(function(){u.dirty=!1})),this)},i.prototype.update=function(){for(var a,u=[],f=arguments.length;f--;)u[f]=arguments[f];if(u.length){for(var o=0;o<u.length;o++)this.updateItem(o,u[o]);
1209this.traces=this.traces.filter(Boolean);for(var h=[],p=0,s=0;s<this.traces.length;s++){for(var x=this.traces[s],c=this.traces[s].passes,T=0;T<c.length;T++)h.push(this.passes[c[T]]);x.passOffset=p,p+=x.passes.length}return(a=this.scatter).update.apply(a,h),this}},i.prototype.updateItem=function(a,u){var f=this.regl;if(u===null)return this.traces[a]=null,this;if(!u)return this;var o,h=g(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[a]||(this.traces[a]={id:a,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 s=0;s<p.columns;s++)p.bounds[s]=b(h.data[s],1)}h.range&&(p.range=h.range,o=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(l),x=!0):p.padding=l(h.padding));var c=p.columns,T=p.count,_=p.viewport.width,w=p.viewport.height,k=p.viewport.x,L=p.viewport.y,A=_/c,I=w/c;p.passes=[];for(var P=0;P<c;P++)for(var S=0;S<c;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:T,stride:c},y:{buffer:p.buffer,offset:P,count:T,stride:c}}:D.positions={x:{buffer:p.buffer,offset:S*T,count:T},y:{buffer:p.buffer,offset:P*T,count:T}},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],G=H[3];D.viewport=[k+V*_+F[0],L+Z*w+F[1],k+K*_-F[2],L+G*w-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=o?d(p.range,P,S):p.range||D.bounds),p.passes.push(E)}return this},i.prototype.draw=function(){for(var a,u=[],f=arguments.length;f--;)u[f]=arguments[f];if(u.length){for(var o=[],h=0;h<u.length;h++)if(typeof u[h]=="number"){var p=this.traces[u[h]],s=p.passes,x=p.passOffset;o.push.apply(o,e(x,x+s.length))}else if(u[h].length){var c=u[h],T=this.traces[h],_=T.passes,w=T.passOffset;_=_.map(function(k,L){o[w+L]=c})}(a=this.scatter).draw.apply(a,o)}else this.scatter.draw();return this},i.prototype.destroy=function(){return this.traces.forEach(function(a){a.buffer&&a.buffer.destroy&&a.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(v,$,te){(function(m,g){typeof te=="object"&&$!==void 0?$.exports=g():m.createREGL=g()})(this,function(){function m(Te,Pe){this.id=X++,this.type=Te,this.data=Pe}function g(Te){return"["+function Pe(Ve){if(Ve.length===0)return[];var tt=Ve.charAt(0),ot=Ve.charAt(Ve.length-1);if(1<Ve.length&&tt===ot&&(tt==='"'||tt==="'"))return['"'+Ve.substr(1,Ve.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(tt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Ve))return Pe(Ve.substr(0,tt.index)).concat(Pe(tt[1])).concat(Pe(Ve.substr(tt.index+tt[0].length)));if((tt=Ve.split(".")).length===1)return['"'+Ve.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(Ve=[],ot=0;ot<tt.length;++ot)Ve=Ve.concat(Pe(tt[ot]));return Ve}(Te).join("][")+"]"}function b(Te){return typeof Te=="string"?Te.split():Te}function y(Te){return typeof Te=="string"?document.querySelector(Te):Te}function e(Te){var Pe,Ve,tt,ot,at=Te||{};Te={};var _t=[],bt=[],jt=typeof window>"u"?1:window.devicePixelRatio,Nt=!1,$e={},yt=function(Mt){},Ot=function(){};if(typeof at=="string"?Pe=document.querySelector(at):typeof at=="object"&&(typeof at.nodeName=="string"&&typeof at.appendChild=="function"&&typeof at.getBoundingClientRect=="function"?Pe=at:typeof at.drawArrays=="function"||typeof at.drawElements=="function"?tt=(ot=at).canvas:("gl"in at?ot=at.gl:"canvas"in at?tt=y(at.canvas):"container"in at&&(Ve=y(at.container)),"attributes"in at&&(Te=at.attributes),"extensions"in at&&(_t=b(at.extensions)),"optionalExtensions"in at&&(bt=b(at.optionalExtensions)),"onDone"in at&&(yt=at.onDone),"profile"in at&&(Nt=!!at.profile),"pixelRatio"in at&&(jt=+at.pixelRatio),"cachedCode"in at&&($e=at.cachedCode))),Pe&&(Pe.nodeName.toLowerCase()==="canvas"?tt=Pe:Ve=Pe),!ot){if(!tt){if(!(Pe=function(Mt,Pt,Le){function Xe(){var It=window.innerWidth,Zt=window.innerHeight;Mt!==document.body&&(It=(Zt=At.getBoundingClientRect()).right-Zt.left,Zt=Zt.bottom-Zt.top),At.width=Le*It,At.height=Le*Zt}var it,At=document.createElement("canvas");return j(At.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),Mt.appendChild(At),Mt===document.body&&(At.style.position="absolute",j(Mt.style,{margin:0,padding:0})),Mt!==document.body&&typeof ResizeObserver=="function"?(it=new ResizeObserver(function(){setTimeout(Xe)})).observe(Mt):window.addEventListener("resize",Xe,!1),Xe(),{canvas:At,onDestroy:function(){it?it.disconnect():window.removeEventListener("resize",Xe),Mt.removeChild(At)}}}(Ve||document.body,0,jt)))return null;tt=Pe.canvas,Ot=Pe.onDestroy}Te.premultipliedAlpha===void 0&&(Te.premultipliedAlpha=!0),ot=function(Mt,Pt){function Le(Xe){try{return Mt.getContext(Xe,Pt)}catch{return null}}return Le("webgl")||Le("experimental-webgl")||Le("webgl-experimental")}(tt,Te)}return ot?{gl:ot,canvas:tt,container:Ve,extensions:_t,optionalExtensions:bt,pixelRatio:jt,profile:Nt,cachedCode:$e,onDone:yt,onDestroy:Ot}:(Ot(),yt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function n(Te,Pe){for(var Ve=Array(Te),tt=0;tt<Te;++tt)Ve[tt]=Pe(tt);return Ve}function t(Te){var Pe,Ve;return Pe=(65535<Te)<<4,Pe|=Ve=(255<(Te>>>=Pe))<<3,(Pe|=Ve=(15<(Te>>>=Ve))<<2)|(Ve=(3<(Te>>>=Ve))<<1)|Te>>>Ve>>1}function i(){function Te(tt){e:{for(var ot=16;268435456>=ot;ot*=16)if(tt<=ot){tt=ot;break e}tt=0}return 0<(ot=Ve[t(tt)>>2]).length?ot.pop():new ArrayBuffer(tt)}function Pe(tt){Ve[t(tt.byteLength)>>2].push(tt)}var Ve=n(8,function(){return[]});return{alloc:Te,free:Pe,allocType:function(tt,ot){var at=null;
1209switch(tt){case 5120:at=new Int8Array(Te(ot),0,ot);break;case 5121:at=new Uint8Array(Te(ot),0,ot);break;case 5122:at=new Int16Array(Te(2*ot),0,ot);break;case 5123:at=new Uint16Array(Te(2*ot),0,ot);break;case 5124:at=new Int32Array(Te(4*ot),0,ot);break;case 5125:at=new Uint32Array(Te(4*ot),0,ot);break;case 5126:at=new Float32Array(Te(4*ot),0,ot);break;default:return null}return at.length!==ot?at.subarray(0,ot):at},freeType:function(tt){Pe(tt.buffer)}}}function r(Te){return!!Te&&typeof Te=="object"&&Array.isArray(Te.shape)&&Array.isArray(Te.stride)&&typeof Te.offset=="number"&&Te.shape.length===Te.stride.length&&(Array.isArray(Te.data)||pe(Te.data))}function d(Te,Pe,Ve,tt,ot,at){for(var _t=0;_t<Pe;++_t)for(var bt=Te[_t],jt=0;jt<Ve;++jt)for(var Nt=bt[jt],$e=0;$e<tt;++$e)ot[at++]=Nt[$e]}function l(Te){return 0|xe[Object.prototype.toString.call(Te)]}function a(Te,Pe){for(var Ve=0;Ve<Pe.length;++Ve)Te[Ve]=Pe[Ve]}function u(Te,Pe,Ve,tt,ot,at,_t){for(var bt=0,jt=0;jt<Ve;++jt)for(var Nt=0;Nt<tt;++Nt)Te[bt++]=Pe[ot*jt+at*Nt+_t]}function f(Te,Pe,Ve,tt){function ot(yt){this.id=jt++,this.buffer=Te.createBuffer(),this.type=yt,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,Ve.profile&&(this.stats={size:0})}function at(yt,Ot,Mt){yt.byteLength=Ot.byteLength,Te.bufferData(yt.type,Ot,Mt)}function _t(yt,Ot,Mt,Pt,Le,Xe){if(yt.usage=Mt,Array.isArray(Ot)){if(yt.dtype=Pt||5126,0<Ot.length)if(Array.isArray(Ot[0])){Le=fe(Ot);for(var it=Pt=1;it<Le.length;++it)Pt*=Le[it];yt.dimension=Pt,at(yt,Ot=Ee(Ot,Le,yt.dtype),Mt),Xe?yt.persistentData=Ot:se.freeType(Ot)}else typeof Ot[0]=="number"?(yt.dimension=Le,a(Le=se.allocType(yt.dtype,Ot.length),Ot),at(yt,Le,Mt),Xe?yt.persistentData=Le:se.freeType(Le)):pe(Ot[0])&&(yt.dimension=Ot[0].length,yt.dtype=Pt||l(Ot[0])||5126,at(yt,Ot=Ee(Ot,[Ot.length,Ot[0].length],yt.dtype),Mt),Xe?yt.persistentData=Ot:se.freeType(Ot))}else if(pe(Ot))yt.dtype=Pt||l(Ot),yt.dimension=Le,at(yt,Ot,Mt),Xe&&(yt.persistentData=new Uint8Array(new Uint8Array(Ot.buffer)));else if(r(Ot)){Le=Ot.shape;var At=Ot.stride,It=(it=Ot.offset,0),Zt=0,Jt=0,Vt=0;Le.length===1?(It=Le[0],Zt=1,Jt=At[0],Vt=0):Le.length===2&&(It=Le[0],Zt=Le[1],Jt=At[0],Vt=At[1]),yt.dtype=Pt||l(Ot.data)||5126,yt.dimension=Zt,u(Le=se.allocType(yt.dtype,It*Zt),Ot.data,It,Zt,Jt,Vt,it),at(yt,Le,Mt),Xe?yt.persistentData=Le:se.freeType(Le)}else Ot instanceof ArrayBuffer&&(yt.dtype=5121,yt.dimension=Le,at(yt,Ot,Mt),Xe&&(yt.persistentData=new Uint8Array(new Uint8Array(Ot))))}function bt(yt){Pe.bufferCount--,tt(yt),Te.deleteBuffer(yt.buffer),yt.buffer=null,delete Nt[yt.id]}var jt=0,Nt={};ot.prototype.bind=function(){Te.bindBuffer(this.type,this.buffer)},ot.prototype.destroy=function(){bt(this)};var $e=[];return Ve.profile&&(Pe.getTotalBufferSize=function(){var yt=0;return Object.keys(Nt).forEach(function(Ot){yt+=Nt[Ot].stats.size}),yt}),{create:function(yt,Ot,Mt,Pt){function Le(it){var At=35044,It=null,Zt=0,Jt=0,Vt=1;return Array.isArray(it)||pe(it)||r(it)||it instanceof ArrayBuffer?It=it:typeof it=="number"?Zt=0|it:it&&("data"in it&&(It=it.data),"usage"in it&&(At=we[it.usage]),"type"in it&&(Jt=_e[it.type]),"dimension"in it&&(Vt=0|it.dimension),"length"in it&&(Zt=0|it.length)),Xe.bind(),It?_t(Xe,It,At,Jt,Vt,Pt):(Zt&&Te.bufferData(Xe.type,Zt,At),Xe.dtype=Jt||5121,Xe.usage=At,Xe.dimension=Vt,Xe.byteLength=Zt),Ve.profile&&(Xe.stats.size=Xe.byteLength*ge[Xe.dtype]),Le}Pe.bufferCount++;var Xe=new ot(Ot);return Nt[Xe.id]=Xe,Mt||Le(yt),Le._reglType="buffer",Le._buffer=Xe,Le.subdata=function(it,At){var It,Zt=0|(At||0);if(Xe.bind(),pe(it)||it instanceof ArrayBuffer)Te.bufferSubData(Xe.type,Zt,it);else if(Array.isArray(it)){if(0<it.length)if(typeof it[0]=="number"){var Jt=se.allocType(Xe.dtype,it.length);a(Jt,it),Te.bufferSubData(Xe.type,Zt,Jt),se.freeType(Jt)}else(Array.isArray(it[0])||pe(it[0]))&&(It=fe(it),Jt=Ee(it,It,Xe.dtype),Te.bufferSubData(Xe.type,Zt,Jt),se.freeType(Jt))}else if(r(it)){It=it.shape;var Vt=it.stride,pr=Jt=0,Ir=0,fr=0;It.length===1?(Jt=It[0],pr=1,Ir=Vt[0],fr=0):It.length===2&&(Jt=It[0],pr=It[1],Ir=Vt[0],fr=Vt[1]),It=Array.isArray(it.data)?Xe.dtype:l(it.data),u(It=se.allocType(It,Jt*pr),it.data,Jt,pr,Ir,fr,it.offset),Te.bufferSubData(Xe.type,Zt,It),se.freeType(It)}return Le},Ve.profile&&(Le.stats=Xe.stats),Le.destroy=function(){bt(Xe)},Le},createStream:function(yt,Ot){var Mt=$e.pop();return Mt||(Mt=new ot(yt)),Mt.bind(),_t(Mt,Ot,35040,0,1,!1),Mt},destroyStream:function(yt){$e.push(yt)},clear:function(){ce(Nt).forEach(bt),$e.forEach(bt)},getBuffer:function(yt){return yt&&yt._buffer instanceof ot?yt._buffer:null},restore:function(){ce(Nt).forEach(function(yt){yt.buffer=Te.createBuffer(),Te.bindBuffer(yt.type,yt.buffer),Te.bufferData(yt.type,yt.persistentData||yt.byteLength,yt.usage)})},_initBuffer:_t}}function o(Te,Pe,Ve,tt){function ot(yt){this.id=jt++,bt[this.id]=this,this.buffer=yt,this.primType=4,this.type=this.vertCount=0}function at(yt,Ot,Mt,Pt,Le,Xe,it){var At;if(yt.buffer.bind(),Ot?((At=it)||pe(Ot)&&(!r(Ot)||pe(Ot.data))||(At=Pe.oes_element_index_uint?5125:5123),Ve._initBuffer(yt.buffer,Ot,Mt,At,3)):(Te.bufferData(34963,Xe,Mt),yt.buffer.dtype=At||5121,yt.buffer.usage=Mt,yt.buffer.dimension=3,yt.buffer.byteLength=Xe),At=it,!it){switch(yt.buffer.dtype){case 5121:case 5120:At=5121;break;
1209case 5123:case 5122:At=5123;break;case 5125:case 5124:At=5125}yt.buffer.dtype=At}yt.type=At,0>(Ot=Le)&&(Ot=yt.buffer.byteLength,At===5123?Ot>>=1:At===5125&&(Ot>>=2)),yt.vertCount=Ot,Ot=Pt,0>Pt&&(Ot=4,(Pt=yt.buffer.dimension)===1&&(Ot=0),Pt===2&&(Ot=1),Pt===3&&(Ot=4)),yt.primType=Ot}function _t(yt){tt.elementsCount--,delete bt[yt.id],yt.buffer.destroy(),yt.buffer=null}var bt={},jt=0,Nt={uint8:5121,uint16:5123};Pe.oes_element_index_uint&&(Nt.uint32=5125),ot.prototype.bind=function(){this.buffer.bind()};var $e=[];return{create:function(yt,Ot){function Mt(Xe){if(Xe)if(typeof Xe=="number")Pt(Xe),Le.primType=4,Le.vertCount=0|Xe,Le.type=5121;else{var it=null,At=35044,It=-1,Zt=-1,Jt=0,Vt=0;Array.isArray(Xe)||pe(Xe)||r(Xe)?it=Xe:("data"in Xe&&(it=Xe.data),"usage"in Xe&&(At=we[Xe.usage]),"primitive"in Xe&&(It=ke[Xe.primitive]),"count"in Xe&&(Zt=0|Xe.count),"type"in Xe&&(Vt=Nt[Xe.type]),"length"in Xe?Jt=0|Xe.length:(Jt=Zt,Vt===5123||Vt===5122?Jt*=2:Vt!==5125&&Vt!==5124||(Jt*=4))),at(Le,it,At,It,Zt,Jt,Vt)}else Pt(),Le.primType=4,Le.vertCount=0,Le.type=5121;return Mt}var Pt=Ve.create(null,34963,!0),Le=new ot(Pt._buffer);return tt.elementsCount++,Mt(yt),Mt._reglType="elements",Mt._elements=Le,Mt.subdata=function(Xe,it){return Pt.subdata(Xe,it),Mt},Mt.destroy=function(){_t(Le)},Mt},createStream:function(yt){var Ot=$e.pop();return Ot||(Ot=new ot(Ve.create(null,34963,!0,!1)._buffer)),at(Ot,yt,35040,-1,-1,0,0),Ot},destroyStream:function(yt){$e.push(yt)},getElements:function(yt){return typeof yt=="function"&&yt._elements instanceof ot?yt._elements:null},clear:function(){ce(bt).forEach(_t)}}}function h(Te){for(var Pe=se.allocType(5123,Te.length),Ve=0;Ve<Te.length;++Ve)if(isNaN(Te[Ve]))Pe[Ve]=65535;else if(1/0===Te[Ve])Pe[Ve]=31744;else if(-1/0===Te[Ve])Pe[Ve]=64512;else{be[0]=Te[Ve];var tt=(at=Se[0])>>>31<<15,ot=(at<<1>>>24)-127,at=at>>13&1023;Pe[Ve]=-24>ot?tt:-14>ot?tt+(at+1024>>-14-ot):15<ot?tt+31744:tt+(ot+15<<10)+at}return Pe}function p(Te){return Array.isArray(Te)||pe(Te)}function s(Te){return"[object "+Te+"]"}function x(Te){return Array.isArray(Te)&&(Te.length===0||typeof Te[0]=="number")}function c(Te){return!(!Array.isArray(Te)||Te.length===0||!p(Te[0]))}function T(Te){return Object.prototype.toString.call(Te)}function _(Te){if(!Te)return!1;var Pe=T(Te);return 0<=ct.indexOf(Pe)||x(Te)||c(Te)||r(Te)}function w(Te,Pe){Te.type===36193?(Te.data=h(Pe),se.freeType(Pe)):Te.data=Pe}function k(Te,Pe,Ve,tt,ot,at){if(Te=Ct[Te]!==void 0?Ct[Te]:je[Te]*mt[Pe],at&&(Te*=6),ot){for(tt=0;1<=Ve;)tt+=Te*Ve*Ve,Ve/=2;return tt}return Te*Ve*tt}function L(Te,Pe,Ve,tt,ot,at,_t){function bt(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function jt(sr,Fr){sr.internalformat=Fr.internalformat,sr.format=Fr.format,sr.type=Fr.type,sr.compressed=Fr.compressed,sr.premultiplyAlpha=Fr.premultiplyAlpha,sr.flipY=Fr.flipY,sr.unpackAlignment=Fr.unpackAlignment,sr.colorSpace=Fr.colorSpace,sr.width=Fr.width,sr.height=Fr.height,sr.channels=Fr.channels}function Nt(sr,Fr){if(typeof Fr=="object"&&Fr){"premultiplyAlpha"in Fr&&(sr.premultiplyAlpha=Fr.premultiplyAlpha),"flipY"in Fr&&(sr.flipY=Fr.flipY),"alignment"in Fr&&(sr.unpackAlignment=Fr.alignment),"colorSpace"in Fr&&(sr.colorSpace=qr[Fr.colorSpace]),"type"in Fr&&(sr.type=rn[Fr.type]);var Bt=sr.width,lr=sr.height,mr=sr.channels,Vr=!1;"shape"in Fr?(Bt=Fr.shape[0],lr=Fr.shape[1],Fr.shape.length===3&&(mr=Fr.shape[2],Vr=!0)):("radius"in Fr&&(Bt=lr=Fr.radius),"width"in Fr&&(Bt=Fr.width),"height"in Fr&&(lr=Fr.height),"channels"in Fr&&(mr=Fr.channels,Vr=!0)),sr.width=0|Bt,sr.height=0|lr,sr.channels=0|mr,Bt=!1,"format"in Fr&&(Bt=Fr.format,lr=sr.internalformat=An[Bt],sr.format=$r[lr],Bt in rn&&!("type"in Fr)&&(sr.type=rn[Bt]),Bt in mn&&(sr.compressed=!0),Bt=!0),!Vr&&Bt?sr.channels=je[sr.format]:Vr&&!Bt&&sr.channels!==De[sr.format]&&(sr.format=sr.internalformat=De[sr.channels])}}function $e(sr){Te.pixelStorei(37440,sr.flipY),Te.pixelStorei(37441,sr.premultiplyAlpha),Te.pixelStorei(37443,sr.colorSpace),Te.pixelStorei(3317,sr.unpackAlignment)}function yt(){bt.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ot(sr,Fr){var Bt=null;if(_(Fr)?Bt=Fr:Fr&&(Nt(sr,Fr),"x"in Fr&&(sr.xOffset=0|Fr.x),"y"in Fr&&(sr.yOffset=0|Fr.y
1209),_(Fr.data)&&(Bt=Fr.data)),Fr.copy){var lr=ot.viewportWidth,mr=ot.viewportHeight;sr.width=sr.width||lr-sr.xOffset,sr.height=sr.height||mr-sr.yOffset,sr.needsCopy=!0}else if(Bt){if(pe(Bt))sr.channels=sr.channels||4,sr.data=Bt,"type"in Fr||sr.type!==5121||(sr.type=0|xe[Object.prototype.toString.call(Bt)]);else if(x(Bt)){switch(sr.channels=sr.channels||4,mr=(lr=Bt).length,sr.type){case 5121:case 5123:case 5125:case 5126:(mr=se.allocType(sr.type,mr)).set(lr),sr.data=mr;break;case 36193:sr.data=h(lr)}sr.alignment=1,sr.needsFree=!0}else if(r(Bt)){lr=Bt.data,Array.isArray(lr)||sr.type!==5121||(sr.type=0|xe[Object.prototype.toString.call(lr)]),mr=Bt.shape;var Vr,Br,Dr,Or,xr=Bt.stride;mr.length===3?(Dr=mr[2],Or=xr[2]):Or=Dr=1,Vr=mr[0],Br=mr[1],mr=xr[0],xr=xr[1],sr.alignment=1,sr.width=Vr,sr.height=Br,sr.channels=Dr,sr.format=sr.internalformat=De[Dr],sr.needsFree=!0,Vr=Or,Bt=Bt.offset,Dr=sr.width,Or=sr.height,Br=sr.channels;for(var br=se.allocType(sr.type===36193?5126:sr.type,Dr*Or*Br),_r=0,Cr=0;Cr<Or;++Cr)for(var Wr=0;Wr<Dr;++Wr)for(var Gr=0;Gr<Br;++Gr)br[_r++]=lr[mr*Wr+xr*Cr+Vr*Gr+Bt];w(sr,br)}else if(T(Bt)===Je||T(Bt)===ze||T(Bt)===Ue)T(Bt)===Je||T(Bt)===ze?sr.element=Bt:sr.element=Bt.canvas,sr.width=sr.element.width,sr.height=sr.element.height,sr.channels=4;else if(T(Bt)===Ge)sr.element=Bt,sr.width=Bt.width,sr.height=Bt.height,sr.channels=4;else if(T(Bt)===Ye)sr.element=Bt,sr.width=Bt.naturalWidth,sr.height=Bt.naturalHeight,sr.channels=4;else if(T(Bt)===et)sr.element=Bt,sr.width=Bt.videoWidth,sr.height=Bt.videoHeight,sr.channels=4;else if(c(Bt)){for(lr=sr.width||Bt[0].length,mr=sr.height||Bt.length,xr=sr.channels,xr=p(Bt[0][0])?xr||Bt[0][0].length:xr||1,Vr=de.shape(Bt),Dr=1,Or=0;Or<Vr.length;++Or)Dr*=Vr[Or];Dr=se.allocType(sr.type===36193?5126:sr.type,Dr),de.flatten(Bt,Vr,"",Dr),w(sr,Dr),sr.alignment=1,sr.width=lr,sr.height=mr,sr.channels=xr,sr.format=sr.internalformat=De[xr],sr.needsFree=!0}}else sr.width=sr.width||1,sr.height=sr.height||1,sr.channels=sr.channels||4}function Mt(sr,Fr,Bt,lr,mr){var Vr=sr.element,Br=sr.data,Dr=sr.internalformat,Or=sr.format,xr=sr.type,br=sr.width,_r=sr.height;$e(sr),Vr?Te.texSubImage2D(Fr,mr,Bt,lr,Or,xr,Vr):sr.compressed?Te.compressedTexSubImage2D(Fr,mr,Bt,lr,Dr,br,_r,Br):sr.needsCopy?(tt(),Te.copyTexSubImage2D(Fr,mr,Bt,lr,sr.xOffset,sr.yOffset,br,_r)):Te.texSubImage2D(Fr,mr,Bt,lr,br,_r,Or,xr,Br)}function Pt(){return Rr.pop()||new yt}function Le(sr){sr.needsFree&&se.freeType(sr.data),yt.call(sr),Rr.push(sr)}function Xe(){bt.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function it(sr,Fr,Bt){var lr=sr.images[0]=Pt();sr.mipmask=1,lr.width=sr.width=Fr,lr.height=sr.height=Bt,lr.channels=sr.channels=4}function At(sr,Fr){var Bt=null;if(_(Fr))jt(Bt=sr.images[0]=Pt(),sr),Ot(Bt,Fr),sr.mipmask=1;else if(Nt(sr,Fr),Array.isArray(Fr.mipmap))for(var lr=Fr.mipmap,mr=0;mr<lr.length;++mr)jt(Bt=sr.images[mr]=Pt(),sr),Bt.width>>=mr,Bt.height>>=mr,Ot(Bt,lr[mr]),sr.mipmask|=1<<mr;else jt(Bt=sr.images[0]=Pt(),sr),Ot(Bt,Fr),sr.mipmask=1;jt(sr,sr.images[0])}function It(sr,Fr){for(var Bt=sr.images,lr=0;lr<Bt.length&&Bt[lr];++lr){var mr=Bt[lr],Vr=Fr,Br=lr,Dr=mr.element,Or=mr.data,xr=mr.internalformat,br=mr.format,_r=mr.type,Cr=mr.width,Wr=mr.height;$e(mr),Dr?Te.texImage2D(Vr,Br,br,br,_r,Dr):mr.compressed?Te.compressedTexImage2D(Vr,Br,xr,Cr,Wr,0,Or):mr.needsCopy?(tt(),Te.copyTexImage2D(Vr,Br,br,mr.xOffset,mr.yOffset,Cr,Wr,0)):Te.texImage2D(Vr,Br,br,Cr,Wr,0,br,_r,Or||null)}}function Zt(){var sr=Pn.pop()||new Xe;bt.call(sr);for(var Fr=sr.mipmask=0;16>Fr;++Fr)sr.images[Fr]=null;return sr}function Jt(sr){for(var Fr=sr.images,Bt=0;Bt<Fr.length;++Bt)Fr[Bt]&&Le(Fr[Bt]),Fr[Bt]=null;Pn.push(sr)}function Vt(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function pr(sr,Fr){"min"in Fr&&(sr.minFilter=Ur[Fr.min],0<=Oe.indexOf(sr.minFilter)&&!("faces"in Fr)&&(sr.genMipmaps=!0)),"mag"in Fr&&(sr.magFilter=Pr[Fr.mag]);var Bt=sr.wrapS,lr=sr.wrapT;if("wrap"in Fr){var mr=Fr.wrap;typeof mr=="string"?Bt=lr=vr[mr]:Array.isArray(mr)&&(Bt=vr[mr[0]],lr=vr[mr[1]])}else"wrapS"in Fr&&(Bt=vr[Fr.wrapS]),"wrapT"in Fr&&(lr=vr[Fr.wrapT]);if(sr.wrapS=Bt,sr.wrapT=lr,"anisotropic"in Fr&&(sr.anisotropic=Fr.anisotropic),"mipmap"in Fr){switch(Bt=!1,typeof Fr.mipmap){case"string":sr.mipmapHint=hr[Fr.mipmap],Bt=sr.genMipmaps=!0;break;case"boolean":Bt=sr.genMipmaps=Fr.mipmap;break;case"object":sr.genMipmaps=!1,Bt=!0}!Bt||"min"in Fr||(sr.minFilter=9984)}}function Ir(sr,Fr){Te.texParameteri(Fr,10241,sr.minFilter),Te.texParameteri(Fr,10240,sr.magFilter),Te.texParameteri(Fr,10242,sr.wrapS),Te.texParameteri(Fr,10243,sr.wrapT),Pe.ext_texture_filter_anisotropic&&Te.texParameteri(Fr,34046,sr.anisotropic),sr.genMipmaps&&(Te.hint(33170,sr.mipmapHint),Te.generateMipmap(Fr))}function fr(sr){bt.call(this),this.mipmask=0,this.internalformat=6408,this.id=Nn++,this.refCount=1,this.target=sr,this.texture=Te.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Vt,_t.profile&&(this.stats={size:0})}function $t(sr){Te.activeTexture(33984),Te.bindTexture(sr.target,sr.texture)}function er(){var sr=ca[0];sr?Te.bindTexture(sr.target,sr.texture):Te.bindTexture(3553,null)}function ar(sr){var Fr=sr.texture,Bt=sr.unit,lr=sr.target;0<=Bt&&(Te.activeTexture(33984+Bt),Te.bindTexture(lr,null),ca[Bt]=null),Te.deleteTexture(Fr),sr.texture=null,sr.params=null,
1209sr.pixels=null,sr.refCount=0,delete hn[sr.id],at.textureCount--}var hr={"don't care":4352,"dont care":4352,nice:4354,fast:4353},vr={repeat:10497,clamp:33071,mirror:33648},Pr={nearest:9728,linear:9729},Ur=j({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},Pr),qr={none:0,browser:37444},rn={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},An={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},mn={};Pe.ext_srgb&&(An.srgb=35904,An.srgba=35906),Pe.oes_texture_float&&(rn.float32=rn.float=5126),Pe.oes_texture_half_float&&(rn.float16=rn["half float"]=36193),Pe.webgl_depth_texture&&(j(An,{depth:6402,"depth stencil":34041}),j(rn,{uint16:5123,uint32:5125,"depth stencil":34042})),Pe.webgl_compressed_texture_s3tc&&j(mn,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),Pe.webgl_compressed_texture_atc&&j(mn,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}
1209),Pe.webgl_compressed_texture_pvrtc&&j(mn,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),Pe.webgl_compressed_texture_etc1&&(mn["rgb etc1"]=36196);var Mn=Array.prototype.slice.call(Te.getParameter(34467));Object.keys(mn).forEach(function(sr){var Fr=mn[sr];0<=Mn.indexOf(Fr)&&(An[sr]=Fr)});var Xr=Object.keys(An);Ve.textureFormats=Xr;var Er=[];Object.keys(An).forEach(function(sr){Er[An[sr]]=sr});var on=[];Object.keys(rn).forEach(function(sr){on[rn[sr]]=sr});var Un=[];Object.keys(Pr).forEach(function(sr){Un[Pr[sr]]=sr});var Tr=[];Object.keys(Ur).forEach(function(sr){Tr[Ur[sr]]=sr});var en=[];Object.keys(vr).forEach(function(sr){en[vr[sr]]=sr});var $r=Xr.reduce(function(sr,Fr){var Bt=An[Fr];return Bt===6409||Bt===6406||Bt===6409||Bt===6410||Bt===6402||Bt===34041||Pe.ext_srgb&&(Bt===35904||Bt===35906)?sr[Bt]=Bt:Bt===32855||0<=Fr.indexOf("rgba")?sr[Bt]=6408:sr[Bt]=6407,sr},{}),Rr=[],Pn=[],Nn=0,hn={},Fn=Ve.maxTextureUnits,ca=Array(Fn).map(function(){return null});return j(fr.prototype,{bind:function(){this.bindCount+=1;var sr=this.unit;if(0>sr){for(var Fr=0;Fr<Fn;++Fr){var Bt=ca[Fr];if(Bt){if(0<Bt.bindCount)continue;Bt.unit=-1}ca[Fr]=this,sr=Fr;break}_t.profile&&at.maxTextureUnits<sr+1&&(at.maxTextureUnits=sr+1),this.unit=sr,Te.activeTexture(33984+sr),Te.bindTexture(this.target,this.texture)}return sr},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&ar(this)}}),_t.profile&&(at.getTotalTextureSize=function(){var sr=0;return Object.keys(hn).forEach(function(Fr){sr+=hn[Fr].stats.size}),sr}),{create2D:function(sr,Fr){function Bt(mr,Vr){var Br=lr.texInfo;Vt.call(Br);var Dr=Zt();return typeof mr=="number"?it(Dr,0|mr,typeof Vr=="number"?0|Vr:0|mr):mr?(pr(Br,mr),At(Dr,mr)):it(Dr,1,1),Br.genMipmaps&&(Dr.mipmask=(Dr.width<<1)-1),lr.mipmask=Dr.mipmask,jt(lr,Dr),lr.internalformat=Dr.internalformat,Bt.width=Dr.width,Bt.height=Dr.height,$t(lr),It(Dr,3553),Ir(Br,3553),er(),Jt(Dr),_t.profile&&(lr.stats.size=k(lr.internalformat,lr.type,Dr.width,Dr.height,Br.genMipmaps,!1)),Bt.format=Er[lr.internalformat],Bt.type=on[lr.type],Bt.mag=Un[Br.magFilter],Bt.min=Tr[Br.minFilter],Bt.wrapS=en[Br.wrapS],Bt.wrapT=en[Br.wrapT],Bt}var lr=new fr(3553);return hn[lr.id]=lr,at.textureCount++,Bt(sr,Fr),Bt.subimage=function(mr,Vr,Br,Dr){Vr|=0,Br|=0,Dr|=0;var Or=Pt();return jt(Or,lr),Or.width=0,Or.height=0,Ot(Or,mr),Or.width=Or.width||(lr.width>>Dr)-Vr,Or.height=Or.height||(lr.height>>Dr)-Br,$t(lr),Mt(Or,3553,Vr,Br,Dr),er(),Le(Or),Bt},Bt.resize=function(mr,Vr){var Br=0|mr,Dr=0|Vr||Br;if(Br===lr.width&&Dr===lr.height)return Bt;Bt.width=lr.width=Br,Bt.height=lr.height=Dr,$t(lr);for(var Or=0;lr.mipmask>>Or;++Or){var xr=Br>>Or,br=Dr>>Or;if(!xr||!br)break;Te.texImage2D(3553,Or,lr.format,xr,br,0,lr.format,lr.type,null)}return er(),_t.profile&&(lr.stats.size=k(lr.internalformat,lr.type,Br,Dr,!1,!1)),Bt},Bt._reglType="texture2d",Bt._texture=lr,_t.profile&&(Bt.stats=lr.stats),Bt.destroy=function(){lr.decRef()},Bt},createCube:function(sr,Fr,Bt,lr,mr,Vr){function Br(xr,br,_r,Cr,Wr,Gr){var tn,nn=Dr.texInfo;for(Vt.call(nn),tn=0;6>tn;++tn)Or[tn]=Zt();if(typeof xr!="number"&&xr){if(typeof xr=="object")if(br)At(Or[0],xr),At(Or[1],br),At(Or[2],_r),At(Or[3],Cr),At(Or[4],Wr),At(Or[5],Gr);else if(pr(nn,xr),Nt(Dr,xr),"faces"in xr)for(xr=xr.faces,tn=0;6>tn;++tn)jt(Or[tn],Dr),At(Or[tn],xr[tn]);else for(tn=0;6>tn;++tn)At(Or[tn],xr)}else for(xr=0|xr||1,tn=0;6>tn;++tn)it(Or[tn],xr,xr);for(jt(Dr,Or[0]),Dr.mipmask=nn.genMipmaps?(Or[0].width<<1)-1:Or[0].mipmask,Dr.internalformat=Or[0].internalformat,Br.width=Or[0].width,Br.height=Or[0].height,$t(Dr),tn=0;6>tn;++tn)It(Or[tn],34069+tn);for(Ir(nn,34067),er(),_t.profile&&(Dr.stats.size=k(Dr.internalformat,Dr.type,Br.width,Br.height,nn.genMipmaps,!0)),Br.format=Er[Dr.internalformat],Br.type=on[Dr.type],Br.mag=Un[nn.magFilter],Br.min=Tr[nn.minFilter],Br.wrapS=en[nn.wrapS],Br.wrapT=en[nn.wrapT],tn=0;6>tn;++tn)Jt(Or[tn]);return Br}var Dr=new fr(34067);hn[Dr.id]=Dr,at.cubeCount++;var Or=Array(6);return Br(sr,Fr,Bt,lr,mr,Vr),Br.subimage=function(xr,br,_r,Cr,Wr){_r|=0,Cr|=0,Wr|=0;var Gr=Pt();return jt(Gr,Dr),Gr.width=0,Gr.height=0,Ot(Gr,br),Gr.width=Gr.width||(Dr.width>>Wr)-_r,Gr.height=Gr.height||(Dr.height>>Wr)-Cr,$t(Dr),Mt(Gr,34069+xr,_r,Cr,Wr),er(),Le(Gr),Br},Br.resize=function(xr){if((xr|=0)!==Dr.width){Br.width=Dr.width=xr,Br.height=Dr.height=xr,$t(Dr);for(var br=0;6>br;++br)for(var _r=0;Dr.mipmask>>_r;++_r)Te.texImage2D(34069+br,_r,Dr.format,xr>>_r,xr>>_r,0,Dr.format,Dr.type,null);return er(),_t.profile&&(Dr.stats.size=k(Dr.internalformat,Dr.type,Br.width,Br.height,!1,!0)),Br}},Br._reglType="textureCube",Br._texture=Dr,_t.profile&&(Br.stats=Dr.stats),Br.de
1209stroy=function(){Dr.decRef()},Br},clear:function(){for(var sr=0;sr<Fn;++sr)Te.activeTexture(33984+sr),Te.bindTexture(3553,null),ca[sr]=null;ce(hn).forEach(ar),at.cubeCount=0,at.textureCount=0},getTexture:function(sr){return null},restore:function(){for(var sr=0;sr<Fn;++sr){var Fr=ca[sr];Fr&&(Fr.bindCount=0,Fr.unit=-1,ca[sr]=null)}ce(hn).forEach(function(Bt){Bt.texture=Te.createTexture(),Te.bindTexture(Bt.target,Bt.texture);for(var lr=0;32>lr;++lr)if((Bt.mipmask&1<<lr)!=0)if(Bt.target===3553)Te.texImage2D(3553,lr,Bt.internalformat,Bt.width>>lr,Bt.height>>lr,0,Bt.internalformat,Bt.type,null);else for(var mr=0;6>mr;++mr)Te.texImage2D(34069+mr,lr,Bt.internalformat,Bt.width>>lr,Bt.height>>lr,0,Bt.internalformat,Bt.type,null);Ir(Bt.texInfo,Bt.target)})},refresh:function(){for(var sr=0;sr<Fn;++sr){var Fr=ca[sr];Fr&&(Fr.bindCount=0,Fr.unit=-1,ca[sr]=null),Te.activeTexture(33984+sr),Te.bindTexture(3553,null),Te.bindTexture(34067,null)}}}}function A(Te,Pe,Ve,tt,ot,at){function _t(fr,$t,er){this.target=fr,this.texture=$t,this.renderbuffer=er;var ar=fr=0;$t?(fr=$t.width,ar=$t.height):er&&(fr=er.width,ar=er.height),this.width=fr,this.height=ar}function bt(fr){fr&&(fr.texture&&fr.texture._texture.decRef(),fr.renderbuffer&&fr.renderbuffer._renderbuffer.decRef())}function jt(fr,$t,er){fr&&(fr.texture?fr.texture._texture.refCount+=1:fr.renderbuffer._renderbuffer.refCount+=1)}function Nt(fr,$t){$t&&($t.texture?Te.framebufferTexture2D(36160,fr,$t.target,$t.texture._texture.texture,0):Te.framebufferRenderbuffer(36160,fr,36161,$t.renderbuffer._renderbuffer.renderbuffer))}function $e(fr){var $t=3553,er=null,ar=null,hr=fr;return typeof fr=="object"&&(hr=fr.data,"target"in fr&&($t=0|fr.target)),(fr=hr._reglType)==="texture2d"||fr==="textureCube"?er=hr:fr==="renderbuffer"&&(ar=hr,$t=36161),new _t($t,er,ar)}function yt(fr,$t,er,ar,hr){return er?((fr=tt.create2D({width:fr,height:$t,format:ar,type:hr}))._texture.refCount=0,new _t(3553,fr,null)):((fr=ot.create({width:fr,height:$t,format:ar}))._renderbuffer.refCount=0,new _t(36161,null,fr))}function Ot(fr){return fr&&(fr.texture||fr.renderbuffer)}function Mt(fr,$t,er){fr&&(fr.texture?fr.texture.resize($t,er):fr.renderbuffer&&fr.renderbuffer.resize($t,er),fr.width=$t,fr.height=er)}function Pt(){this.id=pr++,Ir[this.id]=this,this.framebuffer=Te.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function Le(fr){fr.colorAttachments.forEach(bt),bt(fr.depthAttachment),bt(fr.stencilAttachment),bt(fr.depthStencilAttachment)}function Xe(fr){Te.deleteFramebuffer(fr.framebuffer),fr.framebuffer=null,at.framebufferCount--,delete Ir[fr.id]}function it(fr){var $t;Te.bindFramebuffer(36160,fr.framebuffer);var er=fr.colorAttachments;for($t=0;$t<er.length;++$t)Nt(36064+$t,er[$t]);for($t=er.length;$t<Ve.maxColorAttachments;++$t)Te.framebufferTexture2D(36160,36064+$t,3553,null,0);Te.framebufferTexture2D(36160,33306,3553,null,0),Te.framebufferTexture2D(36160,36096,3553,null,0),Te.framebufferTexture2D(36160,36128,3553,null,0),Nt(36096,fr.depthAttachment),Nt(36128,fr.stencilAttachment),Nt(33306,fr.depthStencilAttachment),Te.checkFramebufferStatus(36160),Te.isContextLost(),Te.bindFramebuffer(36160,It.next?It.next.framebuffer:null),It.cur=It.next,Te.getError()}function At(fr,$t){function er(hr,vr){var Pr,Ur=0,qr=0,rn=!0,An=!0;Pr=null;var mn=!0,Mn="rgba",Xr="uint8",Er=1,on=null,Un=null,Tr=null,en=!1;typeof hr=="number"?(Ur=0|hr,qr=0|vr||Ur):hr?("shape"in hr?(Ur=(qr=hr.shape)[0],qr=qr[1]):("radius"in hr&&(Ur=qr=hr.radius),"width"in hr&&(Ur=hr.width),"height"in hr&&(qr=hr.height)),("color"in hr||"colors"in hr)&&(Pr=hr.color||hr.colors,Array.isArray(Pr)),Pr||("colorCount"in hr&&(Er=0|hr.colorCount),"colorTexture"in hr&&(mn=!!hr.colorTexture,Mn="rgba4"),"colorType"in hr&&(Xr=hr.colorType,!mn)&&(Xr==="half float"||Xr==="float16"?Mn="rgba16f":Xr!=="float"&&Xr!=="float32"||(Mn="rgba32f")),"colorFormat"in hr&&(Mn=hr.colorFormat,0<=Zt.indexOf(Mn)?mn=!0:0<=Jt.indexOf(Mn)&&(mn=!1))),("depthTexture"in hr||"depthStencilTexture"in hr)&&(en=!(!hr.depthTexture&&!hr.depthStencilTexture)),"depth"in hr&&(typeof hr.depth=="boolean"?rn=hr.depth:(on=hr.depth,An=!1)),"stencil"in hr&&(typeof hr.stencil=="boolean"?An=hr.stencil:(Un=hr.stencil,rn=!1)),"depthStencil"in hr&&(typeof hr.depthStencil=="boolean"?rn=An=hr.depthStencil:(Tr=hr.depthStencil,An=rn=!1))):Ur=qr=1;var $r=null,Rr=null,Pn=null,Nn=null;if(Array.isArray(Pr))$r=Pr.map($e);else if(Pr)$r=[$e(Pr)];else for($r=Array(Er),Pr=0;Pr<Er;++Pr)$r[Pr]=yt(Ur,qr,mn,Mn,Xr);for(Ur=Ur||$r[0].width,qr=qr||$r[0].height,on?Rr=$e(on):rn&&!An&&(Rr=yt(Ur,qr,en,"depth","uint32")),Un?Pn=$e(Un):An&&!rn&&(Pn=yt(Ur,qr,!1,"stencil","uint8")),Tr?Nn=$e(Tr):!on&&!Un&&An&&rn&&(Nn=yt(Ur,qr,en,"depth stencil","depth stencil")),rn=null,Pr=0;Pr<$r.length;++Pr)jt($r[Pr]),$r[Pr]&&$r[Pr].texture&&(An=Qe[$r[Pr].texture._texture.format]*Et[$r[Pr].texture._texture.type],rn===null&&(rn=An));return jt(Rr),jt(Pn),jt(Nn),Le(ar),ar.width=Ur,ar.height=qr,ar.colorAttachments=$r,ar.depthAttachment=Rr,ar.stencilAttachment=Pn,ar.depthStencilAttachment=Nn,er.color=$r.map(Ot),er.depth=Ot(Rr),er.stencil=Ot(Pn),er.depthStencil=Ot(Nn),er.width=ar.width,er.height=ar.height,it(ar),er}var ar=new Pt;return at.framebufferCount++,er(fr,$t),j(er,{resize:function(hr,vr){var Pr=Math.max(0|hr,1),Ur=Math.max(0|vr||Pr,1);if(Pr===ar.width&&Ur===ar.height)return er;for(var qr=ar.colorAttachments,rn=0;rn<qr.length;++rn)Mt(qr[rn],Pr,Ur);return Mt(ar.depthAttachment,Pr,Ur),Mt(ar.stencilAttachment,Pr,Ur),Mt(ar.depthStencilAttachment,Pr,Ur),ar.width=er.width=Pr,ar.height=er.height=Ur,it(ar),er},_reglType:"framebuffer",_framebuffer:ar,destroy:function(){Xe(ar),Le(ar)},use:function(hr){It.setFBO({framebuffer:er},hr)}})}var It={cur:null,next:null,dirty:!1,setFBO:null},Zt=["rgba"],Jt=["rgba4","rgb565","rgb5 a1"];Pe.ext_srgb&&Jt.push("srgba"),Pe.ext_color_buffer_half_float&&Jt.push("rgba16f","rgb16f"),Pe.webgl_c
1209olor_buffer_float&&Jt.push("rgba32f");var Vt=["uint8"];Pe.oes_texture_half_float&&Vt.push("half float","float16"),Pe.oes_texture_float&&Vt.push("float","float32");var pr=0,Ir={};return j(It,{getFramebuffer:function(fr){return typeof fr=="function"&&fr._reglType==="framebuffer"&&(fr=fr._framebuffer)instanceof Pt?fr:null},create:At,createCube:function(fr){function $t(ar){var hr,vr={color:null},Pr=0,Ur=null;hr="rgba";var qr="uint8",rn=1;if(typeof ar=="number"?Pr=0|ar:ar?("shape"in ar?Pr=ar.shape[0]:("radius"in ar&&(Pr=0|ar.radius),"width"in ar?Pr=0|ar.width:"height"in ar&&(Pr=0|ar.height)),("color"in ar||"colors"in ar)&&(Ur=ar.color||ar.colors,Array.isArray(Ur)),Ur||("colorCount"in ar&&(rn=0|ar.colorCount),"colorType"in ar&&(qr=ar.colorType),"colorFormat"in ar&&(hr=ar.colorFormat)),"depth"in ar&&(vr.depth=ar.depth),"stencil"in ar&&(vr.stencil=ar.stencil),"depthStencil"in ar&&(vr.depthStencil=ar.depthStencil)):Pr=1,Ur)if(Array.isArray(Ur))for(ar=[],hr=0;hr<Ur.length;++hr)ar[hr]=Ur[hr];else ar=[Ur];else for(ar=Array(rn),Ur={radius:Pr,format:hr,type:qr},hr=0;hr<rn;++hr)ar[hr]=tt.createCube(Ur);for(vr.color=Array(ar.length),hr=0;hr<ar.length;++hr)rn=ar[hr],Pr=Pr||rn.width,vr.color[hr]={target:34069,data:ar[hr]};for(hr=0;6>hr;++hr){for(rn=0;rn<ar.length;++rn)vr.color[rn].target=34069+hr;0<hr&&(vr.depth=er[0].depth,vr.stencil=er[0].stencil,vr.depthStencil=er[0].depthStencil),er[hr]?er[hr](vr):er[hr]=At(vr)}return j($t,{width:Pr,height:Pr,color:ar})}var er=Array(6);return $t(fr),j($t,{faces:er,resize:function(ar){var hr=0|ar;if(hr===$t.width)return $t;var vr=$t.color;for(ar=0;ar<vr.length;++ar)vr[ar].resize(hr);for(ar=0;6>ar;++ar)er[ar].resize(hr);return $t.width=$t.height=hr,$t},_reglType:"framebufferCube",destroy:function(){er.forEach(function(ar){ar.destroy()})}})},clear:function(){ce(Ir).forEach(Xe)},restore:function(){It.cur=null,It.next=null,It.dirty=!0,ce(Ir).forEach(function(fr){fr.framebuffer=Te.createFramebuffer(),it(fr)})}})}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(Te,Pe,Ve,tt,ot,at,_t){function bt(){this.id=++$e,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var Mt=Pe.oes_vertex_array_object;this.vao=Mt?Mt.createVertexArrayOES():null,yt[this.id]=this,this.buffers=[]}var jt=Ve.maxAttributes,Nt=Array(jt);for(Ve=0;Ve<jt;++Ve)Nt[Ve]=new I;var $e=0,yt={},Ot={Record:I,scope:{},state:Nt,currentVAO:null,targetVAO:null,restore:Pe.oes_vertex_array_object?function(){Pe.oes_vertex_array_object&&ce(yt).forEach(function(Mt){Mt.refresh()})}:function(){},createVAO:function(Mt){function Pt(Xe){var it;Array.isArray(Xe)?(it=Xe,Le.elements&&Le.ownsElements&&Le.elements.destroy(),Le.elements=null,Le.ownsElements=!1,Le.offset=0,Le.count=0,Le.instances=-1,Le.primitive=4):(Xe.elements?(it=Xe.elements,Le.ownsElements?(typeof it=="function"&&it._reglType==="elements"?Le.elements.destroy():Le.elements(it),Le.ownsElements=!1):at.getElements(Xe.elements)?(Le.elements=Xe.elements,Le.ownsElements=!1):(Le.elements=at.create(Xe.elements),Le.ownsElements=!0)):(Le.elements=null,Le.ownsElements=!1),it=Xe.attributes,Le.offset=0,Le.count=-1,Le.instances=-1,Le.primitive=4,Le.elements&&(Le.count=Le.elements._elements.vertCount,Le.primitive=Le.elements._elements.primType),"offset"in Xe&&(Le.offset=0|Xe.offset),"count"in Xe&&(Le.count=0|Xe.count),"instances"in Xe&&(Le.instances=0|Xe.instances),"primitive"in Xe&&(Le.primitive=ke[Xe.primitive])),Xe={};var At=Le.attributes;At.length=it.length;for(var It=0;It<it.length;++It){var Zt,Jt=it[It],Vt=At[It]=new I,pr=Jt.data||Jt;Array.isArray(pr)||pe(pr)||r(pr)?(Le.buffers[It]&&(Zt=Le.buffers[It],pe(pr)&&Zt._buffer.byteLength>=pr.byteLength?Zt.subdata(pr):(Zt.destroy(),Le.buffers[It]=null)),Le.buffers[It]||(Zt=Le.buffers[It]=ot.create(Jt,34962,!1,!0)),Vt.buffer=ot.getBuffer(Zt),Vt.size=0|Vt.buffer.dimension,Vt.normalized=!1,Vt.type=Vt.buffer.dtype,Vt.offset=0,Vt.stride=0,Vt.divisor=0,Vt.state=1,Xe[It]=1):ot.getBuffer(Jt)?(Vt.buffer=ot.getBuffer(Jt),Vt.size=0|Vt.buffer.dimension,Vt.normalized=!1,Vt.type=Vt.buffer.dtype,Vt.offset=0,Vt.stride=0,Vt.divisor=0,Vt.state=1):ot.getBuffer(Jt.buffer)?(Vt.buffer=ot.getBuffer(Jt.buffer),Vt.size=0|(+Jt.size||Vt.buffer.dimension),Vt.normalized=!!Jt.normalized||!1,Vt.type="type"in Jt?_e[Jt.type]:Vt.buffer.dtype,Vt.offset=0|(Jt.offset||0),Vt.stride=0|(Jt.stride||0),Vt.divisor=0|(Jt.divisor||0),Vt.state=1):"x"in Jt&&(Vt.x=+Jt.x||0,Vt.y=+Jt.y||0,Vt.z=+Jt.z||0,Vt.w=+Jt.w||0,Vt.state=2)}for(Zt=0;Zt<Le.buffers.length;++Zt)!Xe[Zt]&&Le.buffers[Zt]&&(Le.buffers[Zt].destroy(),Le.buffers[Zt]=null);return Le.refresh(),Pt}var Le=new bt;return tt.vaoCount+=1,Pt.destroy=function(){for(var Xe=0;Xe<Le.buffers.length;++Xe)Le.buffers[Xe]&&Le.buffers[Xe].destroy();Le.buffers.length=0,Le.ownsElements&&(Le.elements.destroy(),Le.elements=null,Le.ownsElements=!1),Le.destroy()},Pt._vao=Le,Pt._reglType="vao",Pt(Mt)},getVAO:function(Mt){return typeof Mt=="function"&&Mt._vao?Mt._vao:null},destroyBuffer:function(Mt){for(var Pt=0;Pt<Nt.length;++Pt){var Le=Nt[Pt];Le.buffer===Mt&&(Te.disableVertexAttribArray(Pt),Le.buffer=null)}},setVAO:Pe.oes_vertex_array_object?function(Mt){if(Mt!==Ot.currentVAO){var Pt=Pe.oes_vertex_array_object;Mt?Pt.bindVertexArrayOES(Mt.vao):Pt.bindVertexArrayOES(null),Ot.currentVAO=Mt}}:function(Mt){if(Mt!==Ot.currentVAO){if(Mt)Mt.bindAttrs();else{for(var Pt=Pe.angle_instanced_arrays,Le=0;Le<Nt.length;++Le){var Xe=Nt[Le];Xe.buffer?(Te.enableVertexAttribArray(Le),Xe.buffer.bind(),Te.vertexAttribPointer(Le,Xe.size,Xe.type,Xe.normalized,Xe.stride,Xe.offfset),Pt&&Xe.divisor&&Pt.vertexAttribDivisorANGLE(Le,Xe.divisor)):(Te.disableVertexAttribArray(Le),Te.vertexAttrib4f(Le,Xe.x,Xe.y,Xe.z,Xe.w))}_t.elements?Te.bindBuffer(34963,_t.elements.buffer.buffer):Te.bindBuffer(34963,null)}Ot.currentVAO=Mt}},clear:Pe.oes_vertex_array_object?function(){ce(yt).forEach(function(Mt){Mt.destroy()})}:function(){}};return bt.prototype.bindAttrs=function(){for(var Mt=Pe.angle_instanced_arrays,Pt=this.attributes,Le=0;Le<Pt.length;++Le){var Xe=Pt[Le];Xe.buffer?(Te.enableVertexAttribArray(Le),Te.bindBuffer(34962,Xe.buffer.buffer),Te.vertexAttribPointer(Le,Xe.size,Xe.type,Xe.normalized,Xe.stride,Xe.offset),Mt&&Xe.divisor&&Mt.vertexAttribDivisorANGLE(Le,Xe.divisor)):(Te.disableVertexAttribArray(Le),Te.vertexAttrib4f(Le,Xe.x,Xe.y,Xe.z,Xe.w))}for(Mt=Pt.length;Mt<jt;++Mt)Te.disableVertexAttribArray(Mt);(Mt=at.getElements(this.elements))?Te.bindBuffer(34963,Mt.buffer.buffer):Te.bindBuffer(34963,null)},bt.prototype.refresh=function(){var Mt=Pe.oes_vertex_array_object;Mt&&(Mt.bindVertexArrayOES(this.vao),this.bindAttrs(),Ot.currentVAO=null,Mt.bindVertexArrayOES(null))},bt.prototype.destroy=function(){if(this.vao){var Mt=Pe.oes_vertex_array_object;this===Ot.currentVAO&&(Ot.currentVAO=null,Mt.bindVertexArrayOES(null)),Mt.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),yt[this.id]&&(delete yt[this.id],--tt.vaoCount)},Ot}function S(Te,Pe,Ve,tt){function ot(Pt,Le,Xe,it){this.name=Pt,this.id=Le,this.location=Xe,this.info=it}function at(Pt,Le){for(var Xe=0;Xe<Pt.length;++Xe)if(Pt[Xe].id===Le.id)return void(Pt[Xe].location=Le.location);Pt.push(Le)}function _t(Pt,Le,Xe){if(!(At=(Xe=Pt===35632?Nt:$e)[Le])){var it=Pe.str(Le),At=Te.createShader(Pt);Te.shaderSource(At,it),Te.compileShader(At),Xe[Le]=At}return At}function bt(Pt,Le){this.id=Mt++,this.fragId=Pt,this.vertId=Le,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,tt.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function jt(Pt,Le,Xe){var it;it=_t(35632,Pt.fragId);var At=_t(35633,Pt.vertId);if(Le=Pt.program=Te.createProgram(),Te.attachShader(Le,it),Te.attachShader(Le,At),Xe)for(it=0;it<Xe.length;++it)At=Xe[it],Te.bindAttribLocation(Le,At[0],At[1]);Te.linkProgram(Le),At=Te.getProgramParameter(Le,35718),tt.profile&&(Pt.stats.uniformsCount=At);var It=Pt.uniforms;for(it=0;it<At;
1209++it)if(Xe=Te.getActiveUniform(Le,it))if(1<Xe.size)for(var Zt=0;Zt<Xe.size;++Zt){var Jt=Xe.name.replace("[0]","["+Zt+"]");at(It,new ot(Jt,Pe.id(Jt),Te.getUniformLocation(Le,Jt),Xe))}else at(It,new ot(Xe.name,Pe.id(Xe.name),Te.getUniformLocation(Le,Xe.name),Xe));for(At=Te.getProgramParameter(Le,35721),tt.profile&&(Pt.stats.attributesCount=At),Pt=Pt.attributes,it=0;it<At;++it)(Xe=Te.getActiveAttrib(Le,it))&&at(Pt,new ot(Xe.name,Pe.id(Xe.name),Te.getAttribLocation(Le,Xe.name),Xe))}var Nt={},$e={},yt={},Ot=[],Mt=0;return tt.profile&&(Ve.getMaxUniformsCount=function(){var Pt=0;return Ot.forEach(function(Le){Le.stats.uniformsCount>Pt&&(Pt=Le.stats.uniformsCount)}),Pt},Ve.getMaxAttributesCount=function(){var Pt=0;return Ot.forEach(function(Le){Le.stats.attributesCount>Pt&&(Pt=Le.stats.attributesCount)}),Pt}),{clear:function(){var Pt=Te.deleteShader.bind(Te);ce(Nt).forEach(Pt),Nt={},ce($e).forEach(Pt),$e={},Ot.forEach(function(Le){Te.deleteProgram(Le.program)}),Ot.length=0,yt={},Ve.shaderCount=0},program:function(Pt,Le,Xe,it){var At=yt[Le];At||(At=yt[Le]={});var It=At[Pt];if(It&&(It.refCount++,!it))return It;var Zt=new bt(Le,Pt);return Ve.shaderCount++,jt(Zt,Xe,it),It||(At[Pt]=Zt),Ot.push(Zt),j(Zt,{destroy:function(){if(Zt.refCount--,0>=Zt.refCount){Te.deleteProgram(Zt.program);var Jt=Ot.indexOf(Zt);Ot.splice(Jt,1),Ve.shaderCount--}0>=At[Zt.vertId].refCount&&(Te.deleteShader($e[Zt.vertId]),delete $e[Zt.vertId],delete yt[Zt.fragId][Zt.vertId]),Object.keys(yt[Zt.fragId]).length||(Te.deleteShader(Nt[Zt.fragId]),delete Nt[Zt.fragId],delete yt[Zt.fragId])}})},restore:function(){Nt={},$e={};for(var Pt=0;Pt<Ot.length;++Pt)jt(Ot[Pt],null,Ot[Pt].attributes.map(function(Le){return[Le.location,Le.name]}))},shader:_t,frag:-1,vert:-1}}function E(Te,Pe,Ve,tt,ot,at,_t){function bt(jt){var Nt;Nt=Pe.next===null?5121:Pe.next.colorAttachments[0].texture._texture.type;var $e=0,yt=0,Ot=tt.framebufferWidth,Mt=tt.framebufferHeight,Pt=null;return pe(jt)?Pt=jt:jt&&($e=0|jt.x,yt=0|jt.y,Ot=0|(jt.width||tt.framebufferWidth-$e),Mt=0|(jt.height||tt.framebufferHeight-yt),Pt=jt.data||null),Ve(),jt=Ot*Mt*4,Pt||(Nt===5121?Pt=new Uint8Array(jt):Nt===5126&&(Pt=Pt||new Float32Array(jt))),Te.pixelStorei(3333,4),Te.readPixels($e,yt,Ot,Mt,6408,Nt,Pt),Pt}return function(jt){return jt&&"framebuffer"in jt?function(Nt){var $e;return Pe.setFBO({framebuffer:Nt.framebuffer},function(){$e=bt(Nt)}),$e}(jt):bt(jt)}}function D(Te,Pe){return Te>>>Pe|Te<<32-Pe}function F(Te,Pe){var Ve=(65535&Te)+(65535&Pe);return(Te>>16)+(Pe>>16)+(Ve>>16)<<16|65535&Ve}function H(Te){return Array.prototype.slice.call(Te)}function V(Te){return H(Te).join("")}function Z(Te){function Pe(){var $e=[],yt=[];return j(function(){$e.push.apply($e,H(arguments))},{def:function(){var Ot="v"+ot++;return yt.push(Ot),0<arguments.length&&($e.push(Ot,"="),$e.push.apply($e,H(arguments)),$e.push(";")),Ot},toString:function(){return V([0<yt.length?"var "+yt.join(",")+";":"",V($e)])}})}function Ve(){function $e(Le,Xe){Ot(Le,Xe,"=",yt.def(Le,Xe),";")}var yt=Pe(),Ot=Pe(),Mt=yt.toString,Pt=Ot.toString;return j(function(){yt.apply(yt,H(arguments))},{def:yt.def,entry:yt,exit:Ot,save:$e,set:function(Le,Xe,it){$e(Le,Xe),yt(Le,Xe,"=",it,";")},toString:function(){return Mt()+Pt()}})}var tt=Te&&Te.cache,ot=0,at=[],_t=[],bt=[],jt=Pe(),Nt={};return{global:jt,link:function($e,yt){var Ot=yt&&yt.stable;if(!Ot){for(var Mt=0;Mt<_t.length;++Mt)if(_t[Mt]===$e&&!bt[Mt])return at[Mt]}return Mt="g"+ot++,at.push(Mt),_t.push($e),bt.push(Ot),Mt},block:Pe,proc:function($e,yt){function Ot(){var Xe="a"+Mt.length;return Mt.push(Xe),Xe}var Mt=[];yt=yt||0;for(var Pt=0;Pt<yt;++Pt)Ot();var Le=(Pt=Ve()).toString;return Nt[$e]=j(Pt,{arg:Ot,toString:function(){return V(["function(",Mt.join(),"){",Le(),"}"])}})},scope:Ve,cond:function(){var $e=V(arguments),yt=Ve(),Ot=Ve(),Mt=yt.toString,Pt=Ot.toString;return j(yt,{then:function(){return yt.apply(yt,H(arguments)),this},else:function(){return Ot.apply(Ot,H(arguments)),this},toString:function(){var Le=Pt();return Le&&(Le="else{"+Le+"}"),V(["if(",$e,"){",Mt(),"}",Le])}})},compile:function(){var $e=['"use strict";',jt,"return {"];Object.keys(Nt).forEach(function(Mt){$e.push('"',Mt,'":',Nt[Mt].toString(),",")}),$e.push("}");var yt,Ot=V($e).replace(/;/g,`; 1210`).replace(/}/g,`} 1211`).replace(/{/g,`{ 1212`);return tt&&(yt=function(Mt){for(var Pt,Le="",Xe=0;Xe<Mt.length;Xe++)Pt=Mt.charCodeAt(Xe),Le+="0123456789abcdef".charAt(Pt>>>4&15)+"0123456789abcdef".charAt(15&Pt);return Le}(function(Mt){for(var Pt=Array(Mt.length>>2),Le=0;Le<Pt.length;Le++)Pt[Le]=0;for(Le=0;Le<8*Mt.length;Le+=8)Pt[Le>>5]|=(255&Mt.charCodeAt(Le/8))<<24-Le%32;var Xe,it,At,It,Zt,Jt,Vt,pr,Ir,fr,$t,er=8*Mt.length;for(Mt=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Le=Array(64),Pt[er>>5]|=128<<24-er%32,Pt[15+(er+64>>9<<4)]=er,pr=0;pr<Pt.length;pr+=16){for(er=Mt[0],Xe=Mt[1],it=Mt[2],At=Mt[3],It=Mt[4],Zt=Mt[5],Jt=Mt[6],Vt=Mt[7],Ir=0;64>Ir;Ir++){var ar;16>Ir?Le[Ir]=Pt[Ir+pr]:(fr=Ir,$t=F($t=D($t=Le[Ir-2],17)^D($t,19)^$t>>>10,Le[Ir-7]),ar=D(ar=Le[Ir-15],7)^D(ar,18)^ar>>>
12123,Le[fr]=F(F($t,ar),Le[Ir-16])),fr=F(F(F(F(Vt,fr=D(fr=It,6)^D(fr,11)^D(fr,25)),It&Zt^~It&Jt),Gt[Ir]),Le[Ir]),$t=F(Vt=D(Vt=er,2)^D(Vt,13)^D(Vt,22),er&Xe^er&it^Xe&it),Vt=Jt,Jt=Zt,Zt=It,It=F(At,fr),At=it,it=Xe,Xe=er,er=F(fr,$t)}Mt[0]=F(er,Mt[0]),Mt[1]=F(Xe,Mt[1]),Mt[2]=F(it,Mt[2]),Mt[3]=F(At,Mt[3]),Mt[4]=F(It,Mt[4]),Mt[5]=F(Zt,Mt[5]),Mt[6]=F(Jt,Mt[6]),Mt[7]=F(Vt,Mt[7])}for(Pt="",Le=0;Le<32*Mt.length;Le+=8)Pt+=String.fromCharCode(Mt[Le>>5]>>>24-Le%32&255);return Pt}(function(Mt){for(var Pt,Le,Xe="",it=-1;++it<Mt.length;)Pt=Mt.charCodeAt(it),Le=it+1<Mt.length?Mt.charCodeAt(it+1):0,55296<=Pt&&56319>=Pt&&56320<=Le&&57343>=Le&&(Pt=65536+((1023&Pt)<<10)+(1023&Le),it++),127>=Pt?Xe+=String.fromCharCode(Pt):2047>=Pt?Xe+=String.fromCharCode(192|Pt>>>6&31,128|63&Pt):65535>=Pt?Xe+=String.fromCharCode(224|Pt>>>12&15,128|Pt>>>6&63,128|63&Pt):2097151>=Pt&&(Xe+=String.fromCharCode(240|Pt>>>18&7,128|Pt>>>12&63,128|Pt>>>6&63,128|63&Pt));return Xe}(Ot))),tt[yt])?tt[yt].apply(null,_t):(Ot=Function.apply(null,at.concat(Ot)),tt&&(tt[yt]=Ot),Ot.apply(null,_t))}}}function K(Te){return Array.isArray(Te)||pe(Te)||r(Te)}function G(Te){return Te.sort(function(Pe,Ve){return Pe==="viewport"?-1:Ve==="viewport"?1:Pe<Ve?-1:1})}function W(Te,Pe,Ve,tt){this.thisDep=Te,this.contextDep=Pe,this.propDep=Ve,this.append=tt}function Q(Te){return Te&&!(Te.thisDep||Te.contextDep||Te.propDep)}function R(Te){return new W(!1,!1,!1,Te)}function N(Te,Pe){var Ve=Te.type;if(Ve===0)return new W(!0,1<=(Ve=Te.data.length),2<=Ve,Pe);if(Ve===4)return new W((Ve=Te.data).thisDep,Ve.contextDep,Ve.propDep,Pe);if(Ve===5)return new W(!1,!1,!1,Pe);if(Ve===6){for(var tt=Ve=!1,ot=!1,at=0;at<Te.data.length;++at){var _t=Te.data[at];_t.type===1?ot=!0:_t.type===2?tt=!0:_t.type===3?Ve=!0:_t.type===0?(Ve=!0,1<=(_t=_t.data)&&(tt=!0),2<=_t&&(ot=!0)):_t.type===4&&(Ve=Ve||_t.data.thisDep,tt=tt||_t.data.contextDep,ot=ot||_t.data.propDep)}return new W(Ve,tt,ot,Pe)}return new W(Ve===3,Ve===2,Ve===1,Pe)}function U(Te,Pe,Ve,tt,ot,at,_t,bt,jt,Nt,$e,yt,Ot,Mt,Pt,Le){function Xe(Bt){return Bt.replace(".","_")}function it(Bt,lr,mr){var Vr=Xe(Bt);Nn.push(Bt),Pn[Vr]=Rr[Vr]=!!mr,hn[Vr]=lr}function At(Bt,lr,mr){var Vr=Xe(Bt);Nn.push(Bt),Array.isArray(mr)?(Rr[Vr]=mr.slice(),Pn[Vr]=mr.slice()):Rr[Vr]=Pn[Vr]=mr,Fn[Vr]=lr}function It(){var Bt=Z({cache:Pt}),lr=Bt.link,mr=Bt.global;Bt.id=Fr++,Bt.batchId="0";var Vr=lr(ca),Br=Bt.shared={props:"a0"};Object.keys(ca).forEach(function(_r){Br[_r]=mr.def(Vr,".",_r)});var Dr=Bt.next={},Or=Bt.current={};Object.keys(Fn).forEach(function(_r){Array.isArray(Rr[_r])&&(Dr[_r]=mr.def(Br.next,".",_r),Or[_r]=mr.def(Br.current,".",_r))});var xr=Bt.constants={};Object.keys(sr).forEach(function(_r){xr[_r]=mr.def(JSON.stringify(sr[_r]))}),Bt.invoke=function(_r,Cr){switch(Cr.type){case 0:var Wr=["this",Br.context,Br.props,Bt.batchId];return _r.def(lr(Cr.data),".call(",Wr.slice(0,Math.max(Cr.data.length+1,4)),")");case 1:return _r.def(Br.props,Cr.data);case 2:return _r.def(Br.context,Cr.data);case 3:return _r.def("this",Cr.data);case 4:return Cr.data.append(Bt,_r),Cr.data.ref;case 5:return Cr.data.toString();case 6:return Cr.data.map(function(Gr){return Bt.invoke(_r,Gr)})}},Bt.attribCache={};var br={};return Bt.scopeAttrib=function(_r){if((_r=Pe.id(_r))in br)return br[_r];var Cr=Nt.scope[_r];return Cr||(Cr=Nt.scope[_r]=new on),br[_r]=lr(Cr)},Bt}function Zt(Bt,lr){var mr=Bt.static,Vr=Bt.dynamic;if("framebuffer"in mr){var Br=mr.framebuffer;return Br?(Br=bt.getFramebuffer(Br),R(function(Or,xr){var br=Or.link(Br),_r=Or.shared;return xr.set(_r.framebuffer,".next",br),_r=_r.context,xr.set(_r,".framebufferWidth",br+".width"),xr.set(_r,".framebufferHeight",br+".height"),br})):R(function(Or,xr){var br=Or.shared;return xr.set(br.framebuffer,".next","null"),br=br.context,xr.set(br,".framebufferWidth",br+".drawingBufferWidth"),xr.set(br,".framebufferHeight",br+".drawingBufferHeight"),"null"})}if("framebuffer"in Vr){var Dr=Vr.framebuffer;return N(Dr,function(Or,xr){var br=Or.invoke(xr,Dr),_r=Or.shared,Cr=_r.framebuffer;return br=xr.def(Cr,".getFramebuffer(",br,")"),xr.set(Cr,".next",br),_r=_r.context,xr.set(_r,".framebufferWidth",br+"?"+br+".width:"+_r+".drawingBufferWidth"),xr.set(_r,".framebufferHeight",br+"?"+br+".height:"+_r+".drawingBufferHeight"),br})}return null}function Jt(Bt,lr,mr){function Vr(_r){if(_r in Br){var Cr=Pe.id(Br[_r]);return(_r=R(function(){return Cr})).id=Cr,_r}if(_r in Dr){var Wr=Dr[_r];return N(Wr,function(Gr,tn){var nn=Gr.invoke(tn,Wr);return tn.def(Gr.shared.strings,".id(",nn,")")})}return null}var Br=Bt.static,Dr=Bt.dynamic,Or=Vr("frag"),xr=Vr("vert"),br=null;return Q(Or)&&Q(xr)?(br=$e.program(xr.id,Or.id,null,mr),Bt=R(function(_r,Cr){return _r.link(br)})):Bt=new W(Or&&Or.thisDep||xr&&xr.thisDep,Or&&Or.contextDep||xr&&xr.contextDep,Or&&Or.propDep||xr&&xr.propDep,function(_r,Cr){var Wr,Gr,tn=_r.shared.shader;return Wr=Or?Or.append(_r,Cr):Cr.def(tn,".","frag"),Gr=xr?xr.append(_r,Cr):Cr.def(tn,".","vert"),Cr.def(tn+".program("+Gr+","+Wr+")")}),{frag:Or,vert:xr,progVar:Bt,program:br}}function Vt(Bt,lr){function mr(nn,vn){if(nn in Vr){var xn=0|Vr[nn];return vn?Dr.offset=xn:Dr.instances=xn,R(function(En,In){return vn&&(En.OFFSET=xn),xn})}if(nn in Br){var bn=Br[nn];return N(bn,function(En,In){var Wn=En.invoke(In,bn);return vn&&(En.OFFSET=Wn),Wn})}if(vn){if(br)return R(function(En,In){return En.OFFSET=0});if(Or)return new W(xr.thisDep,xr.contextDep,xr.propDep,function(En,In){return In.def(En.shared.vao+".currentVAO?"+En.shared.vao+".currentVAO.offset:0")})}else if(Or)return new W(xr.thisDep,xr.contextDep,xr.propDep,function(En,In){return In.def(En.shared.vao+".currentVAO?"+En.shared.vao+".currentVAO.instances:-1")});return null}var Vr=Bt.static,Br=Bt.dynamic,Dr={},Or=!1,xr=function(){if("vao"in Vr){var nn=Vr.vao;return nn!==null&&Nt.getVAO(nn)===null&&(nn=Nt.createVAO(nn)),Or=!0,Dr.vao=nn,R(function(xn){var bn=Nt.getVAO(nn);return bn?xn.link(bn):"null"})}if("vao"in Br){Or=!0;var vn=Br.vao;return N(vn,function(xn,bn){var En=xn.invoke(bn,vn);return bn.def(xn.shared.vao+".getVAO("+En+")")})}return null}(),br=!1,_r=function(){if("elements"in Vr){var nn=Vr.elements;if(Dr.elements=nn,K(nn)){var vn=Dr.elements=at.create(nn,!0);nn=at.getElements(vn),br=!0}else nn&&(nn=at.getElements(nn),br=!0);return(vn=R(function(bn,En){if(nn){var In=bn.link(nn);return bn.ELEMENTS=In}return bn.ELEMENTS=null})).value=nn,vn}if("elements"in Br){br=!0;var xn=Br.elements;return N(xn,function(bn,En){var In=(Wn=bn.shared).isBufferArgs,Wn=Wn.elements,Ma=bn.invoke(En,xn),ka=En.def("null");return In=En.def(In,"(",Ma,")"),Ma=bn.cond(In).then(ka,"=",Wn,".createStream(",Ma,");").else(ka,"=",Wn,".getElements(",Ma,");"),En.entry(Ma),En.exit(bn.cond(In).then(Wn,".destroyStream(",ka,");")),bn.ELEMENTS=ka})}return Or?new W(xr.thisDep,xr.contextDep,xr.propDep,function(bn,En){return En.def(bn.shared.vao+".currentVAO?"+bn.shared.elements+".getElements("+bn.shared.vao+".currentVAO.elements):null")}):null}(),Cr=mr("offset",!0),Wr=function(){if("primitive"in Vr){var nn=Vr.primitive;return Dr.primitive=nn,R(function(xn,bn){return ke[nn]})}if("primitive"in Br){var vn=Br.primitive;return N(vn,function(xn,bn){var En=xn.constants.primTypes,In=xn.invoke(bn,vn);return bn.def(En,"[",In,"]")})}return br?Q(_r)?_r.value?R(function(xn,bn){return bn.def(xn.ELEMENTS,".primType")}):R(function(){return 4}):new W(_r.thisDep,_r.contextDep,_r.propDep,function(xn,bn){var En=xn.ELEMENTS;return bn.def(En,"?",En,".primType:",4)}):Or?new W(xr.thisDep,xr.contextDep,xr.propDep,function(xn,bn){return bn.def(xn.shared.vao+".currentVAO?"+xn.shared.vao+".currentVAO.primitive:4")}):null}(),Gr=function(){if("count"in Vr){var nn=0|Vr.count;return Dr.count=nn,R(function(){return nn})}if("count"in Br){var vn=Br.count;return N(vn,function(xn,bn){return xn.invoke(bn,vn)})}return br?Q(_r)?_r?Cr?new W(Cr.thisDep,Cr.contextDep,Cr.propDep,function(xn,bn){return bn.def(xn.ELEMENTS,".vertCount-",xn.OFFSET)}):R(function(xn,bn){return bn.def(xn.ELEMENTS,".vertCount")}):R(function(){return-1}):new W(_r.thisDep||Cr.thisDep,_r.contextDep||Cr.contextDep,_r.propDep||Cr.propDep,function(xn,bn){var En=xn.ELEMENTS;return xn.OFFSET?bn.def(En,"?",En,".vertCount-",xn.OFFSET,":-1"):bn.def(En,"?",En,".vertCount:-1")}):Or?new W(xr.thisDep,xr.contextDep,xr.propDep,function(xn,bn){return bn.def(xn.shared.vao,".currentVAO?",xn.shared.vao,".currentVAO.count:-1")}):null}(),tn=mr("instances",!1);return{elements:_r,primitive:Wr,count:Gr,instances:tn,offset:Cr,vao:xr,vaoActive:Or,elementsActive:br,static:Dr}}
1212function pr(Bt,lr){var mr=Bt.static,Vr=Bt.dynamic,Br={};return Object.keys(mr).forEach(function(Dr){var Or=mr[Dr],xr=Pe.id(Dr),br=new on;if(K(Or))br.state=1,br.buffer=ot.getBuffer(ot.create(Or,34962,!1,!0)),br.type=0;else if(Cr=ot.getBuffer(Or))br.state=1,br.buffer=Cr,br.type=0;else if("constant"in Or){var _r=Or.constant;br.buffer="null",br.state=2,typeof _r=="number"?br.x=_r:Xt.forEach(function(xn,bn){bn<_r.length&&(br[xn]=_r[bn])})}else{var Cr=K(Or.buffer)?ot.getBuffer(ot.create(Or.buffer,34962,!1,!0)):ot.getBuffer(Or.buffer),Wr=0|Or.offset,Gr=0|Or.stride,tn=0|Or.size,nn=!!Or.normalized,vn=0;"type"in Or&&(vn=_e[Or.type]),Or=0|Or.divisor,br.buffer=Cr,br.state=1,br.size=tn,br.normalized=nn,br.type=vn||Cr.dtype,br.offset=Wr,br.stride=Gr,br.divisor=Or}Br[Dr]=R(function(xn,bn){var En=xn.attribCache;if(xr in En)return En[xr];var In={isStream:!1};return Object.keys(br).forEach(function(Wn){In[Wn]=br[Wn]}),br.buffer&&(In.buffer=xn.link(br.buffer),In.type=In.type||In.buffer+".dtype"),En[xr]=In})}),Object.keys(Vr).forEach(function(Dr){var Or=Vr[Dr];Br[Dr]=N(Or,function(xr,br){function _r(En){br(nn[En],"=",Cr,".",En,"|0;")}var Cr=xr.invoke(br,Or),Wr=xr.shared,Gr=xr.constants,tn=Wr.isBufferArgs,nn=(Wr=Wr.buffer,{isStream:br.def(!1)}),vn=new on;vn.state=1,Object.keys(vn).forEach(function(En){nn[En]=br.def(""+vn[En])});var xn=nn.buffer,bn=nn.type;return br("if(",tn,"(",Cr,")){",nn.isStream,"=true;",xn,"=",Wr,".createStream(",34962,",",Cr,");",bn,"=",xn,".dtype;","}else{",xn,"=",Wr,".getBuffer(",Cr,");","if(",xn,"){",bn,"=",xn,".dtype;",'}else if("constant" in ',Cr,"){",nn.state,"=",2,";","if(typeof "+Cr+'.constant === "number"){',nn[Xt[0]],"=",Cr,".constant;",Xt.slice(1).map(function(En){return nn[En]}).join("="),"=0;","}else{",Xt.map(function(En,In){return nn[En]+"="+Cr+".constant.length>"+In+"?"+Cr+".constant["+In+"]:0;"}).join(""),"}}else{","if(",tn,"(",Cr,".buffer)){",xn,"=",Wr,".createStream(",34962,",",Cr,".buffer);","}else{",xn,"=",Wr,".getBuffer(",Cr,".buffer);","}",bn,'="type" in ',Cr,"?",Gr.glTypes,"[",Cr,".type]:",xn,".dtype;",nn.normalized,"=!!",Cr,".normalized;"),_r("size"),_r("offset"),_r("stride"),_r("divisor"),br("}}"),br.exit("if(",nn.isStream,"){",Wr,".destroyStream(",xn,");","}"),nn})}),Br}function Ir(Bt,lr,mr,Vr,Br){function Dr(vn){var xn=xr[vn];xn&&(_r[vn]=xn)}var Or=function(vn,xn){if(typeof(bn=vn.static).frag=="string"&&typeof bn.vert=="string"){if(0<Object.keys(xn.dynamic).length)return null;var bn=xn.static,En=Object.keys(bn);if(0<En.length&&typeof bn[En[0]]=="number"){for(var In=[],Wn=0;Wn<En.length;++Wn)In.push([0|bn[En[Wn]],En[Wn]]);return In}}return null}(Bt,lr),xr=function(vn,xn,bn){function En(ka){if(ka in In){var kn=In[ka];ka=!0;var $n,Jn,Oa=0|kn.x,mi=0|kn.y;return"width"in kn?$n=0|kn.width:ka=!1,"height"in kn?Jn=0|kn.height:ka=!1,new W(!ka&&xn&&xn.thisDep,!ka&&xn&&xn.contextDep,!ka&&xn&&xn.propDep,function(uo,Ya){var Wa=uo.shared.context,Ki=$n;"width"in kn||(Ki=Ya.def(Wa,".","framebufferWidth","-",Oa));var Ba=Jn;return"height"in kn||(Ba=Ya.def(Wa,".","framebufferHeight","-",mi)),[Oa,mi,Ki,Ba]})}if(ka in Wn){var Di=Wn[ka];return ka=N(Di,function(uo,Ya){var Wa=uo.invoke(Ya,Di),Ki=uo.shared.context,Ba=Ya.def(Wa,".x|0"),fo=Ya.def(Wa,".y|0");return[Ba,fo,Ya.def('"width" in ',Wa,"?",Wa,".width|0:","(",Ki,".","framebufferWidth","-",Ba,")"),Wa=Ya.def('"height" in ',Wa,"?",Wa,".height|0:","(",Ki,".","framebufferHeight","-",fo,")")]}),xn&&(ka.thisDep=ka.thisDep||xn.thisDep,ka.contextDep=ka.contextDep||xn.contextDep,ka.propDep=ka.propDep||xn.propDep),ka}return xn?new W(xn.thisDep,xn.contextDep,xn.propDep,function(uo,Ya){var Wa=uo.shared.context;return[0,0,Ya.def(Wa,".","framebufferWidth"),Ya.def(Wa,".","framebufferHeight")]}):null}var In=vn.static,Wn=vn.dynamic;if(vn=En("viewport")){var Ma=vn;vn=new W(vn.thisDep,vn.contextDep,vn.propDep,function(ka,kn){var $n=Ma.append(ka,kn),Jn=ka.shared.context;return kn.set(Jn,".viewportWidth",$n[2]),kn.set(Jn,".viewportHeight",$n[3]),$n})}return{viewport:vn,scissor_box:En("scissor.box")}}(Bt,Wr=Zt(Bt)),br=Vt(Bt),_r=function(vn,xn){var bn=vn.static,En=vn.dynamic,In={};return Nn.forEach(function(Wn){function Ma(kn,$n){if(Wn in bn){var Jn=kn(bn[Wn]);In[ka]=R(function(){return Jn})}else if(Wn in En){var Oa=En[Wn];In[ka]=N(Oa,function(mi,Di){return $n(mi,Di,mi.invoke(Di,Oa))})}}var ka=Xe(Wn);switch(Wn){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 Ma(function(kn){return kn},function(kn,$n,Jn){return Jn});case"depth.func":return Ma(function(kn){return wt[kn]},function(kn,$n,Jn){return $n.def(kn.constants.compareFuncs,"[",Jn,"]")});case"depth.range":return Ma(function(kn){return kn},function(kn,$n,Jn){return[$n.def("+",Jn,"[0]"),$n=$n.def("+",Jn,"[1]")]});case"blend.func":return Ma(function(kn){return[qe["srcRGB"in kn?kn.srcRGB:kn.src],qe["dstRGB"in kn?kn.dstRGB:kn.dst],qe["srcAlpha"in kn?kn.srcAlpha:kn.src],qe["dstAlpha"in kn?kn.dstAlpha:kn.dst]]},function(kn,$n,Jn){function Oa(Ya,Wa){return $n.def('"',Ya,Wa,'" in ',Jn,"?",Jn,".",Ya,Wa,":",Jn,".",Ya)}
1212kn=kn.constants.blendFuncs;var mi=Oa("src","RGB"),Di=Oa("dst","RGB"),uo=(mi=$n.def(kn,"[",mi,"]"),$n.def(kn,"[",Oa("src","Alpha"),"]"));return[mi,Di=$n.def(kn,"[",Di,"]"),uo,kn=$n.def(kn,"[",Oa("dst","Alpha"),"]")]});case"blend.equation":return Ma(function(kn){return typeof kn=="string"?[Un[kn],Un[kn]]:typeof kn=="object"?[Un[kn.rgb],Un[kn.alpha]]:void 0},function(kn,$n,Jn){var Oa=kn.constants.blendEquations,mi=$n.def(),Di=$n.def();return(kn=kn.cond("typeof ",Jn,'==="string"')).then(mi,"=",Di,"=",Oa,"[",Jn,"];"),kn.else(mi,"=",Oa,"[",Jn,".rgb];",Di,"=",Oa,"[",Jn,".alpha];"),$n(kn),[mi,Di]});case"blend.color":return Ma(function(kn){return n(4,function($n){return+kn[$n]})},function(kn,$n,Jn){return n(4,function(Oa){return $n.def("+",Jn,"[",Oa,"]")})});case"stencil.mask":return Ma(function(kn){return 0|kn},function(kn,$n,Jn){return $n.def(Jn,"|0")});case"stencil.func":return Ma(function(kn){return[wt[kn.cmp||"keep"],kn.ref||0,"mask"in kn?kn.mask:-1]},function(kn,$n,Jn){return[kn=$n.def('"cmp" in ',Jn,"?",kn.constants.compareFuncs,"[",Jn,".cmp]",":",7680),$n.def(Jn,".ref|0"),$n=$n.def('"mask" in ',Jn,"?",Jn,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return Ma(function(kn){return[Wn==="stencil.opBack"?1029:1028,ft[kn.fail||"keep"],ft[kn.zfail||"keep"],ft[kn.zpass||"keep"]]},function(kn,$n,Jn){function Oa(Di){return $n.def('"',Di,'" in ',Jn,"?",mi,"[",Jn,".",Di,"]:",7680)}var mi=kn.constants.stencilOps;return[Wn==="stencil.opBack"?1029:1028,Oa("fail"),Oa("zfail"),Oa("zpass")]});case"polygonOffset.offset":return Ma(function(kn){return[0|kn.factor,0|kn.units]},function(kn,$n,Jn){return[$n.def(Jn,".factor|0"),$n=$n.def(Jn,".units|0")]});case"cull.face":return Ma(function(kn){var $n=0;return kn==="front"?$n=1028:kn==="back"&&($n=1029),$n},function(kn,$n,Jn){return $n.def(Jn,'==="front"?',1028,":",1029)});case"lineWidth":return Ma(function(kn){return kn},function(kn,$n,Jn){return Jn});case"frontFace":return Ma(function(kn){return Ce[kn]},function(kn,$n,Jn){return $n.def(Jn+'==="cw"?2304:2305')});case"colorMask":return Ma(function(kn){return kn.map(function($n){return!!$n})},function(kn,$n,Jn){return n(4,function(Oa){return"!!"+Jn+"["+Oa+"]"})});case"sample.coverage":return Ma(function(kn){return["value"in kn?kn.value:1,!!kn.invert]},function(kn,$n,Jn){return[$n.def('"value" in ',Jn,"?+",Jn,".value:1"),$n=$n.def("!!",Jn,".invert")]})}}),In}(Bt),Cr=Jt(Bt,0,Or);Dr("viewport"),Dr(Xe("scissor.box"));var Wr,Gr=0<Object.keys(_r).length;if((Wr={framebuffer:Wr,draw:br,shader:Cr,state:_r,dirty:Gr,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}}).profile=function(vn){var xn,bn=vn.static;if(vn=vn.dynamic,"profile"in bn){var En=!!bn.profile;(xn=R(function(Wn,Ma){return En})).enable=En}else if("profile"in vn){var In=vn.profile;xn=N(In,function(Wn,Ma){return Wn.invoke(Ma,In)})}return xn}(Bt),Wr.uniforms=function(vn,xn){var bn=vn.static,En=vn.dynamic,In={};return Object.keys(bn).forEach(function(Wn){var Ma,ka=bn[Wn];if(typeof ka=="number"||typeof ka=="boolean")Ma=R(function(){return ka});else if(typeof ka=="function"){var kn=ka._reglType;kn==="texture2d"||kn==="textureCube"?Ma=R(function($n){return $n.link(ka)}):kn!=="framebuffer"&&kn!=="framebufferCube"||(Ma=R(function($n){return $n.link(ka.color[0])}))}else p(ka)&&(Ma=R(function($n){return $n.global.def("[",n(ka.length,function(Jn){return ka[Jn]}),"]")}));Ma.value=ka,In[Wn]=Ma}),Object.keys(En).forEach(function(Wn){var Ma=En[Wn];In[Wn]=N(Ma,function(ka,kn){return ka.invoke(kn,Ma)})}),In}(mr),Wr.drawVAO=Wr.scopeVAO=br.vao,!Wr.drawVAO&&Cr.program&&!Or&&Ve.angle_instanced_arrays&&br.static.elements){var tn=!0;if(Bt=Cr.program.attributes.map(function(vn){return vn=lr.static[vn],tn=tn&&!!vn,vn}),tn&&0<Bt.length){var nn=Nt.getVAO(Nt.createVAO({attributes:Bt,elements:br.static.elements}));Wr.drawVAO=new W(null,null,null,function(vn,xn){return vn.link(nn)}),Wr.useVAO=!0}}return Or?Wr.useVAO=!0:Wr.attributes=pr(lr),Wr.context=function(vn){var xn=vn.static,bn=vn.dynamic,En={};return Object.keys(xn).forEach(function(In){var Wn=xn[In];En[In]=R(function(Ma,ka){return typeof Wn=="number"||typeof Wn=="boolean"?""+Wn:Ma.link(Wn)})}
1212),Object.keys(bn).forEach(function(In){var Wn=bn[In];En[In]=N(Wn,function(Ma,ka){return Ma.invoke(ka,Wn)})}),En}(Vr),Wr}function fr(Bt,lr,mr){var Vr=Bt.shared.context,Br=Bt.scope();Object.keys(mr).forEach(function(Dr){lr.save(Vr,"."+Dr);var Or=mr[Dr].append(Bt,lr);Array.isArray(Or)?Br(Vr,".",Dr,"=[",Or.join(),"];"):Br(Vr,".",Dr,"=",Or,";")}),lr(Br)}function $t(Bt,lr,mr,Vr){var Br,Dr=(xr=Bt.shared).gl,Or=xr.framebuffer;en&&(Br=lr.def(xr.extensions,".webgl_draw_buffers"));var xr=(br=Bt.constants).drawBuffer,br=br.backBuffer;Bt=mr?mr.append(Bt,lr):lr.def(Or,".next"),Vr||lr("if(",Bt,"!==",Or,".cur){"),lr("if(",Bt,"){",Dr,".bindFramebuffer(",36160,",",Bt,".framebuffer);"),en&&lr(Br,".drawBuffersWEBGL(",xr,"[",Bt,".colorAttachments.length]);"),lr("}else{",Dr,".bindFramebuffer(",36160,",null);"),en&&lr(Br,".drawBuffersWEBGL(",br,");"),lr("}",Or,".cur=",Bt,";"),Vr||lr("}")}function er(Bt,lr,mr){var Vr=Bt.shared,Br=Vr.gl,Dr=Bt.current,Or=Bt.next,xr=Vr.current,br=Vr.next,_r=Bt.cond(xr,".dirty");Nn.forEach(function(Cr){var Wr,Gr;if(!((Cr=Xe(Cr))in mr.state))if(Cr in Or){Wr=Or[Cr],Gr=Dr[Cr];var tn=n(Rr[Cr].length,function(nn){return _r.def(Wr,"[",nn,"]")});_r(Bt.cond(tn.map(function(nn,vn){return nn+"!=="+Gr+"["+vn+"]"}).join("||")).then(Br,".",Fn[Cr],"(",tn,");",tn.map(function(nn,vn){return Gr+"["+vn+"]="+nn}).join(";"),";"))}else Wr=_r.def(br,".",Cr),tn=Bt.cond(Wr,"!==",xr,".",Cr),_r(tn),Cr in hn?tn(Bt.cond(Wr).then(Br,".enable(",hn[Cr],");").else(Br,".disable(",hn[Cr],");"),xr,".",Cr,"=",Wr,";"):tn(Br,".",Fn[Cr],"(",Wr,");",xr,".",Cr,"=",Wr,";")}),Object.keys(mr.state).length===0&&_r(xr,".dirty=false;"),lr(_r)}function ar(Bt,lr,mr,Vr){var Br,Dr=Bt.shared,Or=Bt.current,xr=Dr.current,br=Dr.gl;
1212G(Object.keys(mr)).forEach(function(_r){var Cr=mr[_r];if(!Vr||Vr(Cr)){var Wr=Cr.append(Bt,lr);if(hn[_r]){var Gr=hn[_r];Q(Cr)?(Br=Bt.link(Wr,{stable:!0}),lr(Bt.cond(Br).then(br,".enable(",Gr,");").else(br,".disable(",Gr,");")),lr(xr,".",_r,"=",Br,";")):(lr(Bt.cond(Wr).then(br,".enable(",Gr,");").else(br,".disable(",Gr,");")),lr(xr,".",_r,"=",Wr,";"))}else if(p(Wr)){var tn=Or[_r];lr(br,".",Fn[_r],"(",Wr,");",Wr.map(function(nn,vn){return tn+"["+vn+"]="+nn}).join(";"),";")}else Q(Cr)?(Br=Bt.link(Wr,{stable:!0}),lr(br,".",Fn[_r],"(",Br,");",xr,".",_r,"=",Br,";")):lr(br,".",Fn[_r],"(",Wr,");",xr,".",_r,"=",Wr,";")}})}function hr(Bt,lr){Tr&&(Bt.instancing=lr.def(Bt.shared.extensions,".angle_instanced_arrays"))}function vr(Bt,lr,mr,Vr,Br){function Dr(){return typeof performance>"u"?"Date.now()":"performance.now()"}function Or(vn){vn(_r=lr.def(),"=",Dr(),";"),typeof Br=="string"?vn(Gr,".count+=",Br,";"):vn(Gr,".count++;"),Mt&&(Vr?vn(Cr=lr.def(),"=",nn,".getNumPendingQueries();"):vn(nn,".beginQuery(",Gr,");"))}function xr(vn){vn(Gr,".cpuTime+=",Dr(),"-",_r,";"),Mt&&(Vr?vn(nn,".pushScopeStats(",Cr,",",nn,".getNumPendingQueries(),",Gr,");"):vn(nn,".endQuery();"))}function br(vn){var xn=lr.def(tn,".profile");lr(tn,".profile=",vn,";"),lr.exit(tn,".profile=",xn,";")}var _r,Cr,Wr=Bt.shared,Gr=Bt.stats,tn=Wr.current,nn=Wr.timer;if(mr=mr.profile){if(Q(mr))return void(mr.enable?(Or(lr),xr(lr.exit),br("true")):br("false"));br(mr=mr.append(Bt,lr))}else mr=lr.def(tn,".profile");Or(Wr=Bt.block()),lr("if(",mr,"){",Wr,"}"),xr(Bt=Bt.block()),lr.exit("if(",mr,"){",Bt,"}")}function Pr(Bt,lr,mr,Vr,Br){function Dr(xr,br,_r){function Cr(){lr("if(!",nn,".buffer){",Gr,".enableVertexAttribArray(",tn,");}");var En,In=_r.type;En=_r.size?lr.def(_r.size,"||",br):br,lr("if(",nn,".type!==",In,"||",nn,".size!==",En,"||",bn.map(function(Wn){return nn+"."+Wn+"!=="+_r[Wn]}).join("||"),"){",Gr,".bindBuffer(",34962,",",vn,".buffer);",Gr,".vertexAttribPointer(",[tn,En,In,_r.normalized,_r.stride,_r.offset],");",nn,".type=",In,";",nn,".size=",En,";",bn.map(function(Wn){return nn+"."+Wn+"="+_r[Wn]+";"}).join(""),"}"),Tr&&(In=_r.divisor,lr("if(",nn,".divisor!==",In,"){",Bt.instancing,".vertexAttribDivisorANGLE(",[tn,In],");",nn,".divisor=",In,";}"))}function Wr(){lr("if(",nn,".buffer){",Gr,".disableVertexAttribArray(",tn,");",nn,".buffer=null;","}if(",Xt.map(function(En,In){return nn+"."+En+"!=="+xn[In]}).join("||"),"){",Gr,".vertexAttrib4f(",tn,",",xn,");",Xt.map(function(En,In){return nn+"."+En+"="+xn[In]+";"}).join(""),"}")}var Gr=Or.gl,tn=lr.def(xr,".location"),nn=lr.def(Or.attributes,"[",tn,"]");xr=_r.state;var vn=_r.buffer,xn=[_r.x,_r.y,_r.z,_r.w],bn=["buffer","normalized","offset","stride"];xr===1?Cr():xr===2?Wr():(lr("if(",xr,"===",1,"){"),Cr(),lr("}else{"),Wr(),lr("}"))}var Or=Bt.shared;Vr.forEach(function(xr){var br,_r=xr.name,Cr=mr.attributes[_r];if(Cr){if(!Br(Cr))return;br=Cr.append(Bt,lr)}else{if(!Br(Ie))return;var Wr=Bt.scopeAttrib(_r);br={},Object.keys(new on).forEach(function(Gr){br[Gr]=lr.def(Wr,".",Gr)})}Dr(Bt.link(xr),function(Gr){switch(Gr){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}}(xr.info.type),br)})}function Ur(Bt,lr,mr,Vr,Br,Dr){for(var Or,xr=Bt.shared,br=xr.gl,_r=0;_r<Vr.length;++_r){var Cr,Wr=(nn=Vr[_r]).name,Gr=nn.info.type,tn=mr.uniforms[Wr],nn=Bt.link(nn)+".location";if(tn){if(!Br(tn))continue;if(Q(tn)){if(Wr=tn.value,Gr===35678||Gr===35680)lr(br,".uniform1i(",nn,",",(Gr=Bt.link(Wr._texture||Wr.color[0]._texture))+".bind());"),lr.exit(Gr,".unbind();");else if(Gr===35674||Gr===35675||Gr===35676)tn=2,Gr===35675?tn=3:Gr===35676&&(tn=4),lr(br,".uniformMatrix",tn,"fv(",nn,",false,",Wr=Bt.global.def("new Float32Array(["+Array.prototype.slice.call(Wr)+"])"),");");else{switch(Gr){case 5126:Or="1f";break;case 35664:Or="2f";break;case 35665:Or="3f";break;case 35666:Or="4f";break;case 35670:case 5124:Or="1i";break;case 35671:case 35667:Or="2i";break;case 35672:case 35668:Or="3i";break;case 35673:Or="4i";break;case 35669:Or="4i"}lr(br,".uniform",Or,"(",nn,",",p(Wr)?Array.prototype.slice.call(Wr):Wr,");")}continue}Cr=tn.append(Bt,lr)}else{if(!Br(Ie))continue;Cr=lr.def(xr.uniforms,"[",Pe.id(Wr),"]")}switch(Gr===35678?lr("if(",Cr,"&&",Cr,'._reglType==="framebuffer"){',Cr,"=",Cr,".color[0];","}"):Gr===35680&&lr("if(",Cr,"&&",Cr,'._reglType==="framebufferCube"){',Cr,"=",Cr,".color[0];","}"),Wr=1,Gr){case 35678:case 35680:Gr=lr.def(Cr,"._texture"),lr(br,".uniform1i(",nn,",",Gr,".bind());"),lr.exit(Gr,".unbind();");continue;case 5124:case 35670:Or="1i";break;case 35667:case 35671:Or="2i",Wr=2;break;case 35668:case 35672:Or="3i",Wr=3;break;case 35669:case 35673:Or="4i",Wr=4;break;case 5126:Or="1f";break;case 35664:Or="2f",Wr=2;break;case 35665:Or="3f",Wr=3;break;case 35666:Or="4f",Wr=4;break;case 35674:Or="Matrix2fv";break;case 35675:Or="Matrix3fv";break;case 35676:Or="Matrix4fv"}if(Or.charAt(0)==="M"){lr(br,".uniform",Or,"(",nn,","),nn=Math.pow(Gr-35674+2,2);var vn=Bt.global.def("new Float32Array(",nn,")");Array.isArray(Cr)?lr("false,(",n(nn,function(bn){return vn+"["+bn+"]="+Cr[bn]}),",",vn,")"):lr("false,(Array.isArray(",Cr,")||",Cr," instanceof Float32Array)?",Cr,":(",n(nn,function(bn){return vn+"["+bn+"]="+Cr+"["+bn+"]"}),",",vn,")"),lr(");")}else{if(1<Wr){Gr=[];var xn=[];for(tn=0;tn<Wr;++tn)Array.isArray(Cr)?xn.push(Cr[tn]):xn.push(lr.def(Cr+"["+tn+"]")),Dr&&Gr.push(lr.def());Dr&&lr("if(!",Bt.batchId,"||",Gr.map(function(bn,En){return bn+"!=="+xn[En]}).join("||"),"){",Gr.map(function(bn,En){return bn+"="+xn[En]+";"}).join("")),lr(br,".uniform",Or,"(",nn,",",xn.join(","),");")}else Dr&&(Gr=lr.def(),lr("if(!",Bt.batchId,"||",Gr,"!==",Cr,"){",Gr,"=",Cr,";")),lr(br,".uniform",Or,"(",nn,",",Cr,");");Dr&&lr("}")}}}function qr(Bt,lr,mr,Vr){function Br(In){var Wn=Gr[In];return Wn?Wn.contextDep&&Vr.contextDynamic||Wn.propDep?Wn.append(Bt,mr):Wn.append(Bt,lr):lr.def(Wr,".",In)}function Dr(){function In(){mr(br,".drawElementsInstancedANGLE(",[nn,xn,bn,vn+"<<(("+bn+"-5121)>>1)",xr],");")}function Wn(){mr(br,".drawArraysInstancedANGLE(",[nn,vn,xn,xr],");")}tn&&tn!=="null"?En?In():(mr("if(",tn,"){"),In(),mr("}else{"),Wn(),mr("}")):Wn()}function Or(){function In(){mr(Cr+".drawElements("+[nn,xn,bn,vn+"<<(("+bn+"-5121)>>1)"]+");")}function Wn(){mr(Cr+".drawArrays("+[nn,vn,xn]+");")}tn&&tn!=="null"?En?In():(mr("if(",tn,"){"),In(),mr("}else{"),Wn(),mr("}")):Wn()}var xr,br,_r=Bt.shared,Cr=_r.gl,Wr=_r.draw,Gr=Vr.draw,tn=function(){var In=Gr.elements,Wn=lr;return In?((In.contextDep&&Vr.contextDynamic||In.propDep)&&(Wn=mr),In=In.append(Bt,Wn),Gr.elementsActive&&Wn("if("+In+")"+Cr+".bindBuffer(34963,"+In+".buffer.buffer);")):(In=Wn.def(),Wn(In,"=",Wr,".","elements",";","if(",In,"){",Cr,".bindBuffer(",34963,",",In,".buffer.buffer);}","else if(",_r.vao,".currentVAO){",In,"=",Bt.shared.elements+".getElements("+_r.vao,".currentVAO.elements);",$r?"":"if("+In+")"+Cr+".bindBuffer(34963,"+In+".buffer.buffer);","}")),In}(),nn=Br("primitive"),vn=Br("offset"),xn=function(){var In=Gr.count,Wn=lr;return In?((In.contextDep&&Vr.contextDynamic||In.propDep)&&(Wn=mr),In=In.append(Bt,Wn)):In=Wn.def(Wr,".","count"),In}();if(typeof xn=="number"){if(xn===0)return}else mr("if(",xn,"){"),mr.exit("}");Tr&&(xr=Br("instances"),br=Bt.instancing);var bn=tn+".type",En=Gr.elements&&Q(Gr.elements)&&!Gr.vaoActive;Tr&&(typeof xr!="number"||0<=xr)?typeof xr=="string"?(mr("if(",xr,">0){"),Dr(),mr("}else if(",xr,"<0){"),Or(),mr("}")):Dr():Or()}function rn(Bt,lr,mr,Vr,Br){return Br=(lr=It()).proc("body",Br),Tr&&(lr.instancing=Br.def(lr.shared.extensions,".angle_instanced_arrays")),Bt(lr,Br,mr,Vr),lr.compile().body}function An(Bt,lr,mr,Vr){hr(Bt,lr),mr.useVAO?mr.drawVAO?lr(Bt.shared.vao,".setVAO(",mr.drawVAO.append(Bt,lr),");"):lr(Bt.shared.vao,".setVAO(",Bt.shared.vao,".targetVAO);"):(lr(Bt.shared.vao,".setVAO(null);"),Pr(Bt,lr,mr,Vr.attributes,function(){return!0})),Ur(Bt,lr,mr,Vr.uniforms,function(){return!0},!1),qr(Bt,lr,lr,mr)}function mn(Bt,lr,mr,Vr){function Br(){return!0}Bt.batchId="a1",hr(Bt,lr),Pr(Bt,lr,mr,Vr.attributes,Br),Ur(Bt,lr,mr,Vr.uniforms,Br,!1),qr(Bt,lr,lr,mr)}function Mn(Bt,lr,mr,Vr){function Br(Wr){return Wr.contextDep&&Or||Wr.propDep}function Dr(Wr){return!Br(Wr)}hr(Bt,lr);var Or=mr.contextDep,xr=lr.def(),br=lr.def();Bt.shared.props=br,Bt.batchId=xr;var _r=Bt.scope(),Cr=Bt.scope();lr(_r.entry,"for(",xr,"=0;",xr,"<","a1",";++",xr,"){",br,"=","a0","[",xr,"];",Cr,"}",_r.exit),mr.needsContext&&fr(Bt,Cr,mr.context),mr.needsFramebuffer&&$t(Bt,Cr,mr.framebuffer),ar(Bt,Cr,mr.state,Br),mr.profile&&Br(mr.profile)&&vr(Bt,Cr,mr,!1,!0),Vr?(mr.useVAO?mr.drawVAO?Br(mr.drawVAO)?Cr(Bt.shared.vao,".setVAO(",mr.drawVAO.append(Bt,Cr),");"):_r(Bt.shared.vao,".setVAO(",mr.drawVAO.append(Bt,_r),");"):_r(Bt.shared.vao,".setVAO(",Bt.shared.vao,".targetVAO);"):(_r(Bt.shared.vao,".setVAO(null);"),Pr(Bt,_r,mr,Vr.attributes,Dr),Pr(Bt,Cr,mr,Vr.attributes,Br)),Ur(Bt,_r,mr,Vr.uniforms,Dr,!1),Ur(Bt,Cr,mr,Vr.uniforms,Br,!0),qr(Bt,_r,Cr,mr)):(lr=Bt.global.def("{}"),Vr=mr.shader.progVar.append(Bt,Cr),br=Cr.def(Vr,".id"),_r=Cr.def(lr,"[",br,"]"),Cr(Bt.shared.gl,".useProgram(",Vr,".program);","if(!",_r,"){",_r,"=",lr,"[",br,"]=",Bt.link(function(Wr){return rn(mn,Bt,mr,Wr,2)}),"(",Vr,");}",_r,".call(this,a0[",xr,"],",xr,");"))}function Xr(Bt,lr){function mr(xr){var br=lr.shader[xr];br&&(br=br.append(Bt,Vr),isNaN(br)?Vr.set(Br.shader,"."+xr,br):Vr.set(Br.shader,"."+xr,Bt.link(br,{stable:!0})))}var Vr=Bt.proc("scope",3);Bt.batchId="a2";var Br=Bt.shared,Dr=Br.current;if(fr(Bt,Vr,lr.context),lr.framebuffer&&lr.framebuffer.append(Bt,Vr),G(Object.keys(lr.state)).forEac
1212h(function(xr){var br=lr.state[xr],_r=br.append(Bt,Vr);p(_r)?_r.forEach(function(Cr,Wr){isNaN(Cr)?Vr.set(Bt.next[xr],"["+Wr+"]",Cr):Vr.set(Bt.next[xr],"["+Wr+"]",Bt.link(Cr,{stable:!0}))}):Q(br)?Vr.set(Br.next,"."+xr,Bt.link(_r,{stable:!0})):Vr.set(Br.next,"."+xr,_r)}),vr(Bt,Vr,lr,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(xr){var br=lr.draw[xr];br&&(br=br.append(Bt,Vr),isNaN(br)?Vr.set(Br.draw,"."+xr,br):Vr.set(Br.draw,"."+xr,Bt.link(br),{stable:!0}))}),Object.keys(lr.uniforms).forEach(function(xr){var br=lr.uniforms[xr].append(Bt,Vr);Array.isArray(br)&&(br="["+br.map(function(_r){return isNaN(_r)?_r:Bt.link(_r,{stable:!0})})+"]"),Vr.set(Br.uniforms,"["+Bt.link(Pe.id(xr),{stable:!0})+"]",br)}),Object.keys(lr.attributes).forEach(function(xr){var br=lr.attributes[xr].append(Bt,Vr),_r=Bt.scopeAttrib(xr);Object.keys(new on).forEach(function(Cr){Vr.set(_r,"."+Cr,br[Cr])})}),lr.scopeVAO){var Or=lr.scopeVAO.append(Bt,Vr);isNaN(Or)?Vr.set(Br.vao,".targetVAO",Or):Vr.set(Br.vao,".targetVAO",Bt.link(Or,{stable:!0}))}mr("vert"),mr("frag"),0<Object.keys(lr.state).length&&(Vr(Dr,".dirty=true;"),Vr.exit(Dr,".dirty=true;")),Vr("a1(",Bt.shared.context,",a0,",Bt.batchId,");")}function Er(Bt,lr,mr){var Vr=lr.static[mr];if(Vr&&function(Cr){if(typeof Cr=="object"&&!p(Cr)){for(var Wr=Object.keys(Cr),Gr=0;Gr<Wr.length;++Gr)if(J.isDynamic(Cr[Wr[Gr]]))return!0;return!1}}(Vr)){var Br=Bt.global,Dr=Object.keys(Vr),Or=!1,xr=!1,br=!1,_r=Bt.global.def("{}");Dr.forEach(function(Cr){var Wr=Vr[Cr];if(J.isDynamic(Wr))typeof Wr=="function"&&(Wr=Vr[Cr]=J.unbox(Wr)),Cr=N(Wr,null),Or=Or||Cr.thisDep,br=br||Cr.propDep,xr=xr||Cr.contextDep;else{switch(Br(_r,".",Cr,"="),typeof Wr){case"number":Br(Wr);break;case"string":Br('"',Wr,'"');break;case"object":Array.isArray(Wr)&&Br("[",Wr.join(),"]");break;default:Br(Bt.link(Wr))}Br(";")}}),lr.dynamic[mr]=new J.DynamicVariable(4,{thisDep:Or,contextDep:xr,propDep:br,ref:_r,append:function(Cr,Wr){Dr.forEach(function(Gr){var tn=Vr[Gr];J.isDynamic(tn)&&(tn=Cr.invoke(Wr,tn),Wr(_r,".",Gr,"=",tn,";"))})}}),delete lr.static[mr]}}var on=Nt.Record,Un={add:32774,subtract:32778,"reverse subtract":32779};Ve.ext_blend_minmax&&(Un.min=32775,Un.max=32776);var Tr=Ve.angle_instanced_arrays,en=Ve.webgl_draw_buffers,$r=Ve.oes_vertex_array_object,Rr={dirty:!0,profile:Le.profile},Pn={},Nn=[],hn={},Fn={};it("dither",3024),it("blend.enable",3042),At("blend.color","blendColor",[0,0,0,0]),At("blend.equation","blendEquationSeparate",[32774,32774]),At("blend.func","blendFuncSeparate",[1,0,1,0]),it("depth.enable",2929,!0),At("depth.func","depthFunc",513),At("depth.range","depthRange",[0,1]),At("depth.mask","depthMask",!0),At("colorMask","colorMask",[!0,!0,!0,!0]),it("cull.enable",2884),At("cull.face","cullFace",1029),At("frontFace","frontFace",2305),At("lineWidth","lineWidth",1),it("polygonOffset.enable",32823),At("polygonOffset.offset","polygonOffset",[0,0]),it("sample.alpha",32926),it("sample.enable",32928),At("sample.coverage","sampleCoverage",[1,!1]),it("stencil.enable",2960),At("stencil.mask","stencilMask",-1),At("stencil.func","stencilFunc",[519,0,-1]),At("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),At("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),it("scissor.enable",3089),At("scissor.box","scissor",[0,0,Te.drawingBufferWidth,Te.drawingBufferHeight]),At("viewport","viewport",[0,0,Te.drawingBufferWidth,Te.drawingBufferHeight]);var ca={gl:Te,context:Ot,strings:Pe,next:Pn,current:Rr,draw:yt,elements:at,buffer:ot,shader:$e,attributes:Nt.state,vao:Nt,uniforms:jt,framebuffer:bt,extensions:Ve,timer:Mt,isBufferArgs:K},sr={primTypes:ke,compareFuncs:wt,blendFuncs:qe,blendEquations:Un,stencilOps:ft,glTypes:_e,orientationType:Ce};en&&(sr.backBuffer=[1029],sr.drawBuffer=n(tt.maxDrawbuffers,function(Bt){return Bt===0?[0]:n(Bt,function(lr){return 36064+lr})}));var Fr=0;return{next:Pn,current:Rr,procs:function(){var Bt=It(),lr=Bt.proc("poll"),mr=Bt.proc("refresh"),Vr=Bt.block();lr(Vr),mr(Vr);var Br,Dr=(br=Bt.shared).gl,Or=br.next,xr=br.current;Vr(xr,".dirty=false;"),$t(Bt,lr),$t(Bt,mr,null,!0),Tr&&(Br=Bt.link(Tr)),Ve.oes_vertex_array_object&&mr(Bt.link(Ve.oes_vertex_array_object),".bindVertexArrayOES(null);");var br=mr.def(br.attributes),_r=mr.def(0),Cr=Bt.cond(_r,".buffer");Cr.then(Dr,".enableVertexAttribArray(i);",Dr,".bindBuffer(",34962,",",_r,".buffer.buffer);",Dr,".vertexAttribPointer(i,",_r,".size,",_r,".type,",_r,".normalized,",_r,".stride,",_r,".offset);").else(Dr,".disableVertexAttribArray(i);",Dr,".vertexAttrib4f(i,",_r,".x,",_r,".y,",_r,".z,",_r,".w);",_r,".buffer=null;");var Wr=Bt.link(tt.maxAttributes,{stable:!0});return mr("for(var i=0;i<",Wr,";++i){",_r,"=",br,"[i];",Cr,"}"),Tr&&mr("for(var i=0;i<",Wr,";++i){",Br,".vertexAttribDivisorANGLE(i,",br,"[i].divisor);","}"),mr(Bt.shared.vao,".currentVAO=null;",Bt.shared.vao,".setVAO(",Bt.shared.vao,".targetVAO);
1212"),Object.keys(hn).forEach(function(Gr){var tn=hn[Gr],nn=Vr.def(Or,".",Gr),vn=Bt.block();vn("if(",nn,"){",Dr,".enable(",tn,")}else{",Dr,".disable(",tn,")}",xr,".",Gr,"=",nn,";"),mr(vn),lr("if(",nn,"!==",xr,".",Gr,"){",vn,"}")}),Object.keys(Fn).forEach(function(Gr){var tn,nn,vn=Fn[Gr],xn=Rr[Gr],bn=Bt.block();bn(Dr,".",vn,"("),p(xn)?(vn=xn.length,tn=Bt.global.def(Or,".",Gr),nn=Bt.global.def(xr,".",Gr),bn(n(vn,function(En){return tn+"["+En+"]"}),");",n(vn,function(En){return nn+"["+En+"]="+tn+"["+En+"];"}).join("")),lr("if(",n(vn,function(En){return tn+"["+En+"]!=="+nn+"["+En+"]"}).join("||"),"){",bn,"}")):(tn=Vr.def(Or,".",Gr),nn=Vr.def(xr,".",Gr),bn(tn,");",xr,".",Gr,"=",tn,";"),lr("if(",tn,"!==",nn,"){",bn,"}")),mr(bn)}),Bt.compile()}(),compile:function(Bt,lr,mr,Vr,Br){var Dr=It();Dr.stats=Dr.link(Br),Object.keys(lr.static).forEach(function(xr){Er(Dr,lr,xr)}),Fe.forEach(function(xr){Er(Dr,Bt,xr)});var Or=Ir(Bt,lr,mr,Vr);return Or.shader.program&&(Or.shader.program.attributes.sort(function(xr,br){return xr.name<br.name?-1:1}),Or.shader.program.uniforms.sort(function(xr,br){return xr.name<br.name?-1:1})),function(xr,br){var _r=xr.proc("draw",1);hr(xr,_r),fr(xr,_r,br.context),$t(xr,_r,br.framebuffer),er(xr,_r,br),ar(xr,_r,br.state),vr(xr,_r,br,!1,!0);var Cr=br.shader.progVar.append(xr,_r);if(_r(xr.shared.gl,".useProgram(",Cr,".program);"),br.shader.program)An(xr,_r,br,br.shader.program);else{_r(xr.shared.vao,".setVAO(null);");var Wr=xr.global.def("{}"),Gr=_r.def(Cr,".id"),tn=_r.def(Wr,"[",Gr,"]");_r(xr.cond(tn).then(tn,".call(this,a0);").else(tn,"=",Wr,"[",Gr,"]=",xr.link(function(nn){return rn(An,xr,br,nn,1)}),"(",Cr,");",tn,".call(this,a0);"))}0<Object.keys(br.state).length&&_r(xr.shared.current,".dirty=true;"),xr.shared.vao&&_r(xr.shared.vao,".setVAO(null);")}(Dr,Or),Xr(Dr,Or),function(xr,br){function _r(xn){return xn.contextDep&&Wr||xn.propDep}var Cr=xr.proc("batch",2);xr.batchId="0",hr(xr,Cr);var Wr=!1,Gr=!0;Object.keys(br.context).forEach(function(xn){Wr=Wr||br.context[xn].propDep}),Wr||(fr(xr,Cr,br.context),Gr=!1);var tn=!1;if((nn=br.framebuffer)?(nn.propDep?Wr=tn=!0:nn.contextDep&&Wr&&(tn=!0),tn||$t(xr,Cr,nn)):$t(xr,Cr,null),br.state.viewport&&br.state.viewport.propDep&&(Wr=!0),er(xr,Cr,br),ar(xr,Cr,br.state,function(xn){return!_r(xn)}),br.profile&&_r(br.profile)||vr(xr,Cr,br,!1,"a1"),br.contextDep=Wr,br.needsContext=Gr,br.needsFramebuffer=tn,(Gr=br.shader.progVar).contextDep&&Wr||Gr.propDep)Mn(xr,Cr,br,null);else if(Gr=Gr.append(xr,Cr),Cr(xr.shared.gl,".useProgram(",Gr,".program);"),br.shader.program)Mn(xr,Cr,br,br.shader.program);else{Cr(xr.shared.vao,".setVAO(null);");var nn=xr.global.def("{}"),vn=(tn=Cr.def(Gr,".id"),Cr.def(nn,"[",tn,"]"));Cr(xr.cond(vn).then(vn,".call(this,a0,a1);").else(vn,"=",nn,"[",tn,"]=",xr.link(function(xn){return rn(Mn,xr,br,xn,2)}),"(",Gr,");",vn,".call(this,a0,a1);"))}0<Object.keys(br.state).length&&Cr(xr.shared.current,".dirty=true;"),xr.shared.vao&&Cr(xr.shared.vao,".setVAO(null);")}(Dr,Or),j(Dr.compile(),{destroy:function(){Or.shader.program.destroy()}})}}}function ee(Te,Pe){for(var Ve=0;Ve<Te.length;++Ve)if(Te[Ve]===Pe)return Ve;return-1}var j=function(Te,Pe){for(var Ve=Object.keys(Pe),tt=0;tt<Ve.length;++tt)Te[Ve[tt]]=Pe[Ve[tt]];return Te},X=0,J={DynamicVariable:m,define:function(Te,Pe){return new m(Te,g(Pe+""))},isDynamic:function(Te){return typeof Te=="function"&&!Te._reglType||Te instanceof m},unbox:function Te(Pe,Ve){return typeof Pe=="function"?new m(0,Pe):typeof Pe=="number"||typeof Pe=="boolean"?new m(5,Pe):Array.isArray(Pe)?new m(6,Pe.map(function(tt,ot){return Te(tt)})):Pe instanceof m?Pe:void 0},accessor:g},re={next:typeof requestAnimationFrame=="function"?function(Te){return requestAnimationFrame(Te)}:function(Te){return setTimeout(Te,16)},cancel:typeof cancelAnimationFrame=="function"?function(Te){return cancelAnimationFrame(Te)}:clearTimeout},ne=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date},se=i();se.zero=i();var oe=function(Te,Pe){var Ve=1;Pe.ext_texture_filter_anisotropic&&(Ve=Te.getParameter(34047));var tt=1,ot=1;
1212Pe.webgl_draw_buffers&&(tt=Te.getParameter(34852),ot=Te.getParameter(36063));var at=!!Pe.oes_texture_float;if(at){at=Te.createTexture(),Te.bindTexture(3553,at),Te.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var _t=Te.createFramebuffer();if(Te.bindFramebuffer(36160,_t),Te.framebufferTexture2D(36160,36064,3553,at,0),Te.bindTexture(3553,null),Te.checkFramebufferStatus(36160)!==36053)at=!1;else{Te.viewport(0,0,1,1),Te.clearColor(1,0,0,1),Te.clear(16384);var bt=se.allocType(5126,4);Te.readPixels(0,0,1,1,6408,5126,bt),Te.getError()?at=!1:(Te.deleteFramebuffer(_t),Te.deleteTexture(at),at=bt[0]===1),se.freeType(bt)}}return bt=!0,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(bt=Te.createTexture(),_t=se.allocType(5121,36),Te.activeTexture(33984),Te.bindTexture(34067,bt),Te.texImage2D(34069,0,6408,3,3,0,6408,5121,_t),se.freeType(_t),Te.bindTexture(34067,null),Te.deleteTexture(bt),bt=!Te.getError()),{colorBits:[Te.getParameter(3410),Te.getParameter(3411),Te.getParameter(3412),Te.getParameter(3413)],depthBits:Te.getParameter(3414),stencilBits:Te.getParameter(3415),subpixelBits:Te.getParameter(3408),extensions:Object.keys(Pe).filter(function(jt){return!!Pe[jt]}),maxAnisotropic:Ve,maxDrawbuffers:tt,maxColorAttachments:ot,pointSizeDims:Te.getParameter(33901),lineWidthDims:Te.getParameter(33902),maxViewportDims:Te.getParameter(3386),maxCombinedTextureUnits:Te.getParameter(35661),maxCubeMapSize:Te.getParameter(34076),maxRenderbufferSize:Te.getParameter(34024),maxTextureUnits:Te.getParameter(34930),maxTextureSize:Te.getParameter(3379),maxAttributes:Te.getParameter(34921),maxVertexUniforms:Te.getParameter(36347),maxVertexTextureUnits:Te.getParameter(35660),maxVaryingVectors:Te.getParameter(36348),maxFragmentUniforms:Te.getParameter(36349),glsl:Te.getParameter(35724),renderer:Te.getParameter(7937),vendor:Te.getParameter(7936),version:Te.getParameter(7938),readFloat:at,npotTextureCube:bt}},pe=function(Te){return Te instanceof Uint8Array||Te instanceof Uint16Array||Te instanceof Uint32Array||Te instanceof Int8Array||Te instanceof Int16Array||Te instanceof Int32Array||Te instanceof Float32Array||Te instanceof Float64Array||Te instanceof Uint8ClampedArray},ce=function(Te){return Object.keys(Te).map(function(Pe){return Te[Pe]})},de={shape:function(Te){for(var Pe=[];Te.length;Te=Te[0])Pe.push(Te.length);return Pe},flatten:function(Te,Pe,Ve,tt){var ot=1;if(Pe.length)for(var at=0;at<Pe.length;++at)ot*=Pe[at];else ot=0;switch(Ve=tt||se.allocType(Ve,ot),Pe.length){case 0:break;case 1:for(tt=Pe[0],Pe=0;Pe<tt;++Pe)Ve[Pe]=Te[Pe];break;case 2:for(tt=Pe[0],Pe=Pe[1],at=ot=0;at<tt;++at)for(var _t=Te[at],bt=0;bt<Pe;++bt)Ve[ot++]=_t[bt];break;case 3:d(Te,Pe[0],Pe[1],Pe[2],Ve,0);break;default:(function jt(Nt,$e,yt,Ot,Mt){for(var Pt=1,Le=yt+1;Le<$e.length;++Le)Pt*=$e[Le];var Xe=$e[yt];if($e.length-yt==4){var it=$e[yt+1],At=$e[yt+2];for($e=$e[yt+3],Le=0;Le<Xe;++Le)d(Nt[Le],it,At,$e,Ot,Mt),Mt+=Pt}else for(Le=0;Le<Xe;++Le)jt(Nt[Le],$e,yt+1,Ot,Mt),Mt+=Pt})(Te,Pe,0,Ve,0)}return Ve}},xe={"[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},_e={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},we={dynamic:35048,stream:35040,static:35044},Ee=de.flatten,fe=de.shape,ge=[];ge[5120]=1,ge[5122]=2,ge[5124]=4,ge[5121]=1,ge[5123]=2,ge[5125]=4,ge[5126]=4;var ke={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},be=new Float32Array(1),Se=new Uint32Array(be.buffer),Oe=[9984,9986,9985,9987],De=[0,6409,6410,6407,6408],je={};je[6409]=je[6406]=je[6402]=1,je[34041]=je[6410]=2,je[6407]=je[35904]=3,je[6408]=je[35906]=4;var Je=s("HTMLCanvasElement"),ze=s("OffscreenCanvas"),Ue=s("CanvasRenderingContext2D"),Ge=s("ImageBitmap"),Ye=s("HTMLImageElement"),et=s("HTMLVideoElement"),ct=Object.keys(xe).concat([Je,ze,Ue,Ge,Ye,et]),mt=[];mt[5121]=1,mt[5126]=4,mt[36193]=2,mt[5123]=2,mt[5125]=4;var Ct=[];Ct[32854]=2,Ct[32855]=2,Ct[36194]=2,Ct[34041]=4,Ct[33776]=.5,Ct[33777]=.5,Ct[33778]=1,Ct[33779]=1,Ct[35986]=.5,Ct[35987]=1,Ct[34798]=1,Ct[35840]=.5,Ct[35841]=.25,Ct[35842]=.5,Ct[35843]=.25,Ct[36196]=.5;var Tt=[];Tt[32854]=2,Tt[32855]=2,Tt[36194]=2,Tt[33189]=2,Tt[36168]=1,Tt[34041]=4,Tt[35907]=4,Tt[34836]=16,Tt[34842]=8,Tt[34843]=6;var nt=function(Te,Pe,Ve,tt,ot){function at(yt){this.id=Nt++,this.refCount=1,this.renderbuffer=yt,this.format=32854,this.height=this.width=0,ot.profile&&(this.stats={size:0})}function _t(yt){var Ot=yt.renderbuffer;Te.bindRenderbuffer(36161,null),Te.deleteRenderbuffer(Ot),yt.renderbuffer=null,yt.refCount=0,delete $e[yt.id],tt.renderbufferCount--}var bt={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};Pe.ext_srgb&&(bt.srgba=35907),Pe.ext_color_buffer_half_float&&(bt.rgba16f=34842,bt.rgb16f=34843),Pe.webgl_c
1212olor_buffer_float&&(bt.rgba32f=34836);var jt=[];Object.keys(bt).forEach(function(yt){jt[bt[yt]]=yt});var Nt=0,$e={};return at.prototype.decRef=function(){0>=--this.refCount&&_t(this)},ot.profile&&(tt.getTotalRenderbufferSize=function(){var yt=0;return Object.keys($e).forEach(function(Ot){yt+=$e[Ot].stats.size}),yt}),{create:function(yt,Ot){function Mt(Le,Xe){var it=0,At=0,It=32854;if(typeof Le=="object"&&Le?("shape"in Le?(it=0|(At=Le.shape)[0],At=0|At[1]):("radius"in Le&&(it=At=0|Le.radius),"width"in Le&&(it=0|Le.width),"height"in Le&&(At=0|Le.height)),"format"in Le&&(It=bt[Le.format])):typeof Le=="number"?(it=0|Le,At=typeof Xe=="number"?0|Xe:it):Le||(it=At=1),it!==Pt.width||At!==Pt.height||It!==Pt.format)return Mt.width=Pt.width=it,Mt.height=Pt.height=At,Pt.format=It,Te.bindRenderbuffer(36161,Pt.renderbuffer),Te.renderbufferStorage(36161,It,it,At),ot.profile&&(Pt.stats.size=Tt[Pt.format]*Pt.width*Pt.height),Mt.format=jt[Pt.format],Mt}var Pt=new at(Te.createRenderbuffer());return $e[Pt.id]=Pt,tt.renderbufferCount++,Mt(yt,Ot),Mt.resize=function(Le,Xe){var it=0|Le,At=0|Xe||it;return it===Pt.width&&At===Pt.height||(Mt.width=Pt.width=it,Mt.height=Pt.height=At,Te.bindRenderbuffer(36161,Pt.renderbuffer),Te.renderbufferStorage(36161,Pt.format,it,At),ot.profile&&(Pt.stats.size=Tt[Pt.format]*Pt.width*Pt.height)),Mt},Mt._reglType="renderbuffer",Mt._renderbuffer=Pt,ot.profile&&(Mt.stats=Pt.stats),Mt.destroy=function(){Pt.decRef()},Mt},clear:function(){ce($e).forEach(_t)},restore:function(){ce($e).forEach(function(yt){yt.renderbuffer=Te.createRenderbuffer(),Te.bindRenderbuffer(36161,yt.renderbuffer),Te.renderbufferStorage(36161,yt.format,yt.width,yt.height)}),Te.bindRenderbuffer(36161,null)}}},Qe=[];Qe[6408]=4,Qe[6407]=3;var Et=[];Et[5121]=1,Et[5126]=4,Et[36193]=2;var Gt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Xt=["x","y","z","w"],Fe="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),qe={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},wt={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},ft={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ce={cw:2304,ccw:2305},Ie=new W(!1,!1,!1,function(){});return function(Te){function Pe(){if(mn.length===0)Zt&&Zt.update(),on=null;else{on=re.next(Pe),$e();for(var Tr=mn.length-1;0<=Tr;--Tr){var en=mn[Tr];en&&en(Ir,null,0)}Mt.flush(),Zt&&Zt.update()}}function Ve(){!on&&0<mn.length&&(on=re.next(Pe))}function tt(){on&&(re.cancel(Pe),on=null)}function ot(Tr){Tr.preventDefault(),tt(),Mn.forEach(function(en){en()})}function at(Tr){Mt.getError(),Le.restore(),hr.restore(),$t.restore(),vr.restore(),Pr.restore(),Ur.restore(),ar.restore(),Zt&&Zt.restore(),qr.procs.refresh(),Ve(),Xr.forEach(function(en){en()})}function _t(Tr){function en(Bt,lr){var mr={},Vr={};return Object.keys(Bt).forEach(function(Br){var Dr=Bt[Br];if(J.isDynamic(Dr))Vr[Br]=J.unbox(Dr,Br);else{if(lr&&Array.isArray(Dr)){for(var Or=0;Or<Dr.length;++Or)if(J.isDynamic(Dr[Or]))return void(Vr[Br]=J.unbox(Dr,Br))}mr[Br]=Dr}}),{dynamic:Vr,static:mr}}var $r=en(Tr.context||{},!0),Rr=en(Tr.uniforms||{},!0),Pn=en(Tr.attributes||{},!1);Tr=en(function(Bt){function lr(Vr){if(Vr in mr){var Br=mr[Vr];delete mr[Vr],Object.keys(Br).forEach(function(Dr){mr[Vr+"."+Dr]=Br[Dr]})}}var mr=j({},Bt);return delete mr.uniforms,delete mr.attributes,delete mr.context,delete mr.vao,"stencil"in mr&&mr.stencil.op&&(mr.stencil.opBack=mr.stencil.opFront=mr.stencil.op,delete mr.stencil.op),lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Bt&&(mr.vao=Bt.vao),mr}(Tr),!1);var Nn={gpuTime:0,cpuTime:0,count:0},hn=qr.compile(Tr,Pn,Rr,$r,Nn),Fn=hn.draw,ca=hn.batch,sr=hn.scope,Fr=[];return j(function(Bt,lr){var mr;if(typeof Bt=="function")return sr.call(this,null,Bt,0);if(typeof lr=="function")if(typeof Bt=="number")for(mr=0;mr<Bt;++mr)sr.call(this,null,lr,mr);else{if(!Array.isArray(Bt))return sr.call(this,Bt,lr,0);for(mr=0;mr<Bt.length;++mr)sr.call(this,Bt[mr],lr,mr)}else if(typeof Bt=="number"){if(0<Bt)return ca.call(this,function(Vr){for(;Fr.length<Vr;)Fr.push(null);return Fr}(0|Bt),0|Bt)}else{if(!Array.isArray(Bt))return Fn.call(this,Bt);if(Bt.length)return ca.call(this,Bt,Bt.length)}},{stats:Nn,destroy:function(){hn.destroy()}})}function bt(Tr,en){var $r=0;qr.procs.poll();var Rr=en.color;Rr&&(Mt.clearColor(+Rr[0]||0,+Rr[1]||0,+Rr[2]||0,+Rr[3]||0),$r|=16384),"depth"in en&&(Mt.clearDepth(+en.depth),$r|=256),"stencil"in en&&(Mt.clearStencil(0|en.stencil),$r|=1024),Mt.clear($r)}function jt(Tr){return mn.push(Tr),Ve(),{cancel:function(){var en=ee(mn,Tr);mn[en]=function $r(){var Rr=ee(mn,$r);mn[Rr]=mn[mn.length-1],--mn.length,0>=mn.length&&tt()}}}}function Nt(){var Tr=rn.viewport,en=rn.scissor_box;Tr[0]=Tr[1]=en[0]=en[1]=0,Ir.viewportWidth=Ir.framebufferWidth=Ir.drawingBufferWidth=Tr[2]=en[2]=Mt.drawingBufferWidth,Ir.viewportHe
1212ight=Ir.framebufferHeight=Ir.drawingBufferHeight=Tr[3]=en[3]=Mt.drawingBufferHeight}function $e(){Ir.tick+=1,Ir.time=Ot(),Nt(),qr.procs.poll()}function yt(){vr.refresh(),Nt(),qr.procs.refresh(),Zt&&Zt.update()}function Ot(){return(ne()-Jt)/1e3}if(!(Te=e(Te)))return null;var Mt=Te.gl,Pt=Mt.getContextAttributes();Mt.isContextLost();var Le=function(Tr,en){function $r(hn){var Fn;hn=hn.toLowerCase();try{Fn=Rr[hn]=Tr.getExtension(hn)}catch{}return!!Fn}for(var Rr={},Pn=0;Pn<en.extensions.length;++Pn){var Nn=en.extensions[Pn];if(!$r(Nn))return en.onDestroy(),en.onDone('"'+Nn+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return en.optionalExtensions.forEach($r),{extensions:Rr,restore:function(){Object.keys(Rr).forEach(function(hn){if(Rr[hn]&&!$r(hn))throw Error("(regl): error restoring extension "+hn)})}}}(Mt,Te);if(!Le)return null;var Xe=function(){var Tr={"":0},en=[""];return{id:function($r){var Rr=Tr[$r];return Rr||(Rr=Tr[$r]=en.length,en.push($r),Rr)},str:function($r){return en[$r]}}}(),it={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},At=Te.cachedCode||{},It=Le.extensions,Zt=function(Tr,en){function $r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function Rr(Fr,Bt,lr){var mr=hn.pop()||new $r;mr.startQueryIndex=Fr,mr.endQueryIndex=Bt,mr.sum=0,mr.stats=lr,Fn.push(mr)}if(!en.ext_disjoint_timer_query)return null;var Pn=[],Nn=[],hn=[],Fn=[],ca=[],sr=[];return{beginQuery:function(Fr){var Bt=Pn.pop()||en.ext_disjoint_timer_query.createQueryEXT();en.ext_disjoint_timer_query.beginQueryEXT(35007,Bt),Nn.push(Bt),Rr(Nn.length-1,Nn.length,Fr)},endQuery:function(){en.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:Rr,update:function(){var Fr,Bt;if((Fr=Nn.length)!==0){sr.length=Math.max(sr.length,Fr+1),ca.length=Math.max(ca.length,Fr+1),ca[0]=0;var lr=sr[0]=0;for(Bt=Fr=0;Bt<Nn.length;++Bt){var mr=Nn[Bt];en.ext_disjoint_timer_query.getQueryObjectEXT(mr,34919)?(lr+=en.ext_disjoint_timer_query.getQueryObjectEXT(mr,34918),Pn.push(mr)):Nn[Fr++]=mr,ca[Bt+1]=lr,sr[Bt+1]=Fr}for(Nn.length=Fr,Bt=Fr=0;Bt<Fn.length;++Bt){var Vr=(lr=Fn[Bt]).startQueryIndex;mr=lr.endQueryIndex,lr.sum+=ca[mr]-ca[Vr],Vr=sr[Vr],(mr=sr[mr])===Vr?(lr.stats.gpuTime+=lr.sum/1e6,hn.push(lr)):(lr.startQueryIndex=Vr,lr.endQueryIndex=mr,Fn[Fr++]=lr)}Fn.length=Fr}},getNumPendingQueries:function(){return Nn.length},clear:function(){Pn.push.apply(Pn,Nn);for(var Fr=0;Fr<Pn.length;Fr++)en.ext_disjoint_timer_query.deleteQueryEXT(Pn[Fr]);Nn.length=0,Pn.length=0},restore:function(){Nn.length=0,Pn.length=0}}}(0,It),Jt=ne(),Vt=Mt.drawingBufferWidth,pr=Mt.drawingBufferHeight,Ir={tick:0,time:0,viewportWidth:Vt,viewportHeight:pr,framebufferWidth:Vt,framebufferHeight:pr,drawingBufferWidth:Vt,drawingBufferHeight:pr,pixelRatio:Te.pixelRatio},fr=(Vt={elements:null,primitive:4,count:-1,offset:0,instances:-1},oe(Mt,It)),$t=f(Mt,it,Te,function(Tr){return ar.destroyBuffer(Tr)}),er=o(Mt,It,$t,it),ar=P(Mt,It,fr,it,$t,er,Vt),hr=S(Mt,Xe,it,Te),vr=L(Mt,It,fr,function(){qr.procs.poll()},Ir,it,Te),Pr=nt(Mt,It,0,it,Te),Ur=A(Mt,It,fr,vr,Pr,it),qr=U(Mt,Xe,It,fr,$t,er,0,Ur,{},ar,hr,Vt,Ir,Zt,At,Te),rn=(Xe=E(Mt,Ur,qr.procs.poll,Ir),qr.next),An=Mt.canvas,mn=[],Mn=[],Xr=[],Er=[Te.onDestroy],on=null;An&&(An.addEventListener("webglcontextlost",ot,!1),An.addEventListener("webglcontextrestored",at,!1));var Un=Ur.setFBO=_t({framebuffer:J.define.call(null,1,"framebuffer")});return yt(),Pt=j(_t,{clear:function(Tr){if("framebuffer"in Tr)if(Tr.framebuffer&&Tr.framebuffer_reglType==="framebufferCube")for(var en=0;6>en;++en)Un(j({framebuffer:Tr.framebuffer.faces[en]},Tr),bt);else Un(Tr,bt);else bt(0,Tr)},prop:J.define.bind(null,1),context:J.define.bind(null,2),this:J.define.bind(null,3),draw:_t({}),buffer:function(Tr){return $t.create(Tr,34962,!1,!1)},elements:function(Tr){return er.create(Tr,!1)},texture:vr.create2D,cube:vr.createCube,renderbuffer:Pr.create,framebuffer:Ur.create,framebufferCube:Ur.createCube,vao:ar.createVAO,attributes:Pt,frame:jt,on:function(Tr,en){var $r;switch(Tr){case"frame":return jt(en);case"lost":$r=Mn;break;case"restore":$r=Xr;break;
1212case"destroy":$r=Er}return $r.push(en),{cancel:function(){for(var Rr=0;Rr<$r.length;++Rr)if($r[Rr]===en){$r[Rr]=$r[$r.length-1],$r.pop();break}}}},limits:fr,hasExtension:function(Tr){return 0<=fr.extensions.indexOf(Tr.toLowerCase())},read:Xe,destroy:function(){mn.length=0,tt(),An&&(An.removeEventListener("webglcontextlost",ot),An.removeEventListener("webglcontextrestored",at)),hr.clear(),Ur.clear(),Pr.clear(),ar.clear(),vr.clear(),er.clear(),$t.clear(),Zt&&Zt.clear(),Er.forEach(function(Tr){Tr()})},_gl:Mt,_refresh:yt,poll:function(){$e(),Zt&&Zt.update()},now:Ot,stats:it,getCachedCode:function(){return At},preloadCachedCode:function(Tr){Object.entries(Tr).forEach(function(en){At[en[0]]=en[1]})}}),Te.onDone(null,Pt),Pt}})},{}],284:[function(v,$,te){var m=v("buffer"),g=m.Buffer;function b(e,n){for(var t in e)n[t]=e[t]}function y(e,n,t){return g(e,n,t)}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?$.exports=m:(b(m,te),te.Buffer=y),y.prototype=Object.create(g.prototype),b(g,y),y.from=function(e,n,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return g(e,n,t)},y.alloc=function(e,n,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=g(e);return n!==void 0?typeof t=="string"?i.fill(n,t):i.fill(n):i.fill(0),i},y.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return g(e)},y.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return m.SlowBuffer(e)}},{buffer:85}],285:[function(v,$,te){$.exports=g;var m=v("events").EventEmitter;function g(){m.call(this)}v("inherits")(g,m),g.Readable=v("readable-stream/lib/_stream_readable.js"),g.Writable=v("readable-stream/lib/_stream_writable.js"),g.Duplex=v("readable-stream/lib/_stream_duplex.js"),g.Transform=v("readable-stream/lib/_stream_transform.js"),g.PassThrough=v("readable-stream/lib/_stream_passthrough.js"),g.finished=v("readable-stream/lib/internal/streams/end-of-stream.js"),g.pipeline=v("readable-stream/lib/internal/streams/pipeline.js"),g.Stream=g,g.prototype.pipe=function(b,y){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||y&&y.end===!1||(e.on("end",r),e.on("close",d));var i=!1;function r(){i||(i=!0,b.end())}function d(){i||(i=!0,typeof b.destroy=="function"&&b.destroy())}function l(u){if(a(),m.listenerCount(this,"error")===0)throw u}function a(){e.removeListener("data",n),b.removeListener("drain",t),e.removeListener("end",r),e.removeListener("close",d),e.removeListener("error",l),b.removeListener("error",l),e.removeListener("end",a),e.removeListener("close",a),b.removeListener("close",a)}return e.on("error",l),b.on("error",l),e.on("end",a),e.on("close",a),b.on("close",a),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(v,$,te){var m={};function g(y,e,n){n||(n=Error);var t=function(i){var r,d;function l(a,u,f){return i.call(this,function(o,h,p){return typeof e=="string"?e:e(o,h,p)}(a,u,f))||this}return d=i,(r=l).prototype=Object.create(d.prototype),r.prototype.constructor=r,r.__proto__=d,l}(n);t.prototype.name=n.name,t.prototype.code=y,m[y]=t}function b(y,e){if(Array.isArray(y)){var n=y.length;return y=y.map(function(t){return String(t)}),n>2?"one of ".concat(e," ").concat(y.slice(0,n-1).join(", "),", or ")+y[n-1]:n===2?"one of ".concat(e," ").concat(y[0]," or ").concat(y[1]):"of ".concat(e," ").concat(y[0])}return"of ".concat(e," ").concat(String(y))}g("ERR_INVALID_OPT_VALUE",function(y,e){return'The value "'+e+'" is invalid for option "'+y+'"'},TypeError),g("ERR_INVALID_ARG_TYPE",function(y,e,n){var t,i,r;if(typeof e=="string"&&(i="not ",e.substr(0,i.length)===i)?(t="must not be",e=e.replace(/^not /,"")):t="must be",function(l,a,u){return(u===void 0||u>l.length)&&(u=l.length),l.substring(u-a.length,u)===a}(y," argument"))r="The ".concat(y," ").concat(t," ").concat(b(e,"type"));else{var d=function(l,a,u){return typeof u!="number"&&(u=0),!(u+a.length>l.length)&&l.indexOf(a,u)!==-1}(y,".")?"property":"argument";r='The "'.concat(y,'" ').concat(d," ").concat(t," ").concat(b(e,"type"))}return r+=". Received type ".concat(typeof n)},TypeError),g("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),g("ERR_METHOD_NOT_IMPLEMENT
1212ED",function(y){return"The "+y+" method is not implemented"}),g("ERR_STREAM_PREMATURE_CLOSE","Premature close"),g("ERR_STREAM_DESTROYED",function(y){return"Cannot call "+y+" after a stream was destroyed"}),g("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),g("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),g("ERR_STREAM_WRITE_AFTER_END","write after end"),g("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),g("ERR_UNKNOWN_ENCODING",function(y){return"Unknown encoding: "+y},TypeError),g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$.exports.codes=m},{}],287:[function(v,$,te){(function(m){(function(){var g=Object.keys||function(l){var a=[];for(var u in l)a.push(u);return a};$.exports=i;var b=v("./_stream_readable"),y=v("./_stream_writable");v("inherits")(i,b);for(var e=g(y.prototype),n=0;n<e.length;n++){var t=e[n];i.prototype[t]||(i.prototype[t]=y.prototype[t])}function i(l){if(!(this instanceof i))return new i(l);b.call(this,l),y.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",r)))}function r(){this._writableState.ended||m.nextTick(d,this)}function d(l){l.end()}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(i.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(i.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(i.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(l){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=l,this._writableState.destroyed=l)}})}).call(this)}).call(this,v("_process"))},{"./_stream_readable":289,"./_stream_writable":291,_process:277,inherits:231}],288:[function(v,$,te){$.exports=g;var m=v("./_stream_transform");function g(b){if(!(this instanceof g))return new g(b);m.call(this,b)}v("inherits")(g,m),g.prototype._transform=function(b,y,e){e(null,b)}},{"./_stream_transform":290,inherits:231}],289:[function(v,$,te){(function(m,g){(function(){var b;$.exports=k,k.ReadableState=w,v("events").EventEmitter;var y=function(R,N){return R.listeners(N).length},e=v("./internal/streams/stream"),n=v("buffer").Buffer,t=g.Uint8Array||function(){},i,r=v("util");i=r&&r.debuglog?r.debuglog("stream"):function(){};var d,l,a,u=v("./internal/streams/buffer_list"),f=v("./internal/streams/destroy"),o=v("./internal/streams/state").getHighWaterMark,h=v("../errors").codes,p=h.ERR_INVALID_ARG_TYPE,s=h.ERR_STREAM_PUSH_AFTER_EOF,x=h.ERR_METHOD_NOT_IMPLEMENTED,c=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;v("inherits")(k,e);var T=f.errorOrDestroy,_=["error","close","destroy","pause","resume"];function w(R,N,U){b=b||v("./_stream_duplex"),R=R||{},typeof U!="boolean"&&(U=N instanceof b),this.objectMode=!!R.objectMode,U&&(this.objectMode=this.objectMode||!!R.readableObjectMode),this.highWaterMark=o(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=v("string_decoder/").StringDecoder),this.decoder=new d(R.encoding),this.encoding=R.encoding)}function k(R){if(b=b||v("./_stream_duplex"),!(this instanceof k))return new k(R);var N=this instanceof b;this._readableState=new w(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,ee,j){i("readableAddChunk",N);var X,J=R._readableState;if(N===null)J.reading=!1,function(re,ne){if(i("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)T(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)),ee)J.endEmitted?T(R,new c):A(R,J,N,!0);else if(J.ended)T(R,new s);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 ee||(J.reading=!1,E(R,J));return!J.ended&&(J.length<J.highWaterMark||J.length===0)}function A(R,N,U,ee){N.flowing&&N.length===0&&!N.sync?(N.awaitDrain=0,R.emit("data",U)):(N.length+=N.objectMode?1:U.length,ee?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,ee=this._readableState;
1212return ee.objectMode?U=!0:typeof R=="string"&&((N=N||ee.defaultEncoding)!==ee.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=v("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,ee="";U!==null;)ee+=N.write(U.data),U=U.next;return this._readableState.buffer.clear(),ee!==""&&this._readableState.buffer.push(ee),this._readableState.length=ee.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;i("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(i("emitReadable",N.flowing),N.emittedReadable=!0,m.nextTick(S,R))}function S(R){var N=R._readableState;i("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,m.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(i("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){i("readable nexttick read 0"),R.read(0)}function V(R,N){i("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(i("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 G(R){var N=R._readableState;i("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,m.nextTick(W,N,R))}function W(R,N){if(i("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 Q(R,N){for(var U=0,ee=R.length;U<ee;U++)if(R[U]===N)return U;return-1}k.prototype.read=function(R){i("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 i("read: emitReadable",N.length,N.ended),N.length===0&&N.ended?G(this):P(this),null;if((R=I(R,N))===0&&N.ended)return N.length===0&&G(this),null;var ee,j=N.needReadable;return i("need readable",j),(N.length===0||N.length-R<N.highWaterMark)&&i("length less than watermark",j=!0),N.ended||N.reading?i("reading or ended",j=!1):j&&(i("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))),(ee=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&&G(this)),ee!==null&&this.emit("data",ee),ee},k.prototype._read=function(R){T(this,new x("_read()"))},k.prototype.pipe=function(R,N){var U=this,ee=this._readableState;switch(ee.pipesCount){case 0:ee.pipes=R;break;case 1:ee.pipes=[ee.pipes,R];break;default:ee.pipes.push(R)}ee.pipesCount+=1,i("pipe count=%d opts=%j",ee.pipesCount,N);var j=(!N||N.end!==!1)&&R!==m.stdout&&R!==m.stderr?J:de;function X(xe,_e){i("onunpipe"),xe===U&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,i("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,!ee.awaitDrain||R._writableState&&!R._writableState.needDrain||re())}function J(){i("onend"),R.end()}ee.endEmitted?m.nextTick(j):U.once("end",j),R.on("unpipe",X);var re=function(xe){return function(){var _e=xe._readableState;i("pipeOnDrain",_e.awaitDrain),_e.awaitDrain&&_e.awaitDrain--,_e.awaitDrain===0&&y(xe,"data")&&(_e.flowing=!0,Z(xe))}}(U);R.on("drain",re);var ne=!1;function se(xe){i("ondata");var _e=R.write(xe);i("dest.write",_e),_e===!1&&((ee.pipesCount===1&&ee.pipes===R||ee.pipesCount>1&&Q(ee.pipes,R)!==-1)&&!ne&&(i("false write response, pause",ee.awaitDrain),ee.awaitDrain++),U.pause())}function oe(xe){i("onerror",xe),de(),R.removeListener("error",oe),y(R,"error")===0&&T(R,xe)}function pe(){R.removeListener("finish",ce),de()}function ce(){i("onfinish"),R.removeListener("close",pe),de()}function de(){i("unpipe"),U.unpipe(R)}return U.on("data",se),function(xe,_e,we){if(typeof xe.prependListener=="function")return xe.prependListener(_e,we);xe._events&&xe._events[_e]?Array.isArray(xe._events[_e])?xe._events[_e].unshift(we):xe._events[_e]=[we,xe._events[_e]]:xe.on(_e,we)}(R,"error",oe),R.once("close",pe),R.once("finish",ce),R.emit("pipe",U),ee.flowing||(i("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)
1212),this;if(!R){var ee=N.pipes,j=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var X=0;X<j;X++)ee[X].emit("unpipe",this,{hasUnpiped:!1});return this}var J=Q(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),ee=this._readableState;return R==="data"?(ee.readableListening=this.listenerCount("readable")>0,ee.flowing!==!1&&this.resume()):R==="readable"&&(ee.endEmitted||ee.readableListening||(ee.readableListening=ee.needReadable=!0,ee.flowing=!1,ee.emittedReadable=!1,i("on readable",ee.length,ee.reading),ee.length?P(this):ee.reading||m.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"&&m.nextTick(F,this),U},k.prototype.removeAllListeners=function(R){var N=e.prototype.removeAllListeners.apply(this,arguments);return R!=="readable"&&R!==void 0||m.nextTick(F,this),N},k.prototype.resume=function(){var R=this._readableState;return R.flowing||(i("resume"),R.flowing=!R.readableListening,function(N,U){U.resumeScheduled||(U.resumeScheduled=!0,m.nextTick(V,N,U))}(this,R)),R.paused=!1,this},k.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(R){var N=this,U=this._readableState,ee=!1;for(var j in R.on("end",function(){if(i("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){i("wrapped data"),U.decoder&&(J=U.decoder.write(J)),U.objectMode&&J==null||(U.objectMode||J&&J.length)&&(N.push(J)||(ee=!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){i("wrapped _read",J),ee&&(ee=!1,R.resume())},this},typeof Symbol=="function"&&(k.prototype[Symbol.asyncIterator]=function(){return l===void 0&&(l=v("./internal/streams/async_iterator")),l(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 a===void 0&&(a=v("./internal/streams/from")),a(k,R,N)})}).call(this)}).call(this,v("_process"),typeof Gi<"u"?Gi: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(v,$,te){$.exports=i;var m=v("../errors").codes,g=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_MULTIPLE_CALLBACK,y=m.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=m.ERR_TRANSFORM_WITH_LENGTH_0,n=v("./_stream_duplex");function t(l,a){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,a!=null&&this.push(a),f(l);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function i(l){if(!(this instanceof i))return new i(l);n.call(this,l),this._transformState={afterTransform:t.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",r)}function r(){var l=this;typeof this._flush!="function"||this._readableState.destroyed?d(this,null,null):this._flush(function(a,u){d(l,a,u)})}function d(l,a,u){if(a)return l.emit("error",a);if(u!=null&&l.push(u),l._writableState.length)throw new e;if(l._transformState.transforming)throw new y;return l.push(null)}v("inherits")(i,n),i.prototype.push=function(l,a){return this._transformState.needTransform=!1,n.prototype.push.call(this,l,a)},i.prototype._transform=function(l,a,u){u(new g("_transform()"))},i.prototype._write=function(l,a,u){var f=this._transformState;if(f.writecb=u,f.writechunk=l,f.writeencoding=a,!f.transforming){var o=this._readableState;(f.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},i.prototype._read=function(l){var a=this._transformState;a.writechunk===null||a.transforming?a.needTransform=!0:(a.transforming=!0,this._transform(a.writechunk,a.writeencoding,a.afterTransform))},i.prototype._destroy=function(l,a){n.prototype._destroy.call(this,l,function(u){a(u)})}},{"../errors":286,"./_stream_duplex":287,inherits:231}],291:[function(v,$,te){(function(m,g){(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 G=K.callback;
1212V.pendingcb--,G(Z),K=K.next}V.corkedRequestsFree.next=H})(F,D)}}var y;$.exports=k,k.WritableState=w;var e={deprecate:v("util-deprecate")},n=v("./internal/streams/stream"),t=v("buffer").Buffer,i=g.Uint8Array||function(){},r,d=v("./internal/streams/destroy"),l=v("./internal/streams/state").getHighWaterMark,a=v("../errors").codes,u=a.ERR_INVALID_ARG_TYPE,f=a.ERR_METHOD_NOT_IMPLEMENTED,o=a.ERR_MULTIPLE_CALLBACK,h=a.ERR_STREAM_CANNOT_PIPE,p=a.ERR_STREAM_DESTROYED,s=a.ERR_STREAM_NULL_VALUES,x=a.ERR_STREAM_WRITE_AFTER_END,c=a.ERR_UNKNOWN_ENCODING,T=d.errorOrDestroy;function _(){}function w(D,F,H){y=y||v("./_stream_duplex"),D=D||{},typeof H!="boolean"&&(H=F instanceof y),this.objectMode=!!D.objectMode,H&&(this.objectMode=this.objectMode||!!D.writableObjectMode),this.highWaterMark=l(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,G){var W=K._writableState,Q=W.sync,R=W.writecb;if(typeof R!="function")throw new o;if(function(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}(W),G)(function(U,ee,j,X,J){--ee.pendingcb,j?(m.nextTick(J,X),m.nextTick(E,U,ee),U._writableState.errorEmitted=!0,T(U,X)):(J(X),U._writableState.errorEmitted=!0,T(U,X),E(U,ee))})(K,W,Q,G,R);else{var N=P(W)||K.destroyed;N||W.corked||W.bufferProcessing||!W.bufferedRequest||I(K,W),Q?m.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(y=y||v("./_stream_duplex"));if(!F&&!r.call(k,this))return new k(D);this._writableState=new w(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,G){F.writelen=V,F.writecb=G,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 G=0,W=!0;H;)Z[G]=H,H.isBuf||(W=!1),H=H.next,G+=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 Q=H.chunk,R=H.encoding,N=H.callback;if(L(D,F,!1,F.objectMode?1:Q.length,Q,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&&T(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,m.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}v("inherits")(k,n),w.prototype.getBuffer=function(){for(var D=this.bufferedRequest,F=[];D;)F.push(D),D=D.next;return F},function(){try{Object.defineProperty(w.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 w}})):r=function(D){return D instanceof this},k.prototype.pipe=function(){T(this,new h)},k.prototype.write=function(D,F,H){var V,Z=this._writableState,K=!1,G=!Z.objectMode&&(V=D,t.isBuffer(V)||V instanceof i);return G&&!t.isBuffer(D)&&(D=function(W){return t.from(W)}(D)),typeof F=="function"&&(H=F,F=null),G?F="buffer":F||(F=Z.defaultEncoding),typeof H!="function"&&(H=_),Z.ending?function(W,Q){var R=new x;T(W,R),m.nextTick(Q,R)}(this,H):(G||function(W,Q,R,N){var U;
1212return R===null?U=new s:typeof R=="string"||Q.objectMode||(U=new u("chunk",["string","Buffer"],R)),!U||(T(W,U),m.nextTick(N,U),!1)}(this,Z,D,H))&&(Z.pendingcb++,K=function(W,Q,R,N,U,ee){if(!R){var j=function(ne,se,oe){return ne.objectMode||ne.decodeStrings===!1||typeof se!="string"||(se=t.from(se,oe)),se}(Q,N,U);N!==j&&(R=!0,U="buffer",N=j)}var X=Q.objectMode?1:N.length;Q.length+=X;var J=Q.length<Q.highWaterMark;if(J||(Q.needDrain=!0),Q.writing||Q.corked){var re=Q.lastBufferedRequest;Q.lastBufferedRequest={chunk:N,encoding:U,isBuf:R,callback:ee,next:null},re?re.next=Q.lastBufferedRequest:Q.bufferedRequest=Q.lastBufferedRequest,Q.bufferedRequestCount+=1}else L(W,Q,!1,X,N,U,ee);return J}(this,Z,G,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 c(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,G){K.ending=!0,E(Z,K),G&&(K.finished?m.nextTick(G):Z.once("finish",G)),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,v("_process"),typeof Gi<"u"?Gi: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(v,$,te){(function(m){(function(){var g;function b(p,s,x){return s in p?Object.defineProperty(p,s,{value:x,enumerable:!0,configurable:!0,writable:!0}):p[s]=x,p}var y=v("./end-of-stream"),e=Symbol("lastResolve"),n=Symbol("lastReject"),t=Symbol("error"),i=Symbol("ended"),r=Symbol("lastPromise"),d=Symbol("handlePromise"),l=Symbol("stream");function a(p,s){return{value:p,done:s}}function u(p){var s=p[e];if(s!==null){var x=p[l].read();x!==null&&(p[r]=null,p[e]=null,p[n]=null,s(a(x,!1)))}}function f(p){m.nextTick(u,p)}var o=Object.getPrototypeOf(function(){}),h=Object.setPrototypeOf((b(g={get stream(){return this[l]},next:function(){var p=this,s=this[t];if(s!==null)return Promise.reject(s);if(this[i])return Promise.resolve(a(void 0,!0));if(this[l].destroyed)return new Promise(function(_,w){m.nextTick(function(){p[t]?w(p[t]):_(a(void 0,!0))})});var x,c=this[r];if(c)x=new Promise(function(_,w){return function(k,L){_.then(function(){w[i]?k(a(void 0,!0)):w[d](k,L)},L)}}(c,this));else{var T=this[l].read();if(T!==null)return Promise.resolve(a(T,!1));x=new Promise(this[d])}return this[r]=x,x}},Symbol.asyncIterator,function(){return this}),b(g,"return",function(){var p=this;return new Promise(function(s,x){p[l].destroy(null,function(c){c?x(c):s(a(void 0,!0))})})}),g),o);$.exports=function(p){var s,x=Object.create(h,(b(s={},l,{value:p,writable:!0}),b(s,e,{value:null,writable:!0}),b(s,n,{value:null,writable:!0}),b(s,t,{value:null,writable:!0}),b(s,i,{value:p._readableState.endEmitted,writable:!0}),b(s,d,{value:function(c,T){var _=x[l].read();_?(x[r]=null,x[e]=null,x[n]=null,c(a(_,!1))):(x[e]=c,x[n]=T)},writable:!0}),s));return x[r]=null,y(p,function(c){if(c&&c.code!=="ERR_STREAM_PREMATURE_CLOSE"){var T=x[n];return T!==null&&(x[r]=null,x[e]=null,x[n]=null,T(c)),void(x[t]=c)}var _=x[e];_!==null&&(x[r]=null,x[e]=null,x[n]=null,_(a(void 0,!0))),x[i]=!0}),p.on("readable",f.bind(null,x)),x}}).call(this)}).call(this,v("_process"))},{"./end-of-stream":295,_process:277}],293:[function(v,$,te){function m(t,i){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(t);i&&(d=d.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,d)}return r}function g(t,i,r){return i in t?Object.defineProperty(t,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[i]=r,t}function b(t,i){for(var r=0;r<i.length;r++){var d=i[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(t,d.key,d)}}var y=v("buffer").Buffer,e=v("util").inspect,n=e&&e.custom||"inspect";
1212$.exports=function(){function t(){(function(d,l){if(!(d instanceof l))throw new TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}var i,r;return i=t,(r=[{key:"push",value:function(d){var l={data:d,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length}},{key:"unshift",value:function(d){var l={data:d,next:this.head};this.length===0&&(this.tail=l),this.head=l,++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 l=this.head,a=""+l.data;l=l.next;)a+=d+l.data;return a}},{key:"concat",value:function(d){if(this.length===0)return y.alloc(0);for(var l,a,u,f=y.allocUnsafe(d>>>0),o=this.head,h=0;o;)l=o.data,a=f,u=h,y.prototype.copy.call(l,a,u),h+=o.data.length,o=o.next;return f}},{key:"consume",value:function(d,l){var a;return d<this.head.data.length?(a=this.head.data.slice(0,d),this.head.data=this.head.data.slice(d)):a=d===this.head.data.length?this.shift():l?this._getString(d):this._getBuffer(d),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(d){var l=this.head,a=1,u=l.data;for(d-=u.length;l=l.next;){var f=l.data,o=d>f.length?f.length:d;if(o===f.length?u+=f:u+=f.slice(0,d),(d-=o)==0){o===f.length?(++a,l.next?this.head=l.next:this.head=this.tail=null):(this.head=l,l.data=f.slice(o));break}++a}return this.length-=a,u}},{key:"_getBuffer",value:function(d){var l=y.allocUnsafe(d),a=this.head,u=1;for(a.data.copy(l),d-=a.data.length;a=a.next;){var f=a.data,o=d>f.length?f.length:d;if(f.copy(l,l.length-d,0,o),(d-=o)==0){o===f.length?(++u,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=f.slice(o));break}++u}return this.length-=u,l}},{key:n,value:function(d,l){return e(this,function(a){for(var u=1;u<arguments.length;u++){var f=arguments[u]!=null?arguments[u]:{};u%2?m(Object(f),!0).forEach(function(o){g(a,o,f[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(f)):m(Object(f)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(f,o))})}return a}({},l,{depth:0,customInspect:!1}))}}])&&b(i.prototype,r),t}()},{buffer:85,util:83}],294:[function(v,$,te){(function(m){(function(){function g(e,n){y(e,n),b(e)}function b(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function y(e,n){e.emit("error",n)}$.exports={destroy:function(e,n){var t=this,i=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return i||r?(n?n(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,m.nextTick(y,this,e)):m.nextTick(y,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?m.nextTick(b,t):(t._writableState.errorEmitted=!0,m.nextTick(g,t,d)):m.nextTick(g,t,d):n?(m.nextTick(b,t),n(d)):m.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,i=e._writableState;t&&t.autoDestroy||i&&i.autoDestroy?e.destroy(n):e.emit("error",n)}}}).call(this)}).call(this,v("_process"))},{_process:277}],295:[function(v,$,te){var m=v("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function g(){}$.exports=function b(y,e,n){if(typeof e=="function")return b(y,null,e);e||(e={}),n=function(p){var s=!1;return function(){if(!s){s=!0;for(var x=arguments.length,c=new Array(x),T=0;T<x;T++)c[T]=arguments[T];p.apply(this,c)}}}(n||g);var t=e.readable||e.readable!==!1&&y.readable,i=e.writable||e.writable!==!1&&y.writable,r=function(){y.writable||l()},d=y._writableState&&y._writableState.finished,l=function(){i=!1,d=!0,t||n.call(y)},a=y._readableState&&y._readableState.endEmitted,u=function(){t=!1,a=!0,i||n.call(y)}
1212,f=function(p){n.call(y,p)},o=function(){var p;return t&&!a?(y._readableState&&y._readableState.ended||(p=new m),n.call(y,p)):i&&!d?(y._writableState&&y._writableState.ended||(p=new m),n.call(y,p)):void 0},h=function(){y.req.on("finish",l)};return function(p){return p.setHeader&&typeof p.abort=="function"}(y)?(y.on("complete",l),y.on("abort",o),y.req?h():y.on("request",h)):i&&!y._writableState&&(y.on("end",r),y.on("close",r)),y.on("end",u),y.on("finish",l),e.error!==!1&&y.on("error",f),y.on("close",o),function(){y.removeListener("complete",l),y.removeListener("abort",o),y.removeListener("request",h),y.req&&y.req.removeListener("finish",l),y.removeListener("end",r),y.removeListener("close",r),y.removeListener("finish",l),y.removeListener("end",u),y.removeListener("error",f),y.removeListener("close",o)}}},{"../../../errors":286}],296:[function(v,$,te){$.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],297:[function(v,$,te){var m,g=v("../../../errors").codes,b=g.ERR_MISSING_ARGS,y=g.ERR_STREAM_DESTROYED;function e(d){if(d)throw d}function n(d,l,a,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}),m===void 0&&(m=v("./end-of-stream")),m(d,{readable:l,writable:a},function(h){if(h)return u(h);f=!0,u()});var o=!1;return function(h){if(!f&&!o)return o=!0,function(p){return p.setHeader&&typeof p.abort=="function"}(d)?d.abort():typeof d.destroy=="function"?d.destroy():void u(h||new y("pipe"))}}function t(d){d()}function i(d,l){return d.pipe(l)}function r(d){return d.length?typeof d[d.length-1]!="function"?e:d.pop():e}$.exports=function(){for(var d=arguments.length,l=new Array(d),a=0;a<d;a++)l[a]=arguments[a];var u,f=r(l);if(Array.isArray(l[0])&&(l=l[0]),l.length<2)throw new b("streams");var o=l.map(function(h,p){var s=p<l.length-1;return n(h,s,p>0,function(x){u||(u=x),x&&o.forEach(t),s||(o.forEach(t),f(u))})});return l.reduce(i)}},{"../../../errors":286,"./end-of-stream":295}],298:[function(v,$,te){var m=v("../../../errors").codes.ERR_INVALID_OPT_VALUE;$.exports={getHighWaterMark:function(g,b,y,e){var n=function(t,i,r){return t.highWaterMark!=null?t.highWaterMark:i?t[r]:null}(b,e,y);if(n!=null){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new m(e?y:"highWaterMark",n);return Math.floor(n)}return g.objectMode?16:16384}}},{"../../../errors":286}],299:[function(v,$,te){$.exports=v("events").EventEmitter},{events:84}],300:[function(v,$,te){var m=v("safe-buffer").Buffer,g=m.isEncoding||function(a){switch((a=""+a)&&a.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(a){var u;switch(this.encoding=function(f){var o=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 o!="string"&&(m.isEncoding===g||!g(f)))throw new Error("Unknown encoding: "+f);return o||f}(a),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=i,this.end=r,u=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=m.allocUnsafe(u)}function y(a){return a<=127?0:a>>5==6?2:a>>4==14?3:a>>3==30?4:a>>6==2?-1:-2}function e(a){var u=this.lastTotal-this.lastNeed,f=function(o,h,p){if((192&h[0])!=128)return o.lastNeed=0,"\uFFFD";if(o.lastNeed>1&&h.length>1){if((192&h[1])!=128)return o.lastNeed=1,"\uFFFD";if(o.lastNeed>2&&h.length>2&&(192&h[2])!=128)return o.lastNeed=2,"\uFFFD"}}(this,a);return f!==void 0?f:this.lastNeed<=a.length?(a.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(a.copy(this.lastChar,u,0,a.length),void(this.lastNeed-=a.length))}function n(a,u){if((a.length-u)%2==0){var f=a.toString("utf16le",u);if(f){var o=f.charCodeAt(f.length-1);if(o>=55296&&o<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],f.slice(0,-1)}return f}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",u,a.length-1)}function t(a){var u=a&&a.length?this.write(a):"";if(this.lastNeed){var f=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,f)}return u}function i(a,u){var f=(a.length-u)%3;return f===0?a.toString("base64",u):(this.lastNeed=3-f,this.lastTotal=3,f===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",u,a.length-f))}function r(a){var u=a&&a.length?this.write(a):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function d(a){return a.toString(this.encoding)}function l(a){return a&&a.length?this.write(a):""}
1212te.StringDecoder=b,b.prototype.write=function(a){if(a.length===0)return"";var u,f;if(this.lastNeed){if((u=this.fillLast(a))===void 0)return"";f=this.lastNeed,this.lastNeed=0}else f=0;return f<a.length?u?u+this.text(a,f):this.text(a,f):u||""},b.prototype.end=function(a){var u=a&&a.length?this.write(a):"";return this.lastNeed?u+"\uFFFD":u},b.prototype.text=function(a,u){var f=function(h,p,s){var x=p.length-1;if(x<s)return 0;var c=y(p[x]);return c>=0?(c>0&&(h.lastNeed=c-1),c):--x<s||c===-2?0:(c=y(p[x]))>=0?(c>0&&(h.lastNeed=c-2),c):--x<s||c===-2?0:(c=y(p[x]))>=0?(c>0&&(c===2?c=0:h.lastNeed=c-3),c):0}(this,a,u);if(!this.lastNeed)return a.toString("utf8",u);this.lastTotal=f;var o=a.length-(f-this.lastNeed);return a.copy(this.lastChar,0,o),a.toString("utf8",u,o)},b.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length}},{"safe-buffer":284}],301:[function(v,$,te){(function(m,g){(function(){var b=v("assert"),y=v("debug")("stream-parser");$.exports=function(f){var o=f&&typeof f._transform=="function",h=f&&typeof f._write=="function";if(!o&&!h)throw new Error("must pass a Writable or Transform stream in");y("extending Parser into stream"),f._bytes=n,f._skipBytes=t,o&&(f._passthrough=i),o?f._transform=d:f._write=r};function e(f){y("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,o){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),y("buffering %o bytes",f),this._parserBytesLeft=f,this._parserCallback=o,this._parserState=0}function t(f,o){b(!this._parserCallback,'there is already a "callback" set!'),b(f>0,'can only skip > 0 bytes, got "'+f+'"'),this._parserInit||e(this),y("skipping %o bytes",f),this._parserBytesLeft=f,this._parserCallback=o,this._parserState=1}function i(f,o){b(!this._parserCallback,'There is already a "callback" set!'),b(f>0,'can only pass through > 0 bytes, got "'+f+'"'),this._parserInit||e(this),y("passing through %o bytes",f),this._parserBytesLeft=f,this._parserCallback=o,this._parserState=2}function r(f,o,h){this._parserInit||e(this),y("write(%o bytes)",f.length),typeof o=="function"&&(h=o),a(this,f,null,h)}function d(f,o,h){this._parserInit||e(this),y("transform(%o bytes)",f.length),typeof o!="function"&&(o=this._parserOutput),a(this,f,o,h)}function l(f,o,h,p){if(f._parserBytesLeft-=o.length,y("%o bytes left for stream piece",f._parserBytesLeft),f._parserState===0?(f._parserBuffers.push(o),f._parserBuffered+=o.length):f._parserState===2&&h(o),f._parserBytesLeft!==0)return p;var s=f._parserCallback;if(s&&f._parserState===0&&f._parserBuffers.length>1&&(o=g.concat(f._parserBuffers,f._parserBuffered)),f._parserState!==0&&(o=null),f._parserCallback=null,f._parserBuffered=0,f._parserState=-1,f._parserBuffers.splice(0),s){var x=[];o&&x.push(o),h&&x.push(h);var c=s.length>x.length;c&&x.push(u(p));var T=s.apply(f,x);if(!c||p===T)return p}}var a=u(function f(o,h,p,s){return o._parserBytesLeft<=0?s(new Error("got data but not currently parsing anything")):h.length<=o._parserBytesLeft?function(){return l(o,h,p,s)}:function(){var x=h.slice(0,o._parserBytesLeft);return l(o,x,p,function(c){return c?s(c):h.length>x.length?function(){return f(o,h.slice(x.length),p,s)}:void 0})}});function u(f){return function(){for(var o=f.apply(this,arguments);typeof o=="function";)o=o();return o}}}).call(this)}).call(this,v("_process"),v("buffer").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(v,$,te){(function(m){(function(){function g(){var b;try{b=te.storage.debug}catch{}return!b&&m!==void 0&&"env"in m&&(b=m.env.DEBUG),b}(te=$.exports=v("./debug")).log=function(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},te.formatArgs=function(b){var y=this.useColors;if(b[0]=(y?"%c":"")+this.namespace+(y?" %c":" ")+b[0]+(y?"%c ":" ")+"+"+te.humanize(this.diff),!!y){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(i){i!=="%%"&&(n++,i==="%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=g,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(y){return"[UnexpectedJSONParseError]: "+y.message}},te.enable(g())}).call(this)}).call(this,v("_process"))},{"./debug":303,_process:277}],303:[function(v,$,te){var m;function g(b){function y(){if(y.enabled){var e=y,n=+new Date,t=n-(m||n);e.diff=t,e.prev=m,e.curr=n,m=n;for(var i=new Array(arguments.length),r=0;r<i.length;r++)i[r]=arguments[r];
1212i[0]=te.coerce(i[0]),typeof i[0]!="string"&&i.unshift("%O");var d=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(a,u){if(a==="%%")return a;d++;var f=te.formatters[u];if(typeof f=="function"){var o=i[d];a=f.call(e,o),i.splice(d,1),d--}return a}),te.formatArgs.call(e,i);var l=y.log||te.log||console.log.bind(console);l.apply(e,i)}}return y.namespace=b,y.enabled=te.enabled(b),y.useColors=te.useColors(),y.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(y),y}(te=$.exports=g.debug=g.default=g).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 y=(typeof b=="string"?b:"").split(/[\s,]+/),e=y.length,n=0;n<e;n++)y[n]&&((b=y[n].replace(/\*/g,".*?"))[0]==="-"?te.skips.push(new RegExp("^"+b.substr(1)+"$")):te.names.push(new RegExp("^"+b+"$")))},te.enabled=function(b){var y,e;for(y=0,e=te.skips.length;y<e;y++)if(te.skips[y].test(b))return!1;for(y=0,e=te.names.length;y<e;y++)if(te.names[y].test(b))return!0;return!1},te.humanize=v("ms"),te.names=[],te.skips=[],te.formatters={}},{ms:304}],304:[function(v,$,te){var m=1e3,g=6e4,b=60*g,y=24*b;function e(n,t,i){if(!(n<t))return n<1.5*t?Math.floor(n/t)+" "+i:Math.ceil(n/t)+" "+i+"s"}$.exports=function(n,t){t=t||{};var i,r=typeof n;if(r==="string"&&n.length>0)return function(d){if(!((d=String(d)).length>100)){var l=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(d);if(!!l){var a=parseFloat(l[1]);switch((l[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"days":case"day":case"d":return a*y;case"hours":case"hour":case"hrs":case"hr":case"h":return a*b;case"minutes":case"minute":case"mins":case"min":case"m":return a*g;case"seconds":case"second":case"secs":case"sec":case"s":return a*m;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(n);if(r==="number"&&isNaN(n)===!1)return t.long?e(i=n,y,"day")||e(i,b,"hour")||e(i,g,"minute")||e(i,m,"second")||i+" ms":function(d){return d>=y?Math.round(d/y)+"d":d>=b?Math.round(d/b)+"h":d>=g?Math.round(d/g)+"m":d>=m?Math.round(d/m)+"s":d+"ms"}(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))}},{}],305:[function(v,$,te){var m=v("parenthesis");$.exports=function(g,b,y){if(g==null)throw Error("First argument should be a string");if(b==null)throw Error("Separator should be a string or a RegExp");y?(typeof y=="string"||Array.isArray(y))&&(y={ignore:y}):y={},y.escape==null&&(y.escape=!0),y.ignore==null?y.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof y.ignore=="string"&&(y.ignore=[y.ignore]),y.ignore=y.ignore.map(function(l){return l.length===1&&(l+=l),l}));var e=m.parse(g,{flat:!0,brackets:y.ignore}),n=e[0].split(b);if(y.escape){for(var t=[],i=0;i<n.length;i++){var r=n[i],d=n[i+1];r[r.length-1]==="\\"&&r[r.length-2]!=="\\"?(t.push(r+b+d),i++):t.push(r)}n=t}for(i=0;i<n.length;i++)e[0]=n[i],n[i]=m.stringify(e,{flat:!0});return n}},{parenthesis:248}],306:[function(v,$,te){$.exports=function(m){for(var g=m.length,b=new Array(g),y=new Array(g),e=new Array(g),n=new Array(g),t=new Array(g),i=new Array(g),r=0;r<g;++r)b[r]=-1,y[r]=0,e[r]=!1,n[r]=0,t[r]=-1,i[r]=[];var d,l=0,a=[],u=[];function f(p){var s=[p],x=[p];for(b[p]=y[p]=l,e[p]=!0,l+=1;x.length>0;){p=x[x.length-1];var c=m[p];if(n[p]<c.length){for(var T=n[p];T<c.length;++T){var _=c[T];if(b[_]<0){b[_]=y[_]=l,e[_]=!0,l+=1,s.push(_),x.push(_);break}e[_]&&(y[p]=0|Math.min(y[p],y[_])),t[_]>=0&&i[p].push(t[_])}n[p]=T}else{if(y[p]===b[p]){var w=[],k=[],L=0;for(T=s.length-1;T>=0;--T){var A=s[T];if(e[A]=!1,w.push(A),k.push(i[A]),L+=i[A].length,t[A]=a.length,A===p){s.length=T;break}}a.push(w);var I=new Array(L);for(T=0;T<k.length;T++)for(var P=0;P<k[T].length;P++)I[--L]=k[T][P];u.push(I)}x.pop()}}}for(r=0;r<g;++r)b[r]<0&&f(r);for(r=0;r<u.length;r++){var o=u[r];if(o.length!==0){o.sort(function(p,s){return p-s}),d=[o[0]];for(var h=1;h<o.length;h++)o[h]!==o[h-1]&&d.push(o[h]);u[r]=d}}return{components:a,adjacencyList:u}}},{}
1212],307:[function(v,$,te){Object.defineProperty(te,"__esModule",{value:!0});var m=function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return function(i,r){var d=[],l=!0,a=!1,u=void 0;try{for(var f,o=i[Symbol.iterator]();!(l=(f=o.next()).done)&&(d.push(f.value),!r||d.length!==r);l=!0);}catch(h){a=!0,u=h}finally{try{!l&&o.return&&o.return()}finally{if(a)throw u}}return d}(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=2*Math.PI,b=function(n,t,i,r,d,l,a){var u=n.x,f=n.y;return{x:r*(u*=t)-d*(f*=i)+l,y:d*u+r*f+a}},y=function(n,t){var i=t===1.5707963267948966?.551915024494:t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),r=Math.cos(n),d=Math.sin(n),l=Math.cos(n+t),a=Math.sin(n+t);return[{x:r-d*i,y:d+r*i},{x:l+a*i,y:a-l*i},{x:l,y:a}]},e=function(n,t,i,r){var d=n*i+t*r;return d>1&&(d=1),d<-1&&(d=-1),(n*r-t*i<0?-1:1)*Math.acos(d)};te.default=function(n){var t=n.px,i=n.py,r=n.cx,d=n.cy,l=n.rx,a=n.ry,u=n.xAxisRotation,f=u===void 0?0:u,o=n.largeArcFlag,h=o===void 0?0:o,p=n.sweepFlag,s=p===void 0?0:p,x=[];if(l===0||a===0)return[];var c=Math.sin(f*g/360),T=Math.cos(f*g/360),_=T*(t-r)/2+c*(i-d)/2,w=-c*(t-r)/2+T*(i-d)/2;if(_===0&&w===0)return[];l=Math.abs(l),a=Math.abs(a);
1212var k=Math.pow(_,2)/Math.pow(l,2)+Math.pow(w,2)/Math.pow(a,2);k>1&&(l*=Math.sqrt(k),a*=Math.sqrt(k));var L=function(V,Z,K,G,W,Q,R,N,U,ee,j,X){var J=Math.pow(W,2),re=Math.pow(Q,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/Q*X,ce=oe*-Q/W*j,de=ee*pe-U*ce+(V+K)/2,xe=U*pe+ee*ce+(Z+G)/2,_e=(j-pe)/W,we=(X-ce)/Q,Ee=(-j-pe)/W,fe=(-X-ce)/Q,ge=e(1,0,_e,we),ke=e(_e,we,Ee,fe);return N===0&&ke>0&&(ke-=g),N===1&&ke<0&&(ke+=g),[de,xe,ge,ke]}(t,i,r,d,l,a,h,s,c,T,_,w),A=m(L,4),I=A[0],P=A[1],S=A[2],E=A[3],D=Math.abs(E)/(g/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(y(S,E)),S+=E;return x.map(function(V){var Z=b(V[0],l,a,T,c,I,P),K=Z.x,G=Z.y,W=b(V[1],l,a,T,c,I,P),Q=W.x,R=W.y,N=b(V[2],l,a,T,c,I,P);return{x1:K,y1:G,x2:Q,y2:R,x:N.x,y:N.y}})},$.exports=te.default},{}],308:[function(v,$,te){var m=v("parse-svg-path"),g=v("abs-svg-path"),b=v("normalize-svg-path"),y=v("is-svg-path"),e=v("assert");$.exports=function(n){if(Array.isArray(n)&&n.length===1&&typeof n[0]=="string"&&(n=n[0]),typeof n=="string"&&(e(y(n),"String is not an SVG path."),n=m(n)),e(Array.isArray(n),"Argument should be a string or an array of path segments."),n=g(n),!(n=b(n)).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],i=0,r=n.length;i<r;i++)for(var d=n[i].slice(1),l=0;l<d.length;l+=2)d[l+0]<t[0]&&(t[0]=d[l+0]),d[l+1]<t[1]&&(t[1]=d[l+1]),d[l+0]>t[2]&&(t[2]=d[l+0]),d[l+1]>t[3]&&(t[3]=d[l+1]);return t}},{"abs-svg-path":70,assert:75,"is-svg-path":238,"normalize-svg-path":309,"parse-svg-path":250}],309:[function(v,$,te){$.exports=function(y){for(var e,n=[],t=0,i=0,r=0,d=0,l=null,a=null,u=0,f=0,o=0,h=y.length;o<h;o++){var p=y[o],s=p[0];switch(s){case"M":r=p[1],d=p[2];break;case"A":var x=m({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 c,T=0;T<x.length;T++)c=x[T],p=["C",c.x1,c.y1,c.x2,c.y2,c.x,c.y],T<x.length-1&&n.push(p);break;case"S":var _=u,w=f;e!="C"&&e!="S"||(_+=_-t,w+=w-i),p=["C",_,w,p[1],p[2],p[3],p[4]];break;case"T":e=="Q"||e=="T"?(l=2*u-l,a=2*f-a):(l=u,a=f),p=b(u,f,l,a,p[1],p[2]);break;case"Q":l=p[1],a=p[2],p=b(u,f,p[1],p[2],p[3],p[4]);break;case"L":p=g(u,f,p[1],p[2]);break;case"H":p=g(u,f,p[1],f);break;case"V":p=g(u,f,u,p[1]);break;case"Z":p=g(u,f,r,d)}e=s,u=p[p.length-2],f=p[p.length-1],p.length>4?(t=p[p.length-4],i=p[p.length-3]):(t=u,i=f),n.push(p)}return n};var m=v("svg-arc-to-cubic-bezier");function g(y,e,n,t){return["C",y,e,n,t,n,t]}function b(y,e,n,t,i,r){return["C",y/3+2/3*n,e/3+2/3*t,i/3+2/3*n,r/3+2/3*t,i,r]}},{"svg-arc-to-cubic-bezier":307}],310:[function(v,$,te){var m,g=v("svg-path-bounds"),b=v("parse-svg-path"),y=v("draw-svg-path"),e=v("is-svg-path"),n=v("bitmap-sdf"),t=document.createElement("canvas"),i=t.getContext("2d");$.exports=function(r,d){if(!e(r))throw Error("Argument should be valid svg path string");d||(d={});var l,a;d.shape?(l=d.shape[0],a=d.shape[1]):(l=t.width=d.w||d.width||200,a=t.height=d.h||d.height||200);var u=Math.min(l,a),f=d.stroke||0,o=d.viewbox||d.viewBox||g(r),h=[l/(o[2]-o[0]),a/(o[3]-o[1])],p=Math.min(h[0]||0,h[1]||0)/2;if(i.fillStyle="black",i.fillRect(0,0,l,a),i.fillStyle="white",f&&(typeof f!="number"&&(f=1),i.strokeStyle=f>0?"white":"black",i.lineWidth=Math.abs(f)),i.translate(.5*l,.5*a),i.scale(p,p),function(){if(m!=null)return m;var c=document.createElement("canvas").getContext("2d");if(c.canvas.width=c.canvas.height=1,!window.Path2D)return m=!1;var T=new Path2D("M0,0h1v1h-1v-1Z");c.fillStyle="black",c.fill(T);var _=c.getImageData(0,0,1,1);return m=_&&_.data&&_.data[3]===255}()){var s=new Path2D(r);i.fill(s),f&&i.stroke(s)}else{var x=b(r);y(i,x),i.fill(),f&&i.stroke()}return i.setTransform(1,0,0,1,0,0),n(i,{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(v,$,te){(function(m,g){(function(){var b=v("process/browser.js").nextTick,y=Function.prototype.apply,e=Array.prototype.slice,n={},t=0;function i(r,d){this._id=r,this._clearFn=d}te.setTimeout=function(){return new i(y.call(setTimeout,window,arguments),clearTimeout)},te.setInterval=function(){return new i(y.call(setInterval,window,arguments),clearInterval)},te.clearTimeout=te.clearInterval=function(r){r.close()},i.prototype.unref=i.prototype.ref=function(){},i.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 m=="function"?m:function(r){var d=t++,l=!(arguments.length<2)&&e.call(arguments,1
vendor: 6,844 bytes, line 1212
1212);return n[d]=!0,b(function(){n[d]&&(l?r.apply(null,l):r.call(null),te.clearImmediate(d))}),d},te.clearImmediate=typeof g=="function"?g:function(r){delete n[r]}}).call(this)}).call(this,v("timers").setImmediate,v("timers").clearImmediate)},{"process/browser.js":277,timers:311}],312:[function(v,$,te){(function(m){var g=/^\s+/,b=/\s+$/,y=0,e=m.round,n=m.min,t=m.max,i=m.random;function r(U,ee){if(ee=ee||{},(U=U||"")instanceof r)return U;if(!(this instanceof r))return new r(U,ee);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(we){we=we.replace(g,"").replace(b,"").toLowerCase();var Ee,fe=!1;if(I[we])we=I[we],fe=!0;else if(we=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(Ee=R.rgb.exec(we))?{r:Ee[1],g:Ee[2],b:Ee[3]}:(Ee=R.rgba.exec(we))?{r:Ee[1],g:Ee[2],b:Ee[3],a:Ee[4]}:(Ee=R.hsl.exec(we))?{h:Ee[1],s:Ee[2],l:Ee[3]}:(Ee=R.hsla.exec(we))?{h:Ee[1],s:Ee[2],l:Ee[3],a:Ee[4]}:(Ee=R.hsv.exec(we))?{h:Ee[1],s:Ee[2],v:Ee[3]}:(Ee=R.hsva.exec(we))?{h:Ee[1],s:Ee[2],v:Ee[3],a:Ee[4]}:(Ee=R.hex8.exec(we))?{r:F(Ee[1]),g:F(Ee[2]),b:F(Ee[3]),a:K(Ee[4]),format:fe?"name":"hex8"}:(Ee=R.hex6.exec(we))?{r:F(Ee[1]),g:F(Ee[2]),b:F(Ee[3]),format:fe?"name":"hex"}:(Ee=R.hex4.exec(we))?{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(we))?{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,_e=X.b,J={r:255*E(de,255),g:255*E(xe,255),b:255*E(_e,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(we,Ee,fe){we=6*E(we,360),Ee=E(Ee,100),fe=E(fe,100);var ge=m.floor(we),ke=we-ge,be=fe*(1-Ee),Se=fe*(1-ke*Ee),Oe=fe*(1-(1-ke)*Ee),De=ge%6;return{r:255*[fe,Se,be,be,Oe,fe][De],g:255*[Oe,fe,fe,Se,be,be][De],b:255*[be,be,Oe,fe,fe,Se][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(we,Ee,fe){var ge,ke,be;function Se(je,Je,ze){return ze<0&&(ze+=1),ze>1&&(ze-=1),ze<1/6?je+6*(Je-je)*ze:ze<.5?Je:ze<2/3?je+(Je-je)*(2/3-ze)*6:je}if(we=E(we,360),Ee=E(Ee,100),fe=E(fe,100),Ee===0)ge=ke=be=fe;else{var Oe=fe<.5?fe*(1+Ee):fe+Ee-fe*Ee,De=2*fe-Oe;ge=Se(De,Oe,we+1/3),ke=Se(De,Oe,we),be=Se(De,Oe,we-1/3)}return{r:255*ge,g:255*ke,b:255*be}}(X.h,ne,oe),pe=!0,ce="hsl"),X.hasOwnProperty("a")&&(re=X.a));var de,xe,_e;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=ee.format||j.format,this._gradientType=ee.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=y++}function d(U,ee,j){U=E(U,255),ee=E(ee,255),j=E(j,255);var X,J,re=t(U,ee,j),ne=n(U,ee,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=(ee-j)/oe+(ee<j?6:0);break;case ee:X=(j-U)/oe+2;break;case j:X=(U-ee)/oe+4}X/=6}return{h:X,s:J,l:se}}function l(U,ee,j){U=E(U,255),ee=E(ee,255),j=E(j,255);var X,J,re=t(U,ee,j),ne=n(U,ee,j),se=re,oe=re-ne;if(J=re===0?0:oe/re,re==ne)X=0;else{switch(re){case U:X=(ee-j)/oe+(ee<j?6:0);break;case ee:X=(j-U)/oe+2;break;case j:X=(U-ee)/oe+4}X/=6}return{h:X,s:J,v:se}}function a(U,ee,j,X){var J=[H(e(U).toString(16)),H(e(ee).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,ee,j,X){return[H(Z(X)),H(e(U).toString(16)),H(e(ee).toString(16)),H(e(j).toString(16))].join("")}function f(U,ee){ee=ee===0?0:ee||10;var j=r(U).toHsl();return j.s-=ee/100,j.s=D(j.s),r(j)}function o(U,ee){ee=ee===0?0:ee||10;var j=r(U).toHsl();return j.s+=ee/100,j.s=D(j.s),r(j)}function h(U){return r(U).desaturate(100)}function p(U,ee){ee=ee===0?0:ee||10;var j=r(U).toHsl();return j.l+=ee/100,j.l=D(j.l),r(j)}function s(U,ee){ee=ee===0?0:ee||10;var j=r(U).toRgb();return j.r=t(0,n(255,j.r-e(-ee/100*255))),j.g=t(0,n(255,j.g-e(-ee/100*255))),j.b=t(0,n(255,j.b-e(-ee/100*255))),r(j)}function x(U,ee){ee=ee===0?0:ee||10;var j=r(U).toHsl();return j.l-=ee/100,j.l=D(j.l),r(j)}function c(U,ee){var j=r(U).toHsl(),X=(j.h+ee)%360;return j.h=X<0?360+X:X,r(j)}function T(U){var ee=r(U).toHsl();return ee.h=(ee.h+180)%360,r(ee)}function _(U){var ee=r(U).toHsl(),j=ee.h;return[r(U),r({h:(j+120)%360,s:ee.s,l:ee.l}),r({h:(j+240)%360,s:ee.s,l:ee.l})]}function w(U){var ee=r(U).toHsl(),j=ee.h;return[r(U),r({h:(j+90)%360,s:ee.s,l:ee.l}),r({h:(j+180)%360,s:ee.s,l:ee.l}),r({h:(j+270)%360,s:ee.s,l:ee.l})]}function k(U){var ee=r(U).toHsl(),j=ee.h;return[r(U),r({h:(j+72)%360,s:ee.s,l:ee.l}),r({h:(j+216)%360,s:ee.s,l:ee.l})]}function L(U,ee,j){ee=ee||6,j=j||30;var X=r(U).toHsl(),J=360/j,re=[r(U)];for(X.h=(X.h-(J*ee>>1)+720)%360;--ee;)X.h=(X.h+J)%360,re.push(r(X));return re}function A(U,ee){ee=ee||6;for(var j=r(U).toHsv(),X=j.h,J=j.s,re=j.v,ne=[],se=1/ee;ee--;)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,ee,j,X=this.toRgb();return U=X.r/255,ee=X.g/255,j=X.b/255,.2126*(U<=.03928?U/12.92:m.pow((U+.055)/1.055,2.4))+.7152*(ee<=.03928?ee/12.92:m.pow((ee+.055)/1.055,2.4))+.0722*(j<=.03928?j/12.92:m.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=l(this._r,this._g,this._b);return{h:360*U.h,s:U.s,v:U.v,a:this._a}},toHsvString:function(){var U=l(this._r,this._g,this._b),ee=e(360*U.h),j=e(100*U.s),X=e(100*U.v);return this._a==1?"hsv("+ee+", "+j+"%, "+X+"%)":"hsva("+ee+", "+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),ee=e(360*U.h),j=e(100*U.s),X=e(100*U.l);return this._a==1?"hsl("+ee+", "+j+"%, "+X+"%)":"hsla("+ee+", "+j+"%, "+X+"%, "+this._roundA+")"},toHex:function(U){return a(this._r,this._g,this._b,U)},toHexString:function(U){return"#"+this.toHex(U)},toHex8:function(U){return function(ee,j,X,J,re){var ne=[H(e(ee).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[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(U){var ee="#"+u(this._r,this._g,this._b,this._a),j=ee,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="+ee+",endColorstr="+j+")"},toString:function(U){var ee=!!U;U=U||this._format;var j=!1,X=this._a<1&&this._a>=0;return ee||!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,ee){var j=U.apply(null,[this].concat([].slice.call(ee)));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(s,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(o,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(c,arguments)},_applyCombination:function(U,ee){return U.apply(null,[this].concat([].slice.call(ee)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(T,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(w,arguments)}},r.fromRatio=function(U,ee){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,ee)},r.equals=function(U,ee){return!(!U||!ee)&&r(U).toRgbString()==r(ee).toRgbString()},r.random=function(){return r.fromRatio({r:i(),g:i(),b:i()})},r.mix=function(U,ee,j){j=j===0?0:j||50;var X=r(U).toRgb(),J=r(ee).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,ee){var j=r(U),X=r(ee);return(m.max(j.getLuminance(),X.getLuminance())+.05)/(m.min(j.getLuminance(),X.getLuminance())+.05)},r.isReadable=function(U,ee,j){var X,J,re=r.readability(U,ee);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,ee,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<ee.length;pe++)(X=r.readability(U,ee[pe]))>oe&&(oe=X,se=r(ee[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 ee={};for(var j in U)U.hasOwnProperty(j)&&(ee[U[j]]=j);return ee}(I);function S(U){return U=parseFloat(U),(isNaN(U)||U<0||U>1)&&(U=1),U}function E(U,ee){(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(ee,t(0,parseFloat(U))),j&&(U=parseInt(U*ee,10)/100),m.abs(U-ee)<1e-6?1:U%ee/parseFloat(ee)}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 m.round(255*parseFloat(U)).toString(16)}function K(U){return F(U)/255}var G,W,Q,R=(W="[\\s|\\(]+("+(G="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+G+")[,|\\s]+("+G+")\\s*\\)?",Q="[\\s|\\(]+("+G+")[,|\\s]+("+G+")[,|\\s]+("+G+")[,|\\s]+("+G+")\\s*\\)?",{CSS_UNIT:new RegExp(G),rgb:new RegExp("rgb"+W),rgba:new RegExp("rgba"+Q),hsl:new RegExp("hsl"+W),hsla:new RegExp("hsla"+Q),hsv:new RegExp("hsv"+W),hsva:new RegExp("hsva"
1212+Q),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)}$!==void 0&&$.exports?$.exports=r:window.tinycolor=r})(Math)},{}],313:[function(v,$,te){$.exports=g,$.exports.float32=$.exports.float=g,$.exports.fract32=$.exports.fract=function(b,y){if(b.length){if(b instanceof Float32Array)return new Float32Array(b.length);y instanceof Float32Array||(y=g(b));for(var e=0,n=y.length;e<n;e++)y[e]=b[e]-y[e];return y}return g(b-g(b))};var m=new Float32Array(1);function g(b){return b.length?b instanceof Float32Array?b:new Float32Array(b):(m[0]=b,m[0])}},{}],314:[function(v,$,te){var m=v("parse-unit");$.exports=b;function g(y,e){var n=m(getComputedStyle(y).getPropertyValue(e));return n[0]*b(n[1],y)}function b(y,e){switch(e=e||document.body,y=(y||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),y){case"%":return e.clientHeight/100;case"ch":case"ex":return function(n,t){var i=document.createElement("div");i.style["font-size"]="128"+n,t.appendChild(i);var r=g(i,"font-size")/128;return t.removeChild(i),r}(y,e);case"em":return g(e,"font-size");case"rem":return g(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(v,$,te){(function(m,g){g(typeof te=="object"&&$!==void 0?te:(m=m||self).topojson=m.topojson||{})})(this,function(m){function g(u){return u}function b(u){if(u==null)return g;var f,o,h=u.scale[0],p=u.scale[1],s=u.translate[0],x=u.translate[1];return function(c,T){T||(f=o=0);var _=2,w=c.length,k=new Array(w);for(k[0]=(f+=c[0])*h+s,k[1]=(o+=c[1])*p+x;_<w;)k[_]=c[_],++_;return k}}function y(u){var f,o=b(u.transform),h=1/0,p=h,s=-h,x=-h;function c(_){(_=o(_))[0]<h&&(h=_[0]),_[0]>s&&(s=_[0]),_[1]<p&&(p=_[1]),_[1]>x&&(x=_[1])}function T(_){switch(_.type){case"GeometryCollection":_.geometries.forEach(T);break;case"Point":c(_.coordinates);break;case"MultiPoint":_.coordinates.forEach(c)}}for(f in u.arcs.forEach(function(_){for(var w,k=-1,L=_.length;++k<L;)(w=o(_[k],k))[0]<h&&(h=w[0]),w[0]>s&&(s=w[0]),w[1]<p&&(p=w[1]),w[1]>x&&(x=w[1])}),u.objects)T(u.objects[f]);return[h,p,s,x]}function e(u,f){var o=f.id,h=f.bbox,p=f.properties==null?{}:f.properties,s=n(u,f);return o==null&&h==null?{type:"Feature",properties:p,geometry:s}:h==null?{type:"Feature",id:o,properties:p,geometry:s}:{type:"Feature",id:o,bbox:h,properties:p,geometry:s}}function n(u,f){var o=b(u.transform),h=u.arcs;function p(_,w){w.length&&w.pop();for(var k=h[_<0?~_:_],L=0,A=k.length;L<A;++L)w.push(o(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}(w,A)}function s(_){return o(_)}function x(_){for(var w=[],k=0,L=_.length;k<L;++k)p(_[k],w);return w.length<2&&w.push(w[0]),w}function c(_){for(var w=x(_);w.length<4;)w.push(w[0]);return w}function T(_){return _.map(c)}return function _(w){var k,L=w.type;switch(L){case"GeometryCollection":return{type:L,geometries:w.geometries.map(_)};case"Point":k=s(w.coordinates);break;case"MultiPoint":k=w.coordinates.map(s);break;case"LineString":k=x(w.arcs);break;case"MultiLineString":k=w.arcs.map(x);break;case"Polygon":k=T(w.arcs);break;case"MultiPolygon":k=w.arcs.map(T);break;default:return null}return{type:L,coordinates:k}}(f)}function t(u,f){var o={},h={},p={},s=[],x=-1;function c(T,_){for(var w in T){var k=T[w];delete _[k.start],delete k.start,delete k.end,k.forEach(function(L){o[L<0?~L:L]=1}),s.push(k)}}return f.forEach(function(T,_){var w,k=u.arcs[T<0?~T:T];k.length<3&&!k[1][0]&&!k[1][1]&&(w=f[++x],f[x]=T,f[_]=w)}),f.forEach(function(T){var _,w,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]}(T),L=k[0],A=k[1];if(_=p[L])if(delete p[_.end],_.push(T),_.end=A,w=h[A]){delete h[w.start];var I=w===_?_:_.concat(w);h[I.start=_.start]=p[I.end=w.end]=I}else h[_.start]=p[_.end]=_;else if(_=h[A])if(delete h[_.start],_.unshift(T),_.start=L,w=p[L]){delete p[w.end];var P=w===_?_:w.concat(_);h[P.start=w.start]=p[P.end=_.end]=P}else h[_.start]=p[_.end]=_;else h[(_=[T]).start=L]=p[_.end=A]=_}),c(p,h),c(h,p),f.forEach(function(T){o[T<0?~T:T]||s.push([T])}),s}function i(u,f,o){var h,p,s;if(arguments.length>1)h=r(u,f,o);else for(p=0,h=new Array(s=u.arcs.length);p<s;++p)h[p]=p;return{type:"MultiLineString",arcs:t(u,h)}}function r(u,f,o){var h,p=[],s=[];function x(_){var w=_<0?~_:_;(s[w]||(s[w]=[])).push({i:_,g:h})}function c(_){_.forEach(x)}function T(_){_.forEach(c)}return function _(w){switch(h=w,w.type){case"GeometryCollection":w.geometries.forEac
1212h(_);break;case"LineString":c(w.arcs);break;case"MultiLineString":case"Polygon":T(w.arcs);break;case"MultiPolygon":(function(k){k.forEach(T)})(w.arcs)}}(f),s.forEach(o==null?function(_){p.push(_[0].i)}:function(_){o(_[0].g,_[_.length-1].g)&&p.push(_[0].i)}),p}function d(u,f){var o={},h=[],p=[];function s(c){c.forEach(function(T){T.forEach(function(_){(o[_=_<0?~_:_]||(o[_]=[])).push(c)})}),h.push(c)}function x(c){return function(T){for(var _,w=-1,k=T.length,L=T[k-1],A=0;++w<k;)_=L,L=T[w],A+=_[0]*L[1]-_[1]*L[0];return Math.abs(A)}(n(u,{type:"Polygon",arcs:[c]}).coordinates[0])}return f.forEach(function c(T){switch(T.type){case"GeometryCollection":T.geometries.forEach(c);break;case"Polygon":s(T.arcs);break;case"MultiPolygon":T.arcs.forEach(s)}}),h.forEach(function(c){if(!c._){var T=[],_=[c];for(c._=1,p.push(T);c=_.pop();)T.push(c),c.forEach(function(w){w.forEach(function(k){o[k<0?~k:k].forEach(function(L){L._||(L._=1,_.push(L))})})})}}),h.forEach(function(c){delete c._}),{type:"MultiPolygon",arcs:p.map(function(c){var T,_=[];if(c.forEach(function(I){I.forEach(function(P){P.forEach(function(S){o[S<0?~S:S].length<2&&_.push(S)})})}),(T=(_=t(u,_)).length)>1)for(var w,k,L=1,A=x(_[0]);L<T;++L)(w=x(_[L]))>A&&(k=_[0],_[0]=_[L],_[L]=k,A=w);return _}).filter(function(c){return c.length>0})}}function l(u,f){for(var o=0,h=u.length;o<h;){var p=o+h>>>1;u[p]<f?o=p+1:h=p}return o}function a(u){if(u==null)return g;var f,o,h=u.scale[0],p=u.scale[1],s=u.translate[0],x=u.translate[1];return function(c,T){T||(f=o=0);var _=2,w=c.length,k=new Array(w),L=Math.round((c[0]-s)/h),A=Math.round((c[1]-x)/p);for(k[0]=L-f,f=L,k[1]=A-o,o=A;_<w;)k[_]=c[_],++_;return k}}m.bbox=y,m.feature=function(u,f){return typeof f=="string"&&(f=u.objects[f]),f.type==="GeometryCollection"?{type:"FeatureCollection",features:f.geometries.map(function(o){return e(u,o)})}:e(u,f)},m.merge=function(u){return n(u,d.apply(this,arguments))},m.mergeArcs=d,m.mesh=function(u){return n(u,i.apply(this,arguments))},m.meshArcs=i,m.neighbors=function(u){var f={},o=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 s={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 s&&s[P.type](P.arcs,S)}),f)for(var c=f[x],T=c.length,_=0;_<T;++_)for(var w=_+1;w<T;++w){var k,L=c[_],A=c[w];(k=o[L])[x=l(k,A)]!==A&&k.splice(x,0,A),(k=o[A])[x=l(k,L)]!==L&&k.splice(x,0,L)}return o},m.quantize=function(u,f){if(u.transform)throw new Error("already quantized");if(f&&f.scale)c=u.bbox;else{if(!((o=Math.floor(f))>=2))throw new Error("n must be \u22652");var o,h=(c=u.bbox||y(u))[0],p=c[1],s=c[2],x=c[3];f={scale:[s-h?(s-h)/(o-1):1,x-p?(x-p)/(o-1):1],translate:[h,p]}}var c,T,_=a(f),w=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(T in w)k[T]=A(w[T]);return{type:"Topology",bbox:c,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})}},m.transform=b,m.untransform=a,Object.defineProperty(m,"__esModule",{value:!0})})},{}],316:[function(v,$,te){var m=v("../prototype/is");$.exports=function(g){if(typeof g!="function"||!hasOwnProperty.call(g,"length"))return!1;try{if(typeof g.length!="number"||typeof g.call!="function"||typeof g.apply!="function")return!1}catch{return!1}return!m(g)}},{"../prototype/is":323}],317:[function(v,$,te){var m=v("../value/is"),g=v("../object/is"),b=v("../string/coerce"),y=v("./to-short-string"),e=function(n,t){return n.replace("%v",y(t))};$.exports=function(n,t,i){if(!g(i))throw new TypeError(e(t,n));if(!m(n)){if("default"in i)return i.default;if(i.isOptional)return null}var r=b(i.errorMessage);throw m(r)||(r=t),new TypeError(e(r,n))}},{"../object/is":320,"../string/coerce":324,"../value/is":326,"./to-short-string":319}],318:[function(v,$,te){$.exports=function(m){try{return m.toString()}catch{try{return String(m)}catch{return null}}}},{}],319:[function(v,$,te){var m=v("./safe-to-string"),g=/[\n\r\u2028\u2029]/g;$.exports=function(b){var y=m(b);return y===null?"<Non-coercible to string value>":(y.length>100&&(y=y.slice(0,99)+"\u2026"),y=y.replace(g,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(v,$,te){var m=v("../value/is"),g={object:!0,function:!0,undefined:!0};$.exports=function(b){return!!m(b)&&hasOwnProperty.call(g,typeof b)}},{"../value/is":326}],321:[function(v,$,te){var m=v("../lib/resolve-exception"),g=v("./is");$.exports=function(b){return g(b)?b:m(b,"%v is not a plain function",arguments[1])}},{"../lib/resolve-exception":317,"./is":322}],322:[function(v,$,te){var m=v("../function/is"),g=/^\s*class[\s{/}]/,b=Function.prototype.toString;$.exports=function(y){return!!m(y)&&!g.test(b.call(y))}},{"../function/is":316}],323:[function(v,$,te){var m=v("../object/is");$.exports=function(g){if(!m(g))return!1;try{return!!g.constructor&&g.constructor.prototype===g}catch{return!1}}},{"../object/is":320}],324:[function(v,$,te){var m=v("../value/is"),g=v("../object/is"),b=Object.prototype.toString;$.exports=function(y){if(!m(y))return null;if(g(y)){var e=y.toString;if(typeof e!="function"||e===b)return null}try{return""+y}catch{return null}}},{"../object/is":320,"../value/is":326}],325:[function(v,$,te){var m=v("../lib/resolve-exception"),g=v("./is");$.exports=function(b){return g(b)?b:m(b,"Cannot use %v",arguments[1])}},{"../lib/resolve-exception":317,"./is":326}],326:[function(v,$,te){$.exports=function(m){return m!=null}},{}],327:[function(v,$,te){(function(m){(function(){var g=v("bit-twiddle"),b=v("dup"),y=v("buffer").Buffer;m.__TYPEDARRAY_POOL||(m.__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",i=m.__TYPEDARRAY_POOL;i.UINT8C||(i.UINT8C=b([32,0])),i.BIGUINT64||(i.BIGUINT64=b([32,0])),i.BIGINT64||(i.BIGINT64=b([32,0])),i.BUFFER||(i.BUFFER=b([32,0]));var r=i.DATA,d=i.BUFFER;function l(A){if(A){var I=A.length||A.byteLength,P=g.log2(I);r[P].push(A)}}function a(A){A=g.nextPow2(A);var I=g.log2(A),P=r[I];return P.length>0?P.pop():new ArrayBuffer(A)}function u(A){return new Uint8Array(a(A),0,A)}function f(A){return new Uint16Array(a(2*A),0,A)}function o(A){return new Uint32Array(a(4*A),0,A)}function h(A){return new Int8Array(a(A),0,A)}function p(A){return new Int16Array(a(2*A),0,A)}function s(A){return new Int32Array(a(4*A),0,A)}function x(A){return new Float32Array(a(4*A),0,A)}function c(A){return new Float64Array(a(8*A),0,A)}function T(A){return e?new Uint8ClampedArray(a(A),0,A):u(A)}function _(A){return n?new BigUint64Array(a(8*A),0,A):null}function w(A){return t?new BigInt64Array(a(8*A),0,A):null}function k(A){return new DataView(a(A),0,A)}function L(A){A=g.nextPow2(A);var I=g.log2(A),P=d[I];return P.length>0?P.pop():new y(A)}te.free=function(A){if(y.isBuffer(A))d[g.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|g.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){l(A.buffer)},te.freeArrayBuffer=l,te.freeBuffer=function(A){d[g.log2(A.length)].push(A)},te.malloc=function(A,I){if(I===void 0||I==="arraybuffer")return a(A);switch(I){case"uint8":return u(A);case"uint16":return f(A);case"uint32":return o(A);case"int8":return h(A);case"int16":return p(A);case"int32":return s(A);case"float":case"float32":return x(A);case"double":case"float64":return c(A);case"uint8_clamped":return T(A);case"bigint64":return w(A);case"biguint64":return _(A);case"buffer":return L(A);case"data":case"dataview":return k(A);default:return null}return null},te.mallocArrayBuffer=a,te.mallocUint8=u,te.mallocUint16=f,te.mallocUint32=o,te.mallocInt8=h,te.mallocInt16=p,te.mallocInt32=s,te.mallocFloat32=te.mallocFloat=x,te.mallocFloat64=te.mallocDouble=c,te.mallocUint8Clamped=T,te.mallocBigUint64=_,te.mallocBigInt64=w,te.mallocDataView=k,te.mallocBuffer=L,te.clearCache=function(){for(var A=0;A<32;++A)i.UINT8[A].length=0,i.UINT16[A].length=0,i.UINT32[A].length=0,i.INT8[A].length=0,i.INT16[A].length=0,i.INT32[A].length=0,i.FLOAT[A].length=0,i.DOUBLE[A].length=0,i.BIGUINT64[A].length=0,i.BIGINT64[A].length=0,i.UINT8C[A].length=0,r[A].length=0,d[A].length=0}}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{"bit-twiddle":81,buffer:85,dup:128}],328:[function(v,$,te){var m=/[\'\"]/;$.exports=function(g){return g?(m.test(g.charAt(0))&&(g=g.substr(1)),m.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}},{}],329:[function(v,$,te){$.exports=function(m,g,b){Array.isArray(b)||(b=[].slice.call(arguments,2));for(var y=0,e=b.length;y<e;y++){var n=b[y];for(var t in n)if((g[t]===void 0||Array.isArray(g[t])||m[t]!==g[t])&&t in g){var i;if(n[t]===!0)i=g[t];else if(n[t]===!1||typeof n[t]=="function"&&(i=n[t](g[t],m,g))===void 0)continue;m[t]=i}}return m}},{}],330:[function(v,$,te){(function(m){(function(){function g(b){try{if(!m.localStorage)return!1}catch{return!1}var y=m.localStorage[b];return y!=null&&String(y).toLowerCase()==="true"}$.exports=function(b,y){if(g("noDeprecation"))return b;var e=!1;return function(){if(!e){if(g("throwDeprecation"))throw new Error(y);g("traceDeprecation")?console.trace(y):console.warn(y),e=!0}return b.apply(this,arguments)}}}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],331:[function(v,$,te){var m=v("get-canvas-context");$.exports=function(g){return m("webgl",g)}},{"get-canvas-context":194}],332:[function(v,$,te){var m=v("../main"),g=v("object-assign"),b=m.instance();function y(l){this.local=this.regionalOptions[l||""]||this.regionalOptions[""]}y.prototype=new m.baseCalendar,g(y.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(l,a){if(typeof l=="string"){var u=l.match(n);return u?u[0]:""}
1213var f=this._validateYear(l),o=l.month(),h=""+this.toChineseMonth(f,o);return a&&h.length<2&&(h="0"+h),this.isIntercalaryMonth(f,o)&&(h+="i"),h},monthNames:function(l){if(typeof l=="string"){var a=l.match(t);return a?a[0]:""}var u=this._validateYear(l),f=l.month(),o=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][this.toChineseMonth(u,f)-1];return this.isIntercalaryMonth(u,f)&&(o="\u95F0"+o),o},monthNamesShort:function(l){if(typeof l=="string"){var a=l.match(i);return a?a[0]:""}var u=this._validateYear(l),f=l.month(),o=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][this.toChineseMonth(u,f)-1];return this.isIntercalaryMonth(u,f)&&(o="\u95F0"+o),o},parseMonth:function(l,a){l=this._validateYear(l);var u,f=parseInt(a);if(isNaN(f))a[0]==="\u95F0"&&(u=!0,a=a.substring(1)),a[a.length-1]==="\u6708"&&(a=a.substring(0,a.length-1)),f=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(a);else{var o=a[a.length-1];u=o==="i"||o==="I"}return this.toMonthIndex(l,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(l,a){if(l.year&&(l=l.year()),typeof l!="number"||l<1888||l>2111)throw a.replace(/\{0\}/,this.local.name);return l},toMonthIndex:function(l,a,u){var f=this.intercalaryMonth(l);if(u&&a!==f||a<1||a>12)throw m.local.invalidMonth.replace(/\{0\}/,this.local.name);return f?!u&&a<=f?a-1:a:a-1},toChineseMonth:function(l,a){l.year&&(a=(l=l.year()).month());var u=this.intercalaryMonth(l);if(a<0||a>(u?12:11))throw m.local.invalidMonth.replace(/\{0\}/,this.local.name);return u?a<u?a+1:a:a+1},intercalaryMonth:function(l){return l=this._validateYear(l),r[l-r[0]]>>13},isIntercalaryMonth:function(l,a){l.year&&(a=(l=l.year()).month());var u=this.intercalaryMonth(l);return!!u&&u===a},leapYear:function(l){return this.intercalaryMonth(l)!==0},weekOfYear:function(l,a,u){var f,o=this._validateYear(l,m.local.invalidyear),h=d[o-d[0]],p=h>>9&4095,s=h>>5&15,x=31&h;(f=b.newDate(p,s,x)).add(4-(f.dayOfWeek()||7),"d");var c=this.toJD(l,a,u)-f.toJD();return 1+Math.floor(c/7)},monthsInYear:function(l){return this.leapYear(l)?13:12},daysInMonth:function(l,a){l.year&&(a=l.month(),l=l.year()),l=this._val
1213idateYear(l);var u=r[l-r[0]];if(a>(u>>13?12:11))throw m.local.invalidMonth.replace(/\{0\}/,this.local.name);return u&1<<12-a?30:29},weekDay:function(l,a,u){return(this.dayOfWeek(l,a,u)||7)<6},toJD:function(l,a,u){var f=this._validate(l,h,u,m.local.invalidDate);l=this._validateYear(f.year()),a=f.month(),u=f.day();var o=this.isIntercalaryMonth(l,a),h=this.toChineseMonth(l,a),p=function(s,x,c,T,_){var w,k,L;if(typeof s=="object")k=s,w=x||{};else{var A;if(!(typeof s=="number"&&s>=1888&&s<=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 c=="number"&&c>=1&&c<=30))throw new Error("Lunar day outside range 1 - 30");typeof T=="object"?(A=!1,w=T):(A=!!T,w=_||{}),k={year:s,month:x,day:c,isIntercalary:A}}L=k.day-1;var I,P=r[k.year-r[0]],S=P>>13;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 w.year=F.getFullYear(),w.month=1+F.getMonth(),w.day=F.getDate(),w}(l,h,u,o);return b.toJD(p.year,p.month,p.day)},fromJD:function(l){var a=b.fromJD(l),u=function(o,h,p,s){var x,c;if(typeof o=="object")x=o,c=h||{};else{if(!(typeof o=="number"&&o>=1888&&o<=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:o,month:h,day:p},c=s||{}}var T=d[x.year-d[0]],_=x.year<<9|x.month<<5|x.day;c.year=_>=T?x.year:x.year-1,T=d[c.year-d[0]];var w,k=new Date(T>>9&4095,(T>>5&15)-1,31&T),L=new Date(x.year,x.month-1,x.day);w=Math.round((L-k)/864e5);var A,I=r[c.year-r[0]];for(A=0;A<13;A++){var P=I&1<<12-A?30:29;if(w<P)break;w-=P}var S=I>>13;return!S||A<S?(c.isIntercalary=!1,c.month=1+A):A===S?(c.isIntercalary=!0,c.month=A):(c.isIntercalary=!1,c.month=A),c.day=1+w,c}(a.year(),a.month(),a.day()),f=this.toMonthIndex(u.year,u.month,u.isIntercalary);return this.newDate(u.year,f,u.day)}
vendor: 4,218 bytes, line 1213
1213,fromString:function(l){var a=l.match(e),u=this._validateYear(+a[1]),f=+a[2],o=!!a[3],h=this.toMonthIndex(u,f,o),p=+a[4];return this.newDate(u,h,p)},add:function(l,a,u){var f=l.year(),o=l.month(),h=this.isIntercalaryMonth(f,o),p=this.toChineseMonth(f,o),s=Object.getPrototypeOf(y.prototype).add.call(this,l,a,u);if(u==="y"){var x=s.year(),c=s.month(),T=this.isIntercalaryMonth(x,p),_=h&&T?this.toMonthIndex(x,p,!0):this.toMonthIndex(x,p,!1);_!==c&&s.month(_)}return s}});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,i=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;m.calendars.chinese=y;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(v,$,te){var m=v("../main"),g=v("object-assign");function b(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}b.prototype=new m.baseCalendar,g(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(y){var e=this._validate(y,this.minMonth,this.minDay,m.local.invalidYear);return(y=e.year()+(e.year()<0?1:0))%4==3||y%4==-1},monthsInYear:function(y){return this._validate(y,this.minMonth,this.minDay,m.local.invalidYear||m.regionalOptions[""].invalidYear),13},weekOfYear:function(y,e,n){var t=this.newDate(y,e,n);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(y,e){var n=this._validate(y,e,this.minDay,m.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===13&&this.leapYear(n.year())?1:0)},weekDay:function(y,e,n){return(this.dayOfWeek(y,e,n)||7)<6},toJD:function(y,e,n){var t=this._validate(y,e,n,m.local.invalidDate);return(y=t.year())<0&&y++,t.day()+30*(t.month()-1)+365*(y-1)+Math.floor(y/4)+this.jdEpoch-1},fromJD:function(y){var e=Math.floor(y)+.5-this.jdEpoch,n=Math.floor((e-Math.floor((e+366)/1461))/365)+1;n<=0&&n--,e=Math.floor(y)+.5-this.newDate(n,1,1).toJD();var t=Math.floor(e/30)+1,i=e-30*(t-1)+1;return this.newDate(n,t,i)}}),m.calendars.coptic=b},{"../main":346,"object-assign":247}],334:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}b.prototype=new m.baseCalendar,g(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,m.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,m.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,m.local.invalidYear),400},weekOfYear:function(e,n,t){var i=this.newDate(e,n,t);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/8)+1},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,m.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,n,t){return(this._validate(e,n,t,m.local.invalidDate).day()+1)%8},weekDay:function(e,n,t){var i=this.dayOfWeek(e,n,t);return i>=2&&i<=6},extraInfo:function(e,n,t){var i=this._validate(e,n,t,m.local.invalidDate);return{century:y[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,n,t){var i=this._validate(e,n,t,m.local.invalidDate);return e=i.year()+(i.year()<0?1:0),n=i.month(),(t=i.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,i=e-32*(t-1)+1;return this.newDate(n<=0?n-1:n,t,i)}});var y={20:"Fruitbat",21:"Anchovy"};m.calendars.discworld=b},{"../main":346,"object-assign":247}],335:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}b.prototype=new m.baseCalendar,g(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","Ye
1213k","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(y){var e=this._validate(y,this.minMonth,this.minDay,m.local.invalidYear);return(y=e.year()+(e.year()<0?1:0))%4==3||y%4==-1},monthsInYear:function(y){return this._validate(y,this.minMonth,this.minDay,m.local.invalidYear||m.regionalOptions[""].invalidYear),13},weekOfYear:function(y,e,n){var t=this.newDate(y,e,n);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(y,e){var n=this._validate(y,e,this.minDay,m.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===13&&this.leapYear(n.year())?1:0)},weekDay:function(y,e,n){return(this.dayOfWeek(y,e,n)||7)<6},toJD:function(y,e,n){var t=this._validate(y,e,n,m.local.invalidDate);return(y=t.year())<0&&y++,t.day()+30*(t.month()-1)+365*(y-1)+Math.floor(y/4)+this.jdEpoch-1},fromJD:function(y){var e=Math.floor(y)+.5-this.jdEpoch,n=Math.floor((e-Math.floor((e+366)/1461))/365)+1;n<=0&&n--,e=Math.floor(y)+.5-this.newDate(n,1,1).toJD();var t=Math.floor(e/30)+1,i=e-30*(t-1)+1;return this.newDate(n,t,i)}}),m.calendars.ethiopian=b},{"../main":346,"object-assign":247}],336:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function y(e,n){return e-n*Math.floor(e/n)}b.prototype=new m.baseCalendar,g(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,m.local.invalidYear);return this._leapYear(n.year())},_leapYear:function(e){return y(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,m.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,n,t){var i=this.newDate(e,n,t);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,m.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,m.local.invalidMonth),n===12&&this.leapYear(e)||n===8&&y(this.daysInYear(e),10)===5?30:n===9&&y(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 i=this._validate(e,n,t,m.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,n,t){var i=this._validate(e,n,t,m.local.invalidDate);e=i.year(),n=i.month(),t=i.day();var r=e<=0?e+1:e,d=this.jdEpoch+this._delay1(r)+this._delay2(r)+t+1;if(n<7){for(var l=7;l<=this.monthsInYear(e);l++)d+=this.daysInMonth(e,l);for(l=1;l<n;l++)d+=this.daysInMonth(e,l)}else for(l=7;l<n;l++)d+=this.daysInMonth(e,l);return d},_delay1:function(e){var n=Math.floor((235*e-234)/19),t=12084+13753*n,i=29*n+Math.floor(t/25920);return y(3*(i+1),7)<3&&i++,i},_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 i=e-this.toJD(n,t,1)+1;return this.newDate(n,t,i)}}),m.calendars.hebrew=b},{"../main":346,"object-assign":247}],337:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}b.prototype=new m.baseCalendar,g(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\u012Bs","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(y){return(11*this._validate(y,this.minMonth,this.minDay,m.local.invalidYear).year()+14)%30<11},weekOfYear:function(y,e,n){var t=this.newDate(y,e,n);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(y){return this.leapYear(y)?355:354},daysInMonth:function(y,e){var n=this._validate(y,e,this.minDay,m.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===12&&this.leapYear(n.year())?1:0)},weekDay:function(y,e,n){return this.dayOfWeek(y,e,n)!==5},toJD:function(y,e,n){var t=this._validate(y,e,n,m.local.invalidDate);return y=t.year(),e=t.month(),y=y<=0?y+1:y,(n=t.day())+Math.ceil(29.5*(e-1))+354*(y-1)+Math.floor((3+11*y)/30)+this.jdEpoch-1},fromJD:function(y){y=Math.floor(y)+.5;var e=Math.floor((30*(y-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var n=Math.min(12,Math.ceil((y-29-this.toJD(e,1,1))/29.5)+1),t=y-this.toJD(e,n,1)+1;return this.newDate(e,n,t)}}),m.calendars.islamic=b},{"../main":346,"object-assign":247}],338:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}b.prototype=new m.baseCalendar,g(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(y){var e=this._validate(y,this.minMonth,this.minDay,m.local.invalidYear);return(y=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(y,e,n){var t=this.newDate(y,e,n);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(y,e){var n=this._validate(y,e,this.minDay,m.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(n.month()===2&&this.leapYear(n.year())?1:0)},weekDay:function(y,e,n){return(this.dayOfWeek(y,e,n)||7)<6},toJD:function(y,e,n){var t=this._validate(y,e,n,m.local.invalidDate);return y=t.year(),e=t.month(),n=t.day(),y<0&&y++,e<=2&&(y--,e+=12),Math.floor(365.25*(y+4716))+Math.floor(30.6001*(e+1))+n-1524.5},fromJD:function(y){var e=Math.floor(y+.5)+1524,n=Math.floor((e-122.1)/365.25),t=Math.floor(365.25*n),i=Math.floor((e-t)/30.6001),r=i-Math.floor(i<14?1:13),d=n-Math.floor(r>2?4716:4715),l=e-t-Math.floor(30.6001*i);return d<=0&&d--,this.newDate(d,r,l)}}),m.calendars.julian=b},{"../main":346,"object-assign":247}],339:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}function y(n,t){return n-t*Math.floor(n/t)}function e(n,t){return y(n-1,t)+1}b.prototype=new m.baseCalendar,g(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,m.local.invalidYear),!1},formatYear:function(n){n=this._validate(n,this.minMonth,this.minDay,m.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,i=0;i<n.length;i++){var r=parseInt(n[i],10);if(Math.abs(r)>19||i>0&&r<0)throw"Invalid Mayan year";t=20*t+r}return t},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,m.local.invalidYear),18},weekOfYear:function(n,t,i){return this._validate(n,t,i,m.local.invalidDate),0},daysInYear:function(n){return this._validate(n,this.minMonth,this.minDay,m.local.invalidYear),360},daysInMonth:function(n,t){return this._validate(n,t,this.minDay,m.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(n,t,i){return this._validate(n,t,i,m.local.invalidDate).day()},weekDay:function(n,t,i){return this._validate(n,t,i,m.local.invalidDate),!0},extraInfo:function(n,t,i){var r=this._validate(n,t,i,m.local.invalidDate).toJD(),d=this._toHaab(r),l=this._toTzolkin(r);return{haabMonthName:this.local.haabMonths[d[0]-1],haabMonth:d[0],haabDay:d[1],tzolkinDayName:this.local.tzolkinMonths[l[0]-1],tzolkinDay:l[0],tzolkinTrecena:l[1]}},_toHaab:function(n){var t=y((n-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,y(t,20)]},_toTzolkin:function(n){return[e((n-=this.jdEpoch)+20,20),e(n+4,13)]},toJD:function(n,t,i){var r=this._validate(n,t,i,m.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 i=Math.floor(n/20),r=n%20;return this.newDate(t,i,r)}}),m.calendars.mayan=b},{"../main":346,"object-assign":247}],340:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}b.prototype=new m.baseCalendar;var y=m.instance("gregorian");
vendor: 6,114 bytes, line 1213
1213g(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,m.local.invalidYear||m.regionalOptions[""].invalidYear);return y.leapYear(n.year()+(n.year()<1?1:0)+1469)},weekOfYear:function(e,n,t){var i=this.newDate(e,n,t);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,m.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 i=this._validate(e,n,t,m.local.invalidMonth);(e=i.year())<0&&e++;for(var r=i.day(),d=1;d<i.month();d++)r+=this.daysPerMonth[d-1];return r+y.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,i=1;t>this.daysInMonth(n,i);)t-=this.daysInMonth(n,i),i++;return this.newDate(n,i,t)}}),m.calendars.nanakshahi=b},{"../main":346,"object-assign":247}],341:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}b.prototype=new m.baseCalendar,g(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(y){return this.daysInYear(y)!==this.daysPerYear},weekOfYear:function(y,e,n){var t=this.newDate(y,e,n);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(y){if(y=this._validate(y,this.minMonth,this.minDay,m.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[y]===void 0)return this.daysPerYear;for(var e=0,n=this.minMonth;n<=12;n++)e+=this.NEPALI_CALENDAR_DATA[y][n];return e},daysInMonth:function(y,e){return y.year&&(e=y.month(),y=y.year()),this._validate(y,e,this.minDay,m.local.invalidMonth),this.NEPALI_CALENDAR_DATA[y]===void 0?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[y][e]},weekDay:function(y,e,n){return this.dayOfWeek(y,e,n)!==6},toJD:function(y,e,n){var t=this._validate(y,e,n,m.local.invalidDate);y=t.year(),e=t.month(),n=t.day();var i=m.instance(),r=0,d=e,l=y;this._createMissingCalendarData(y);var a=y-(d>9||d===9&&n>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(e!==9&&(r=n,d--);d!==9;)d<=0&&(d=12,l--),r+=this.NEPALI_CALENDAR_DATA[l][d],d--;return e===9?(r+=n-this.NEPALI_CALENDAR_DATA[l][0])<0&&(r+=i.daysInYear(a)):r+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],i.newDate(a,1,1).add(r,"d").toJD()},fromJD:function(y){var e=m.instance().fromJD(y),n=e.year(),t=e.dayOfYear(),i=n+56;this._createMissingCalendarData(i);for(var r=9,d=this.NEPALI_CALENDAR_DATA[i][0],l=this.NEPALI_CALENDAR_DATA[i][r]-d+1;t>l;)++r>12&&(r=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][r];var a=this.NEPALI_CALENDAR_DATA[i][r]-(l-t);return this.newDate(i,r,a)},_createMissingCalendarData:function(y){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var n=y-1;n<y+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]}}),m.calendars.nepali=b},{"../main":346,"object-assign":247}],342:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function y(e,n){return e-n*Math.floor(e/n)}b.prototype=new m.baseCalendar,g(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\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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,m.local.invalidYear);return 682*((n.year()-(n.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,n,t){var i=this.newDate(e,n,t);return i.add(-(i.dayOfWeek()+1)%7,"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,m.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 i=this._validate(e,n,t,m.local.invalidDate);e=i.year(),n=i.month(),t=i.day();var r=e-(e>=0?474:473),d=474+y(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),i=y(n,1029983),r=2820;if(i!==1029982){var d=Math.floor(i/366),l=y(i,366);r=Math.floor((2134*d+2816*l+2815)/1028522)+d+1}var a=r+2820*t+474;a=a<=0?a-1:a;var u=e-this.toJD(a,1,1)+1,f=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),o=e-this.toJD(a,f,1)+1;return this.newDate(a,f,o)}}),m.calendars.persian=b,m.calendars.jalali=b},{"../main":346,"object-assign":247}],343:[function(v,$,te){var m=v("../main"),g=v("object-assign"),b=m.instance();function y(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}y.prototype=new m.baseCalendar,g(y.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,m.local.invalidYear);return e=this._t2gYear(n.year()),b.leapYear(e)},weekOfYear:function(e,n,t){var i=this._validate(e,this.minMonth,this.minDay,m.local.invalidYear);return e=this._t2gYear(i.year()),b.weekOfYear(e,i.month(),i.day())},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,m.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 i=this._validate(e,n,t,m.local.invalidDate);return e=this._t2gYear(i.year()),b.toJD(e,i.month(),i.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)}}),m.calendars.taiwan=y},{"../main":346,"object-assign":247}],344:[function(v,$,te){var m=v("../main"),g=v("object-assign"),b=m.instance();function y(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}y.prototype=new m.baseCalendar,g(y.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,m.local.invalidYear);return e=this._t2gYear(n.year()),b.leapYear(e)}
1213,weekOfYear:function(e,n,t){var i=this._validate(e,this.minMonth,this.minDay,m.local.invalidYear);return e=this._t2gYear(i.year()),b.weekOfYear(e,i.month(),i.day())},daysInMonth:function(e,n){var t=this._validate(e,n,this.minDay,m.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 i=this._validate(e,n,t,m.local.invalidDate);return e=this._t2gYear(i.year()),b.toJD(e,i.month(),i.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)}}),m.calendars.thai=y},{"../main":346,"object-assign":247}],345:[function(v,$,te){var m=v("../main"),g=v("object-assign");function b(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}b.prototype=new m.baseCalendar,g(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\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","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,m.local.invalidYear);return this.daysInYear(n.year())===355},weekOfYear:function(e,n,t){var i=this.newDate(e,n,t);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.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,m.local.invalidMonth).toJD()-24e5+.5,i=0,r=0;r<y.length;r++){if(y[r]>t)return y[i]-y[i-1];i++}return 30},weekDay:function(e,n,t){return this.dayOfWeek(e,n,t)!==5},toJD:function(e,n,t){var i=this._validate(e,n,t,m.local.invalidDate),r=12*(i.year()-1)+i.month()-15292;return i.day()+y[r-1]-1+24e5-.5},fromJD:function(e){for(var n=e-24e5+.5,t=0,i=0;i<y.length&&!(y[i]>n);i++)t++;
1213var r=t+15292,d=Math.floor((r-1)/12),l=d+1,a=r-12*d,u=n-y[t-1]+1;return this.newDate(l,a,u)},isValid:function(e,n,t){var i=m.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(e=e.year!=null?e.year:e)>=1276&&e<=1500),i},_validate:function(e,n,t,i){var r=m.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw i.replace(/\{0\}/,this.local.name);return r}}),m.calendars.ummalqura=b;var y
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(v,$,te){var m=v("object-assign");function g(){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(i,r,d,l){if(this._calendar=i,this._year=r,this._month=d,this._day=l,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 y(i,r){return"000000".substring(0,r-(i=""+i).length)+i}function e(){this.shortYearCutoff="+10"}function n(i){this.local=this.regionalOptions[i]||this.regionalOptions[""]}m(g.prototype,{instance:function(i,r){i=(i||"gregorian").toLowerCase(),r=r||"";var d=this._localCals[i+"-"+r];if(!d&&this.calendars[i]&&(d=new this.calendars[i](r),this._localCals[i+"-"+r]=d),!d)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,i);return d},newDate:function(i,r,d,l,a){return(l=(i!=null&&i.year?i.calendar(
vendor: 8,055 bytes, line 1213
1213):typeof l=="string"?this.instance(l,a):l)||this.instance()).newDate(i,r,d)},substituteDigits:function(i){return function(r){return(r+"").replace(/[0-9]/g,function(d){return i[d]})}},substituteChineseDigits:function(i,r){return function(d){for(var l="",a=0;d>0;){var u=d%10;l=(u===0?"":i[u]+r[a])+l,a++,d=Math.floor(d/10)}return l.indexOf(i[1]+r[1])===0&&(l=l.substr(1)),l||i[0]}}}),m(b.prototype,{newDate:function(i,r,d){return this._calendar.newDate(i??this,r,d)},year:function(i){return arguments.length===0?this._year:this.set(i,"y")},month:function(i){return arguments.length===0?this._month:this.set(i,"m")},day:function(i){return arguments.length===0?this._day:this.set(i,"d")},date:function(i,r,d){if(!this._calendar.isValid(i,r,d))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=i,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(i,r){return this._calendar.add(this,i,r)},set:function(i,r){return this._calendar.set(this,i,r)},compareTo:function(i){if(this._calendar.name!==i._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,i._calendar.local.name);var r=this._year!==i._year?this._year-i._year:this._month!==i._month?this.monthOfYear()-i.monthOfYear():this._day-i._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(i){return this._calendar.fromJD(i)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(i){return this._calendar.fromJSDate(i)},toString:function(){return(this.year()<0?"-":"")+y(Math.abs(this.year()),4)+"-"+y(this.month(),2)+"-"+y(this.day(),2)}}),m(e.prototype,{_validateLevel:0,newDate:function(i,r,d){return i==null?this.today():(i.year&&(this._validate(i,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate),d=i.day(),r=i.month(),i=i.year()),new b(this,i,r,d))},today:function(){return this.fromJSDate(new Date)},epoch:function(i){return this._validate(i,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(i){var r=this._validate(i,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+y(Math.abs(r.year()),4)},monthsInYear:function(i){return this._validate(i,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(i,r){var d=this._validate(i,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(d.month()+this.monthsInYear(d)-this.firstMonth)%this.monthsInYear(d)+this.minMonth},fromMonthOfYear:function(i,r){var d=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(i)+this.minMonth;return this._validate(i,d,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),d},daysInYear:function(i){var r=this._validate(i,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(i,r,d){var l=this._validate(i,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate);return l.toJD()-this.newDate(l.year(),this.fromMonthOfYear(l.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(i,r,d){var l=this._validate(i,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(l))+2)%this.daysInWeek()},extraInfo:function(i,r,d){return this._validate(i,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(i,r,d){return this._validate(i,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(i,this._add(i,r,d),r,d)},_add:function(i,r,d){if(this._validateLevel++,d==="d"||d==="w"){var l=i.toJD()+r*(d==="w"?this.daysInWeek():1),a=i.calendar().fromJD(l);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var u=i.year()+(d==="y"?r:0),f=i.monthOfYear()+(d==="m"?r:0);a=i.day(),d==="y"?(i.month()!==this.fromMonthOfYear(u,f)&&(f=this.newDate(u,i.month(),this.minDay).monthOfYear()),f=Math.min(f,this.monthsInYear(u)),a=Math.min(a,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),a=Math.min(a,this.daysInMonth(u,this.fromMonthOfYear(u,f))));var o=[u,this.fromMonthOfYear(u,f),a];return this._validateLevel--,o}catch(h){throw this._validateLevel--,h}},_correctAdd:function(i,r,d,l){if(!(this.hasYearZero||l!=="y"&&l!=="m"||r[0]!==0&&i.year()>0==r[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[l],u=d<0?-1:1;r=this._add(i,d*a[0]+u*a[1],a[2])}return i.date(r[0],r[1],r[2])},set:function(i,r,d){this._validate(i,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var l=d==="y"?r:i.year(),a=d==="m"?r:i.month(),u=d==="d"?r:i.day();return d!=="y"&&d!=="m"||(u=Math.min(u,this.daysInMonth(l,a))),i.date(l,a,u)},isValid:function(i,r,d){this._validateLevel++;var l=this.hasYearZero||i!==0;if(l){var a=this.newDate(i,r,this.minDay);l=r>=this.minMonth&&r-this.minMonth<this.monthsInYear(a)&&d>=this.minDay&&d-this.minDay<this.daysInMonth(a)}return this._validateLevel--,l},toJSDate:function(i,r,d){var l=this._validate(i,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate);return t.instance().fromJD(this.toJD(l)).toJSDate()},fromJSDate:function(i){return this.fromJD(t.instance().fromJSDate(i).toJD())},_validate:function(i,r,d,l){if(i.year){if(this._validateLevel===0&&this.name!==i.calendar().name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,i.calendar().local.name);return i}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(i,r,d))throw l.replace(/\{0\}/,this.local.name);var a=this.newDate(i,r,d);return this._validateLevel--,a}catch(u){throw this._validateLevel--,u}}}),n.prototype=new e,m(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(i){var r=this._validate(i,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(i=r.year()+(r.year()<0?1:0))%4==0&&(i%100!=0||i%400==0)},weekOfYear:function(i,r,d){var l=this.newDate(i,r,d);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(i,r){var d=this._validate(i,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(i,r,d){return(this.dayOfWeek(i,r,d)||7)<6}
1213,toJD:function(i,r,d){var l=this._validate(i,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate);i=l.year(),r=l.month(),d=l.day(),i<0&&i++,r<3&&(r+=12,i--);var a=Math.floor(i/100),u=2-a+Math.floor(a/4);return Math.floor(365.25*(i+4716))+Math.floor(30.6001*(r+1))+d+u-1524.5},fromJD:function(i){var r=Math.floor(i+.5),d=Math.floor((r-186721625e-2)/36524.25),l=(d=r+1+d-Math.floor(d/4))+1524,a=Math.floor((l-122.1)/365.25),u=Math.floor(365.25*a),f=Math.floor((l-u)/30.6001),o=l-u-Math.floor(30.6001*f),h=f-(f>13.5?13:1),p=a-(h>2.5?4716:4715);return p<=0&&p--,this.newDate(p,h,o)},toJSDate:function(i,r,d){var l=this._validate(i,r,d,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=new Date(l.year(),l.month()-1,l.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(i){return this.newDate(i.getFullYear(),i.getMonth()+1,i.getDate())}});var t=$.exports=new g;t.cdate=b,t.baseCalendar=e,t.calendars.gregorian=n},{"object-assign":247}],347:[function(v,$,te){var m=v("object-assign"),g=v("./main");m(g.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"}),g.local=g.regionalOptions[""],m(g.cdate.prototype,{formatDate:function(b,y){return typeof b!="string"&&(y=b,b=""),this._calendar.formatDate(b||"",this,y)}}),m(g.baseCalendar.prototype,{UNIX_EPOCH:g.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:g.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,y,e){if(typeof b!="string"&&(e=y,y=b,b=""),!y)return"";if(y.calendar()!==this)throw g.local.invalidFormat||g.regionalOptions[""].invalidFormat;b=b||this.local.dateFormat;for(var n,t,i,r,d=(e=e||{}).dayNamesShort||this.local.dayNamesShort,l=e.dayNames||this.local.dayNames,a=e.monthNumbers||this.local.monthNumbers,u=e.monthNamesShort||this.local.monthNamesShort,f=e.monthNames||this.local.monthNames,o=(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(o(L,P))for(;S.length<I;)S="0"+S;return S},p=this,s=function(L){return typeof a=="function"?a.call(p,L,o("m")):T(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]},c=this.local.digits,T=function(L){return e.localNumbers&&c?c(L):L},_="",w=!1,k=0;k<b.length;k++)if(w)b.charAt(k)!=="'"||o("'")?_+=b.charAt(k):w=!1;else switch(b.charAt(k)){case"d":_+=T(h("d",y.day(),2));break;case"D":_+=(n="D",t=y.dayOfWeek(),i=d,r=l,o(n)?r[t]:i[t]);break;case"o":_+=h("o",y.dayOfYear(),3);break;case"w":_+=h("w",y.weekOfYear(),2);break;case"m":_+=s(y);break;case"M":_+=x(y,o("M"));break;case"y":_+=o("y",2)?y.year():(y.year()%100<10?"0":"")+y.year()%100;break;case"Y":o("Y",2),_+=y.formatYear();break;case"J":_+=y.toJD();break;case"@":_+=(y.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":_+=(y.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":o("'")?_+="'":w=!0;break;default:_+=b.charAt(k)}return _},parseDate:function(b,y,e){if(y==null)throw g.local.invalidArguments||g.regionalOptions[""].invalidArguments;if((y=typeof y=="object"?y.toString():y+"")==="")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,i=e.dayNames||this.local.dayNames,r=e.parseMonth||this.local.parseMonth,d=e.monthNumbers||this.local.monthNumbers,l=e.monthNamesShort||this.local.monthNamesShort,a=e.monthNames||this.local.monthNames,u=-1,f=-1,o=-1,h=-1,p=-1,s=!1,x=!1,c=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},T=function(D,F){var H=c(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=y.substring(I).match(Z);if(!K)throw(g.local.missingNumberAt||g.regionalOptions[""].missingNumberAt).replace(/\{0\}/,I);return I+=K[0].length,parseInt(K[0],10)},_=this,w=function(){if(typeof d=="function"){c("m");var D=d.call(_,y.substring(I));return I+=D.length,D}return T("m")},k=function(D,F,H,V){for(var Z=c(D,V)?H:F,K=0;K<Z.length;K++)if(y.substr(I,Z[K].length).toLowerCase()===Z[K].toLowerCase())return I+=Z[K].length,K+_.minMonth;throw(g.local.unknownNameAt||g.regionalOptions[""].unknownNameAt).replace(/\{0\}/,I)},L=function(){if(typeof a=="function"){var D=c("M")?a.call(_,y.substring(I)):l.call(_,
1213y.substring(I));return I+=D.length,D}return k("M",l,a)},A=function(){if(y.charAt(I)!==b.charAt(P))throw(g.local.unexpectedLiteralAt||g.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,I);I++},I=0,P=0;P<b.length;P++)if(x)b.charAt(P)!=="'"||c("'")?A():x=!1;else switch(b.charAt(P)){case"d":h=T("d");break;case"D":k("D",t,i);break;case"o":p=T("o");break;case"w":T("w");break;case"m":o=w();break;case"M":o=L();break;case"y":var S=P;s=!c("y",2),P=S,f=T("y",2);break;case"Y":f=T("Y",2);break;case"J":u=T("J")+.5,y.charAt(I)==="."&&(I++,T("J"));break;case"@":u=T("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":u=T("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":I=y.length;break;case"'":c("'")?A():x=!0;break;default:A()}if(I<y.length)throw g.local.unexpectedText||g.regionalOptions[""].unexpectedText;if(f===-1?f=this.today().year():f<100&&s&&(f+=n===-1?1900:this.today().year()-this.today().year()%100-(f<=n?0:100)),typeof o=="string"&&(o=r.call(this,f,o)),p>-1){o=1,h=p;for(var E=this.daysInMonth(f,o);h>E;E=this.daysInMonth(f,o))o++,h-=E}return u>-1?this.fromJD(u):this.newDate(f,o,h)},determineDate:function(b,y,e,n,t){e&&typeof e!="object"&&(t=n,n=e,e=null),typeof n!="string"&&(t=n,n="");var i=this;return y=y?y.newDate():null,b=b==null?y:typeof b=="string"?function(r){try{return i.parseDate(n,r,t)}catch{}for(var d=((r=r.toLowerCase()).match(/^c/)&&e?e.newDate():null)||i.today(),l=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,a=l.exec(r);a;)d.add(parseInt(a[1],10),a[2]||"d"),a=l.exec(r);return d}(b):typeof b=="number"?isNaN(b)||b===1/0||b===-1/0?y:i.today().add(b,"d"):i.newDate(b)}})},{"./main":346,"object-assign":247}],348:[function(v,$,te){$.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(v,$,te){var m=v("./arrow_paths"),g=v("../../plots/font_attributes"),b=v("../../plots/cartesian/constants"),y=v("../../plot_api/plot_template").templatedArray;v("../../constants/axis_placeable_objects"),$.exports=y("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:g({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:m.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:m.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:g({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(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("./draw").draw;function y(n){var t=n._fullLayout;
1213m.filterVisible(t.annotations).forEach(function(i){var r=g.getFromId(n,i.xref),d=g.getFromId(n,i.yref),l=g.getRefType(i.xref),a=g.getRefType(i.yref);i._extremes={},l==="range"&&e(i,r),a==="range"&&e(i,d)})}function e(n,t){var i,r=t._id,d=r.charAt(0),l=n[d],a=n["a"+d],u=n[d+"ref"],f=n["a"+d+"ref"],o=n["_"+d+"padplus"],h=n["_"+d+"padminus"],p={x:1,y:-1}[d]*n[d+"shift"],s=3*n.arrowsize*n.arrowwidth||0,x=s+p,c=s-p,T=3*n.startarrowsize*n.arrowwidth||0,_=T+p,w=T-p;if(f===u){var k=g.findExtremes(t,[t.r2c(l)],{ppadplus:x,ppadminus:c}),L=g.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(o,_),ppadminus:Math.max(h,w)});i={min:[k.min[0],L.min[0]],max:[k.max[0],L.max[0]]}}else _=a?_+a:_,w=a?w-a:w,i=g.findExtremes(t,[t.r2c(l)],{ppadplus:Math.max(o,x,_),ppadminus:Math.max(h,c,w)});n._extremes[r]=i}$.exports=function(n){var t=n._fullLayout;if(m.filterVisible(t.annotations).length&&n._fullData.length)return m.syncOrAsync([b,y],n)}},{"../../lib":503,"../../plots/cartesian/axes":554,"./draw":355}],351:[function(v,$,te){var m=v("../../lib"),g=v("../../registry"),b=v("../../plot_api/plot_template").arrayEditor;function y(n,t){var i,r,d,l,a,u,f,o=n._fullLayout.annotations,h=[],p=[],s=[],x=(t||[]).length;for(i=0;i<o.length;i++)if(l=(d=o[i]).clicktoshow){for(r=0;r<x;r++)if(u=(a=t[r]).xaxis,f=a.yaxis,u._id===d.xref&&f._id===d.yref&&u.d2r(a.x)===e(d._xclick,u)&&f.d2r(a.y)===e(d._yclick,f)){(d.visible?l==="onout"?p:s:h).push(i);break}r===x&&d.visible&&l==="onout"&&p.push(i)}return{on:h,off:p,explicitOff:s}}function e(n,t){return t.type==="log"?t.l2r(n):t.d2r(n)}$.exports={hasClickToShow:function(n,t){var i=y(n,t);return i.on.length>0||i.explicitOff.length>0},onClick:function(n,t){var i,r,d=y(n,t),l=d.on,a=d.off.concat(d.explicitOff),u={},f=n._fullLayout.annotations;if(!(!l.length&&!a.length)){for(i=0;i<l.length;i++)(r=b(n.layout,"annotations",f[l[i]])).modifyItem("visible",!0),m.extendFlat(u,r.getUpdateObj());for(i=0;i<a.length;i++)(r=b(n.layout,"annotations",f[a[i]])).modifyItem("visible",!1),m.extendFlat(u,r.getUpdateObj());return g.call("update",n,{},u)}}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../registry":638}],352:[function(v,$,te){var m=v("../../lib"),g=v("../color");$.exports=function(b,y,e,n){n("opacity");var t=n("bgcolor"),i=n("bordercolor"),r=g.opacity(i);n("borderpad");var d=n("borderwidth"),l=n("showarrow");if(n("text",l?" ":e._dfltTitle.annotation),n("textangle"),m.coerceFont(n,"font",e.font),n("width"),n("align"),n("height")&&n("valign"),l){var a,u,f=n("arrowside");f.indexOf("end")!==-1&&(a=n("arrowhead"),u=n("arrowsize")),f.indexOf("start")!==-1&&(n("startarrowhead",a),n("startarrowsize",u)),n("arrowcolor",r?y.bordercolor:g.defaultLine),n("arrowwidth",2*(r&&d||1)),n("standoff"),n("startstandoff")}var o=n("hovertext"),h=e.hoverlabel||{};if(o){var p=n("hoverlabel.bgcolor",h.bgcolor||(g.opacity(t)?g.rgb(t):g.defaultLine)),s=n("hoverlabel.bordercolor",h.bordercolor||g.contrast(p));m.coerceFont(n,"hoverlabel.font",{family:h.font.family,size:h.font.size,color:h.font.color||s})}n("captureevents",!!o)}},{"../../lib":503,"../color":366}],353:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib/to_log_range");$.exports=function(b,y,e,n){y=y||{};var t=e==="log"&&y.type==="linear",i=e==="linear"&&y.type==="log";if(t||i)for(var r,d,l=b._fullLayout.annotations,a=y._id.charAt(0),u=0;u<l.length;u++)r=l[u],d="annotations["+u+"].",r[a+"ref"]===y._id&&f(a),r["a"+a+"ref"]===y._id&&f("a"+a);function f(o){var h=r[o],p=null;p=t?g(h,y.range):Math.pow(10,h),m(p)||(p=null),n(d+o,p)}}},{"../../lib/to_log_range":531,"fast-isnumeric":190}],354:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("../../plots/array_container_defaults"),y=v("./common_defaults"),e=v("./attributes");function n(t,i,r){function d(L,A){return m.coerce(t,i,e,L,A)}var l=d("visible"),a=d("clicktoshow");if(l||a){y(t,i,r,d);for(var u=i.showarrow,f=["x","y"],o=[-10,-30],h={_fullLayout:r},p=0;p<2;p++){var s=f[p],x=g.coerceRef(t,i,h,s,"","paper");if(x!=="paper"&&g.getFromId(h,x)._annIndices.push(i._index),g.coercePosition(i,h,d,x,s,.5),u){var c="a"+s,T=g.coerceRef(t,i,h,c,"pixel",["pixel","paper"]);T!=="pixel"&&T!==x&&(T=i[c]="pixel");var _=T==="pixel"?o[p]:.4;g.coercePosition(i,h,d,T,c,_)}d(s+"anchor"),d(s+"shift")}if(m.noneOrAll(t,i,["x","y"]),u&&m.noneOrAll(t,i,["ax","ay"]),a){var w=d("xclick"),k=d("yclick");i._xclick=w===void 0?i.x:g.cleanPosition(w,h,i.xref),i._yclick=k===void 0?i.y:g.cleanPosition(k,h,i.yref)}}}$.exports=function(t,i){b(t,i,{name:"annotations",handleItemDefaults:n})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"./attributes":349,"./common_defaults":352}],355:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../registry"),b=v("../../plots/plots"),y=v("../../lib"),e=y.strTranslate,n=v("../../plots/cartesian/axes"),t=v("../color"),i=v("../drawing"),r=v("../fx"),d=v("../../lib/svg_text_utils"),l=v("../../lib/setcursor"),a=v("../dragelement"),u=v("../../plot_api/plot_template").arrayEditor,f=v("./draw_arrow_head");function o(s,x){var c=s._fullLayout.annotations[x]||{},T=n.getFromId(s,c.xref),_=n.getFromId(s,c.yref);T&&T.setScale(),_&&_.setScale(),p(s,c,x,!1,T,_)}function h(s,x,c,T,_){var w=_[c],k=_[c+"ref"],L=c.indexOf("y")!==-1,A=n.getRefType(k)==="domain",I=L?T.h:T.w;return s?A?w+(L?-x:x)/s._length:s.p2r(s.r2p(w)+x):w+(L?-x:x)/I}function p(s,x,c,T,_,w){var k,L,A=s._fullLayout,I=s._fullLayout._size,P=s._context.edits;T?(k="annotation-"+T,L=T+".annotations"):(k="annotation",L="annotations");var S=u(s.layout,L,x),E=S.modifyBase,D=S.modifyItem,F=S.getUpdateObj;A._infolayer.selectAll("."+k+'[data-index="'+c+'"]').remove();var H="clip"+A._uid+"_ann"+c;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(c)).style("opacity",x.opacity),G=K.append("g").classed("annotation-text-g",!0),W=P[x.showarrow?"annotationTail":"annotationPosition"],Q=x.captureevents||P.annotationText||W,R=G.append("g").style("pointer-events",Q?"all":null).call(l,"pointer").on("click",function(){s._dragging=!1,s.emit("plotly_clickannotation",oe(m.event))});x.hovertext&&R.on("mouseover",function(){var de=x.hoverlabel,xe=de.font,_e=this.getBoundingClientRect(),we=s.getBoundingClientRect();r.loneHover({x0:_e.left-we.left,x1:_e.right-we.left,y:(_e.top+_e.bottom)/2-we.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:s})}).on("mouseout",function(){r.loneUnhover(A._hoverlayer.node())});var N=x.borderwidth,U=x.borderpad,ee=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?y.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:s}).call(pe).on("edit",function(de){x.text=de,this.call(pe),D("text",de),_&&_.autorange&&E(_._name+".autorange",!0),w&&w.autorange&&E(w._name+".autorange",!0),g.call("_guiRelayout",s,F())}):se.call(pe)}else m.selectAll("#"+H).remove();function oe(de){var xe={index:c,annotation:x._input,fullAnnotation:x,event:de};return T&&(xe.subplotId=T),xe}function pe(de){return de.call(i.font,re).attr({"text-anchor":{left:"start",right:"end"}[x.align]||"middle"}),d.convertToTspans(de,s,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"),_e=!xe.empty(),we=i.bBox((_e?xe:se).node()),Ee=we.width,fe=we.height,ge=x.width||Ee,ke=x.height||fe,be=Math.round(ge+2*ee),Se=Math.round(ke+2*ee);
vendor: 4,623 bytes, line 1213
1213function Oe($e,yt){return yt==="auto"&&(yt=$e<1/3?"left":$e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[yt]}for(var De=!1,je=["x","y"],Je=0;Je<je.length;Je++){var ze,Ue,Ge,Ye,et,ct=je[Je],mt=x[ct+"ref"]||ct,Ct=x["a"+ct+"ref"],Tt={x:_,y:w}[ct],nt=(Z+(ct==="x"?0:-90))*Math.PI/180,Qe=be*Math.cos(nt),Et=Se*Math.sin(nt),Gt=Math.abs(Qe)+Math.abs(Et),Xt=x[ct+"anchor"],Fe=x[ct+"shift"]*(ct==="x"?1:-1),qe=V[ct],wt=n.getRefType(mt);if(Tt&&wt!=="domain"){var ft=Tt.r2fraction(x[ct]);(ft<0||ft>1)&&(Ct===mt?((ft=Tt.r2fraction(x["a"+ct]))<0||ft>1)&&(De=!0):De=!0),ze=Tt._offset+Tt.r2p(x[ct]),Ye=.5}else{var Ce=wt==="domain";ct==="x"?(Ge=x[ct],ze=Ce?Tt._offset+Tt._length*Ge:ze=I.l+I.w*Ge):(Ge=1-x[ct],ze=Ce?Tt._offset+Tt._length*Ge:ze=I.t+I.h*Ge),Ye=x.showarrow?.5:Ge}if(x.showarrow){qe.head=ze;var Ie=x["a"+ct];if(et=Qe*Oe(.5,x.xanchor)-Et*Oe(.5,x.yanchor),Ct===mt){var Te=n.getRefType(Ct);Te==="domain"?(ct==="y"&&(Ie=1-Ie),qe.tail=Tt._offset+Tt._length*Ie):Te==="paper"?ct==="y"?(Ie=1-Ie,qe.tail=I.t+I.h*Ie):qe.tail=I.l+I.w*Ie:qe.tail=Tt._offset+Tt.r2p(Ie),Ue=et}else qe.tail=ze+Ie,Ue=et+Ie;qe.text=qe.tail+et;var Pe=A[ct==="x"?"width":"height"];if(mt==="paper"&&(qe.head=y.constrain(qe.head,1,Pe-1)),Ct==="pixel"){var Ve=-Math.max(qe.tail-3,qe.text),tt=Math.min(qe.tail+3,qe.text)-Pe;Ve>0?(qe.tail+=Ve,qe.text+=Ve):tt>0&&(qe.tail-=tt,qe.text-=tt)}qe.tail+=Fe,qe.head+=Fe}else Ue=et=Gt*Oe(Ye,Xt),qe.text=ze+et;qe.text+=Fe,et+=Fe,Ue+=Fe,x["_"+ct+"padplus"]=Gt/2+Ue,x["_"+ct+"padminus"]=Gt/2-Ue,x["_"+ct+"size"]=Gt,x["_"+ct+"shift"]=et}if(De)R.remove();else{var ot=0,at=0;if(x.align!=="left"&&(ot=(ge-Ee)*(x.align==="center"?.5:1)),x.valign!=="top"&&(at=(ke-fe)*(x.valign==="middle"?.5:1)),_e)xe.select("svg").attr({x:ee+ot-1,y:ee+at}).call(i.setClipUrl,X?H:null,s);else{var _t=ee+at-we.top,bt=ee+ot-we.left;se.call(d.positionText,bt,_t).call(i.setClipUrl,X?H:null,s)}J.select("rect").call(i.setRect,ee,ee,ge,ke),j.call(i.setRect,N/2,N/2,be-N,Se-N),R.call(i.setTranslate,Math.round(V.x.text-be/2),Math.round(V.y.text-Se/2)),G.attr({transform:"rotate("+Z+","+V.x.text+","+V.y.text+")"});var jt,Nt=function($e,yt){K.selectAll(".annotation-arrow-g").remove();var Ot=V.x.head,Mt=V.y.head,Pt=V.x.tail+$e,Le=V.y.tail+yt,Xe=V.x.text+$e,it=V.y.text+yt,At=y.rotationXYMatrix(Z,Xe,it),It=y.apply2DTransform(At),Zt=y.apply2DTransform2(At),Jt=+j.attr("width"),Vt=+j.attr("height"),pr=Xe-.5*Jt,Ir=pr+Jt,fr=it-.5*Vt,$t=fr+Vt,er=[[pr,fr,pr,$t],[pr,$t,Ir,$t],[Ir,$t,Ir,fr],[Ir,fr,pr,fr]].map(Zt);if(!er.reduce(function(Er,on){return Er^!!y.segmentsIntersect(Ot,Mt,Ot+1e6,Mt+1e6,on[0],on[1],on[2],on[3])},!1)){er.forEach(function(Er){var on=y.segmentsIntersect(Pt,Le,Ot,Mt,Er[0],Er[1],Er[2],Er[3]);on&&(Pt=on.x,Le=on.y)});var ar=x.arrowwidth,hr=x.arrowcolor,vr=x.arrowside,Pr=K.append("g").style({opacity:t.opacity(hr)}).classed("annotation-arrow-g",!0),Ur=Pr.append("path").attr("d","M"+Pt+","+Le+"L"+Ot+","+Mt).style("stroke-width",ar+"px").call(t.stroke,t.rgb(hr));if(f(Ur,vr,x),P.annotationPosition&&Ur.node().parentNode&&!T){var qr=Ot,rn=Mt;if(x.standoff){var An=Math.sqrt(Math.pow(Ot-Pt,2)+Math.pow(Mt-Le,2));qr+=x.standoff*(Pt-Ot)/An,rn+=x.standoff*(Le-Mt)/An}var mn,Mn,Xr=Pr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Pt-qr)+","+(Le-rn),transform:e(qr,rn)}).style("stroke-width",ar+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)");a.init({element:Xr.node(),gd:s,prepFn:function(){var Er=i.getTranslate(R);mn=Er.x,Mn=Er.y,_&&_.autorange&&E(_._name+".autorange",!0),w&&w.autorange&&E(w._name+".autorange",!0)},moveFn:function(Er,on){var Un=It(mn,Mn),Tr=Un[0]+Er,en=Un[1]+on;R.call(i.setTranslate,Tr,en),D("x",h(_,Er,"x",I,x)),D("y",h(w,on,"y",I,x)),x.axref===x.xref&&D("ax",h(_,Er,"ax",I,x)),x.ayref===x.yref&&D("ay",h(w,on,"ay",I,x)),Pr.attr("transform",e(Er,on)),G.attr({transform:"rotate("+Z+","+Tr+","+en+")"})},doneFn:function(){g.call("_guiRelayout",s,F());var Er=document.querySelector(".js-notes-box-panel");Er&&Er.redraw(Er.selectedObj)}})}}};x.showarrow&&Nt(0,0),W&&a.init({element:R.node(),gd:s,prepFn:function(){jt=G.attr("transform")},moveFn:function($e,yt){var Ot="pointer";if(x.showarrow)x.axref===x.xref?D("ax",h(_,$e,"ax",I,x)):D("ax",x.ax+$e),x.ayref===x.yref?D("ay",h(w,yt,"ay",I.w,x)):D("ay",x.ay+yt),Nt($e,yt);else{if(T)return;var Mt,Pt;if(_)Mt=h(_,$e,"x",I,x);else{var Le=x._xsize/I.w,Xe=x.x+(x._xshift-x.xshift)/I.w-Le/2;Mt=a.align(Xe+$e/I.w,Le,0,1,x.xanchor)}if(w)Pt=h(w,yt,"y",I,x);else{var it=x._ysize/I.h,At=x.y-(x._yshift+x.yshift)/I.h-it/2;Pt=a.align(At-yt/I.h,it,0,1,x.yanchor)}
1213D("x",Mt),D("y",Pt),_&&w||(Ot=a.getCursor(_?.5:Mt,w?.5:Pt,x.xanchor,x.yanchor))}G.attr({transform:e($e,yt)+jt}),l(R,Ot)},clickFn:function($e,yt){x.captureevents&&s.emit("plotly_clickannotation",oe(yt))},doneFn:function(){l(R),g.call("_guiRelayout",s,F());var $e=document.querySelector(".js-notes-box-panel");$e&&$e.redraw($e.selectedObj)}})}}}$.exports={draw:function(s){var x=s._fullLayout;x._infolayer.selectAll(".annotation").remove();for(var c=0;c<x.annotations.length;c++)x.annotations[c].visible&&o(s,c);return b.previousPromises(s)},drawOne:o,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(v,$,te){var m=v("@plotly/d3"),g=v("../color"),b=v("./arrow_paths"),y=v("../../lib"),e=y.strScale,n=y.strRotate,t=y.strTranslate;$.exports=function(i,r,d){var l,a,u,f,o=i.node(),h=b[d.arrowhead||0],p=b[d.startarrowhead||0],s=(d.arrowwidth||1)*(d.arrowsize||1),x=(d.arrowwidth||1)*(d.startarrowsize||1),c=r.indexOf("start")>=0,T=r.indexOf("end")>=0,_=h.backoff*s+d.standoff,w=p.backoff*x+d.startstandoff;if(o.nodeName==="line"){l={x:+i.attr("x1"),y:+i.attr("y1")},a={x:+i.attr("x2"),y:+i.attr("y2")};var k=l.x-a.x,L=l.y-a.y;if(f=(u=Math.atan2(L,k))+Math.PI,_&&w&&_+w>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);a.x+=A,a.y+=I,i.attr({x2:a.x,y2:a.y})}if(w){if(w*w>k*k+L*L)return void K();var P=w*Math.cos(u),S=w*Math.sin(u);l.x-=P,l.y-=S,i.attr({x1:l.x,y1:l.y})}}else if(o.nodeName==="path"){var E=o.getTotalLength(),D="";if(E<_+w)return void K();var F=o.getPointAtLength(0),H=o.getPointAtLength(.1);u=Math.atan2(F.y-H.y,F.x-H.x),l=o.getPointAtLength(Math.min(w,E)),D="0px,"+w+"px,";var V=o.getPointAtLength(E),Z=o.getPointAtLength(E-.1);f=Math.atan2(V.y-Z.y,V.x-Z.x),a=o.getPointAtLength(Math.max(0,E-_)),D+=E-(D?w+_:_)+"px,"+E+"px",i.style("stroke-dasharray",D)}function K(){i.style("stroke-dasharray","0px,100px")}function G(W,Q,R,N){W.path&&(W.noRotate&&(R=0),m.select(o.parentNode).append("path").attr({class:i.attr("class"),d:W.path,transform:t(Q.x,Q.y)+n(180*R/Math.PI)+e(N)}).style({fill:g.rgb(d.arrowcolor),"stroke-width":0}))}c&&G(p,l,u,x),T&&G(h,a,f,s)}},{"../../lib":503,"../color":366,"./arrow_paths":348,"@plotly/d3":58}],357:[function(v,$,te){var m=v("./draw"),g=v("./click");$.exports={moduleType:"component",name:"annotations",layoutAttributes:v("./attributes"),supplyLayoutDefaults:v("./defaults"),includeBasePlot:v("../../plots/cartesian/include_components")("annotations"),calcAutorange:v("./calc_autorange"),draw:m.draw,drawOne:m.drawOne,drawRaw:m.drawRaw,hasClickToShow:g.hasClickToShow,onClick:g.onClick,convertCoords:v("./convert_coords")}},{"../../plots/cartesian/include_components":567,"./attributes":349,"./calc_autorange":350,"./click":351,"./convert_coords":353,"./defaults":354,"./draw":355}],358:[function(v,$,te){var m=v("../annotations/attributes"),g=v("../../plot_api/edit_types").overrideAll,b=v("../../plot_api/plot_template").templatedArray;$.exports=g(b("annotation",{visible:m.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:m.xanchor,xshift:m.xshift,yanchor:m.yanchor,yshift:m.yshift,text:m.text,textangle:m.textangle,font:m.font,width:m.width,height:m.height,opacity:m.opacity,align:m.align,valign:m.valign,bgcolor:m.bgcolor,bordercolor:m.bordercolor,borderpad:m.borderpad,borderwidth:m.borderwidth,showarrow:m.showarrow,arrowcolor:m.arrowcolor,arrowhead:m.arrowhead,startarrowhead:m.startarrowhead,arrowside:m.arrowside,arrowsize:m.arrowsize,startarrowsize:m.startarrowsize,arrowwidth:m.arrowwidth,standoff:m.standoff,startstandoff:m.startstandoff,hovertext:m.hovertext,hoverlabel:m.hoverlabel,captureevents:m.captureevents}),"calc","from-root")},{"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../annotations/attributes":349}],359:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes");function b(y,e){var n=e.fullSceneLayout.domain,t=e.fullLayout._size,i={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};y._xa={},m.extendFlat(y._xa,i),g.setConvert(y._xa),y._xa._offset=t.l+n.x[0]*t.w,y._xa.l2p=function(){return .5*(1+y._pdata[0]/y._pdata[3])*t.w*(n.x[1]-n.x[0])},y._ya={},m.extendFlat(y._ya,i),g.setConvert(y._ya),y._ya._offset=t.t+(1-n.y[1])*t.h,y._ya.l2p=function(){return .5*(1-y._pdata[1]/y._pdata[3])*t.h*(n.y[1]-n.y[0])}}$.exports=function(y){for(var e=y.fullSceneLayout.annotations,n=0;n<e.length;n++)b(e[n],y);y.fullLayout._infolayer.selectAll(".annotation-"+y.id).remove()}},{"../../lib":503,"../../plots/cartesian/axes":554}],360:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("../../plots/array_container_defaults"),y=v("../annotations/common_defaults"),e=v("./attributes");function n(t,i,r,d){function l(u,f){return m.coerce(t,i,e,u,f)}function a(u){var f=u+"axis",o={_fullLayout:{}};return o._fullLayout[f]=r[f],g.coercePosition(i,o,l,u,u,.5)}l("visible")&&(y(t,i,d.fullLayout,l),a("x"),a("y"),a("z"),m.noneOrAll(t,i,["x","y","z"]),i.xref="x",i.yref="y",i.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),i.showarrow&&(i.axref="pixel",i.ayref="pixel",l("ax",-10),l("ay",-30),m.noneOrAll(t,i,["ax","ay"])))}$.exports=function(t,i,r){b(t,i,{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(v,$,te){var m=v("../annotations/draw").drawRaw,g=v("../../plots/gl3d/project"),b=["x","y","z"];$.exports=function(y){for(var e=y.fullSceneLayout,n=y.dataScale,t=e.annotations,i=0;i<t.length;i++){for(var r=t[i],d=!1,l=0;l<3;l++){var a=b[l],u=r[a],f=e[a+"axis"].r2fraction(u);if(f<0||f>1){d=!0;break}}d?y.fullLayout._infolayer.select(".annotation-"+y.id+'[data-index="'+i+'"]').remove():(r._pdata=g(y.glplot.cameraParams,[e.xa
1213xis.r2l(r.x)*n[0],e.yaxis.r2l(r.y)*n[1],e.zaxis.r2l(r.z)*n[2]]),m(y.graphDiv,r,i,y.id,r._xa,r._ya))}}},{"../../plots/gl3d/project":607,"../annotations/draw":355}],362:[function(v,$,te){var m=v("../../registry"),g=v("../../lib");$.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:v("./attributes")}}},layoutAttributes:v("./attributes"),handleDefaults:v("./defaults"),includeBasePlot:function(b,y){var e=m.subplotsRegistry.gl3d;if(!!e)for(var n=e.attrRegex,t=Object.keys(b),i=0;i<t.length;i++){var r=t[i];n.test(r)&&(b[r].annotations||[]).length&&(g.pushUnique(y._basePlotModules,e),g.pushUnique(y._subplots.gl3d,r))}},convert:v("./convert"),draw:v("./draw")}},{"../../lib":503,"../../registry":638,"./attributes":358,"./convert":359,"./defaults":360,"./draw":361}],363:[function(v,$,te){$.exports=v("world-calendars/dist/main"),v("world-calendars/dist/plus"),v("world-calendars/dist/calendars/chinese"),v("world-calendars/dist/calendars/coptic"),v("world-calendars/dist/calendars/discworld"),v("world-calendars/dist/calendars/ethiopian"),v("world-calendars/dist/calendars/hebrew"),v("world-calendars/dist/calendars/islamic"),v("world-calendars/dist/calendars/julian"),v("world-calendars/dist/calendars/mayan"),v("world-calendars/dist/calendars/nanakshahi"),v("world-calendars/dist/calendars/nepali"),v("world-calendars/dist/calendars/persian"),v("world-calendars/dist/calendars/taiwan"),v("world-calendars/dist/calendars/thai"),v("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(v,$,te){var m=v("./calendars"),g=v("../../lib"),b=v("../../constants/numerical"),y=b.EPOCHJD,e=b.ONEDAY,n={valType:"enumerated",values:g.sortObjectKeys(m.calendars),editType:"calc",dflt:"gregorian"},t=function(p,s,x,c){var T={};return T[x]=n,g.coerce(p,s,T,x,c)},i={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 s=r[p];return s||(s=r[p]=m.instance(p))}function l(p){return g.extendFlat({},n,{description:p})}function a(p){return"Sets the calendar system to use with `"+p+"` date data."}var u={xcalendar:l(a("x"))},f=g.extendFlat({},u,{ycalendar:l(a("y"))}),o=g.extendFlat({},f,{zcalendar:l(a("z"))}),h=l(["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(" "));$.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:f,bar:f,box:f,heatmap:f,contour:f,histogram:f,histogram2d:f,histogram2dcontour:f,scatter3d:o,surface:o,mesh3d:o,scattergl:f,ohlc:u,candlestick:u},layout:{calendar:l(["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:l(["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:l(["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,s,x,c){for(var T=0;T<x.length;
1213T++)t(p,s,x[T]+"calendar",c.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,s,x){for(var c,T,_,w,k,L=Math.floor((s+.05)/e)+y,A=d(x).fromJD(L),I=0;(I=p.indexOf("%",I))!==-1;)(c=p.charAt(I+1))==="0"||c==="-"||c==="_"?(_=3,T=p.charAt(I+2),c==="_"&&(c="-")):(T=c,c="0",_=2),(w=i[T])?(k=w==="##"?"##":A.formatDate(w[c]),p=p.substr(0,I)+k+p.substr(I+_),I+=k.length):I+=_;return p}}},{"../../constants/numerical":479,"../../lib":503,"./calendars":363}],365:[function(v,$,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(v,$,te){var m=v("tinycolor2"),g=v("fast-isnumeric"),b=v("../../lib/array").isTypedArray,y=$.exports={},e=v("./attributes");y.defaults=e.defaults;var n=y.defaultLine=e.defaultLine;y.lightLine=e.lightLine;var t=y.background=e.background;function i(r){if(g(r)||typeof r!="string")return r;var d=r.trim();if(d.substr(0,3)!=="rgb")return r;var l=d.match(/^rgba?\s*\(([^()]*)\)$/);if(!l)return r;var a=l[1].trim().split(/\s*[\s,]\s*/),u=d.charAt(3)==="a"&&a.length===4;if(!u&&a.length!==3)return r;for(var f=0;f<a.length;f++){if(!a[f].length||(a[f]=Number(a[f]),!(a[f]>=0)))return r;if(f===3)a[f]>1&&(a[f]=1);else if(a[f]>=1)return r}var o=Math.round(255*a[0])+", "+Math.round(255*a[1])+", "+Math.round(255*a[2]);return u?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}y.tinyRGB=function(r){var d=r.toRgb();return"rgb("+Math.round(d.r)+", "+Math.round(d.g)+", "+Math.round(d.b)+")"},y.rgb=function(r){return y.tinyRGB(m(r))},y.opacity=function(r){return r?m(r).getAlpha():0},y.addOpacity=function(r,d){var l=m(r).toRgb();return"rgba("+Math.round(l.r)+", "+Math.round(l.g)+", "+Math.round(l.b)+", "+d+")"},y.combine=function(r,d){var l=m(r).toRgb();if(l.a===1)return m(r).toRgbString();var a=m(d||t).toRgb(),u=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},f={r:u.r*(1-l.a)+l.r*l.a,g:u.g*(1-l.a)+l.g*l.a,b:u.b*(1-l.a)+l.b*l.a};return m(f).toRgbString()},y.contrast=function(r,d,l){var a=m(r);return a.getAlpha()!==1&&(a=m(y.combine(r,t))),(a.isDark()?d?a.lighten(d):t:l?a.darken(l):n).toString()},y.stroke=function(r,d){var l=m(d);r.style({stroke:y.tinyRGB(l),"stroke-opacity":l.getAlpha()})},y.fill=function(r,d){var l=m(d);r.style({fill:y.tinyRGB(l),"fill-opacity":l.getAlpha()})},y.clean=function(r){if(r&&typeof r=="object"){var d,l,a,u,f=Object.keys(r);for(d=0;d<f.length;d++)if(u=r[a=f[d]],a.substr(a.length-5)==="color")if(Array.isArray(u))for(l=0;l<u.length;l++)u[l]=i(u[l]);else r[a]=i(u);else if(a.substr(a.length-10)==="colorscale"&&Array.isArray(u))for(l=0;l<u.length;l++)Array.isArray(u[l])&&(u[l][1]=i(u[l][1]));else if(Array.isArray(u)){var o=u[0];if(!Array.isArray(o)&&o&&typeof o=="object")for(l=0;l<u.length;l++)y.clean(u[l])}else u&&typeof u=="object"&&!b(u)&&y.clean(u)}}},{"../../lib/array":485,"./attributes":365,"fast-isnumeric":190,tinycolor2:312}],367:[function(v,$,te){var m=v("../../plots/cartesian/layout_attributes"),g=v("../../plots/font_attributes"),b=v("../../lib/extend").extendFlat,y=v("../../plot_api/edit_types").overrideAll;$.exports=y({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:m.linecolor,outlinewidth:m.linewidth,bordercolor:m.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:m.tickmode,nticks:m.nticks,tick0:m.tick0,dtick:m.dtick,tickvals:m.tickvals,ticktext:m.ticktext,ticks:b({},m.ticks,{dflt:""}),ticklabeloverflow:b({},m.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:m.ticklen,tickwidth:m.tickwidth,tickcolor:m.tickcolor,ticklabelstep:m.ticklabelstep,showticklabels:m.showticklabels,tickfont:g({}),tickangle:m.tickangle,tickformat:m.tickformat,tickformatstops:m.tickformatstops,tickprefix:m.tickprefix,showtickprefix:m.showtickprefix,ticksuffix:m.ticksuffix,showticksuffix:m.showticksuffix,separatethousands:m.separatethousands,exponentformat:m.exponentformat,minexponent:m.minexponent,showexponent:m.showexponent,title:{text:{valType:"string"},font:g({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:g({}),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(v,$,te){$.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(v,$,te){var m=v("../../lib"),g=v("../../plot_api/plot_template"),b=v("../../plots/cartesian/tick_value_defaults"),y=v("../../plots/cartesian/tick_mark_defaults"),e=v("../../plots/cartesian/tick_label_defaults"),n=v("../../plots/cartesian/prefix_suffix_defaults"),t=v("./attributes");$.exports=function(i,r,d){var l=g.newContainer(r,"colorbar"),a=i.colorbar||{};function u(L,A){return m.coerce(a,l,t,L,A)}var f=d.margin||{t:0,b:0,l:0,r:0},o=d.width-f.l-f.r,h=d.height-f.t-f.b,p=u("orientation")==="v",s=u("thicknessmode");u("thickness",s==="fraction"?30/(p?o:h):30);var x=u("lenmode");u("len",x==="fraction"?1:p?h:o),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"),m.noneOrAll(a,l,["x","y"]),u("outlinecolor"),u("outlinewidth"),u("bordercolor"),u("borderwidth"),u("bgcolor");var c=m.coerce(a,l,{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",c.indexOf("inside")!==-1?"hide past domain":"hide past div"),b(a,l,u,"linear");var T=d.font,_={outerTicks:!1,font:T};c.indexOf("inside")!==-1&&(_.bgColor="black"),n(a,l,u,"linear",_),e(a,l,u,"linear",_),y(a,l,u,"linear",_),u("title.text",d._dfltTitle.colorbar);var w=l.tickfont,k=m.extendFlat({},w,{color:T.color,size:m.bigFont(w.size)});m.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(v,$,te){var m=v("@plotly/d3"),g=v("tinycolor2"),b=v("../../plots/plots"),y=v("../../registry"),e=v("../../plots/cartesian/axes"),n=v("../dragelement"),t=v("../../lib"),i=t.strTranslate,r=v("../../lib/extend").extendFlat,d=v("../../lib/setcursor"),l=v("../drawing"),a=v("../color"),u=v("../titles"),f=v("../../lib/svg_text_utils"),o=v("../colorscale/helpers").flipScale,h=v("../../plots/cartesian/axis_defaults"),p=v("../../plots/cartesian/position_defaults"),s=v("../../plots/cartesian/layout_attributes"),x=v("../../constants/alignment"),c=x.LINE_SPACING,T=x.FROM_TL,_=x.FROM_BR,w=v("./constants").cn;$.exports={draw:function(k){var L=k._fullLayout._infolayer.selectAll("g."+w.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}
1213,_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?o(P.colorscale):P.colorscale,I._zrange=[P[E.min],P[E.max]])}for(var K=0;K<F.length;K++){var G=F[K],W=(S=G[0].trace)._module.colorbar;if(S.visible===!0&&W)for(var Q=Array.isArray(W),R=Q?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+(Q&&U?"-"+U:""),I._traceIndex=S.index,I._propPrefix=(U?U+".":"")+"colorbar.",I._meta=S._meta,Z(),H.push(I))}}for(var ee in D._colorAxes)if((P=D[ee]).showscale){var j=D._colorAxes[ee];(I=V(P.colorbar))._id="cb"+ee,I._propPrefix=ee+".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(w.colorbar,!0),L.each(function(A){var I=m.select(this);t.ensureSingle(I,"rect",w.cbbg),t.ensureSingle(I,"g",w.cbfills),t.ensureSingle(I,"g",w.cblines),t.ensureSingle(I,"g",w.cbaxis,function(S){S.classed(w.crisp,!0)}),t.ensureSingle(I,"g",w.cbtitleunshift,function(S){S.append("g").classed(w.cbtitle,!0)}),t.ensureSingle(I,"rect",w.cboutline);var P=function(S,E,D){var F=E.orientation==="v",H=E.len,V=E.lenmode,Z=E.thickness,K=E.thicknessmode,G=E.outlinewidth,W=E.borderwidth,Q=E.bgcolor,R=E.xanchor,N=E.yanchor,U=E.xpad,ee=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||m.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},_e=E._levels,we=function(wt,ft,Ce){var Ie,Te,Pe=ft._levels,Ve=[],tt=[],ot=Pe.end+Pe.size/100,at=Pe.size,_t=1.001*Ce[0]-.001*Ce[1],bt=1.001*Ce[1]-.001*Ce[0];for(Te=0;Te<1e5&&(Ie=Pe.start+Te*at,!(at>0?Ie>=ot:Ie<=ot));Te++)Ie>_t&&Ie<bt&&Ve.push(Ie);if(ft._fillgradient)tt=[0];else if(typeof ft._fillcolor=="function"){var jt=ft._filllevels;if(jt)for(ot=jt.end+jt.size/100,at=jt.size,Te=0;Te<1e5&&(Ie=jt.start+Te*at,!(at>0?Ie>=ot:Ie<=ot));Te++)Ie>Ce[0]&&Ie<Ce[1]&&tt.push(Ie);else(tt=Ve.map(function(Nt){return Nt-Pe.size/2})).push(tt[tt.length-1]+Pe.size)}else ft._fillcolor&&typeof ft._fillcolor=="string"&&(tt=[0]);return Pe.size<0&&(Ve.reverse(),tt.reverse()),{line:Ve,fill:tt}}(0,E,ce),Ee=we.fill,fe=we.line,ge=Math.round(Z*(K==="fraction"?F?re.w:re.h:1)),ke=ge/(F?re.w:re.h),be=Math.round(H*(V==="fraction"?F?re.h:re.w:1)),Se=be/(F?re.h:re.w),Oe=Math.round(F?j*re.w+U:X*re.h+ee),De={center:.5,right:1}[R]||0,je={top:1,middle:.5}[N]||0,Je=F?j-De*ke:X-je*ke,ze=F?X-je*Se:j-De*Se,Ue=Math.round(F?re.h*(1-ze):re.w*ze);E._lenFrac=Se,E._thickFrac=ke,E._uFrac=Je,E._vFrac=ze;var Ge=E._axis=function(wt,ft,Ce){var Ie=wt._fullLayout,Te=ft.orientation==="v",Pe={type:"linear",range:Ce,tickmode:ft.tickmode,nticks:ft.nticks,tick0:ft.tick0,dtick:ft.dtick,tickvals:ft.tickvals,ticktext:ft.ticktext,ticks:ft.ticks,ticklen:ft.ticklen,tickwidth:ft.tickwidth,tickcolor:ft.tickcolor,showticklabels:ft.showticklabels,ticklabelposition:ft.ticklabelposition,ticklabeloverflow:ft.ticklabeloverflow,ticklabelstep:ft.ticklabelstep,tickfont:ft.tickfont,tickangle:ft.tickangle,tickformat:ft.tickformat,exponentformat:ft.exponentformat,minexponent:ft.minexponent,separatethousands:ft.separatethousands,showexponent:ft.showexponent,showtickprefix:ft.showtickprefix,tickprefix:ft.tickprefix,showticksuffix:ft.showticksuffix,ticksuffix:ft.ticksuffix,title:ft.title,showline:!0,anchor:"free",side:Te?"right":"bottom",position:1},Ve=Te?"y":"x",tt={type:"linear",_id:Ve+ft._id},ot={letter:Ve,font:Ie.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:Ie.calendar};function at(_t,bt){return t.coerce(Pe,tt,s,_t,bt)}return h(Pe,tt,at,ot,Ie),p(Pe,tt,at,ot),tt}(D,E,ce);Ge.position=ke+(F?j+U/re.w:X+ee/re.h);var Ye=["top","bottom"].indexOf(pe)!==-1;if(F&&Ye&&(Ge.title.side=pe,Ge.titlex=j+U/re.w,Ge.titley=ze+(oe.side==="top"?Se-ee/re.h:ee/re.h)),F||Ye||(Ge.title.side=pe,Ge.titley=X+ee/re.h,Ge.titlex=ze+U/re.w),se.color&&E.tickmode==="auto"){Ge.tickmode="linear",Ge.tick0=_e.start;var et=_e.size,ct=t.constrain(be/50,4,15)+1,mt=(ce[1]-ce[0])/((E.nticks||ct)*et);if(mt>1){var Ct=Math.pow(10,Math.floor(Math.log(mt)/Math.LN10));et*=Ct*t.roundUp(mt/Ct,[2,5,10]),(Math.abs(_e.start)/_e.size+1e-6)%1<2e-6&&(Ge.tick0=0)}Ge.dtick=et}
1213Ge.domain=F?[ze+ee/re.h,ze+Se-ee/re.h]:[ze+U/re.w,ze+Se-U/re.w],Ge.setScale(),S.attr("transform",i(Math.round(re.l),Math.round(re.t)));var Tt,nt=S.select("."+w.cbtitleunshift).attr("transform",i(-Math.round(re.l),-Math.round(re.t))),Qe=Ge.ticklabelposition,Et=Ge.title.font.size,Gt=S.select("."+w.cbaxis),Xt=0,Fe=0;function qe(wt,ft){var Ce={propContainer:Ge,propName:E._propPrefix+"title",traceIndex:E._traceIndex,_meta:E._meta,placeholder:J._dfltTitle.colorbar,containerGroup:S.select("."+w.cbtitle)},Ie=wt.charAt(0)==="h"?wt.substr(1):"h"+wt;S.selectAll("."+Ie+",."+Ie+"-math-group").remove(),u.draw(D,wt,r(Ce,ft||{}))}return t.syncOrAsync([b.previousPromises,function(){var wt,ft;(F&&Ye||!F&&!Ye)&&(pe==="top"&&(wt=U+re.l+re.w*j,ft=ee+re.t+re.h*(1-ze-Se)+3+.75*Et),pe==="bottom"&&(wt=U+re.l+re.w*j,ft=ee+re.t+re.h*(1-ze)-3-.25*Et),pe==="right"&&(ft=ee+re.t+re.h*X+3+.75*Et,wt=U+re.l+re.w*ze),qe(Ge._id+"title",{attributes:{x:wt,y:ft,"text-anchor":F?"start":"middle"}}))},function(){if(!F&&!Ye||F&&Ye){var wt,ft=S.select("."+w.cbtitle),Ce=ft.select("text"),Ie=[-G/2,G/2],Te=ft.select(".h"+Ge._id+"title-math-group").node(),Pe=15.6;if(Ce.node()&&(Pe=parseInt(Ce.node().style.fontSize,10)*c),Te?(wt=l.bBox(Te),Fe=wt.width,(Xt=wt.height)>Pe&&(Ie[1]-=(Xt-Pe)/2)):Ce.node()&&!Ce.classed(w.jsPlaceholder)&&(wt=l.bBox(Ce.node()),Fe=wt.width,Xt=wt.height),F){if(Xt){if(Xt+=5,pe==="top")Ge.domain[1]-=Xt/re.h,Ie[1]*=-1;else{Ge.domain[0]+=Xt/re.h;var Ve=f.lineCount(Ce);Ie[1]+=(1-Ve)*Pe}ft.attr("transform",i(Ie[0],Ie[1])),Ge.setScale()}}else Fe&&(pe==="right"&&(Ge.domain[0]+=(Fe+Et/2)/re.w),ft.attr("transform",i(Ie[0],Ie[1])),Ge.setScale())}S.selectAll("."+w.cbfills+",."+w.cblines).attr("transform",F?i(0,Math.round(re.h*(1-Ge.domain[1]))):i(Math.round(re.w*Ge.domain[0]),0)),Gt.attr("transform",F?i(0,Math.round(-re.t)):i(Math.round(-re.l),0));var tt=S.select("."+w.cbfills).selectAll("rect."+w.cbfill).attr("style","").data(Ee);tt.enter().append("rect").classed(w.cbfill,!0).style("stroke","none"),tt.exit().remove();var ot=ce.map(Ge.c2p).map(Math.round).sort(function(Nt,$e){return Nt-$e});tt.each(function(Nt,$e){var yt=[$e===0?ce[0]:(Ee[$e]+Ee[$e-1])/2,$e===Ee.length-1?ce[1]:(Ee[$e]+Ee[$e+1])/2].map(Ge.c2p).map(Math.round);F&&(yt[1]=t.constrain(yt[1]+(yt[1]>yt[0])?1:-1,ot[0],ot[1]));var Ot=m.select(this).attr(F?"x":"y",Oe).attr(F?"y":"x",m.min(yt)).attr(F?"width":"height",Math.max(ge,2)).attr(F?"height":"width",Math.max(m.max(yt)-m.min(yt),2));if(E._fillgradient)l.gradient(Ot,D,E._id,F?"vertical":"horizontalreversed",E._fillgradient,"fill");else{var Mt=xe(Nt).replace("e-","");Ot.attr("fill",g(Mt).toHexString())}});var at=S.select("."+w.cblines).selectAll("path."+w.cbline).data(se.color&&se.width?fe:[]);at.enter().append("path").classed(w.cbline,!0),at.exit().remove(),at.each(function(Nt){var $e=Oe,yt=Math.round(Ge.c2p(Nt))+se.width/2%1;m.select(this).attr("d","M"+(F?$e+","+yt:yt+","+$e)+(F?"h":"v")+ge).call(l.lineGroupStyle,se.width,de(Nt),se.dash)}),Gt.selectAll("g."+Ge._id+"tick,path").remove();var _t=Oe+ge+(G||0)/2-(E.ticks==="outside"?1:0),bt=e.calcTicks(Ge),jt=e.getTickSigns(Ge)[2];return e.drawTicks(D,Ge,{vals:Ge.ticks==="inside"?e.clipEnds(Ge,bt):bt,layer:Gt,path:e.makeTickPath(Ge,_t,jt),transFn:e.makeTransTickFn(Ge)}),e.drawLabels(D,Ge,{vals:bt,layer:Gt,transFn:e.makeTransTickLabelFn(Ge),labelFns:e.makeLabelFns(Ge,_t)})},function(){if(F&&!Ye||!F&&Ye){var wt,ft,Ce=Ge.position||0,Ie=Ge._offset+Ge._length/2;if(pe==="right")ft=Ie,wt=re.l+re.w*Ce+10+Et*(Ge.showticklabels?1:.5);else if(wt=Ie,pe==="bottom"&&(ft=re.t+re.h*Ce+10+(Qe.indexOf("inside")===-1?Ge.tickfont.size:0)+(Ge.ticks!=="intside"&&E.ticklen||0)),pe==="top"){var Te=oe.text.split("<br>").length;ft=re.t+re.h*Ce+10-ge-c*Et*Te}qe((F?"h":"v")+Ge._id+"title",{avoid:{selection:m.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:wt,y:ft,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}},b.previousPromises,function(){var wt,ft=ge+G/2;Qe.indexOf("inside")===-1&&(wt=l.bBox(Gt.node()),ft+=F?wt.width:wt.height),Tt=nt.select("text");var Ce=0,Ie=F&&pe==="top",Te=!F&&pe==="right",Pe=0;if(Tt.node()&&!Tt.classed(w.jsPlaceholder)){var Ve,tt=nt.select(".h"+Ge._id+"title-math-group").node();tt&&(F&&Ye||!F&&!Ye)?(Ce=(wt=l.bBox(tt)).width,Ve=wt.height):(Ce=(wt=l.bBox(nt.node())).right-re.l-(F?Oe:Ue),Ve=wt.bottom-re.t-(F?Ue:Oe),F||pe!=="top"||(ft+=wt.height,Pe=wt.height)),Te&&(Tt.attr("transform",i(Ce/2+Et/2,0)),Ce*=2),ft=Math.max(ft,F?Ce:Ve)}var ot=2*(F?U:ee)+ft+W+G/2,at=0;!F&&oe.text&&N==="bottom"&&X<=0&&(ot+=at=ot/2,Pe+=at),J._hColorbarMoveTitle=at,J._hColorbarMoveCBTitle=Pe;var _t=W+G;S.select("."+w.cbbg).attr("x",(F?Oe:Ue)-_t/2-(F?U:0)).attr("y",(F?Ue:Oe)-(F?be:ee+Pe-at)).attr(F?"width":"height",Math.max(ot-at,2)).attr(F?"height":"width",Math.max(be+_t,2)).call(a.fill,Q).call(a.stroke,E.bordercolor).style("stroke-width",W);var bt=Te?Math.max(Ce-10,0):0;if(S.selectAll("."+w.cboutline).attr("x",(F?Oe:Ue+U)+bt).attr("y",(F?Ue+ee-be:Oe)+(Ie?Xt:0)).attr(F?"width":"height",Math.max(ge,2)).attr(F?"height":"width",Math.max(be-(F?2*ee+Xt:2*U+bt),2)).call(a.stroke,E.outlinecolor).style({fill:"none","stroke-width":G}),S.attr("transform",i(re.l-(F?De*ot:0),re.t-(F?0:(1-je)*ot-Pe))),!F&&(W||g(Q).getAlpha()&&!g.equals(J.paper_bgcolor,Q))){var jt=Gt.selectAll("text"),Nt=jt[0].length,$e=S.select("."+w.cbbg).node(),yt=l.bBox($e),Ot=l.getTranslate(S);jt.each(function(It,Zt){var Jt=Nt-1;if(Zt===0||Zt===Jt){var Vt,pr=l.bBox(this),Ir=l.getTranslate(this);if(Zt===Jt){var fr=pr.right+Ir.x;(Vt=yt.right+Ot.x+Ue-W-2+j-fr)>0&&(Vt=0)}else if(Zt===0){var $t=pr.left+Ir.x;(Vt=yt.left+Ot.x+Ue+W+2-$t)<0&&(Vt=0)}Vt&&(Nt<3?this.setAttribute("transform","translate("+Vt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Mt={},Pt=T[R],Le=_[R],Xe=T[N],it=_[N],At=ot-ge;F?(V==="pixels"?(Mt.y=X,Mt.t=be*Xe,Mt.b=be*it):(Mt.t=Mt.b=0,Mt.yt=X+H*Xe,Mt.yb=X-H*it),K==="pixels"?(Mt.x=j,Mt.l=ot*Pt,Mt.r=ot*Le):(Mt.l=At*Pt,Mt.r=At*Le,Mt.xl=j-Z*Pt,Mt.xr=j+Z*Le)):(V==="pixels"?(Mt.x=j,Mt.l=be*Pt,Mt.r=be*Le):(Mt.l=Mt.r=0,Mt.xl=j+H*Pt,Mt.xr=j-H*Le),K==="pixels"?(Mt.y=1-X,Mt.t=ot*Xe,Mt.b=ot*it):(Mt.t=At*Xe,Mt.b=At*it,Mt.yt=X-Z*Xe,Mt.yb=X+Z*it)),b.autoMargin(D,E._id,Mt)}],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(G,W){S.attr("transform",F+i(G,W)),H=n.align((Z?E._uFrac:E._vFrac)+G/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 Q=n.getCursor(H,V,E.xanchor,E.yanchor);d(S,Q)},doneFn:function(){if(d(S),H!==void 0&&V!==void 0){var G={};G[E._propPrefix+"x"]=H,G[E._propPrefix+"y"]=V,E._traceIndex!==void 0?y.call("_guiRestyle",D,G,E._traceIndex):y.call("_guiRelayout",D,G)}}})}(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(v,$,te){var m=v("../../lib");$.exports=function(g){return m.isPlainObject(g.colorbar)}},{"../../lib":503}],372:[function(v,$,te){$.exports={moduleType:"component",name:"colorbar",attributes:v("./attributes"),supplyDefaults:v("./defaults"),draw:v("./draw").draw,hasColorbar:v("./has_colorbar")}},{"./attributes":367,"./defaults":369,"./draw":370,"./has_colorbar":371}],373:[function(v,$,te){var m=v("../colorbar/attributes"),g=v("../../lib/regex").counter,b=v("../../lib/sort_object_keys"),y=v("./scales.js").scales;b(y);function e(n){return"`"+n+"`"}$.exports=function(n,t){n=n||"";var i,r=(t=t||{}).cLetter||"c",d=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(n),"noScale"in t?t.noScale:n==="marker.line"),l="showScaleDflt"in t?t.showScaleDflt:r==="z",a=typeof t.colorscaleDflt=="string"?y[t.colorscaleDflt]:null,u=t.editTypeOverride||"",f=n?n+".":"";"colorAttr"in t?(i=t.colorAttr,t.colorAttr):e(f+(i={z:"z",c:"color"}[r]));var o=r+"auto",h=r+"min",p=r+"max",s=r+"mid",x={};x[h]=x[p]=void 0;var c={};c[o]=!1;var T={};return i==="color"&&(T.color={valType:"color",arrayOk:!0,editType:u||"style"},t.anim&&(T.color.anim=!0)),T[o]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:x},T[h]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:c}
1213,T[p]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:c},T[s]={valType:"number",dflt:null,editType:"calc",impliedEdits:x},T.colorscale={valType:"colorscale",editType:"calc",dflt:a,impliedEdits:{autocolorscale:!1}},T.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},T.reversescale={valType:"boolean",dflt:!1,editType:"plot"},d||(T.showscale={valType:"boolean",dflt:l,editType:"calc"},T.colorbar=m),t.noColorAxis||(T.coloraxis={valType:"subplotid",regex:g("coloraxis"),dflt:null,editType:"calc"}),T}},{"../../lib/regex":520,"../../lib/sort_object_keys":526,"../colorbar/attributes":367,"./scales.js":381}],374:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("./helpers").extractOpts;$.exports=function(y,e,n){var t,i=y._fullLayout,r=n.vals,d=n.containerStr,l=d?g.nestedProperty(e,d).get():e,a=b(l),u=a.auto!==!1,f=a.min,o=a.max,h=a.mid,p=function(){return g.aggNums(Math.min,null,r)},s=function(){return g.aggNums(Math.max,null,r)};f===void 0?f=p():u&&(f=l._colorAx&&m(f)?Math.min(f,p()):p()),o===void 0?o=s():u&&(o=l._colorAx&&m(o)?Math.max(o,s()):s()),u&&h!==void 0&&(o-h>h-f?f=h-(o-h):o-h<h-f&&(o=h+(h-f))),f===o&&(f-=.5,o+=.5),a._sync("min",f),a._sync("max",o),a.autocolorscale&&(t=f*o<0?i.colorscale.diverging:f>=0?i.colorscale.sequential:i.colorscale.sequentialminus,a._sync("colorscale",t))}},{"../../lib":503,"./helpers":377,"fast-isnumeric":190}],375:[function(v,$,te){var m=v("../../lib"),g=v("./helpers").hasColorscale,b=v("./
1213helpers").extractOpts;$.exports=function(y,e){function n(u,f){var o=u["_"+f];o!==void 0&&(u[f]=o)}function t(u,f){var o=f.container?m.nestedProperty(u,f.container).get():u;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var h=b(o),p=h.auto;(p||h.min===void 0)&&n(o,f.min),(p||h.max===void 0)&&n(o,f.max),h.autocolorscale&&n(o,"colorscale")}}for(var i=0;i<y.length;i++){var r=y[i],d=r._module.colorbar;if(d)if(Array.isArray(d))for(var l=0;l<d.length;l++)t(r,d[l]);else t(r,d);g(r,"marker.line")&&t(r,{container:"marker.line",min:"cmin",max:"cmax"})}for(var a in e._colorAxes)t(e[a],{min:"cmin",max:"cmax"})}},{"../../lib":503,"./helpers":377}],376:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../colorbar/has_colorbar"),y=v("../colorbar/defaults"),e=v("./scales").isValid,n=v("../../registry").traceIs;function t(i,r){var d=r.slice(0,r.length-1);return r?g.nestedProperty(i,d).get()||{}:i}$.exports=function i(r,d,l,a,u){var f=u.prefix,o=u.cLetter,h="_module"in d,p=t(r,f),s=t(d,f),x=t(d._template||{},f)||{},c=function(){return delete r.coloraxis,delete d.coloraxis,i(r,d,l,a,u)};if(h){var T=l._colorAxes||{},_=a(f+"coloraxis");if(_){var w=n(d,"contour")&&g.nestedProperty(d,"contours.coloring").get()||"heatmap",k=T[_];return void(k?(k[2].push(c),k[0]!==w&&(k[0]=!1,g.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):T[_]=[w,d,[c]])}}var L=p[o+"min"],A=p[o+"max"],I=m(L)&&m(A)&&L<A;a(f+o+"auto",!I)?a(f+o+"mid"):(a(f+o+"min"),a(f+o+"max"));var P,S,E=p.colorscale,D=x.colorscale;E!==void 0&&(P=!e(E)),D!==void 0&&(P=!e(D)),a(f+"autocolorscale",P),a(f+"colorscale"),a(f+"reversescale"),f!=="marker.line."&&(f&&h&&(S=b(p)),a(f+"showscale",S)&&(f&&x&&(s._template=x),y(p,s,l)))}},{"../../lib":503,"../../registry":638,"../colorbar/defaults":369,"../colorbar/has_colorbar":371,"./scales":381,"fast-isnumeric":190}],377:[function(v,$,te){var m=v("@plotly/d3"),g=v("tinycolor2"),b=v("fast-isnumeric"),y=v("../../lib"),e=v("../color"),n=v("./scales").isValid,t=["showscale","autocolorscale","colorscale","reversescale","colorbar"],i=["min","max","mid","auto"];function r(f){var o,h,p,s=f._colorAx,x=s||f,c={};for(h=0;h<t.length;h++)c[p=t[h]]=x[p];if(s)for(o="c",h=0;h<i.length;h++)c[p=i[h]]=x["c"+p];else{var T;for(h=0;h<i.length;h++)((T="c"+(p=i[h]))in x||(T="z"+p)in x)&&(c[p]=x[T]);o=T.charAt(0)}return c._sync=function(_,w){var k=i.indexOf(_)!==-1?o+_:_;x[k]=x["_"+k]=w},c}function d(f){for(var o=r(f),h=o.min,p=o.max,s=o.reversescale?l(o.colorscale):o.colorscale,x=s.length,c=new Array(x),T=new Array(x),_=0;_<x;_++){var w=s[_];c[_]=h+w[0]*(p-h),T[_]=w[1]}return{domain:c,range:T}}function l(f){for(var o=f.length,h=new Array(o),p=o-1,s=0;p>=0;p--,s++){var x=f[p];h[s]=[1-x[0],x[1]]}return h}function a(f,o){o=o||{};for(var h=f.domain,p=f.range,s=p.length,x=new Array(s),c=0;c<s;c++){var T=g(p[c]).toRgb();x[c]=[T.r,T.g,T.b,T.a]}var _,w=m.scale.linear().domain(h).range(x).clamp(!0),k=o.noNumericCheck,L=o.returnArray;return(_=k&&L?w:k?function(A){return u(w(A))}:L?function(A){return b(A)?w(A):g(A).isValid()?A:e.defaultLine}:function(A){return b(A)?u(w(A)):g(A).isValid()?A:e.defaultLine}).domain=w.domain,_.range=function(){return p},_}function u(f){var o={r:f[0],g:f[1],b:f[2],a:f[3]};return g(o).toRgbString()}$.exports={hasColorscale:function(f,o,h){var p=o?y.nestedProperty(f,o).get()||{}:f,s=p[h||"color"],x=!1;if(y.isArrayOrTypedArray(s)){for(var c=0;c<s.length;c++)if(b(s[c])){x=!0;break}}return y.isPlainObject(p)&&(x||p.showscale===!0||b(p.cmin)&&b(p.cmax)||n(p.colorscale)||y.isPlainObject(p.colorbar))},extractOpts:r,extractScale:d,flipScale:l,makeColorScaleFunc:a,makeColorScaleFuncFromTrace:function(f,o){return a(d(f),o)}}},{"../../lib":503,"../color":366,"./scales":381,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],378:[function(v,$,te){var m=v("./scales"),g=v("./helpers");$.exports={moduleType:"component",name:"colorscale",attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyLayoutDefaults:v("./layout_defaults"),handleDefaults:v("./defaults"),crossTraceDefaults:v("./cross_trace_defaults"),calc:v("./calc"),scales:m.scales,defaultScale:m.defaultScale,getScale:m.get,isValidScale:m.isValid,hasColorscale:g.hasColorscale,extractOpts:g.extractOpts,extractScale:g.extractScale,flipScale:g.flipScale,makeColorScaleFunc:g.makeColorScaleFunc,makeColorScaleFuncFromTrace:g.makeColorScaleFuncFromTrace}},{"./attributes":373,"./calc":374,"./cross_trace_defaults":375,"./defaults":376,"./helpers":377,"./layout_attributes":379,"./layout_defaults":380,"./scales":381}],379:[function(v,$,te){var m=v("../../lib/extend").extendFlat,g
1213=v("./attributes"),b=v("./scales").scales;$.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:m({_isSubplotObj:!0,editType:"calc"},g("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},{"../../lib/extend":493,"./attributes":373,"./scales":381}],380:[function(v,$,te){var m=v("../../lib"),g=v("../../plot_api/plot_template"),b=v("./layout_attributes"),y=v("./defaults");$.exports=function(e,n){function t(o,h){return m.coerce(e,n,b,o,h)}t("colorscale.sequential"),t("colorscale.sequentialminus"),t("colorscale.diverging");var i,r,d=n._colorAxes;function l(o,h){return m.coerce(i,r,b.coloraxis,o,h)}for(var a in d){var u=d[a];if(u[0])i=e[a]||{},(r=g.newContainer(n,a,"coloraxis"))._name=a,y(i,r,n,l,{prefix:"",cLetter:"c"});else{for(var f=0;f<u[2].length;f++)u[2][f]();delete n._colorAxes[a]}}}},{"../../lib":503,"../../plot_api/plot_template":543,"./defaults":376,"./layout_attributes":379}],381:[function(v,$,te){var m=v("tinycolor2"),g={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,105)"],[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=g.RdBu;function y(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 i=e[t];if(i.length!==2||+i[0]<n||!m(i[1]).isValid())return!1;n=+i[0]}return!0}$.exports={scales:g,defaultScale:b,get:function(e,n){if(n||(n=b),!e)return n;function t(){try{e=g[e]||JSON.parse(e)}catch{e=n}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),y(e)?e:n},isValid:function(e){return g[e]!==void 0||y(e)}}},{tinycolor2:312}],382:[function(v,$,te){$.exports=function(m,g,b,y,e){var n=(m-b)/(y-b),t=n+g/(y-b),i=(n+t)/2;return e==="left"||e==="bottom"?n:e==="center"||e==="middle"?i:e==="right"||e==="top"?t:n<2/3-i?n:t>4/3-i?t:i}},{}],383:[function(v,$,te){var m=v("../../lib"),g=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];$.exports=function(b,y,e,n){return b=e==="left"?0:e==="center"?1:e==="right"?2:m.constrain(Math.floor(3*b),0,2),y=n==="bottom"?0:n==="middle"?1:n==="top"?2:m.constrain(Math.floor(3*y),0,2),g[y][b]}},{"../../lib":503}],384:[function(v,$,te){te.selectMode=function(m){return m==="lasso"||m==="select"},te.drawMode=function(m){return m==="drawclosedpath"||m==="drawopenpath"||m==="drawline"||m==="drawrect"||m==="drawcircle"},te.openMode=function(m){return m==="drawline"||m==="drawopenpath"}
1213,te.rectMode=function(m){return m==="select"||m==="drawline"||m==="drawrect"||m==="drawcircle"},te.freeMode=function(m){return m==="lasso"||m==="drawclosedpath"||m==="drawopenpath"},te.selectingOrDrawing=function(m){return te.freeMode(m)||te.rectMode(m)}},{}],385:[function(v,$,te){var m=v("mouse-event-offset"),g=v("has-hover"),b=v("has-passive-events"),y=v("../../lib").removeElement,e=v("../../plots/cartesian/constants"),n=$.exports={};n.align=v("./align"),n.getCursor=v("./cursor");var t=v("./unhover");function i(){var d=document.createElement("div");d.className="dragcover";var l=d.style;return l.position="fixed",l.left=0,l.right=0,l.top=0,l.bottom=0,l.zIndex=999999999,l.background="none",document.body.appendChild(d),d}function r(d){return m(d.changedTouches?d.changedTouches[0]:d,document.body)}n.unhover=t.wrapped,n.unhoverRaw=t.raw,n.init=function(d){var l,a,u,f,o,h,p,s,x=d.gd,c=1,T=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;var w=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);l=P[0],a=P[1],p=I.target,h=I,s=I.buttons===2||I.ctrlKey,I.clientX===void 0&&I.clientY===void 0&&(I.clientX=l,I.clientY=a),(u=new Date().getTime())-x._mouseDownTime<T?c+=1:(c=1,x._mouseDownTime=u),d.prepFn&&d.prepFn(I,l,a),g&&!s?(o=i()).style.cursor=window.getComputedStyle(_).cursor:g||(o=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=w(P[0]-l,P[1]-a,S),D=E[0],F=E[1];(D||F)&&(x._dragged=!0,n.unhover(x,I)),x._dragged&&d.moveFn&&!s&&(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),g?y(o):f&&(o.documentElement.style.cursor=f,f=null),x._dragging){if(x._dragging=!1,new Date().getTime()-x._mouseDownTime>T&&(c=Math.max(c-1,1)),x._dragged)d.doneFn&&d.doneFn();
1213else if(d.clickFn&&d.clickFn(c,h),!s){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=i},{"../../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(v,$,te){var m=v("../../lib/events"),g=v("../../lib/throttle"),b=v("../../lib/dom").getGraphDiv,y=v("../fx/constants"),e=$.exports={};e.wrapped=function(n,t,i){(n=b(n))._fullLayout&&g.clear(n._fullLayout._uid+y.HOVERID),e.raw(n,t,i)},e.raw=function(n,t){var i=n._fullLayout,r=n._hoverdata;t||(t={}),t.target&&!n._dragged&&m.triggerHandler(n,"plotly_beforehover",t)===!1||(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._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(v,$,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(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=g.numberFormat,y=v("fast-isnumeric"),e=v("tinycolor2"),n=v("../../registry"),t=v("../color"),i=v("../colorscale"),r=g.strTranslate,d=v("../../lib/svg_text_utils"),l=v("../../constants/xmlns_namespaces"),a=v("../../constants/alignment").LINE_SPACING,u=v("../../constants/interactions").DESELECTDIM,f=v("../../traces/scatter/subtypes"),o=v("../../traces/scatter/make_bubble_size_func"),h=v("../../components/fx/helpers").appendArrayPointValue,p=$.exports={};function s(G,W,Q){var R=W.fillpattern,N=R&&p.getPatternAttr(R.shape,0,"");if(N){var U=p.getPatternAttr(R.bgcolor,0,null),ee=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(G,"point",Q,re,N,X,J,void 0,R.fillmode,U,ee,j)}else W.fillcolor&&G.call(t.fill,W.fillcolor)}p.font=function(G,W,Q,R){g.isPlainObject(W)&&(R=W.color,Q=W.size,W=W.family),W&&G.style("font-family",W),Q+1&&G.style("font-size",Q+"px"),R&&G.call(t.fill,R)},p.setPosition=function(G,W,Q){G.attr("x",W).attr("y",Q)},p.setSize=function(G,W,Q){G.attr("width",W).attr("height",Q)},p.setRect=function(G,W,Q,R,N){G.call(p.setPosition,W,Q).call(p.setSize,R,N)},p.translatePoint=function(G,W,Q,R){var N=Q.c2p(G.x),U=R.c2p(G.y);return!!(y(N)&&y(U)&&W.node())&&(W.node().nodeName==="text"?W.attr("x",N).attr("y",U):W.attr("transform",r(N,U)),!0)},p.translatePoints=function(G,W,Q){G.each(function(R){var N=m.select(this);p.translatePoint(R,N,W,Q)})},p.hideOutsideRangePoint=function(G,W,Q,R,N,U){W.attr("display",Q.isPtWithinRange(G,N)&&R.isPtWithinRange(G,U)?null:"none")},p.hideOutsideRangePoints=function(G,W){if(W._hasClipOnAxisFalse){var Q=W.xaxis,R=W.yaxis;G.each(function(N){var U=N[0].trace,ee=U.xcalendar,j=U.ycalendar,X=n.traceIs(U,"bar-like")?".bartext":".point,.textpoint";G.selectAll(X).each(function(J){p.hideOutsideRangePoint(J,m.select(this),Q,R,ee,j)})})}},p.crispRound=function(G,W,Q){return W&&y(W)?G._context.staticPlot?W:W<1?1:Math.round(W):Q||0},p.singleLineStyle=function(G,W,Q,R,N){W.style("fill","none");var U=(((G||[])[0]||{}).trace||{}).line||{},ee=Q||U.width||0,j=N||U.dash||"";t.stroke(W,R||U.color),p.dashLine(W,j,ee)},p.lineGroupStyle=function(G,W,Q,R){G.style("fill","none").each(function(N){var U=(((N||[])[0]||{}).trace||{}).line||{},ee=W||U.width||0,j=R||U.dash||"";m.select(this).call(t.stroke,Q||U.color).call(p.dashLine,j,ee)})},p.dashLine=function(G,W,Q){Q=+Q||0,W=p.dashStyle(W,Q),G.style({"stroke-dasharray":W,"stroke-width":Q+"px"})},p.dashStyle=function(G,W){W=+W||1;var Q=Math.max(W,3);return G==="solid"?G="":G==="dot"?G=Q+"px,"+Q+"px":G==="dash"?G=3*Q+"px,"+3*Q+"px":G==="longdash"?G=5*Q+"px,"+5*Q+"px":G==="dashdot"?G=3*Q+"px,"+Q+"px,"+Q+"px,"+Q+"px":G==="longdashdot"&&(G=5*Q+"px,"+2*Q+"px,"+Q+"px,"+2*Q+"px"),G},p.singleFillStyle=function(G,W){var Q=m.select(G.node());s(G,((Q.data()[0]||[])[0]||{}).trace||{},W)},p.fillGroupStyle=function(G,W){G.style("stroke-width",0).each(function(Q){var R=m.select(this);Q[0].trace&&s(R,Q[0].trace,W)})};var x=v("./symbol_defs");p.symbolNames=[],p.symbolFuncs=[],p.symbolNeedLines={},p.symbolNoDot={},p.symbolNoFill={},p.symbolList=[],Object.keys(x).forEach(function(G){var W=x[G],Q=W.n;p.symbolList.push(Q,String(Q),G,Q+100,String(Q+100),G+"-open"),p.symbolNames[Q]=G,p.symbolFuncs[Q]=W.f,W.needLine&&(p.symbolNeedLines[Q]=!0),W.noDot?p.symbolNoDot[Q]=!0:p.symbolList.push(Q+200,String(Q+200),G+"-dot",Q+300,String(Q+300),G+"-open-dot"),W.noFill&&(p.symbolNoFill[Q]=!0)});var c=p.symbolNames.length;function T(G,W){var Q=G%100;return p.symbolFuncs[Q](W)+(G>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}p.symbolNumber=function(G){if(y(G))G=+G;else if(typeof G=="string"){var W=0;G.indexOf("-open")>0&&(W=100,G=G.replace("-open","")),G.indexOf("-dot")>0&&(W+=200,G=G.replace("-dot","")),(G=p.symbolNames.indexOf(G))>=0&&(G+=W)}return G%100>=c||G>=400?0:Math.floor(Math.max(G,0))};var _={x1:1,x2:0,y1:0,y2:0},w={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:w},verticalreversed:{node:"linearGradient",attrs:w,reversed:!0}};p.gradient=function(G,W,Q,R,N,U){for(var ee=N.length,j=L[R],X=new Array(ee),J=0;J<ee;J++)j.reversed?X[ee-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+"-"+Q,se=re._defs.select(".gradients").selectAll("#"+ne).data([R+X.join(";")],g.identity);se.exit().remove(),se.enter().append(j.node).each(function(){var oe=m.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]);m.select(this).attr({offset:ce[0]+"%","stop-color":t.tinyRGB(de),"stop-opacity":de.getAlpha()})})}),G.style(U,V(ne,W)).style(U+"-opacity",null),G.classed("gradient_filled",!0)},p.pattern=function(G,W,Q,R,N,U,ee,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,_e,we,Ee,fe,ge,ke,be=Q._fullLayout,Se="p"+be._uid+"-"+R,Oe={};switch(N){case"/":oe=U*Math.sqrt(2),pe=U*Math.sqrt(2),_e="path",Oe={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=ee*U)+"px"};break;case"\\":oe=U*Math.sqrt(2),pe=U*Math.sqrt(2),_e="path",Oe={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=ee*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-ee),_e="path",Oe={d:ce,opacity:ne,stroke:re,"stroke-width":de+"px"};break;case"|":_e="path",_e="path",Oe={d:ce="M"+(oe=U)/2+",0L"+oe/2+","+(pe=U),opacity:ne,stroke:re,"stroke-width":(de=ee*U)+"px"};break;case"-":_e="path",_e="path",Oe={d:ce="M0,"+(pe=U)/2+"L"+(oe=U)+","+pe/2,opacity:ne,stroke:re,"stroke-width":(de=ee*U)+"px"};break;case"+":_e="path",ce="M"+(oe=U)/2+",0L"+oe/2+","+(pe=U)+"M0,"+pe/2+"L"+oe+","+pe/2,de=U-U*Math.sqrt(1-ee),_e="path",Oe={d:ce,opacity:ne,stroke:re,"stroke-width":de+"px"};break;case".":oe=U,pe=U,ee<Math.PI/4?xe=Math.sqrt(ee*U*U/Math.PI):(we=ee,Ee=Math.PI/4,fe=1,ge=U/2,ke=U/Math.sqrt(2),xe=ge+(ke-ge)*(we-Ee)/(fe-Ee)),_e="circle",Oe={cx:oe/2,cy:pe/2,r:xe,opacity:ne,fill:re}}var De=[N||"noSh",J||"noBg",re||"noFg",U,ee].join(";"),je=be._defs.select(".patterns").selectAll("#"+Se).data([De],g.identity);je.exit().remove(),je.enter().append("pattern").each(function(){var Je=m.select(this);if(Je.attr({id:Se,width:oe+"px",height:pe+"px",patternUnits:"userSpaceOnUse",patternTransform:se?"scale(0.8)":""}),J){var ze=Je.selectAll("rect").data([0]);ze.exit().remove(),ze.enter().append("rect").attr({width:oe+"px",height:pe+"px",fill:J})}var Ue=Je.selectAll(_e).data([0]);Ue.exit().remove(),Ue.enter().append(_e).attr(Oe)}),G.style("fill",V(Se,Q)).style("fill-opacity",null),G.classed("pattern_filled",!0)},p.initGradients=function(G){var W=G._fullLayout;g.ensureSingle(W._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),m.select(G).selectAll(".gradient_filled").classed("gradient_filled",!1)},p.initPatterns=function(G){var W=G._fullLayout;g.ensureSingle(W._defs,"g","patterns").selectAll("pattern").remove(),m.select(G).selectAll(".pattern_filled").classed("pattern_filled",!1)},p.getPatternAttr=function(G,W,Q){return G&&g.isArrayOrTypedArray(G)?W<G.length?G[W]:Q:G},p.pointStyle=function(G,W,Q){if(G.size()){var R=p.makePointStyleFns(W);G.each(function(N){p.singlePointStyle(N,m.select(this),W,R,Q)})}},p.singlePointStyle=function(G,W,Q,R,N){var U=Q.marker,ee=U.line;if(W.style("opacity",R.selectedOpacityFn?R.selectedOpacityFn(G):G.mo===void 0?U.opacity:G.mo),R.ms2mrc){var j;j=G.ms==="various"||U.size==="various"?3:R.ms2mrc(G.ms),G.mrc=j,R.selectedSizeFn&&(j=G.mrc=R.selectedSizeFn(G));var X=p.symbolNumber(G.mx||U.symbol)||0;G.om=X%200>=100,W.attr("d",T(X,j))}var J,re,ne,se=!1;if(G.so)ne=ee.outlierwidth,re=ee.outliercolor,J=U.outliercolor;else{var oe=(ee||{}).width;ne=(G.mlw+1||oe+1||(G.trace?(G.trace.marker.line||{}).width:0)+1)-1||0,re="mlc"in G?G.mlcc=R.lineScale(G.mlc):g.isArrayOrTypedArray(ee.color)?t.defaultLine:ee.color,g.isArrayOrTypedArray(U.color)&&(J=t.defaultLine,se=!0),J="mc"in G?G.mcc=R.markerScale(G.mc):U.color||"rgba(0,0,0,0)",R.selectedColorFn&&(J=R.selectedColorFn(G))}if(G.om)W.call(t.stroke,J).style({"stroke-width":(ne||1)+"px",fill:"none"});else{W.style("stroke-width",(G.isBlank?0:ne)+"px");var pe=U.gradient,ce=G.mgt;ce?se=!0:ce=pe&&pe.type,g.isArrayOrTypedArray(ce)&&(ce=ce[0],L[ce]||(ce=0));var de=U.pattern,xe=de&&p.getPatternAttr(de.shape,G.i,"");if(ce&&ce!=="none"){var _e=G.mgc;_e?se=!0:_e=pe.color;var we=Q.uid;se&&(we+="-"+G.i),p.gradient(W,N,we,ce,[[0,_e],[1,J]],"fill")}else if(xe){var Ee=p.getPatternAttr(de.bgcolor,G.i,null),fe=p.getPatternAttr(de.fgcolor,G.i,null),ge=de.fgopacity,ke=p.getPatternAttr(de.size,G.i,8),be=p.getPatternAttr(de.solidity,G.i,.3),Se=G.mcc||g.isArrayOrTypedArray(de.shape)||g.isArrayOrTypedArray(de.bgcolor)||g.isArrayOrTypedArray(de.size)||g.isArrayOrTypedArray(de.solidity),Oe=Q.uid;Se&&(Oe+="-"+G.i),p.pattern(W,"point",N,Oe,xe,ke,be,G.mcc,de.fillmode,Ee,fe,ge)}else t.fill(W,J);ne&&t.stroke(W,re)}},p.makePointStyleFns=function(G){var W={},Q=G.marker;return W.markerScale=p.tryColorscale(Q,""),W.lineScale=p.tryColorscale(Q,"line"),n.traceIs(G,"symbols")&&(W.ms2mrc=f.isBubble(G)?o(G):function(){return(Q.size||6)/2}),G.selectedpoints&&g.extendFlat(W,p.makeSelectedPointStyleFns(G)),W},p.makeSelectedPointStyleFns=function(G){var W={},Q=G.selected||{},R=G.unselected||{},N=G.marker||{},U=Q.marker||{},ee=R.marker||{},j=N.opacity,X=U.opacity,J=ee.opacity,re=X!==void 0,ne=J!==void 0;(g.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=ee.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=ee.size,_e=de!==void 0,we=xe!==void 0;return n.traceIs(G,"symbols")&&(_e||we)&&(W.selectedSizeFn=function(Ee){var fe=Ee.mrc||ce/2;return Ee.selected?_e?de/2:fe:we?xe/2:fe}),W},p.makeSelectedTextStyleFns=function(G){var W={},Q=G.selected||{},R=G.unselected||{},N=G.textfont||{},U=Q.textfont||{},ee=R.textfont||{},j=N.color,X=U.color,J=ee.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(G,W){if(G.size()&&W.selectedpoints){var Q=p.makeSelectedPointStyleFns(W),R=W.marker||{},N=[];Q.selectedOpacityFn&&N.push(function(U,ee){U.style("opacity",Q.selectedOpacityFn(ee))}),Q.selectedColorFn&&N.push(function(U,ee){t.fill(U,Q.selectedColorFn(ee))}),Q.selectedSizeFn&&N.push(function(U,ee){var j=ee.mx||R.symbol||0,X=Q.selectedSizeFn(ee);U.attr("d",T(p.symbolNumber(j),X)),ee.mrc2=X}),N.length&&G.each(function(U){for(var ee=m.select(this),j=0;j<N.length;j++)N[j](ee,U)})}},p.tryColorscale=function(G,W){var Q=W?g.nestedProperty(G,W).get():G;if(Q){var R=Q.color;if((Q.colorscale||Q._colorAx)&&g.isArrayOrTypedArray(R))return i.makeColorScaleFuncFromTrace(Q)}return g.identity};var A={start:1,end:-1,middle:0,bottom:1,top:-1};function I(G,W,Q,R,N){var U=m.select(G.node().parentNode),ee=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(G)-1)*a+1,re=A[j]*X,ne=.75*Q+A[ee]*X+(A[ee]-1)*J*Q/2;G.attr("text-anchor",j),N||U.attr("transform",r(re,ne))}function P(G,W){var Q=G.ts||W.textfont.size;return y(Q)&&Q>0?Q:0}p.textPointStyle=function(G,W,Q){if(G.size()){var R;if(W.selectedpoints){var N=p.makeSelectedTextStyleFns(W);R=N.selectedTextColorFn}var U=W.texttemplate,ee=Q._fullLayout;G.each(function(j){var X=m.select(this),J=U?g.extractOption(j,W,"txt","texttemplate"):g.extractOption(j,W,"tx","text");if(J||J===0){if(U){var re=W._module.formatLabels,ne=re?re(j,W,ee):{},se={};h(se,W,j.i);var oe=W._meta||{};J=g.texttemplateString(J,ne,ee._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,Q).call(I,pe,ce,j.mrc)}else X.remove()})}},p.selectedTextStyle=function(G,W){if(G.size()&&W.selectedpoints){var Q=p.makeSelectedTextStyleFns(W);G.each(function(R){var N=m.select(this),U=Q.selectedTextColorFn(R),ee=R.tp||W.textposition,j=P(R,W);t.fill(N,U);var X=n.traceIs(W,"bar-like");I(N,ee,j,R.mrc2||R.mrc,X)})}};function S(G,W,Q,R){var N=G[0]-W[0],U=G[1]-W[1],ee=Q[0]-W[0],j=Q[1]-W[1],X=Math.pow(N*N+U*U,.25),J=Math.pow(ee*ee+j*j,.25),re=(J*J*N-X*X*ee)*R,ne=(J*J*U-X*X*j)*R,se=3*J*(X+J),oe=3*X*(X+J);return[[m.round(W[0]+(se&&re/se),2),m.round(W[1]+(se&&ne/se),2)],[m.round(W[0]-(oe&&re/oe),2),m.round(W[1]-(oe&&ne/oe),2)]]}p.smoothopen=function(G,W){if(G.length<3)return"M"+G.join("L");var Q,R="M"+G[0],N=[];for(Q=1;Q<G.length-1;Q++)N.push(S(G[Q-1],G[Q],G[Q+1],W));for(R+="Q"+N[0][0]+" "+G[1],Q=2;Q<G.length-1;Q++)R+="C"+N[Q-2][1]+" "+N[Q-1][0]+" "+G[Q];return R+="Q"+N[G.length-3][1]+" "+G[G.length-1]},p.smoothclosed=function(G,W){if(G.length<3)return"M"+G.join("L")+"Z";var Q,R="M"+G[0],N=G.length-1,U=[S(G[N],G[0],G[1],W)];for(Q=1;Q<N;Q++)U.push(S(G[Q-1],G[Q],G[Q+1],W));for(U.push(S(G[N-1],G[N],G[0],W)),Q=1;Q<=N;Q++)R+="C"+U[Q-1][1]+" "+U[Q][0]+" "+G[Q];return R+="C"+U[N][1]+" "+U[0][0]+" "+G[0]+"Z"};var E={hv:function(G,W){return"H"+m.round(W[0],2)+"V"+m.round(W[1],2)},vh:function(G,W){return"V"+m.round(W[1],2)+"H"+m.round(W[0],2)},hvh:function(G,W){return"H"+m.round((G[0]+W[0])/2,2)+"V"+m.round(W[1],2)+"H"+m.round(W[0],2)},vhv:function(G,W){return"V"+m.round((G[1]+W[1])/2,2)+"H"+m.round(W[0],2)+"V"+m.round(W[1],2)}},D=function(G,W){return"L"+m.round(W[0],2)+","+m.round(W[1],2)};p.steps=function(G){var W=E[G]||D;return function(Q){for(var R="M"+m.round(Q[0][0],2)+","+m.round(Q[0][1],2),N=1;N<Q.length;N++)R+=W(Q[N-1],Q[N]);return R}},p.makeTester=function(){var G=g.ensureSingleById(m.select("body"),"svg","js-plotly-tester",function(Q){Q.attr(l.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),W=g.ensureSingle(G,"path","js-reference-point",function(Q){Q.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});p.tester=G,p.testref=W},p.savedBBoxes={};var F=0;function H(G){var W=G.getAttribute("data-unformatted");if(W!==null)return W+G.getAttribute("data-math")+G.getAttribute("text-anchor")+G.getAttribute("style")}function V(G,W){if(!G)return null;var Q=W._context,R=Q._exportedPlot?"":Q._baseUrl||"";return R?"url('"+R+"#"+G+"')":"url(#"+G+")"}p.bBox=function(G,W,Q){var R,N,U;if(Q||(Q=H(G)),Q){if(R=p.savedBBoxes[Q])return g.extendFlat({},R)}else if(G.childNodes.length===1){var ee=G.childNodes[0];if(Q=H(ee)){var j=+ee.getAttribute("x")||0,X=+ee.getAttribute("y")||0,J=ee.getAttribute("transform");if(!J){var re=p.bBox(ee,!1,Q);return j&&(re.left+=j,re.right+=j),X&&(re.top+=X,re.bottom+=X),re}if(Q+="~"+j+"~"+X+"~"+J,R=p.savedBBoxes[Q])return g.extendFlat({},R)}}W?N=G:(U=p.tester.node(),N=G.cloneNode(!0),U.appendChild(N)),m.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),Q&&(p.savedBBoxes[Q]=oe),F++,g.extendFlat({},oe)},p.setClipUrl=function(G,W,Q){G.attr("clip-path",V(W,Q))},p.getTranslate=function(G){var W=(G[G.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(Q,R,N){return[R,N].join(" ")}).split(" ");return{x:+W[0]||0,y:+W[1]||0}},p.setTranslate=function(G,W,Q){var R=G.attr?"attr":"getAttribute",N=G.attr?"attr":"setAttribute",U=G[R]("transform")||"";return W=W||0,Q=Q||0,U=U.replace(/(\btranslate\(.*?\);?)/,"").trim(),U=(U+=r(W,Q)).trim(),G[N]("transform",U),U},p.getScale=function(G){var W=(G[G.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(Q,R,N){return[R,N].join(" ")}).split(" ");return{x:+W[0]||1,y:+W[1]||1}},p.setScale=function(G,W,Q){var R=G.attr?"attr":"getAttribute",N=G.attr?"attr":"setAttribute",U=G[R]("transform")||"";return W=W||1,Q=Q||1,U=U.replace(/(\bscale\(.*?\);?)/,"").trim(),U=(U+="scale("+W+","+Q+")").trim(),G[N]("transform",U),U};var Z=/\s*sc.*/;p.setPointGroupScale=function(G,W,Q){if(W=W||1,Q=Q||1,G){var R=W===1&&Q===1?"":"scale("+W+","+Q+")";G.each(function(){var N=(this.getAttribute("transform")||"").replace(Z,"");N=(N+=R).trim(),this.setAttribute("transform",N)})}};var K=/translate\([^)]*\)\s*$/;p.setTextPointsScale=function(G,W,Q){G&&G.each(function(){var R,N=m.select(this),U=N.select("text");if(U.node()){var ee=parseFloat(U.attr("x")||0),j=parseFloat(U.attr("y")||0),X=(N.attr("transform")||"").match(K);R=W===1&&Q===1?[]:[r(ee,j),"scale("+W+","+Q+")",r(-ee,-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":944,"../../traces/scatter/subtypes":952,"../color":366,"../colorscale":378,"./symbol_defs":389,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],389:[function(v,$,te){var m=v("@plotly/d3");$.exports={circle:{n:0,f:function(g){var b=m.round(g,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(g){var b=m.round(g,2);return"M"+b+","+b+"H-"+b+"V-"+b+"H"+b+"Z"}},diamond:{n:2,f:function(g){var b=m.round(1.3*g,2);return"M"+b+",0L0,"+b+"L-"+b+",0L0,-"+b+"Z"}},cross:{n:3,f:function(g){var b=m.round(.4*g,2),y=m.round(1.2*g,2);return"M"+y+","+b+"H"+b+"V"+y+"H-"+b+"V"+b+"H-"+y+"V-"+b+"H-"+b+"V-"+y+"H"+b+"V-"+b+"H"+y+"Z"}},x:{n:4,f:function(g){var b=m.round(.8*g/Math.sqrt(2),2),y="l"+b+","+b,e="l"+b+",-"+b,n="l-"+b+",-"+b,t="l-"+b+","+b;return"M0,"+b+y+e+n+e+n+t+n+t+y+t+y+"Z"}},"triangle-up":{n:5,f:function(g){var b=m.round(2*g/Math.sqrt(3),2);return"M-"+b+","+m.round(g/2,2)+"H"+b+"L0,-"+m.round(g,2)+"Z"}},"triangle-down":{n:6,f:function(g){var b=m.round(2*g/Math.sqrt(3),2);return"M-"+b+",-"+m.round(g/2,2)+"H"+b+"L0,"+m.round(g,2)+"Z"}},"triangle-left":{n:7,f:function(g){var b=m.round(2*g/Math.sqrt(3),2);return"M"+m.round(g/2,2)+",-"+b+"V"+b+"L-"+m.round(g,2)+",0Z"}},"triangle-right":{n:8,f:function(g){var b=m.round(2*g/Math.sqrt(3),2);return"M-"+m.round(g/2,2)+",-"+b+"V"+b+"L"+m.round(g,2)+",0Z"}},"triangle-ne":{n:9,f:function(g){var b=m.round(.6*g,2),y=m.round(1.2*g,2);return"M-"+y+",-"+b+"H"+b+"V"+y+"Z"}},"triangle-se":{n:10,f:function(g){var b=m.round(.6*g,2),y=m.round(1.2*g,2);return"M"+b+",-"+y+"V"+b+"H-"+y+"Z"}},"triangle-sw":{n:11,f:function(g){var b=m.round(.6*g,2),y=m.round(1.2*g,2);return"M"+y+","+b+"H-"+b+"V-"+y+"Z"}},"triangle-nw":{n:12,f:function(g){var b=m.round(.6*g,2),y=m.round(1.2*g,2);return"M-"+b+","+y+"V-"+b+"H"+y+"Z"}},pentagon:{n:13,f:function(g){var b=m.round(.951*g,2),y=m.round(.588*g,2),e=m.round(-g,2),n=m.round(-.309*g,2);return"M"+b+","+n+"L"+y+","+m.round(.809*g,2)+"H-"+y+"L-"+b+","+n+"L0,"+e+"Z"}},hexagon:{n:14,f:function(g){var b=m.round(g,2),y=m.round(g/2,2),e=m.round(g*Math.sqrt(3)/2,2);return"M"+e+",-"+y+"V"+y+"L0,"+b+"L-"+e+","+y+"V-"+y+"L0,-"+b+"Z"}},hexagon2:{n:15,f:function(g){var b=m.round(g,2),y=m.round(g/2,2),e=m.round(g*Math.sqrt(3)/2,2);return"M-"+y+","+e+"H"+y+"L"+b+",0L"+y+",-"+e+"H-"+y+"L-"+b+",0Z"}},octagon:{n:16,f:function(g){var b=m.round(.924*g,2),y=m.round(.383*g,2);return"M-"+y+",-"+b+"H"+y+"L"+b+",-"+y+"V"+y+"L"+y+","+b+"H-"+y+"L-"+b+","+y+"V-"+y+"Z"}},star:{n:17,f:function(g){var b=1.4*g,y=m.round(.225*b,2),e=m.round(.951*b,2),n=m.round(.363*b,2),t=m.round(.588*b,2),i=m.round(-b,2),r=m.round(-.309*b,2),d=m.round(.118*b,2),l=m.round(.809*b,2);return"M"+y+","+r+"H"+e+"L"+n+","+d+"L"+t+","+l+"L0,"+m.round(.382*b,2)+"L-"+t+","+l+"L-"+n+","+d+"L-"+e+","+r+"H-"+y+"L0,"+i+"Z"}},hexagram:{n:18,f:function(g){var b=m.round(.66*g,2),y=m.round(.38*g,2),e=m.round(.76*g,2);return"M-"+e+",0l-"+y+",-"+b+"h"+e+"l"+y+",-"+b+"l"+y+","+b+"h"+e+"l-"+y+","+b+"l"+y+","+b+"h-"+e+"l-"+y+","+b+"l-"+y+",-"+b+"h-"+e+"Z"}},"star-triangle-up":{n:19,f:function(g){var b=m.round(g*Math.sqrt(3)*.8,2),y=m.round(.8*g,2),e=m.round(1.6*g,2),n=m.round(4*g,2),t="A "+n+","+n+" 0 0 1 ";
1213return"M-"+b+","+y+t+b+","+y+t+"0,-"+e+t+"-"+b+","+y+"Z"}},"star-triangle-down":{n:20,f:function(g){var b=m.round(g*Math.sqrt(3)*.8,2),y=m.round(.8*g,2),e=m.round(1.6*g,2),n=m.round(4*g,2),t="A "+n+","+n+" 0 0 1 ";return"M"+b+",-"+y+t+"-"+b+",-"+y+t+"0,"+e+t+b+",-"+y+"Z"}},"star-square":{n:21,f:function(g){var b=m.round(1.1*g,2),y=m.round(2*g,2),e="A "+y+","+y+" 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(g){var b=m.round(1.4*g,2),y=m.round(1.9*g,2),e="A "+y+","+y+" 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(g){var b=m.round(.7*g,2),y=m.round(1.4*g,2);return"M0,"+y+"L"+b+",0L0,-"+y+"L-"+b+",0Z"}},"diamond-wide":{n:24,f:function(g){var b=m.round(1.4*g,2),y=m.round(.7*g,2);return"M0,"+y+"L"+b+",0L0,-"+y+"L-"+b+",0Z"}},hourglass:{n:25,f:function(g){var b=m.round(g,2);return"M"+b+","+b+"H-"+b+"L"+b+",-"+b+"H-"+b+"Z"},noDot:!0},bowtie:{n:26,f:function(g){var b=m.round(g,2);return"M"+b+","+b+"V-"+b+"L-"+b+","+b+"V-"+b+"Z"},noDot:!0},"circle-cross":{n:27,f:function(g){var b=m.round(g,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(g){var b=m.round(g,2),y=m.round(g/Math.sqrt(2),2);return"M"+y+","+y+"L-"+y+",-"+y+"M"+y+",-"+y+"L-"+y+","+y+"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(g){var b=m.round(g,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(g){var b=m.round(g,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(g){var b=m.round(1.3*g,2);return"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(g){var b=m.round(1.3*g,2),y=m.round(.65*g,2);return"M"+b+",0L0,"+b+"L-"+b+",0L0,-"+b+"ZM-"+y+",-"+y+"L"+y+","+y+"M-"+y+","+y+"L"+y+",-"+y},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(g){var b=m.round(1.4*g,2);return"M0,"+b+"V-"+b+"M"+b+",0H-"+b},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(g){var b=m.round(g,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(g){var b=m.round(1.2*g,2),y=m.round(.85*g,2);return"M0,"+b+"V-"+b+"M"+b+",0H-"+b+"M"+y+","+y+"L-"+y+",-"+y+"M"+y+",-"+y+"L-"+y+","+y},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(g){var b=m.round(g/2,2),y=m.round(g,2);return"M"+b+","+y+"V-"+y+"m-"+y+",0V"+y+"M"+y+","+b+"H-"+y+"m0,-"+y+"H"+y},needLine:!0,noFill:!0},"y-up":{n:37,f:function(g){var b=m.round(1.2*g,2),y=m.round(1.6*g,2),e=m.round(.8*g,2);return"M-"+b+","+e+"L0,0M"+b+","+e+"L0,0M0,-"+y+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(g){var b=m.round(1.2*g,2),y=m.round(1.6*g,2),e=m.round(.8*g,2);return"M-"+b+",-"+e+"L0,0M"+b+",-"+e+"L0,0M0,"+y+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(g){var b=m.round(1.2*g,2),y=m.round(1.6*g,2),e=m.round(.8*g,2);return"M"+e+","+b+"L0,0M"+e+",-"+b+"L0,0M-"+y+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(g){var b=m.round(1.2*g,2),y=m.round(1.6*g,2),e=m.round(.8*g,2);return"M-"+e+","+b+"L0,0M-"+e+",-"+b+"L0,0M"+y+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(g){var b=m.round(1.4*g,2);return"M"+b+",0H-"+b},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(g){var b=m.round(1.4*g,2);return"M0,"+b+"V-"+b},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(g){var b=m.round(g,2);return"M"+b+",-"+b+"L-"+b+","+b},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(g){var b=m.round(g,2);return"M"+b+","+b+"L-"+b+",-"+b},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(g){var b=m.round(g,2);return"M0,0L-"+b+","+m.round(2*g,2)+"H"+b+"Z"},noDot:!0},"arrow-down":{n:46,f:function(g){var b=m.round(g,2);return"M0,0L-"+b+",-"+m.round(2*g,2)+"H"+b+"Z"},noDot:!0}
1213,"arrow-left":{n:47,f:function(g){var b=m.round(2*g,2),y=m.round(g,2);return"M0,0L"+b+",-"+y+"V"+y+"Z"},noDot:!0},"arrow-right":{n:48,f:function(g){var b=m.round(2*g,2),y=m.round(g,2);return"M0,0L-"+b+",-"+y+"V"+y+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(g){var b=m.round(g,2);return"M-"+b+",0H"+b+"M0,0L-"+b+","+m.round(2*g,2)+"H"+b+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(g){var b=m.round(g,2);return"M-"+b+",0H"+b+"M0,0L-"+b+",-"+m.round(2*g,2)+"H"+b+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(g){var b=m.round(2*g,2),y=m.round(g,2);return"M0,-"+y+"V"+y+"M0,0L"+b+",-"+y+"V"+y+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(g){var b=m.round(2*g,2),y=m.round(g,2);return"M0,-"+y+"V"+y+"M0,0L-"+b+",-"+y+"V"+y+"Z"},needLine:!0,noDot:!0}}},{"@plotly/d3":58}],390:[function(v,$,te){$.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(v,$,te){var m=v("fast-isnumeric"),g=v("../../registry"),b=v("../../plots/cartesian/axes"),y=v("../../lib"),e=v("./compute_error");function n(t,i,r,d){var l=i["error_"+d]||{},a=[];if(l.visible&&["linear","log"].indexOf(r.type)!==-1){for(var u=e(l),f=0;f<t.length;f++){var o=t[f],h=o.i;if(h===void 0)h=f;else if(h===null)continue;var p=o[d];if(m(r.c2l(p))){var s=u(p,h);if(m(s[0])&&m(s[1])){var x=o[d+"s"]=p-s[0],c=o[d+"h"]=p+s[1];a.push(x,c)}}}var T=r._id,_=i._extremes[T],w=b.findExtremes(r,a,y.extendFlat({tozero:_.opts.tozero},{padded:!0}));_.min=_.min.concat(w.min),_.max=_.max.concat(w.max)}}$.exports=function(t){for(var i=t.calcdata,r=0;r<i.length;r++){var d=i[r],l=d[0].trace;if(l.visible===!0&&g.traceIs(l,"errorBarsOK")){var a=b.getFromId(t,l.xaxis),u=b.getFromId(t,l.yaxis);n(d,l,a,"x"),n(d,l,u,"y")}}}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./compute_error":392,"fast-isnumeric":190}],392:[function(v,$,te){function m(g,b){return g==="percent"?function(y){return Math.abs(y*b/100)}:g==="constant"?function(){return Math.abs(b)}:g==="sqrt"?function(y){return Math.sqrt(Math.abs(y))}:void 0}$.exports=function(g){var b=g.type,y=g.symmetric;if(b==="data"){var e=g.array||[];if(y)return function(r,d){var l=+e[d];return[l,l]};var n=g.arrayminus||[];return function(r,d){var l=+e[d],a=+n[d];return isNaN(l)&&isNaN(a)?[NaN,NaN]:[a||0,l||0]}}var t=m(b,g.value),i=m(b,g.valueminus);return y||g.valueminus===void 0?function(r){var d=t(r);return[d,d]}:function(r){return[i(r),t(r)]}}},{}],393:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../registry"),b=v("../../lib"),y=v("../../plot_api/plot_template"),e=v("./attributes");$.exports=function(n,t,i,r){var d="error_"+r.axis,l=y.newContainer(t,d),a=n[d]||{};function u(p,s){return b.coerce(a,l,e,p,s)}if(u("visible",a.array!==void 0||a.value!==void 0||a.type==="sqrt")!==!1){var f=u("type","array"in a?"data":"percent"),o=!0;f!=="sqrt"&&(o=u("symmetric",!((f==="data"?"arrayminus":"valueminus")in a))),f==="data"?(u("array"),u("traceref"),o||(u("arrayminus"),u("tracerefminus"))):f!=="percent"&&f!=="constant"||(u("value"),o||u("valueminus"));var h="copy_"+r.inherit+"style";r.inherit&&(t["error_"+r.inherit]||{}).visible&&u(h,!(a.color||m(a.thickness)||m(a.width))),r.inherit&&l[h]||(u("color",i),u("thickness"),u("width",g.traceIs(t,"gl3d")?0:4))}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../registry":638,"./attributes":390,"fast-isnumeric":190}],394:[function(v,$,te){var m=v("../../lib"),g=v("../../plot_api/edit_types").overrideAll,b=v("./attributes"),y={error_x:m.extendFlat({},b),error_y:m.extendFlat({},b)};delete y.error_x.copy_zstyle,delete y.error_y.copy_zstyle,delete y.error_y.copy_ystyle;var e={error_x:m.extendFlat({},b),error_y:m.extendFlat({},b),error_z:m.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,$.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:y,bar:y,histogram:y,scatter3d:g(e,"calc","nested"),scattergl:g(y,"calc","nested")}},supplyDefaults:v("./defaults"),calc:v("./calc"),makeComputeError:v("./compute_error"),plot:v("./plot"),style:v("./style"),hoverInfo:function(n,t,i){(t.error_y||{}).visible&&(i.yerr=n.yh-n.y,t.error_y.symmetric||(i.yerrneg=n.y-n.ys)),(t.error_x||{}).visible&&(i.xerr=n.xh-n.x,t.error_x.symmetric||(i.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(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("../drawing"),y=v("../../traces/scatter/subtypes");
1213$.exports=function(e,n,t,i){var r=t.xaxis,d=t.yaxis,l=i&&i.duration>0;n.each(function(a){var u,f=a[0].trace,o=f.error_x||{},h=f.error_y||{};f.ids&&(u=function(c){return c.id});var p=y.hasMarkers(f)&&f.marker.maxdisplayed>0;h.visible||o.visible||(a=[]);var s=m.select(this).selectAll("g.errorbar").data(a,u);if(s.exit().remove(),a.length){o.visible||s.selectAll("path.xerror").remove(),h.visible||s.selectAll("path.yerror").remove(),s.style("opacity",1);var x=s.enter().append("g").classed("errorbar",!0);l&&x.style("opacity",0).transition().duration(i.duration).style("opacity",1),b.setClipUrl(s,t.layerClipId,e),s.each(function(c){var T=m.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),g(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),g(D.xs)||(D.noXS=!0,D.xs=S.c2p(P.xs,!0))),D}(c,r,d);if(!p||c.vis){var w,k=T.select("path.yerror");if(h.visible&&g(_.x)&&g(_.yh)&&g(_.ys)){var L=h.width;w="M"+(_.x-L)+","+_.yh+"h"+2*L+"m-"+L+",0V"+_.ys,_.noYS||(w+="m-"+L+",0h"+2*L),k.size()?l&&(k=k.transition().duration(i.duration).ease(i.easing)):k=T.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),k.attr("d",w)}else k.remove();var A=T.select("path.xerror");if(o.visible&&g(_.y)&&g(_.xh)&&g(_.xs)){var I=(o.copy_ystyle?h:o).width;w="M"+_.xh+","+(_.y-I)+"v"+2*I+"m0,-"+I+"H"+_.xs,_.noXS||(w+="m0,-"+I+"v"+2*I),A.size()?l&&(A=A.transition().duration(i.duration).ease(i.easing)):A=T.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),A.attr("d",w)}else A.remove()}})}})}},{"../../traces/scatter/subtypes":952,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],396:[function(v,$,te){var m=v("@plotly/d3"),g=v("../color");$.exports=function(b){b.each(function(y){var e=y[0].trace,n=e.error_y||{},t=e.error_x||{},i=m.select(this);i.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(g.stroke,n.color),t.copy_ystyle&&(t=n),i.selectAll("path.xerror").style("stroke-width",t.thickness+"px").call(g.stroke,t.color)})}},{"../color":366,"@plotly/d3":58}],397:[function(v,$,te){var m=v("../../plots/font_attributes"),g=v("./layout_attributes").hoverlabel,b=v("../../lib/extend").extendFlat;$.exports={hoverlabel:{bgcolor:b({},g.bgcolor,{arrayOk:!0}),bordercolor:b({},g.bordercolor,{arrayOk:!0}),font:m({arrayOk:!0,editType:"none"}),align:b({},g.align,{arrayOk:!0}),namelength:b({},g.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":493,"../../plots/font_attributes":585,"./layout_attributes":407}],398:[function(v,$,te){var m=v("../../lib"),g=v("../../registry");function b(y,e,n,t){t=t||m.identity,Array.isArray(y)&&(e[0][n]=t(y))}$.exports=function(y){var e=y.calcdata,n=y._fullLayout;function t(a){return function(u){return m.coerceHoverinfo({hoverinfo:u},{_module:a._module},n)}}for(var i=0;i<e.length;i++){var r=e[i],d=r[0].trace;if(!g.traceIs(d,"pie-like")){var l=g.traceIs(d,"2dMap")?b:m.fillArray;
1213l(d.hoverinfo,r,"hi",t(d)),d.hovertemplate&&l(d.hovertemplate,r,"ht"),d.hoverlabel&&(l(d.hoverlabel.bgcolor,r,"hbg"),l(d.hoverlabel.bordercolor,r,"hbc"),l(d.hoverlabel.font.size,r,"hts"),l(d.hoverlabel.font.color,r,"htc"),l(d.hoverlabel.font.family,r,"htf"),l(d.hoverlabel.namelength,r,"hnl"),l(d.hoverlabel.align,r,"hta"))}}}},{"../../lib":503,"../../registry":638}],399:[function(v,$,te){var m=v("../../registry"),g=v("./hover").hover;$.exports=function(b,y,e){var n=m.getComponentMethod("annotations","onClick")(b,b._hoverdata);function t(){b.emit("plotly_click",{points:b._hoverdata,event:y})}e!==void 0&&g(b,y,e,!0),b._hoverdata&&y&&y.target&&(n&&n.then?n.then(t):t(),y.stopImmediatePropagation&&y.stopImmediatePropagation())}},{"../../registry":638,"./hover":403}],400:[function(v,$,te){$.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},{}],401:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("./hoverlabel_defaults");$.exports=function(y,e,n,t){var i=m.extendFlat({},t.hoverlabel);e.hovertemplate&&(i.namelength=-1),b(y,e,function(r,d){return m.coerce(y,e,g,r,d)},i)}},{"../../lib":503,"./attributes":397,"./hoverlabel_defaults":404}],402:[function(v,$,te){var m=v("../../lib");te.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},te.isTraceInSubplots=function(t,i){if(t.type==="splom"){for(var r=t.xaxes||[],d=t.yaxes||[],l=0;l<r.length;l++)for(var a=0;a<d.length;a++)if(i.indexOf(r[l]+d[a])!==-1)return!0;return!1}return i.indexOf(te.getSubplot(t))!==-1},te.flat=function(t,i){for(var r=new Array(t.length),d=0;d<t.length;d++)r[d]=i;return r},te.p2c=function(t,i){for(var r=new Array(t.length),d=0;d<t.length;d++)r[d]=t[d].p2c(i);return r},te.getDistanceFunction=function(t,i,r,d){return t==="closest"?d||te.quadrature(i,r):t.charAt(0)==="x"?i:r},te.getClosest=function(t,i,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 l=i(t[d]);l<=r.distance&&(r.index=d,r.distance=l)}return r},te.inbox=function(t,i,r){return t*i<0||t===0?r:1/0},te.quadrature=function(t,i){return function(r){var d=t(r),l=i(r);return Math.sqrt(d*d+l*l)}},te.makeEventData=function(t,i,r){var d="index"in t?t.index:t.pointNumber,l={data:i._input,fullData:i,curveNumber:i.index,pointNumber:d};if(i._indexToPoints){var a=i._indexToPoints[d];a.length===1?l.pointIndex=a[0]:l.pointIndices=a}else l.pointIndex=d;return i._module.eventData?l=i._module.eventData(l,t,i,r,d):("xVal"in t?l.x=t.xVal:"x"in t&&(l.x=t.x),"yVal"in t?l.y=t.yVal:"y"in t&&(l.y=t.y),t.xa&&(l.xaxis=t.xa),t.ya&&(l.yaxis=t.ya),t.zLabelVal!==void 0&&(l.z=t.zLabelVal)),te.appendArrayPointValue(l,i,d),l},te.appendArrayPointValue=function(t,i,r){var d=i._arrayAttrs;if(d)for(var l=0;l<d.length;l++){var a=d[l],u=b(a);if(t[u]===void 0){var f=y(m.nestedProperty(i,a).get(),r);f!==void 0&&(t[u]=f)}}},te.appendArrayMultiPointValues=function(t,i,r){var d=i._arrayAttrs;if(d)for(var l=0;l<d.length;l++){var a=d[l],u=b(a);if(t[u]===void 0){for(var f=m.nestedProperty(i,a).get(),o=new Array(r.length),h=0;h<r.length;h++)o[h]=y(f,r[h]);t[u]=o}}};var g={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function b(t){return g[t]||t}function y(t,i){return Array.isArray(i)?Array.isArray(t)&&Array.isArray(t[i[0]])?t[i[0]][i[1]]:void 0:t[i]}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(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("tinycolor2"),y=v("../../lib"),e=y.strTranslate,n=y.strRotate,t=v("../../lib/events"),i=v("../../lib/svg_text_utils"),r=v("../../lib/override_cursor"),d=v("../drawing"),l=v("../color"),a=v("../dragelement"),u=v("../../plots/cartesian/axes"),f=v("../../registry"),o=v("./helpers"),h=v("./constants"),p=v("../legend/defaults"),s=v("../legend/draw"),x=h.YANGLE,c=Math.PI*x/180,T=1/Math.sin(c),_=Math.cos(c),w=Math.sin(c),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,ee,j){N=y.getGraphDiv(N);var X=U.target;y.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],_e=ce._has("cartesian");if(xe){var we=xe.overlays.map(function(Tr){return Tr.id});pe=pe.concat(we)}for(var Ee=pe.length,fe=new Array(Ee),ge=new Array(Ee),ke=!1,be=0;be<Ee;be++){var Se=pe[be];if(de[Se])ke=!0,fe[be]=de[Se].xaxis,ge[be]=de[Se].yaxis;else{if(!ce[Se]||!ce[Se]._subplot)return void y.warn("Unrecognized subplot: "+Se);var Oe=ce[Se]._subplot;fe[be]=Oe.xaxis,ge[be]=Oe.yaxis}}var De=re.hovermode||ce.hovermode;if(De&&!ke&&(De="closest"),["x","y","closest","x unified","y unified"].indexOf(De)===-1||!J.calcdata||J.querySelector(".zoombox")||J._dragging)return a.unhoverRaw(J,re);var je=ce.hoverdistance;je===-1&&(je=1/0);var Je=ce.spikedistance;Je===-1&&(Je=1/0);var ze,Ue,Ge,Ye,et,ct,mt,Ct,Tt,nt,Qe,Et,Gt,Xt=[],Fe=[],qe={hLinePoint:null,vLinePoint:null},wt=!1;if(Array.isArray(re))for(De="array",Ge=0;Ge<re.length;Ge++)(et=J.calcdata[re[Ge].curveNumber||0])&&(ct=et[0].trace,et[0].trace.hoverinfo!=="skip"&&(Fe.push(et),ct.orientation==="h"&&(wt=!0)));else{for(Ye=0;Ye<J.calcdata.length;
1213Ye++)et=J.calcdata[Ye],(ct=et[0].trace).hoverinfo!=="skip"&&o.isTraceInSubplots(ct,pe)&&(Fe.push(et),ct.orientation==="h"&&(wt=!0));var ft,Ce;if(!oe)ft="xpx"in re?re.xpx:fe[0]._length/2,Ce="ypx"in re?re.ypx:ge[0]._length/2;else{if(t.triggerHandler(J,"plotly_beforehover",re)===!1)return;var Ie=oe.getBoundingClientRect();ft=re.clientX-Ie.left,Ce=re.clientY-Ie.top,ce._calcInverseTransform(J);var Te=y.apply3DTransform(ce._invTransform)(ft,Ce);if(ft=Te[0],Ce=Te[1],ft<0||ft>fe[0]._length||Ce<0||Ce>ge[0]._length)return a.unhoverRaw(J,re)}if(re.pointerX=ft+fe[0]._offset,re.pointerY=Ce+ge[0]._offset,ze="xval"in re?o.flat(pe,re.xval):o.p2c(fe,ft),Ue="yval"in re?o.flat(pe,re.yval):o.p2c(ge,Ce),!g(ze[0])||!g(Ue[0]))return y.warn("Fx.hover failed",re,J),a.unhoverRaw(J,re)}var Pe=1/0;function Ve(Tr,en){for(Ye=0;Ye<Fe.length;Ye++)if((et=Fe[Ye])&&et[0]&&et[0].trace&&(ct=et[0].trace).visible===!0&&ct._length!==0&&["carpet","contourcarpet"].indexOf(ct._module.name)===-1){if(ct.type==="splom"?mt=pe[Ct=0]:(mt=o.getSubplot(ct),Ct=pe.indexOf(mt)),Tt=De,o.isUnifiedHover(Tt)&&(Tt=Tt.charAt(0)),Et={cd:et,trace:ct,xa:fe[Ct],ya:ge[Ct],maxHoverDistance:je,maxSpikeDistance:Je,index:!1,distance:Math.min(Pe,je),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:l.defaultLine,name:ct.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[mt]&&(Et.subplot=ce[mt]._subplot),ce._splomScenes&&ce._splomScenes[ct.uid]&&(Et.scene=ce._splomScenes[ct.uid]),Gt=Xt.length,Tt==="array"){var $r=re[Ye];"pointNumber"in $r?(Et.index=$r.pointNumber,Tt="closest"):(Tt="","xval"in $r&&(nt=$r.xval,Tt="x"),"yval"in $r&&(Qe=$r.yval,Tt=Tt?"closest":"y"))}else Tr!==void 0&&en!==void 0?(nt=Tr,Qe=en):(nt=ze[Ct],Qe=Ue[Ct]);if(je!==0)if(ct._module&&ct._module.hoverPoints){var Rr=ct._module.hoverPoints(Et,nt,Qe,Tt,{finiteRange:!0,hoverLayer:ce._hoverlayer});if(Rr)for(var Pn,Nn=0;Nn<Rr.length;Nn++)Pn=Rr[Nn],g(Pn.x0)&&g(Pn.y0)&&Xt.push(H(Pn,De))}else y.log("Unrecognized trace type in hover:",ct);if(De==="closest"&&Xt.length>Gt&&(Xt.splice(0,Gt),Pe=Xt[0].distance),_e&&Je!==0&&Xt.length===0){Et.distance=Je,Et.index=!1;var hn=ct._module.hoverPoints(Et,nt,Qe,"closest",{hoverLayer:ce._hoverlayer});if(hn&&(hn=hn.filter(function(lr){return lr.spikeDistance<=Je})),hn&&hn.length){var Fn,ca=hn.filter(function(lr){return lr.xa.showspikes&&lr.xa.spikesnap!=="hovered data"});if(ca.length){var sr=ca[0];g(sr.x0)&&g(sr.y0)&&(Fn=ot(sr),(!qe.vLinePoint||qe.vLinePoint.spikeDistance>Fn.spikeDistance)&&(qe.vLinePoint=Fn))}var Fr=hn.filter(function(lr){return lr.ya.showspikes&&lr.ya.spikesnap!=="hovered data"});if(Fr.length){var Bt=Fr[0];g(Bt.x0)&&g(Bt.y0)&&(Fn=ot(Bt),(!qe.hLinePoint||qe.hLinePoint.spikeDistance>Fn.spikeDistance)&&(qe.hLinePoint=Fn))}}}}}function tt(Tr,en,$r){for(var Rr,Pn=null,Nn=1/0,hn=0;hn<Tr.length;hn++)Rr=Tr[hn].spikeDistance,$r&&hn===0&&(Rr=-1/0),Rr<=Nn&&Rr<=en&&(Pn=Tr[hn],Nn=Rr);return Pn}function ot(Tr){return Tr?{xa:Tr.xa,ya:Tr.ya,x:Tr.xSpike!==void 0?Tr.xSpike:(Tr.x0+Tr.x1)/2,y:Tr.ySpike!==void 0?Tr.ySpike:(Tr.y0+Tr.y1)/2,distance:Tr.distance,spikeDistance:Tr.spikeDistance,curveNumber:Tr.trace.index,color:Tr.color,pointNumber:Tr.index}:null}Ve();var at={fullLayout:ce,container:ce._hoverlayer,event:re},_t=J._spikepoints,bt={vLinePoint:qe.vLinePoint,hLinePoint:qe.hLinePoint};J._spikepoints=bt;var jt=function(){Xt.sort(function(Tr,en){return Tr.distance-en.distance}),Xt=function(Tr,en){for(var $r=en.charAt(0),Rr=[],Pn=[],Nn=[],hn=0;hn<Tr.length;hn++){var Fn=Tr[hn];f.traceIs(Fn.trace,"bar-like")||f.traceIs(Fn.trace,"box-violin")?Nn.push(Fn):Fn.trace[$r+"period"]?Pn.push(Fn):Rr.push(Fn)}return Rr.concat(Pn).concat(Nn)}(Xt,De)};jt();var Nt=De.charAt(0),$e=(Nt==="x"||Nt==="y")&&Xt[0]&&I[Xt[0].trace.type];if(_e&&Je!==0&&Xt.length!==0){var yt=tt(Xt.filter(function(Tr){return Tr.ya.showspikes}),Je,$e);qe.hLinePoint=ot(yt);var Ot=tt(Xt.filter(function(Tr){return Tr.xa.showspikes}),Je,$e);qe.vLinePoint=ot(Ot)}if(Xt.length===0){var Mt=a.unhoverRaw(J,re);return!_e||qe.hLinePoint===null&&qe.vLinePoint===null||Z(_t)&&V(J,qe,at),Mt}if(_e&&Z(_t)&&V(J,qe,at),o.isXYhover(Tt)&&Xt[0].length!==0&&Xt[0].trace.type!=="splom"){var Pt=Xt[0],Le=(Xt=A[Pt.trace.type]?Xt.filter(function(Tr){return Tr.trace.index===Pt.trace.index}):[Pt]).length,Xe=G("x",Pt,ce),it=G("y",Pt,ce);Ve(Xe,it);var At,It=[],Zt={},Jt=0,Vt=function(Tr){var en=A[Tr.trace.type]?P(Tr):Tr.trace.index;if(Zt[en]){var $r=Zt[en]-1,Rr=It[$r];$r>0&&Math.abs(Tr.distance)<Math.abs(Rr.distance)&&(It[$r]=Tr)}else Jt++,Zt[en]=Jt,It.push(Tr)};for(At=0;At<Le;At++)Vt(Xt[At]);for(At=Xt.length-1;At>Le-1;At--)Vt(Xt[At]);Xt=It,jt()}var pr=J._hoverdata,Ir=[],fr=W(J),$t=Q(J);for(Ge=0;Ge<Xt.length;Ge++){var er=Xt[Ge],ar=o.makeEventData(er,er.trace,er.cd);if(er.hovertemplate!==!1){var hr=!1;er.cd[er.index]&&er.cd[er.index].ht&&(hr=er.cd[er.index].ht),er.hovertemplate=hr||er.trace.hovertemplate||!1}if(er.xa&&er.ya){var vr=er.x0+er.xa._offset,Pr=er.x1+er.xa._offset,Ur=er.y0+er.ya._offset,qr=er.y1+er.ya._offset,rn=Math.min(vr,Pr),An=Math.max(vr,Pr),mn=Math.min(Ur,qr),Mn=Math.max(Ur,qr);ar.bbox={x0:rn+$t,x1:An+$t,y0:mn+fr,y1:Mn+fr}}er.eventData=[ar],Ir.push(ar)}J._hoverdata=Ir;var Xr=De==="y"&&(Fe.length>1||Xt.length>1)||De==="closest"&&wt&&Xt.length>1,Er=l.combine(ce.plot_bgcolor||l.background,ce.paper_bgcolor),on=E(Xt,{gd:J,hovermode:De,rotateLabels:Xr,bgColor:Er,container:ce._hoverlayer,outerContainer:ce._paper.node(),commonLabelOpts:ce.hoverlabel,hoverdistance:ce.hoverdistance});if(o.isUnifiedHover(De)||(function(Tr,en,$r){var Rr,Pn,Nn,hn,Fn,ca,sr,Fr=0,Bt=1,lr=Tr.size(),mr=new Array(lr),Vr=0;function Br(Gr){var tn=Gr[0],nn=Gr[Gr.length-1];if(Pn=tn.pmin-tn.pos-tn.dp+tn.size,Nn=nn.pos+nn.dp+nn.size-tn.pmax,Pn>.01){for(Fn=Gr.length-1;Fn>=0;Fn--)Gr[Fn].dp+=Pn;Rr=!1}if(!(Nn<.01)){if(Pn<-.01){for(Fn=Gr.length-1;Fn>=0;Fn--)Gr[Fn].dp-=Nn;Rr=!1}if(Rr){var vn=0;for(hn=0;hn<Gr.length;hn++)(ca=Gr[hn]).pos+ca.dp+ca.size>tn.pmax&&vn++;for(hn=Gr.length-1;hn>=0&&!(vn<=0);hn--)(ca=Gr[hn]).pos>tn.pmax-1&&(ca.del=!0,vn--);for(hn=0;hn<Gr.length&&!(vn<=0);hn++)if((ca=Gr[hn]).pos<tn.pmin+1)for(ca.del=!0,vn--,Nn=2*ca.size,Fn=Gr.length-1;Fn>=0;Fn--)Gr[Fn].dp-=Nn;for(hn=Gr.length-1;hn>=0&&!(vn<=0);hn--)(ca=Gr[hn]).pos+ca.dp+ca.size>tn.pmax&&(ca.del=!0,vn--)}}}for(Tr.each(function(Gr){var tn=Gr[en],nn=tn._id.charAt(0)==="x",vn=tn.range;Vr===0&&vn&&vn[0]>vn[1]!==nn&&(Bt=-1),mr[Vr++]=[{datum:Gr,traceIndex:Gr.trace.index,dp:0,pos:Gr.pos,posref:Gr.posref,size:Gr.by*(nn?T:1)/2,pmin:0,pmax:nn?$r.width:$r.height}]}
1213),mr.sort(function(Gr,tn){return Gr[0].posref-tn[0].posref||Bt*(tn[0].traceIndex-Gr[0].traceIndex)});!Rr&&Fr<=lr;){for(Fr++,Rr=!0,hn=0;hn<mr.length-1;){var Dr=mr[hn],Or=mr[hn+1],xr=Dr[Dr.length-1],br=Or[0];if((Pn=xr.pos+xr.dp+xr.size-br.pos-br.dp+br.size)>.01&&xr.pmin===br.pmin&&xr.pmax===br.pmax){for(Fn=Or.length-1;Fn>=0;Fn--)Or[Fn].dp+=Pn;for(Dr.push.apply(Dr,Or),mr.splice(hn+1,1),sr=0,Fn=Dr.length-1;Fn>=0;Fn--)sr+=Dr[Fn].dp;for(Nn=sr/Dr.length,Fn=Dr.length-1;Fn>=0;Fn--)Dr[Fn].dp-=Nn;Rr=!1}else hn++}mr.forEach(Br)}for(hn=mr.length-1;hn>=0;hn--){var _r=mr[hn];for(Fn=_r.length-1;Fn>=0;Fn--){var Cr=_r[Fn],Wr=Cr.datum;Wr.offset=Cr.dp,Wr.del=Cr.del}}}(on,Xr?"xa":"ya",ce),F(on,Xr,ce._invScaleX,ce._invScaleY)),oe&&oe.tagName){var Un=f.getComponentMethod("annotations","hasClickToShow")(J,Ir);r(m.select(oe),Un?"pointer":"")}!oe||se||!function(Tr,en,$r){if(!$r||$r.length!==Tr._hoverdata.length)return!0;for(var Rr=$r.length-1;Rr>=0;Rr--){var Pn=$r[Rr],Nn=Tr._hoverdata[Rr];if(Pn.curveNumber!==Nn.curveNumber||String(Pn.pointNumber)!==String(Nn.pointNumber)||String(Pn.pointNumbers)!==String(Nn.pointNumbers))return!0}return!1}(J,0,pr)||(pr&&J.emit("plotly_unhover",{event:re,points:pr}),J.emit("plotly_hover",{event:re,points:J._hoverdata,xaxes:fe,yaxes:ge,xvals:ze,yvals:Ue}))})(N,U,ee,j,X)})},te.loneHover=function(N,U){var ee=!0;Array.isArray(N)||(ee=!1,N=[N]);var j=U.gd,X=W(j),J=Q(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,_e=oe.eventData;if(_e){var we=Math.min(pe,ce),Ee=Math.max(pe,ce),fe=Math.min(de,xe),ge=Math.max(de,xe),ke=oe.trace;if(f.traceIs(ke,"gl3d")){var be=j._fullLayout[ke.scene]._scene.container,Se=be.offsetLeft,Oe=be.offsetTop;we+=Se,Ee+=Se,fe+=Oe,ge+=Oe}_e.bbox={x0:we+J,x1:Ee+J,y0:fe+X,y1:ge+X},U.inOut_bbox&&U.inOut_bbox.push(_e.bbox)}else _e=!1;return{color:oe.color||l.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:_e}}),{gd:j,hovermode:"closest",rotateLabels:!1,bgColor:U.bgColor||l.background,container:m.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),ee?re:re.node()};var S=/<extra>([\s\S]*)<\/extra>/;function E(N,U){var ee=U.gd,j=ee._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,_e=de.ya,we=X.charAt(0),Ee=de[we+"Label"],fe=R(ee,se),ge=fe.top,ke=fe.width,be=fe.height,Se=Ee!==void 0&&de.distance<=U.hoverdistance&&(X==="x"||X==="y");if(Se){var Oe,De,je=!0;for(Oe=0;Oe<N.length;Oe++)if(je&&N[Oe].zLabel===void 0&&(je=!1),De=N[Oe].hoverinfo||N[Oe].trace.hoverinfo){var Je=Array.isArray(De)?De:De.split("+");if(Je.indexOf("all")===-1&&Je.indexOf(X)===-1){Se=!1;break}}je&&(Se=!1)}var ze=ne.selectAll("g.axistext").data(Se?[0]:[]);if(ze.enter().append("g").classed("axistext",!0),ze.exit().remove(),ze.each(function(){var $e=m.select(this),yt=y.ensureSingle($e,"path","",function(Pr){Pr.style({"stroke-width":"1px"})}),Ot=y.ensureSingle($e,"text","",function(Pr){Pr.attr("data-notex",1)}),Mt=oe.bgcolor||l.defaultLine,Pt=oe.bordercolor||l.contrast(Mt),Le=l.contrast(Mt),Xe={family:oe.font.family||pe,size:oe.font.size||ce,color:oe.font.color||Le};yt.style({fill:Mt,stroke:Pt}),Ot.text(Ee).call(d.font,Xe).call(i.positionText,0,0).call(i.convertToTspans,ee),$e.attr("transform","");
1213var it,At,It=R(ee,Ot.node());if(X==="x"){var Zt=xe.side==="top"?"-":"";Ot.attr("text-anchor","middle").call(i.positionText,0,xe.side==="top"?ge-It.bottom-k-L:ge-It.top+k+L),it=xe._offset+(de.x0+de.x1)/2,At=_e._offset+(xe.side==="top"?0:_e._length);var Jt=It.width/2+L;it<Jt?(it=Jt,yt.attr("d","M-"+(Jt-k)+",0L-"+(Jt-2*k)+","+Zt+k+"H"+(L+It.width/2)+"v"+Zt+(2*L+It.height)+"H-"+Jt+"V"+Zt+k+"Z")):it>j.width-Jt?(it=j.width-Jt,yt.attr("d","M"+(Jt-k)+",0L"+Jt+","+Zt+k+"v"+Zt+(2*L+It.height)+"H-"+Jt+"V"+Zt+k+"H"+(Jt-2*k)+"Z")):yt.attr("d","M0,0L"+k+","+Zt+k+"H"+(L+It.width/2)+"v"+Zt+(2*L+It.height)+"H-"+(L+It.width/2)+"V"+Zt+k+"H-"+k+"Z")}else{var Vt,pr,Ir;_e.side==="right"?(Vt="start",pr=1,Ir="",it=xe._offset+xe._length):(Vt="end",pr=-1,Ir="-",it=xe._offset),At=_e._offset+(de.y0+de.y1)/2,Ot.attr("text-anchor",Vt),yt.attr("d","M0,0L"+Ir+k+","+k+"V"+(L+It.height/2)+"h"+Ir+(2*L+It.width)+"V-"+(L+It.height/2)+"H"+Ir+k+"V-"+k+"Z");var fr,$t=It.height/2,er=ge-It.top-$t,ar="clip"+j._uid+"commonlabel"+_e._id;if(it<It.width+2*L+k){fr="M-"+(k+L)+"-"+$t+"h-"+(It.width-L)+"V"+$t+"h"+(It.width-L)+"Z";var hr=It.width-it+L;i.positionText(Ot,hr,er),Vt==="end"&&Ot.selectAll("tspan").each(function(){var Pr=m.select(this),Ur=d.tester.append("text").text(Pr.text()).call(d.font,Xe),qr=R(ee,Ur.node());Math.round(qr.width)<Math.round(It.width)&&Pr.attr("x",hr-qr.width),Ur.remove()})}else i.positionText(Ot,pr*(L+k),er),fr=null;var vr=j._topclips.selectAll("#"+ar).data(fr?[0]:[]);vr.enter().append("clipPath").attr("id",ar).append("path"),vr.exit().remove(),vr.select("path").attr("d",fr),d.setClipUrl(Ot,fr?ar:null,ee)}$e.attr("transform",e(it,At))}),o.isUnifiedHover(X)){ne.selectAll("g.hovertext").remove();var Ue=N.filter(function($e){return $e.hoverinfo!=="none"});if(Ue.length===0)return;var Ge=j.hoverlabel,Ye=Ge.font,et={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"}},ct={font:Ye};p(et,ct,ee._fullData);var mt=ct.legend;mt.entries=[];for(var Ct=0;Ct<Ue.length;Ct++){var Tt=Ue[Ct];if(Tt.hoverinfo!=="none"){var nt=D(Tt,!0,X,j,Ee),Qe=nt[0],Et=nt[1];Tt.name=Et,Tt.text=Et!==""?Et+" : "+Qe:Qe;var Gt=Tt.cd[Tt.index];Gt&&(Gt.mc&&(Tt.mc=Gt.mc),Gt.mcc&&(Tt.mc=Gt.mcc),Gt.mlc&&(Tt.mlc=Gt.mlc),Gt.mlcc&&(Tt.mlc=Gt.mlcc),Gt.mlw&&(Tt.mlw=Gt.mlw),Gt.mrc&&(Tt.mrc=Gt.mrc),Gt.dir&&(Tt.dir=Gt.dir)),Tt._distinct=!0,mt.entries.push([Tt])}}mt.entries.sort(function($e,yt){return $e[0].trace.index-yt[0].trace.index}),mt.layer=ne,mt._inHover=!0,mt._groupTitleFont=Ge.grouptitlefont,s(ee,mt);var Xt,Fe,qe,wt,ft=ne.select("g.legend"),Ce=R(ee,ft.node()),Ie=Ce.width+2*L,Te=Ce.height+2*L,Pe=Ue[0],Ve=(Pe.x0+Pe.x1)/2,tt=(Pe.y0+Pe.y1)/2,ot=!(f.traceIs(Pe.trace,"bar-like")||f.traceIs(Pe.trace,"box-violin"));we==="y"?ot?(Fe=tt-L,Xt=tt+L):(Fe=Math.min.apply(null,Ue.map(function($e){return Math.min($e.y0,$e.y1)})),Xt=Math.max.apply(null,Ue.map(function($e){return Math.max($e.y0,$e.y1)}))):Fe=Xt=y.mean(Ue.map(function($e){return($e.y0+$e.y1)/2}))-Te/2,we==="x"?ot?(qe=Ve+L,wt=Ve-L):(qe=Math.max.apply(null,Ue.map(function($e){return Math.max($e.x0,$e.x1)})),wt=Math.min.apply(null,Ue.map(function($e){return Math.min($e.x0,$e.x1)}))):qe=wt=y.mean(Ue.map(function($e){return($e.x0+$e.x1)/2}))-Ie/2;var at,_t,bt=xe._offset,jt=_e._offset;return wt+=bt-Ie,Fe+=jt-Te,at=(qe+=bt)+Ie<ke&&qe>=0?qe:wt+Ie<ke&&wt>=0?wt:bt+Ie<ke?bt:qe-Ve<Ve-wt+Ie?ke-Ie:0,at+=L,_t=(Xt+=jt)+Te<be&&Xt>=0?Xt:Fe+Te<be&&Fe>=0?Fe:jt+Te<be?jt:Xt-tt<tt-Fe+Te?be-Te:0,_t+=L,ft.attr("transform",e(at-1,_t-1)),ft}var Nt=ne.selectAll("g.hovertext").data(N,function($e){return P($e)});return Nt.enter().append("g").classed("hovertext",!0).each(function(){var $e=m.select(this);$e.append("rect").call(l.fill,l.addOpacity(re,.8)),$e.append("text").classed("name",!0),$e.append("path").style("stroke-width","1px"),$e.append("text").classed("nums",!0).call(d.font,pe,ce)}),Nt.exit().remove(),Nt.each(function($e){var yt=m.select(this).attr("transform",""),Ot=$e.color;Array.isArray(Ot)&&(Ot=Ot[$e.eventData[0].pointNumber]);var Mt=$e.bgcolor||Ot,Pt=l.combine(l.opacity(Mt)?Mt:l.defaultLine,re),Le=l.combine(l.opacity(Ot)?Ot:l.defaultLine,re),Xe=$e.borderColor||l.contrast(Pt),it=D($e,Se,X,j,Ee,yt),At=it[0],It=it[1],Zt=yt.select("text.nums").call(
1213d.font,$e.fontFamily||pe,$e.fontSize||ce,$e.fontColor||Xe).text(At).attr("data-notex",1).call(i.positionText,0,0).call(i.convertToTspans,ee),Jt=yt.select("text.name"),Vt=0,pr=0;if(It&&It!==At){Jt.call(d.font,$e.fontFamily||pe,$e.fontSize||ce,Le).text(It).attr("data-notex",1).call(i.positionText,0,0).call(i.convertToTspans,ee);var Ir=R(ee,Jt.node());Vt=Ir.width+2*L,pr=Ir.height+2*L}else Jt.remove(),yt.select("rect").remove();yt.select("path").style({fill:Pt,stroke:Xe});var fr=$e.xa._offset+($e.x0+$e.x1)/2,$t=$e.ya._offset+($e.y0+$e.y1)/2,er=Math.abs($e.x1-$e.x0),ar=Math.abs($e.y1-$e.y0),hr=R(ee,Zt.node()),vr=hr.width/j._invScaleX,Pr=hr.height/j._invScaleY;$e.ty0=(ge-hr.top)/j._invScaleY,$e.bx=vr+2*L,$e.by=Math.max(Pr+2*L,pr),$e.anchor="start",$e.txwidth=vr,$e.tx2width=Vt,$e.offset=0;var Ur,qr,rn=(vr+k+L+Vt)*j._invScaleX;if(J)$e.pos=fr,Ur=$t+ar/2+rn<=be,qr=$t-ar/2-rn>=0,$e.idealAlign!=="top"&&Ur||!qr?Ur?($t+=ar/2,$e.anchor="start"):$e.anchor="middle":($t-=ar/2,$e.anchor="end");else if($e.pos=$t,Ur=fr+er/2+rn<=ke,qr=fr-er/2-rn>=0,$e.idealAlign!=="left"&&Ur||!qr)if(Ur)fr+=er/2,$e.anchor="start";else{$e.anchor="middle";var An=rn/2,mn=fr+An-ke,Mn=fr-An;mn>0&&(fr-=mn),Mn<0&&(fr+=-Mn)}else fr-=er/2,$e.anchor="end";Zt.attr("text-anchor",$e.anchor),Vt&&Jt.attr("text-anchor",$e.anchor),yt.attr("transform",e(fr,$t)+(J?n(x):""))}),Nt}function D(N,U,ee,j,X,J){var re="",ne="";N.nameOverride!==void 0&&(N.name=N.nameOverride),N.name&&(N.trace._meta&&(N.name=y.templateString(N.name,N.trace._meta)),re=K(N.name,N.nameLength));var se=ee.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=y.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,ee,j){var X=function(re){return re*ee},J=function(re){return re*j};N.each(function(re){var ne=m.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),_e=0,we=re.offset,Ee=oe==="middle";Ee&&(de-=re.tx2width/2,xe+=re.txwidth/2+L),U&&(we*=-w,_e=re.offset*_),ne.select("path").attr("d",Ee?"M-"+X(re.bx/2+re.tx2width/2)+","+J(we-re.by/2)+"h"+X(re.bx)+"v"+J(re.by)+"h-"+X(re.bx)+"Z":"M0,0L"+X(pe*k+_e)+","+J(k+we)+"v"+J(re.by/2-k)+"h"+X(pe*re.bx)+"v-"+J(re.by)+"H"+X(pe*k+_e)+"V"+J(we-k)+"Z");var fe=_e+de,ge=we+re.ty0-re.by/2+L,ke=re.textAlign||"auto";ke!=="auto"&&(ke==="left"&&oe!=="start"?(se.attr("text-anchor","start"),fe=Ee?-re.bx/2-re.tx2width/2+L:-re.bx-L):ke==="right"&&oe!=="end"&&(se.attr("text-anchor","end"),fe=Ee?re.bx/2-re.tx2width/2-L:re.bx+L)),se.call(i.positionText,X(fe),J(ge)),re.tx2width&&(ne.select("text.name").call(i.positionText,X(xe+ce*L+_e),J(we+re.ty0-re.by/2+L)),ne.select("rect").call(d.setRect,X(xe+(ce-1)*re.tx2width/2+_e),J(we-re.by/2-1),X(re.tx2width),J(re.by+2)))})}function H(N,U){var ee=N.index,j=N.trace||{},X=N.cd[0],J=N.cd[ee]||{};function re(de){return de||g(de)&&de===0}var ne=Array.isArray(ee)?function(de,xe){var _e=y.castOption(X,ee,de);return re(_e)?_e:y.extractOption({},j,"",xe)}:function(de,xe){return y.extractOption(J,j,de,xe)};function se(de,xe,_e){var we=ne(xe,_e);re(we)&&(N[de]=we)}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=y.constrain(N.x0,0,N.xa._length),N.x1=y.constrain(N.x1,0,N.xa._length),N.y0=y.constrain(N.y0,0,N.ya._length),N.y1=y.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+=" \xB1 "+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+=" \xB1 "+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,ee){var j,X,J=ee.container,re=ee.fullLayout,ne=re._size,se=ee.event,oe
1213=!!U.hLinePoint,pe=!!U.vLinePoint;if(J.selectAll(".spikeline").remove(),pe||oe){var ce=l.combine(re.plot_bgcolor,re.paper_bgcolor);if(oe){var de,xe,_e=U.hLinePoint;j=_e&&_e.xa,(X=_e&&_e.ya).spikesnap==="cursor"?(de=se.pointerX,xe=se.pointerY):(de=j._offset+_e.x,xe=X._offset+_e.y);var we,Ee,fe=b.readability(_e.color,ce)<1.5?l.contrast(ce):_e.color,ge=X.spikemode,ke=X.spikethickness,be=X.spikecolor||fe,Se=u.getPxPosition(N,X);if(ge.indexOf("toaxis")!==-1||ge.indexOf("across")!==-1){if(ge.indexOf("toaxis")!==-1&&(we=Se,Ee=de),ge.indexOf("across")!==-1){var Oe=X._counterDomainMin,De=X._counterDomainMax;X.anchor==="free"&&(Oe=Math.min(Oe,X.position),De=Math.max(De,X.position)),we=ne.l+Oe*ne.w,Ee=ne.l+De*ne.w}J.insert("line",":first-child").attr({x1:we,x2:Ee,y1:xe,y2:xe,"stroke-width":ke,stroke:be,"stroke-dasharray":d.dashStyle(X.spikedash,ke)}).classed("spikeline",!0).classed("crisp",!0),J.insert("line",":first-child").attr({x1:we,x2:Ee,y1:xe,y2:xe,"stroke-width":ke+2,stroke:ce}).classed("spikeline",!0).classed("crisp",!0)}ge.indexOf("marker")!==-1&&J.insert("circle",":first-child").attr({cx:Se+(X.side!=="right"?ke:-ke),cy:xe,r:ke,fill:be}).classed("spikeline",!0)}if(pe){var je,Je,ze=U.vLinePoint;j=ze&&ze.xa,X=ze&&ze.ya,j.spikesnap==="cursor"?(je=se.pointerX,Je=se.pointerY):(je=j._offset+ze.x,Je=X._offset+ze.y);var Ue,Ge,Ye=b.readability(ze.color,ce)<1.5?l.contrast(ce):ze.color,et=j.spikemode,ct=j.spikethickness,mt=j.spikecolor||Ye,Ct=u.getPxPosition(N,j);if(et.indexOf("toaxis")!==-1||et.indexOf("across")!==-1){if(et.indexOf("toaxis")!==-1&&(Ue=Ct,Ge=Je),et.indexOf("across")!==-1){var Tt=j._counterDomainMin,nt=j._counterDomainMax;j.anchor==="free"&&(Tt=Math.min(Tt,j.position),nt=Math.max(nt,j.position)),Ue=ne.t+(1-nt)*ne.h,Ge=ne.t+(1-Tt)*ne.h}J.insert("line",":first-child").attr({x1:je,x2:je,y1:Ue,y2:Ge,"stroke-width":ct,stroke:mt,"stroke-dasharray":d.dashStyle(j.spikedash,ct)}).classed("spikeline",!0).classed("crisp",!0),J.insert("line",":first-child").attr({x1:je,x2:je,y1:Ue,y2:Ge,"stroke-width":ct+2,stroke:ce}).classed("spikeline",!0).classed("crisp",!0)}et.indexOf("marker")!==-1&&J.insert("circle",":first-child").attr({cx:je,cy:Ct-(j.side!=="top"?ct:-ct),r:ct,fill:mt}).classed("spikeline",!0)}}}function Z(N,U){return!U||U.vLinePoint!==N._spikepoints.vLinePoint||U.hLinePoint!==N._spikepoints.hLinePoint}function K(N,U){return i.plainText(N||"",{len:U,allowedTags:["br","sub","sup","b","i","em"]})}function G(N,U,ee){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&&(ee.boxmode!=="group"&&ee.violinmode!=="group"||(X+=J.t.dPos)),X}function W(N){return N.offsetTop+N.clientTop}function Q(N){return N.offsetLeft+N.clientLeft}function R(N,U){var ee=N._fullLayout,j=U.getBoundingClientRect(),X=j.x,J=j.y,re=X+j.width,ne=J+j.height,se=y.apply3DTransform(ee._invTransform)(X,J),oe=y.apply3DTransform(ee._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(v,$,te){var m=v("../../lib"),g=v("../color"),b=v("./helpers").isUnifiedHover;$.exports=function(y,e,n,t){t=t||{};var i=e.legend;function r(d){t.font[d]||(t.font[d]=i?e.legend.font[d]:e.font[d])}e&&b(e.hovermode)&&(t.font||(t.font={}),r("size"),r("family"),r("color"),i?(t.bgcolor||(t.bgcolor=g.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),m.coerceFont(n,"hoverlabel.font",t.font),n("hoverlabel.align",t.align)}},{"../../lib":503,"../color":366,"./helpers":402}],405:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y){function e(n,t){return y[n]!==void 0?y[n]:m.coerce(b,y,g,n,t)}return e("clickmode"),e("hovermode")}},{"../../lib":503,"./layout_attributes":407}],406:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../dragelement"),y=v("./helpers"),e=v("./layout_attributes"),n=v("./hover");$.exports={moduleType:"component",name:"fx",constants:v("./constants"),schema:{layout:e},attributes:v("./attributes"),layoutAttributes:e,supplyLayoutGlobalDefaults:v("./layout_global_defaults"),supplyDefaults:v("./defaults"),supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc"),getDistanceFunction:y.getDistanceFunction,getClosest:y.getClosest,inbox:y.inbox,quadrature:y.quadrature,appendArrayPointValue:y.appendArrayPointValue,castHoverOption:function(t,i,r){return g.castOption(t,i,"hoverlabel."+r)},castHoverinfo:function(t,i,r){return g.castOption(t,r,"hoverinfo",function(d){return g.coerceHoverinfo({hoverinfo:d},{_module:t._module},i)})},hover:n.hover,unhover:b.unhover,loneHover:n.loneHover,loneUnhover:function(t){var i=g.isD3Selection(t)?t:m.select(t);i.selectAll("g.hovertext").remove(),i.selectAll(".spikeline").remove()},click:v("./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(v,$,te){var m=v("./constants"),g=v("../../plots/font_attributes"),b=g({editType:"none"});
1213b.family.dflt=m.HOVERFONT,b.size.dflt=m.HOVERFONTSIZE,$.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:g({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(v,$,te){var m=v("../../lib"),g=v("./layout_attributes"),b=v("./hovermode_defaults"),y=v("./hoverlabel_defaults");$.exports=function(e,n){function t(l,a){return m.coerce(e,n,g,l,a)}b(e,n)&&(t("hoverdistance"),t("spikedistance")),t("dragmode")==="select"&&t("selectdirection");var i=n._has("mapbox"),r=n._has("geo"),d=n._basePlotModules.length;n.dragmode==="zoom"&&((i||r)&&d===1||i&&r&&d===2)&&(n.dragmode="pan"),y(e,n,t),m.coerceFont(t,"hoverlabel.grouptitlefont",n.hoverlabel.font)}},{"../../lib":503,"./hoverlabel_defaults":404,"./hovermode_defaults":405,"./layout_attributes":407}],409:[function(v,$,te){var m=v("../../lib"),g=v("./hoverlabel_defaults"),b=v("./layout_attributes");$.exports=function(y,e){g(y,e,function(n,t){return m.coerce(y,e,b,n,t)})}},{"../../lib":503,"./hoverlabel_defaults":404,"./layout_attributes":407}],410:[function(v,$,te){var m=v("../../lib"),g=v("../../lib/regex").counter,b=v("../../plots/domain").attributes,y=v("../../plots/cartesian/constants").idRegex,e=v("../../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:[g("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[y.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[y.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,l,a){var u=l[a+"axes"],f=Object.keys((d._splomAxes||{})[a]||{});return Array.isArray(u)?u:f.length?f:void 0}function i(d,l,a,u,f,o){var h=l(d+"gap",a),p=l("domain."+d);l(d+"side",u);for(var s=new Array(f),x=p[0],c=(p[1]-x)/(f-h),T=c*(1-h),_=0;_<f;_++){var w=x+c*_;s[o?f-1-_:_]=[w,w+T]}return s}function r(d,l,a,u,f){var o,h=new Array(a);function p(s,x){l.indexOf(x)!==-1&&u[x]===void 0?(h[s]=x,u[x]=s):h[s]=""}if(Array.isArray(d))for(o=0;o<a;o++)p(o,d[o]);else for(p(0,f),o=1;o<a;o++)p(o,f+(o+1));return h}$.exports={moduleType:"component",name:"grid",schema:{layout:{grid:n}},layoutAttributes:n,sizeDefaults:function(d,l){var a=d.grid||{},u=t(l,a,"x"),f=t(l,a,"y");if(d.grid||u||f){var o,h,p=Array.isArray(a.subplots)&&Array.isArray(a.subplots[0]),s=Array.isArray(u),x=Array.isArray(f),c=s&&u!==a.xaxes&&x&&f!==a.yaxes;p?(o=a.subplots.length,h=a.subplots[0].length):(x&&(o=f.length),s&&(h=u.length));var T=e.newContainer(l,"grid"),_=S("rows",o),w=S("columns",h);if(_*w>1){!p&&!s&&!x&&S("pattern")==="independent"&&(p=!0),T._hasSubplotGrid=p;var k,L,A=S("roworder")==="top to bottom",I=p?.2:.1,P=p?.3:.1;c&&l._splomGridDflt&&(k=l._splomGridDflt.xside,L=l._splomGridDflt.yside),T._domains={x:i("x",S,I,k,w),y:i("y",S,P,L,_,A)}}else delete l.grid}function S(E,D){return m.coerce(a,T,n,E,D)}},contentDefaults:function(d,l){var a=l.grid;if(a&&a._domains){var u,f,o,h,p,s,x,c=d.grid||{}
1213,T=l._subplots,_=a._hasSubplotGrid,w=a.rows,k=a.columns,L=a.pattern==="independent",A=a._axisMap={};if(_){var I=c.subplots||[];s=a.subplots=new Array(w);var P=1;for(u=0;u<w;u++){var S=s[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]="",T.cartesian.indexOf(p)!==-1){if(x=p.indexOf("y"),o=p.slice(0,x),h=p.slice(x),A[o]!==void 0&&A[o]!==f||A[h]!==void 0&&A[h]!==u)continue;S[f]=p,A[o]=f,A[h]=u}}}else{var D=t(l,c,"x"),F=t(l,c,"y");a.xaxes=r(D,T.xaxis,k,A,"x"),a.yaxes=r(F,T.yaxis,w,A,"y")}var H=a._anchors={},V=a.roworder==="top to bottom";for(var Z in A){var K,G,W,Q=Z.charAt(0),R=a[Q+"side"];if(R.length<8)H[Z]="free";else if(Q==="x"){if(R.charAt(0)==="t"===V?(K=0,G=1,W=w):(K=w-1,G=-1,W=-1),_){var N=A[Z];for(u=K;u!==W;u+=G)if((p=s[u][N])&&(x=p.indexOf("y"),p.slice(0,x)===Z)){H[Z]=p.slice(x);break}}else for(u=K;u!==W;u+=G)if(h=a.yaxes[u],T.cartesian.indexOf(Z+h)!==-1){H[Z]=h;break}}else if(R.charAt(0)==="l"?(K=0,G=1,W=k):(K=k-1,G=-1,W=-1),_){var U=A[Z];for(u=K;u!==W;u+=G)if((p=s[U][u])&&(x=p.indexOf("y"),p.slice(x)===Z)){H[Z]=p.slice(0,x);break}}else for(u=K;u!==W;u+=G)if(o=a.xaxes[u],T.cartesian.indexOf(o+Z)!==-1){H[Z]=o;break}}}}}},{"../../lib":503,"../../lib/regex":520,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561,"../../plots/domain":584}],411:[function(v,$,te){var m=v("../../plots/cartesian/constants"),g=v("../../plot_api/plot_template").templatedArray;v("../../constants/axis_placeable_objects"),$.exports=g("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",m.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",m.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(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib/to_log_range");$.exports=function(b,y,e,n){y=y||{};var t=e==="log"&&y.type==="linear",i=e==="linear"&&y.type==="log";if(t||i){for(var r,d,l=b._fullLayout.images,a=y._id.charAt(0),u=0;u<l.length;u++)if(d="images["+u+"].",(r=l[u])[a+"ref"]===y._id){var f=r[a],o=r["size"+a],h=null,p=null;if(t){h=g(f,y.range);var s=o/Math.pow(10,h)/2;p=2*Math.log(s+Math.sqrt(1+s*s))/Math.LN10}else p=(h=Math.pow(10,f))*(Math.pow(10,o/2)-Math.pow(10,-o/2));m(h)?m(p)||(p=null):(h=null,p=null),n(d+a,h),n(d+"size"+a,p)}}}},{"../../lib/to_log_range":531,"fast-isnumeric":190}],413:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("../../plots/array_container_defaults"),y=v("./attributes");function e(n,t,i){function r(h,p){return m.coerce(n,t,y,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 l={_fullLayout:i},a=["x","y"],u=0;u<2;u++){var f=a[u],o=g.coerceRef(n,t,l,f,"paper",void 0);o!=="paper"&&g.getFromId(l,o)._imgIndices.push(t._index),g.coercePosition(t,l,r,o,f,0)}return t}$.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(v,$,te){var m=v("@plotly/d3"),g=v("../drawing"),b=v("../../plots/cartesian/axes"),y=v("../../plots/cartesian/axis_ids"),e=v("../../constants/xmlns_namespaces");$.exports=function(n){var t,i,r=n._fullLayout,d=[],l={},a=[];for(i=0;i<r.images.length;i++){var u=r.images[i];if(u.visible)if(u.layer==="below"&&u.xref!=="paper"&&u.yref!=="paper"){t=y.ref2id(u.xref)+y.ref2id(u.yref);var f=r._plots[t];if(!f){a.push(u);continue}f.mainplot&&(t=f.mainplot.id),l[t]||(l[t]=[]),l[t].push(u)}else u.layer==="above"?d.push(u):a.push(u)}var o={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=m.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 s(k){var L,A,I=m.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*o[k.xanchor].offset,K=A*h[k.yanchor].offset,G=o[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":G+=" slice";break;case"stretch":G="none"}I.attr({x:H,y:V,width:L,height:A,preserveAspectRatio:G,opacity:k.opacity});var W=(P&&b.getRefType(k.xref)!=="domain"?P._id:"")+(S&&b.getRefType(k.yref)!=="domain"?S._id:"");g.setClipUrl(I,W?"clip"+r._uid+W:null,n)}var x=r._imageLowerLayer.selectAll("image").data(a),c=r._imageUpperLayer.selectAll("image").data(d);x.enter().append("image"),c.enter().append("image"),x.exit().remove(),c.exit().remove(),x.each(function(k){p.bind(this)(k),s.bind(this)(k)}),c.each(function(k){p.bind(this)(k),s.bind(this)(k)});var T=Object.keys(r._plots);for(i=0;i<T.length;i++){t=T[i];var _=r._plots[t];if(_.imagelayer){var w=_.imagelayer.selectAll("image").data(l[t]||[]);w.enter().append("image"),w.exit().remove(),w.each(function(k){p.bind(this)(k),s.bind(this)(k)})}}}},{"../../constants/xmlns_namespaces":480,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_ids":558,"../drawing":388,"@plotly/d3":58}],415:[function(v,$,te){$.exports={moduleType:"component",name:"images",layoutAttributes:v("./attributes"),supplyLayoutDefaults:v("./defaults"),includeBasePlot:v("../../plots/cartesian/include_components")("images"),draw:v("./draw"),convertCoords:v("./convert_coords")}},{"../../plots/cartesian/include_components":567,"./attributes":411,"./convert_coords":412,"./defaults":413,"./draw":414}],416:[function(v,$,te){var m=v("../../plots/font_attributes"),g=v("../color/attributes");$.exports={bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:m({editType:"legend"}),grouptitlefont:m({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:m({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(v,$,te){$.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},{}],418:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("../../plot_api/plot_template"),y=v("../../plots/attributes"),e=v("./attributes"),n=v("../../plots/layout_attributes"),t=v("./helpers");$.exports=function(i,r,d){var l,a=i.legend||{},u=b.newContainer(r,"legend");function f(S,E){return g.coerce(a,u,e,S,E)}for(var o=function(S,E){var D=l._input,F=l;return g.coerce(D,F,y,S,E)},h=r.font||{},p=g.coerceFont(f,"grouptitlefont",g.extendFlat({},h,{size:Math.round(1.1*h.size)})),s=0,x=!1,c="normal",T=0;T<d.length;T++)(l=d[T]).visible&&((l.showlegend||l._dfltShowLegend&&!(l._module&&l._module.attributes&&l._module.attributes.showlegend&&l._module.attributes.showlegend.dflt===!1))&&(s++,l.showlegend&&(x=!0,(m.traceIs(l,"pie-like")||l._input.showlegend===!0)&&s++),g.coerceFont(o,"legendgrouptitle.font",p)),(m.traceIs(l,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(l.fill)!==-1)&&(c=t.isGrouped({traceorder:c})?"grouped+reversed":"reversed"),l.legendgroup!==void 0&&l.legendgroup!==""&&(c=t.isReversed({traceorder:c})?"reversed+grouped":"grouped"));var _=g.coerce(i,r,n,"showlegend",x&&s>1);if(_===!1&&(r.legend=void 0),(_!==!1||a.uirevision)&&(f("uirevision",r.uirevision),_!==!1)){f("bgcolor",r.paper_bgcolor),f("bordercolor"),f("borderwidth");var w,k,L,A=g.coerceFont(f,"font",r.font),I=f("orientation")==="h";if(I?(w=0,m.getComponentMethod("rangeslider","isVisible")(i.xaxis)?(k=1.1,L="bottom"):(k=-.1,L="top")):(w=1.02,k=1,L="auto"),f("traceorder",c),t.isGrouped(r.legend)&&f("tracegroupgap"),f("itemsizing"),f("itemwidth"),f("itemclick"),f("itemdoubleclick"),f("groupclick"),f("x",w),f("xanchor"),f("y",k),f("yanchor",L),f("valign"),g.noneOrAll(a,u,["x","y"]),f("title.text")){f("title.side",I?"left":"top");var P=g.extendFlat({},A,{size:g.bigFont(A.size)});g.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(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../plots/plots"),y=v("../../registry"),e=v("../../lib/events"),n=v("../dragelement"),t=v("../drawing"),i=v("../color"),r=v("../../lib/svg_text_utils"),d=v("./handle_click"),l=v("./constants"),a=v("../../constants/alignment"),u=a.LINE_SPACING,f=a.FROM_TL,o=a.FROM_BR,h=v("./get_legend_data"),p=v("./style"),s=v("./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),y.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 c(A,I,P){var S,E,D=A.data()[0][0],F=D.trace,H=y.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=g.templateString(S,F._meta))));var K=g.ensureSingle(A,"text","legendtext");K.attr("text-anchor","start").call(t.font,E).text(V?T(S,Z):S);var G=P.itemwidth+2*l.itemGap;r.positionText(K,G,0),V?K.call(r.makeEditable,{gd:I,text:S}).call(w,A,I,P).on("edit",function(W){this.text(T(W,Z)).call(w,A,I,P);var Q=D.trace._fullInput||{},R={};if(y.hasTransform(Q,"groupby")){var N=y.getTransformIndices(Q,"groupby"),U=N[N.length-1],ee=g.keyedContainer(Q,"transforms["+U+"].styles","target","value.name");ee.set(D.trace._group,W),R=ee.constructUpdate()}else R.name=W;return y.call("_guiRestyle",I,R,F.index)}):w(K,A,I,P)}function T(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=g.ensureSingle(A,"rect","legendtoggle",function(F){I._context.staticPlot||F.style("cursor","pointer").attr("pointer-events","all"),F.call(i.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,m.event)}}))}function w(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]"),G=K.node();H||(H=F._fullLayout.legend);var W,Q=H.borderwidth;W=V===1?H.title.font:Z.groupTitle?Z.groupTitle.font:H.font;var R,N,U=W.size*u;if(G){var ee=t.bBox(G);R=ee.height,N=ee.width,V===1?t.setTranslate(K,Q,Q+.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*l.itemGap),r.positionText(j,Q+l.titlePad,Q+U);else{var re=2*l.itemGap+H.itemwidth;Z.groupTitle&&(re=l.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 g.isRightAnchor(A)?"right":g.isCenterAnchor(A)?"center":"left"}function L(A){return g.isBottomAnchor(A)?"bottom":g.isMiddleAnchor(A)?"middle":"top"}$.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=g.ensureSingle(E,"g","legend",function(X){V||X.attr("pointer-events","all")}),G=g.ensureSingleById(F._topdefs,"clipPath",H,function(X){X.append("rect")}),W=g.ensureSingle(K,"rect","bg",function(X){X.attr("shape-rendering","crispEdges")});W.call(i.stroke,S.bordercolor).call(i.fill,S.bgcolor).style("stroke-width",S.borderwidth+"px");var Q=g.ensureSingle(K,"g","scrollbox"),R=S.title;if(S._titleWidth=0,S._titleHeight=0,R.text){var N=g.ensureSingle(Q,"text","legendtitletext");N.attr("text-anchor","start").call(t.font,R.font).text(R.text),w(N,Q,P,S,1)}else Q.selectAll(".legendtitletext").remove();var U=g.ensureSingle(K,"rect","scrollbar",function(X){X.attr(l.scrollBarEnterAttrs).call(i.fill,l.scrollBarColor)}),ee=Q.selectAll("g.groups").data(D);ee.enter().append("g").attr("class","groups"),ee.exit().remove();var j=ee.selectAll("g.traces").data(g.identity);j.enter().append("g").attr("class","traces"),j.exit().remove(),j.style("opacity",function(X){var J=X[0].trace;return y.traceIs(J,"pie-like")?Z.indexOf(X[0].label)!==-1?.5:1:J.visible==="legendonly"?.5:1}).each(function(){m.select(this).call(c,P,S)}).call(p,P,S).each(function(){V||m.select(this).call(_,P)}),g.syncOrAsync([b.previousPromises,function(){return function(X,J,re,ne){var se=X._fullLayout;ne||(ne=se.legend);var oe=se._size,pe=s.isVertical(ne),ce=s.isGrouped(ne),de=ne.borderwidth,xe=2*de,_e=l.itemGap,we=ne.itemwidth+2*_e,Ee=2*(de+_e),fe=L(ne),ge=ne.y<0||ne.y===0&&fe==="top",ke=ne.y>1||ne.y===1&&fe==="bottom",be=ne.tracegroupgap;ne._maxHeight=Math.max(ge||ke?se.height/2:oe.h,30);var Se=0;ne._width=0,ne._height=0;var Oe=function(wt){var ft=0,Ce=0,Ie=wt.title.side;return Ie&&(Ie.indexOf("left")!==-1&&(ft=wt._titleWidth),Ie.indexOf("top")!==-1&&(Ce=wt._titleHeight)),[ft,Ce]}(ne);if(pe)re.each(function(wt){var ft=wt[0].height;t.setTranslate(this,de+Oe[0],de+Oe[1]+ne._height+ft/2+_e),ne._height+=ft,ne._width=Math.max(ne._width,wt[0].width)}),Se=we+ne._width,ne._width+=_e+we+xe,ne._height+=Ee,ce&&(J.each(function(wt,ft){t.setTranslate(this,0,ft*ne.tracegroupgap)}),ne._height+=(ne._lgroupsLength-1)*ne.tracegroupgap);else{var De=k(ne),je=ne.x<0||ne.x===0&&De==="right",Je=ne.x>
12131||ne.x===1&&De==="left",ze=ke||ge,Ue=se.width/2;ne._maxWidth=Math.max(je?ze&&De==="left"?oe.l+oe.w:Ue:Je?ze&&De==="right"?oe.r+oe.w:Ue:oe.w,2*we);var Ge=0,Ye=0;re.each(function(wt){var ft=wt[0].width+we;Ge=Math.max(Ge,ft),Ye+=ft}),Se=null;var et=0;if(ce){var ct=0,mt=0,Ct=0;J.each(function(){var wt=0,ft=0;m.select(this).selectAll("g.traces").each(function(Ie){var Te=Ie[0].width,Pe=Ie[0].height;t.setTranslate(this,Oe[0],Oe[1]+de+_e+Pe/2+ft),ft+=Pe,wt=Math.max(wt,we+Te)});var Ce=wt+_e;mt>0&&Ce+de+mt>ne._maxWidth?(et=Math.max(et,mt),mt=0,Ct+=ct+be,ct=ft):ct=Math.max(ct,ft),t.setTranslate(this,mt,Ct),mt+=Ce}),ne._width=Math.max(et,mt)+de,ne._height=Ct+ct+Ee}else{var Tt=re.size(),nt=Ye+xe+(Tt-1)*_e<ne._maxWidth,Qe=0,Et=0,Gt=0,Xt=0;re.each(function(wt){var ft=wt[0].height,Ce=we+wt[0].width,Ie=(nt?Ce:Ge)+_e;Ie+de+Et-_e>=ne._maxWidth&&(et=Math.max(et,Xt),Et=0,Gt+=Qe,ne._height+=Qe,Qe=0),t.setTranslate(this,Oe[0]+de+Et,Oe[1]+de+Gt+ft/2+_e),Xt=Et+Ce+_e,Et+=Ie,Qe=Math.max(Qe,ft)}),nt?(ne._width=Et+xe,ne._height=Qe+Ee):(ne._width=Math.max(et,Xt)+xe,ne._height+=Qe+Ee)}}ne._width=Math.ceil(Math.max(ne._width+Oe[0],ne._titleWidth+2*(de+l.titlePad))),ne._height=Math.ceil(Math.max(ne._height+Oe[1],ne._titleHeight+2*(de+l.itemGap))),ne._effHeight=Math.min(ne._height,ne._maxHeight);var Fe=X._context.edits,qe=Fe.legendText||Fe.legendPosition;re.each(function(wt){var ft=m.select(this).select(".legendtoggle"),Ce=wt[0].height,Ie=qe?we:Se||we+wt[0].width;pe||(Ie+=_e/2),t.setRect(ft,0,-Ce/2,Ie,Ce)})}(P,ee,j,S)},function(){var X,J,re,ne,se=F._size,oe=S.borderwidth;if(!V){if(function(ze){var Ue=ze._fullLayout.legend,Ge=k(Ue),Ye=L(Ue);return b.autoMargin(ze,"legend",{x:Ue.x,y:Ue.y,l:Ue._width*f[Ge],r:Ue._width*o[Ge],b:Ue._effHeight*o[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=g.constrain(pe,0,F.width-S._width),ce=g.constrain(ce,0,F.height-S._effHeight),pe!==de&&g.log("Constrain legend.x to make legend fit inside graph"),ce!==xe&&g.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 _e=S._effHeight;V&&(_e=S._height),W.attr({width:S._width-oe,height:_e-oe,x:oe/2,y:oe/2}),t.setTranslate(Q,0,0),G.select("rect").attr({width:S._width-2*oe,height:_e-2*oe,x:oe,y:oe}),t.setClipUrl(Q,H,P),t.setRect(U,0,0,0,0),delete S._scrollY}else{var we,Ee,fe,ge=Math.max(l.scrollBarMinHeight,S._effHeight*S._effHeight/S._height),ke=S._effHeight-ge-2*l.scrollBarMargin,be=S._height-S._effHeight,Se=ke/be,Oe=Math.min(S._scrollY||0,be);W.attr({width:S._width-2*oe+l.scrollBarWidth+l.scrollBarMargin,height:S._effHeight-oe,x:oe/2,y:oe/2}),G.select("rect").attr({width:S._width-2*oe+l.scrollBarWidth+l.scrollBarMargin,height:S._effHeight-2*oe,x:oe,y:oe+Oe}),t.setClipUrl(Q,H,P),Je(Oe,ge,Se),K.on("wheel",function(){Je(Oe=g.constrain(S._scrollY+m.event.deltaY/ke*be,0,be),ge,Se),Oe!==0&&Oe!==be&&m.event.preventDefault()});var De=m.behavior.drag().on("dragstart",function(){var ze=m.event.sourceEvent;we=ze.type==="touchstart"?ze.changedTouches[0].clientY:ze.clientY,fe=Oe}).on("drag",function(){var ze=m.event.sourceEvent;ze.buttons===2||ze.ctrlKey||(Ee=ze.type==="touchmove"?ze.changedTouches[0].clientY:ze.clientY,Je(Oe=function(Ue,Ge,Ye){var et=(Ye-Ge)/Se+Ue;return g.constrain(et,0,be)}(fe,we,Ee),ge,Se))});U.call(De);var je=m.behavior.drag().on("dragstart",function(){var ze=m.event.sourceEvent;ze.type==="touchstart"&&(we=ze.changedTouches[0].clientY,fe=Oe)}).on("drag",function(){var ze=m.event.sourceEvent;ze.type==="touchmove"&&(Ee=ze.changedTouches[0].clientY,Je(Oe=function(Ue,Ge,Ye){var et=(Ge-Ye)/Se+Ue;return g.constrain(et,0,be)}(fe,we,Ee),ge,Se))});Q.call(je)}function Je(ze,Ue,Ge){S._scrollY=P._fullLayout.legend._scrollY=ze,t.setTranslate(Q,0,-ze),t.setRect(U,S._width,l.scrollBarMargin+ze*Ge,l.scrollBarWidth,Ue),G.select("rect").attr("y",oe+ze)}P._context.edits.legendPosition&&(K.classed("cursor-move",!0),n.init({element:K.node(),gd:P,prepFn:function(){var ze=t.getTranslate(K);re=ze.x,ne=ze.y},moveFn:function(ze,Ue){var Ge=re+ze,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&&y.call("_guiRelayout",P,{"legend.x":X,"legend.y":J})}
1213,clickFn:function(ze,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,ze,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(v,$,te){var m=v("../../registry"),g=v("./helpers");$.exports=function(b,y){var e,n,t=y._inHover,i=g.isGrouped(y),r=g.isReversed(y),d={},l=[],a=!1,u={},f=0,o=0;function h(F,H){if(F!==""&&g.isGrouped(y))l.indexOf(F)===-1?(l.push(F),a=!0,d[F]=[H]):d[F].push(H);else{var V="~~i"+f;l.push(V),d[V]=[H],f++}}for(e=0;e<b.length;e++){var p=b[e],s=p[0],x=s.trace,c=x.legendgroup;if(t||x.visible&&x.showlegend)if(m.traceIs(x,"pie-like"))for(u[c]||(u[c]={}),n=0;n<p.length;n++){var T=p[n].label;u[c][T]||(h(c,{label:T,color:p[n].color,i:p[n].i,trace:x,pts:p[n].pts}),u[c][T]=!0,o=Math.max(o,(T||"").length))}else h(c,s),o=Math.max(o,(x.name||"").length)}if(!l.length)return[];var _=!a||!i,w=[];for(e=0;e<l.length;e++){var k=d[l[e]];_?w.push(k[0]):w.push(k)}for(_&&(w=[w]),e=0;e<w.length;e++){var L=1/0;for(n=0;n<w[e].length;n++){var A=w[e][n].trace.legendrank;L>A&&(L=A)}w[e][0]._groupMinRank=L,w[e][0]._preGroupSort=e}var I=function(F,H){return F.trace.legendrank-H.trace.legendrank||F._preSort-H._preSort};for(w.forEach(function(F,H){F[0]._preGroupSort=H}),w.sort(function(F,H){return F[0]._groupMinRank-H[0]._groupMinRank||F[0]._preGroupSort-H[0]._preGroupSort}),e=0;e<w.length;e++){w[e].forEach(function(F,H){F._preSort=H}),w[e].sort(I);var P=w[e][0].trace,S=null;for(n=0;n<w[e].length;n++){var E=w[e][n].trace.legendgrouptitle;if(E&&E.text){S=E,t&&(E.font=y._groupTitleFont);break}}if(r&&w[e].reverse(),S){var D=!1;for(n=0;n<w[e].length;n++)if(m.traceIs(w[e][n].trace,"pie-like")){D=!0;break}w[e].unshift({i:-1,groupTitle:S,noClick:D,trace:{showlegend:P.showlegend,legendgroup:P.legendgroup,visible:y.groupclick==="toggleitem"||P.visible}})}for(n=0;n<w[e].length;n++)w[e][n]=[w[e][n]]}return y._lgroupsLength=w.length,y._maxNameLength=o,w}},{"../../registry":638,"./helpers":422}],421:[function(v,$,te){var m=v("../../lib"),g=v("../../registry"),b=!0;$.exports=function(y,e,n){var t=e._fullLayout;if(!e._dragged&&!e._editing){var i,r=t.legend.itemclick,d=t.legend.itemdoubleclick,l=t.legend.groupclick;if(n===1&&r==="toggle"&&d==="toggleothers"&&b&&e.data&&e._context.showTips&&m.notifier(m._(e,"Double-click on legend to isolate one trace"),"long"),b=!1,n===1?i=r:n===2&&(i=d),i){var a=l==="togglegroup",u=t.hiddenlabels?t.hiddenlabels.slice():[],f=y.data()[0][0];if(!f.groupTitle||!f.noClick){var o,h,p,s,x,c=e._fullData,T=f.trace,_=T.legendgroup,w={},k=[],L=[],A=[];if(g.traceIs(T,"pie-like")){var I=f.label,P=u.indexOf(I);i==="toggle"?P===-1?u.push(I):u.splice(P,1):i==="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=[])),g.call("_guiRelayout",e,"hiddenlabels",u)}else{var S,E=_&&_.length,D=[];if(E)for(o=0;o<c.length;o++)(S=c[o]).visible&&S.legendgroup===_&&D.push(o);if(i==="toggle"){var F;switch(T.visible){case!0:F="legendonly";break;case!1:F=!1;break;case"legendonly":F=!0}if(E)if(a)for(o=0;o<c.length;o++)c[o].visible!==!1&&c[o].legendgroup===_&&N(c[o],F);else N(T,F);else N(T,F)}else if(i==="toggleothers"){var H,V,Z,K,G=!0;for(o=0;o<c.length;o++)if(H=c[o]===T,Z=c[o].showlegend!==!0,!(H||Z||(V=E&&c[o].legendgroup===_)||c[o].visible!==!0||g.traceIs(c[o],"notLegendIsolatable"))){G=!1;break}for(o=0;o<c.length;o++)if(c[o].visible!==!1&&!g.traceIs(c[o],"notLegendIsolatable"))switch(T.visible){case"legendonly":N(c[o],!0);break;case!0:K=!!G||"legendonly",H=c[o]===T,Z=c[o].showlegend!==!0&&!c[o].legendgroup,V=H||E&&c[o].legendgroup===_,N(c[o],!(!V&&!Z)||K)}}for(o=0;o<L.length;o++)if(p=L[o]){var W=p.constructUpdate(),Q=Object.keys(W);for(h=0;
1213h<Q.length;h++)s=Q[h],(w[s]=w[s]||[])[A[o]]=W[s]}for(x=Object.keys(w),o=0;o<x.length;o++)for(s=x[o],h=0;h<k.length;h++)w[s].hasOwnProperty(h)||(w[s][h]=void 0);g.call("_guiRestyle",e,w,k)}}}}function R(U,ee,j){var X=k.indexOf(U),J=w[ee];return J||(J=w[ee]=[]),k.indexOf(U)===-1&&(k.push(U),X=k.length-1),J[X]=j,X}function N(U,ee){if(!f.groupTitle||a){var j=U._fullInput;if(g.hasTransform(j,"groupby")){var X=L[j.index];if(!X){var J=g.getTransformIndices(j,"groupby"),re=J[J.length-1];X=m.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,ee),A[j.index]=R(j.index,"visible",j.visible!==!1)}else{var se=j.visible!==!1&ⅇR(j.index,"visible",se)}}}}},{"../../lib":503,"../../registry":638}],422:[function(v,$,te){te.isGrouped=function(m){return(m.traceorder||"").indexOf("grouped")!==-1},te.isVertical=function(m){return m.orientation!=="h"},te.isReversed=function(m){return(m.traceorder||"").indexOf("reversed")!==-1}},{}],423:[function(v,$,te){$.exports={moduleType:"component",name:"legend",layoutAttributes:v("./attributes"),supplyLayoutDefaults:v("./defaults"),draw:v("./draw"),style:v("./style")}},{"./attributes":416,"./defaults":418,"./draw":419,"./style":424}],424:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../registry"),b=v("../../lib"),y=b.strTranslate,e=v("../drawing"),n=v("../color"),t=v("../colorscale/helpers").extractOpts,i=v("../../traces/scatter/subtypes"),r=v("../../traces/pie/style_one"),d=v("../../traces/pie/helpers").castOption,l=v("./constants");function a(o,h){return(h?"radial":"horizontal")+(o?"":"reversed")}function u(o){var h=o[0].trace,p=h.contours,s=i.hasLines(h),x=i.hasMarkers(h),c=h.visible&&h.fill&&h.fill!=="none",T=!1,_=!1;if(p){var w=p.coloring;w==="lines"?T=!0:s=w==="none"||w==="heatmap"||p.showlines,p.type==="constraint"?c=p._operation!=="=":w!=="fill"&&w!=="heatmap"||(_=!0)}return{showMarker:x,showLine:s,showFill:c,showGradientLine:T,showGradientFill:_,anyLine:s||T,anyFill:c||_}}function f(o,h,p){return o&&b.isArrayOrTypedArray(o)?h:o>p?p:o}$.exports=function(o,h,p){var s=h._fullLayout;p||(p=s.legend);var x=p.itemsizing==="constant",c=p.itemwidth,T=(c+2*l.itemGap)/2,_=y(T,0),w=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:g.traceIs(S,"bar"),H=m.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=m.select(this),K=V[0],G=w(K.mlw,E.line,5,2);Z.style("stroke-width",G+"px");var W=K.mcc;if(!p._inHover&&"mc"in K){var Q=t(E),R=Q.mid;R===void 0&&(R=(Q.max+Q.min)/2),W=e.tryColorscale(E,"")(R)}var N=W||K.mc||E.color,U=E.pattern,ee=U&&e.getPatternAttr(U.shape,0,"");if(ee){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,ee,re,ne,W,U.fillmode,j,X,J)}else Z.call(n.fill,N);G&&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:g.traceIs(E,P),F=m.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=w(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)}}o.each(function(A){var I=m.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",y(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=m.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=m.select(this),Z=t(P),K=Z.colorscale,G=Z.reversescale;if(K){if(!I){var W=K.length;H=F===0?K[G?W-1:0][1]:F===1?K[G?0:W-1][1]:K[Math.floor((W-1)/2)][1]}}else{var Q=P.vertexcolor||P.facecolor||P.color;H=b.isArrayOrTypedArray(Q)?Q[F]||Q[0]:Q}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,a(G,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=m.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=m.select(this),V=I[F[0]].marker,Z=w(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=m.select(this).select("g.legendpoints").selectAll("path.legendbox").data(I.visible&&g.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=m.select(this);if(I.boxpoints!=="all"&&I.points!=="all"||n.opacity(I.fillcolor)!==0||n.opacity((I.line||{}).color)!==0){var E=w(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],G=K.trace,W=t(G),Q=W.colorscale,R=W.reversescale,N=i.hasMarkers(G)||!V?"M5,0":Z?"M5,-2":"M5,-3",U=m.select(this),ee=U.select(".legendfill").selectAll("path").data(E||H?[A]:[]);if(ee.enter().append("path").classed("js-fill",!0),ee.exit().remove(),ee.attr("d",N+"h"+c+"v6h-"+c+"z").call(function(J){if(J.size())if(E)e.fillGroupStyle(J,h);else{var re="legendfill-"+G.uid;e.gradient(J,h,re,a(R),Q,"fill")}}),D||F){var j=w(void 0,G.line,10,5);P=b.minExtend(G,{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"+c+",0.0001":"h"+c)).call(D?e.lineGroupStyle:function(J){if(J.size()){var re="legendline-"+G.uid;e.lineGroupStyle(J),e.gradient(J,h,re,a(R),Q,"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&&i.hasText(Z);function G(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 Q={},R={};if(H){Q.mc=G("marker.color",W),Q.mx=G("marker.symbol",W),Q.mo=G("marker.opacity",b.mean,[.2,1]),Q.mlc=G("marker.line.color",W),Q.mlw=G("marker.line.width",b.mean,[0,5],2),R.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var N=G("marker.size",b.mean,[2,16],12);Q.ms=N,R.marker.size=N}F&&(R.line={width:G("line.width",W,[0,10],5)}),K&&(Q.tx="Aa",Q.tp=G("textposition",W),Q.ts=10,Q.tc=G("textfont.color",W),Q.tf=G("textfont.family",W)),I=[b.minExtend(V,Q)],(P=b.minExtend(Z,R)).selectedpoints=null,P.texttemplate=null}var U=m.select(this).select("g.legendpoints"),ee=U.selectAll("path.scatterpts").data(H?I:[]);ee.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),ee.exit().remove(),ee.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=m.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=m.select(this),F=I[E?"increasing":"decreasing"],H=w(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=m.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=m.select(this),F=I[E?"increasing":"decreasing"],H=w(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":906,"../../traces/pie/style_one":912,"../../traces/scatter/subtypes":952,"../color":366,"../colorscale/helpers":377,"../drawing":388,"./constants":417,"@plotly/d3":58}],425:[function(v,$,te){v("./constants"),$.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(v,$,te){var m=v("../../registry"),g=v("../../plots/plots"),b=v("../../plots/cartesian/axis_ids"),y=v("../../fonts/ploticon"),e=v("../shapes/draw").eraseActiveShape,n=v("../../lib"),t=n._,i=$.exports={};function r(s,x){var c,T,_=x.currentTarget,w=_.getAttribute("data-attr"),k=_.getAttribute("data-val")||!0,L=s._fullLayout,A={},I=b.list(s,null,!0),P=L._cartesianSpikesEnabled;if(w==="zoom"){var S,E=k==="in"?.5:2,D=(1+E)/2,F=(1-E)/2;for(T=0;T<I.length;T++)if(!(c=I[T]).fixedrange)if(S=c._name,k==="auto")A[S+".autorange"]=!0;else if(k==="reset"){if(c._rangeInitial===void 0)A[S+".autorange"]=!0;else{var H=c._rangeInitial.slice();
1213A[S+".range[0]"]=H[0],A[S+".range[1]"]=H[1]}c._showSpikeInitial!==void 0&&(A[S+".showspikes"]=c._showSpikeInitial,P!=="on"||c._showSpikeInitial||(P="off"))}else{var V=[c.r2l(c.range[0]),c.r2l(c.range[1])],Z=[D*V[0]+F*V[1],D*V[1]+F*V[0]];A[S+".range[0]"]=c.l2r(Z[0]),A[S+".range[1]"]=c.l2r(Z[1])}}else w!=="hovermode"||k!=="x"&&k!=="y"||(k=L._isHoriz?"y":"x",_.setAttribute("data-val",k)),A[w]=k;L._cartesianSpikesEnabled=P,m.call("_guiRelayout",s,A)}function d(s,x){for(var c=x.currentTarget,T=c.getAttribute("data-attr"),_=c.getAttribute("data-val")||!0,w=s._fullLayout._subplots.gl3d||[],k={},L=T.split("."),A=0;A<w.length;A++)k[w[A]+"."+L[1]]=_;var I=_==="pan"?_:"zoom";k.dragmode=I,m.call("_guiRelayout",s,k)}function l(s,x){for(var c=x.currentTarget.getAttribute("data-attr"),T=c==="resetLastSave",_=c==="resetDefault",w=s._fullLayout,k=w._subplots.gl3d||[],L={},A=0;A<k.length;A++){var I,P=k[A],S=P+".camera",E=P+".aspectratio",D=P+".aspectmode",F=w[P]._scene;T?(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)}m.call("_guiRelayout",s,L)}function a(s,x){var c=x.currentTarget,T=c._previousVal,_=s._fullLayout,w=_._subplots.gl3d||[],k=["xaxis","yaxis","zaxis"],L={},A={};if(T)A=T,c._previousVal=null;else{for(var I=0;I<w.length;I++){var P=w[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}}c._previousVal=L}return A}function u(s,x){for(var c=x.currentTarget,T=c.getAttribute("data-attr"),_=c.getAttribute("data-val")||!0,w=s._fullLayout,k=w._subplots.geo||[],L=0;L<k.length;L++){var A=k[L],I=w[A];if(T==="zoom"){var P=I.projection.scale,S=_==="in"?2*P:.5*P;m.call("_guiRelayout",s,A+".projection.scale",S)}}T==="reset"&&p(s,"geo")}function f(s){var x=s._fullLayout;return!x.hovermode&&(x._has("cartesian")?x._isHoriz?"y":"x":"closest")}function o(s){var x=f(s);m.call("_guiRelayout",s,"hovermode",x)}function h(s,x){for(var c=x.currentTarget.getAttribute("data-val"),T=s._fullLayout,_=T._subplots.mapbox||[],w={},k=0;k<_.length;k++){var L=_[k],A=T[L].zoom,I=c==="in"?1.05*A:A/1.05;w[L+".zoom"]=I}m.call("_guiRelayout",s,w)}function p(s,x){for(var c=s._fullLayout,T=c._subplots[x]||[],_={},w=0;w<T.length;w++)for(var k=T[w],L=c[k]._subplot.viewInitial,A=Object.keys(L),I=0;I<A.length;I++){var P=A[I];_[k+"."+P]=L[P]}m.call("_guiRelayout",s,_)}i.toImage={name:"toImage",title:function(s){var x=(s._context.toImageButtonOptions||{}).format||"png";return t(s,x==="png"?"Download plot as a png":"Download plot")},icon:y.camera,click:function(s){var x=s._context.toImageButtonOptions,c={format:x.format||"png"};n.notifier(t(s,"Taking snapshot - this may take a few seconds"),"long"),c.format!=="svg"&&n.isIE()&&(n.notifier(t(s,"IE only supports svg. Changing format to svg."),"long"),c.format="svg"),["filename","width","height","scale"].forEach(function(T){T in x&&(c[T]=x[T])}),m.call("downloadImage",s,c).then(function(T){n.notifier(t(s,"Snapshot succeeded")+" - "+T,"long")}).catch(function(){n.notifier(t(s,"Sorry, there was a problem downloading your snapshot!"),"long")})}},i.sendDataToCloud={name:"sendDataToCloud",title:function(s){return t(s,"Edit in Chart Studio")},icon:y.disk,click:function(s){g.sendDataToCloud(s)}},i.editInChartStudio={name:"editInChartStudio",title:function(s){return t(s,"Edit in Chart Studio")},icon:y.pencil,click:function(s){g.sendDataToCloud(s)}},i.zoom2d={name:"zoom2d",_cat:"zoom",title:function(s){return t(s,"Zoom")},attr:"dragmode",val:"zoom",icon:y.zoombox,click:r},i.pan2d={name:"pan2d",_cat:"pan",title:function(s){return t(s,"Pan")},attr:"dragmode",val:"pan",icon:y.pan,click:r},i.select2d={name:"select2d",_cat:"select",title:function(s){return t(s,"Box Select")},attr:"dragmode",val:"select",icon:y.selectbox,click:r},i.lasso2d={name:"lasso2d",_cat:"lasso",title:function(s){return t(s,"Lasso Select")},attr:"dragmode",val:"lasso",icon:y.lasso,click:r},i.drawclosedpath={name:"drawclosedpath",title:function(s){return t(s,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:y.drawclosedpath,click:r},i.drawopenpath={name:"drawopenpath",title:function(s){return t(s,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:y.drawopenpath,click:r},i.drawline={name:"drawline",title:function(s){return t(s,"Draw line")},attr:"dragmode",val:"drawline",icon:y.drawline,click:r},i.drawrect={name:"drawrect",title:function(s){return t(s,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:y.drawrect,click:r},i.drawcircle={name:"drawcircle",title:function(s){return t(s,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:y.drawcircle,click:r},i.eraseshape={name:"eraseshape",title:function(s){return t(s,"Erase active shape")},icon:y.eraseshape,click:e},i.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(s){return t(s,"Zoom in")},attr:"zoom",val:"in",icon:y.zoom_plus,click:r},i.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(s){return t(s,"Zoom out")},attr:"zoom",val:"out",icon:y.zoom_minus,click:r},i.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(s){return t(s,"Autoscale")},attr:"zoom",val:"auto",icon:y.autoscale,click:r},i.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(s){return t(s,"Reset axes")},attr:"zoom",val:"reset",icon:y.home,click:r},i.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(s){return t(s,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:y.tooltip_basic,gravity:"ne",click:r},i.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(s){return t(s,"Compare data on hover")},attr:"hovermode",val:function(s){return s._fullLayout._isHoriz?"y":"x"},icon:y.tooltip_compare,gravity:"ne",click:r},i.zoom3d={name:"zoom3d",_cat:"zoom",title:function(s){return t(s,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:y.zoombox,click:d},i.pan3d={name:"pan3d",_cat:"pan",title:function(s){return t(s,"Pan")},attr:"scene.dragmode",val:"pan",icon:y.pan,click:d},i.orbitRotation={name:"orbitRotation",title:function(s){return t(s,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:y["3d_rotate"],click:d},i.tableRotation={name:"tableRotation",title:function(s){return t(s,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:y["z-axis"],click:d},i.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(s){return t(s,"Reset camera to default")},attr:"resetDefault",icon:y.home,click:l},i.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(s){return t(s,"Reset camera to last save")},attr:"resetLastSave",icon:y.movie,click:l},i.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(s){return t(s,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:y.tooltip_basic,gravity:"ne",click:function(s,x){var c=a(s,x);m.call("_guiRelayout",s,c)}},i.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(s){return t(s,"Zoom in")},attr:"zoom",val:"in",icon:y.zoom_plus,click:u},i.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(s){return t(s,"Zoom out")},attr:"zoom",val:"out",icon:y.zoom_minus,click:u},i.resetGeo={name:"resetGeo",_cat:"reset",title:function(s){return t(s,"Reset")},attr:"reset",val:null,icon:y.autoscale,click:u},i.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(s){return t(s,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:y.tooltip_basic,gravity:"ne",click:o},i.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(s){return t(s,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:y.tooltip_basic,gravity:"ne",click:o},i.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(s){return t(s,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:y.tooltip_basic,gravity:"ne",click:o},i.resetViewSankey={name:"resetSankeyGroup",title:function(s){return t(s,"Reset view")},icon:y.home,click:function(s){for(var x={"node.groups":[],"node.x":[],"node.y":[]},c=0;c<s._fullData.length;c++){var T=s._fullData[c]._viewInitial;x["node.groups"].push(T.node.groups.slice()),x["node.x"].push(T.node.x.slice()),x["node.y"].push(T.node.y.slice())}m.call("restyle",s,x)}},i.toggleHover={name:"toggleHover",title:function(s){return t(s,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:y.tooltip_basic,gravity:"ne",click:function(s,x){var c=a(s,x);c.hovermode=f(s),m.call("_guiRelayout",s,c)}},i.resetViews={name:"resetViews",title:function(s){return t(s,"Reset views")},icon:y.home,click:function(s,x){var c=x.currentTarget;c.setAttribute("data-attr","zoom"),c.setAttribute("data-val","reset"),r(s,x),c.setAttribute("data-attr","resetLastSave"),l(s,x),p(s,"geo"),p(s,"mapbox")}},i.toggleSpikelines={name:"toggleSpikelines",title:function(s){return t(s,"Toggle Spike Lines")},icon:y.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(s){var x=s._fullLayout,c=x._cartesianSpikesEnabled;x._cartesianSpikesEnabled=c==="on"?"off":"on",m.call("_guiRelayout",s,function(T){for(var _=T._fullLayout._cartesianSpikesEnabled==="on",w=b.list(T,null,!0),k={},L=0;L<w.length;L++){var A=w[L];k[A._name+".showspikes"]=!!_||A._showSpikeInitial}return k}(s))}},i.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(s){return t(s,"Reset view")},attr:"reset",icon:y.home,click:function(s){p(s,"mapbox")}},i.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(s){return t(s,"Zoom in")},attr:"zoom",val:"in",icon:y.zoom_plus,click:h},i.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(s){return t(s,"Zoom out")},attr:"zoom",val:"out",icon:y.zoom_minus,click:h}},{"../../fonts/ploticon":482,"../../lib":503,"../../plots/cartesian/axis_ids":558,"../../plots/plots":619,"../../registry":638,"../shapes/draw":450}],427:[function(v,$,te){var m=v("./buttons"),g=Object.keys(m),b=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],y=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(b),e=[];g.forEach(function(n){(function(t){if(y.indexOf(t._cat||t.name)===-1){var i=t.name,r=(t._cat||t.name).toLowerCase();e.indexOf(i)===-1&&e.push(i),e.indexOf(r)===-1&&e.push(r)}})(m[n])}),e.sort(),$.exports={DRAW_MODES:b,backButtons:y,foreButtons:e}},{"./buttons":426}],428:[function(v,$,te){var m=v("../../lib"),g=v("../color"),b=v("../../plot_api/plot_template"),y=v("./attributes");$.exports=function(e,n){var t=e.modebar||{},i=b.newContainer(n,"modebar");function r(l,a){return m.coerce(t,i,y,l,a)}r("orientation"),r("bgcolor",g.addOpacity(n.paper_bgcolor,.5));var d=g.contrast(g.rgb(n.modebar.bgcolor));r("color",g.addOpacity(d,.3)),r("activecolor",g.addOpacity(d,.7)),r("uirevision",n.uirevision),r("add"),r("remove")}},{"../../lib":503,"../../plot_api/plot_template":543,"../color":366,"./attributes":425}],429:[function(v,$,te){$.exports={moduleType:"component",name:"modebar",layoutAttributes:v("./attributes"),supplyLayoutDefaults:v("./defaults"),manage:v("./manage")}},{"./attributes":425,"./defaults":428,"./manage":430}],430:[function(v,$,te){var m=v("../../plots/cartesian/axis_ids"),g=v("../../traces/scatter/subtypes"),b=v("../../registry"),y=v("../fx/helpers").isUnifiedHover,e=v("./modebar"),n=v("./buttons"),t=v("./constants").DRAW_MODES;$.exports=function(i){var r=i._fullLayout,d=i._context,l=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 a,u=d.modeBarButtons;a=Array.isArray(u)&&u.length?function(f){for(var o=0;o<f.length;o++)for(var h=f[o],p=0;p<h.length;p++){var s=h[p];if(typeof s=="string"){if(n[s]===void 0)throw new Error(["*modeBarButtons* configuration options","invali
1213d button name"].join(" "));f[o][p]=n[s]}}return f}(u):!d.displayModeBar&&d.watermark?[]:function(f){var o=f._fullLayout,h=f._fullData,p=f._context;function s(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=o.modebar.add;typeof x=="string"&&(x=[x]);var c=o.modebar.remove;typeof c=="string"&&(c=[c]);var T=p.modeBarButtonsToAdd.concat(x.filter(function(ne){for(var se=0;se<p.modeBarButtonsToRemove.length;se++)if(s(ne,p.modeBarButtonsToRemove[se]))return!1;return!0})),_=p.modeBarButtonsToRemove.concat(c.filter(function(ne){for(var se=0;se<p.modeBarButtonsToAdd.length;se++)if(s(ne,p.modeBarButtonsToAdd[se]))return!1;return!0})),w=o._has("cartesian"),k=o._has("gl3d"),L=o._has("geo"),A=o._has("pie"),I=o._has("funnelarea"),P=o._has("gl2d"),S=o._has("ternary"),E=o._has("mapbox"),D=o._has("polar"),F=o._has("smith"),H=o._has("sankey"),V=function(ne){for(var se=m.list({_fullLayout:ne},null,!0),oe=0;oe<se.length;oe++)if(!se[oe].fixedrange)return!1;return!0}(o),Z=y(o.hovermode),K=[];function G(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(),_e=!1,we=0;we<_.length;we++){var Ee=_[we].toLowerCase();if(Ee===de||Ee===xe){_e=!0;break}}_e||se.push(n[pe])}K.push(se)}}var W=["toImage"];p.showEditInChartStudio?W.push("editInChartStudio"):p.showSendToCloud&&W.push("sendDataToCloud"),G(W);var Q=[],R=[],N=[],U=[];(w||P||A||I||S)+L+k+E+D+F>1?(R=["toggleHover"],N=["resetViews"]):L?(Q=["zoomInGeo","zoomOutGeo"],R=["hoverClosestGeo"],N=["resetGeo"]):k?(R=["hoverClosest3d"],N=["resetCameraDefault3d","resetCameraLastSave3d"]):E?(Q=["zoomInMapbox","zoomOutMapbox"],R=["toggleHover"],N=["resetViewMapbox"]):P?R=["hoverClosestGl2d"]:A?R=["hoverClosestPie"]:H?(R=["hoverClosestCartesian","hoverCompareCartesian"],N=["resetViewSankey"]):R=["toggleHover"],w&&(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=[]),!w&&!P||V||(Q=["zoomIn2d","zoomOut2d","autoScale2d"],N[0]!=="resetViews"&&(N=["resetScale2d"])),k?U=["zoom3d","pan3d","orbitRotation","tableRotation"]:(w||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")?(g.hasMarkers(pe)||g.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 ee=[],j=function(ne){ee.indexOf(ne)===-1&&R.indexOf(ne)!==-1&&ee.push(ne)};if(Array.isArray(T)){for(var X=[],J=0;J<T.length;J++){var re=T[J];typeof re=="string"?(re=re.toLowerCase(),t.indexOf(re)!==-1?(o._has("mapbox")||o._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)}T=X}return G(U),G(Q.concat(N)),G(ee),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,T)}(i),l?l.update(i,a):r._modeBar=e(i,a)}else l&&(l.destroy(),delete r._modeBar)}},{"../../plots/cartesian/axis_ids":558,"../../registry":638,"../../traces/scatter/subtypes":952,"../fx/helpers":402,"./buttons":426,"./constants":427,"./modebar":431}],431:[function(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("../../lib"),y=v("../../fonts/ploticon"),e=v("../../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 i=t.prototype;i.update=function(r,d){this.graphInfo=r;var l=this.graphInfo._context,a=this.graphInfo._fullLayout,u="modebar-"+a._uid;this.element.setAttribute("id",u),this._uid=u,this.element.className="modebar",l.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",d=d.reverse());var f=a.modebar,o=l.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";b.deleteRelatedStyleRule(u),b.addRelatedStyleRule(u,o+"#"+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!==l.displaylogo,s=this.locale!==l.locale;if(this.locale=l.locale,(h||p||s)&&(this.removeAllButtons(),this.updateButtons(d),l.watermark||l.displaylogo)){var x=this.getLogo();l.watermark&&(x.className=x.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(x,this.element.childNodes[0]):this.element.appendChild(x),this.hasLogo=!0}this.updateActiveButton()},i.updateButtons=function(r){var d=this;this.buttons=r,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(l){var a=d.createGroup();l.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 o=d.createButton(u);d.buttonElements.push(o),a.appendChild(o)}),d.element.appendChild(a)})},i.createGroup=function(){var r=document.createElement("div");return r.className="modebar-group",r},i.createButton=function(r){var d=this,l=document.createElement("a");l.setAttribute("rel","tooltip"),l.className="modebar-btn";var a=r.title;a===void 0?a=r.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&l.setAttribute("data-title",a),r.attr!==void 0&&l.setAttribute("data-attr",r.attr);var u=r.val;if(u!==void 0&&(typeof u=="function"&&(u=u(this.graphInfo)),l.setAttribute("data-val",u)),typeof r.click!="function")throw new Error("must provide button 'click' function in button config");l.addEventListener("click",function(o){r.click(d.graphInfo,o),d.updateActiveButton(o.currentTarget)}),l.setAttribute("data-toggle",r.toggle||!1),r.toggle&&m.select(l).classed("active",!0);var f=r.icon;return typeof f=="function"?l.appendChild(f()):l.appendChild(this.createIcon(f||y.question)),l.setAttribute("data-gravity",r.gravity||"n"),l},i.createIcon=function(r){var d,l=g(r.height)?Number(r.height):r.ascent-r.descent,a="http://www.w3.org/2000/svg";if(r.path){(d=document.createElementNS(a,"svg")).setAttribute("viewBox",[0,0,r.width,l].join(" ")),d.setAttribute("class","icon");var u=document.createElementNS(a,"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},i.updateActiveButton=function(r){var d=this.graphInfo._fullLayout,l=r!==void 0?r.getAttribute("data-attr"):null;
1213this.buttonElements.forEach(function(a){var u=a.getAttribute("data-val")||!0,f=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",h=m.select(a);if(o)f===l&&h.classed("active",!h.classed("active"));else{var p=f===null?f:b.nestedProperty(d,f).get();h.classed("active",p===u)}})},i.hasButtons=function(r){var d=this.buttons;if(!d||r.length!==d.length)return!1;for(var l=0;l<r.length;++l){if(r[l].length!==d[l].length)return!1;for(var a=0;a<r[l].length;a++)if(r[l][a].name!==d[l][a].name)return!1}return!0},i.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(y.newplotlylogo)),r.appendChild(d),r},i.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},i.destroy=function(){b.removeElement(this.container.querySelector(".modebar")),b.deleteRelatedStyleRule(this._uid)},$.exports=function(r,d){var l=r._fullLayout,a=new t({graphInfo:r,container:l._modebardiv.node(),buttons:d});return l._privateplot&&m.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}},{"../../fonts/ploticon":482,"../../lib":503,"../../version":1123,"@plotly/d3":58,"fast-isnumeric":190}],432:[function(v,$,te){var m=v("../../plots/font_attributes"),g=v("../color/attributes"),b=(0,v("../../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"});$.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:m({editType:"plot"}),bgcolor:{valType:"color",dflt:g.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:g.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(v,$,te){$.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],434:[function(v,$,te){var m=v("../../lib"),g=v("../color"),b=v("../../plot_api/plot_template"),y=v("../../plots/array_container_defaults"),e=v("./attributes"),n=v("./constants");function t(i,r,d,l){var a=l.calendar;function u(o,h){return m.coerce(i,r,e.buttons,o,h)}if(u("visible")){var f=u("step");f!=="all"&&(!a||a==="gregorian"||f!=="month"&&f!=="year"?u("stepmode"):r.stepmode="backward",u("count")),u("label")}}$.exports=function(i,r,d,l,a){var u=i.rangeselector||{},f=b.newContainer(r,"rangeselector");function o(s,x){return m.coerce(u,f,e,s,x)}if(o("visible",y(u,f,{name:"buttons",handleItemDefaults:t,calendar:a}).length>0)){var h=function(s,x,c){for(var T=c.filter(function(L){return x[L].anchor===s._id}),_=0,w=0;w<T.length;w++){var k=x[T[w]].domain;k&&(_=Math.max(k[1],_))}return[s.domain[0],_+n.yPad]}(r,d,l);o("x",h[0]),o("y",h[1]),m.noneOrAll(i,r,["x","y"]),o("xanchor"),o("yanchor"),m.coerceFont(o,"font",d.font);var p=o("bgcolor");o("activecolor",g.contrast(p,n.lightAmount,n.darkAmount)),o("bordercolor"),o("borderwidth")}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../color":366,"./attributes":432,"./constants":433}],435:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../registry"),b=v("../../plots/plots"),y=v("../color"),e=v("../drawing"),n=v("../../lib"),t=n.strTranslate,i=v("../../lib/svg_text_utils"),r=v("../../plots/cartesian/axis_ids"),d=v("../../constants/alignment"),l=d.LINE_SPACING,a=d.FROM_TL,u=d.FROM_BR,f=v("./constants"),o=v("./get_update_object");function h(x){return x._id}function p(x,c,T){var _=n.ensureSingle(x,"rect","selector-rect",function(w){
1213w.attr("shape-rendering","crispEdges")});_.attr({rx:f.rx,ry:f.ry}),_.call(y.stroke,c.bordercolor).call(y.fill,function(w,k){return k._isActive||k._isHovered?w.activecolor:w.bgcolor}(c,T)).style("stroke-width",c.borderwidth+"px")}function s(x,c,T,_){n.ensureSingle(x,"text","selector-text",function(w){w.attr("text-anchor","middle")}).call(e.font,c.font).text(function(w,k){return w.label?k?n.templateString(w.label,k):w.label:w.step==="all"?"all":w.count+w.step.charAt(0)}(T,_._fullLayout._meta)).call(function(w){i.convertToTspans(w,_)})}$.exports=function(x){var c=x._fullLayout._infolayer.selectAll(".rangeselector").data(function(T){for(var _=r.list(T,"x",!0),w=[],k=0;k<_.length;k++){var L=_[k];L.rangeselector&&L.rangeselector.visible&&w.push(L)}return w}(x),h);c.enter().append("g").classed("rangeselector",!0),c.exit().remove(),c.style({cursor:"pointer","pointer-events":"all"}),c.each(function(T){var _=m.select(this),w=T,k=w.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=m.select(this),P=o(w,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]]}(w,A,P),I.call(p,k,A),I.call(s,k,A,x),I.on("click",function(){x._dragged||g.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 Q=m.select(this).select(".selector-text"),R=P.font.size*l,N=Math.max(R*i.lineCount(Q),16)+3;F=Math.max(F,N)}),I.each(function(){var Q=m.select(this),R=Q.select(".selector-rect"),N=Q.select(".selector-text"),U=N.node()&&e.bBox(N.node()).width,ee=P.font.size*l,j=i.lineCount(N),X=Math.max(U+10,f.minButtonWidth);Q.attr("transform",t(H+D,H)),R.attr({x:0,y:0,width:X,height:F}),i.positionText(N,X/2,F/2-(j-1)*ee/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),G="left";n.isRightAnchor(P)&&(Z-=D,G="right"),n.isCenterAnchor(P)&&(Z-=D/2,G="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*a[G],r:D*u[G],b:F*u[W],t:F*a[W]}),E.attr("transform",t(Z,K))}(x,L,k,w._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(v,$,te){var m=v("d3-time"),g=v("../../lib").titleCase;$.exports=function(b,y){var e=b._name,n={};if(y.step==="all")n[e+".autorange"]=!0;else{var t=function(i,r){var d,l=i.range,a=new Date(i.r2l(l[1])),u=r.step,f=m["utc"+g(u)],o=r.count;switch(r.stepmode){case"backward":d=i.l2r(+f.offset(a,-o));break;case"todate":var h=f.offset(a,-o);d=i.l2r(+f.ceil(h))}var p=l[1];return[d,p]}(b,y);n[e+".range[0]"]=t[0],n[e+".range[1]"]=t[1]}return n}},{"../../lib":503,"d3-time":122}],437:[function(v,$,te){$.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:v("./attributes")}}},layoutAttributes:v("./attributes"),handleDefaults:v("./defaults"),draw:v("./draw")}},{"./attributes":432,"./defaults":434,"./draw":435}],438:[function(v,$,te){var m=v("../color/attributes");$.exports={bgcolor:{valType:"color",dflt:m.background,editType:"plot"},bordercolor:{valType:"color",dflt:m.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(v,$,te){var m=v("../../plots/cartesian/axis_ids").list,g=v("../../plots/cartesian/autorange").getAutoRange,b=v("./constants");$.exports=function(y){for(var e=m(y,"x",!0),n=0;n<e.length;n++){var t=e[n],i=t[b.name];i&&i.visible&&i.autorange&&(i._input.autorange=!0,i._input.range=i.range=g(y,t))}}},{"../../plots/cartesian/autorange":553,"../../plots/cartesian/axis_ids":558,"./constants":440}],440:[function(v,$,te){$.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-m
1213in",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(v,$,te){var m=v("../../lib"),g=v("../../plot_api/plot_template"),b=v("../../plots/cartesian/axis_ids"),y=v("./attributes"),e=v("./oppaxis_attributes");$.exports=function(n,t,i){var r=n[i],d=t[i];if(r.rangeslider||t._requestRangeslider[d._id]){m.isPlainObject(r.rangeslider)||(r.rangeslider={});var l,a,u=r.rangeslider,f=g.newContainer(d,"rangeslider");if(_("visible")){_("bgcolor",t.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!d.isValidRange(u.range)),_("range");var o=t._subplots;if(o)for(var h=o.cartesian.filter(function(k){return k.substr(0,k.indexOf("y"))===b.name2id(i)}).map(function(k){return k.substr(k.indexOf("y"),k.length)}),p=m.simpleMap(h,b.id2name),s=0;s<p.length;s++){var x=p[s];l=u[x]||{},a=g.newContainer(f,x,"yaxis");var c,T=t[x];l.range&&T.isValidRange(l.range)&&(c="fixed"),w("rangemode",c)!=="match"&&w("range",T.range.slice())}f._input=u}}function _(k,L){return m.coerce(u,f,y,k,L)}function w(k,L){return m.coerce(l,a,e,k,L)}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_ids":558,"./attributes":438,"./oppaxis_attributes":445}],442:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../registry"),b=v("../../plots/plots"),y=v("../../lib"),e=y.strTranslate,n=v("../drawing"),t=v("../color"),i=v("../titles"),r=v("../../plots/cartesian"),d=v("../../plots/cartesian/axis_ids"),l=v("../dragelement"),a=v("../../lib/setcursor"),u=v("./constants");function f(c,T,_,w){var k=y.ensureSingle(c,"rect",u.bgClassName,function(P){P.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),L=w.borderwidth%2==0?w.borderwidth:w.borderwidth-1,A=-w._offsetShift,I=n.crispRound(T,w.borderwidth);k.attr({width:w._width+L,height:w._height+L,transform:e(A,A),fill:w.bgcolor,stroke:w.bordercolor,"stroke-width":I})}function o(c,T,_,w){var k=T._fullLayout;y.ensureSingleById(k._topdefs,"clipPath",w._clipId,function(L){L.append("rect").attr({x:0,y:0})}).select("rect").attr({width:w._width,height:w._height})}function h(c,T,_,w){var k,L=T.calcdata,A=c.selectAll("g."+u.rangePlotClassName).data(_._subplotsWith,y.identity);A.enter().append("g").attr("class",function(I){return u.rangePlotClassName+" "+I}).call(n.setClipUrl,w._clipId,T),A.order(),A.exit().remove(),A.each(function(I,P){var S=m.select(this),E=P===0,D=d.getFromId(T,I,"y"),F=D._name,H=w[F],V={data:[],layout:{xaxis:{type:_.type,domain:[0,1],range:w.range.slice(),calendar:_.calendar},width:w._width,height:w._height,margin:{t:0,b:0,l:0,r:0}},_context:T._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 G={id:I,plotgroup:S,xaxis:Z,yaxis:K,isRangePlot:!0};E?k=G:(G.mainplot="xy",G.mainplotinfo=k),r.rangePlot(T,G,function(W,Q){for(var R=[],N=0;N<W.length;N++){var U=W[N],ee=U[0].trace;ee.xaxis+ee.yaxis===Q&&R.push(U)}return R}(L,I))})}function p(c,T,_,w,k){y.ensureSingle(c,"rect",u.maskMinClassName,function(L){L.attr({x:0,y:0,"shape-rendering":"crispEdges"})}).attr("height",w._height).call(t.fill,u.maskColor),y.ensureSingle(c,"rect",u.maskMaxClassName,function(L){L.attr({y:0,"shape-rendering":"crispEdges"})}).attr("height",w._height).call(t.fill,u.maskColor),k.rangemode!=="match"&&(y.ensureSingle(c,"rect",u.maskMinOppAxisClassName,function(L){L.attr({y:0,"shape-rendering":"crispEdges"})}).attr("width",w._width).call(t.fill,u.maskOppAxisColor),y.ensureSingle(c,"rect",u.maskMaxOppAxisClassName,function(L){L.attr({y:0,"shape-rendering":"crispEdges"})}).attr("width",w._width).style("border-top",u.maskOppBorder).call(t.fill,u.maskOppAxisColor))}function s(c,T,_,w){T._context.staticPlot||y.ensureSingle(c,"rect",u.slideBoxClassName,function(k){k.attr({y:0,cursor:u.slideBoxCursor,"shape-rendering":"crispEdges"})}).attr({height:w._height,fill:u.slideBoxFill})}function x(c,T,_,w){var k=y.ensureSingle(c,"g",u.grabberMinClassName),L=y.ensureSingle(c,"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(w._height/4),height:Math.round(w._height/2)};y.ensureSingle(k,"rect",u.handleMinClassName,function(S){S.attr(A)}).attr(I),y.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:T._context.staticPlot?void 0:u.grabAreaCursor};y.ensureSingle(k,"rect",u.grabAreaMinClassName,function(S){S.attr(P)}).attr("height",w._height),y.ensureSingle(L,"rect",u.grabAreaMaxClassName,function(S){S.attr(P)}).attr("height",w._height)}$.exports=function(c){for(var T=c._fullLayout,_=T._rangeSliderData,w=0;w<_.length;w++){var k=_[w][u.name];k._clipId=k._id+"-"+T._uid}var L=T._infolayer.selectAll("g."+u.containerClassName).data(_,function(A){return A._name});
1213L.exit().each(function(A){var I=A[u.name];T._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=m.select(this),P=A[u.name],S=T[d.id2name(A.anchor)],E=P[d.id2name(A.anchor)];if(P.range){var D,F=y.simpleMap(P.range,A.r2l),H=y.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=y.simpleMap(D,A.l2r)}A.cleanRange("rangeslider.range");var V=T._size,Z=A.domain;P._width=V.w*(Z[1]-Z[0]);var K=Math.round(V.l+V.w*Z[0]),G=Math.round(V.t+V.h*(1-A._counterDomainMin)+(A.side==="bottom"?A._depth:0)+P._offsetShift+u.extraPad);I.attr("transform",e(K,G)),P._rl=y.simpleMap(P.range,A.r2l);var W=P._rl[0],Q=P._rl[1],R=Q-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,Q);if(N.length){var U,ee,j=0;for(U=0;U<N.length;U++)j+=(ee=N[U]).max-ee.min;var X=P._width/(Q-W-j),J=[-X*W];for(U=0;U<N.length;U++)ee=N[U],J.push(J[J.length-1]-X*(ee.max-ee.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++)(ee=N[U]).pmin=P.d2p(ee.min),ee.pmax=P.d2p(ee.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,c,A,P).call(o,c,A,P).call(h,c,A,P).call(p,c,A,P,E).call(s,c,A,P).call(x,c,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(),_e=se.select("rect."+u.grabAreaMaxClassName).node();function we(){var Ee=m.event,fe=Ee.target,ge=Ee.clientX||Ee.touches[0].clientX,ke=ge-se.node().getBoundingClientRect().left,be=ce.d2p(pe._rl[0]),Se=ce.d2p(pe._rl[1]),Oe=l.coverSlip();function De(Je){var ze,Ue,Ge,Ye=+(Je.clientX||Je.touches[0].clientX)-ge;switch(fe){case de:Ge="ew-resize",ze=be+Ye,Ue=Se+Ye;break;case xe:Ge="col-resize",ze=be+Ye,Ue=Se;break;case _e:Ge="col-resize",ze=be,Ue=Se+Ye;break;default:Ge="ew-resize",ze=ke,Ue=ke+Ye}if(Ue<ze){var et=Ue;Ue=ze,ze=et}ce._pixelMin=ze,ce._pixelMax=Ue,a(m.select(Oe),Ge),function(ct,mt,Ct,Tt){function nt(Gt){return Ct.l2r(y.constrain(Gt,Tt._rl[0],Tt._rl[1]))}var Qe=nt(Tt.p2d(Tt._pixelMin)),Et=nt(Tt.p2d(Tt._pixelMax));window.requestAnimationFrame(function(){g.call("_guiRelayout",mt,Ct._name+".range",[Qe,Et])})}(0,oe,pe,ce)}function je(){Oe.removeEventListener("mousemove",De),Oe.removeEventListener("mouseup",je),this.removeEventListener("touchmove",De),this.removeEventListener("touchend",je),y.removeElement(Oe)}this.addEventListener("touchmove",De),this.addEventListener("touchend",je),Oe.addEventListener("mousemove",De),Oe.addEventListener("mouseup",je)}se.on("mousedown",we),se.on("touchstart",we)}(I,c,A,P),function(se,oe,pe,ce,de,xe){var _e=u.handleWidth/2;function we(je){return y.constrain(je,0,ce._width)}function Ee(je){return y.constrain(je,0,ce._height)}function fe(je){return y.constrain(je,-_e,ce._width+_e)}var ge=we(ce.d2p(pe._rl[0])),ke=we(ce.d2p(pe._rl[1]));if(se.select("rect."+u.slideBoxClassName).attr("x",ge).attr("width",ke-ge),se.select("rect."+u.maskMinClassName).attr("width",ge),se.select("rect."+u.maskMaxClassName).attr("x",ke).attr("width",ce._width-ke),xe.rangemode!=="match"){var be=ce._height-Ee(ce.d2pOppAxis(de._rl[1])),Se=ce._height-Ee(ce.d2pOppAxis(de._rl[0]));se.select("rect."+u.maskMinOppAxisClassName).attr("x",ge).attr("height",be).attr("width",ke-ge),se.select("rect."+u.maskMaxOppAxisClassName).attr("x",ge).attr("y",Se).attr("height",ce._height-Se).attr("width",ke-ge),se.select("rect."+u.slideBoxClassName).attr("y",be).attr("height",Se-be)}var Oe=Math.round(fe(ge-_e))-.5,De=Math.round(fe(ke-_e))+.5;se.select("g."+u.grabberMinClassName).attr("transform",e(Oe,.5)),se.select("g."+u.grabberMaxClassName).attr("transform",e(De,.5))}(I,0,A,P,S,E),A.side==="bottom"&&i.draw(c,A._id+"title",{propContainer:A,propName:A._name+".title",placeholder:T._dfltTitle.x,attributes:{x:A._offset+A._length/2,y:G+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(v,$,te){var m=v("../../plots/cartesian/axis_ids"),g=v("../../lib/svg_text_utils"),b=v("./constants"),y=v("../../constants/alignment").LINE_SPACING,e=b.name;function n(t){var i=t&&t[e];return i&&i.visible}te.isVisible=n,te.makeData=function(t){var i=m.list({_fullLayout:t},"x",!0),r=t.margin,d=[];if(!t._has("gl2d"))for(var l=0;l<i.length;l++){var a=i[l];if(n(a)){d.push(a);var u=a[e];u._id=e+a._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,i){var r=t._fullLayout,d=i[e],l=i._id.charAt(0),a=0,u=0;return i.side==="bottom"&&(a=i._depth,i.title.text!==r._dfltTitle[l]&&(u=1.5*i.title.font.size+10+d._offsetShift,u+=(i.title.text.match(g.BR_TAG_ALL)||[]).length*i.title.font.size*y)),{x:0,y:i._counterDomainMin,l:0,r:0,t:0,b:d._height+a+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(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("./oppaxis_attributes"),y=v("./helpers");$.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:m.extendFlat({},g,{yaxis:b})}}},layoutAttributes:v("./attributes"),handleDefaults:v("./defaults"),calcAutorange:v("./calc_autorange"),draw:v("./draw"),isVisible:y.isVisible,makeData:y.makeData,autoMarginOpts:y.autoMarginOpts}},{"../../lib":503,"./attributes":438,"./calc_autorange":439,"./defaults":441,"./draw":442,"./helpers":443,"./oppaxis_attributes":445}],445:[function(v,$,te){$.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(v,$,te){var m=v("../annotations/attributes"),g=v("../../traces/scatter/attributes").line,b=v("../drawing/attributes").dash,y=v("../../lib/extend").extendFlat,e=v("../../plot_api/plot_template").templatedArray;
1213v("../../constants/axis_placeable_objects"),$.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:y({},m.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:y({},m.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"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:y({},g.color,{editType:"arraydraw"}),width:y({},g.width,{editType:"calc+arraydraw"}),dash:y({},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":927,"../annotations/attributes":349,"../drawing/attributes":387}],447:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("./constants"),y=v("./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,l,a,u,f){var o=r/2,h=f;if(d==="pixel"){var p=u?y.extractPathCoords(u,f?b.paramIsY:b.paramIsX):[l,a],s=m.aggNums(Math.max,null,p),x=m.aggNums(Math.min,null,p),c=x<0?Math.abs(x)+o:o,T=s>0?s+o:o;return{ppad:o,ppadplus:h?c:T,ppadminus:h?T:c}}return{ppad:o}}function i(r,d,l,a,u){var f=r.type==="category"||r.type==="multicategory"?r.r2c:r.d2c;if(d!==void 0)return[f(d),f(l)];if(a){var o,h,p,s,x=1/0,c=-1/0,T=a.match(b.segmentRE);for(r.type==="date"&&(f=y.decodeDate(f)),o=0;o<T.length;o++)(h=u[T[o].charAt(0)].drawn)!==void 0&&(!(p=T[o].substr(1).match(b.paramRE))||p.length<h||((s=f(p[h]))<x&&(x=s),s>c&&(c=s)));return c>=x?[x,c]:void 0}}$.exports=function(r){var d=r._fullLayout,l=m.filterVisible(d.shapes);if(l.length&&r._fullData.length)for(var a=0;a<l.length;a++){var u,f,o=l[a];o._extremes={};var h=g.getRefType(o.xref),p=g.getRefType(o.yref);if(o.xref!=="paper"&&h!=="domain"){var s=o.xsizemode==="pixel"?o.xanchor:o.x0,x=o.xsizemode==="pixel"?o.xanchor:o.x1;(f=i(u=g.getFromId(r,o.xref),s,x,o.path,b.paramIsX))&&(o._extremes[u._id]=g.findExtremes(u,f,e(o)))}if(o.yref!=="paper"&&p!=="domain"){var c=o.ysizemode==="pixel"?o.yanchor:o.y0,T=o.ysizemode==="pixel"?o.yanchor:o.y1;(f=i(u=g.getFromId(r,o.yref),c,T,o.path,b.paramIsY))&&(o._extremes[u._id]=g.findExtremes(u,f,n(o)))}}}},{"../../lib":503,"../../plots/cartesian/axes":554,"./constants":448,"./helpers":457}],448:[function(v,$,te){$.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(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("../../plots/array_container_defaults"),y=v("./attributes"),e=v("./helpers");function n(t,i,r){function d(E,D){return m.coerce(t,i,y,E,D)}if(d("visible")){var l=d("path"),a=d("type",l?"path":"rect");i.type!=="path"&&delete i.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"),o=["x","y"],h=0;h<2;h++){var p,s,x,c=o[h],T=c+"anchor",_=c==="x"?u:f,w={_fullLayout:r},k=g.coerceRef(t,i,w,c,void 0,"paper");if(g.getRefType(k)==="range"?((p=g.getFromId(w,k))._shapeIndices.push(i._index),x=e.rangeToShapePosition(p),s=e.shapePositionToRange(p)):s=x=m.identity,a!=="path"){var L=c+"0",A=c+"1",I=t[L],P=t[A];t[L]=s(t[L],!0),t[A]=s(t[A],!0),_==="pixel"?(d(L,0),d(A,10)):(g.coercePosition(i,w,d,k,L,.25),g.coercePosition(i,w,d,k,A,.75)),i[L]=x(i[L]),i[A]=x(i[A]),t[L]=I,t[A]=P}if(_==="pixel"){var S=t[T];t[T]=s(t[T],!0),g.coercePosition(i,w,d,k,T,.25),i[T]=x(i[T]),t[T]=S}}a==="path"?d("path"):m.noneOrAll(t,i,["x0","x1","y0","y1"])}}$.exports=function(t,i){b(t,i,{name:"shapes",handleItemDefaults:n})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"./attributes":446,"./helpers":457}],450:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("../../plots/cartesian/axes"),y=v("./draw_newshape/helpers").readPaths,e=v("./draw_newshape/display_outlines"),n=v("../../plots/cartesian/handle_outline").clearOutlineControllers,t=v("../color"),i=v("../drawing"),r=v("../../plot_api/plot_template").arrayEditor,d=v("../dragelement"),l=v("../../lib/setcursor"),a=v("./constants"),u=v("./helpers");function f(_){var w=_._fullLayout;for(var k in w._shapeUpperLayer.selectAll("path").remove(),w._shapeLowerLayer.selectAll("path").remove(),w._plots){var L=w._plots[k].shapelayer;L&&L.selectAll("path").remove()}for(var A=0;A<w.shapes.length;A++)w.shapes[A].visible&&p(_,A)}function o(_){return!!_._fullLayout._drawing}function h(_){return!_._context.edits.shapePosition}function p(_,w){_._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+w+'"]').remove();var k=u.makeOptionsAndPlotinfo(_,w),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":w,"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",G=h(_)&&L.editable&&_._fullLayout._activeShapeIndex===w;G&&(F=K?"rgba(0,0,0,0)":_._fullLayout.activeshape.fillcolor,D=_._fullLayout.activeshape.opacity);var W,Q=P.append("path").attr(E).style("opacity",D).call(t.stroke,H).call(t.fill,F).call(i.dashLine,Z,V);if(s(Q,_,L),(G||_._context.edits.shapePosition)&&(W=r(_.layout,"shapes",L)),G){Q.style({cursor:"move"});var R={element:Q.node(),plotinfo:A,gd:_,editHelpers:W,isActiveShape:!0},N=y(S,_);e(N,Q,R)}else _._context.edits.shapePosition?function(U,ee,j,X,J,re){var ne,se,oe,pe,ce,de,xe,_e,we,Ee,fe,ge,ke,be,Se,Oe,De=j.xsizemode==="pixel",je=j.ysizemode==="pixel",Je=j.type==="line",ze=j.type==="path",Ue=re.modifyItem,Ge=b.getFromId(U,j.xref),Ye=b.getRefType(j.xref),et=b.getFromId(U,j.yref),ct=b.getRefType(j.yref),mt=u.getDataToPixel(U,Ge,!1,Ye),Ct=u.getDataToPixel(U,et,!0,ct),Tt=u.getPixelToData(U,Ge,!1,Ye),nt=u.getPixelToData(U,et,!0,ct),Qe=Je?function(){var ft=Math.max(j.line.width,10),Ce=J.append("g").attr("data-index",X);Ce.append("path").attr("d",ee.attr("d")).style({cursor:"move","stroke-width":ft,"stroke-opacity":"0"});var Ie={"fill-opacity":"0"},Te=Math.max(ft/2,10);return Ce.append("circle").attr({"data-line-point":"start-point",cx:De?mt(j.xanchor)+j.x0:mt(j.x0),cy:je?Ct(j.yanchor)-j.y0:Ct(j.y0),r:Te}).style(Ie).classed("cursor-grab",!0),Ce.append("circle").attr({"data-line-point":"end-point",cx:De?mt(j.xanchor)+j.x1:mt(j.x1),cy:je?Ct(j.yanchor)-j.y1:Ct(j.y1),r:Te}).style(Ie).classed("cursor-grab",!0),Ce}():ee,Et={element:Qe.node(),gd:U,prepFn:function(ft){o(U)||(De&&(ce=mt(j.xanchor)),je&&(de=Ct(j.yanchor)),j.type==="path"?Se=j.path:(ne=De?j.x0:mt(j.x0),se=je?j.y0:Ct(j.y0),oe=De?j.x1:mt(j.x1),pe=je?j.y1:Ct(j.y1)),ne<oe?(we=ne,ke="x0",Ee=oe,be="x1"):(we=oe,ke="x1",Ee=ne,be="x0"),!je&&se<pe||je&&se>pe?(xe=se,fe="y0",_e=pe,ge="y1"):(xe=pe,fe="y1",_e=se,ge="y0"),Gt(ft),qe(J,j),function(Ce,Ie,Te){var Pe=Ie.xref,Ve=Ie.yref,tt=b.getFromId(Te,Pe),ot=b.getFromId(Te,Ve),at="";
1213Pe==="paper"||tt.autorange||(at+=Pe),Ve==="paper"||ot.autorange||(at+=Ve),i.setClipUrl(Ce,at?"clip"+Te._fullLayout._uid+at:null,Te)}(ee,j,U),Et.moveFn=Oe==="move"?Xt:Fe,Et.altKey=ft.altKey)},doneFn:function(){o(U)||(l(ee),wt(J),s(ee,U,j),m.call("_guiRelayout",U,re.getUpdateObj()))},clickFn:function(){o(U)||wt(J)}};function Gt(ft){if(o(U))Oe=null;else if(Je)Oe=ft.target.tagName==="path"?"move":ft.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Ce=Et.element.getBoundingClientRect(),Ie=Ce.right-Ce.left,Te=Ce.bottom-Ce.top,Pe=ft.clientX-Ce.left,Ve=ft.clientY-Ce.top,tt=!ze&&Ie>10&&Te>10&&!ft.shiftKey?d.getCursor(Pe/Ie,1-Ve/Te):"move";l(ee,tt),Oe=tt.split("-")[0]}}function Xt(ft,Ce){if(j.type==="path"){var Ie=function(Ve){return Ve},Te=Ie,Pe=Ie;De?Ue("xanchor",j.xanchor=Tt(ce+ft)):(Te=function(Ve){return Tt(mt(Ve)+ft)},Ge&&Ge.type==="date"&&(Te=u.encodeDate(Te))),je?Ue("yanchor",j.yanchor=nt(de+Ce)):(Pe=function(Ve){return nt(Ct(Ve)+Ce)},et&&et.type==="date"&&(Pe=u.encodeDate(Pe))),Ue("path",j.path=c(Se,Te,Pe))}else De?Ue("xanchor",j.xanchor=Tt(ce+ft)):(Ue("x0",j.x0=Tt(ne+ft)),Ue("x1",j.x1=Tt(oe+ft))),je?Ue("yanchor",j.yanchor=nt(de+Ce)):(Ue("y0",j.y0=nt(se+Ce)),Ue("y1",j.y1=nt(pe+Ce)));ee.attr("d",x(U,j)),qe(J,j)}function Fe(ft,Ce){if(ze){var Ie=function(Le){return Le},Te=Ie,Pe=Ie;De?Ue("xanchor",j.xanchor=Tt(ce+ft)):(Te=function(Le){return Tt(mt(Le)+ft)},Ge&&Ge.type==="date"&&(Te=u.encodeDate(Te))),je?Ue("yanchor",j.yanchor=nt(de+Ce)):(Pe=function(Le){return nt(Ct(Le)+Ce)},et&&et.type==="date"&&(Pe=u.encodeDate(Pe))),Ue("path",j.path=c(Se,Te,Pe))}else if(Je){if(Oe==="resize-over-start-point"){var Ve=ne+ft,tt=je?se-Ce:se+Ce;Ue("x0",j.x0=De?Ve:Tt(Ve)),Ue("y0",j.y0=je?tt:nt(tt))}else if(Oe==="resize-over-end-point"){var ot=oe+ft,at=je?pe-Ce:pe+Ce;Ue("x1",j.x1=De?ot:Tt(ot)),Ue("y1",j.y1=je?at:nt(at))}}else{var _t=function(Le){return Oe.indexOf(Le)!==-1},bt=_t("n"),jt=_t("s"),Nt=_t("w"),$e=_t("e"),yt=bt?xe+Ce:xe,Ot=jt?_e+Ce:_e,Mt=Nt?we+ft:we,Pt=$e?Ee+ft:Ee;je&&(bt&&(yt=xe-Ce),jt&&(Ot=_e-Ce)),(!je&&Ot-yt>10||je&&yt-Ot>10)&&(Ue(fe,j[fe]=je?yt:nt(yt)),Ue(ge,j[ge]=je?Ot:nt(Ot))),Pt-Mt>10&&(Ue(ke,j[ke]=De?Mt:Tt(Mt)),Ue(be,j[be]=De?Pt:Tt(Pt)))}ee.attr("d",x(U,j)),qe(J,j)}function qe(ft,Ce){(De||je)&&function(){var Ie=Ce.type!=="path",Te=ft.selectAll(".visual-cue").data([0]);Te.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var Pe=mt(De?Ce.xanchor:g.midRange(Ie?[Ce.x0,Ce.x1]:u.extractPathCoords(Ce.path,a.paramIsX))),Ve=Ct(je?Ce.yanchor:g.midRange(Ie?[Ce.y0,Ce.y1]:u.extractPathCoords(Ce.path,a.paramIsY)));if(Pe=u.roundPositionForSharpStrokeRendering(Pe,1),Ve=u.roundPositionForSharpStrokeRendering(Ve,1),De&&je){var tt="M"+(Pe-1-1)+","+(Ve-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Te.attr("d",tt)}else if(De){var ot="M"+(Pe-1-1)+","+(Ve-9-1)+"v18 h2 v-18 Z";Te.attr("d",ot)}else{var at="M"+(Pe-9-1)+","+(Ve-1-1)+"h18 v2 h-18 Z";Te.attr("d",at)}}()}function wt(ft){ft.selectAll(".visual-cue").remove()}d.init(Et),Qe.node().onmousemove=Gt}(_,Q,L,w,P,W):L.editable===!0&&Q.style("pointer-events",K||t.opacity(F)*D<=.5?"stroke":"all");Q.node().addEventListener("click",function(){return function(U,ee){if(!!h(U)){var j=+ee.node().getAttribute("data-index");if(j>=0){if(j===U._fullLayout._activeShapeIndex)return void T(U);U._fullLayout._activeShapeIndex=j,U._fullLayout._deactivateShape=T,f(U)}}}(_,Q)})}}function s(_,w,k){var L=(k.xref+k.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");i.setClipUrl(_,L?"clip"+w._fullLayout._uid+L:null,w)}function x(_,w){var k,L,A,I,P,S,E,D,F=w.type,H=b.getRefType(w.xref),V=b.getRefType(w.yref),Z=b.getFromId(_,w.xref),K=b.getFromId(_,w.yref),G=_._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 G.l+G.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 G.t+G.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(a.segmentRE,function(xe){var _e=0,we=xe.charAt(0),Ee=a.paramIsX[we],fe=a.paramIsY[we],ge=a.numParam
1213s[we],ke=xe.substr(1).replace(a.paramRE,function(be){return Ee[_e]?be=oe==="pixel"?re(ce)+Number(be):re(be):fe[_e]&&(be=pe==="pixel"?ne(de)-Number(be):ne(be)),++_e>ge&&(be="X"),be});return _e>ge&&(ke=ke.replace(/[\s,]*X.*/,""),g.log("Ignoring extra params in segment "+xe)),we+ke})}(w,L,I);if(w.xsizemode==="pixel"){var W=L(w.xanchor);P=W+w.x0,S=W+w.x1}else P=L(w.x0),S=L(w.x1);if(w.ysizemode==="pixel"){var Q=I(w.yanchor);E=Q-w.y0,D=Q-w.y1}else E=I(w.y0),D=I(w.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),ee=Math.abs(N-E),j="A"+U+","+ee,X=R+U+","+N;return"M"+X+j+" 0 1,1 "+(R+","+(N-ee))+j+" 0 0,1 "+X+"Z"}function c(_,w,k){return _.replace(a.segmentRE,function(L){var A=0,I=L.charAt(0),P=a.paramIsX[I],S=a.paramIsY[I],E=a.numParams[I];return I+L.substr(1).replace(a.paramRE,function(D){return A>=E||(P[A]?D=w(D):S[A]&&(D=k(D)),A++),D})})}function T(_){h(_)&&_._fullLayout._activeShapeIndex>=0&&(n(_),delete _._fullLayout._activeShapeIndex,f(_))}$.exports={draw:f,drawOne:p,eraseActiveShape:function(_){if(!!h(_)){n(_);var w=_._fullLayout._activeShapeIndex,k=(_.layout||{}).shapes||[];if(w<k.length){for(var L=[],A=0;A<k.length;A++)A!==w&&L.push(k[A]);delete _._fullLayout._activeShapeIndex,m.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(v,$,te){var m=v("../../drawing/attributes").dash,g=v("../../../lib/extend").extendFlat;$.exports={newshape:{line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:0,dflt:4,editType:"none"},dash:g({},m,{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(v,$,te){$.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(v,$,te){var m=v("../../color");$.exports=function(g,b,y){if(y("newshape.drawdirection"),y("newshape.layer"),y("newshape.fillcolor"),y("newshape.fillrule"),y("newshape.opacity"),y("newshape.line.width")){var e=(g||{}).plot_bgcolor||"#FFF";y("newshape.line.color",m.contrast(e)),y("newshape.line.dash")}y("activeshape.fillcolor"),y("activeshape.opacity")}},{"../../color":366}],454:[function(v,$,te){var m=v("../../dragelement"),g=v("../../dragelement/helpers").drawMode,b=v("../../../registry"),y=v("./constants"),e=y.i000,n=y.i090,t=y.i180,i=y.i270,r=v("../../../plots/cartesian/handle_outline").clearOutlineControllers,d=v("./helpers"),l=d.pointsShapeRectangle,a=d.pointsShapeEllipse,u=d.writePaths,f=v("./newshapes");$.exports=function o(h,p,s,x){x||(x=0);var c=s.gd;function T(){o(h,p,s,x++),a(h[0])&&_({redrawing:!0})}function _(W){s.isActiveShape=!1;var Q=f(p,s);Object.keys(Q).length&&b.call((W||{}).redrawing?"relayout":"_guiRelayout",c,Q)}var w,k,L,A,I,P=s.isActiveShape,S=c._fullLayout._zoomlayer,E=s.dragmode;g(E)?c._fullLayout._drawing=!0:c._fullLayout._activeShapeIndex>=0&&r(c),p.attr("d",u(h)),P&&!x&&(I=function(W,Q){for(var R=0;R<Q.length;R++){var N=Q[R];W[R]=[];for(var U=0;U<N.length;U++){W[R][U]=[];for(var ee=0;ee<N[U].length;ee++)W[R][U][ee]=N[U][ee]}}return W}([],h),function(W){w=[];for(var Q=0;Q<h.length;Q++){var R=h[Q],N=!l(R)&&a(R);w[Q]=[];for(var U=0;U<R.length;U++)if(R[U][0]!=="Z"&&(!N||U===e||U===n||U===t||U===i)){var ee=R[U][1],j=R[U][2],X=W.append("circle").classed("cursor-grab",!0).attr("data-i",Q).attr("data-j",U).attr("cx",ee).attr("cy",j).attr("r",4).style({"mix-blend-mode":"luminosity",fill:"black",stroke:"white","stroke-width":1});w[Q][U]={element:X.node(),gd:c,prepFn:D,doneFn:H,clickFn:V},m.init(w[Q][U])}}}(S.append("g").attr("class","outline-controllers")),function(){k=[],h.length&&(k[0]={element:p[0][0],gd:c,prepFn:K,doneFn:G},m.init(k[0]))}());function D(W){L=+W.srcElement.getAttribute("data-i"),A=+W.srcElement.getAttribute("data-j"),w[L][A].moveFn=F}function F(W,Q){if(h.length){var R=I[L][A][1],N=I[L][A][2],U=h[L],ee=U.length;if(l(U)){for(var j=0;j<ee;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+Q)}if(U[A][1]=R+W,U[A][2]=N+Q,!l(U))for(var J=0;J<ee;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+Q;T()}}function H(){_()}function V(W,Q){if(W===2){L=+Q.srcElement.getAttribute("data-i"),A=+Q.srcElement.getAttribute("data-j");var R=h[L];l(R)||a(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,T(),_())}}()}}
1213function Z(W,Q){(function(R,N){if(h.length)for(var U=0;U<h.length;U++)for(var ee=0;ee<h[U].length;ee++)for(var j=0;j+2<h[U][ee].length;j+=2)h[U][ee][j+1]=I[U][ee][j+1]+R,h[U][ee][j+2]=I[U][ee][j+2]+N})(W,Q),T()}function K(W){(L=+W.srcElement.getAttribute("data-i"))||(L=0),k[L].moveFn=Z}function G(){_()}}},{"../../../plots/cartesian/handle_outline":565,"../../../registry":638,"../../dragelement":385,"../../dragelement/helpers":384,"./constants":452,"./helpers":455,"./newshapes":456}],455:[function(v,$,te){var m=v("parse-svg-path"),g=v("./constants"),b=g.CIRCLE_SIDES,y=g.SQRT2,e=v("../../../plots/cartesian/helpers"),n=e.p2r,t=e.r2p,i=[0,3,4,5,6,1,2],r=[0,3,4,1,2];function d(a,u){return Math.abs(a-u)<=1e-6}function l(a,u){var f=u[1]-a[1],o=u[2]-a[2];return Math.sqrt(f*f+o*o)}te.writePaths=function(a){var u=a.length;if(!u)return"M0,0Z";for(var f="",o=0;o<u;o++)for(var h=a[o].length,p=0;p<h;p++){var s=a[o][p][0];if(s==="Z")f+="Z";else for(var x=a[o][p].length,c=0;c<x;c++){var T=c;s==="Q"||s==="S"?T=r[c]:s==="C"&&(T=i[c]),f+=a[o][p][T],c>0&&c<x-1&&(f+=",")}}return f},te.readPaths=function(a,u,f,o){var h,p,s,x=m(a),c=[],T=-1,_=0,w=0,k=function(){p=_,s=w};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":T++,c[T]=[],_=+x[L][1],w=+x[L][2],E.push([F,_,w]),k();break;case"Q":case"S":A=+x[L][1],P=+x[L][2],_=+x[L][3],w=+x[L][4],E.push([F,_,w,A,P]);break;case"C":A=+x[L][1],P=+x[L][2],I=+x[L][3],S=+x[L][4],_=+x[L][5],w=+x[L][6],E.push([F,_,w,A,P,I,S]);break;case"T":case"L":_=+x[L][1],w=+x[L][2],E.push([F,_,w]);break;case"H":F="L",_=+x[L][1],E.push([F,_,w]);break;case"V":F="L",w=+x[L][1],E.push([F,_,w]);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=w;for(h=1;h<=b/2;h++){var G=2*Math.PI*h/b;E.push([F,Z+H*Math.cos(G),K+V*Math.sin(G)])}break;case"Z":_===p&&w===s||(_=p,w=s,E.push([F,_,w]))}for(var W=(f||{}).domain,Q=u._fullLayout._size,R=f&&f.xsizemode==="pixel",N=f&&f.ysizemode==="pixel",U=o===!1,ee=0;ee<E.length;ee++){for(h=0;h+2<7;h+=2){var j=E[ee][h+1],X=E[ee][h+2];j!==void 0&&X!==void 0&&(_=j,w=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-=Q.l),W?j=W.x[0]+j/Q.w:j/=Q.w),f.yaxis&&f.yaxis.p2r?(U&&(X-=f.yaxis._offset),X=N?t(f.yaxis,f.yanchor)-X:n(f.yaxis,X)):(U&&(X-=Q.t),X=W?W.y[1]-X/Q.h:1-X/Q.h)),E[ee][h+1]=j,E[ee][h+2]=X)}c[T].push(E[ee].slice())}}return c},te.pointsShapeRectangle=function(a){if(a.length!==5)return!1;for(var u=1;u<3;u++)if(!d(a[0][u]-a[1][u],a[3][u]-a[2][u])||!d(a[0][u]-a[3][u],a[1][u]-a[2][u]))return!1;return!(!d(a[0][1],a[1][1])&&!d(a[0][1],a[3][1]))&&!!(l(a[0],a[1])*l(a[0],a[3]))},te.pointsShapeEllipse=function(a){var u=a.length;if(u!==b+1)return!1;u=b;for(var f=0;f<u;f++){var o=(2*u-f)%u,h=(u/2+o)%u,p=(u/2+f)%u;if(!d(l(a[f],a[p]),l(a[o],a[h])))return!1}return!0},te.handleEllipse=function(a,u,f){if(!a)return[u,f];var o=te.ellipseOver({x0:u[0],y0:u[1],x1:f[0],y1:f[1]}),h=(o.x1+o.x0)/2,p=(o.y1+o.y0)/2,s=(o.x1-o.x0)/2,x=(o.y1-o.y0)/2;s||(s=x/=y),x||(x=s/=y);for(var c=[],T=0;T<b;T++){var _=2*T*Math.PI/b;c.push([h+s*Math.cos(_),p+x*Math.sin(_)])}return c},te.ellipseOver=function(a){var u=a.x0,f=a.y0,o=a.x1,h=a.y1,p=o-u,s=h-f,x=((u-=p)+o)/2,c=((f-=s)+h)/2;return{x0:x-(p*=y),y0:c-(s*=y),x1:x+p,y1:c+s}}},{"../../../plots/cartesian/helpers":566,"./constants":452,"parse-svg-path":250}],456:[function(v,$,te){var m=v("../../dragelement/helpers"),g=m.drawMode,b=m.openMode,y=v("./constants"),e=y.i000,n=y.i090,t=y.i180,i=y.i270,r=y.cos45,d=y.sin45,l=v("../../../plots/cartesian/helpers"),a=l.p2r,u=l.r2p,f=v("../../../plots/cartesian/handle_outline").clearSelect,o=v("./helpers"),h=o.readPaths,p=o.writePaths,s=o.ellipseOver;$.exports=function(x,c){if(x.length){var T=x[0][0];if(T){var _=T.getAttribute("d"),w=c.gd,k=w._fullLayout.newshape,L=c.plotinfo,A=L.xaxis,I=L.yaxis,P=!!L.domain||!L.xaxis,S=!!L.domain||!L.yaxis,E=c.isActiveShape,D=c.dragmode,F=(w.layout||{}).shapes||[];if(!g(D)&&E!==void 0){var H=w._fullLayout._activeShapeIndex;if(H<F.length)switch(w._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),G=h(_,w,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),G.length===1&&(Z=G[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 Q=Z[e][1],R=Z[n][1],N=Z[t][1],U=Z[i][1],ee=Z[e][2],j=Z[n][2],X=Z[t][2],J=Z[i][2],re=L.xaxis&&(L.xaxis.type==="date"||L.xaxis.type==="log"),ne=L.yaxis&&(L.yaxis.type==="date"||L.yaxis.type==="log");re&&(Q=u(L.xaxis,Q),R=u(L.xaxis,R),N=u(L.xaxis,N),U=u(L.xaxis,U)),ne&&(ee=u(L.yaxis,ee),j=u(L.yaxis,j),X=u(L.yaxis,X),J=u(L.yaxis,J));var se=(R+U)/2,oe=(ee+X)/2,pe=s({x0:se,y0:oe,x1:se+(U-R+N-Q)/2*r,y1:oe+(J-j+X-ee)/2*d});re&&(pe.x0=a(L.xaxis,pe.x0),pe.x1=a(L.xaxis,pe.x1)),ne&&(pe.y0=a(L.yaxis,pe.y0),pe.y1=a(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,ge,ke){var be=ge.type==="date",Se=ke.type==="date";if(!be&&!Se)return fe;for(var Oe=0;Oe<fe.length;Oe++)for(var De=0;De<fe[Oe].length;De++)for(var je=0;je+2<fe[Oe][De].length;je+=2)be&&(fe[Oe][De][je+1]=fe[Oe][De][je+1].replace(" ","_")),Se&&(fe[Oe][De][je+2]=fe[Oe][De][je+2].replace(" ","_"))}(G,A,I),W.path=p(G),Z=null;f(w);for(var ce=c.editHelpers,de=(ce||{}).modifyItem,xe=[],_e=0;_e<F.length;_e++){var we=w._fullLayout.shapes[_e];if(xe[_e]=we._input,E!==void 0&&_e===w._fullLayout._activeShapeIndex){var Ee=W;switch(we.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(v,$,te){var m=v("./constants"),g=v("../../lib");te.rangeToShapePosition=function(b){return b.type==="log"?b.r2d:function(y){return y}},te.shapePositionToRange=function(b){return b.type==="log"?b.d2r:function(y){return y}},te.decodeDate=function(b){return function(y){return y.replace&&(y=y.replace("_"," ")),b(y)}},te.encodeDate=function(b){return function(y){return b(y).replace(" ","_")}},te.extractPathCoords=function(b,y){var e=[];
1213return b.match(m.segmentRE).forEach(function(n){var t=y[n.charAt(0)].drawn;if(t!==void 0){var i=n.substr(1).match(m.paramRE);!i||i.length<t||e.push(g.cleanNumber(i[t]))}}),e},te.getDataToPixel=function(b,y,e,n){var t,i=b._fullLayout._size;if(y)if(n==="domain")t=function(d){return y._length*(e?1-d:d)+y._offset};else{var r=te.shapePositionToRange(y);t=function(d){return y._offset+y.r2p(r(d,!0))},y.type==="date"&&(t=te.decodeDate(t))}else t=e?function(d){return i.t+i.h*(1-d)}:function(d){return i.l+i.w*d};return t},te.getPixelToData=function(b,y,e,n){var t,i=b._fullLayout._size;if(y)if(n==="domain")t=function(d){var l=(d-y._offset)/y._length;return e?1-l:l};else{var r=te.rangeToShapePosition(y);t=function(d){return r(y.p2r(d-y._offset))}}else t=e?function(d){return 1-(d-i.t)/i.h}:function(d){return(d-i.l)/i.w};return t},te.roundPositionForSharpStrokeRendering=function(b,y){var e=Math.round(y%2)===1,n=Math.round(b);return e?n+.5:n},te.makeOptionsAndPlotinfo=function(b,y){var e=b._fullLayout.shapes[y]||{},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(v,$,te){var m=v("./draw");$.exports={moduleType:"component",name:"shapes",layoutAttributes:v("./attributes"),supplyLayoutDefaults:v("./defaults"),supplyDrawNewShapeDefaults:v("./draw_newshape/defaults"),includeBasePlot:v("../../plots/cartesian/include_components")("shapes"),calcAutorange:v("./calc_autorange"),draw:m.draw,drawOne:m.drawOne}},{"../../plots/cartesian/include_components":567,"./attributes":446,"./calc_autorange":447,"./defaults":449,"./draw":450,"./draw_newshape/defaults":453}],459:[function(v,$,te){var m=v("../../plots/font_attributes"),g=v("../../plots/pad_attributes"),b=v("../../lib/extend").extendDeepAll,y=v("../../plot_api/edit_types").overrideAll,e=v("../../plots/animation_attributes"),n=v("../../plot_api/plot_template").templatedArray,t=v("./constants"),i=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}});$.exports=y(n("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:i,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(g({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:m({})},font:m({}),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(v,$,te){$.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(v,$,te){var m=v("../../lib"),g=v("../../plots/array_container_defaults"),b=v("./attributes"),y=v("./constants").name,e=b.steps;function n(i,r,d){function l(h,p){return m.coerce(i,r,b,h,p)}for(var a=g(i,r,{name:"steps",handleItemDefaults:t}),u=0,f=0;f<a.length;f++)a[f].visible&&u++;if(u<2?r.visible=!1:l("visible")){r._stepCount=u;var o=r._visibleSteps=m.filterVisible(a);(a[l("active")]||{}).visible||(r.active=o[0]._index),l("x"),l("y"),m.noneOrAll(i,r,["x","y"]),l("xanchor"),l("yanchor"),l("len"),l("lenmode"),l("pad.t"),l("pad.r"),l("pad.b"),l("pad.l"),m.coerceFont(l,"font",d.font),l("currentvalue.visible")&&(l("currentvalue.xanchor"),l("currentvalue.prefix"),l("currentvalue.suffix"),l("currentvalue.offset"),m.coerceFont(l,"currentvalue.font",r.font)),l("transition.duration"),l("transition.easing"),l("bgcolor"),l("activebgcolor"),l("bordercolor"),l("borderwidth"),l("ticklen"),l("tickwidth"),l("tickcolor"),l("minorticklen")}}function t(i,r){function d(a,u){return m.coerce(i,r,e,a,u)}if(i.method==="skip"||Array.isArray(i.args)?d("visible"):r.visible=!1){d("method"),d("args");var l=d("label","step-"+r._index);d("value",l),d("execute")}}$.exports=function(i,r){g(i,r,{name:y,handleItemDefaults:n})}},{"../../lib":503,"../../plots/array_container_defaults":549,"./attributes":459,"./constants":460}],462:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../plots/plots"),b=v("../color"),y=v("../drawing"),e=v("../../lib"),n=e.strTranslate,t=v("../../lib/svg_text_utils"),i=v("../../plot_api/plot_template").arrayEditor,r=v("./constants"),d=v("../../constants/alignment"),l=d.LINE_SPACING,a=d.FROM_TL,u=d.FROM_BR;function f(E){return r.autoMarginIdRoot+E._index}function o(E){return E._index}function h(E,D){var F=y.tester.selectAll("g."+r.labelGroupClass).data(D._visibleSteps);F.enter().append("g").classed(r.labelGroupClass,!0);var H=0,V=0;F.each(function(ee){var j=x(m.select(this),{step:ee},D).node();if(j){var X=y.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 G=(Z.inputAreaLength-2*r.stepInset)/(D._stepCount-1),W=H+r.labelPadding;if(Z.labelStride=Math.max(1,Math.ceil(W/G)),Z.labelHeight=V,Z.currentValueMaxWidth=0,Z.currentValueHeight=0,Z.currentValueTotalHeight=0,Z.currentValueMaxLines=1,D.currentvalue.visible){var Q=y.tester.append("g");F.each(function(ee){var j=p(Q,D,ee.label),X=j.node()&&y.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,Q.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*a[N]};D.lenmode==="fraction"?(U.l=0,U.xl=D.x-D.len*a[R],U.r=0,U.xr=D.x+D.len*u[R]):(U.x=D.x,U.l=Z.outerLength*a[R],U.r=Z.outerLength*u[R]),g.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})}),G=D.currentvalue.prefix?D.currentvalue.prefix:"";if(typeof F=="string")G+=F;else{var W=D.steps[D.active].label,Q=D._gd._fullLayout._meta;Q&&(W=e.templateString(W,Q)),G+=W}D.currentvalue.suffix&&(G+=D.currentvalue.suffix),K.call(y.font,D.currentvalue.font).text(G).call(t.convertToTspans,D._gd);var R=t.lineCount(K),N=(Z.currentValueMaxLines+1-R)*D.currentvalue.font.size*l;return t.positionText(K,H,N),K}}function s(E,D,F){e.ensureSingle(E,"rect",r.gripRectClass,function(H){H.call(w,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(y.font,F.font).text(V).call(t.convertToTspans,F._gd),H}function c(E,D){var F=e.ensureSingle(E,"g",r.labelsClass),H=D._dims,V=F.selectAll("g."+r.labelGroupClass).data(H.labelSteps);
vendor: 4,496 bytes, line 1213
1213V.enter().append("g").classed(r.labelGroupClass,!0),V.exit().remove(),V.each(function(Z){var K=m.select(this);K.call(x,Z,D),y.setTranslate(K,A(D,Z.fraction),r.tickOffset+D.ticklen+D.font.size*l+r.labelOffset+H.currentValueTotalHeight)})}function T(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,i(E.layout,r.name,F).applyUpdate("active",H);var G=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}),G&&G.method&&V&&(D._nextMethod?(D._nextMethod.step=G,D._nextMethod.doCallback=V,D._nextMethod.doTransition=Z):(D._nextMethod={step:G,doCallback:V,doTransition:Z},D._nextMethodRaf=window.requestAnimationFrame(function(){var W=D._nextMethod.step;W.method&&(W.execute&&g.executeAPICommand(E,W.method,W.args),D._nextMethod=null,D._nextMethodRaf=null)})))}function w(E,D,F){var H=F.node(),V=m.select(D);function Z(){return F.data()[0]}function K(){var G=Z();D.emit("plotly_sliderstart",{slider:G});var W=F.select("."+r.gripRectClass);m.event.stopPropagation(),m.event.preventDefault(),W.call(b.fill,G.activebgcolor);var Q=I(G,m.mouse(H)[0]);function R(){var U=Z(),ee=I(U,m.mouse(H)[0]);T(D,F,U,ee,!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]})}T(D,F,G,Q,!0),G._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,G=m.select(this);G.attr({height:K?D.ticklen:D.minorticklen}).call(b.fill,D.tickcolor),y.setTranslate(G,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 G=H;F&&D.transition.duration>0&&(G=G.transition().duration(D.transition.duration).ease(D.transition.easing)),G.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(w,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),y.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"),y.setTranslate(V,r.railInset,.5*(F.inputAreaWidth-r.railWidth)+F.currentValueTotalHeight)}$.exports=function(E){var D=E._fullLayout,F=function(W,Q){for(var R=W[r.name],N=[],U=0;U<R.length;U++){var ee=R[U];ee.visible&&(ee._gd=Q,N.push(ee))}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),g.autoMargin(E,f(W))}if(H.enter().append("g").classed(r.containerClassName,!0).style("cursor","ew-resize"),H.exit().each(function(){m.select(this).selectAll("g."+r.groupClassName).each(V)}).remove(),F.length!==0){var Z=H.selectAll("g."+r.groupClassName).data(F,o);Z.enter().append("g").classed(r.groupClassName,!0),Z.exit().each(V).remove();for(var K=0;K<F.length;K++){var G=F[K];h(E,G)}Z.each(function(W){var Q=m.select(this);(function(R){var N=R._dims;N.labelSteps=[];for(var U=R._stepCount,ee=0;ee<U;ee+=N.labelStride)N.labelSteps.push({fraction:ee/(U-1),step:R._visibleSteps[ee]})})(W),g.manageCommandObserver(E,W,W._visibleSteps,function(R){var N=Q.data()[0];
1213N.active!==R.index&&(N._dragging||_(E,Q,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(c,U).call(k,U).call(P,R,U).call(s,R,U);var ee=U._dims;y.setTranslate(N,ee.lx+U.pad.l,ee.ly+U.pad.t),N.call(L,U,!1),N.call(p,U)}(E,m.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(v,$,te){var m=v("./constants");$.exports={moduleType:"component",name:m.name,layoutAttributes:v("./attributes"),supplyLayoutDefaults:v("./defaults"),draw:v("./draw")}},{"./attributes":459,"./constants":460,"./defaults":461,"./draw":462}],464:[function(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("../../plots/plots"),y=v("../../registry"),e=v("../../lib"),n=e.strTranslate,t=v("../drawing"),i=v("../color"),r=v("../../lib/svg_text_utils"),d=v("../../constants/interactions"),l=v("../../constants/alignment").OPPOSITE_SIDE,a=/ [XY][0-9]* /;$.exports={draw:function(u,f,o){var h,p=o.propContainer,s=o.propName,x=o.placeholder,c=o.traceIndex,T=o.avoid||{},_=o.attributes,w=o.transform,k=o.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;s==="title.text"?h="titleText":s.indexOf("axis")!==-1?h="axisTitleText":s.indexOf(!0)&&(h="colorbarTitleText");var V=u._context.edits[h];S===""?A=0:S.replace(a," % ")===x.replace(a," % ")&&(A=.2,I=!0,V||(S="")),o._meta?S=e.templateString(S,o._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 G=k.selectAll("text").data(K?[0]:[]);if(G.enter().append("text"),G.text(S).attr("class",f),G.exit().remove(),!K)return k;function W(N){e.syncOrAsync([Q,R],N)}function Q(N){var U;return!w&&Z&&(w={}),w?(U="",w.rotate&&(U+="rotate("+[w.rotate,_.x,_.y]+")"),(w.offset||Z)&&(U+=n(0,(w.offset||0)-(Z||0)))):U=null,N.attr("transform",U),N.style({"font-family":D,"font-size":m.round(F,2)+"px",fill:i.rgb(H),opacity:A*i.opacity(H),"font-weight":b.fontWeight}).attr(_).call(r.convertToTspans,u),b.previousPromises(u)}function R(N){var U=m.select(N.node().parentNode);if(T&&T.selection&&T.side&&S){U.attr("transform",null);var ee=l[T.side],j=T.side==="left"||T.side==="top"?-1:1,X=g(T.pad)?T.pad:2,J=t.bBox(U.node()),re={left:0,top:0,right:L.width,bottom:L.height},ne=T.maxShift||j*(re[T.side]-J[T.side]),se=0;if(ne<0)se=ne;else{var oe=T.offsetLeft||0,pe=T.offsetTop||0;J.left-=oe,J.right-=oe,J.top-=pe,J.bottom-=pe,T.selection.each(function(){var de=t.bBox(this);e.bBoxIntersect(J,de,X)&&(se=Math.max(se,j*(de[T.side]-J[ee])+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]}[T.side];U.attr("transform",n(ce[0],ce[1]))}}}return G.call(W),V&&(S?G.on(".opacity",null):(A=0,I=!0,G.text(x).on("mouseover.opacity",function(){m.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){m.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)})),G.call(r.makeEditable,{gd:u}).on("edit",function(N){c!==void 0?y.call("_guiRestyle",u,s,N,c):y.call("_guiRelayout",u,s,N)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(W)}).on("input",function(N){this.text(N||" ").call(r.positionText,_.x,_.y)})),G.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(v,$,te){var m=v("../../plots/font_attributes"),g=v("../color/attributes"),b=v("../../lib/extend").extendFlat,y=v("../../plot_api/edit_types").overrideAll,e=v("../../plots/pad_attributes"),n=v("../../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}});$.exports=y(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:m({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:g.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(v,$,te){$.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:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}},{}],467:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/array_container_defaults"),b=v("./attributes"),y=v("./constants").name,e=b.buttons;function n(i,r,d){function l(a,u){return m.coerce(i,r,b,a,u)}l("visible",g(i,r,{name:"buttons",handleItemDefaults:t}).length>0)&&(l("active"),l("direction"),l("type"),l("showactive"),l("x"),l("y"),m.noneOrAll(i,r,["x","y"]),l("xanchor"),l("yanchor"),l("pad.t"),l("pad.r"),l("pad.b"),l("pad.l"),m.coerceFont(l,"font",d.font),l("bgcolor",d.paper_bgcolor),l("bordercolor"),l("borderwidth"))}function t(i,r){function d(l,a){return m.coerce(i,r,e,l,a)}
vendor: 5,804 bytes, line 1213
1213d("visible",i.method==="skip"||Array.isArray(i.args))&&(d("method"),d("args"),d("args2"),d("label"),d("execute"))}$.exports=function(i,r){g(i,r,{name:y,handleItemDefaults:n})}},{"../../lib":503,"../../plots/array_container_defaults":549,"./attributes":465,"./constants":466}],468:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../plots/plots"),b=v("../color"),y=v("../drawing"),e=v("../../lib"),n=v("../../lib/svg_text_utils"),t=v("../../plot_api/plot_template").arrayEditor,i=v("../../constants/alignment").LINE_SPACING,r=v("./constants"),d=v("./scrollbox");function l(A){return A._index}function a(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"?o(A,S,null,null,I):I.type==="dropdown"&&(E.attr(r.menuIndexAttrName,"-1"),f(A,S,E,D,I),H||o(A,S,E,D,I))}function f(A,I,P,S,E){var D=e.ensureSingle(I,"g",r.headerClassName,function(G){G.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(G){G.attr("text-anchor","end").call(y.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(a(P,E)?-1:E._index)),o(A,I,P,S,E)}),D.on("mouseover",function(){D.call(c)}),D.on("mouseout",function(){D.call(T,E)}),y.setTranslate(I,F.lx,F.ly)}function o(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,G=0,W=E._dims,Q=["up","down"].indexOf(E.direction)!==-1;E.type==="dropdown"&&(Q?G=W.headerHeight+r.gapButtonHeader:K=W.headerWidth+r.gapButtonHeader),E.type==="dropdown"&&E.direction==="up"&&(G=-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+G+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,ee){var j=m.select(this);j.call(h,E,U,A).call(k,E,R),j.on("click",function(){m.event.defaultPrevented||(U.execute&&(U.args2&&E.active===ee?(u(A,E,0,I,P,S,-1),g.executeAPICommand(A,U.method,U.args2)):(u(A,E,0,I,P,S,ee),g.executeAPICommand(A,U.method,U.args))),A.emit("plotly_buttonclicked",{menu:E,button:U,active:E.active}))}),j.on("mouseover",function(){j.call(c)}),j.on("mouseout",function(){j.call(T,E),H.call(x,E)})}),H.call(x,E),Q?(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,ee,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 ee=!!U.hbar,j=!!U.vbar;ee&&U.hbar.transition().attr("opacity","0").each("end",function(){ee=!1,j||U.disable()}),j&&U.vbar.transition().attr("opacity","0").each("end",function(){j=!1,ee||U.disable()})}(S))}function h(A,I,P,S){A.call(p,I).call(s,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 s(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(y.font,I.font).text(D).call(n.convertToTspans,S)}function x(A,I){var P=I.active;A.each(function(S,E){var D=m.select(this);E===P&&I.showactive&&D.select("rect."+r.itemRectClassName).call(b.fill,r.activeColor)})}function c(A){A.select("rect."+r.itemRectClassName).call(b.fill,r.hoverColor)}function T(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=y.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,G){var W=m.select(this);W.call(h,I,K,A);var Q=W.select("."+r.itemTextClassName),R=Q.node()&&y.bBox(Q.node()).width,N=Math.max(R+r.textPadX,r.minWidth),U=I.font.size*i,ee=n.lineCount(Q),j=Math.max(U*ee,r.minHeight)+r.textOffsetY;j=Math.ceil(j),N=Math.ceil(N),P.widths[G]=N,P.heights[G]=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),g.autoMargin(A,w(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 w(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;y.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 G=I.font.size*i,W=(n.lineCount(D)-1)*G/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()}$.exports=function(A){var I=A._fullLayout,P=e.filterVisible(I[r.name]);function S(G){g.autoMargin(A,w(G))}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(){m.select(this).selectAll("g."+r.headerGroupClassName).each(S)}).remove(),P.length!==0){var D=E.selectAll("g."+r.headerGroupClassName).data(P,l);D.enter().append("g").classed(r.headerGroupClassName,!0);for(var F=e.ensureSingle(E,"g",r.dropdownButtonGroupClassName,function(G){G.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(G){F.call(L),S(G)}).remove(),D.each(function(G){var W=m.select(this),Q=G.type==="dropdown"?F:null;g.manageCommandObserver(A,G,G.buttons,function(R){u(A,G,G.buttons[R.index],W,Q,K,R.index,!0)}),G.type==="dropdown"?(f(A,W,F,K,G),a(F,G)&&o(A,W,F,K,G)):o(A,W,null,null,G)})}}},{"../../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(v,$,te){arguments[4][463][0].apply(te,arguments)},{"./attributes":465,"./constants":466,"./defaults":467,"./draw":468,dup:463}],470:[function(v,$,te){$.exports=e;var m=v("@plotly/d3"),g=v("../color"),b=v("../drawing"),y=v("../../lib");function e(n,t,i){this.gd=n,this.container=t,this.id=i,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,i){var r=this.gd._fullLayout,d=r.width,l=r.height;this.position=n;var a,u,f,o,h=this.position.l,p=this.position.w,s=this.position.t,x=this.position.h,c=this.position.direction,T=c==="down",_=c==="left",w=c==="up",k=p,L=x;T||_||c==="right"||w||(this.position.direction="down",T=!0),T||w?(u=(a=h)+k,T?(f=s,L=(o=Math.min(f+L,l))-f):L=(o=s+L)-(f=Math.max(o-L,0))):(o=(f=s)+L,_?k=(u=h+k)-(a=Math.max(u-k,0)):(a=h,k=(u=Math.min(a+k,d))-a)),this._box={l:a,t:f,w:k,h:L};var A=p>k,I=e.barLength+2*e.barPad,P=e.barWidth+2*e.barPad,S=h,E=s+x;E+P>l&&(E=l-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(g.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=s;Z+H>d&&(Z=d-H);
1213var G=this.container.selectAll("rect.scrollbar-vertical").data(F?[0]:[]);G.exit().on(".drag",null).remove(),G.enter().append("rect").classed("scrollbar-vertical",!0).call(g.fill,e.barColor),F?(this.vbar=G.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,Q=a-.5,R=F?u+H+.5:u+.5,N=f-.5,U=A?o+P+.5:o+.5,ee=r._topdefs.selectAll("#"+W).data(A||F?[0]:[]);if(ee.exit().remove(),ee.enter().append("clipPath").attr("id",W).append("rect"),A||F?(this._clipRect=ee.select("rect").attr({x:Math.floor(Q),y:Math.floor(N),width:Math.ceil(R)-Math.floor(Q),height:Math.ceil(U)-Math.floor(N)}),this.container.call(b.setClipUrl,W,this.gd),this.bg.attr({x:h,y:s,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=m.behavior.drag().on("dragstart",function(){m.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=m.behavior.drag().on("dragstart",function(){m.event.sourceEvent.preventDefault(),m.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,i)},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-=m.event.dx),this.vbar&&(t-=m.event.dy),this.setTranslate(n,t)},e.prototype._onBoxWheel=function(){var n=this.translateX,t=this.translateY;this.hbar&&(n+=m.event.deltaY),this.vbar&&(t+=m.event.deltaY),this.setTranslate(n,t)},e.prototype._onBarDrag=function(){var n=this.translateX,t=this.translateY;if(this.hbar){var i=n+this._hbarXMin,r=i+this._hbarTranslateMax;n=(y.constrain(m.event.x,i,r)-i)/(r-i)*(this.position.w-this._box.w)}if(this.vbar){var d=t+this._vbarYMin,l=d+this._vbarTranslateMax;t=(y.constrain(m.event.y,d,l)-d)/(l-d)*(this.position.h-this._box.h)}this.setTranslate(n,t)},e.prototype.setTranslate=function(n,t){var i=this.position.w-this._box.w,r=this.position.h-this._box.h;if(n=y.constrain(n||0,0,i),t=y.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/i;this.hbar.call(b.setTranslate,n+d*this._hbarTranslateMax,t)}if(this.vbar){var l=t/r;this.vbar.call(b.setTranslate,n,t+l*this._vbarTranslateMax)}}},{"../../lib":503,"../color":366,"../drawing":388,"@plotly/d3":58}],471:[function(v,$,te){$.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(v,$,te){$.exports={axisRefDescription:function(m,g,b){return["If set to a",m,"axis id (e.g. *"+m+"* or","*"+m+"2*), the `"+m+"` position refers to a",m,"coordinate. If set to *paper*, the `"+m+"`","position refers to the distance from the",g,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",g,"("+b+"). If set to a",m,"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",g,"of the domain of that axis: e.g.,","*"+m+"2 domain* refers to the domain of the second",m," axis and a",m,"position of 0.5 refers to the","point between the",g,"and the",b,"of the domain of the","second",m,"axis."].join(" ")}}},{}],473:[function(v,$,te){$.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}},{}],474:[function(v,$,te){$.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(v,$,te){$.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],476:[function(v,$,te){$.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(v,$,te){$.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}},{}],478:[function(v,$,te){$.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(v,$,te){$.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:"\u2212"}},{}],480:[function(v,$,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(v,$,te){te.version=v("./version").version,v("native-promise-only"),v("../build/plotcss");for(var m=v("./registry"),g=te.register=m.register,b=v("./plot_api"),y=Object.keys(b),e=0;e<y.length;e++){var n=y[e];n.charAt(0)!=="_"&&(te[n]=b[n]),g({moduleType:"apiMethod",name:n,fn:b[n]})}g(v("./traces/scatter")),g([v("./components/legend"),v("./components/fx"),v("./components/annotations"),v("./components/annotations3d"),v("./components/shapes"),v("./components/images"),v("./components/updatemenus"),v("./components/sliders"),v("./components/rangeslider"),v("./components/rangeselector"),v("./components/grid"),v("./components/errorbars"),v("./components/colorscale"),v("./components/colorbar"),v("./components/modebar")]),g([v("./locale-en"),v("./locale-en-us")]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(g(window.PlotlyLocales),delete window.PlotlyLocales),te.Icons=v("./fonts/ploticon");var t=v("./components/fx"),i=v("./plots/plots");te.Plots={resize:i.resize,graphJson:i.graphJson,sendDataToCloud:i.sendDataToCloud},te.Fx={hover:t.hover,unhover:t.unhover,loneHover:t.loneHover,loneUnhover:t.loneUnhover},te.Snapshot=v("./snapshot"),te.PlotSchema=v("./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":939,"./version":1123,"native-promise-only":245}],482:[function(v,$,te){$.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(v,$,te){te.isLeftAnchor=function(m){return m.xanchor==="left"||m.xanchor==="auto"&&m.x<=1/3},te.isCenterAnchor=function(m){return m.xanchor==="center"||m.xanchor==="auto"&&m.x>1/3&&m.x<2/3},te.isRightAnchor=function(m){return m.xanchor==="right"||m.xanchor==="auto"&&m.x>=2/3},te.isTopAnchor=function(m){return m.yanchor==="top"||m.yanchor==="auto"&&m.y>=2/3},te.isMiddleAnchor=function(m){return m.yanchor==="middle"||m.yanchor==="auto"&&m.y>1/3&&m.y<2/3},te.isBottomAnchor=function(m){return m.yanchor==="bottom"||m.yanchor==="auto"&&m.y<=1/3}},{}],484:[function(v,$,te){var m=v("./mod"),g=m.mod,b=m.modHalf,y=Math.PI,e=2*y;function n(d){return Math.abs(d[1]-d[0])>e-1e-14}function t(d,l){return b(l-d,e)}function i(d,l){if(n(l))return!0;var a,u;l[0]<l[1]?(a=l[0],u=l[1]):(a=l[1],u=l[0]),(a=g(a,e))>(u=g(u,e))&&(u+=e);var f=g(d,e),o=f+e;return f>=a&&f<=u||o>=a&&o<=u}function r(d,l,a,u,f,o,h){f=f||0,o=o||0;var p,s,x,c,T,_=n([a,u]);function w(I,P){return[I*Math.cos(P)+f,o-I*Math.sin(P)]}_?(p=0,s=y,x=e):a<u?(p=a,x=u):(p=u,x=a),d<l?(c=d,T=l):(c=l,T=d);var k,L=Math.abs(x-p)<=y?0:1;function A(I,P,S){return"A"+[I,I]+" "+[0,L,S]+" "+w(I,P)}return _?k=c===null?"M"+w(T,p)+A(T,s,0)+A(T,x,0)+"Z":"M"+w(c,p)+A(c,s,0)+A(c,x,0)+"ZM"+w(T,p)+A(T,s,1)+A(T,x,1)+"Z":c===null?(k="M"+w(T,p)+A(T,x,0),h&&(k+="L0,0Z")):k="M"+w(c,p)+"L"+w(T,p)+A(T,x,0)+"L"+w(c,x)+A(c,p,1)+"Z",k}$.exports={deg2rad:function(d){return d/180*y},rad2deg:function(d){return d/y*180},angleDelta:t,angleDist:function(d,l){return Math.abs(t(d,l))},isFullCircle:n,isAngleInsideSector:i,isPtInsideSector:function(d,l,a,u){return!!i(l,u)&&(a[0]<a[1]?(f=a[0],o=a[1]):(f=a[1],o=a[0]),d>=f&&d<=o);var f,o},pathArc:function(d,l,a,u,f){return r(null,d,l,a,u,f,0)},pathSector:function(d,l,a,u,f){return r(null,d,l,a,u,f,1)},pathAnnulus:function(d,l,a,u,f,o){return r(d,l,a,u,f,o,1)}}},{"./mod":510}],485:[function(v,$,te){var m=Array.isArray,g=ArrayBuffer,b=DataView;function y(t){return g.isView(t)&&!(t instanceof b)}function e(t){return m(t)||y(t)}function n(t,i,r){if(e(t)){if(e(t[0])){for(var d=r,l=0;l<t.length;l++)d=i(d,t[l].length);return d}return t.length}return 0}te.isTypedArray=y,te.isArrayOrTypedArray=e,te.isArray1D=function(t){return!e(t[0])},te.ensureArray=function(t,i){return m(t)||(t=[]),t.length=i,t},te.concat=function(){var t,i,r,d,l,a,u,f,o=[],h=!0,p=0;for(r=0;r<arguments.length;r++)(a=(d=arguments[r]).length)&&(i?o.push(d):(i=d,l=a),m(d)?t=!1:(h=!1,p?t!==d.constructor&&(t=!1):t=d.constructor),p+=a);if(!p)return[];if(!o.length)return i;if(h)return i.concat.apply(i,o);if(t){for((u=new t(p)).set(i),r=0;r<o.length;r++)d=o[r],u.set(d,l),l+=d.length;return u}for(u=new Array(p),f=0;f<i.length;f++)u[f]=i[f];for(r=0;r<o.length;r++){for(d=o[r],f=0;f<d.length;f++)u[l+f]=d[f];l+=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(v,$,te){var m=v("fast-isnumeric"),g=v("../constants/numerical").BADNUM,b=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;$.exports=function(y){return typeof y=="string"&&(y=y.replace(b,"")),m(y)?Number(y):g}},{"../constants/numerical":479,"fast-isnumeric":190}],487:[function(v,$,te){$.exports=function(m){var g=m._fullLayout;g._glcanvas&&g._glcanvas.size()&&g._glcanvas.each(function(b){b.regl&&b.regl.clear({color:!0,depth:!0})})}},{}],488:[function(v,$,te){$.exports=function(m){m._responsiveChartHandler&&(window.removeEventListener("resize",m._responsiveChartHandler),delete m._responsiveChartHandler)}},{}],489:[function(v,$,te){var m=v("fast-isnumeric"),g=v("tinycolor2"),b=v("../plots/attributes"),y=v("../components/colorscale/scales"),e=v("../components/color"),n=v("../constants/interactions").DESELECTDIM,t=v("./ne
1213sted_property"),i=v("./regex").counter,r=v("./mod").modHalf,d=v("./array").isArrayOrTypedArray;function l(a,u){var f=te.valObjectMeta[u.valType];if(u.arrayOk&&d(a))return!0;if(f.validateFunction)return f.validateFunction(a,u);var o={},h=o,p={set:function(s){h=s}};return f.coerceFunction(a,p,o,u),h!==o}te.valObjectMeta={data_array:{coerceFunction:function(a,u,f){d(a)?u.set(a):f!==void 0&&u.set(f)}},enumerated:{coerceFunction:function(a,u,f,o){o.coerceNumber&&(a=+a),o.values.indexOf(a)===-1?u.set(f):u.set(a)},validateFunction:function(a,u){u.coerceNumber&&(a=+a);for(var f=u.values,o=0;o<f.length;o++){var h=String(f[o]);if(h.charAt(0)==="/"&&h.charAt(h.length-1)==="/"){if(new RegExp(h.substr(1,h.length-2)).test(a))return!0}else if(a===f[o])return!0}return!1}},boolean:{coerceFunction:function(a,u,f){a===!0||a===!1?u.set(a):u.set(f)}},number:{coerceFunction:function(a,u,f,o){!m(a)||o.min!==void 0&&a<o.min||o.max!==void 0&&a>o.max?u.set(f):u.set(+a)}},integer:{coerceFunction:function(a,u,f,o){a%1||!m(a)||o.min!==void 0&&a<o.min||o.max!==void 0&&a>o.max?u.set(f):u.set(+a)}},string:{coerceFunction:function(a,u,f,o){if(typeof a!="string"){var h=typeof a=="number";o.strict!==!0&&h?u.set(String(a)):u.set(f)}else o.noBlank&&!a?u.set(f):u.set(a)}},color:{coerceFunction:function(a,u,f){g(a).isValid()?u.set(a):u.set(f)}},colorlist:{coerceFunction:function(a,u,f){Array.isArray(a)&&a.length&&a.every(function(o){return g(o).isValid()})?u.set(a):u.set(f)}},colorscale:{coerceFunction:function(a,u,f){u.set(y.get(a,f))}},angle:{coerceFunction:function(a,u,f){a==="auto"?u.set("auto"):m(a)?u.set(r(+a,360)):u.set(f)}},subplotid:{coerceFunction:function(a,u,f,o){var h=o.regex||i(f);typeof a=="string"&&h.test(a)?u.set(a):u.set(f)},validateFunction:function(a,u){var f=u.dflt;return a===f||typeof a=="string"&&!!i(f).test(a)}},flaglist:{coerceFunction:function(a,u,f,o){if(typeof a=="string")if((o.extras||[]).indexOf(a)===-1){for(var h=a.split("+"),p=0;p<h.length;){var s=h[p];o.flags.indexOf(s)===-1||h.indexOf(s)<p?h.splice(p,1):p++}h.length?u.set(h.join("+")):u.set(f)}else u.set(a);else u.set(f)}},any:{coerceFunction:function(a,u,f){a===void 0?u.set(f):u.set(a)}},info_array:{coerceFunction:function(a,u,f,o){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=o.dimensions===2||o.dimensions==="1-2"&&Array.isArray(a)&&Array.isArray(a[0]);if(Array.isArray(a)){var s,x,c,T,_,w,k=o.items,L=[],A=Array.isArray(k),I=A&&p&&Array.isArray(k[0]),P=p&&A&&!I,S=A&&!P?k.length:a.length;if(f=Array.isArray(f)?f:[],p)for(s=0;s<S;s++)for(L[s]=[],c=Array.isArray(a[s])?a[s]:[],_=P?k.length:A?k[s].length:c.length,x=0;x<_;x++)T=P?k[x]:A?k[s][x]:k,(w=h(c[x],T,(f[s]||[])[x]))!==void 0&&(L[s][x]=w);else for(s=0;s<S;s++)(w=h(a[s],A?k[s]:k,f[s]))!==void 0&&(L[s]=w);u.set(L)}else u.set(f)},validateFunction:function(a,u){if(!Array.isArray(a))return!1;var f=u.items,o=Array.isArray(f),h=u.dimensions===2;if(!u.freeLength&&a.length!==f.length)return!1;for(var p=0;p<a.length;p++)if(h){if(!Array.isArray(a[p])||!u.freeLength&&a[p].length!==f[p].length)return!1;for(var s=0;s<a[p].length;s++)if(!l(a[p][s],o?f[p][s]:f))return!1}else if(!l(a[p],o?f[p]:f))return!1;return!0}}},te.coerce=function(a,u,f,o,h){var p=t(f,o).get(),s=t(a,o),x=t(u,o),c=s.get(),T=u._template;if(c===void 0&&T&&(c=t(T,o).get(),T=0),h===void 0&&(h=p.dflt),p.arrayOk&&d(c))return x.set(c),c;var _=te.valObjectMeta[p.valType].coerceFunction;_(c,x,h,p);var w=x.get();return T&&w===h&&!l(c,p)&&(_(c=t(T,o).get(),x,h,p),w=x.get()),w},te.coerce2=function(a,u,f,o,h){var p=t(a,o),s=te.coerce(a,u,f,o,h),x=p.get();return x!=null&&s},te.coerceFont=function(a,u,f){var o={};return f=f||{},o.family=a(u+".family",f.family),o.size=a(u+".size",f.size),o.color=a(u+".color",f.color),o},te.coercePattern=function(a,u,f,o){if(a(u+".shape")){a(u+".solidity"),a(u+".size");var h=a(u+".fillmode")==="overlay";if(!o){var p=a(u+".bgcolor",h?f:void 0);a(u+".fgcolor",h?e.contrast(p):f)}a(u+".fgopacity",h?.5:1)}},te.coerceHoverinfo=function(a,u,f){var o,h=u._module.attributes,p=h.hoverinfo?h:b,s=p.hoverinfo;if(f._dataLength===1){var x=s.dflt==="all"?s.flags.slice():s.dflt.split("+");
1213x.splice(x.indexOf("name"),1),o=x.join("+")}return te.coerce(a,u,p,"hoverinfo",o)},te.coerceSelectionMarkerOpacity=function(a,u){if(a.marker){var f,o,h=a.marker.opacity;h!==void 0&&(d(h)||a.selected||a.unselected||(f=h,o=n*h),u("selected.marker.opacity",f),u("unselected.marker.opacity",o))}},te.validate=l},{"../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(v,$,te){var m,g,b=v("d3-time-format").timeFormat,y=v("fast-isnumeric"),e=v("./loggers"),n=v("./mod").mod,t=v("../constants/numerical"),i=t.BADNUM,r=t.ONEDAY,d=t.ONEHOUR,l=t.ONEMIN,a=t.ONESEC,u=t.EPOCHJD,f=v("../registry"),o=v("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,s=new Date().getFullYear()-70;function x(D){return D&&f.componentsRegistry.calendars&&typeof D=="str
1213ing"&&D!=="gregorian"}function c(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()*l,V=(D.getUTCMinutes()-D.getMinutes())*l+(D.getUTCSeconds()-D.getSeconds())*a+(D.getUTCMilliseconds()-D.getMilliseconds());if(V){var Z=3*l;H=H-Z/2+n(V-H+Z/2,Z)}return(D=Number(D)-H)>=m&&D<=g?D:i}if(typeof D!="string"&&typeof D!="number")return i;D=String(D);var K=x(F),G=D.charAt(0);!K||G!=="G"&&G!=="g"||(D=D.substr(1),F="");var W=K&&F.substr(0,7)==="chinese",Q=D.match(W?p:h);if(!Q)return i;var R=Q[1],N=Q[3]||"1",U=Number(Q[5]||1),ee=Number(Q[7]||0),j=Number(Q[9]||0),X=Number(Q[11]||0);if(K){if(R.length===2)return i;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 i}return J?(J.toJD()-u)*r+ee*d+j*l+X*a:i}R=R.length===2?(Number(R)+2e3-s)%100+s:Number(R),N-=1;var se=new Date(Date.UTC(2e3,N,U,ee,j));return se.setUTCFullYear(R),se.getUTCMonth()!==N||se.getUTCDate()!==U?i:se.getTime()+X*a},m=te.MIN_MS=te.dateTime2ms("-9999"),g=te.MAX_MS=te.dateTime2ms("9999-12-31 23:59:59.9999"),te.isDateTime=function(D,F){return te.dateTime2ms(D,F)!==i};var T=90*r,_=3*d,w=5*l;function k(D,F,H,V,Z){if((F||H||V||Z)&&(D+=" "+c(F,2)+":"+c(H,2),(V||Z)&&(D+=":"+c(V,2),Z))){for(var K=4;Z%10==0;)K-=1,Z/=10;D+="."+c(Z,K)}return D}te.ms2DateTime=function(D,F,H){if(typeof D!="number"||!(D>=m&&D<=g))return i;F||(F=0);var V,Z,K,G,W,Q,R=Math.floor(10*n(D+.05,1)),N=Math.round(D-R/10);if(x(H)){var U=Math.floor(N/r)+u,ee=Math.floor(n(D,r));try{V=f.getComponentMethod("calendars","getCal")(H).fromJD(U).formatDate("yyyy-mm-dd")}catch{V=o("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<T?Math.floor(ee/d):0,K=F<T?Math.floor(ee%d/l):0,G=F<_?Math.floor(ee%l/a):0,W=F<w?ee%a*10+R:0}else Q=new Date(N),V=o("%Y-%m-%d")(Q),Z=F<T?Q.getUTCHours():0,K=F<T?Q.getUTCMinutes():0,G=F<_?Q.getUTCSeconds():0,W=F<w?10*Q.getUTCMilliseconds()+R:0;return k(V,Z,K,G,W)},te.ms2DateTimeLocal=function(D){if(!(D>=m+r&&D<=g-r))return i;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===i)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 G=Math.min(+K.charAt(1)||6,6);return(F/1e3%1+2).toFixed(G).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(G,W){var Q=n(G+.05,r),R=c(Math.floor(Q/d),2)+":"+c(n(Math.floor(Q/l),60),2);if(W!=="M"){y(W)||(W=0);var N=(100+Math.min(n(G/a,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),G=K.fromJD(Z);return F%12?K.add(G,F,"m"):K.add(G,F/12,"y"),(G.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,G=0,W=0,Q=x(F)&&f.getComponentMethod("calendars","getCal")(F),R=0;R<D.length;R++)if(V=D[R],y(V)){if(!(V%r))if(Q)try{(H=Q.fromJD(V/r+u)).day()===1?H.month()===1?Z++:K++:G++}catch{}else(H=new Date(V)).getUTCDate()===1?H.getUTCMonth()===0?Z++:K++:G++}else W++;G+=K+=Z;var N=D.length-W;return{exactYears:Z/N,exactMonths:K/N,exactDays:G/N}}},{"../constants/numerical":479,"../registry":638,"./loggers":507,"./mod":510,"d3-time-format":120,"fast-isnumeric":190}],491:[function(v,$,te){var m=v("@plotly/d3"),g=v("./loggers"),b=v("./matrix"),y=v("gl-mat4");function e(d){var l=d&&d.parentNode;l&&l.removeChild(d)}function n(d,l,a){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 o=f.sheet;o.insertRule?o.insertRule(l+"{"+a+"}",0):o.addRule?o.addRule(l,a,0):g.warn("addStyleRule failed")}function t(d){var l=window.getComputedStyle(d,null),a=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("-moz-transform")||l.getPropertyValue("-ms-transform")||l.getPropertyValue("-o-transform")||l.getPropertyValue("transform");return a==="none"?null:a.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(u){return+u})}function i(d){for(var l=[];r(d);)l.push(d),d=d.parentNode;return l}function r(d){return d&&(d instanceof Element||d instanceof HTMLElement)}$.exports={getGraphDiv:function(d){var l;
1215if(typeof d=="string"){if((l=document.getElementById(d))===null)throw new Error("No DOM element with id '"+d+"' exists on the page.");return l}if(d==null)throw new Error("DOM element provided is null or undefined");return d},isPlotDiv:function(d){var l=m.select(d);return l.node()instanceof HTMLElement&&l.size()&&l.classed("js-plotly-plot")},removeElement:e,addStyleRule:function(d,l){n("global",d,l)},addRelatedStyleRule:n,deleteRelatedStyleRule:function(d){var l="plotly.js-style-"+d,a=document.getElementById(l);a&&e(a)},getFullTransformMatrix:function(d){var l=i(d),a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return l.forEach(function(u){var f=t(u);if(f){var o=b.convertCssMatrix(f);a=y.multiply(a,a,o)}}),a},getElementTransformMatrix:t,getElementAndAncestors:i,equalDomRects:function(d,l){return d&&l&&d.x===l.x&&d.y===l.y&&d.top===l.top&&d.left===l.left&&d.right===l.right&&d.bottom===l.bottom}}},{"./loggers":507,"./matrix":509,"@plotly/d3":58,"gl-mat4":210}],492:[function(v,$,te){var m=v("events").EventEmitter,g={init:function(b){if(b._ev instanceof m)return b;var y=new m,e=new m;return b._ev=y,b._internalEv=e,b.on=y.on.bind(y),b.once=y.once.bind(y),b.removeListener=y.removeListener.bind(y),b.removeAllListeners=y.removeAllListeners.bind(y),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),y.emit(n,t),e.emit(n,t)},b},triggerHandler:function(b,y,e){var n,t;typeof jQuery<"u"&&(n=jQuery(b).triggerHandler(y,e));var i=b._ev;if(!i)return n;var r,d=i._events[y];if(!d)return n;function l(a){return a.listener?(i.removeListener(y,a.listener),a.fired?void 0:(a.fired=!0,a.listener.apply(i,[e]))):a.apply(i,[e])}for(d=Array.isArray(d)?d:[d],r=0;r<d.length-1;r++)l(d[r]);return t=l(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}};$.exports=g},{events:84}],493:[function(v,$,te){var m=v("./is_plain_object.js"),g=Array.isArray;function b(y,e,n,t){var i,r,d,l,a,u,f=y[0],o=y.length;if(o===2&&g(f)&&g(y[1])&&f.length===0){if(function(p,s){var x,c;for(x=0;x<p.length;x++){if((c=p[x])!==null&&typeof c=="object")return!1;c!==void 0&&(s[x]=c)}return!0}(y[1],f))return f;f.splice(0,f.length)}for(var h=1;h<o;h++)for(r in i=y[h])d=f[r],l=i[r],t&&g(l)?f[r]=l:e&&l&&(m(l)||(a=g(l)))?(a?(a=!1,u=d&&g(d)?d:[]):u=d&&m(d)?d:{},f[r]=b([u,l],e,n,t)):(l!==void 0||n)&&(f[r]=l);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(v,$,te){$.exports=function(m){for(var g={},b=[],y=0,e=0;e<m.length;e++){var n=m[e];g[n]!==1&&(g[n]=1,b[y++]=n)}return b}},{}],495:[function(v,$,te){function m(b){return b.visible===!0}function g(b){var y=b[0].trace;return y.visible===!0&&y._length!==0}$.exports=function(b){for(var y,e=(y=b,Array.isArray(y)&&Array.isArray(y[0])&&y[0][0]&&y[0][0].trace?g:m),n=[],t=0;t<b.length;t++){var i=b[t];e(i)&&n.push(i)}return n}},{}],496:[function(v,$,te){var m=v("@plotly/d3"),g=v("country-regex"),b=v("@turf/area"),y=v("@turf/centroid"),e=v("@turf/bbox"),n=v("./identity"),t=v("./loggers"),i=v("./is_plain_object"),r=v("./nested_property"),d=v("./polygon"),l=Object.keys(g),a={"ISO-3":n,"USA-states":n,"country names":function(f){for(var o=0;o<l.length;o++){var h=l[o];if(new RegExp(g[h]).test(f.trim().toLowerCase()))return h}return t.log("Unrecognized country name: "+f+"."),!1}};function u(f){var o=f.geojson,h=window.PlotlyGeoAssets||{},p=typeof o=="string"?h[o]:o;return i(p)?p:(t.error("Oops ... something went wrong when fetching "+o),!1)}$.exports={locationToFeature:function(f,o,h){if(!o||typeof o!="string")return!1;var p,s,x,c=a[f](o);if(c){if(f==="USA-states")for(p=[],x=0;x<h.length;x++)(s=h[x]).properties&&s.properties.gu&&s.properties.gu==="USA"&&p.push(s);else p=h;for(x=0;x<p.length;x++)if((s=p[x]).id===c)return s;t.log(["Location with id",c,"does not have a matching topojson feature at this resolution."].join(" "))}return!1},feature2polygons:function(f){var o,h,p,s,x=f.geometry,c=x.coordinates,T=f.id,_=[];function w(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(o=T==="RUS"||T==="FJI"?function(k){var L;if(w(k)===null)L=k;else for(L=new Array(k.length),s=0;s<k.length;s++)L[s]=[k[s][0]<0?k[s][0]+360:k[s][0],k[s][1]];_.push(d.tester(L))}:T==="ATA"?function(k){var L=w(k);if(L===null)return _.push(d.tester(k));var A=new Array(k.length+1),I=0;for(s=0;s<k.length;s++)s>L?A[I++]=[k[s][0]+360,k[s][1]]:s===L?(A[I++]=k[s],A[I++]=[k[s][0],-90]):A[I++]=k[s];var P=d.tester(A);P.pts.pop(),_.push(P)}:function(k){_.push(d.tester(k))},x.type){case"MultiPolygon":for(h=0;h<c.length;h++)for(p=0;p<c[h].length;p++)o(c[h][p]);break;case"Polygon":for(h=0;h<c.length;h++)o(c[h])}return _},getTraceGeojson:u,extractTraceFeature:function(f){var o=f[0].trace,h=u(o
1215);if(!h)return!1;var p,s={},x=[];for(p=0;p<o._length;p++){var c=f[p];(c.loc||c.loc===0)&&(s[c.loc]=c)}function T(k){var L=r(k,o.featureidkey||"id").get(),A=s[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 y.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 s[L]}switch(h.type){case"FeatureCollection":var _=h.features;for(p=0;p<_.length;p++)T(_[p]);break;case"Feature":T(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 w in s)t.log(["Location *"+w+"*","does not have a matching feature with id-key","*"+o.featureidkey+"*."].join(" "));return x},fetchTraceGeoData:function(f){var o=window.PlotlyGeoAssets||{},h=[];function p(T){return new Promise(function(_,w){m.json(T,function(k,L){if(k){delete o[T];var A=k.status===404?'GeoJSON at URL "'+T+'" does not exist.':"Unexpected error while fetching from "+T;return w(new Error(A))}return o[T]=L,_(L)})})}function s(T){return new Promise(function(_,w){var k=0,L=setInterval(function(){return o[T]&&o[T]!=="pending"?(clearInterval(L),_(o[T])):k>100?(clearInterval(L),w("Unexpected error while fetching from "+T)):void k++},50)})}for(var x=0;x<f.length;x++){var c=f[x][0].trace.geojson;typeof c=="string"&&(o[c]?o[c]==="pending"&&h.push(s(c)):(o[c]="pending",h.push(p(c))))}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(v,$,te){var m=v("../constants/numerical").BADNUM;te.calcTraceToLineCoords=function(g){for(var b=g[0].trace.connectgaps,y=[],e=[],n=0;n<g.length;n++){var t=g[n].lonlat;t[0]!==m?e.push(t):!b&&e.length>0&&(y.push(e),e=[])}return e.length>0&&y.push(e),y},te.makeLine=function(g){return g.length===1?{type:"LineString",coordinates:g[0]}:{type:"MultiLineString",coordinates:g}},te.makePolygon=function(g){if(g.length===1)return{type:"Polygon",coordinates:g};for(var b=new Array(g.length),y=0;y<g.length;y++)b[y]=[g[y]];return{type:"MultiPolygon",coordinates:b}},te.makeBlank=function(){return{type:"Point",coordinates:[]}}},{"../constants/numerical":479}],498:[function(v,$,te){var m,g,b,y=v("./mod").mod;function e(t,i,r,d,l,a,u,f){var o=r-t,h=l-t,p=u-l,s=d-i,x=a-i,c=f-a,T=o*c-p*s;if(T===0)return null;var _=(h*c-p*x)/T,w=(h*s-o*x)/T;return w<0||w>1||_<0||_>1?null:{x:t+o*_,y:i+s*_}}function n(t,i,r,d,l){var a=d*t+l*i;if(a<0)return d*d+l*l;if(a>r){var u=d-t,f=l-i;return u*u+f*f}var o=d*i-l*t;return o*o/r}te.segmentsIntersect=e,te.segmentDistance=function(t,i,r,d,l,a,u,f){if(e(t,i,r,d,l,a,u,f))return 0;var o=r-t,h=d-i,p=u-l,s=f-a,x=o*o+h*h,c=p*p+s*s,T=Math.min(n(o,h,x,l-t,a-i),n(o,h,x,u-t,f-i),n(p,s,c,t-l,i-a),n(p,s,c,r-l,d-a));return Math.sqrt(T)},te.getTextLocation=function(t,i,r,d){if(t===g&&d===b||(m={},g=t,b=d),m[r])return m[r];var l=t.getPointAtLength(y(r-d/2,i)),a=t.getPointAtLength(y(r+d/2,i)),u=Math.atan((a.y-l.y)/(a.x-l.x)),f=t.getPointAtLength(y(r,i)),o={x:(4*f.x+l.x+a.x)/6,y:(4*f.y+l.y+a.y)/6,theta:u};return m[r]=o,o},te.clearLocationCache=function(){g=null},te.getVisibleSegment=function(t,i,r){var d,l,a=i.left,u=i.right,f=i.top,o=i.bottom,h=0,p=t.getTotalLength(),s=p;function x(T){var _=t.getPointAtLength(T);T===0?d=_:T===p&&(l=_);var w=_.x<a?a-_.x:_.x>u?_.x-u:0,k=_.y<f?f-_.y:_.y>o?_.y-o:0;return Math.sqrt(w*w+k*k)}for(var c=x(h);c;){if((h+=c+r)>s)return;c=x(h)}for(c=x(s);c;){if(h>(s-=c+r))return;c=x(s)}return{min:h,max:s,len:s-h,total:p,isClosed:h===0&&s===p&&Math.abs(d.x-l.x)<.1&&Math.abs(d.y-l.y)<.1}},te.findPointOnPath=function(t,i,r,d){for(var l,a,u,f=(d=d||{}).pathLength||t.getTotalLength(),o=d.tolerance||.001,h=d.iterationLimit||30,p=t.getPointAtLength(0)[r]>t.getPointAtLength(f)[r]?-1:1,s=0,x=0,c=f;s<h;){if(l=(x+c)/2,u=(a=t.getPointAtLength(l))[r]-i,Math.abs(u)<o)return a;p*u>0?c=l:x=l,s++}return a}},{"./mod":510}],499:[function(v,$,te){var m=v("fast-isnumeric"),g=v("tinycolor2"),b=v("color-normalize"),y=v("../components/colorscale"),e=v("../components/color/attributes").defaultLine,n=v("./array").isArrayOrTypedArray,t=b(e);function i(l,a){var u=l;return u[3]*=a,u}function r(l){if(m(l))return t;var a=b(l);return a.length?a:t}function d(l){return m(l)?l:1}$.exports={formatColor:function(l,a,u){var f,o,h,p,s,x=l.color,c=n(x),T=n(a),_=y.extractOpts(l),w=[];if(f=_.colorscale!==void 0?y.makeColorScaleFuncFromTrace(l):r,o=c?function(L,A){return L[A]===void 0?t:b(f(L[A]))}:r,h=T?function(L,A){return L[A]===void 0?1:d(L[A])}:d,c||T)for(var k=0;k<u;k++)p=o(x,k),s=h(a,k),w[k]=i(p,s);else w=i(b(x),a);return w},parseColorScale:function(l){var a=y.extractOpts(l),u=a.colorscale;return a.reversescale&&(u=y.flipScale(a.colorscale)),u.map(function(f){var o=f[0],h=g(f[1]).toRgb();return{index:o,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(v,$,te){var m=v("./identity");function g(b){return[b]}$.exports={keyFun:function(b){return b.key},repeat:g,descend:m,wrap:g,unwrap:function(b){return b[0]}}},{"./identity":501}],501:[function(v,$,te){$.exports=function(m){return m}},{}],502:[function(v,$,te){$.exports=function(m,g){if(!g)return m;var b=1/Math.abs(g),y=b>1?(b*m+b*g)/b:m+g,e=String(y).length;if(e>16){var n=String(g).length;if(e>=String(m).length+n){var t=parseFloat(y).toPrecision(12);t.indexOf("e+")===-1&&(y=+t)}}return y}},{}],503:[function(v,$,te){var m=v("@plotly/d3"),g=v("d3-time-format").utcFormat,b
1215=v("d3-format").format,y=v("fast-isnumeric"),e=v("../constants/numerical"),n=e.FP_SAFE,t=-n,i=e.BADNUM,r=$.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=v("./nested_property"),r.keyedContainer=v("./keyed_container"),r.relativeAttr=v("./relative_attr"),r.isPlainObject=v("./is_plain_object"),r.toLogRange=v("./to_log_range"),r.relinkPrivateKeys=v("./relink_private");var l=v("./array");r.isTypedArray=l.isTypedArray,r.isArrayOrTypedArray=l.isArrayOrTypedArray,r.isArray1D=l.isArray1D,r.ensureArray=l.ensureArray,r.concat=l.concat,r.maxRowLength=l.maxRowLength,r.minRowLength=l.minRowLength;var a=v("./mod");r.mod=a.mod,r.modHalf=a.modHalf;var u=v("./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=v("./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 o=v("./search");r.findBin=o.findBin,r.sorterAsc=o.sorterAsc,r.sorterDes=o.sorterDes,r.distinctVals=o.distinctVals,r.roundUp=o.roundUp,r.sort=o.sort,r.findIndexOfMin=o.findIndexOfMin,r.sortObjectKeys=v("./sort_object_keys");var h=v("./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=v("./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 s=v("./angles");r.deg2rad=s.deg2rad,r.rad2deg=s.rad2deg,r.angleDelta=s.angleDelta,r.angleDist=s.angleDist,r.isFullCircle=s.isFullCircle,r.isAngleInsideSector=s.isAngleInsideSector,r.isPtInsideSector=s.isPtInsideSector,r.pathArc=s.pathArc,r.pathSector=s.pathSector,r.pathAnnulus=s.pathAnnulus;var x=v("./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 c=v("./geometry2d");r.segmentsIntersect=c.segmentsIntersect,r.segmentDistance=c.segmentDistance,r.getTextLocation=c.getTextLocation,r.clearLocationCache=c.clearLocationCache,r.getVisibleSegment=c.getVisibleSegment,r.findPointOnPath=c.findPointOnPath;var T=v("./extend");r.extendFlat=T.extendFlat,r.extendDeep=T.extendDeep,r.extendDeepAll=T.extendDeepAll,r.extendDeepNoArrays=T.extendDeepNoArrays;var _=v("./loggers");r.log=_.log,r.warn=_.warn,r.error=_.error;var w=v("./regex");r.counterRegex=w.counter;var k=v("./throttle");r.throttle=k.throttle,r.throttleDone=k.done,r.clearThrottle=k.clear;var L=v("./dom");function A(R){var N={};for(var U in R)for(var ee=R[U],j=0;j<ee.length;j++)N[ee[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=v("./clear_responsive"),r.preserveDrawingBuffer=v("./preserve_drawing_buffer"),r.makeTraceGroups=v("./make_trace_groups"),r._=v("./localize"),r.notifier=v("./notifier"),r.filterUnique=v("./filter_unique"),r.filterVisible=v("./filter_visible"),r.pushUnique=v("./push_unique"),r.increment=v("./increment"),r.cleanNumber=v("./clean_number"),r.ensureNumber=function(R){return y(R)?(R=Number(R))>n||R<t?i:R:i},r.isIndex=function(R,N){return!(N!==void 0&&R>=N)&&y(R)&&R>=0&&R%1==0},r.noop=v("./noop"),r.identity=v("./identity"),r.repeat=function(R,N){for(var U=new Array(N),ee=0;ee<N;ee++)U[ee]=R;return U},r.swapAttrs=function(R,N,U,ee){U||(U="x"),ee||(ee="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("?",ee)),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,ee,j){for(var X=R.length,J=new Array(X),re=0;re<X;re++)J[re]=N(R[re],U,ee,j);return J},r.randstr=function R(N,U,ee,j){if(ee||(ee=16),U===void 0&&(U=24),U<=0)return"0";
1215var X,J,re=Math.log(Math.pow(2,U))/Math.log(ee),ne="";for(X=2;re===1/0;X*=2)re=Math.log(Math.pow(2,U/X))/Math.log(ee)*X;var se=re-Math.floor(re);for(X=0;X<Math.floor(re);X++)ne=Math.floor(Math.random()*ee).toString(ee)+ne;se&&(J=Math.pow(ee,se),ne=Math.floor(Math.random()*J).toString(ee)+ne);var oe=parseInt(ne,ee);return N&&N[ne]||oe!==1/0&&oe>=Math.pow(2,U)?j>10?(r.warn("randstr failed uniqueness"),ne):R(N,U,ee,(j||0)+1):ne},r.OptionControl=function(R,N){R||(R={}),N||(N="opt");var U={optionList:[],_newoption:function(ee){ee[N]=R,U[ee.name]=ee,U.optionList.push(ee)}};return U["_"+N]=R,U},r.smooth=function(R,N){if((N=Math.round(N)||0)<2)return R;var U,ee,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,ee=0;ee<ne;ee++)(j=U+ee+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[ee];oe[U]=X}return oe},r.syncOrAsync=function(R,N,U){var ee;function j(){return r.syncOrAsync(R,N,U)}for(;R.length;)if((ee=(0,R.splice(0,1)[0])(N))&&ee.then)return ee.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 ee,j=!1,X=!0;for(ee=0;ee<U.length;ee++)R[U[ee]]!=null?j=!0:X=!1;if(j&&!X)for(ee=0;ee<U.length;ee++)R[U[ee]]=N[U[ee]]}},r.mergeArray=function(R,N,U,ee){var j=typeof ee=="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?ee(re):re}},r.mergeArrayCastPositive=function(R,N,U){return r.mergeArray(R,N,U,function(ee){var j=+ee;return isFinite(j)&&j>0?j:0})},r.fillArray=function(R,N,U,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(R))for(var j=0;j<N.length;j++)N[j][U]=ee(R[j])},r.castOption=function(R,N,U,ee){ee=ee||r.identity;var j=r.nestedProperty(R,U).get();return r.isArrayOrTypedArray(j)?Array.isArray(N)&&r.isArrayOrTypedArray(j[N[0]])?ee(j[N[0]][N[1]]):ee(j[N]):j},r.extractOption=function(R,N,U,ee){if(U in R)return R[U];var j=r.nestedProperty(N,ee).get();return Array.isArray(j)?void 0:j},r.tagSelected=function(R,N,U){var ee,j,X=N.selectedpoints,J=N._indexToPoints;J&&(ee=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=ee?ee[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 ee=A(U),j=[],X=0;X<N.length;X++){var J=N[X];if(r.isIndex(J)){var re=ee[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 ee=r.nestedProperty(R,U).get();return!!Array.isArray(ee)&&ee}return!!Array.isArray(U)&&U},r.minExtend=function(R,N){var U={};typeof N!="object"&&(N={});var ee,j,X,J=Object.keys(R);for(ee=0;ee<J.length;ee++)X=R[j=J[ee]],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),ee=0;ee<J.length;ee++)typeof(X=N[j=J[ee]])=="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 m.selection},r.ensureSingle=function(R,N,U,ee){var j=R.select(N+(U?"."+U:""));if(j.size())return j;var X=R.append(N);return U&&X.classed(U,!0),ee&&X.call(ee),X},r.ensureSingleById=function(R,N,U,ee){var j=R.select(N+"#"+U);if(j.size())return j;var X=R.append(N).attr("id",U);return ee&&X.call(ee),X},r.objectFromPath=function(R,N){for(var U,ee=R.split("."),j=U={},X=0;X<ee.length;X++){var J=ee[X],re=null,ne=ee[X].match(/(.*)\[([0-9]+)\]/);ne?(J=ne[1],re=ne[2],U=U[J]=[],X===ee.length-1?U[re]=N:U[re]={},U=U[re]):(X===ee.length-1?U[J]=N:U[J]={},U=U[J])}return j};var E=/^([^\[\.]+)\.(.+)?/,D=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;r.expandObjectPaths=function(R){var N,U,ee,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],ee=N[1],delete R[U],R[ee]=r.extendDeepNoArrays(R[ee]||{},r.objectFromPath(U,r.expandObjectPaths(j))[ee])):(N=U.match(D))?(j=R[U],ee=N[1],X=parseInt(N[2]),delete R[U],R[ee]=R[ee]||[],N[3]==="."?(re=N[4],J=R[ee][X]=R[ee][X]||{},r.extendDeepNoArrays(J,r.objectFromPath(re,r.expandObjectPaths(j)))):R[ee][X]=r.expandObjectPaths(j)):R[U]=r.expandObjectPaths(R[U]));return R}
1215,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 ee=/(\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(;ee.test(re);)re=re.replace(ee,"$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(ee,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 ee=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_",_e=re==="xother"||re==="yother"||ce||xe||de,we=re;if((ce||de)&&(we=we.substring(1)),(xe||de)&&(we=we.substring(0,we.length-1)),_e){if((se=N[we])===void 0)return""}else for(pe=3;pe<j.length;pe++)if(oe=j[pe]){if(oe.hasOwnProperty(we)){se=oe[we];break}if(F.test(we)||(se=r.nestedProperty(oe,we).get(),(se=X[we]||r.nestedProperty(oe,we).get())&&(X[we]=se)),se!==void 0)break}if(se===void 0&&ee)return ee.count<ee.max&&(r.warn("Variable '"+we+"' in "+ee.name+" could not be found!"),se=J),ee.count===ee.max&&r.warn("Too many "+ee.name+" warnings - additional warnings will be suppressed"),ee.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:g;var fe=r.dateTime2ms(se);se=r.formatDate(fe,ne.replace(Z,""),!1,Ee)}}else{var ge=we+"Label";N.hasOwnProperty(ge)&&(se=N[ge])}return _e&&(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,ee=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&&(ee=10*ee+J-48),se&&(j=10*j+re-48),!ne||!se){if(ee!==j)return ee-j;if(J!==re)return J-re}}return j-ee};var G=2e9;r.seedPseudoRandom=function(){G=2e9},r.pseudoRandom=function(){var R=G;return G=(69069*G+1)%4294967296,Math.abs(G-R)<429496729?r.pseudoRandom():G/4294967296},r.fillText=function(R,N,U){var ee=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 ee(j);var X=r.extractOption(R,N,"tx","text");return r.isValidTextValue(X)?ee(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)+"%",ee=0;ee<N;ee++)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,ee=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*(ee+re))+r.strScale(se)+(ne?"rotate("+ne+(N?"":" "+U+" "+ee)+")":"")},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 ee=R.length;return ee>1?R.slice(0,-1).join(N)+U+R[ee-1]:R.join(N)},r.bigFont=function(R){return Math.round(1.2*R)};var W=r.getFirefoxVersion(),Q=W!==null&&W<86;r.getPositionFromD3Event=function(){return Q?[m.event.layerX,m.event.layerY]:[m.event.offsetX,m.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(v,$,te){$.exports=function(m){return window&&window.process&&window.process.versions?Object.prototype.toString.call(m)==="[object Object]":Object.prototype.toString.call(m)==="[object Object]"&&Object.getPrototypeOf(m).hasOwnProperty("hasOwnProperty")}},{}
1215],505:[function(v,$,te){var m=v("./nested_property"),g=/^\w*$/;$.exports=function(b,y,e,n){var t,i,r;e=e||"name",n=n||"value";var d={};y&&y.length?(r=m(b,y),i=r.get()):i=b,y=y||"";var l={};if(i)for(t=0;t<i.length;t++)l[i[t][e]]=t;var a=g.test(n),u={set:function(f,o){var h=o===null?4:0;if(!i){if(!r||h===4)return;i=[],r.set(i)}var p=l[f];if(p===void 0){if(h===4)return;h|=3,p=i.length,l[f]=p}else o!==(a?i[p][n]:m(i[p],n).get())&&(h|=2);var s=i[p]=i[p]||{};return s[e]=f,a?s[n]=o:m(s,n).set(o),o!==null&&(h&=-5),d[p]=d[p]|h,u},get:function(f){if(i){var o=l[f];return o===void 0?void 0:a?i[o][n]:m(i[o],n).get()}},rename:function(f,o){var h=l[f];return h===void 0||(d[h]=1|d[h],l[o]=h,delete l[f],i[h][e]=o),u},remove:function(f){var o=l[f];if(o===void 0)return u;var h=i[o];if(Object.keys(h).length>2)return d[o]=2|d[o],u.set(f,null);if(a){for(t=o;t<i.length;t++)d[t]=3|d[t];for(t=o;t<i.length;t++)l[i[t][e]]--;i.splice(o,1),delete l[f]}else m(h,n).set(null),d[o]=6|d[o];return u},constructUpdate:function(){for(var f,o,h={},p=Object.keys(d),s=0;s<p.length;s++)o=p[s],f=y+"["+o+"]",i[o]?(1&d[o]&&(h[f+"."+e]=i[o][e]),2&d[o]&&(h[f+"."+n]=a?4&d[o]?null:i[o][n]:4&d[o]?null:m(i[o],n).get())):h[f]=null;return h}};return u}},{"./nested_property":511}],506:[function(v,$,te){var m=v("../registry");$.exports=function(g,b){for(var y=g._context.locale,e=0;e<2;e++){for(var n=g._context.locales,t=0;t<2;t++){var i=(n[y]||{}).dictionary;if(i){var r=i[b];if(r)return r}n=m.localeRegistry}var d=y.split("-")[0];if(d===y)break;y=d}return b}},{"../registry":638}],507:[function(v,$,te){var m=v("../plot_api/plot_config").dfltConfig,g=v("./notifier"),b=$.exports={};b.log=function(){var y;if(m.logging>1){var e=["LOG:"];for(y=0;y<arguments.length;y++)e.push(arguments[y]);console.trace.apply(console,e)}if(m.notifyOnLogging>1){var n=[];for(y=0;y<arguments.length;y++)n.push(arguments[y]);g(n.join("<br>"),"long")}},b.warn=function(){var y;if(m.logging>0){var e=["WARN:"];for(y=0;y<arguments.length;y++)e.push(arguments[y]);console.trace.apply(console,e)}if(m.notifyOnLogging>0){var n=[];for(y=0;y<arguments.length;y++)n.push(arguments[y]);g(n.join("<br>"),"stick")}},b.error=function(){var y;if(m.logging>0){var e=["ERROR:"];for(y=0;y<arguments.length;y++)e.push(arguments[y]);console.error.apply(console,e)}if(m.notifyOnLogging>0){var n=[];for(y=0;y<arguments.length;y++)n.push(arguments[y]);g(n.join("<br>"),"stick")}}},{"../plot_api/plot_config":541,"./notifier":513}],508:[function(v,$,te){var m=v("@plotly/d3");$.exports=function(g,b,y){var e=g.selectAll("g."+y.replace(/\s/g,".")).data(b,function(t){return t[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",y),e.order();var n=g.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(t){t[0][n]=m.select(this)}),e}},{"@plotly/d3":58}],509:[function(v,$,te){var m=v("gl-mat4");te.init2dArray=function(g,b){for(var y=new Array(g),e=0;e<g;e++)y[e]=new Array(b);return y},te.transposeRagged=function(g){var b,y,e=0,n=g.length;for(b=0;b<n;b++)e=Math.max(e,g[b].length);var t=new Array(e);for(b=0;b<e;b++)for(t[b]=new Array(n),y=0;y<n;y++)t[b][y]=g[y][b];return t},te.dot=function(g,b){if(!g.length||!b.length||g.length!==b.length)return null;var y,e,n=g.length;if(g[0].length)for(y=new Array(n),e=0;e<n;e++)y[e]=te.dot(g[e],b);else if(b[0].length){var t=te.transposeRagged(b);for(y=new Array(t.length),e=0;e<t.length;e++)y[e]=te.dot(g,t[e])}else for(y=0,e=0;e<n;e++)y+=g[e]*b[e];return y},te.translationMatrix=function(g,b){return[[1,0,g],[0,1,b],[0,0,1]]},te.rotationMatrix=function(g){var b=g*Math.PI/180;return[[Math.cos(b),-Math.sin(b),0],[Math.sin(b),Math.cos(b),0],[0,0,1]]},te.rotationXYMatrix=function(g,b,y){return te.dot(te.dot(te.translationMatrix(b,y),te.rotationMatrix(g)),te.translationMatrix(-b,-y))},te.apply3DTransform=function(g){return function(){var b=arguments,y=arguments.length===1?b[0]:[b[0],b[1],b[2]||0];return te.dot(g,[y[0],y[1],y[2],1]).slice(0,3)}},te.apply2DTransform=function(g){return function(){var b=arguments;b.length===3&&(b=b[0]);var y=arguments.length===1?b[0]:[b[0],b[1]];return te.dot(g,[y[0],y[1],1]).slice(0,2)}}
1215,te.apply2DTransform2=function(g){var b=te.apply2DTransform(g);return function(y){return b(y.slice(0,2)).concat(b(y.slice(2,4)))}},te.convertCssMatrix=function(g){if(g){var b=g.length;if(b===16)return g;if(b===6)return[g[0],g[1],0,0,g[2],g[3],0,0,0,0,1,0,g[4],g[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},te.inverseTransformMatrix=function(g){var b=[];return m.invert(b,g),[[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(v,$,te){$.exports={mod:function(m,g){var b=m%g;return b<0?b+g:b},modHalf:function(m,g){return Math.abs(m)>g/2?m-Math.round(m/g)*g:m}}},{}],511:[function(v,$,te){var m=v("fast-isnumeric"),g=v("./array").isArrayOrTypedArray;function b(d,l){return function(){var a,u,f,o,h,p=d;for(o=0;o<l.length-1;o++){if((a=l[o])===-1){for(u=!0,f=[],h=0;h<p.length;h++)f[h]=b(p[h],l.slice(o+1))(),f[h]!==f[0]&&(u=!1);return u?f[0]:f}if(typeof a=="number"&&!g(p)||typeof(p=p[a])!="object"||p===null)return}if(typeof p=="object"&&p!==null&&(f=p[l[o]])!==null)return f}}$.exports=function(d,l){if(m(l))l=String(l);else if(typeof l!="string"||l.substr(l.length-4)==="[-1]")throw"bad property string";for(var a,u,f,o=0,h=l.split(".");o<h.length;){if(a=String(h[o]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(a[1])h[o]=a[1];else{if(o!==0)throw"bad property string";h.splice(0,1)}for(u=a[2].substr(1,a[2].length-2).split("]["),f=0;f<u.length;f++)o++,h.splice(o,0,Number(u[f]))}o++}return typeof d!="object"?function(p,s,x){return{set:function(){throw"bad container"},get:function(){},astr:s,parts:x,obj:p}}(d,l,h):{set:n(d,h,l),get:b(d,h),astr:l,parts:h,obj:d}};var y=/(^|\.)args\[/;function e(d,l){return d===void 0||d===null&&!l.match(y)}function n(d,l,a){return function(u){var f,o,h=d,p="",s=e(u,a);for(o=0;o<l.length-1;o++){if(typeof(f=l[o])=="number"&&!g(h))throw"array index but container is not an array";if(f===-1){if(s=!i(h,l.slice(o+1),u,a))break;return}if(!r(h,f,l[o+1],s))break;if(typeof(h=h[f])!="object"||h===null)throw"container is not an object";p=t(p,f)}if(s){if(o===l.length-1&&(delete h[l[o]],Array.isArray(h)&&+l[o]==h.length-1))for(;h.length&&h[h.length-1]===void 0;)h.pop()}else h[l[o]]=u}}function t(d,l){var a=l;return m(l)?a="["+l+"]":d&&(a="."+l),d+a}function i(d,l,a,u){var f,o=g(a),h=!0,p=a,s=u.replace("-1",0),x=!o&&e(a,s),c=l[0];for(f=0;f<d.length;f++)s=u.replace("-1",f),o&&(x=e(p=a[f%a.length],s)),x&&(h=!1),r(d,f,c,x)&&n(d[f],l,u.replace("-1",f))(p);return h}function r(d,l,a,u){if(d[l]===void 0){if(u)return!1;d[l]=typeof a=="number"?[]:{}}return!0}},{"./array":485,"fast-isnumeric":190}],512:[function(v,$,te){$.exports=function(){}},{}],513:[function(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=[];$.exports=function(y,e){if(b.indexOf(y)===-1){b.push(y);var n=1e3;g(e)?n=e:e==="long"&&(n=3e3);var t=m.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=m.select(this);d.append("button").classed("notifier-close",!0).html("×").on("click",function(){d.transition().call(i)});for(var l=d.append("p"),a=r.split(/<br\s*\/?>/g),u=0;u<a.length;u++)u&&l.append("br"),l.append("span").text(a[u]);e==="stick"?d.transition().duration(350).style("opacity",1):d.transition().duration(700).style("opacity",1).transition().delay(n).call(i)})}function i(r){r.duration(700).style("opacity",0).each("end",function(d){var l=b.indexOf(d);l!==-1&&b.splice(l,1),m.select(this).remove()})}}},{"@plotly/d3":58,"fast-isnumeric":190}],514:[function(v,$,te){var m=v("./setcursor"),g="data-savedcursor";$.exports=function(b,y){var e=b.attr(g);if(y){if(!e){for(var n=(b.attr("class")||"").split(" "),t=0;t<n.length;t++){var i=n[t];i.indexOf("cursor-")===0&&b.attr(g,i.substr(7)).classed(i,!1)}b.attr(g)||b.attr(g,"!!")}m(b,y)}else e&&(b.attr(g,null),e==="!!"?m(b):m(b,e))}},{"./setcursor":524}],515:[function(v,$,te){var m=v("./matrix").dot,g=v("../constants/numerical").BADNUM,b=$.exports={};
1215b.tester=function(y){var e,n=y.slice(),t=n[0][0],i=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]),i=Math.max(i,n[e][0]),r=Math.min(r,n[e][1]),d=Math.max(d,n[e][1]);var l,a=!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]&&(a=!0,l=function(o){return o[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]&&(a=!0,l=function(o){return o[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:i,ymin:r,ymax:d,pts:n,contains:a?function(o,h){var p=o[0],s=o[1];return!(p===g||p<t||p>i||s===g||s<r||s>d)&&(!h||!l(o))}:function(o,h){var p=o[0],s=o[1];if(p===g||p<t||p>i||s===g||s<r||s>d)return!1;var x,c,T,_,w,k=n.length,L=n[0][0],A=n[0][1],I=0;for(x=1;x<k;x++)if(c=L,T=A,L=n[x][0],A=n[x][1],!(p<(_=Math.min(c,L))||p>Math.max(c,L)||s>Math.max(T,A)))if(s<Math.min(T,A))p!==_&&I++;else{if(s===(w=L===c?s:T+(p-c)*(A-T)/(L-c)))return x!==1||!h;s<=w&&p!==_&&I++}return I%2==1},isRect:a,degenerate:u}},b.isSegmentBent=function(y,e,n,t){var i,r,d,l=y[e],a=[y[n][0]-l[0],y[n][1]-l[1]],u=m(a,a),f=Math.sqrt(u),o=[-a[1]/f,a[0]/f];for(i=e+1;i<n;i++)if(r=[y[i][0]-l[0],y[i][1]-l[1]],(d=m(r,a))<0||d>u||Math.abs(m(r,o))>t)return!0;return!1},b.filter=function(y,e){var n=[y[0]],t=0,i=0;function r(d){y.push(d);var l=n.length,a=t;n.splice(i+1);for(var u=a+1;u<y.length;u++)(u===y.length-1||b.isSegmentBent(y,a,u+1,e))&&(n.push(y[u]),n.length<l-2&&(t=u,i=n.length-1),a=u)}return y.length>1&&r(y.pop()),{addPt:r,raw:y,filtered:n}}},{"../constants/numerical":479,"./matrix":509}],516:[function(v,$,te){(function(m){(function(){var g=v("./show_no_webgl_msg"),b=v("regl");$.exports=function(y,e,n){var t=y._fullLayout,i=!0;return t._glcanvas.each(function(r){if(r.regl)r.regl.preloadCachedCode(n);else if(!r.pick||t._has("parcoords")){try{r.regl=b({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:y._context.plotGlPixelRatio||m.devicePixelRatio,extensions:e||[],cachedCode:n||{}})}catch{i=!1}r.regl||(i=!1),i&&this.addEventListener("webglcontextlost",function(d){y&&y.emit&&y.emit("plotly_webglcontextlost",{event:d,layer:r.key})},!1)}}),i||g({container:t._glcontainer.node()}),i}}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{"./show_no_webgl_msg":525,regl:283}],517:[function(v,$,te){var m=v("fast-isnumeric"),g=v("is-mobile");$.exports=function(b){var y;if(typeof(y=b&&b.hasOwnProperty("userAgent")?b.userAgent:function(){var l;return typeof navigator<"u"&&(l=navigator.userAgent),l&&l.headers&&typeof l.headers["user-agent"]=="string"&&(l=l.headers["user-agent"]),l}())!="string")return!0;var e=g({ua:{headers:{"user-agent":y}},tablet:!0,featureDetect:!1});if(!e){for(var n=y.split(" "),t=1;t<n.length;t++)if(n[t].indexOf("Safari")!==-1)for(var i=t-1;i>-1;i--){var r=n[i];if(r.substr(0,8)==="Version/"){var d=r.substr(8).split(".")[0];if(m(d)&&(d=+d),d>=13)return!0}}}return e}},{"fast-isnumeric":190,"is-mobile":234}],518:[function(v,$,te){$.exports=function(m,g){if(g instanceof RegExp){for(var b=g.toString(),y=0;y<m.length;y++)if(m[y]instanceof RegExp&&m[y].toString()===b)return m;m.push(g)}else!g&&g!==0||m.indexOf(g)!==-1||m.push(g);return m}},{}],519:[function(v,$,te){var m=v("../lib"),g=v("../plot_api/plot_config").dfltConfig,b={add:function(y,e,n,t,i){var r,d;y.undoQueue=y.undoQueue||{index:0,queue:[],sequence:!1},d=y.undoQueue.index,y.autoplay?y.undoQueue.inSequence||(y.autoplay=!1):(!y.undoQueue.sequence||y.undoQueue.beginSequence?(r={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},y.undoQueue.queue.splice(d,y.undoQueue.queue.length-d,r),y.undoQueue.index+=1):r=y.undoQueue.queue[d-1],y.undoQueue.beginSequence=!1,r&&(r.undo.calls.unshift(e),r.undo.args.unshift(n),r.redo.calls.push(t),r.redo.args.push(i)),y.undoQueue.queue.length>g.queueLength&&(y.undoQueue.queue.shift(),y.undoQueue.index--))},startSequence:function(y){y.undoQueue=y.undoQueue||{index:0,queue:[],sequence:!1},y.undoQueue.sequence=!0,y.undoQueue.beginSequence=!0},stopSequence:function(y){y.undoQueue=y.undoQueue||{index:0,queue:[],sequence:!1},y.undoQueue.sequence=!1,y.undoQueue.beginSequence=!1},undo:function(y){var e,n;
1215if(!(y.undoQueue===void 0||isNaN(y.undoQueue.index)||y.undoQueue.index<=0)){for(y.undoQueue.index--,e=y.undoQueue.queue[y.undoQueue.index],y.undoQueue.inSequence=!0,n=0;n<e.undo.calls.length;n++)b.plotDo(y,e.undo.calls[n],e.undo.args[n]);y.undoQueue.inSequence=!1,y.autoplay=!1}},redo:function(y){var e,n;if(!(y.undoQueue===void 0||isNaN(y.undoQueue.index)||y.undoQueue.index>=y.undoQueue.queue.length)){for(e=y.undoQueue.queue[y.undoQueue.index],y.undoQueue.inSequence=!0,n=0;n<e.redo.calls.length;n++)b.plotDo(y,e.redo.calls[n],e.redo.args[n]);y.undoQueue.inSequence=!1,y.autoplay=!1,y.undoQueue.index++}}};b.plotDo=function(y,e,n){y.autoplay=!0,n=function(t,i){for(var r,d=[],l=0;l<i.length;l++)r=i[l],d[l]=r===t?r:typeof r=="object"?Array.isArray(r)?m.extendDeep([],r):m.extendDeepAll({},r):r;return d}(y,n),e.apply(null,n)},$.exports=b},{"../lib":503,"../plot_api/plot_config":541}],520:[function(v,$,te){te.counter=function(m,g,b,y){var e=(g||"")+(b?"":"$"),n=y===!1?"":"^";return m==="xy"?new RegExp(n+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+e):new RegExp(n+m+"([2-9]|[1-9][0-9]+)?"+e)}},{}],521:[function(v,$,te){var m=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,g=/^[^\.\[\]]+$/;$.exports=function(b,y){for(;y;){var e=b.match(m);if(e)b=e[1];else{if(!b.match(g))throw new Error("bad relativeAttr call:"+[b,y]);b=""}if(y.charAt(0)!=="^")break;y=y.slice(1)}return b&&y.charAt(0)!=="["?b+"."+y:b+y}},{}],522:[function(v,$,te){var m=v("./array").isArrayOrTypedArray,g=v("./is_plain_object");$.exports=function b(y,e){for(var n in e){var t=e[n],i=y[n];if(i!==t)if(n.charAt(0)==="_"||typeof t=="function"){if(n in y)continue;y[n]=t}else if(m(t)&&m(i)&&g(t[0])){if(n==="customdata"||n==="ids")continue;for(var r=Math.min(t.length,i.length),d=0;d<r;d++)i[d]!==t[d]&&g(t[d])&&g(i[d])&&b(i[d],t[d])}else g(t)&&g(i)&&(b(i,t),Object.keys(i).length||delete y[n])}}},{"./array":485,"./is_plain_object":504}],523:[function(v,$,te){var m=v("fast-isnumeric"),g=v("./loggers"),b=v("./identity"),y=v("../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 i(r,d){return r>=d}te.findBin=function(r,d,l){if(m(d.start))return l?Math.ceil((r-d.start)/d.size-1e-9)-1:Math.floor((r-d.start)/d.size+1e-9);var a,u,f=0,o=d.length,h=0,p=o>1?(d[o-1]-d[0])/(o-1):1;for(u=p>=0?l?e:n:l?i:t,r+=1e-9*p*(l?-1:1)*(p>=0?1:-1);f<o&&h++<100;)u(d[a=Math.floor((f+o)/2)],r)?f=a+1:o=a;return h>90&&g.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,l=r.slice();for(l.sort(te.sorterAsc),d=l.length-1;d>-1&&l[d]===y;d--);for(var a,u=l[d]-l[0]||1,f=u/(d||1)/1e4,o=[],h=0;h<=d;h++){var p=l[h],s=p-a;a===void 0?(o.push(p),a=p):s>f&&(u=Math.min(u,s),o.push(p),a=p)}return{vals:o,minDiff:u}},te.roundUp=function(r,d,l){for(var a,u=0,f=d.length-1,o=0,h=l?0:1,p=l?1:0,s=l?Math.ceil:Math.floor;u<f&&o++<100;)d[a=s((u+f)/2)]<=r?u=a+h:f=a-p;return d[u]},te.sort=function(r,d){for(var l=0,a=0,u=1;u<r.length;u++){var f=d(r[u],r[u-1]);if(f<0?l=1:f>0&&(a=1),l&&a)return r.sort(d)}return a?r:r.reverse()},te.findIndexOfMin=function(r,d){d=d||b;for(var l,a=1/0,u=0;u<r.length;u++){var f=d(r[u]);f<a&&(a=f,l=u)}return l}},{"../constants/numerical":479,"./identity":501,"./loggers":507,"fast-isnumeric":190}],524:[function(v,$,te){$.exports=function(m,g){(m.attr("class")||"").split(" ").forEach(function(b){b.indexOf("cursor-")===0&&m.classed(b,!1)}),g&&m.classed("cursor-"+g,!0)}},{}],525:[function(v,$,te){var m=v("../components/color"),g=function(){};$.exports=function(b){for(var y in b)typeof b[y]=="function"&&(b[y]=g);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=m.defaults[0],e.style.position="absolute",e.style.left=e.style.top="0px",e.style.width=e.style.height="100%",e.style["background-color"]=m.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%",
1215n.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(v,$,te){$.exports=function(m){return Object.keys(m).sort()}},{}],527:[function(v,$,te){var m=v("fast-isnumeric"),g=v("./array").isArrayOrTypedArray;te.aggNums=function(b,y,e,n){var t,i;if((!n||n>e.length)&&(n=e.length),m(y)||(y=!1),g(e[0])){for(i=new Array(n),t=0;t<n;t++)i[t]=te.aggNums(b,y,e[t]);e=i}for(t=0;t<n;t++)m(y)?m(e[t])&&(y=b(+y,+e[t])):y=e[t];return y},te.len=function(b){return te.aggNums(function(y){return y+1},0,b)},te.mean=function(b,y){return y||(y=te.len(b)),te.aggNums(function(e,n){return e+n},0,b)/y},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,y,e){return y||(y=te.len(b)),m(e)||(e=te.mean(b,y)),te.aggNums(function(n,t){return n+Math.pow(t-e,2)},0,b)/y},te.stdev=function(b,y,e){return Math.sqrt(te.variance(b,y,e))},te.median=function(b){var y=b.slice().sort();return te.interp(y,.5)},te.interp=function(b,y){if(!m(y))throw"n should be a finite number";if((y=y*b.length-.5)<0)return b[0];if(y>b.length-1)return b[b.length-1];var e=y%1;return e*b[Math.ceil(y)]+(1-e)*b[Math.floor(y)]}},{"./array":485,"fast-isnumeric":190}],528:[function(v,$,te){var m=v("color-normalize");$.exports=function(g){return g?m(g):[0,0,0,1]}},{"color-normalize":89}],529:[function(v,$,te){var m=v("@plotly/d3"),g=v("../lib"),b=g.strTranslate,y=v("../constants/xmlns_namespaces"),e=v("../constants/alignment").LINE_SPACING,n=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;te.convertToTspans=function(S,E,D){var F=S.text(),H=!S.attr("data-notex")&&E&&E._context.typesetMath&&typeof MathJax<"u"&&F.match(n),V=m.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(G){S.style("display","none");var W=parseInt(S.node().style.fontSize,10),Q={fontSize:W};(function(R,N,U){var ee,j,X,J,re=parseInt((MathJax.version||"").split(".")[0]);if(re!==2&&re!==3)return void g.warn("No MathJax version:",MathJax.version);var ne=function(){var oe="math-output-"+g.randstr({},64),pe=(J=m.select("body").append("div").attr({id:oe}).style({visibility:"hidden",position:"absolute","font-size":N.fontSize+"px"}).text(R.replace(t,"\\lt ").replace(i,"\\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?m.select("body").select("#MathJax_SVG_glyphs"):oe.select("defs"),U(oe,ce,de)}else g.log("There was an error in the tex syntax.",R),U();J.remove()};re===2?MathJax.Hub.Queue(function(){return j=g.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((ee=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},ne,se,function(){if(ee!=="SVG")return MathJax.Hub.setRenderer(ee)}
1215,function(){return X!==void 0&&(MathJax.Hub.processSectionDelay=X),MathJax.Hub.Config(j)}):re===3&&(j=g.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=r,(ee=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ne(),se(),ee!=="svg"&&(MathJax.config.startup.output=ee),MathJax.config=j}))})(H[2],Q,function(R,N,U){V.selectAll("svg."+Z).remove(),V.selectAll("g."+Z+"-group").remove();var ee=R&&R.select("svg");if(!ee||!ee.node())return K(),void G();var j=V.append("g").classed(Z+"-group",!0).attr({"pointer-events":"none","data-unformatted":F,"data-math":"Y"});j.node().appendChild(ee.node()),N&&N.node()&&ee.node().insertBefore(N.node().cloneNode(!0),ee.node().firstChild);var X=U.width,J=U.height;ee.attr({class:Z,height:J,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var re=S.node().style.fill||"black",ne=ee.select("g");ne.attr({fill:re,stroke:re});var se=ne.node().getBoundingClientRect(),oe=se.width,pe=se.height;(oe>X||pe>J)&&(ee.style("overflow","hidden"),oe=(se=ee.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 _e=S.attr("text-anchor");ce-=oe*(_e==="middle"?.5:_e==="end"?1:0),de=de+xe-pe/2}ee.attr({x:ce,y:de}),D&&D.call(S,j),G(j)})})):K(),S}function K(){V.empty()||(Z=S.attr("class")+"-math",V.select("svg."+Z).remove()),S.text("").style("white-space","pre"),function(G,W){W=W.replace(f," ");var Q,R=!1,N=[],U=-1;function ee(){U++;var fe=document.createElementNS(y.svg,"tspan");m.select(fe).attr({class:"line",dy:U*e+"em"}),G.appendChild(fe),Q=fe;var ge=N;if(N=[{node:fe}],ge.length>1)for(var ke=1;ke<ge.length;ke++)j(ge[ke])}function j(fe){var ge,ke=fe.type,be={};if(ke==="a"){ge="a";var Se=fe.target,Oe=fe.href,De=fe.popup;Oe&&(be={"xlink:xlink:show":Se==="_blank"||Se.charAt(0)!=="_"?"new":"replace",target:Se,"xlink:xlink:href":Oe},De&&(be.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+De+'");return false;'))}else ge="tspan";fe.style&&(be.style=fe.style);var je=document.createElementNS(y.svg,ge);if(ke==="sup"||ke==="sub"){X(Q,"\u200B"),Q.appendChild(je);var Je=document.createElementNS(y.svg,"tspan");X(Je,"\u200B"),m.select(Je).attr("dy",a[ke]),be.dy=l[ke],Q.appendChild(je),Q.appendChild(Je)}else Q.appendChild(je);m.select(je).attr(be),Q=fe.node=je,N.push(fe)}function X(fe,ge){fe.appendChild(document.createTextNode(ge))}function J(fe){if(N.length!==1){var ge=N.pop();fe!==ge.type&&g.log("Start tag <"+ge.type+"> doesnt match end tag <"+fe+">. Pretending it did match.",W),Q=N[N.length-1].node}else g.log("Ignoring unexpected end tag </"+fe+">.",W)}p.test(W)?ee():(Q=G,N=[{node:G}]);for(var re=W.split(o),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")ee();else if(ce===void 0)X(Q,A(se));else if(oe[1])J(pe);else{var de=oe[4],xe={type:pe},_e=_(de,s);if(_e?(_e=_e.replace(w,"$1 fill:"),ce&&(_e+=";"+ce)):ce&&(_e=ce),_e&&(xe.style=_e),pe==="a"){R=!0;var we=_(de,x);if(we){var Ee=I(we);Ee&&(xe.href=Ee,xe.target=_(de,c)||"_blank",xe.popup=_(de,T))}}j(xe)}}return R}(S.node(),F)&&S.style("pointer-events","all"),te.positionText(S),D&&D.call(S)}};var t=/(<|<|<)/g,i=/(>|>|>)/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"},l={sub:"0.3em",sup:"-0.6em"},a={sub:"-0.21em",sup:"0.42em"},u=["http:","https:","mailto:","",void 0,":"],f=te.NEWLINES=/(\r\n?|\n)/g,o=/(<[^<>]*>)/,h=/<(\/?)([^ >]*)(\s+(.*))?>/i,p=/<br(\s+.*)?>/i;te.BR_TAG_ALL=/<br(\s+.*)?>/gi;var s=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,c=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\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 w=/(^|;)\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(o),Z=[],K="",G=0,W=0;W<V.length;W++){var Q=V[W],R=Q.match(h),N=R&&R[2].toLowerCase();if(N)F.indexOf(N)!==-1&&(Z.push(Q),K=N);else{var U=Q.length;if(G+U<D)Z.push(Q),G+=U;else if(G<D){var ee=D-G;K&&(K!=="br"||ee<=H||U<=H)&&Z.pop(),D>H?Z.push(Q.substr(0,ee-H)+"..."):Z.push(Q.substr(0,ee));break}K=""}}return Z.join("")};var k={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},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",G=S.node().getBoundingClientRect(),W=E.node().getBoundingClientRect();return H=K==="bottom"?function(){return G.bottom-F.height}:K==="middle"?function(){return G.top+(G.height-F.height)/2}:function(){return G.top},V=Z==="right"?function(){return G.right-F.width}:Z==="center"?function(){return G.left+(G.width-F.width)/2}:function(){return G.left},function(){F=this.node().getBoundingClientRect();var Q=V()-W.left,R=H()-W.top,N=D.gd||{};if(D.gd){N._fullLayout._calcInverseTransform(N);var U=g.apply3DTransform(N._fullLayout._invTransform)(Q,R);Q=U[0],R=U[1]}return this.style({top:R+"px",left:Q+"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(o),V=0;V<H.length;V++){var Z=H[V],K=Z.match(h),G=K&&K[2].toLowerCase();if(G in d)if(K[1])F.length&&(D=F.pop());else{var W=K[4],Q=_(W,s),R=Q?{style:Q}:{};if(G==="a"){var N=_(W,x);if(N){var U=I(N);if(U){R.href=U;var ee=_(W,c);ee&&(R.target=ee)}}}var j=document.createElement(G);D.appendChild(j),m.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=m.select(this);function H(K,G){return G===void 0?(G=F.attr(K))===null&&(F.attr(K,0),G=0):F.attr(K,G),G}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=m.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 Q=m.select(D).select(".svg-container"),R=Q.append("div"),N=S.node().style,U=parseFloat(N.fontSize||12),ee=E.text;ee===void 0&&(ee=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(ee).call(P(S,Q,E)).on("blur",function(){D._editing=!1,S.text(this.textContent).style({opacity:1});var j,X=m.select(this).attr("class");(j=X?"."+X.split(" ")[0]+"-math-group":"[class*=-math-group]")&&m.select(S.node().parentNode).select(j).style({opacity:0}
1215);var J=this.textContent;m.select(this).transition().duration(0).remove(),m.select(document).on("mouseup",null),H.edit.call(S,J)}).on("focus",function(){var j=this;D._editing=!0,m.select(document).on("mouseup",function(){if(m.event.target===j)return!1;document.activeElement===R.node()&&R.node().blur()})}).on("keyup",function(){m.event.which===27?(D._editing=!1,S.style({opacity:1}),m.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),H.cancel.call(S,this.textContent)):(H.input.call(S,this.textContent),m.select(this).call(P(S,Q,E)))}).on("keydown",function(){m.event.which===13&&this.blur()}).call(K)})(),S.style({opacity:0});var G,W=V.attr("class");(G=W?"."+W.split(" ")[0]+"-math-group":"[class*=-math-group]")&&m.select(S.node().parentNode).select(G).style({opacity:0})}function K(G){var W=G.node(),Q=document.createRange();Q.selectNodeContents(W);var R=window.getSelection();R.removeAllRanges(),R.addRange(Q),W.focus()}return E.immediate?Z():V.on("click",Z),m.rebind(S,H,"on")}},{"../constants/alignment":471,"../constants/xmlns_namespaces":480,"../lib":503,"@plotly/d3":58}],530:[function(v,$,te){var m={};function g(b){b&&b.timer!==null&&(clearTimeout(b.timer),b.timer=null)}te.throttle=function(b,y,e){var n=m[b],t=Date.now();if(!n){for(var i in m)m[i].ts<t-6e4&&delete m[i];n=m[b]={ts:0,timer:null}}function r(){e(),n.ts=Date.now(),n.onDone&&(n.onDone(),n.onDone=null)}g(n),t>n.ts+y?r():n.timer=setTimeout(function(){r(),n.timer=null},y)},te.done=function(b){var y=m[b];return y&&y.timer?new Promise(function(e){var n=y.onDone;y.onDone=function(){n&&n(),e(),y.onDone=null}}):Promise.resolve()},te.clear=function(b){if(b)g(m[b]),delete m[b];else for(var y in m)te.clear(y)}},{}],531:[function(v,$,te){var m=v("fast-isnumeric");$.exports=function(g,b){if(g>0)return Math.log(g)/Math.LN10;var y=Math.log(Math.min(b[0],b[1]))/Math.LN10;return m(y)||(y=Math.log(Math.max(b[0],b[1]))/Math.LN10-6),y}},{"fast-isnumeric":190}],532:[function(v,$,te){var m=$.exports={},g=v("../plots/geo/constants").locationmodeToLayer,b=v("topojson-client").feature;m.getTopojsonName=function(y){return[y.scope.replace(/ /g,"-"),"_",y.resolution.toString(),"m"].join("")},m.getTopojsonPath=function(y,e){return y+e+".json"},m.getTopojsonFeatures=function(y,e){var n=g[y.locationmode],t=e.objects[n];return b(e,t).features}},{"../plots/geo/constants":587,"topojson-client":315}],533:[function(v,$,te){$.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],534:[function(v,$,te){$.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(v,$,te){var m=v("../registry");$.exports=function(g){for(var b,y,e=m.layoutArrayContainers,n=m.layoutArrayRegexes,t=g.split("[")[0],i=0;i<n.length;i++)if((y=g.match(n[i]))&&y.index===0){b=y[0];break}if(b||(b=e[e.indexOf(t)]),!b)return!1;var r=g.substr(b.length);return r?!!(y=r.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:b,index:Number(y[1]),property:y[3]||""}:{array:b,index:"",property:""}}},{"../registry":638}],536:[function(v,$,te){var m=v("../lib"),g=m.extendFlat,b=m.isPlainObject,y={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=y.flags.slice().concat(["fullReplot"]),t=e.flags.slice().concat("layoutReplot");function i(l){for(var a={},u=0;u<l.length;u++)a[l[u]]=!1;return a}function r(l,a,u){var f=g({},l);for(var o in f){var h=f[o];b(h)&&(f[o]=d(h,a,u,o))}return u==="from-root"&&(f.editType=a),f}function d(l,a,u,f){if(l.valType){var o=g({},l);if(o.editType=a,Array.isArray(l.items)){o.items=new Array(l.items.length);for(var h=0;h<l.items.length;h++)o.items[h]=d(l.items[h],a)}return o}return r(l,a,f.charAt(0)==="_"?"nested":"from-root")}$.exports={traces:y,layout:e,traceFlags:function(){return i(n)},layoutFlags:function(){return i(t)},update:function(l,a){var u=a.editType;if(u&&u!=="none")for(var f=u.split("+"),o=0;o<f.length;o++)l[f[o]]=!0},overrideAll:r}},{"../lib":503}],537:[function(v,$,te){var m=v("fast-isnumeric"),g=v("gl-mat4/fromQuat"),b=v("../registry"),y=v("../lib"),e=v("../plots/plots"),n=v("../plots/cartesian/axis_ids"),t=v("../components/color"),i=n.cleanId,r=n.getFromTrace,d=b.traceIs;function l(c,T){var _=c[T],w=T.charAt(0);_&&_!=="paper"&&(c[T]=i(_,w,!0))}function a(c){function T(_,w){var k=c[_],L=c.title&&c.title[w];k&&!L&&(c.title||(c.title={}),c.title[w]=c[_],delete c[_])}c&&(typeof c.title!="string"&&typeof c.title!="number"||(c.title={text:c.title}),T("titlefont","font"),T("titleposition","position"),T("titleside","side"),T("titleoffset","offset"))}function u(c){if(!y.isPlainObject(c))return!1;var T=c.name;return delete c.name,delete c.showlegend,(typeof T=="string"||typeof T=="number")&&Str
1215ing(T)}function f(c,T,_,w){if(_&&!w)return c;if(w&&!_||!c.trim())return T;if(!T.trim())return c;var k,L=Math.min(c.length,T.length);for(k=0;k<L&&c.charAt(k)===T.charAt(k);k++);return c.substr(0,k).trim()}function o(c){var T="middle",_="center";return typeof c=="string"&&(c.indexOf("top")!==-1?T="top":c.indexOf("bottom")!==-1&&(T="bottom"),c.indexOf("left")!==-1?_="left":c.indexOf("right")!==-1&&(_="right")),T+" "+_}function h(c,T){return T in c&&typeof c[T]=="object"&&Object.keys(c[T]).length===0}te.clearPromiseQueue=function(c){Array.isArray(c._promises)&&c._promises.length>0&&y.log("Clearing previous rejected promises from queue."),c._promises=[]},te.cleanLayout=function(c){var T,_;c||(c={}),c.xaxis1&&(c.xaxis||(c.xaxis=c.xaxis1),delete c.xaxis1),c.yaxis1&&(c.yaxis||(c.yaxis=c.yaxis1),delete c.yaxis1),c.scene1&&(c.scene||(c.scene=c.scene1),delete c.scene1);var w=(e.subplotsRegistry.cartesian||{}).attrRegex,k=(e.subplotsRegistry.polar||{}).attrRegex,L=(e.subplotsRegistry.ternary||{}).attrRegex,A=(e.subplotsRegistry.gl3d||{}).attrRegex,I=Object.keys(c);for(T=0;T<I.length;T++){var P=I[T];if(w&&w.test(P)){var S=c[P];S.anchor&&S.anchor!=="free"&&(S.anchor=i(S.anchor)),S.overlaying&&(S.overlaying=i(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),a(S)}else if(k&&k.test(P))a(c[P].radialaxis);else if(L&&L.test(P)){var E=c[P];a(E.aaxis),a(E.baxis),a(E.caxis)}else if(A&&A.test(P)){var D=c[P],F=D.cameraposition;if(Array.isArray(F)&&F[0].length===4){var H=F[0],V=F[1],Z=F[2],K=g([],H),G=[];for(_=0;_<3;++_)G[_]=V[_]+Z*K[2+4*_];D.camera={eye:{x:G[0],y:G[1],z:G[2]},center:{x:V[0],y:V[1],z:V[2]},up:{x:0,y:0,z:1}},delete D.cameraposition}a(D.xaxis),a(D.yaxis),a(D.zaxis)}}var W=Array.isArray(c.annotations)?c.annotations.length:0;for(T=0;T<W;T++){var Q=c.annotations[T];y.isPlainObject(Q)&&(Q.ref&&(Q.ref==="paper"?(Q.xref="paper",Q.yref="paper"):Q.ref==="data"&&(Q.xref="x",Q.yref="y"),delete Q.ref),l(Q,"xref"),l(Q,"yref"))}var R=Array.isArray(c.shapes)?c.shapes.length:0;for(T=0;T<R;T++){var N=c.shapes[T];y.isPlainObject(N)&&(l(N,"xref"),l(N,"yref"))}var U=Array.isArray(c.images)?c.images.length:0;for(T=0;T<U;T++){var ee=c.images[T];y.isPlainObject(ee)&&(l(ee,"xref"),l(ee,"yref"))}var j=c.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")),a(c),c.dragmode==="rotate"&&(c.dragmode="orbit"),t.clean(c),c.template&&c.template.layout&&te.cleanLayout(c.template.layout),c},te.cleanData=function(c){for(var T=0;T<c.length;T++){var _,w=c[T];if(w.type==="histogramy"&&"xbins"in w&&!("ybins"in w)&&(w.ybins=w.xbins,delete w.xbins),w.error_y&&"opacity"in w.error_y){var k=t.defaults,L=w.error_y.color||(d(w,"bar")?t.defaultLine:k[T%k.length]);w.error_y.color=t.addOpacity(t.rgb(L),t.opacity(L)*w.error_y.opacity),delete w.error_y.opacity}if("bardir"in w&&(w.bardir!=="h"||!d(w,"bar")&&w.type.substr(0,9)!=="histogram"||(w.orientation="h",te.swapXYData(w)),delete w.bardir),w.type==="histogramy"&&te.swapXYData(w),w.type!=="histogramx"&&w.type!=="histogramy"||(w.type="histogram"),"scl"in w&&!("colorscale"in w)&&(w.colorscale=w.scl,delete w.scl),"reversescl"in w&&!("reversescale"in w)&&(w.reversescale=w.reversescl,delete w.reversescl),w.xaxis&&(w.xaxis=i(w.xaxis,"x")),w.yaxis&&(w.yaxis=i(w.yaxis,"y")),d(w,"gl3d")&&w.scene&&(w.scene=e.subplotsRegistry.gl3d.cleanId(w.scene)),!d(w,"pie-like")&&!d(w,"bar-like"))if(Array.isArray(w.textposition))for(_=0;_<w.textposition.length;_++)w.textposition[_]=o(w.textposition[_]);else w.textposition&&(w.textposition=o(w.textposition));var A=b.getModule(w);if(A&&A.colorbar){var I=A.colorbar.container,P=I?w[I]:w;P&&P.colorscale&&(P.colorscale==="YIGnBu"&&(P.colorscale="YlGnBu"),P.colorscale==="YIOrRd"&&(P.colorscale="YlOrRd"))}if(w.type==="surface"&&y.isPlainObject(w.contours)){var S=["x","y","z"];for(_=0;_<S.length;_++){var E=w.contours[S[_]];y.isPlainObject(E)&&(E.highlightColor&&(E.highlightcolor=E.highlightColor,delete E.highlightColor),E.highlightWidth&&(E.highlightwidth=E.highlightWidth,delete E.highlightWidth))}}if(w.type==="candlestick"||w.type==="ohlc"){var D=(w.increasing||{}).showlegend!==!1,F=(w.decreasing||{}).showlegend!==!1,H=u(w.increasing),V=u(w.decreasing);if(H!==!1&&V!==!1){var Z=f(H,V,D,F);Z&&(w.name=Z)}else!H&&!V||w.name||(w.name=H||V)}if(Array.isArray(w.transforms)){var K=w.transforms;for(_=0;_<K.length;_++){var G=K[_];if(y.isPlainObject(G))switch(G.type){case"filter":G.filtersrc&&(G.target=G.filtersrc,delete G.filtersrc),G.calendar&&(G.valuecalendar||(G.valuecalendar=G.calendar),delete G.calendar);break;
1215case"groupby":if(G.styles=G.styles||G.style,G.styles&&!Array.isArray(G.styles)){var W=G.styles,Q=Object.keys(W);G.styles=[];for(var R=0;R<Q.length;R++)G.styles.push({target:Q[R],value:W[Q[R]]})}}}}h(w,"line")&&delete w.line,"marker"in w&&(h(w.marker,"line")&&delete w.marker.line,h(w,"marker")&&delete w.marker),t.clean(w),w.autobinx&&(delete w.autobinx,delete w.xbins),w.autobiny&&(delete w.autobiny,delete w.ybins),a(w),w.colorbar&&a(w.colorbar),w.marker&&w.marker.colorbar&&a(w.marker.colorbar),w.line&&w.line.colorbar&&a(w.line.colorbar),w.aaxis&&a(w.aaxis),w.baxis&&a(w.baxis)}},te.swapXYData=function(c){var T;if(y.swapAttrs(c,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(c.z)&&Array.isArray(c.z[0])&&(c.transpose?delete c.transpose:c.transpose=!0),c.error_x&&c.error_y){var _=c.error_y,w="copy_ystyle"in _?_.copy_ystyle:!(_.color||_.thickness||_.width);y.swapAttrs(c,["error_?.copy_ystyle"]),w&&y.swapAttrs(c,["error_?.color","error_?.thickness","error_?.width"])}if(typeof c.hoverinfo=="string"){var k=c.hoverinfo.split("+");for(T=0;T<k.length;T++)k[T]==="x"?k[T]="y":k[T]==="y"&&(k[T]="x");c.hoverinfo=k.join("+")}},te.coerceTraceIndices=function(c,T){if(m(T))return[T];if(!Array.isArray(T)||!T.length)return c.data.map(function(k,L){return L});if(Array.isArray(T)){for(var _=[],w=0;w<T.length;w++)y.isIndex(T[w],c.data.length)?_.push(T[w]):y.warn("trace index (",T[w],") is not a number or is out of bounds");return _}return T},te.manageArrayContainers=function(c,T,_){var w=c.obj,k=c.parts,L=k.length,A=k[L-1],I=m(A);if(I&&T===null){var P=k.slice(0,L-1).join(".");y.nestedProperty(w,P).get().splice(A,1)}else I&&c.get()===void 0&&c.get()===void 0&&(_[c.astr]=null),c.set(T)};var p=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function s(c){var T=c.search(p);if(T>0)return c.substr(0,T)}te.hasParent=function(c,T){for(var _=s(T);_;){if(_ in c)return!0;_=s(_)}return!1};var x=["x","y","z"];te.clearAxisTypes=function(c,T,_){for(var w=0;w<T.length;w++)for(var k=c._fullData[w],L=0;L<3;L++){var A=r(c,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&&y.nestedProperty(c.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(v,$,te){var m=v("./plot_api");te._doPlot=m._doPlot,te.newPlot=m.newPlot,te.restyle=m.restyle,te.relayout=m.relayout,te.redraw=m.redraw,te.update=m.update,te._guiRestyle=m._guiRestyle,te._guiRelayout=m._guiRelayout,te._guiUpdate=m._guiUpdate,te._storeDirectGUIEdit=m._storeDirectGUIEdit,te.react=m.react,te.extendTraces=m.extendTraces,te.prependTraces=m.prependTraces,te.addTraces=m.addTraces,te.deleteTraces=m.deleteTraces,te.moveTraces=m.moveTraces,te.purge=m.purge,te.addFrames=m.addFrames,te.deleteFrames=m.deleteFrames,te.animate=m.animate,te.setPlotConfig=m.setPlotConfig,te.toImage=v("./to_image"),te.validate=v("./validate"),te.downloadImage=v("../snapshot/download");var g=v("./template_api");te.makeTemplate=g.makeTemplate,te.validateTemplate=g.validateTemplate},{"../snapshot/download":640,"./plot_api":540,"./template_api":545,"./to_image":546,"./validate":547}],539:[function(v,$,te){var m=v("../lib/is_plain_object"),g=v("../lib/noop"),b=v("../lib/loggers"),y=v("../lib/search").sorterAsc,e=v("../registry");te.containerArrayMatch=v("./container_array_match");var n=te.isAddVal=function(i){return i==="add"||m(i)},t=te.isRemoveVal=function(i){return i===null||i==="remove"};te.applyContainerArrayChanges=function(i,r,d,l,a){var u=r.astr,f=e.getComponentMethod(u,"supplyLayoutDefaults"),o=e.getComponentMethod(u,"draw"),h=e.getComponentMethod(u,"drawOne"),p=l.replot||l.recalc||f===g||o===g,s=i.layout,x=i._fullLayout;if(d[""]){Object.keys(d).length>1&&b.warn("Full array edits are incompatible with other edits",u);var c=d[""][""];if(t(c))r.set(null);else{if(!Array.isArray(c))return b.warn("Unrecognized full array edit value",u,c),!0;r.set(c)}return!p&&(f(s,x),o(i),!0)}var T,_,w,k,L,A,I,P,S=Object.keys(d).map(Number).sort(y),E=r.get(),D=E||[],F=a(x,u).get(),H=[],V=-1,Z=D.length;for(T=0;T<S.length;T++)if(k=d[w=S[T]],L=Object.keys(k),A=k[""],I=n(A),w<0||w>D.length-(I?0:1))b.warn("index out of range",u,w);else if(A!==void 0)L.length>1&&b.warn("Insertion & removal are incompatible with edits to the same index.",u,w),t(A)?H.push(w):I?(A==="add"&&(A={}),D.splice(w,0,A),F&&F.splice(w,0,{})):b.warn("Unrecognized full object edit value",u,w,A),V===-1&&(V=w);else for(_=0;_<L.length;_++)P=u+"["+w+"].",a(D[w],L[_],P).set(k[L[_]]);for(T=H.length-1;T>=0;T--)D.splice(H[T],1),F&&F.splice(H[T],1);if(D.length?E||r.set(D):r.set(null),p)return!1;if(f(s,x),h!==g){var K;if(V===-1)K=S;else{for(Z=Math.max(D.length,Z),K=[],T=0;T<S.length&&!((w=S[T])>=V);T++)K.push(w);for(T=V;T<Z;T++)K.push(T)}for(T=0;T<K.length;T++)h(i,K[T])}else o(i);return!0}},{"../lib/is_plain_object":504,"../lib/loggers":507,"../lib/noop":512,"../lib/search":523,"../registry":638,"./container_array_match":535}],540:[function(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("has-hover"),y=v("../lib"),e=y.nestedProperty,n=v("../lib/events"),t=v("../lib/queue"),i=v("../registry"),r=v("./plot_schema"),d=v("../plots/plots"),l=v("../plots/cartesian/axes"),a=v("../components/drawing"),u=v("../components/color"),f=v("../plots/cartesian/gra
1215ph_interact").initInteractions,o=v("../constants/xmlns_namespaces"),h=v("../plots/cartesian/select").clearSelect,p=v("./plot_config").dfltConfig,s=v("./manage_arrays"),x=v("./helpers"),c=v("./subroutines"),T=v("./edit_types"),_=v("../plots/cartesian/constants").AX_NAME_PATTERN,w=0;function k(fe){var ge=fe._fullLayout;ge._redrawFromAutoMarginCount?ge._redrawFromAutoMarginCount--:fe.emit("plotly_afterplot")}function L(fe,ge){try{fe._fullLayout._paper.style("background",ge)}catch(ke){y.error(ke)}}function A(fe,ge){L(fe,u.combine(ge,"white"))}function I(fe,ge){if(!fe._context){fe._context=y.extendDeep({},p);var ke=m.select("base");fe._context._baseUrl=ke.size()&&ke.attr("href")?window.location.href.split("#")[0]:""}var be,Se,Oe,De=fe._context;if(ge){for(Se=Object.keys(ge),be=0;be<Se.length;be++)(Oe=Se[be])!=="editable"&&Oe!=="edits"&&Oe in De&&(Oe==="setBackground"&&ge[Oe]==="opaque"?De[Oe]=A:De[Oe]=ge[Oe]);ge.plot3dPixelRatio&&!De.plotGlPixelRatio&&(De.plotGlPixelRatio=De.plot3dPixelRatio);var je=ge.editable;if(je!==void 0)for(De.editable=je,Se=Object.keys(De.edits),be=0;be<Se.length;be++)De.edits[Se[be]]=je;if(ge.edits)for(Se=Object.keys(ge.edits),be=0;be<Se.length;be++)(Oe=Se[be])in De.edits&&(De.edits[Oe]=ge.edits[Oe]);De._exportedPlot=ge._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 Je=De.scrollZoom,ze=De._scrollZoom={};if(Je===!0)ze.cartesian=1,ze.gl3d=1,ze.geo=1,ze.mapbox=1;else if(typeof Je=="string"){var Ue=Je.split("+");for(be=0;be<Ue.length;be++)ze[Ue[be]]=1}else Je!==!1&&(ze.gl3d=1,ze.geo=1,ze.mapbox=1)}function P(fe,ge){var ke,be,Se=ge+1,Oe=[];for(ke=0;ke<fe.length;ke++)(be=fe[ke])<0?Oe.push(Se+be):Oe.push(be);return Oe}function S(fe,ge,ke){var be,Se;for(be=0;be<ge.length;be++){if((Se=ge[be])!==parseInt(Se,10))throw new Error("all values in "+ke+" must be integers");if(Se>=fe.data.length||Se<-fe.data.length)throw new Error(ke+" must be valid indices for gd.data.");if(ge.indexOf(Se,be+1)>-1||Se>=0&&ge.indexOf(-fe.data.length+Se)>-1||Se<0&&ge.indexOf(fe.data.length+Se)>-1)throw new Error("each index in "+ke+" must be unique.")}}function E(fe,ge,ke){if(!Array.isArray(fe.data))throw new Error("gd.data must be an array.");if(ge===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ge)||(ge=[ge]),S(fe,ge,"currentIndices"),ke===void 0||Array.isArray(ke)||(ke=[ke]),ke!==void 0&&S(fe,ke,"newIndices"),ke!==void 0&&ge.length!==ke.length)throw new Error("current and new indices must be of equal length.")}function D(fe,ge,ke,be,Se){(function(Ye,et,ct,mt){var Ct=y.isPlainObject(mt);if(!Array.isArray(Ye.data))throw new Error("gd.data must be an array");if(!y.isPlainObject(et))throw new Error("update must be a key:value object");if(ct===void 0)throw new Error("indices must be an integer or array of integers");for(var Tt in S(Ye,ct,"indices"),et){if(!Array.isArray(et[Tt])||et[Tt].length!==ct.length)throw new Error("attribute "+Tt+" must be an array of length equal to indices array length");if(Ct&&(!(Tt in mt)||!Array.isArray(mt[Tt])||mt[Tt].length!==et[Tt].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,ge,ke,be);for(var Oe=function(Ye,et,ct,mt){var Ct,Tt,nt,Qe,Et,Gt=y.isPlainObject(mt),Xt=[];for(var Fe in Array.isArray(ct)||(ct=[ct]),ct=P(ct,Ye.data.length-1),et)for(var qe=0;qe<ct.length;qe++){if(Ct=Ye.data[ct[qe]],Tt=(nt=e(Ct,Fe)).get(),Qe=et[Fe][qe],!y.isArrayOrTypedArray(Qe))throw new Error("attribute: "+Fe+" index: "+qe+" must be an array");if(!y.isArrayOrTypedArray(Tt))throw new Error("cannot extend missing or non-array attribute: "+Fe);if(Tt.constructor!==Qe.constructor)throw new Error("cannot extend array with an array of a different type: "+Fe);Et=Gt?mt[Fe][qe]:mt,g(Et)||(Et=-1),Xt.push({prop:nt,target:Tt,insert:Qe,maxp:Math.floor(Et)})}return Xt}(fe,ge,ke,be),De={},je={},Je=0;Je<Oe.length;Je++){var ze=Oe[Je].prop,Ue=Oe[Je].maxp,Ge=Se(Oe[Je].target,Oe[Je].insert,Ue);ze.set(Ge[0]),Array.isArray(De[ze.astr])||(De[ze.astr]=[]),De[ze.astr].push(Ge[1]),Array.isArray(je[ze.astr])||(je[ze.astr]=[]),je[ze.astr].push(Oe[Je].target.length)}return{update:De,maxPoints:je}}function F(fe,ge){var ke=new fe.constructor(fe.length+ge.length);return ke.set(fe),ke.set(ge,fe.length),ke}function H(fe,ge,ke,be){fe=y.getGraphDiv(fe),x.clearPromiseQueue(fe);var Se={};if(typeof ge=="string")Se[ge]=ke;else{if(!y.isPlainObject(ge))return y.warn("Restyle fail.",ge,ke,be),Promise.reject();Se=y.extendFlat({},ge),be===void 0&&(be=ke)}Object.keys(Se).length&&(fe.changed=!0);var Oe=x.coerceTraceIndices(fe,be),De=G(fe,Se,Oe),je=De.flags;je.calc&&(fe.calcdata=void 0),je.clearAxisTypes&&x.clearAxisTypes(fe,Oe,{});var Je=[];je.fullReplot?Je.push(te._doPlot):(Je.push(d.previousPromises),d.supplyDefaults(fe),je.markerSize&&(d.doCalcdata(fe),N(Je)),je.style&&Je.push(c.doTraceStyle),je.colorbars&&Je.push(c.doColorBars),Je.push(k)),Je.push(d.rehover,d.redrag),t.add(fe,H,[fe,De.undoit,De.traces],H,[fe,De.redoit,De.traces]);var ze=y.syncOrAsync(Je,fe);return ze&&ze.then||(ze=Promise.resolve()),ze.then(function(){return fe.emit("plotly_restyle",De.eventData),fe})}function V(fe){return fe===void 0?null:fe}function Z(fe,ge){return ge?function(ke,be,Se){var Oe=e(ke,be),De=Oe.set;return Oe.set=function(je){K((Se||"")+be,Oe.get(),je,fe),De(je)},Oe}:e}function K(fe,ge,ke,be){if(Array.isArray(ge)||Array.isArray(ke))for(var Se=Array.isArray(ge)?ge:[],Oe=Array.isArray(ke)?ke:[],De=Math.max(Se.length,Oe.length),je=0;je<De;je++)K(fe+"["+je+"]",Se[je],Oe[je],be);else if(y.isPlainObject(ge)||y.isPlainObject(ke)){var Je=y.isPlainObject(ge)?ge:{},ze=y.isPlainObject(ke)?ke:{},Ue=y.extendFlat({},Je,ze);for(var Ge in Ue)K(fe+"."+Ge,Je[Ge],ze[Ge],be)}else be[fe]===void 0&&(be[fe]=V(ge))}function G(fe,ge,ke){var be,Se=fe._fullLayout,Oe=fe._fullData,De=fe.data,je=Se._guiEditing,Je=Z(Se._preGUI,je),ze=y.extendDeepAll({},ge);W(ge);var Ue,Ge=T.traceFlags(),Ye={},et={};function ct(){return ke.map(function(){})}function mt(it){var At=l.id2name(it);Ue.indexOf(At)===-1&&Ue.push(At)}function Ct(it){return"LAYOUT"+it+".autorange"}function Tt(it){return"LAYOUT"+it+".range"}function nt(it){for(var At=it;At<Oe.length;At++)if(Oe[At]._input===De[it])return Oe[At]}function Qe(it,At,It){if(Array.isArray(it))it.forEach(function(Vt){Qe(Vt,At,It)});else if(!(it in ge)&&!x.hasParent(ge,it)){var Zt;if(it.substr(0,6)==="LAYOUT")Zt=Je(fe.layout,it.replace("LAYOUT",""));else{var Jt=ke[It];Zt=Z(Se._tracePreGUI[nt(Jt)._fullInput.uid],je)(De[Jt],it)}it in et||(et[it]=ct()),et[it][It]===void 0&&(et[it][It]=V(Zt.get())),At!==void 0&&Zt.set(At)}}function Et(it){return function(At){return Oe[At][it]}}function Gt(it){return function(At,It){return At===!1?Oe[ke[It]][it]:null}}for(var Xt in ge){if(x.hasParent(ge,Xt))throw new Error("cannot set "+Xt+" and a parent attribute simultaneously");var Fe,qe,wt,ft,Ce,Ie,Te=ge[Xt];
1215if(Xt!=="autobinx"&&Xt!=="autobiny"||(Xt=Xt.charAt(Xt.length-1)+"bins",Te=Array.isArray(Te)?Te.map(Gt(Xt)):Te===!1?ke.map(Et(Xt)):null),Ye[Xt]=Te,Xt.substr(0,6)!=="LAYOUT"){for(et[Xt]=ct(),be=0;be<ke.length;be++)if(Fe=De[ke[be]],qe=nt(ke[be]),ft=(wt=Z(Se._tracePreGUI[qe._fullInput.uid],je)(Fe,Xt)).get(),(Ce=Array.isArray(Te)?Te[be%Te.length]:Te)!==void 0){var Pe=wt.parts[wt.parts.length-1],Ve=Xt.substr(0,Xt.length-Pe.length-1),tt=Ve?Ve+".":"",ot=Ve?e(qe,Ve).get():qe;if((Ie=r.getTraceValObject(qe,wt.parts))&&Ie.impliedEdits&&Ce!==null)for(var at in Ie.impliedEdits)Qe(y.relativeAttr(Xt,at),Ie.impliedEdits[at],be);else if(Pe!=="thicknessmode"&&Pe!=="lenmode"||ft===Ce||Ce!=="fraction"&&Ce!=="pixels"||!ot){if(Xt==="type"&&(Ce==="pie"!=(ft==="pie")||Ce==="funnelarea"!=(ft==="funnelarea"))){var _t="x",bt="y";Ce!=="bar"&&ft!=="bar"||Fe.orientation!=="h"||(_t="y",bt="x"),y.swapAttrs(Fe,["?","?src"],"labels",_t),y.swapAttrs(Fe,["d?","?0"],"label",_t),y.swapAttrs(Fe,["?","?src"],"values",bt),ft==="pie"||ft==="funnelarea"?(e(Fe,"marker.color").set(e(Fe,"marker.colors").get()),Se._pielayer.selectAll("g.trace").remove()):i.traceIs(Fe,"cartesian")&&e(Fe,"marker.colors").set(e(Fe,"marker.color").get())}}else{var jt=Se._size,Nt=ot.orient,$e=Nt==="top"||Nt==="bottom";if(Pe==="thicknessmode"){var yt=$e?jt.h:jt.w;Qe(tt+"thickness",ot.thickness*(Ce==="fraction"?1/yt:yt),be)}else{var Ot=$e?jt.w:jt.h;Qe(tt+"len",ot.len*(Ce==="fraction"?1/Ot:Ot),be)}}if(et[Xt][be]=V(ft),["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(Xt)!==-1){if(Xt==="orientation"){wt.set(Ce);var Mt=Fe.x&&!Fe.y?"h":"v";if((wt.get()||Mt)===qe.orientation)continue}else Xt==="orientationaxes"&&(Fe.orientation={v:"h",h:"v"}[qe.orientation]);x.swapXYData(Fe),Ge.calc=Ge.clearAxisTypes=!0}else d.dataArrayContainers.indexOf(wt.parts[0])!==-1?(x.manageArrayContainers(wt,Ce,et),Ge.calc=!0):(Ie?Ie.arrayOk&&!i.traceIs(qe,"regl")&&(y.isArrayOrTypedArray(Ce)||y.isArrayOrTypedArray(ft))?Ge.calc=!0:T.update(Ge,Ie):Ge.calc=!0,wt.set(Ce))}if(["swapxyaxes","orientationaxes"].indexOf(Xt)!==-1&&l.swap(fe,ke),Xt==="orientationaxes"){var Pt=e(fe.layout,"hovermode"),Le=Pt.get();Le==="x"?Pt.set("y"):Le==="y"?Pt.set("x"):Le==="x unified"?Pt.set("y unified"):Le==="y unified"&&Pt.set("x unified")}if(["orientation","type"].indexOf(Xt)!==-1){for(Ue=[],be=0;be<ke.length;be++){var Xe=De[ke[be]];i.traceIs(Xe,"cartesian")&&(mt(Xe.xaxis||"x"),mt(Xe.yaxis||"y"))}Qe(Ue.map(Ct),!0,0),Qe(Ue.map(Tt),[0,1],0)}}else wt=Je(fe.layout,Xt.replace("LAYOUT","")),et[Xt]=[V(wt.get())],wt.set(Array.isArray(Te)?Te[0]:Te),Ge.calc=!0}return(Ge.calc||Ge.plot)&&(Ge.fullReplot=!0),{flags:Ge,undoit:et,redoit:Ye,traces:ke,eventData:y.extendDeepNoArrays([],[ze,ke])}}function W(fe){var ge,ke,be,Se=y.counterRegex("axis",".title",!1,!1),Oe=/colorbar\.title$/,De=Object.keys(fe);for(ge=0;ge<De.length;ge++)ke=De[ge],be=fe[ke],ke!=="title"&&!Se.test(ke)&&!Oe.test(ke)||typeof be!="string"&&typeof be!="number"?ke.indexOf("titlefont")>-1&&ke.indexOf("grouptitlefont")===-1?je(ke,ke.replace("titlefont","title.font")):ke.indexOf("titleposition")>-1?je(ke,ke.replace("titleposition","title.position")):ke.indexOf("titleside")>-1?je(ke,ke.replace("titleside","title.side")):ke.indexOf("titleoffset")>-1&&je(ke,ke.replace("titleoffset","title.offset")):je(ke,ke.replace("title","title.text"));function je(Je,ze){fe[ze]=fe[Je],delete fe[Je]}}function Q(fe,ge,ke){fe=y.getGraphDiv(fe),x.clearPromiseQueue(fe);var be={};if(typeof ge=="string")be[ge]=ke;else{if(!y.isPlainObject(ge))return y.warn("Relayout fail.",ge,ke),Promise.reject();be=y.extendFlat({},ge)}Object.keys(be).length&&(fe.changed=!0);var Se=X(fe,be),Oe=Se.flags;Oe.calc&&(fe.calcdata=void 0);var De=[d.previousPromises];Oe.layoutReplot?De.push(c.layoutReplot):Object.keys(be).length&&(R(fe,Oe,Se)||d.supplyDefaults(fe),Oe.legend&&De.push(c.doLegend),Oe.layoutstyle&&De.push(c.layoutStyles),Oe.axrange&&N(De,Se.rangesAltered),Oe.ticks&&De.push(c.doTicksRelayout),Oe.modebar&&De.push(c.doModeBar),Oe.camera&&De.push(c.doCamera),Oe.colorbars&&De.push(c.doColorBars),De.push(k)),De.push(d.rehover,d.redrag),t.add(fe,Q,[fe,Se.undoit],Q,[fe,Se.redoit]);var je=y.syncOrAsync(De,fe);return je&&je.then||(je=Promise.resolve(fe)),je.then(function(){return fe.emit("plotly_relayout",Se.eventData),fe})}function R(fe,ge,ke){var be=fe._fullLayout;if(!ge.axrange)return!1;for(var Se in ge)if(Se!=="axrange"&&ge[Se])return!1;for(var Oe in ke.rangesAltered){var De=l.id2name(Oe),je=fe.layout[De],Je=be[De];if(Je.autorange=je.autorange,je.range&&(Je.range=je.range.slice()),Je.cleanRange(),Je._matchGroup){for(var ze in Je._matchGroup)if(ze!==Oe){var Ue=be[l.id2name(ze)];Ue.autorange=Je.autorange,Ue.range=Je.range.slice(),Ue._input.range=Je.range.slice()}}}return!0}function N(fe,ge){var ke=ge?function(be){var Se=[],Oe=!0;for(var De in ge){var je=l.getFromId(be,De);if(Se.push(De),(je.ticklabelposition||"").indexOf("inside")!==-1&&je._anchorAxis&&Se.push(je._anchorAxis._id),je._matchGroup)for(var Je in je._matchGroup)ge[Je]||Se.push(Je);je.automargin&&(Oe=!1)}return l.draw(be,Se,{skipTitle:Oe})}:function(be){return l.draw(be,"redraw")};fe.push(h,c.doAutoRangeAndConstraints,ke,c.drawData,c.finalDraw)}var U=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ee=/^[xyz]axis[0-9]*\.autorange$/,j=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;
vendor: 6,505 bytes, line 1215
1215function X(fe,ge){var ke,be,Se,Oe=fe.layout,De=fe._fullLayout,je=De._guiEditing,Je=Z(De._preGUI,je),ze=Object.keys(ge),Ue=l.list(fe),Ge=y.extendDeepAll({},ge),Ye={};for(W(ge),ze=Object.keys(ge),be=0;be<ze.length;be++)if(ze[be].indexOf("allaxes")===0){for(Se=0;Se<Ue.length;Se++){var et=Ue[Se]._id.substr(1),ct=et.indexOf("scene")!==-1?et+".":"",mt=ze[be].replace("allaxes",ct+Ue[Se]._name);ge[mt]||(ge[mt]=ge[ze[be]])}delete ge[ze[be]]}var Ct=T.layoutFlags(),Tt={},nt={};function Qe(Jt,Vt){if(Array.isArray(Jt))Jt.forEach(function(Ir){Qe(Ir,Vt)});else if(!(Jt in ge)&&!x.hasParent(ge,Jt)){var pr=Je(Oe,Jt);Jt in nt||(nt[Jt]=V(pr.get())),Vt!==void 0&&pr.set(Vt)}}var Et,Gt={};function Xt(Jt){var Vt=l.name2id(Jt.split(".")[0]);return Gt[Vt]=1,Vt}for(var Fe in ge){if(x.hasParent(ge,Fe))throw new Error("cannot set "+Fe+" and a parent attribute simultaneously");for(var qe=Je(Oe,Fe),wt=ge[Fe],ft=qe.parts.length-1;ft>0&&typeof qe.parts[ft]!="string";)ft--;var Ce=qe.parts[ft],Ie=qe.parts[ft-1]+"."+Ce,Te=qe.parts.slice(0,ft).join("."),Pe=e(fe.layout,Te).get(),Ve=e(De,Te).get(),tt=qe.get();if(wt!==void 0){Tt[Fe]=wt,nt[Fe]=Ce==="reverse"?wt:V(tt);var ot=r.getLayoutValObject(De,qe.parts);if(ot&&ot.impliedEdits&&wt!==null)for(var at in ot.impliedEdits)Qe(y.relativeAttr(Fe,at),ot.impliedEdits[at]);if(["width","height"].indexOf(Fe)!==-1)if(wt){Qe("autosize",null);var _t=Fe==="height"?"width":"height";Qe(_t,De[_t])}else De[Fe]=fe._initialAutoSize[Fe];else if(Fe==="autosize")Qe("width",wt?null:De.width),Qe("height",wt?null:De.height);else if(Ie.match(U))Xt(Ie),e(De,Te+"._inputRange").set(null);else if(Ie.match(ee)){Xt(Ie),e(De,Te+"._inputRange").set(null);var bt=e(De,Te).get();bt._inputDomain&&(bt._input.domain=bt._inputDomain.slice())}else Ie.match(j)&&e(De,Te+"._inputDomain").set(null);if(Ce==="type"){Et=Pe;var jt=Ve.type==="linear"&&wt==="log",Nt=Ve.type==="log"&&wt==="linear";if(jt||Nt){if(Et&&Et.range)if(Ve.autorange)jt&&(Et.range=Et.range[1]>Et.range[0]?[1,2]:[2,1]);else{var $e=Et.range[0],yt=Et.range[1];jt?($e<=0&&yt<=0&&Qe(Te+".autorange",!0),$e<=0?$e=yt/1e6:yt<=0&&(yt=$e/1e6),Qe(Te+".range[0]",Math.log($e)/Math.LN10),Qe(Te+".range[1]",Math.log(yt)/Math.LN10)):(Qe(Te+".range[0]",Math.pow(10,$e)),Qe(Te+".range[1]",Math.pow(10,yt)))}else Qe(Te+".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"],i.getComponentMethod("annotations","convertCoords")(fe,Ve,wt,Qe),i.getComponentMethod("images","convertCoords")(fe,Ve,wt,Qe)}else Qe(Te+".autorange",!0),Qe(Te+".range",null);e(De,Te+"._inputRange").set(null)}else if(Ce.match(_)){var Ot=e(De,Fe).get(),Mt=(wt||{}).type;Mt&&Mt!=="-"||(Mt="linear"),i.getComponentMethod("annotations","convertCoords")(fe,Ot,Mt,Qe),i.getComponentMethod("images","convertCoords")(fe,Ot,Mt,Qe)}var Pt=s.containerArrayMatch(Fe);if(Pt){ke=Pt.array,be=Pt.index;var Le=Pt.property,Xe=ot||{editType:"calc"};be!==""&&Le===""&&(s.isAddVal(wt)?nt[Fe]=null:s.isRemoveVal(wt)?nt[Fe]=(e(Oe,ke).get()||[])[be]:y.warn("unrecognized full object value",ge)),T.update(Ct,Xe),Ye[ke]||(Ye[ke]={});var it=Ye[ke][be];it||(it=Ye[ke][be]={}),it[Le]=wt,delete ge[Fe]}else Ce==="reverse"?(Pe.range?Pe.range.reverse():(Qe(Te+".autorange",!0),Pe.range=[1,0]),Ve.autorange?Ct.calc=!0:Ct.plot=!0):(De._has("scatter-like")&&De._has("regl")&&Fe==="dragmode"&&(wt==="lasso"||wt==="select")&&tt!=="lasso"&&tt!=="select"||De._has("gl2d")?Ct.plot=!0:ot?T.update(Ct,ot):Ct.calc=!0,qe.set(wt))}}for(ke in Ye)s.applyContainerArrayChanges(fe,Je(Oe,ke),Ye[ke],Ct,Je)||(Ct.plot=!0);for(var At in Gt){var It=(Et=l.getFromId(fe,At))&&Et._constraintGroup;if(It)for(var Zt in Ct.calc=!0,It)Gt[Zt]||(l.getFromId(fe,Zt)._constraintShrinkable=!0)}return(J(fe)||ge.height||ge.width)&&(Ct.plot=!0),(Ct.plot||Ct.calc)&&(Ct.layoutReplot=!0),{flags:Ct,rangesAltered:Gt,undoit:nt,redoit:Tt,eventData:Ge}}function J(fe){var ge=fe._fullLayout,ke=ge.width,be=ge.height;return fe.layout.autosize&&d.plotAutoSize(fe,fe.layout,ge),ge.width!==ke||ge.height!==be}function re(fe,ge,ke,be){fe=y.getGraphDiv(fe),x.clearPromiseQueue(fe),y.isPlainObject(ge)||(ge={}),y.isPlainObject(ke)||(ke={}),Object.keys(ge).length&&(fe.changed=!0),Object.keys(ke).length&&(fe.changed=!0);var Se=x.coerceTraceIndices(fe,be),Oe=G(fe,y.extendFlat({},ge),Se),De=Oe.flags,je=X(fe,y.extendFlat({},ke)),Je=je.flags;(De.calc||Je.calc)&&(fe.calcdata=void 0),De.clearAxisTypes&&x.clearAxisTypes(fe,Se,ke);var ze=[];Je.layoutReplot?ze.push(c.layoutReplot):De.fullReplot?ze.push(te._doPlot):(ze.push(d.previousPromises),R(fe,Je,je)||d.supplyDefaults(fe),De.style&&ze.push(c.doTraceStyle),(De.colorbars||Je.colorbars)&&ze.push(c.doColorBars),Je.legend&&ze.push(c.doLegend),Je.layoutstyle&&ze.push(c.layoutStyles),Je.axrange&&N(ze,je.rangesAltered),Je.ticks&&ze.push(c.doTicksRelayout),Je.modebar&&ze.push(c.doModeBar),Je.camera&&ze.push(c.doCamera),ze.push(k)),ze.push(d.rehover,d.redrag),t.add(fe,re,[fe,Oe.undoit,je.undoit,Oe.traces],re,[fe,Oe.redoit,je.redoit,Oe.traces]);var Ue=y.syncOrAsync(ze,fe);return Ue&&Ue.then||(Ue=Promise.resolve(fe)),Ue.then(function(){return fe.emit("plotly_update",{data:Oe.eventData,layout:je.eventData}),fe})}function ne(fe){return function(ge){ge._fullLayout._guiEditing=!0;var ke=fe.apply(null,arguments);return ge._fullLayout._guiEditing=!1,ke}}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,ge){for(var ke=0;ke<ge.length;ke++){var be=ge[ke],Se=fe.match(be.pattern);if(Se){var Oe=Se[1]||"";
1215return{head:Oe,tail:fe.substr(Oe.length+1),attr:be.attr}}}}function ce(fe,ge){var ke=e(ge,fe).get();if(ke!==void 0)return ke;var be=fe.split(".");for(be.pop();be.length>1;)if(be.pop(),(ke=e(ge,be.join(".")+".uirevision").get())!==void 0)return ke;return ge.uirevision}function de(fe,ge){for(var ke=0;ke<ge.length;ke++)if(ge[ke]._fullInput.uid===fe)return ke;return-1}function xe(fe,ge,ke){for(var be=0;be<ge.length;be++)if(ge[be].uid===fe)return be;return!ge[ke]||ge[ke].uid?-1:ke}function _e(fe,ge){var ke=y.isPlainObject(fe),be=Array.isArray(fe);return ke||be?(ke&&y.isPlainObject(ge)||be&&Array.isArray(ge))&&JSON.stringify(fe)===JSON.stringify(ge):fe===ge}function we(fe,ge,ke,be){var Se,Oe,De,je=be.getValObject,Je=be.flags,ze=be.immutable,Ue=be.inArray,Ge=be.arrayIndex;function Ye(){var Pe=Se.editType;Ue&&Pe.indexOf("arraydraw")!==-1?y.pushUnique(Je.arrays[Ue],Ge):(T.update(Je,Se),Pe!=="none"&&Je.nChanges++,be.transition&&Se.anim&&Je.nChangesAnim++,(U.test(De)||ee.test(De))&&(Je.rangesAltered[ke[0]]=1),j.test(De)&&e(ge,"_inputDomain").set(null),Oe==="datarevision"&&(Je.newDataRevision=1))}function et(Pe){return Pe.valType==="data_array"||Pe.arrayOk}for(Oe in fe){if(Je.calc&&!be.transition)return;var ct=fe[Oe],mt=ge[Oe],Ct=ke.concat(Oe);if(De=Ct.join("."),Oe.charAt(0)!=="_"&&typeof ct!="function"&&ct!==mt){if((Oe==="tick0"||Oe==="dtick")&&ke[0]!=="geo"){var Tt=ge.tickmode;if(Tt==="auto"||Tt==="array"||!Tt)continue}if((Oe!=="range"||!ge.autorange)&&(Oe!=="zmin"&&Oe!=="zmax"||ge.type!=="contourcarpet")&&(Se=je(Ct))&&(!Se._compareAsJSON||JSON.stringify(ct)!==JSON.stringify(mt))){var nt,Qe=Se.valType,Et=et(Se),Gt=Array.isArray(ct),Xt=Array.isArray(mt);if(Gt&&Xt){var Fe="_input_"+Oe,qe=fe[Fe],wt=ge[Fe];if(Array.isArray(qe)&&qe===wt)continue}if(mt===void 0)Et&&Gt?Je.calc=!0:Ye();else if(Se._isLinkedToArray){var ft=[],Ce=!1;Ue||(Je.arrays[Oe]=ft);var Ie=Math.min(ct.length,mt.length),Te=Math.max(ct.length,mt.length);if(Ie!==Te){if(Se.editType!=="arraydraw"){Ye();continue}Ce=!0}for(nt=0;nt<Ie;nt++)we(ct[nt],mt[nt],Ct.concat(nt),y.extendFlat({inArray:Oe,arrayIndex:nt},be));if(Ce)for(nt=Ie;nt<Te;nt++)ft.push(nt)}else!Qe&&y.isPlainObject(ct)?we(ct,mt,Ct,be):Et?Gt&&Xt?(ze&&(Je.calc=!0),(ze||be.newDataRevision)&&Ye()):Gt!==Xt?Je.calc=!0:Ye():Gt&&Xt&&ct.length===mt.length&&String(ct)===String(mt)||Ye()}}}for(Oe in ge)if(!(Oe in fe)&&Oe.charAt(0)!=="_"&&typeof ge[Oe]!="function"){if(et(Se=je(ke.concat(Oe)))&&Array.isArray(ge[Oe]))return void(Je.calc=!0);Ye()}}function Ee(fe){var ge=fe._fullLayout,ke=fe.getBoundingClientRect();if(!y.equalDomRects(ke,ge._lastBBox)){var be=ge._invTransform=y.inverseTransformMatrix(y.getFullTransformMatrix(fe));ge._invScaleX=Math.sqrt(be[0][0]*be[0][0]+be[0][1]*be[0][1]+be[0][2]*be[0][2]),ge._invScaleY=Math.sqrt(be[1][0]*be[1][0]+be[1][1]*be[1][1]+be[1][2]*be[1][2]),ge._lastBBox=ke}}te.animate=function(fe,ge,ke){if(fe=y.getGraphDiv(fe),!y.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 be=fe._transitionData;be._frameQueue||(be._frameQueue=[]);var Se=(ke=d.supplyAnimationDefaults(ke)).transition,Oe=ke.frame;function De(ze){return Array.isArray(Se)?ze>=Se.length?Se[0]:Se[ze]:Se}function je(ze){return Array.isArray(Oe)?ze>=Oe.length?Oe[0]:Oe[ze]:Oe}function Je(ze,Ue){var Ge=0;return function(){if(ze&&++Ge===Ue)return ze()}}return be._frameWaitingCnt===void 0&&(be._frameWaitingCnt=0),new Promise(function(ze,Ue){function Ge(){be._currentFrame&&be._currentFrame.onComplete&&be._currentFrame.onComplete();var qe=be._currentFrame=be._frameQueue.shift();if(qe){var wt=qe.name?qe.name.toString():null;fe._fullLayout._currentFrame=wt,be._lastFrameAt=Date.now(),be._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:wt,frame:qe.frame,animation:{frame:qe.frameOpts,transition:qe.transitionOpts}})}else fe.emit("plotly_animated"),window.cancelAnimationFrame(be._animationRaf),be._animationRaf=null}function Ye(){fe.emit("plotly_animating"),be._lastFrameAt=-1/0,be._timeToNext=0,be._runningTransitions=0,be._currentFrame=null;var qe=function(){be._animationRaf=window.requestAnimationFrame(qe),Date.now()-be._lastFrameAt>be._timeToNext&&Ge()};qe()}var et,ct,mt=0;function Ct(qe){return Array.isArray(Se)?mt>=Se.length?qe.transitionOpts=Se[mt]:qe.transitionOpts=Se[0]:qe.transitionOpts=Se,mt++,qe}var Tt=[],nt=ge==null,Qe=Array.isArray(ge);if(!nt&&!Qe&&y.isPlainObject(ge))Tt.push({type:"object",data:Ct(y.extendFlat({},ge))});else if(nt||["string","number"].indexOf(typeof ge)!==-1)for(et=0;et<be._frames.length;et++)(ct=be._frames[et])&&(nt||String(ct.group)===String(ge))&&Tt.push({type:"byname",name:String(ct.name),data:Ct({name:ct.name})});else if(Qe)for(et=0;et<ge.length;et++){var Et=ge[et];["number","string"].indexOf(typeof Et)!==-1?(Et=String(Et),Tt.push({type:"byname",name:Et,data:Ct({name:Et})})):y.isPlainObject(Et)&&Tt.push({type:"object",data:Ct(y.extendFlat({},Et))})}for(et=0;et<Tt.length;et++)if((ct=Tt[et]).type==="byname"&&!be._frameHash[ct.data.name])return y.warn('animate failure: frame not found: "'+ct.data.name+'"'),void Ue();["next","immediate"].indexOf(ke.mode)!==-1&&function(){if(be._frameQueue.length!==0){for(;be._frameQueue.length;){var qe=be._frameQueue.pop();qe.onInterrupt&&qe.onInterrupt()}fe.emit("plotly_animationinterrupted",[])}}(),ke.direction==="reverse"&&Tt.reverse();var Gt=fe._fullLayout._currentFrame;if(Gt&&ke.fromcurrent){var Xt=-1;for(et=0;et<Tt.length;et++)if((ct=Tt[et]).type==="byname"&&ct.name===Gt){Xt=et;break}if(Xt>0&&Xt<Tt.length-1){var Fe=[];for(et=0;et<Tt.length;et++)ct=Tt[et],(Tt[et].type!=="byname"||et>Xt)&&Fe.push(ct);Tt=Fe}}Tt.length>0?function(qe){if(qe.length!==0){for(var wt=0;wt<qe.length;wt++){var ft;ft=qe[wt].type==="byname"?d.computeFrame(fe,qe[wt].name):qe[wt].data;var Ce=je(wt),Ie=De(wt);Ie.duration=Math.min(Ie.duration,Ce.duration);var Te={frame:ft,name:qe[wt].name,frameOpts:Ce,transitionOpts:Ie};wt===qe.length-1&&(Te.onComplete=Je(ze,2),Te.onInterrupt=Ue),be._frameQueue.push(Te)}ke.mode==="immediate"&&(be._lastFrameAt=-1/0),be._animationRaf||Ye()}}(Tt):(fe.emit("plotly_animated"),ze())})},te.addFrames=function(fe,ge,ke){if(fe=y.getGraphDiv(fe),ge==null)return Promise.resolve();if(!y.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 be,Se,Oe,De,je=fe._transitionData._frames,Je=fe._transitionData._frameHash;if(!Array.isArray(ge))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+ge);var ze=je.length+2*ge.length,Ue=[],Ge={};for(be=ge.length-1;be>=0;be--)if(y.isPlainObject(ge[be])){var Ye=ge[be].name,et=(Je[Ye]||Ge[Ye]||{}).name,ct=ge[be].name,mt=Je[et]||Ge[et];et&&ct&&typeof ct=="number"&&mt&&w<5&&(w++,y.warn('addFrames: overwriting frame "'+(Je[et]||Ge[et]).name+'" with a frame whose name of type "number" also equates to "'+et+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),w===5&&y.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(ge[be]),index:ke&&ke[be]!==void 0&&ke[be]!==null?ke[be]:ze+be})}Ue.sort(function(Fe,qe){return Fe.index>
1215qe.index?-1:Fe.index<qe.index?1:0});var Ct=[],Tt=[],nt=je.length;for(be=Ue.length-1;be>=0;be--){if(typeof(Se=Ue[be].frame).name=="number"&&y.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Se.name)for(;Je[Se.name="frame "+fe._transitionData._counter++];);if(Je[Se.name]){for(Oe=0;Oe<je.length&&(je[Oe]||{}).name!==Se.name;Oe++);Ct.push({type:"replace",index:Oe,value:Se}),Tt.unshift({type:"replace",index:Oe,value:je[Oe]})}else De=Math.max(0,Math.min(Ue[be].index,nt)),Ct.push({type:"insert",index:De,value:Se}),Tt.unshift({type:"delete",index:De}),nt++}var Qe=d.modifyFrames,Et=d.modifyFrames,Gt=[fe,Tt],Xt=[fe,Ct];return t&&t.add(fe,Qe,Gt,Et,Xt),d.modifyFrames(fe,Ct)},te.deleteFrames=function(fe,ge){if(fe=y.getGraphDiv(fe),!y.isPlotDiv(fe))throw new Error("This element is not a Plotly plot: "+fe);var ke,be,Se=fe._transitionData._frames,Oe=[],De=[];if(!ge)for(ge=[],ke=0;ke<Se.length;ke++)ge.push(ke);for((ge=ge.slice()).sort(),ke=ge.length-1;ke>=0;ke--)be=ge[ke],Oe.push({type:"delete",index:be}),De.unshift({type:"insert",index:be,value:Se[be]});var je=d.modifyFrames,Je=d.modifyFrames,ze=[fe,De],Ue=[fe,Oe];return t&&t.add(fe,je,ze,Je,Ue),d.modifyFrames(fe,Oe)},te.addTraces=function fe(ge,ke,be){ge=y.getGraphDiv(ge);var Se,Oe,De=[],je=te.deleteTraces,Je=fe,ze=[ge,De],Ue=[ge,ke];for(function(Ge,Ye,et){var ct,mt;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]),ct=0;ct<Ye.length;ct++)if(typeof(mt=Ye[ct])!="object"||Array.isArray(mt)||mt===null)throw new Error("all values in traces array must be non-array objects");if(et===void 0||Array.isArray(et)||(et=[et]),et!==void 0&&et.length!==Ye.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(ge,ke,be),Array.isArray(ke)||(ke=[ke]),ke=ke.map(function(Ge){return y.extendFlat({},Ge)}),x.cleanData(ke),Se=0;Se<ke.length;Se++)ge.data.push(ke[Se]);for(Se=0;Se<ke.length;Se++)De.push(-ke.length+Se);if(be===void 0)return Oe=te.redraw(ge),t.add(ge,je,ze,Je,Ue),Oe;Array.isArray(be)||(be=[be]);try{E(ge,De,be)}catch(Ge){throw ge.data.splice(ge.data.length-ke.length,ke.length),Ge}return t.startSequence(ge),t.add(ge,je,ze,Je,Ue),Oe=te.moveTraces(ge,De,be),t.stopSequence(ge),Oe},te.deleteTraces=function fe(ge,ke){ge=y.getGraphDiv(ge);var be,Se,Oe=[],De=te.addTraces,je=fe,Je=[ge,Oe,ke],ze=[ge,ke];if(ke===void 0)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(ke)||(ke=[ke]),S(ge,ke,"indices"),(ke=P(ke,ge.data.length-1)).sort(y.sorterDes),be=0;be<ke.length;be+=1)Se=ge.data.splice(ke[be],1)[0],Oe.push(Se);var Ue=te.redraw(ge);return t.add(ge,De,Je,je,ze),Ue},te.extendTraces=function fe(ge,ke,be,Se){function Oe(ze,Ue,Ge){var Ye,et;if(y.isTypedArray(ze))if(Ge<0){var ct=new ze.constructor(0),mt=F(ze,Ue);Ge<0?(Ye=mt,et=ct):(Ye=ct,et=mt)}else if(Ye=new ze.constructor(Ge),et=new ze.constructor(ze.length+Ue.length-Ge),Ge===Ue.length)Ye.set(Ue),et.set(ze);else if(Ge<Ue.length){var Ct=Ue.length-Ge;Ye.set(Ue.subarray(Ct)),et.set(ze),et.set(Ue.subarray(0,Ct),ze.length)}else{var Tt=Ge-Ue.length,nt=ze.length-Tt;Ye.set(ze.subarray(nt)),Ye.set(Ue,Tt),et.set(ze.subarray(0,nt))}else Ye=ze.concat(Ue),et=Ge>=0&&Ge<Ye.length?Ye.splice(0,Ye.length-Ge):[];return[Ye,et]}var De=D(ge=y.getGraphDiv(ge),ke,be,Se,Oe),je=te.redraw(ge),Je=[ge,De.update,be,De.maxPoints];return t.add(ge,te.prependTraces,Je,fe,arguments),je},te.moveTraces=function fe(ge,ke,be){var Se,Oe=[],De=[],je=fe,Je=fe,ze=[ge=y.getGraphDiv(ge),be,ke],Ue=[ge,ke,be];if(E(ge,ke,be),ke=Array.isArray(ke)?ke:[ke],be===void 0)for(be=[],Se=0;Se<ke.length;Se++)be.push(-ke.length+Se);for(be=Array.isArray(be)?be:[be],ke=P(ke,ge.data.length-1),be=P(be,ge.data.length-1),Se=0;Se<ge.data.length;Se++)ke.indexOf(Se)===-1&&Oe.push(ge.data[Se]);for(Se=0;Se<ke.length;Se++)De.push({newIndex:be[Se],trace:ge.data[ke[Se]]});for(De.sort(function(Ye,et){return Ye.newIndex-et.newIndex}),Se=0;Se<De.length;Se+=1)Oe.splice(De[Se].newIndex,0,De[Se].trace);ge.data=Oe;var Ge=te.redraw(ge);return t.add(ge,je,ze,Je,Ue),Ge}
vendor: 5,222 bytes, line 1215
1215,te.prependTraces=function fe(ge,ke,be,Se){function Oe(ze,Ue,Ge){var Ye,et;if(y.isTypedArray(ze))if(Ge<=0){var ct=new ze.constructor(0),mt=F(Ue,ze);Ge<0?(Ye=mt,et=ct):(Ye=ct,et=mt)}else if(Ye=new ze.constructor(Ge),et=new ze.constructor(ze.length+Ue.length-Ge),Ge===Ue.length)Ye.set(Ue),et.set(ze);else if(Ge<Ue.length){var Ct=Ue.length-Ge;Ye.set(Ue.subarray(0,Ct)),et.set(Ue.subarray(Ct)),et.set(ze,Ct)}else{var Tt=Ge-Ue.length;Ye.set(Ue),Ye.set(ze.subarray(0,Tt),Ue.length),et.set(ze.subarray(Tt))}else Ye=Ue.concat(ze),et=Ge>=0&&Ge<Ye.length?Ye.splice(Ge,Ye.length):[];return[Ye,et]}var De=D(ge=y.getGraphDiv(ge),ke,be,Se,Oe),je=te.redraw(ge),Je=[ge,De.update,be,De.maxPoints];return t.add(ge,te.extendTraces,Je,fe,arguments),je},te.newPlot=function(fe,ge,ke,be){return fe=y.getGraphDiv(fe),d.cleanPlot([],{},fe._fullData||[],fe._fullLayout||{}),d.purge(fe),te._doPlot(fe,ge,ke,be)},te._doPlot=function(fe,ge,ke,be){var Se;if(fe=y.getGraphDiv(fe),n.init(fe),y.isPlainObject(ge)){var Oe=ge;ge=Oe.data,ke=Oe.layout,be=Oe.config,Se=Oe.frames}if(n.triggerHandler(fe,"plotly_beforeplot",[ge,ke,be])===!1)return Promise.reject();ge||ke||y.isPlotDiv(fe)||y.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",fe),I(fe,be),ke||(ke={}),m.select(fe).classed("js-plotly-plot",!0),a.makeTester(),Array.isArray(fe._promises)||(fe._promises=[]);var De=(fe.data||[]).length===0&&Array.isArray(ge);Array.isArray(ge)&&(x.cleanData(ge),De?fe.data=ge:fe.data.push.apply(fe.data,ge),fe.empty=!1),fe.layout&&!De||(fe.layout=x.cleanLayout(ke)),d.supplyDefaults(fe);var je=fe._fullLayout,Je=je._has("cartesian");je._replotting=!0,(De||je._shouldCreateBgLayer)&&(function(Tt){var nt=m.select(Tt),Qe=Tt._fullLayout;if(Qe._calcInverseTransform=Ee,Qe._calcInverseTransform(Tt),Qe._container=nt.selectAll(".plot-container").data([0]),Qe._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),Qe._paperdiv=Qe._container.selectAll(".svg-container").data([0]),Qe._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Qe._glcontainer=Qe._paperdiv.selectAll(".gl-container").data([{}]),Qe._glcontainer.enter().append("div").classed("gl-container",!0),Qe._paperdiv.selectAll(".main-svg").remove(),Qe._paperdiv.select(".modebar-container").remove(),Qe._paper=Qe._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Qe._toppaper=Qe._paperdiv.append("svg").classed("main-svg",!0),Qe._modebardiv=Qe._paperdiv.append("div"),delete Qe._modeBar,Qe._hoverpaper=Qe._paperdiv.append("svg").classed("main-svg",!0),!Qe._uid){var Et={};m.selectAll("defs").each(function(){this.id&&(Et[this.id.split("-")[1]]=1)}),Qe._uid=y.randstr(Et)}Qe._paperdiv.selectAll(".main-svg").attr(o.svgAttrs),Qe._defs=Qe._paper.append("defs").attr("id","defs-"+Qe._uid),Qe._clips=Qe._defs.append("g").classed("clips",!0),Qe._topdefs=Qe._toppaper.append("defs").attr("id","topdefs-"+Qe._uid),Qe._topclips=Qe._topdefs.append("g").classed("clips",!0),Qe._bgLayer=Qe._paper.append("g").classed("bglayer",!0),Qe._draggers=Qe._paper.append("g").classed("draglayer",!0);var Gt=Qe._paper.append("g").classed("layer-below",!0);Qe._imageLowerLayer=Gt.append("g").classed("imagelayer",!0),Qe._shapeLowerLayer=Gt.append("g").classed("shapelayer",!0),Qe._cartesianlayer=Qe._paper.append("g").classed("cartesianlayer",!0),Qe._polarlayer=Qe._paper.append("g").classed("polarlayer",!0),Qe._smithlayer=Qe._paper.append("g").classed("smithlayer",!0),Qe._ternarylayer=Qe._paper.append("g").classed("ternarylayer",!0),Qe._geolayer=Qe._paper.append("g").classed("geolayer",!0),Qe._funnelarealayer=Qe._paper.append("g").classed("funnelarealayer",!0),Qe._pielayer=Qe._paper.append("g").classed("pielayer",!0),Qe._iciclelayer=Qe._paper.append("g").classed("iciclelayer",!0),Qe._treemaplayer=Qe._paper.append("g").classed("treemaplayer",!0),Qe._sunburstlayer=Qe._paper.append("g").classed("sunburstlayer",!0),Qe._indicatorlayer=Qe._toppaper.append("g").classed("indicatorlayer",!0),Qe._glimages=Qe._paper.append("g").classed("glimages",!0);var Xt=Qe._toppaper.append("g").classed("layer-above",!0);Qe._imageUpperLayer=Xt.append("g").classed("imagelayer",!0),Qe._shapeUpperLayer=Xt.append("g").classed("shapelayer",!0),Qe._infolayer=Qe._toppaper.append("g").classed("infolayer",!0),Qe._menulayer=Qe._toppaper.append("g").classed("menulayer",!0),Qe._zoomlayer=Qe._toppaper.append("g").classed("zoomlayer",!0),Qe._hoverlayer=Qe._hoverpaper.append("g").classed("hoverlayer",!0),Qe._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Tt.emit("plotly_framework")}(fe),je._shouldCreateBgLayer&&delete je._shouldCreateBgLayer),a.initGradients(fe),a.initPatterns(fe),De&&l.saveShowSpikeInitial(fe);var ze=!fe.calcdata||fe.calcdata.length!==(fe._fullData||[]).length;ze&&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(){y.isHidden(fe)||d.resize(fe)},window.addEventListener("resize",fe._responsiveChartHandler)):y.clearResponsive(fe);var Ge=y.extendFlat({},je._size),Ye=0;
1215function et(){if(d.clearAutoMarginIds(fe),c.drawMarginPushers(fe),l.allowAutoMargin(fe),je._has("pie"))for(var Tt=fe._fullData,nt=0;nt<Tt.length;nt++){var Qe=Tt[nt];Qe.type==="pie"&&Qe.automargin&&d.allowAutoMargin(fe,"pie."+Qe.uid+".automargin")}return d.doAutoMargin(fe),d.previousPromises(fe)}function ct(){fe._transitioning||(c.doAutoRangeAndConstraints(fe),De&&l.saveRangeInitial(fe),i.getComponentMethod("rangeslider","calcAutorange")(fe))}var mt=[d.previousPromises,function(){if(Se)return te.addFrames(fe,Se)},function Tt(){for(var nt=je._basePlotModules,Qe=0;Qe<nt.length;Qe++)nt[Qe].drawFramework&&nt[Qe].drawFramework(fe);!je._glcanvas&&je._has("gl")&&(je._glcanvas=je._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Fe){return Fe.key}),je._glcanvas.enter().append("canvas").attr("class",function(Fe){return"gl-canvas gl-canvas-"+Fe.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Et=fe._context.plotGlPixelRatio;if(je._glcanvas){je._glcanvas.attr("width",je.width*Et).attr("height",je.height*Et).style("width",je.width+"px").style("height",je.height+"px");var Gt=je._glcanvas.data()[0].regl;if(Gt&&(Math.floor(je.width*Et)!==Gt._gl.drawingBufferWidth||Math.floor(je.height*Et)!==Gt._gl.drawingBufferHeight)){var Xt="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!Ye)return y.log(Xt+" Clearing graph and plotting again."),d.cleanPlot([],{},fe._fullData,je),d.supplyDefaults(fe),je=fe._fullLayout,d.doCalcdata(fe),Ye++,Tt();y.error(Xt)}}return je.modebar.orientation==="h"?je._modebardiv.style("height",null).style("width","100%"):je._modebardiv.style("width",null).style("height",je.height+"px"),d.previousPromises(fe)},et,function(){if(d.didMarginChange(Ge,je._size))return y.syncOrAsync([et,c.layoutStyles],fe)}];Je&&mt.push(function(){if(ze)return y.syncOrAsync([i.getComponentMethod("shapes","calcAutorange"),i.getComponentMethod("annotations","calcAutorange"),ct],fe);ct()}),mt.push(c.layoutStyles),Je&&mt.push(function(){return l.draw(fe,De?"":"redraw")},function(Tt){Tt._fullLayout._insideTickLabelsAutorange&&Q(Tt,Tt._fullLayout._insideTickLabelsAutorange).then(function(){Tt._fullLayout._insideTickLabelsAutorange=void 0})}),mt.push(c.drawData,c.finalDraw,f,d.addLinks,d.rehover,d.redrag,d.doAutoMargin,function(Tt){Tt._fullLayout._insideTickLabelsAutorange&&De&&l.saveRangeInitial(Tt,!0)},d.previousPromises);var Ct=y.syncOrAsync(mt,fe);return Ct&&Ct.then||(Ct=Promise.resolve()),Ct.then(function(){return k(fe),fe})},te.purge=function(fe){var ge=(fe=y.getGraphDiv(fe))._fullLayout||{},ke=fe._fullData||[];return d.cleanPlot([],{},ke,ge),d.purge(fe),n.purge(fe),ge._container&&ge._container.remove(),delete fe._context,fe},te.react=function(fe,ge,ke,be){var Se,Oe;fe=y.getGraphDiv(fe),x.clearPromiseQueue(fe);var De=fe._fullData,je=fe._fullLayout;if(y.isPlotDiv(fe)&&De&&je){if(y.isPlainObject(ge)){var Je=ge;ge=Je.data,ke=Je.layout,be=Je.config,Se=Je.frames}var ze=!1;if(be){var Ue=y.extendDeep({},fe._context);fe._context=void 0,I(fe,be),ze=function Te(Pe,Ve){var tt;for(tt in Pe)if(tt.charAt(0)!=="_"){var ot=Pe[tt],at=Ve[tt];if(ot!==at)if(y.isPlainObject(ot)&&y.isPlainObject(at)){if(Te(ot,at))return!0}else{if(!Array.isArray(ot)||!Array.isArray(at)||ot.length!==at.length)return!0;for(var _t=0;_t<ot.length;_t++)if(ot[_t]!==at[_t]&&(!y.isPlainObject(ot[_t])||!y.isPlainObject(at[_t])||Te(ot[_t],at[_t])))return!0}}}(Ue,fe._context)}fe.data=ge||[],x.cleanData(fe.data),fe.layout=ke||{},x.cleanLayout(fe.layout),function(Te,Pe,Ve,tt){var ot,at,_t,bt,jt,Nt,$e,yt,Ot,Mt,Pt=tt._preGUI,Le=[],Xe={},it={};for(ot in Pt){if(jt=pe(ot,se)){if(Ot=jt.head,Mt=jt.tail,at=jt.attr||Ot+".uirevision",(bt=(_t=e(tt,at).get())&&ce(at,Pe))&&bt===_t){if((Nt=Pt[ot])===null&&(Nt=void 0),_e(yt=($e=e(Pe,ot)).get(),Nt)){yt===void 0&&Mt==="autorange"&&Le.push(Ot),$e.set(V(e(tt,ot).get()));continue}if(Mt==="autorange"||Mt.substr(0,6)==="range["){var At=Pt[Ot+".range[0]"],It=Pt[Ot+".range[1]"],Zt=Pt[Ot+".autorange"];if(Zt||Zt===null&&At===null&&It===null){if(!(Ot in Xe)){var Jt=e(Pe,Ot).get();Xe[Ot]=Jt&&(Jt.autorange||Jt.autorange!==!1&&(!Jt.range||Jt.range.length!==2))}if(Xe[Ot]){$e.set(V(e(tt,ot).get()));continue}}}}}else y.warn("unrecognized GUI edit: "+ot);delete Pt[ot],jt&&jt.tail.substr(0,6)==="range["&&(it[jt.head]=1)}for(var Vt=0;Vt<Le.length;Vt++){var pr=Le[Vt];if(it[pr]){var Ir=e(Pe,pr).get();Ir&&delete Ir.autorange}}var fr=tt._tracePreGUI;for(var $t in fr){var er,ar=fr[$t],hr=null;for(ot in ar){if(!hr){var vr=de($t,Ve);if(vr<0){delete fr[$t];break}var Pr=xe($t,Te,(er=Ve[vr]._fullInput).index);if(Pr<0){delete fr[$t];break}hr=Te[Pr]}if(jt=pe(ot,oe)){if(jt.attr?bt=(_t=e(tt,jt.attr).get())&&ce(jt.attr,Pe):(_t=er.uirevision,(bt=hr.uirevision)===void 0&&(bt=Pe.uirevision)),bt&&bt===_t&&((Nt=ar[ot])===null&&(Nt=void 0),_e(yt=($e=e(hr,ot)).get(),Nt))){$e.set(V(e(er,ot).get()));continue}}else y.warn("unrecognized GUI edit: "+ot+" in trace uid "+$t);delete ar[ot]}}}(fe.data,fe.layout,De,je),d.supplyDefaults(fe,{skipUpdateCalc:!0});var Ge=fe._fullData,Ye=fe._fullLayout,et=Ye.datarevision===void 0,ct=Ye.transition,mt=function(Te,Pe,Ve,tt,ot){var at=T.layoutFlags();function _t(bt){return r.getLayoutValObject(Ve,bt)}return at.arrays={},at.rangesAltered={},at.nChanges=0,at.nChangesAnim=0,we(Pe,Ve,[],{getValObject:_t,flags:at,immutable:tt,transition:ot,gd:Te}),(at.plot||at.calc)&&(at.layoutReplot=!0),ot&&at.nChanges&&at.nChangesAnim&&(at.anim=at.nChanges===at.
1215nChangesAnim?"all":"some"),at}(fe,je,Ye,et,ct),Ct=mt.newDataRevision,Tt=function(Te,Pe,Ve,tt,ot,at){var _t=Pe.length===Ve.length;if(!ot&&!_t)return{fullReplot:!0,calc:!0};var bt,jt,Nt=T.traceFlags();Nt.arrays={},Nt.nChanges=0,Nt.nChangesAnim=0;var $e={getValObject:function(Ot){var Mt=r.getTraceValObject(jt,Ot);return!jt._module.animatable&&Mt.anim&&(Mt.anim=!1),Mt},flags:Nt,immutable:tt,transition:ot,newDataRevision:at,gd:Te},yt={};for(bt=0;bt<Pe.length;bt++)if(Ve[bt]){if(jt=Ve[bt]._fullInput,d.hasMakesDataTransform(jt)&&(jt=Ve[bt]),yt[jt.uid])continue;yt[jt.uid]=1,we(Pe[bt]._fullInput,jt,[],$e)}return(Nt.calc||Nt.plot)&&(Nt.fullReplot=!0),ot&&Nt.nChanges&&Nt.nChangesAnim&&(Nt.anim=Nt.nChanges===Nt.nChangesAnim&&_t?"all":"some"),Nt}(fe,De,Ge,et,ct,Ct);if(J(fe)&&(mt.layoutReplot=!0),Tt.calc||mt.calc){fe.calcdata=void 0;for(var nt=Object.getOwnPropertyNames(Ye),Qe=0;Qe<nt.length;Qe++){var Et=nt[Qe],Gt=Et.substring(0,5);if(Gt==="xaxis"||Gt==="yaxis"){var Xt=Ye[Et]._emptyCategories;Xt&&Xt()}}}else d.supplyDefaultsUpdateCalc(fe.calcdata,Ge);var Fe=[];if(Se&&(fe._transitionData={},d.createTransitionData(fe),Fe.push(function(){return te.addFrames(fe,Se)})),Ye.transition&&!ze&&(Tt.anim||mt.anim))mt.ticks&&Fe.push(c.doTicksRelayout),d.doCalcdata(fe),c.doAutoRangeAndConstraints(fe),Fe.push(function(){return d.transitionFromReact(fe,Tt,mt,je)});else if(Tt.fullReplot||mt.layoutReplot||ze)fe._fullLayout._skipDefaults=!0,Fe.push(te._doPlot);else{for(var qe in mt.arrays){var wt=mt.arrays[qe];if(wt.length){var ft=i.getComponentMethod(qe,"drawOne");if(ft!==y.noop)for(var Ce=0;Ce<wt.length;Ce++)ft(fe,wt[Ce]);else{var Ie=i.getComponentMethod(qe,"draw");if(Ie===y.noop)throw new Error("cannot draw components: "+qe);Ie(fe)}}}Fe.push(d.previousPromises),Tt.style&&Fe.push(c.doTraceStyle),(Tt.colorbars||mt.colorbars)&&Fe.push(c.doColorBars),mt.legend&&Fe.push(c.doLegend),mt.layoutstyle&&Fe.push(c.layoutStyles),mt.axrange&&N(Fe),mt.ticks&&Fe.push(c.doTicksRelayout),mt.modebar&&Fe.push(c.doModeBar),mt.camera&&Fe.push(c.doCamera),Fe.push(k)}Fe.push(d.rehover,d.redrag),(Oe=y.syncOrAsync(Fe,fe))&&Oe.then||(Oe=Promise.resolve(fe))}else Oe=te.newPlot(fe,ge,ke,be);return Oe.then(function(){return fe.emit("plotly_react",{data:ge,layout:ke}),fe})},te.redraw=function(fe){if(fe=y.getGraphDiv(fe),!y.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=Q,te.restyle=H,te.setPlotConfig=function(fe){return y.extendFlat(p,fe)},te.update=re,te._guiRelayout=ne(Q),te._guiRestyle=ne(H),te._guiUpdate=ne(re),te._storeDirectGUIEdit=function(fe,ge,ke){for(var be in ke)K(be,e(fe,be).get(),ke[be],ge)}},{"../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(v,$,te){var m={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}
1215,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:{}}},g={};(function b(y,e){for(var n in y){var t=y[n];t.valType?e[n]=t.dflt:(e[n]||(e[n]={}),b(t,e[n]))}})(m,g),$.exports={configAttributes:m,dfltConfig:g}},{}],542:[function(v,$,te){var m=v("../registry"),g=v("../lib"),b=v("../plots/attributes"),y=v("../plots/layout_attributes"),e=v("../plots/frame_attributes"),n=v("../plots/animation_attributes"),t=v("./plot_config").configAttributes,i=v("./edit_types"),r=g.extendDeepAll,d=g.isPlainObject,l=g.isArrayOrTypedArray,a=g.nestedProperty,u=g.valObjectMeta,f=["_isSubplotObj","_isLinkedToArray","_arrayAttrRegexps","_deprecated"];function o(_,w,k){if(!_)return!1;if(_._isLinkedToArray){if(h(w[k]))k++;else if(k<w.length)return!1}for(;k<w.length;k++){var L=_[w[k]];if(!d(L)||(_=L,k===w.length-1))break;if(_._isLinkedToArray){if(!h(w[++k]))return!1}else if(_.valType==="info_array"){var A=w[++k];if(!h(A))return!1;var I=_.items;if(Array.isArray(I)){if(A>=I.length)return!1;if(_.dimensions===2){if(k++,w.length===k)return _;var P=w[k];if(!h(P))return!1;_=I[A][P]}else _=I[A]}else _=I}}return _}function h(_){return _===Math.round(_)&&_>=0}function p(){var _,w,k={};for(_ in r(k,y),m.subplotsRegistry)if((w=m.subplotsRegistry[_]).layoutAttributes)if(Array.isArray(w.attr))for(var L=0;L<w.attr.length;L++)c(k,w,w.attr[L]);else c(k,w,w.attr==="subplot"?w.name:w.attr);for(_ in m.componentsRegistry){var A=(w=m.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 w.name==="colorscale"?r(k,w.layoutAttributes):w.layoutAttributes&&T(k,w.layoutAttributes,w.name)}return{layoutAttributes:x(k)}}function s(){var _={frames:r({},e)};return x(_),_.frames}function x(_){return function(w){te.crawl(w,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(w){te.crawl(w,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(w){(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())})(w)}(_),_}function c(_,w,k){var L=a(_,k),A=r({},w.layoutAttributes);A._isSubplotObj=!0,L.set(A)}function T(_,w,k){var L=a(_,k);L.set(r(L.get()||{},w))}te.IS_SUBPLOT_OBJ="_isSubplotObj",te.IS_LINKED_TO_ARRAY="_isLinkedToArray",te.DEPRECATED="_deprecated",te.UNDERSCORE_ATTRS=f,te.get=function(){var _={};m.allTypes.forEach(function(k){_[k]=function(L){var A,I;A=m.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,G){a(S,G).set(void 0),H===void 0&&a(E,G).set(void 0)}),r(P,S),m.traceIs(L,"noOpacity")&&delete P.opacity,m.traceIs(L,"showLegend")||(delete P.showlegend,delete P.legendgroup),m.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:Boolean(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 w={};return Object.keys(m.transformsRegistry).forEach(function(k){w[k]=function(L){var A=m.transformsRegistry[L],I=r({},A.attributes);return Object.keys(m.componentsRegistry).forEach(function(P){var S=m.componentsRegistry[P];S.schema&&S.schema.transforms&&S.schema.transforms[L]&&Object.keys(S.schema.transforms[L]).forEach(function(E){T(I,S.schema.transforms[L][E],E)})}),{attributes:x(I)}}(k)}),{defs:{valObjects:u,metaKeys:f.concat(["description","role","editType","impliedEdits"]),editType:{traces:i.traces,layout:i.layout},impliedEdits:{}},traces:_,layout:p(),transforms:w,frames:s(),animation:x(n),config:x(t)}},te.crawl=function(_,w,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;w(P,I,_,A,S),te.isValObject(P)||d(P)&&I!=="impliedEdits"&&te.crawl(P,w,A+1,S)}})},te.isValObject=function(_){return _&&_.valType!==void 0},te.findArrayAttributes=function(_){var w,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 G(W,Q,R){var N=W[A[Q]],U=R+A[Q];if(Q===A.length-1)l(N)&&L.push(k+U);else if(I[Q]){if(Array.isArray(N))for(var ee=0;ee<N.length;ee++)d(N[ee])&&G(N[ee],Q+1,U+"["+ee+"].")}else d(N)&&G(N,Q+1,U+".")}(w,0,"")}w=_,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+"].",w=D,te.crawl(F.attributes,P))}return L},te.getTraceValObject=function(_,w){var k,L,A=w[0],I=1;if(A==="transforms"){if(w.length===1)return b.transforms;var P=_.transforms;if(!Array.isArray(P)||!P.length)return!1;var S=w[1];if(!h(S)||S>=P.length)return!1;L=(k=(m.transformsRegistry[P[S].type]||{}).attributes)&&k[w[2]],I=3}else{var E=_._module;if(E||(E=(m.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 o(L,w,I)},te.getLayoutValObject=function(_,w){return o(function(k,L){var A,I,P,S,E=k._basePlotModules;if(E){var D;for(A=0;A<E.length;
1215A++){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 m.componentsRegistry){if((P=m.componentsRegistry[I]).name==="colorscale"&&L.indexOf("coloraxis")===0)return P.layoutAttributes[L];if(!P.schema&&L===P.name)return P.layoutAttributes}return L in y&&y[L]}(_,w[0]),w,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(v,$,te){var m=v("../lib"),g=v("../plots/attributes"),b={name:{valType:"string",editType:"none"}};function y(n){return n&&typeof n=="string"}function e(n){var t=n.length-1;return n.charAt(t)!=="s"&&m.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,i,r={};for(t in n)i=n[t],Array.isArray(i)&&i.length&&(r[t]=0);return{newTrace:function(d){var l={type:t=m.coerce(d,{},g,"type"),_template:null};if(t in r){i=n[t];var a=r[t]%i.length;r[t]++,l._template=i[a]}return l}}},te.newContainer=function(n,t,i){var r=n._template,d=r&&(r[t]||i&&r[i]);return m.isPlainObject(d)||(d=null),n[t]={_template:d}},te.arrayTemplater=function(n,t,i){var r=n._template,d=r&&r[e(t)],l=r&&r[t];Array.isArray(l)&&l.length||(l=[]);var a={};return{newItem:function(u){var f={name:u.name,_input:u},o=f.templateitemname=u.templateitemname;if(!y(o))return f._template=d,f;for(var h=0;h<l.length;h++){var p=l[h];if(p.name===o)return a[o]=1,f._template=p,f}return f[i]=u[i]||!1,f._template=!1,f},defaultItems:function(){for(var u=[],f=0;f<l.length;f++){var o=l[f],h=o.name;if(y(h)&&!a[h]){var p={_template:o,name:h,_input:{_templateitemname:h}};p.templateitemname=o.templateitemname,u.push(p),a[h]=1}}return u}}},te.arrayDefaultKey=e,te.arrayEditor=function(n,t,i){var r=(m.nestedProperty(n,t).get()||[]).length,d=i._index,l=d>=r&&(i._input||{})._templateitemname;l&&(d=r);var a,u=t+"["+d+"]";function f(){a={},l&&(a[u]={},a[u].templateitemname=l)}function o(p,s){l?m.nestedProperty(a[u],p).set(s):a[u+"."+p]=s}function h(){var p=a;return f(),p}return f(),{modifyBase:function(p,s){a[p]=s},modifyItem:o,getUpdateObj:h,applyUpdate:function(p,s){p&&o(p,s);var x=h();for(var c in x)m.nestedProperty(n,c).set(x[c])}}}},{"../lib":503,"../plots/attributes":550}],544:[function(v,$,te){var m=v("@plotly/d3"),g=v("../registry"),b=v("../plots/plots"),y=v("../lib"),e=v("../lib/clear_gl_canvases"),n=v("../components/color"),t=v("../components/drawing"),i=v("../components/titles"),r=v("../components/modebar"),d=v("../plots/cartesian/axes"),l=v("../constants/alignment"),a=v("../plots/cartesian/constraints"),u=a.enforce,f=a.clean,o=v("../plots/cartesian/autorange").doAutoRange;function h(w,k,L){for(var A=0;A<L.length;A++){var I=L[A][0],P=L[A][1];if(!(I[0]>=w[1]||I[1]<=w[0])&&P[0]<k[1]&&P[1]>k[0])return!0}return!1}function p(w){var k,L,A,I,P,S,E=w._fullLayout,D=E._size,F=D.p,H=d.list(w,"",!0);if(E._paperdiv.style({width:w._context.responsive&&E.autosize&&!w._context._hasZeroWidth&&!w.layout.width?"100%":E.width+"px",height:w._context.responsive&&E.autosize&&!w._context._hasZeroHeight&&!w.layout.height?"100%":E.height+"px"}).selectAll(".main-svg").call(t.setSize,E.width,E.height),w._context.setBackground(w,E.paper_bgcolor),te.drawMainTitle(w),r.manage(w),!E._has("cartesian"))return b.previousPromises(w);function V(Ye,et,ct){var mt=Ye._lw/2;return Ye._id.charAt(0)==="x"?et?ct==="top"?et._offset-F-mt:et._offset+et._length+F+mt:D.t+D.h*(1-(Ye.position||0))+mt%1:et?ct==="right"?et._offset+et._length+F+mt:et._offset-F-mt:D.l+D.w*(Ye.position||0)+mt%1}for(k=0;k<H.length;k++){var Z=(I=H[k])._anchorAxis;I._linepositions={},I._lw=t.crispRound(w,I.linewidth,1),I._mainLinePosition=V(I,Z,I.side),I._mainMirrorPosition=I.mirror&&Z?V(I,Z,l.OPPOSITE_SIDE[I.side]):null}var K=[],G=[],W=[],Q=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 ee=U.node(),j=A.bg=y.ensureSingle(U,"rect","bg");ee.insertBefore(j.node(),ee.childNodes[0]),G.push(L)}
1215else U.select("rect.bg").remove(),W.push([R,N]),Q||(K.push(L),G.push(L))}var X,J,re,ne,se,oe,pe,ce,de,xe,_e,we,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=m.select(this)}),k=0;k<G.length;k++)A=E._plots[G[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 ge,ke,be=A.clipId="clip"+E._uid+L+"plot",Se=y.ensureSingleById(E._clips,"clipPath",be,function(Ye){Ye.classed("plotclip",!0).append("rect")});A.clipRect=Se.select("rect").attr({width:P._length,height:S._length}),t.setTranslate(A.plot,P._offset,S._offset),A._hasClipOnAxisFalse?(ge=null,ke=be):(ge=be,ke=null),t.setClipUrl(A.plot,ge,w),A.layerClipId=ke}function Oe(Ye){return"M"+X+","+Ye+"H"+J}function De(Ye){return"M"+P._offset+","+Ye+"h"+P._length}function je(Ye){return"M"+Ye+","+ce+"V"+pe}function Je(Ye){return"M"+Ye+","+S._offset+"v"+S._length}function ze(Ye,et,ct){if(!Ye.showline||L!==Ye._mainSubplot)return"";if(!Ye._anchorAxis)return ct(Ye._mainLinePosition);var mt=et(Ye._mainLinePosition);return Ye.mirror&&(mt+=et(Ye._mainMirrorPosition)),mt}for(L in E._plots){A=E._plots[L],P=A.xaxis,S=A.yaxis;var Ue="M0,0";s(P,L)&&(se=c(P,"left",S,H),X=P._offset-(se?F+se:0),oe=c(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=ze(P,Oe,De),Ee&&P.showline&&(P.mirror==="all"||P.mirror==="allticks")&&(Ue+=Oe(re)+Oe(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";s(S,L)&&(_e=c(S,"bottom",P,H),pe=S._offset+S._length+(_e?F:0),we=c(S,"top",P,H),ce=S._offset-(we?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=ze(S,je,Je),Ee&&S.showline&&(S.mirror==="all"||S.mirror==="allticks")&&(Ge+=je(de)+je(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(w),b.previousPromises(w)}function s(w,k){return(w.ticks||w.showline)&&(k===w._mainSubplot||w.mirror==="all"||w.mirror==="allticks")}function x(w,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=l.FROM_BL[k];return L.side===k?A.domain[I]===w.domain[I]:L.mirror&&A.domain[1-I]===w.domain[1-I]}function c(w,k,L,A){if(x(w,k,L))return L._lw;for(var I=0;I<A.length;I++){var P=A[I];if(P._mainAxis===L._mainAxis&&x(w,k,P))return P._lw}return 0}function T(w,k){var L=w.title,A=w._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 w.width*L.x+I}}function _(w,k){var L=w.title,A=w._size,I=0;if(k!=="0em"&&k?k===l.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 w.height-w.height*L.y+I}}te.layoutStyles=function(w){return y.syncOrAsync([b.doAutoMargin,p],w)},te.drawMainTitle=function(w){var k=w._fullLayout,L=function(I){var P=I.title,S="middle";return y.isRightAnchor(P)?S="end":y.isLeftAnchor(P)&&(S="start"),S}(k),A=function(I){var P=I.title,S="0em";return y.isTopAnchor(P)?S=l.CAP_SHIFT+"em":y.isMiddleAnchor(P)&&(S=l.MID_SHIFT+"em"),S}(k);i.draw(w,"gtitle",{propContainer:k,propName:"title.text",placeholder:k._dfltTitle.plot,attributes:{x:T(k,L),y:_(k,A),"text-anchor":L,dy:A}})},te.doTraceStyle=function(w){var k,L=w.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(w,H.cd0)}e(w),te.redrawReglTraces(w)}return b.style(w),g.getComponentMethod("legend","draw")(w),b.previousPromises(w)},te.doColorBars=function(w){return g.getComponentMethod("colorbar","draw")(w),b.previousPromises(w)},te.layoutReplot=function(w){var k=w.layout;return w.layout=void 0,g.call("_doPlot",w,"",k)},te.doLegend=function(w){return g.getComponentMethod("legend","draw")(w),b.previousPromises(w)},te.doTicksRelayout=function(w){return d.draw(w,"redraw"),w._fullLayout._hasOnlyLargeSploms&&(g.subplotsRegistry.splom.updateGrid(w),e(w),te.redrawReglTraces(w)),te.drawMainTitle(w),b.previousPromises(w)},te.doModeBar=function(w){var k=w._fullLayout;r.manage(w);for(var L=0;L<k._basePlotModules.length;L++){var A=k._basePlotModules[L].updateFx;A&&A(w)}return b.previousPromises(w)},te.doCamera=function(w){for(var k=w._fullLayout,L=k._subplots.gl3d,A=0;A<L.length;A++){var I=k[L[A]];I._scene.setViewport(I)}},te.drawData=function(w){var k=w._fullLayout;e(w);for(var L=k._basePlotModules,A=0;A<L.length;A++)L[A].plot(w);return te.redrawReglTraces(w),b.style(w),g.getComponentMethod("shapes","draw")(w),g.getComponentMethod("annotations","draw")(w),g.getComponentMethod("images","draw")(w),k._replotting=!1,b.previousPromises(w)},te.redrawReglTraces=function(w){var k=w._fullLayout;if(k._has("regl")){var L,A,I=w._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"?y.pushUnique(P,E.xaxis+E.yaxis):E.type==="scatterpolargl"&&y.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(w){for(var k,L=d.list(w,"",!0),A={},I=0;I<L.length;I++)if(!A[(k=L[I])._id]){A[k._id]=1,f(w,k),o(w,k);var P=k._matchGroup;if(P)for(var S in P){var E=d.getFromId(w,S);o(w,E,k.range),A[S]=1}}u(w)},te.finalDraw=function(w){g.getComponentMethod("rangeslider","draw")(w),g.getComponentMethod("rangeselector","draw")(w)},te.drawMarginPushers=function(w){g.getComponentMethod("legend","draw")(w),g.getComponentMethod("rangeselector","draw")(w),g.getComponentMethod("sliders","draw")(w),g.getComponentMethod("updatemenus","draw")(w),g.getComponentMethod("colorbar","draw")(w)}},{"../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(v,$,te){var m=v("../lib"),g=m.isPlainObject,b=v("./plot_schema"),y=v("../plots/plots"),e=v("../plots/attributes"),n=v("./plot_template"),t=v("./plot_config").dfltConfig;function i(h,p){h=m.extendDeep({},h);var s,x,c=Object.keys(h).sort();function T(A,I,P){if(g(I)&&g(A))i(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&&i(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(s=0;s<c.length;s++){var _=c[s],w=h[_];if(_ in p?T(w,p[_],_):p[_]=w,r(_)===_)for(var k in p){var L=r(k);k===L||L!==_||k in h||T(w,p[k],_)}}}function r(h){return h.replace(/[0-9]+$/,"")}function d(h,p,s,x,c){var T=c&&s(c);for(var _ in h){var w=h[_],k=u(h,_,x),L=u(h,_,c),A=s(L);if(!A){var I=r(_);I!==_&&(A=s(L=u(h,I,c)))}if((!T||T!==A)&&!(!A||A._noTemplating||A.valType==="data_array"||A.arrayOk&&Array.isArray(w)))if(!A.valType&&g(w))d(w,p,s,k,L);else if(A._isLinkedToArray&&Array.isArray(w))for(var P=!1,S=0,E={},D=0;D<w.length;D++){var F=w[D];if(g(F)){var H=F.name;if(H)E[H]||(d(F,p,s,u(w,S,k),u(w,S,L)),S++,E[H]=1);else if(!P){var V=u(h,n.arrayDefaultKey(_),x),Z=u(w,S,k);d(F,p,s,Z,u(w,S,L));var K=m.nestedProperty(p,Z);m.nestedProperty(p,V).set(K.get()),K.set(null),P=!0}}}else m.nestedProperty(p,k).set(w)}}function l(h,p){return b.getLayoutValObject(h,m.nestedProperty({},p).parts)}function a(h,p){return b.getTraceValObject(h,m.nestedProperty({},p).parts)}function u(h,p,s){return s?Array.isArray(h)?s+"["+p+"]":s+"."+p:p}function f(h){for(var p=0;p<h.length;p++)if(g(h[p]))return!0}function o(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=m.isPlainObject(h)?h:m.getGraphDiv(h),h=m.extendDeep({_context:t},{data:h.data,layout:h.layout}),y.supplyDefaults(h);var p=h.data||[],s=h.layout||{};s._basePlotModules=h._fullLayout._basePlotModules,s._modules=h._fullLayout._modules;var x={data:{},layout:{}};p.forEach(function(S){var E={};d(S,E,a.bind(null,S));var D=m.coerce(S,{},e,"type"),F=x.data[D];F||(F=x.data[D]=[]),F.push(E)}),d(s,x.layout,l.bind(null,s)),delete x.layout.template;var c=s.template;if(g(c)){var T,_,w,k,L,A,I=c.layout;g(I)&&i(I,x.layout);var P=c.data;if(g(P)){for(_ in x.data)if(w=P[_],Array.isArray(w)){for(A=(L=x.data[_]).length,k=w.length,T=0;T<A;T++)i(w[T%k],L[T]);for(T=A;T<k;T++)L.push(m.extendDeep({},w[T]))}for(_ in P)_ in x.data||(x.data[_]=m.extendDeep([],P[_]))}}return x},te.validateTemplate=function(h,p){var s=m.extendDeep({},{_context:t,data:h.data,layout:h.layout}),x=s.layout||{};g(p)||(p=x.template||{});var c=p.layout,T=p.data,_=[];s.layout=x,s.layout.template=p,y.supplyDefaults(s);var w=s._fullLayout,k=s._fullData,L={};if(g(c)?(function F(H,V){for(var Z in H)if(Z.charAt(0)!=="_"&&g(H[Z])){var K,G=r(Z),W=[];for(K=0;K<V.length;K++)W.push(u(H,Z,V[K])),G!==Z&&W.push(u(H,G,V[K]));for(K=0;K<W.length;K++)L[W[K]]=1;F(H[Z],W)}}(w,["layout"]),function F(H,V){for(var Z in H)if(Z.indexOf("defaults")===-1&&g(H[Z])){var K=u(H,Z,V);L[K]?F(H[Z],K):_.push({code:"unused",path:K})}}(c,"layout")):_.push({code:"layout"}),g(T)){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 T){var E=T[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],G=u(H,Z,V);g(K)?(Array.isArray(H)&&K._template===!1&&K.templateitemname&&_.push({code:"missing",path:G,templateitemname:K.templateitemname}),F(K,G)):Array.isArray(K)&&f(K)&&F(K,G)}}({data:k,layout:w},""),_.length)return _.map(o)}},{"../lib":503,"../plots/attributes":550,"../plots/plots":619,"./plot_config":541,"./plot_schema":542,"./plot_template":543}],546:[function(v,$,te){var m=v("fast-isnumeric"),g=v("./plot_api"),b=v("../plots/plots"),y=v("../lib"),e=v("../snapshot/helpers"),n=v("../snapshot/tosvg"),t=v("../snapshot/svgtoimg"),i=v("../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}};$.exports=function(d,l){var a,u,f,o;function h(D){return!(D in l)||y.validate(l[D],r[D])}if(l=l||{},y.isPlainObject(d)?(a=d.data||[],u=d.layout||{},f=d.config||{},o={}):(d=y.getGraphDiv(d),a=y.extendDeep([],d.data),u=y.extendDeep({},d.layout),f=d._context,o=d._fullLayout||{}),!h("width")&&l.width!==null||!h("height")&&l.height!==null)throw new Error("Height and width should be pixel values.");if(!h("format"))throw new Error("Export format is not "+y.join2(r.format.values,", "," or ")+".");var p={};function s(D,F){return y.coerce(l,p,r,D,F)}var x=s("format"),c=s("width"),T=s("height"),_=s("scale"),w=s("setBackground"),k=s("imageDataOnly"),L=document.createElement("div");L.style.position="absolute",L.style.left="-5000px",document.body.appendChild(L);var A=y.extendFlat({},u);c?A.width=c:l.width===null&&m(o.width)&&(A.width=o.width),T?A.height=T:l.height===null&&m(o.height)&&(A.height=o.height);var I=y.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),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(){g.purge(L),document.body.removeChild(L)}if(x==="full-json"){var G=b.graphJson(L,!1,"keepdata","object",!0,!0);return G.version=i,G=JSON.stringify(G),K(),D(k?G:e.encodeJSON(G))}if(K(),x==="svg")return D(k?H:e.encodeSVG(H));var W=document.createElement("canvas");W.id=y.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){g.newPlot(L,a,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":1123,"./plot_api":540,"fast-isnumeric":190}],547:[function(v,$,te){var m=v("../lib"),g=v("../plots/plots"),b=v("./plot_schema"),y=v("./plot_config").dfltConfig,e=m.isPlainObject,n=Array.isArray,t=m.isArrayOrTypedArray;function i(p,s,x,c,T,_){_=_||[];for(var w=Object.keys(p),k=0;k<w.length;k++){var L=w[k];if(L!=="transforms"){var A=_.slice();A.push(L);var I=p[L],P=s[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")i(I,P,S,c,T,A);else if(D&&n(I)){I.length>P.length&&c.push(a("unused",T,A.concat(P.length)));var V,Z,K,G,W,Q=P.length,R=Array.isArray(H);if(R&&(Q=Math.min(Q,H.length)),S.dimensions===2)for(Z=0;Z<Q;Z++)if(n(I[Z])){I[Z].length>P[Z].length&&c.push(a("unused",T,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,G=I[Z][V],W=P[Z][V],m.validate(G,K)?W!==G&&W!==+G&&c.push(a("dynamic",T,A.concat(Z,V),G,W)):c.push(a("value",T,A.concat(Z,V),G))}else c.push(a("array",T,A.concat(Z),I[Z]));else for(Z=0;Z<Q;Z++)K=R?H[Z]:H,G=I[Z],W=P[Z],m.validate(G,K)?W!==G&&W!==+G&&c.push(a("dynamic",T,A.concat(Z),G,W)):c.push(a("value",T,A.concat(Z),G))}else if(S.items&&!D&&n(I)){var U,ee,j=H[Object.keys(H)[0]],X=[];for(U=0;U<P.length;U++){var J=P[U]._index||U;if((ee=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?c.push(a("invisible",T,ee)):i(re,ne,j,c,T,ee)}}for(U=0;U<I.length;U++)(ee=A.slice()).push(U),e(I[U])?X.indexOf(U)===-1&&c.push(a("unused",T,ee)):c.push(a("object",T,ee,I[U]))}else!e(I)&&e(P)?c.push(a("object",T,A,I)):t(I)||!t(P)||D||F?L in s?m.validate(I,S)?S.valType==="enumerated"&&(S.coerceNumber&&I!==+P||I!==P)&&c.push(a("dynamic",T,A,I,P)):c.push(a("value",T,A,I)):c.push(a("unused",T,A,I)):c.push(a("array",T,A,I));else c.push(a("schema",T,A))}}return c}function r(p,s){for(var x=p.layout.layoutAttributes,c=0;c<s.length;c++){var T=s[c],_=p.traces[T.type],w=_.layoutAttributes;w&&(T.subplot?m.extendFlat(x[_.attributes.subplot.dflt],w):m.extendFlat(x,w))}return x}$.exports=function(p,s){p===void 0&&(p=[]),s===void 0&&(s={});var x,c,T=b.get(),_=[],w={_context:m.extendFlat({},y)};n(p)?(w.data=m.extendDeep([],p),x=p):(w.data=[],x=[],_.push(a("array","data"))),e(s)?(w.layout=m.extendDeep({},s),c=s):(w.layout={},c={},arguments.length>1&&_.push(a("object","layout"))),g.supplyDefaults(w);for(var k=w._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=T.traces[E].attributes;D.type={valType:"enumerated",values:[E]},S.visible===!1&&I.visible!==!1&&_.push(a("invisible",P)),i(I,S,D,_,P);var F=I.transforms,H=S.transforms;if(F){n(F)||_.push(a("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 G=T.transforms[K]?T.transforms[K].attributes:{};G.type={valType:"enumerated",values:Object.keys(T.transforms)},i(F[V],H[V],G,_,P,Z)}else _.push(a("object",P,Z))}}}else _.push(a("object",P))}var W=w._fullLayout,Q=r(T,k);return i(c,W,Q,_,"layout"),_.length===0?void 0:_};var d={object:function(p,s){return(p==="layout"&&s===""?"The layout argument":p[0]==="data"&&s===""?"Trace "+p[1]+" in the data argument":l(p)+"key "+s)+" must be linked to an object c
1215ontainer"},array:function(p,s){return(p==="data"?"The data argument":l(p)+"key "+s)+" must be linked to an array container"},schema:function(p,s){return l(p)+"key "+s+" is not part of the schema"},unused:function(p,s,x){var c=e(x)?"container":"key";return l(p)+c+" "+s+" did not get coerced"},dynamic:function(p,s,x,c){return[l(p)+"key",s,"(set to '"+x+"')","got reset to","'"+c+"'","during defaults."].join(" ")},invisible:function(p,s){return(s?l(p)+"item "+s:"Trace "+p[1])+" got defaulted to be not visible"},value:function(p,s,x){return[l(p)+"key "+s,"is set to an invalid value ("+x+")"].join(" ")}};function l(p){return n(p)?"In data trace "+p[1]+", ":"In "+p+", "}function a(p,s,x,c,T){var _,w;x=x||"",n(s)?(_=s[0],w=s[1]):(_=s,w=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](s,k,c,T);return m.log(L),{code:p,container:_,trace:w,path:x,astr:k,msg:L}}function u(p,s){var x=h(s),c=x.keyMinusId,T=x.id;return!!(c in p&&p[c]._isSubplotObj&&T)||s in p}function f(p,s){return s in p?p[s]:p[h(s).keyMinusId]}var o=m.counterRegex("([a-z]+)");function h(p){var s=p.match(o);return{keyMinusId:s&&s[1],id:s&&s[2]}}},{"../lib":503,"../plots/plots":619,"./plot_config":541,"./plot_schema":542}],548:[function(v,$,te){$.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(v,$,te){var m=v("../lib"),g=v("../plot_api/plot_template");$.exports=function(b,y,e){var n,t,i=e.name,r=e.inclusionAttr||"visible",d=y[i],l=m.isArrayOrTypedArray(b[i])?b[i]:[],a=y[i]=[],u=g.arrayTemplater(y,i,r);for(n=0;n<l.length;n++){var f=l[n];m.isPlainObject(f)?t=u.newItem(f):(t=u.newItem({}))[r]=!1,t._index=n,t[r]!==!1&&e.handleItemDefaults(f,t,y,e),a.push(t)}var o=u.defaultItems();for(n=0;n<o.length;n++)(t=o[n])._index=a.length,e.handleItemDefaults({},t,y,e,{}),a.push(t);if(m.isArrayOrTypedArray(d)){var h=Math.min(d.length,a.length);for(n=0;n<h;n++)m.relinkPrivateKeys(a[n],d[n])}return a}},{"../lib":503,"../plot_api/plot_template":543}],550:[function(v,$,te){var m=v("./font_attributes"),g=v("../components/fx/attributes");$.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:m({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:g.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(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=g.dateTime2ms,y=g.incrementMonth,e=v("../../constants/numerical").ONEAVGMONTH;$.exports=function(n,t,i,r){if(t.type!=="date")return{vals:r};var d=n[i+"periodalignment"];if(!d)return{vals:r};var l,a=n[i+"period"];if(m(a)){if((a=+a)<=0)return{vals:r}}
1215else if(typeof a=="string"&&a.charAt(0)==="M"){var u=+a.substring(1);if(!(u>0&&Math.round(u)===u))return{vals:r};l=u}for(var f=t.calendar,o=d==="start",h=d==="end",p=n[i+"period0"],s=b(p,f)||0,x=[],c=[],T=[],_=r.length,w=0;w<_;w++){var k,L,A,I=r[w];if(l){for(k=Math.round((I-s)/(l*e)),A=y(s,l*k,f);A>I;)A=y(A,-l,f);for(;A<=I;)A=y(A,l,f);L=y(A,-l,f)}else{for(A=s+(k=Math.round((I-s)/a))*a;A>I;)A-=a;for(;A<=I;)A+=a;L=A-a}x[w]=o?L:h?A:(L+A)/2,c[w]=L,T[w]=A}return{vals:x,starts:c,ends:T}}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],552:[function(v,$,te){$.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],553:[function(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("../../lib"),y=v("../../constants/numerical").FP_SAFE,e=v("../../registry"),n=v("../../components/drawing"),t=v("./axis_ids"),i=t.getFromId,r=t.isLinked;function d(c,T){var _,w,k=[],L=c._fullLayout,A=a(L,T,0),I=a(L,T,1),P=u(c,T),S=P.min,E=P.max;if(S.length===0||E.length===0)return b.simpleMap(T.range,T.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(T.range){var V=b.simpleMap(T.range,T.r2l);H=V[1]<V[0]}T.autorange==="reversed"&&(H=!0,T.autorange=!0);var Z,K,G,W,Q,R,N=T.rangemode,U=N==="tozero",ee=N==="nonnegative",j=T._length,X=j/10,J=0;for(_=0;_<S.length;_++)for(Z=S[_],w=0;w<E.length;w++)(R=(K=E[w]).val-Z.val-l(T,Z.val,K.val))>0&&((Q=j-A(Z)-I(K))>X?R/Q>J&&(G=Z,W=K,J=R/Q):R/j>J&&(G={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=ee?[Math.max(0,re),Math.max(1,ne)]:[re,ne]}else U?(G.val>=0&&(G={val:0,nopad:1}),W.val<=0&&(W={val:0,nopad:1})):ee&&(G.val-J*A(G)<0&&(G={val:0,nopad:1}),W.val<=0&&(W={val:1,nopad:1})),J=(W.val-G.val-l(T,Z.val,K.val))/(j-A(G)-I(W)),k=[G.val-J*A(G),W.val+J*I(W)];return H&&k.reverse(),b.simpleMap(k,T.l2r||Number)}function l(c,T,_){var w=0;if(c.rangebreaks)for(var k=c.locateBreaks(T,_),L=0;L<k.length;L++){var A=k[L];w+=A.max-A.min}return w}function a(c,T,_){var w=.05*T._length,k=T._anchorAxis||{};if((T.ticklabelposition||"").indexOf("inside")!==-1||(k.ticklabelposition||"").indexOf("inside")!==-1){var L=T.autorange==="reversed";if(!L){var A=b.simpleMap(T.range,T.r2l);L=A[1]<A[0]}L&&(_=!_)}var I=0;return r(c,T._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),G=Math.abs(Math.cos(K)),W=Math.abs(Math.sin(K));if(!Z._vals[0].bb){var Q=Z._id+"tick";Z._selections[Q].each(function(j){var X=m.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,ee=6+N.height;D=Math.max(D,F?Math.max(U*G,ee*W):Math.max(ee*G,U*W))}}}Z.ticks==="inside"&&Z.ticklabelposition==="inside"&&(D+=Z.ticklen||0)}}}return D}(c,T,_)),w=Math.max(I,w),T.constrain==="domain"&&T._inputDomain&&(w*=(T._inputDomain[1]-T._inputDomain[0])/(T.domain[1]-T.domain[0])),function(P){return P.nopad?0:P.pad+(P.extrapad?w:I)}}$.exports={getAutoRange:d,makePadFn:a,doAutoRange:function(c,T,_){if(T.setScale(),T.autorange){T.range=_?_.slice():d(c,T),T._r=T.range.slice(),T._rl=b.simpleMap(T._r,T.r2l);var w=T._input,k={};k[T._attr+".range"]=T.range,k[T._attr+".autorange"]=T.autorange,e.call("_storeDirectGUIEdit",c.layout,c._fullLayout._preGUI,k),w.range=T.range.slice(),w.autorange=T.autorange}var L=T._anchorAxis;if(L&&L.rangeslider){var A=L.rangeslider[T._name];A&&A.rangemode==="auto"&&(A.range=d(c,T)),L._input.rangeslider[T._name]=b.extendFlat({},A)}},findExtremes:function(c,T,_){_||(_={}),c._m||c.setScale();var w,k,L,A,I,P,S,E,D,F=[],H=[],V=T.length,Z=_.padded||!1,K=_.tozero&&(c.type==="linear"||c.type==="-"),G=c.type==="log",W=!1,Q=_.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((c._m>
vendor: 4,375 bytes, line 1215
12150?_.ppadplus:_.ppadminus)||_.ppad||0),U=R((c._m>0?_.ppadminus:_.ppadplus)||_.ppad||0),ee=R(_.vpadplus||_.vpad),j=R(_.vpadminus||_.vpad);if(!W){if(E=1/0,D=-1/0,G)for(w=0;w<V;w++)(k=T[w])<E&&k>0&&(E=k),k>D&&k<y&&(D=k);else for(w=0;w<V;w++)(k=T[w])<E&&k>-y&&(E=k),k>D&&k<y&&(D=k);T=[E,D],V=2}var X={tozero:K,extrapad:Z};function J(ne){L=T[ne],g(L)&&(P=N(ne),S=U(ne),Q?(A=c.c2l(L)-j(ne),I=c.c2l(L)+ee(ne)):(E=L-j(ne),D=L+ee(ne),G&&E<D/10&&(E=D/10),A=c.c2l(E),I=c.c2l(D)),K&&(A=Math.min(0,A),I=Math.max(0,I)),p(A)&&f(F,A,S,X),p(I)&&o(H,I,P,X))}var re=Math.min(6,V);for(w=0;w<re;w++)J(w);for(w=V-1;w>=re;w--)J(w);return{min:F,max:H,opts:_}},concatExtremes:u};function u(c,T,_){var w,k,L,A=T._id,I=c._fullData,P=c._fullLayout,S=[],E=[];function D(K,G){for(w=0;w<G.length;w++){var W=K[G[w]],Q=(W._extremes||{})[A];if(W.visible===!0&&Q){for(k=0;k<Q.min.length;k++)L=Q.min[k],f(S,L.val,L.pad,{extrapad:L.extrapad});for(k=0;k<Q.max.length;k++)L=Q.max[k],o(E,L.val,L.pad,{extrapad:L.extrapad})}}}if(D(I,T._traceIndices),D(P.annotations||[],T._annIndices||[]),D(P.shapes||[],T._shapeIndices||[]),T._matchGroup&&!_){for(var F in T._matchGroup)if(F!==T._id){var H=i(c,F),V=u(c,H,!0),Z=T._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],o(E,L.val,L.pad*Z,{extrapad:L.extrapad})}}return{min:S,max:E}}function f(c,T,_,w){h(c,T,_,w,s)}function o(c,T,_,w){h(c,T,_,w,x)}function h(c,T,_,w,k){for(var L=w.tozero,A=w.extrapad,I=!0,P=0;P<c.length&&I;P++){var S=c[P];if(k(S.val,T)&&S.pad>=_&&(S.extrapad||!A)){I=!1;break}k(T,S.val)&&S.pad<=_&&(A||!S.extrapad)&&(c.splice(P,1),P--)}if(I){var E=L&&T===0;c.push({val:T,pad:E?0:_,extrapad:!E&&A})}}function p(c){return g(c)&&Math.abs(c)<y}function s(c,T){return c<=T}function x(c,T){return c>=T}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../../registry":638,"./axis_ids":558,"@plotly/d3":58,"fast-isnumeric":190}],554:[function(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("../../plots/plots"),y=v("../../registry"),e=v("../../lib"),n=e.strTranslate,t=v("../../lib/svg_text_utils"),i=v("../../components/titles"),r=v("../../components/color"),d=v("../../components/drawing"),l=v("./layout_attributes"),a=v("./clean_ticks"),u=v("../../constants/numerical"),f=u.ONEMAXYEAR,o=u.ONEAVGYEAR,h=u.ONEMINYEAR,p=u.ONEMAXQUARTER,s=u.ONEAVGQUARTER,x=u.ONEMINQUARTER,c=u.ONEMAXMONTH,T=u.ONEAVGMONTH,_=u.ONEMINMONTH,w=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=v("../../constants/alignment"),K=Z.MID_SHIFT,G=Z.CAP_SHIFT,W=Z.LINE_SPACING,Q=Z.OPPOSITE_SIDE,R=$.exports={};R.setConvert=v("./set_convert");var N=v("./axis_autotype"),U=v("./axis_ids"),ee=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=v("./autorange");R.getAutoRange=X.getAutoRange,R.findExtremes=X.findExtremes;function J(Fe){var qe=1e-4*(Fe[1]-Fe[0]);return[Fe[0]-qe,Fe[1]+qe]}R.coerceRef=function(Fe,qe,wt,ft,Ce,Ie){var Te=ft.charAt(ft.length-1),Pe=wt._fullLayout._subplots[Te+"axis"],Ve=ft+"ref",tt={};return Ce||(Ce=Pe[0]||(typeof Ie=="string"?Ie:Ie[0])),Ie||(Ie=Ce),Pe=Pe.concat(Pe.map(function(ot){return ot+" domain"})),tt[Ve]={valType:"enumerated",values:Pe.concat(Ie?typeof Ie=="string"?[Ie]:Ie:[]),dflt:Ce},e.coerce(Fe,qe,tt,Ve)},R.getRefType=function(Fe){return Fe===void 0?Fe:Fe==="paper"?"paper":Fe==="pixel"?"pixel":/( domain)$/.test(Fe)?"domain":"range"},R.coercePosition=function(Fe,qe,wt,ft,Ce,Ie){var Te,Pe;if(R.getRefType(ft)!=="range")Te=e.ensureNumber,Pe=wt(Ce,Ie);else{var Ve=R.getFromId(qe,ft);Pe=wt(Ce,Ie=Ve.fraction2r(Ie)),Te=Ve.cleanPos}Fe[Ce]=Te(Pe)},R.cleanPosition=function(Fe,qe,wt){return(wt==="paper"||wt==="pixel"?e.ensureNumber:R.getFromId(qe,wt).cleanPos)(Fe)},R.redrawComponents=function(Fe,qe){qe=qe||R.listIds(Fe);var wt=Fe._fullLayout;function ft(Ce,Ie,Te,Pe){for(var Ve=y.getComponentMethod(Ce,Ie),tt={},ot=0;ot<qe.length;ot++)for(var at=wt[R.id2name(qe[ot])][Te],_t=0;_t<at.length;_t++){var bt=at[_t];if(!tt[bt]&&(Ve(Fe,bt),tt[bt]=1,Pe))return}}ft("annotations","drawOne","_annIndices"),ft("shapes","drawOne","_shapeIndices"),ft("images","draw","_imgIndices",!0)};
1215var re=R.getDataConversions=function(Fe,qe,wt,ft){var Ce,Ie=wt==="x"||wt==="y"||wt==="z"?wt:ft;if(Array.isArray(Ie)){if(Ce={type:N(ft,void 0,{autotypenumbers:Fe._fullLayout.autotypenumbers}),_categories:[]},R.setConvert(Ce),Ce.type==="category")for(var Te=0;Te<ft.length;Te++)Ce.d2c(ft[Te])}else Ce=R.getFromTrace(Fe,qe,Ie);return Ce?{d2c:Ce.d2c,c2d:Ce.c2d}:Ie==="ids"?{d2c:se,c2d:se}:{d2c:ne,c2d:ne}};function ne(Fe){return+Fe}function se(Fe){return String(Fe)}function oe(Fe){return+Fe.substring(1)}R.getDataToCoordFunc=function(Fe,qe,wt,ft){return re(Fe,qe,wt,ft).d2c},R.counterLetter=function(Fe){var qe=Fe.charAt(0);return qe==="x"?"y":qe==="y"?"x":void 0},R.minDtick=function(Fe,qe,wt,ft){["log","category","multicategory"].indexOf(Fe.type)===-1&&ft?Fe._minDtick===void 0?(Fe._minDtick=qe,Fe._forceTick0=wt):Fe._minDtick&&((Fe._minDtick/qe+1e-6)%1<2e-6&&((wt-Fe._forceTick0)/qe%1+1.000001)%1<2e-6?(Fe._minDtick=qe,Fe._forceTick0=wt):((qe/Fe._minDtick+1e-6)%1>2e-6||((wt-Fe._forceTick0)/Fe._minDtick%1+1.000001)%1>2e-6)&&(Fe._minDtick=0)):Fe._minDtick=0},R.saveRangeInitial=function(Fe,qe){for(var wt=R.list(Fe,"",!0),ft=!1,Ce=0;Ce<wt.length;Ce++){var Ie=wt[Ce],Te=Ie._rangeInitial===void 0,Pe=Te||!(Ie.range[0]===Ie._rangeInitial[0]&&Ie.range[1]===Ie._rangeInitial[1]);(Te&&Ie.autorange===!1||qe&&Pe)&&(Ie._rangeInitial=Ie.range.slice(),ft=!0)}return ft},R.saveShowSpikeInitial=function(Fe,qe){for(var wt=R.list(Fe,"",!0),ft=!1,Ce="on",Ie=0;Ie<wt.length;Ie++){var Te=wt[Ie],Pe=Te._showSpikeInitial===void 0,Ve=Pe||Te.showspikes!==Te._showspikes;(Pe||qe&&Ve)&&(Te._showSpikeInitial=Te.showspikes,ft=!0),Ce!=="on"||Te.showspikes||(Ce="off")}return Fe._fullLayout._cartesianSpikesEnabled=Ce,ft},R.autoBin=function(Fe,qe,wt,ft,Ce,Ie){var Te,Pe=e.aggNums(Math.min,null,Fe),Ve=e.aggNums(Math.max,null,Fe);if(qe.type==="category"||qe.type==="multicategory")return{start:Pe-.5,end:Ve+.5,size:Math.max(1,Math.round(Ie)||1),_dataSpan:Ve-Pe};if(Ce||(Ce=qe.calendar),Te=qe.type==="log"?{type:"linear",range:[Pe,Ve]}:{type:qe.type,range:e.simpleMap([Pe,Ve],qe.c2r,0,Ce),calendar:Ce},R.setConvert(Te),Ie=Ie&&a.dtick(Ie,Te.type))Te.dtick=Ie,Te.tick0=a.tick0(void 0,Te.type,Ce);else{var tt;if(wt)tt=(Ve-Pe)/wt;else{var ot=e.distinctVals(Fe),at=Math.pow(10,Math.floor(Math.log(ot.minDiff)/Math.LN10)),_t=at*e.roundUp(ot.minDiff/at,[.9,1.9,4.9,9.9],!0);tt=Math.max(_t,2*e.stdev(Fe)/Math.pow(Fe.length,ft?.25:.4)),g(tt)||(tt=1)}R.autoTicks(Te,tt)}var bt,jt=Te.dtick,Nt=R.tickIncrement(R.tickFirst(Te),jt,"reverse",Ce);if(typeof jt=="number")bt=(Nt=function($e,yt,Ot,Mt,Pt){var Le=0,Xe=0,it=0,At=0;function It(pr){return(1+100*(pr-$e)/Ot.dtick)%100<2}for(var Zt=0;Zt<yt.length;Zt++)yt[Zt]%1==0?it++:g(yt[Zt])||At++,It(yt[Zt])&&Le++,It(yt[Zt]+Ot.dtick/2)&&Xe++;var Jt=yt.length-At;if(it===Jt&&Ot.type!=="date")Ot.dtick<1?$e=Mt-.5*Ot.dtick:($e-=.5)+Ot.dtick<Mt&&($e+=Ot.dtick);else if(Xe<.1*Jt&&(Le>.3*Jt||It(Mt)||It(Pt))){var Vt=Ot.dtick/2;$e+=$e+Vt<Mt?Vt:-Vt}return $e}(Nt,Fe,Te,Pe,Ve))+(1+Math.floor((Ve-Nt)/jt))*jt;else for(Te.dtick.charAt(0)==="M"&&(Nt=function($e,yt,Ot,Mt,Pt){var Le=e.findExactDates(yt,Pt);if(Le.exactDays>.8){var Xe=Number(Ot.substr(1));Le.exactYears>.8&&Xe%12==0?$e=R.tickIncrement($e,"M6","reverse")+1.5*k:Le.exactMonths>.8?$e=R.tickIncrement($e,"M1","reverse")+15.5*k:$e-=L;var it=R.tickIncrement($e,Ot);if(it<=Mt)return it}return $e}(Nt,Fe,jt,Pe,Ce)),bt=Nt,0;bt<=Ve;)bt=R.tickIncrement(bt,jt,!1,Ce);return{start:qe.c2r(Nt,0,Ce),end:qe.c2r(bt,0,Ce),size:jt,_dataSpan:Ve-Pe}},R.prepTicks=function(Fe,qe){var wt=e.simpleMap(Fe.range,Fe.r2l,void 0,void 0,qe);if(Fe._dtickInit=Fe.dtick,Fe._tick0Init=Fe.tick0,Fe.tickmode==="auto"||!Fe.dtick){var ft,Ce=Fe.nticks;Ce||(Fe.type==="category"||Fe.type==="multicategory"?(ft=Fe.tickfont?e.bigFont(Fe.tickfont.size||12):15,Ce=Fe._length/ft):(ft=Fe._id.charAt(0)==="y"?40:80,Ce=e.constrain(Fe._length/ft,4,9)+1),Fe._name==="radialaxis"&&(Ce*=2)),Fe.tickmode==="array"&&(Ce*=100),Fe._roughDTick=Math.abs(wt[1]-wt[0])/Ce,R.autoTicks(Fe,Fe._roughDTick),Fe._minDtick>0&&Fe.dtick<2*Fe._minDtick&&(Fe.dtick=Fe._minDtick,Fe.tick0=Fe.l2r(Fe._forceTick0))}Fe.ticklabelmode==="period"&&function(Ie){var Te;function Pe(){return!(g(Ie.dtick)||Ie.dtick.charAt(0)!=="M")}var Ve=Pe(),tt=R.getTickFormat(Ie);if(tt){var ot=Ie._dtickInit!==Ie.dtick;/%[fLQsSMX]/.test(tt)||(/%[HI]/.test(tt)?(Te=A,ot&&!Ve&&Ie.dtick<A&&(Ie.dtick=A)):/%p/.test(tt)?(Te=L,ot&&!Ve&&Ie.dtick<L&&(Ie.dtick=L)):/%[Aadejuwx]/.test(tt)?(Te=k,ot&&!Ve&&Ie.dtick<k&&(Ie.dtick=k)):/%[UVW]/.test(tt)?(Te=w,ot&&!Ve&&Ie.dtick<w&&(Ie.dtick=w)):/%[Bbm]/.test(tt)?(Te=T,ot&&(Ve?oe(Ie.dtick)<1:Ie.dtick<_)&&(Ie.dtick="M1")):/%[q]/.test(tt)?(Te=s,ot&&(Ve?oe(Ie.dtick)<3:Ie.dtick<x)&&(Ie.dtick="M3")):/%[Yy]/.test(tt)&&(Te=o,ot&&(Ve?oe(Ie.dtick)<12:Ie.dtick<h)&&(Ie.dtick="M12")))}(Ve=Pe())&&Ie.tick0===Ie._dowTick0&&(Ie.tick0=Ie._rawTick0),Ie._definedDelta=Te}(Fe),Fe.tick0||(Fe.tick0=Fe.type==="date"?"2000-01-01":0),Fe.type==="date"&&Fe.dtick<.1&&(Fe.dtick=.1),ge(Fe)},R.calcTicks=function(Fe,qe){R.prepTicks(Fe,qe);var wt=e.simpleMap(Fe.range,Fe.r2l,void 0,void 0,qe);if(Fe.tickmode==="array")return function(er){var ar=er.tickvals,hr=er.ticktext,vr=new Array(ar.length),Pr=J(e.simpleMap(er.range,er.r2l)),Ur=Math.min(Pr[0],Pr[1]),qr=Math.max(Pr[0],Pr[1]),rn=0;Array.isArray(hr)||(hr=[]);var An=er.type==="category"?er.d2l_noadd:er.d2l;er.type==="log"&&String(er.dtick).charAt(0)!=="L"&&(er.dtick="L"+Math.pow(10,Math.floor(Math.min(er.range[0],er.range[1]))-1));for(var mn=0;mn<ar.length;mn++){var Mn=An(ar[mn]);Mn>Ur&&Mn<qr&&(hr[mn]===void 0?vr[rn]=R.tickText(er,Mn):vr[rn]=ke(er,Mn,String(hr[mn])),rn++)}return rn<ar.length&&vr.splice(rn,ar.length-rn),er.rangebreaks&&(vr=vr.filter(function(Xr){return er.maskBreaks(Xr.x)!==E})),vr}(Fe);var ft=J(wt),Ce=ft[0],Ie=ft[1],Te=wt[1]<wt[0],Pe=Math.min(wt[0],wt[1]),Ve=Math.max(wt[0],wt[1]),tt=g(Fe.dtick),ot=Fe.type==="log"&&!(tt||Fe.dtick.charAt(0)==="L"),at=Fe.ticklabelmode==="period";
1215if(Fe._tmin=R.tickFirst(Fe,qe),Fe._tmin<Ce!==Te)return[];Fe.type!=="category"&&Fe.type!=="multicategory"||(Ie=Te?Math.max(-.5,Ie):Math.min(Fe._categories.length-.5,Ie));var _t=Fe._tmin;Fe.rangebreaks&&Fe._tick0Init!==Fe.tick0&&(_t=Et(_t,Fe),Te||(_t=R.tickIncrement(_t,Fe.dtick,!Te,Fe.calendar))),at&&(_t=R.tickIncrement(_t,Fe.dtick,!Te,Fe.calendar));var bt,jt=Fe.ticklabelstep,Nt=Math.max(1e3,Fe._length||0),$e=[],yt=null;tt?bt=Fe.dtick:Fe.type==="date"?typeof Fe.dtick=="string"&&Fe.dtick.charAt(0)==="M"&&(bt=T*Fe.dtick.substring(1)):bt=Fe._roughDTick;for(var Ot,Mt,Pt=Math.round((Fe.r2l(_t)-Fe.r2l(Fe.tick0))/bt)-1;Te?_t>=Ie:_t<=Ie;_t=R.tickIncrement(_t,Fe.dtick,Te,Fe.calendar)){if(Pt++,Fe.rangebreaks&&!Te){if(_t<Ce)continue;if(Fe.maskBreaks(_t)===E&&Et(_t,Fe)>=Ve)break}if($e.length>Nt||_t===yt)break;yt=_t;var Le=!1;ot&&_t!==(0|_t)&&(Le=!0);var Xe={minor:Le,value:_t};jt>1&&Pt%jt&&(Xe.skipLabel=!0),$e.push(Xe)}if(at&&function(er,ar,hr){for(var vr=0;vr<er.length;vr++){var Pr=er[vr].value,Ur=vr,qr=vr+1;vr<er.length-1?(Ur=vr,qr=vr+1):vr>0?(Ur=vr-1,qr=vr):(Ur=vr,qr=vr);var rn,An=er[Ur].value,mn=er[qr].value,Mn=Math.abs(mn-An),Xr=hr||Mn,Er=0;Xr>=h?Er=Mn>=h&&Mn<=f?Mn:o:hr===s&&Xr>=x?Er=Mn>=x&&Mn<=p?Mn:s:Xr>=_?Er=Mn>=_&&Mn<=c?Mn:T:hr===w&&Xr>=w?Er=w:Xr>=k?Er=k:hr===L&&Xr>=L?Er=L:hr===A&&Xr>=A&&(Er=A),Er>=Mn&&(Er=Mn,rn=!0);var on=Pr+Er;if(ar.rangebreaks&&Er>0){for(var Un=0,Tr=0;Tr<84;Tr++){var en=(Tr+.5)/84;ar.maskBreaks(Pr*(1-en)+en*on)!==E&&Un++}(Er*=Un/84)||(er[vr].drop=!0),rn&&Mn>w&&(Er=Mn)}(Er>0||vr===0)&&(er[vr].periodX=Pr+Er/2)}}($e,Fe,Fe._definedDelta),Fe.rangebreaks){var it=Fe._id.charAt(0)==="y",At=1;Fe.tickmode==="auto"&&(At=Fe.tickfont?Fe.tickfont.size:12);var It=NaN;for(Ot=$e.length-1;Ot>-1;Ot--)if($e[Ot].drop)$e.splice(Ot,1);else{$e[Ot].value=Et($e[Ot].value,Fe);var Zt=Fe.c2p($e[Ot].value);(it?It>Zt-At:It<Zt+At)?$e.splice(Te?Ot+1:Ot,1):It=Zt}}Qe(Fe)&&Math.abs(wt[1]-wt[0])===360&&$e.pop(),Fe._tmax=($e[$e.length-1]||{}).value,Fe._prevDateHead="",Fe._inCalcTicks=!0;var Jt,Vt,pr=function(er){er.text=" ",Fe._prevDateHead=Mt},Ir=[];for(Ot=0;Ot<$e.length;Ot++){var fr=$e[Ot].minor,$t=$e[Ot].value;Mt=Fe._prevDateHead,Jt=R.tickText(Fe,$t,!1,fr),(Vt=$e[Ot].periodX)!==void 0&&(Jt.periodX=Vt,(Vt>Ve||Vt<Pe)&&(Vt>Ve&&(Jt.periodX=Ve),Vt<Pe&&(Jt.periodX=Pe),pr(Jt))),$e[Ot].skipLabel&&pr(Jt),Ir.push(Jt)}return Fe._inCalcTicks=!1,Ir};var pe=[2,5,10],ce=[1,2,3,6,12],de=[1,2,5,10,15,30],xe=[1,2,3,7,14],_e=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],we=[-.301,0,.301,.699,1],Ee=[15,30,45,90,180];function fe(Fe,qe,wt){return qe*e.roundUp(Fe/qe,wt)}function ge(Fe){var qe=Fe.dtick;if(Fe._tickexponent=0,g(qe)||typeof qe=="string"||(qe=1),Fe.type!=="category"&&Fe.type!=="multicategory"||(Fe._tickround=null),Fe.type==="date"){var wt=Fe.r2l(Fe.tick0),ft=Fe.l2r(wt).replace(/(^-|i)/g,""),Ce=ft.length;if(String(qe).charAt(0)==="M")Ce>10||ft.substr(5)!=="01-01"?Fe._tickround="d":Fe._tickround=+qe.substr(1)%12==0?"y":"m";else if(qe>=k&&Ce<=10||qe>=15*k)Fe._tickround="d";else if(qe>=I&&Ce<=16||qe>=A)Fe._tickround="M";else if(qe>=P&&Ce<=19||qe>=I)Fe._tickround="S";else{var Ie=Fe.l2r(wt+qe).replace(/^-/,"").length;Fe._tickround=Math.max(Ce,Ie)-20,Fe._tickround<0&&(Fe._tickround=4)}}else if(g(qe)||qe.charAt(0)==="L"){var Te=Fe.range.map(Fe.r2d||Number);g(qe)||(qe=Number(qe.substr(1))),Fe._tickround=2-Math.floor(Math.log(qe)/Math.LN10+.01);
1215var Pe=Math.max(Math.abs(Te[0]),Math.abs(Te[1])),Ve=Math.floor(Math.log(Pe)/Math.LN10+.01),tt=Fe.minexponent===void 0?3:Fe.minexponent;Math.abs(Ve)>tt&&(Se(Fe.exponentformat)&&!Oe(Ve)?Fe._tickexponent=3*Math.round((Ve-1)/3):Fe._tickexponent=Ve)}else Fe._tickround=null}function ke(Fe,qe,wt){var ft=Fe.tickfont||{};return{x:qe,dx:0,dy:0,text:wt||"",fontSize:ft.size,font:ft.family,fontColor:ft.color}}R.autoTicks=function(Fe,qe){var wt;function ft(ot){return Math.pow(ot,Math.floor(Math.log(qe)/Math.LN10))}if(Fe.type==="date"){Fe.tick0=e.dateTick0(Fe.calendar,0);var Ce=2*qe;if(Ce>o)qe/=o,wt=ft(10),Fe.dtick="M"+12*fe(qe,wt,pe);else if(Ce>T)qe/=T,Fe.dtick="M"+fe(qe,1,ce);else if(Ce>k){Fe.dtick=fe(qe,k,Fe._hasDayOfWeekBreaks?[1,2,7,14]:xe);var Ie=R.getTickFormat(Fe),Te=Fe.ticklabelmode==="period";Te&&(Fe._rawTick0=Fe.tick0),/%[uVW]/.test(Ie)?Fe.tick0=e.dateTick0(Fe.calendar,2):Fe.tick0=e.dateTick0(Fe.calendar,1),Te&&(Fe._dowTick0=Fe.tick0)}else Ce>A?Fe.dtick=fe(qe,A,ce):Ce>I?Fe.dtick=fe(qe,I,de):Ce>P?Fe.dtick=fe(qe,P,de):(wt=ft(10),Fe.dtick=fe(qe,wt,pe))}else if(Fe.type==="log"){Fe.tick0=0;var Pe=e.simpleMap(Fe.range,Fe.r2l);if(qe>.7)Fe.dtick=Math.ceil(qe);else if(Math.abs(Pe[1]-Pe[0])<1){var Ve=1.5*Math.abs((Pe[1]-Pe[0])/qe);qe=Math.abs(Math.pow(10,Pe[1])-Math.pow(10,Pe[0]))/Ve,wt=ft(10),Fe.dtick="L"+fe(qe,wt,pe)}else Fe.dtick=qe>.3?"D2":"D1"}else Fe.type==="category"||Fe.type==="multicategory"?(Fe.tick0=0,Fe.dtick=Math.ceil(Math.max(qe,1))):Qe(Fe)?(Fe.tick0=0,wt=1,Fe.dtick=fe(qe,wt,Ee)):(Fe.tick0=0,wt=ft(10),Fe.dtick=fe(qe,wt,pe));if(Fe.dtick===0&&(Fe.dtick=1),!g(Fe.dtick)&&typeof Fe.dtick!="string"){var tt=Fe.dtick;throw Fe.dtick=1,"ax.dtick error: "+String(tt)}},R.tickIncrement=function(Fe,qe,wt,ft){var Ce=wt?-1:1;if(g(qe))return e.increment(Fe,Ce*qe);var Ie=qe.charAt(0),Te=Ce*Number(qe.substr(1));if(Ie==="M")return e.incrementMonth(Fe,Te,ft);if(Ie==="L")return Math.log(Math.pow(10,Fe)+Te)/Math.LN10;if(Ie==="D"){var Pe=qe==="D2"?we:_e,Ve=Fe+.01*Ce,tt=e.roundUp(e.mod(Ve,1),Pe,wt);return Math.floor(Ve)+Math.log(m.round(Math.pow(10,tt),1))/Math.LN10}throw"unrecognized dtick "+String(qe)},R.tickFirst=function(Fe,qe){var wt=Fe.r2l||Number,ft=e.simpleMap(Fe.range,wt,void 0,void 0,qe),Ce=ft[1]<ft[0],Ie=Ce?Math.floor:Math.ceil,Te=J(ft)[0],Pe=Fe.dtick,Ve=wt(Fe.tick0);if(g(Pe)){var tt=Ie((Te-Ve)/Pe)*Pe+Ve;return Fe.type!=="category"&&Fe.type!=="multicategory"||(tt=e.constrain(tt,0,Fe._categories.length-1)),tt}var ot=Pe.charAt(0),at=Number(Pe.substr(1));if(ot==="M"){for(var _t,bt,jt,Nt=0,$e=Ve;Nt<10;){if(((_t=R.tickIncrement($e,Pe,Ce,Fe.calendar))-Te)*($e-Te)<=0)return Ce?Math.min($e,_t):Math.max($e,_t);bt=(Te-($e+_t)/2)/(_t-$e),jt=ot+(Math.abs(Math.round(bt))||1)*at,$e=R.tickIncrement($e,jt,bt<0?!Ce:Ce,Fe.calendar),Nt++}return e.error("tickFirst did not converge",Fe),$e}if(ot==="L")return Math.log(Ie((Math.pow(10,Te)-Ve)/at)*at+Ve)/Math.LN10;if(ot==="D"){var yt=Pe==="D2"?we:_e,Ot=e.roundUp(e.mod(Te,1),yt,Ce);return Math.floor(Te)+Math.log(m.round(Math.pow(10,Ot),1))/Math.LN10}throw"unrecognized dtick "+String(Pe)},R.tickText=function(Fe,qe,wt,ft){var Ce,Ie=ke(Fe,qe),Te=Fe.tickmode==="array",Pe=wt||Te,Ve=Fe.type,tt=Ve==="category"?Fe.d2l_noadd:Fe.d2l;if(Te&&Array.isArray(Fe.ticktext)){var ot=e.simpleMap(Fe.range,Fe.r2l),at=(Math.abs(ot[1]-ot[0])-(Fe._lBreaks||0))/1e4;for(Ce=0;Ce<Fe.ticktext.length&&!(Math.abs(qe-tt(Fe.tickvals[Ce]))<at);Ce++);if(Ce<Fe.ticktext.length)return Ie.text=String(Fe.ticktext[Ce]),Ie}function _t(Nt){if(Nt===void 0)return!0;if(wt)return Nt==="none";var $e={first:Fe._tmin,last:Fe._tmax}[Nt];return Nt!=="all"&&qe!==$e}var bt=wt?"never":Fe.exponentformat!=="none"&&_t(Fe.showexponent)?"hide":"";if(Ve==="date"?function(Nt,$e,yt,Ot){var Mt=Nt._tickround,Pt=yt&&Nt.hoverformat||R.getTickFormat(Nt);Ot&&(Mt=g(Mt)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[Mt]);var Le,Xe=e.formatDate($e.x,Pt,Mt,Nt._dateFormat,Nt.calendar,Nt._extraFormat),it=Xe.indexOf(` 1216`);if(it!==-1&&(Le=Xe.substr(it+1),Xe=Xe.substr(0,it)),Ot&&(Xe==="00:00:00"||Xe==="00:00"?(Xe=Le,Le=""):Xe.length===8&&(Xe=Xe.replace(/:00$/,""))),Le)if(yt)Mt==="d"?Xe+=", "+Le:Xe=Le+(Xe?", "+Xe:"");else if(Nt._inCalcTicks&&Nt._prevDateHead===Le){var At=Gt(Nt),It=Nt._trueSide||Nt.side;(!At&&It==="top"||At&&It==="bottom")&&(Xe+="<br> ")}else Nt._prevDateHead=Le,Xe+="<br>"+Le;$e.text=Xe}(Fe,Ie,wt,Pe):Ve==="log"?function(Nt,$e,yt,Ot,Mt){var Pt=Nt.dtick,Le=$e.x,Xe=Nt.tickformat,it=typeof Pt=="string"&&Pt.charAt(0);if(Mt==="never"&&(Mt=""),Ot&&it!=="L"&&(Pt="L3",it="L"),Xe||it==="L")$e.text=De(Math.pow(10,Le),Nt,Mt,Ot);else if(g(Pt)||it==="D"&&e.mod(Le+.01,1)<.1){var At=Math.round(Le),It=Math.abs(At),Zt=Nt.exponentformat;Zt==="power"||Se(Zt)&&Oe(At)?($e.text=At===0?1:At===1?"10":"10<sup>"+(At>1?"":S)+It+"</sup>",$e.fontSize*=1.25):(Zt==="e"||Zt==="E")&&It>2?$e.text="1"+Zt+(At>0?"+":S)+It:($e.text=De(Math.pow(10,Le),Nt,"","fakehover"),Pt==="D1"&&Nt._id.charAt(0)==="y"&&($e.dy-=$e.fontSize/6))}else{if(it!=="D")throw"unrecognized dtick "+String(Pt);$e.text=String(Math.round(Math.pow(10,e.mod(Le,1)))),$e.fontSize*=.75}if(Nt.dtick==="D1"){var Jt=String($e.text).charAt(0);Jt!=="0"&&Jt!=="1"||(Nt._id.charAt(0)==="y"?$e.dx-=$e.fontSize/4:($e.dy+=$e.fontSize/2,$e.dx+=(Nt.range[1]>Nt.range[0]?1:-1)*$e.fontSize*(Le<0?.5:.25)))}}(Fe,Ie,0,Pe,bt):Ve==="category"?function(Nt,$e){var yt=Nt._categories[Math.round($e.x)];yt===void 0&&(yt=""),$e.text=String(yt)}(Fe,Ie):Ve==="multicategory"?function(Nt,$e,yt){var Ot=Math.round($e.x),Mt=Nt._categories[Ot]||[],Pt=Mt[1]===void 0?"":String(Mt[1]),Le=Mt[0]===void 0?"":String(Mt[0]);yt?$e.text=Le+" - "+Pt:($e.text=Pt,$e.text2=Le)}(Fe,Ie,wt):Qe(Fe)?function(Nt,$e,yt,Ot,Mt){if(Nt.thetaunit!=="radians"||yt)$e.text=De($e.x,Nt,Mt,Ot);else{var Pt=$e.x/180;if(Pt===0)$e.text="0";else{var Le=function(it){function At(Vt,pr){return Math.abs(Vt-pr)<=1e-6}var It=function(Vt){for(var pr=1;!At(Math.round(Vt*pr)/pr,Vt);)pr*=10;return pr}(it),Zt=it*It,Jt=Math.abs(function Vt(pr,Ir){return At(Ir,0)?pr:Vt(Ir,pr%Ir)}(Zt,It));return[Math.round(Zt/Jt),Math.round(It/Jt)]}(Pt);if(Le[1]>=100)$e.text=De(e.deg2rad($e.x),Nt,Mt,Ot);else{var Xe=$e.x<0;Le[1]===1?Le[0]===1?$e.text="\u03C0":$e.text=Le[0]+"\u03C0":$e.text=["<sup>",Le[0],"</sup>","\u2044","<sub>",Le[1],"</sub>","\u03C0"].join(""),Xe&&($e.text=S+$e.text)}}}}(Fe,Ie,wt,Pe,bt):function(Nt,$e,yt,Ot,Mt){Mt==="never"?Mt="":Nt.showexponent==="all"&&Math.abs($e.x/Nt.dtick)<1e-6&&(Mt="hide"),$e.text=De($e.x,Nt,Mt,Ot)}(Fe,Ie,0,Pe,bt),ft||(Fe.tickprefix&&!_t(Fe.showtickprefix)&&(Ie.text=Fe.tickprefix+Ie.text),Fe.ticksuffix&&!_t(Fe.showticksuffix)&&(Ie.text+=Fe.ticksuffix)),Fe.tickson==="boundaries"||Fe.showdividers){var jt=function(Nt){var $e=Fe.l2p(Nt);return $e>=0&&$e<=Fe._length?Nt:null};Ie.xbnd=[jt(Ie.x-.5),jt(Ie.x+Fe.dtick-.5)]}return Ie},R.hoverLabelText=function(Fe,qe,wt){wt&&(Fe=e.extendFlat({},Fe,{hoverformat:wt}));var ft=Array.isArray(qe)?qe[0]:qe,Ce=Array.isArray(qe)?qe[1]:void 0;if(Ce!==void 0&&Ce!==ft)return R.hoverLabelText(Fe,ft,wt)+" - "+R.hoverLabelText(Fe,Ce,wt);var Ie=Fe.type==="log"&&ft<=0,Te=R.tickText(Fe,Fe.c2l(Ie?-ft:ft),"hover").text;return Ie?ft===0?"0":S+Te:Te};var be=["f","p","n","\u03BC","m","","k","M","G","T"];function Se(Fe){return Fe==="SI"||Fe==="B"}function Oe(Fe){return Fe>14||Fe<-15}
1216function De(Fe,qe,wt,ft){var Ce=Fe<0,Ie=qe._tickround,Te=wt||qe.exponentformat||"B",Pe=qe._tickexponent,Ve=R.getTickFormat(qe),tt=qe.separatethousands;if(ft){var ot={exponentformat:Te,minexponent:qe.minexponent,dtick:qe.showexponent==="none"?qe.dtick:g(Fe)&&Math.abs(Fe)||1,range:qe.showexponent==="none"?qe.range.map(qe.r2d):[0,Fe||1]};ge(ot),Ie=(Number(ot._tickround)||0)+4,Pe=ot._tickexponent,qe.hoverformat&&(Ve=qe.hoverformat)}if(Ve)return qe._numFormat(Ve)(Fe).replace(/-/g,S);var at,_t=Math.pow(10,-Ie)/2;if(Te==="none"&&(Pe=0),(Fe=Math.abs(Fe))<_t)Fe="0",Ce=!1;else{if(Fe+=_t,Pe&&(Fe*=Math.pow(10,-Pe),Ie+=Pe),Ie===0)Fe=String(Math.floor(Fe));else if(Ie<0){Fe=(Fe=String(Math.round(Fe))).substr(0,Fe.length+Ie);for(var bt=Ie;bt<0;bt++)Fe+="0"}else{var jt=(Fe=String(Fe)).indexOf(".")+1;jt&&(Fe=Fe.substr(0,jt+Ie).replace(/\.?0+$/,""))}Fe=e.numSeparate(Fe,qe._separators,tt)}return Pe&&Te!=="hide"&&(Se(Te)&&Oe(Pe)&&(Te="power"),at=Pe<0?S+-Pe:Te!=="power"?"+"+Pe:String(Pe),Te==="e"||Te==="E"?Fe+=Te+at:Te==="power"?Fe+="\xD710<sup>"+at+"</sup>":Te==="B"&&Pe===9?Fe+="B":Se(Te)&&(Fe+=be[Pe/3+5])),Ce?S+Fe:Fe}function je(Fe,qe){for(var wt=[],ft={},Ce=0;Ce<qe.length;Ce++){var Ie=qe[Ce];ft[Ie.text2]?ft[Ie.text2].push(Ie.x):ft[Ie.text2]=[Ie.x]}for(var Te in ft)wt.push(ke(Fe,e.interp(ft[Te],.5),Te));return wt}function Je(Fe){return Fe.periodX!==void 0?Fe.periodX:Fe.x}function ze(Fe){return[Fe.text,Fe.x,Fe.axInfo,Fe.font,Fe.fontSize,Fe.fontColor].join("_")}function Ue(Fe){var qe=Fe.title.font.size,wt=(Fe.title.text.match(t.BR_TAG_ALL)||[]).length;return Fe.title.hasOwnProperty("standoff")?wt?qe*(G+wt*W):qe*G:wt?qe*(wt+1)*W:qe}function Ge(Fe,qe){var wt=Fe.l2p(qe);return wt>1&&wt<Fe._length-1}function Ye(Fe){var qe=m.select(Fe),wt=qe.select(".text-math-group");return wt.empty()?qe.select("text"):wt}function et(Fe){return Fe._id+".automargin"}function ct(Fe){return et(Fe)+".mirror"}function mt(Fe){return Fe._id+".rangeslider"}function Ct(Fe,qe){for(var wt=0;wt<qe.length;wt++)Fe.indexOf(qe[wt])===-1&&Fe.push(qe[wt])}function Tt(Fe,qe,wt){var ft,Ce,Ie=[],Te=[],Pe=Fe.layout;for(ft=0;ft<qe.length;ft++)Ie.push(R.getFromId(Fe,qe[ft]));for(ft=0;ft<wt.length;ft++)Te.push(R.getFromId(Fe,wt[ft]));var Ve=Object.keys(l),tt=["anchor","domain","overlaying","position","side","tickangle","editType"],ot=["linear","log"];for(ft=0;ft<Ve.length;ft++){var at=Ve[ft],_t=Ie[0][at],bt=Te[0][at],jt=!0,Nt=!1,$e=!1;if(at.charAt(0)!=="_"&&typeof _t!="function"&&tt.indexOf(at)===-1){for(Ce=1;Ce<Ie.length&&jt;Ce++){var yt=Ie[Ce][at];at==="type"&&ot.indexOf(_t)!==-1&&ot.indexOf(yt)!==-1&&_t!==yt?Nt=!0:yt!==_t&&(jt=!1)}for(Ce=1;Ce<Te.length&&jt;Ce++){var Ot=Te[Ce][at];at==="type"&&ot.indexOf(bt)!==-1&&ot.indexOf(Ot)!==-1&&bt!==Ot?$e=!0:Te[Ce][at]!==bt&&(jt=!1)}jt&&(Nt&&(Pe[Ie[0]._name].type="linear"),$e&&(Pe[Te[0]._name].type="linear"),nt(Pe,at,Ie,Te,Fe._fullLayout._dfltTitle))}}for(ft=0;ft<Fe._fullLayout.annotations.length;ft++){var Mt=Fe._fullLayout.annotations[ft];qe.indexOf(Mt.xref)!==-1&&wt.indexOf(Mt.yref)!==-1&&e.swapAttrs(Pe.annotations[ft],["?"])}}function nt(Fe,qe,wt,ft,Ce){var Ie,Te=e.nestedProperty,Pe=Te(Fe[wt[0]._name],qe).get(),Ve=Te(Fe[ft[0]._name],qe).get();for(qe==="title"&&(Pe&&Pe.text===Ce.x&&(Pe.text=Ce.y),Ve&&Ve.text===Ce.y&&(Ve.text=Ce.x)),Ie=0;Ie<wt.length;Ie++)Te(Fe,wt[Ie]._name+"."+qe).set(Ve);for(Ie=0;Ie<ft.length;Ie++)Te(Fe,ft[Ie]._name+"."+qe).set(Pe)}function Qe(Fe){return Fe._id==="angularaxis"}function Et(Fe,qe){for(var wt=qe._rangebreaks.length,ft=0;ft<wt;ft++){var Ce=qe._rangebreaks[ft];if(Fe>=Ce.min&&Fe<Ce.max)return Ce.max}return Fe}function Gt(Fe){return(Fe.ticklabelposition||"").indexOf("inside")!==-1}function Xt(Fe,qe){Gt(Fe._anchorAxis||{})&&Fe._hideCounterAxisInsideTickLabels&&Fe._hideCounterAxisInsideTickLabels(qe)}R.getTickFormat=function(Fe){var qe,wt,ft,Ce,Ie,Te,Pe,Ve;function tt(_t){return typeof _t!="string"?_t:Number(_t.replace("M",""))*T}function ot(_t,bt){var jt=["L","D"];if(typeof _t==typeof bt){if(typeof _t=="number")return _t-bt;var Nt=jt.indexOf(_t.charAt(0)),$e=jt.indexOf(bt.charAt(0));return Nt===$e?Number(_t.replace(/(L|D)/g,""))-Number(bt.replace(/(L|D)/g,"")):Nt-$e}return typeof _t=="number"?1:-1}function at(_t,bt){var jt=bt[0]===null,Nt=bt[1]===null,$e=ot(_t,bt[0])>=0,yt=ot(_t,bt[1])<=0;return(jt||$e)&&(Nt||yt)}if(Fe.tickformatstops&&Fe.tickformatstops.length>0)switch(Fe.type){case"date":case"linear":for(qe=0;qe<Fe.tickformatstops.length;qe++)if((ft=Fe.tickformatstops[qe]).enabled&&(Ce=Fe.dtick,Ie=ft.dtickrange,Te=void 0,Pe=void 0,Ve=void 0,Te=tt||function(_t){return _t},Pe=Ie[0],Ve=Ie[1],(!Pe&&typeof Pe!="number"||Te(Pe)<=Te(Ce))&&(!Ve&&typeof Ve!="number"||Te(Ve)>=Te(Ce)))){wt=ft;break}break;case"log":for(qe=0;qe<Fe.tickformatstops.length;qe++)if((ft=Fe.tickformatstops[qe]).enabled&&at(Fe.dtick,ft.dtickrange)){wt=ft;break}}return wt?wt.value:Fe.tickformat},R.getSubplots=function(Fe,qe){var wt=Fe._fullLayout._subplots,ft=wt.cartesian.concat(wt.gl2d||[]),Ce=qe?R.findSubplotsWithAxis(ft,qe):ft;return Ce.sort(function(Ie,Te){var Pe=Ie.substr(1).split("y"),Ve=Te.substr(1).split("y");return Pe[0]===Ve[0]?+Pe[1]-+Ve[1]:+Pe[0]-+Ve[0]}),Ce},R.findSubplotsWithAxis=function(Fe,qe){for(var wt=new RegExp(qe._id.charAt(0)==="x"?"^"+qe._id+"y":qe._id+"$"),ft=[],Ce=0;Ce<Fe.length;Ce++){var Ie=Fe[Ce];wt.test(Ie)&&ft.push(Ie)}return ft},R.makeClipPaths=function(Fe){var qe=Fe._fullLayout;if(!qe._hasOnlyLargeSploms){var wt,ft,Ce={_offset:0,_length:qe.width,_id:""},Ie={_offset:0,_length:qe.height,_id:""},Te=R.list(Fe,"x",!0),Pe=R.list(Fe,"y",!0),Ve=[];for(wt=0;
1216wt<Te.length;wt++)for(Ve.push({x:Te[wt],y:Ie}),ft=0;ft<Pe.length;ft++)wt===0&&Ve.push({x:Ce,y:Pe[ft]}),Ve.push({x:Te[wt],y:Pe[ft]});var tt=qe._clips.selectAll(".axesclip").data(Ve,function(ot){return ot.x._id+ot.y._id});tt.enter().append("clipPath").classed("axesclip",!0).attr("id",function(ot){return"clip"+qe._uid+ot.x._id+ot.y._id}).append("rect"),tt.exit().remove(),tt.each(function(ot){m.select(this).select("rect").attr({x:ot.x._offset||0,y:ot.y._offset||0,width:ot.x._length||1,height:ot.y._length||1})})}},R.draw=function(Fe,qe,wt){var ft=Fe._fullLayout;qe==="redraw"&&ft._paper.selectAll("g.subplot").each(function(Ie){var Te=Ie[0],Pe=ft._plots[Te];if(Pe){var Ve=Pe.xaxis,tt=Pe.yaxis;Pe.xaxislayer.selectAll("."+Ve._id+"tick").remove(),Pe.yaxislayer.selectAll("."+tt._id+"tick").remove(),Pe.xaxislayer.selectAll("."+Ve._id+"tick2").remove(),Pe.yaxislayer.selectAll("."+tt._id+"tick2").remove(),Pe.xaxislayer.selectAll("."+Ve._id+"divider").remove(),Pe.yaxislayer.selectAll("."+tt._id+"divider").remove(),Pe.gridlayer&&Pe.gridlayer.selectAll("path").remove(),Pe.zerolinelayer&&Pe.zerolinelayer.selectAll("path").remove(),ft._infolayer.select(".g-"+Ve._id+"title").remove(),ft._infolayer.select(".g-"+tt._id+"title").remove()}});var Ce=qe&&qe!=="redraw"?qe:R.listIds(Fe);return e.syncOrAsync(Ce.map(function(Ie){return function(){if(Ie){var Te=R.getFromId(Fe,Ie),Pe=R.drawOne(Fe,Te,wt);return Te._r=Te.range.slice(),Te._rl=e.simpleMap(Te._r,Te.r2l),Pe}}}))},R.drawOne=function(Fe,qe,wt){var ft,Ce,Ie;wt=wt||{},qe.setScale();var Te=Fe._fullLayout,Pe=qe._id,Ve=Pe.charAt(0),tt=R.counterLetter(Pe),ot=Te._plots[qe._mainSubplot];if(ot){var at=ot[Ve+"axislayer"],_t=qe._mainLinePosition,bt=qe._mainMirrorPosition,jt=qe._vals=R.calcTicks(qe),Nt=[qe.mirror,_t,bt].join("_");for(ft=0;ft<jt.length;ft++)jt[ft].axInfo=Nt;qe._selections={},qe._tickAngles&&(qe._prevTickAngles=qe._tickAngles),qe._tickAngles={},qe._depth=null;var $e={};if(qe.visible){var yt,Ot,Mt=R.makeTransTickFn(qe),Pt=R.makeTransTickLabelFn(qe),Le=qe.ticks==="inside",Xe=qe.ticks==="outside";if(qe.tickson==="boundaries"){var it=function(Xr,Er){var on,Un=[],Tr=function(en,$r){var Rr=en.xbnd[$r];Rr!==null&&Un.push(e.extendFlat({},en,{x:Rr}))};if(Er.length){for(on=0;on<Er.length;on++)Tr(Er[on],0);Tr(Er[on-1],1)}return Un}(0,jt);Ot=R.clipEnds(qe,it),yt=Le?Ot:it}else Ot=R.clipEnds(qe,jt),yt=Le&&qe.ticklabelmode!=="period"?Ot:jt;var At=qe._gridVals=Ot,It=function(Xr,Er){var on,Un,Tr=[],en=Er.length&&Er[Er.length-1].x<Er[0].x,$r=function(Pn,Nn){var hn=Pn.xbnd[Nn];hn!==null&&Tr.push(e.extendFlat({},Pn,{x:hn}))};if(Xr.showdividers&&Er.length){for(on=0;on<Er.length;on++){var Rr=Er[on];Rr.text2!==Un&&$r(Rr,en?1:0),Un=Rr.text2}$r(Er[on-1],en?0:1)}return Tr}(qe,jt);if(!Te._hasOnlyLargeSploms){var Zt=qe._subplotsWith,Jt={};for(ft=0;ft<Zt.length;ft++){Ce=Zt[ft];var Vt=(Ie=Te._plots[Ce])[tt+"axis"],pr=Vt._mainAxis._id;if(!Jt[pr]){Jt[pr]=1;var Ir=Ve==="x"?"M0,"+Vt._offset+"v"+Vt._length:"M"+Vt._offset+",0h"+Vt._length;R.drawGrid(Fe,qe,{vals:At,counterAxis:Vt,layer:Ie.gridlayer.select("."+Pe),path:Ir,transFn:Mt}),R.drawZeroLine(Fe,qe,{counterAxis:Vt,layer:Ie.zerolinelayer,path:Ir,transFn:Mt})}}}var fr=R.getTickSigns(qe),$t=[];if(qe.ticks){var er,ar,hr,vr=R.makeTickPath(qe,_t,fr[2]);if(qe._anchorAxis&&qe.mirror&&qe.mirror!==!0?(er=R.makeTickPath(qe,bt,fr[3]),ar=vr+er):(er="",ar=vr),qe.showdividers&&Xe&&qe.tickson==="boundaries"){var Pr={};for(ft=0;ft<It.length;ft++)Pr[It[ft].x]=1;hr=function(Xr){return Pr[Xr.x]?er:ar}}else hr=ar;R.drawTicks(Fe,qe,{vals:yt,layer:at,path:hr,transFn:Mt}),qe.mirror==="allticks"&&($t=Object.keys(qe._linepositions||{}))}for(ft=0;ft<$t.length;ft++){Ce=$t[ft],Ie=Te._plots[Ce];var Ur=qe._linepositions[Ce]||[],qr=R.makeTickPath(qe,Ur[0],fr[0])+R.makeTickPath(qe,Ur[1],fr[1]);R.drawTicks(Fe,qe,{vals:yt,layer:Ie[Ve+"axislayer"],path:qr,transFn:Mt})}var rn=[];if(rn.push(function(){return R.drawLabels(Fe,qe,{vals:jt,layer:at,plotinfo:Ie,transFn:Pt,labelFns:R.makeLabelFns(qe,_t)})}),qe.type==="multicategory"){var An={x:2,y:10}[Ve];rn.push(function(){var Xr={x:"height",y:"width"}[Ve],Er=Mn()[Xr]+An+(qe._tickAngles[Pe+"tick"]?qe.tickfont.size*W:0);return R.drawLabels(Fe,qe,{vals:je(qe,jt),layer:at,cls:Pe+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:Mt,labelFns:R.makeLabelFns(qe,_t+Er*fr[4])})}),rn.push(function(){return qe._depth=fr[4]*(Mn("tick2")[qe.side]-_t),function(Xr,Er,on){var Un=Er._id+"divider",Tr=on.vals,en=on.layer.selectAll("path."+Un).data(Tr,ze);en.exit().remove(),en.enter().insert("path",":first-child").classed(Un,1).classed("crisp",1).call(r.stroke,Er.dividercolor).style("stroke-width",d.crispRound(Xr,Er.dividerwidth,1)+"px"),en.attr("transform",on.transFn).attr("d",on.path)}(Fe,qe,{vals:It,layer:at,path:R.makeTickPath(qe,_t,fr[4],qe._depth),transFn:Mt})})}else qe.title.hasOwnProperty("standoff")&&rn.push(function(){qe._depth=fr[4]*(Mn()[qe.side]-_t)});var mn=y.getComponentMethod("rangeslider","isVisible")(qe);return rn.push(function(){var Xr,Er,on,Un,Tr=qe.side.charAt(0),en=Q[qe.side].charAt(0),$r=R.getPxPosition(Fe,qe),Rr=Xe?qe.ticklen:0;if((qe.automargin||mn)&&(qe.type==="multicategory"?Xr=Mn("tick2"):(Xr=Mn(),Ve==="x"&&Tr==="b"&&(qe._depth=Math.max(Xr.width>0?Xr.bottom-$r:0,Rr)))),qe.automargin){Er={x:0,y:0,r:0,l:0,t:0,b:0};var Pn=[0,1];
1216if(Ve==="x"){if(Tr==="b"?Er[Tr]=qe._depth:(Er[Tr]=qe._depth=Math.max(Xr.width>0?$r-Xr.top:0,Rr),Pn.reverse()),Xr.width>0){var Nn=Xr.right-(qe._offset+qe._length);Nn>0&&(Er.xr=1,Er.r=Nn);var hn=qe._offset-Xr.left;hn>0&&(Er.xl=0,Er.l=hn)}}else if(Tr==="l"?Er[Tr]=qe._depth=Math.max(Xr.height>0?$r-Xr.left:0,Rr):(Er[Tr]=qe._depth=Math.max(Xr.height>0?Xr.right-$r:0,Rr),Pn.reverse()),Xr.height>0){var Fn=Xr.bottom-(qe._offset+qe._length);Fn>0&&(Er.yb=0,Er.b=Fn);var ca=qe._offset-Xr.top;ca>0&&(Er.yt=1,Er.t=ca)}Er[tt]=qe.anchor==="free"?qe.position:qe._anchorAxis.domain[Pn[0]],qe.title.text!==Te._dfltTitle[Ve]&&(Er[Tr]+=Ue(qe)+(qe.title.standoff||0)),qe.mirror&&qe.anchor!=="free"&&((on={x:0,y:0,r:0,l:0,t:0,b:0})[en]=qe.linewidth,qe.mirror&&qe.mirror!==!0&&(on[en]+=Rr),qe.mirror===!0||qe.mirror==="ticks"?on[tt]=qe._anchorAxis.domain[Pn[1]]:qe.mirror!=="all"&&qe.mirror!=="allticks"||(on[tt]=[qe._counterDomainMin,qe._counterDomainMax][Pn[1]]))}mn&&(Un=y.getComponentMethod("rangeslider","autoMarginOpts")(Fe,qe)),b.autoMargin(Fe,et(qe),Er),b.autoMargin(Fe,ct(qe),on),b.autoMargin(Fe,mt(qe),Un)}),wt.skipTitle||mn&&qe.side==="bottom"||rn.push(function(){return function(Xr,Er){var on,Un=Xr._fullLayout,Tr=Er._id,en=Tr.charAt(0),$r=Er.title.font.size;if(Er.title.hasOwnProperty("standoff"))on=Er._depth+Er.title.standoff+Ue(Er);else{var Rr=Gt(Er);if(Er.type==="multicategory")on=Er._depth;else{var Pn=1.5*$r;Rr&&(Pn=.5*$r,Er.ticks==="outside"&&(Pn+=Er.ticklen)),on=10+Pn+(Er.linewidth?Er.linewidth-1:0)}Rr||(on+=en==="x"?Er.side==="top"?$r*(Er.showticklabels?1:0):$r*(Er.showticklabels?1.5:.5):Er.side==="right"?$r*(Er.showticklabels?1:.5):$r*(Er.showticklabels?.5:0))}var Nn,hn,Fn,ca,sr=R.getPxPosition(Xr,Er);if(en==="x"?(hn=Er._offset+Er._length/2,Fn=Er.side==="top"?sr-on:sr+on):(Fn=Er._offset+Er._length/2,hn=Er.side==="right"?sr+on:sr-on,Nn={rotate:"-90",offset:0}),Er.type!=="multicategory"){var Fr=Er._selections[Er._id+"tick"];if(ca={selection:Fr,side:Er.side},Fr&&Fr.node()&&Fr.node().parentNode){var Bt=d.getTranslate(Fr.node().parentNode);ca.offsetLeft=Bt.x,ca.offsetTop=Bt.y}Er.title.hasOwnProperty("standoff")&&(ca.pad=0)}return i.draw(Xr,Tr+"title",{propContainer:Er,propName:Er._name+".title.text",placeholder:Un._dfltTitle[en],avoid:ca,transform:Nn,attributes:{x:hn,y:Fn,"text-anchor":"middle"}})}(Fe,qe)}),e.syncOrAsync(rn)}}function Mn(Xr){var Er=Pe+(Xr||"tick");return $e[Er]||($e[Er]=function(on,Un){var Tr,en,$r,Rr;return on._selections[Un].size()?(Tr=1/0,en=-1/0,$r=1/0,Rr=-1/0,on._selections[Un].each(function(){var Pn=Ye(this),Nn=d.bBox(Pn.node().parentNode);Tr=Math.min(Tr,Nn.top),en=Math.max(en,Nn.bottom),$r=Math.min($r,Nn.left),Rr=Math.max(Rr,Nn.right)})):(Tr=0,en=0,$r=0,Rr=0),{top:Tr,bottom:en,left:$r,right:Rr,height:en-Tr,width:Rr-$r}}(qe,Er)),$e[Er]}},R.getTickSigns=function(Fe){var qe=Fe._id.charAt(0),wt={x:"top",y:"right"}[qe],ft=Fe.side===wt?1:-1,Ce=[-1,1,ft,-ft];return Fe.ticks!=="inside"==(qe==="x")&&(Ce=Ce.map(function(Ie){return-Ie})),Fe.side&&Ce.push({l:-1,t:-1,r:1,b:1}[Fe.side.charAt(0)]),Ce},R.makeTransTickFn=function(Fe){return Fe._id.charAt(0)==="x"?function(qe){return n(Fe._offset+Fe.l2p(qe.x),0)}:function(qe){return n(0,Fe._offset+Fe.l2p(qe.x))}},R.makeTransTickLabelFn=function(Fe){var qe=function(Ce){var Ie=Ce.ticklabelposition||"",Te=function(yt){return Ie.indexOf(yt)!==-1},Pe=Te("top"),Ve=Te("left"),tt=Te("right"),ot=Te("bottom"),at=Te("inside"),_t=ot||Ve||Pe||tt;if(!_t&&!at)return[0,0];var bt=Ce.side,jt=_t?(Ce.tickwidth||0)/2:0,Nt=3,$e=Ce.tickfont?Ce.tickfont.size:12;return(ot||Pe)&&(jt+=$e*G,Nt+=(Ce.linewidth||0)/2),(Ve||tt)&&(jt+=(Ce.linewidth||0)/2,Nt+=3),at&&bt==="top"&&(Nt-=$e*(1-G)),(Ve||Pe)&&(jt=-jt),bt!=="bottom"&&bt!=="right"||(Nt=-Nt),[_t?jt:0,at?Nt:0]}(Fe),wt=qe[0],ft=qe[1];return Fe._id.charAt(0)==="x"?function(Ce){return n(wt+Fe._offset+Fe.l2p(Je(Ce)),ft)}:function(Ce){return n(ft,wt+Fe._offset+Fe.l2p(Je(Ce)))}},R.makeTickPath=function(Fe,qe,wt,ft){ft=ft!==void 0?ft:Fe.ticklen;var Ce=Fe._id.charAt(0),Ie=(Fe.linewidth||1)/2;return Ce==="x"?"M0,"+(qe+Ie*wt)+"v"+ft*wt:"M"+(qe+Ie*wt)+",0h"+ft*wt},R.makeLabelFns=function(Fe,qe,wt){var ft=Fe.ticklabelposition||"",Ce=function(Jt){return ft.indexOf(Jt)!==-1},Ie=Ce("top"),Te=Ce("left"),Pe=Ce("right"),Ve=Ce("bottom")||Te||Ie||Pe,tt=Ce("inside"),ot=ft==="inside"&&Fe.ticks==="inside"||!tt&&Fe.ticks==="outside"&&Fe.tickson!=="boundaries",at=0,_t=0,bt=ot?Fe.ticklen:0;if(tt?bt*=-1:Ve&&(bt=0),ot&&(at+=bt,wt)){var jt=e.deg2rad(wt);at=bt*Math.cos(jt)+1,_t=bt*Math.sin(jt)}Fe.showticklabels&&(ot||Fe.showline)&&(at+=.2*Fe.tickfont.size);
1216var Nt,$e,yt,Ot,Mt,Pt={labelStandoff:at+=(Fe.linewidth||1)/2*(tt?-1:1),labelShift:_t},Le=0,Xe=Fe.side,it=Fe._id.charAt(0),At=Fe.tickangle;if(it==="x")Ot=(Mt=!tt&&Xe==="bottom"||tt&&Xe==="top")?1:-1,tt&&(Ot*=-1),Nt=_t*Ot,$e=qe+at*Ot,yt=Mt?1:-.2,Math.abs(At)===90&&(tt?yt+=K:yt=At===-90&&Xe==="bottom"?G:At===90&&Xe==="top"?K:.5,Le=K/2*(At/90)),Pt.xFn=function(Jt){return Jt.dx+Nt+Le*Jt.fontSize},Pt.yFn=function(Jt){return Jt.dy+$e+Jt.fontSize*yt},Pt.anchorFn=function(Jt,Vt){if(Ve){if(Te)return"end";if(Pe)return"start"}return g(Vt)&&Vt!==0&&Vt!==180?Vt*Ot<0!==tt?"end":"start":"middle"},Pt.heightFn=function(Jt,Vt,pr){return Vt<-60||Vt>60?-.5*pr:Fe.side==="top"!==tt?-pr:0};else if(it==="y"){if(Ot=(Mt=!tt&&Xe==="left"||tt&&Xe==="right")?1:-1,tt&&(Ot*=-1),Nt=at,$e=_t*Ot,yt=0,tt||Math.abs(At)!==90||(yt=At===-90&&Xe==="left"||At===90&&Xe==="right"?G:.5),tt){var It=g(At)?+At:0;if(It!==0){var Zt=e.deg2rad(It);Le=Math.abs(Math.sin(Zt))*G*Ot,yt=0}}Pt.xFn=function(Jt){return Jt.dx+qe-(Nt+Jt.fontSize*yt)*Ot+Le*Jt.fontSize},Pt.yFn=function(Jt){return Jt.dy+$e+Jt.fontSize*K},Pt.anchorFn=function(Jt,Vt){return g(Vt)&&Math.abs(Vt)===90?"middle":Mt?"end":"start"},Pt.heightFn=function(Jt,Vt,pr){return Fe.side==="right"&&(Vt*=-1),Vt<-30?-pr:Vt<30?-.5*pr:0}}return Pt},R.drawTicks=function(Fe,qe,wt){wt=wt||{};var ft=qe._id+"tick",Ce=wt.vals;qe.ticklabelmode==="period"&&(Ce=Ce.slice()).shift();var Ie=wt.layer.selectAll("path."+ft).data(qe.ticks?Ce:[],ze);Ie.exit().remove(),Ie.enter().append("path").classed(ft,1).classed("ticks",1).classed("crisp",wt.crisp!==!1).call(r.stroke,qe.tickcolor).style("stroke-width",d.crispRound(Fe,qe.tickwidth,1)+"px").attr("d",wt.path).style("display",null),Xt(qe,[H]),Ie.attr("transform",wt.transFn)},R.drawGrid=function(Fe,qe,wt){wt=wt||{};var ft=qe._id+"grid",Ce=wt.vals,Ie=wt.counterAxis;if(qe.showgrid===!1)Ce=[];else if(Ie&&R.shouldShowZeroLine(Fe,qe,Ie))for(var Te=qe.tickmode==="array",Pe=0;Pe<Ce.length;Pe++){var Ve=Ce[Pe].x;if(Te?!Ve:Math.abs(Ve)<qe.dtick/100){if(Ce=Ce.slice(0,Pe).concat(Ce.slice(Pe+1)),!Te)break;Pe--}}var tt=wt.layer.selectAll("path."+ft).data(Ce,ze);tt.exit().remove(),tt.enter().append("path").classed(ft,1).classed("crisp",wt.crisp!==!1),qe._gw=d.crispRound(Fe,qe.gridwidth,1),tt.attr("transform",wt.transFn).attr("d",wt.path).call(r.stroke,qe.gridcolor||"#ddd").style("stroke-width",qe._gw+"px").style("display",null),Xt(qe,[F]),typeof wt.path=="function"&&tt.attr("d",wt.path)},R.drawZeroLine=function(Fe,qe,wt){wt=wt||wt;var ft=qe._id+"zl",Ce=R.shouldShowZeroLine(Fe,qe,wt.counterAxis),Ie=wt.layer.selectAll("path."+ft).data(Ce?[{x:0,id:qe._id}]:[]);Ie.exit().remove(),Ie.enter().append("path").classed(ft,1).classed("zl",1).classed("crisp",wt.crisp!==!1).each(function(){wt.layer.selectAll("path").sort(function(Te,Pe){return ee(Te.id,Pe.id)})}),Ie.attr("transform",wt.transFn).attr("d",wt.path).call(r.stroke,qe.zerolinecolor||r.defaultLine).style("stroke-width",d.crispRound(Fe,qe.zerolinewidth,qe._gw||1)+"px").style("display",null),Xt(qe,[D])},R.drawLabels=function(Fe,qe,wt){wt=wt||{};var ft=Fe._fullLayout,Ce=qe._id,Ie=Ce.charAt(0),Te=wt.cls||Ce+"tick",Pe=wt.vals,Ve=wt.labelFns,tt=wt.secondary?0:qe.tickangle,ot=(qe._prevTickAngles||{})[Te],at=wt.layer.selectAll("g."+Te).data(qe.showticklabels?Pe:[],ze),_t=[];function bt(Ot,Mt){Ot.each(function(Pt){var Le=m.select(this),Xe=Le.select(".text-math-group"),it=Ve.anchorFn(Pt,Mt),At=wt.transFn.call(Le.node(),Pt)+(g(Mt)&&+Mt!=0?" rotate("+Mt+","+Ve.xFn(Pt)+","+(Ve.yFn(Pt)-Pt.fontSize/2)+")":""),It=t.lineCount(Le),Zt=W*Pt.fontSize,Jt=Ve.heightFn(Pt,g(Mt)?+Mt:0,(It-1)*Zt);if(Jt&&(At+=n(0,Jt)),Xe.empty()){var Vt=Le.select("text");Vt.attr({transform:At,"text-anchor":it}),Vt.style("opacity",1),qe._adjustTickLabelsOverflow&&qe._adjustTickLabelsOverflow()}else{var pr=d.bBox(Xe.node()).width*{end:-.5,start:.5}[it];Xe.attr("transform",At+n(pr,0))}})}at.enter().append("g").classed(Te,1).append("text").attr("text-anchor","middle").each(function(Ot){var Mt=m.select(this),Pt=Fe._promises.length;Mt.call(t.positionText,Ve.xFn(Ot),Ve.yFn(Ot)).call(d.font,Ot.font,Ot.fontSize,Ot.fontColor).text(Ot.text).call(t.convertToTspans,Fe),Fe._promises[Pt]?_t.push(Fe._promises.pop().then(function(){bt(Mt,tt)})):bt(Mt,tt)}),Xt(qe,[V]),at.exit().remove(),wt.repositionOnUpdate&&at.each(function(Ot){m.select(this).select("text").call(t.positionText,Ve.xFn(Ot),Ve.yFn(Ot))}),qe._adjustTickLabelsOverflow=function(){var Ot=qe.ticklabeloverflow;
1216if(Ot&&Ot!=="allow"){var Mt=Ot.indexOf("hide")!==-1,Pt=qe._id.charAt(0)==="x",Le=0,Xe=Pt?Fe._fullLayout.width:Fe._fullLayout.height;if(Ot.indexOf("domain")!==-1){var it=e.simpleMap(qe.range,qe.r2l);Le=qe.l2p(it[0])+qe._offset,Xe=qe.l2p(it[1])+qe._offset}var At=Math.min(Le,Xe),It=Math.max(Le,Xe),Zt=qe.side,Jt=1/0,Vt=-1/0;for(var pr in at.each(function($t){var er=m.select(this);if(er.select(".text-math-group").empty()){var ar=d.bBox(er.node()),hr=0;Pt?(ar.right>It||ar.left<At)&&(hr=1):(ar.bottom>It||ar.top+(qe.tickangle?0:$t.fontSize/4)<At)&&(hr=1);var vr=er.select("text");hr?Mt&&vr.style("opacity",0):(vr.style("opacity",1),Jt=Zt==="bottom"||Zt==="right"?Math.min(Jt,Pt?ar.top:ar.left):-1/0,Vt=Zt==="top"||Zt==="left"?Math.max(Vt,Pt?ar.bottom:ar.right):1/0)}}),ft._plots){var Ir=ft._plots[pr];if(qe._id===Ir.xaxis._id||qe._id===Ir.yaxis._id){var fr=Pt?Ir.yaxis:Ir.xaxis;fr&&(fr["_visibleLabelMin_"+qe._id]=Jt,fr["_visibleLabelMax_"+qe._id]=Vt)}}}},qe._hideCounterAxisInsideTickLabels=function(Ot){var Mt=qe._id.charAt(0)==="x",Pt=[];for(var Le in ft._plots){var Xe=ft._plots[Le];qe._id!==Xe.xaxis._id&&qe._id!==Xe.yaxis._id||Pt.push(Mt?Xe.yaxis:Xe.xaxis)}Pt.forEach(function(it,At){it&&Gt(it)&&(Ot||[D,F,H,V]).forEach(function(It){var Zt=It.K==="tick"&&It.L==="text"&&qe.ticklabelmode==="period",Jt=ft._plots[qe._mainSubplot];(It.K===D.K?Jt.zerolinelayer.selectAll("."+qe._id+"zl"):It.K===F.K?Jt.gridlayer.selectAll("."+qe._id):Jt[qe._id.charAt(0)+"axislayer"]).each(function(){var Vt=m.select(this);It.L&&(Vt=Vt.selectAll(It.L)),Vt.each(function(pr){var Ir=qe.l2p(Zt?Je(pr):pr.x)+qe._offset,fr=m.select(this);Ir<qe["_visibleLabelMax_"+it._id]&&Ir>qe["_visibleLabelMin_"+it._id]?fr.style("display","none"):It.K!=="tick"||At||fr.style("display",null)})})})})},bt(at,ot+1?ot:tt);var jt=null;qe._selections&&(qe._selections[Te]=at);var Nt=[function(){return _t.length&&Promise.all(_t)}];qe.automargin&&ft._redrawFromAutoMarginCount&&ot===90?(jt=90,Nt.push(function(){bt(at,ot)})):Nt.push(function(){if(bt(at,tt),Pe.length&&Ie==="x"&&!g(tt)&&(qe.type!=="log"||String(qe.dtick).charAt(0)!=="D")){jt=0;var Ot,Mt=0,Pt=[];if(at.each(function(er){Mt=Math.max(Mt,er.fontSize);var ar=qe.l2p(er.x),hr=Ye(this),vr=d.bBox(hr.node());Pt.push({top:0,bottom:10,height:10,left:ar-vr.width/2,right:ar+vr.width/2+2,width:vr.width+2})}),qe.tickson!=="boundaries"&&!qe.showdividers||wt.secondary){var Le=Pe.length,Xe=Math.abs((Pe[Le-1].x-Pe[0].x)*qe._m)/(Le-1),it=qe.ticklabelposition||"",At=function(er){return it.indexOf(er)!==-1},It=At("top"),Zt=At("left"),Jt=At("right"),Vt=At("bottom")||Zt||It||Jt?(qe.tickwidth||0)+6:0,pr=Xe<2.5*Mt||qe.type==="multicategory"||qe._name==="realaxis";for(Ot=0;Ot<Pt.length-1;Ot++)if(e.bBoxIntersect(Pt[Ot],Pt[Ot+1],Vt)){jt=pr?90:30;break}}else{var Ir=2;for(qe.ticks&&(Ir+=qe.tickwidth/2),Ot=0;Ot<Pt.length;Ot++){var fr=Pe[Ot].xbnd,$t=Pt[Ot];if(fr[0]!==null&&$t.left-qe.l2p(fr[0])<Ir||fr[1]!==null&&qe.l2p(fr[1])-$t.right<Ir){jt=90;break}}}jt&&bt(at,jt)}}),qe._tickAngles&&Nt.push(function(){qe._tickAngles[Te]=jt===null?g(tt)?tt:0:jt});var $e=qe._anchorAxis;$e&&$e.autorange&&Gt(qe)&&!j(ft,qe._id)&&(ft._insideTickLabelsAutorange||(ft._insideTickLabelsAutorange={}),ft._insideTickLabelsAutorange[$e._name+".autorange"]=$e.autorange,Nt.push(function(){at.each(function(Ot,Mt){var Pt=Ye(this);Pt.select(".text-math-group").empty()&&(qe._vals[Mt].bb=d.bBox(Pt.node()))})}));var yt=e.syncOrAsync(Nt);return yt&&yt.then&&Fe._promises.push(yt),yt},R.getPxPosition=function(Fe,qe){var wt,ft=Fe._fullLayout._size,Ce=qe._id.charAt(0),Ie=qe.side;return qe.anchor!=="free"?wt=qe._anchorAxis:Ce==="x"?wt={_offset:ft.t+(1-(qe.position||0))*ft.h,_length:0}:Ce==="y"&&(wt={_offset:ft.l+(qe.position||0)*ft.w,_length:0}),Ie==="top"||Ie==="left"?wt._offset:Ie==="bottom"||Ie==="right"?wt._offset+wt._length:void 0},R.shouldShowZeroLine=function(Fe,qe,wt){var ft=e.simpleMap(qe.range,qe.r2l);return ft[0]*ft[1]<=0&&qe.zeroline&&(qe.type==="linear"||qe.type==="-")&&!(qe.rangebreaks&&qe.maskBreaks(0)===E)&&(Ge(qe,0)||!function(Ce,Ie,Te,Pe){var Ve=Te._mainAxis;if(!Ve)return;
1216var tt=Ce._fullLayout,ot=Ie._id.charAt(0),at=R.counterLetter(Ie._id),_t=Ie._offset+(Math.abs(Pe[0])<Math.abs(Pe[1])==(ot==="x")?0:Ie._length);function bt(Ot){if(!Ot.showline||!Ot.linewidth)return!1;var Mt=Math.max((Ot.linewidth+Ie.zerolinewidth)/2,1);function Pt(it){return typeof it=="number"&&Math.abs(it-_t)<Mt}if(Pt(Ot._mainLinePosition)||Pt(Ot._mainMirrorPosition))return!0;var Le=Ot._linepositions||{};for(var Xe in Le)if(Pt(Le[Xe][0])||Pt(Le[Xe][1]))return!0}var jt=tt._plots[Te._mainSubplot];if(!(jt.mainplotinfo||jt).overlays.length)return bt(Te);for(var Nt=R.list(Ce,at),$e=0;$e<Nt.length;$e++){var yt=Nt[$e];if(yt._mainAxis===Ve&&bt(yt))return!0}}(Fe,qe,wt,ft)||function(Ce,Ie){for(var Te=Ce._fullData,Pe=Ie._mainSubplot,Ve=Ie._id.charAt(0),tt=0;tt<Te.length;tt++){var ot=Te[tt];if(ot.visible===!0&&ot.xaxis+ot.yaxis===Pe&&(y.traceIs(ot,"bar-like")&&ot.orientation==={x:"h",y:"v"}[Ve]||ot.fill&&ot.fill.charAt(ot.fill.length-1)===Ve))return!0}return!1}(Fe,qe))},R.clipEnds=function(Fe,qe){return qe.filter(function(wt){return Ge(Fe,wt.x)})},R.allowAutoMargin=function(Fe){for(var qe=R.list(Fe,"",!0),wt=0;wt<qe.length;wt++){var ft=qe[wt];ft.automargin&&(b.allowAutoMargin(Fe,et(ft)),ft.mirror&&b.allowAutoMargin(Fe,ct(ft))),y.getComponentMethod("rangeslider","isVisible")(ft)&&b.allowAutoMargin(Fe,mt(ft))}},R.swap=function(Fe,qe){for(var wt=function(Ce,Ie){var Te,Pe,Ve=[];for(Te=0;Te<Ie.length;Te++){var tt=[],ot=Ce._fullData[Ie[Te]].xaxis,at=Ce._fullData[Ie[Te]].yaxis;if(ot&&at){for(Pe=0;Pe<Ve.length;Pe++)Ve[Pe].x.indexOf(ot)===-1&&Ve[Pe].y.indexOf(at)===-1||tt.push(Pe);if(tt.length){var _t,bt=Ve[tt[0]];if(tt.length>1)for(Pe=1;Pe<tt.length;Pe++)_t=Ve[tt[Pe]],Ct(bt.x,_t.x),Ct(bt.y,_t.y);Ct(bt.x,[ot]),Ct(bt.y,[at])}else Ve.push({x:[ot],y:[at]})}}return Ve}(Fe,qe),ft=0;ft<wt.length;ft++)Tt(Fe,wt[ft].x,wt[ft].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(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../constants/numerical").BADNUM,y=g.isArrayOrTypedArray,e=g.isDateTime,n=g.cleanNumber,t=Math.round;function i(d,l){return l?m(d):typeof d=="number"}function r(d){return Math.max(1,(d-1)/1e3)}$.exports=function(d,l,a){var u=d,f=a.noMultiCategory;if(y(u)&&!u.length)return"-";if(!f&&function(x){return y(x[0])&&y(x[1])}(u))return"multicategory";if(f&&Array.isArray(u[0])){for(var o=[],h=0;h<u.length;h++)if(y(u[h]))for(var p=0;p<u[h].length;p++)o.push(u[h][p]);u=o}if(function(x,c){for(var T=x.length,_=r(T),w=0,k=0,L={},A=0;A<T;A+=_){var I=t(A),P=x[I],S=String(P);L[S]||(L[S]=1,e(P,c)&&w++,m(P)&&k++)}return w>2*k}(u,l))return"date";var s=a.autotypenumbers!=="strict";return function(x,c){for(var T=x.length,_=r(T),w=0,k=0,L={},A=0;A<T;A+=_){var I=t(A),P=x[I],S=String(P);if(!L[S]){L[S]=1;var E=typeof P;E==="boolean"?k++:(c?n(P)!==b:E==="number")?w++:E==="string"&&k++}}return k>2*w}(u,s)?"category":function(x,c){for(var T=x.length,_=0;_<T;_++)if(i(x[_],c))return!0;return!1}(u,s)?"linear":"-"}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],556:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../registry"),b=v("../../lib"),y=v("../array_container_defaults"),e=v("./layout_attributes"),n=v("./tick_value_defaults"),t=v("./tick_mark_defaults"),i=v("./tick_label_defaults"),r=v("./prefix_suffix_defaults"),d=v("./category_order_defaults"),l=v("./line_grid_defaults"),a=v("./set_convert"),u=v("./constants").WEEKDAY_PATTERN,f=v("./constants").HOUR_PATTERN;function o(s,x,c){function T(S,E){return b.coerce(s,x,e.rangebreaks,S,E)}if(T("enabled")){var _=T("bounds");if(_&&_.length>=2){var w,k,L="";if(_.length===2){for(w=0;w<2;w++)if(k=p(_[w])){L=u;break}}var A=T("pattern",L);if(A===u)for(w=0;w<2;w++)(k=p(_[w]))&&(x.bounds[w]=_[w]=k-1);if(A)for(w=0;w<2;w++)switch(k=_[w],A){case u:if(!m(k)||(k=+k)!==Math.floor(k)||k<0||k>=7)return void(x.enabled=!1);x.bounds[w]=_[w]=k;break;case f:if(!m(k)||(k=+k)<0||k>24)return void(x.enabled=!1);x.bounds[w]=_[w]=k}if(c.autorange===!1){var I=c.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=T("values");if(!P||!P.length)return void(x.enabled=!1);T("dvalue")}}}$.exports=function(s,x,c,T,_){var w,k=T.letter,L=T.font||{},A=T.splomStash||{},I=c("visible",!T.visibleDflt),P=x._template||{},S=x.type||P.type||"-";S==="date"&&(g.getComponentMethod("calendars","handleDefaults")(s,x,"calendar",T.calendar),T.noTicklabelmode||(w=c("ticklabelmode")));var E="";T.noTicklabelposition&&S!=="multicategory"||(E=b.coerce(s,x,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:w==="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")),T.noTicklabeloverflow||c("ticklabeloverflow",E.indexOf("inside")!==-1?"hide past domain":S==="category"||S==="multicategory"?"allow":"hide past div"),a(x,_);var D=!x.isValidRange(s.range);D&&T.reverseDflt&&(D="reversed"),!c("autorange",D)||S!=="linear"&&S!=="-"||c("rangemode"),c("range"),x.cleanRange(),d(s,x,c,T),S==="category"||T.noHover||c("hoverformat");var F=c("color"),H=F!==e.color.dflt?F:L.color,V=A.label||_._dfltTitle[k];if(r(s,x,c,S,T),!I)return x;c("title.text",V),b.coerceFont(c,"title.font",{family:L.family,size:b.bigFont(L.size),color:H}),n(s,x,c,S),i(s,x,c,S,T),t(s,x,c,T),l(s,x,c,{dfltColor:F,bgColor:T.bgColor,showGrid:T.showGrid,attributes:e}),(x.showline||x.ticks)&&c("mirror"),T.automargin&&c("automargin");var Z,K=S==="multicategory";if(T.noTickson||S!=="category"&&!K||!x.ticks&&!x.showgrid||(K&&(Z="boundaries"),c("tickson",Z)==="boundaries"&&delete x.ticklabelposition),K&&c("showdividers")&&(c("dividercolor"),c("dividerwidth")),S==="date")if(y(s,x,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:o}),x.rangebreaks.length){for(var G=0;G<x.rangebreaks.length;G++)if(x.rangebreaks[G].pattern===u){x._hasDayOfWeekBreaks=!0;break}if(a(x,_),_._has("scattergl")||_._has("splom"))for(var W=0;W<T.data.length;W++){var Q=T.data[W];Q.type!=="scattergl"&&Q.type!=="splom"||(Q.visible=!1,b.warn(Q.type+" traces do not work on axes with rangebreaks. Setting trace "+Q.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};function p(s){if(typeof s=="string")return h[s.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(v,$,te){var m=v("../../constants/docs"),g=m.FORMAT_LINK,b=m.DATE_FORMAT_LINK;function y(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: "+g+"."].join(" ")}function e(n,t){return y(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}
1216f* 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(" ")}$.exports={axisHoverFormat:function(n,t){return{valType:"string",dflt:"",editType:"none",description:(t?y:e)("hover text",n)+["By default the values are formatted using "+(t?"generic number format":"`"+n+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:y,descriptionWithDates:e}},{"../../constants/docs":474}],558:[function(v,$,te){var m=v("../../registry"),g=v("./constants");function b(y,e){if(e&&e.length){for(var n=0;n<e.length;n++)if(e[n][y])return!0}return!1}te.id2name=function(y){if(typeof y=="string"&&y.match(g.AX_ID_PATTERN)){var e=y.split(" ")[0].substr(1);return e==="1"&&(e=""),y.charAt(0)+"axis"+e}},te.name2id=function(y){if(y.match(g.AX_NAME_PATTERN)){var e=y.substr(5);return e==="1"&&(e=""),y.charAt(0)+e}},te.cleanId=function(y,e,n){var t=/( domain)$/.test(y);if(typeof y=="string"&&y.match(g.AX_ID_PATTERN)&&(!e||y.charAt(0)===e)&&(!t||n)){var i=y.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),y.charAt(0)+i+(t&&n?" domain":"")}},te.list=function(y,e,n){var t=y._fullLayout;if(!t)return[];var i,r=te.listIds(y,e),d=new Array(r.length);for(i=0;i<r.length;i++){var l=r[i];d[i]=t[l.charAt(0)+"axis"+l.substr(1)]}if(!n){var a=t._subplots.gl3d||[];for(i=0;i<a.length;i++){var u=t[a[i]];e?d.push(u[e+"axis"]):d.push(u.xaxis,u.yaxis,u.zaxis)}}return d},te.listIds=function(y,e){var n=y._fullLayout;if(!n)return[];var t=n._subplots;return e?t[e+"axis"]:t.xaxis.concat(t.yaxis)},te.getFromId=function(y,e,n){var t=y._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(y,e,n){var t=y._fullLayout,i=null;if(m.traceIs(e,"gl3d")){var r=e.scene;r.substr(0,5)==="scene"&&(i=t[r][n+"axis"])}else i=te.getFromId(y,e[n+"axis"]||n);return i},te.idSort=function(y,e){var n=y.charAt(0),t=e.charAt(0);return n!==t?n>t?1:-1:+(y.substr(1)||1)-+(e.substr(1)||1)},te.ref2id=function(y){return!!/^[xyz]/.test(y)&&y.split(" ")[0]},te.isLinked=function(y,e){return b(e,y._axisMatchGroups)||b(e,y._axisConstraintGroups)}},{"../../registry":638,"./constants":561}],559:[function(v,$,te){$.exports=function(m,g,b,y){if(g.type==="category"){var e,n=m.categoryarray,t=Array.isArray(n)&&n.length>0;t&&(e="array");var i,r=b("categoryorder",e);r==="array"&&(i=b("categoryarray")),t||r!=="array"||(r=g.categoryorder="trace"),r==="trace"?g._initialCategories=[]:r==="array"?g._initialCategories=i.slice():(i=function(d,l){var a,u,f,o=l.dataAttr||d._id.charAt(0),h={};if(l.axData)a=l.axData;else for(a=[],u=0;u<l.data.length;u++){var p=l.data[u];p[o+"axis"]===d._id&&a.push(p)}for(u=0;u<a.length;u++){var s=a[u][o];for(f=0;f<s.length;f++){var x=s[f];x!=null&&(h[x]=1)}}return Object.keys(h)}(g,y).sort(),r==="category ascending"?g._initialCategories=i:r==="category descending"&&(g._initialCategories=i.reverse()))}}},{}],560:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../constants/numerical"),y=b.ONEDAY,e=b.ONEWEEK;te.dtick=function(n,t){var i=t==="log",r=t==="date",d=t==="category",l=r?y:1;if(!n)return l;if(m(n))return(n=Number(n))<=0?l:d?Math.max(1,Math.round(n)):r?Math.max(.1,n):n;if(typeof n!="string"||!r&&!i)return l;var a=n.charAt(0),u=n.substr(1);return(u=m(u)?Number(u):0)<=0||!(r&&a==="M"&&u===Math.round(u)||i&&a==="L"||i&&a==="D"&&(u===1||u===2))?l:n},te.tick0=function(n,t,i,r){return t==="date"?g.cleanDate(n,g.dateTick0(i,r%e==0?1:0)):r!=="D1"&&r!=="D2"?m(n)?Number(n):0:void 0}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],561:[function(v,$,te){var m=v("../../lib/regex").counter;$.exports={idRegex:{x:m("x","( domain)?"),y:m("y","( domain)?")},attrRegex:m("[xy]axis"),xAxisMatch:m("xaxis"),yAxisMatch:m("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
1216: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(v,$,te){var m=v("../../lib"),g=v("./autorange"),b=v("./axis_ids").id2name,y=v("./layout_attributes"),e=v("./scale_zoom"),n=v("./set_convert"),t=v("../../constants/numerical").ALMOST_EQUAL,i=v("../../constants/alignment").FROM_BL;function r(h,p,s){var x=s.axIds,c=s.layoutOut,T=s.hasImage,_=c._axisConstraintGroups,w=c._axisMatchGroups,k=p._id,L=k.charAt(0),A=((c._splomAxes||{})[L]||{})[k]||{},I=p._id,P=I.charAt(0)==="x";function S(ee,j){return m.coerce(h,p,y,ee,j)}p._matchGroup=null,p._constraintGroup=null,S("constrain",T?"domain":"range"),m.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&&c[b(D)].type===F&&H.push(D);var V=l(_,I);if(V){var Z=[];for(E=0;E<H.length;E++)V[D=H[E]]||Z.push(D);H=Z}var K,G,W=H.length;W&&(h.matches||A.matches)&&(K=m.coerce(h,p,{matches:{valType:"enumerated",values:H,dflt:H.indexOf(A.matches)!==-1?A.matches:void 0}},"matches"));var Q=T&&!P?p.anchor:void 0;if(W&&!K&&(h.scaleanchor||Q)&&(G=m.coerce(h,p,{scaleanchor:{valType:"enumerated",values:H}},"scaleanchor",Q)),K){p._matchGroup=a(w,I,K,1);var R=c[b(K)],N=d(c,p)/d(c,R);P!==(K.charAt(0)==="x")&&(N=(P?"x":"y")+N),a(_,I,K,N)}else h.matches&&x.indexOf(h.matches)!==-1&&m.warn("ignored "+p._name+'.matches: "'+h.matches+'" to avoid an infinite loop');if(G){var U=S("scaleratio");U||(U=p.scaleratio=1),a(_,I,G,U)}else h.scaleanchor&&x.indexOf(h.scaleanchor)!==-1&&m.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 s=p.domain;return s||(s=h[b(p.overlaying)].domain),s[1]-s[0]}function l(h,p){for(var s=0;s<h.length;s++)if(h[s][p])return h[s];return null}function a(h,p,s,x){var c,T,_,w,k,L=l(h,p);L===null?((L={})[p]=1,k=h.length,h.push(L)):k=h.indexOf(L);var A=Object.keys(L);for(c=0;c<h.length;c++)if(_=h[c],c!==k&&_[s]){var I=_[s];for(T=0;T<A.length;T++)_[w=A[T]]=u(I,u(x,L[w]));return void h.splice(k,1)}if(x!==1)for(T=0;T<A.length;T++){var P=A[T];L[P]=u(x,L[P])}L[s]=1}function u(h,p){var s,x,c="",T="";typeof h=="string"&&(s=(c=h.match(/^[xy]*/)[0]).length,h=+h.substr(s)),typeof p=="string"&&(x=(T=p.match(/^[xy]*/)[0]).length,p=+p.substr(x));var _=h*p;return s||x?s&&x&&c.charAt(0)!==T.charAt(0)?s===x?_:(s>x?c.substr(x):T.substr(s))+_:c+T+h*p:_}function f(h,p){for(var s=p._size,x=s.h/s.w,c={},T=Object.keys(h),_=0;_<T.length;_++){var w=T[_],k=h[w];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}c[w]=k}return c}function o(h,p){var s=h._inputDomain,x=i[h.constraintoward],c=s[0]+(s[1]-s[0])*x;h.domain=h._input.domain=[c+(s[0]-c)/p,c+(s[1]-c)/p],h.setScale()}te.handleDefaults=function(h,p,s){var x,c,T,_,w,k,L,A,I=s.axIds,P=s.axHasImage,S=p._axisConstraintGroups=[],E=p._axisMatchGroups=[];for(x=0;x<I.length;x++)r(w=h[_=b(I[x])],k=p[_],{axIds:I,layoutOut:p,hasImage:P[_]});function D(R,N){for(x=0;x<R.length;x++)for(T in c=R[x])p[b(T)][N]=c}for(D(E,"_matchGroup"),x=0;x<S.length;x++)for(T in c=S[x])if((k=p[b(T)]).fixedrange){for(var F in c){var H=b(F);(h[H]||{}).fixedrange===!1&&m.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(T in c=S[x]){(k=p[b(T)])._matchGroup&&Object.keys(k._matchGroup).length===Object.keys(c).length&&(S.splice(
1216x,1),x--);break}x++}D(S,"_constraintGroup");var V=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],Z=!1,K=!1;function G(){A=k[L],L==="rangebreaks"&&(K=k._hasDayOfWeekBreaks)}for(x=0;x<E.length;x++){c=E[x];for(var W=0;W<V.length;W++){var Q;for(T in L=V[W],A=null,c)if(w=h[_=b(T)],k=p[_],L in k){if(!k.matches&&(Q=k,L in w)){G();break}A===null&&L in w&&G()}if(L==="range"&&A&&(Z=!0),L==="autorange"&&A===null&&Z&&(A=!1),A===null&&L in Q&&(A=Q[L]),A!==null)for(T in c)(k=p[b(T)])[L]=L==="range"?A.slice():A,L==="rangebreaks"&&(k._hasDayOfWeekBreaks=K,n(k,p))}}},te.enforce=function(h){var p,s,x,c,T,_,w,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(s=0;s<I.length;s++)F[c=I[s]]=T=L[b(c)],T._inputDomain?T.domain=T._inputDomain.slice():T._inputDomain=T.domain.slice(),T._inputRange||(T._inputRange=T.range.slice()),T.setScale(),D[c]=_=Math.abs(T._m)/x[c],P=Math.min(P,_),T.constrain!=="domain"&&T._constraintShrinkable||(E=Math.min(E,_)),delete T._constraintShrinkable,S=Math.max(S,_),T.constrain==="domain"&&(H=!0);if(!(P>t*S)||H){for(s=0;s<I.length;s++)if(_=D[c=I[s]],w=(T=F[c]).constrain,_!==E||w==="domain")if(k=_/E,w==="range")e(T,k);else{var V=T._inputDomain,Z=(T.domain[1]-T.domain[0])/(V[1]-V[0]),K=(T.r2l(T.range[1])-T.r2l(T.range[0]))/(T.r2l(T._inputRange[1])-T.r2l(T._inputRange[0]));if((k/=Z)*K<1){T.domain=T._input.domain=V.slice(),e(T,k);continue}if(K<1&&(T.range=T._input.range=T._inputRange.slice(),k*=K),T.autorange){var G=T.r2l(T.range[0]),W=T.r2l(T.range[1]),Q=(G+W)/2,R=Q,N=Q,U=Math.abs(W-Q),ee=Q-U*k*1.0001,j=Q+U*k*1.0001,X=g.makePadFn(L,T,0),J=g.makePadFn(L,T,1);o(T,k);var re,ne,se=Math.abs(T._m),oe=g.concatExtremes(h,T),pe=oe.min,ce=oe.max;for(ne=0;ne<pe.length;ne++)(re=pe[ne].val-X(pe[ne])/se)>ee&&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=T.l2r(R),N=T.l2r(N),T.range=T._input.range=G<W?[R,N]:[N,R]}o(T,k)}}}},te.getAxisGroup=function(h,p){for(var s=h._axisMatchGroups,x=0;x<s.length;x++)if(s[x][p])return"g"+x;return p},te.clean=function(h,p){if(p._inputDomain){for(var s=!1,x=p._id,c=h._fullLayout._axisConstraintGroups,T=0;T<c.length;T++)if(c[T][x]){s=!0;break}s&&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(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=g.numberFormat,y=v("tinycolor2"),e=v("has-passive-events"),n=v("../../registry"),t=g.strTranslate,i=v("../../lib/svg_text_utils"),r=v("../../components/color"),d=v("../../components/drawing"),l=v("../../components/fx"),a=v("./axes"),u=v("../../lib/setcursor"),f=v("../../components/dragelement"),o=v("../../components/dragelement/helpers"),h=o.selectingOrDrawing,p=o.freeMode,s=v("../../constants/alignment").FROM_TL,x=v("../../lib/clear_gl_canvases"),c=v("../../plot_api/subroutines").redrawReglTraces,T=v("../plots"),_=v("./axis_ids").getFromId,w=v("./select").prepSelect,k=v("./select").clearSelect,L=v("./select").selectOnClick,A=v("./scale_zoom"),I=v("./constants"),P=I.MINDRAG,S=I.MINZOOM,E=!0;function D(re,ne,se,oe){var pe=g.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 m.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];if(!de.fixedrange)if(de.rangebreaks){var xe=de._id.charAt(0)==="y",_e=xe?1-ne:ne,we=xe?1-se:se;oe[de._name+".range[0]"]=de.l2r(de.p2l(_e*de._length)),oe[de._name+".range[1]"]=de.l2r(de.p2l(we*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 ge=(ne+(1-se))/2;V(pe,ge,1-ge,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 G(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}
1216).attr("transform",t(ne,se)).attr("d","M0,0Z")}function Q(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){m.select(re).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function U(re){E&&re.data&&re._context.showTips&&(g.notifier(g._(re,"Double-click to zoom back out"),"long"),E=!1)}function ee(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,_e,we=!1,Ee={},fe={},ge=(pe||{}).xaHash,ke=(pe||{}).yaHash,be=0;be<ne.length;be++){var Se=ne[be];for(ce in se)if(Se[ce]){for(xe in Se)pe&&(ge[xe]||ke[xe])||(xe.charAt(0)==="x"?se:oe)[xe]||(Ee[xe]=ce);for(de in oe)pe&&(ge[de]||ke[de])||!Se[de]||(we=!0)}for(de in oe)if(Se[de])for(_e in Se)pe&&(ge[_e]||ke[_e])||(_e.charAt(0)==="x"?se:oe)[_e]||(fe[_e]=de)}we&&(g.extendFlat(Ee,fe),fe={});var Oe={},De=[];for(xe in Ee){var je=_(re,xe);De.push(je),Oe[je._id]=je}var Je={},ze=[];for(_e in fe){var Ue=_(re,_e);ze.push(Ue),Je[Ue._id]=Ue}return{xaHash:Oe,yaHash:Je,xaxes:De,yaxes:ze,xLinks:Ee,yLinks:fe,isSubplotConstrained:we}}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}$.exports={makeDragBox:function(re,ne,se,oe,pe,ce,de,xe){var _e,we,Ee,fe,ge,ke,be,Se,Oe,De,je,Je,ze,Ue,Ge,Ye,et,ct,mt,Ct,Tt,nt,Qe,Et=re._fullLayout._zoomlayer,Gt=de+xe==="nsew",Xt=(de+xe).length===1;function Fe(){if(_e=ne.xaxis,we=ne.yaxis,Oe=_e._length,De=we._length,be=_e._offset,Se=we._offset,(Ee={})[_e._id]=_e,(fe={})[we._id]=we,de&&xe)for(var $t=ne.overlays,er=0;er<$t.length;er++){var ar=$t[er].xaxis;Ee[ar._id]=ar;var hr=$t[er].yaxis;fe[hr._id]=hr}ge=J(Ee),ke=J(fe),ze=H(ge,xe),Ue=H(ke,de),Ge=!Ue&&!ze,Je=j(re,re._fullLayout._axisMatchGroups,Ee,fe);var vr=(je=j(re,re._fullLayout._axisConstraintGroups,Ee,fe,Je)).isSubplotConstrained||Je.isSubplotConstrained;Ye=xe||vr,et=de||vr;var Pr=re._fullLayout;ct=Pr._has("scattergl"),mt=Pr._has("splom"),Ct=Pr._has("svg")}Fe();var qe=function($t,er,ar){return $t?$t==="nsew"?ar?"":er==="pan"?"move":"crosshair":$t.toLowerCase()+"-resize":"pointer"}(Ue+ze,re._fullLayout.dragmode,Gt),wt=F(ne,de+xe+"drag",qe,se,oe,pe,ce);if(Ge&&!Gt)return wt.onmousedown=null,wt.style.pointerEvents="none",wt;var ft,Ce,Ie,Te,Pe,Ve,tt,ot,at,_t,bt={element:wt,gd:re,plotinfo:ne};function jt(){bt.plotinfo.selection=!1,k(re)}function Nt($t,er){var ar=bt.gd;if(ar._fullLayout._activeShapeIndex>=0)ar._fullLayout._deactivateShape(ar);else{var hr=ar._fullLayout.clickmode;if(N(ar),$t!==2||Xt||Zt(),Gt)hr.indexOf("select")>-1&&L(er,ar,ge,ke,ne.id,bt),hr.indexOf("event")>-1&&l.click(ar,er,ne.id);else if($t===1&&Xt){var vr=de?we:_e,Pr=de==="s"||xe==="w"?0:1,Ur=vr._name+".range["+Pr+"]",qr=function(mn,Mn){var Xr,Er=mn.range[Mn],on=Math.abs(Er-mn.range[1-Mn]);return mn.type==="date"?Er:mn.type==="log"?(Xr=Math.ceil(Math.max(0,-Math.log(on)/Math.LN10))+3,b("."+Xr+"g")(Math.pow(10,Er))):(Xr=Math.floor(Math.log(Math.abs(Er))/Math.LN10)-Math.floor(Math.log(on)/Math.LN10)+4,b("."+String(Xr)+"g")(Er))}(vr,Pr),rn="left",An="middle";if(vr.fixedrange)return;de?(An=de==="n"?"top":"bottom",vr.side==="right"&&(rn="right")):xe==="e"&&(rn="right"),ar._context.showAxisRangeEntryBoxes&&m.select(wt).call(i.makeEditable,{gd:ar,immediate:!0,background:ar._fullLayout.paper_bgcolor,text:String(qr),fill:vr.tickfont?vr.tickfont.color:"#444",horizontalAlign:rn,verticalAlign:An}
1216).on("edit",function(mn){var Mn=vr.d2r(mn);Mn!==void 0&&n.call("_guiRelayout",ar,Ur,Mn)})}}}function $e($t,er){if(re._transitioningWithDuration)return!1;var ar=Math.max(0,Math.min(Oe,nt*$t+ft)),hr=Math.max(0,Math.min(De,Qe*er+Ce)),vr=Math.abs(ar-ft),Pr=Math.abs(hr-Ce);function Ur(){tt="",Ie.r=Ie.l,Ie.t=Ie.b,at.attr("d","M0,0Z")}if(Ie.l=Math.min(ft,ar),Ie.r=Math.max(ft,ar),Ie.t=Math.min(Ce,hr),Ie.b=Math.max(Ce,hr),je.isSubplotConstrained)vr>S||Pr>S?(tt="xy",vr/Oe>Pr/De?(Pr=vr*De/Oe,Ce>hr?Ie.t=Ce-Pr:Ie.b=Ce+Pr):(vr=Pr*Oe/De,ft>ar?Ie.l=ft-vr:Ie.r=ft+vr),at.attr("d",ee(Ie))):Ur();else if(Je.isSubplotConstrained)if(vr>S||Pr>S){tt="xy";var qr=Math.min(Ie.l/Oe,(De-Ie.b)/De),rn=Math.max(Ie.r/Oe,(De-Ie.t)/De);Ie.l=qr*Oe,Ie.r=rn*Oe,Ie.b=(1-qr)*De,Ie.t=(1-rn)*De,at.attr("d",ee(Ie))}else Ur();else!Ue||Pr<Math.min(Math.max(.6*vr,P),S)?vr<P||!ze?Ur():(Ie.t=0,Ie.b=De,tt="x",at.attr("d",function(An,mn){return"M"+(An.l-.5)+","+(mn-S-.5)+"h-3v"+(2*S+1)+"h3ZM"+(An.r+.5)+","+(mn-S-.5)+"h3v"+(2*S+1)+"h-3Z"}(Ie,Ce))):!ze||vr<Math.min(.6*Pr,S)?(Ie.l=0,Ie.r=Oe,tt="y",at.attr("d",function(An,mn){return"M"+(mn-S-.5)+","+(An.t-.5)+"v-3h"+(2*S+1)+"v3ZM"+(mn-S-.5)+","+(An.b+.5)+"v3h"+(2*S+1)+"v-3Z"}(Ie,ft))):(tt="xy",at.attr("d",ee(Ie)));Ie.w=Ie.r-Ie.l,Ie.h=Ie.b-Ie.t,tt&&(_t=!0),re._dragged=_t,Q(ot,at,Ie,Pe,Ve,Te),yt(),re.emit("plotly_relayouting",Tt),Ve=!0}function yt(){Tt={},tt!=="xy"&&tt!=="x"||(V(ge,Ie.l/Oe,Ie.r/Oe,Tt,je.xaxes),At("x",Tt)),tt!=="xy"&&tt!=="y"||(V(ke,(De-Ie.b)/De,(De-Ie.t)/De,Tt,je.yaxes),At("y",Tt))}function Ot(){yt(),N(re),Jt(),U(re)}bt.prepFn=function($t,er,ar){var hr=bt.dragmode,vr=re._fullLayout.dragmode;vr!==hr&&(bt.dragmode=vr),Fe(),nt=re._fullLayout._invScaleX,Qe=re._fullLayout._invScaleY,Ge||(Gt?$t.shiftKey?vr==="pan"?vr="zoom":h(vr)||(vr="pan"):$t.ctrlKey&&(vr="pan"):vr="pan"),p(vr)?bt.minDrag=1:bt.minDrag=void 0,h(vr)?(bt.xaxes=ge,bt.yaxes=ke,w($t,er,ar,bt,vr)):(bt.clickFn=Nt,h(hr)&&jt(),Ge||(vr==="zoom"?(bt.moveFn=$e,bt.doneFn=Ot,bt.minDrag=1,function(Pr,Ur,qr){var rn=wt.getBoundingClientRect();ft=Ur-rn.left,Ce=qr-rn.top,re._fullLayout._calcInverseTransform(re);var An=g.apply3DTransform(re._fullLayout._invTransform)(ft,Ce);ft=An[0],Ce=An[1],Ie={l:ft,r:ft,w:0,t:Ce,b:Ce,h:0},Te=re._hmpixcount?re._hmlumcount/re._hmpixcount:y(re._fullLayout.plot_bgcolor).getLuminance(),Ve=!1,tt="xy",_t=!1,ot=G(Et,Te,be,Se,Pe="M0,0H"+Oe+"V"+De+"H0V0"),at=W(Et,be,Se)}(0,er,ar)):vr==="pan"&&(bt.moveFn=it,bt.doneFn=Jt))),re._fullLayout._redrag=function(){var Pr=re._dragdata;if(Pr&&Pr.element===wt){var Ur=re._fullLayout.dragmode;h(Ur)||(Fe(),Vt([0,0,Oe,De]),bt.moveFn(Pr.dx,Pr.dy))}}},f.init(bt);var Mt=[0,0,Oe,De],Pt=null,Le=I.REDRAWDELAY,Xe=ne.mainplot?re._fullLayout._plots[ne.mainplot]:ne;function it($t,er){if($t*=nt,er*=Qe,!re._transitioningWithDuration){if(re._fullLayout._replotting=!0,ze==="ew"||Ue==="ns"){var ar=ze?-$t:0,hr=Ue?-er:0;if(Je.isSubplotConstrained){if(ze&&Ue){var vr=($t/Oe-er/De)/2;ar=-($t=vr*Oe),hr=-(er=-vr*De)}Ue?ar=-hr*Oe/De:hr=-ar*De/Oe}return ze&&(Z(ge,$t),At("x")),Ue&&(Z(ke,er),At("y")),Vt([ar,hr,Oe,De]),It(),void re.emit("plotly_relayouting",Tt)}var Pr,Ur,qr=ze==="w"==(Ue==="n")?1:-1;if(ze&&Ue&&(je.isSubplotConstrained||Je.isSubplotConstrained)){var rn=($t/Oe+qr*er/De)/2;$t=rn*Oe,er=qr*rn*De}if(ze==="w"?$t=Xr(ge,0,$t):ze==="e"?$t=Xr(ge,1,-$t):ze||($t=0),Ue==="n"?er=Xr(ke,1,er):Ue==="s"?er=Xr(ke,0,-er):Ue||(er=0),Pr=ze==="w"?$t:0,Ur=Ue==="n"?er:0,je.isSubplotConstrained&&!Je.isSubplotConstrained||Je.isSubplotConstrained&&ze&&Ue&&qr>0){var An;if(Je.isSubplotConstrained||!ze&&Ue.length===1){for(An=0;An<ge.length;An++)ge[An].range=ge[An]._r.slice(),A(ge[An],1-er/De);Pr=($t=er*Oe/De)/2}if(Je.isSubplotConstrained||!Ue&&ze.length===1){for(An=0;An<ke.length;An++)ke[An].range=ke[An]._r.slice(),A(ke[An],1-$t/Oe);Ur=(er=$t*De/Oe)/2}}Je.isSubplotConstrained&&Ue||At("x"),Je.isSubplotConstrained&&ze||At("y");var mn=Oe-$t,Mn=De-er;!Je.isSubplotConstrained||ze&&Ue||(ze?(Ur=Pr?0:$t*De/Oe,Mn=mn*De/Oe):(Pr=Ur?0:er*Oe/De,mn=Mn*Oe/De)),Vt([Pr,Ur,mn,Mn]),It(),re.emit("plotly_relayouting",Tt)}function Xr(Er,on,Un){for(var Tr,en,$r=1-on,Rr=0;Rr<Er.length;Rr++){var Pn=Er[Rr];if(!Pn.fixedrange){Tr=Pn,en=Pn._rl[$r]+(Pn._rl[on]-Pn._rl[$r])/K(Un/Pn._length);var Nn=Pn.l2r(en);Nn!==!1&&Nn!==void 0&&(Pn.range[on]=Nn)}}return Tr._length*(Tr._rl[on]-en)/(Tr._rl[on]-Tr._rl[$r])}}function At($t,er){for(var ar=Je.isSubplotConstrained?{x:ke,y:ge}[$t]:Je[$t+"axes"],hr=Je.isSubplotConstrained?{x:ge,y:ke}[$t]:[],vr=0;vr<ar.length;vr++){var Pr=ar[vr],Ur=Pr._id,qr=Je.xLinks[Ur]||Je.yLinks[Ur],rn=hr[0]||Ee[qr]||fe[qr];rn&&(er?(er[Pr._name+".range[0]"]=er[rn._name+".range[0]"],er[Pr._name+".range[1]"]=er[rn._name+".range[1]"]):Pr.range=rn.range.slice())}}function It(){var $t,er=[];function ar(Pr){for($t=0;$t<Pr.length;$t++)Pr[$t].fixedrange||er.push(Pr[$t]._id)}for(Ye&&(ar(ge),ar(je.xaxes),ar(Je.xaxes)),et&&(ar(ke),ar(je.yaxes),ar(Je.yaxes)),Tt={},$t=0;$t<er.length;$t++){var hr=er[$t],vr=_(re,hr);a.drawOne(re,vr,{skipTitle:!0}),Tt[vr._name+".range[0]"]=vr.range[0],Tt[vr._name+".range[1]"]=vr.range[1]}a.redrawComponents(re,er)}function Zt(){if(!re._transitioningWithDuration){var $t=re._context.doubleClick,er=[];ze&&(er=er.concat(ge)),Ue&&(er=er.concat(ke)),Je.xaxes&&(er=er.concat(Je.xaxes)),Je.yaxes&&(er=er.concat(Je.yaxes));var ar,hr,vr,Pr={};if($t==="reset+autosize"){for($t="autosize",hr=0;hr<er.length;hr++)if((ar=er[hr])._rangeInitial&&(ar.range[0]!==ar._rangeInitial[0]||ar.range[1]!==ar._rangeInitial[1])||!ar._rangeInitial&&!ar.autorange){$t="reset";break}}if($t==="autosize")for(hr=0;hr<er.length;hr++)(ar=er[hr]).fixedrange||(Pr[ar._name+".autorange"]=!0);else if($t==="reset")for((ze||je.isSubplotConstrained)&&(er=er.concat(je.xaxes)),Ue&&!je.isSubplotConstrained&&(er=er.concat(je.yaxes)),je.isSubplotConstrained&&(ze?Ue||(er=er.concat(ke)):er=er.concat(ge)),hr=0;hr<er.length;
1216hr++)(ar=er[hr]).fixedrange||(ar._rangeInitial?(vr=ar._rangeInitial,Pr[ar._name+".range[0]"]=vr[0],Pr[ar._name+".range[1]"]=vr[1]):Pr[ar._name+".autorange"]=!0);re.emit("plotly_doubleclick",null),n.call("_guiRelayout",re,Pr)}}function Jt(){Vt([0,0,Oe,De]),g.syncOrAsync([T.previousPromises,function(){re._fullLayout._replotting=!1,n.call("_guiRelayout",re,Tt)}],re)}function Vt($t){var er,ar,hr,vr,Pr=re._fullLayout,Ur=Pr._plots,qr=Pr._subplots.cartesian;if(mt&&n.subplotsRegistry.splom.drag(re),ct){for(er=0;er<qr.length;er++)if(hr=(ar=Ur[qr[er]]).xaxis,vr=ar.yaxis,ar._scene){var rn=g.simpleMap(hr.range,hr.r2l),An=g.simpleMap(vr.range,vr.r2l);ar._scene.update({range:[rn[0],An[0],rn[1],An[1]]})}}if((mt||ct)&&(x(re),c(re)),Ct){var mn=$t[2]/_e._length,Mn=$t[3]/we._length;for(er=0;er<qr.length;er++){hr=(ar=Ur[qr[er]]).xaxis,vr=ar.yaxis;var Xr,Er,on,Un,Tr=(Ye||Je.isSubplotConstrained)&&!hr.fixedrange&&Ee[hr._id],en=(et||Je.isSubplotConstrained)&&!vr.fixedrange&&fe[vr._id];if(Tr?(Xr=mn,on=xe||Je.isSubplotConstrained?$t[0]:fr(hr,Xr)):Je.xaHash[hr._id]?(Xr=mn,on=$t[0]*hr._length/_e._length):Je.yaHash[hr._id]?(Xr=Mn,on=Ue==="ns"?-$t[1]*hr._length/we._length:fr(hr,Xr,{n:"top",s:"bottom"}[Ue])):on=Ir(hr,Xr=pr(hr,mn,Mn)),en?(Er=Mn,Un=de||Je.isSubplotConstrained?$t[1]:fr(vr,Er)):Je.yaHash[vr._id]?(Er=Mn,Un=$t[1]*vr._length/we._length):Je.xaHash[vr._id]?(Er=mn,Un=ze==="ew"?-$t[0]*vr._length/_e._length:fr(vr,Er,{e:"right",w:"left"}[ze])):Un=Ir(vr,Er=pr(vr,mn,Mn)),Xr||Er){Xr||(Xr=1),Er||(Er=1);var $r=hr._offset-on/Xr,Rr=vr._offset-Un/Er;ar.clipRect.call(d.setTranslate,on,Un).call(d.setScale,Xr,Er),ar.plot.call(d.setTranslate,$r,Rr).call(d.setScale,1/Xr,1/Er),Xr===ar.xScaleFactor&&Er===ar.yScaleFactor||(d.setPointGroupScale(ar.zoomScalePts,Xr,Er),d.setTextPointsScale(ar.zoomScaleTxt,Xr,Er)),d.hideOutsideRangePoints(ar.clipOnAxisFalseTraces,ar),ar.xScaleFactor=Xr,ar.yScaleFactor=Er}}}}function pr($t,er,ar){return $t.fixedrange?0:Ye&&je.xaHash[$t._id]?er:et&&(je.isSubplotConstrained?je.xaHash:je.yaHash)[$t._id]?ar:0}function Ir($t,er){return er?($t.range=$t._r.slice(),A($t,er),fr($t,er)):0}function fr($t,er,ar){return $t._length*(1-er)*s[ar||$t.constraintoward||"middle"]}return de.length*xe.length!=1&&X(wt,function($t){if(re._context._scrollZoom.cartesian||re._fullLayout._enablescrollzoom){if(jt(),re._transitioningWithDuration)return $t.preventDefault(),void $t.stopPropagation();Fe(),clearTimeout(Pt);var er=-$t.deltaY;if(isFinite(er)||(er=$t.wheelDelta/10),isFinite(er)){var ar,hr=Math.exp(-Math.min(Math.max(er,-20),20)/200),vr=Xe.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Pr=($t.clientX-vr.left)/vr.width,Ur=(vr.bottom-$t.clientY)/vr.height;if(Ye){for(xe||(Pr=.5),ar=0;ar<ge.length;ar++)qr(ge[ar],Pr,hr);At("x"),Mt[2]*=hr,Mt[0]+=Mt[2]*Pr*(1/hr-1)}if(et){for(de||(Ur=.5),ar=0;ar<ke.length;ar++)qr(ke[ar],Ur,hr);At("y"),Mt[3]*=hr,Mt[1]+=Mt[3]*(1-Ur)*(1/hr-1)}Vt(Mt),It(),re.emit("plotly_relayouting",Tt),Pt=setTimeout(function(){re._fullLayout&&(Mt=[0,0,Oe,De],Jt())},Le),$t.preventDefault()}else g.log("Did not find wheel motion attributes: ",$t)}function qr(rn,An,mn){if(!rn.fixedrange){var Mn=g.simpleMap(rn.range,rn.r2l),Xr=Mn[0]+(Mn[1]-Mn[0])*An;rn.range=Mn.map(function(Er){return rn.l2r(Xr+(Er-Xr)*mn)})}}}),wt},makeDragger:D,makeRectDragger:F,makeZoombox:G,makeCorners:W,updateZoombox:Q,xyCorners:ee,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(v,$,te){var m=v("@plotly/d3"),g=v("../../components/fx"),b=v("../../components/dragelement"),y=v("../../lib/setcursor"),e=v("./dragbox").makeDragBox,n=v("./constants").DRAGGERSIZE;te.initInteractions=function(t){var i=t._fullLayout;if(t._context.staticPlot)m.select(t).selectAll(".drag").remove();else if(i._has("cartesian")||i._has("splom")){Object.keys(i._plots||{}).sort(function(d,l){if((i._plots[d].mainplot&&!0)===(i._plots[l].mainplot&&!0)){var a=d.split("y"),u=l.split("y");return a[0]===u[0]?Number(a[1]||1)-Number(u[1]||1):Number(a[0]||1)-Number(u[0]||1)}return i._plots[d].mainplot?1:-1}
1216).forEach(function(d){var l=i._plots[d],a=l.xaxis,u=l.yaxis;if(!l.mainplot){var f=e(t,l,a._offset,u._offset,a._length,u._length,"ns","ew");f.onmousemove=function(p){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===d&&t._fullLayout._plots[d]&&g.hover(t,p,d)},g.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,l,a._offset-n,u._offset-n,n,n,"n","w"),e(t,l,a._offset+a._length,u._offset-n,n,n,"n","e"),e(t,l,a._offset-n,u._offset+u._length,n,n,"s","w"),e(t,l,a._offset+a._length,u._offset+u._length,n,n,"s","e"))}if(t._context.showAxisDragHandles){if(d===a._mainSubplot){var o=a._mainLinePosition;a.side==="top"&&(o-=n),e(t,l,a._offset+.1*a._length,o,.8*a._length,n,"","ew"),e(t,l,a._offset,o,.1*a._length,n,"","w"),e(t,l,a._offset+.9*a._length,o,.1*a._length,n,"","e")}if(d===u._mainSubplot){var h=u._mainLinePosition;u.side!=="right"&&(h-=n),e(t,l,h,u._offset+.1*u._length,n,.8*u._length,"ns",""),e(t,l,h,u._offset+.9*u._length,n,.1*u._length,"s",""),e(t,l,h,u._offset,n,.1*u._length,"n","")}}});var r=i._hoverlayer.node();r.onmousemove=function(d){d.target=t._fullLayout._lasthover,g.hover(t,d,i._hoversubplot)},r.onclick=function(d){d.target=t._fullLayout._lasthover,g.click(t,d)},r.onmousedown=function(d){t._fullLayout._lasthover.onmousedown(d)},te.updateFx(t)}},te.updateFx=function(t){var i=t._fullLayout,r=i.dragmode==="pan"?"move":"crosshair";y(i._draggers,r)}},{"../../components/dragelement":385,"../../components/fx":406,"../../lib/setcursor":524,"./constants":561,"./dragbox":563,"@plotly/d3":58}],565:[function(v,$,te){$.exports={clearOutlineControllers:function(m){var g=m._fullLayout._zoomlayer;g&&g.selectAll(".outline-controllers").remove()},clearSelect:function(m){var g=m._fullLayout._zoomlayer;g&&g.selectAll(".select-outline").remove(),m._fullLayout._drawing=!1}}},{}],566:[function(v,$,te){var m=v("../../lib").strTranslate;function g(b,y){switch(b.type){case"log":return b.p2d(y);case"date":return b.p2r(y,0,b.calendar);default:return b.p2r(y)}}$.exports={p2r:g,r2p:function(b,y){switch(b.type){case"log":return b.d2p(y);case"date":return b.r2p(y,0,b.calendar);default:return b.r2p(y)}},axValue:function(b){var y=b._id.charAt(0)==="y"?1:0;return function(e){return g(b,e[y])}},getTransform:function(b){return m(b.xaxis._offset,b.yaxis._offset)}}},{"../../lib":503}],567:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("./axis_ids");$.exports=function(y){return function(e,n){var t=e[y];if(Array.isArray(t))for(var i=m.subplotsRegistry.cartesian,r=i.idRegex,d=n._subplots,l=d.xaxis,a=d.yaxis,u=d.cartesian,f=n._has("cartesian")||n._has("gl2d"),o=0;o<t.length;o++){var h=t[o];if(g.isPlainObject(h)){var p=b.cleanId(h.xref,"x",!1),s=b.cleanId(h.yref,"y",!1),x=r.x.test(p),c=r.y.test(s);if(x||c){f||g.pushUnique(n._basePlotModules,i);var T=!1;x&&l.indexOf(p)===-1&&(l.push(p),T=!0),c&&a.indexOf(s)===-1&&(a.push(s),T=!0),T&&x&&c&&u.push(p+s)}}}}}},{"../../lib":503,"../../registry":638,"./axis_ids":558}],568:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../registry"),b=v("../../lib"),y=v("../plots"),e=v("../../components/drawing"),n=v("../get_data").getModuleCalcData,t=v("./axis_ids"),i=v("./constants"),r=v("../../constants/xmlns_namespaces"),d=b.ensureSingle;function l(h,p,s){return b.ensureSingle(h,p,s,function(x){x.datum(s)})}function a(h,p,s,x,c){for(var T,_,w,k=i.traceLayerClasses,L=h._fullLayout,A=L._modules,I=[],P=[],S=0;S<A.length;S++){var E=(T=A[S]).name,D=g.modules[E].categories;if(D.svg){var F=T.layerName||E+"layer",H=T.plot;w=(_=n(s,H))[0],s=_[1],w.length&&I.push({i:k.indexOf(F),className:F,plotMethod:H,cdModule:w}),D.zoomScale&&P.push("."+F)}}I.sort(function(K,G){return K.i-G.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 G=m.select(this),W=K.className;K.plotMethod(h,p,K.cdModule,G,x,c),i.clipOnAxisFalseQuery.indexOf("."+W)===-1&&e.setClipUrl(G,p.layerClipId,h)}),L._has("scattergl")&&(T=g.getModule("scattergl"),w=n(s,T)[0],T.plot(h,p,w)),!h._context.staticPlot&&(p._hasClipOnAxisFalse&&(p.clipOnAxisFalseTraces=p.plot.selectAll(i.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 s=p.plotgroup,x=p.id,c=i.layerValue2layerClass[p.xaxis.layer],T=i.layerValue2layerClass[p.yaxis.layer],_=h._fullLayout._hasOnlyLargeSploms;if(p.mainplot){var w=p.mainplotinfo,k=w.plotgroup,L=x+"-x",A=x+"-y";p.gridlayer=w.gridlayer,p.zerolinelayer=w.zerolinelayer,d(w.overlinesBelow,"path",L),d(w.overlinesBelow,"path",A),d(w.overaxesBelow,"g",L),d(w.overaxesBelow,"g",A),p.plot=d(w.overplot,"g",x),d(w.overlinesAbove,"path",L),d(w.overlinesAbove,"path",A),d(w.overaxesAbove,"g",L),d(w.overaxesAbove,"g",A),p.xlines=k.select(".overlines-"+c).select("."+L),p.ylines=k.select(".overlines-"+T).select("."+A),p.xaxislayer=k.select(".overaxes-"+c).select("."+L),p.yaxislayer=k.select(".overaxes-"+T).select("."+A)}else if(_)p.xlines=d(s,"path","xlines-above"),p.ylines=d(s,"path","ylines-above"),p.xaxislayer=d(s,"g","xaxislayer-above"),p.yaxislayer=d(s,"g","yaxislayer-above");else{var I=d(s,"g","layer-subplot");p.shapelayer=d(I,"g","shapelayer"),p.imagelayer=d(I,"g","imagelayer"),p.gridlayer=d(s,"g","gridlayer"),p.zerolinelayer=d(s,"g","zerolinelayer"),d(s,"path","xlines-below"),d(s,"path","ylines-below"),p.overlinesBelow=d(s,"g","overlines-below"),d(s,"g","xaxislayer-below"),d(s,"g","yaxislayer-below"),p.overaxesBelow=d(s,"g","overaxes-below"),p.plot=d(s,"g","plot"),p.overplot=d(s,"g","overplot"),p.xlines=d(s,"path","xlines-above"),p.ylines=d(s,"path","ylines-above"),p.overlinesAbove=d(s,"g","overlines-above"),d(s,"g","xaxislayer-above"),d(s,"g","yaxislayer-above"),p.overaxesAbove=d(s,"g","overaxes-above"),p.xlines=s.select(".xlines-"+c),p.ylines=s.select(".ylines-"+T),p.xaxislayer=s.select(".xaxislayer-"+c),p.yaxislayer=s.select(".yaxislayer-"+T)}_||(l(p.gridlayer,"g",p.xaxis._id),l(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 s={};for(var x in h.each(function(w){var k=w[0];m.select(this).remove(),o(k,p),s[k]=!0}),p._plots)for(var c=p._plots[x].overlays||[],T=0;T<c.length;T++){var _=c[T];s[_.id]&&_.plot.selectAll(".trace").remove()}}}function o(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=i.idRegex,te.attrRegex=i.attrRegex,te.attributes=v("./attributes"),te.layoutAttributes=v("./layout_attributes"),te.supplyLayoutDefaults=v("./layout_defaults"),te.transitionAxes=v("./transition_axes"),te.finalizeSubplots=function(h,p){var s,x,c,T=p._subplots,_=T.xaxis,w=T.yaxis,k=T.cartesian,L=k.concat(T.gl2d||[]),A={},I={};for(s=0;s<L.length;s++){var P=L[s].split("y");A[P[0]]=1,I["y"+P[1]]=1}for(s=0;s<_.length;s++)A[x=_[s]]||(c=(h[t.id2name(x)]||{}).anchor,i.idRegex.y.test(c)||(c="y"),k.push(x+c),L.push(x+c),I[c]||(I[c]=1,b.pushUnique(w,c)));for(s=0;s<w.length;s++)I[c=w[s]]||(x=(h[t.id2name(c)]||{}).anchor,i.idRegex.x.test(x)||(x="x"),k.push(x+c),L.push(x+c),A[x]||(A[x]=1,b.pushUnique(_,x)));if(!L.length){for(var S in x="",c="",h)i.attrRegex.test(S)&&(S.charAt(0)==="x"?(!x||+S.substr(5)<+x.substr(5))&&(x=S):(!c||+S.substr(5)<+c.substr(5))&&(c=S));x=x?t.name2id(x):"x",c=c?t.name2id(c):"y",_.push(x),w.push(c),k.push(x+c)}},te.plot=function(h,p,s,x){var c,T=h._fullLayout,_=T._subplots.cartesian,w=h.calcdata;if(!Array.isArray(p))for(p=[],c=0;c<w.length;c++)p.push(c);for(c=0;c<_.length;c++){for(var k,L=_[c],A=T._plots[L],I=[],P=0;P<w.length;P++){var S=w[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)}a(h,A,I,s,x)}},te.clean=function(h,p,s,x){var c,T,_,w=x._plots||{},k=p._plots||{},L=x._subplots||{};if(x._hasOnlyLargeSploms&&!p._hasOnlyLargeSploms)for(_ in w)(c=w[_]).plotgroup&&c.plotgroup.remove();var A=x._has&&x._has("gl"),I=p._has&&p._has("gl");if(A&&!I)for(_ in w)(c=w[_])._scene&&c._scene.destroy();if(L.xaxis&&L.yaxis){var P=t.listIds({_fullLayout:x});for(T=0;T<P.length;T++){var S=P[T];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(T=0;T<L.cartesian.length;T++){var F=L.cartesian[T];if(!k[F]){var H="."+F+",."+F+"-x,."+F+"-y";x._cartesianlayer.selectAll(H).remove(),o(F,x)}}},te.drawFramework=function(h){var p=h._fullLayout,s=function(c){var T,_,w,k,L,A,I=c._fullLayout,P=I._subplots.cartesian,S=P.length,E=[],D=[];for(T=0;T<S;T++){w=P[T],k=I._plots[w],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!==w&&Z?(k.mainplot=V,k.mainplotinfo=Z,D.push(w)):(k.mainplot=void 0,k.mainplotinfo=void 0,E.push(w))}for(T=0;T<D.length;T++)w=D[T],(k=I._plots[w]).mainplotinfo.overlays.push(k);
1216var K=E.concat(D),G=new Array(S);for(T=0;T<S;T++){w=K[T],k=I._plots[w],L=k.xaxis,A=k.yaxis;var W=[w,L.layer,A.layer,L.overlaying||"",A.overlaying||""];for(_=0;_<k.overlays.length;_++)W.push(k.overlays[_].id);G[T]=W}return G}(h),x=p._cartesianlayer.selectAll(".subplot").data(s,String);x.enter().append("g").attr("class",function(c){return"subplot "+c[0]}),x.order(),x.exit().call(f,p),x.each(function(c){var T=c[0],_=p._plots[T];_.plotgroup=m.select(this),u(h,_),_.draglayer=d(p._draggers,"g",T)})},te.rangePlot=function(h,p,s){u(h,p),a(h,p,s),y.style(h)},te.toSVG=function(h){var p=h._fullLayout._glimages,s=m.select(h).selectAll(".svg-container");s.filter(function(x,c){return c===s.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=v("./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(v,$,te){var m=v("../font_attributes"),g=v("../../components/color/attributes"),b=v("../../components/drawing/attributes").dash,y=v("../../lib/extend").extendFlat,e=v("../../plot_api/plot_template").templatedArray,n=v("../../plots/cartesian/axis_format_attributes").descriptionWithDates,t=v("../../constants/numerical").ONEDAY,i=v("./constants"),r=i.HOUR_PATTERN,d=i.WEEKDAY_PATTERN;$.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:g.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:m({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:[i.idRegex.x.toString(),i.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:[i.idRegex.x.toString(),i.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:g.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:y({},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:m({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:g.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:{valType:"boolean",editType:"ticks"},gridcolor:{valType:"color",dflt:g.lightLine,editType:"ticks"},gridwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:g.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:g.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",i.idRegex.x.toString(),i.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",i.idRegex.x.toString(),i.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:m({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(v,$,te){var m=v("../../lib"),g=v("../../components/color"),b=v("../../components/fx/helpers").isUnifiedHover,y=v("../../components/fx/hovermode_defaults"),e=v("../../plot_api/plot_template"),n=v("../layout_attributes"),t=v("./layout_attributes"),i=v("./type_defaults"),r=v("./axis_defaults"),d=v("./constraints"),l=v("./position_defaults"),a=v("./axis_ids"),u=a.id2name,f=a.name2id,o=v("./constants").AX_ID_PATTERN,h=v("../../registry"),p=h.traceIs,s=h.getComponentMethod;function x(c,T,_){Array.isArray(c[T])?c[T].push(_):c[T]=[_]}$.exports=function(c,T,_){var w,k,L=T.autotypenumbers,A={},I={},P={},S={},E={},D={},F={},H={},V={},Z={};for(w=0;w<_.length;w++){var K=_[w];if(p(K,"cartesian")||p(K,"gl2d")){var G,W;if(K.xaxis)G=u(K.xaxis),x(A,G,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"?(G&&(I[G]=!0),W&&(F[W]=!0)):W&&(P[W]=!0):K.type==="image"?(W&&(H[W]=!0),G&&(H[G]=!0)):(W&&(E[W]=!0,D[W]=!0),p(K,"carpet")&&(K.type!=="carpet"||K._cheater)||G&&(S[G]=!0)),K.type==="carpet"&&K._cheater&&G&&(I[G]=!0),p(K,"2dMap")&&(V[G]=!0,V[W]=!0),p(K,"oriented")&&(Z[K.orientation==="h"?W:G]=!0)}}var Q=T._subplots,R=Q.xaxis,N=Q.yaxis,U=m.simpleMap(R,u),ee=m.simpleMap(N,u),j=U.concat(ee),X=g.background;R.length&&N.length&&(X=m.coerce(c,T,n,"plot_bgcolor"));var J,re,ne,se,oe,pe=g.combine(X,T.paper_bgcolor);function ce(){var Qe=A[J]||[];oe._traceIndices=Qe.map(function(Et){return Et._expandedIndex}),oe._annIndices=[],oe._shapeIndices=[],oe._imgIndices=[],oe._subplotsWith=[],oe._counterAxes=[],oe._name=oe._attr=J,oe._id=re}function de(Qe,Et){return m.coerce(se,oe,t,Qe,Et)}function xe(Qe,Et){return m.coerce2(se,oe,t,Qe,Et)}function _e(Qe){return Qe==="x"?N:R}function we(Qe,Et){for(var Gt=Qe==="x"?U:ee,Xt=[],Fe=0;Fe<Gt.length;Fe++){var qe=Gt[Fe];qe===Et||(c[qe]||{}).overlaying||Xt.push(f(qe))}return Xt}var Ee={x:_e("x"),y:_e("y")},fe=Ee.x.concat(Ee.y),ge={},ke=[];function be(){var Qe=se.matches;o.test(Qe)&&fe.indexOf(Qe)===-1&&(ge[Qe]=se.type,ke=Object.keys(ge))}var Se=y(c,T),Oe=b(Se);for(w=0;w<j.length;w++){J=j[w],re=f(J),ne=J.charAt(0),m.isPlainObject(c[J])||(c[J]={}),se=c[J],oe=e.newContainer(T,J,ne+"axis"),ce();var De=ne==="x"&&!S[J]&&I[J]||ne==="y"&&!E[J]&&P[J],je=ne==="y"&&(!D[J]&&F[J]||H[J]),Je={letter:ne,font:T.font,outerTicks:V[J],showGrid:!Z[J],data:A[J]||[],bgColor:pe,calendar:T.calendar,automargin:!0,visibleDflt:De,reverseDflt:je,autotypenumbersDflt:L,splomStash:((T._splomAxes||{})[ne]||{})[re]};de("uirevision",T.uirevision),i(se,oe,de,Je),r(se,oe,de,Je,T);var ze=Oe&&ne===Se.charAt(0),Ue=xe("spikecolor",Oe?oe.color:void 0),Ge=xe("spikethickness",Oe?1.5:void 0),Ye=xe("spikedash",Oe?"dot":void 0),et=xe("spikemode",Oe?"across":void 0),ct=xe("spikesnap");de("showspikes",!!(ze||Ue||Ge||Ye||et||ct))||(delete oe.spikecolor,delete oe.spikethickness,delete oe.spikedash,delete oe.spikemode,delete oe.spikesnap),l(se,oe,de,{letter:ne,counterAxes:Ee[ne],overlayableAxes:we(ne,J),grid:T.grid}),de("title.standoff"),be(),oe._input=se}for(w=0;w<ke.length;){re=ke[w++],ne=(J=u(re)).charAt(0),m.isPlainObject(c[J])||(c[J]={}),se=c[J],oe=e.newContainer(T,J,ne+"axis"),ce();var mt={letter:ne,font:T.font,outerTicks:V[J],showGrid:!Z[J],data:[],bgColor:pe,calendar:T.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:L,splomStash:((T._splomAxes||{})[ne]||{})[re]};de("uirevision",T.uirevision),oe.type=ge[re]||"linear",r(se,oe,de,mt,T),l(se,oe,de,{letter:ne,counterAxes:Ee[ne],overlayableAxes:we(ne,J),grid:T.grid}),de("fixedrange"),be(),oe._input=se}var Ct=s("rangeslider","handleDefaults"),Tt=s("rangeselector","handleDefaults");for(w=0;w<U.length;w++)J=U[w],se=c[J],oe=T[J],Ct(c,T,J),oe.type==="date"&&Tt(se,oe,T,ee,oe.calendar),de("fixedrange");for(w=0;w<ee.length;w++){J=ee[w],se=c[J],oe=T[J];var nt=T[u(oe.anchor)];de("fixedrange",s("rangeslider","isVisible")(nt))}d.handleDefaults(c,T,{axIds:fe.concat(ke).sort(a.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(v,$,te){var m=v("tinycolor2").mix,g=v("../../components/color/attributes").lightFraction,b=v("../../lib");$.exports=function(y,e,n,t){var i=(t=t||{}).dfltColor;function r(h,p){return b.coerce2(y,e,t.attributes,h,p)}var d=r("linecolor",i),l=r("linewidth");n("showline",t.showLine||!!d||!!l)||(delete e.linecolor,delete e.linewidth);var a=r("gridcolor",m(i,t.bgColor,t.blend||g).toRgbString()),u=r("gridwidth");if(n("showgrid",t.showGrid||!!a||!!u)||(delete e.gridcolor,delete e.gridwidth),!t.noZeroLine){var f=r("zerolinecolor",i),o=r("zerolinewidth");n("zeroline",t.showGrid||!!f||!!o)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},{"../../components/color/attributes":365,"../../lib":503,tinycolor2:312}],572:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib");$.exports=function(b,y,e,n){var t,i,r,d,l=n.counterAxes||[],a=n.overlayableAxes||[],u=n.letter,f=n.grid;f&&(i=f._domains[u][f._axisMap[y._id]],t=f._anchors[y._id],i&&(r=f[u+"side"].split(" ")[0],d=f.domain[u][r==="right"||r==="top"?1:0])),i=i||[0,1],t=t||(m(b.position)?"free":l[0]||"free"),r=r||(u==="x"?"bottom":"left"),d=d||0,g.coerce(b,y,{anchor:{valType:"enumerated",values:["free"].concat(l),dflt:t}},"anchor")==="free"&&e("position",d),g.coerce(b,y,{side:{valType:"enumerated",values:u==="x"?["bottom","top"]:["left","right"],dflt:r}},"side");var o=!1;if(a.length&&(o=g.coerce(b,y,{overlaying:{valType:"enumerated",values:[!1].concat(a),dflt:!1}},"overlaying")),!o){var h=e("domain",i);h[0]>h[1]-1/4096&&(y.domain=i),g.noneOrAll(b.domain,y.domain,i)}return e("layer"),y}},{"../../lib":503,"fast-isnumeric":190}],573:[function(v,$,te){var m=v("./show_dflt");$.exports=function(g,b,y,e,n){n||(n={});var t=n.tickSuffixDflt,i=m(g);y("tickprefix")&&y("showtickprefix",i),y("ticksuffix",t)&&y("showticksuffix",i)}},{"./show_dflt":577}],574:[function(v,$,te){var m=v("../../constants/alignment").FROM_BL;$.exports=function(g,b,y){y===void 0&&(y=m[g.constraintoward||"center"]);var e=[g.r2l(g.range[0]),g.r2l(g.range[1])],n=e[0]+(e[1]-e[0])*y;g.range=g._input.range=[g.l2r(n+(e[0]-n)*b),g.l2r(n+(e[1]-n)*b)],g.setScale()}},{"../../constants/alignment":471}],575:[function(v,$,te){var m=v("polybooljs"),g=v("../../registry"),b=v("../../components/drawing").dashStyle,y=v("../../components/color"),e=v("../../components/fx"),n=v("../../components/fx/helpers").makeEventData,t=v("../../components/dragelement/helpers"),i=t.freeMode,r=t.rectMode,d=t.drawMode,l=t.openMode,a=t.selectMode,u=v("../../components/shapes/draw_newshape/display_outlines"),f=v("../../components/shapes/draw_newshape/helpers").handleEllipse,o=v("../../components/shapes/draw_newshape/newshapes"),h=v("../../lib"),p=v("../../lib/polygon"),s=v("../../lib/throttle"),x=v("./axis_ids").getFromId,c=v("../../lib/clear_gl_canvase
1216s"),T=v("../../plot_api/subroutines").redrawReglTraces,_=v("./constants"),w=_.MINSELECT,k=p.filter,L=p.tester,A=v("./handle_outline").clearSelect,I=v("./helpers"),P=I.p2r,S=I.axValue,E=I.getTransform;function D(U,ee,j,X,J,re,ne){var se,oe,pe,ce,de,xe,_e,we,Ee,fe=ee._hoverdata,ge=ee._fullLayout.clickmode.indexOf("event")>-1,ke=[];if(function(je){return je&&Array.isArray(je)&&je[0].hoverOnBox!==!0}(fe)){Z(U,ee,re);var be=function(je,Je){var ze,Ue,Ge=je[0],Ye=-1,et=[];for(Ue=0;Ue<Je.length;Ue++)if(ze=Je[Ue],Ge.fullData._expandedIndex===ze.cd[0].trace._expandedIndex){if(Ge.hoverOnBox===!0)break;Ge.pointNumber!==void 0?Ye=Ge.pointNumber:Ge.binNumber!==void 0&&(Ye=Ge.binNumber,et=Ge.pointNumbers);break}return{pointNumber:Ye,pointNumbers:et,searchInfo:ze}}(fe,se=G(ee,j,X,J));if(be.pointNumbers.length>0?function(je,Je){var ze,Ue,Ge,Ye=[];for(Ge=0;Ge<je.length;Ge++)(ze=je[Ge]).cd[0].trace.selectedpoints&&ze.cd[0].trace.selectedpoints.length>0&&Ye.push(ze);if(Ye.length===1&&Ye[0]===Je.searchInfo&&(Ue=Je.searchInfo.cd[0].trace).selectedpoints.length===Je.pointNumbers.length){for(Ge=0;Ge<Je.pointNumbers.length;Ge++)if(Ue.selectedpoints.indexOf(Je.pointNumbers[Ge])<0)return!1;return!0}return!1}(se,be):function(je){var Je,ze,Ue,Ge=0;for(Ue=0;Ue<je.length;Ue++)if(Je=je[Ue],(ze=Je.cd[0].trace).selectedpoints&&(ze.selectedpoints.length>1||(Ge+=ze.selectedpoints.length)>1))return!1;return Ge===1}(se)&&(xe=W(be))){for(ne&&ne.remove(),Ee=0;Ee<se.length;Ee++)(oe=se[Ee])._module.selectPoints(oe,!1);Q(ee,se),K(re),ge&&ee.emit("plotly_deselect",null)}else{for(_e=U.shiftKey&&(xe!==void 0?xe:W(be)),pe=function(je,Je,ze){return{pointNumber:je,searchInfo:Je,subtract:ze}}(be.pointNumber,be.searchInfo,_e),ce=V(re.selectionDefs.concat([pe])),Ee=0;Ee<se.length;Ee++)if(de=R(se[Ee]._module.selectPoints(se[Ee],ce),se[Ee]),ke.length)for(var Se=0;Se<de.length;Se++)ke.push(de[Se]);else ke=de;if(Q(ee,se,we={points:ke}),pe&&re&&re.selectionDefs.push(pe),ne){var Oe=re.mergedPolygons,De=l(re.dragmode);u(N(Oe,De),ne,re)}ge&&ee.emit("plotly_selected",we)}}}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(ee,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 ee=[],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]))ee.push(H(U[ne]));else{var se=p.tester(U[ne]);se.subtract=U[ne].subtract,ee.push(se),j=Math.min(j,se.xmin),X=Math.max(X,se.xmax),J=Math.min(J,se.ymin),re=Math.max(re,se.ymax)}return{xmin:j,xmax:X,ymin:J,ymax:re,pts:[],contains:function(oe,pe,ce,de){for(var xe=!1,_e=0;_e<ee.length;_e++)ee[_e].contains(oe,pe,ce,de)&&(xe=ee[_e].subtract===!1);return xe},isRect:!1,degenerate:!1}}function Z(U,ee,j){ee._fullLayout._drawing=!1;var X=ee._fullLayout,J=j.plotinfo,re=j.dragmode,ne=X._lastSelectedSubplot&&X._lastSelectedSubplot===J.id,se=(U.shiftKey||U.altKey)&&!(d(re)&&l(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(ee),X._lastSelectedSubplot=J.id)}function K(U){var ee=U.dragmode,j=U.plotinfo,X=U.gd;if(X._fullLayout._activeShapeIndex>=0&&X._fullLayout._deactivateShape(X),d(ee)){var J=X._fullLayout._zoomlayer.selectAll(".select-outline-"+j.id);if(J&&X._fullLayout._drawing){var re=o(J,U);re&&g.call("_guiRelayout",X,{shapes:re}),X._fullLayout._drawing=!1}}j.selection={},j.selection.selectionDefs=U.selectionDefs=[],j.selection.mergedPolygons=U.mergedPolygons=[]}function G(U,ee,j,X){var J,re,ne,se=[],oe=ee.map(function(_e){return _e._id}),pe=j.map(function(_e){return _e._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,ee[0],j[0]);ce.scene=U._fullLayout._splomScenes[re.uid],se.push(ce)}else if(re.type==="sankey"){var de=xe(re._module,J,ee[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,ee[0],j[0]));return se;function xe(_e,we,Ee,fe){return{_module:_e,cd:we,xaxis:Ee,yaxis:fe}}}function W(U){var ee=U.searchInfo.cd[0].trace,j=U.pointNumber,X=U.pointNumbers,J=X.length>0?X[0]:j;return!!ee.selectedpoints&&ee.selectedpoints.indexOf(J)>-1}function Q(U,ee,j){var X,J,re,ne;for(X=0;X<ee.length;X++){var se=ee[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<ee.length;X++)(ne=ee[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<ee.length;X++)delete(ne=ee[X].cd[0].trace).selectedpoints,delete ne._input.selectedpoints,ne._fullInput!==ne&&delete ne._fullInput.selectedpoints;var _e=!1;for(X=0;X<ee.length;X++){ne=(re=(J=ee[X]).cd)[0].trace,g.traceIs(ne,"regl")&&(_e=!0);var we=J._module,Ee=we.styleOnSelect||we.style;Ee&&(Ee(U,re,re[0].node3),re[0].nodeRangePlot3&&Ee(U,re,re[0].nodeRangePlot3))}_e&&(c(U),T(U))}function R(U,ee){if(Array.isArray(U))for(var j=ee.cd,X=ee.cd[0].trace,J=0;J<U.length;J++)U[J]=n(U[J],X,j);return U}function N(U,ee){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])}
1216ee||j[X].push(["Z",j[X][0][1],j[X][0][2]])}return j}$.exports={prepSelect:function(U,ee,j,X,J){var re=i(J),ne=r(J),se=l(J),oe=d(J),pe=a(J),ce=J==="drawcircle",de=J==="drawline"||ce,xe=X.gd,_e=xe._fullLayout,we=_e._zoomlayer,Ee=X.element.getBoundingClientRect(),fe=X.plotinfo,ge=E(fe),ke=ee-Ee.left,be=j-Ee.top;_e._calcInverseTransform(xe);var Se=h.apply3DTransform(_e._invTransform)(ke,be);ke=Se[0],be=Se[1];var Oe,De,je,Je,ze,Ue,Ge,Ye=_e._invScaleX,et=_e._invScaleY,ct=ke,mt=be,Ct="M"+ke+","+be,Tt=X.xaxes[0]._length,nt=X.yaxes[0]._length,Qe=X.xaxes.concat(X.yaxes),Et=U.altKey&&!(d(J)&&se);Z(U,xe,X),re&&(Oe=k([[ke,be]],_.BENDPX));var Gt=we.selectAll("path.select-outline-"+fe.id).data(oe?[0]:[1,2]),Xt=_e.newshape;Gt.enter().append("path").attr("class",function(Te){return"select-outline select-outline-"+Te+" select-outline-"+fe.id}).style(oe?{opacity:Xt.opacity/2,fill:se?void 0:Xt.fillcolor,stroke:Xt.line.color,"stroke-dasharray":b(Xt.line.dash,Xt.line.width),"stroke-width":Xt.line.width+"px"}:{}).attr("fill-rule",Xt.fillrule).classed("cursor-move",!!oe).attr("transform",ge).attr("d",Ct+"Z");var Fe,qe=we.append("path").attr("class","zoombox-corners").style({fill:y.background,stroke:y.defaultLine,"stroke-width":1}).attr("transform",ge).attr("d","M0,0Z"),wt=_e._uid+_.SELECTID,ft=[],Ce=G(xe,X.xaxes,X.yaxes,X.subplot);function Ie(Te,Pe){return Te-Pe}Fe=fe.fillRangeItems?fe.fillRangeItems:ne?function(Te,Pe){var Ve=Te.range={};for(ze=0;ze<Qe.length;ze++){var tt=Qe[ze],ot=tt._id.charAt(0);Ve[tt._id]=[P(tt,Pe[ot+"min"]),P(tt,Pe[ot+"max"])].sort(Ie)}}:function(Te,Pe,Ve){var tt=Te.lassoPoints={};for(ze=0;ze<Qe.length;ze++){var ot=Qe[ze];
1216tt[ot._id]=Ve.filtered.map(S(ot))}},X.moveFn=function(Te,Pe){ct=Math.max(0,Math.min(Tt,Ye*Te+ke)),mt=Math.max(0,Math.min(nt,et*Pe+be));var Ve=Math.abs(ct-ke),tt=Math.abs(mt-be);if(ne){var ot,at,_t;if(pe){var bt=_e.selectdirection;switch(ot=bt==="any"?tt<Math.min(.6*Ve,w)?"h":Ve<Math.min(.6*tt,w)?"v":"d":bt){case"h":at=ce?nt/2:0,_t=nt;break;case"v":at=ce?Tt/2:0,_t=Tt}}if(oe)switch(_e.newshape.drawdirection){case"vertical":ot="h",at=ce?nt/2:0,_t=nt;break;case"horizontal":ot="v",at=ce?Tt/2:0,_t=Tt;break;case"ortho":Ve<tt?(ot="h",at=be,_t=mt):(ot="v",at=ke,_t=ct);break;default:ot="d"}ot==="h"?((Je=de?f(ce,[ct,at],[ct,_t]):[[ke,at],[ke,_t],[ct,_t],[ct,at]]).xmin=de?ct:Math.min(ke,ct),Je.xmax=de?ct:Math.max(ke,ct),Je.ymin=Math.min(at,_t),Je.ymax=Math.max(at,_t),qe.attr("d","M"+Je.xmin+","+(be-w)+"h-4v"+2*w+"h4ZM"+(Je.xmax-1)+","+(be-w)+"h4v"+2*w+"h-4Z")):ot==="v"?((Je=de?f(ce,[at,mt],[_t,mt]):[[at,be],[at,mt],[_t,mt],[_t,be]]).xmin=Math.min(at,_t),Je.xmax=Math.max(at,_t),Je.ymin=de?mt:Math.min(be,mt),Je.ymax=de?mt:Math.max(be,mt),qe.attr("d","M"+(ke-w)+","+Je.ymin+"v-4h"+2*w+"v4ZM"+(ke-w)+","+(Je.ymax-1)+"v4h"+2*w+"v-4Z")):ot==="d"&&((Je=de?f(ce,[ke,be],[ct,mt]):[[ke,be],[ke,mt],[ct,mt],[ct,be]]).xmin=Math.min(ke,ct),Je.xmax=Math.max(ke,ct),Je.ymin=Math.min(be,mt),Je.ymax=Math.max(be,mt),qe.attr("d","M0,0Z"))}else re&&(Oe.addPt([ct,mt]),Je=Oe.filtered);X.selectionDefs&&X.selectionDefs.length?(je=function(jt,Nt,$e){return $e?m.difference({regions:jt,inverted:!1},{regions:[Nt],inverted:!1}).regions:m.union({regions:jt,inverted:!1},{regions:[Nt],inverted:!1}).regions}(X.mergedPolygons,Je,Et),Je.subtract=Et,De=V(X.selectionDefs.concat([Je]))):(je=[Je],De=L(Je)),u(N(je,se),Gt,X),pe&&s.throttle(wt,_.SELECTDELAY,function(){var jt;ft=[];var Nt;for(ze=0;ze<Ce.length;ze++)if(Nt=(Ue=Ce[ze])._module.selectPoints(Ue,De),jt=R(Nt,Ue),ft.length)for(var $e=0;$e<jt.length;$e++)ft.push(jt[$e]);else ft=jt;Q(xe,Ce,Ge={points:ft}),Fe(Ge,Je,Oe),X.gd.emit("plotly_selecting",Ge)})},X.clickFn=function(Te,Pe){if(qe.remove(),xe._fullLayout._activeShapeIndex>=0)xe._fullLayout._deactivateShape(xe);else if(!oe){var Ve=_e.clickmode;s.done(wt).then(function(){if(s.clear(wt),Te===2){for(Gt.remove(),ze=0;ze<Ce.length;ze++)(Ue=Ce[ze])._module.selectPoints(Ue,!1);Q(xe,Ce),K(X),xe.emit("plotly_deselect",null)}else Ve.indexOf("select")>-1&&D(Pe,xe,X.xaxes,X.yaxes,X.subplot,X,Gt),Ve==="event"&&xe.emit("plotly_selected",void 0);e.click(xe,Pe)}).catch(h.error)}},X.doneFn=function(){qe.remove(),s.done(wt).then(function(){s.clear(wt),X.gd.emit("plotly_selected",Ge),Je&&X.selectionDefs&&(Je.subtract=Et,X.selectionDefs.push(Je),X.mergedPolygons.length=0,[].push.apply(X.mergedPolygons,je)),X.doneFnCompleted&&X.doneFnCompleted(ft)}).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(v,$,te){var m=v("@plotly/d3"),g=v("d3-time-format").utcFormat,b=v("../../lib"),y=b.numberFormat,e=v("fast-isnumeric"),n=b.cleanNumber,t=b.ms2DateTime,i=b.dateTime2ms,r=b.ensureNumber,d=b.isArrayOrTypedArray,l=v("../../constants/numerical"),a=l.FP_SAFE,u=l.BADNUM,f=l.LOG_CLIP,o=l.ONEWEEK,h=l.ONEDAY,p=l.ONEHOUR,s=l.ONEMIN,x=l.ONESEC,c=v("./axis_ids"),T=v("./constants"),_=T.HOUR_PATTERN,w=T.WEEKDAY_PATTERN;function k(A){return Math.pow(10,A)}function L(A){return A!=null}$.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=i(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=i(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 G(j){return e(j)?+j:Z(j)}function W(j,X,J){return m.round(J+X*j,2)}function Q(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 Q(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 Q(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 Q(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=G(j);return X!==void 0?X:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=G,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[c.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],_e=de._length||b.minRowLength(xe);if(d(xe[0])&&d(xe[1]))for(J=0;J<_e;J++){var we=xe[0][J],Ee=xe[1][J];L(we)&&L(Ee)&&(ce.push([we,Ee]),we in pe[0][1]||(pe[0][1][we]=pe[0][0]++),Ee in pe[1][1]||(pe[1][1][Ee]=pe[1][0]++))}}}for(ce.sort(function(fe,ge){var ke=pe[0][1],be=ke[fe[0]]-ke[ge[0]];if(be)return be;var Se=pe[1][1];return Se[fe[1]]-Se[ge[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"?T.DFLTRANGEY:A._name==="realaxis"?[0,1]:X.dfltRange||T.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]<-a?ne[J]=-a:ne[J]>a&&(ne[J]=a),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=c.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 _e=xe?-1:1;for(A._m2=_e*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]-_e*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(we){return we.enabled&&we.bounds?b.simpleMap(we.bounds,we.pattern?n:A.d2c):null})),oe._cachedValues||(oe._cachedValues=oe.map(function(we){return we.enabled&&we.values?b.simpleMap(we.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 w: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],_e=0;_e<xe.length;_e++)if(re=(J=xe[_e])+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(Se,Oe){return Se.pattern===w&&Oe.pattern===_?-1:Oe.pattern===w&&Se.pattern===_?1:0}),ce=function(Se,Oe){if((Se=b.constrain(Se,j,X))!==(Oe=b.constrain(Oe,j,X))){for(var De=!0,je=0;je<oe.length;je++){var Je=oe[je];Se<Je.max&&Oe>=Je.min&&(Se<Je.min&&(Je.min=Se),Oe>Je.max&&(Je.max=Oe),De=!1)}De&&oe.push({min:Se,max:Oe})}};for(J=0;J<pe.length;J++){var de=pe[J];if(de.enabled)if(de.bounds){var xe=j,_e=X;de.pattern&&(xe=Math.floor(xe)),ne=(re=b.simpleMap(de.bounds,de.pattern?n:A.r2l))[0],se=re[1];var we,Ee,fe=new Date(xe);switch(de.pattern){case w:Ee=o,we=(se-ne+(se<ne?7:0))*h,xe+=ne*h-(fe.getUTCDay()*h+fe.getUTCHours()*p+fe.getUTCMinutes()*s+fe.getUTCSeconds()*x+fe.getUTCMilliseconds());break;case _:Ee=h,we=(se-ne+(se<ne?24:0))*p,xe+=ne*p-(fe.getUTCHours()*p+fe.getUTCMinutes()*s+fe.getUTCSeconds()*x+fe.getUTCMilliseconds());break;default:xe=Math.min(re[0],re[1]),we=Ee=(_e=Math.max(re[0],re[1]))-xe}for(var ge=xe;ge<_e;ge+=Ee)ce(ge,ge+we)}else for(var ke=b.simpleMap(de.values,A.d2c),be=0;be<ke.length;be++)ce(ne=ke[be],se=ne+de.dvalue)}return oe.sort(function(Se,Oe){return Se.min-Oe.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(_e,we){for(var Ee=new Array(we),fe=0;fe<we;fe++){var ge=(_e[0]||[])[fe],ke=(_e[1]||[])[fe];Ee[fe]=Z([ge,ke])}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[c.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[c.id2name(re)];ne._categories=A._categories,ne._categoriesMap=A._categoriesMap,j=j.concat(ne._traceIndices)}return j};var ee=I._d3locale;A.type==="date"&&(A._dateFormat=ee?ee.timeFormat:g,A._extraFormat=I._extraFormat),A._separators=I.separators,A._numFormat=ee?ee.numberFormat:y,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(v,$,te){$.exports=function(m){var g=["showexponent","showtickprefix","showticksuffix"].filter(function(b){return m[b]!==void 0});if(g.every(function(b){return m[b]===m[g[0]]})||g.length===1)return m[g[0]]}},{}],578:[function(v,$,te){var m=v("../../lib"),g=v("../../components/color").contrast,b=v("./layout_attributes"),y=v("./show_dflt"),e=v("../array_container_defaults");function n(t,i){function r(d,l){return m.coerce(t,i,b.tickformatstops,d,l)}r("enabled")&&(r("dtickrange"),r("value"))}$.exports=function(t,i,r,d,l){l||(l={});var a=y(t);if(r("showticklabels")){var u=l.font||{},f=i.color,o=(i.ticklabelposition||"").indexOf("inside")!==-1?g(l.bgColor):f&&f!==b.color.dflt?f:u.color;if(m.coerceFont(r,"tickfont",{family:u.family,size:u.size,color:o}),l.noTicklabelstep||d==="multicategory"||d==="log"||r("ticklabelstep"),l.noAng||r("tickangle"),d!=="category"){var h=r("tickformat");e(t,i,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:n}),i.tickformatstops.length||delete i.tickformatstops,l.noExp||h||d==="date"||(r("showexponent",a),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},{"../../components/color":366,"../../lib":503,"../array_container_defaults":549,"./layout_attributes":569,"./show_dflt":577}],579:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y,e,n){var t=m.coerce2(b,y,g,"ticklen"),i=m.coerce2(b,y,g,"tickwidth"),r=m.coerce2(b,y,g,"tickcolor",y.color);e("ticks",n.outerTicks||t||i||r?"outside":"")||(delete y.ticklen,delete y.tickwidth,delete y.tickcolor)}},{"../../lib":503,"./layout_attributes":569}],580:[function(v,$,te){var m=v("./clean_ticks"),g=v("../../lib").isArrayOrTypedArray;$.exports=function(b,y,e,n){function t(u){var f=b[u];return f!==void 0?f:(y._template||{})[u]}var i=t("tick0"),r=t("dtick"),d=t("tickvals"),l=e("tickmode",g(d)?"array":r?"linear":"auto");if(l==="auto")e("nticks");else if(l==="linear"){var a=y.dtick=m.dtick(r,n);y.tick0=m.tick0(i,n,y.calendar,a)}else n!=="multicategory"&&(e("tickvals")===void 0?y.tickmode="auto":e("ticktext"))}},{"../../lib":503,"./clean_ticks":560}],581:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../registry"),b=v("../../lib"),y=v("../../components/drawing"),e=v("./axes");$.exports=function(n,t,i,r){var d=n._fullLayout;if(t.length!==0){var l,a,u,f;r&&(l=r());var o=m.ease(i.easing);return n._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(f),f=null,function(){for(var s={},x=0;x<t.length;x++){var c=t[x],T=c.plotinfo.xaxis,_=c.plotinfo.yaxis;c.xr0&&(s[T._name+".range"]=c.xr0.slice()),c.yr0&&(s[_._name+".range"]=c.yr0.slice())}return g.call("relayout",n,s).then(function(){for(var w=0;w<t.length;w++)h(t[w].plotinfo)})}()}),a=Date.now(),f=window.requestAnimationFrame(function s(){u=Date.now();for(var x=Math.min(1,(u-a)/i.duration),c=o(x),T=0;T<t.length;T++)p(t[T],c);u-a>i.duration?(function(){for(var _={},w=0;w<t.length;w++){var k=t[w],L=k.plotinfo.xaxis,A=k.plotinfo.yaxis;k.xr1&&(_[L._name+".range"]=k.xr1.slice()),k.yr1&&(_[A._name+".range"]=k.yr1.slice())}l&&l(),g.call("relayout",n,_).then(function(){for(var I=0;I<t.length;I++)h(t[I].plotinfo)})}(),f=window.cancelAnimationFrame(s)):f=window.requestAnimationFrame(s)}),Promise.resolve()}function h(s){var x=s.xaxis,c=s.yaxis;d._defs.select("#"+s.clipId+"> rect").call(y.setTranslate,0,0).call(y.setScale,1,1),s.plot.call(y.setTranslate,x._offset,c._offset).call(y.setScale,1,1);var T=s.plot.selectAll(".scatterlayer .trace");
1216T.selectAll(".point").call(y.setPointGroupScale,1,1),T.selectAll(".textpoint").call(y.setTextPointsScale,1,1),T.call(y.hideOutsideRangePoints,s)}function p(s,x){var c=s.plotinfo,T=c.xaxis,_=c.yaxis,w=T._length,k=_._length,L=!!s.xr1,A=!!s.yr1,I=[];if(L){var P=b.simpleMap(s.xr0,T.r2l),S=b.simpleMap(s.xr1,T.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])*w,I[2]=w*(1-x+x*D/E),T.range[0]=T.l2r(P[0]*(1-x)+x*S[0]),T.range[1]=T.l2r(P[1]*(1-x)+x*S[1])}else I[0]=0,I[2]=w;if(A){var F=b.simpleMap(s.yr0,_.r2l),H=b.simpleMap(s.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]=T.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,T,{skipTitle:!0}),e.drawOne(n,_,{skipTitle:!0}),e.redrawComponents(n,[T._id,_._id]);var K=L?w/I[2]:1,G=A?k/I[3]:1,W=L?I[0]:0,Q=A?I[1]:0,R=L?I[0]/I[2]*w:0,N=A?I[1]/I[3]*k:0,U=T._offset-R,ee=_._offset-N;c.clipRect.call(y.setTranslate,W,Q).call(y.setScale,1/K,1/G),c.plot.call(y.setTranslate,U,ee).call(y.setScale,K,G),y.setPointGroupScale(c.zoomScalePts,1/K,1/G),y.setTextPointsScale(c.zoomScaleTxt,1/K,1/G)}e.redrawComponents(n)}},{"../../components/drawing":388,"../../lib":503,"../../registry":638,"./axes":554,"@plotly/d3":58}],582:[function(v,$,te){var m=v("../../registry").traceIs,g=v("./axis_autotype");function b(e){return{v:"x",h:"y"}[e.orientation||"v"]}function y(e,n){var t=b(e),i=m(e,"box-violin"),r=m(e._fullInput||{},"candlestick");return i&&!r&&n===t&&e[t]===void 0&&e[t+"0"]===void 0}$.exports=function(e,n,t,i){t("autotypenumbers",i.autotypenumbersDflt),t("type",(i.splomStash||{}).type)==="-"&&(function(r,d){if(r.type==="-"){var l,a=r._id,u=a.charAt(0);a.indexOf("scene")!==-1&&(a=u);var f=function(_,w,k){for(var L=0;L<_.length;L++){var A=_[L];if(A.type==="splom"&&A._length>0&&(A["_"+k+"axes"]||{})[w]||(A[k+"axis"]||k)===w&&(y(A,k)||(A[k]||[]).length||A[k+"0"]))return A}}(d,a,u);if(!!f){if(f.type==="histogram"&&u==={v:"y",h:"x"}[f.orientation||"v"])return void(r.type="linear");var o=u+"calendar",h=f[o],p={noMultiCategory:!m(f,"cartesian")||m(f,"noMultiCategory")};if(f.type==="box"&&f._hasPreCompStats&&u==={h:"x",v:"y"}[f.orientation||"v"]&&(p.noMultiCategory=!0),p.autotypenumbers=r.autotypenumbers,y(f,u)){var s=b(f),x=[];for(l=0;l<d.length;l++){var c=d[l];m(c,"box-violin")&&(c[u+"axis"]||u)===a&&(c[s]!==void 0?x.push(c[s][0]):c.name!==void 0?x.push(c.name):x.push("text"),c[o]!==h&&(h=void 0))}r.type=g(x,h,p)}else if(f.type==="splom"){var T=f.dimensions[f._axesDim[a]];T.visible&&(r.type=g(T.values,h,p))}else r.type=g(f[u]||[f[u+"0"]],h,p)}}}(n,i.data),n.type==="-"?n.type="linear":e.type=n.type)}},{"../../registry":638,"./axis_autotype":555}],583:[function(v,$,te){var m=v("../registry"),g=v("../lib");function b(t,i,r){var d,l,a,u=!1;if(i.type==="data")d=t._fullData[i.traces!==null?i.traces[0]:0];else{if(i.type!=="layout")return!1;d=t._fullLayout}return l=g.nestedProperty(d,i.prop).get(),(a=r[i.type]=r[i.type]||{}).hasOwnProperty(i.prop)&&a[i.prop]!==l&&(u=!0),a[i.prop]=l,{changed:u,value:l}}function y(t,i){var r=[],d=i[0],l={};if(typeof d=="string")l[d]=i[1];else{if(!g.isPlainObject(d))return r;l=d}return n(l,function(a,u,f){r.push({type:"layout",prop:a,value:f})},"",0),r}function e(t,i){var r,d,l,a,u=[];if(d=i[0],l=i[1],r=i[2],a={},typeof d=="string")a[d]=l;else{if(!g.isPlainObject(d))return u;a=d,r===void 0&&(r=l)}return r===void 0&&(r=null),n(a,function(f,o,h){var p,s;if(Array.isArray(h)){s=h.slice();var x=Math.min(s.length,t.data.length);r&&(x=Math.min(x,r.length)),p=[];for(var c=0;c<x;c++)p[c]=r?r[c]:c}else s=h,p=r?r.slice():null;if(p===null)Array.isArray(s)&&(s=s[0]);else if(Array.isArray(p)){if(!Array.isArray(s)){var T=s;s=[];for(var _=0;_<p.length;_++)s[_]=T}s.length=Math.min(p.length,s.length)}u.push({type:"data",prop:f,traces:p,value:s})},"",0),u}function n(t,i,r,d){Object.keys(t).forEach(function(l){var a=t[l];if(l[0]!=="_"){var u=r+(d>0?".":"")+l;g.isPlainObject(a)?n(a,i,u,d+1):i(u,l,a)}})}te.manageCommandObserver=function(t,i,r,d){var l={},a=!0;i&&i._commandObserver&&(l=i._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var u=te.hasSimpleAPICommandBindings(t,r,l.lookupTable);if(i&&i._commandObserver){if(u)return l;if(i._commandObserver.remove)return i._commandObserver.remove(),i._commandObserver=null,l}if(u){b(t,u,l.cache),l.check=function(){if(a){var h=b(t,u,l.cache);return h.changed&&d&&l.lookupTable[h.value]!==void 0&&(l.disable(),Promise.resolve(d({value:h.value,type:u.type,prop:u.prop,traces:u.traces,index:l.lookupTable[h.value]})).then(l.enable,l.enable)),h.changed}};for(var f=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],o=0;o<f.length;o++)t._internalOn(f[o],l.check);l.remove=function(){for(var h=0;h<f.length;h++)t._removeInternalListener(f[h],l.check)}}else g.log("Unable to automatically bind plot updates to API command"),l.lookupTable={},l.remove=function(){};return l.disable=function(){a=!1},l.enable=function(){a=!0}
1216,i&&(i._commandObserver=l),l},te.hasSimpleAPICommandBindings=function(t,i,r){var d,l,a=i.length;for(d=0;d<a;d++){var u,f=i[d],o=f.method,h=f.args;if(Array.isArray(h)||(h=[]),!o)return!1;var p=te.computeAPICommandBindings(t,o,h);if(p.length!==1)return!1;if(l){if((u=p[0]).type!==l.type||u.prop!==l.prop)return!1;if(Array.isArray(l.traces)){if(!Array.isArray(u.traces))return!1;u.traces.sort();for(var s=0;s<l.traces.length;s++)if(l.traces[s]!==u.traces[s])return!1}else if(u.prop!==l.prop)return!1}else l=p[0],Array.isArray(l.traces)&&l.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 l},te.executeAPICommand=function(t,i,r){if(i==="skip")return Promise.resolve();var d=m.apiMethodRegistry[i],l=[t];Array.isArray(r)||(r=[]);for(var a=0;a<r.length;a++)l.push(r[a]);return d.apply(null,l).catch(function(u){return g.warn("API call to Plotly."+i+" rejected.",u),Promise.reject(u)})},te.computeAPICommandBindings=function(t,i,r){var d;switch(Array.isArray(r)||(r=[]),i){case"restyle":d=e(t,r);break;case"relayout":d=y(t,r);break;case"update":d=e(t,[r[0],r[2]]).concat(y(t,[r[1]]));break;case"animate":d=function(l,a){return Array.isArray(a[0])&&a[0].length===1&&["string","number"].indexOf(typeof a[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:a[0][0].toString()}]:[]}(0,r);break;default:d=[]}return d}},{"../lib":503,"../registry":638}],584:[function(v,$,te){var m=v("../lib/extend").extendFlat;te.attributes=function(g,b){b=b||{};var y={valType:"info_array",editType:(g=g||{}).editType,items:[{valType:"number",min:0,max:1,editType:g.editType},{valType:"number",min:0,max:1,editType:g.editType}],dflt:[0,1]},e=(g.name&&g.name,g.trace,b.description&&b.description,{x:m({},y,{}),y:m({},y,{}),editType:g.editType});return g.noGridCell||(e.row={valType:"integer",min:0,dflt:0,editType:g.editType},e.column={valType:"integer",min:0,dflt:0,editType:g.editType}),e},te.defaults=function(g,b,y,e){var n=e&&e.x||[0,1],t=e&&e.y||[0,1],i=b.grid;if(i){var r=y("domain.column");r!==void 0&&(r<i.columns?n=i._domains.x[r]:delete g.domain.column);var d=y("domain.row");d!==void 0&&(d<i.rows?t=i._domains.y[d]:delete g.domain.row)}var l=y("domain.x",n),a=y("domain.y",t);l[0]<l[1]||(g.domain.x=n.slice()),a[0]<a[1]||(g.domain.y=t.slice())}},{"../lib/extend":493}],585:[function(v,$,te){$.exports=function(m){var g=m.editType,b=m.colorEditType;b===void 0&&(b=g);var y={family:{valType:"string",noBlank:!0,strict:!0,editType:g},size:{valType:"number",min:1,editType:g},color:{valType:"color",editType:b},editType:g};return m.autoSize&&(y.size.dflt="auto"),m.autoColor&&(y.color.dflt="auto"),m.arrayOk&&(y.family.arrayOk=!0,y.size.arrayOk=!0,y.color.arrayOk=!0),y}},{}],586:[function(v,$,te){$.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},{}],587:[function(v,$,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",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr",equirectangular:"equirectangular",fa
1216hey:"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(v,$,te){var m=v("@plotly/d3"),g=v("d3-geo"),b=g.geoPath,y=g.geoDistance,e=v("d3-geo-projection"),n=v("../../registry"),t=v("../../lib"),i=t.strTranslate,r=v("../../components/color"),d=v("../../components/drawing"),l=v("../../components/fx"),a=v("../plots"),u=v("../cartesian/axes"),f=v("../cartesian/autorange").getAutoRange,o=v("../../components/dragelement"),h=v("../cartesian/select").prepSelect,p=v("../cartesian/select").clearSelect,s=v("../cartesian/select").selectOnClick,x=v("./zoom"),c=v("./constants"),T=v("../../lib/geo_location_utils"),_=v("../../lib/topojson_utils"),w=v("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=c.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]]]}}$.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 c.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(T.fetchTraceGeoData(I)),S.push(new Promise(function(G,W){Promise.all(F).then(function(){E.topojson=PlotlyGeoAssets.topojson[E.topojsonName],E.update(I,P),G()}).catch(W)}))},L.fetchTopojson=function(){var I=this,P=_.getTopojsonPath(I.topojsonURL,I.topojsonName);return new Promise(function(S,E){m.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),a.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,G=Z._ax,W=this.projection=function(fe){var ge=fe.projection,ke=ge.type,be=c.projNames[ke];be="geo"+t.titleCase(be);for(var Se=(g[be]||e[be])(),Oe=fe._isSatellite?180*Math.acos(1/ge.distance)/Math.PI:fe._isClipped?c.lonaxisSpan[ke]/2:null,De=["center","rotate","parallels","clipExtent"],je=function(Ue){return Ue?Se:[]},Je=0;Je<De.length;Je++){var ze=De[Je];typeof Se[ze]!="function"&&(Se[ze]=je)}return Se.isLonLatOverEdges=function(Ue){if(Se(Ue)===null)return!0;if(Oe){var Ge=Se.rotate();return y(Ue,[-Ge[0],-Ge[1]])>Oe*Math.PI/180}return!1},Se.getPath=function(){return b().projection(Se)},Se.getBounds=function(Ue){return Se.getPath().bounds(Ue)},Se.precision(c.precision),fe._isSatellite&&Se.tilt(ge.tilt).distance(ge.distance),Oe&&Se.clipAngle(Oe-c.clipPad),Se}(E),Q=[[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||[],ee=Z.range||[];if(E.fitbounds){K._length=Q[1][0]-Q[0][0],G._length=Q[1][1]-Q[0][1],K.range=f(S,K),G.range=f(S,G);var j=(K.range[0]+K.range[1])/2,X=(G.range[0]+G.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=c.lonaxisSpan[J]/2||180,ne=c.lataxisSpan[J]/2||90;U=[j-re,j+re],ee=[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,ee);W.fitExtent(Q,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,G.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 _e=this.midPt=[(oe[0][0]+oe[1][0])/2,(oe[0][1]+oe[1][1])/2];if(W.translate([ce[0]+(_e[0]-ce[0]),ce[1]+(_e[1]-ce[1])]).clipExtent(oe),E._isAlbersUsa){var we=W([R.lon,R.lat]),Ee=W.translate();W.translate([Ee[0]-(we[0]-Ee[0]),Ee[1]-(we[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 Boolean(c.lineLayers[W])}function Z(W){return Boolean(c.fillLayers[W])}var K=(this.hasChoropleth?c.layersForChoropleth:c.layers).filter(function(W){return V(W)||Z(W)?P["show"+W]:!H(W)||P[W].showgrid}),G=S.framework.selectAll(".layer").data(K,String);G.exit().each(function(W){delete D[W],delete F[W],m.select(this).remove()}),G.enter().append("g").attr("class",function(W){return"layer "+W}).each(function(W){var Q=D[W]=m.select(this);W==="bg"?S.bgRect=Q.append("rect").style("pointer-events","all"):H(W)?F[W]=Q.append("path").style("fill","none"):W==="backplot"?Q.append("g").classed("choroplethlayer",!0):W==="frontplot"?Q.append("g").classed("scatterlayer",!0):V(W)?F[W]=Q.append("path").style("fill","none").style("stroke-miterlimit",2):Z(W)&&(F[W]=Q.append("path").style("stroke","none"))}),G.order(),G.each(function(W){var Q=F[W],R=c.layerNameToAdjective[W];W==="frame"?Q.datum(c.sphereSVG):V(W)||Z(W)?Q.datum(w(E,E.objects[W])):H(W)&&Q.datum(function(N,U,ee){var j,X,J,re=U[N],ne=c.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,ee);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,_e=ce[de]=[],we=X[0];we<X[1]+2.5;we+=2.5)_e.push(J(xe,we));return{type:"MultiLineString",coordinates:ce}}
1216(W,P,I)).call(r.stroke,P[W].gridcolor).call(d.dashLine,"",P[W].gridwidth),V(W)?Q.call(r.stroke,P[R+"color"]).call(d.dashLine,"",P[R+"width"]):Z(W)&&Q.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(G,W){(G.range={})[S.id]=[K([W.xmin,W.ymin]),K([W.xmax,W.ymax])]}:F==="lasso"&&(V=function(G,W,Q){(G.lassoPoints={})[S.id]=Q.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(G){G===2&&p(E)}};F==="pan"?(D.node().onmousedown=null,D.call(x(S,P)),D.on("dblclick.zoom",function(){var G=S.viewInitial,W={};for(var Q in G)W[S.id+"."+Q]=G[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(G,W,Q){h(G,W,Q,Z,F)},o.init(Z)),D.on("mousemove",function(){var G=S.projection.invert(t.getPositionFromD3Event());if(!G)return o.unhover(E,m.event);S.xaxis.p2c=function(){return G[0]},S.yaxis.p2c=function(){return G[1]},l.hover(E,m.event,S.id)}),D.on("mouseout",function(){E._dragging||o.unhover(E,m.event)}),D.on("click",function(){F!=="select"&&F!=="lasso"&&(H.indexOf("select")>-1&&s(m.event,E,[S.xaxis],[S.yaxis],S.id,Z),H.indexOf("event")>-1&&l.click(E,m.event))})}function K(G){return S.projection.invert([G[0]+S.xaxis._offset,G[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=m.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?i(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,"topojson-client":315}],589:[function(v,$,te){var m=v("../../plots/get_data").getSubplotCalcData,g=v("../../lib").counterRegex,b=v("./geo"),y="geo",e=g(y),n={};n.geo={valType:"subplotid",dflt:y,editType:"calc"},$.exports={attr:y,name:y,idRoot:y,idRegex:e,attrRegex:e,attributes:n,layoutAttributes:v("./layout_attributes"),supplyLayoutDefaults:v("./layout_defaults"),plot:function(t){for(var i=t._fullLayout,r=t.calcdata,d=i._subplots.geo,l=0;l<d.length;l++){var a=d[l],u=m(r,y,a),f=i[a]._subplot;f||(f=b({id:a,graphDiv:t,container:i._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),i[a]._subplot=f),f.plot(u,i,t._promises)}},updateFx:function(t){for(var i=t._fullLayout,r=i._subplots.geo,d=0;d<r.length;d++){var l=i[r[d]];l._subplot.updateFx(i,l)}},clean:function(t,i,r,d){for(var l=d._subplots.geo||[],a=0;a<l.length;a++){var u=l[a],f=d[u]._subplot;!i[u]&&f&&(f.framework.remove(),f.clipDef.remove())}}}},{"../../lib":503,"../../plots/get_data":593,"./geo":588,"./layout_attributes":590,"./layout_defaults":591}],590:[function(v,$,te){var m=v("../../components/color/attributes"),g=v("../domain").attributes,b=v("./constants"),y=v("../../plot_api/edit_types").overrideAll,e=v("../../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:m.lightLine},gridwidth:{valType:"number",min:0,dflt:1}};($.exports=y({domain:g({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:m.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:m.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:m.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:m.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:m.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(v,$,te){var m=v("../../lib"),g=v("../subplot_defaults"),b=v("../get_data").getSubplotData,y=v("./constants"),e=v("./layout_attributes"),n=y.axesNames;function t(i,r,d,l){var a=b(l.fullData,"geo",l.id).map(function(N){return N._expandedIndex}),u=d("resolution"),f=d("scope"),o=y.scopeDefaults[f],h=d("projection.type",o.projType),p=r._isAlbersUsa=h==="albers usa";p&&(f=r.scope="usa");var s=r._isScoped=f!=="world",x=r._isSatellite=h==="satellite",c=r._isConic=h.indexOf("conic")!==-1||h==="albers",T=r._isClipped=!!y.lonaxisSpan[h];if(i.visible===!1){var _=m.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 w=d("visible"),k=0;k<n.length;k++){var L,A=n[k],I=[30,10][k];if(s)L=o[A+"Range"];else{var P=y[A+"Span"],S=(P[h]||P["*"])/2,E=d("projection.rotation."+A.substr(0,3),o.projRotate[k]);L=[E-S,E+S]}var D=d(A+".range",L);d(A+".tick0"),d(A+".dtick",I),d(A+".showgrid",!!w&&void 0)&&(d(A+".gridcolor"),d(A+".gridwidth")),r[A]._ax={type:"linear",_id:A.slice(0,3),_traceIndices:a,setScale:m.identity,c2l:m.identity,r2l:m.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,G,W,Q=(V+Z)/2;if(!p){var R=s?o.projRotate:[Q,0,0];K=d("projection.rotation.lon",R[0]),d("projection.rotation.lat",R[1]),d("projection.rotation.roll",R[2]),d("showcoastlines",!s&&w)&&(d("coastlinecolor"),d("coastlinewidth")),d("showocean",!!w&&void 0)&&d("oceancolor")}p?(G=-96.6,W=38.7):(G=s?Q:K,W=(H[0]+H[1])/2),d("center.lon",G),d("center.lat",W),x&&(d("projection.tilt"),d("projection.distance")),c&&d("projection.parallels",o.projParallels||[0,60]),d("projection.scale"),d("showland",!!w&&void 0)&&d("landcolor"),d("showlakes",!!w&&void 0)&&d("lakecolor"),d("showrivers",!!w&&void 0)&&(d("rivercolor"),d("riverwidth")),d("showcountries",s&&f!=="usa"&&w)&&(d("countrycolor"),d("countrywidth")),(f==="usa"||f==="north america"&&u===50)&&(d("showsubunits",w),d("subunitcolor"),d("subunitwidth")),s||d("showframe",w)&&(d("framecolor"),d("framewidth")),d("bgcolor"),d("fitbounds")&&(delete r.projection.scale,s?(delete r.center.lon,delete r.center.lat):T?(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))}$.exports=function(i,r,d){g(i,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(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../registry"),y=Math.PI/180,e=180/Math.PI,n={cursor:"pointer"},t={cursor:"auto"};function i(w,k){return m.behavior.zoom().translate(k.translate()).scale(k.scale())}function r(w,k,L){var A=w.id,I=w.graphDiv,P=I.layout,S=P[A],E=I._fullLayout,D=E[A],F={},H={};function V(Z,K){F[A+"."+Z]=g.nestedProperty(S,Z).get(),b.call("_storeDirectGUIEdit",P,E._preGUI,F);var G=g.nestedProperty(D,Z);G.get()!==K&&(G.set(K),g.nestedProperty(S,Z).set(K),H[A+"."+Z]=K)}L(V),V("projection.scale",k.scale()/w.fitScale),V("fitbounds",!1),I.emit("plotly_relayout",H)}function d(w,k){var L=i(0,k);function A(I){var P=k.invert(w.midPt);I("center.lon",P[0]),I("center.lat",P[1])}return L.on("zoomstart",function(){m.select(this).style(n)}).on("zoom",function(){k.scale(m.event.scale).translate(m.event.translate),w.render();var I=k.invert(w.midPt);w.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":k.scale()/w.fitScale,"geo.center.lon":I[0],"geo.center.lat":I[1]})}).on("zoomend",function(){m.select(this).style(t),r(w,k,A)}),L}function l(w,k){var L,A,I,P,S,E,D,F,H,V=i(0,k);function Z(G){return k.invert(G)}function K(G){var W=k.rotate(),Q=k.invert(w.midPt);G("projection.rotation.lon",-W[0]),G("center.lon",Q[0]),G("center.lat",Q[1])}return V.on("zoomstart",function(){m.select(this).style(n),L=m.mouse(this),A=k.rotate(),I=k.translate(),P=A,S=Z(L)}).on("zoom",function(){if(E=m.mouse(this),function(Q){var R=Z(Q);if(!R)return!0;var N=k(R);return Math.abs(N[0]-Q[0])>2||Math.abs(N[1]-Q[1])>2}(L))return V.scale(k.scale()),void V.translate(k.translate());k.scale(m.event.scale),k.translate([I[0],m.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,w.render();var G=k.rotate(),W=k.invert(w.midPt);w.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":k.scale()/w.fitScale,"geo.center.lon":W[0],"geo.center.lat":W[1],"geo.projection.rotation.lon":-G[0]})}).on("zoomend",function(){m.select(this).style(t),H&&r(w,k,K)}),V}function a(w,k){var L,A={r:k.rotate(),k:k.scale()},I=i(0,k),P=function(Z){for(var K=0,G=arguments.length,W=[];++K<G;)W.push(arguments[K]);var Q=m.dispatch.apply(null,W);return Q.of=function(R,N){return function(U){var ee;try{ee=U.sourceEvent=m.event,U.target=Z,m.event=U,Q[U.type].apply(R,N)}finally{m.event=ee}}},Q}(I,"zoomstart","zoom","zoomend"),S=0,E=I.on;function D(Z){S++||Z({type:"zoomstart"})}function F(Z){Z({type:"zoom"})}function H(Z){--S||Z({type:"zoomend"})}function V(Z){var K=k.rotate();Z("projection.rotation.lon",-K[0]),Z("projection.rotation.lat",-K[1])}return I.on("zoomstart",function(){m.select(this).style(n);var Z=m.mouse(this),K=k.rotate(),G=K,W=k.translate(),Q=f(K);L=u(k,Z),E.call(I,"zoom",function(){var R=m.mouse(this);
1216if(k.scale(A.k=m.event.scale),L){if(u(k,R)){k.rotate(K).translate(W);var N=u(k,R),U=h(L,N),ee=T(o(Q,U)),j=A.r=p(ee,L,G);isFinite(j[0])&&isFinite(j[1])&&isFinite(j[2])||(j=G),k.rotate(j),G=j}}else L=u(k,Z=R);F(P.of(this,arguments))}),D(P.of(this,arguments))}).on("zoomend",function(){m.select(this).style(t),E.call(I,"zoom",null),H(P.of(this,arguments)),r(w,k,V)}).on("zoom.redraw",function(){w.render();var Z=k.rotate();w.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":k.scale()/w.fitScale,"geo.projection.rotation.lon":-Z[0],"geo.projection.rotation.lat":-Z[1]})}),m.rebind(I,P,"on")}function u(w,k){var L=w.invert(k);return L&&isFinite(L[0])&&isFinite(L[1])&&function(A){var I=A[0]*y,P=A[1]*y,S=Math.cos(P);return[S*Math.cos(I),S*Math.sin(I),Math.sin(P)]}(L)}function f(w){var k=.5*w[0]*y,L=.5*w[1]*y,A=.5*w[2]*y,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 o(w,k){var L=w[0],A=w[1],I=w[2],P=w[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(w,k){if(w&&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]]}(w,k),A=Math.sqrt(_(L,L)),I=.5*Math.acos(Math.max(-1,Math.min(1,_(w,k)))),P=Math.sin(I)/A;return A&&[Math.cos(I),L[2]*P,-L[1]*P,L[0]*P]}}function p(w,k,L){var A=c(k,2,w[0]);A=c(A,1,w[1]),A=c(A,0,w[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 G=180-P-2*Z,W=(Math.atan2(V,F)-Math.atan2(D,I))*e,Q=(Math.atan2(V,F)-Math.atan2(D,-I))*e;return s(L[0],L[1],P,W)<=s(L[0],L[1],G,Q)?[P,W,L[2]]:[G,Q,L[2]]}function s(w,k,L,A){var I=x(L-w),P=x(A-k);return Math.sqrt(I*I+P*P)}function x(w){return(w%360+540)%360-180}function c(w,k,L){var A=L*y,I=w.slice(),P=k===0?1:0,S=k===2?1:2,E=Math.cos(A),D=Math.sin(A);return I[P]=w[P]*E-w[S]*D,I[S]=w[S]*E+w[P]*D,I}function T(w){return[Math.atan2(2*(w[0]*w[1]+w[2]*w[3]),1-2*(w[1]*w[1]+w[2]*w[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(w[0]*w[2]-w[3]*w[1]))))*e,Math.atan2(2*(w[0]*w[3]+w[1]*w[2]),1-2*(w[2]*w[2]+w[3]*w[3]))*e]}function _(w,k){for(var L=0,A=0,I=w.length;A<I;++A)L+=w[A]*k[A];return L}$.exports=function(w,k){var L=w.projection;return(k._isScoped?d:k._isClipped?a:l)(w,L)}},{"../../lib":503,"../../registry":638,"@plotly/d3":58}],593:[function(v,$,te){var m=v("../registry"),g=v("./cartesian/constants").SUBPLOT_PATTERN;te.getSubplotCalcData=function(b,y,e){var n=m.subplotsRegistry[y];if(!n)return[];for(var t=n.attr,i=[],r=0;r<b.length;r++){var d=b[r];d[0].trace[t]===e&&i.push(d)}return i},te.getModuleCalcData=function(b,y){var e,n=[],t=[];if(!(e=typeof y=="string"?m.getModule(y).plot:typeof y=="function"?y:y.plot))return[n,b];for(var i=0;i<b.length;i++){var r=b[i],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,y,e){if(!m.subplotsRegistry[y])return[];var n,t,i,r=m.subplotsRegistry[y].attr,d=[];if(y==="gl2d"){var l=e.match(g);t="x"+l[1],i="y"+l[2]}for(var a=0;a<b.length;a++)n=b[a],y==="gl2d"&&m.traceIs(n,"gl2d")?n[r[0]]===t&&n[r[1]]===i&&d.push(n):n[r]===e&&d.push(n);return d}},{"../registry":638,"./cartesian/constants":561}
1216],594:[function(v,$,te){var m=v("mouse-change"),g=v("mouse-wheel"),b=v("mouse-event-offset"),y=v("../cartesian/constants"),e=v("has-passive-events");function n(t,i){this.element=t,this.plot=i,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]}$.exports=function(t){var i=t.mouseContainer,r=t.glplot,d=new n(i,r);function l(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function a(u,f,o){var h,p,s=t.calcDataBox(),x=r.viewBox,c=d.lastPos[0],T=d.lastPos[1],_=y.MINDRAG*r.pixelRatio,w=y.MINZOOM*r.pixelRatio;function k(E,D,F){var H=Math.min(D,F),V=Math.max(D,F);H!==V?(s[E]=H,s[E+2]=V,d.dataBox=s,t.setRanges(s)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(f*=r.pixelRatio,o*=r.pixelRatio,o=x[3]-x[1]-o,t.fullLayout.dragmode){case"zoom":if(u){var L=f/(x[2]-x[0])*(s[2]-s[0])+s[0],A=o/(x[3]-x[1])*(s[3]-s[1])+s[1];d.boxInited||(d.boxStart[0]=L,d.boxStart[1]=A,d.dragStart[0]=f,d.dragStart[1]=o),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)<w,P=Math.abs(d.dragStart[1]-o)<w;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=(s[3]-s[1])/(s[2]-s[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]<s[1]?(d.boxEnd[1]=s[1],d.boxEnd[0]=d.boxStart[0]+(s[1]-d.boxStart[1])/Math.abs(S)):d.boxEnd[1]>s[3]&&(d.boxEnd[1]=s[3],d.boxEnd[0]=d.boxStart[0]+(s[3]-d.boxStart[1])/Math.abs(S))):(d.boxEnd[0]=d.boxStart[0]+Math.abs(p)/S*(h>=0?1:-1),d.boxEnd[0]<s[0]?(d.boxEnd[0]=s[0],d.boxEnd[1]=d.boxStart[1]+(s[0]-d.boxStart[0])*Math.abs(S)):d.boxEnd[0]>s[2]&&(d.boxEnd[0]=s[2],d.boxEnd[1]=d.boxStart[1]+(s[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]=o),Math.abs(d.dragStart[0]-f)<_&&(f=d.dragStart[0]),Math.abs(d.dragStart[1]-o)<_&&(o=d.dragStart[1]),h=(c-f)*(s[2]-s[0])/(r.viewBox[2]-r.viewBox[0]),p=(T-o)*(s[3]-s[1])/(r.viewBox[3]-r.viewBox[1]),s[0]+=h,s[2]+=h,s[1]+=p,s[3]+=p,t.setRanges(s),d.panning=!0,d.lastInputTime=Date.now(),l(),t.cameraChanged(),t.handleAnnotations()):d.panning&&(d.panning=!1,t.relayoutCallback())}d.lastPos[0]=f,d.lastPos[1]=o}return d.mouseListener=m(i,a),i.addEventListener("touchstart",function(u){var f=b(u.changedTouches[0],i);a(0,f[0],f[1]),a(1,f[0],f[1]),u.preventDefault()},!!e&&{passive:!1}),i.addEventListener("touchmove",function(u){u.preventDefault();var f=b(u.changedTouches[0],i);a(1,f[0],f[1]),u.preventDefault()},!!e&&{passive:!1}),i.addEventListener("touchend",function(u){a(0,d.lastPos[0],d.lastPos[1]),u.preventDefault()},!!e&&{passive:!1}),d.wheelListener=g(i,function(u,f){if(!t.scrollZoom)return!1;var o=t.calcDataBox(),h=r.viewBox,p=d.lastPos[0],s=d.lastPos[1],x=Math.exp(5*f/(h[3]-h[1])),c=p/(h[2]-h[0])*(o[2]-o[0])+o[0],T=s/(h[3]-h[1])*(o[3]-o[1])+o[1];return o[0]=(o[0]-c)*x+c,o[2]=(o[2]-c)*x+c,o[1]=(o[1]-T)*x+T,o[3]=(o[3]-T)*x+T,t.setRanges(o),d.lastInputTime=Date.now(),l(),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(v,$,te){var m=v("../cartesian/axes"),g=v("../../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 y=b.prototype,e=["xaxis","yaxis"];y.merge=function(n){var t,i,r,d,l,a,u,f,o,h,p;for(this.titleEnable=!1,this.backgroundColor=g(n.plot_bgcolor),h=0;h<2;++h){var s=(t=e[h]).charAt(0);for(r=(i=n[this.scene[t]._name]).title.text===this.scene.fullLayout._dfltTitle[s]?"":i.title.text,p=0;p<=2;p+=2)this.labelEnable[h+p]=!1,this.labels[h+p]=r,this.labelColor[h+p]=g(i.title.font.color),this.labelFont[h+p]=i.title.font.family,this.labelSize[h+p]=i.title.font.size,this.labelPad[h+p]=this.getLabelPad(t,i),this.tickEnable[h+p]=!1,this.tickColor[h+p]=g((i.tickfont||{}).color),this.tickAngle[h+p]=i.tickangle==="auto"?0:Math.PI*-i.tickangle/180,this.tickPad[h+p]=this.getTickPad(i),this.tickMarkLength[h+p]=0,this.tickMarkWidth[h+p]=i.tickwidth||0,this.tickMarkColor[h+p]=g(i.tickcolor),this.borderLineEnable[h+p]=!1,this.borderLineColor[h+p]=g(i.linecolor),this.borderLineWidth[h+p]=i.linewidth||0;u=this.hasSharedAxis(i),l=this.hasAxisInDfltPos(t,i)&&!u,a=this.hasAxisInAltrPos(t,i)&&!u,d=i.mirror||!1,f=u?String(d).indexOf("all")!==-1:!!d,o=u?d==="allticks":String(d).indexOf("ticks")!==-1,l?this.labelEnable[h]=!0:a&&(this.labelEnable[h+2]=!0),l?this.tickEnable[h]=i.showticklabels:a&&(this.tickEnable[h+2]=i.showticklabels),(l||f)&&(this.borderLineEnable[h]=i.showline),(a||f)&&(this.borderLineEnable[h+2]=i.showline),(l||o)&&(this.tickMarkLength[h]=this.getTickMarkLength(i)),(a||o)&&(this.tickMarkLength[h+2]=this.getTickMarkLength(i)),this.gridLineEnable[h]=i.showgrid,this.gridLineColor[h]=g(i.gridcolor),this.gridLineWidth[h]=i.gridwidth,this.zeroLineEnable[h]=i.zeroline,this.zeroLineColor[h]=g(i.zerolinecolor),this.zeroLineWidth[h]=i.zerolinewidth}},y.hasSharedAxis=function(n){var t=this.scene,i=t.fullLayout._subplots.gl2d;return m.findSubplotsWithAxis(i,n).indexOf(t.id)!==0},y.hasAxisInDfltPos=function(n,t){var i=t.side;return n==="xaxis"?i==="bottom":n==="yaxis"?i==="left":void 0},y.hasAxisInAltrPos=function(n,t){var i=t.side;return n==="xaxis"?i==="top":n==="yaxis"?i==="right":void 0},y.getLabelPad=function(n,t){var i=t.title.font.size,r=t.showticklabels;return n==="xaxis"?t.side==="top"?i*(1.5+(r?1:0))-10:i*(1.5+(r?.5:0))-10:n==="yaxis"?t.side==="right"?10+i*(1.5+(r?1:.5)):10+i*(1.5+(r?.5:0)):void 0},y.getTickPad=function(n){return n.ticks==="outside"?10+n.ticklen:15},y.getTickMarkLength=function(n){if(!n.ticks)return 0;var t=n.ticklen;return n.ticks==="inside"?-t:t},$.exports=function(n){return new b(n)}},{"../../lib/str2rgbarray":528,"../cartesian/axes":554}],596:[function(v,$,te){var m=v("../../plot_api/edit_types").overrideAll,g=v("./scene2d"),b=v("../layout_attributes"),y=v("../../constants/xmlns_namespaces"),e=v("../cartesian/constants"),n=v("../cartesian"),t=v("../../components/fx/layout_attributes"),i=v("../get_data").getSubplotData;te.name="gl2d",te.attr=["xaxis","yaxis"],te.idRoot=["x","y"],te.idRegex=e.idRegex,te.attrRegex=e.attrRegex,te.attributes=v("../cartesian/attributes"),te.supplyLayoutDefaults=function(r,d,l){d._has("cartesian")||n.supplyLayoutDefaults(r,d,l)},te.layoutAttrOverrides=m(n.layoutAttributes,"plot","from-root"),te.baseLayoutAttrOverrides=m({plot_bgcolor:b.plot_bgcolor,hoverlabel:t.hoverlabel},"plot","nested"),te.plot=function(r){for(var d=r._fullLayout,l=r._fullData,a=d._subplots.gl2d,u=0;u<a.length;u++){var f=a[u],o=d._plots[f],h=i(l,"gl2d",f),p=o._scene2d;p===void 0&&(p=new g({id:f,graphDiv:r,container:r.querySelector(".gl-container"),staticPlot:r._context.staticPlot,plotGlPixelRatio:r._context.plotGlPixelRatio},d),o._scene2d=p),p.plot(h,r.calcdata,d,r.layout)}},te.clean=function(r,d,l,a){for(var u=a._subplots.gl2d||[],f=0;f<u.length;f++){var o=u[f],h=a._plots[o];if(h._scene2d){var p=i(r,"gl2d",o);p.length===0&&(h._scene2d.destroy(),delete a._plots[o])}}n.clean.apply(this,arguments)},te.drawFramework=function(r){r._context.staticPlot||n.drawFramework(r)},te.toSVG=function(r){for(var d=r._fullLayout,l=d._subplots.gl2d,a=0;a<l.length;a++){var u=d._plots[l[a]]._scene2d,f=u.toImage("png");d._glimages.append("svg:image").attr({xmlns:y.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,l=d._subplots.gl2d,a=0;a<l.length;a++)d._plots[l[a]]._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(v,$,te){var m,g,b=v("../../registry"),y=v("../../plots/cartesian/axes"),e=v("../../components/fx"),n=v("../../../stackgl_modules").gl_plot2d,t=v("../../../stackgl_modules").gl_spikes2d,i=v("../../../stackgl_modules").gl_select_box,r=v("webgl-context"),d=v("./convert"),l=v("./camera"),a=v("../../lib/show_no_webgl_msg"),u=v("../cartesian/constraints"),f=u.enforce,o=u.clean,h=v("../cartesian/autorange").doAutoRange,p=v("../../components/dragelement/helpers"),s=p.drawMode,x=p.selectMode,c=["xaxis","yaxis"],T=v("../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=l(this),this.traces={},this.spikes=t(this.glplot),this.selectBox=i(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())}$.exports=_;var w=_.prototype;w.makeFramework=function(){if(this.staticPlot){if(!(g||(m=document.createElement("canvas"),g=r({canvas:m,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error("Error creating static canvas/context for image server");this.canvas=m,this.gl=g}else{var k=this.container.querySelector(".gl-canvas-focus"),L=r({canvas:k,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!L)return a(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})},w.toImage=function(k){k||(k="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(m),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"),G=K.createImageData(A,I);switch(G.data.set(P),K.putImageData(G,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(m),Z},w.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},w.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var k=[y.calcTicks(this.xaxis),y.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},w.updateRefs=function(k){this.fullLayout=k;var L=this.id.match(T),A="xaxis"+L[1],I="yaxis"+L[2];this.xaxis=this.fullLayout[A],this.yaxis=this.fullLayout[I]},w.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)},w.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())},w.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)}},w.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}},w.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}};o(D,this.xaxis),o(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[c[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()},w.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])]},w.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])]},w.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})},w.updateFx=function(k){x(k)||s(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},w.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]})},w.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,G=(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(G&&I&&this.emitPointAction(G,"plotly_click"),S&&S.object._trace.hoverinfo!=="skip"&&P.hovermode&&G&&(!this.lastPickResult||this.lastPickResult.traceUid!==G.trace.uid||this.lastPickResult.dataCoord[0]!==G.dataCoord[0]||this.lastPickResult.dataCoord[1]!==G.dataCoord[1])){var W=G;this.lastPickResult={traceUid:G.trace?G.trace.uid:null,dataCoord:G.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(G,"plotly_hover");var Q=this.fullData[W.trace.index]||{},R=W.pointIndex,N=e.castHoverinfo(Q,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(Q,R,"bgcolor")||W.color,borderColor:e.castHoverOption(Q,R,"bordercolor"),fontFamily:e.castHoverOption(Q,R,"font.family"),fontSize:e.castHoverOption(Q,R,"font.size"),fontColor:e.castHoverOption(Q,R,"font.color"),nameLength:e.castHoverOption(Q,R,"namelength"),textAlign:e.castHoverOption(Q,R,"align")},{container:this.svgContainer,gd:this.graphDiv})}}S||this.unhover(),k.draw()}},w.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),e.loneUnhover(this.svgContainer))}
1216,w.hoverFormatter=function(k,L){if(L!==void 0){var A=this[k];return y.tickText(A,A.c2l(L),"hover").text}}},{"../../../stackgl_modules":1124,"../../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(v,$,te){var m=v("../../plot_api/edit_types").overrideAll,g=v("../../components/fx/layout_attributes"),b=v("./scene"),y=v("../get_data").getSubplotData,e=v("../../lib"),n=v("../../constants/xmlns_namespaces");te.name="gl3d",te.attr="scene",te.idRoot="scene",te.idRegex=te.attrRegex=e.counterRegex("scene"),te.attributes=v("./layout/attributes"),te.layoutAttributes=v("./layout/layout_attributes"),te.baseLayoutAttrOverrides=m({hoverlabel:g.hoverlabel},"plot","nested"),te.supplyLayoutDefaults=v("./layout/defaults"),te.plot=function(t){for(var i=t._fullLayout,r=t._fullData,d=i._subplots.gl3d,l=0;l<d.length;l++){var a=d[l],u=y(r,"gl3d",a),f=i[a],o=f.camera,h=f._scene;h||(h=new b({id:a,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:o},i),f._scene=h),h.viewInitial||(h.viewInitial={up:{x:o.up.x,y:o.up.y,z:o.up.z},eye:{x:o.eye.x,y:o.eye.y,z:o.eye.z},center:{x:o.center.x,y:o.center.y,z:o.center.z}}),h.plot(u,i,t.layout)}},te.clean=function(t,i,r,d){for(var l=d._subplots.gl3d||[],a=0;a<l.length;a++){var u=l[a];!i[u]&&d[u]._scene&&(d[u]._scene.destroy(),d._infolayer&&d._infolayer.selectAll(".annotation-"+u).remove())}},te.toSVG=function(t){for(var i=t._fullLayout,r=i._subplots.gl3d,d=i._size,l=0;l<r.length;l++){var a=i[r[l]],u=a.domain,f=a._scene,o=f.toImage("png");i._glimages.append("svg:image").attr({xmlns:n.svg,"xlink:href":o,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 i=t.substr(5);return i==="1"&&(i=""),"scene"+i}},te.updateFx=function(t){for(var i=t._fullLayout,r=i._subplots.gl3d,d=0;d<r.length;d++)i[r[d]]._scene.updateFx(i.dragmode,i.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(v,$,te){$.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},{}],600:[function(v,$,te){var m=v("../../../components/color"),g=v("../../cartesian/layout_attributes"),b=v("../../../lib/extend").extendFlat,y=v("../../../plot_api/edit_types").overrideAll;$.exports=y({visible:g.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:m.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:g.color,categoryorder:g.categoryorder,categoryarray:g.categoryarray,title:{text:g.title.text,font:g.title.font},type:b({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorange:g.autorange,rangemode:g.rangemode,range:b({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:g.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,mirror:g.mirror,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,showticklabels:g.showticklabels,tickfont:g.tickfont,tickangle:g.tickangle,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickformat:g.tickformat,tickformatstops:g.tickformatstops,hoverformat:g.hoverformat,showline:g.showline,linecolor:g.linecolor,linewidth:g.linewidth,showgrid:g.showgrid,gridcolor:b({},g.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:g.gridwidth,zeroline:g.zeroline,zerolinecolor:g.zerolinecolor,zerolinewidth:g.zerolinewidth,_deprecated:{title:g._deprecated.title,titlefont:g._deprecated.titlefont}},"plot","from-root")},{"../../../components/color":366,"../../../lib/extend":493,"../../../plot_api/edit_types":536,"../../cartesian/layout_attributes":569}],601:[function(v,$,te){var m=v("tinycolor2").mix,g=v("../../../lib"),b=v("../../../plot_api/plot_template"),y=v("./axis_attributes"),e=v("../../cartesian/type_defaults"),n=v("../../cartesian/axis_defaults"),t=["xaxis","yaxis","zaxis"];$.exports=function(i,r,d){var l,a;function u(h,p){return g.coerce(l,a,y,h,p)}for(var f=0;f<t.length;f++){var o=t[f];l=i[o]||{},(a=b.newContainer(r,o))._id=o[0]+d.scene,a._name=o,e(l,a,u,d),n(l,a,u,{font:d.font,letter:o[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",m(a.color,d.bgColor,13600/187).toRgbString()),u("title.text",o[0]),a.setScale=g.noop,u("showspikes")&&(u("spikesides"),u("spikethickness"),u("spikecolor",a.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(v,$,te){var m=v("../../../lib/str2rgbarray"),g=v("../../../lib"),b=["xaxis","yaxis","zaxis"];function y(){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()}y.prototype.merge=function(e,n){for(var t=0;t<3;++t){var i=n[b[t]];i.visible?(this.labels[t]=e._meta?g.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(this.labelColor[t]=m(i.title.font.color)),i.title.font.family&&(this.labelFont[t]=i.title.font.family),i.title.font.size&&(this.labelSize[t]=i.title.font.size)),"showline"in i&&(this.lineEnable[t]=i.showline),"linecolor"in i&&(this.lineColor[t]=m(i.linecolor)),"linewidth"in i&&(this.lineWidth[t]=i.linewidth),"showgrid"in i&&(this.gridEnable[t]=i.showgrid),"gridcolor"in i&&(this.gridColor[t]=m(i.gridcolor)),"gridwidth"in i&&(this.gridWidth[t]=i.gridwidth),i.type==="log"?this.zeroEnable[t]=!1:"zeroline"in i&&(this.zeroEnable[t]=i.zeroline),"zerolinecolor"in i&&(this.zeroLineColor[t]=m(i.zerolinecolor)),"zerolinewidth"in i&&(this.zeroLineWidth[t]=i.zerolinewidth),"ticks"in i&&i.ticks?this.lineTickEnable[t]=!0:this.lineTickEnable[t]=!1,"ticklen"in i&&(this.lineTickLength[t]=this._defaultLineTickLength[t]=i.ticklen),"tickcolor"in i&&(this.lineTickColor[t]=m(i.tickcolor)),"tickwidth"in i&&(this.lineTickWidth[t]=i.tickwidth),"tickangle"in i&&(this.tickAngle[t]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(this.tickEnable[t]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(this.tickColor[t]=m(i.tickfont.color)),i.tickfont.family&&(this.tickFont[t]=i.tickfont.family),i.tickfont.size&&(this.tickSize[t]=i.tickfont.size)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(this.lineTickMirror[t]=!0,this.lineMirror[t]=!0):i.mirror===!0?(this.lineTickMirror[t]=!1,this.lineMirror[t]=!0):(this.lineTickMirror[t]=!1,this.lineMirror[t]=!1):this.lineMirror[t]=!1,"showbackground"in i&&i.showbackground!==!1?(this.backgroundEnable[t]=!0,this.backgroundColor[t]=m(i.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)}},$.exports=function(e,n){var t=new y;return t.merge(e,n),t}},{"../../../lib":503,"../../../lib/str2rgbarray":528}],603:[function(v,$,te){var m=v("../../../lib"),g=v("../../../components/color"),b=v("../../../registry"),y=v("../../subplot_defaults"),e=v("./axis_defaults"),n=v("./layout_attributes"),t=v("../../get_data").getSubplotData;function i(r,d,l,a){for(var u=l("bgcolor"),f=g.combine(u,a.paper_bgcolor),o=["up","center","eye"],h=0;h<o.length;h++)l("camera."+o[h]+".x"),l("camera."+o[h]+".y"),l("camera."+o[h]+".z");l("camera.projection.type");var p=!!l("aspectratio.x")&&!!l("aspectratio.y")&&!!l("aspectratio.z"),s=l("aspectmode",p?"manual":"auto");p||(r.aspectratio=d.aspectratio={x:1,y:1,z:1},s==="manual"&&(d.aspectmode="auto"),r.aspectmode=d.aspectmode);var x=t(a.fullData,"gl3d",a.id);e(r,d,{font:a.font,scene:a.id,data:x,bgColor:f,calendar:a.calendar,autotypenumbersDflt:a.autotypenumbersDflt,fullLayout:a.fullLayout}),b.getComponentMethod("annotations3d","handleDefaults")(r,d,a);var c=a.getDfltFromLayout("dragmode");if(c!==!1&&!c)if(c="orbit",r.camera&&r.camera.up){var T=r.camera.up.x,_=r.camera.up.y,w=r.camera.up.z;w!==0&&(T&&_&&w?w/Math.sqrt(T*T+_*_+w*w)>.999&&(c="turntable"):c="turntable")}else c="turntable";l("dragmode",c),l("hovermode",a.getDfltFromLayout("hovermode"))}$.exports=function(r,d,l){var a=d._basePlotModules.length>1;y(r,d,l,{type:"gl3d",attributes:n,handleDefaults:i,fullLayout:d,font:d.font,fullData:l,getDfltFromLayout:function(u){if(!a)return m.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(v,$,te){var m=v("./axis_attributes"),g=v("../../domain").attributes,b=v("../../../lib/extend").extendFlat,y=v("../../../lib").counterRegex;function e(n,t,i){return{x:{valType:"number",dflt:n,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:i,editType:"camera"},editType:"camera"}}$.exports={_arrayAttrRegexps:[y("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:g({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:m,yaxis:m,zaxis:m,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(v,$,te){var m=v("../../../lib/str2rgbarray"),g=["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(y){for(var e=0;e<3;++e){var n=y[g[e]];n.visible?(this.enabled[e]=n.showspikes,this.colors[e]=m(n.spikecolor),this.drawSides[e]=n.spikesides,this.lineWidth[e]=n.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},$.exports=function(y){var e=new b;return e.merge(y),e}},{"../../../lib/str2rgbarray":528}],606:[function(v,$,te){$.exports=function(e){for(var n=e.axesOptions,t=e.glplot.axesPixels,i=e.fullSceneLayout,r=[[],[],[]],d=0;d<3;++d){var l=i[b[d]];if(l._length=(t[d].hi-t[d].lo)*t[d].pixelsPerDataUnit/e.dataScale[d],Math.abs(l._length)===1/0||isNaN(l._length))r[d]=[];else{l._input_range=l.range.slice(),l.range[0]=t[d].lo/e.dataScale[d],l.range[1]=t[d].hi/e.dataScale[d],l._m=1/(e.dataScale[d]*t[d].pixelsPerDataUnit),l.range[0]===l.range[1]&&(l.range[0]-=1,l.range[1]+=1);var a=l.tickmode;if(l.tickmode==="auto"){l.tickmode="linear";var u=l.nticks||g.constrain(l._length/40,4,9);m.autoTicks(l,Math.abs(l.range[1]-l.range[0])/u)}for(var f=m.calcTicks(l,{msUTC:!0}),o=0;o<f.length;++o)f[o].x=f[o].x*e.dataScale[d],l.type==="date"&&(f[o].text=f[o].text.replace(/\<br\>/g," "));r[d]=f,l.tickmode=a}}for(n.ticks=r,d=0;d<3;++d)for(y[d]=.5*(e.glplot.bounds[0][d]+e.glplot.bounds[1][d]),o=0;o<2;++o)n.bounds[o][d]=e.glplot.bounds[o][d];e.contourLevels=function(h){for(var p=new Array(3),s=0;s<3;++s){for(var x=h[s],c=new Array(x.length),T=0;T<x.length;++T)c[T]=x[T].x;p[s]=c}return p}(r)};var m=v("../../cartesian/axes"),g=v("../../../lib"),b=["xaxis","yaxis","zaxis"],y=[0,0,0]},{"../../../lib":503,"../../cartesian/axes":554}],607:[function(v,$,te){function m(g,b){var y,e,n=[0,0,0,0];for(y=0;y<4;++y)for(e=0;e<4;++e)n[e]+=g[4*y+e]*b[y];return n}$.exports=function(g,b){return m(g.projection,m(g.view,m(g.model,[b[0],b[1],b[2],1])))}},{}],608:[function(v,$,te){var m,g,b=v("../../../stackgl_modules").gl_plot3d,y=b.createCamera,e=b.createScene,n=v("webgl-context"),t=v("has-passive-events"),i=v("../../registry"),r=v("../../lib"),d=r.preserveDrawingBuffer(),l=v("../../plots/cartesian/axes"),a=v("../../components/fx"),u=v("../../lib/str2rgbarray"),f=v("../../lib/show_no_webgl_msg"),o=v("./project"),h=v("./layout/convert"),p=v("./layout/spikes"),s=v("./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=i.getComponentMethod("annotations3d","convert"),this.drawAnnotations=i.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var c=x.prototype;c.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(!(g||(m=document.createElement("canvas"),g=n({canvas:m,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");k.gl=g,k.canvas=m}return k};var T=!0;c.tryCreatePlot=function(){var k=this.prepareOptions(),L=!0;try{this.glplot=e(k)}catch{if(this.staticMode||!T||d)L=!1;
vendor: 5,426 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 T=!1,L},c.initializeGLCamera=function(){var k=this.fullSceneLayout.camera,L=k.projection.type==="orthographic";this.camera=y(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"})},c.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},c.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),s(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 G(oe,pe,ce){var de=L.fullSceneLayout[oe+"axis"];return de.type!=="log"&&(pe=de.d2l(pe)),l.hoverLabelText(de,pe,ce)}if(V!==null){var W=o(L.glplot.cameraParams,Z.dataCoordinate);k=V.data;var Q,R=A._fullData[k.index],N=Z.index,U={xLabel:G("x",Z.traceCoordinate[0],k.xhoverformat),yLabel:G("y",Z.traceCoordinate[1],k.yhoverformat),zLabel:G("z",Z.traceCoordinate[2],k.zhoverformat)},ee=a.castHoverinfo(R,L.fullLayout,N),j=(ee||"").split("+"),X=ee&&ee==="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=G("x",Z.traceCoordinate[3],k.uhoverformat),(X||j.indexOf("u")!==-1)&&J.push("u: "+U.uLabel),U.vLabel=G("y",Z.traceCoordinate[4],k.vhoverformat),(X||j.indexOf("v")!==-1)&&J.push("v: "+U.vLabel),U.wLabel=G("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),Q=J.join("<br>")):k.type==="isosurface"||k.type==="volume"?(U.valueLabel=l.hoverLabelText(L._mockAxis,L._mockAxis.d2l(Z.traceCoordinate[3]),k.valuehoverformat),J.push("value: "+U.valueLabel),Z.textLabel&&J.push(Z.textLabel),Q=J.join("<br>")):Q=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};a.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=[];a.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:Q,name:V.name,color:a.castHoverOption(R,N,"bgcolor")||V.color,borderColor:a.castHoverOption(R,N,"bordercolor"),fontFamily:a.castHoverOption(R,N,"font.family"),fontSize:a.castHoverOption(R,N,"font.size"),fontColor:a.castHoverOption(R,N,"font.color"),nameLength:a.castHoverOption(R,N,"namelength"),textAlign:a.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 a.loneUnhover(I),this.oldEventData&&A.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;L.drawAnnotations(L)},c.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 w(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 G=0;G<F[K].length;++G)Z=D.d2l(F[K][G],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)}}c.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&&w(this,I,Z);(function(ke,be){for(var Se=ke.fullSceneLayout,Oe=Se.annotations||[],De=0;De<3;De++)for(var je=_[De],Je=je.charAt(0),ze=Se[je],Ue=0;Ue<Oe.length;Ue++){var Ge=Oe[Ue];if(Ge.visible){var Ye=ze.r2l(Ge[Je]);!isNaN(Ye)&&isFinite(Ye)&&(be[0][De]=Math.min(be[0][De],Ye),be[1][De]=Math.max(be[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 G=Object.keys(this.traces);e:for(S=0;S<G.length;++S){for(E=0;E<k.length;++E)if(k[E].uid===G[S]&&k[E].visible===!0&&k[E]._length!==0)continue e;(P=this.traces[G[S]]).dispose(),delete this.traces[G[S]]}this.glplot.objects.sort(function(ke,be){return ke._trace.data.index-be._trace.data.index});var W,Q=[[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){Q[0][S]=1/0,Q[1][S]=-1/0;var U=this.glplot.objects,ee=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?Q[0][S]=Math.min(Q[0][S],D._lowerLogErrorBound):Q[0][S]=Math.min(Q[0][S],J[0][S]/K[S]-re),Q[1][S]=Math.max(Q[1][S],J[1][S]/K[S]+re)}for(E=0;E<ee.length;E++){var ne=ee[E];if(ne.visible){var se=D.r2l(ne[j]);Q[0][S]=Math.min(Q[0][S],se),Q[1][S]=Math.max(Q[1][S],se)}}if("rangemode"in D&&D.rangemode==="tozero"&&(Q[0][S]=Math.min(Q[0][S],0),Q[1][S]=Math.max(Q[1][S],0)),Q[0][S]>Q[1][S])Q[0][S]=-1,Q[1][S]=1;else{var oe=Q[1][S]-Q[0][S];Q[0][S]-=oe/32,Q[1][S]+=oe/32}if(D.autorange==="reversed"){var pe=Q[0][S];Q[0][S]=Q[1][S],Q[1][S]=pe}}else{var ce=D.range;Q[0][S]=D.r2l(ce[0]),Q[1][S]=D.r2l(ce[1])}Q[0][S]===Q[1][S]&&(Q[0][S]-=1,Q[1][S]+=1),R[S]=Q[1][S]-Q[0][S],this.glplot.setBounds(S,{min:Q[0][S]*K[S],max:Q[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 _e=[1,1,1];for(S=0;S<3;++S){var we=N[F=(D=H[_[S]]).type];_e[S]=Math.pow(we.acc,1/we.count)/K[S]}W=de==="data"||Math.max.apply(null,_e)/Math.min.apply(null,_e)<=4?_e:[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 ge=this.container.style;ge.position="absolute",ge.left=fe.l+Ee.x[0]*fe.w+"px",ge.top=fe.t+(1-Ee.y[1])*fe.h+"px",ge.width=fe.w*(Ee.x[1]-Ee.x[0])+"px",ge.height=fe.h*(Ee.y[1]-Ee.y[0])+"px"}this.glplot.redraw()}},c.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)},c.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"}}}
1216,c.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())},c.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},c.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},c.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),i.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},c.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;i.call("_storeDirectGUIEdit",K,P._preGUI,Z),S.up=V,r.nestedProperty(K,H).set(V)}}else A.keyBindingMode=k;this.fullSceneLayout.hovermode=L},c.toImage=function(k){k||(k="png"),this.staticMode&&this.container.appendChild(m),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,G=Z-1;K<G;++K,--G)for(var W=0;W<V;++W)for(var Q=0;Q<4;++Q){var R=4*(V*K+W)+Q,N=4*(V*G+W)+Q,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 G=0;G<V;++G){var W=4*(V*K+G),Q=H[W+3];if(Q>0)for(var R=255/Q,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(m),E},c.setConvert=function(){for(var k=0;k<3;k++){var L=this.fullSceneLayout[_[k]];l.setConvert(L,this.fullLayout),L.setScale=r.noop}},c.make4thDimension=function(){var k=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(this._mockAxis,k)},$.exports=x},{"../../../stackgl_modules":1124,"../../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(v,$,te){$.exports=function(m,g,b,y){y=y||m.length;for(var e=new Array(y),n=0;n<y;n++)e[n]=[m[n],g[n],b[n]];return e}},{}],610:[function(v,$,te){var m=v("./font_attributes"),g=v("./animation_attributes"),b=v("../components/color/attributes"),y=v("../components/shapes/draw_newshape/attributes"),e=v("./pad_attributes"),n=v("../lib/extend").extendFlat,t=m({editType:"calc"});t.family.dflt='"Open Sans", verdana, arial, sans-serif',t.size.dflt=12,t.color.dflt=b.defaultLine,$.exports={font:t,title:{text:{valType:"string",editType:"layoutstyle"},font:m({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"},newshape:y.newshape,activeshape:y.activeshape,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:n({},g.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:m({editType:"layoutstyle"})}}},{"../components/color/attributes":365,"../components/shapes/draw_newshape/attributes":451,"../lib/extend":493,"./animation_attributes":548,"./font_attributes":585,"./pa
1216d_attributes":618}],611:[function(v,$,te){var m=v("../../lib/sort_object_keys"),g='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',b=['\xA9 <a target="_blank" href="https://carto.com/">Carto</a>',g].join(" "),y=['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:g,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:y,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:y,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=m(e);$.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(v,$,te){var m=v("../../lib");$.exports=function(g,b){var y=g.split(" "),e=y[0],n=y[1],t=m.isArrayOrTypedArray(b)?m.mean(b):b,i=.5+t/100,r=1.5+t/100,d=["",""],l=[0,0];switch(e){case"top":d[0]="top",l[1]=-r;break;case"bottom":d[0]="bottom",l[1]=r}switch(n){case"left":d[1]="right",l[0]=-i;break;case"right":d[1]="left",l[0]=i}return{anchor:d[0]&&d[1]?d.join("-"):d[0]?d[0]:d[1]?d[1]:"center",offset:l}}},{"../../lib":503}],613:[function(v,$,te){var m=v("mapbox-gl/dist/mapbox-gl-unminified"),g=v("../../lib"),b=g.strTranslate,y=g.strScale,e=v("../../plots/get_data").getSubplotCalcData,n=v("../../constants/xmlns_namespaces"),t=v("@plotly/d3"),i=v("../../components/drawing"),r=v("../../lib/svg_text_utils"),d=v("./mapbox"),l=te.constants=v("./constants");function a(u){return typeof u=="string"&&(l.styleValuesMapbox.indexOf(u)!==-1||u.indexOf("mapbox://")===0)}te.name="mapbox",te.attr="subplot",te.idRoot="mapbox",te.idRegex=te.attrRegex=g.counterRegex("mapbox"),te.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},te.layoutAttributes=v("./layout_attributes"),te.supplyLayoutDefaults=v("./layout_defaults"),te.plot=function(u){var f=u._fullLayout,o=u.calcdata,h=f._subplots.mapbox;if(m.version!==l.requiredVersion)throw new Error(l.wrongVersionErrorMsg);var p=function(w,k){var L=w._fullLayout;if(w._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;a(D.style)&&(F?g.pushUnique(A,F):(a(D._input.style)&&(g.error("Uses Mapbox map style, but did not set an access token."),P=!0),S=!0)),F&&g.pushUnique(I,F)}if(S){var H=P?l.noAccessTokenErrorMsg:l.missingStyleErrorMsg;throw g.error(H),new Error(H)}return A.length?(A.length>1&&g.warn(l.multipleTokensErrorMsg),A[0]):(I.length&&g.log(["Listed mapbox access token(s)",I.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(u,h);m.accessToken=p;for(var s=0;s<h.length;s++){var x=h[s],c=e(o,"mapbox",x),T=f[x],_=T._subplot;_||(_=new d(u,x),f[x]._subplot=_),_.viewInitial||(_.viewInitial={center:g.extendFlat({},T.center),zoom:T.zoom,bearing:T.bearing,pitch:T.pitch}),_.plot(c,f,u._promises)}},te.clean=function(u,f,o,h){for(var p=h._subplots.mapbox||[],s=0;s<p.length;s++){var x=p[s];!f[x]&&h[x]._subplot&&h[x]._subplot.destroy()}},te.toSVG=function(u){for(var f=u._fullLayout,o=f._subplots.mapbox,h=f._size,p=0;p<o.length;p++){var s=f[o[p]],x=s.domain,c=s._subplot.toImage("png");f._glimages.append("svg:image").attr({xmlns:n.svg,"xlink:href":c,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 T=t.select(s._subplot.div);if(T.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",l.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),_.append("path").attr("d",l.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),_.a
1220ppend("path").attr("d",l.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),_.append("polygon").attr("points",l.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var w=T.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),k=f._glimages.append("g"),L=k.append("text");L.text(w).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":w});var A=i.bBox(L.node()),I=h.w*(x.x[1]-x.x[0]);if(A.width>I/2){var P=w.split("|").join("<br>");L.text(P).attr("data-unformatted",P).call(r.convertToTspans,u),A=i.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])+y(S))}},te.updateFx=function(u){for(var f=u._fullLayout,o=f._subplots.mapbox,h=0;h<o.length;h++)f[o[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(v,$,te){var m=v("../../lib"),g=v("../../lib/svg_text_utils").sanitizeHTML,b=v("./convert_text_opts"),y=v("./constants");function e(r,d){this.subplot=r,this.uid=r.uid+"-"+d,this.index=d,this.idSource="source-"+this.uid,this.idLayer=y.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 l=0;l<d.length;l++)if(typeof d[l]!="string"||d[l].length===0)return!1;return!0}return m.isPlainObject(d)||typeof d=="string"&&d.length>0}function i(r){var d={},l={};switch(r.type){case"circle":m.extendFlat(l,{"circle-radius":r.circle.radius,"circle-color":r.color,"circle-opacity":r.opacity});break;case"line":m.extendFlat(l,{"line-width":r.line.width,"line-color":r.color,"line-opacity":r.opacity,"line-dasharray":r.line.dash});break;case"fill":m.extendFlat(l,{"fill-color":r.color,"fill-outline-color":r.fill.outlinecolor,"fill-opacity":r.opacity});break;case"symbol":var a=r.symbol,u=b(a.textposition,a.iconsize);m.extendFlat(d,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":u.anchor,"text-offset":u.offset,"symbol-placement":a.placement}),m.extendFlat(l,{"icon-color":r.color,"text-color":a.textfont.color,"text-opacity":r.opacity});break;case"raster":m.extendFlat(l,{"raster-fade-duration":0,"raster-opacity":r.opacity})}return{layout:d,paint:l}}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 l=function(a){var u,f=a.sourcetype,o=a.source,h={type:f};
1220return f==="geojson"?u="data":f==="vector"?u=typeof o=="string"?"url":"tiles":f==="raster"?(u="tiles",h.tileSize=256):f==="image"&&(u="url",h.coordinates=a.coordinates),h[u]=o,a.sourceattribution&&(h.attribution=g(a.sourceattribution)),h}(r);d.addSource(this.idSource,l)}},n.findFollowingMapboxLayerId=function(r){if(r==="traces")for(var d=this.subplot.getMapLayers(),l=0;l<d.length;l++){var a=d[l].id;if(typeof a=="string"&&a.indexOf(y.traceLayerPrefix)===0){r=a;break}}return r},n.updateLayer=function(r){var d=this.subplot,l=i(r),a=this.lookupBelow(),u=this.findFollowingMapboxLayerId(a);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:l.layout,paint:l.paint},u),this.layerType=r.type,this.below=a},n.updateStyle=function(r){if(t(r)){var d=i(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)},$.exports=function(r,d,l){var a=new e(r,d);return a.update(l),a}},{"../../lib":503,"../../lib/svg_text_utils":529,"./constants":611,"./convert_text_opts":612}],615:[function(v,$,te){var m=v("../../lib"),g=v("../../components/color").defaultLine,b=v("../domain").attributes,y=v("../font_attributes"),e=v("../../traces/scatter/attributes").textposition,n=v("../../plot_api/edit_types").overrideAll,t=v("../../plot_api/plot_template").templatedArray,i=v("./constants"),r=y({});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular",($.exports=n({_arrayAttrRegexps:[m.counterRegex("mapbox",".layers",!0)],domain:b({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:i.styleValuesMapbox.concat(i.styleValuesNonMapbox),dflt:i.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:g},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:g}},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:m.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":927,"../domain":584,"../font_attributes":585,"./constants":611}],616:[function(v,$,te){var m=v("../../lib"),g=v("../subplot_defaults"),b=v("../array_container_defaults"),y=v("./layout_attributes");function e(t,i,r,d){r("accesstoken",d.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),b(t,i,{name:"layers",handleItemDefaults:n}),i._input=t}function n(t,i){function r(f,o){return m.coerce(t,i,y.layers,f,o)}if(r("visible")){var d,l=r("sourcetype"),a=l==="raster"||l==="image";r("source"),r("sourceattribution"),l==="vector"&&r("sourcelayer"),l==="image"&&r("coordinates"),a&&(d="raster");var u=r("type",d);a&&u!=="raster"&&(u=i.type="raster",m.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"),m.coerceFont(r,"symbol.textfont"),r("symbol.textposition"),r("symbol.placement"))}}$.exports=function(t,i,r){g(t,i,r,{type:"mapbox",attributes:y,handleDefaults:e,partition:"y",accessToken:i._mapboxAccessToken})}},{"../../lib":503,"../array_container_defaults":549,"../subplot_defaults":632,"./layout_attributes":615}],617:[function(v,$,te){var m=v("mapbox-gl/dist/mapbox-gl-unminified"),g=v("../../lib"),b=v("../../lib/geo_location_utils"),y=v("../../registry"),e=v("../cartesian/axes"),n=v("../../components/dragelement"),t=v("../../components/fx"),i=v("../../components/dragelement/helpers"),r=i.rectMode,d=i.drawMode,l=i.selectMode,a=v("../cartesian/select").prepSelect,u=v("../cartesian/select").clearSelect,f=v("../cartesian/select").clearSelectionsCache,o=v("../cartesian/select").selectOnClick,h=v("./constants"),p=v("./layers");function s(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=s.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=T(S.style);P.accessToken=S.accesstoken;var D=P.map=new m.Map({container:P.div,style:E.style,center:w(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 m.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=T(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 G=K[I];if(G.length>1)for(A=0;A<G.length;A++)(V=G[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 c={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function T(k){var L={};return g.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 w(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 c[Z[0].trace.type]-c[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(w(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];y.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];y.call("_storeDirectGUIEdit",I.layout,I._fullLayout._preGUI,A.getViewEdits(D));var F=A.viewInitial;P.setCenter(w(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&&o(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=g.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),l(S)||d(S)?(A.dragPan.disable(),A.on("zoomstart",L.clearSelect),L.dragOptions.prepFn=function(F,H,V){a(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);g.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 m.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},$.exports=s},{"../../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(v,$,te){$.exports=function(m){var g=m.editType;return{t:{valType:"number",dflt:0,editType:g},r:{valType:"number",dflt:0,editType:g},b:{valType:"number",dflt:0,editType:g},l:{valType:"number",dflt:0,editType:g},editType:g}}},{}],619:[function(v,$,te){var m=v("@plotly/d3"),g=v("d3-time-format").timeFormatLocale,b=v("d3-format").formatLocale,y=v("fast-isnumeric"),e=v("../registry"),n=v("../plot_api/plot_schema"),t=v("../plot_api/plot_template"),i=v("../lib"),r=v("../components/color"),d=v("../constants/numerical").BADNUM,l=v("./cartesian/axis_ids"),a=v("./cartesian/handle_outline").clearSelect,u=v("./animation_attributes"),f=v("./frame_attributes"),o=v("../plots/get_data").getModuleCalcData,h=i.relinkPrivateKeys,p=i._,s=$.exports={};i.extendFlat(s,e),s.attributes=v("./attributes"),s.attributes.type.values=s.allTypes,s.fontAttrs=v("./font_attributes"),s.layoutAttributes=v("./layout_attributes"),s.fontWeight="normal";var x=s.transformsRegistry,c=v("./command");s.executeAPICommand=c.executeAPICommand,s.computeAPICommandBindings=c.computeAPICommandBindings,s.manageCommandObserver=c.manageCommandObserver,s.hasSimpleAPICommandBindings=c.hasSimpleAPICommandBindings,s.redrawText=function(V){return V=i.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(s.previousPromises(V)))},300)})},s.resize=function(V){var Z;V=i.getGraphDiv(V);var K=new Promise(function(G,W){V&&!i.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=G,V._redrawTimer=setTimeout(function(){if(!V.layout||V.layout.width&&V.layout.height||i.isHidden(V))G(V);else{delete V.layout.width,delete V.layout.height;var Q=V.changed;V.autoplay=!0,e.call("relayout",V,{autosize:!0}).then(function(){V.changed=Q,V._resolveResize===G&&(delete V._resolveResize,G(V))})}},100)});return Z&&Z(K),K},s.previousPromises=function(V){if((V._promises||[]).length)return Promise.all(V._promises).then(function(){V._promises=[]})},s.addLinks=function(V){if(V._context.showLink||V._context.showSources){var Z=V._fullLayout,K=i.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 ee=m.select(this);
1220ee.append("tspan").classed("js-link-to-tool",!0),ee.append("tspan").classed("js-link-spacer",!0),ee.append("tspan").classed("js-sourcelinks",!0)})}),G=K.node(),W={y:Z._paper.attr("height")-9};document.body.contains(G)&&G.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 Q=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,ee){ee.text("");var j=ee.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(U._context.linkText+" "+String.fromCharCode(187));if(U._context.sendData)j.on("click",function(){s.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,Q),R.text(Q.text()&&N.text()?" - ":"")}},s.sendDataToCloud=function(V){var Z=(window.PLOTLYENV||{}).BASE_URL||V._context.plotlyServerURL;if(Z){V.emit("plotly_beforeexport");var K=m.select(V).append("div").attr("id","hiddenform").style("display","none"),G=K.append("form").attr({action:Z+"/external",method:"post",target:"_blank"});return G.append("input").attr({type:"text",name:"data"}).node().value=s.graphJson(V,!1,"keepdata"),G.node().submit(),K.remove(),V.emit("plotly_afterexport"),!1}};var T=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],_=["year","month","dayMonth","dayMonthYear"];function w(V,Z){var K=V._context.locale;K||(K="en-US");var G=!1,W={};function Q(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&&(G=!0)}for(var R=0;R<2;
1220R++){for(var N=V._context.locales,U=0;U<2;U++){var ee=(N[K]||{}).format;if(ee&&(Q(ee),G))break;N=e.localeRegistry}var j=K.split("-")[0];if(G||j===K)break;K=j}return G||Q(e.localeRegistry.en.format),W}function k(V,Z){var K={_fullLayout:Z},G=V._id.charAt(0)==="x",W=V._mainAxis._anchorAxis,Q="",R="",N="";if(W&&(N=W._mainAxis._id,Q=G?V._id+N:N+V._id),!Q||!Z._plots[Q]){Q="";for(var U=V._counterAxes,ee=0;ee<U.length;ee++){var j=U[ee],X=G?V._id+j:j+V._id;R||(R=X);var J=l.getFromId(K,j);if(N&&J.overlaying===N){Q=X;break}}}return Q||R}function L(V){var Z=V.transforms;if(Array.isArray(Z)&&Z.length)for(var K=0;K<Z.length;K++){var G=Z[K],W=G._module||x[G.type];if(W&&W.makesData)return!0}return!1}function A(V,Z,K,G){for(var W=V.transforms,Q=[V],R=0;R<W.length;R++){var N=W[R],U=x[N.type];U&&U.transform&&(Q=U.transform(Q,{transform:N,fullTrace:V,fullData:Z,layout:K,fullLayout:G,transformIndex:R}))}return Q}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={})}s.supplyDefaults=function(V,Z){var K=Z&&Z.skipUpdateCalc,G=V._fullLayout||{};if(G._skipDefaults)delete G._skipDefaults;else{var W,Q=V._fullLayout={},R=V.layout||{},N=V._fullData||[],U=V._fullData=[],ee=V.data||[],j=V.calcdata||[],X=V._context||{};V._transitionData||s.createTransitionData(V),Q._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")},Q._traceWord=p(V,"trace");var J=w(V,T);if(Q._mapboxAccessToken=X.mapboxAccessToken,G._initialAutoSizeIsDone){var re=G.width,ne=G.height;s.supplyLayoutGlobalDefaults(R,Q,J),R.width||(Q.width=re),R.height||(Q.height=ne),s.sanitizeMargins(Q)}else{s.supplyLayoutGlobalDefaults(R,Q,J);var se=!R.width||!R.height,oe=Q.autosize,pe=X.autosizable;se&&(oe||pe)?s.plotAutoSize(V,R,Q):se&&s.sanitizeMargins(Q),!oe&&se&&(R.width=Q.width,R.height=Q.height)}Q._d3locale=function(Ue,Ge){return Ue.decimal=Ge.charAt(0),Ue.thousands=Ge.charAt(1),{numberFormat:function(Ye){try{Ye=b(Ue).format(i.adjustFormat(Ye))}catch{return i.warnBadFormat(Ye),i.noFormat}return Ye},timeFormat:g(Ue).utcFormat}}(J,Q.separators),Q._extraFormat=w(V,_),Q._initialAutoSizeIsDone=!0,Q._dataLength=ee.length,Q._modules=[],Q._visibleModules=[],Q._basePlotModules=[];var ce=Q._subplots=function(){var Ue,Ge,Ye=e.collectableSubplotTypes,et={};if(!Ye){Ye=[];var ct=e.subplotsRegistry;for(var mt in ct){var Ct=ct[mt].attr;if(Ct&&(Ye.push(mt),Array.isArray(Ct)))for(Ge=0;Ge<Ct.length;Ge++)i.pushUnique(Ye,Ct[Ge])}}for(Ue=0;Ue<Ye.length;Ue++)et[Ye[Ue]]=[];return et}(),de=Q._splomAxes={x:{},y:{}},xe=Q._splomSubplots={};Q._splomGridDflt={},Q._scatterStackOpts={},Q._firstScatter={},Q._alignmentOpts={},Q._colorAxes={},Q._requestRangeslider={},Q._traceUids=function(Ue,Ge){var Ye,et,ct=Ge.length,mt=[];for(Ye=0;Ye<Ue.length;Ye++){var Ct=Ue[Ye]._fullInput;Ct!==et&&mt.push(Ct),et=Ct}var Tt=mt.length,nt=new Array(ct),Qe={};function Et(Fe,qe){nt[qe]=Fe,Qe[Fe]=1}function Gt(Fe,qe){if(Fe&&typeof Fe=="string"&&!Qe[Fe])return Et(Fe,qe),!0}for(Ye=0;Ye<ct;Ye++){var Xt=Ge[Ye].uid;typeof Xt=="number"&&(Xt=String(Xt)),Gt(Xt,Ye)||Ye<Tt&&Gt(mt[Ye].uid,Ye)||Et(i.randstr(Qe),Ye)}return nt}(N,ee),Q._globalTransforms=(V._context||{}).globalTransforms,s.supplyDataDefaults(ee,U,R,Q);var _e=Object.keys(de.x),we=Object.keys(de.y);if(_e.length>1&&we.length>1){for(e.getComponentMethod("grid","sizeDefaults")(R,Q),W=0;W<_e.length;W++)i.pushUnique(ce.xaxis,_e[W]);for(W=0;W<we.length;W++)i.pushUnique(ce.yaxis,we[W]);for(var Ee in xe)i.pushUnique(ce.cartesian,Ee)}if(Q._has=s._hasPlotType.bind(Q),N.length===U.length)for(W=0;W<U.length;W++)h(U[W],N[W]);s.supplyLayoutModuleDefaults(R,Q,U,V._transitionData);var fe=Q._visibleModules,ge=[];for(W=0;W<fe.length;W++){var ke=fe[W].crossTraceDefaults;ke&&i.pushUnique(ge,ke)}for(W=0;W<ge.length;W++)ge[W](U,Q);Q._hasOnlyLargeSploms=Q._basePlotModules.length===1&&Q._basePlotModules[0].name==="splom"&&_e.length>15&&we.length>15&&Q.shapes.length===0&&Q.images.length===0,s.linkSubplots(U,Q,N,G),s.cleanPlot(U,Q,N,G);var be=!(!G._has||!G._has("gl2d")),Se=!(!Q._has||!Q._has("gl2d")),Oe=!(!G._has||!G._has("cartesian"))||be,De=!(!Q._has||!Q._has("cartesian"))||Se;Oe&&!De?G._bgLayer.remove():De&&!Oe&&(Q._shouldCreateBgLayer=!0),G._zoomlayer&&!V._dragging&&a({_fullLayout:G}),function(Ue,Ge){var Ye,et=[];Ge.meta&&(Ye=Ge._meta={meta:Ge.meta,layout:{meta:Ge.meta}});for(var ct=0;ct<Ue.length;ct++){var mt=Ue[ct];mt.meta?et[mt.index]=mt._meta={meta:mt.meta}:Ge.meta&&(mt._meta={meta:Ge.meta}),Ge.meta&&(mt._meta.layout={meta:Ge.meta})}et.length&&(Ye||(Ye=Ge._meta={}),Ye.data=et)}(U,Q),h(Q,G),e.getComponentMethod("colorscale","crossTraceDefaults")(U,Q),Q._preGUI||(Q._preGUI={}),Q._tracePreGUI||(Q._tracePreGUI={});var je,Je=Q._tracePreGUI,ze={};for(je in Je)ze[je]="old";for(W=0;W<U.length;W++)ze[je=U[W]._fullInput.uid]||(Je[je]={}),ze[je]="new";for(je in ze)ze[je]==="old"&&delete Je[je];P(Q),e.getComponentMethod("rangeslider","makeData")(Q),K||j.length!==U.length||s.supplyDefaultsUpdateCalc(j,U)}},s.supplyDefaultsUpdateCalc=function(V,Z){for(var K=0;K<Z.length;K++){var G=Z[K],W=(V[K]||[])[0];if(W&&W.trace){var Q=W.trace;if(Q._hasCalcTransform){var R,N,U,ee=Q._arrayAttrs;for(R=0;R<ee.length;R++)N=ee[R],U=i.nestedProperty(Q,N).get().slice(),i.nestedProperty(G,N).set(U)}W.trace=G}}},s.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=[])},s._hasPlotType=function(V){var Z,K=this._basePlotModules||[];for(Z=0;Z<K.length;Z++)if(K[Z].name===V)return!0;var G=this._modules||[];for(Z=0;Z<G.length;Z++){var W=G[Z].name;if(W===V)return!0;var Q=e.modules[W];if(Q&&Q.categories[V])return!0}return!1},s.cleanPlot=function(V,Z,K,G){var W,Q,R=G._basePlotModules||[];for(W=0;W<R.length;W++){var N=R[W];N.clean&&N.clean(V,Z,K,G)}var U=G._has&&G._has("gl"),ee=Z._has&&Z._has("gl");U&&!ee&&G._glcontainer!==void 0&&(G._glcontainer.selectAll(".gl-canvas").remove(),G._glcontainer.selectAll(".no-webgl").remove(),G._glcanvas=null);var j=!!G._infolayer;e:for(W=0;W<K.length;W++){var X=K[W].uid;for(Q=0;Q<V.length;
1220Q++)if(X===V[Q].uid)continue e;j&&G._infolayer.select(".cb"+X).remove()}},s.linkSubplots=function(V,Z,K,G){var W,Q,R=G._plots||{},N=Z._plots={},U=Z._subplots,ee={_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=l.getFromId(ee,J,"x"),se=l.getFromId(ee,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,Q=0;Q<V.length;Q++){var oe=V[Q];if(oe.xaxis===X.xaxis._id&&oe.yaxis===X.yaxis._id&&oe.cliponaxis===!1){X._hasClipOnAxisFalse=!0;break}}}var pe,ce=l.list(ee,null,!0);for(W=0;W<ce.length;W++){var de=null;(pe=ce[W]).overlaying&&(de=l.getFromId(ee,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:l.getFromId(ee,pe.anchor)}for(W=0;W<ce.length;W++)if((pe=ce[W])._counterAxes.sort(l.idSort),pe._subplotsWith.sort(i.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,_e=0;for(Q=0;Q<pe._counterAxes.length;Q++){var we=l.getFromId(ee,pe._counterAxes[Q]);xe=Math.min(xe,we.domain[0]),_e=Math.max(_e,we.domain[1])}xe<_e&&(pe._counterDomainMin=xe,pe._counterDomainMax=_e)}},s.clearExpandedTraceDefaultColors=function(V){var Z,K,G;for(K=[],(Z=V._module._colorAttrs)||(V._module._colorAttrs=Z=[],n.crawl(V._module.attributes,function(W,Q,R,N){K[N]=Q,K.length=N+1,W.valType==="color"&&W.dflt===void 0&&Z.push(K.join("."))})),G=0;G<Z.length;G++)i.nestedProperty(V,"_input."+Z[G]).get()||i.nestedProperty(V,Z[G]).set(null)},s.supplyDataDefaults=function(V,Z,K,G){var W,Q,R,N=G._modules,U=G._visibleModules,ee=G._basePlotModules,j=0,X=0;function J(Ee){Z.push(Ee);var fe=Ee._module;fe&&(i.pushUnique(N,fe),Ee.visible===!0&&i.pushUnique(U,fe),i.pushUnique(ee,Ee._module.basePlotModule),j++,Ee._input.visible!==!1&&X++)}G._transformModules=[];var re={},ne=[],se=(K.template||{}).data||{},oe=t.traceTemplater(se);for(W=0;W<V.length;W++){if(R=V[W],(Q=oe.newTrace(R)).uid=G._traceUids[W],s.supplyTraceDefaults(R,Q,X,G,W),Q.index=W,Q._input=R,Q._expandedIndex=j,Q.transforms&&Q.transforms.length)for(var pe=R.visible!==!1&&Q.visible===!1,ce=A(Q,Z,K,G),de=0;de<ce.length;de++){var xe=ce[de],_e={_template:Q._template,type:Q.type,uid:Q.uid+de};pe&&xe.visible===!1&&delete xe.visible,s.supplyTraceDefaults(xe,_e,j,G,W),h(_e,xe),_e.index=W,_e._input=R,_e._fullInput=Q,_e._expandedIndex=j,_e._expandedInput=xe,J(_e)}else Q._fullInput=Q,Q._expandedInput=Q,J(Q);e.traceIs(Q,"carpetAxis")&&(re[Q.carpet]=Q),e.traceIs(Q,"carpetDependent")&&ne.push(W)}for(W=0;W<ne.length;W++)if((Q=Z[ne[W]]).visible){var we=re[Q.carpet];Q._carpet=we,we&&we.visible?(Q.xaxis=we.xaxis,Q.yaxis=we.yaxis):Q.visible=!1}},s.supplyAnimationDefaults=function(V){var Z;V=V||{};var K={};function G(W,Q){return i.coerce(V||{},K,u,W,Q)}if(G("mode"),G("direction"),G("fromcurrent"),Array.isArray(V.frame))for(K.frame=[],Z=0;Z<V.frame.length;Z++)K.frame[Z]=s.supplyAnimationFrameDefaults(V.frame[Z]||{});else K.frame=s.supplyAnimationFrameDefaults(V.frame||{});if(Array.isArray(V.transition))for(K.transition=[],Z=0;Z<V.transition.length;Z++)K.transition[Z]=s.supplyAnimationTransitionDefaults(V.transition[Z]||{});else K.transition=s.supplyAnimationTransitionDefaults(V.transition||{});return K},s.supplyAnimationFrameDefaults=function(V){var Z={};function K(G,W){return i.coerce(V||{},Z,u.frame,G,W)}return K("duration"),K("redraw"),Z},s.supplyAnimationTransitionDefaults=function(V){var Z={};function K(G,W){return i.coerce(V||{},Z,u.transition,G,W)}return K("duration"),K("easing"),Z},s.supplyFrameDefaults=function(V){var Z={};function K(G,W){return i.coerce(V,Z,f,G,W)}return K("group"),K("name"),K("traces"),K("baseframe"),K("data"),K("layout"),Z},s.supplyTraceDefaults=function(V,Z,K,G,W){var Q,R=G.colorway||r.defaults,N=R[K%R.length];function U(ce,de){return i.coerce(V,Z,s.attributes,ce,de)}var ee=U("visible");U("type"),U("name",G._traceWord+" "+W),U("uirevision",G.uirevision);var j=s.getModule(Z);if(Z._module=j,j){var X=j.basePlotModule,J=X.attr,re=X.attributes;if(J&&re){var ne=G._subplots,se="";if(ee||X.name!=="gl2d"){if(Array.isArray(J))for(Q=0;Q<J.length;Q++){var oe=J[Q],pe=i.coerce(V,Z,re,oe);ne[oe]&&i.pushUnique(ne[oe],pe),se+=pe}else se=i.coerce(V,Z,re,J);ne[X.name]&&i.pushUnique(ne[X.name],se)}}}return ee&&(U("customdata"),U("ids"),U("meta"),e.traceIs(Z,"showLegend")?(i.coerce(V,Z,j.attributes.showlegend?j.attributes:s.attributes,"showlegend"),U("legendgroup"),U("legendgrouptitle.text"),U("legendrank"),Z._dfltShowLegend=!0):Z._dfltShowLegend=!1,j&&j.supplyDefaults(V,Z,N,G),e.traceIs(Z,"noOpacity")||U("opacity"),e.traceIs(Z,"notLegendIsolatable")&&(Z.visible=!!Z.visible),e.traceIs(Z,"noHover")||(Z.hovertemplate||i.coerceHoverinfo(V,Z,G),Z.type!=="parcats"&&e.getComponentMethod("fx","supplyDefaults")(V,Z,N,G)),j&&j.selectPoints&&U("selectedpoints"),s.supplyTransformDefaults(V,Z,G)),Z},s.hasMakesDataTransform=L,s.supplyTransformDefaults=function(V,Z,K){if(Z._length||L(V)){var G=K._globalTransforms||[],W=K._transformModules||[];if(Array.isArray(V.transforms)||G.length!==0)for(var Q=V.transforms||[],R=G.concat(Q),N=Z.transforms=[],U=0;U<R.length;U++){var ee,j=R[U],X=j.type,J=x[X],re=!(j._module&&j._module===J),ne=J&&typeof J.transform=="function";J||i.warn("Unrecognized transform type "+X+"."),J&&J.supplyDefaults&&(re||ne)?((ee=J.supplyDefaults(j,Z,K,V)).type=X,ee._module=J,i.pushUnique(W,J)):ee=i.extendFlat({},j),N.push(ee)}}},s.supplyLayoutGlobalDefaults=function(V,Z,K){function G(U,ee){return i.coerce(V,Z,s.layoutAttributes,U,ee)}var W=V.template;i.isPlainObject(W)&&(Z.template=W,Z._template=W.layout,Z._dataTemplate=W.data),G("autotypenumbers");var Q=i.coerceFont(G,"font"),R=Q.size;i.coerceFont(G,"title.font",i.extendFlat({},Q,{size:Math.round(1.4*R)})),G("title.text",Z._dfltTitle.plot),G("title.xref"),G("title.yref"),G("title.x"),G("title.y"),G("title.xanchor"),G("title.yanchor"),G("title.pad.t"),G("title.pad.r"),G("title.pad.b"),G("title.pad.l"),G("uniformtext.mode")&&G("uniformtext.minsize"),G("autosize",!(V.width&&V.height)),G("width"),G("height"),G("margin.l"),G("margin.r"),G("margin.t"),G("margin.b"),G("margin.pad"),G("margin.autoexpand"),V.width&&V.height&&s.sanitizeMargins(Z),e.getComponentMethod("grid","sizeDefaults")(V,Z),G("paper_bgcolor"),G("separators",K.decimal+K.thousands),G("hidesources"),G("colorway"),G("datarevision");var N=G("uirevision");G("editrevision",N),G("selectionrevision",N),e.getComponentMethod("modebar","supplyLayoutDefaults")(V,Z),e.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(V,Z,G),G("meta"),i.isPlainObject(V.transition)&&(G("transition.duration"),G("transition.easing"),G("transition.ordering")),e.getComponentMethod("calendars","handleDefaults")(V,Z,"calendar"),e.getComponentMethod("fx","supplyLayoutGlobalDefaults")(V,Z,G)},s.plotAutoSize=function(V,Z,K){var G,W,Q=V._context||{},R=Q.frameMargins,N=i.isPlotDiv(V);if(N&&V.emit("plotly_autosize"),Q.fillFrame)G=window.innerWidth,W=window.innerHeight,document.body.style.overflow="hidden";else{var U=N?window.getComputedStyle(V):{};if(G=I(U.width)||I(U.maxWidth)||K.width,W=I(U.height)||I(U.maxHeight)||K.height,y(R)&&R>0){var ee=1-2*R;G=Math.round(ee*G),W=Math.round(ee*W)}}var j=s.layoutAttributes.width.min,X=s.layoutAttributes.height.min;G<j&&(G=j),W<X&&(W=X);var J=!Z.width&&Math.abs(K.width-G)>1,re=!Z.height&&Math.abs(K.height-W)>1;(re||J)&&(J&&(K.width=G),re&&(K.height=W)),V._initialAutoSize||(V._initialAutoSize={width:G,height:W}),s.sanitizeMargins(K)},s.supplyLayoutModuleDefaults=function(V,Z,K,G){var W,Q,R,N=e.componentsRegistry,U=Z._basePlotModules,ee=e.subplotsRegistry.cartesian;for(W in N)(R=N[W]).includeBasePlot&&R.includeBasePlot(V,Z);for(var j in U.length||U.push(ee),Z._has("cartesian")&&(e.getComponentMethod("grid","contentDefaults")(V,Z),ee.finalizeSubplots(V,Z)),Z._subplots)Z._subplots[j].sort(i.subplotSort);for(Q=0;Q<U.length;Q++)(R=U[Q]).supplyLayoutDefaults&&R.supplyLayoutDefaults(V,Z,K);var X=Z._modules;for(Q=0;Q<X.length;Q++)(R=X[Q]).supplyLayoutDefaults&&R.supplyLayoutDefaults(V,Z,K);var J=Z._transformModules;for(Q=0;Q<J.length;Q++)(R=J[Q]).supplyLayoutDefaults&&R.supplyLayoutDefaults(V,Z,K,G);for(W in N)(R=N[W]).supplyLayoutDefaults&&R.supplyLayoutDefaults(V,Z,K)},s.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)),i.clearThrottle(),i.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()},s.style=function(V){var Z,K=V._fullLayout._visibleModules,G=[];for(Z=0;Z<K.length;Z++){var W=K[Z];W.style&&i.pushUnique(G,W.style)}
1220for(Z=0;Z<G.length;Z++)G[Z](V)},s.sanitizeMargins=function(V){if(V&&V.margin){var Z,K=V.width,G=V.height,W=V.margin,Q=K-(W.l+W.r),R=G-(W.t+W.b);Q<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=(G-1)/(W.t+W.b),W.t=Math.floor(Z*W.t),W.b=Math.floor(Z*W.b))}},s.clearAutoMarginIds=function(V){V._fullLayout._pushmarginIds={}},s.allowAutoMargin=function(V,Z){V._fullLayout._pushmarginIds[Z]=1},s.autoMargin=function(V,Z,K){var G=V._fullLayout,W=G.width,Q=G.height,R=G.margin,N=i.constrain(W-R.l-R.r,2,64),U=i.constrain(Q-R.t-R.b,2,64),ee=Math.max(0,W-N),j=Math.max(0,Q-U),X=G._pushmargin,J=G._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)),ee){var ne=(K.l+K.r)/ee;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(!G._replotting)return s.doAutoMargin(V)}},s.doAutoMargin=function(V){var Z=V._fullLayout,K=Z.width,G=Z.height;Z._size||(Z._size={}),P(Z);var W=Z._size,Q=Z.margin,R=i.extendFlat({},W),N=Q.l,U=Q.r,ee=Q.t,j=Q.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:ee},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 _e in X){if(y(ce)&&X[_e].r){var we=X[_e].r.val,Ee=X[_e].r.size;if(we>pe){var fe=(ce*we+(Ee-K)*pe)/(we-pe),ge=(Ee*(1-pe)+(ce-K)*(1-we))/(we-pe);fe+ge>N+U&&(N=fe,U=ge)}}if(y(xe)&&X[_e].t){var ke=X[_e].t.val,be=X[_e].t.size;if(ke>de){var Se=(xe*ke+(be-G)*de)/(ke-de),Oe=(be*(1-de)+(xe-G)*(1-ke))/(ke-de);Se+Oe>j+ee&&(j=Se,ee=Oe)}}}}}var De=i.constrain(K-Q.l-Q.r,2,64),je=i.constrain(G-Q.t-Q.b,2,64),Je=Math.max(0,K-De),ze=Math.max(0,G-je);if(Je){var Ue=(N+U)/Je;Ue>1&&(N/=Ue,U/=Ue)}if(ze){var Ge=(j+ee)/ze;Ge>1&&(j/=Ge,ee/=Ge)}if(W.l=Math.round(N),W.r=Math.round(U),W.t=Math.round(ee),W.b=Math.round(j),W.p=Math.round(Q.pad),W.w=Math.round(K)-W.l-W.r,W.h=Math.round(G)-W.t-W.b,!Z._replotting&&s.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,i.warn("Too many auto-margin redraws.")}(function(et){var ct=l.list(et,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(mt){for(var Ct=0;Ct<ct.length;Ct++){var Tt=ct[Ct][mt];Tt&&Tt()}})})(V)};var S=["l","r","t","b","p","w","h"];function E(V,Z,K){var G=!1,W=[s.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,s.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(){G=!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 ee(){return N++,function(){U++,G||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(ee),setTimeout(ee())})}],Q=i.syncOrAsync(W,V);return Q&&Q.then||(Q=Promise.resolve()),Q.then(function(){return V})}s.didMarginChange=function(V,Z){for(var K=0;K<S.length;K++){var G=S[K],W=V[G],Q=Z[G];if(!y(W)||Math.abs(Q-W)>1)return!0}return!1},s.graphJson=function(V,Z,K,G,W,Q){(W&&Z&&!V._fullData||W&&!Z&&!V._fullLayout)&&s.supplyDefaults(V);var R=W?V._fullData:V.data,N=W?V._fullLayout:V.layout,U=(V._transitionData||{})._frames;function ee(J,re){if(typeof J=="function")return re?"_function_":null;if(i.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&&!i.isPlainObject(J.stream))return}else if(K!=="keepall"&&typeof(ne=J[oe+"src"])=="string"&&ne.indexOf(":")>0)return;se[oe]=ee(J[oe],re)}else re&&(se[oe]="_function")}),se}return Array.isArray(J)?J.map(function(oe){return ee(oe,re)}):i.isTypedArray(J)?i.simpleMap(J,i.identity):i.isJSDate(J)?i.ms2DateTimeLocal(+J):J}var j={data:(R||[]).map(function(J){var re=ee(J);return Z&&delete re.fit,re})};if(!Z&&(j.layout=ee(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=ee(U)),Q&&(j.config=ee(V._context,!0)),G==="object"?j:JSON.stringify(j)},s.modifyFrames=function(V,Z){var K,G,W,Q=V._transitionData._frames,R=V._transitionData._frameHash;for(K=0;K<Z.length;K++)switch((G=Z[K]).type){case"replace":W=G.value;var N=(Q[G.index]||{}).name,U=W.name;Q[G.index]=R[U]=W,U!==N&&(delete R[N],R[U]=W);break;case"insert":R[(W=G.value).name]=W,Q.splice(G.index,0,W);break;case"delete":delete R[(W=Q[G.index]).name],Q.splice(G.index,1)}return Promise.resolve()},s.computeFrame=function(V,Z){var K,G,W,Q,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],ee=[N.name];
1220N.baseframe&&(N=R[N.baseframe.toString()])&&ee.indexOf(N.name)===-1;)U.push(N),ee.push(N.name);for(var j={};N=U.pop();)if(N.layout&&(j.layout=s.extendLayout(j.layout,N.layout)),N.data){if(j.data||(j.data=[]),!(G=N.traces))for(G=[],K=0;K<N.data.length;K++)G[K]=K;for(j.traces||(j.traces=[]),K=0;K<N.data.length;K++)(W=G[K])!=null&&((Q=j.traces.indexOf(W))===-1&&(Q=j.data.length,j.traces[Q]=W),j.data[Q]=s.extendTrace(j.data[Q],N.data[K]))}return j},s.recomputeFrameHash=function(V){for(var Z=V._transitionData._frameHash={},K=V._transitionData._frames,G=0;G<K.length;G++){var W=K[G];W&&W.name&&(Z[W.name]=W)}},s.extendObjectWithContainers=function(V,Z,K){var G,W,Q,R,N,U,ee,j=i.extendDeepNoArrays({},Z||{}),X=i.expandObjectPaths(j),J={};if(K&&K.length)for(Q=0;Q<K.length;Q++)(W=(G=i.nestedProperty(X,K[Q])).get())===void 0?i.nestedProperty(J,K[Q]).set(null):(G.set(null),i.nestedProperty(J,K[Q]).set(W));if(V=i.extendDeepNoArrays(V||{},X),K&&K.length){for(Q=0;Q<K.length;Q++)if(U=i.nestedProperty(J,K[Q]).get()){for(ee=(N=i.nestedProperty(V,K[Q])).get(),Array.isArray(ee)||(ee=[],N.set(ee)),R=0;R<U.length;R++){var re=U[R];ee[R]=re===null?null:s.extendObjectWithContainers(ee[R],re)}N.set(ee)}}return V},s.dataArrayContainers=["transforms","dimensions"],s.layoutArrayContainers=e.layoutArrayContainers,s.extendTrace=function(V,Z){return s.extendObjectWithContainers(V,Z,s.dataArrayContainers)},s.extendLayout=function(V,Z){return s.extendObjectWithContainers(V,Z,s.layoutArrayContainers)},s.transition=function(V,Z,K,G,W,Q){var R={redraw:W.redraw},N={},U=[];return R.prepareFn=function(){for(var ee=Array.isArray(Z)?Z.length:0,j=G.slice(0,ee),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]]=s.extendTrace(V.data[j[X]],Z[X])}}var se=i.expandObjectPaths(i.extendDeepNoArrays({},K)),oe=/^[xy]axis[0-9]*$/;for(var pe in se)oe.test(pe)&&delete se[pe].range;s.extendLayout(V.layout,se),delete V.calcdata,s.supplyDefaults(V),s.doCalcdata(V);var ce=i.expandObjectPaths(K);if(ce){var de=V._fullLayout._plots;for(var xe in de){var _e=de[xe],we=_e.xaxis,Ee=_e.yaxis,fe=we.range.slice(),ge=Ee.range.slice(),ke=null,be=null,Se=null,Oe=null;Array.isArray(ce[we._name+".range"])?ke=ce[we._name+".range"].slice():Array.isArray((ce[we._name]||{}).range)&&(ke=ce[we._name].range.slice()),Array.isArray(ce[Ee._name+".range"])?be=ce[Ee._name+".range"].slice():Array.isArray((ce[Ee._name]||{}).range)&&(be=ce[Ee._name].range.slice()),fe&&ke&&(we.r2l(fe[0])!==we.r2l(ke[0])||we.r2l(fe[1])!==we.r2l(ke[1]))&&(Se={xr0:fe,xr1:ke}),ge&&be&&(Ee.r2l(ge[0])!==Ee.r2l(be[0])||Ee.r2l(ge[1])!==Ee.r2l(be[1]))&&(Oe={yr0:ge,yr1:be}),(Se||Oe)&&U.push(i.extendFlat({plotinfo:_e},Se,Oe))}}return Promise.resolve()},R.runFn=function(ee){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,ee);for(var ne in re?((j=i.extendFlat({},Q)).duration=0,delete N.cartesian):j=Q,N){var se=N[ne];V._fullData[se[0]]._module.basePlotModule.plot(V,se,j,ee)}},E(V,Q,R)},s.transitionFromReact=function(V,Z,K,G){var W=V._fullLayout,Q=W.transition,R={},N=[];return R.prepareFn=function(){var U=W._plots;for(var ee in R.redraw=!1,Z.anim==="some"&&(R.redraw=!0),K.anim==="some"&&(R.redraw=!0),U){var j=U[ee],X=j.xaxis,J=j.yaxis,re=G[X._name].range.slice(),ne=G[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(i.extendFlat({plotinfo:j},pe,ce))}return Promise.resolve()},R.runFn=function(U){for(var ee,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,ee,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?Q.ordering==="traces first"?(ee=i.extendFlat({},Q,{duration:0}),X=ne,j=Q,setTimeout(oe,Q.duration),pe()):(ee=Q,X=null,j=i.extendFlat({},Q,{duration:0}),setTimeout(pe,ee.duration),oe()):N.length?(ee=Q,oe()):Z.anim&&(X=ne,j=Q,pe())},E(V,Q,R)},s.doCalcdata=function(V,Z){var K,G,W,Q,R=l.list(V),N=V._fullData,U=V._fullLayout,ee=new Array(N.length),j=(V.calcdata||[]).slice();for(V.calcdata=ee,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&&(ee[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],G=K._module,K.visible===!0&&K.transforms){if(G&&G.calc){var de=G.calc(V,K);de[0]&&de[0].t&&de[0].t._scene&&delete de[0].t._scene.dirty}for(Q=0;Q<K.transforms.length;Q++){var xe=K.transforms[Q];(G=x[xe.type])&&G.calcTransform&&(K._hasCalcTransform=!0,ne=!0,G.calcTransform(V,K,xe))}}}function oe(ce,de){if(K=N[ce],!!(G=K._module).isContainer===de){var xe=[];if(K.visible===!0&&K._length!==0){delete K._indexToPoints;var _e=K.transforms||[];for(Q=_e.length-1;Q>=0;Q--)if(_e[Q].enabled){K._indexToPoints=_e[Q]._indexToPoints;break}G&&G.calc&&(xe=G.calc(V,K))}Array.isArray(xe)&&xe[0]||(xe=[{x:d,y:d}]),xe[0].t||(xe[0].t={}),xe[0].trace=K,ee[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,_e,we,Ee,fe,ge=[];function ke(ft,Ce,Ie){var Te=Ce._id.charAt(0);if(ft==="histogram2dcontour"){var Pe=Ce._counterAxes[0],Ve=l.getFromId(de,Pe),tt=Te==="x"||Pe==="x"&&Ve.type==="category",ot=Te==="y"||Pe==="y"&&Ve.type==="category";return function(at,_t){return at===0||_t===0||tt&&at===Ie[_t].length-1||ot&&_t===Ie.length-1?-1:(Te==="y"?_t:at)-1}}return function(at,_t){return Te==="y"?_t:at}}var be={min:function(ft){return i.aggNums(Math.min,null,ft)},max:function(ft){return i.aggNums(Math.max,null,ft)},sum:function(ft){return i.aggNums(function(Ce,Ie){return Ce+Ie},null,ft)},total:function(ft){return i.aggNums(function(Ce,Ie){return Ce+Ie},null,ft)},mean:function(ft){return i.mean(ft)},median:function(ft){return i.median(ft)}};for(xe=0;xe<ce.length;xe++){var Se=ce[xe];if(Se.type==="category"){var Oe=Se.categoryorder.match(D);if(Oe){var De=Oe[1],je=Oe[2],Je=Se._id.charAt(0),ze=Je==="x",Ue=[];for(_e=0;_e<Se._categories.length;
1220_e++)Ue.push([Se._categories[_e],[]]);for(_e=0;_e<Se._traceIndices.length;_e++){var Ge=Se._traceIndices[_e],Ye=de._fullData[Ge];if(Ye.visible===!0){var et=Ye.type;e.traceIs(Ye,"histogram")&&(delete Ye._xautoBinFinished,delete Ye._yautoBinFinished);var ct=et==="splom",mt=et==="scattergl",Ct=de.calcdata[Ge];for(we=0;we<Ct.length;we++){var Tt,nt,Qe=Ct[we];if(ct){var Et=Ye._axesDim[Se._id];if(!ze){var Gt=Ye._diag[Et][0];Gt&&(Se=de._fullLayout[l.id2name(Gt)])}var Xt=Qe.trace.dimensions[Et].values;for(Ee=0;Ee<Xt.length;Ee++)for(Tt=Se._categoriesMap[Xt[Ee]],fe=0;fe<Qe.trace.dimensions.length;fe++)if(fe!==Et){var Fe=Qe.trace.dimensions[fe];Ue[Tt][1].push(Fe.values[Ee])}}else if(mt){for(Ee=0;Ee<Qe.t.x.length;Ee++)ze?(Tt=Qe.t.x[Ee],nt=Qe.t.y[Ee]):(Tt=Qe.t.y[Ee],nt=Qe.t.x[Ee]),Ue[Tt][1].push(nt);Qe.t&&Qe.t._scene&&delete Qe.t._scene.dirty}else if(Qe.hasOwnProperty("z")){nt=Qe.z;var qe=ke(Ye.type,Se,nt);for(Ee=0;Ee<nt.length;Ee++)for(fe=0;fe<nt[Ee].length;fe++)(Tt=qe(fe,Ee))+1&&Ue[Tt][1].push(nt[Ee][fe])}else for((Tt=Qe.p)===void 0&&(Tt=Qe[Je]),(nt=Qe.s)===void 0&&(nt=Qe.v),nt===void 0&&(nt=ze?Qe.y:Qe.x),Array.isArray(nt)||(nt=nt===void 0?[]:[nt]),Ee=0;Ee<nt.length;Ee++)Ue[Tt][1].push(nt[Ee])}}}Se._categoriesValue=Ue;var wt=[];for(_e=0;_e<Ue.length;_e++)wt.push([Ue[_e][0],be[De](Ue[_e][1])]);wt.sort(function(ft,Ce){return ft[1]-Ce[1]}),Se._categoriesAggregatedValue=wt,Se._initialCategories=wt.map(function(ft){return ft[0]}),je==="descending"&&Se._initialCategories.reverse(),ge=ge.concat(Se.sortByInitialCategories())}}}return ge}(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 G={};function W(U){U.clearCalc(),U.type==="multicategory"&&U.setupMultiCategory(Z),G[U._id]=1}i.simpleMap(V,W);for(var Q=K._axisMatchGroups||[],R=0;R<Q.length;R++)for(var N in Q[R])G[N]||W(K[l.id2name(N)])}function H(V){var Z,K,G,W=V._fullLayout,Q=W._visibleModules,R={};for(K=0;K<Q.length;K++){var N=Q[K],U=N.crossTraceCalc;if(U){var ee=N.basePlotModule.name;R[ee]?i.pushUnique(R[ee],U):R[ee]=[U]}}for(G in R){var j=R[G],X=W._subplots[G];if(Array.isArray(X))for(Z=0;Z<X.length;Z++){var J=X[Z],re=G==="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)}}s.rehover=function(V){V._fullLayout._rehover&&V._fullLayout._rehover()},s.redrag=function(V){V._fullLayout._redrag&&V._fullLayout._redrag()},s.generalUpdatePerTraceModule=function(V,Z,K,G){var W,Q=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 ee in Q)if(!R[ee]){var j=Q[ee][0];j[0].trace.visible=!1,R[ee]=[j]}for(var X in R){var J=R[X];J[0][0].trace._module.plot(V,Z,i.filterVisible(J),G)}Z.traceHash=R},s.plotBasePlot=function(V,Z,K,G,W){var Q=e.getModule(V),R=o(Z.calcdata,Q)[0];Q.plot(Z,R,G,W)},s.cleanBasePlot=function(V,Z,K,G,W){var Q=W._has&&W._has(V),R=K._has&&K._has(V);Q&&!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(v,$,te){$.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:8,MINZOOM:20,OFFEDGE:20}},{}],621:[function(v,$,te){var m=v("../../lib"),g=v("../../lib/polygon").tester,b=m.findIndexOfMin,y=m.isAngleInsideSector,e=m.angleDelta,n=m.angleDist;function t(l,a,u,f){var o,h,p=f[0],s=f[1],x=r(Math.sin(a)-Math.sin(l)),c=r(Math.cos(a)-Math.cos(l)),T=Math.tan(u),_=r(1/T),w=x/c,k=s-w*p;return _?x&&c?h=T*(o=k/(T-w)):c?(o=s*_,h=s):(o=p,h=p*T):x&&c?(o=0,h=k):c?(o=0,h=s):o=h=NaN,[o,h]}function i(l,a,u,f){return m.isFullCircle([a,u])?function(o,h){var p,s=h.length,x=new Array(s+1);for(p=0;p<s;p++){var c=h[p];x[p]=[o*Math.cos(c),o*Math.sin(c)]}return x[p]=x[0].slice(),x}(l,f):function(o,h,p,s){var x,c,T=s.length,_=[];function w(F){return[o*Math.cos(F),o*Math.sin(F)]}function k(F,H,V){return t(F,H,V,w(F))}function L(F){return m.mod(F,T)}function A(F){return y(F,[h,p])}var I=b(s,function(F){return A(F)?n(F,h):1/0}),P=k(s[I],s[L(I-1)],h);for(_.push(P),x=I,c=0;c<T;x++,c++){var S=s[L(x)];if(!A(S))break;_.push(w(S))}var E=b(s,function(F){return A(F)?n(F,p):1/0}),D=k(s[E],s[L(E+1)],p);return _.push(D),_.push([0,0]),_.push(_[0].slice()),_}(l,a,u,f)}function r(l){return Math.abs(l)>1e-10?l:0}function d(l,a,u){a=a||0,u=u||0;for(var f=l.length,o=new Array(f),h=0;h<f;h++){var p=l[h];o[h]=[a+p[0],u-p[1]]}return o}$.exports={isPtInsidePolygon:function(l,a,u,f,o){if(!y(a,f))return!1;var h,p;u[0]<u[1]?(h=u[0],p=u[1]):(h=u[1],p=u[0]);var s=g(i(h,f[0],f[1],o)),x=g(i(p,f[0],f[1],o)),c=[l*Math.cos(a),l*Math.sin(a)];
1220return x.contains(c)&&!s.contains(c)},findPolygonOffset:function(l,a,u,f){for(var o=1/0,h=1/0,p=i(l,a,u,f),s=0;s<p.length;s++){var x=p[s];o=Math.min(o,x[0]),h=Math.min(h,-x[1])}return[o,h]},findEnclosingVertexAngles:function(l,a){var u=b(a,function(o){var h=e(o,l);return h>0?h:1/0}),f=m.mod(u+1,a.length);return[a[u],a[f]]},findIntersectionXY:t,findXYatLength:function(l,a,u,f){var o=-a*u,h=a*a+1,p=2*(a*o-u),s=o*o+u*u-l*l,x=Math.sqrt(p*p-4*h*s),c=(-p+x)/(2*h),T=(-p-x)/(2*h);return[[c,a*c+o+f],[T,a*T+o+f]]},clampTiny:r,pathPolygon:function(l,a,u,f,o,h){return"M"+d(i(l,a,u,f),o,h).join("L")},pathPolygonAnnulus:function(l,a,u,f,o,h,p){var s,x;l<a?(s=l,x=a):(s=a,x=l);var c=d(i(s,u,f,o),h,p);return"M"+d(i(x,u,f,o),h,p).reverse().join("L")+"M"+c.join("L")}}},{"../../lib":503,"../../lib/polygon":515}],622:[function(v,$,te){var m=v("../get_data").getSubplotCalcData,g=v("../../lib").counterRegex,b=v("./polar"),y=v("./constants"),e=y.attr,n=y.name,t=g(n),i={};i[e]={valType:"subplotid",dflt:n,editType:"calc"},$.exports={attr:e,name:n,idRoot:n,idRegex:t,attrRegex:t,attributes:i,layoutAttributes:v("./layout_attributes"),supplyLayoutDefaults:v("./layout_defaults"),plot:function(r){for(var d=r._fullLayout,l=r.calcdata,a=d._subplots[n],u=0;u<a.length;u++){var f=a[u],o=m(l,n,f),h=d[f]._subplot;h||(h=b(r,f),d[f]._subplot=h),h.plot(o,d,r._promises)}},clean:function(r,d,l,a){for(var u=a._subplots[n]||[],f=a._has&&a._has("gl"),o=d._has&&d._has("gl"),h=f&&!o,p=0;p<u.length;p++){var s=u[p],x=a[s]._subplot;if(!d[s]&&x)for(var c in x.framework.remove(),x.layers["radial-axis-title"].remove(),x.clipPaths)x.clipPaths[c].remove();h&&x._scene&&(x._scene.destroy(),x._scene=null)}},toSVG:v("../cartesian").toSVG}},{"../../lib":503,"../cartesian":568,"../get_data":593,"./constants":620,"./layout_attributes":623,"./layout_defaults":624,"./polar":625}],623:[function(v,$,te){var m=v("../../components/color/attributes"),g=v("../cartesian/layout_attributes"),b=v("../domain").attributes,y=v("../../lib").extendFlat,e=v("../../plot_api/edit_types").overrideAll,n=e({color:g.color,showline:y({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:y({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth},"plot","from-root"),t=e({tickmode:g.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickfont:g.tickfont,tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,layer:g.layer},"plot","from-root"),i={visible:y({},g.visible,{dflt:!0}),type:y({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorange:y({},g.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},range:y({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:g.categoryorder,categoryarray:g.categoryarray,angle:{valType:"angle",editType:"plot"},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:y({},g.title.text,{editType:"plot",dflt:""}),font:y({},g.title.font,{editType:"plot"}),editType:"plot"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:g._deprecated.title,titlefont:g._deprecated.titlefont}};y(i,n,t);var r={visible:y({},g.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:g.autotypenumbers,categoryorder:g.categoryorder,categoryarray:g.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:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};y(r,n,t),$.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:m.background},radialaxis:i,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(v,$,te){var m=v("../../lib"),g=v("../../components/color"),b=v("../../plot_api/plot_template"),y=v("../subplot_defaults"),e=v("../get_data").getSubplotData,n=v("../cartesian/tick_value_defaults"),t=v("../cartesian/tick_mark_defaults"),i=v("../cartesian/tick_label_defaults"),r=v("../cartesian/prefix_suffix_defaults"),d=v("../cartesian/category_order_defaults"),l=v("../cartesian/line_grid_defaults"),a=v("../cartesian/axis_autotype"),u=v("./layout_attributes"),f=v("./set_convert"),o=v("./constants"),h=o.axisNames;function p(x,c,T,_){var w=T("bgcolor");_.bgColor=g.combine(w,_.paper_bgcolor);var k=T("sector");T("hole");var L,A=e(_.fullData,o.name,_.id),I=_.layoutOut;function P(ee,j){return T(L+"."+ee,j)}for(var S=0;S<h.length;S++){L=h[S],m.isPlainObject(x[L])||(x[L]={});var E=x[L],D=b.newContainer(c,L);D._id=D._name=L,D._attr=_.id+"."+L,D._traceIndices=A.map(function(ee){return ee._expandedIndex});var F=o.axisName2dataArray[L],H=s(E,D,P,A,F,_);d(E,D,P,{axData:A,dataAttr:F});var V=P("visible");switch(f(D,c,I),P("uirevision",c.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"){m.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 G=P("direction");P("rotation",{counterclockwise:0,clockwise:90}[G])}if(r(E,D,P,D.type,{tickSuffixDflt:D.thetaunit==="degrees"?"\xB0":void 0}),V){var W,Q,R,N,U=_.font||{};Q=(W=P("color"))===E.color?W:U.color,R=U.size,N=U.family,n(E,D,P,D.type),i(E,D,P,D.type,{font:{color:Q,size:R,family:N}}),t(E,D,P,{outerTicks:!0}),l(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"),m.coerceFont(P,"title.font",{color:Q,size:m.bigFont(R),family:N}))}H!=="category"&&P("hoverformat"),D._input=E}c.angularaxis.type==="category"&&T("gridshape")}function s(x,c,T,_,w,k){var L=T("autotypenumbers",k.autotypenumbersDflt);if(T("type")==="-"){for(var A,I=0;I<_.length;I++)if(_[I].visible){A=_[I];break}A&&A[w]&&(c.type=a(A[w],"gregorian",{noMultiCategory:!0,autotypenumbers:L})),c.type==="-"?c.type="linear":x.type=c.type}return c.type}$.exports=function(x,c,T){y(x,c,T,{type:o.name,attributes:u,handleDefaults:p,font:c.font,autotypenumbersDflt:c.autotypenumbers,paper_bgcolor:c.paper_bgcolor,fullData:T,layoutOut:c})}},{"../../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(v,$,te){var m=v("@plotly/d3"),g=v("tinycolor2"),b=v("../../registry"),y=v("../../lib"),e=y.strRotate,n=y.strTranslate,t=v("../../components/color"),i=v("../../components/drawing"),r=v("../plots"),d=v("../../plots/cartesian/axes"),l=v("../cartesian/set_convert"),a=v("./set_convert"),u=v("../cartesian/autorange").doAutoRange,f=v("../cartesian/dragbox"),o=v("../../components/dragelement"),h=v("../../components/fx"),p=v("../../components/titles"),s=v("../cartesian/select").prepSelect,x=v("../cartesian/select").selectOnClick,c=v("../cartesian/select").clearSelect,T=v("../../lib/setcursor"),_=v("../../lib/clear_gl_canvase
1220s"),w=v("../../plot_api/subroutines").redrawReglTraces,k=v("../../constants/alignment").MID_SHIFT,L=v("./constants"),A=v("./helpers"),I=v("../smith/helpers"),P=I.smith,S=I.reactanceArc,E=I.resistanceArc,D=I.smithTransform,F=y._,H=y.mod,V=y.deg2rad,Z=y.rad2deg;function K(N,U,ee){this.isSmith=ee||!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["_"+(ee?"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},ee||(this.radialTickLayout=null,this.angularTickLayout=null)}var G=K.prototype;function W(N){var U=N.ticks+String(N.ticklen)+String(N.showticklabels);return"side"in N&&(U+=N.side),U}function Q(N,U){return U[y.findIndexOfMin(U,function(ee){return y.angleDist(N,ee)})]}function R(N,U,ee){return U?(N.attr("display",null),N.attr(ee)):N&&N.attr("display","none"),N}$.exports=function(N,U,ee){return new K(N,U,ee)},G.plot=function(N,U){for(var ee=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,ee),this.updateLayout(U,ee),r.generalUpdatePerTraceModule(this.gd,this,N,ee),this.updateFx(U,ee),this.isSmith&&(delete ee.realaxis.range,delete ee.imaginaryaxis.range)},G.updateLayers=function(N,U){var ee=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=(ee?"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 _e=j[xe]=m.select(this);switch(xe){case"frontplot":ee||_e.append("g").classed("barlayer",!0),_e.append("g").classed("scatterlayer",!0);break;case"backplot":_e.append("g").classed("maplayer",!0);break;case"plotbg":j.bg=_e.append("path");break;case"radial-grid":case"angular-grid":_e.style("fill","none");break;case"radial-line":_e.append("line").style("fill","none");break;case"angular-line":_e.append("path").style("fill","none")}}),de.order()},G.updateLayout=function(N,U){var ee=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,_e,we,Ee=this.sectorBBox=function(mt){var Ct,Tt,nt,Qe,Et=mt[0],Gt=mt[1]-Et,Xt=H(Et,360),Fe=Xt+Gt,qe=Math.cos(V(Xt)),wt=Math.sin(V(Xt)),ft=Math.cos(V(Fe)),Ce=Math.sin(V(Fe));return Qe=Xt<=90&&Fe>=90||Xt>90&&Fe>=450?1:wt<=0&&Ce<=0?0:Math.max(wt,Ce),Ct=Xt<=180&&Fe>=180||Xt>180&&Fe>=540?-1:qe>=0&&ft>=0?0:Math.min(qe,ft),Tt=Xt<=270&&Fe>=270||Xt>270&&Fe>=630?-1:wt>=0&&Ce>=0?0:Math.min(wt,Ce),nt=Fe>=360?1:qe<=0&&ft<=0?0:Math.max(qe,ft),[Ct,Tt,nt,Qe]}(pe),fe=Ee[2]-Ee[0],ge=Ee[3]-Ee[1],ke=oe/se,be=Math.abs(ge/fe);ke>be?(ce=se,we=(oe-(de=se*be))/j.h/2,xe=[re[0],re[1]],_e=[ne[0]+we,ne[1]-we]):(de=oe,we=(se-(ce=oe/be))/j.w/2,xe=[re[0]+we,re[1]-we],_e=[ne[0],ne[1]]),this.xLength2=ce,this.yLength2=de,this.xDomain2=xe,this.yDomain2=_e;var Se,Oe=this.xOffset2=j.l+j.w*xe[0],De=this.yOffset2=j.t+j.h*(1-_e[1]),je=this.radius=ce/fe,Je=this.innerRadius=this.getHole(U)*je,ze=this.cx=Oe-je*Ee[0],Ue=this.cy=De+je*Ee[3],Ge=this.cxx=ze-Oe,Ye=this.cyy=Ue-De,et=X.side;et==="counterclockwise"?(Se=et,et="top"):et==="clockwise"&&(Se=et,et="bottom"),this.radialAxis=this.mockAxis(N,U,X,{_id:"x",side:et,_trueSide:Se,domain:[Je/j.w,je/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:_e});var ct=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",ct).attr("transform",n(Ge,Ye)),ee.frontplot.attr("transform",n(Oe,De)).call(i.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),ee.bg.attr("d",ct).attr("transform",n(ze,Ue)).call(t.fill,U.bgcolor)},G.mockAxis=function(N,U,ee,j){var X=y.extendFlat({},ee,j);return a(X,U,N),X},G.mockCartesianAxis=function(N,U,ee){var j=this,X=j.isSmith,J=ee._id,re=y.extendFlat({type:"linear"},ee);l(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},G.doAutoRange=function(N,U){var ee=this.gd,j=this.radialAxis,X=this.getRadial(U);u(ee,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")]},G.updateRadialAxis=function(N,U){var ee=this,j=ee.gd,X=ee.layers,J=ee.radius,re=ee.innerRadius,ne=ee.cx,se=ee.cy,oe=ee.getRadial(U),pe=H(ee.getSector(U)[0],360),ce=ee.radialAxis,de=re<J,xe=ee.isSmith;xe||(ee.fillViewInitialKey("radialaxis.angle",oe.angle),ee.fillViewInitialKey("radialaxis.range",ce.range.slice()),ce.setGeometry()),ce.tickangle==="auto"&&pe>90&&pe<=270&&(ce.tickangle=180);var _e=xe?function(je){var Je=D(ee,P([je.x,0]));return n(Je[0]-ne,Je[1]-se)}:function(je){return n(ce.l2p(je.x)+re,0)},we=xe?function(je){return E(ee,je.x,-1/0,1/0)}:function(je){return ee.pathArc(ce.r2p(je.x)+re)},Ee=W(oe);
1220if(ee.radialTickLayout!==Ee&&(X["radial-axis"].selectAll(".xtick").remove(),ee.radialTickLayout=Ee),de){ce.setScale();var fe=0,ge=xe?(ce.tickvals||[]).filter(function(je){return je>=0}).map(function(je){return d.tickText(ce,je,!0,!1)}):d.calcTicks(ce),ke=xe?ge:d.clipEnds(ce,ge),be=d.getTickSigns(ce)[2];xe&&((ce.ticks==="top"&&ce.side==="bottom"||ce.ticks==="bottom"&&ce.side==="top")&&(be=-be),ce.ticks==="top"&&ce.side==="top"&&(fe=-ce.ticklen),ce.ticks==="bottom"&&ce.side==="bottom"&&(fe=ce.ticklen)),d.drawTicks(j,ce,{vals:ge,layer:X["radial-axis"],path:d.makeTickPath(ce,0,be),transFn:_e,crisp:!1}),d.drawGrid(j,ce,{vals:ke,layer:X["radial-grid"],path:we,transFn:y.noop,crisp:!1}),d.drawLabels(j,ce,{vals:ge,layer:X["radial-axis"],transFn:_e,labelFns:d.makeLabelFns(ce,fe)})}var Se=ee.radialAxisAngle=ee.vangles?Z(Q(V(oe.angle),ee.vangles)):oe.angle,Oe=n(ne,se),De=Oe+e(-Se);R(X["radial-axis"],de&&(oe.showticklabels||oe.ticks),{transform:De}),R(X["radial-grid"],de&&oe.showgrid,{transform:xe?"":Oe}),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)},G.updateRadialAxisTitle=function(N,U,ee){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=i.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=ee!==void 0?ee:this.radialAxisAngle,_e=V(xe),we=Math.cos(_e),Ee=Math.sin(_e),fe=J+X/2*we+oe*Ee,ge=re-X/2*Ee+oe*we;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:ge,"text-anchor":"middle"},transform:{rotate:-xe}})}},G.updateAngularAxis=function(N,U){var ee=this,j=ee.gd,X=ee.layers,J=ee.radius,re=ee.innerRadius,ne=ee.cx,se=ee.cy,oe=ee.getAngular(U),pe=ee.angularAxis,ce=ee.isSmith;ce||(ee.fillViewInitialKey("angularaxis.rotation",oe.rotation),pe.setGeometry(),pe.setScale());var de=ce?function(je){var Je=D(ee,P([0,je.x]));return Math.atan2(Je[0]-ne,Je[1]-se)-Math.PI/2}:function(je){return pe.t2g(je.x)};pe.type==="linear"&&pe.thetaunit==="radians"&&(pe.tick0=Z(pe.tick0),pe.dtick=Z(pe.dtick));var xe=function(je){return n(ne+J*Math.cos(je),se-J*Math.sin(je))},_e=ce?function(je){var Je=D(ee,P([0,je.x]));return n(Je[0],Je[1])}:function(je){return xe(de(je))},we=ce?function(je){var Je=D(ee,P([0,je.x])),ze=Math.atan2(Je[0]-ne,Je[1]-se)-Math.PI/2;return n(Je[0],Je[1])+e(-Z(ze))}:function(je){var Je=de(je);return xe(Je)+e(-Z(Je))},Ee=ce?function(je){return S(ee,je.x,0,1/0)}:function(je){var Je=de(je),ze=Math.cos(Je),Ue=Math.sin(Je);return"M"+[ne+re*ze,se-re*Ue]+"L"+[ne+J*ze,se-J*Ue]},fe=d.makeLabelFns(pe,0).labelStandoff,ge={xFn:function(je){var Je=de(je);return Math.cos(Je)*fe},yFn:function(je){var Je=de(je),ze=Math.sin(Je)>0?.2:1;return-Math.sin(Je)*(fe+je.fontSize*ze)+Math.abs(Math.cos(Je))*(je.fontSize*k)},anchorFn:function(je){var Je=de(je),ze=Math.cos(Je);return Math.abs(ze)<.1?"middle":ze>0?"start":"end"},heightFn:function(je,Je,ze){var Ue=de(je);return-.5*(1+Math.sin(Ue))*ze}},ke=W(oe);ee.angularTickLayout!==ke&&(X["angular-axis"].selectAll("."+pe._id+"tick").remove(),ee.angularTickLayout=ke);var be,Se=ce?[1/0].concat(pe.tickvals||[]).map(function(je){return d.tickText(pe,je,!0,!1)}):d.calcTicks(pe);if(ce&&(Se[0].text="\u221E",Se[0].fontSize*=1.75),U.gridshape==="linear"?(be=Se.map(de),y.angleDelta(be[0],be[1])<0&&(be=be.slice().reverse())):be=null,ee.vangles=be,pe.type==="category"&&(Se=Se.filter(function(je){return y.isAngleInsideSector(de(je),ee.sectorInRad)})),pe.visible){var Oe=pe.ticks==="inside"?-1:1,De=(pe.linewidth||1)/2;d.drawTicks(j,pe,{vals:Se,layer:X["angular-axis"],path:"M"+Oe*De+",0h"+Oe*pe.ticklen,transFn:we,crisp:!1}),d.drawGrid(j,pe,{vals:Se,layer:X["angular-grid"],path:Ee,transFn:y.noop,crisp:!1}),d.drawLabels(j,pe,{vals:Se,layer:X["angular-axis"],repositionOnUpdate:!0,transFn:_e,labelFns:ge})}R(X["angular-line"].select("path"),oe.showline,{d:ee.pathSubplot(),transform:n(ne,se)}).attr("stroke-width",oe.linewidth).call(t.stroke,oe.linecolor)},G.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))},G.updateHoverAndMainDrag=function(N){var U,ee,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,_e=j.cxx,we=j.cyy,Ee=j.sectorInRad,fe=j.vangles,ge=j.radialAxis,ke=A.clampTiny,be=A.findXYatLength,Se=A.findEnclosingVertexAngles,Oe=L.cornerHalfWidth,De=L.cornerLen/2,je=f.makeDragger(re,"path","maindrag","crosshair");m.select(je).attr("d",j.pathSubplot()).attr("transform",n(de,xe)),je.onmousemove=function(tt){h.hover(J,tt,j.id),J._fullLayout._lasthover=je,J._fullLayout._hoversubplot=j.id},je.onmouseout=function(tt){J._dragging||o.unhover(J,tt)};var Je,ze,Ue,Ge,Ye,et,ct,mt,Ct,Tt={element:je,gd:J,subplot:j.id,plotinfo:{id:j.id,xaxis:j.xaxis,yaxis:j.yaxis},xaxes:[j.xaxis],yaxes:[j.yaxis]};function nt(tt,ot){return Math.sqrt(tt*tt+ot*ot)}function Qe(tt,ot){return nt(tt-_e,ot-we)}function Et(tt,ot){return Math.atan2(we-ot,tt-_e)}function Gt(tt,ot){return[tt*Math.cos(ot),tt*Math.sin(-ot)]}function Xt(tt,ot){if(tt===0)return j.pathSector(2*Oe);var at=De/tt,_t=ot-at,bt=ot+at,jt=Math.max(0,Math.min(tt,pe)),Nt=jt-Oe,$e=jt+Oe;return"M"+Gt(Nt,_t)+"A"+[Nt,Nt]+" 0,0,0 "+Gt(Nt,bt)+"L"+Gt($e,bt)+"A"+[$e,$e]+" 0,0,1 "+Gt($e,_t)+"Z"}function Fe(tt,ot,at){if(tt===0)return j.pathSector(2*Oe);var _t,bt,jt=Gt(tt,ot),Nt=Gt(tt,at),$e=ke((jt[0]+Nt[0])/2),yt=ke((jt[1]+Nt[1])/2);if($e&&yt){var Ot=yt/$e,Mt=-1/Ot,Pt=be(Oe,Ot,$e,yt);_t=be(De,Mt,Pt[0][0],Pt[0][1]),bt=be(De,Mt,Pt[1][0],Pt[1][1])}else{var Le,Xe;yt?(Le=De,Xe=Oe):(Le=Oe,Xe=De),_t=[[$e-Le,yt-Xe],[$e+Le,yt-Xe]],bt=[[$e-Le,yt+Xe],[$e+Le,yt+Xe]]}return"M"+_t.join("L")+"L"+bt.reverse().join("L")+"Z"}function qe(tt,ot){return ot=Math.max(Math.min(ot,pe),ce),tt<oe?tt=0:pe-tt<oe?tt=pe:ot<oe?ot=0:pe-ot<oe&&(ot=pe),Math.abs(ot-tt)>se?(tt<ot?(Ue=tt,Ge=ot):(Ue=ot,Ge=tt),!0):(Ue=null,Ge=null,!1)}function wt(tt,ot){tt=tt||Ye,ot=ot||"M0,0Z",mt.attr("d",tt),Ct.attr("d",ot),f.transitionZoombox(mt,Ct,et,ct),et=!0;var at={};Pe(at),J.emit("plotly_relayouting",at)}function ft(tt,ot){var at,_t,bt=Je+(tt*=U),jt=ze+(ot*=ee),Nt=Qe(Je,ze),$e=Math.min(Qe(bt,jt),pe),yt=Et(Je,ze);qe(Nt,$e)&&(at=Ye+j.pathSector(Ge),Ue&&(at+=j.pathSector(Ue)),_t=Xt(Ue,yt)+Xt(Ge,yt)),wt(at,_t)}function Ce(tt,ot,at,_t){var bt=A.findIntersectionXY(at,_t,at,[tt-_e,we-ot]);return nt(bt[0],bt[1])}function Ie(tt,ot){var at,_t,bt=Je+tt,jt=ze+ot,Nt=Et(Je,ze),$e=Et(bt,jt),yt=Se(Nt,fe),Ot=Se($e,fe);qe(Ce(Je,ze,yt[0],yt[1]),Math.min(Ce(bt,jt,Ot[0],Ot[1]),pe))&&(at=Ye+j.pathSector(Ge),Ue&&(at+=j.pathSector(Ue)),_t=[Fe(Ue,yt[0],yt[1]),Fe(Ge,yt[0],yt[1])].join(" ")),wt(at,_t)}function Te(){if(f.removeZoombox(J),Ue!==null&&Ge!==null){var tt={};Pe(tt),f.showDoubleClickNotifier(J),b.call("_guiRelayout",J,tt)}}function Pe(tt){var ot=ge._rl,at=(ot[1]-ot[0])/(1-ce/pe)/pe,_t=[ot[0]+(Ue-ce)*at,ot[0]+(Ge-ce)*at];tt[j.id+".radialaxis.range"]=_t}function Ve(tt,ot){var at=J._fullLayout.clickmode;if(f.removeZoombox(J),tt===2){var _t={};for(var bt in j.viewInitial)_t[j.id+"."+bt]=j.viewInitial[bt];J.emit("plotly_doubleclick",null),b.call("_guiRelayout",J,_t)}at.indexOf("select")>-1&&tt===1&&x(ot,J,[j.xaxis],[j.yaxis],j.id,Tt),at.indexOf("event")>-1&&h.click(J,ot,j.id)}Tt.prepFn=function(tt,ot,at){var _t=J._fullLayout.dragmode,bt=je.getBoundingClientRect();J._fullLayout._calcInverseTransform(J);var jt=J._fullLayout._invTransform;U=J._fullLayout._invScaleX,ee=J._fullLayout._invScaleY;var Nt=y.apply3DTransform(jt)(ot-bt.left,at-bt.top);if(Je=Nt[0],ze=Nt[1],fe){var $e=A.findPolygonOffset(pe,Ee[0],Ee[1],fe);Je+=_e+$e[0],ze+=we+$e[1]}switch(_t){case"zoom":Tt.clickFn=Ve,X||(Tt.moveFn=fe?Ie:ft,Tt.doneFn=Te,function(){Ue=null,Ge=null,Ye=j.pathSubplot(),et=!1;var yt=J._fullLayout[j.id];ct=g(yt.bgcolor).getLuminance(),(mt=f.makeZoombox(ne,ct,de,xe,Ye)).attr("fill-rule","evenodd"),Ct=f.makeCorners(ne,de,xe),c(J)}());break;case"select":case"lasso":s(tt,ot,at,Tt,_t)}},o.init(Tt)},G.updateRadialDrag=function(N,U,ee){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,_e,we,Ee=V(j.radialAxisAngle),fe=pe._rl,ge=fe[0],ke=fe[1],be=fe[ee],Se=.75*(fe[1]-fe[0])/(1-j.getHole(U))/re;ee?(xe=se+(re+de)*Math.cos(Ee),_e=oe-(re+de)*Math.sin(Ee),we="radialdrag"):(xe=se+(ne-de)*Math.cos(Ee),_e=oe-(ne-de)*Math.sin(Ee),we="radialdrag-inner");
1220var Oe,De,je,Je=f.makeRectDragger(J,we,"crosshair",-de,-de,ce,ce),ze={element:Je,gd:X};R(m.select(Je),pe.visible&&ne<re,{transform:n(xe,_e)}),ze.prepFn=function(){Oe=null,De=null,je=null,ze.moveFn=Ue,ze.doneFn=Ge,c(X)},ze.clampFn=function(ct,mt){return Math.sqrt(ct*ct+mt*mt)<L.MINDRAG&&(ct=0,mt=0),[ct,mt]},o.init(ze)}function Ue(ct,mt){if(Oe)Oe(ct,mt);else{var Ct=[ct,-mt],Tt=[Math.cos(Ee),Math.sin(Ee)],nt=Math.abs(y.dot(Ct,Tt)/Math.sqrt(y.dot(Ct,Ct)));isNaN(nt)||(Oe=nt<.5?Ye:et)}var Qe={};(function(Et){De!==null?Et[j.id+".radialaxis.angle"]=De:je!==null&&(Et[j.id+".radialaxis.range["+ee+"]"]=je)})(Qe),X.emit("plotly_relayouting",Qe)}function Ge(){De!==null?b.call("_guiRelayout",X,j.id+".radialaxis.angle",De):je!==null&&b.call("_guiRelayout",X,j.id+".radialaxis.range["+ee+"]",je)}function Ye(ct,mt){if(ee!==0){var Ct=xe+ct,Tt=_e+mt;De=Math.atan2(oe-Tt,Ct-se),j.vangles&&(De=Q(De,j.vangles)),De=Z(De);var nt=n(se,oe)+e(-De);J["radial-axis"].attr("transform",nt),J["radial-line"].select("line").attr("transform",nt);var Qe=j.gd._fullLayout,Et=Qe[j.id];j.updateRadialAxisTitle(Qe,Et,De)}}function et(ct,mt){var Ct=y.dot([ct,-mt],[Math.cos(Ee),Math.sin(Ee)]);if(je=be-Se*Ct,Se>0==(ee?je>ge:je<ke)){var Tt=X._fullLayout,nt=Tt[j.id];pe.range[ee]=je,pe._rl[ee]=je,j.updateRadialAxis(Tt,nt),j.xaxis.setRange(),j.xaxis.setScale(),j.yaxis.setRange(),j.yaxis.setScale();var Qe=!1;for(var Et in j.traceHash){var Gt=j.traceHash[Et],Xt=y.filterVisible(Gt);Gt[0][0].trace._module.plot(X,j,Xt,nt),b.traceIs(Et,"gl")&&Xt.length&&(Qe=!0)}Qe&&(_(X),w(X))}else je=null}},G.updateAngularDrag=function(N){var U=this,ee=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:ee};function xe(ze,Ue){return Math.atan2(oe+pe-Ue,ze-se-pe)}m.select(ce).attr("d",U.pathAnnulus(X,X+pe)).attr("transform",n(re,ne)).call(T,"move");var _e,we,Ee,fe,ge,ke,be=j.frontplot.select(".scatterlayer").selectAll(".trace"),Se=be.selectAll(".point"),Oe=be.selectAll(".textpoint");function De(ze,Ue){var Ge=U.gd._fullLayout,Ye=Ge[U.id],et=xe(_e+ze*N._invScaleX,we+Ue*N._invScaleY),ct=Z(et-ke);if(fe=Ee+ct,j.frontplot.attr("transform",n(U.xOffset2,U.yOffset2)+e([-ct,se,oe])),U.vangles){ge=U.radialAxisAngle+ct;var mt=n(re,ne)+e(-ct),Ct=n(re,ne)+e(-ge);j.bg.attr("transform",mt),j["radial-grid"].attr("transform",mt),j["radial-axis"].attr("transform",Ct),j["radial-line"].select("line").attr("transform",Ct),U.updateRadialAxisTitle(Ge,Ye,ge)}else U.clipPaths.forTraces.select("path").attr("transform",n(se,oe)+e(ct));Se.each(function(){var Xt=m.select(this),Fe=i.getTranslate(Xt);Xt.attr("transform",n(Fe.x,Fe.y)+e([ct]))}),Oe.each(function(){var Xt=m.select(this),Fe=Xt.select("text"),qe=i.getTranslate(Xt);Xt.attr("transform",e([ct,Fe.attr("x"),Fe.attr("y")])+n(qe.x,qe.y))}),J.rotation=y.modHalf(fe,360),U.updateAngularAxis(Ge,Ye),U._hasClipOnAxisFalse&&!y.isFullCircle(U.sectorInRad)&&be.call(i.hideOutsideRangePoints,U);var Tt=!1;for(var nt in U.traceHash)if(b.traceIs(nt,"gl")){var Qe=U.traceHash[nt],Et=y.filterVisible(Qe);Qe[0][0].trace._module.plot(ee,U,Et,Ye),Et.length&&(Tt=!0)}Tt&&(_(ee),w(ee));var Gt={};je(Gt),ee.emit("plotly_relayouting",Gt)}function je(ze){ze[U.id+".angularaxis.rotation"]=fe,U.vangles&&(ze[U.id+".radialaxis.angle"]=ge)}function Je(){Oe.select("text").attr("transform",null);var ze={};je(ze),b.call("_guiRelayout",ee,ze)}de.prepFn=function(ze,Ue,Ge){var Ye=N[U.id];Ee=Ye.angularaxis.rotation;var et=ce.getBoundingClientRect();_e=Ue-et.left,we=Ge-et.top,ee._fullLayout._calcInverseTransform(ee);var ct=y.apply3DTransform(N._invTransform)(_e,we);_e=ct[0],we=ct[1],ke=xe(_e,we),de.moveFn=De,de.doneFn=Je,c(ee)},U.vangles&&!y.isFullCircle(U.sectorInRad)&&(de.prepFn=y.noop,T(m.select(ce),null)),o.init(de)},G.isPtInside=function(N){if(this.isSmith)return!0;var U=this.sectorInRad,ee=this.vangles,j=this.angularAxis.c2g(N.theta),X=this.radialAxis,J=X.c2l(N.r),re=X._rl;return(ee?A.isPtInsidePolygon:y.isPtInsideSector)(J,j,re,U,ee)},G.pathArc=function(N){var U=this.sectorInRad,ee=this.vangles;return(ee?A.pathPolygon:y.pathArc)(N,U[0],U[1],ee)},G.pathSector=function(N){var U=this.sectorInRad,ee=this.vangles;return(ee?A.pathPolygon:y.pathSector)(N,U[0],U[1],ee)},G.pathAnnulus=function(N,U){var ee=this.sectorInRad,j=this.vangles;return(j?A.pathPolygonAnnulus:y.pathAnnulus)(N,U,ee[0],ee[1],j)},G.pathSubplot=function(){var N=this.innerRadius,U=this.radius;return N?this.pathAnnulus(N,U):this.pathSector(U)},G.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_canvase
1220s":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(v,$,te){var m=v("../../lib"),g=v("../cartesian/set_convert"),b=m.deg2rad,y=m.rad2deg;$.exports=function(e,n,t){switch(g(e,t),e._id){case"x":case"radialaxis":(function(i,r){var d=r._subplot;i.setGeometry=function(){var l=i._rl[0],a=i._rl[1],u=d.innerRadius,f=(d.radius-u)/(a-l),o=u/f,h=l>a?function(p){return p<=0}:function(p){return p>=0};i.c2g=function(p){var s=i.c2l(p)-l;return(h(s)?s:0)+o},i.g2c=function(p){return i.l2c(p+l-o)},i.g2p=function(p){return p*f},i.c2p=function(p){return i.g2p(i.c2g(p))}}})(e,n);break;case"angularaxis":(function(i,r){var d=i.type;if(d==="linear"){var l=i.d2c,a=i.c2d;i.d2c=function(u,f){return function(o,h){return h==="degrees"?b(o):o}(l(u),f)},i.c2d=function(u,f){return a(function(o,h){return h==="degrees"?y(o):o}(u,f))}}i.makeCalcdata=function(u,f){var o,h,p=u[f],s=u._length,x=function(k){return i.d2c(k,u.thetaunit)};if(p){if(m.isTypedArray(p)&&d==="linear"){if(s===p.length)return p;if(p.subarray)return p.subarray(0,s)}for(o=new Array(s),h=0;h<s;h++)o[h]=x(p[h])}else{var c=f+"0",T="d"+f,_=c in u?x(u[c]):0,w=u[T]?x(u[T]):(i.period||2*Math.PI)/s;for(o=new Array(s),h=0;h<s;h++)o[h]=_+h*w}return o},i.setGeometry=function(){var u,f,o,h,p=r.sector,s=p.map(b),x={clockwise:-1,counterclockwise:1}[i.direction],c=b(i.rotation),T=function(L){return x*L+c},_=function(L){return(L-c)/x};switch(d){case"linear":f=u=m.identity,h=b,o=y,i.range=m.isFullCircle(s)?[p[0],p[0]+360]:s.map(_).map(y);break;case"category":var w=i._categories.length,k=i.period?Math.max(i.period,w):w;k===0&&(k=1),f=h=function(L){return 2*L*Math.PI/k},u=o=function(L){return L*k/Math.PI/2},i.range=[0,k]}i.c2g=function(L){return T(f(L))},i.g2c=function(L){return u(_(L))},i.t2g=function(L){return T(h(L))},i.g2t=function(L){return o(_(L))}}})(e,n)}}},{"../../lib":503,"../cartesian/set_convert":576}],627:[function(v,$,te){$.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},{}],628:[function(v,$,te){function m(e){return e<0?-1:e>0?1:0}function g(e){var n=e[0],t=e[1];if(!isFinite(n)||!isFinite(t))return[1,0];var i=(n+1)*(n+1)+t*t;return[(n*n+t*t-1)/i,2*t/i]}function b(e,n){var t=n[0],i=n[1];return[t*e.radius+e.cx,-i*e.radius+e.cy]}function y(e,n){return n*e.radius}$.exports={smith:g,reactanceArc:function(e,n,t,i){var r=b(e,g([t,n])),d=r[0],l=r[1],a=b(e,g([i,n])),u=a[0],f=a[1];if(n===0)return["M"+d+","+l,"L"+u+","+f].join(" ");var o=y(e,1/Math.abs(n));return["M"+d+","+l,"A"+o+","+o+" 0 0,"+(n<0?1:0)+" "+u+","+f].join(" ")},resistanceArc:function(e,n,t,i){var r=y(e,1/(n+1)),d=b(e,g([n,t])),l=d[0],a=d[1],u=b(e,g([n,i])),f=u[0],o=u[1];if(m(t)!==m(i)){var h=b(e,g([n,0]));return["M"+l+","+a,"A"+r+","+r+" 0 0,"+(0<t?0:1)+" "+h[0]+","+h[1],"A"+r+","+r+" 0 0,"+(i<0?0:1)+f+","+o].join(" ")}return["M"+l+","+a,"A"+r+","+r+" 0 0,"+(i<t?0:1)+" "+f+","+o].join(" ")},smithTransform:b}},{}],629:[function(v,$,te){var m=v("../get_data").getSubplotCalcData,g=v("../../lib").counterRegex,b=v("../polar/polar"),y=v("./constants"),e=y.attr,n=y.name,t=g(n),i={};i[e]={valType:"subplotid",dflt:n,editType:"calc"},$.exports={attr:e,name:n,idRoot:n,idRegex:t,attrRegex:t,attributes:i,layoutAttributes:v("./layout_attributes"),supplyLayoutDefaults:v("./layout_defaults"),plot:function(r){for(var d=r._fullLayout,l=r.calcdata,a=d._subplots[n],u=0;u<a.length;u++){var f=a[u],o=m(l,n,f),h=d[f]._subplot;h||(h=b(r,f,!0),d[f]._subplot=h),h.plot(o,d,r._promises)}},clean:function(r,d,l,a){for(var u=a._subplots[n]||[],f=0;f<u.length;f++){var o=u[f],h=a[o]._subplot;if(!d[o]&&h)for(var p in h.framework.remove(),h.clipPaths)h.clipPaths[p].remove()}},toSVG:v("../cartesian").toSVG}},{"../../lib":503,"../cartesian":568,"../get_data":593,"../polar/polar":625,"./constants":627,"./layout_attributes":630,"./layout_defaults":631}],630:[function(v,$,te){var m=v("../../components/color/attributes"),g=v("../cartesian/layout_attributes"),b=v("../domain").attributes,y=v("../../lib").extendFlat,e=v("../../plot_api/edit_types").overrideAll,n=e({color:g.color,showline:y({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:y({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth},"plot","from-root"),t=e({ticklen:g.ticklen,tickwidth:y({},g.tickwidth,{dflt:2}),tickcolor:g.tickcolor,showticklabels:g.showticklabels,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,tickfont:g.tickfont,tickformat:g.tickformat,hoverformat:g.hoverformat,layer:g.layer},"plot","from-root"),i=y({visible:y({},g.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:y({},g.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=y({visible:y({},g.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:g.ticks,editType:"calc"},n,t);$.exports={domain:b({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:m.background},realaxis:i,imaginaryaxis:r,editType:"calc"}},{"../../components/color/attributes":365,"../../lib":503,"../../plot_api/edit_types":536,"../cartesian/layout_attributes":569,"../domain":584}],631:[function(v,$,te){var m,g,b,y=v("../../lib"),e=v("../../components/color"),n=v("../../plot_api/plot_template"),t=v("../subplot_defaults"),i=v("../get_data").getSubplotData,r=v("../cartesian/prefix_suffix_defaults"),d=v("../cartesian/tick_label_defaults"),l=v("../cartesian/line_grid_defaults"),a=v("../cartesian/set_convert"),u=v("./layout_attributes"),f=v("./constants"),o=f.axisNames,h=(m=function(s){return s.slice().reverse().map(function(x){return-x}).concat([0]).concat(s)},g=String,b={},function(s){var x=g?g(s):s;if(x in b)return b[x];var c=m(s);return b[x]=c,c});function p(s,x,c,T){var _=c("bgcolor");T.bgColor=e.combine(_,T.paper_bgcolor);var w,k=i(T.fullData,f.name,T.id),L=T.layoutOut;function A(G,W){return c(w+"."+G,W)}for(var I=0;I<o.length;I++){w=o[I],y.isPlainObject(s[w])||(s[w]={});var P=s[w],S=n.newContainer(x,w);S._id=S._name=w,S._attr=T.id+"."+w,S._traceIndices=k.map(function(G){return G._expandedIndex});var E=A("visible");if(S.type="linear",a(S,L),r(P,S,A,S.type),E){var D,F,H,V,Z=w==="realaxis";Z&&A("side"),Z?A("tickvals"):A("tickvals",h(x.realaxis.tickvals||u.realaxis.tickvals.dflt));var K=T.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}}),y.coerce2(s,x,u,w+".ticklen"),y.coerce2(s,x,u,w+".tickwidth"),y.coerce2(s,x,u,w+".tickcolor",x.color),A("ticks")||(delete x[w].ticklen,delete x[w].tickwidth,delete x[w].tickcolor),l(P,S,A,{dfltColor:D,bgColor:T.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u[w]}),A("layer")}A("hoverformat"),delete S.type,S._input=P}}$.exports=function(s,x,c){t(s,x,c,{noUirevision:!0,type:f.name,attributes:u,handleDefaults:p,font:x.font,paper_bgcolor:x.paper_bgcolor,fullData:c,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(v,$,te){var m=v("../lib"),g=v("../plot_api/plot_template"),b=v("./domain").defaults;$.exports=function(y,e,n,t){var i,r,d=t.type,l=t.attributes,a=t.handleDefaults,u=t.partition||"x",f=e._subplots[d],o=f.length,h=o&&f[0].replace(/\d+$/,"");function p(T,_){return m.coerce(i,r,l,T,_)}for(var s=0;s<o;s++){var x=f[s];i=y[x]?y[x]:y[x]={},r=g.newContainer(e,x,h),t.noUirevision||p("uirevision",e.uirevision);var c={};c[u]=[s/o,(s+1)/o],b(r,e,p,c),t.id=x,a(i,r,p,t)}}},{"../lib":503,"../plot_api/plot_template":543,"./domain":584}],633:[function(v,$,te){var m=v("../constants/docs");m.FORMAT_LINK,m.DATE_FORMAT_LINK;function g(b){var y=b.description?" "+b.description:"",e=b.keys||[];if(e.length>0){for(var n=[],t=0;t<e.length;t++)n[t]="`"+e[t]+"`";y+="Finally, the template string has access to ",y=e.length===1?"variable "+n[0]:"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return y}te.hovertemplateAttrs=function(b,y){b=b||{},g(y=y||{});var e={valType:"string",dflt:"",editType:b.editType||"none"};return b.arrayOk!==!1&&(e.arrayOk=!0),e},te.texttemplateAttrs=function(b,y){b=b||{},g(y=y||{});var e={valType:"string",dflt:"",editType:b.editType||"calc"};return b.arrayOk!==!1&&(e.arrayOk=!0),e}},{"../constants/docs":474}],634:[function(v,$,te){var m=v("./ternary"),g=v("../../plots/get_data").getSubplotCalcData,b=v("../../lib").counterRegex;te.name="ternary";var y=te.attr="subplot";te.idRoot="ternary",te.idRegex=te.attrRegex=b("ternary"),(te.attributes={})[y]={valType:"subplotid",dflt:"ternary",editType:"calc"},te.layoutAttributes=v("./layout_attributes"),te.supplyLayoutDefaults=v("./layout_defaults"),te.plot=function(e){for(var n=e._fullLayout,t=e.calcdata,i=n._subplots.ternary,r=0;r<i.length;r++){var d=i[r],l=g(t,"ternary",d),a=n[d]._subplot;a||(a=new m({id:d,graphDiv:e,container:n._ternarylayer.node()},n),n[d]._subplot=a),a.plot(l,n,e._promises)}},te.clean=function(e,n,t,i){for(var r=i._subplots.ternary||[],d=0;d<r.length;d++){var l=r[d],a=i[l]._subplot;!n[l]&&a&&(a.plotContainer.remove(),a.clipDef.remove(),a.clipDefRelative.remove(),a.layers["a-title"].remove(),a.layers["b-title"].remove(),a.layers["c-title"].remove())}}},{"../../lib":503,"../../plots/get_data":593,"./layout_attributes":635,"./layout_defaults":636,"./ternary":637}],635:[function(v,$,te){var m=v("../../components/color/attributes"),g=v("../domain").attributes,b=v("../cartesian/layout_attributes"),y=v("../../plot_api/edit_types").overrideAll,e=v("../../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=$.exports=y({domain:g({name:"ternary"}),bgcolor:{valType:"color",dflt:m.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(v,$,te){var m=v("../../components/color"),g=v("../../plot_api/plot_template"),b=v("../../lib"),y=v("../subplot_defaults"),e=v("../cartesian/tick_label_defaults"),n=v("../cartesian/prefix_suffix_defaults"),t=v("../cartesian/tick_mark_defaults"),i=v("../cartesian/tick_value_defaults"),r=v("../cartesian/line_grid_defaults"),d=v("./layout_attributes"),l=["aaxis","baxis","caxis"];function a(f,o,h,p){var s,x,c,T=h("bgcolor"),_=h("sum");p.bgColor=m.combine(T,p.paper_bgcolor);for(var w=0;w<l.length;w++)x=f[s=l[w]]||{},(c=g.newContainer(o,s))._name=s,u(x,c,p,o);var k=o.aaxis,L=o.baxis,A=o.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,o,h,p){var s=d[o._name];function x(L,A){return b.coerce(f,o,s,L,A)}x("uirevision",p.uirevision),o.type="linear";var c=x("color"),T=c!==s.color.dflt?c:h.font.color,_=o._name.charAt(0).toUpperCase(),w="Component "+_,k=x("title.text",w);o._hovertitle=k===w?k:_,b.coerceFont(x,"title.font",{family:h.font.family,size:b.bigFont(h.font.size),color:T}),x("min"),i(f,o,x,"linear"),n(f,o,x,"linear"),e(f,o,x,"linear"),t(f,o,x,{outerTicks:!0}),x("showticklabels")&&(b.coerceFont(x,"tickfont",{family:h.font.family,size:h.font.size,color:T}),x("tickangle"),x("tickformat")),r(f,o,x,{dfltColor:c,bgColor:h.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:s}),x("hoverformat"),x("layer")}$.exports=function(f,o,h){y(f,o,h,{type:"ternary",attributes:d,handleDefaults:a,font:o.font,paper_bgcolor:o.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(v,$,te){var m=v("@plotly/d3"),g=v("tinycolor2"),b=v("../../registry"),y=v("../../lib"),e=y.strTranslate,n=y._,t=v("../../components/color"),i=v("../../components/drawing"),r=v("../cartesian/set_convert"),d=v("../../lib/extend").extendFlat,l=v("../plots"),a=v("../cartesian/axes"),u=v("../../components/dragelement"),f=v("../../components/fx"),o=v("../../components/dragelement/helpers"),h=o.freeMode,p=o.rectMode,s=v("../../components/titles"),x=v("../cartesian/select").prepSelect,c=v("../cartesian/select").selectOnClick,T=v("../cartesian/select").clearSelect,_=v("../cartesian/select").clearSelectionsCache,w=v("../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}$.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 G=0;G<H.length;G++)if(H[G][0].trace.cliponaxis===!1){this._hasClipOnAxisFalse=!0;break}this.updateLayers(Z),this.adjustLayout(Z,K),l.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,G=this.clipIdRelative="clip-relative"+this.layoutId+this.id;this.clipDef=y.ensureSingleById(H._clips,"clipPath",K,function(W){W.append("path").attr("d","M0,0Z")}),this.clipDefRelative=y.ensureSingleById(H._clips,"clipPath",G,function(W){W.append("path").attr("d","M0,0Z")}),this.plotContainer=y.ensureSingle(this.container,"g",this.id),this.updateLayers(Z),i.setClipUrl(this.layers.backplot,K,V),i.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),G=["agrid","bgrid","cgrid"];K.enter().append("g").attr("class",function(W){return"toplevel "+W}).each(function(W){var Q=m.select(this);V[W]=Q,W==="frontplot"?Q.append("g").classed("scatterlayer",!0):W==="backplot"?Q.append("g").classed("maplayer",!0):W==="plotbg"?Q.append("path").attr("d","M0,0Z"):W==="aline"||W==="bline"||W==="cline"?Q.append("path"):W==="grids"&&G.forEach(function(R){V[R]=Q.append("g").classed("grid "+R,!0)})}),K.order()};var A=Math.sqrt(4/3);L.adjustLayout=function(H,V){var Z,K,G,W,Q,R,N=this,U=H.domain,ee=(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?G=(W=ne)*A:W=(G=re)/A,Q=X*G/re,R=J*W/ne,Z=V.l+V.w*ee-G/2,K=V.t+V.h*(1-j)-W/2,N.x0=Z,N.y0=K,N.w=G,N.h=W,N.sum=se,N.xaxis={type:"linear",range:[oe+2*ce-se,se-oe-2*pe],domain:[ee-Q/2,ee+Q/2],_id:"x"},r(N.xaxis,N.graphDiv._fullLayout),N.xaxis.setScale(),N.xaxis.isPtWithinRange=function(Oe){return Oe.a>=N.aaxis.range[0]&&Oe.a<=N.aaxis.range[1]&&Oe.b>=N.baxis.range[1]&&Oe.b<=N.baxis.range[0]&&Oe.c>=N.caxis.range[1]&&Oe.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:G});r(xe,N.graphDiv._fullLayout),xe.setScale();var _e=N.baxis=d({},H.baxis,{range:[se-oe-ce,pe],side:"bottom",domain:N.xaxis.domain,anchor:"free",position:0,_id:"x",_length:G});r(_e,N.graphDiv._fullLayout),_e.setScale();var we=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:G});r(we,N.graphDiv._fullLayout),we.setScale();var Ee="M"+Z+","+(K+W)+"h"+G+"l-"+G/2+",-"+W+"Z";N.clipDef.select("path").attr("d",Ee),N.layers.plotbg.select("path").attr("d",Ee);var fe="M0,"+W+"h"+G+"l-"+G/2+",-"+W+"Z";N.clipDefRelative.select("path").attr("d",fe);var ge=e(Z,K);N.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ge),N.clipDefRelative.select("path").attr("transform",null);var ke=e(Z-_e._offset,K+W);N.layers.baxis.attr("transform",ke),N.layers.bgrid.attr("transform",ke);var be=e(Z+G/2,K)+"rotate(30)"+e(0,-xe._offset);N.layers.aaxis.attr("transform",be),N.layers.agrid.attr("transform",be);var Se=e(Z+G/2,K)+"rotate(-30)"+e(0,-we._offset);N.layers.caxis.attr("transform",Se),N.layers.cgrid.attr("transform",Se),N.drawAxes(!0),N.layers.aline.select("path").attr("d",xe.showline?"M"+Z+","+(K+W)+"l"+G/2
1220+",-"+W:"M0,0").call(t.stroke,xe.linecolor||"#000").style("stroke-width",(xe.linewidth||0)+"px"),N.layers.bline.select("path").attr("d",_e.showline?"M"+Z+","+(K+W)+"h"+G:"M0,0").call(t.stroke,_e.linecolor||"#000").style("stroke-width",(_e.linewidth||0)+"px"),N.layers.cline.select("path").attr("d",we.showline?"M"+(Z+G/2)+","+K+"l"+G/2+","+W:"M0,0").call(t.stroke,we.linecolor||"#000").style("stroke-width",(we.linewidth||0)+"px"),N.graphDiv._context.staticPlot||N.initInteractions(),i.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,G=this.aaxis,W=this.baxis,Q=this.caxis;if(this.drawAx(G),this.drawAx(W),this.drawAx(Q),H){var R=Math.max(G.showticklabels?G.tickfont.size/2:0,(Q.showticklabels?.75*Q.tickfont.size:0)+(Q.ticks==="outside"?.87*Q.ticklen:0)),N=(W.showticklabels?W.tickfont.size:0)+(W.ticks==="outside"?W.ticklen:0)+3;K["a-title"]=s.draw(V,"a"+Z,{propContainer:G,propName:this.id+".aaxis.title",placeholder:n(V,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-G.title.font.size/3-R,"text-anchor":"middle"}}),K["b-title"]=s.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"]=s.draw(V,"c"+Z,{propContainer:Q,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*Q.title.font.size+N,"text-anchor":"middle"}})}},L.drawAx=function(H){var V,Z=this.graphDiv,K=H._name,G=K.charAt(0),W=H._id,Q=this.layers[K],R=G+"tickLayout",N=(V=H).ticks+String(V.ticklen)+String(V.showticklabels);this[R]!==N&&(Q.selectAll("."+W+"tick").remove(),this[R]=N),H.setScale();var U=a.calcTicks(H),ee=a.clipEnds(H,U),j=a.makeTransTickFn(H),X=a.getTickSigns(H)[2],J=y.deg2rad(30),re=X*(H.linewidth||1)/2,ne=X*H.ticklen,se=this.w,oe=this.h,pe=G==="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}[G];a.drawTicks(Z,H,{vals:H.ticks==="inside"?ee:U,layer:Q,path:pe,transFn:j,crisp:!1}),a.drawGrid(Z,H,{vals:ee,layer:this.layers[G+"grid"],path:ce,transFn:j,crisp:!1}),a.drawLabels(Z,H,{vals:U,layer:Q,transFn:j,labelFns:a.makeLabelFns(H,0,30)})};var I=w.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){m.select(H).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}L.clearSelect=function(){_(this.dragOptions),T(this.dragOptions.gd)},L.initInteractions=function(){var H,V,Z,K,G,W,Q,R,N,U,ee,j,X=this,J=X.layers.plotbg.select("path").node(),re=X.graphDiv,ne=re._fullLayout._zoomlayer;function se(fe){var ge={};return ge[X.id+".aaxis.min"]=fe.a,ge[X.id+".baxis.min"]=fe.b,ge[X.id+".caxis.min"]=fe.c,ge}function oe(fe,ge){var ke=re._fullLayout.clickmode;F(re),fe===2&&(re.emit("plotly_doubleclick",null),b.call("_guiRelayout",re,se({a:0,b:0,c:0}))),ke.indexOf("select")>-1&&fe===1&&c(ge,re,[X.xaxis],[X.yaxis],X.id,X.dragOptions),ke.indexOf("event")>-1&&f.click(re,ge,X.id)}function pe(fe,ge){return 1-ge/X.h}function ce(fe,ge){return 1-(fe+(X.h-ge)/Math.sqrt(3))/X.w}function de(fe,ge){return(fe-(X.h-ge)/Math.sqrt(3))/X.w}function xe(fe,ge){var ke=Z+fe*H,be=K+ge*V,Se=Math.max(0,Math.min(1,pe(0,K),pe(0,be))),Oe=Math.max(0,Math.min(1,ce(Z,K),ce(ke,be))),De=Math.max(0,Math.min(1,de(Z,K),de(ke,be))),je=(Se/2+De)*X.w,Je=(1-Se/2-Oe)*X.w,ze=(je+Je)/2,Ue=Je-je,Ge=(1-Se)*X.h,Ye=Ge-Ue/A;Ue<w.MINZOOM?(Q=G,ee.attr("d",N),j.attr("d","M0,0Z")):(Q={a:G.a+Se*W,b:G.b+Oe*W,c:G.c+De*W},ee.attr("d",N+"M"+je+","+Ge+"H"+Je+"L"+ze+","+Ye+"L"+je+","+Ge+"Z"),j.attr("d","M"+Z+","+K+"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2ZM"+je+","+Ge+P+"M"+Je+","+Ge+S+"M"+ze+","+Ye+E)),U||(ee.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(Q))}function _e(){F(re),Q!==G&&(b.call("_guiRelayout",re,se(Q)),D&&re.data&&re._context.showTips&&(y.notifier(n(re,"Double-click to zoom back out"),"long"),D=!1))}function we(fe,ge){var ke=fe/X.xaxis._m,be=ge/X.yaxis._m,Se=[(Q={a:G.a-be,b:G.b+(ke+be)/2,c:G.c-(ke-be)/2}).a,Q.b,Q.c].sort(y.sorterAsc),Oe=Se.indexOf(Q.a),De=Se.indexOf(Q.b),je=Se.indexOf(Q.c);Se[0]<0&&(Se[1]+Se[0]/2<0?(Se[2]+=Se[0]+Se[1],Se[0]=Se[1]=0):(Se[2]+=Se[0]/2,Se[1]+=Se[0]/2,Se[0]=0),Q={a:Se[Oe],b:Se[De],c:Se[je]},ge=(G.a-Q.a)*X.yaxis._m,fe=(G.c-Q.c-G.b+Q.b)*X.xaxis._m);var Je=e(X.x0+fe,X.y0+ge);X.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Je);var ze=e(-fe,-ge);X.clipDefRelative.select("path").attr("transform",ze),X.aaxis.range=[Q.a,X.sum-Q.b-Q.c],X.baxis.range=[X.sum-Q.a-Q.c,Q.b],X.caxis.range=[X.sum-Q.a-Q.b,Q.c],X.drawAxes(!1),X._hasClipOnAxisFalse&&X.plotContainer.select(".scatterlayer").selectAll(".trace").call(i.hideOutsideRangePoints,X),re.emit("plotly_relayouting",se(Q))}function Ee(){b.call("_guiRelayout",re,se(Q))}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,ge,ke){X.dragOptions.xaxes=[X.xaxis],X.dragOptions.yaxes=[X.yaxis],H=re._fullLayout._invScaleX,V=re._fullLayout._invScaleY;var be=X.dragOptions.dragmode=re._fullLayout.dragmode;h(be)?X.dragOptions.minDrag=1:X.dragOptions.minDrag=void 0,be==="zoom"?(X.dragOptions.moveFn=xe,X.dragOptions.clickFn=oe,X.dragOptions.doneFn=_e,function(Se,Oe,De){var je=J.getBoundingClientRect();Z=Oe-je.left,K=De-je.top,re._fullLayout._calcInverseTransform(re);var Je=re._fullLayout._invTransform,ze=y.apply3DTransform(Je)(Z,K);Z=ze[0],K=ze[1],G={a:X.aaxis.range[0],b:X.baxis.range[1],c:X.caxis.range[1]},Q=G,W=X.aaxis.range[1]-G.a,R=g(X.graphDiv._fullLayout[X.id].bgcolor).getLuminance(),N="M0,"+X.h+"L"+X.w/2+", 0L"+X.w+","+X.h+"Z",U=!1,ee=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,ge,ke)):be==="pan"?(X.dragOptions.moveFn=we,X.dragOptions.clickFn=oe,X.dragOptions.doneFn=Ee,G={a:X.aaxis.range[0],b:X.baxis.range[1],c:X.caxis.range[1]},Q=G,X.clearSelect(re)):(p(be)||h(be))&&x(fe,ge,ke,X.dragOptions,be)}},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(v,$,te){var m=v("./lib/loggers"),g=v("./lib/noop"),b=v("./lib/push_unique"),y=v("./lib/is_plain_object"),e=v("./lib/dom").addStyleRule,n=v("./lib/extend"),t=v("./plots/attributes"),i=v("./plots/layout_attributes"),r=n.extendFlat,d=n.extendDeepAll;function l(c){var T=c.name,_=c.categories,w=c.meta;if(te.modules[T])m.log("Type "+T+" already registered");else{te.subplotsRegistry[c.basePlotModule.name]||function(D){var F=D.name;if(te.subplotsRegistry[F])return void m.log("Plot type "+F+" already registered.");for(var H in o(D),te.subplotsRegistry[F]=D,te.componentsRegistry)s(H,D.name)}(c.basePlotModule);for(var k={},L=0;L<_.length;L++)k[_[L]]=!0,te.allCategories[_[L]]=!0;for(var A in te.modules[T]={_module:c,categories:k},w&&Object.keys(w).length&&(te.modules[T].meta=w),te.allTypes.push(T),te.componentsRegistry)h(A,T);c.layoutAttributes&&r(te.traceLayoutAttributes,c.layoutAttributes);var I=c.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 a(c){if(typeof c.name!="string")throw new Error("Component module *name* must be a string.");var T=c.name;for(var _ in te.componentsRegistry[T]=c,c.layoutAttributes&&(c.layoutAttributes._isLinkedToArray&&b(te.layoutArrayContainers,T),o(c)),te.modules)h(T,_);for(var w in te.subplotsRegistry)s(T,w);for(var k in te.transformsRegistry)p(T,k);c.schema&&c.schema.layout&&d(i,c.schema.layout)}function u(c){if(typeof c.name!="string")throw new Error("Transform module *name* must be a string.");var T="Transform module "+c.name,_=typeof c.transform=="function",w=typeof c.calcTransform=="function";if(!_&&!w)throw new Error(T+" is missing a *transform* or *calcTransform* method.");for(var k in _&&w&&m.log([T+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),y(c.attributes)||m.log(T+" registered without an *attributes* object."),typeof c.supplyDefaults!="function"&&m.log(T+" registered without a *supplyDefaults* method."),te.transformsRegistry[c.name]=c,te.componentsRegistry)p(k,c.name)}function f(c){var T=c.name,_=T.split("-")[0],w=c.dictionary,k=c.format,L=w&&Object.keys(w).length,A=k&&Object.keys(k).length,I=te.localeRegistry,P=I[T];if(P||(I[T]=P={}),_!==T){var S=I[_];S||(I[_]=S={}),L&&S.dictionary===P.dictionary&&(S.dictionary=w),A&&S.format===P.format&&(S.format=k)}L&&(P.dictionary=w),A&&(P.format=k)}function o(c){if(c.layoutAttributes){var T=c.layoutAttributes._arrayAttrRegexps;if(T)for(var _=0;_<T.length;_++)b(te.layoutArrayRegexes,T[_])}}function h(c,T){var _=te.componentsRegistry[c].schema;if(_&&_.traces){var w=_.traces[T];w&&d(te.modules[T]._module.attributes,w)}}function p(c,T){var _=te.componentsRegistry[c].schema;if(_&&_.transforms){var w=_.transforms[T];w&&d(te.transformsRegistry[T].attributes,w)}}function s(c,T){var _=te.componentsRegistry[c].schema;if(_&&_.subplots){var w=te.subplotsRegistry[T],k=w.layoutAttributes,L=w.attr==="subplot"?w.name:w.attr;Array.isArray(L)&&(L=L[0]);var A=_.subplots[L];k&&A&&d(k,A)}}function x(c){return typeof c=="object"&&(c=c.type),c}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(c){if(te.collectableSubplotTypes=null,!c)throw new Error("No argument passed to Plotly.register.");c&&!Array.isArray(c)&&(c=[c]);for(var T=0;T<c.length;T++){var _=c[T];if(!_)throw new Error("Invalid module was attempted to be registered!");switch(_.moduleType){case"trace":l(_);break;case"transform":u(_);break;case"component":a(_);break;case"locale":f(_);break;case"apiMethod":var w=_.name;te.apiMethodRegistry[w]=_.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},te.getModule=function(c){var T=te.modules[x(c)];return!!T&&T._module},te.traceIs=function(c,T){if((c=x(c))==="various")return!1;var _=te.modules[c];return _||(c&&m.log("Unrecognized trace type "+c+"."),_=te.modules[t.type.dflt]),!!_.categories[T]},te.getTransformIndices=function(c,T){for(var _=[],w=c.transforms||[],k=0;k<w.length;k++)w[k].type===T&&_.push(k);return _},te.hasTransform=function(c,T){for(var _=c.transforms||[],w=0;w<_.length;w++)if(_[w].type===T)return!0;return!1},te.getComponentMethod=function(c,T){var _=te.componentsRegistry[c];return _&&_[T]||g},te.call=function(){var c=arguments[0],T=[].slice.call(arguments,1
1220);return te.apiMethodRegistry[c].apply(null,T)}},{"./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(v,$,te){var m=v("../registry"),g=v("../lib"),b=g.extendFlat,y=g.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}$.exports=function(n,t){var i,r,d=n.data,l=n.layout,a=y([],d),u=y({},l,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 o=Object.keys(u);for(i=0;i<o.length;i++)r=o[i],["xaxis","yaxis","zaxis"].indexOf(r.slice(0,5))>-1&&(u[o[i]].title={text:""});for(i=0;i<a.length;i++){var h=a[i];h.showscale=!1,h.marker&&(h.marker.showscale=!1),m.traceIs(h,"pie-like")&&(h.textposition="none")}}if(Array.isArray(t.annotations))for(i=0;i<t.annotations.length;i++)u.annotations.push(t.annotations[i]);var p=Object.keys(u).filter(function(_){return _.match(/^scene\d*$/)});if(p.length){var s={};for(t.tileClass==="thumbnail"&&(s={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),i=0;i<p.length;i++){var x=u[p[i]];x.xaxis||(x.xaxis={}),x.yaxis||(x.yaxis={}),x.zaxis||(x.zaxis={}),b(x.xaxis,s),b(x.yaxis,s),b(x.zaxis,s),x._scene=null}}var c=document.createElement("div");t.tileClass&&(c.className=t.tileClass);var T={gd:c,td:c,layout:u,data:a,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"&&(T.config.setBackground=t.setBackground||"opaque"),T.gd.defaultLayout=e(t.tileClass),T}},{"../lib":503,"../registry":638}],640:[function(v,$,te){var m=v("../lib"),g=v("../plot_api/to_image"),b=v("./filesaver"),y=v("./helpers");$.exports=function(e,n){var t;return m.isPlainObject(e)||(t=m.getGraphDiv(e)),(n=n||{}).format=n.format||"png",n.width=n.width||null,n.height=n.height||null,n.imageDataOnly=!0,new Promise(function(i,r){t&&t._snapshotInProgress&&r(new Error("Snapshotting already in progress.")),m.isIE()&&n.format!=="svg"&&r(new Error(y.MSG_IE_BAD_FORMAT)),t&&(t._snapshotInProgress=!0);var d=g(e,n),l=n.filename||e.fn||"newplot";l+="."+n.format.replace("-","."),d.then(function(a){return t&&(t._snapshotInProgress=!1),b(a,l,n.format)}).then(function(a){i(a)}).catch(function(a){t&&(t._snapshotInProgress=!1),r(a)})})}},{"../lib":503,"../plot_api/to_image":546,"./filesaver":641,"./helpers":642}],641:[function(v,$,te){var m=v("../lib"),g=v("./helpers");$.exports=function(b,y,e){var n=document.createElement("a"),t="download"in n;return new Promise(function(i,r){var d,l;if(m.isIE())return d=g.createBlob(b,"svg"),window.navigator.msSaveBlob(d,y),d=null,i(y);if(t)return d=g.createBlob(b,e),l=g.createObjectURL(d),n.href=l,n.download=y,document.body.appendChild(n),n.click(),document.body.removeChild(n),g.revokeObjectURL(l),d=null,i(y);if(m.isSafari()){var a=e==="svg"?",":";base64,";return g.octetStream(a+encodeURIComponent(b)),i(y)}r(new Error("download error"))})}},{"../lib":503,"./helpers":642}],642:[function(v,$,te){var m=v("../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(){m.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 g=window.URL||window.webkitURL;te.createObjectURL=function(b){return g.createObjectURL(b)},te.revokeObjectURL=function(b){return g.revokeObjectURL(b)},te.createBlob=function(b,y){if(y==="svg")return new window.Blob([b],{type:"image/svg+xml;charset=utf-8"});if(y==="full-json")return new window.Blob([b],{type:"application/json;charset=utf-8"});var e=function(n){for(var t=n.length,i=new ArrayBuffer(t),r=new Uint8Array(i),d=0;d<t;d++)r[d]=n.charCodeAt(d);return i}(window.atob(b));return new window.Blob([e],{type:"image/"+y})},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(v,$,te){var m=v("./helpers"),g={getDelay:m.getDelay,getRedrawFunc:m.getRedrawFunc,clone:v("./cloneplot"),toSVG:v("./tosvg"),svgToImg:v("./svgtoimg"),toImage:v("./toimage"),downloadImage:v("./download")};$.exports=g},{"./cloneplot":639,"./download":640,"./helpers":642,"./svgtoimg":644,"./toimage":645,"./tosvg":646}],644:[function(v,$,te){var m=v("../lib"),g=v("events").EventEmitter,b=v("./
1220helpers");$.exports=function(y){var e=y.emitter||new g,n=new Promise(function(t,i){var r=window.Image,d=y.svg,l=y.format||"png";if(m.isIE()&&l!=="svg"){var a=new Error(b.MSG_IE_BAD_FORMAT);return i(a),y.promise?n:e.emit("error",a)}var u,f,o=y.canvas,h=y.scale||1,p=y.width||300,s=y.height||150,x=h*p,c=h*s,T=o.getContext("2d"),_=new r;l==="svg"||m.isSafari()?f=b.encodeSVG(d):(u=b.createBlob(d,"svg"),f=b.createObjectURL(u)),o.width=x,o.height=c,_.onload=function(){var w;switch(u=null,b.revokeObjectURL(f),l!=="svg"&&T.drawImage(_,0,0,x,c),l){case"jpeg":w=o.toDataURL("image/jpeg");break;case"png":w=o.toDataURL("image/png");break;case"webp":w=o.toDataURL("image/webp");break;case"svg":w=f;break;default:var k="Image format is not jpeg, png, svg or webp.";if(i(new Error(k)),!y.promise)return e.emit("error",k)}t(w),y.promise||e.emit("success",w)},_.onerror=function(w){if(u=null,b.revokeObjectURL(f),i(w),!y.promise)return e.emit("error",w)},_.src=f});return y.promise?n:e}},{"../lib":503,"./helpers":642,events:84}],645:[function(v,$,te){var m=v("events").EventEmitter,g=v("../registry"),b=v("../lib"),y=v("./helpers"),e=v("./cloneplot"),n=v("./tosvg"),t=v("./svgtoimg");$.exports=function(i,r){var d=new m,l=e(i,{format:"png"}),a=l.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);var u=y.getRedrawFunc(a);return g.call("_doPlot",a,l.data,l.layout,l.config).then(u).then(function(){var f=y.getDelay(a._fullLayout);setTimeout(function(){var o=n(a),h=document.createElement("canvas");h.id=b.randstr(),(d=t({format:r.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:h,emitter:d,svg:o})).clean=function(){a&&document.body.removeChild(a)}},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(v,$,te){var m=v("@plotly/d3"),g=v("../lib"),b=v("../components/drawing"),y=v("../components/color"),e=v("../constants/xmlns_namespaces"),n=/"/g,t=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");$.exports=function(i,r,d){var l,a=i._fullLayout,u=a._paper,f=a._toppaper,o=a.width,h=a.height;u.insert("rect",":first-child").call(b.setRect,0,0,o,h).call(y.fill,a.paper_bgcolor);var p=a._basePlotModules||[];for(l=0;l<p.length;l++){var s=p[l];s.toSVG&&s.toSVG(i)}if(f){var x=f.node().childNodes,c=Array.prototype.slice.call(x);for(l=0;l<c.length;l++){var T=c[l];T.childNodes.length&&u.node().appendChild(T)}}a._draggers&&a._draggers.remove(),u.node().style.background="",u.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var w=m.select(this);if(this.style.visibility!=="hidden"&&this.style.display!=="none"){w.style({visibility:null,display:null});var k=this.style.fontFamily;k&&k.indexOf('"')!==-1&&w.style("font-family",k.replace(n,"TOBESTRIPPED"))}else w.remove()}),u.selectAll(".gradient_filled,.pattern_filled").each(function(){var w=m.select(this),k=this.style.fill;k&&k.indexOf("url(")!==-1&&w.style("fill",k.replace(n,"TOBESTRIPPED"));var L=this.style.stroke;L&&L.indexOf("url(")!==-1&&w.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*o),u.attr("height",d*h),u.attr("viewBox","0 0 "+o+" "+h));var _=new window.XMLSerializer().serializeToString(u.node());return _=function(w){var k=m.select("body").append("div").style({display:"none"}).html(""),L=w.replace(/(&[^;]*;)/gi,function(A){return A==="<"?"<":A==="&rt;"?">":A.indexOf("<")!==-1||A.indexOf(">")!==-1?"":k.html(A).text()});return k.remove(),L}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(t,"'"),g.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(v,$,te){var m=v("../../lib");$.exports=function(g,b){for(var y=0;y<g.length;y++)g[y].i=y;m.mergeArray(b.text,g,"tx"),m.mergeArray(b.hovertext,g,"htx");var e=b.marker;if(e){m.mergeArray(e.opacity,g,"mo",!0),m.mergeArray(e.color,g,"mc");var n=e.line;n&&(m.mergeArray(n.color,g,"mlc"),m.mergeArrayCastPositive(n.width,g,"mlw"))}}},{"../../lib":503}],648:[function(v,$,te){var m=v("../scatter/attributes"),g=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../../plots/template_attributes").texttemplateAttrs,e=v("../../components/colorscale/attributes"),n=v("../../plots/font_attributes"),t=v("./constants"),i=v("../../components/drawing/attributes").pattern,r=v("../../lib/extend").extendFlat,d=n({editType:"calc",arrayOk:!0,colorEditType:"style"}),l=r({},m.marker.line.width,{dflt:0}),a=r({width:l,editType:"calc"},e("marker.line")),u=r({line:a,editType:"calc"},e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:i});$.exports={x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.x
1220period,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),text:m.text,texttemplate:y({editType:"plot"},{keys:t.eventDataKeys}),hovertext:m.hovertext,hovertemplate:b({},{keys:t.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],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({},m.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:m.selected.marker.opacity,color:m.selected.marker.color,editType:"style"},textfont:m.selected.textfont,editType:"style"},unselected:{marker:{opacity:m.unselected.marker.opacity,color:m.unselected.marker.color,editType:"style"},textfont:m.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":927,"./constants":650}],649:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../plots/cartesian/align_period"),b=v("../../components/colorscale/helpers").hasColorscale,y=v("../../components/colorscale/calc"),e=v("./arrays_to_calcdata"),n=v("../scatter/calc_selection");$.exports=function(t,i){var r,d,l,a,u,f,o=m.getFromId(t,i.xaxis||"x"),h=m.getFromId(t,i.yaxis||"y"),p={msUTC:!(!i.base&&i.base!==0)};i.orientation==="h"?(r=o.makeCalcdata(i,"x",p),l=h.makeCalcdata(i,"y"),a=g(i,h,"y",l),u=!!i.yperiodalignment,f="y"):(r=h.makeCalcdata(i,"y",p),l=o.makeCalcdata(i,"x"),a=g(i,o,"x",l),u=!!i.xperiodalignment,f="x"),d=a.vals;for(var s=Math.min(d.length,r.length),x=new Array(s),c=0;c<s;c++)x[c]={p:d[c],s:r[c]},u&&(x[c].orig_p=l[c],x[c][f+"End"]=a.ends[c],x[c][f+"Start"]=a.starts[c]),i.ids&&(x[c].id=String(i.ids[c]));return b(i,"marker")&&y(t,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),b(i,"marker.line")&&y(t,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),e(x,i),n(x,i),x}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":929,"./arrays_to_calcdata":647}],650:[function(v,$,te){$.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},{}],651:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib").isArrayOrTypedArray,b=v("../../constants/numerical").BADNUM,y=v("../../registry"),e=v("../../plots/cartesian/axes"),n=v("../../plots/cartesian/constraints").getAxisGroup,t=v("./sieve.js");function i(s,x,c,T,_){if(T.length){var w,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(g(V)){for(E=0;E<Math.min(V.length,F.length);E++)D=K(V[E],0,Z),m(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 G=m(D);for(D=G?D:0,E=0;E<F.length;E++)F[E].b=D,G&&(F[E].hasB=1)}}}(c,T),_.mode){case"overlay":r(x,c,T,_);break;case"group":for(w=[],k=[],L=0;L<T.length;L++)(A=T[L])[0].trace.offset===void 0?k.push(A):w.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 G=H._fullLayout,W=Z.positions,Q=Z.distinctPositions,R=Z.minDiff,N=Z.traces,U=N.length,ee=W.length!==Q.length,j=R*(1-K.gap),X=n(G,V._id)+N[0][0].trace.orientation,J=G._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:ee?j/U:j)*(1-(K.groupgap||0));se=de?((2*pe._offsetIndex+1-de)*ne-xe)/2:ee?((2*re+1-U)*ne-xe)/2:-xe/2;var _e=oe[0].t;_e.barwidth=xe,_e.poffset=se,_e.bargroupwidth=j,_e.bardelta=R}Z.binWidth=N[0][0].t.barwidth/100,l(Z),a(V,Z),u(V,Z,ee)})(I,P,F,D),function(H,V){for(var Z=H.traces,K=0;K<Z.length;K++){var G=Z[K];if(G[0].trace.base===void 0)for(var W=new t([G],{posAxis:V,sepNegVal:!0,overlapNoMerge:!0}),Q=0;Q<G.length;Q++){var R=G[Q];if(R.p!==b){var N=W.put(R.p,R.b+R.s);N&&(R.b=N)}}}}(F,P),D.norm?(o(F),h(S,F,D)):f(S,F)}(s,x,c,k,_),w.length&&r(x,c,w,_);break;case"stack":case"relative":for(w=[],k=[],L=0;L<T.length;L++)(A=T[L])[0].trace.base===void 0?k.push(A):w.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(G,W,Q){var R,N,U,ee,j,X,J=p(G),re=W.traces;for(ee=0;ee<re.length;ee++)if(R=re[ee],(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(ee=0;ee<re.length;ee++){R=re[ee],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,Q.norm||(ne.push(pe),X.hasB&&ne.push(oe))}Q.norm||(N._extremes[G._id]=e.findExtremes(G,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,c,k,_),w.length&&r(x,c,w,_)}(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;m(K)&&(V=Math.min(V,K),Z=Math.max(Z,K))}var G=1e4/(Z-V),W=H.round=function(X){return String(Math.round(G*(X-V)))};for(S=0;S<I.length;S++){(D=I[S])[0].t.extents=H;var Q=D[0].t.poffset,R=Array.isArray(Q);for(E=0;E<D.length;E++){var N=D[E],U=N[F]-N.w/2;if(m(U)){var ee=N[F]+N.w/2,j=W(N.p);H[j]?H[j]=[Math.min(U,H[j][0]),Math.max(ee,H[j][1])]:H[j]=[U,ee]}N.p0=N.p+(R?Q[E]:Q),N.p1=N.p0+N.w,N.s0=N.b,N.s1=N.s0+N.s}}})(T,x)}}function r(s,x,c,T){for(var _=0;_<c.length;_++){var w=c[_],k=new t([w],{posAxis:s,sepNegVal:!1,overlapNoMerge:!T.norm});d(s,k,T),T.norm?(o(k),h(x,k,T)):f(x,k)}}function d(s,x,c){for(var T=x.minDiff,_=x.traces,w=T*(1-c.gap),k=w*(1-(c.groupgap||0)),L=-k/2,A=0;A<_.length;A++){var I=_[A][0].t;I.barwidth=k,I.poffset=L,I.bargroupwidth=w,I.bardelta=T}x.binWidth=_[0][0].t.barwidth/100,l(x),a(s,x),u(s,x)}function l(s){var x,c,T=s.traces;for(x=0;x<T.length;x++){var _,w=T[x],k=w[0],L=k.trace,A=k.t,I=L._offset||L.offset,P=A.poffset;if(g(I)){for(_=Array.prototype.slice.call(I,0,w.length),c=0;c<_.length;c++)m(_[c])||(_[c]=P);for(c=_.length;c<w.length;c++)_.push(P);A.poffset=_}else I!==void 0&&(A.poffset=I);var S=L._width||L.width,E=A.barwidth;if(g(S)){var D=Array.prototype.slice.call(S,0,w.length);for(c=0;c<D.length;c++)m(D[c])||(D[c]=E);for(c=D.length;c<w.length;c++)D.push(E);if(A.barwidth=D,I===void 0){for(_=[],c=0;c<w.length;c++)_.push(P+(E-D[c])/2);A.poffset=_}}else S!==void 0&&(A.barwidth=S,I===void 0&&(A.poffset=P+(E-S)/2))}}function a(s,x){for(var c=x.traces,T=p(s),_=0;_<c.length;_++)for(var w=c[_],k=w[0].t,L=k.poffset,A=Array.isArray(L),I=k.barwidth,P=Array.isArray(I),S=0;S<w.length;S++){var E=w[S],D=E.w=P?I[S]:I;E[T]=E.p+(A?L[S]:L)+D/2}}function u(s,x,c){var T=x.traces,_=x.minDiff/2;e.minDtick(s,x.minDiff,x.distinctPositions[0],c);for(var w=0;w<T.length;w++){var k,L,A,I,P=T[w],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 G=Z?H[I]:H,W=K?V[I]:V;A=(L=k.p+G)+W,D.push(L,A)}}E._extremes[s._id]=e.findExtremes(s,D,{padded:!1})}}function f(s,x){for(var c=x.traces,T=p(s),_=0;_<c.length;_++){for(var w=c[_],k=w[0].trace,L=[],A=!1,I=0;I<w.length;I++){var P=w[I],S=P.b,E=S+P.s;P[T]=E,L.push(E),P.hasB&&L.push(S),P.hasB&&P.b||(A=!0)}k._extremes[s._id]=e.findExtremes(s,L,{tozero:A,padded:!0})}}function o(s){for(var x=s.traces,c=0;c<x.length;c++)for(var T=x[c],_=0;_<T.length;_++){var w=T[_];w.s!==b&&s.put(w.p,w.b+w.s)}}function h(s,x,c){var T=x.traces,_=p(s),w=c.norm==="fraction"?1:100,k=w/1e9,L=s.l2c(s.c2l(0)),A=c.mode==="stack"?w:L;function I(Q){return m(s.c2l(Q))&&(Q<L-k||Q>A+k||!m(L))}for(var P=0;P<T.length;P++){for(var S=T[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(w/x.get(Z.p,Z.s));Z.b*=K,Z.s*=K;var G=Z.b,W=G+Z.s;Z[_]=W,D.push(W),H=H||I(W),Z.hasB&&(D.push(G),H=H||I(G)),Z.hasB&&Z.b||(F=!0)}}E._extremes[s._id]=e.findExtremes(s,D,{tozero:F,padded:H})}}function p(s){return s._id.charAt(0)}$.exports={crossTraceCalc:function(s,x){for(var c=x.xaxis,T=x.yaxis,_=s._fullLayout,w=s._fullData,k=s.calcdata,L=[],A=[],I=0;I<w.length;I++){var P=w[I];if(P.visible===!0&&y.traceIs(P,"bar")&&P.xaxis===c._id&&P.yaxis===T._id&&(P.orientation==="h"?L.push(k[I]):A.push(k[I]),P._computePh))for(var S=s.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:c.type==="category"||c.type==="multicategory",yCat:T.type==="category"||T.type==="multicategory",mode:_.barmode,norm:_.barnorm,gap:_.bargap,groupgap:_.bargroupgap};i(s,c,T,A,D),i(s,T,c,L,D)},setGroupPositions:i}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../../plots/cartesian/constraints":562,"../../registry":638,"./sieve.js":661,"fast-isnumeric":190}],652:[function(v,$,te){var m=v("../../lib"),g=v("../../components/color"),b=v("../../registry"),y=v("../scatter/xy_defaults"),e=v("../scatter/period_defaults"),n=v("./style_defaults"),t=v("../../plots/cartesian/constraints").getAxisGroup,i=v("./attributes"),r=m.coerceFont;function d(a,u,f,o){var h=u.orientation,p=u[{v:"x",h:"y"}[h]+"axis"],s=t(f,p)+h,x=f._alignmentOpts||{},c=o("alignmentgroup"),T=x[s];T||(T=x[s]={});var _=T[c];_?_.traces.push(u):_=T[c]={traces:[u],alignmentIndex:Object.keys(T).length,offsetGroups:{}};var w=o("offsetgroup"),k=_.offsetGroups,L=k[w];w&&(L||(L=k[w]={offsetIndex:Object.keys(k).length}),u._offsetIndex=L.offsetIndex)}function l(a,u,f,o,h,p){var s=(p=p||{}).moduleHasSelected!==!1,x=p.moduleHasUnselected!==!1,c=p.moduleHasConstrain!==!1,T=p.moduleHasCliponaxis!==!1,_=p.moduleHasTextangle!==!1,w=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(o,"textfont",f.font),S=m.extendFlat({},P),E=!(a.textfont&&a.textfont.color);if(E&&delete S.color,r(o,"insidetextfont",S),k){var D=m.extendFlat({},P);E&&delete D.color,r(o,"pathbar.textfont",D)}I&&r(o,"outsidetextfont",P),s&&o("selected.textfont.color"),x&&o("unselected.textfont.color"),c&&o("c
1220onstraintext"),T&&o("cliponaxis"),_&&o("textangle"),o("texttemplate")}A&&w&&o("insidetextanchor")}$.exports={supplyDefaults:function(a,u,f,o){function h(c,T){return m.coerce(a,u,i,c,T)}if(y(a,u,o,h)){e(a,u,o,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");l(a,u,o,h,p,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n(a,u,h,f,o);var s=(u.marker.line||{}).color,x=b.getComponentMethod("errorbars","supplyDefaults");x(a,u,s||g.defaultLine,{axis:"y"}),x(a,u,s||g.defaultLine,{axis:"x",inherit:"y"}),m.coerceSelectionMarkerOpacity(u,h)}else u.visible=!1},crossTraceDefaults:function(a,u){var f;function o(p){return m.coerce(f._input,f,i,p)}if(u.barmode==="group")for(var h=0;h<a.length;h++)(f=a[h]).type==="bar"&&(f._input,d(0,f,u,o))},handleGroupingDefaults:d,handleText:l}},{"../../components/color":366,"../../lib":503,"../../plots/cartesian/constraints":562,"../../registry":638,"../scatter/period_defaults":947,"../scatter/xy_defaults":954,"./attributes":648,"./style_defaults":663}],653:[function(v,$,te){$.exports=function(m,g,b){return m.x="xVal"in g?g.xVal:g.x,m.y="yVal"in g?g.yVal:g.y,g.xa&&(m.xaxis=g.xa),g.ya&&(m.yaxis=g.ya),b.orientation==="h"?(m.label=m.y,m.value=m.x):(m.label=m.x,m.value=m.y),m}},{}],654:[function(v,$,te){var m=v("fast-isnumeric"),g=v("tinycolor2"),b=v("../../lib").isArrayOrTypedArray;te.coerceString=function(y,e,n){if(typeof e=="string"){if(e||!y.noBlank)return e}else if((typeof e=="number"||e===!0)&&!y.strict)return String(e);return n!==void 0?n:y.dflt},te.coerceNumber=function(y,e,n){if(m(e)){e=+e;var t=y.min,i=y.max;if(!(t!==void 0&&e<t||i!==void 0&&e>i))return e}return n!==void 0?n:y.dflt},te.coerceColor=function(y,e,n){return g(e).isValid()?e:n!==void 0?n:y.dflt},te.coerceEnumerated=function(y,e,n){return y.coerceNumber&&(e=+e),y.values.indexOf(e)!==-1?e:n!==void 0?n:y.dflt},te.getValue=function(y,e){var n;return Array.isArray(y)?e<y.length&&(n=y[e]):n=y,n},te.getLineWidth=function(y,e){return 0<e.mlw?e.mlw:b(y.marker.line.width)?0:y.marker.line.width}},{"../../lib":503,"fast-isnumeric":190,tinycolor2:312}],655:[function(v,$,te){var m=v("../../components/fx"),g=v("../../registry"),b=v("../../components/color"),y=v("../../lib").fillText,e=v("./helpers").getLineWidth,n=v("../../plots/cartesian/axes").hoverLabelText,t=v("../../constants/numerical").BADNUM;function i(d,l,a,u,f){var o,h,p,s,x,c,T,_=d.cd,w=_[0].trace,k=_[0].t,L=u==="closest",A=w.type==="waterfall",I=d.maxHoverDistance,P=d.maxSpikeDistance;w.orientation==="h"?(o=a,h=l,p="y",s="x",x=R,c=W):(o=l,h=a,p="x",s="y",c=R,x=W);var S=w[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 G(ne,se,oe){return f.finiteRange&&(oe=0),m.inbox(ne-o,se-o,oe+Math.min(1,Math.abs(se-ne)/T)-1)}function W(ne){return G(Z(ne),K(ne),I)}function Q(ne){var se=ne[s];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=Q(ne);return m.inbox(oe-se,pe-se,I+(pe-se)/(pe-oe)-1)}var N=d[p+"a"],U=d[s+"a"];T=Math.abs(N.r2c(N.range[1])-N.r2c(N.range[0]));var ee=m.getDistanceFunction(u,x,c,function(ne){return(x(ne)+c(ne))/2});if(m.getClosest(_,ee,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=w.base?j.b+j.s:j.s;d[s+"0"]=d[s+"1"]=U.c2p(j[s],!0),d[s+"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"],w[p+"hoverformat"]),d.valueLabel=n(U,d[s+"LabelVal"],w[s+"hoverformat"]),d.baseLabel=n(U,j.b,w[s+"hoverformat"]),d.spikeDistance=(function(ne){var se=h,oe=ne.b,pe=Q(ne);return m.inbox(oe-se,pe-se,P+(pe-se)/(pe-oe)-1)}(j)+function(ne){return G(D(ne),F(ne),P)}(j))/2,d[p+"Spike"]=N.c2p(j.p,!0),y(j,w,d),d.hovertemplate=w.hovertemplate,d}}function r(d,l){var a=l.mcc||d.marker.color,u=l.mlcc||d.marker.line.color,f=e(d,l);
1220return b.opacity(a)?a:b.opacity(u)&&f?u:void 0}$.exports={hoverPoints:function(d,l,a,u,f){var o=i(d,l,a,u,f);if(o){var h=o.cd,p=h[0].trace,s=h[o.index];return o.color=r(p,s),g.getComponentMethod("errorbars","hoverInfo")(s,p,o),[o]}},hoverOnBars:i,getTraceColor:r}},{"../../components/color":366,"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./helpers":654}],656:[function(v,$,te){$.exports={attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults").supplyDefaults,crossTraceDefaults:v("./defaults").crossTraceDefaults,supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc"),crossTraceCalc:v("./cross_trace_calc").crossTraceCalc,colorbar:v("../scatter/marker_colorbar"),arraysToCalcdata:v("./arrays_to_calcdata"),plot:v("./plot").plot,style:v("./style").style,styleOnSelect:v("./style").styleOnSelect,hoverPoints:v("./hover").hoverPoints,eventData:v("./event_data"),selectPoints:v("./select"),moduleType:"trace",name:"bar",basePlotModule:v("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":945,"./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(v,$,te){$.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(v,$,te){var m=v("../../registry"),g=v("../../plots/cartesian/axes"),b=v("../../lib"),y=v("./layout_attributes");$.exports=function(e,n,t){function i(p,s){return b.coerce(e,n,y,p,s)}for(var r=!1,d=!1,l=!1,a={},u=i("barmode"),f=0;f<t.length;f++){var o=t[f];if(m.traceIs(o,"bar")&&o.visible){if(r=!0,u==="group"){var h=o.xaxis+o.yaxis;a[h]&&(l=!0),a[h]=!0}o.visible&&o.type==="histogram"&&g.getFromId({_fullLayout:n},o[o.orientation==="v"?"xaxis":"yaxis"]).type!=="category"&&(d=!0)}}r?(u!=="overlay"&&i("barnorm"),i("bargap",d&&!l?0:.2),i("bargroupgap")):delete n.barmode}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./layout_attributes":657}],659:[function(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("../../lib"),y=v("../../lib/svg_text_utils"),e=v("../../components/color"),n=v("../../components/drawing"),t=v("../../registry"),i=v("../../plots/cartesian/axes").tickText,r=v("./uniform_text"),d=r.recordMinTextSize,l=r.clearMinTextSize,a=v("./style"),u=v("./helpers"),f=v("./constants"),o=v("./attributes"),h=o.text,p=o.textposition,s=v("../../components/fx/helpers").appendArrayPointValue,x=f.TEXTPAD;function c(P){return P.id}function T(P){if(P.ids)return c}function _(P,S){return P<S?1:-1}function w(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,G=H.anchor||"end",W=G==="end",Q=G==="start",R=((H.leftToRight||0)+1)/2,N=1-R,U=F.width,ee=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&&ee<=X||!(U>j||ee>X)||(U>X||ee>j)&&U<ee==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,_e=0;if(Q||W){var we=(V?ne.x:ne.y)/2,Ee=V?_(P,S):_(E,D);V?Q?(ce=P+Ee*J,xe=-Ee*we):(ce=S-Ee*J,xe=Ee*we):Q?(de=E+Ee*J,_e=-Ee*we):(de=D-Ee*J,_e=Ee*we)}return{textX:oe,textY:pe,targetX:ce,targetY:de,anchorX:xe,anchorY:_e,scale:se,rotate:re}}$.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},l("bar",K));var G=b.makeTraceGroups(D,E,"trace bars").each(function(W){var Q=m.select(this),R=W[0].trace,N=R.type==="waterfall",U=R.type==="funnel",ee=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(Q,"g","points"),ne=T(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,_e=m.select(this),we=function(ze,Ue,Ge,Ye){var et=[],ct=[],mt=Ye?Ue:Ge,Ct=Ye?Ge:Ue;return et[0]=mt.c2p(ze.s0,!0),ct[0]=Ct.c2p(ze.p0,!0),et[1]=mt.c2p(ze.s1,!0),ct[1]=Ct.c2p(ze.p1,!0),Ye?[et,ct]:[ct,et]}(pe,V,Z,X),Ee=we[0][0],fe=we[0][1],ge=we[1][0],ke=we[1][1],be=(X?fe-Ee:ke-ge)==0;if(be&&ee&&u.getLineWidth(R,pe)&&(be=!1),be||(be=!(g(Ee)&&g(fe)&&g(ge)&&g(ke))),pe.isBlank=be,be&&(X?fe=Ee:ke=ge),j&&!be&&(X?(Ee-=_(Ee,fe)*j,fe+=_(Ee,fe)*j):(ge-=_(ge,ke)*j,ke+=_(ge,ke)*j)),R.type==="waterfall"){if(!be){var Se=R[pe.dir].marker;de=Se.line.width,xe=Se.color}}else de=u.getLineWidth(R,pe),xe=pe.mc||R.marker.color;function Oe(ze){var Ue=m.round(de/2%1,2);return F.gap===0&&F.groupgap===0?m.round(Math.round(ze)-Ue,2):ze}if(!P._context.staticPlot){var De=e.opacity(xe)<1||de>.01?Oe:function(ze,Ue,Ge){return Ge&&ze===Ue?ze:Math.abs(ze-Ue)>=2?Oe(ze):ze>Ue?Math.ceil(ze):Math.floor(ze)};Ee=De(Ee,fe,X),fe=De(fe,Ee,X),ge=De(ge,ke,!X),ke=De(ke,ge,!X)}var je=w(b.ensureSingle(_e,"path"),K,F,H);if(je.style("vector-effect","non-scaling-stroke").attr("d",isNaN((fe-Ee)*(ke-ge))||be&&P._context.staticPlot?"M0,0Z":"M"+Ee+","+ge+"V"+ke+"H"+fe+"V"+ge+"Z").call(n.setClipUrl,S.layerClipId,P),!K.uniformtext.mode&&J){var Je=n.makePointStyleFns(R);n.singlePointStyle(pe,je,R,Je,P)}(function(ze,Ue,Ge,Ye,et,ct,mt,Ct,Tt,nt,Qe){var Et,Gt=Ue.xaxis,Xt=Ue.yaxis,Fe=ze._fullLayout;function qe(Jt,Vt,pr){return b.ensureSingle(Jt,"text").text(Vt).attr({class:"bartext bartext-"+Et,"text-anchor":"middle","data-notex":1}).call(n.font,pr).call(y.convertToTspans,ze)}var wt=Ye[0].trace,ft=wt.orientation==="h",Ce=function(Jt,Vt,pr,Ir,fr){var $t,er=Vt[0].trace;return $t=er.texttemplate?function(ar,hr,vr,Pr,Ur){var qr=hr[0].trace,rn=b.castOption(qr,vr,"texttemplate");if(!rn)return"";var An,mn,Mn,Xr,Er=qr.type==="histogram",on=qr.type==="waterfall",Un=qr.type==="funnel",Tr=qr.orientation==="h";
1220Tr?(An="y",mn=Ur,Mn="x",Xr=Pr):(An="x",mn=Pr,Mn="y",Xr=Ur);function en(ca){return i(Xr,Xr.c2l(ca),!0).text}var $r=hr[vr],Rr={};Rr.label=$r.p,Rr.labelLabel=Rr[An+"Label"]=(Pn=$r.p,i(mn,mn.c2l(Pn),!0).text);var Pn,Nn=b.castOption(qr,$r.i,"text");(Nn===0||Nn)&&(Rr.text=Nn),Rr.value=$r.s,Rr.valueLabel=Rr[Mn+"Label"]=en($r.s);var hn={};s(hn,qr,$r.i),(Er||hn.x===void 0)&&(hn.x=Tr?Rr.value:Rr.label),(Er||hn.y===void 0)&&(hn.y=Tr?Rr.label:Rr.value),(Er||hn.xLabel===void 0)&&(hn.xLabel=Tr?Rr.valueLabel:Rr.labelLabel),(Er||hn.yLabel===void 0)&&(hn.yLabel=Tr?Rr.labelLabel:Rr.valueLabel),on&&(Rr.delta=+$r.rawS||$r.s,Rr.deltaLabel=en(Rr.delta),Rr.final=$r.v,Rr.finalLabel=en(Rr.final),Rr.initial=Rr.final-Rr.delta,Rr.initialLabel=en(Rr.initial)),Un&&(Rr.value=$r.s,Rr.valueLabel=en(Rr.value),Rr.percentInitial=$r.begR,Rr.percentInitialLabel=b.formatPercent($r.begR),Rr.percentPrevious=$r.difR,Rr.percentPreviousLabel=b.formatPercent($r.difR),Rr.percentTotal=$r.sumR,Rr.percenTotalLabel=b.formatPercent($r.sumR));var Fn=b.castOption(qr,$r.i,"customdata");return Fn&&(Rr.customdata=Fn),b.texttemplateString(rn,Rr,ar._d3locale,hn,Rr,qr._meta||{})}(Jt,Vt,pr,Ir,fr):er.textinfo?function(ar,hr,vr,Pr){var Ur=ar[0].trace,qr=Ur.orientation==="h",rn=Ur.type==="waterfall",An=Ur.type==="funnel";function mn(Fn){return i(qr?vr:Pr,+Fn,!0).text}var Mn,Xr=Ur.textinfo,Er=ar[hr],on=Xr.split("+"),Un=[],Tr=function(Fn){return on.indexOf(Fn)!==-1};Tr("label")&&Un.push((en=ar[hr].p,i(qr?Pr:vr,en,!0).text));var en;if(Tr("text")&&((Mn=b.castOption(Ur,Er.i,"text"))===0||Mn)&&Un.push(Mn),rn){var $r=+Er.rawS||Er.s,Rr=Er.v,Pn=Rr-$r;Tr("initial")&&Un.push(mn(Pn)),Tr("delta")&&Un.push(mn($r)),Tr("final")&&Un.push(mn(Rr))}if(An){Tr("value")&&Un.push(mn(Er.s));var Nn=0;Tr("percent initial")&&Nn++,Tr("percent previous")&&Nn++,Tr("percent total")&&Nn++;var hn=Nn>1;Tr("percent initial")&&(Mn=b.formatPercent(Er.begR),hn&&(Mn+=" of initial"),Un.push(Mn)),Tr("percent previous")&&(Mn=b.formatPercent(Er.difR),hn&&(Mn+=" of previous"),Un.push(Mn)),Tr("percent total")&&(Mn=b.formatPercent(Er.sumR),hn&&(Mn+=" of total"),Un.push(Mn))}return Un.join("<br>")}(Vt,pr,Ir,fr):u.getValue(er.text,pr),u.coerceString(h,$t)}(Fe,Ye,et,Gt,Xt);Et=function(Jt,Vt){var pr=u.getValue(Jt.textposition,Vt);return u.coerceEnumerated(p,pr)}(wt,et);var Ie=nt.mode==="stack"||nt.mode==="relative",Te=Ye[et],Pe=!Ie||Te._outmost;if(!Ce||Et==="none"||(Te.isBlank||ct===mt||Ct===Tt)&&(Et==="auto"||Et==="inside"))return void Ge.select("text").remove();var Ve=Fe.font,tt=a.getBarColor(Ye[et],wt),ot=a.getInsideTextFont(wt,et,Ve,tt),at=a.getOutsideTextFont(wt,et,Ve),_t=Ge.datum();ft?Gt.type==="log"&&_t.s0<=0&&(ct=Gt.range[0]<Gt.range[1]?0:Gt._length):Xt.type==="log"&&_t.s0<=0&&(Ct=Xt.range[0]<Xt.range[1]?Xt._length:0);var bt,jt,Nt,$e,yt,Ot=Math.abs(mt-ct)-2*x,Mt=Math.abs(Tt-Ct)-2*x;if(Et==="outside"&&(Pe||Te.hasB||(Et="inside")),Et==="auto")if(Pe){Et="inside",yt=b.ensureUniformFontSize(ze,ot),bt=qe(Ge,Ce,yt),jt=n.bBox(bt.node()),Nt=jt.width,$e=jt.height;var Pt=Nt<=Ot&&$e<=Mt,Le=Nt<=Mt&&$e<=Ot,Xe=ft?Ot>=Nt*(Mt/$e):Mt>=$e*(Ot/Nt);Nt>0&&$e>0&&(Pt||Le||Xe)?Et="inside":(Et="outside",bt.remove(),bt=null)}else Et="inside";if(!bt){yt=b.ensureUniformFontSize(ze,Et==="outside"?at:ot);var it=(bt=qe(Ge,Ce,yt)).attr("transform");if(bt.attr("transform",""),jt=n.bBox(bt.node()),Nt=jt.width,$e=jt.height,bt.attr("transform",it),Nt<=0||$e<=0)return void bt.remove()}var At,It,Zt=wt.textangle;Et==="outside"?(It=wt.constraintext==="both"||wt.constraintext==="outside",At=function(Jt,Vt,pr,Ir,fr,$t){var er,ar=!!$t.isHorizontal,hr=!!$t.constrained,vr=$t.angle||0,Pr=fr.width,Ur=fr.height,qr=Math.abs(Vt-Jt),rn=Math.abs(Ir-pr);er=ar?rn>2*x?x:0:qr>2*x?x:0;var An=1;hr&&(An=ar?Math.min(1,rn/Ur):Math.min(1,qr/Pr));var mn=L(vr),Mn=A(fr,mn),Xr=(ar?Mn.x:Mn.y)/2,Er=(fr.left+fr.right)/2,on=(fr.top+fr.bottom)/2,Un=(Jt+Vt)/2,Tr=(pr+Ir)/2,en=0,$r=0,Rr=ar?_(Vt,Jt):_(pr,Ir);return ar?(Un=Vt-Rr*er,en=Rr*Xr):(Tr=Ir+Rr*er,$r=-Rr*Xr),{textX:Er,textY:on,targetX:Un,targetY:Tr,anchorX:en,anchorY:$r,scale:An,rotate:mn}}(ct,mt,Ct,Tt,jt,{isHorizontal:ft,constrained:It,angle:Zt})):(It=wt.constraintext==="both"||wt.constraintext==="inside",At=I(ct,mt,Ct,Tt,jt,{isHorizontal:ft,constrained:It,angle:Zt,anchor:wt.insidetextanchor})),At.fontSize=yt.size,d(wt.type==="histogram"?"bar":wt.type,At,Fe),Te.transform=At,w(bt,Fe,nt,Qe).attr("transform",b.getTextTransform(At))})(P,S,_e,W,ce,Ee,fe,ge,ke,F,H),S.layerClipId&&n.hideOutsideRangePoint(pe,_e.select("text"),V,Z,R.xcalendar,R.ycalendar)});var oe=R.cliponaxis===!1;n.setClipUrl(Q,oe?null:S.layerClipId,P)});t.getComponentMethod("errorbars","plot")(P,G,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(v,$,te){function m(g,b,y,e,n){var t=b.c2p(e?g.s0:g.p0,!0),i=b.c2p(e?g.s1:g.p1,!0),r=y.c2p(e?g.p0:g.s0,!0),d=y.c2p(e?g.p1:g.s1,!0);return n?[(t+i)/2,(r+d)/2]:e?[i,(r+d)/2]:[(t+i)/2,d]}$.exports=function(g,b){var y,e=g.cd,n=g.xaxis,t=g.yaxis,i=e[0].trace,r=i.type==="funnel",d=i.orientation==="h",l=[];if(b===!1)for(y=0;y<e.length;y++)e[y].selected=0;else for(y=0;y<e.length;y++){var a=e[y],u="ct"in a?a.ct:m(a,n,t,d,r);b.contains(u,!1,y,g)?(l.push({pointNumber:y,x:n.c2d(a.x),y:t.c2d(a.y)}),a.selected=1):a.selected=0}return l}},{}],661:[function(v,$,te){$.exports=b;var m=v("../../lib").distinctVals,g=v("../../constants/numerical").BADNUM;function b(y,e){this.traces=y,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var n=1/0,t=[],i=0;i<y.length;i++){for(var r=y[i],d=0;d<r.length;d++){var l=r[d];l.p!==g&&t.push(l.p)}r[0]&&r[0].width1&&(n=Math.min(r[0].width1,n))}this.positions=t;var a=m(t);this.distinctPositions=a.vals,a.vals.length===1&&n!==1/0?this.minDiff=n:this.minDiff=Math.min(a.minDiff,n);var u=(e.posAxis||{}).type;u!=="category"&&u!=="multicategory"||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}b.prototype.put=function(y,e){var n=this.getLabel(y,e),t=this.bins[n]||0;return this.bins[n]=t+e,t},b.prototype.get=function(y,e){var n=this.getLabel(y,e);return this.bins[n]||0},b.prototype.getLabel=function(y,e){return(e<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?y:Math.round(y/this.binWidth))}},{"../../constants/numerical":479,"../../lib":503}],662:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/color"),b=v("../../components/drawing"),y=v("../../lib"),e=v("../../registry"),n=v("./uniform_text").resizeText,t=v("./attributes"),i=t.textfont,r=t.insidetextfont,d=t.outsidetextfont,l=v("./helpers");function a(c,T,_){b.pointStyle(c.selectAll("path"),T,_),u(c,T,_)}function u(c,T,_){c.selectAll("text").each(function(w){var k=m.select(this),L=y.ensureUniformFontSize(_,f(k,w,T,_));b.font(k,L)})}
1220function f(c,T,_,w){var k=w._fullLayout.font,L=_.textfont;if(c.classed("bartext-inside")){var A=x(T,_);L=h(_,T.i,k,A)}else c.classed("bartext-outside")&&(L=p(_,T.i,k));return L}function o(c,T,_){return s(i,c.textfont,T,_)}function h(c,T,_,w){var k=o(c,T,_);return(c._input.textfont===void 0||c._input.textfont.color===void 0||Array.isArray(c.textfont.color)&&c.textfont.color[T]===void 0)&&(k={color:g.contrast(w),family:k.family,size:k.size}),s(r,c.insidetextfont,T,k)}function p(c,T,_){var w=o(c,T,_);return s(d,c.outsidetextfont,T,w)}function s(c,T,_,w){T=T||{};var k=l.getValue(T.family,_),L=l.getValue(T.size,_),A=l.getValue(T.color,_);return{family:l.coerceString(c.family,k,w.family),size:l.coerceNumber(c.size,L,w.size),color:l.coerceColor(c.color,A,w.color)}}function x(c,T){return T.type==="waterfall"?T[c.dir].marker.color:c.mcc||c.mc||T.marker.color}$.exports={style:function(c){var T=m.select(c).selectAll("g.barlayer").selectAll("g.trace");n(c,T,"bar");var _=T.size(),w=c._fullLayout;T.style("opacity",function(k){return k[0].trace.opacity}).each(function(k){(w.barmode==="stack"&&_>1||w.bargap===0&&w.bargroupgap===0&&!k[0].trace.marker.line.width)&&m.select(this).attr("shape-rendering","crispEdges")}),T.selectAll("g.points").each(function(k){a(m.select(this),k[0].trace,c)}),e.getComponentMethod("errorbars","style")(T)},styleTextPoints:u,styleOnSelect:function(c,T,_){var w=T[0].trace;w.selectedpoints?function(k,L,A){b.selectedPointStyle(k.selectAll("path"),L),function(I,P,S){I.each(function(E){var D,F=m.select(this);if(E.selected){D=y.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)}(_,w,c):(a(_,w,c),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(v,$,te){var m=v("../../components/color"),g=v("../../components/colorscale/helpers").hasColorscale,b=v("../../components/colorscale/defaults"),y=v("../../lib").coercePattern;$.exports=function(e,n,t,i,r){var d=t("marker.color",i),l=g(e,"marker");l&&b(e,n,r,t,{prefix:"marker.",cLetter:"c"}),t("marker.line.color",m.defaultLine),g(e,"marker.line")&&b(e,n,r,t,{prefix:"marker.line.",cLetter:"c"}),t("marker.line.width"),t("marker.opacity"),y(t,"marker.pattern",d,l),t("selected.marker.color"),t("unselected.marker.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],664:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib");function b(y){return"_"+y+"Text_minsize"}$.exports={recordMinTextSize:function(y,e,n){if(n.uniformtext.mode){var t=b(y),i=n.uniformtext.minsize,r=e.scale*e.fontSize;e.hide=r<i,n[t]=n[t]||1/0,e.hide||(n[t]=Math.min(n[t],Math.max(r,i)))}},clearMinTextSize:function(y,e){e[b(y)]=void 0},resizeText:function(y,e,n){var t=y._fullLayout,i=t["_"+n+"Text_minsize"];if(i){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(l){var a=l.transform;a&&(a.scale=d&&a.hide?0:i/a.fontSize,m.select(this).select("text").attr("transform",g.getTextTransform(a)))})}}}},{"../../lib":503,"@plotly/d3":58}],665:[function(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../../lib/extend").extendFlat,b=v("../scatterpolar/attributes"),y=v("../bar/attributes");$.exports={r:b.r,theta:b.theta,r0:b.r0,dr:b.dr,theta0:b.theta0,dtheta:b.dtheta,thetaunit:b.thetaunit,base:g({},y.base,{}),offset:g({},y.offset,{}),width:g({},y.width,{}),text:g({},y.text,{}),hovertext:g({},y.hovertext,{}),marker:y.marker,hoverinfo:b.hoverinfo,hovertemplate:m(),selected:y.selected,unselected:y.unselected}},{"../../lib/extend":493,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatterpolar/attributes":1002}],666:[function(v,$,te){var m=v("../../components/colorscale/helpers").hasColorscale,g=v("../../components/colorscale/calc"),b=v("../bar/arrays_to_calcdata"),y=v("../bar/cross_trace_calc").setGroupPositions,e=v("../scatter/calc_selection"),n=v("../../registry").traceIs,t=v("../../lib").extendFlat;$.exports={calc:function(i,r){for(var d=i._fullLayout,l=r.subplot,a=d[l].radialaxis,u=d[l].angularaxis,f=a.makeCalcdata(r,"r"),o=u.makeCalcdata(r,"theta"),h=r._length,p=new Array(h),s=f,x=o,c=0;c<h;c++)p[c]={p:x[c],s:s[c]};function T(_){var w=r[_];w!==void 0&&(r["_"+_]=Array.isArray(w)?u.makeCalcdata(r,_):u.d2c(w,r.thetaunit))}return u.type==="linear"&&(T("width"),T("offset")),m(r,"marker")&&g(i,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),m(r,"marker.line")&&g(i,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),b(p,r),e(p,r),p},crossTraceCalc:function(i,r,d){for(var l=i.calcdata,a=[],u=0;u<l.length;u++){var f=l[u],o=f[0].trace;o.visible===!0&&n(o,"bar")&&o.subplot===d&&a.push(f)}var h=t({},r.radialaxis,{_id:"x"}),p=r.angularaxis;y(i,p,h,a,{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":929}],667:[function(v,$,te){var m=v("../../lib"),g=v("../scatterpolar/defaults").handleRThetaDefaults,b=v("../bar/style_defaults"),y=v("./attributes");$.exports=function(e,n,t,i){function r(d,l){return m.coerce(e,n,y,d,l)}g(e,n,i,r)?(r("thetaunit"),r("base"),r("offset"),r("width"),r("text"),r("hovertext"),r("hovertemplate"),b(e,n,r,t,i),m.coerceSelectionMarkerOpacity(n,r)):n.visible=!1}},{"../../lib":503,"../bar/style_defaults":663,"../scatterpolar/defaults":1004,"./attributes":665}],668:[function(v,$,te){var m=v("../../components/fx"),g=v("../../lib"),b=v("../bar/hover").getTraceColor,y=g.fillText,e=v("../scatterpolar/hover").makeHoverPointText,n=v("../../plots/polar/helpers").isPtInsidePolygon;$.exports=function(t,i,r){var d=t.cd,l=d[0].trace,a=t.subplot,u=a.radialAxis,f=a.angularAxis,o=a.vangles,h=o?n:g.isPtInsideSector,p=t.maxHoverDistance,s=f._peri
1220od||2*Math.PI,x=Math.abs(u.g2p(Math.sqrt(i*i+r*r))),c=Math.atan2(r,i);if(u.range[0]>u.range[1]&&(c+=Math.PI),m.getClosest(d,function(w){return h(x,c,[w.rp0,w.rp1],[w.thetag0,w.thetag1],o)?p+Math.min(1,Math.abs(w.thetag1-w.thetag0)/s)-1+(w.rp1-x)/(w.rp1-w.rp0)-1:1/0},t),t.index!==!1){var T=d[t.index];t.x0=t.x1=T.ct[0],t.y0=t.y1=T.ct[1];var _=g.extendFlat({},T,{r:T.s,theta:T.p});return y(T,l,t),e(_,l,a,t),t.hovertemplate=l.hovertemplate,t.color=b(l,T),t.xLabelVal=t.yLabelVal=void 0,T.s<0&&(t.idealAlign="left"),[t]}}},{"../../components/fx":406,"../../lib":503,"../../plots/polar/helpers":621,"../bar/hover":655,"../scatterpolar/hover":1006}],669:[function(v,$,te){$.exports={moduleType:"trace",name:"barpolar",basePlotModule:v("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults"),supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc").calc,crossTraceCalc:v("./calc").crossTraceCalc,plot:v("./plot"),colorbar:v("../scatter/marker_colorbar"),formatLabels:v("../scatterpolar/format_labels"),style:v("../bar/style").style,styleOnSelect:v("../bar/style").styleOnSelect,hoverPoints:v("./hover"),selectPoints:v("../bar/select"),meta:{}}},{"../../plots/polar":622,"../bar/select":660,"../bar/style":662,"../scatter/marker_colorbar":945,"../scatterpolar/format_labels":1005,"./attributes":665,"./calc":666,"./defaults":667,"./hover":668,"./layout_attributes":670,"./layout_defaults":671,"./plot":672}],670:[function(v,$,te){$.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],671:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y,e){var n,t={};function i(l,a){return m.coerce(b[n]||{},y[n],g,l,a)}for(var r=0;r<e.length;r++){var d=e[r];d.type==="barpolar"&&d.visible===!0&&(t[n=d.subplot]||(i("barmode"),i("bargap"),t[n]=1))}}},{"../../lib":503,"./layout_attributes":670}],672:[function(v,$,te){var m=v("@plotly/d3"),g=v("fast-isnumeric"),b=v("../../lib"),y=v("../../components/drawing"),e=v("../../plots/polar/helpers");$.exports=function(n,t,i){var r=t.xaxis,d=t.yaxis,l=t.radialAxis,a=t.angularAxis,u=function(o){var h=o.cxx,p=o.cyy;return o.vangles?function(s,x,c,T){var _,w;b.angleDelta(c,T)>0?(_=c,w=T):(_=T,w=c);var k=[e.findEnclosingVertexAngles(_,o.vangles)[0],(_+w)/2,e.findEnclosingVertexAngles(w,o.vangles)[1]];return e.pathPolygonAnnulus(s,x,_,w,k,h,p)}:function(s,x,c,T){return b.pathAnnulus(s,x,c,T,h,p)}}(t),f=t.layers.frontplot.select("g.barlayer");b.makeTraceGroups(f,i,"trace bars").each(function(){var o=m.select(this),h=b.ensureSingle(o,"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 s,x=m.select(this),c=p.rp0=l.c2p(p.s0),T=p.rp1=l.c2p(p.s1),_=p.thetag0=a.c2g(p.p0),w=p.thetag1=a.c2g(p.p1);if(g(c)&&g(T)&&g(_)&&g(w)&&c!==T&&_!==w){var k=l.c2g(p.s1),L=(_+w)/2;p.ct=[r.c2p(k*Math.cos(L)),d.c2p(k*Math.sin(L))],s=u(c,T,_,w)}else s="M0,0Z";b.ensureSingle(x,"path").attr("d",s)}),y.setClipUrl(o,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,n)})}},{"../../components/drawing":388,"../../lib":503,"../../plots/polar/helpers":621,"@plotly/d3":58,"fast-isnumeric":190}],673:[function(v,$,te){var m=v("../scatter/attributes"),g=v("../bar/attributes"),b=v("../../components/color/attributes"),y=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,e=v("../../plots/template_attributes").hovertemplateAttrs,n=v("../../lib/extend").extendFlat,t=m.marker,i=t.line;$.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:m.xperiod,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:y("x"),yhoverformat:y("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({},i.color,{arrayOk:!1,dflt:b.defaultLine,editType:"style"}),width:n({},i.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:m.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:g.offsetgroup,alignmentgroup:g.alignmentgroup,selected:{marker:m.selected.marker,editType:"style"},unselected:{marker:m.unselected.marker,editType:"style"},text:n({},m.text,{}),hovertext:n({},m.hovertext,{}),hovertemplate:e({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}
1220},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":927}],674:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../plots/cartesian/axes"),b=v("../../plots/cartesian/align_period"),y=v("../../lib"),e=v("../../constants/numerical").BADNUM,n=y._;$.exports=function(h,p){var s,x,c,T,_,w,k,L=h._fullLayout,A=g.getFromId(h,p.xaxis||"x"),I=g.getFromId(h,p.yaxis||"y"),P=[],S=p.type==="violin"?"_numViolins":"_numBoxes";p.orientation==="h"?(c=A,T="x",_=I,w="y",k=!!p.yperiodalignment):(c=I,T="y",_=A,w="x",k=!!p.xperiodalignment);var E,D,F,H,V,Z,K=function(Ge,Ye,et,ct){var mt,Ct=Ye+"0"in Ge,Tt="d"+Ye in Ge;if(Ye in Ge||Ct&&Tt){var nt=et.makeCalcdata(Ge,Ye);return[b(Ge,et,Ye,nt).vals,nt]}mt=Ct?Ge[Ye+"0"]:"name"in Ge&&(et.type==="category"||m(Ge.name)&&["linear","log"].indexOf(et.type)!==-1||y.isDateTime(Ge.name)&&et.type==="date")?Ge.name:ct;for(var Qe=et.type==="multicategory"?et.r2c_just_indices(mt):et.d2c(mt,0,Ge[Ye+"calendar"]),Et=Ge._length,Gt=new Array(Et),Xt=0;Xt<Et;Xt++)Gt[Xt]=Qe;return[Gt]}(p,w,_,L[S]),G=K[0],W=K[1],Q=y.distinctVals(G,_),R=Q.vals,N=Q.minDiff/2,U=(p.boxpoints||p.points)==="all"?y.identity:function(Ge){return Ge.v<E.lf||Ge.v>E.uf};if(p._hasPreCompStats){var ee=p[T],j=function(Ge){return c.d2c((p[Ge]||[])[s])},X=1/0,J=-1/0;for(s=0;s<p._length;s++){var re=G[s];if(m(re)){if((E={}).pos=E[w]=re,k&&W&&(E.orig_p=W[s]),E.q1=j("q1"),E.med=j("median"),E.q3=j("q3"),D=[],ee&&y.isArrayOrTypedArray(ee[s]))for(x=0;x<ee[s].length;x++)(Z=c.d2c(ee[s][x]))!==e&&(i(V={v:Z,i:[s,x]},p,[s,x]),D.push(V));if(E.pts=D.sort(r),H=(F=E[T]=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:l(E,F,H);var se=j("upperfence");E.uf=se!==e&&se>=E.q3?se:a(E,F,H);var oe=j("mean");E.mean=oe!==e?oe:H?y.mean(F,H):(E.q1+E.q3)/2;var pe=j("sd");E.sd=oe!==e&&pe>=0?pe:H?y.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:o(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 _e;
1220y.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join(` 1221`)),_e=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=_e,E.q1=E.q3=_e,E.lf=E.uf=_e,E.mean=E.sd=_e,E.ln=E.un=_e,E.min=E.max=_e}X=Math.min(X,E.min),J=Math.max(J,E.max),E.pts2=D.filter(U),P.push(E)}}p._extremes[c._id]=g.findExtremes(c,[X,J],{padded:!0})}else{var we=c.makeCalcdata(p,T),Ee=function(Ge,Ye){for(var et=Ge.length,ct=new Array(et+1),mt=0;mt<et;mt++)ct[mt]=Ge[mt]-Ye;return ct[et]=Ge[et-1]+Ye,ct}(R,N),fe=R.length,ge=function(Ge){for(var Ye=new Array(Ge),et=0;et<Ge;et++)Ye[et]=[];return Ye}(fe);for(s=0;s<p._length;s++)if(Z=we[s],m(Z)){var ke=y.findBin(G[s],Ee);ke>=0&&ke<fe&&(i(V={v:Z,i:s},p,s),ge[ke].push(V))}var be=1/0,Se=-1/0,Oe=p.quartilemethod,De=Oe==="exclusive",je=Oe==="inclusive";for(s=0;s<fe;s++)if(ge[s].length>0){var Je,ze;(E={}).pos=E[w]=R[s],D=E.pts=ge[s].sort(r),H=(F=E[T]=D.map(d)).length,E.min=F[0],E.max=F[H-1],E.mean=y.mean(F,H),E.sd=y.stdev(F,H,E.mean),E.med=y.interp(F,.5),H%2&&(De||je)?(De?(Je=F.slice(0,H/2),ze=F.slice(H/2+1)):je&&(Je=F.slice(0,H/2+1),ze=F.slice(H/2)),E.q1=y.interp(Je,.5),E.q3=y.interp(ze,.5)):(E.q1=y.interp(F,.25),E.q3=y.interp(F,.75)),E.lf=l(E,F,H),E.uf=a(E,F,H),E.lo=u(E),E.uo=f(E);var Ue=o(E,H);E.ln=E.med-Ue,E.un=E.med+Ue,be=Math.min(be,E.ln),Se=Math.max(Se,E.un),E.pts2=D.filter(U),P.push(E)}p._extremes[c._id]=g.findExtremes(c,p.notched?we.concat([be,Se]):we,{padded:!0})}return function(Ge,Ye){if(y.isArrayOrTypedArray(Ye.selectedpoints))for(var et=0;et<Ge.length;et++){for(var ct=Ge[et].pts||[],mt={},Ct=0;Ct<ct.length;Ct++)mt[ct[Ct].i]=Ct;y.tagSelected(ct,Ye,mt)}}(P,p),P.length>0?(P[0].t={num:L[S],dPos:N,posLetter:w,valLetter:T,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 \xB1 \u03C3:"):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 i(h,p,s){for(var x in t)y.isArrayOrTypedArray(p[x])&&(Array.isArray(s)?y.isArrayOrTypedArray(p[x][s[0]])&&(h[t[x]]=p[x][s[0]][s[1]]):h[t[x]]=p[x][s])}function r(h,p){return h.v-p.v}function d(h){return h.v}function l(h,p,s){return s===0?h.q1:Math.min(h.q1,p[Math.min(y.findBin(2.5*h.q1-1.5*h.q3,p,!0)+1,s-1)])}function a(h,p,s){return s===0?h.q3:Math.max(h.q3,p[Math.max(y.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 o(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(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../lib"),b=v("../../plots/cartesian/constraints").getAxisGroup,y=["v","h"];function e(n,t,i,r){var d,l,a,u=t.calcdata,f=t._fullLayout,o=r._id,h=o.charAt(0),p=[],s=0;for(d=0;d<i.length;d++)for(a=u[i[d]],l=0;l<a.length;l++)p.push(r.c2l(a[l].pos,!0)),s+=(a[l].pts2||[]).length;if(p.length){var x=g.distinctVals(p);r.type!=="category"&&r.type!=="multicategory"||(x.minDiff=1);var c=x.minDiff/2;m.minDtick(r,x.minDiff,x.vals[0],!0);var T=f[n==="violin"?"_numViolins":"_numBoxes"],_=f[n+"mode"]==="group"&&T>1,w=1-f[n+"gap"],k=1-f[n+"groupgap"];for(d=0;d<i.length;d++){var L,A,I,P,S,E,D=(a=u[i[d]])[0].trace,F=a[0].t,H=D.width,V=D.side;if(H)L=A=P=H/2,I=0;else if(L=c,_){var Z=b(f,r._id)+D.orientation,K=(f._alignmentOpts[Z]||{})[D.alignmentgroup]||{},G=Object.keys(K.offsetGroups||{}).length,W=G||T;A=L*w*k/W,I=2*L*(((G?D._offsetIndex:F.num)+.5)/W-.5)*w,P=L*w/W}else A=L*w*k,I=0,P=L;F.dPos=L,F.bPos=I,F.bdPos=A,F.wHover=P;var Q,R,N,U,ee,j,X=I+A,J=Boolean(H);if(V==="positive"?(S=L*(H?1:.5),Q=X,E=Q=I):V==="negative"?(S=Q=I,E=L*(H?1:.5),R=X):(S=E=L,Q=R=X),(D.boxpoints||D.points)&&s>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,ee=se,N=oe):oe>Q&&(ee=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(a.length);for(l=0;l<a.length;l++)ce[l]=a[l].pos;D._extremes[o]=m.findExtremes(r,ce,{padded:J,vpadminus:U,vpadplus:N,vpadLinearized:!0,ppadminus:{x:j,y:ee}[h],ppadplus:{x:ee,y:j}[h]})}}}$.exports={crossTraceCalc:function(n,t){for(var i=n.calcdata,r=t.xaxis,d=t.yaxis,l=0;l<y.length;l++){for(var a=y[l],u=a==="h"?d:r,f=[],o=0;o<i.length;o++){var h=i[o],p=h[0].t,s=h[0].trace;s.visible!==!0||s.type!=="box"&&s.type!=="candlestick"||p.empty||(s.orientation||"v")!==a||s.xaxis!==r._id||s.yaxis!==d._id||f.push(o)}e("box",n,f,u)}},setPositionOffset:e}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../plots/cartesian/constraints":562}],676:[function(v,$,te){var m=v("../../lib"),g=v("../../registry"),b=v("../../components/color"),y=v("../scatter/period_defaults"),e=v("../bar/defaults").handleGroupingDefaults,n=v("../../plots/cartesian/axis_autotype"),t=v("./attributes");function i(d,l,a,u){function f(V){var Z=0;return V&&V.length&&(Z+=1,m.isArrayOrTypedArray(V[0])&&V[0].length&&(Z+=1)),Z}function o(V){return m.validate(d[V],t[V])}var h,p=a("y"),s=a("x");if(l.type==="box"){var x=a("q1"),c=a("median"),T=a("q3");l._hasPreCompStats=x&&x.length&&c&&c.length&&T&&T.length,h=Math.min(m.minRowLength(x),m.minRowLength(c),m.minRowLength(T))}var _,w,k=f(p),L=f(s),A=k&&m.minRowLength(p),I=L&&m.minRowLength(s),P=u.calendar,S={autotypenumbers:u.autotypenumbers};if(l._hasPreCompStats)switch(String(L)+String(k)){case"00":var E=o("x0")||o("dx");_=(o("y0")||o("dy"))&&!E?"h":"v",w=h;break;case"10":_="v",w=Math.min(h,I);break;case"20":_="h",w=Math.min(h,s.length);break;case"01":_="h",w=Math.min(h,A);break;case"02":_="v",w=Math.min(h,p.length);break;case"12":_="v",w=Math.min(h,I,p.length);break;case"21":_="h",w=Math.min(h,s.length,A);break;case"11":w=0;break;case"22":var D,F=!1;for(D=0;D<s.length;D++)if(n(s[D],P,S)==="category"){F=!0;break}if(F)_="v",w=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",w=Math.min(h,s.length,A)):(_="v",w=Math.min(h,I,p.length))}}else k>0?(_="v",w=L>0?Math.min(I,A):Math.min(A)):L>0?(_="h",w=Math.min(I)):w=0;if(w){l._length=w;var H=a("orientation",_);l._hasPreCompStats?H==="v"&&L===0?(a("x0",0),a("dx",1)):H==="h"&&k===0&&(a("y0",0),a("dy",1)):H==="v"&&L===0?a("x0"):H==="h"&&k===0&&a("y0"),g.getComponentMethod("calendars","handleTraceDefaults")(d,l,["x","y"],u)}else l.visible=!1}function r(d,l,a,u){var f=u.prefix,o=m.coerce2(d,l,t,"marker.outliercolor"),h=a("marker.line.outliercolor"),p="outliers";l._hasPreCompStats?p="all":(o||h)&&(p="suspectedoutliers");var s=a(f+"points",p);s?(a("jitter",s==="all"?.3:0),a("pointpos",s==="all"?-1.5:0),a("marker.symbol"),a("marker.opacity"),a("marker.size"),a("marker.color",l.line.color),a("marker.line.color"),a("marker.line.width"),s==="suspectedoutliers"&&(a("marker.line.outliercolor",l.marker.color),a("marker.line.outlierwidth")),a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size"),a("text"),a("hovertext")):delete l.marker;var x=a("hoveron");x!=="all"&&x.indexOf("points")===-1||a("hovertemplate"),m.coerceSelectionMarkerOpacity(l,a)}$.exports={supplyDefaults:function(d,l,a,u){function f(T,_){return m.coerce(d,l,t,T,_)}if(i(d,l,f,u),l.visible!==!1){y(d,l,u,f),f("xhoverformat"),f("yhoverformat");var o=l._hasPreCompStats;
1221o&&(f("lowerfence"),f("upperfence")),f("line.color",(d.marker||{}).color||a),f("line.width"),f("fillcolor",b.addOpacity(l.line.color,.5));var h=!1;if(o){var p=f("mean"),s=f("sd");p&&p.length&&(h=!0,s&&s.length&&(h="sd"))}f("boxmean",h),f("whiskerwidth"),f("width"),f("quartilemethod");var x=!1;if(o){var c=f("notchspan");c&&c.length&&(x=!0)}else m.validate(d.notchwidth,t.notchwidth)&&(x=!0);f("notched",x)&&f("notchwidth"),r(d,l,f,{prefix:"box"})}},crossTraceDefaults:function(d,l){var a,u;function f(p){return m.coerce(u._input,u,t,p)}for(var o=0;o<d.length;o++){var h=(u=d[o]).type;h!=="box"&&h!=="violin"||(a=u._input,l[h+"mode"]==="group"&&e(a,u,l,f))}},handleSampleDefaults:i,handlePointsDefaults:r}},{"../../components/color":366,"../../lib":503,"../../plots/cartesian/axis_autotype":555,"../../registry":638,"../bar/defaults":652,"../scatter/period_defaults":947,"./attributes":673}],677:[function(v,$,te){$.exports=function(m,g){return g.hoverOnBox&&(m.hoverOnBox=g.hoverOnBox),"xVal"in g&&(m.x=g.xVal),"yVal"in g&&(m.y=g.yVal),g.xa&&(m.xaxis=g.xa),g.ya&&(m.yaxis=g.ya),m}},{}],678:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../lib"),b=v("../../components/fx"),y=v("../../components/color"),e=g.fillText;function n(i,r,d,l){var a,u,f,o,h,p,s,x,c,T,_,w,k,L,A=i.cd,I=i.xa,P=i.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"&&(c=function(oe){var pe=Z(oe);return b.inbox(pe,pe+V,T)},w=H,k=0),S.side==="negative"&&(c=function(oe){var pe=Z(oe);return b.inbox(pe-V,pe,T)},w=0,k=H)):(c=function(oe){var pe=Z(oe);return b.inbox(pe-V,pe+V,T)},w=k=H),L=D?function(oe){return b.inbox(oe.span[0]-h,oe.span[1]-h,T)}:function(oe){return b.inbox(oe.min-h,oe.max-h,T)},S.orientation==="h"?(h=r,p=d,s=L,x=c,a="y",f=P,u="x",o=I):(h=d,p=r,s=c,x=L,a="x",f=I,u="y",o=P);var K=Math.min(1,H/Math.abs(f.r2c(f.range[1])-f.r2c(f.range[0])));function G(oe){return(s(oe)+x(oe))/2}T=i.maxHoverDistance-K,_=i.maxSpikeDistance-K;var W=b.getDistanceFunction(l,s,x,G);if(b.getClosest(A,W,i),i.index===!1)return[];var Q=A[i.index],R=S.line.color,N=(S.marker||{}).color;y.opacity(R)&&S.line.width?i.color=R:y.opacity(N)&&S.boxpoints?i.color=N:i.color=S.fillcolor,i[a+"0"]=f.c2p(Q.pos+E.bPos-k,!0),i[a+"1"]=f.c2p(Q.pos+E.bPos+w,!0),i[a+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var U=a+"Spike";i.spikeDistance=G(Q)*_/T,i[U]=f.c2p(Q.pos,!0);var ee={},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 Q&&!(Q[J]in ee)){ee[Q[J]]=!0;var re=Q[J],ne=o.c2p(re,!0),se=g.extendFlat({},i);se.attr=J,se[u+"0"]=se[u+"1"]=ne,se[u+"LabelVal"]=re,se[u+"Label"]=(E.labels?E.labels[J]+" ":"")+m.hoverLabelText(o,re,S[u+"hoverformat"]),se.hoverOnBox=!0,J==="mean"&&"sd"in Q&&S.boxmean==="sd"&&(se[u+"err"]=Q.sd),i.name="",i.spikeDistance=void 0,i[U]=void 0,se.hovertemplate=!1,F.push(se)}}return F}function t(i,r,d){for(var l,a,u,f=i.cd,o=i.xa,h=i.ya,p=f[0].trace,s=o.c2p(r),x=h.c2p(d),c=b.quadrature(function(D){var F=Math.max(3,D.mrc||0);return Math.max(Math.abs(o.c2p(D.x)-s)-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)}),T=!1,_=0;_<f.length;_++){a=f[_];for(var w=0;w<(a.pts||[]).length;w++){var k=c(u=a.pts[w]);k<=i.distance&&(i.distance=k,T=[_,w])}}if(!T)return!1;u=(a=f[T[0]]).pts[T[1]];var L=o.c2p(u.x,!0),A=h.c2p(u.y,!0),I=u.mrc||1;l=g.extendFlat({},i,{index:u.i,color:(p.marker||{}).color,name:p.name,x0:L-I,x1:L+I,y0:A-I,y1:A+I,spikeDistance:i.distance,hovertemplate:p.hovertemplate});var P,S=a.orig_p,E=S!==void 0?S:a.pos;return p.orientation==="h"?(P=h,l.xLabelVal=u.x,l.yLabelVal=E):(P=o,l.xLabelVal=E,l.yLabelVal=u.y),l[P._id.charAt(0)+"Spike"]=P.c2p(a.pos,!0),e(u,p,l),l}$.exports={hoverPoints:function(i,r,d,l){var a,u=i.cd[0].trace.hoveron,f=[];return u.indexOf("boxes")!==-1&&(f=f.concat(n(i,r,d,l))),u.indexOf("points")!==-1&&(a=t(i,r,d)),l==="closest"?a?[a]:f:(a&&f.push(a),f)},hoverOnBoxes:n,hoverOnPoints:t}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"../../plots/cartesian/axes":554}],679:[function(v,$,te){$.exports={attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults").supplyDefaults,crossTraceDefaults:v("./defaults").crossTraceDefaults,supplyLayoutDefaults:v("./layout_defaults").supplyLayoutDefaults,calc:v("./calc"),crossTraceCalc:v("./cross_trace_calc").crossTraceCalc,plot:v("./plot").plot,style:v("./style").style,styleOnSelect:v("./style").styleOnSelect,hoverPoints:v("./hover").hoverPoints,eventData:v("./event_data"),selectPoints:v("./select"),moduleType:"trace",name:"box",basePlotModule:v("../../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(v,$,te){$.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(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("./layout_attributes");function y(e,n,t,i,r){for(var d=r+"Layout",l=!1,a=0;a<t.length;a++){var u=t[a];if(m.traceIs(u,d)){l=!0;break}}l&&(i(r+"mode"),i(r+"gap"),i(r+"groupgap"))}$.exports={supplyLayoutDefaults:function(e,n,t){y(0,0,t,function(i,r){return g.coerce(e,n,b,i,r)},"box")},_supply:y}},{"../../lib":503,"../../registry":638,"./layout_attributes":680}],682:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../components/drawing");function y(t,i,r,d){var l,a,u=r.orientation==="h",f=i.val,o=i.pos,h=!!o.rangebreaks,p=d.bPos,s=d.wdPos||0,x=d.bPosPxOffset||0,c=r.whiskerwidth||0,T=r.notched||!1,_=T?1-2*r.not
1221chwidth:1;Array.isArray(d.bdPos)?(l=d.bdPos[0],a=d.bdPos[1]):(l=d.bdPos,a=d.bdPos);var w=t.selectAll("path.box").data(r.type!=="violin"||r.box.visible?g.identity:[]);w.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(k){if(k.empty)return"M0,0Z";var L=o.c2l(k.pos+p,!0),A=o.l2p(L-l)+x,I=o.l2p(L+a)+x,P=h?(A+I)/2:o.l2p(L)+x,S=r.whiskerwidth,E=h?A*S+(1-S)*P:o.l2p(L-s)+x,D=h?I*S+(1-S)*P:o.l2p(L+s)+x,F=o.l2p(L-l*_)+x,H=o.l2p(L+a*_)+x,V=f.c2p(k.q1,!0),Z=f.c2p(k.q3,!0),K=g.constrain(f.c2p(k.med,!0),Math.min(V,Z)+1,Math.max(V,Z)-1),G=k.lf===void 0||r.boxpoints===!1,W=f.c2p(G?k.min:k.lf,!0),Q=f.c2p(G?k.max:k.uf,!0),R=f.c2p(k.ln,!0),N=f.c2p(k.un,!0);u?m.select(this).attr("d","M"+K+","+F+"V"+H+"M"+V+","+A+"V"+I+(T?"H"+R+"L"+K+","+H+"L"+N+","+I:"")+"H"+Z+"V"+A+(T?"H"+N+"L"+K+","+F+"L"+R+","+A:"")+"ZM"+V+","+P+"H"+W+"M"+Z+","+P+"H"+Q+(c===0?"":"M"+W+","+E+"V"+D+"M"+Q+","+E+"V"+D)):m.select(this).attr("d","M"+F+","+K+"H"+H+"M"+A+","+V+"H"+I+(T?"V"+R+"L"+H+","+K+"L"+I+","+N:"")+"V"+Z+"H"+A+(T?"V"+N+"L"+F+","+K+"L"+A+","+R:"")+"ZM"+P+","+V+"V"+W+"M"+P+","+Z+"V"+Q+(c===0?"":"M"+E+","+W+"H"+D+"M"+E+","+Q+"H"+D))})}function e(t,i,r,d){var l=i.x,a=i.y,u=d.bdPos,f=d.bPos,o=r.boxpoints||r.points;g.seedPseudoRandom();var h=t.selectAll("g.points").data(o?function(s){return s.forEach(function(x){x.t=d,x.trace=r}),s}:[]);h.enter().append("g").attr("class","points"),h.exit().remove();var p=h.selectAll("path").data(function(s){var x,c,T=s.pts2,_=Math.max((s.max-s.min)/10,s.q3-s.q1),w=1e-9*_,k=.01*_,L=[],A=0;if(r.jitter){if(_===0)for(A=1,L=new Array(T.length),x=0;x<T.length;x++)L[x]=1;else for(x=0;x<T.length;x++){var I=Math.max(0,x-5),P=T[I].v,S=Math.min(T.length-1,x+5),E=T[S].v;o!=="all"&&(T[x].v<s.lf?E=Math.min(E,s.lf):P=Math.max(P,s.uf));var D=Math.sqrt(k*(S-I)/(E-P+w))||0;D=g.constrain(Math.abs(D),0,1),L.push(D),A=Math.max(D,A)}c=2*r.jitter/(A||1)}for(x=0;x<T.length;x++){var F=T[x],H=F.v,V=r.jitter?c*L[x]*(g.pseudoRandom()-.5):0,Z=s.pos+f+u*(r.pointpos+V);r.orientation==="h"?(F.y=Z,F.x=H):(F.x=Z,F.y=H),o==="suspectedoutliers"&&H<s.uo&&H>s.lo&&(F.so=!0)}return T});p.enter().append("path").classed("point",!0),p.exit().remove(),p.call(b.translatePoints,l,a)}function n(t,i,r,d){var l,a,u=i.val,f=i.pos,o=!!f.rangebreaks,h=d.bPos,p=d.bPosPxOffset||0,s=r.boxmean||(r.meanline||{}).visible;Array.isArray(d.bdPos)?(l=d.bdPos[0],a=d.bdPos[1]):(l=d.bdPos,a=d.bdPos);var x=t.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?g.identity:[]);x.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),x.exit().remove(),x.each(function(c){var T=f.c2l(c.pos+h,!0),_=f.l2p(T-l)+p,w=f.l2p(T+a)+p,k=o?(_+w)/2:f.l2p(T)+p,L=u.c2p(c.mean,!0),A=u.c2p(c.mean-c.sd,!0),I=u.c2p(c.mean+c.sd,!0);r.orientation==="h"?m.select(this).attr("d","M"+L+","+_+"V"+w+(s==="sd"?"m0,0L"+A+","+k+"L"+L+","+_+"L"+I+","+k+"Z":"")):m.select(this).attr("d","M"+_+","+L+"H"+w+(s==="sd"?"m0,0L"+k+","+A+"L"+_+","+L+"L"+k+","+I+"Z":""))})}$.exports={plot:function(t,i,r,d){var l=i.xaxis,a=i.yaxis;g.makeTraceGroups(d,r,"trace boxes").each(function(u){var f,o,h=m.select(this),p=u[0],s=p.t,x=p.trace;s.wdPos=s.bdPos*x.whiskerwidth,x.visible!==!0||s.empty?h.remove():(x.orientation==="h"?(f=a,o=l):(f=l,o=a),y(h,{pos:f,val:o},x,s),e(h,{x:l,y:a},x,s),n(h,{pos:f,val:o},x,s))})},plotBoxAndWhiskers:y,plotPoints:e,plotBoxMean:n}},{"../../components/drawing":388,"../../lib":503,"@plotly/d3":58}],683:[function(v,$,te){$.exports=function(m,g){var b,y,e=m.cd,n=m.xaxis,t=m.yaxis,i=[];if(g===!1)for(b=0;b<e.length;b++)for(y=0;y<(e[b].pts||[]).length;y++)e[b].pts[y].selected=0;else for(b=0;b<e.length;b++)for(y=0;y<(e[b].pts||[]).length;y++){var r=e[b].pts[y],d=n.c2p(r.x),l=t.c2p(r.y);g.contains([d,l],null,r.i,m)?(i.push({pointNumber:r.i,x:n.c2d(r.x),y:t.c2d(r.y)}),r.selected=1):r.selected=0}return i}},{}],684:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/color"),b=v("../../components/drawing");$.exports={style:function(y,e,n){var t=n||m.select(y).selectAll("g.trace.boxes");t.style("opacity",function(i){return i[0].trace.opacity}),t.each(function(i){var r=m.select(this),d=i[0].trace,l=d.line.width;function a(o,h,p,s){o.style("stroke-width",h+"px").call(g.stroke,p).call(g.fill,s)}var u=r.selectAll("path.box");
1221if(d.type==="candlestick")u.each(function(o){if(!o.empty){var h=m.select(this),p=d[o.dir];a(h,p.line.width,p.line.color,p.fillcolor),h.style("opacity",d.selectedpoints&&!o.selected?.3:1)}});else{a(u,l,d.line.color,d.fillcolor),r.selectAll("path.mean").style({"stroke-width":l,"stroke-dasharray":2*l+"px,"+l+"px"}).call(g.stroke,d.line.color);var f=r.selectAll("path.point");b.pointStyle(f,d,y)}})},styleOnSelect:function(y,e,n){var t=e[0].trace,i=n.selectAll("path.point");t.selectedpoints?b.selectedPointStyle(i,t):b.pointStyle(i,t,y)}}},{"../../components/color":366,"../../components/drawing":388,"@plotly/d3":58}],685:[function(v,$,te){var m=v("../../lib").extendFlat,g=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=v("../ohlc/attributes"),y=v("../box/attributes");function e(n){return{line:{color:m({},y.line.color,{dflt:n}),width:y.line.width,editType:"style"},fillcolor:y.fillcolor,editType:"style"}}$.exports={xperiod:b.xperiod,xperiod0:b.xperiod0,xperiodalignment:b.xperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),x:b.x,open:b.open,high:b.high,low:b.low,close:b.close,line:{width:m({},y.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:m({},y.whiskerwidth,{dflt:0}),hoverlabel:b.hoverlabel}},{"../../lib":503,"../../plots/cartesian/axis_format_attributes":557,"../box/attributes":673,"../ohlc/attributes":872}],686:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("../../plots/cartesian/align_period"),y=v("../ohlc/calc").calcCommon;function e(n,t,i,r){return{min:i,q1:Math.min(n,r),med:r,q3:Math.max(n,r),max:t}}$.exports=function(n,t){var i=n._fullLayout,r=g.getFromId(n,t.xaxis),d=g.getFromId(n,t.yaxis),l=r.makeCalcdata(t,"x"),a=b(t,r,"x",l).vals,u=y(n,t,l,a,d,e);return u.length?(m.extendFlat(u[0].t,{num:i._numBoxes,dPos:m.distinctVals(a).minDiff/2,posLetter:"x",valLetter:"y"}),i._numBoxes++,u):[{t:{empty:!0}}]}},{"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../ohlc/calc":873}],687:[function(v,$,te){var m=v("../../lib"),g=v("../../components/color"),b=v("../ohlc/ohlc_defaults"),y=v("../scatter/period_defaults"),e=v("./attributes");function n(t,i,r,d){var l=r(d+".line.color");r(d+".line.width",i.line.width),r(d+".fillcolor",g.addOpacity(l,.5))}$.exports=function(t,i,r,d){function l(a,u){return m.coerce(t,i,e,a,u)}b(t,i,l,d)?(y(t,i,d,l,{x:!0}),l("xhoverformat"),l("yhoverformat"),l("line.width"),n(t,i,l,"increasing"),n(t,i,l,"decreasing"),l("text"),l("hovertext"),l("whiskerwidth"),d._requestRangeslider[i.xaxis]=!0):i.visible=!1}},{"../../components/color":366,"../../lib":503,"../ohlc/ohlc_defaults":877,"../scatter/period_defaults":947,"./attributes":685}],688:[function(v,$,te){$.exports={moduleType:"trace",name:"candlestick",basePlotModule:v("../../plots/cartesian"),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:v("./attributes"),layoutAttributes:v("../box/layout_attributes"),supplyLayoutDefaults:v("../box/layout_defaults").supplyLayoutDefaults,crossTraceCalc:v("../box/cross_trace_calc").crossTraceCalc,supplyDefaults:v("./defaults"),calc:v("./calc"),plot:v("../box/plot").plot,layerName:"boxlayer",style:v("../box/style").style,hoverPoints:v("../ohlc/hover").hoverPoints,selectPoints:v("../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(v,$,te){var m=v("./axis_defaults"),g=v("../../plot_api/plot_template");$.exports=function(b,y,e,n,t){n("a")||(n("da"),n("a0")),n("b")||(n("db"),n("b0")),function(i,r,d,l){["aaxis","baxis"].forEach(function(a){var u=a.charAt(0),f=i[a]||{},o=g.newContainer(r,a),h={noTicklabelstep:!0,tickfont:"x",id:u+"axis",letter:u,font:r.font,name:a,data:i[u],calendar:r.calendar,dfltColor:l,bgColor:d.paper_bgcolor,autotypenumbersDflt:d.autotypenumbers,fullLayout:d};m(f,o,h),o._categories=o._categories||[],i[a]||f.type==="-"||(i[a]={type:f.type})})}(b,y,e,t)}},{"../../plot_api/plot_template":543,"./axis_defaults":694}],690:[function(v,$,te){var m=v("../../lib").isArrayOrTypedArray;$.exports=function(g){return function b(y,e){if(!m(y)||e>=10)return null;for(var n=1/0,t=-1/0,i=y.length,r=0;r<i;r++){var d=y[r];if(m(d)){var l=b(d,e+1);l&&(n=Math.min(l[0],n),t=Math.max(l[1],t))}else n=Math.min(d,n),t=Math.max(d,t)}return[n,t]}(g,0)}},{"../../lib":503}],691:[function(v,$,te){var m=v("../../plots/font_attributes"),g=v("./axis_attributes"),b=v("../../components/color/attributes"),y=m({editType:"calc"});y.family.dflt='"Open Sans", verdana, arial, sans-serif',y.size.dflt=12,y.color.dflt=b.defaultLine,$.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:g,baxis:g,font:y,color:{valType:"color",dflt:b.defaultLine,editType:"plot"},transforms:void 0}},{"../../components/color/attributes":365,"../../plots/font_attributes":585,"./axis_attributes":693}],692:[function(v,$,te){var m=v("../../lib").isArrayOrTypedArray;$.exports=function(g,b,y,e){var n,t,i,r,d,l,a,u,f,o,h,p,s,x=m(y)?"a":"b",c=(x==="a"?g.aaxis:g.baxis).smoothing,T=x==="a"?g.a2i:g.b2j,_=x==="a"?y:e,w=x==="a"?e:y,k=x==="a"?b.a.length:b.b.length,L=x==="a"?b.b.length:b.a.length,A=Math.floor(x==="a"?g.b2j(w):g.a2i(w)),I=x==="a"?function(Q){return g.evalxy([],Q,A)}:function(Q){return g.evalxy([],A,Q)};c&&(i=Math.max(0,Math.min(L-2,A)),r=A-i,t=x==="a"?function(Q,R){return g.dxydi([],Q,i,R,r)}:function(Q,R){return g.dxydj([],i,Q,r,R)});var P=T(_[0]),S=T(_[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),G=H(S-D),W=[[a=I(P)]];for(n=K;n*E<G*E;n+=E)d=[],h=Z(P,n),s=(p=V(S,n+E))-h,l=Math.max(0,Math.min(k-2,Math.floor(.5*(h+p)))),u=I(p),c&&(f=t(l,h-l),o=t(l,p-l),d.push([a[0]+f[0]/3*s,a[1]+f[1]/3*s]),d.push([u[0]-o[0]/3*s,u[1]-o[1]/3*s])),d.push(u),W.push(d),a=u;return W}},{"../../lib":503}],693:[function(v,$,te){var m=v("../../plots/font_attributes"),g=v("../../components/color/attributes"),b=v("../../plots/cartesian/layout_attributes"),y=v("../../plots/cartesian/axis_format_attributes").descriptionWithDates,e=v("../../plot_api/edit_types").overrideAll;$.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:m({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:m({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:y("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:g.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:g.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:m({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(v,$,te){var m=v("./attributes"),g=v("../../components/color").addOpacity,b=v("../../registry"),y=v("../../lib"),e=v("../../plots/cartesian/tick_value_defaults"),n=v("../../plots/cartesian/tick_label_defaults"),t=v("../../plots/cartesian/prefix_suffix_defaults"),i=v("../../plots/cartesian/category_order_defaults"),r=v("../../plots/cartesian/set_convert"),d=v("../../plots/cartesian/axis_autotype");$.exports=function(l,a,u){var f=u.letter,o=u.font||{},h=m[f+"axis"];function p(S,E){return y.coerce(l,a,h,S,E)}function s(S,E){return y.coerce2(l,a,h,S,E)}u.name&&(a._name=u.name,a._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})}}(a,u.data),a.type==="-"?a.type="linear":x=l.type=a.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"),a.tickmode==="array"&&(p("arraytick0"),p("arraydtick")),p("labelpadding"),a._hovertitle=f,x==="date"&&b.getComponentMethod("calendars","handleDefaults")(l,a,"calendar",u.calendar),r(a,u.fullLayout),a.c2p=y.identity;var c=p("color",u.dfltColor),T=c===l.color?c:o.color;p("title.text")&&(y.coerceFont(p,"title.font",{family:o.family,size:y.bigFont(o.size),color:T}),p("title.offset")),p("tickangle"),p("autorange",!a.isValidRange(l.range))&&p("rangemode"),p("range"),a.cleanRange(),p("fixedrange"),e(l,a,p,x),t(l,a,p,x,u),n(l,a,p,x,u),i(l,a,p,{data:u.data,dataAttr:f});var _=s("gridcolor",g(c,.3)),w=s("gridwidth"),k=p("showgrid");k||(delete a.gridcolor,delete a.gridwidth);var L=s("startlinecolor",c),A=s("startlinewidth",w);p("startline",a.showgrid||!!L||!!A)||(delete a.startlinecolor,delete a.startlinewidth);var I=s("endlinecolor",c),P=s("endlinewidth",w);return p("endline",a.showgrid||!!I||!!P)||(delete a.endlinecolor,delete a.endlinewidth),k?(p("minorgridcount"),p("minorgridwidth",w),p("minorgridcolor",g(_,.06)),a.minorgridcount||(delete a.minorgridwidth,delete a.minorgridcolor)):(delete a.gridcolor,delete a.gridWidth),a.showticklabels==="none"&&(delete a.tickfont,delete a.tickangle,delete a.showexponent,delete a.exponentformat,delete a.minexponent,delete a.tickformat,delete a.showticksuffix,delete a.showtickprefix),a.showticksuffix||delete a.ticksuffix,a.showtickprefix||delete a.tickprefix,p("tickmode"),a}},{"../../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(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../lib").isArray1D,b=v("./cheater_basis"),y=v("./array_minmax"),e=v("./calc_gridlines"),n=v("./calc_labels"),t=v("./calc_clippath"),i=v("../heatmap/clean_2d_array"),r=v("./smooth_fill_2d_array"),d=v("../heatmap/convert_column_xyz"),l=v("./set_convert");$.exports=function(a,u){var f=m.getFromId(a,u.xaxis),o=m.getFromId(a,u.yaxis),h=u.aaxis,p=u.baxis,s=u.x,x=u.y,c=[];s&&g(s)&&c.push("x"),x&&g(x)&&c.push("y"),c.length&&d(u,h,p,"a","b",c);var T=u._a=u._a||u.a,_=u._b=u._b||u.b;s=u._x||u.x,x=u._y||u.y;var w={};
1221if(u._cheater){var k=h.cheatertype==="index"?T.length:T,L=p.cheatertype==="index"?_.length:_;s=b(k,L,u.cheaterslope)}u._x=s=i(s),u._y=x=i(x),r(s,T,_),r(x,T,_),l(u),u.setScale();var A=y(s),I=y(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]=m.findExtremes(f,A,{padded:!0}),u._extremes[o._id]=m.findExtremes(o,I,{padded:!0}),e(u,"a","b"),e(u,"b","a"),n(u,h),n(u,p),w.clipsegments=t(u._xctrl,u._yctrl,h,p),w.x=s,w.y=x,w.a=T,w.b=_,[w]}},{"../../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(v,$,te){$.exports=function(m,g,b,y){var e,n,t,i=[],r=!!b.smoothing,d=!!y.smoothing,l=m[0].length-1,a=m.length-1;for(e=0,n=[],t=[];e<=l;e++)n[e]=m[0][e],t[e]=g[0][e];for(i.push({x:n,y:t,bicubic:r}),e=0,n=[],t=[];e<=a;e++)n[e]=m[e][l],t[e]=g[e][l];for(i.push({x:n,y:t,bicubic:d}),e=l,n=[],t=[];e>=0;e--)n[l-e]=m[a][e],t[l-e]=g[a][e];for(i.push({x:n,y:t,bicubic:r}),e=a,n=[],t=[];e>=0;e--)n[a-e]=m[e][0],t[a-e]=g[e][0];return i.push({x:n,y:t,bicubic:d}),i}},{}],697:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../lib/extend").extendFlat;$.exports=function(b,y,e){var n,t,i,r,d,l,a,u,f,o,h,p,s,x,c=b["_"+y],T=b[y+"axis"],_=T._gridlines=[],w=T._minorgridlines=[],k=T._boundarylines=[],L=b["_"+e],A=b[e+"axis"];T.tickmode==="array"&&(T.tickvals=c.slice());var I=b._xctrl,P=b._yctrl,S=I[0].length,E=I.length,D=b._a.length,F=b._b.length;m.prepTicks(T),T.tickmode==="array"&&delete T.tickvals;var H=T.smoothing?3:1;function V(K){var G,W,Q,R,N,U,ee,j,X,J,re,ne,se=[],oe=[],pe={};if(y==="b")for(W=b.b2j(K),Q=Math.floor(Math.max(0,Math.min(F-2,W))),R=W-Q,pe.length=F,pe.crossLength=D,pe.xy=function(ce){return b.evalxy([],ce,W)},pe.dxy=function(ce,de){return b.dxydi([],ce,Q,de,R)},G=0;G<D;G++)U=Math.min(D-2,G),ee=G-U,j=b.evalxy([],G,W),A.smoothing&&G>0&&(X=b.dxydi([],G-1,Q,0,R),se.push(N[0]+X[0]/3),oe.push(N[1]+X[1]/3),J=b.dxydi([],G-1,Q,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(G=b.a2i(K),U=Math.floor(Math.max(0,Math.min(D-2,G))),ee=G-U,pe.length=D,pe.crossLength=F,pe.xy=function(ce){return b.evalxy([],G,ce)},pe.dxy=function(ce,de){return b.dxydj([],U,ce,ee,de)},W=0;W<F;W++)Q=Math.min(F-2,W),R=W-Q,j=b.evalxy([],G,W),A.smoothing&&W>0&&(re=b.dxydj([],U,W-1,ee,0),se.push(N[0]+re[0]/3),oe.push(N[1]+re[1]/3),ne=b.dxydj([],U,W-1,ee,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=y,pe.axis=T,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 G,W,Q,R,N,U=[],ee=[],j={};if(j.length=c.length,j.crossLength=L.length,y==="b")for(Q=Math.max(0,Math.min(F-2,K)),N=Math.min(1,Math.max(0,K-Q)),j.xy=function(X){return b.evalxy([],X,K)},j.dxy=function(X,J){return b.dxydi([],X,Q,J,N)},G=0;G<S;G++)U[G]=I[K*H][G],ee[G]=P[K*H][G];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)},G=0;G<E;G++)U[G]=I[G][K*H],ee[G]=P[G][K*H];return j.axisLetter=y,j.axis=T,j.crossAxis=A,j.value=c[K],j.constvar=e,j.index=K,j.x=U,j.y=ee,j.smoothing=A.smoothing,j}if(T.tickmode==="array"){for(r=5e-15,l=(d=[Math.floor((c.length-1-T.arraytick0)/T.arraydtick*(1+r)),Math.ceil(-T.arraytick0/T.arraydtick/(1+r))].sort(function(K,G){return K-G}))[0]-1,a=d[1]+1,u=l;u<a;u++)(t=T.arraytick0+T.arraydtick*u)<0||t>c.length-1||_.push(g(Z(t),{color:T.gridcolor,width:T.gridwidth}));for(u=l;u<a;u++)if(i=T.arraytick0+T.arraydtick*u,h=Math.min(i+T.arraydtick,c.length-1),!(i<0||i>c.length-1||h<0||h>c.length-1))for(p=c[i],s=c[h],n=0;n<T.minorgridcount;n++)(x=h-i)<=0||(o=p+(s-p)*(n+1)/(T.minorgridcount+1)*(T.arraydtick/x))<c[0]||o>c[c.length-1]||w.push(g(V(o),{color:T.minorgridcolor,width:T.minorgridwidth}));T.startline&&k.push(g(Z(0),{color:T.startlinecolor,width:T.startlinewidth})),T.endline&&k.push(g(Z(c.length-1),{color:T.endlinecolor,width:T.endlinewidth}))}else{for(r=5e-15,l=(d=[Math.floor((c[c.length-1]-T.tick0)/T.dtick*(1+r)),Math.ceil((c[0]-T.tick0)/T.dtick/(1+r))].sort(function(K,G){return K-G}))[0],a=d[1],u=l;u<=a;u++)f=T.tick0+T.dtick*u,_.push(g(V(f),{color:T.gridcolor,width:T.gridwidth}));for(u=l-1;u<a+1;u++)for(f=T.tick0+T.dtick*u,n=0;n<T.minorgridcount;n++)(o=f+T.dtick*(n+1)/(T.minorgridcount+1))<c[0]||o>c[c.length-1]||w.push(g(V(o),{color:T.minorgridcolor,width:T.minorgridwidth}));
1221T.startline&&k.push(g(V(c[0]),{color:T.startlinecolor,width:T.startlinewidth})),T.endline&&k.push(g(V(c[c.length-1]),{color:T.endlinecolor,width:T.endlinewidth}))}}},{"../../lib/extend":493,"../../plots/cartesian/axes":554}],698:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../lib/extend").extendFlat;$.exports=function(b,y){var e,n,t,i=y._labels=[],r=y._gridlines;for(e=0;e<r.length;e++)t=r[e],["start","both"].indexOf(y.showticklabels)!==-1&&(n=m.tickText(y,t.value),g(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}),i.push(n)),["end","both"].indexOf(y.showticklabels)!==-1&&(n=m.tickText(y,t.value),g(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}),i.push(n))}},{"../../lib/extend":493,"../../plots/cartesian/axes":554}],699:[function(v,$,te){$.exports=function(m,g,b,y){var e=m[0]-g[0],n=m[1]-g[1],t=b[0]-g[0],i=b[1]-g[1],r=Math.pow(e*e+n*n,.25),d=Math.pow(t*t+i*i,.25),l=(d*d*e-r*r*t)*y,a=(d*d*n-r*r*i)*y,u=d*(r+d)*3,f=r*(r+d)*3;return[[g[0]+(u&&l/u),g[1]+(u&&a/u)],[g[0]-(f&&l/f),g[1]-(f&&a/f)]]}},{}],700:[function(v,$,te){var m=v("../../lib").isArrayOrTypedArray;$.exports=function(g,b,y){var e,n,t,i,r,d,l=[],a=m(g)?g.length:g,u=m(b)?b.length:b,f=m(g)?g:null,o=m(b)?b:null;f&&(t=(f.length-1)/(f[f.length-1]-f[0])/(a-1)),o&&(i=(o.length-1)/(o[o.length-1]-o[0])/(u-1));var h=1/0,p=-1/0;for(n=0;n<u;n++)for(l[n]=[],r=o?(o[n]-o[0])*i:n/(u-1),e=0;e<a;e++)d=(f?(f[e]-f[0])*t:e/(a-1))-r*y,h=Math.min(d,h),p=Math.max(d,p),l[n][e]=d;var s=1/(p-h),x=-h*s;for(n=0;n<u;n++)for(e=0;e<a;e++)l[n][e]=s*l[n][e]+x;return l}},{"../../lib":503}],701:[function(v,$,te){var m=v("./catmull_rom"),g=v("../../lib").ensureArray;function b(y,e,n){var t=-.5*n[0]+1.5*e[0],i=-.5*n[1]+1.5*e[1];return[(2*t+y[0])/3,(2*i+y[1])/3]}$.exports=function(y,e,n,t,i,r){var d,l,a,u,f,o,h,p,s,x,c=n[0].length,T=n.length,_=i?3*c-2:c,w=r?3*T-2:T;for(y=g(y,w),e=g(e,w),a=0;a<w;a++)y[a]=g(y[a],_),e[a]=g(e[a],_);for(l=0,u=0;l<T;l++,u+=r?3:1)for(f=y[u],o=e[u],h=n[l],p=t[l],d=0,a=0;d<c;d++,a+=i?3:1)f[a]=h[d],o[a]=p[d];if(i)for(l=0,u=0;l<T;l++,u+=r?3:1){for(d=1,a=3;d<c-1;d++,a+=3)s=m([n[l][d-1],t[l][d-1]],[n[l][d],t[l][d]],[n[l][d+1],t[l][d+1]],i),y[u][a-1]=s[0][0],e[u][a-1]=s[0][1],y[u][a+1]=s[1][0],e[u][a+1]=s[1][1];x=b([y[u][0],e[u][0]],[y[u][2],e[u][2]],[y[u][3],e[u][3]]),y[u][1]=x[0],e[u][1]=x[1],x=b([y[u][_-1],e[u][_-1]],[y[u][_-3],e[u][_-3]],[y[u][_-4],e[u][_-4]]),y[u][_-2]=x[0],e[u][_-2]=x[1]}if(r)for(a=0;a<_;a++){for(u=3;u<w-3;u+=3)s=m([y[u-3][a],e[u-3][a]],[y[u][a],e[u][a]],[y[u+3][a],e[u+3][a]],r),y[u-1][a]=s[0][0],e[u-1][a]=s[0][1],y[u+1][a]=s[1][0],e[u+1][a]=s[1][1];x=b([y[0][a],e[0][a]],[y[2][a],e[2][a]],[y[3][a],e[3][a]]),y[1][a]=x[0],e[1][a]=x[1],x=b([y[w-1][a],e[w-1][a]],[y[w-3][a],e[w-3][a]],[y[w-4][a],e[w-4][a]]),y[w-2][a]=x[0],e[w-2][a]=x[1]}if(i&&r)for(u=1;u<w;u+=(u+1)%3==0?2:1){for(a=3;a<_-3;a+=3)s=m([y[u][a-3],e[u][a-3]],[y[u][a],e[u][a]],[y[u][a+3],e[u][a+3]],i),y[u][a-1]=.5*(y[u][a-1]+s[0][0]),e[u][a-1]=.5*(e[u][a-1]+s[0][1]),y[u][a+1]=.5*(y[u][a+1]+s[1][0]),e[u][a+1]=.5*(e[u][a+1]+s[1][1]);x=b([y[u][0],e[u][0]],[y[u][2],e[u][2]],[y[u][3],e[u][3]]),y[u][1]=.5*(y[u][1]+x[0]),e[u][1]=.5*(e[u][1]+x[1]),x=b([y[u][_-1],e[u][_-1]],[y[u][_-3],e[u][_-3]],[y[u][_-4],e[u][_-4]]),y[u][_-2]=.5*(y[u][_-2]+x[0]),e[u][_-2]=.5*(e[u][_-2]+x[1])}return[y,e]}},{"../../lib":503,"./catmull_rom":699}],702:[function(v,$,te){$.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],703:[function(v,$,te){$.exports=function(m,g,b){return g&&b?function(y,e,n,t,i){var r,d,l,a,u,f;y||(y=[]),e*=3,n*=3;var o=t*t,h=1-t,p=h*h,s=h*t*2,x=-3*p,c=3*(p-s),T=3*(s-o),_=3*o,w=i*i,k=w*i,L=1-i,A=L*L,I=A*L;for(f=0;f<m.length;f++)r=x*(u=m[f])[n][e]+c*u[n][e+1]+T*u[n][e+2]+_*u[n][e+3],d=x*u[n+1][e]+c*u[n+1][e+1]+T*u[n+1][e+2]+_*u[n+1][e+3],l=x*u[n+2][e]+c*u[n+2][e+1]+T*u[n+2][e+2]+_*u[n+2][e+3],a=x*u[n+3][e]+c*u[n+3][e+1]+T*u[n+3][e+2]+_*u[n+3][e+3],y[f]=I*r+3*(A*i*d+L*w*l)+k*a;return y}:g?function(y,e,n,t,i){var r,d,l,a;y||(y=[]),e*=3;var u=t*t,f=1-t,o=f*f,h=f*t*2,p=-3*o,s=3*(o-h),x=3*(h-u),c=3*u,T=1-i;for(l=0;l<m.length;l++)r=p*(a=m[l])[n][e]+s*a[n][e+1]+x*a[n][e+2]+c*a[n][e+3],d=p*a[n+1][e]+s*a[n+1][e+1]+x*a[n+1][e+2]+c*a[n+1][e+3],y[l]=T*r+i*d;return y}:b?function(y,e,n,t,i){var r,d,l,a,u,f;y||(y=[]),n*=3;var o=i*i,h=o*i,p=1-i,s=p*p,x=s*p;for(u=0;
1221u<m.length;u++)r=(f=m[u])[n][e+1]-f[n][e],d=f[n+1][e+1]-f[n+1][e],l=f[n+2][e+1]-f[n+2][e],a=f[n+3][e+1]-f[n+3][e],y[u]=x*r+3*(s*i*d+p*o*l)+h*a;return y}:function(y,e,n,t,i){var r,d,l,a;y||(y=[]);var u=1-i;for(l=0;l<m.length;l++)r=(a=m[l])[n][e+1]-a[n][e],d=a[n+1][e+1]-a[n+1][e],y[l]=u*r+i*d;return y}}},{}],704:[function(v,$,te){$.exports=function(m,g,b){return g&&b?function(y,e,n,t,i){var r,d,l,a,u,f;y||(y=[]),e*=3,n*=3;var o=t*t,h=o*t,p=1-t,s=p*p,x=s*p,c=i*i,T=1-i,_=T*T,w=T*i*2,k=-3*_,L=3*(_-w),A=3*(w-c),I=3*c;for(f=0;f<m.length;f++)r=k*(u=m[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],l=k*u[n][e+2]+L*u[n+1][e+2]+A*u[n+2][e+2]+I*u[n+3][e+2],a=k*u[n][e+3]+L*u[n+1][e+3]+A*u[n+2][e+3]+I*u[n+3][e+3],y[f]=x*r+3*(s*t*d+p*o*l)+h*a;return y}:g?function(y,e,n,t,i){var r,d,l,a,u,f;y||(y=[]),e*=3;var o=i*i,h=o*i,p=1-i,s=p*p,x=s*p;for(u=0;u<m.length;u++)r=(f=m[u])[n+1][e]-f[n][e],d=f[n+1][e+1]-f[n][e+1],l=f[n+1][e+2]-f[n][e+2],a=f[n+1][e+3]-f[n][e+3],y[u]=x*r+3*(s*i*d+p*o*l)+h*a;return y}:b?function(y,e,n,t,i){var r,d,l,a;y||(y=[]),n*=3;var u=1-t,f=i*i,o=1-i,h=o*o,p=o*i*2,s=-3*h,x=3*(h-p),c=3*(p-f),T=3*f;for(l=0;l<m.length;l++)r=s*(a=m[l])[n][e]+x*a[n+1][e]+c*a[n+2][e]+T*a[n+3][e],d=s*a[n][e+1]+x*a[n+1][e+1]+c*a[n+2][e+1]+T*a[n+3][e+1],y[l]=u*r+t*d;return y}:function(y,e,n,t,i){var r,d,l,a;y||(y=[]);var u=1-t;for(l=0;l<m.length;l++)r=(a=m[l])[n+1][e]-a[n][e],d=a[n+1][e+1]-a[n][e+1],y[l]=u*r+t*d;return y}}},{}],705:[function(v,$,te){$.exports=function(m,g,b,y,e){var n=g-2,t=b-2;return y&&e?function(i,r,d){var l,a,u,f,o,h;i||(i=[]);var p=Math.max(0,Math.min(Math.floor(r),n)),s=Math.max(0,Math.min(Math.floor(d),t)),x=Math.max(0,Math.min(1,r-p)),c=Math.max(0,Math.min(1,d-s));p*=3,s*=3;var T=x*x,_=T*x,w=1-x,k=w*w,L=k*w,A=c*c,I=A*c,P=1-c,S=P*P,E=S*P;for(h=0;h<m.length;h++)l=L*(o=m[h])[s][p]+3*(k*x*o[s][p+1]+w*T*o[s][p+2])+_*o[s][p+3],a=L*o[s+1][p]+3*(k*x*o[s+1][p+1]+w*T*o[s+1][p+2])+_*o[s+1][p+3],u=L*o[s+2][p]+3*(k*x*o[s+2][p+1]+w*T*o[s+2][p+2])+_*o[s+2][p+3],f=L*o[s+3][p]+3*(k*x*o[s+3][p+1]+w*T*o[s+3][p+2])+_*o[s+3][p+3],i[h]=E*l+3*(S*c*a+P*A*u)+I*f;return i}:y?function(i,r,d){i||(i=[]);var l,a,u,f,o,h,p=Math.max(0,Math.min(Math.floor(r),n)),s=Math.max(0,Math.min(Math.floor(d),t)),x=Math.max(0,Math.min(1,r-p)),c=Math.max(0,Math.min(1,d-s));p*=3;var T=x*x,_=T*x,w=1-x,k=w*w,L=k*w,A=1-c;for(o=0;o<m.length;o++)l=A*(h=m[o])[s][p]+c*h[s+1][p],a=A*h[s][p+1]+c*h[s+1][p+1],u=A*h[s][p+2]+c*h[s+1][p+1],f=A*h[s][p+3]+c*h[s+1][p+1],i[o]=L*l+3*(k*x*a+w*T*u)+_*f;return i}:e?function(i,r,d){i||(i=[]);var l,a,u,f,o,h,p=Math.max(0,Math.min(Math.floor(r),n)),s=Math.max(0,Math.min(Math.floor(d),t)),x=Math.max(0,Math.min(1,r-p)),c=Math.max(0,Math.min(1,d-s));s*=3;var T=c*c,_=T*c,w=1-c,k=w*w,L=k*w,A=1-x;for(o=0;o<m.length;o++)l=A*(h=m[o])[s][p]+x*h[s][p+1],a=A*h[s+1][p]+x*h[s+1][p+1],u=A*h[s+2][p]+x*h[s+2][p+1],f=A*h[s+3][p]+x*h[s+3][p+1],i[o]=L*l+3*(k*c*a+w*T*u)+_*f;return i}:function(i,r,d){i||(i=[]);var l,a,u,f,o=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-o)),s=Math.max(0,Math.min(1,d-h)),x=1-s,c=1-p;for(u=0;u<m.length;u++)l=c*(f=m[u])[h][o]+p*f[h][o+1],a=c*f[h+1][o]+p*f[h+1][o+1],i[u]=x*l+s*a;return i}}},{}],706:[function(v,$,te){var m=v("../../lib"),g=v("./xy_defaults"),b=v("./ab_defaults"),y=v("./attributes"),e=v("../../components/color/attributes");$.exports=function(n,t,i,r){function d(a,u){return m.coerce(n,t,y,a,u)}t._clipPathId="clip"+t.uid+"carpet";var l=d("color",e.defaultLine);m.coerceFont(d,"font"),d("carpet"),b(n,t,r,d,l),t.a&&t.b?(t.a.length<3&&(t.aaxis.smoothing=0),t.b.length<3&&(t.baxis.smoothing=0),g(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(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),plot:v("./plot"),calc:v("./calc"),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:v("../../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(v,$,te){$.exports=function(m,g){for(var b,y=m._fullData.length,e=0;e<y;e++){var n=m._fullData[e];if(n.index!==g.index&&n.type==="carpet"&&(b||(b=n),n.carpet===g.carpet))return n}return b}},{}],709:[function(v,$,te){$.exports=function(m,g,b){if(m.length===0)return"";var y,e=[],n=b?3:1;for(y=0;y<m.length;y+=n)e.push(m[y]+","+g[y]),b&&y<m.length-n&&(e.push("C"),e.push([m[y+1]+","+g[y+1],m[y+2]+","+g[y+2]+" "].join(" ")));return e.join(b?"":"L")}},{}],710:[function(v,$,te){var m=v("../../lib").isArrayOrTypedArray;$.exports=function(g,b,y){var e;
1221for(m(g)?g.length>b.length&&(g=g.slice(0,b.length)):g=[],e=0;e<b.length;e++)g[e]=y(b[e]);return g}},{"../../lib":503}],711:[function(v,$,te){$.exports=function(m,g,b,y,e,n){var t=e[0]*m.dpdx(g),i=e[1]*m.dpdy(b),r=1,d=1;if(n){var l=Math.sqrt(e[0]*e[0]+e[1]*e[1]),a=Math.sqrt(n[0]*n[0]+n[1]*n[1]),u=(e[0]*n[0]+e[1]*n[1])/l/a;d=Math.max(0,u)}var f=180*Math.atan2(i,t)/Math.PI;return f<-90?(f+=180,r=-r):f>90&&(f-=180,r=-r),{angle:f,flip:r,p:m.c2p(y,g,b),offsetMultplier:d}}},{}],712:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/drawing"),b=v("./map_1d_array"),y=v("./makepath"),e=v("./orient_text"),n=v("../../lib/svg_text_utils"),t=v("../../lib"),i=t.strRotate,r=t.strTranslate,d=v("../../constants/alignment");function l(h,p,s,x,c,T){var _="const-"+c+"-lines",w=s.selectAll("."+_).data(T);w.enter().append("path").classed(_,!0).style("vector-effect","non-scaling-stroke"),w.each(function(k){var L=k,A=L.x,I=L.y,P=b([],A,h.c2p),S=b([],I,p.c2p),E="M"+y(P,S,L.smoothing);m.select(this).attr("d",E).style("stroke-width",L.width).style("stroke",L.color).style("fill","none")}),w.exit().remove()}function a(h,p,s,x,c,T,_,w){var k=T.selectAll("text."+w).data(_);k.enter().append("text").classed(w,!0);var L=0,A={};return k.each(function(I,P){var S;if(I.axis.tickangle==="auto")S=e(x,p,s,I.xy,I.dxy);else{var E=(I.axis.tickangle+180)*Math.PI/180;S=e(x,p,s,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=m.select(this).attr({"text-anchor":D>0?"start":"end","data-notex":1}).call(g.font,I.font).text(I.text).call(n.convertToTspans,h),H=g.bBox(this);F.attr("transform",r(S.p[0],S.p[1])+i(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}$.exports=function(h,p,s,x){var c=p.xaxis,T=p.yaxis,_=h._fullLayout._clips;t.makeTraceGroups(x,s,"trace").each(function(w){var k=m.select(this),L=w[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),l(c,T,E,I,"a",I._gridlines),l(c,T,E,P,"b",P._gridlines),l(c,T,S,I,"a",I._minorgridlines),l(c,T,S,P,"b",P._minorgridlines),l(c,T,D,I,"a-boundary",I._boundarylines),l(c,T,D,P,"b-boundary",P._boundarylines);var H=a(h,c,T,A,L,F,I._labels,"a-label"),V=a(h,c,T,A,L,F,P._labels,"b-label");(function(Z,K,G,W,Q,R,N,U){var ee,j,X,J,re=t.aggNums(Math.min,null,G.a),ne=t.aggNums(Math.max,null,G.a),se=t.aggNums(Math.min,null,G.b),oe=t.aggNums(Math.max,null,G.b);ee=.5*(re+ne),j=se,X=G.ab2xy(ee,j,!0),J=G.dxyda_rough(ee,j),N.angle===void 0&&t.extendFlat(N,e(G,Q,R,X,G.dxydb_rough(ee,j))),o(Z,K,G,W,X,J,G.aaxis,Q,R,N,"a-title"),ee=re,j=.5*(se+oe),X=G.ab2xy(ee,j,!0),J=G.dxydb_rough(ee,j),U.angle===void 0&&t.extendFlat(U,e(G,Q,R,X,G.dxyda_rough(ee,j))),o(Z,K,G,W,X,J,G.baxis,Q,R,U,"b-title")})(h,F,A,L,c,T,H,V),function(Z,K,G,W,Q){var R,N,U,ee,j=G.select("#"+Z._clipPathId);j.size()||(j=G.append("clipPath").classed("carpetclip",!0));var X=t.ensureSingle(j,"path","carpetboundary"),J=K.clipsegments,re=[];for(ee=0;ee<J.length;ee++)R=J[ee],N=b([],R.x,W.c2p),U=b([],R.y,Q.c2p),re.push(y(N,U,R.bicubic));var ne="M"+re.join("L")+"Z";j.attr("id",Z._clipPathId),X.attr("d",ne)}(A,L,_,c,T)})};var u=d.LINE_SPACING,f=(1-d.MID_SHIFT)/u+1;function o(h,p,s,x,c,T,_,w,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(s,w,k,c,T);["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=m.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])+i(E.angle)+r(0,S)).attr("text-anchor","middle").call(g.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(v,$,te){var m=v("./constants"),g=v("../../lib/search").findBin,b=v("./compute_control_points"),y=v("./create_spline_evaluator"),e=v("./create_i_derivative_evaluator"),n=v("./create_j_derivative_evaluator");$.exports=function(t){var i=t._a,r=t._b,d=i.length,l=r.length,a=t.aaxis,u=t.baxis,f=i[0],o=i[d-1],h=r[0],p=r[l-1],s=i[i.length-1]-i[0],x=r[r.length-1]-r[0],c=s*m.RELATIVE_CULL_TOLERANCE,T=x*m.RELATIVE_CULL_TOLERANCE;f-=c,o+=c,h-=T,p+=T,t.isVisible=function(_,w){return _>f&&_<o&&w>h&&w<p},t.isOccluded=function(_,w){return _<f||_>o||w<h||w>p},t.setScale=function(){var _=t._x,w=t._y,k=b(t._xctrl,t._yctrl,_,w,a.smoothing,u.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=y([t._xctrl,t._yctrl],d,l,a.smoothing,u.smoothing),t.dxydi=e([t._xctrl,t._yctrl],a.smoothing,u.smoothing),t.dxydj=n([t._xctrl,t._yctrl],a.smoothing,u.smoothing)},t.i2a=function(_){var w=Math.max(0,Math.floor(_[0]),d-2),k=_[0]-w;return(1-k)*i[w]+k*i[w+1]},t.j2b=function(_){var w=Math.max(0,Math.floor(_[1]),d-2),k=_[1]-w;return(1-k)*r[w]+k*r[w+1]},t.ij2ab=function(_){return[t.i2a(_[0]),t.j2b(_[1])]},t.a2i=function(_){var w=Math.max(0,Math.min(g(_,i),d-2)),k=i[w],L=i[w+1];return Math.max(0,Math.min(d-1,w+(_-k)/(L-k)))},t.b2j=function(_){var w=Math.max(0,Math.min(g(_,r),l-2)),k=r[w],L=r[w+1];return Math.max(0,Math.min(l-1,w+(_-k)/(L-k)))},t.ab2ij=function(_){return[t.a2i(_[0]),t.b2j(_[1])]},t.i2c=function(_,w){return t.evalxy([],_,w)},t.ab2xy=function(_,w,k){if(!k&&(_<i[0]||_>i[d-1]|w<r[0]||w>r[l-1]))return[!1,!1];var L=t.a2i(_),A=t.b2j(w),I=t.evalxy([],L,A);if(k){var P,S,E,D,F=0,H=0,V=[];_<i[0]?(P=0,S=0,F=(_-i[0])/(i[1]-i[0])):_>i[d-1]?(P=d-2,S=1,F=(_-i[d-1])/(i[d-1]-i[d-2])):S=L-(P=Math.max(0,Math.min(d-2,Math.floor(L)))),w<r[0]?(E=0,D=0,H=(w-r[0])/(r[1]-r[0])
1221):w>r[l-1]?(E=l-2,D=1,H=(w-r[l-1])/(r[l-1]-r[l-2])):D=A-(E=Math.max(0,Math.min(l-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(_,w,k){return[w.c2p(_[0]),k.c2p(_[1])]},t.p2x=function(_,w,k){return[w.p2c(_[0]),k.p2c(_[1])]},t.dadi=function(_){var w=Math.max(0,Math.min(i.length-2,_));return i[w+1]-i[w]},t.dbdj=function(_){var w=Math.max(0,Math.min(r.length-2,_));return r[w+1]-r[w]},t.dxyda=function(_,w,k,L){var A=t.dxydi(null,_,w,k,L),I=t.dadi(_,k);return[A[0]/I,A[1]/I]},t.dxydb=function(_,w,k,L){var A=t.dxydj(null,_,w,k,L),I=t.dbdj(w,L);return[A[0]/I,A[1]/I]},t.dxyda_rough=function(_,w,k){var L=s*(k||.1),A=t.ab2xy(_+L,w,!0),I=t.ab2xy(_-L,w,!0);return[.5*(A[0]-I[0])/L,.5*(A[1]-I[1])/L]},t.dxydb_rough=function(_,w,k){var L=x*(k||.1),A=t.ab2xy(_,w+L,!0),I=t.ab2xy(_,w-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(v,$,te){var m=v("../../lib");$.exports=function(g,b,y){var e,n,t,i=[],r=[],d=g[0].length,l=g.length;function a(K,G){var W,Q=0,R=0;return K>0&&(W=g[G][K-1])!==void 0&&(R++,Q+=W),K<d-1&&(W=g[G][K+1])!==void 0&&(R++,Q+=W),G>0&&(W=g[G-1][K])!==void 0&&(R++,Q+=W),G<l-1&&(W=g[G+1][K])!==void 0&&(R++,Q+=W),Q/Math.max(1,R)}var u,f,o,h,p,s,x,c,T,_,w,k=0;for(e=0;e<d;e++)for(n=0;n<l;n++)g[n][e]===void 0&&(i.push(e),r.push(n),g[n][e]=a(e,n)),k=Math.max(k,Math.abs(g[n][e]));if(!i.length)return g;var L=0,A=0,I=i.length;do{for(L=0,t=0;t<I;t++){e=i[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=g[n][F],Z+=(S=g[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=g[n][F],Z+=(S=g[n][d-2])+(S-P)*(b[d-1]-D)/(D-E),V++),(e===0||e===d-1)&&n>0&&n<l-1&&(u=y[n+1]-y[n],Z+=((f=y[n]-y[n-1])*g[n+1][e]+u*g[n-1][e])/(f+u),V++),n===0?(E=y[H=Math.min(l-1,2)],D=y[1],P=g[H][e],Z+=(S=g[1][e])+(S-P)*(y[0]-D)/(D-E),V++):n===l-1&&(E=y[H=Math.max(0,l-3)],D=y[l-2],P=g[H][e],Z+=(S=g[l-2][e])+(S-P)*(y[l-1]-D)/(D-E),V++),(n===0||n===l-1)&&e>0&&e<d-1&&(u=b[e+1]-b[e],Z+=((f=b[e]-b[e-1])*g[n][e+1]+u*g[n][e-1])/(f+u),V++),V?Z/=V:(o=b[e+1]-b[e],h=b[e]-b[e-1],c=(p=y[n+1]-y[n])*(s=y[n]-y[n-1])*(p+s),Z=((x=o*h*(o+h))*(s*g[n+1][e]+p*g[n-1][e])+c*(h*g[n][e+1]+o*g[n][e-1]))/(c*(h+o)+x*(s+p))),L+=(_=(T=Z-g[n][e])/k)*_,w=V?0:.85,g[n][e]+=T*(1+w)}L=Math.sqrt(L)}while(A++<100&&L>1e-5);return m.log("Smoother converged to",L,"after",A,"iterations"),g}},{"../../lib":503}],715:[function(v,$,te){var m=v("../../lib").isArray1D;$.exports=function(g,b,y){var e=y("x"),n=e&&e.length,t=y("y"),i=t&&t.length;if(!n&&!i)return!1;if(b._cheater=!e,n&&!m(e)||i&&!m(t))b._length=null;else{var r=n?e.length:1/0;i&&(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(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../scattergeo/attributes"),b=v("../../components/colorscale/attributes"),y=v("../../plots/attributes"),e=v("../../components/color/attributes").defaultLine,n=v("../../lib/extend").extendFlat,t=g.marker.line;$.exports=n({locations:{valType:"data_array",editType:"calc"},locationmode:g.locationmode,z:{valType:"data_array",editType:"calc"},geojson:n({},g.geojson,{}),featureidkey:g.featureidkey,text:n({},g.text,{}),hovertext:n({},g.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:g.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:g.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:n({},y.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:m(),showlegend:n({},y.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":969}],717:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../constants/numerical").BADNUM,b=v("../../components/colorscale/calc"),y=v("../scatter/arrays_to_calcdata"),e=v("../scatter/calc_selection");function n(t){return t&&typeof t=="string"}$.exports=function(t,i){var r,d=i._length,l=new Array(d);r=i.geojson?function(h){return n(h)||m(h)}:n;for(var a=0;a<d;a++){var u=l[a]={},f=i.locations[a],o=i.z[a];r(f)&&m(o)?(u.loc=f,u.z=o):(u.loc=null,u.z=g),u.index=a}return y(l,i),b(t,i,{vals:i.z,containerStr:"",cLetter:"z"}),e(l,i),l}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../scatter/arrays_to_calcdata":926,"../scatter/calc_selection":929,"fast-isnumeric":190}],718:[function(v,$,te){var m=v("../../lib"),g=v("../../components/colorscale/defaults"),b=v("./attributes");$.exports=function(y,e,n,t){function i(u,f){return m.coerce(y,e,b,u,f)}var r=i("locations"),d=i("z");if(r&&r.length&&m.isArrayOrTypedArray(d)&&d.length){e._length=Math.min(r.length,d.length);var l,a=i("geojson");
1221(typeof a=="string"&&a!==""||m.isPlainObject(a))&&(l="geojson-id"),i("locationmode",l)==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate"),i("marker.line.width")&&i("marker.line.color"),i("marker.opacity"),g(y,e,t,i,{prefix:"",cLetter:"z"}),m.coerceSelectionMarkerOpacity(e,i)}else e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":716}],719:[function(v,$,te){$.exports=function(m,g,b,y,e){m.location=g.location,m.z=g.z;var n=y[e];return n.fIn&&n.fIn.properties&&(m.properties=n.fIn.properties),m.ct=n.ct,m}},{}],720:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("./attributes"),b=v("../../lib").fillText;$.exports=function(y,e,n){var t,i,r,d,l=y.cd,a=l[0].trace,u=y.subplot,f=[e,n],o=[e+360,n];for(i=0;i<l.length;i++)if(d=!1,(t=l[i])._polygons){for(r=0;r<t._polygons.length;r++)t._polygons[r].contains(f)&&(d=!d),t._polygons[r].contains(o)&&(d=!d);if(d)break}if(d&&t)return y.x0=y.x1=y.xa.c2p(t.ct),y.y0=y.y1=y.ya.c2p(t.ct),y.index=t.index,y.location=t.loc,y.z=t.z,y.zLabel=m.tickText(u.mockAxis,u.mockAxis.c2l(t.z),"hover").text,y.hovertemplate=t.hovertemplate,function(h,p,s){if(!p.hovertemplate){var x=s.hi||p.hoverinfo,c=String(s.loc),T=x==="all"?g.hoverinfo.flags:x.split("+"),_=T.indexOf("name")!==-1,w=T.indexOf("location")!==-1,k=T.indexOf("z")!==-1,L=T.indexOf("text")!==-1,A=[];!_&&w?h.nameOverride=c:(_&&(h.nameOverride=p.name),w&&A.push(c)),k&&A.push(h.zLabel),L&&b(s,p,A),h.extraText=A.join("<br>")}}(y,a,t),[y]}},{"../../lib":503,"../../plots/cartesian/axes":554,"./attributes":716}],721:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../heatmap/colorbar"),calc:v("./calc"),calcGeoJSON:v("./plot").calcGeoJSON,plot:v("./plot").plot,style:v("./style").style,styleOnSelect:v("./style").styleOnSelect,hoverPoints:v("./hover"),eventData:v("./event_data"),selectPoints:v("./select"),moduleType:"trace",name:"choropleth",basePlotModule:v("../../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(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../lib/geo_location_utils"),y=v("../../lib/topojson_utils").getTopojsonFeatures,e=v("../../plots/cartesian/autorange").findExtremes,n=v("./style").style;$.exports={calcGeoJSON:function(t,i){for(var r=t[0].trace,d=i[r.geo],l=d._subplot,a=r.locationmode,u=r._length,f=a==="geojson-id"?b.extractTraceFeature(t):y(r,l.topojson),o=[],h=[],p=0;p<u;p++){var s=t[p],x=a==="geojson-id"?s.fOut:b.locationToFeature(a,s.loc,f);if(x){s.geojson=x,s.ct=x.properties.ct,s._polygons=b.feature2polygons(x);var c=b.computeBbox(x);o.push(c[0],c[2]),h.push(c[1],c[3])}else s.geojson=null}if(d.fitbounds==="geojson"&&a==="geojson-id"){var T=b.computeBbox(b.getTraceGeojson(r));o=[T[0],T[2]],h=[T[1],T[3]]}var _={padded:!0};r._extremes.lon=e(d.lonaxis._ax,o,_),r._extremes.lat=e(d.lataxis._ax,h,_)},plot:function(t,i,r){var d=i.layers.backplot.select(".choroplethlayer");g.makeTraceGroups(d,r,"trace choropleth").each(function(l){var a=m.select(this).selectAll("path.choroplethlocation").data(g.identity);a.enter().append("path").classed("choroplethlocation",!0),a.exit().remove(),n(t,l)})}}},{"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/topojson_utils":532,"../../plots/cartesian/autorange":553,"./style":724,"@plotly/d3":58}],723:[function(v,$,te){$.exports=function(m,g){var b,y,e,n,t,i=m.cd,r=m.xaxis,d=m.yaxis,l=[];if(g===!1)for(b=0;b<i.length;b++)i[b].selected=0;else for(b=0;b<i.length;b++)(e=(y=i[b]).ct)&&(n=r.c2p(e),t=d.c2p(e),g.contains([n,t],null,b,m)?(l.push({pointNumber:b,lon:e[0],lat:e[1]}),y.selected=1):y.selected=0);return l}},{}],724:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/color"),b=v("../../components/drawing"),y=v("../../components/colorscale");function e(n,t){var i=t[0].trace,r=t[0].node3.selectAll(".choroplethlocation"),d=i.marker||{},l=d.line||{},a=y.makeColorScaleFuncFromTrace(i);r.each(function(u){m.select(this).attr("fill",a(u.z)).call(g.stroke,u.mlc||l.color).call(b.dashLine,"",u.mlw||l.width||0).style("opacity",d.opacity)}),b.selectedPointStyle(r,i,n)}$.exports={style:function(n,t){t&&e(n,t)},styleOnSelect:function(n,t){var i=t[0].node3,r=t[0].trace;r.selectedpoints?b.selectedPointStyle(i.selectAll(".choroplethlocation"),r,n):e(n,t)}}},{"../../components/color":366,"../../components/colorscale":378,"../../components/drawing":388,"@plotly/d3":58}],725:[function(v,$,te){var m=v("../choropleth/attributes"),g=v("../../components/colorscale/attributes"),b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../../plots/attributes"),e=v("../../lib/extend").extendFlat;$.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},m.featureidkey,{}),below:{valType:"string",editType:"plot"},text:m.text,hovertext:m.hovertext,marker:{line:{color:e({},m.marker.line.color,{editType:"plot"}),width:e({},m.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},m.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},m.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},m.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:m.hoverinfo,hovertemplate:b({},{keys:["properties"]}),showlegend:e({},y.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../choropleth/attributes":716}],726:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../components/colorscale"),y=v("../../components/drawing"),e=v("../../lib/geojson_utils").makeBlank,n=v("../../lib/geo_location_utils");function t(i){var r,d=i[0].trace,l=d._opts;if(d.selectedpoints){for(var a=y.makeSelectedPointStyleFns(d),u=0;u<i.length;u++){var f=i[u];f.fOut&&(f.fOut.properties.mo2=a.selectedOpacityFn(f))}r={type:"identity",property:"mo2"}}else r=g.isArrayOrTypedArray(d.marker.opacity)?{type:"identity",property:"mo"}:d.marker.opacity;return g.extendFlat(l.fill.paint,{"fill-opacity":r}),g.extendFlat(l.line.paint,{"line-opacity":r}),l}$.exports={convert:function(i){var r=i[0].trace,d=r.visible===!0&&r._length!==0,l={layout:{visibility:"none"},paint:{}},a={layout:{visibility:"none"},paint:{}},u=r._opts={fill:l,line:a,geojson:e()};if(!d)return u;var f=n.extractTraceFeature(i);if(!f)return u;var o,h,p,s=b.makeColorScaleFuncFromTrace(r),x=r.marker,c=x.line||{};g.isArrayOrTypedArray(x.opacity)&&(o=function(A){var I=A.mo;return m(I)?+g.constrain(I,0,1):0}),g.isArrayOrTypedArray(c.color)&&(h=function(A){return A.mlc}),g.isArrayOrTypedArray(c.width)&&(p=function(A){return A.mlw});for(var T=0;T<i.length;T++){var _=i[T],w=_.fOut;if(w){var k=w.properties;k.fc=s(_.z),o&&(k.mo=o(_)),h&&(k.mlc=h(_)),p&&(k.mlw=p(_)),_.ct=k.ct,_._polygons=n.feature2polygons(w)}}var L=o?{type:"identity",property:"mo"}:x.opacity;return g.extendFlat(l.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":L}
1221),g.extendFlat(a.paint,{"line-color":h?{type:"identity",property:"mlc"}:c.color,"line-width":p?{type:"identity",property:"mlw"}:c.width,"line-opacity":L}),l.layout.visibility="visible",a.layout.visibility="visible",u.geojson={type:"FeatureCollection",features:f},t(i),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(v,$,te){var m=v("../../lib"),g=v("../../components/colorscale/defaults"),b=v("./attributes");$.exports=function(y,e,n,t){function i(a,u){return m.coerce(y,e,b,a,u)}var r=i("locations"),d=i("z"),l=i("geojson");m.isArrayOrTypedArray(r)&&r.length&&m.isArrayOrTypedArray(d)&&d.length&&(typeof l=="string"&&l!==""||m.isPlainObject(l))?(i("featureidkey"),e._length=Math.min(r.length,d.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("marker.line.width")&&i("marker.line.color"),i("marker.opacity"),g(y,e,t,i,{prefix:"",cLetter:"z"}),m.coerceSelectionMarkerOpacity(e,i)):e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":725}],728:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../heatmap/colorbar"),calc:v("../choropleth/calc"),plot:v("./plot"),hoverPoints:v("../choropleth/hover"),eventData:v("../choropleth/event_data"),selectPoints:v("../choropleth/select"),styleOnSelect:function(m,g){g&&g[0].trace._glTrace.updateOnSelect(g)},getBelow:function(m,g){for(var b=g.getMapLayers(),y=b.length-2;y>=0;y--){var e=b[y].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var n=y+1;n<b.length;n++)if(typeof(e=b[n].id)=="string"&&e.indexOf("plotly-")===-1)return e}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:v("../../plots/mapbox"),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}},{"../../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(v,$,te){var m=v("./convert").convert,g=v("./convert").convertOnSelect,b=v("../../plots/mapbox/constants").traceLayerPrefix;function y(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=y.prototype;e.update=function(n){this._update(m(n))},e.updateOnSelect=function(n){this._update(g(n))},e._update=function(n){var t=this.subplot,i=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<i.length;d++){var l=i[d],a=l[0],u=l[1],f=n[a];t.setOptions(u,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&t.setOptions(u,"setPaintProperty",f.paint)}},e._addLayers=function(n,t){for(var i=this.subplot,r=this.layerList,d=this.sourceId,l=0;l<r.length;l++){var a=r[l],u=a[0],f=n[u];i.addLayer({type:u,id:a[1],source:d,layout:f.layout,paint:f.paint},t)}},e._removeLayers=function(){for(var n=this.subplot.map,t=this.layerList,i=t.length-1;i>=0;i--)n.removeLayer(t[i][1])},e.dispose=function(){var n=this.subplot.map;this._removeLayers(),n.removeSource(this.sourceId)},$.exports=function(n,t){var i=t[0].trace,r=new y(n,i.uid),d=r.sourceId,l=m(t),a=r.below=n.belowLookup["trace-"+i.uid];return n.map.addSource(d,{type:"geojson",data:l.geojson}),r._addLayers(l,a),t[0].trace._glTrace=r,r}},{"../../plots/mapbox/constants":611,"./convert":726}],730:[function(v,$,te){var m=v("../../components/colorscale/attributes"),g=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../mesh3d/attributes"),e=v("../../plots/attributes"),n=v("../../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:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:n({},e.showlegend,{dflt:!1})};n(t,m("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(i){t[i]=y[i]}),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,$.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(v,$,te){var m=v("../../components/colorscale/calc");$.exports=function(g,b){for(var y=b.u,e=b.v,n=b.w,t=Math.min(b.x.length,b.y.length,b.z.length,y.length,e.length,n.length),i=-1/0,r=1/0,d=0;d<t;d++){var l=y[d],a=e[d],u=n[d],f=Math.sqrt(l*l+a*a+u*u);i=Math.max(i,f),r=Math.min(r,f)}b._len=t,b._normMax=i,m(g,b,{vals:[r,i],containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],732:[function(v,$,te){var m=v("../../../stackgl_modules").gl_cone3d,g=v("../../../stackgl_modules").gl_cone3d.createConeMesh,b=v("../../lib").simpleMap,y=v("../../lib/gl_format_color").parseColorScale,e=v("../../components/colorscale").extractOpts,n=v("../../plots/gl3d/zip3");function t(u,f){this.scene=u,this.uid=f,this.mesh=null,this.data=null}var i=t.prototype;i.handlePick=function(u){if(u.object===this.mesh){var f=u.index=u.data.index,o=this.data.x[f],h=this.data.y[f],p=this.data.z[f],s=this.data.u[f],x=this.data.v[f],c=this.data.w[f];u.traceCoordinate=[o,h,p,s,x,c,Math.sqrt(s*s+x*x+c*c)];var T=this.data.hovertext||this.data.text;return Array.isArray(T)&&T[f]!==void 0?u.textLabel=T[f]:T&&(u.textLabel=T),!0}};var r={xaxis:0,yaxis:1,zaxis:2},d={tip:1,tail:0,cm:.25,center:.5},l={tip:1,tail:1,cm:.75,center:.5};function a(u,f){var o=u.fullSceneLayout,h=u.dataScale,p={};function s(_,w){var k=o[w],L=h[r[w]];return b(_,function(A){return k.d2l(A)*L})}p.vectors=n(s(f.u,"xaxis"),s(f.v,"yaxis"),s(f.w,"zaxis"),f._len),p.positions=n(s(f.x,"xaxis"),s(f.y,"yaxis"),s(f.z,"zaxis"),f._len);var x=e(f);p.colormap=y(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 c=m(p),T=f.lightposition;return c.lightPosition=[T.x,T.y,T.z],c.ambient=f.lighting.ambient,c.diffuse=f.lighting.diffuse,c.specular=f.lighting.specular,c.roughness=f.lighting.roughness,c.fresnel=f.lighting.fresnel,c.opacity=f.opacity,f._pad=l[f.anchor]*c.vectorScale*c.coneScale*f._normMax,c}i.update=function(u){this.data=u;var f=a(this.scene,u);this.mesh.update(f)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},$.exports=function(u,f){var o=u.glplot.gl,h=a(u,f),p=g(o,h),s=new t(u,f.uid);return s.mesh=p,s.data=f,p._trace=s,u.glplot.add(p),s}},{"../../../stackgl_modules":1124,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/gl3d/zip3":609}],733:[function(v,$,te){var m=v("../../lib"),g=v("../../components/colorscale/defaults"),b=v("./attributes");$.exports=function(y,e,n,t){function i(o,h){return m.coerce(y,e,b,o,h)}
1221var r=i("u"),d=i("v"),l=i("w"),a=i("x"),u=i("y"),f=i("z");r&&r.length&&d&&d.length&&l&&l.length&&a&&a.length&&u&&u.length&&f&&f.length?(i("sizeref"),i("sizemode"),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),g(y,e,t,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),e._length=null):e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":730}],734:[function(v,$,te){$.exports={moduleType:"trace",name:"cone",basePlotModule:v("../../plots/gl3d"),categories:["gl3d","showLegend"],attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:v("./calc"),plot:v("./convert"),eventData:function(m,g){return m.norm=g.traceCoordinate[6],m},meta:{}}},{"../../plots/gl3d":598,"./attributes":730,"./calc":731,"./convert":732,"./defaults":733}],735:[function(v,$,te){var m=v("../heatmap/attributes"),g=v("../scatter/attributes"),b=v("../../plots/cartesian/axis_format_attributes"),y=b.axisHoverFormat,e=b.descriptionOnlyNumbers,n=v("../../components/colorscale/attributes"),t=v("../../components/drawing/attributes").dash,i=v("../../plots/font_attributes"),r=v("../../lib/extend").extendFlat,d=v("../../constants/filter_ops"),l=d.COMPARISON_OPS2,a=d.INTERVAL_OPS,u=g.line;$.exports=r({z:m.z,x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.xperiod,yperiod:m.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,text:m.text,hovertext:m.hovertext,transpose:m.transpose,xtype:m.xtype,ytype:m.ytype,xhoverformat:y("x"),yhoverformat:y("y"),zhoverformat:y("z",1),hovertemplate:m.hovertemplate,texttemplate:r({},m.texttemplate,{}),textfont:r({},m.textfont,{}),hoverongaps:m.hoverongaps,connectgaps:r({},m.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:i({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:e("contour label")},operation:{valType:"enumerated",values:[].concat(l).concat(a),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":927}],736:[function(v,$,te){var m=v("../../components/colorscale"),g=v("../heatmap/calc"),b=v("./set_contours"),y=v("./end_plus");$.exports=function(e,n){var t=g(e,n),i=t[0].z;b(n,i);var r,d=n.contours,l=m.extractOpts(n);if(d.coloring==="heatmap"&&l.auto&&n.autocontour===!1){var a=d.start,u=y(d),f=d.size||1,o=Math.floor((u-a)/f)+1;isFinite(f)||(f=1,o=1);var h=a-f/2;r=[h,h+o*f]}else r=i;return m.calc(e,n,{vals:r,cLetter:"z"}),t}},{"../../components/colorscale":378,"../heatmap/calc":793,"./end_plus":746,"./set_contours":754}],737:[function(v,$,te){$.exports=function(m,g){var b,y=m[0],e=y.z;switch(g.type){case"levels":var n=Math.min(e[0][0],e[0][1]);for(b=0;b<m.length;b++){var t=m[b];t.prefixBoundary=!t.edgepaths.length&&(n>t.level||t.starts.length&&n===t.level)}break;case"constraint":if(y.prefixBoundary=!1,y.edgepaths.length)return;var i=y.x.length,r=y.y.length,d=-1/0,l=1/0;for(b=0;b<r;b++)l=Math.min(l,e[b][0]),l=Math.min(l,e[b][i-1]),d=Math.max(d,e[b][0]),d=Math.max(d,e[b][i-1]);for(b=1;b<i-1;b++)l=Math.min(l,e[0][b]),l=Math.min(l,e[r-1][b]),d=Math.max(d,e[0][b]),d=Math.max(d,e[r-1][b]);var a,u,f=g.value;switch(g._operation){case">":f>d&&(y.prefixBoundary=!0);break;case"<":(f<l||y.starts.length&&f===l)&&(y.prefixBoundary=!0);break;case"[]":a=Math.min(f[0],f[1]),((u=Math.max(f[0],f[1]))<l||a>d||y.starts.length&&u===l)&&(y.prefixBoundary=!0);break;case"][":a=Math.min(f[0],f[1]),u=Math.max(f[0],f[1]),a<l&&u>d&&(y.prefixBoundary=!0)}}}},{}],738:[function(v,$,te){var m=v("../../components/colorscale"),g=v("./make_color_map"),b=v("./end_plus");$.exports={min:"zmin",max:"zmax",calc:function(y,e,n){var t=e.contours,i=e.line,r=t.size||1,d=t.coloring,l=g(e,{isColorbar:!0});if(d==="heatmap"){var a=m.extractOpts(e);n._fillgradient=a.reversescale?m.flipScale(a.colorscale):a.colorscale,n._zrange=[a.min,a.max]}else d==="fill"&&(n._fillcolor=l);n._line={color:d==="lines"?l:i.color,width:t.showlines!==!1?i.width:0,dash:i.dash},n._levels={start:t.start,end:b(t),size:r}}}},{"../../components/colorscale":378,"./end_plus":746,"./make_color_map":751}],739:[function(v,$,te){$.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(v,$,te){var m=v("fast-isnumeric"),g=v("./label_defaults"),b=v("../../components/color"),y=b.addOpacity,e=b.opacity,n=v("../../constants/filter_ops"),t=n.CONSTRAINT_REDUCTION,i=n.COMPARISON_OPS2;$.exports=function(r,d,l,a,u,f){var o,h,p,s=d.contours,x=l("contours.operation");s._operation=t[x],function(c,T){var _;i.indexOf(T.operation)===-1?(c("contours.value",[0,1]),Array.isArray(T.value)?T.value.length>2?T.value=T.value.slice(2):T.length===0?T.value=[0,1]:T.length<2?(_=parseFloat(T.value[0]),T.value=[_,_+1]):T.value=[parseFloat(T.value[0]),parseFloat(T.value[1])]:m(T.value)&&(_=parseFloat(T.value),T.value=[_,_+1])):(c("contours.value",0),m(T.value)||(Array.isArray(T.value)?T.value=parseFloat(T.value[0]):T.value=0))}(l,s),x==="="?o=s.showlines=!0:(o=l("contours.showlines"),p=l("fillcolor",y((r.line||{}).color||u,.5))),o&&(h=l("line.color",p&&e(p)?y(d.fillcolor,1):u),l("line.width",2),l("line.dash")),l("line.smoothing"),g(l,a,h,f)}},{"../../components/color":366,"../../constants/filter_ops":475,"./label_defaults":750,"fast-isnumeric":190}],741:[function(v,$,te){var m=v("../../constants/filter_ops"),g=v("fast-isnumeric");function b(n,t){var i,r=Array.isArray(t);function d(l){return g(l)?+l:null}return m.COMPARISON_OPS2.indexOf(n)!==-1?i=d(r?t[0]:t):m.INTERVAL_OPS.indexOf(n)!==-1?i=r?[d(t[0]),d(t[1])]:[d(t),d(t)]:m.SET_OPS.indexOf(n)!==-1&&(i=r?t.map(d):[d(t)]),i}function y(n){return function(t){t=b(n,t);var i=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:i,end:r,size:r-i}}}function e(n){return function(t){return{start:t=b(n,t),end:1/0,size:1/0}}}$.exports={"[]":y("[]"),"][":y("]["),">":e(">"),"<":e("<"),"=":e("=")}},{"../../constants/filter_ops":475,"fast-isnumeric":190}],742:[function(v,$,te){$.exports=function(m,g,b,y){var e=y("contours.start"),n=y("contours.end"),t=e===!1||n===!1,i=b("contours.size");!(t?g.autocontour=!0:b("autocontour",!1))&&i||b("ncontours")}},{}],743:[function(v,$,te){var m=v("../../lib");function g(b){return m.extendFlat({},b,{edgepaths:m.extendDeep([],b.edgepaths),paths:m.extendDeep([],b.paths),starts:m.extendDeep([],b.starts)})}$.exports=function(b,y){var e,n,t,i=function(l){return l.reverse()},r=function(l){return l};switch(y){case"=":case"<":return b;case">
1221":for(b.length!==1&&m.warn("Contour data invalid for the specified inequality operation."),n=b[0],e=0;e<n.edgepaths.length;e++)n.edgepaths[e]=i(n.edgepaths[e]);for(e=0;e<n.paths.length;e++)n.paths[e]=i(n.paths[e]);for(e=0;e<n.starts.length;e++)n.starts[e]=i(n.starts[e]);return b;case"][":var d=i;i=r,r=d;case"[]":for(b.length!==2&&m.warn("Contour data invalid for the specified inequality range operation."),n=g(b[0]),t=g(b[1]),e=0;e<n.edgepaths.length;e++)n.edgepaths[e]=i(n.edgepaths[e]);for(e=0;e<n.paths.length;e++)n.paths[e]=i(n.paths[e]);for(e=0;e<n.starts.length;e++)n.starts[e]=i(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(v,$,te){var m=v("../../lib"),g=v("../heatmap/xyz_defaults"),b=v("../scatter/period_defaults"),y=v("./constraint_defaults"),e=v("./contours_defaults"),n=v("./style_defaults"),t=v("../heatmap/label_defaults"),i=v("./attributes");$.exports=function(r,d,l,a){function u(o,h){return m.coerce(r,d,i,o,h)}if(g(r,d,u,a)){b(r,d,a,u),u("xhoverformat"),u("yhoverformat"),u("text"),u("hovertext"),u("hoverongaps"),u("hovertemplate");var f=u("contours.type")==="constraint";u("connectgaps",m.isArray1D(d.z)),f?y(r,d,u,a,l):(e(r,d,u,function(o){return m.coerce2(r,d,i,o)}),n(r,d,u,a)),d.contours&&d.contours.coloring==="heatmap"&&t(u,a)}else d.visible=!1}},{"../../lib":503,"../heatmap/label_defaults":802,"../heatmap/xyz_defaults":807,"../scatter/period_defaults":947,"./attributes":735,"./constraint_defaults":740,"./contours_defaults":742,"./style_defaults":756}],745:[function(v,$,te){var m=v("../../lib"),g=v("./constraint_mapping"),b=v("./end_plus");$.exports=function(y,e,n){for(var t=y.type==="constraint"?g[y._operation](y.value):y,i=t.size,r=[],d=b(t),l=n.trace._carpetTrace,a=l?{xaxis:l.aaxis,yaxis:l.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+=i)if(r.push(m.extendFlat({level:u,crossings:{},starts:[],edgepaths:[],paths:[],z:n.z,smoothing:n.trace.line.smoothing},a)),r.length>1e3){m.warn("Too many contours, clipping at 1000",y);break}return r}},{"../../lib":503,"./constraint_mapping":741,"./end_plus":746}],746:[function(v,$,te){$.exports=function(m){return m.end+m.size/1e6}},{}],747:[function(v,$,te){var m=v("../../lib"),g=v("./constants");function b(n,t,i,r){return Math.abs(n[0]-t[0])<i&&Math.abs(n[1]-t[1])<r}function y(n,t,i,r,d){var l,a=t.join(","),u=n.crossings[a],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:g.BOTTOMSTART.indexOf(X)!==-1?se=1:g.LEFTSTART.indexOf(X)!==-1?ne=1:g.TOPSTART.indexOf(X)!==-1?se=-1:ne=-1,[ne,se]}(u,i,t),o=[e(n,t,[-f[0],-f[1]])],h=n.z.length,p=n.z[0].length,s=t.slice(),x=f.slice();for(l=0;l<1e4;l++){if(u>20?(u=g.CHOOSESADDLE[u][(f[0]||f[1])<0?0:1],n.crossings[a]=g.SADDLEREMAINDER[u]):delete n.crossings[a],!(f=g.NEWDELTA[u])){m.log("Found bad marching index:",u,t,n.level);break}o.push(e(n,t,f)),t[0]+=f[0],t[1]+=f[1],a=t.join(","),b(o[o.length-1],o[o.length-2],r,d)&&o.pop();var c=f[0]&&(t[0]<0||t[0]>p-2)||f[1]&&(t[1]<0||t[1]>h-2);if(t[0]===s[0]&&t[1]===s[1]&&f[0]===x[0]&&f[1]===x[1]||i&&c)break;u=n.crossings[a]}l===1e4&&m.log("Infinite loop in contour?");var T,_,w,k,L,A,I,P,S,E,D,F,H,V,Z,K=b(o[0],o[o.length-1],r,d),G=0,W=.2*n.smoothing,Q=[],R=0;for(l=1;l<o.length;l++)F=o[l],H=o[l-1],V=void 0,Z=void 0,V=F[2]-H[2],Z=F[3]-H[3],G+=I=Math.sqrt(V*V+Z*Z),Q.push(I);var N=G/Q.length*W;function U(X){return o[X%o.length]}for(l=o.length-2;l>=R;l--)if((T=Q[l])<N){for(w=0,_=l-1;_>=R&&T+Q[_]<N;_--)T+=Q[_];if(K&&l===o.length-2)for(w=0;w<_&&T+Q[w]<N;w++)T+=Q[w];L=l-_+w+1,A=Math.floor((l+_+w+2)/2),k=K||l!==o.length-2?K||_!==-1?L%2?U(A):[(U(A)[0]+U(A+1)[0])/2,(U(A)[1]+U(A+1)[1])/2]:o[0]:o[o.length-1],o.splice(_+1,l-_+1,k),l=_+1,w&&(R=w),K&&(l===o.length-2?o[w]=o[o.length-1]:l===0&&(o[o.length-1]=o[0]))}for(o.splice(0,R),l=0;l<o.length;l++)o[l].length=2;if(!(o.length<2))if(K)o.pop(),n.paths.push(o);else{i||m.log("Unclosed interior contour?",n.level,s.join(","),o.join("L"));var ee=!1;for(P=0;P<n.edgepaths.length;P++)if(E=n.edgepaths[P],!ee&&b(E[0],o[o.length-1],r,d)){o.pop(),ee=!0;var j=!1;for(S=0;S<n.edgepaths.length;S++)if(b((D=n.edgepaths[S])[D.length-1],o[0],r,d)){j=!0,o.shift(),n.edgepaths.splice(P,1),S===P?n.paths.push(o.concat(D)):(S>P&&S--,n.edgepaths[S]=D.concat(o,E));break}j||(n.edgepaths[P]=o.concat(E))}for(P=0;P<n.edgepaths.length&&!ee;P++)b((E=n.edgepaths[P])[E.length-1],o[0],r,d)&&(o.shift(),n.edgepaths[P]=E.concat(o),ee=!0);ee||n.edgepaths.push(o)}}function e(n,t,i){var r=t[0]+Math.max(i[0],0),d=t[1]+Math.max(i[1],0),l=n.z[d][r],a=n.xaxis,u=n.yaxis;if(i[1]){var f=(n.level-l)/(n.z[d][r+1]-l),o=(f!==1?(1-f)*a.c2l(n.x[r]):0)+(f!==0?f*a.c2l(n.x[r+1]):0);return[a.c2p(a.l2c(o),!0),u.c2p(n.y[d],!0),r+f,d]}var h=(n.level-l)/(n.z[d+1][r]-l),p=(h!==1?(1-h)*u.c2l(n.y[d]):0)+(h!==0?h*u.c2l(n.y[d+1]):0);return[a.c2p(n.x[r],!0),u.c2p(u.l2c(p),!0),r,d+h]}$.exports=function(n,t,i){var r,d,l,a;for(t=t||.01,i=i||.01,d=0;d<n.length;d++){for(l=n[d],a=0;a<l.starts.length;a++)y(l,l.starts[a],"edge",t,i);for(r=0;Object.keys(l.crossings).length&&r<1e4;)r++,y(l,Object.keys(l.crossings)[0].split(",").map(Number),void 0,t,i);r===1e4&&m.log("Infinite loop in contour?")}}},{"../../lib":503,"./constants":739}],748:[function(v,$,te){var m=v("../../components/color"),g=v("../heatmap/hover");$.exports=function(b,y,e,n,t){t||(t={}),t.isContour=!0;var i=g(b,y,e,n,t);
1221return i&&i.forEach(function(r){var d=r.trace;d.contours.type==="constraint"&&(d.fillcolor&&m.opacity(d.fillcolor)?r.color=m.addOpacity(d.fillcolor,1):d.contours.showlines&&m.opacity(d.line.color)&&(r.color=m.addOpacity(d.line.color,1)))}),i}},{"../../components/color":366,"../heatmap/hover":799}],749:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc"),plot:v("./plot").plot,style:v("./style"),colorbar:v("./colorbar"),hoverPoints:v("./hover"),moduleType:"trace",name:"contour",basePlotModule:v("../../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(v,$,te){var m=v("../../lib");$.exports=function(g,b,y,e){if(e||(e={}),g("contours.showlabels")){var n=b.font;m.coerceFont(g,"contours.labelfont",{family:n.family,size:n.size,color:y}),g("contours.labelformat")}e.hasHover!==!1&&g("zhoverformat")}},{"../../lib":503}],751:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/colorscale"),b=v("./end_plus");$.exports=function(y){var e=y.contours,n=e.start,t=b(e),i=e.size||1,r=Math.floor((t-n)/i)+1,d=e.coloring==="lines"?0:1,l=g.extractOpts(y);isFinite(i)||(i=1,r=1);var a,u,f=l.reversescale?g.flipScale(l.colorscale):l.colorscale,o=f.length,h=new Array(o),p=new Array(o);if(e.coloring==="heatmap"){var s=l.min,x=l.max;for(u=0;u<o;u++)a=f[u],h[u]=a[0]*(x-s)+s,p[u]=a[1];var c=m.extent([s,x,e.start,e.start+i*(r-1)]),T=c[s<x?0:1],_=c[s<x?1:0];T!==s&&(h.splice(0,0,T),p.splice(0,0,p[0])),_!==x&&(h.push(_),p.push(p[p.length-1]))}else for(u=0;u<o;u++)a=f[u],h[u]=(a[0]*(r+d-1)-d/2)*i+n,p[u]=a[1];return g.makeColorScaleFunc({domain:h,range:p},{noNumericCheck:!0})}},{"../../components/colorscale":378,"./end_plus":746,"@plotly/d3":58}],752:[function(v,$,te){var m=v("./constants");function g(b,y){var e=(y[0][0]>b?0:1)+(y[0][1]>b?0:2)+(y[1][1]>b?0:4)+(y[1][0]>b?0:8);return e===5||e===10?b>(y[0][0]+y[0][1]+y[1][0]+y[1][1])/4?e===5?713:1114:e===5?104:208:e===15?0:e}$.exports=function(b){var y,e,n,t,i,r,d,l,a,u=b[0].z,f=u.length,o=u[0].length,h=f===2||o===2;for(e=0;e<f-1;e++)for(t=[],e===0&&(t=t.concat(m.BOTTOMSTART)),e===f-2&&(t=t.concat(m.TOPSTART)),y=0;y<o-1;y++)for(n=t.slice(),y===0&&(n=n.concat(m.LEFTSTART)),y===o-2&&(n=n.concat(m.RIGHTSTART)),i=y+","+e,r=[[u[e][y],u[e][y+1]],[u[e+1][y],u[e+1][y+1]]],a=0;a<b.length;a++)(d=g((l=b[a]).level,r))&&(l.crossings[i]=d,n.indexOf(d)!==-1&&(l.starts.push([y,e]),h&&n.indexOf(d,n.indexOf(d)+1)!==-1&&l.starts.push([y,e])))}},{"./constants":739}],753:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../components/drawing"),y=v("../../components/colorscale"),e=v("../../lib/svg_text_utils"),n=v("../../plots/cartesian/axes"),t=v("../../plots/cartesian/set_convert"),i=v("../heatmap/plot"),r=v("./make_crossings"),d=v("./find_all_paths"),l=v("./empty_pathinfo"),a=v("./convert_to_constraints"),u=v("./close_boundaries"),f=v("./constants"),o=f.LABELOPTIMIZER;function h(x,c){var T,_,w,k,L,A,I,P="",S=0,E=x.edgepaths.map(function(K,G){return G}),D=!0;function F(K){return Math.abs(K[1]-c[2][1])<.01}function H(K){return Math.abs(K[0]-c[0][0])<.01}function V(K){return Math.abs(K[0]-c[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),T=x.edgepaths[S][x.edgepaths[S].length-1],k=-1,w=0;w<4;w++){if(!T){g.log("Missing end?",S,x);break}for(I=T,Math.abs(I[1]-c[0][1])<.01&&!V(T)?_=c[1]:H(T)?_=c[0]:F(T)?_=c[3]:V(T)&&(_=c[2]),L=0;L<x.edgepaths.length;L++){var Z=x.edgepaths[L][0];Math.abs(T[0]-_[0])<.01?Math.abs(T[0]-Z[0])<.01&&(Z[1]-T[1])*(_[1]-Z[1])>=0&&(_=Z,k=L):Math.abs(T[1]-_[1])<.01?Math.abs(T[1]-Z[1])<.01&&(Z[0]-T[0])*(_[0]-Z[0])>=0&&(_=Z,k=L):g.log("endpt to newendpt is not vert. or horz.",T,_,Z)}if(T=_,k>=0)break;P+="L"+_}if(k===x.edgepaths.length){g.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,c,T,_){var w=c.width/2,k=c.height/2,L=x.x,A=x.y,I=x.theta,P=Math.cos(I)*w,S=Math.sin(I)*w,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=o.EDGECOST*(1/(E-1)+1/(D-1));F+=o.ANGLECOST*I*I;for(var H=L-P,V=A-S,Z=L+P,K=A+S,G=0;G<T.length;G++){var W=T[G],Q=Math.cos(W.theta)*W.width/2,R=Math.sin(W.theta)*W.width/2,N=2*g.segmentDistance(H,V,Z,K,W.x-Q,W.y-R,W.x+Q,W.y+R)/(c.height+W.height),U=W.level===c.level,ee=U?o.SAMELEVELDISTANCE:1;if(N<=ee)return 1/0;F+=o.NEIGHBORCOST*(U?o.SAMELEVELFACTOR:1)/(N-ee)}return F}function s(x){var c,T,_=x.trace._emptypoints,w=[],k=x.z.length,L=x.z[0].length,A=[];for(c=0;c<L;c++)A.push(1);for(c=0;c<k;c++)w.push(A.slice());for(c=0;c<_.length;c++)w[(T=_[c])[0]][T[1]]=0;return x.zmask=w,w}te.plot=function(x,c,T,_){var w=c.xaxis,k=c.yaxis;g.makeTraceGroups(_,T,"contour").each(function(L){var A=m.select(this),I=L[0],P=I.trace,S=I.x,E=I.y,D=P.contours,F=l(D,c,I),H=g.ensureSingle(A,"g","heatmapcoloring"),V=[];D.coloring==="heatmap"&&(V=[L]),i(x,c,V,H),r(F),d(F);var Z=w.c2p(S[0],!0),K=w.c2p(S[S.length-1],!0),G=k.c2p(E[0],!0),W=k.c2p(E[E.length-1],!0),Q=[[Z,W],[K,W],[K,G],[Z,G]],R=F;D.type==="constraint"&&(R=a(F,D._operation)),function(N,U,ee){var j=g.ensureSingle(N,"g","contourbg").selectAll("path").data(ee.coloring==="fill"?[0]:[]);j.enter().append("path"),j.exit().remove(),j.attr("d","M"+U.join("L")+"Z").style("stroke","none")}(A,Q,D),function(N,U,ee,j){var X=j.coloring==="fill"||j.type==="constraint"&&j._operation!=="=",J="M"+ee.join("L")+"Z";X&&u(U,j);var re=g.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,ee);se?m.select(this).attr("d",se).style("stroke","none"):m.select(this).remove()})}(A,R,Q,D),function(N,U,ee,j,X){var J=g.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,ee,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=[];g.clearLocationCache();var _e=te.labelFormatter(ee,j),we=b.tester.append("text").attr("data-notex",1).call(b.font,X.labelfont),Ee=U[0].xaxis,fe=U[0].yaxis,ge=Ee._length,ke=fe._length,be=Ee.range,Se=fe.range,Oe=g.aggNums(Math.min,null,
vendor: 7,975 bytes, line 1221
1221j.x),De=g.aggNums(Math.max,null,j.x),je=g.aggNums(Math.min,null,j.y),Je=g.aggNums(Math.max,null,j.y),ze=Math.max(Ee.c2p(Oe,!0),0),Ue=Math.min(Ee.c2p(De,!0),ge),Ge=Math.max(fe.c2p(Je,!0),0),Ye=Math.min(fe.c2p(je,!0),ke),et={};be[0]<be[1]?(et.left=ze,et.right=Ue):(et.left=Ue,et.right=ze),Se[0]<Se[1]?(et.top=Ge,et.bottom=Ye):(et.top=Ye,et.bottom=Ge),et.middle=(et.top+et.bottom)/2,et.center=(et.left+et.right)/2,de.push([[et.left,et.top],[et.right,et.top],[et.right,et.bottom],[et.left,et.bottom]]);var ct=Math.sqrt(ge*ge+ke*ke),mt=f.LABELDISTANCE*ct/Math.max(1,U.length/f.LABELINCREASE);oe.each(function(Ct){var Tt=te.calcTextOpts(Ct.level,_e,we,ee);m.select(this).selectAll("path").each(function(){var nt=g.getVisibleSegment(this,et,Tt.height/2);if(nt&&!(nt.len<(Tt.width+Tt.height)*f.LABELMIN))for(var Qe=Math.min(Math.ceil(nt.len/mt),f.LABELMAX),Et=0;Et<Qe;Et++){var Gt=te.findBestTextLocation(this,nt,Tt,xe,et);if(!Gt)break;te.addLabelData(Gt,Tt,xe,de)}})}),we.remove(),te.drawLabels(ce,xe,ee,pe,se?de:null)}ne&&!re&&oe.remove()}(A,F,x,I,D),function(N,U,ee,j,X){var J=j.trace,re=ee._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:s(j),smoothing:0};r([oe]),d([oe]),u([oe],{type:"levels"}),g.ensureSingle(se,"path","").attr("d",(oe.prefixBoundary?"M"+X.join("L")+"Z":"")+h(oe,X))}else ne=null;b.setClipUrl(N,ne,ee)}(A,c,x,I,Q)})},te.createLines=function(x,c,T){var _=T[0].smoothing,w=x.selectAll("g.contourlevel").data(c?T:[]);if(w.exit().remove(),w.enter().append("g").classed("contourlevel",!0),c){var k=w.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=w.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 w},te.createLineClip=function(x,c,T,_){var w=c?"clipline"+_:null,k=T._fullLayout._clips.selectAll("#"+w).data(c?[0]:[]);return k.exit().remove(),k.enter().append("clipPath").classed("contourlineclip",!0).attr("id",w),b.setClipUrl(x,w,T),k},te.labelFormatter=function(x,c){var T=x._fullLayout,_=c.trace,w=_.contours,k={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(w.labelformat)k.tickformat=w.labelformat,t(k,T);else{var L=y.extractOpts(_);if(L&&L.colorbar&&L.colorbar._axis)k=L.colorbar._axis;else{if(w.type==="constraint"){var A=w.value;Array.isArray(A)?k.range=[A[0],A[A.length-1]]:k.range=[A,A]}else k.range=[w.start,w.end],k.nticks=(w.end-w.start)/w.size;k.range[0]===k.range[1]&&(k.range[1]+=k.range[0]||1),k.nticks||(k.nticks=1e3),t(k,T),n.prepTicks(k),k._tmin=null,k._tmax=null}}return function(I){return n.tickText(k,I).text}},te.calcTextOpts=function(x,c,T,_){var w=c(x);T.text(w).call(e.convertToTspans,_);var k=T.node(),L=b.bBox(k,!0);return{text:w,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,c,T,_,w){var k,L,A,I,P,S=T.width;c.isClosed?(L=c.len/o.INITIALSEARCHPOINTS,k=c.min+L/2,A=c.max):(L=(c.len-S)/(o.INITIALSEARCHPOINTS+1),k=c.min+L+S/2,A=c.max-(L+S)/2);for(var E=1/0,D=0;D<o.ITERATIONS;D++){for(var F=k;F<A;F+=L){var H=g.getTextLocation(x,c.total,F,S),V=p(H,T,_,w);V<E&&(E=V,P=H,I=F)}if(E>2*o.MAXCOST)break;D&&(L/=2),A=(k=I-L/2)+1.5*L}if(E<=o.MAXCOST)return P},te.addLabelData=function(x,c,T,_){var w=c.fontSize,k=c.width+w/3,L=Math.max(0,c.height-w/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)];T.push({text:c.text,x:A,y:I,dy:c.dy,theta:P,level:c.level,width:k,height:L}),_.push(F)},te.drawLabels=function(x,c,T,_,w){var k=x.selectAll("text").data(c,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;m.select(this).text(I.text).attr({x:P,y:S,transform:"rotate("+180*I.theta/Math.PI+" "+P+" "+S+")"}).call(e.convertToTspans,T)}),w){for(var L="",A=0;A<w.length;A++)L+="M"+w[A].join("L")+"Z";g.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(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../lib");function b(y,e,n){var t={type:"linear",range:[y,e]};return m.autoTicks(t,(e-y)/(n||15)),t}$.exports=function(y,e){var n=y.contours;if(y.autocontour){var t=y.zmin,i=y.zmax;(y.zauto||t===void 0)&&(t=g.aggNums(Math.min,null,e)),(y.zauto||i===void 0)&&(i=g.aggNums(Math.max,null,e));var r=b(t,i,y.ncontours);n.size=r.dtick,n.start=m.tickFirst(r),r.range.reverse(),n.end=m.tickFirst(r),n.start===t&&(n.start+=n.size),n.end===i&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),y._input.contours||(y._input.contours={}),g.extendFlat(y._input.contours,{start:n.start,end:n.end,size:n.size}),y._input.autocontour=!0}else if(n.type!=="constraint"){var d,l=n.start,a=n.end,u=y._input.contours;l>a&&(n.start=u.start=a,a=n.end=u.end=l,l=n.start),!(n.size>0)&&(d=l===a?1:b(l,a,y.ncontours).dtick,u.size=n.size=d)}}},{"../../lib":503,"../../plots/cartesian/axes":554}],755:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/drawing"),b=v("../heatmap/style"),y=v("./make_color_map");$.exports=function(e){var n=m.select(e).selectAll("g.contour");n.style("opacity",function(t){return t[0].trace.opacity}),n.each(function(t){var i=m.select(this),r=t[0].trace,d=r.contours,l=r.line,a=d.size||1,u=d.start,f=d.type==="constraint",o=!f&&d.coloring==="lines",h=!f&&d.coloring==="fill",p=o||h?y(r):null;i.selectAll("g.contourlevel").each(function(c){m.select(this).selectAll("path").call(g.lineGroupStyle,l.width,o?p(c.level):l.color,l.dash)});var s=d.labelfont;if(i.selectAll("g.contourlabels text").each(function(c){g.font(m.select(this),{family:s.family,size:s.size,color:s.color||(o?p(c.level):l.color)})}),f)i.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(h){var x;i.selectAll("g.contourfill path").style("fill",function(c){return x===void 0&&(x=c.level),p(c.level+.5*a)}),x===void 0&&(x=u),i.selectAll("g.contourbg path").style("fill",p(x-.5*a))}}),b(e)}},{"../../components/drawing":388,"../heatmap/style":805,"./make_color_map":751,"@plotly/d3":58}],756:[function(v,$,te){var m=v("../../components/colorscale/defaults"),g=v("./label_defaults");$.exports=function(b,y,e,n,t){var i,r=e("contours.coloring"),d="";r==="fill"&&(i=e("contours.showlines")),i!==!1&&(r!=="lines"&&(d=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(b.showlegend!==!0&&(y.showlegend=!1),y._dfltShowLegend=!1,m(b,y,n,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),g(e,n,d,t)}},{"../../components/colorscale/defaults":376,"./label_defaults":750}],757:[function(v,$,te){var m=v("../heatmap/attributes"),g=v("../contour/attributes"),b=v("../../components/colorscale/attributes"),y=v("../../lib/extend").extendFlat,e=g.contours;$.exports=y({carpet:{valType:"string",editType:"calc"},z:m.z,a:m.x,a0:m.x0,da:m.dx,b:m.y,b0:m.y0,db:m.dy,text:m.text,hovertext:m.hovertext,transpose:m.transpose,atype:m.xtype,btype:m.ytype,fillcolor:g.fill
1221color,autocontour:g.autocontour,ncontours:g.ncontours,contours:{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:g.line.color,width:g.line.width,dash:g.line.dash,smoothing:g.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(v,$,te){var m=v("../../components/colorscale/calc"),g=v("../../lib"),b=v("../heatmap/convert_column_xyz"),y=v("../heatmap/clean_2d_array"),e=v("../heatmap/interp2d"),n=v("../heatmap/find_empties"),t=v("../heatmap/make_bound_array"),i=v("./defaults"),r=v("../carpet/lookup_carpetid"),d=v("../contour/set_contours");$.exports=function(l,a){var u=a._carpetTrace=r(l,a);if(u&&u.visible&&u.visible!=="legendonly"){if(!a.a||!a.b){var f=l.data[u.index],o=l.data[a.index];o.a||(o.a=f.a),o.b||(o.b=f.b),i(o,a,a._defaultColor,l._fullLayout)}var h=function(p,s){var x,c,T,_,w,k,L,A=s._carpetTrace,I=A.aaxis,P=A.baxis;I._minDtick=0,P._minDtick=0,g.isArray1D(s.z)&&b(s,I,P,"a","b",["z"]),x=s._a=s._a||s.a,_=s._b=s._b||s.b,x=x?I.makeCalcdata(s,"_a"):[],_=_?P.makeCalcdata(s,"_b"):[],c=s.a0||0,T=s.da||1,w=s.b0||0,k=s.db||1,L=s._z=y(s._z||s.z,s.transpose),s._emptypoints=n(L),e(L,s._emptypoints);var S=g.maxRowLength(L),E=s.xtype==="scaled"?"":x,D=t(s,E,c,T,S,I),F=s.ytype==="scaled"?"":_,H=t(s,F,w,k,L.length,P),V={a:D,b:H,z:L};return s.contours.type==="levels"&&s.contours.coloring!=="none"&&m(p,s,{vals:L,containerStr:"",cLetter:"z"}),[V]}(l,a);return d(a,a._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(v,$,te){var m=v("../../lib"),g=v("../heatmap/xyz_defaults"),b=v("./attributes"),y=v("../contour/constraint_defaults"),e=v("../contour/contours_defaults"),n=v("../contour/style_defaults");$.exports=function(t,i,r,d){function l(a,u){return m.coerce(t,i,b,a,u)}if(l("carpet"),t.a&&t.b){if(!g(t,i,l,d,"a","b"))return void(i.visible=!1);l("text"),l("contours.type")==="constraint"?y(t,i,l,d,r,{hasHover:!1}
1221):(e(t,i,l,function(a){return m.coerce2(t,i,b,a)}),n(t,i,l,d,{hasHover:!1}))}else i._defaultColor=r,i._length=null}},{"../../lib":503,"../contour/constraint_defaults":740,"../contour/contours_defaults":742,"../contour/style_defaults":756,"../heatmap/xyz_defaults":807,"./attributes":757}],760:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../contour/colorbar"),calc:v("./calc"),plot:v("./plot"),style:v("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:v("../../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(v,$,te){var m=v("@plotly/d3"),g=v("../carpet/map_1d_array"),b=v("../carpet/makepath"),y=v("../../components/drawing"),e=v("../../lib"),n=v("../contour/make_crossings"),t=v("../contour/find_all_paths"),i=v("../contour/plot"),r=v("../contour/constants"),d=v("../contour/convert_to_constraints"),l=v("../contour/empty_pathinfo"),a=v("../contour/close_boundaries"),u=v("../carpet/lookup_carpetid"),f=v("../carpet/axis_aligned_line");function o(s,x,c){var T=s.getPointAtLength(x),_=s.getPointAtLength(c),w=_.x-T.x,k=_.y-T.y,L=Math.sqrt(w*w+k*k);return[w/L,k/L]}function h(s){var x=Math.sqrt(s[0]*s[0]+s[1]*s[1]);return[s[0]/x,s[1]/x]}function p(s,x){var c=Math.abs(s[0]*x[0]+s[1]*x[1]);return Math.sqrt(1-c*c)/c}$.exports=function(s,x,c,T){var _=x.xaxis,w=x.yaxis;e.makeTraceGroups(T,c,"contour").each(function(k){var L=m.select(this),A=k[0],I=A.trace,P=I._carpetTrace=u(s,I),S=s.calcdata[P.index][0];if(P.visible&&P.visible!=="legendonly"){var E=A.a,D=A.b,F=I.contours,H=l(F,x,A),V=F.type==="constraint",Z=F._operation,K=V?Z==="="?"lines":"fill":F.coloring,G=[[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]),Q=1e-8*(D[D.length-1]-D[0]);t(H,W,Q);var R,N,U,ee,j=H;F.type==="constraint"&&(j=d(H,Z)),function(ne,se){var oe,pe,ce,de,xe,_e,we,Ee,fe;for(oe=0;oe<ne.length;oe++){for(de=ne[oe],xe=de.pedgepaths=[],_e=de.ppaths=[],pe=0;pe<de.edgepaths.length;pe++){for(fe=de.edgepaths[pe],we=[],ce=0;ce<fe.length;ce++)we[ce]=se(fe[ce]);xe.push(we)}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]);_e.push(Ee)}}}(H,re);var X=[];for(ee=S.clipsegments.length-1;ee>=0;ee--)R=S.clipsegments[ee],N=g([],R.x,_.c2p),U=g([],R.y,w.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,_e,we,Ee,fe=e.ensureSingle(ne,"g","contourbg").selectAll("path").data(de!=="fill"||ce?[]:[0]);fe.enter().append("path"),fe.exit().remove();var ge=[];for(Ee=0;Ee<se.length;Ee++)xe=se[Ee],_e=g([],xe.x,oe.c2p),we=g([],xe.y,pe.c2p),ge.push(b(_e,we,xe.bicubic));fe.attr("d","M"+ge.join("L")+"Z").style("stroke","none")})(L,S.clipsegments,_,w,V,K),function(ne,se,oe,pe,ce,de,xe,_e,we,Ee,fe){var ge=Ee==="fill";ge&&a(ce,ne.contours);var ke=e.ensureSingle(se,"g","contourfill").selectAll("path").data(ge?ce:[]);ke.enter().append("path"),ke.exit().remove(),ke.each(function(be){var Se=(be.prefixBoundary?fe:"")+function(Oe,De,je,Je,ze,Ue,Ge,Ye){var et,ct,mt,Ct,Tt,nt,Qe,Et="",Gt=De.edgepaths.map(function(tt,ot){return ot}),Xt=!0,Fe=1e-4*Math.abs(je[0][0]-je[2][0]),qe=1e-4*Math.abs(je[0][1]-je[2][1]);function wt(tt){return Math.abs(tt[1]-je[0][1])<qe}function ft(tt){return Math.abs(tt[1]-je[2][1])<qe}function Ce(tt){return Math.abs(tt[0]-je[0][0])<Fe}function Ie(tt){return Math.abs(tt[0]-je[2][0])<Fe}function Te(tt,ot){var at,_t,bt,jt,Nt="";for(wt(tt)&&!Ie(tt)||ft(tt)&&!Ce(tt)?(jt=ze.aaxis,bt=f(ze,Ue,[tt[0],ot[0]],.5*(tt[1]+ot[1]))):(jt=ze.baxis,bt=f(ze,Ue,.5*(tt[0]+ot[0]),[tt[1],ot[1]])),at=1;at<bt.length;at++)for(Nt+=jt.smoothing?"C":"L",_t=0;_t<bt[at].length;_t++){var $e=bt[at][_t];Nt+=[Ge.c2p($e[0]),Ye.c2p($e[1])]+" "}return Nt}for(et=0,ct=null;Gt.length;){var Pe=De.edgepaths[et][0];for(ct&&(Et+=Te(ct,Pe)),Qe=y.smoothopen(De.edgepaths[et].map(Je),De.smoothing),Et+=Xt?Qe:Qe.replace(/^M/,"L"),Gt.splice(Gt.indexOf(et),1),ct=De.edgepaths[et][De.edgepaths[et].length-1],Tt=-1,Ct=0;Ct<4;Ct++){if(!ct){e.log("Missing end?",et,De);break}for(wt(ct)&&!Ie(ct)?mt=je[1]:Ce(ct)?mt=je[0]:ft(ct)?mt=je[3]:Ie(ct)&&(mt=je[2]),nt=0;nt<De.edgepaths.length;nt++){var Ve=De.edgepaths[nt][0];Math.abs(ct[0]-mt[0])<Fe?Math.abs(ct[0]-Ve[0])<Fe&&(Ve[1]-ct[1])*(mt[1]-Ve[1])>=0&&(mt=Ve,Tt=nt):Math.abs(ct[1]-mt[1])<qe?Math.abs(ct[1]-Ve[1])<qe&&(Ve[0]-ct[0])*(mt[0]-Ve[0])>=0&&(mt=Ve,Tt=nt):e.log("endpt to newendpt is not vert. or horz.",ct,mt,Ve)}if(Tt>=0)break;Et+=Te(ct,mt),ct=mt}if(Tt===De.edgepaths.length){e.log("unclosed perimeter path");break}et=Tt,(Xt=Gt.indexOf(et)===-1)&&(et=Gt[0],Et+=Te(ct,mt)+"Z",ct=null)}for(et=0;et<De.paths.length;et++)Et+=y.smoothclosed(De.paths[et].map(Je),De.smoothing);return Et}(0,be,de,xe,_e,we,oe,pe);Se?m.select(this).attr("d",Se).style("stroke","none"):m.select(this).remove()})}(I,L,_,w,j,G,re,P,S,K,J),function(ne,se,oe,pe,ce,de,xe){var _e=e.ensureSingle(ne,"g","contourlines"),we=ce.showlines!==!1,Ee=ce.showlabels,fe=we&&Ee,ge=i.createLines(_e,we||Ee,se),ke=i.createLineClip(_e,fe,oe,pe.trace.uid),be=ne.selectAll("g.contourlabels").data(Ee?[0]:[]);if(be.exit().remove(),be.enter().append("g").classed("contourlabels",!0),Ee){var Se=de.xaxis,Oe=de.yaxis,De=Se._length,je=Oe._length,Je=[[[0,0],[De,0],[De,je],[0,je]]],ze=[];e.clearLocationCache();var Ue=i.labelFormatter(oe,pe),Ge=y.tester.append("text").attr("data-notex",1).call(y.font,ce.labelfont),Ye={left:0,right:De,center:De/2,top:0,bottom:je,middle:je/2},et=Math.sqrt(De*De+je*je),ct=r.LABELDISTANCE*et/Math.max(1,se.length/r.LABELINCREASE);
1221ge.each(function(mt){var Ct=i.calcTextOpts(mt.level,Ue,Ge,oe);m.select(this).selectAll("path").each(function(Tt){var nt=e.getVisibleSegment(this,Ye,Ct.height/2);if(nt&&(function(Xt,Fe,qe,wt,ft,Ce){for(var Ie,Te=0;Te<qe.pedgepaths.length;Te++)Fe===qe.pedgepaths[Te]&&(Ie=qe.edgepaths[Te]);if(!Ie)return;var Pe=ft.a[0],Ve=ft.a[ft.a.length-1],tt=ft.b[0],ot=ft.b[ft.b.length-1];function at($e,yt){var Ot,Mt=0;return(Math.abs($e[0]-Pe)<.1||Math.abs($e[0]-Ve)<.1)&&(Ot=h(ft.dxydb_rough($e[0],$e[1],.1)),Mt=Math.max(Mt,Ce*p(yt,Ot)/2)),(Math.abs($e[1]-tt)<.1||Math.abs($e[1]-ot)<.1)&&(Ot=h(ft.dxyda_rough($e[0],$e[1],.1)),Mt=Math.max(Mt,Ce*p(yt,Ot)/2)),Mt}var _t=o(Xt,0,1),bt=o(Xt,wt.total,wt.total-1),jt=at(Ie[0],_t),Nt=wt.total-at(Ie[Ie.length-1],bt);wt.min<jt&&(wt.min=jt),wt.max>Nt&&(wt.max=Nt),wt.len=wt.max-wt.min}(this,Tt,mt,nt,xe,Ct.height),!(nt.len<(Ct.width+Ct.height)*r.LABELMIN)))for(var Qe=Math.min(Math.ceil(nt.len/ct),r.LABELMAX),Et=0;Et<Qe;Et++){var Gt=i.findBestTextLocation(this,nt,Ct,ze,Ye);if(!Gt)break;i.addLabelData(Gt,Ct,ze,Je)}})}),Ge.remove(),i.drawLabels(be,ze,oe,ke,fe?Je:null)}Ee&&!we&&ge.remove()}(L,H,s,A,F,x,P),y.setClipUrl(L,P._clipPathId,s)}function re(ne){var se=P.ab2xy(ne[0],ne[1],!0);return[_.c2p(se[0]),w.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(v,$,te){var m=v("../../components/colorscale/attributes"),g=v("../../plots/template_attributes").hovertemplateAttrs,b=v("../../plots/attributes"),y=v("../scattermapbox/attributes"),e=v("../../lib/extend").extendFlat;$.exports=e({lon:y.lon,lat:y.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:y.text,hovertext:y.hovertext,hoverinfo:e({},b.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),showlegend:e({},b.showlegend,{dflt:!1})},m("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scattermapbox/attributes":993}],763:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib").isArrayOrTypedArray,b=v("../../constants/numerical").BADNUM,y=v("../../components/colorscale/calc"),e=v("../../lib")._;$.exports=function(n,t){for(var i=t._length,r=new Array(i),d=t.z,l=g(d)&&d.length,a=0;a<i;a++){var u=r[a]={},f=t.lon[a],o=t.lat[a];if(u.lonlat=m(f)&&m(o)?[+f,+o]:[b,b],l){var h=d[a];u.z=m(h)?h:b}}return y(n,t,{vals:l?d:[0,1],containerStr:"",cLetter:"z"}),i&&(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(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../components/color"),y=v("../../components/colorscale"),e=v("../../constants/numerical").BADNUM,n=v("../../lib/geojson_utils").makeBlank;$.exports=function(t){var i=t[0].trace,r=i.visible===!0&&i._length!==0,d=i._opts={heatmap:{layout:{visibility:"none"},paint:{}},geojson:n()};if(!r)return d;var l,a=[],u=i.z,f=i.radius,o=g.isArrayOrTypedArray(u)&&u.length,h=g.isArrayOrTypedArray(f);for(l=0;l<t.length;l++){var p=t[l],s=p.lonlat;if(s[0]!==e){var x={};if(o){var c=p.z;x.z=c!==e?c:0}h&&(x.r=m(f[l])&&f[l]>0?+f[l]:0),a.push({type:"Feature",geometry:{type:"Point",coordinates:s},properties:x})}}var T=y.extractOpts(i),_=T.reversescale?y.flipScale(T.colorscale):T.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,b.opacity(w)<1?w:b.addOpacity(w,0)];for(l=1;l<_.length;l++)k.push(_[l][0],_[l][1]);var L=["interpolate",["linear"],["get","z"],T.min,0,T.max,1];return g.extendFlat(d.heatmap.paint,{"heatmap-weight":o?L:1/(T.max-T.min),"heatmap-color":k,"heatmap-radius":h?{type:"identity",property:"r"}:i.radius,"heatmap-opacity":i.opacity}),d.geojson={type:"FeatureCollection",features:a},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(v,$,te){var m=v("../../lib"),g=v("../../components/colorscale/defaults"),b=v("./attributes");$.exports=function(y,e,n,t){function i(a,u){return m.coerce(y,e,b,a,u)}var r=i("lon")||[],d=i("lat")||[],l=Math.min(r.length,d.length);l?(e._length=l,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),g(y,e,t,i,{prefix:"",cLetter:"z"})):e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":762}],766:[function(v,$,te){$.exports=function(m,g){return m.lon=g.lon,m.lat=g.lat,m.z=g.z,m}},{}],767:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../scattermapbox/hover").hoverPoints,b=v("../scattermapbox/hover").getExtraText;$.exports=function(y,e,n){var t=g(y,e,n);if(t){var i=t[0],r=i.cd,d=r[0].trace,l=r[i.index];if(delete i.color,"z"in l){var a=i.subplot.mockAxis;i.z=l.z,i.zLabel=m.tickText(a,a.c2l(l.z),"hover").text}return i.extraText=b(d,l,r[0].t.labels),[i]}}},{"../../plots/cartesian/axes":554,"../scattermapbox/hover":998}],768:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../heatmap/colorbar"),formatLabels:v("../scattermapbox/format_labels"),calc:v("./calc"),plot:v("./plot"),hoverPoints:v("./hover"),eventData:v("./event_data"),getBelow:function(m,g){for(var b=g.getMapLayers(),y=0;y<b.length;y++){var e=b[y],n=e.id;if(e.type==="symbol"&&typeof n=="string"&&n.indexOf("plotly-")===-1)return n}},moduleType:"trace",name:"densitymapbox",basePlotModule:v("../../plots/mapbox"),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}},{"../../plots/mapbox":613,"../heatmap/colorbar":795,"../scattermapbox/format_labels":997,"./attributes":762,"./calc":763,"./defaults":765,"./event_data":766,"./hover":767,"./plot":769}],769:[function(v,$,te){var m=v("./convert"),g=v("../../plots/mapbox/constants").traceLayerPrefix;function b(e,n){this.type="densitymapbox",this.subplot=e,this.uid=n,this.sourceId="source-"+n,this.layerList=[["heatmap",g+n+"-heatmap"]],this.below=null}var y=b.prototype;y.update=function(e){var n=this.subplot,t=this.layerList,i=m(e),r=n.belowLookup["trace-"+this.uid];n.map.getSource(this.sourceId).setData(i.geojson),r!==this.below&&(this._removeLayers(),this._addLayers(i,r),this.below=r);for(var d=0;d<t.length;d++){var l=t[d],a=l[0],u=l[1],f=i[a];n.setOptions(u,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&n.setOptions(u,"setPaintProperty",f.paint)}},y._addLayers=function(e,n){for(var t=this.subplot,i=this.layerList,r=this.sourceId,d=0;d<i.length;d++){var l=i[d],a=l[0],u=e[a];t.addLayer({type:a,id:l[1],source:r,layout:u.layout,paint:u.paint},n)}},y._removeLayers=function(){for(var e=this.subplot.map,n=this.layerList,t=n.length-1;t>=0;t--)e.removeLayer(n[t][1])},y.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},$.exports=function(e,n){var t=n[0].trace,i=new b(e,t.uid),r=i.sourceId,d=m(n),l=i.below=e.belowLookup["trace-"+t.uid];return e.map.addSource(r,{type:"geojson",data:d.geojson}),i._addLayers(d,l),i}},{"../../plots/mapbox/constants":611,"./convert":764}],770:[function(v,$,te){var m=v("../../lib");$.exports=function(g,b){for(var y=0;y<g.length;y++)g[y].i=y;m.mergeArray(b.text,g,"tx"),m.mergeArray(b.hovertext,g,"htx");var e=b.marker;if(e){m.mergeArray(e.opacity,g,"mo"),m.mergeArray(e.color,g,"mc");var n=e.line;n&&(m.mergeArray(n.color,g,"mlc"),m.mergeArrayCastPositive(n.width,g,"mlw"))}}},{"../../lib":503}],771:[function(v,$,te){var m,g=v("../bar/attributes"),b=v("../scatter/attributes").line,y=v("../../plots/attributes"),e=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,n=v("../../plots/template_attributes").hovertemplateAttrs,t=v("../../plots/template_attributes").texttemplateAttrs,i=v("./constants"),r=v("../../lib/extend").extendFlat,d=v("../../components/color");$.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:e("x"),yhoverformat:e("y"),hovertext:g.hovertext,hovertemplate:n({},{keys:i.eventDataKeys}),hoverinfo:r({},y.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:i.eventDataKeys.concat(["label","value"])}),text:g.text,textposition:g.textposition,insidetextanchor:r({},g.insidetextanchor,{dflt:"middle"}),textangle:r({},g.textangle,{dflt:0}),textfont:g.textfont,insidetextfont:g.insidetextfont,outsidetextfont:g.outsidetextfont,constraintext:g.constraintext,cliponaxis:g.cliponaxis,orientation:r({},g.orientation,{}),offset:r({},g.offset,{arrayOk:!1}),width:r({},g.width,{arrayOk:!1}),marker:(m=r({},g.marker),delete m.pattern,m),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: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":927,"./constants":773}],772:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../plots/cartesian/align_period"),b=v("./arrays_to_calcdata"),y=v("../scatter/calc_selection"),e=v("../../constants/numerical").BADNUM;function n(t){return t===e?0:t}$.exports=function(t,i){var r,d,l,a,u,f,o,h,p=m.getFromId(t,i.xaxis||"x"),s=m.getFromId(t,i.yaxis||"y");i.orientation==="h"?(r=p.makeCalcdata(i,"x"),l=s.makeCalcdata(i,"y"),a=g(i,s,"y",l),u=!!i.yperiodalignment,f="y"):(r=s.makeCalcdata(i,"y"),l=p.makeCalcdata(i,"x"),a=g(i,p,"x",l),u=!!i.xperiodalignment,f="x"),d=a.vals;var x,c=Math.min(d.length,r.length),T=new Array(c);for(i._base=[],o=0;o<c;o++){r[o]<0&&(r[o]=e);var _=!1;r[o]!==e&&o+1<c&&r[o+1]!==e&&(_=!0),h=T[o]={p:d[o],s:r[o],cNext:_},i._base[o]=-.5*h.s,u&&(T[o].orig_p=l[o],T[o][f+"End"]=a.ends[o],T[o][f+"Start"]=a.starts[o]),i.ids&&(h.id=String(i.ids[o])),o===0&&(T[0].vTotal=0),T[0].vTotal+=n(h.s),h.begR=n(h.s)/n(T[0].s)}for(o=0;o<c;o++)(h=T[o]).s!==e&&(h.sumR=h.s/T[0].vTotal,h.difR=x!==void 0?h.s/x:1,x=h.s);return b(T,i),y(T,i),T}},{"../../constants/numerical":479,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":929,"./arrays_to_calcdata":770}],773:[function(v,$,te){$.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},{}],774:[function(v,$,te){var m=v("../bar/cross_trace_calc").setGroupPositions;$.exports=function(g,b){var y,e,n=g._fullLayout,t=g._fullData,i=g.calcdata,r=b.xaxis,d=b.yaxis,l=[],a=[],u=[];for(e=0;e<t.length;e++){var f=t[e],o=f.orientation==="h";f.visible===!0&&f.xaxis===r._id&&f.yaxis===d._id&&f.type==="funnel"&&(y=i[e],o?u.push(y):a.push(y),l.push(y))}var h={mode:n.funnelmode,norm:n.funnelnorm,gap:n.funnelgap,groupgap:n.funnelgroupgap};for(m(g,r,d,a,h),m(g,d,r,u,h),e=0;e<l.length;e++){y=l[e];for(var p=0;p<y.length;p++)p+1<y.length&&(y[p].nextP0=y[p+1].p0,y[p].nextS0=y[p+1].s0,y[p].nextP1=y[p+1].p1,y[p].nextS1=y[p+1].s1)}}},{"../bar/cross_trace_calc":651}],775:[function(v,$,te){var m=v("../../lib"),g=v("../bar/defaults").handleGroupingDefaults,b=v("../bar/defaults").handleText,y=v("../scatter/xy_defaults"),e=v("../scatter/period_defaults"),n=v("./attributes"),t=v("../../components/color");$.exports={supplyDefaults:function(i,r,d,l){function a(h,p){return m.coerce(i,r,n,h,p)}if(y(i,r,l,a)){e(i,r,l,a),a("xhoverformat"),a("yhoverformat"),a("orientation",r.y&&!r.x?"v":"h"),a("offset"),a("width");var u=a("text");a("hovertext"),a("hovertemplate");var f=a("textposition");b(i,r,l,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r.textposition==="none"||r.texttemplate||a("textinfo",Array.isArray(u)?"text+value":"value");var o=a("marker.color",d);a("marker.line.color",t.defaultLine),a("marker.line.width"),a("connector.visible")&&(a("connector.fill
1221color",function(h){var p=m.isArrayOrTypedArray(h)?"#000":h;return t.addOpacity(p,.5*t.opacity(p))}(o)),a("connector.line.width")&&(a("connector.line.color"),a("connector.line.dash")))}else r.visible=!1},crossTraceDefaults:function(i,r){var d,l;function a(f){return m.coerce(l._input,l,n,f)}if(r.funnelmode==="group")for(var u=0;u<i.length;u++)d=(l=i[u])._input,g(d,l,r,a)}}},{"../../components/color":366,"../../lib":503,"../bar/defaults":652,"../scatter/period_defaults":947,"../scatter/xy_defaults":954,"./attributes":771}],776:[function(v,$,te){$.exports=function(m,g){return m.x="xVal"in g?g.xVal:g.x,m.y="yVal"in g?g.yVal:g.y,"percentInitial"in g&&(m.percentInitial=g.percentInitial),"percentPrevious"in g&&(m.percentPrevious=g.percentPrevious),"percentTotal"in g&&(m.percentTotal=g.percentTotal),g.xa&&(m.xaxis=g.xa),g.ya&&(m.yaxis=g.ya),m}},{}],777:[function(v,$,te){var m=v("../../components/color").opacity,g=v("../bar/hover").hoverOnBars,b=v("../../lib").formatPercent;$.exports=function(y,e,n,t,i){var r=g(y,e,n,t,i);if(r){var d=r.cd,l=d[0].trace,a=l.orientation==="h",u=d[r.index];r[(a?"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||l.hoverinfo,o=[];if(f&&f!=="none"&&f!=="skip"){var h=f==="all",p=f.split("+"),s=function(x){return h||p.indexOf(x)!==-1};s("percent initial")&&o.push(r.percentInitialLabel+" of initial"),s("percent previous")&&o.push(r.percentPreviousLabel+" of previous"),s("percent total")&&o.push(r.percentTotalLabel+" of total")}return r.extraText=o.join("<br>"),r.color=function(x,c){var T=x.marker,_=c.mc||T.color,w=c.mlc||T.line.color,k=c.mlw||T.line.width;if(m(_))return _;if(m(w)&&k)return w}(l,u),[r]}}},{"../../components/color":366,"../../lib":503,"../bar/hover":655}],778:[function(v,$,te){$.exports={attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults").supplyDefaults,crossTraceDefaults:v("./defaults").crossTraceDefaults,supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc"),crossTraceCalc:v("./cross_trace_calc"),plot:v("./plot"),style:v("./style").style,hoverPoints:v("./hover"),eventData:v("./event_data"),selectPoints:v("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:v("../../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(v,$,te){$.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(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y,e){var n=!1;function t(d,l){return m.coerce(b,y,g,d,l)}for(var i=0;i<e.length;i++){var r=e[i];if(r.visible&&r.type==="funnel"){n=!0;break}}n&&(t("funnelmode"),t("funnelgap",.2),t("funnelgroupgap"))}},{"../../lib":503,"./layout_attributes":779}],781:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../components/drawing"),y=v("../../constants/numerical").BADNUM,e=v("../bar/plot"),n=v("../bar/uniform_text").clearMinTextSize;function t(i,r,d,l){var a=[],u=[],f=l?r:d,o=l?d:r;return a[0]=f.c2p(i.s0,!0),u[0]=o.c2p(i.p0,!0),a[1]=f.c2p(i.s1,!0),u[1]=o.c2p(i.p1,!0),a[2]=f.c2p(i.nextS0,!0),u[2]=o.c2p(i.nextP0,!0),a[3]=f.c2p(i.nextS1,!0),u[3]=o.c2p(i.nextP1,!0),l?[a,u]:[u,a]}$.exports=function(i,r,d,l){var a=i._fullLayout;n("funnel",a),function(u,f,o,h){var p=f.xaxis,s=f.yaxis;g.makeTraceGroups(h,o,"trace bars").each(function(x){var c=m.select(this),T=x[0].trace,_=g.ensureSingle(c,"g","regions");if(T.connector&&T.connector.visible){var w=T.orientation==="h",k=_.selectAll("g.region").data(g.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,s,w),S=P[0],E=P[1],D="";S[0]!==y&&E[0]!==y&&S[1]!==y&&E[1]!==y&&S[2]!==y&&E[2]!==y&&S[3]!==y&&E[3]!==y&&(D+=w?"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"),g.ensureSingle(m.select(this),"path").attr("d",D).call(b.setClipUrl,f.layerClipId,u)}})}else _.remove()})}(i,r,d,l),function(u,f,o,h){var p=f.xaxis,s=f.yaxis;g.makeTraceGroups(h,o,"trace bars").each(function(x){var c=m.select(this),T=x[0].trace,_=g.ensureSingle(c,"g","lines");if(T.connector&&T.connector.visible&&T.connector.line.width){var w=T.orientation==="h",k=_.selectAll("g.line").data(g.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,s,w),S=P[0],E=P[1],D="";S[3]!==void 0&&E[3]!==void 0&&(w?(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"),g.ensureSingle(m.select(this),"path").attr("d",D).call(b.setClipUrl,f.layerClipId,u)}})}else _.remove()})}(i,r,d,l),e.plot(i,r,d,l,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../bar/plot":659,"../bar/uniform_text":664,"@plotly/d3":58}],782:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/drawing"),b=v("../../components/color"),y=v("../../constants/interactions").DESELECTDIM,e=v("../bar/style"),n=v("../bar/uniform_text").resizeText,t=e.styleTextPoints;$.exports={style:function(i,r,d){var l=d||m.select(i).selectAll("g.funnellayer").selectAll("g.trace");n(i,l,"funnel"),l.style("opacity",function(a){return a[0].trace.opacity}),l.each(function(a){var u=m.select(this),f=a[0].trace;u.selectAll(".point > path").each(function(o){if(!o.isBlank){var h=f.marker;m.select(this).call(b.fill,o.mc||h.color).call(b.stroke,o.mlc||h.line.color).call(g.dashLine,h.line.dash,o.mlw||h.line.width).style("opacity",f.selectedpoints&&!o.selected?y:1)}}),t(u,f,i),u.selectAll(".regions").each(function(){m.select(this).selectAll("path").style("stroke-width",0).call(b.fill,f.connector.fillcolor)}),u.selectAll(".lines").each(function(){var o=f.connector.line;g.lineGroupStyle(m.select(this).selectAll("path"),o.width,o.color,o.dash)})})}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],783:[function(v,$,te){var m=v("../pie/attributes"),g=v("../../plots/attributes"),b=v("../../plots/domain").attributes,y=v("../../plots/template_attributes").hovertemplateAttrs,e=v("../../plots/template_attributes").texttemplateAttrs,n=v("../../lib/extend").extendFlat;$.exports={labels:m.labels,label0:m.label0,dlabel:m.dlabel,values:m.values,marker:{colors:m.marker.colors,line:{color:n({},m.marker.line.color,{dflt:null}),width:n({},m.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:m.text,hovertext:m.hovertext,scalegroup:n({},m.scalegroup,{}),textinfo:n({},m.textinfo,{flags:["label","text","value","percent"]}),texttemplate:e({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:n({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:y({},{keys:["label","color","value","text","percent"]}),textposition:n({},m.textposition,{values:["inside","none"],dflt:"inside"}),textfont:m.textfont,insidetextfont:m.insidetextfont,title:{text:m.title.text,font:m.title.font,position:n({},m.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":901}],784:[function(v,$,te){var m=v("../../plots/plots");te.name="funnelarea",te.plot=function(g,b,y,e){m.plotBasePlot(te.name,g,b,y,e)},te.clean=function(g,b,y,e){m.cleanBasePlot(te.name,g,b,y,e)}},{"../../plots/plots":619}],785:[function(v,$,te){var m=v("../pie/calc");$.exports={calc:function(g,b){return m.calc(g,b)},crossTraceCalc:function(g){m.crossTraceCalc(g,{type:"funnelarea"})}}},{"../pie/calc":903}],786:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("../../plots/domain").defaults,y=v("../bar/defaults").handleText,e=v("../pie/defaults").handleLabelsAndValues;$.exports=function(n,t,i,r){function d(x,c){return m.coerce(n,t,g,x,c)}var l=d("labels"),a=d("values"),u=e(l,a),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 o,h=d("text"),p=d("texttemplate");if(p||(o=d("textinfo",Array.isArray(h)?"text+percent":"percent")),d("hovertext"),d("hovertemplate"),p||o&&o!=="none"){var s=d("textposition");y(n,t,r,d,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}b(t,r,d),d("title.text")&&(d("title.position"),m.coerceFont(d,"title.font",r.font)),d("aspectratio"),d("baseratio")}else t.visible=!1}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"../pie/defaults":904,"./attributes":783}],787:[function(v,$,te){$.exports={moduleType:"trace",name:"funnelarea",basePlotModule:v("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults"),supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc").calc,crossTraceCalc:v("./calc").crossTraceCalc,plot:v("./plot"),style:v("./style"),styleOne:v("../pie/style_one"),meta:{}}},{"../pie/style_one":912,"./attributes":783,"./base_plot":784,"./calc":785,"./defaults":786,"./layout_attributes":788,"./layout_defaults":789,"./plot":790,"./style":791}],788:[function(v,$,te){var m=v("../pie/layout_attributes").hiddenlabels;$.exports={hiddenlabels:m,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":908}],789:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y){function e(n,t){return m.coerce(b,y,g,n,t)}e("hiddenlabels"),e("funnelareacolorway",y.colorway),e("extendfunnelareacolors")}},{"../../lib":503,"./layout_attributes":788}],790:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/drawing"),b=v("../../lib"),y=b.strScale,e=b.strTranslate,n=v("../../lib/svg_text_utils"),t=v("../bar/plot").toMoveInsideBar,i=v("../bar/uniform_text"),r=i.recordMinTextSize,d=i.clearMinTextSize,l=v("../pie/helpers"),a=v("../pie/plot"),u=a.attachFxHandlers,f=a.determineInsideTextFont,o=a.layoutAreas,h=a.prerenderTitles,p=a.positionTitleOutside,s=a.formatSliceLabel;function x(c,T){return"l"+(T[0]-c[0])+","+(T[1]-c[1])}$.exports=function(c,T){var _=c._fullLayout;d("funnelarea",_),h(T,c),o(T,_._size),b.makeTraceGroups(_._funnelarealayer,T,"trace").each(function(w){var k=m.select(this),L=w[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 G(){var we,Ee={x:we=Math.sqrt(K),y:-we};return[Ee.x,Ee.y]}var W,Q,R=[];for(R.push(G()),W=I.length-1;W>-1;W--)if(!(Q=I[W]).hidden){var N=Q.v/Z;K+=N,R.push(G())}var U=1/0,ee=-1/0;for(W=0;W<R.length;W++)F=R[W],U=Math.min(U,F[1]),ee=Math.max(ee,F[1]);for(W=0;W<R.length;W++)R[W][1]-=(ee+U)/2;var j=R[R.length-1][0],X=P.r,J=(ee-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(!(Q=I[W]).hidden){var ce=R[pe+=1][0],de=R[pe][1];Q.TL=[-ce,de],Q.TR=[ce,de],Q.BL=se,Q.BR=oe,Q.pxmid=(xe=Q.TR,_e=Q.BR,[.5*(xe[0]+_e[0]),.5*(xe[1]+_e[1])]),se=Q.TL,oe=Q.TR}var xe,_e})(w),k.each(function(){var I=m.select(this).selectAll("g.slice").data(w);I.enter().append("g").classed("slice",!0),I.exit().remove(),I.each(function(S,E){if(S.hidden)m.select(this).selectAll("path,g").remove();else{S.pointNumber=S.i,S.curveNumber=A.index;var D=L.cx,F=L.cy,H=m.select(this),V=H.selectAll("path.surface").data([S]);V.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),H.call(u,c,w);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),s(c,S,L);var K=l.castOption(A.textposition,S.pts),G=H.selectAll("g.slicetext").data(S.text&&K!=="none"?[0]:[]);G.enter().append("g").classed("slicetext",!0),G.exit().remove(),G.each(function(){var W=b.ensureSingle(m.select(this),"text","",function(J){J.attr("data-notex",1)}),Q=b.ensureUniformFontSize(c,f(A,S,_.font));W.text(S.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(g.font,Q).call(n.convertToTspans,c);var R,N,U,ee=g.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,ee,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=Q.size,r(A.type,R,_),w[E].transform=R,W.attr("transform",b.getTextTransform(R))})}});var P=m.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(m.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(g.font,A.title.font).call(n.convertToTspans,c);var D=p(L,_._size);S.attr("transform",e(D.x,D.y)+y(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":906,"../pie/plot":910,"@plotly/d3":58}],791:[function(v,$,te){var m=v("@plotly/d3"),g=v("../pie/style_one"),b=v("../bar/uniform_text").resizeText;$.exports=function(y){var e=y._fullLayout._funnelarealayer.selectAll(".trace");b(y,e,"funnelarea"),e.each(function(n){var t=n[0].trace,i=m.select(this);i.style({opacity:t.opacity}),i.selectAll("path.surface").each(function(r){m.select(this).call(g,r,t)})})}},{"../bar/uniform_text":664,"../pie/style_one":912,"@plotly/d3":58}],792:[function(v,$,te){var m=v("../scatter/attributes"),g=v("../../plots/attributes"),b=v("../../plots/font_attributes"),y=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,e=v("../../plots/template_attributes").hovertemplateAttrs,n=v("../../plots/template_attributes").texttemplateAttrs,t=v("../../components/colorscale/attributes"),i=v("../../lib/extend").extendFlat;$.exports=i({z:{valType:"data_array",editType:"calc"},x:i({},m.x,{impliedEdits:{xtype:"array"}}),x0:i({},m.x0,{impliedEdits:{xtype:"scaled"}}),dx:i({},m.dx,{impliedEdits:{xtype:"scaled"}}),y:i({},m.y,{impliedEdits:{ytype:"array"}}),y0:i({},m.y0,{impliedEdits:{ytype:"scaled"}}),dy:i({},m.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:i({},m.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:i({},m.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:i({},m.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:i({},m.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:i({},m.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:i({},m.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:y("x"),yhoverformat:y("y"),zhoverformat:y("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:i({},g.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":927}],793:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("../../plots/cartesian/axes"),y=v("../../plots/cartesian/align_period"),e=v("../histogram2d/calc"),n=v("../../components/colorscale/calc"),t=v("./convert_column_xyz"),i=v("./clean_2d_array"),r=v("./interp2d"),d=v("./find_empties"),l=v("./make_bound_array"),a=v("../../constants/numerical").BADNUM;function u(f){for(var o=[],h=f.length,p=0;p<h;p++){var s=f[p];s!==a&&o.push(s)}return o}$.exports=function(f,o){var h,p,s,x,c,T,_,w,k,L,A,I=b.getFromId(f,o.xaxis||"x"),P=b.getFromId(f,o.yaxis||"y"),S=m.traceIs(o,"contour"),E=m.traceIs(o,"histogram"),D=m.traceIs(o,"gl2d"),F=S?"best":o.zsmooth;if(I._minDtick=0,P._minDtick=0,E)x=(A=e(f,o)).orig_x,h=A.x,p=A.x0,s=A.dx,w=A.orig_y,c=A.
1221y,T=A.y0,_=A.dy,k=A.z;else{var H=o.z;g.isArray1D(H)?(t(o,I,P,"x","y",["z"]),h=o._x,c=o._y,H=o._z):(x=o.x?I.makeCalcdata(o,"x"):[],w=o.y?P.makeCalcdata(o,"y"):[],h=y(o,I,"x",x).vals,c=y(o,P,"y",w).vals,o._x=h,o._y=c),p=o.x0,s=o.dx,T=o.y0,_=o.dy,k=i(H,o,I,P)}function V(J){F=o._input.zsmooth=o.zsmooth=!1,g.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]!==a){oe++,se[oe]=[];for(var ce=0;ce<ne[pe].length;ce++)J[ce]!==a&&se[oe].push(ne[pe][ce])}return se}(h,c,k),E||(h=u(h),c=u(c),o._x=h,o._y=c)),E||!S&&!o.connectgaps||(o._emptypoints=d(k),r(k,o._emptypoints)),F==="fast"){if(I.type==="log"||P.type==="log")V("log axis found");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(c.length&&F==="fast"){var G=(c[c.length-1]-c[0])/(c.length-1),W=Math.abs(G/100);for(L=0;L<c.length-1;L++)if(Math.abs(c[L+1]-c[L]-G)>W){V("y scale is not linear");break}}}}var Q=g.maxRowLength(k),R=o.xtype==="scaled"?"":h,N=l(o,R,p,s,Q,I),U=o.ytype==="scaled"?"":c,ee=l(o,U,T,_,k.length,P);D||(o._extremes[I._id]=b.findExtremes(I,N),o._extremes[P._id]=b.findExtremes(P,ee));var j={x:N,y:ee,z:k,text:o._text||o.text,hovertext:o._hovertext||o.hovertext};if(o.xperiodalignment&&x&&(j.orig_x=x),o.yperiodalignment&&w&&(j.orig_y=w),R&&R.length===N.length-1&&(j.xCenter=R),U&&U.length===ee.length-1&&(j.yCenter=U),E&&(j.xRanges=A.xRanges,j.yRanges=A.yRanges,j.pts=A.pts),S||n(f,o,{vals:k,cLetter:"z"}),S&&o.contours&&o.contours.coloring==="heatmap"){var X={type:o.type==="contour"?"heatmap":"histogram2d",xcalendar:o.xcalendar,ycalendar:o.ycalendar};j.xfill=l(X,R,p,s,Q,I),j.yfill=l(X,U,T,_,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(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../constants/numerical").BADNUM;$.exports=function(y,e,n,t){var i,r,d,l,a,u;function f(c){if(m(c))return+c}if(e&&e.transpose){for(i=0,a=0;a<y.length;a++)i=Math.max(i,y[a].length);if(i===0)return!1;d=function(c){return c.length},l=function(c,T,_){return(c[_]||[])[T]}}else i=y.length,d=function(c,T){return c[T].length},l=function(c,T,_){return(c[T]||[])[_]};var o=function(c,T,_){return T===b||_===b?b:l(c,T,_)};function h(c){if(e&&e.type!=="carpet"&&e.type!=="contourcarpet"&&c&&c.type==="category"&&e["_"+c._id.charAt(0)].length){var T=c._id.charAt(0),_={},w=e["_"+T+"CategoryMap"]||e[T];for(a=0;a<w.length;a++)_[w[a]]=a;return function(k){var L=_[c._categories[k]];return L+1?L:b}}return g.identity}var p=h(n),s=h(t);t&&t.type==="category"&&(i=t._categories.length);var x=new Array(i);for(a=0;a<i;a++)for(r=n&&n.type==="category"?n._categories.length:d(y,a),x[a]=new Array(r),u=0;u<r;u++)x[a][u]=f(o(y,s(a),p(u)));return x}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],795:[function(v,$,te){$.exports={min:"zmin",max:"zmax"}},{}],796:[function(v,$,te){var m=v("../../lib"),g=v("../../constants/numerical").BADNUM,b=v("../../plots/cartesian/align_period");$.exports=function(y,e,n,t,i,r){var d=y._length,l=e.makeCalcdata(y,t),a=n.makeCalcdata(y,i);l=b(y,e,t,l).vals,a=b(y,n,i,a).vals;var u,f,o,h,p=y.text,s=p!==void 0&&m.isArray1D(p),x=y.hovertext,c=x!==void 0&&m.isArray1D(x),T=m.distinctVals(l),_=T.vals,w=m.distinctVals(a),k=w.vals,L=[],A=k.length,I=_.length;for(u=0;u<r.length;u++)L[u]=m.init2dArray(A,I);s&&(o=m.init2dArray(A,I)),c&&(h=m.init2dArray(A,I));var P=m.init2dArray(A,I);for(u=0;u<d;u++)if(l[u]!==g&&a[u]!==g){var S=m.findBin(l[u]+T.minDiff/2,_),E=m.findBin(a[u]+w.minDiff/2,k);for(f=0;f<r.length;f++){var D=y[r[f]];L[f][E][S]=D[u],P[E][S]=u}s&&(o[E][S]=p[u]),c&&(h[E][S]=x[u])}for(y["_"+t]=_,y["_"+i]=k,f=0;f<r.length;f++)y["_"+r[f]]=L[f];s&&(y._text=o),c&&(y._hovertext=h),e&&e.type==="category"&&(y["_"+t+"CategoryMap"]=_.map(function(F){return e._categories[F]})),n&&n.type==="category"&&(y["_"+i+"CategoryMap"]=k.map(function(F){return n._categories[F]})),y._after2before=P}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551}],797:[function(v,$,te){var m=v("../../lib"),g=v("./xyz_defaults"),b=v("./label_defaults"),y=v("../scatter/period_defaults"),e=v("./style_defaults"),n=v("../../components/colorscale/defaults"),t=v("./attributes");$.exports=function(i,r,d,l){function a(u,f){return m.coerce(i,r,t,u,f)}g(i,r,a,l)?(y(i,r,l,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),b(a,l),e(i,r,a,l),a("hoverongaps"),a("connectgaps",m.isArray1D(r.z)&&r.zsmooth!==!1),n(i,r,l,a,{prefix:"",cLetter:"z"})):r.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"../scatter/period_defaults":947,"./attributes":792,"./label_defaults":802,"./style_defaults":806,"./xyz_defaults":807}],798:[function(v,$,te){var m=v("../../lib").maxRowLength;$.exports=function(g){var b,y,e,n,t,i,r,d,l=[],a={},u=[],f=g[0],o=[],h=[0,0,0],p=m(g);for(y=0;y<g.length;
1221y++)for(b=o,o=f,f=g[y+1]||[],e=0;e<p;e++)o[e]===void 0&&((i=(o[e-1]!==void 0?1:0)+(o[e+1]!==void 0?1:0)+(b[e]!==void 0?1:0)+(f[e]!==void 0?1:0))?(y===0&&i++,e===0&&i++,y===g.length-1&&i++,e===o.length-1&&i++,i<4&&(a[[y,e]]=[y,e,i]),l.push([y,e,i])):u.push([y,e]));for(;u.length;){for(r={},d=!1,t=u.length-1;t>=0;t--)(i=((a[[(y=(n=u[t])[0])-1,e=n[1]]]||h)[2]+(a[[y+1,e]]||h)[2]+(a[[y,e-1]]||h)[2]+(a[[y,e+1]]||h)[2])/20)&&(r[n]=[y,e,i],u.splice(t,1),d=!0);if(!d)throw"findEmpties iterated with no new neighbors";for(n in r)a[n]=r[n],l.push(r[n])}return l.sort(function(s,x){return x[2]-s[2]})}},{"../../lib":503}],799:[function(v,$,te){var m=v("../../components/fx"),g=v("../../lib"),b=v("../../plots/cartesian/axes"),y=v("../../components/colorscale").extractOpts;$.exports=function(e,n,t,i,r){r||(r={});var d,l,a,u,f=r.isContour,o=e.cd[0],h=o.trace,p=e.xa,s=e.ya,x=o.x,c=o.y,T=o.z,_=o.xCenter,w=o.yCenter,k=o.zmask,L=h.zhoverformat,A=x,I=c;if(e.index!==!1){try{a=Math.round(e.index[1]),u=Math.round(e.index[0])}catch{return void g.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}
1221if(a<0||a>=T[0].length||u<0||u>T.length)return}else{if(m.inbox(n-x[0],n-x[x.length-1],0)>0||m.inbox(t-c[0],t-c[c.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*c[0]-c[1]],P=1;P<c.length;P++)I.push((c[P]+c[P-1])/2);I.push([2*c[c.length-1]-c[c.length-2]])}a=Math.max(0,Math.min(A.length-2,g.findBin(n,A))),u=Math.max(0,Math.min(I.length-2,g.findBin(t,I)))}var S,E,D=p.c2p(x[a]),F=p.c2p(x[a+1]),H=s.c2p(c[u]),V=s.c2p(c[u+1]);f?(S=o.orig_x||x,E=o.orig_y||c,F=D,d=S[a],V=H,l=E[u]):(S=o.orig_x||_||x,E=o.orig_y||w||c,d=_?S[a]:(S[a]+S[a+1])/2,l=w?E[u]:(E[u]+E[u+1])/2,p&&p.type==="category"&&(d=x[a]),s&&s.type==="category"&&(l=c[u]),h.zsmooth&&(D=F=p.c2p(d),H=V=s.c2p(l)));var Z=T[u][a];if(k&&!k[u][a]&&(Z=void 0),Z!==void 0||h.hoverongaps){var K;Array.isArray(o.hovertext)&&Array.isArray(o.hovertext[u])?K=o.hovertext[u][a]:Array.isArray(o.text)&&Array.isArray(o.text[u])&&(K=o.text[u][a]);var G=y(h),W={type:"linear",range:[G.min,G.max],hoverformat:L,_separators:p._separators,_numFormat:p._numFormat},Q=b.tickText(W,Z,"hover").text;return[g.extendFlat(e,{index:h._after2before?h._after2before[u][a]:[u,a],distance:e.maxHoverDistance,spikeDistance:e.maxSpikeDistance,x0:D,x1:F,y0:H,y1:V,xLabelVal:d,yLabelVal:l,zLabelVal:Z,zLabel:Q,text:K})]}}},{"../../components/colorscale":378,"../../components/fx":406,"../../lib":503,"../../plots/cartesian/axes":554}],800:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc"),plot:v("./plot"),colorbar:v("./colorbar"),style:v("./style"),hoverPoints:v("./hover"),moduleType:"trace",name:"heatmap",basePlotModule:v("../../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(v,$,te){var m=v("../../lib"),g=[[-1,0],[1,0],[0,-1],[0,1]];function b(e){return .5-.25*Math.min(1,.5*e)}function y(e,n,t){var i,r,d,l,a,u,f,o,h,p,s,x,c,T=0;for(l=0;l<n.length;l++){for(r=(i=n[l])[0],d=i[1],s=e[r][d],p=0,h=0,a=0;a<4;a++)(f=e[r+(u=g[a])[0]])&&(o=f[d+u[1]])!==void 0&&(p===0?x=c=o:(x=Math.min(x,o),c=Math.max(c,o)),h++,p+=o);if(h===0)throw"iterateInterp2d order is wrong: no defined neighbors";e[r][d]=p/h,s===void 0?h<4&&(T=1):(e[r][d]=(1+t)*e[r][d]-t*s,c>x&&(T=Math.max(T,Math.abs(e[r][d]-s)/(c-x))))}return T}$.exports=function(e,n){var t,i=1;for(y(e,n),t=0;t<n.length&&!(n[t][2]<4);t++);for(n=n.slice(t),t=0;t<100&&i>.01;t++)i=y(e,n,b(i));return i>.01&&m.log("interp2d didn't converge quickly",i),e}},{"../../lib":503}],802:[function(v,$,te){var m=v("../../lib");$.exports=function(g,b){g("texttemplate");var y=m.extendFlat({},b.font,{color:"auto",size:"auto"});m.coerceFont(g,"textfont",y)}},{"../../lib":503}],803:[function(v,$,te){var m=v("../../registry"),g=v("../../lib").isArrayOrTypedArray;$.exports=function(b,y,e,n,t,i){var r,d,l,a=[],u=m.traceIs(b,"contour"),f=m.traceIs(b,"histogram"),o=m.traceIs(b,"gl2d");
1221if(g(y)&&y.length>1&&!f&&i.type!=="category"){var h=y.length;if(!(h<=t))return u?y.slice(0,t):y.slice(0,t+1);if(u||o)a=y.slice(0,t);else if(t===1)a=[y[0]-.5,y[0]+.5];else{for(a=[1.5*y[0]-.5*y[1]],l=1;l<h;l++)a.push(.5*(y[l-1]+y[l]));a.push(1.5*y[h-1]-.5*y[h-2])}if(h<t){var p=a[a.length-1],s=p-a[a.length-2];for(l=h;l<t;l++)p+=s,a.push(p)}}else{var x=b[i._id.charAt(0)+"calendar"];for(f?r=i.r2c(e,0,x):g(y)&&y.length===1?r=y[0]:e===void 0?r=0:r=(i.type==="log"?i.d2c:i.r2c)(e,0,x),d=n||1,l=u||o?0:-.5;l<t;l++)a.push(r+d*l)}return a}},{"../../lib":503,"../../registry":638}],804:[function(v,$,te){var m=v("@plotly/d3"),g=v("tinycolor2"),b=v("../../registry"),y=v("../../components/drawing"),e=v("../../plots/cartesian/axes"),n=v("../../lib"),t=v("../../lib/svg_text_utils"),i=v("../scatter/format_labels"),r=v("../../components/color"),d=v("../../components/colorscale").extractOpts,l=v("../../components/colorscale").makeColorScaleFuncFromTrace,a=v("../../constants/xmlns_namespaces"),u=v("../../constants/alignment").LINE_SPACING;function f(x){return x.selectAll("g.heatmap-label")}function o(x){f(x).remove()}function h(x,c){var T=c.length-2,_=n.constrain(n.findBin(x,c),0,T),w=c[_],k=c[_+1],L=n.constrain(_+(x-w)/(k-w)-.5,0,T),A=Math.round(L),I=Math.abs(L-A);return L&&L!==T&&I?{bin0:A,frac:I,bin1:Math.round(A+I/(L-A))}:{bin0:A,bin1:A,frac:0}}function p(x,c){var T=c.length-1,_=n.constrain(n.findBin(x,c),0,T),w=c[_],k=(x-w)/(c[_+1]-w)||0;return k<=0?{bin0:_,bin1:_,frac:0}:k<.5?{bin0:_,bin1:_+1,frac:k}:{bin0:_+1,bin1:_,frac:1-k}}function s(x,c,T){x[c]=T[0],x[c+1]=T[1],x[c+2]=T[2],x[c+3]=Math.round(255*T[3])}$.exports=function(x,c,T,_){var w=c.xaxis,k=c.yaxis;n.makeTraceGroups(_,T,"hm").each(function(L){var A,I,P,S,E,D,F,H,V=m.select(this),Z=L[0],K=Z.trace,G=K.xgap||0,W=K.ygap||0,Q=Z.z,R=Z.x,N=Z.y,U=Z.xCenter,ee=Z.yCenter,j=b.traceIs(K,"contour"),X=j?"best":K.zsmooth,J=Q.length,re=n.maxRowLength(Q),ne=!1,se=!1;for(D=0;A===void 0&&D<R.length-1;)A=w.c2p(R[D]),D++;for(D=R.length-1;I===void 0&&D>0;)I=w.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,ee=N,R=Z.xfill,N=Z.yfill),X!=="fast"){var oe=X==="best"?0:.5;A=Math.max(-oe*w._length,A),I=Math.min((1+oe)*w._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 o(V);X==="fast"?(pe=re,ce=J):(pe=de,ce=xe);var _e=document.createElement("canvas");_e.width=pe,_e.height=ce;var we,Ee,fe=_e.getContext("2d"),ge=l(K,{noNumericCheck:!0,returnArray:!0});X==="fast"?(we=ne?function(Xr){return re-1-Xr}:n.identity,Ee=se?function(Xr){return J-1-Xr}:n.identity):(we=function(Xr){return n.constrain(Math.round(w.c2p(R[Xr])-A),0,de)},Ee=function(Xr){return n.constrain(Math.round(k.c2p(N[Xr])-S),0,xe)});var ke,be,Se,Oe,De=Ee(0),je=[De,De],Je=ne?0:1,ze=se?0:1,Ue=0,Ge=0,Ye=0,et=0;function ct(Xr,Er){if(Xr!==void 0){var on=ge(Xr);return on[0]=Math.round(on[0]),on[1]=Math.round(on[1]),on[2]=Math.round(on[2]),Ue+=Er,Ge+=on[0]*Er,Ye+=on[1]*Er,et+=on[2]*Er,on}return[0,0,0,0]}function mt(Xr,Er,on,Un){var Tr=Xr[on.bin0];if(Tr===void 0)return ct(void 0,1);var en,$r=Xr[on.bin1],Rr=Er[on.bin0],Pn=Er[on.bin1],Nn=$r-Tr||0,hn=Rr-Tr||0;return en=$r===void 0?Pn===void 0?0:Rr===void 0?2*(Pn-Tr):2*(2*Pn-Rr-Tr)/3:Pn===void 0?Rr===void 0?0:2*(2*Tr-$r-Rr)/3:Rr===void 0?2*(2*Pn-$r-Tr)/3:Pn+Tr-$r-Rr,ct(Tr+on.frac*Nn+Un.frac*(hn+on.frac*en))}if(X){var Ct,Tt=0;try{Ct=new Uint8Array(de*xe*4)}catch{Ct=new Array(de*xe*4)}if(X==="best"){var nt,Qe,Et,Gt=U||R,Xt=ee||N,Fe=new Array(Gt.length),qe=new Array(Xt.length),wt=new Array(de),ft=U?p:h,Ce=ee?p:h;for(D=0;D<Gt.length;D++)Fe[D]=Math.round(w.c2p(Gt[D])-A);for(D=0;D<Xt.length;D++)qe[D]=Math.round(k.c2p(Xt[D])-S);for(D=0;D<de;D++)wt[D]=ft(D,Fe);for(F=0;F<xe;F++)for(Qe=Q[(nt=Ce(F,qe)).bin0],Et=Q[nt.bin1],D=0;D<de;D++,Tt+=4)s(Ct,Tt,Oe=mt(Qe,Et,wt[D],nt))}else for(F=0;F<J;F++)for(Se=Q[F],je=Ee(F),D=0;D<de;D++)Oe=ct(Se[D],1),s(Ct,Tt=4*(je*de+we(D)),Oe);var Ie=fe.createImageData(de,xe);try{Ie.data.set(Ct)}catch{var Te=Ie.data,Pe=Te.length;for(F=0;F<Pe;F++)Te[F]=Ct[F]}fe.putImageData(Ie,0,0)}else{var Ve=Math.floor(G/2),tt=Math.floor(W/2);for(F=0;F<J;F++)if(Se=Q[F],je.reverse(),je[ze]=Ee(F+1),je[0]!==je[1]&&je[0]!==void 0&&je[1]!==void 0)for(ke=[be=we(0),be],D=0;D<re;D++)ke.reverse(),ke[Je]=we(D+1),ke[0]!==ke[1]&&ke[0]!==void 0&&ke[1]!==void 0&&(Oe=ct(Se[D],(ke[1]-ke[0])*(je[1]-je[0])),fe.fillStyle="rgba("+Oe.join(",")+")",fe.fillRect(ke[0]+Ve,je[0]+tt,ke[1]-ke[0]-G,je[1]-je[0]-W))}Ge=Math.round(Ge/Ue),Ye=Math.round(Ye/Ue),et=Math.round(et/Ue);var ot=g("rgb("+Ge+","+Ye+","+et+")");x._hmpixcount=(x._hmpixcount||0)+Ue,x._hmlumcount=(x._hmlumcount||0)+Ue*ot.getLuminance();var at=V.selectAll("image").data(L);at.enter().append("svg:image").attr({xmlns:a.svg,preserveAspectRatio:"none"}),at.attr({height:xe,width:de,x:A,y:S,"xlink:href":_e.toDataURL("image/png")}),o(V);var _t=K.texttemplate;if(_t){var bt=d(K),jt={type:"linear",range:[bt.min,bt.max],_separators:w._separators,_numFormat:w._numFormat},Nt=K.type==="histogram2dcontour",$e=K.type==="contour",yt=$e?J-1:J,Ot=$e?1:0,Mt=$e?re-1:re,Pt=[];for(D=$e?1:0;D<yt;D++){var Le;if($e)Le=Z.y[D];else if(Nt){if(D===0||D===J-1)continue;Le=Z.y[D]}else if(Z.yCenter)Le=Z.yCenter[D];else{if(D+1===J&&Z.y[D+1]===void 0)continue;Le=(Z.y[D]+Z.y[D+1])/2}var Xe=Math.round(k.c2p(Le));if(!(0>Xe||Xe>k._length))for(F=Ot;F<Mt;F++){var it;if($e)it=Z.x[F];else if(Nt){if(F===0||F===re-1)continue;it=Z.x[F]}else if(Z.xCenter)it=Z.xCenter[F];else{if(F+1===re&&Z.x[F+1]===void 0)continue;it=(Z.x[F]+Z.x[F+1])/2}var At=Math.round(w.c2p(it));if(!(0>At||At>w._length)){var It=i({x:it,y:Le},K,x._fullLayout);It.x=it,It.y=Le;var Zt=Z.z[D][F];Zt===void 0?(It.z="",It.zLabel=""):(It.z=Zt,It.zLabel=e.tickText(jt,Zt,"hover").text);var Jt=Z.text&&Z.text[D]&&Z.text[D][F];Jt!==void 0&&Jt!==!1||(Jt=""),It.text=Jt;var Vt=n.texttemplateString(_t,It,x._fullLayout._d3locale,It,K._meta||{});if(Vt){var pr=Vt.split("<br>"),Ir=pr.length,fr=0;for(H=0;H<Ir;H++)fr=Math.max(fr,pr[H].length);Pt.push({l:Ir,c:fr,t:Vt,x:At,y:Xe,z:Zt})}}}}var $t=K.textfont,er=$t.family,ar=$t.size,hr=x._fullLayout.font.size;if(!ar||ar==="auto"){var vr=1/0,Pr=1/0,Ur=0,qr=0;for(H=0;H<Pt.length;H++){var rn=Pt[H];if(Ur=Math.max(Ur,rn.l),qr=Math.max(qr,rn.c),H<Pt.length-1){var An=Pt[H+1],mn=Math.abs(An.x-rn.x),Mn=Math.abs(An.y-rn.y);mn&&(vr=Math.min(vr,mn)),Mn&&(Pr=Math.min(Pr,Mn))}}isFinite(vr)&&isFinite(Pr)?(vr-=G,Pr-=W,vr/=qr,Pr/=Ur,vr/=u/2,Pr/=u,ar=Math.min(Math.floor(vr),Math.floor(Pr),hr)):ar=hr}if(ar<=0||!isFinite(ar))return;f(V).data(Pt).enter().append("g").classed("heatmap-label",1).append("text").attr("text-anchor","middle").each(function(Xr){var Er=m.select(this),on=$t.color;on&&on!=="auto"||(on=r.contrast("rgba("+ge(Xr.z).join()+")")),Er.attr("data-notex",1).call(t.positionText,function(Un){return Un.x}(Xr),function(Un){return Un.y-ar*(Un.l*u/2-1)}(Xr)).call(y.font,er,ar,on).text(Xr.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":936,"@plotly/d3":58,tinycolor2:312}],805:[function(v,$,te){var m=v("@plotly/d3");$.exports=function(g){m.select(g).selectAll(".hm image").style("opacity",function(b){return b.trace.opacity})}},{"@plotly/d3":58}],806:[function(v,$,te){$.exports=function(m,g,b){b("zsmooth")===!1&&(b
1221("xgap"),b("ygap")),b("zhoverformat")}},{}],807:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../registry");function y(e,n){var t=n(e);return(t?n(e+"type","array"):"scaled")==="scaled"&&(n(e+"0"),n("d"+e)),t}$.exports=function(e,n,t,i,r,d){var l,a,u=t("z");if(r=r||"x",d=d||"y",u===void 0||!u.length)return 0;if(g.isArray1D(e.z)){l=t(r),a=t(d);var f=g.minRowLength(l),o=g.minRowLength(a);if(f===0||o===0)return 0;n._length=Math.min(f,o,u.length)}else{if(l=y(r,t),a=y(d,t),!function(h){for(var p,s=!0,x=!1,c=!1,T=0;T<h.length;T++){if(p=h[T],!g.isArrayOrTypedArray(p)){s=!1;break}p.length>0&&(x=!0);for(var _=0;_<p.length;_++)if(m(p[_])){c=!0;break}}return s&&x&&c}(u))return 0;t("transpose"),n._length=null}return e.type==="heatmapgl"||b.getComponentMethod("calendars","handleTraceDefaults")(e,n,[r,d],i),!0}},{"../../lib":503,"../../registry":638,"fast-isnumeric":190}],808:[function(v,$,te){for(var m=v("../heatmap/attributes"),g=v("../../components/colorscale/attributes"),b=v("../../lib/extend").extendFlat,y=v("../../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 i=e[t];n[i]=m[i]}n.zsmooth={valType:"enumerated",values:["fast",!1],dflt:"fast",editType:"calc"},b(n,g("",{cLetter:"z",autoColorDflt:!1})),$.exports=y(n,"calc","nested")},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../heatmap/attributes":792}],809:[function(v,$,te){var m=v("../../../stackgl_modules").gl_heatmap2d,g=v("../../plots/cartesian/axes"),b=v("../../lib/str2rgbarray");function y(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=m(n.glplot,this.options),this.heatmap._trace=this}var e=y.prototype;e.handlePick=function(n){var t=this.options,i=t.shape,r=n.pointId,d=r%i[0],l=Math.floor(r/i[0]),a=r;return{trace:this,dataCoord:n.dataCoord,traceCoord:[t.x[d],t.y[l],t.z[a]],textLabel:this.textLabels[r],name:this.name,pointIndex:[l,d],hoverinfo:this.hoverinfo}},e.update=function(n,t){var i=t[0];this.index=n.index,this.name=n.name,this.hoverinfo=n.hoverinfo;var r=i.z;this.options.z=[].concat.apply([],r);var d=r[0].length,l=r.length;this.options.shape=[d,l],this.options.x=i.x,this.options.y=i.y,this.options.zsmooth=n.zsmooth;var a=function(p){for(var s=p.colorscale,x=p.zmin,c=p.zmax,T=s.length,_=new Array(T),w=new Array(4*T),k=0;k<T;k++){var L=s[k],A=b(L[1]);_[k]=x+L[0]*(c-x);for(var I=0;I<4;I++)w[4*k+I]=A[I]}return{colorLevels:_,colorValues:w}}(n);this.options.colorLevels=a.colorLevels,this.options.colorValues=a.colorValues,this.textLabels=[].concat.apply([],n.text),this.heatmap.update(this.options);var u,f,o=this.scene.xaxis,h=this.scene.yaxis;n.zsmooth===!1&&(u={ppad:i.x[1]-i.x[0]},f={ppad:i.y[1]-i.y[0]}),n._extremes[o._id]=g.findExtremes(o,i.x,u),n._extremes[h._id]=g.findExtremes(h,i.y,f)},e.dispose=function(){this.heatmap.dispose()},$.exports=function(n,t,i){var r=new y(n,t.uid);return r.update(t,i),r}},{"../../../stackgl_modules":1124,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554}],810:[function(v,$,te){var m=v("../../lib"),g=v("../heatmap/xyz_defaults"),b=v("../../components/colorscale/defaults"),y=v("./attributes");$.exports=function(e,n,t,i){function r(d,l){return m.coerce(e,n,y,d,l)}g(e,n,r,i)?(r("text"),r("zsmooth"),b(e,n,i,r,{prefix:"",cLetter:"z"})):n.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"../heatmap/xyz_defaults":807,"./attributes":808}],811:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../heatmap/colorbar"),calc:v("../heatmap/calc"),plot:v("./convert"),moduleType:"trace",name:"heatmapgl",basePlotModule:v("../../plots/gl2d"),categories:["gl","gl2d","2dMap"],meta:{}}},{"../../plots/gl2d":596,"../heatmap/calc":793,"../heatmap/colorbar":795,"./attributes":808,"./convert":809,"./defaults":810}],812:[function(v,$,te){var m=v("../bar/attributes"),g=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../../plots/template_attributes").texttemplateAttrs,e=v("../../plots/font_attributes"),n=v("./bin_attributes"),t=v("./constants"),i=v("../../lib/extend").extendFlat;$.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:g("x"),yhoverformat:g("y"),text:i({},m.text,{}),hovertext:i({},m.hovertext,{}),orientation:m.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:y({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:i({},m.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:m.insidetextanchor,textangle:m.textangle,cliponaxis:m.cliponaxis,constraintext:m.constraintext,marker:m.marker,offsetgroup:m.offsetgroup,alignmentgroup:m.alignmentgroup,selected:m.selected,unselected:m.unselected,_deprecated:{bardir:m._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(v,$,te){$.exports=function(m,g){for(var b=m.length,y=0,e=0;e<b;e++)g[e]?(m[e]/=g[e],y+=m[e]):m[e]=null;return y}},{}],814:[function(v,$,te){$.exports=function(m,g){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},{}],815:[function(v,$,te){var m=v("fast-isnumeric");$.exports={count:function(g,b,y){return y[g]++,1},sum:function(g,b,y,e){var n=e[b];return m(n)?(n=Number(n),y[g]+=n,n):0},avg:function(g,b,y,e,n){var t=e[b];return m(t)&&(t=Number(t),y[g]+=t,n[g]++),0},min:function(g,b,y,e){var n=e[b];if(m(n)){if(n=Number(n),!m(y[g]))return y[g]=n,n;if(y[g]>n){var t=n-y[g];return y[g]=n,t}}return 0},max:function(g,b,y,e){var n=e[b];if(m(n)){if(n=Number(n),!m(y[g]))return y[g]=n,n;if(y[g]<n){var t=n-y[g];return y[g]=n,t}}return 0}}},{"fast-isnumeric":190}],816:[function(v,$,te){var m=v("../../constants/numerical"),g=m.ONEAVGYEAR,b=m.ONEAVGMONTH,y=m.ONEDAY,e=m.ONEHOUR,n=m.ONEMIN,t=m.ONESEC,i=v("../../plots/cartesian/axes").tickIncrement;function r(u,f,o,h){if(u*f<=0)return 1/0;for(var p=Math.abs(f-u),s=o.type==="date",x=d(p,s),c=0;c<10;c++){var T=d(80*x,s);if(x===T||!l(T,u,f,s,o,h))break;x=T}return x}function d(u,f){return f&&u>t?u>y?u>1.1*g?g:u>1.1*b?b:y:u>e?e:u>n?n:t:Math.pow(10,Math.floor(Math.log(u)/Math.LN10))}function l(u,f,o,h,p,s){if(h&&u>y){var x=a(f,p,s),c=a(o,p,s),T=u===g?0:1;return x[T]!==c[T]}return Math.floor(o/u)-Math.floor(f/u)>.1}function a(u,f,o){var h=f.c2d(u,g,o).split("-");return h[0]===""&&(h.unshift(),h[0]="-"+h[0]),h}$.exports=function(u,f,o,h,p){var s,x,c=-1.1*f,T=-.1*f,_=u-T,w=o[0],k=o[1],L=Math.min(r(w+T,w+_,h,p),r(k+T,k+_,h,p)),A=Math.min(r(w+c,w+T,h,p),r(k+c,k+T,h,p));if(L>
vendor: 4,775 bytes, line 1221
1221A&&A<Math.abs(k-w)/4e3?(s=L,x=!1):(s=Math.min(L,A),x=!0),h.type==="date"&&s>y){var I=s===g?1:6,P=s===g?"M12":"M1";return function(S,E){var D=h.c2d(S,g,p),F=D.indexOf("-",I);F>0&&(D=D.substr(0,F));var H=h.d2c(D,0,p);if(H<S){var V=i(H,P,!1,p);(H+V)/2<S+u&&(H=V)}return E&&x?i(H,P,!0,p):H}}return function(S,E){var D=s*Math.round(S/s);return D+s/10<S&&D+.9*s<S+u&&(D+=s),E&&x&&(D-=s),D}}},{"../../constants/numerical":479,"../../plots/cartesian/axes":554}],817:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../registry"),y=v("../../plots/cartesian/axes"),e=v("../bar/arrays_to_calcdata"),n=v("./bin_functions"),t=v("./norm_functions"),i=v("./average"),r=v("./bin_label_vals");function d(l,a,u,f,o){var h,p,s,x,c,T,_,w=f+"bins",k=l._fullLayout,L=a["_"+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?g.cleanDate(ce,null,x):null}:function(ce){return m(ce)?Number(ce):null};function D(ce,de,xe){de[ce+"Found"]?(de[ce]=E(de[ce]),de[ce]===null&&(de[ce]=xe[ce])):(T[ce]=de[ce]=xe[ce],g.nestedProperty(p[0],w+"."+ce).set(xe[ce]))}if(a["_"+f+"autoBinFinished"])delete a["_"+f+"autoBinFinished"];else{p=A.traces;var F=[],H=!0,V=!1,Z=!1;for(h=0;h<p.length;h++)if((s=p[h]).visible){var K=A.dirs[h];c=s["_"+K+"pos0"]=u.makeCalcdata(s,K),F=g.concat(F,c),delete s["_"+f+"autoBinFinished"],a.visible===!0&&(H?H=!1:(delete s._autoBin,s["_"+f+"autoBinFinished"]=1),b.traceIs(s,"2dMap")&&(V=!0),s.type==="histogram2dcontour"&&(Z=!0))}x=p[0][f+"calendar"];var G=y.autoBin(F,u,A.nbins,V,x,A.sizeFound&&A.size),W=p[0]._autoBin={};if(T=W[A.dirs[0]]={},Z&&(A.size||(G.start=S(y.tickIncrement(P(G.start),G.size,!0,x))),A.end===void 0&&(G.end=S(y.tickIncrement(P(G.end),G.size,!1,x)))),I&&!b.traceIs(a,"2dMap")&&G._dataSpan===0&&u.type!=="category"&&u.type!=="multicategory"){if(o)return[G,c,!0];G=function(ce,de,xe,_e,we){var Ee,fe,ge,ke=ce._fullLayout,be=function(mt,Ct){for(var Tt=Ct.xaxis,nt=Ct.yaxis,Qe=Ct.orientation,Et=[],Gt=mt._fullData,Xt=0;Xt<Gt.length;Xt++){var Fe=Gt[Xt];Fe.type==="histogram"&&Fe.visible===!0&&Fe.orientation===Qe&&Fe.xaxis===Tt&&Fe.yaxis===nt&&Et.push(Fe)}return Et}(ce,de),Se=!1,Oe=1/0,De=[de];for(Ee=0;Ee<be.length;Ee++)if((fe=be[Ee])===de)Se=!0;else if(Se){var je=d(ce,fe,xe,_e,!0),Je=je[0],ze=je[2];fe["_"+_e+"autoBinFinished"]=1,fe["_"+_e+"pos0"]=je[1],ze?De.push(fe):Oe=Math.min(Oe,Je.size)}else ge=ke._histogramBinOpts[fe["_"+_e+"bingroup"]],Oe=Math.min(Oe,ge.size||fe[we].size);var Ue=new Array(De.length);for(Ee=0;Ee<De.length;Ee++)for(var Ge=De[Ee]["_"+_e+"pos0"],Ye=0;Ye<Ge.length;Ye++)if(Ge[Ye]!==void 0){Ue[Ee]=Ge[Ye];break}for(isFinite(Oe)||(Oe=g.distinctVals(Ue).minDiff),Ee=0;Ee<De.length;Ee++){var et=(fe=De[Ee])[_e+"calendar"],ct={start:xe.c2r(Ue[Ee]-Oe/2,0,et),end:xe.c2r(Ue[Ee]+Oe/2,0,et),size:Oe};fe._input[we]=fe[we]=ct,(ge=ke._histogramBinOpts[fe["_"+_e+"bingroup"]])&&g.extendFlat(ge,ct)}return de[we]}(l,a,u,f,w)}(_=s.cumulative||{}).enabled&&_.currentbin!=="include"&&(_.direction==="decreasing"?G.start=S(y.tickIncrement(P(G.start),G.size,!0,x)):G.end=S(y.tickIncrement(P(G.end),G.size,!1,x))),A.size=G.size,A.sizeFound||(T.size=G.size,g.nestedProperty(p[0],w+".size").set(G.size)),D("start",A,G),D("end",A,G)}c=a["_"+f+"pos0"],delete a["_"+f+"pos0"];var Q=a._input[w]||{},R=g.extendFlat({},A),N=A.start,U=u.r2l(Q.start),ee=U!==void 0;if((A.startFound||ee)&&U!==u.r2l(N)){var j=ee?U:g.aggNums(Math.min,null,c),X={type:u.type==="category"||u.type==="multicategory"?"linear":u.type,r2l:u.r2l,dtick:A.size,tick0:N,calendar:x,range:[j,y.tickIncrement(j,A.size,!1,x)].map(u.l2r)},J=y.tickFirst(X);J>u.r2l(j)&&(J=y.tickIncrement(J,A.size,!0,x)),R.start=u.l2r(J),ee||g.nestedProperty(a,w+".start").set(R.start)}var re=A.end,ne=u.r2l(Q.end),se=ne!==void 0;if((A.endFound||se)&&ne!==u.r2l(re)){var oe=se?ne:g.aggNums(Math.max,null,c);R.end=u.l2r(oe),se||g.nestedProperty(a,w+".start").set(R.end)}var pe="autobin"+f;return a._input[pe]===!1&&(a._input[w]=g.extendFlat({},a[w]||{}),delete a._input[pe],delete a[pe]),[R,c]}$.exports={calc:function(l,a){var u,f,o,h,p=[],s=[],x=a.orientation==="h",c=y.getFromId(l,x?a.yaxis:a.xaxis),T=x?"y":"x",_={x:"y",y:"x"}[T],w=a[T+"calendar"],k=a.cumulative,L=d(l,a,c,T),A=L[0],I=L[1],P=typeof A.size=="string",S=[],E=P?S:A,D=[],F=[],H=[],V=0,Z=a.histnorm,K=a.histfunc,G=Z.indexOf("density")!==-1;k.enabled&&G&&(Z=Z.replace(/ ?density$/,""),G=!1);var W,Q=K==="max"||K==="min"?null:0,R=n.count,N=t[Z],U=!1,ee=function(fe){return c.r2c(fe,0,w)};for(g.isArrayOrTypedArray(a[_])&&K!=="count"&&(W=a[_],U=K==="avg",R=n[K]),u=ee(A.start),o=ee(A.end)+(u-y.tickIncrement(u,A.size,!1,w))/1e6;u<o&&p.length<1e6&&(f=y.tickIncrement(u,A.size,!1,w),p.push((u+f)/2),s.push(Q
1221),H.push([]),S.push(u),G&&D.push(1/(f-u)),U&&F.push(0),!(f<=u));)u=f;S.push(u),P||c.type!=="date"||(E={start:ee(E.start),end:ee(E.end),size:E.size}),l._fullLayout._roundFnOpts||(l._fullLayout._roundFnOpts={});var j=a["_"+T+"bingroup"],X={leftGap:1/0,rightGap:1/0};j&&(l._fullLayout._roundFnOpts[j]||(l._fullLayout._roundFnOpts[j]=X),X=l._fullLayout._roundFnOpts[j]);var J,re=s.length,ne=!0,se=X.leftGap,oe=X.rightGap,pe={};for(u=0;u<I.length;u++){var ce=I[u];(h=g.findBin(ce,E))>=0&&h<re&&(V+=R(h,u,s,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))}X.leftGap=se,X.rightGap=oe,ne||(J=function(fe,ge){return function(){var ke=l._fullLayout._roundFnOpts[j];return r(ke.leftGap,ke.rightGap,S,c,w)(fe,ge)}}),U&&(V=i(s,F)),N&&N(s,V,D),k.enabled&&function(fe,ge,ke){var be,Se,Oe;function De(Je){Oe=fe[Je],fe[Je]/=2}function je(Je){Se=fe[Je],fe[Je]=Oe+Se/2,Oe+=Se}if(ke==="half")if(ge==="increasing")for(De(0),be=1;be<fe.length;be++)je(be);else for(De(fe.length-1),be=fe.length-2;be>=0;be--)je(be);else if(ge==="increasing"){for(be=1;be<fe.length;be++)fe[be]+=fe[be-1];ke==="exclude"&&(fe.unshift(0),fe.pop())}else{for(be=fe.length-2;be>=0;be--)fe[be]+=fe[be+1];ke==="exclude"&&(fe.push(0),fe.shift())}}(s,k.direction,k.currentbin);var de=Math.min(p.length,s.length),xe=[],_e=0,we=de-1;for(u=0;u<de;u++)if(s[u]){_e=u;break}for(u=de-1;u>=_e;u--)if(s[u]){we=u;break}for(u=_e;u<=we;u++)if(m(p[u])&&m(s[u])){var Ee={p:p[u],s:s[u],b:0};k.enabled||(Ee.pts=H[u],ne?Ee.ph0=Ee.ph1=H[u].length?I[H[u][0]]:p[u]:(a._computePh=!0,Ee.ph0=J(S[u]),Ee.ph1=J(S[u+1],!0))),xe.push(Ee)}return xe.length===1&&(xe[0].width1=y.tickIncrement(xe[0].p,A.size,!1,w)-xe[0].p),e(xe,a),g.isArrayOrTypedArray(a.selectedpoints)&&g.tagSelected(xe,a,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(v,$,te){$.exports={eventDataKeys:["binNumber"]}},{}],819:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axis_ids"),b=v("../../registry").traceIs,y=v("../bar/defaults").handleGroupingDefaults,e=m.nestedProperty,n=v("../../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"}],i=["x","y"];$.exports=function(r,d){var l,a,u,f,o,h,p,s=d._histogramBinOpts={},x=[],c={},T=[];function _(G,W){return m.coerce(l._input,l,l._module.attributes,G,W)}function w(G){return G.orientation==="v"?"x":"y"}function k(G,W,Q){var R=G.uid+"__"+Q;W||(W=R);var N=function(X,J){return g.getFromTrace({_fullLayout:d},X,J).type}(G,Q),U=G[Q+"calendar"]||"",ee=s[W],j=!0;ee&&(N===ee.axType&&U===ee.calendar?(j=!1,ee.traces.push(G),ee.dirs.push(Q)):(W=R,N!==ee.axType&&m.warn(["Attempted to group the bins of trace",G.index,"set on a","type:"+N,"axis","with bins on","type:"+ee.axType,"axis."].join(" ")),U!==ee.calendar&&m.warn(["Attempted to group the bins of trace",G.index,"set with a",U,"calendar","with bins",ee.calendar?"on a "+ee.calendar+" calendar":"w/o a set calendar"].join(" ")))),j&&(s[W]={traces:[G],dirs:[Q],axType:N,calendar:G[Q+"calendar"]||""}),G["_"+Q+"bingroup"]=W}for(o=0;o<r.length;o++)l=r[o],b(l,"histogram")&&(x.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,b(l,"2dMap")||y(l._input,l,d,_));var L=d._alignmentOpts||{};for(o=0;o<x.length;o++){if(l=x[o],u="",!b(l,"2dMap")){if(f=w(l),d.barmode==="group"&&l.alignmentgroup){var A=l[f+"axis"],I=n(d,A)+l.orientation;(L[I]||{})[l.alignmentgroup]&&(u=I)}u||d.barmode==="overlay"||(u=n(d,l.xaxis)+n(d,l.yaxis)+w(l))}u?(c[u]||(c[u]=[]),c[u].push(l)):T.push(l)}for(u in c)if((a=c[u]).length!==1){var P=!1;for(a.length&&(l=a[0],P=_("bingroup")),u=P||u,o=0;o<a.length;o++){var S=(l=a[o])._input.bingroup;S&&S!==u&&m.warn(["Trace",l.index,"must match","within bingroup",u+".","Ignoring its bingroup:",S,"setting."].join(" ")),l.bingroup=u,k(l,u,
1221w(l))}}else T.push(a[0]);for(o=0;o<T.length;o++){l=T[o];var E=_("bingroup");if(b(l,"2dMap"))for(p=0;p<2;p++){var D=_((f=i[p])+"bingroup",E?E+"__"+f:null);k(l,D,f)}else k(l,E,w(l))}for(u in s){var F=s[u];for(a=F.traces,h=0;h<t.length;h++){var H,V,Z=t[h],K=Z.name;if(K!=="nbins"||!F.sizeFound){for(o=0;o<a.length;o++){if(l=a[o],f=F.dirs[o],H=Z.aStr[f],e(l._input,H).get()!==void 0){F[K]=_(H),F[K+"Found"]=!0;break}(V=(l._autoBin||{})[f]||{})[K]&&e(l,H).set(V[K])}if(K==="start"||K==="end")for(;o<a.length;o++)(l=a[o])["_"+f+"bingroup"]&&_(H,(V=(l._autoBin||{})[f]||{})[K]);K!=="nbins"||F.sizeFound||F.nbinsFound||(l=a[0],F[K]=_(H))}}}}},{"../../lib":503,"../../plots/cartesian/axis_ids":558,"../../plots/cartesian/constraints":562,"../../registry":638,"../bar/defaults":652}],820:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("../../components/color"),y=v("../bar/defaults").handleText,e=v("../bar/style_defaults"),n=v("./attributes");$.exports=function(t,i,r,d){function l(T,_){return g.coerce(t,i,n,T,_)}var a=l("x"),u=l("y");l("cumulative.enabled")&&(l("cumulative.direction"),l("cumulative.currentbin")),l("text");var f=l("textposition");y(t,i,d,l,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat");var o=l("orientation",u&&!a?"h":"v"),h=o==="v"?"x":"y",p=o==="v"?"y":"x",s=a&&u?Math.min(g.minRowLength(a)&&g.minRowLength(u)):g.minRowLength(i[h]||[]);if(s){i._length=s,m.getComponentMethod("calendars","handleTraceDefaults")(t,i,["x","y"],d),i[p]&&l("histfunc"),l("histnorm"),l("autobin"+h),e(t,i,l,r,d),g.coerceSelectionMarkerOpacity(i,l);var x=(i.marker.line||{}).color,c=m.getComponentMethod("errorbars","supplyDefaults");c(t,i,x||b.defaultLine,{axis:"y"}),c(t,i,x||b.defaultLine,{axis:"x",inherit:"y"})}else i.visible=!1}},{"../../components/color":366,"../../lib":503,"../../registry":638,"../bar/defaults":652,"../bar/style_defaults":663,"./attributes":812}],821:[function(v,$,te){$.exports=function(m,g,b,y,e){if(m.x="xVal"in g?g.xVal:g.x,m.y="yVal"in g?g.yVal:g.y,"zLabelVal"in g&&(m.z=g.zLabelVal),g.xa&&(m.xaxis=g.xa),g.ya&&(m.yaxis=g.ya),!(b.cumulative||{}).enabled){var n,t=Array.isArray(e)?y[0].pts[e[0]][e[1]]:y[e].pts;if(m.pointNumbers=t,m.binNumber=m.pointNumber,delete m.pointNumber,delete m.pointIndex,b._indexToPoints){n=[];for(var i=0;i<t.length;i++)n=n.concat(b._indexToPoints[t[i]])}else n=t;m.pointIndices=n}return m}},{}],822:[function(v,$,te){var m=v("../bar/hover").hoverPoints,g=v("../../plots/cartesian/axes").hoverLabelText;$.exports=function(b,y,e,n,t){var i=m(b,y,e,n,t);if(i){var r=(b=i[0]).cd[b.index],d=b.cd[0].trace;if(!d.cumulative.enabled){var l=d.orientation==="h"?"y":"x";b[l+"Label"]=g(b[l+"a"],[r.ph0,r.ph1],d[l+"hoverformat"])}return i}}},{"../../plots/cartesian/axes":554,"../bar/hover":655}],823:[function(v,$,te){$.exports={attributes:v("./attributes"),layoutAttributes:v("../bar/layout_attributes"),supplyDefaults:v("./defaults"),crossTraceDefaults:v("./cross_trace_defaults"),supplyLayoutDefaults:v("../bar/layout_defaults"),calc:v("./calc").calc,crossTraceCalc:v("../bar/cross_trace_calc").crossTraceCalc,plot:v("../bar/plot").plot,layerName:"barlayer",style:v("../bar/style").style,styleOnSelect:v("../bar/style").styleOnSelect,colorbar:v("../scatter/marker_colorbar"),hoverPoints:v("./hover"),selectPoints:v("../bar/select"),eventData:v("./event_data"),moduleType:"trace",name:"histogram",basePlotModule:v("../../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":945,"./attributes":812,"./calc":817,"./cross_trace_defaults":819,"./defaults":820,"./event_data":821,"./hover":822}],824:[function(v,$,te){$.exports={percent:function(m,g){for(var b=m.length,y=100/g,e=0;e<b;e++)m[e]*=y},probability:function(m,g){for(var b=m.length,y=0;y<b;y++)m[y]/=g},density:function(m,g,b,y){var e=m.length;y=y||1;for(var n=0;n<e;n++)m[n]*=b[n]*y},"probability density":function(m,g,b,y){var e=m.length;y&&(g/=y);for(var n=0;n<e;n++)m[n]*=b[n]/g}}},{}],825:[function(v,$,te){var m=v("../histogram/attributes"),g=v("../histogram/bin_attributes"),b=v("../heatmap/attributes"),y=v("../../plots/attributes"),e=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,n=v("../../plots/template_attributes").hovertemplateAttrs,t=v("../../plots/template_attributes").texttemplateAttrs,i=v("../../components/colorscale/attributes"),r=v("../../lib/extend").extendFlat;
1221$.exports=r({x:m.x,y:m.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:m.histnorm,histfunc:m.histfunc,nbinsx:m.nbinsx,xbins:g("x"),nbinsy:m.nbinsy,ybins:g("y"),autobinx:m.autobinx,autobiny:m.autobiny,bingroup:r({},m.bingroup,{}),xbingroup:r({},m.bingroup,{}),ybingroup:r({},m.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({},y.showlegend,{dflt:!1})},i("",{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(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("../histogram/bin_functions"),y=v("../histogram/norm_functions"),e=v("../histogram/average"),n=v("../histogram/bin_label_vals"),t=v("../histogram/calc").calcAllAutoBins;function i(l,a,u,f){var o,h=new Array(l);if(f)for(o=0;o<l;o++)h[o]=1/(a[o+1]-a[o]);else{var p=1/u;for(o=0;o<l;o++)h[o]=p}return h}function r(l,a){return{start:l(a.start),end:l(a.end),size:a.size}}function d(l,a,u,f,o,h){var p,s=l.length-1,x=new Array(s),c=n(u,f,l,o,h);for(p=0;p<s;p++){var T=(a||[])[p];x[p]=T===void 0?[c(l[p]),c(l[p+1],!0)]:[T,T]}return x}$.exports=function(l,a){var u,f,o,h,p=g.getFromId(l,a.xaxis),s=g.getFromId(l,a.yaxis),x=a.xcalendar,c=a.ycalendar,T=function(nt){return p.r2c(nt,0,x)},_=function(nt){return s.r2c(nt,0,c)},w=t(l,a,p,"x"),k=w[0],L=w[1],A=t(l,a,s,"y"),I=A[0],P=A[1],S=a._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=[],G=H?Z:k,W=V?K:I,Q=0,R=[],N=[],U=a.histnorm,ee=a.histfunc,j=U.indexOf("density")!==-1,X=ee==="max"||ee==="min"?null:0,J=b.count,re=y[U],ne=!1,se=[],oe=[],pe="z"in a?a.z:"marker"in a&&Array.isArray(a.marker.color)?a.marker.color:"";pe&&ee!=="count"&&(ne=ee==="avg",J=b[ee]);var ce=k.size,de=T(k.start),xe=T(k.end)+(de-g.tickIncrement(de,ce,!1,x))/1e6;for(u=de;u<xe;u=g.tickIncrement(u,ce,!1,x))D.push(X),Z.push(u),ne&&F.push(0);Z.push(u);var _e,we=D.length,Ee=(u-de)/we,fe=(_e=de+Ee/2,p.c2r(_e,0,x)),ge=I.size,ke=_(I.start),be=_(I.end)+(ke-g.tickIncrement(ke,ge,!1,c))/1e6;for(u=ke;u<be;u=g.tickIncrement(u,ge,!1,c)){E.push(D.slice()),K.push(u);var Se=new Array(we);for(f=0;f<we;f++)Se[f]=[];N.push(Se),ne&&R.push(F.slice())}K.push(u);var Oe=E.length,De=(u-ke)/Oe,je=function(nt){return s.c2r(nt,0,c)}(ke+De/2);j&&(se=i(D.length,G,Ee,H),oe=i(E.length,W,De,V)),H||p.type!=="date"||(G=r(T,G)),V||s.type!=="date"||(W=r(_,W));var Je=!0,ze=!0,Ue=new Array(we),Ge=new Array(Oe),Ye=1/0,et=1/0,ct=1/0,mt=1/0;for(u=0;u<S;u++){var Ct=L[u],Tt=P[u];o=m.findBin(Ct,G),h=m.findBin(Tt,W),o>=0&&o<we&&h>=0&&h<Oe&&(Q+=J(o,u,E[h],pe,R[h]),N[h][o].push(u),Je&&(Ue[o]===void 0?Ue[o]=Ct:Ue[o]!==Ct&&(Je=!1)),ze&&(Ge[h]===void 0?Ge[h]=Tt:Ge[h]!==Tt&&(ze=!1)),Ye=Math.min(Ye,Ct-Z[o]),et=Math.min(et,Z[o+1]-Ct),ct=Math.min(ct,Tt-K[h]),mt=Math.min(mt,K[h+1]-Tt))}if(ne)for(h=0;h<Oe;h++)Q+=e(E[h],R[h]);if(re)for(h=0;h<Oe;h++)re(E[h],Q,se,oe[h]);return{x:L,xRanges:d(Z,Je&&Ue,Ye,et,p,x),x0:fe,dx:Ee,y:P,yRanges:d(K,ze&&Ge,ct,mt,s,c),y0:je,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(v,$,te){var m=v("../../lib"),g=v("./sample_defaults"),b=v("../heatmap/style_defaults"),y=v("../../components/colorscale/defaults"),e=v("../heatmap/label_defaults"),n=v("./attributes");$.exports=function(t,i,r,d){function l(a,u){return m.coerce(t,i,n,a,u)}g(t,i,l,d),i.visible!==!1&&(b(t,i,l,d),y(t,i,d,l,{prefix:"",cLetter:"z"}),l("hovertemplate"),e(l,d),l("xhoverformat"),l("yhoverformat"))}},{"../../components/colorscale/defaults":376,"../../lib":503,"../heatmap/label_defaults":802,"../heatmap/style_defaults":806,"./attributes":825,"./sample_defaults":830}],828:[function(v,$,te){var m=v("../heatmap/hover"),g=v("../../plots/cartesian/axes").hoverLabelText;$.exports=function(b,y,e,n,t){var i=m(b,y,e,n,t);if(i){var r=(b=i[0]).index,d=r[0],l=r[1],a=b.cd[0],u=a.trace,f=a.xRanges[l],o=a.yRanges[d];return b.xLabel=g(b.xa,[f[0],f[1]],u.xhoverformat),b.yLabel=g(b.ya,[o[0],o[1]],u.yhoverformat),i}}},{"../../plots/cartesian/axes":554,"../heatmap/hover":799}],829:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),crossTraceDefaults:v("../histogram/cross_trace_defaults"),calc:v("../heatmap/calc"),plot:v("../heatmap/plot"),layerName:"heatmaplayer",colorbar:v("../heatmap/colorbar"),style:v("../heatmap/style"),hoverPoints:v("./hover"),eventData:v("../histogram/event_data"),moduleType:"trace",name:"histogram2d",basePlotModule:v("../../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(v,$,te){var m=v("../../registry"),g=v("../../lib");$.exports=function(b,y,e,n){var t=e("x"),i=e("y"),r=g.minRowLength(t),d=g.minRowLength(i);r&&d?(y._length=Math.min(r,d),m.getComponentMethod("calendars","handleTraceDefaults")(b,y,["x","y"],n),(e("z")||e("marker.color"))&&e("histfunc"),e("histnorm"),e("autobinx"),e("autobiny")):y.visible=!1}},{"../../lib":503,"../../registry":638}],831:[function(v,$,te){var m=v("../histogram2d/attributes"),g=v("../contour/attributes"),b=v("../../components/colorscale/attributes"),y=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,e=v("../../lib/extend").extendFlat;
1221$.exports=e({x:m.x,y:m.y,z:m.z,marker:m.marker,histnorm:m.histnorm,histfunc:m.histfunc,nbinsx:m.nbinsx,xbins:m.xbins,nbinsy:m.nbinsy,ybins:m.ybins,autobinx:m.autobinx,autobiny:m.autobiny,bingroup:m.bingroup,xbingroup:m.xbingroup,ybingroup:m.ybingroup,autocontour:g.autocontour,ncontours:g.ncontours,contours:g.contours,line:{color:g.line.color,width:e({},g.line.width,{dflt:.5}),dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},xhoverformat:y("x"),yhoverformat:y("y"),zhoverformat:y("z",1),hovertemplate:m.hovertemplate,texttemplate:g.texttemplate,textfont:g.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(v,$,te){var m=v("../../lib"),g=v("../histogram2d/sample_defaults"),b=v("../contour/contours_defaults"),y=v("../contour/style_defaults"),e=v("../heatmap/label_defaults"),n=v("./attributes");$.exports=function(t,i,r,d){function l(a,u){return m.coerce(t,i,n,a,u)}g(t,i,l,d),i.visible!==!1&&(b(t,i,l,function(a){return m.coerce2(t,i,n,a)}),y(t,i,l,d),l("xhoverformat"),l("yhoverformat"),l("hovertemplate"),i.contours&&i.contours.coloring==="heatmap"&&e(l,d))}},{"../../lib":503,"../contour/contours_defaults":742,"../contour/style_defaults":756,"../heatmap/label_defaults":802,"../histogram2d/sample_defaults":830,"./attributes":831}],833:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),crossTraceDefaults:v("../histogram/cross_trace_defaults"),calc:v("../contour/calc"),plot:v("../contour/plot").plot,layerName:"contourlayer",style:v("../contour/style"),colorbar:v("../contour/colorbar"),hoverPoints:v("../contour/hover"),moduleType:"trace",name:"histogram2dcontour",basePlotModule:v("../../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(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../../plots/template_attributes").texttemplateAttrs,b=v("../../components/colorscale/attributes"),y=v("../../plots/domain").attributes,e=v("../pie/attributes"),n=v("../sunburst/attributes"),t=v("../treemap/attributes"),i=v("../treemap/constants"),r=v("../../lib/extend").extendFlat;$.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:g({editType:"plot"},{keys:i.eventDataKeys.concat(["label","value"])}),hovertext:e.hovertext,hoverinfo:n.hoverinfo,hovertemplate:m({},{keys:i.eventDataKeys}),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:t.outsidetextfont,textposition:t.textposition,sort:e.sort,root:n.root,domain:y({name:"icicle",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":901,"../sunburst/attributes":1049,"../treemap/attributes":1075,"../treemap/constants":1078}],835:[function(v,$,te){var m=v("../../plots/plots");te.name="icicle",te.plot=function(g,b,y,e){m.plotBasePlot(te.name,g,b,y,e)},te.clean=function(g,b,y,e){m.cleanBasePlot(te.name,g,b,y,e)}},{"../../plots/plots":619}],836:[function(v,$,te){var m=v("../sunburst/calc");te.calc=function(g,b){return m.calc(g,b)},te.crossTraceCalc=function(g){return m._runCrossTraceCalc("icicle",g)}},{"../sunburst/calc":1051}],837:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("../../components/color"),y=v("../../plots/domain").defaults,e=v("../bar/defaults").handleText,n=v("../bar/constants").TEXTPAD,t=v("../../components/colorscale"),i=t.hasColorscale,r=t.handleDefaults;$.exports=function(d,l,a,u){function f(T,_){return m.coerce(d,l,g,T,_)}var o=f("labels"),h=f("parents");if(o&&o.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 s=f("text");f("texttemplate"),l.texttemplate||f("textinfo",Array.isArray(s)?"text
1221+label":"label"),f("hovertext"),f("hovertemplate");var x=f("pathbar.visible");e(d,l,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 c=l._hasColorscale=i(d,"marker","colors")||(d.marker||{}).coloraxis;c&&r(d,l,u,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",c?1:.7),l._hovered={marker:{line:{width:2,color:b.contrast(u.paper_bgcolor)}}},x&&(f("pathbar.thickness",l.pathbar.textfont.size+2*n),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),y(l,u,f),l._length=null}else l.visible=!1}},{"../../components/color":366,"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/constants":650,"../bar/defaults":652,"./attributes":834}],838:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../components/drawing"),y=v("../../lib/svg_text_utils"),e=v("./partition"),n=v("./style").styleOne,t=v("../treemap/constants"),i=v("../sunburst/helpers"),r=v("../sunburst/fx"),d=v("../sunburst/plot").formatSliceLabel;$.exports=function(l,a,u,f,o){var h=o.width,p=o.height,s=o.viewX,x=o.viewY,c=o.pathSlice,T=o.toMoveInsideSlice,_=o.strTransform,w=o.hasTransition,k=o.handleSlicesExit,L=o.makeUpdateSliceInterpolator,A=o.makeUpdateTextInterpolator,I=o.prevEntry,P=l._fullLayout,S=a[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,i.getPtId),S._maxVisibleLayers=isFinite(Z)?Z-V+1:0,f.enter().append("g").classed("slice",!0),k(f,!1,{},[h,p],c),f.order();var K=null;if(w&&I){var G=i.getPtId(I);f.each(function(R){K===null&&i.getPtId(R)===G&&(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}},Q=f;return w&&(Q=Q.transition().each("end",function(){var R=m.select(this);i.setSliceCursor(R,l,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}
1221)),Q.each(function(R){R._x0=s(R.x0),R._x1=s(R.x1),R._y0=x(R.y0),R._y1=x(R.y1),R._hoverX=s(R.x1-S.tiling.pad),R._hoverY=x(F?R.y1-S.tiling.pad/2:R.y0+S.tiling.pad/2);var N=m.select(this),U=g.ensureSingle(N,"path","surface",function(J){J.style("pointer-events","all")});w?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 c(re(ne))}}):U.attr("d",c),N.call(r,u,l,a,{styleOne:n,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(i.setSliceCursor,l,{isTransitioning:l._transitioning}),U.call(n,R,S,{hovered:!1}),R.x0===R.x1||R.y0===R.y1?R._text="":R._text=d(R,u,S,a,P)||"";var ee=g.ensureSingle(N,"g","slicetext"),j=g.ensureSingle(ee,"text","",function(J){J.attr("data-notex",1)}),X=g.ensureUniformFontSize(l,i.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(y.convertToTspans,l),R.textBB=b.bBox(j.node()),R.transform=T(R,{fontSize:X.size}),R.transform.fontSize=X.size,w?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":1054,"../sunburst/helpers":1055,"../sunburst/plot":1059,"../treemap/constants":1078,"./partition":842,"./style":844,"@plotly/d3":58}],839:[function(v,$,te){$.exports={moduleType:"trace",name:"icicle",basePlotModule:v("./base_plot"),categories:[],animatable:!0,attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults"),supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc").calc,crossTraceCalc:v("./calc").crossTraceCalc,plot:v("./plot"),style:v("./style").style,colorbar:v("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":945,"./attributes":834,"./base_plot":835,"./calc":836,"./defaults":837,"./layout_attributes":840,"./layout_defaults":841,"./plot":843,"./style":844}],840:[function(v,$,te){$.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],841:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y){function e(n,t){return m.coerce(b,y,g,n,t)}e("iciclecolorway",y.colorway),e("extendiciclecolors")}},{"../../lib":503,"./layout_attributes":840}],842:[function(v,$,te){var m=v("d3-hierarchy"),g=v("../treemap/flip_tree");$.exports=function(b,y,e){var n=e.flipX,t=e.flipY,i=e.orientation==="h",r=e.maxDepth,d=y[0],l=y[1];r&&(d=(b.height+1)*y[0]/Math.min(b.height+1,r),l=(b.height+1)*y[1]/Math.min(b.height+1,r));var a=m.partition().padding(e.pad.inner).size(i?[y[1],d]:[y[0],l])(b);return(i||n||t)&&g(a,y,{swapXY:i,flipX:n,flipY:t}),a}},{"../treemap/flip_tree":1083,"d3-hierarchy":115}],843:[function(v,$,te){var m=v("../treemap/draw"),g=v("./draw_descendants");$.exports=function(b,y,e,n){return m(b,y,e,n,{type:"icicle",drawDescendants:g})}},{"../treemap/draw":1080,"./draw_descendants":838}],844:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/color"),b=v("../../lib"),y=v("../bar/uniform_text").resizeText;function e(n,t,i){var r=t.data.data,d=!t.children,l=r.i,a=b.castOption(i,l,"marker.line.color")||g.defaultLine,u=b.castOption(i,l,"marker.line.width")||0;n.style("stroke-width",u).call(g.fill,r.color).call(g.stroke,a).style("opacity",d?i.leaf.opacity:null)}$.exports={style:function(n){var t=n._fullLayout._iciclelayer.selectAll(".trace");y(n,t,"icicle"),t.each(function(i){var r=m.select(this),d=i[0].trace;r.style("opacity",d.opacity),r.selectAll("path.surface").each(function(l){m.select(this).call(e,l,d)})})},styleOne:e}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],845:[function(v,$,te){for(var m=v("../../plots/attributes"),g=v("../../plots/template_attributes").hovertemplateAttrs,b=v("../../lib/extend").extendFlat,y=v("./constants").colormodel,e=["rgb","rgba","rgba256","hsl","hsla"],n=[],t=[],i=0;i<e.length;i++){var r=y[e[i]];n.push("For the `"+e[i]+"` colormodel, it is ["+(r.zminDflt||r.min).join(", ")+"]."),t.pu
1221sh("For the `"+e[i]+"` colormodel, it is ["+(r.zmaxDflt||r.max).join(", ")+"].")}$.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({},m.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:g({},{keys:["z","color","colormodel"]}),transforms:void 0})},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"./constants":847}],846:[function(v,$,te){var m=v("../../lib"),g=v("./constants"),b=v("fast-isnumeric"),y=v("../../plots/cartesian/axes"),e=v("../../lib").maxRowLength,n=v("./helpers").getImageSize;function t(r,d,l,a){return function(u){return m.constrain((u-r)*d,l,a)}}function i(r,d){return function(l){return m.constrain(l,r,d)}}$.exports=function(r,d){var l,a;if(d._hasZ)l=d.z.length,a=e(d.z);else if(d._hasSource){var u=n(d.source);l=u.height,a=u.width}var f,o=y.getFromId(r,d.xaxis||"x"),h=y.getFromId(r,d.yaxis||"y"),p=o.d2c(d.x0)-d.dx/2,s=h.d2c(d.y0)-d.dy/2,x=[p,p+a*d.dx],c=[s,s+l*d.dy];if(o&&o.type==="log")for(f=0;f<a;f++)x.push(p+f*d.dx);if(h&&h.type==="log")for(f=0;f<l;f++)c.push(s+f*d.dy);return d._extremes[o._id]=y.findExtremes(o,x),d._extremes[h._id]=y.findExtremes(h,c),d._scaler=function(T){var _=g.colormodel[T.colormodel],w=(_.colormodel||T.colormodel).length;T._sArray=[];for(var k=0;k<w;k++)_.min[k]!==T.zmin[k]||_.max[k]!==T.zmax[k]?T._sArray.push(t(T.zmin[k],(_.max[k]-_.min[k])/(T.zmax[k]-T.zmin[k]),_.min[k],_.max[k])):T._sArray.push(i(_.min[k],_.max[k]));return function(L){for(var A=L.slice(0,w),I=0;I<w;I++){var P=A[I];if(!b(P))return!1;A[I]=T._sArray[I](P)}return A}}(d),[{x0:p,y0:s,z:d.z,w:a,h:l}]}},{"../../lib":503,"../../plots/cartesian/axes":554,"./constants":847,"./helpers":850,"fast-isnumeric":190}],847:[function(v,$,te){$.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(m){return m.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(m){return m.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(m){return m.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(m){var g=m.slice(0,3);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(m){var g=m.slice(0,4);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["\xB0","%","%",""]}},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(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("./constants"),y=v("../../snapshot/helpers").IMAGE_URL_PREFIX;$.exports=function(e,n){function t(d,l){return m.coerce(e,n,g,d,l)}t("source"),n.source&&!n.source.match(y)&&delete n.source,n._hasSource=!!n.source;var i,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",(i=b.colormodel[n.colormodel]).zminDflt||i.min),t("zmax",i.zmaxDflt||i.max)):n._hasSource&&(n.colormodel="rgba256",i=b.colormodel[n.colormodel],n.zmin=i.zminDflt,n.zmax=i.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(v,$,te){$.exports=function(m,g){return"xVal"in g&&(m.x=g.xVal),"yVal"in g&&(m.y=g.yVal),g.xa&&(m.xaxis=g.xa),g.ya&&(m.yaxis=g.ya),m.color=g.color,m.colormodel=g.trace.colormodel,m.z||(m.z=g.color),m}},{}],850:[function(v,$,te){var m=v("probe-image-size/sync"),g=v("../../snapshot/helpers").IMAGE_URL_PREFIX,b=v("buffer/").Buffer;te.getImageSize=function(y){var e=y.replace(g,""),n=new b(e,"base64");return m(n)}},{"../../snapshot/helpers":642,"buffer/":85,"probe-image-size/sync":276}],851:[function(v,$,te){var m=v("../../components/fx"),g=v("../../lib"),b=v("./constants");$.exports=function(y,e,n){var t=y.cd[0],i=t.trace,r=y.xa,d=y.ya;if(!(m.inbox(e-t.x0,e-(t.x0+t.w*i.dx),0)>0||m.inbox(n-t.y0,n-(t.y0+t.h*i.dy),0)>0)){var l,a=Math.floor((e-t.x0)/i.dx),u=Math.floor(Math.abs(n-t.y0)/i.dy);if(i._hasZ?l=t.z[u][a]:i._hasSource&&(l=i._canvas.el.getContext("2d").getImageData(a,u,1,1).data),l){var f,o=t.hi||i.hoverinfo;if(o){var h=o.split("+");h.indexOf("all")!==-1&&(h=["color"]),h.indexOf("color")!==-1&&(f=!0)}var p,s=b.colormodel[i.colormodel],x=s.colormodel||i.colormodel,c=x.length,T=i._scaler(l),_=s.suffix,w=[];(i.hovertemplate||f)&&(w.push("["+[T[0]+_[0],T[1]+_[1],T[2]+_[2]].join(", ")),c===4&&w.push(", "+T[3]+_[3]),w.push("]"),w=w.join(""),y.extraText=x.toUpperCase()+": "+w),Array.isArray(i.hovertext)&&Array.isArray(i.hovertext[u])?p=i.hovertext[u][a]:Array.isArray(i.text)&&Array.isArray(i.text[u])&&(p=i.text[u][a]);var k=d.c2p(t.y0+(u+.5)*i.dy),L=t.x0+(a+.5)*i.dx,A=t.y0+(u+.5)*i.dy,I="["+l.slice(0,i.colormodel.length).join(", ")+"]";return[g.extendFlat(y,{index:[u,a],x0:r.c2p(t.x0+a*i.dx),x1:r.c2p(t.x0+(a+1)*i.dx),y0:k,y1:k,color:T,xVal:L,xLabelVal:L,yVal:A,yLabelVal:A,zLabelVal:I,text:p,hovertemplateLabels:{zLabel:I,colorLabel:w,"color[0]Label":T[0]+_[0],"color[1]Label":T[1]+_[1],"color[2]Label":T[2]+_[2],"color[3]Label":T[3]+_[3]}})]}}}},{"../../components/fx":406,"../../lib":503,"./constants":847}],852:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc"),plot:v("./plot"),style:v("./style"),hoverPoints:v("./hover"),eventData:v("./event_data"),moduleType:"trace",name:"image",basePlotModule:v("../../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(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=g.strTranslate,y=v("../../constants/xmlns_namespaces"),e=v("./constants"),n=g.isIOS()||g.isSafari()||g.isIE();$.exports=function(t,i,r,d){var l=i.xaxis,a=i.yaxis,u=!(n||t._context._exportedPlot);g.makeTraceGroups(d,r,"im").each(function(f){var o=m.select(this),h=f[0],p=h.trace,s=(p.zsmooth==="fast"||p.zsmooth===!1&&u)&&!p._hasZ&&p._hasSource&&l.type==="linear"&&a.type==="linear";p._realImage=s;var x,c,T,_,w,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=l.c2p(A+k*E),k++;for(k=P;c===void 0&&k>0;)c=l.c2p(A+k*E),k--;for(k=0;_===void 0&&k<S;)_=a.c2p(I+k*D),k++;for(k=S;w===void 0&&k>0;)w=a.c2p(I+k*D),k--;c<x&&(T=c,c=x,x=T),w<_&&(T=_,_=w,w=T),!s&&(x=Math.max(-.5*l._length,x),c=Math.min(1.5*l._length,c),_=Math.max(-.5*a._length,_),w=Math.min(1.5*a._length,w));var F=Math.round(c-x),H=Math.round(w-_);if(F<=0||H<=0)o.selectAll("image").data([]).exit().remove();else{var V=o.selectAll("image").data([f]);V.enter().append("svg:image").attr({xmlns:y.svg,preserveAspectRatio:"none"}
1221),V.exit().remove();var Z=p.zsmooth===!1?e.pixelatedStyle:"";if(s){var K=g.simpleMap(l.range,l.r2l),G=g.simpleMap(a.range,a.r2l),W=K[1]<K[0],Q=G[1]>G[0];if(W||Q){var R=x+F/2,N=_+H/2;Z+="transform:"+b(R+"px",N+"px")+"scale("+(W?-1:1)+","+(Q?-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=ee(function(J,re){return L[re][J]}).toDataURL("image/png");else if(p._hasSource)if(s)j=p.source;else{var X=p._canvas.el.getContext("2d").getImageData(0,0,P,S).data;j=ee(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 ee(j){var X=document.createElement("canvas");X.width=F,X.height=H;var J,re=X.getContext("2d"),ne=function(fe){return g.constrain(Math.round(l.c2p(A+fe*E)-x),0,F)},se=function(fe){return g.constrain(Math.round(a.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 _e=0;_e<h.h;_e++){var we=se(_e),Ee=se(_e+1);Ee===we||isNaN(Ee)||isNaN(we)||!j(k,_e)||(J=p._scaler(j(k,_e)),re.fillStyle=J?pe+"("+ce(J).join(",")+")":"rgba(0,0,0,0)",re.fillRect(de,we,xe-de,Ee-we))}}return X}})}},{"../../constants/xmlns_namespaces":480,"../../lib":503,"./constants":847,"@plotly/d3":58}],854:[function(v,$,te){var m=v("@plotly/d3");$.exports=function(g){m.select(g).selectAll(".im image").style("opacity",function(b){return b[0].trace.opacity})}},{"@plotly/d3":58}],855:[function(v,$,te){var m=v("../../lib/extend").extendFlat,g=v("../../lib/extend").extendDeep,b=v("../../plot_api/edit_types").overrideAll,y=v("../../plots/font_attributes"),e=v("../../components/color/attributes"),n=v("../../plots/domain").attributes,t=v("../../plots/cartesian/layout_attributes"),i=v("../../plot_api/plot_template").templatedArray,r=v("../../constants/delta.js"),d=v("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,l=y({editType:"plot",colorEditType:"plot"}),a={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=i("step",g({},a,{range:u}));$.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:m({},l,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:d("value")},font:m({},l,{}),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:m({},l,{}),editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:g({},a,{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:m({},t.visible,{dflt:!0}),tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:m({},t.ticks,{dflt:"outside"}
1221),ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,ticklabelstep:t.ticklabelstep,showticklabels:t.showticklabels,tickfont:y({}),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:m({},a.line.color,{}),width:m({},a.line.width,{dflt:1}),editType:"plot"},thickness:m({},a.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(v,$,te){var m=v("../../plots/plots");te.name="indicator",te.plot=function(g,b,y,e){m.plotBasePlot(te.name,g,b,y,e)},te.clean=function(g,b,y,e){m.cleanBasePlot(te.name,g,b,y,e)}},{"../../plots/plots":619}],857:[function(v,$,te){$.exports={calc:function(m,g){var b=[],y=g.value;typeof g._lastValue!="number"&&(g._lastValue=g.value);var e=g._lastValue,n=e;return g._hasDelta&&typeof g.delta.reference=="number"&&(n=g.delta.reference),b[0]={y,lastY:e,delta:y-n,relativeDelta:(y-n)/n},b}}},{}],858:[function(v,$,te){$.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},{}],859:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("../../plots/domain").defaults,y=v("../../plot_api/plot_template"),e=v("../../plots/array_container_defaults"),n=v("./constants.js"),t=v("../../plots/cartesian/tick_value_defaults"),i=v("../../plots/cartesian/tick_mark_defaults"),r=v("../../plots/cartesian/tick_label_defaults"),d=v("../../plots/cartesian/prefix_suffix_defaults");function l(a,u){function f(o,h){return m.coerce(a,u,g.gauge.steps,o,h)}f("color"),f("line.color"),f("line.width"),f("range"),f("thickness")}$.exports={supplyDefaults:function(a,u,f,o){function h(P,S){return m.coerce(a,u,g,P,S)}b(u,o,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 s,x,c,T,_,w,k=new Array(2);function L(P,S){return m.coerce(c,T,g.gauge,P,S)}function A(P,S){return m.coerce(_,w,g.gauge.axis,P,S)}if(u._hasNumber&&(h("number.valueformat"),h("number.font.color",o.font.color),h("number.font.family",o.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"),s=u.number.font.size),u._hasDelta&&(h("delta.font.color",o.font.color),h("delta.font.family",o.font.family),h("delta.font.size"),u.delta.font.size===void 0&&(u.delta.font.size=(u._hasNumber?.5:1)*(s||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",o.font.color),h("title.font.family",o.font.family),h("title.font.size",.25*(s||x||n.defaultNumberFontSize)),h("title.text"),u._hasGauge){(c=a.gauge)||(c={}),T=y.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",o.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(c,T,{name:"steps",handleItemDefaults:l}),L("threshold.value"),L("threshold.thickness"),L("threshold.line.width"),L("threshold.line.color"),_={},c&&(_=c.axis||{}),w=y.newContainer(T,"axis"),A("visible"),u._range=A("range",u._range);var I={outerTicks:!0};t(_,w,A,"linear"),d(_,w,A,"linear",I),r(_,w,A,"linear",I),i(_,w,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(v,$,te){$.exports={moduleType:"trace",name:"indicator",basePlotModule:v("./base_plot"),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:v("./attributes"),supplyDefaults:v("./defaults").supplyDefaults,calc:v("./calc").calc,plot:v("./plot"),meta:{}}},{"./attributes":855,"./base_plot":856,"./calc":857,"./defaults":859,"./plot":861}],861:[function(v,$,te){var m=v("@plotly/d3"),g=v("d3-interpolate").interpolate,b=v("d3-interpolate").interpolateNumber,y=v("../../lib"),e=y.strScale,n=y.strTranslate,t=y.rad2deg,i=v("../../constants/alignment").MID_SHIFT,r=v("../../components/drawing"),d=v("./constants"),l=v("../../lib/svg_text_utils"),a=v("../../plots/cartesian/axes"),u=v("../../plots/cartesian/axis_defaults"),f=v("../../plots/cartesian/position_defaults"),o=v("../../plots/cartesian/layout_attributes"),h=v("../../components/color"),p={left:"start",center:"middle",right:"end"},s={left:0,center:.5,right:1},x=/[yzafpn\xb5mkMGTPEZY]/;function c(A){return A&&A.duration>0}function T(A){A.each(function(I){h.stroke(m.select(this),I.line.color)}).each(function(I){h.fill(m.select(this),I.color)}).style("stroke-width",function(I){return I.line.width})}function _(A,I,P){var S=A._fullLayout,E=y.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 y.coerce(E,D,o,V,Z)}return u(E,D,H,F,S),f(E,D,H,F),D}
1221function w(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=m.select(E);return D.text(A).attr("x",0).attr("y",0).attr("text-anchor",P).attr("data-unformatted",A).call(l.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=y.aggNums(D,null,[A[F].value,S],2);return A[F].value=H,H}$.exports=function(A,I,P,S){var E,D=A._fullLayout;c(P)&&S&&(E=S()),y.makeTraceGroups(D._indicatorlayer,I,"trace").each(function(F){var H,V,Z,K,G,W=F[0].trace,Q=m.select(this),R=W._hasGauge,N=W._isAngular,U=W._isBullet,ee=W.domain,j={w:D._size.w*(ee.x[1]-ee.x[0]),h:D._size.h*(ee.y[1]-ee.y[0]),l:D._size.l+D._size.w*ee.x[0],r:D._size.r+D._size.w*(1-ee.x[1]),t:D._size.t+D._size.h*(1-ee.y[1]),b:D._size.b+D._size.h*ee.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,ge){var ke=Math.sqrt(fe.width/2*(fe.width/2)+fe.height*fe.height);return[ge/ke,fe,ge]}(Ee,.9*ne)}),U){var oe=d.bulletPadding,pe=1-d.bulletNumberDomainSize+oe;H=j.l+(pe+(1-pe)*s[se])*j.w,Z=function(Ee){return w(Ee,(d.bulletNumberDomainSize-oe)*j.w,j.h)}}}else H=j.l+s[se]*j.w,Z=function(Ee){return w(Ee,j.w,j.h)};(function(Ee,fe,ge,ke){var be,Se,Oe,De=ge[0].trace,je=ke.numbersX,Je=ke.numbersY,ze=De.align||"center",Ue=p[ze],Ge=ke.transitionOpts,Ye=ke.onComplete,et=y.ensureSingle(fe,"g","numbers"),ct=[];De._hasNumber&&ct.push("number"),De._hasDelta&&(ct.push("delta"),De.delta.position==="left"&&ct.reverse());var mt=et.selectAll("text").data(ct);function Ct(qe,wt,ft,Ce){if(!qe.match("s")||ft>=0==Ce>=0||wt(ft).slice(-1).match(x)||wt(Ce).slice(-1).match(x))return wt;var Ie=qe.slice().replace("s","f").replace(/\d+/,function(Pe){return parseInt(Pe)-1}),Te=_(Ee,{tickformat:Ie});return function(Pe){return Math.abs(Pe)<1?a.tickText(Te,Pe).text:wt(Pe)}}mt.enter().append("text"),mt.attr("text-anchor",function(){return Ue}).attr("class",function(qe){return qe}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),mt.exit().remove();var Tt,nt=De.mode+De.align;if(De._hasDelta&&(Tt=function(){var qe=_(Ee,{tickformat:De.delta.valueformat},De._range);qe.setScale(),a.prepTicks(qe);var wt=function(Ve){return a.tickText(qe,Ve).text},ft=function(Ve){return De.delta.relative?Ve.relativeDelta:Ve.delta},Ce=function(Ve,tt){return Ve===0||typeof Ve!="number"||isNaN(Ve)?"-":(Ve>0?De.delta.increasing.symbol:De.delta.decreasing.symbol)+tt(Ve)},Ie=function(Ve){return Ve.delta>=0?De.delta.increasing.color:De.delta.decreasing.color};De._deltaLastValue===void 0&&(De._deltaLastValue=ft(ge[0]));var Te=et.select("text.delta");function Pe(){Te.text(Ce(ft(ge[0]),wt)).call(h.fill,Ie(ge[0])).call(l.convertToTspans,Ee)}return Te.call(r.font,De.delta.font).call(h.fill,Ie({delta:De._deltaLastValue})),c(Ge)?Te.transition().duration(Ge.duration).ease(Ge.easing).tween("text",function(){var Ve=m.select(this),tt=ft(ge[0]),ot=De._deltaLastValue,at=Ct(De.delta.valueformat,wt,ot,tt),_t=b(ot,tt);return De._deltaLastValue=tt,function(bt){Ve.text(Ce(_t(bt),at)),Ve.call(h.fill,Ie({delta:_t(bt)}))}}).each("end",function(){Pe(),Ye&&Ye()}).each("interrupt",function(){Pe(),Ye&&Ye()}):Pe(),Se=k(Ce(ft(ge[0]),wt),De.delta.font,Ue,Ee),Te}(),nt+=De.delta.position+De.delta.font.size+De.delta.font.family+De.delta.valueformat,nt+=De.delta.increasing.symbol+De.delta.decreasing.symbol,Oe=Se),De._hasNumber&&(function(){var qe=_(Ee,{tickformat:De.number.valueformat},De._range);qe.setScale(),a.prepTicks(qe);var wt=function(Pe){return a.tickText(qe,Pe).text},ft=De.number.suffix,Ce=De.number.prefix,Ie=et.select("text.number");function Te(){var Pe=typeof ge[0].y=="number"?Ce+wt(ge[0].y)+ft:"-";Ie.text(Pe).call(r.font,De.number.font).call(l.convertToTspans,Ee)}c(Ge)?Ie.transition().duration(Ge.duration).ease(Ge.easing).each("end",function(){Te(),Ye&&Ye()}).each("interrupt",function(){Te(),Ye&&Ye()}).attrTween("text",function(){var Pe=m.select(this),Ve=b(ge[0].lastY,ge[0].y);De._lastValue=ge[0].y;var tt=Ct(De.number.valueformat,wt,ge[0].lastY,ge[0].y);return function(ot){Pe.text(Ce+tt(Ve(ot))+ft)}}):Te(),be=k(Ce+wt(ge[0].y)+ft,De.number.font,Ue,Ee)}(),nt+=De.number.font.size+De.number.font.family+De.number.valueformat
1221+De.number.suffix+De.number.prefix,Oe=be),De._hasDelta&&De._hasNumber){var Qe,Et,Gt=[(be.left+be.right)/2,(be.top+be.bottom)/2],Xt=[(Se.left+Se.right)/2,(Se.top+Se.bottom)/2],Fe=.75*De.delta.font.size;De.delta.position==="left"&&(Qe=L(De,"deltaPos",0,-1*(be.width*s[De.align]+Se.width*(1-s[De.align])+Fe),nt,Math.min),Et=Gt[1]-Xt[1],Oe={width:be.width+Se.width+Fe,height:Math.max(be.height,Se.height),left:Se.left+Qe,right:be.right,top:Math.min(be.top,Se.top+Et),bottom:Math.max(be.bottom,Se.bottom+Et)}),De.delta.position==="right"&&(Qe=L(De,"deltaPos",0,be.width*(1-s[De.align])+Se.width*s[De.align]+Fe,nt,Math.max),Et=Gt[1]-Xt[1],Oe={width:be.width+Se.width+Fe,height:Math.max(be.height,Se.height),left:be.left,right:Se.right+Qe,top:Math.min(be.top,Se.top+Et),bottom:Math.max(be.bottom,Se.bottom+Et)}),De.delta.position==="bottom"&&(Qe=null,Et=Se.height,Oe={width:Math.max(be.width,Se.width),height:be.height+Se.height,left:Math.min(be.left,Se.left),right:Math.max(be.right,Se.right),top:be.bottom-be.height,bottom:be.bottom+Se.height}),De.delta.position==="top"&&(Qe=null,Et=be.top,Oe={width:Math.max(be.width,Se.width),height:be.height+Se.height,left:Math.min(be.left,Se.left),right:Math.max(be.right,Se.right),top:be.bottom-be.height-Se.height,bottom:be.bottom}),Tt.attr({dx:Qe,dy:Et})}(De._hasNumber||De._hasDelta)&&et.attr("transform",function(){var qe=ke.numbersScaler(Oe);nt+=qe[2];var wt,ft=L(De,"numbersScale",1,qe[0],nt,Math.min);De._scaleNumbers||(ft=1),wt=De._isAngular?Je-ft*Oe.bottom:Je-ft*(Oe.top+Oe.bottom)/2,De._numbersTop=ft*Oe.top+wt;var Ce=Oe[ze];ze==="center"&&(Ce=(Oe.left+Oe.right)/2);var Ie=je-ft*Ce;return Ie=L(De,"numbersTranslate",0,Ie,nt,Math.max),n(Ie,wt)+e(ft)})})(A,Q,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},G={range:W.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:W.gauge.bordercolor,width:W.gauge.borderwidth},thickness:1});var ce=Q.selectAll("g.angular").data(N?F:[]);ce.exit().remove();var de=Q.selectAll("g.angularaxis").data(N?F:[]);de.exit().remove(),N&&function(Ee,fe,ge,ke){var be,Se,Oe,De,je=ge[0].trace,Je=ke.size,ze=ke.radius,Ue=ke.innerRadius,Ge=ke.gaugeBg,Ye=ke.gaugeOutline,et=[Je.l+Je.w/2,Je.t+Je.h/2+ze/2],ct=ke.gauge,mt=ke.layer,Ct=ke.transitionOpts,Tt=ke.onComplete,nt=Math.PI/2;function Qe(Nt){var $e=je.gauge.axis.range[0],yt=(Nt-$e)/(je.gauge.axis.range[1]-$e)*Math.PI-nt;return yt<-nt?-nt:yt>nt?nt:yt}function Et(Nt){return m.svg.arc().innerRadius((Ue+ze)/2-Nt/2*(ze-Ue)).outerRadius((Ue+ze)/2+Nt/2*(ze-Ue)).startAngle(-nt)}function Gt(Nt){Nt.attr("d",function($e){return Et($e.thickness).startAngle(Qe($e.range[0])).endAngle(Qe($e.range[1]))()})}ct.enter().append("g").classed("angular",!0),ct.attr("transform",n(et[0],et[1])),mt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),mt.selectAll("g.xangularaxistick,path,text").remove(),(be=_(Ee,je.gauge.axis)).type="linear",be.range=je.gauge.axis.range,be._id="xangularaxis",be.ticklabeloverflow="allow",be.setScale();var Xt=function(Nt){return(be.range[0]-Nt.x)/(be.range[1]-be.range[0])*Math.PI+Math.PI},Fe={},qe=a.makeLabelFns(be,0).labelStandoff;Fe.xFn=function(Nt){var $e=Xt(Nt);return Math.cos($e)*qe},Fe.yFn=function(Nt){var $e=Xt(Nt),yt=Math.sin($e)>0?.2:1;return-Math.sin($e)*(qe+Nt.fontSize*yt)+Math.abs(Math.cos($e))*(Nt.fontSize*i)},Fe.anchorFn=function(Nt){var $e=Xt(Nt),yt=Math.cos($e);return Math.abs(yt)<.1?"middle":yt>0?"start":"end"},Fe.heightFn=function(Nt,$e,yt){var Ot=Xt(Nt);return-.5*(1+Math.sin(Ot))*yt};var wt=function(Nt){return n(et[0]+ze*Math.cos(Nt),et[1]-ze*Math.sin(Nt))};if(Oe=function(Nt){return wt(Xt(Nt))},Se=a.calcTicks(be),De=a.getTickSigns(be)[2],be.visible){De=be.ticks==="inside"?-1:1;var ft=(be.linewidth||1)/2;a.drawTicks(Ee,be,{vals:Se,layer:mt,path:"M"+De*ft+",0h"+De*be.ticklen,transFn:function(Nt){var $e=Xt(Nt);return wt($e)+"rotate("+-t($e)+")"}}),a.drawLabels(Ee,be,{vals:Se,layer:mt,transFn:Oe,labelFns:Fe})}var Ce=[Ge].concat(je.gauge.steps),Ie=ct.selectAll("g.bg-arc").data(Ce);Ie.enter().append("g").classed("bg-arc",!0).append("path"),Ie.select("path").call(Gt).call(T),Ie.exit().remove();var Te=Et(je.gauge.bar.thickness),Pe=ct.selectAll("g.value-arc").data([je.gauge.bar]);Pe.enter().append("g").classed("value-arc",!0).append("path");var Ve=Pe.select("path");c(Ct)?(Ve.transition().duration(Ct.duration).ease(Ct.easing).each("end",function(){Tt&&Tt()}).each("interrupt",function(){Tt&&Tt()}).attrTween("d",(tt=Te,ot=Qe(ge[0].lastY),at=Qe(ge[0].y),function(){var Nt=g(ot,at);return function($e){return tt.endAngle(Nt($e))()}})),je._lastValue=ge[0].y):Ve.attr("d",typeof ge[0].y=="number"?Te.endAngle(Qe(ge[0].y)):"M0,0Z");var tt,ot,at;Ve.call(T),Pe.exit().remove(),Ce=[];var _t=je.gauge.threshold.value;(_t||_t===0)&&Ce.push({range:[_t,_t],color:je.gauge.threshold.color,line:{color:je.gauge.threshold.line.color,width:je.gauge.threshold.line.width},thickness:je.gauge.threshold.thickness});var bt=ct.selectAll("g.threshold-arc").data(Ce);bt.enter().append("g").classed("threshold-arc",!0).append("path"),bt.select("path").call(Gt).call(T),bt.exit().remove();var jt=ct.selectAll("g.gauge-outline").data([Ye]);jt.enter().append("g").classed("gauge-outline",!0).append("path"),jt.
1221select("path").call(Gt).call(T),jt.exit().remove()}(A,0,F,{radius:re,innerRadius:ne,gauge:ce,layer:de,size:j,gaugeBg:K,gaugeOutline:G,transitionOpts:P,onComplete:E});var xe=Q.selectAll("g.bullet").data(U?F:[]);xe.exit().remove();var _e=Q.selectAll("g.bulletaxis").data(U?F:[]);_e.exit().remove(),U&&function(Ee,fe,ge,ke){var be,Se,Oe,De,je,Je=ge[0].trace,ze=ke.gauge,Ue=ke.layer,Ge=ke.gaugeBg,Ye=ke.gaugeOutline,et=ke.size,ct=Je.domain,mt=ke.transitionOpts,Ct=ke.onComplete;ze.enter().append("g").classed("bullet",!0),ze.attr("transform",n(et.l,et.t)),Ue.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),Ue.selectAll("g.xbulletaxistick,path,text").remove();var Tt=et.h,nt=Je.gauge.bar.thickness*Tt,Qe=ct.x[0],Et=ct.x[0]+(ct.x[1]-ct.x[0])*(Je._hasNumber||Je._hasDelta?1-d.bulletNumberDomainSize:1);(be=_(Ee,Je.gauge.axis))._id="xbulletaxis",be.domain=[Qe,Et],be.setScale(),Se=a.calcTicks(be),Oe=a.makeTransTickFn(be),De=a.getTickSigns(be)[2],je=et.t+et.h,be.visible&&(a.drawTicks(Ee,be,{vals:be.ticks==="inside"?a.clipEnds(be,Se):Se,layer:Ue,path:a.makeTickPath(be,je,De),transFn:Oe}),a.drawLabels(Ee,be,{vals:Se,layer:Ue,transFn:Oe,labelFns:a.makeLabelFns(be,je)}));function Gt(Ie){Ie.attr("width",function(Te){return Math.max(0,be.c2p(Te.range[1])-be.c2p(Te.range[0]))}).attr("x",function(Te){return be.c2p(Te.range[0])}).attr("y",function(Te){return .5*(1-Te.thickness)*Tt}).attr("height",function(Te){return Te.thickness*Tt})}var Xt=[Ge].concat(Je.gauge.steps),Fe=ze.selectAll("g.bg-bullet").data(Xt);Fe.enter().append("g").classed("bg-bullet",!0).append("rect"),Fe.select("rect").call(Gt).call(T),Fe.exit().remove();var qe=ze.selectAll("g.value-bullet").data([Je.gauge.bar]);qe.enter().append("g").classed("value-bullet",!0).append("rect"),qe.select("rect").attr("height",nt).attr("y",(Tt-nt)/2).call(T),c(mt)?qe.select("rect").transition().duration(mt.duration).ease(mt.easing).each("end",function(){Ct&&Ct()}).each("interrupt",function(){Ct&&Ct()}).attr("width",Math.max(0,be.c2p(Math.min(Je.gauge.axis.range[1],ge[0].y)))):qe.select("rect").attr("width",typeof ge[0].y=="number"?Math.max(0,be.c2p(Math.min(Je.gauge.axis.range[1],ge[0].y))):0),qe.exit().remove();var wt=ge.filter(function(){return Je.gauge.threshold.value||Je.gauge.threshold.value===0}),ft=ze.selectAll("g.threshold-bullet").data(wt);ft.enter().append("g").classed("threshold-bullet",!0).append("line"),ft.select("line").attr("x1",be.c2p(Je.gauge.threshold.value)).attr("x2",be.c2p(Je.gauge.threshold.value)).attr("y1",(1-Je.gauge.threshold.thickness)/2*Tt).attr("y2",(1-(1-Je.gauge.threshold.thickness)/2)*Tt).call(h.stroke,Je.gauge.threshold.line.color).style("stroke-width",Je.gauge.threshold.line.width),ft.exit().remove();var Ce=ze.selectAll("g.gauge-outline").data([Ye]);Ce.enter().append("g").classed("gauge-outline",!0).append("rect"),Ce.select("rect").call(Gt).call(T),Ce.exit().remove()}(A,0,F,{gauge:xe,layer:_e,size:j,gaugeBg:K,gaugeOutline:G,transitionOpts:P,onComplete:E});var we=Q.selectAll("text.title").data(F);we.exit().remove(),we.enter().append("text").classed("title",!0),we.attr("text-anchor",function(){return U?p.right:p[W.title.align]}).text(W.title.text).call(r.font,W.title.font).call(l.convertToTspans,A),we.attr("transform",function(){var Ee,fe=j.l+j.w*s[W.title.align],ge=d.titlePadding,ke=r.bBox(we.node());return R?(N&&(W.gauge.axis.visible?Ee=r.bBox(de.node()).top-ge-ke.bottom:Ee=j.t+j.h/2-re/2-ke.bottom-ge),U&&(Ee=V-(ke.top+ke.bottom)/2,fe=j.l-d.bulletPadding*j.w)):Ee=W._numbersTop-ge-ke.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(v,$,te){var m=v("../../components/colorscale/attributes"),g=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../mesh3d/attributes"),e=v("../../plots/attributes"),n=v("../../lib/extend").extendFlat,t=v("../../plot_api/edit_types").overrideAll,i=$.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:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),valuehoverformat:g("value",1),showlegend:n({},e.showlegend,{dflt:!1})},m("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:y.opacity,lightposition:y.lightposition,lighting:y.lighting,flatshading:y.flatshading,contour:y.contour,hoverinfo:n({},e.hoverinfo)}),"calc","nested");i.flatshading.dflt=!0,i.lighting.facenormalsepsilon.dflt=0,i.x.editType=i.y.editType=i.z.editType=i.value.editType="calc+clearAxisTypes",i.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(v,$,te){var m=v("../../components/colorscale/calc"),g=v("../streamtube/calc").processGrid,b=v("../streamtube/calc").filter;$.exports=function(y,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=g(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,i=-1/0,r=0;r<e._len;r++){var d=e._value[r];t=Math.min(t,d),i=Math.max(i,d)}e._minValues=t,e._maxValues=i,e._vMin=e.isomin===void 0||e.isomin===null?t:e.isomin,e._vMax=e.isomax===void 0||e.isomin===null?i:e.isomax,m(y,e,{vals:[e._vMin,e._vMax],containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374,"../streamtube/calc":1045}],864:[function(v,$,te){var m=v("../../../stackgl_modules").gl_mesh3d,g=v("../../lib/gl_format_color").parseColorScale,b=v("../../lib/str2rgbarray"),y=v("../../components/colorscale").extractOpts,e=v("../../plots/gl3d/zip3"),n=function(l,a){for(var u=a.length-1;u>0;u--){var f=Math.min(a[u],a[u-1]),o=Math.max(a[u],a[u-1]);if(o>f&&f<l&&l<=o)return{id:u,distRatio:(o-l)/(o-f)}}return{id:0,distRatio:0}};function t(l,a,u){this.scene=l,this.uid=u,this.mesh=a,this.name="",this.data=null,this.showContour=!1}var i=t.prototype;i.handlePick=function(l){if(l.object===this.mesh){var a=l.data.index,u=this.data._meshX[a],f=this.data._meshY[a],o=this.data._meshZ[a],h=this.data._Ys.length,p=this.data._Zs.length,s=n(u,this.data._Xs).id,x=n(f,this.data._Ys).id,c=n(o,this.data._Zs).id,T=l.index=c+p*x+p*h*s;l.traceCoordinate=[this.data._meshX[T],this.data._meshY[T],this.data._meshZ[T],this.data._value[T]];var _=this.data.hovertext||this.data.text;return Array.isArray(_)&&_[T]!==void 0?l.textLabel=_[T]:_&&(l.textLabel=_),!0}},i.update=function(l){var a=this.scene,u=a.fullSceneLayout;function f(p,s,x,c){return s.map(function(T){return p.d2l(T,0,c)*x})}this.data=d(l);var o={positions:e(f(u.xaxis,l._meshX,a.dataScale[0],l.xcalendar),f(u.yaxis,l._meshY,a.dataScale[1],l.ycalendar),f(u.zaxis,l._meshZ,a.dataScale[2],l.zcalendar)),cells:e(l._meshI,l._meshJ,l._meshK),lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,contourEnable:l.contour.show,contourColor:b(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading},h=y(l);o.vertexIntensity=l._meshIntensity,o.vertexIntensityBounds=[h.min,h.max],o.colormap=g(l),this.mesh.update(o)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var r=["xyz","xzy","yxz","yzx","zxy","zyx"];function d(l){l._meshI=[],l._meshJ=[],l._meshK=[];var a,u,f,o,h,p,s,x=l.surface.show,c=l.spaceframe.show,T=l.surface.fill,_=l.spaceframe.fill,w=!1,k=!1,L=0,A=l._Xs,I=l._Ys,P=l._Zs,S=A.length,E=I.length,D=P.length,F=r.indexOf(l._gridFill.replace(/-/g,"").replace(/\+/g,"")),H=function(ze,Ue,Ge){switch(F){case 5:return Ge+D*Ue+D*E*ze;case 4:return Ge+D*ze+D*S*Ue;case 3:return Ue+E*Ge+E*D*ze;case 2:return Ue+E*ze+E*S*Ge;case 1:return ze+S*Ge+S*D*Ue;default:return ze+S*Ue+S*E*Ge}},V=l._minValues,Z=l._maxValues,K=l._vMin,G=l._vMax;function W(ze,Ue,Ge){for(var Ye=p.length,et=u;et<Ye;et++)if(ze===f[et]&&Ue===o[et]&&Ge===h[et])return et;return-1}function Q(){u=a}function R(){f=[],o=[],h=[],p=[],a=0,Q()}function N(ze,Ue,Ge,Ye){return f.push(ze),o.push(Ue),h.push(Ge),p.push(Ye),++a-1}function U(ze,Ue,Ge){for(var Ye=[],et=0;et<ze.length;et++)Ye[et]=ze[et]*(1-Ge)+Ge*Ue[et];return Ye}function ee(ze){s=ze}function j(ze,Ue){return ze==="all"||ze===null||ze.indexOf(Ue)>-1}function X(ze,Ue){return ze===null?Ue:ze}function J(ze,Ue,Ge){Q();var Ye,et,ct,mt=[Ue],Ct=[Ge];if(s>=1)mt=[Ue],Ct=[Ge];else if(s>0){var Tt=function(ft,Ce){var Ie=ft[0],Te=ft[1],Pe=ft[2],Ve=function($e,yt,Ot){for(var Mt=[],Pt=0;Pt<$e.length;Pt++)Mt[Pt]=($e[Pt]+yt[Pt]+Ot[Pt])/3;return Mt}(Ie,Te,Pe),tt=Math.sqrt(1-s),ot=U(Ve,Ie,tt),at=U(Ve,Te,tt),_t=U(Ve,Pe,tt),bt=Ce[0],jt=Ce[1],Nt=Ce[2];return{xyzv:[[Ie,Te,at],[at,ot,Ie],[Te,Pe,_t],[_t,at,Te],[Pe,Ie,ot],[ot,_t,Pe]],abc:[[bt,jt,-1],[-1,-1,bt],[jt,Nt,-1],[-1,-1,jt],[Nt,bt,-1],[-1,-1,Nt]]}}(Ue,Ge);mt=Tt.xyzv,Ct=Tt.abc}for(var nt=0;nt<mt.length;nt++){Ue=mt[nt],Ge=Ct[nt];for(var Qe=[],Et=0;Et<3;Et++){var Gt=Ue[Et][0],Xt=Ue[Et][1],Fe=Ue[Et][2],qe=Ue[Et][3],wt=Ge[Et]>-1?Ge[Et]:W(Gt,Xt,Fe);Qe[Et]=wt>-1?wt:N(Gt,Xt,Fe,X(ze,qe))}Ye=Qe[0],et=Qe[1],ct=Qe[2],l._meshI.push(Ye),l._meshJ.push(et),l._meshK.push(ct),++L}}function re(ze,Ue,Ge,Ye){var et=ze[3];et<Ge&&(et=Ge),et>Ye&&(et=Ye);for(var ct=(ze[3]-et)/(ze[3]-Ue[3]+1e-9),mt=[],Ct=0;Ct<4;Ct++)mt[Ct]=(1-ct)*ze[Ct]+ct*Ue[Ct];return mt}function ne(ze,Ue,Ge){return ze>=Ue&&ze<=Ge}function se(ze){var Ue=.001*(G-K);return ze>=K-Ue&&ze<=G+Ue}function oe(ze){for(var Ue=[],Ge=0;Ge<4;Ge++){var Ye=ze[Ge];Ue.push([l._x[Ye],l._y[Ye],l._z[Ye],l._value[Ye]])}return Ue}function pe(ze,Ue,Ge,Ye,et,ct){ct||(ct=1),Ge=[-1,-1,-1];var mt=!1,Ct=[ne(Ue[0][3],Ye,et),ne(Ue[1][3],Ye,et),ne(Ue[2][3],Ye,et)];if(!Ct[0]&&!Ct[1]&&!Ct[2])return!1;var Tt=function(Qe,Et,Gt){return se(Et[0][3])&&se(Et[1][3])&&se(Et[2][3])?(J(Qe,Et,Gt),!0):ct<3&&pe(Qe,Et,Gt,K,G,++ct)};if(Ct[0]&&Ct[1]&&Ct[2])return Tt(ze,Ue,Ge)||mt;var nt=!1;
vendor: 5,088 bytes, line 1221
1221return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(Qe){if(Ct[Qe[0]]&&Ct[Qe[1]]&&!Ct[Qe[2]]){var Et=Ue[Qe[0]],Gt=Ue[Qe[1]],Xt=Ue[Qe[2]],Fe=re(Xt,Et,Ye,et),qe=re(Xt,Gt,Ye,et);mt=Tt(ze,[qe,Fe,Et],[-1,-1,Ge[Qe[0]]])||mt,mt=Tt(ze,[Et,Gt,qe],[Ge[Qe[0]],Ge[Qe[1]],-1])||mt,nt=!0}}),nt||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(Qe){if(Ct[Qe[0]]&&!Ct[Qe[1]]&&!Ct[Qe[2]]){var Et=Ue[Qe[0]],Gt=Ue[Qe[1]],Xt=Ue[Qe[2]],Fe=re(Gt,Et,Ye,et),qe=re(Xt,Et,Ye,et);mt=Tt(ze,[qe,Fe,Et],[-1,-1,Ge[Qe[0]]])||mt,nt=!0}}),mt}function ce(ze,Ue,Ge,Ye){var et=!1,ct=oe(Ue),mt=[ne(ct[0][3],Ge,Ye),ne(ct[1][3],Ge,Ye),ne(ct[2][3],Ge,Ye),ne(ct[3][3],Ge,Ye)];if(!(mt[0]||mt[1]||mt[2]||mt[3]))return et;if(mt[0]&&mt[1]&&mt[2]&&mt[3])return k&&(et=function(Tt,nt,Qe){var Et=function(Gt,Xt,Fe){J(Tt,[nt[Gt],nt[Xt],nt[Fe]],[Qe[Gt],Qe[Xt],Qe[Fe]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}(ze,ct,Ue)||et),et;var Ct=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Tt){if(mt[Tt[0]]&&mt[Tt[1]]&&mt[Tt[2]]&&!mt[Tt[3]]){var nt=ct[Tt[0]],Qe=ct[Tt[1]],Et=ct[Tt[2]],Gt=ct[Tt[3]];if(k)et=J(ze,[nt,Qe,Et],[Ue[Tt[0]],Ue[Tt[1]],Ue[Tt[2]]])||et;else{var Xt=re(Gt,nt,Ge,Ye),Fe=re(Gt,Qe,Ge,Ye),qe=re(Gt,Et,Ge,Ye);et=J(null,[Xt,Fe,qe],[-1,-1,-1])||et}Ct=!0}}),Ct||([[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(Tt){if(mt[Tt[0]]&&mt[Tt[1]]&&!mt[Tt[2]]&&!mt[Tt[3]]){var nt=ct[Tt[0]],Qe=ct[Tt[1]],Et=ct[Tt[2]],Gt=ct[Tt[3]],Xt=re(Et,nt,Ge,Ye),Fe=re(Et,Qe,Ge,Ye),qe=re(Gt,Qe,Ge,Ye),wt=re(Gt,nt,Ge,Ye);k?(et=J(ze,[nt,wt,Xt],[Ue[Tt[0]],-1,-1])||et,et=J(ze,[Qe,Fe,qe],[Ue[Tt[1]],-1,-1])||et):et=function(ft,Ce,Ie){var Te=function(Pe,Ve,tt){J(ft,[Ce[Pe],Ce[Ve],Ce[tt]],[Ie[Pe],Ie[Ve],Ie[tt]])};Te(0,1,2),Te(2,3,0)}(null,[Xt,Fe,qe,wt],[-1,-1,-1,-1])||et,Ct=!0}}),Ct||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Tt){if(mt[Tt[0]]&&!mt[Tt[1]]&&!mt[Tt[2]]&&!mt[Tt[3]]){var nt=ct[Tt[0]],Qe=ct[Tt[1]],Et=ct[Tt[2]],Gt=ct[Tt[3]],Xt=re(Qe,nt,Ge,Ye),Fe=re(Et,nt,Ge,Ye),qe=re(Gt,nt,Ge,Ye);k?(et=J(ze,[nt,Xt,Fe],[Ue[Tt[0]],-1,-1])||et,et=J(ze,[nt,Fe,qe],[Ue[Tt[0]],-1,-1])||et,et=J(ze,[nt,qe,Xt],[Ue[Tt[0]],-1,-1])||et):et=J(null,[Xt,Fe,qe],[-1,-1,-1])||et,Ct=!0}})),et}function de(ze,Ue,Ge,Ye,et,ct,mt,Ct,Tt,nt,Qe){var Et=!1;return w&&(j(ze,"A")&&(Et=ce(null,[Ue,Ge,Ye,ct],nt,Qe)||Et),j(ze,"B")&&(Et=ce(null,[Ge,Ye,et,Tt],nt,Qe)||Et),j(ze,"C")&&(Et=ce(null,[Ge,ct,mt,Tt],nt,Qe)||Et),j(ze,"D")&&(Et=ce(null,[Ye,ct,Ct,Tt],nt,Qe)||Et),j(ze,"E")&&(Et=ce(null,[Ge,Ye,ct,Tt],nt,Qe)||Et)),k&&(Et=ce(ze,[Ge,Ye,ct,Tt],nt,Qe)||Et),Et}function xe(ze,Ue,Ge,Ye,et,ct,mt,Ct){return[Ct[0]===!0||pe(ze,oe([Ue,Ge,Ye]),[Ue,Ge,Ye],ct,mt),Ct[1]===!0||pe(ze,oe([Ye,et,Ue]),[Ye,et,Ue],ct,mt)]}function _e(ze,Ue,Ge,Ye,et,ct,mt,Ct,Tt){return Ct?xe(ze,Ue,Ge,et,Ye,ct,mt,Tt):xe(ze,Ge,et,Ye,Ue,ct,mt,Tt)}function we(ze,Ue,Ge,Ye,et,ct,mt){var Ct,Tt,nt,Qe,Et=!1,Gt=function(){Et=pe(ze,[Ct,Tt,nt],[-1,-1,-1],et,ct)||Et,Et=pe(ze,[nt,Qe,Ct],[-1,-1,-1],et,ct)||Et},Xt=mt[0],Fe=mt[1],qe=mt[2];return Xt&&(Ct=U(oe([H(Ue,Ge-0,Ye-0)])[0],oe([H(Ue-1,Ge-0,Ye-0)])[0],Xt),Tt=U(oe([H(Ue,Ge-0,Ye-1)])[0],oe([H(Ue-1,Ge-0,Ye-1)])[0],Xt),nt=U(oe([H(Ue,Ge-1,Ye-1)])[0],oe([H(Ue-1,Ge-1,Ye-1)])[0],Xt),Qe=U(oe([H(Ue,Ge-1,Ye-0)])[0],oe([H(Ue-1,Ge-1,Ye-0)])[0],Xt),Gt()),Fe&&(Ct=U(oe([H(Ue-0,Ge,Ye-0)])[0],oe([H(Ue-0,Ge-1,Ye-0)])[0],Fe),Tt=U(oe([H(Ue-0,Ge,Ye-1)])[0],oe([H(Ue-0,Ge-1,Ye-1)])[0],Fe),nt=U(oe([H(Ue-1,Ge,Ye-1)])[0],oe([H(Ue-1,Ge-1,Ye-1)])[0],Fe),Qe=U(oe([H(Ue-1,Ge,Ye-0)])[0],oe([H(Ue-1,Ge-1,Ye-0)])[0],Fe),Gt()),qe&&(Ct=U(oe([H(Ue-0,Ge-0,Ye)])[0],oe([H(Ue-0,Ge-0,Ye-1)])[0],qe),Tt=U(oe([H(Ue-0,Ge-1,Ye)])[0],oe([H(Ue-0,Ge-1,Ye-1)])[0],qe),nt=U(oe([H(Ue-1,Ge-1,Ye)])[0],oe([H(Ue-1,Ge-1,Ye-1)])[0],qe),Qe=U(oe([H(Ue-1,Ge-0,Ye)])[0],oe([H(Ue-1,Ge-0,Ye-1)])[0],qe),Gt()),Et}function Ee(ze,Ue,Ge,Ye,et,ct,mt,Ct,Tt,nt,Qe,Et){var Gt=ze;return Et?(w&&ze==="even"&&(Gt=null),de(Gt,Ue,Ge,Ye,et,ct,mt,Ct,Tt,nt,Qe)):(w&&ze==="odd"&&(Gt=null),de(Gt,Tt,Ct,mt,ct,et,Ye,Ge,Ue,nt,Qe))}function fe(ze,Ue,Ge,Ye,et){for(var ct=[],mt=0,Ct=0;Ct<Ue.length;Ct++)for(var Tt=Ue[Ct],nt=1;nt<D;nt++)for(var Qe=1;Qe<E;Qe++)ct.push(_e(ze,H(Tt,Qe-1,nt-1),H(Tt,Qe-1,nt),H(Tt,Qe,nt-1),H(Tt,Qe,nt),Ge,Ye,(Tt+Qe+nt)%2,et&&et[mt]?et[mt]:[])),mt++;return ct}function ge(ze,Ue,Ge,Ye,et){for(var ct=[],mt=0,Ct=0;Ct<Ue.length;Ct++)for(var Tt=Ue[Ct],nt=1;nt<S;nt++)for(var Qe=1;Qe<D;Qe++)ct.push(_e(ze,H(nt-1,Tt,Qe-1),H(nt,Tt,Qe-1),H(nt-1,Tt,Qe),H(nt,Tt,Qe),Ge,Ye,(nt+Tt+Qe)%2,et&&et[mt]?et[mt]:[])),mt++;return ct}function ke(ze,Ue,Ge,Ye,et){for(var ct=[],mt=0,Ct=0;Ct<Ue.length;Ct++)for(var Tt=Ue[Ct],nt=1;nt<E;nt++)for(var Qe=1;Qe<S;Qe++)ct.push(_e(ze,H(Qe-1,nt-1,Tt),H(Qe-1,nt,Tt),H(Qe,nt-1,Tt),H(Qe,nt,Tt),Ge,Ye,(Qe+nt+Tt)%2,et&&et[mt]?et[mt]:[])),mt++;return ct}function be(ze,Ue,Ge){for(var Ye=1;Ye<D;Ye++)for(var et=1;et<E;et++)for(var ct=1;ct<S;ct++)Ee(ze,H(ct-1,et-1,Ye-1),H(ct-1,et-1,Ye),H(ct-1,et,Ye-1),H(ct-1,et,Ye),H(ct,et-1,Ye-1),H(ct,et-1,Ye),H(ct,et,Ye-1),H(ct,et,Ye),Ue,Ge,(ct+et+Ye)%2)}function Se(ze,Ue,Ge){w=!0,be(ze,Ue,Ge),w=!1}function Oe(ze,Ue,Ge,Ye,et,ct){for(var mt=[],Ct=0,Tt=0;Tt<Ue.length;Tt++)for(var nt=Ue[Tt],Qe=1;Qe<D;Qe++)for(var Et=1;Et<E;
1221Et++)mt.push(we(ze,nt,Et,Qe,Ge,Ye,et[Tt],ct&&ct[Ct]&&ct[Ct])),Ct++;return mt}function De(ze,Ue,Ge,Ye,et,ct){for(var mt=[],Ct=0,Tt=0;Tt<Ue.length;Tt++)for(var nt=Ue[Tt],Qe=1;Qe<S;Qe++)for(var Et=1;Et<D;Et++)mt.push(we(ze,Qe,nt,Et,Ge,Ye,et[Tt],ct&&ct[Ct]&&ct[Ct])),Ct++;return mt}function je(ze,Ue,Ge,Ye,et,ct){for(var mt=[],Ct=0,Tt=0;Tt<Ue.length;Tt++)for(var nt=Ue[Tt],Qe=1;Qe<E;Qe++)for(var Et=1;Et<S;Et++)mt.push(we(ze,Et,Qe,nt,Ge,Ye,et[Tt],ct&&ct[Ct]&&ct[Ct])),Ct++;return mt}function Je(ze,Ue){for(var Ge=[],Ye=ze;Ye<Ue;Ye++)Ge.push(Ye);return Ge}return function(){if(R(),function(){for(var Ct=0;Ct<S;Ct++)for(var Tt=0;Tt<E;Tt++)for(var nt=0;nt<D;nt++){var Qe=H(Ct,Tt,nt);N(l._x[Qe],l._y[Qe],l._z[Qe],l._value[Qe])}}(),c&&_&&(ee(_),k=!0,be(null,K,G),k=!1),x&&T){ee(T);for(var ze=l.surface.pattern,Ue=l.surface.count,Ge=0;Ge<Ue;Ge++){var Ye=Ue===1?.5:Ge/(Ue-1),et=(1-Ye)*K+Ye*G,ct=Math.abs(et-V)>Math.abs(et-Z)?[V,et]:[et,Z];Se(ze,ct[0],ct[1])}}var mt=[[Math.min(K,Z),Math.max(K,Z)],[Math.min(V,G),Math.max(V,G)]];["x","y","z"].forEach(function(Ct){for(var Tt=[],nt=0;nt<mt.length;nt++){var Qe=0,Et=mt[nt][0],Gt=mt[nt][1],Xt=l.slices[Ct];if(Xt.show&&Xt.fill){ee(Xt.fill);var Fe=[],qe=[],wt=[];if(Xt.locations.length)for(var ft=0;ft<Xt.locations.length;ft++){var Ce=n(Xt.locations[ft],Ct==="x"?A:Ct==="y"?I:P);Ce.distRatio===0?Fe.push(Ce.id):Ce.id>0&&(qe.push(Ce.id),Ct==="x"?wt.push([Ce.distRatio,0,0]):Ct==="y"?wt.push([0,Ce.distRatio,0]):wt.push([0,0,Ce.distRatio]))}else Fe=Je(1,Ct==="x"?S-1:Ct==="y"?E-1:D-1);qe.length>0&&(Tt[Qe]=Ct==="x"?Oe(null,qe,Et,Gt,wt,Tt[Qe]):Ct==="y"?De(null,qe,Et,Gt,wt,Tt[Qe]):je(null,qe,Et,Gt,wt,Tt[Qe]),Qe++),Fe.length>0&&(Tt[Qe]=Ct==="x"?fe(null,Fe,Et,Gt,Tt[Qe]):Ct==="y"?ge(null,Fe,Et,Gt,Tt[Qe]):ke(null,Fe,Et,Gt,Tt[Qe]),Qe++)}var Ie=l.caps[Ct];Ie.show&&Ie.fill&&(ee(Ie.fill),Tt[Qe]=Ct==="x"?fe(null,[0,S-1],Et,Gt,Tt[Qe]):Ct==="y"?ge(null,[0,E-1],Et,Gt,Tt[Qe]):ke(null,[0,D-1],Et,Gt,Tt[Qe]),Qe++)}}),L===0&&R(),l._meshX=f,l._meshY=o,l._meshZ=h,l._meshIntensity=p,l._Xs=A,l._Ys=I,l._Zs=P}(),l}$.exports={findNearestOnAxis:n,generateIsoMeshes:d,createIsosurfaceTrace:function(l,a){var u=l.glplot.gl,f=m({gl:u}),o=new t(l,f,a.uid);return f._trace=o,o.update(a),l.glplot.add(f),o}}},{"../../../stackgl_modules":1124,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609}],865:[function(v,$,te){var m=v("../../lib"),g=v("../../registry"),b=v("./attributes"),y=v("../../components/colorscale/defaults");function e(n,t,i,r,d){var l=d("isomin"),a=d("isomax");a!=null&&l!=null&&l>a&&(t.isomin=null,t.isomax=null);var u=d("x"),f=d("y"),o=d("z"),h=d("value");u&&u.length&&f&&f.length&&o&&o.length&&h&&h.length?(g.getComponentMethod("calendars","handleTraceDefaults")(n,t,["x","y","z"],r),d("valuehoverformat"),["x","y","z"].forEach(function(p){d(p+"hoverformat");var s="caps."+p;d(s+".show")&&d(s+".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)}),y(n,t,r,d,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}$.exports={supplyDefaults:function(n,t,i,r){e(n,t,i,r,function(d,l){return m.coerce(n,t,b,d,l)})},supplyIsoDefaults:e}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":862}],866:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults").supplyDefaults,calc:v("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:v("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:v("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":862,"./calc":863,"./convert":864,"./defaults":865}],867:[function(v,$,te){var m=v("../../components/colorscale/attributes"),g=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../surface/attributes"),e=v("../../plots/attributes"),n=v("../../lib/extend").extendFlat;$.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:g("x"),yhoverformat:g("y"),zhoverformat:g("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},m("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:y.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:n({},y.contours.x.show,{}),color:y.contours.x.color,width:y.contours.x.width,editType:"calc"},lightposition:{x:n({},y.lightposition.x,{dflt:1e5}),y:n({},y.lightposition.y,{dflt:1e5}),z:n({},y.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"},y.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":1061}],868:[function(v,$,te){var m=v("../../components/colorscale/calc");$.exports=function(g,b){b.intensity&&m(g,b,{vals:b.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],869:[function(v,$,te){var m=v("../../../stackgl_modules").gl_mesh3d,g=v("../../../stackgl_modules").delaunay_triangulate,b=v("../../../stackgl_modules").alpha_shape,y=v("../../../stackgl_modules").convex_hull,e=v("../../lib/gl_format_color").parseColorScale,n=v("../../lib/str2rgbarray"),t=v("../../components/colorscale").extractOpts,i=v("../../plots/gl3d/zip3");function r(o,h,p){this.scene=o,this.uid=p,this.mesh=h,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var d=r.prototype;function l(o){for(var h=[],p=o.length,s=0;s<p;s++)h[s]=n(o[s]);return h}function a(o,h,p,s){for(var x=[],c=h.length,T=0;T<c;T++)x[T]=o.d2l(h[T],0,s)*p;return x}function u(o){for(var h=[],p=o.length,s=0;s<p;s++)h[s]=Math.round(o[s]);return h}function f(o,h){for(var p=o.length,s=0;s<p;s++)if(o[s]<=-.5||o[s]>=h-.5)return!1;return!0}
1221d.handlePick=function(o){if(o.object===this.mesh){var h=o.index=o.data.index;o.data._cellCenter?o.traceCoordinate=o.data.dataCoordinate:o.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?o.textLabel=p[h]:p&&(o.textLabel=p),!0}},d.update=function(o){var h=this.scene,p=h.fullSceneLayout;this.data=o;var s,x=o.x.length,c=i(a(p.xaxis,o.x,h.dataScale[0],o.xcalendar),a(p.yaxis,o.y,h.dataScale[1],o.ycalendar),a(p.zaxis,o.z,h.dataScale[2],o.zcalendar));if(o.i&&o.j&&o.k){if(o.i.length!==o.j.length||o.j.length!==o.k.length||!f(o.i,x)||!f(o.j,x)||!f(o.k,x))return;s=i(u(o.i),u(o.j),u(o.k))}else s=o.alphahull===0?y(c):o.alphahull>0?b(o.alphahull,c):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 g(I)}(o.delaunayaxis,c);var T={positions:c,cells:s,lightPosition:[o.lightposition.x,o.lightposition.y,o.lightposition.z],ambient:o.lighting.ambient,diffuse:o.lighting.diffuse,specular:o.lighting.specular,roughness:o.lighting.roughness,fresnel:o.lighting.fresnel,vertexNormalsEpsilon:o.lighting.vertexnormalsepsilon,faceNormalsEpsilon:o.lighting.facenormalsepsilon,opacity:o.opacity,contourEnable:o.contour.show,contourColor:n(o.contour.color).slice(0,3),contourWidth:o.contour.width,useFacetNormals:o.flatshading};if(o.intensity){var _=t(o);this.color="#fff";var w=o.intensitymode;T[w+"Intensity"]=o.intensity,T[w+"IntensityBounds"]=[_.min,_.max],T.colormap=e(o)}else o.vertexcolor?(this.color=o.vertexcolor[0],T.vertexColors=l(o.vertexcolor)):o.facecolor?(this.color=o.facecolor[0],T.cellColors=l(o.facecolor)):(this.color=o.color,T.meshColor=n(o.color));this.mesh.update(T)},d.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},$.exports=function(o,h){var p=o.glplot.gl,s=m({gl:p}),x=new r(o,s,h.uid);return s._trace=x,x.update(h),o.glplot.add(s),x}},{"../../../stackgl_modules":1124,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609}],870:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("../../components/colorscale/defaults"),y=v("./attributes");$.exports=function(e,n,t,i){function r(l,a){return g.coerce(e,n,y,l,a)}function d(l){var a=l.map(function(u){var f=r(u);return f&&g.isArrayOrTypedArray(f)?f:null});return a.every(function(u){return u&&u.length===a[0].length})&&a}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)?(m.getComponentMethod("calendars","handleTraceDefaults")(e,n,["x","y","z"],i),["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(l){r(l)}),r("contour.show")&&(r("contour.color"),r("contour.width")),"intensity"in e?(r("intensity"),r("intensitymode"),b(e,n,i,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(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:v("./convert"),moduleType:"trace",name:"mesh3d",basePlotModule:v("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":867,"./calc":868,"./convert":869,"./defaults":870}],872:[function(v,$,te){var m=v("../../lib").extendFlat,g=v("../scatter/attributes"),b=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,y=v("../../components/drawing/attributes").dash,e=v("../../components/fx/attributes"),n=v("../../constants/delta.js"),t=n.INCREASING.COLOR,i=n.DECREASING.COLOR,r=g.line;function d(l){return{line:{color:m({},r.color,{dflt:l}),width:r.width,dash:y,editType:"style"},editType:"style"}}
1221$.exports={xperiod:g.xperiod,xperiod0:g.xperiod0,xperiodalignment:g.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:m({},r.width,{}),dash:m({},y,{}),editType:"style"},increasing:d(t),decreasing:d(i),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:m({},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":927}],873:[function(v,$,te){var m=v("../../lib"),g=m._,b=v("../../plots/cartesian/axes"),y=v("../../plots/cartesian/align_period"),e=v("../../constants/numerical").BADNUM;function n(i,r,d,l){return{o:i,h:r,l:d,c:l}}function t(i,r,d,l,a,u){for(var f=a.makeCalcdata(r,"open"),o=a.makeCalcdata(r,"high"),h=a.makeCalcdata(r,"low"),p=a.makeCalcdata(r,"close"),s=Array.isArray(r.text),x=Array.isArray(r.hovertext),c=!0,T=null,_=!!r.xperiodalignment,w=[],k=0;k<l.length;k++){var L=l[k],A=f[k],I=o[k],P=h[k],S=p[k];if(L!==e&&A!==e&&I!==e&&P!==e&&S!==e){S===A?T!==null&&S!==T&&(c=S>T):c=S>A,T=S;var E=u(A,I,P,S);E.pos=L,E.yc=(A+S)/2,E.i=k,E.dir=c?"increasing":"decreasing",E.x=E.pos,E.y=[P,I],_&&(E.orig_p=d[k]),s&&(E.tx=r.text[k]),x&&(E.htx=r.hovertext[k]),w.push(E)}else w.push({pos:L,empty:!0})}return r._extremes[a._id]=b.findExtremes(a,m.concat(h,o),{padded:!0}),w.length&&(w[0].t={labels:{open:g(i,"open:")+" ",high:g(i,"high:")+" ",low:g(i,"low:")+" ",close:g(i,"close:")+" "}}),w}$.exports={calc:function(i,r){var d=b.getFromId(i,r.xaxis),l=b.getFromId(i,r.yaxis),a=function(p,s,x){var c=x._minDiff;if(!c){var T,_=p._fullData,w=[];for(c=1/0,T=0;T<_.length;T++){var k=_[T];if(k.type==="ohlc"&&k.visible===!0&&k.xaxis===s._id){w.push(k);var L=s.makeCalcdata(k,"x");k._origX=L;var A=y(x,s,"x",L).vals;k._xcalc=A;var I=m.distinctVals(A).minDiff;I&&isFinite(I)&&(c=Math.min(c,I))}}for(c===1/0&&(c=1),T=0;T<w.length;T++)w[T]._minDiff=c}return c*x.tickwidth}(i,d,r),u=r._minDiff;r._minDiff=null;var f=r._origX;r._origX=null;var o=r._xcalc;r._xcalc=null;var h=t(i,r,f,o,l,n);return r._extremes[d._id]=b.findExtremes(d,o,{vpad:u/2}),h.length?(m.extendFlat(h[0].t,{wHover:u/2,tickLen:a}),h):[{t:{empty:!0}}]},calcCommon:t}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554}],874:[function(v,$,te){var m=v("../../lib"),g=v("./ohlc_defaults"),b=v("../scatter/period_defaults"),y=v("./attributes");function e(n,t,i,r){i(r+".line.color"),i(r+".line.width",t.line.width),i(r+".line.dash",t.line.dash)}$.exports=function(n,t,i,r){function d(l,a){return m.coerce(n,t,y,l,a)}g(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":947,"./attributes":872,"./ohlc_defaults":877}],875:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../lib"),b=v("../../components/fx"),y=v("../../components/color"),e=v("../../lib").fillText,n=v("../../constants/delta.js"),t={increasing:n.INCREASING.SYMBOL,decreasing:n.DECREASING.SYMBOL};function i(l,a,u,f){var o,h,p=l.cd,s=l.xa,x=p[0].trace,c=p[0].t,T=x.type,_=T==="ohlc"?"l":"min",w=T==="ohlc"?"h":"max",k=c.bPos||0,L=c.bdPos||c.tickLen,A=c.wHover,I=Math.min(1,L/Math.abs(s.r2c(s.range[1])-s.r2c(s.range[0])));function P(Z){var K=function(G){return G.pos+k-a}(Z);return b.inbox(K-A,K+A,o)}function S(Z){var K=Z[_],G=Z[w];return K===G||b.inbox(K-u,G-u,o)}function E(Z){return(P(Z)+S(Z))/2}o=l.maxHoverDistance-I,h=l.maxSpikeDistance-I;var D=b.getDistanceFunction(f,P,S,E);if(b.getClosest(p,D,l),l.index===!1)return null;var F=p[l.index];if(F.empty)return null;var H=x[F.dir],V=H.line.color;return y.opacity(V)&&H.line.width?l.color=V:l.color=H.fillcolor,l.x0=s.c2p(F.pos+k-L,!0),l.x1=s.c2p(F.pos+k+L,!0),l.xLabelVal=F.orig_p!==void 0?F.orig_p:F.pos,l.spikeDistance=E(F)*h/o,l.xSpike=s.c2p(F.pos,!0),l}function r(l,a,u,f){var o=l.cd,h=l.ya,p=o[0].trace,s=o[0].t,x=[],c=i(l,a,u,f);if(!c)return[];var T=o[c.index].hi||p.hoverinfo,_=T.split("+");if(!(T==="all"||_.indexOf("y")!==-1))return[];for(var w=["high","open","close","low"],k={},L=0;L<w.length;L++){var A,I=w[L],P=p[I][c.index],S=h.c2p(P,!0);P in k?(A=k[P]).yLabel+="<br>"+s.labels[I]+m.hoverLabelText(h,P,p.yhoverformat):((A=g.extendFlat({},c)).y0=A.y1=S,A.yLabelVal=P,A.yLabel=s.labels[I]+m.hoverLabelText(h,P,p.yhoverformat),A.name="",x.push(A),k[P]=A)}return x}function d(l,a,u,f){var o=l.cd,h=l.ya,p=o[0].trace,s=o[0].t,x=i(l,a,u,f);if(!x)return[];var c=o[x.index],T=x.index=c.i,_=c.dir;function w(E){return s.labels[E]+m.hoverLabelText(h,p[E][T],p.yhoverformat)}var k=c.hi||p.hoverinfo,L=k.split("+"),A=k==="all",I=A||L.indexOf("y")!==-1,P=A||L.indexOf("text")!==-1,S=I?[w("open"),w("high"),w("low"),w("close")+" "+t[_]]:[];return P&&e(c,p,S),x.extraText=S.join("<br>"),x.y0=x.y1=h.c2p(c.yc,!0),[x]}$.exports={hoverPoints:function(l,a,u,f){return l.cd[0].trace.hoverlabel.split?r(l,a,u,f):d(l,a,u,f)},hoverSplit:r,hoverOnPoints:d}},{"../../components/color":366,"../../components/fx":406,"../../constants/delta.js":473,"../../lib":503,"../../plots/cartesian/axes":554}],876:[function(v,$,te){$.exports={moduleType:"trace",name:"ohlc",basePlotModule:v("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc").calc,plot:v("./plot"),style:v("./style"),hoverPoints:v("./hover").hoverPoints,selectPoints:v("./select")}},{"../../plots/cartesian":568,"./attributes":872,"./calc":873,"./defaults":874,"./hover":875,"./plot":878,"./select":879,"./style":880}],877:[function(v,$,te){var m=v("../../registry"),g=v("../../lib");$.exports=function(b,y,e,n){var t=e("x"),i=e("open"),r=e("high"),d=e("low"),l=e("close");if(e("hoverlabel.split"),m.getComponentMethod("calendars","handleTraceDefaults")(b,y,["x"],n),i&&r&&d&&l){var a=Math.min(i.length,r.length,d.length,l.length);return t&&(a=Math.min(a,g.minRowLength(t))),y._length=a,a}}},{"../../lib":503,"../../registry":638}],878:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib");$.exports=function(b,y,e,n){var t=y.yaxis,i=y.xaxis,r=!!i.rangebreaks;g.makeTraceGroups(n,e,"trace ohlc").each(function(d){var l=m.select(this),a=d[0],u=a.t;if(a.trace.visible!==!0||u.empty)l.remove();else{var f=u.tickLen,o=l.selectAll("path").data(g.identity);o.enter().append("path"),o.exit().remove(),o.attr("d",function(h){if(h.empty)return"M0,0Z";
1221var p=i.c2p(h.pos-f,!0),s=i.c2p(h.pos+f,!0),x=r?(p+s)/2:i.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"+s+","+t.c2p(h.c,!0)+"H"+x})}})}},{"../../lib":503,"@plotly/d3":58}],879:[function(v,$,te){$.exports=function(m,g){var b,y=m.cd,e=m.xaxis,n=m.yaxis,t=[],i=y[0].t.bPos||0;if(g===!1)for(b=0;b<y.length;b++)y[b].selected=0;else for(b=0;b<y.length;b++){var r=y[b];g.contains([e.c2p(r.pos+i),n.c2p(r.yc)],null,r.i,m)?(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(v,$,te){var m=v("@plotly/d3"),g=v("../../components/drawing"),b=v("../../components/color");$.exports=function(y,e,n){var t=n||m.select(y).selectAll("g.ohlclayer").selectAll("g.trace");t.style("opacity",function(i){return i[0].trace.opacity}),t.each(function(i){var r=i[0].trace;m.select(this).selectAll("path").each(function(d){if(!d.empty){var l=r[d.dir].line;m.select(this).style("fill","none").call(b.stroke,l.color).call(g.dashLine,l.dash,l.width).style("opacity",r.selectedpoints&&!d.selected?.3:1)}})})}},{"../../components/color":366,"../../components/drawing":388,"@plotly/d3":58}],881:[function(v,$,te){var m=v("../../lib/extend").extendFlat,g=v("../../plots/attributes"),b=v("../../plots/font_attributes"),y=v("../../components/colorscale/attributes"),e=v("../../plots/template_attributes").hovertemplateAttrs,n=v("../../plots/domain").attributes,t=m({editType:"calc"},y("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});$.exports={domain:n({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:m({},g.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 descending","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(v,$,te){var m=v("../../plots/get_data").getModuleCalcData,g=v("./plot");te.name="parcats",te.plot=function(b,y,e,n){var t=m(b.calcdata,"parcats");if(t.length){var i=t[0];g(b,i,e,n)}},te.clean=function(b,y,e,n){var t=n._has&&n._has("parcats"),i=y._has&&y._has("parcats");t&&!i&&n._paperdiv.selectAll(".parcats").remove()}},{"../../plots/get_data":593,"./plot":887}],883:[function(v,$,te){var m=v("../../lib/gup").wrap,g=v("../../components/colorscale/helpers").hasColorscale,b=v("../../components/colorscale/calc"),y=v("../../lib/filter_unique.js"),e=v("../../components/drawing"),n=v("../../lib"),t=v("fast-isnumeric");function i(l,a,u){l.valueInds.push(a),l.count+=u}function r(l,a,u){return{categoryInds:l,color:a,rawColor:u,valueInds:[],count:0}}function d(l,a,u){l.valueInds.push(a),l.count+=u}$.exports=function(l,a){var u=n.filterVisible(a.dimensions);if(u.length===0)return[];var f,o,h,p=u.map(function(W){var Q;if(W.categoryorder==="trace")Q=null;else if(W.categoryorder==="array")Q=W.categoryarray;else{Q=y(W.values);for(var R=!0,N=0;N<Q.length;N++)if(!t(Q[N])){R=!1;break}
1221Q.sort(R?n.sorterAsc:void 0),W.categoryorder==="category descending"&&(Q=Q.reverse())}return function(U,ee){ee=ee==null?[]:ee.map(function(pe){return pe});var j={},X={},J=[];ee.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=ee.push(se)-1,X[se]=ne):(j[se]++,ne=X[se]),J.push(ne)}var oe=ee.map(function(pe){return j[pe]});return{uniqueValues:ee,uniqueCounts:oe,inds:J}}(W.values,Q)});f=n.isArrayOrTypedArray(a.counts)?a.counts:[a.counts],function(W){var Q;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(Q=0;Q<W.length;Q++)W[Q]._displayindex=W[Q].displayindex;else for(Q=0;Q<W.length;Q++)W[Q]._displayindex=Q}(u),u.forEach(function(W,Q){(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[Q])});var s,x=a.line;x?(g(a,"line")&&b(l,a,{vals:a.line.color,containerStr:"line",cLetter:"c"}),s=e.tryColorscale(x)):s=n.identity;var c,T,_,w,k,L=u[0].values.length,A={},I=p.map(function(W){return W.inds});for(h=0,c=0;c<L;c++){var P=[];for(T=0;T<I.length;T++)P.push(I[T][c]);o=f[c%f.length],h+=o;var S=(_=c,w=void 0,k=void 0,n.isArrayOrTypedArray(x.color)?k=w=x.color[_%x.color.length]:w=x.color,{color:s(w),rawColor:k}),E=P+"-"+S.rawColor;A[E]===void 0&&(A[E]=r(P,S.color,S.rawColor)),d(A[E],c,o)}var D,F=u.map(function(W,Q){return function(R,N,U,ee,j){return{dimensionInd:R,containerInd:N,displayInd:U,dimensionLabel:ee,count:j,categories:[],dragX:null}}(Q,W._index,W._displayindex,W.label,h)});for(c=0;c<L;c++)for(o=f[c%f.length],T=0;T<F.length;T++){var H=F[T].containerInd,V=p[T].inds[c],Z=F[T].categories;if(Z[V]===void 0){var K=a.dimensions[H]._categoryarray[V],G=a.dimensions[H]._ticktext[V];Z[V]={dimensionInd:T,categoryInd:D=V,categoryValue:K,displayInd:D,categoryLabel:G,valueInds:[],count:0,dragY:null}}i(Z[V],c,o)}return m(function(W,Q,R){var N=W.map(function(U){return U.categories.length}).reduce(function(U,ee){return Math.max(U,ee)});return{dimensions:W,paths:Q,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(v,$,te){var m=v("../../lib"),g=v("../../components/colorscale/helpers").hasColorscale,b=v("../../components/colorscale/defaults"),y=v("../../plots/domain").defaults,e=v("../../plots/array_container_defaults"),n=v("./attributes"),t=v("../parcoords/merge_length");function i(r,d){function l(s,x){return m.coerce(r,d,n.dimensions,s,x)}var a=l("values"),u=l("visible");if(a&&a.length||(u=d.visible=!1),u){l("label"),l("displayindex",d._index);var f,o=r.categoryarray,h=Array.isArray(o)&&o.length>0;h&&(f="array");var p=l("categoryorder",f);p==="array"?(l("categoryarray"),l("ticktext")):(delete r.categoryarray,delete r.ticktext),h||p!=="array"||(d.categoryorder="trace")}}$.exports=function(r,d,l,a){function u(s,x){return m.coerce(r,d,n,s,x)}var f=e(r,d,{name:"dimensions",handleItemDefaults:i}),o=function(s,x,c,T,_){_("line.shape"),_("line.hovertemplate");var w=_("line.color",T.colorway[0]);if(g(s,"line")&&m.isArrayOrTypedArray(w)){if(w.length)return _("line.colorscale"),b(s,x,T,_,{prefix:"line.",cLetter:"c"}),w.length;x.line.color=c}return 1/0}(r,d,l,a,u);y(d,a,u),Array.isArray(f)&&f.length||(d.visible=!1),t(d,f,"values",o),u("hoveron"),u("hovertemplate"),u("arrangement"),u("bundlecolors"),u("sortpaths"),u("counts");var h={family:a.font.family,size:Math.round(a.font.size),color:a.font.color};m.coerceFont(u,"labelfont",h);var p={family:a.font.family,size:Math.round(a.font.size/1.2),color:a.font.color};m.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":898,"./attributes":881}],885:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc"),plot:v("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:v("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":881,"./base_plot":882,"./calc":883,"./defaults":884,"./plot":887}],886:[function(v,$,te){var m=v("@plotly/d3"),g=v("d3-interpolate").interpolateNumber,b=v("../../plot_api/plot_api"),y=v("../../components/fx"),e=v("../../lib"),n=e.strTranslate,t=v("../../components/drawing"),i=v("tinycolor2"),r=v("../../lib/svg_text_utils");function d(R,N,U,ee){var j=R.map(Z.bind(0,N,U)),X=ee.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,l),re=J.enter().append("g").attr("class","trace parcats");J.attr("transform",function(we){return n(we.x,we.y)}),re.append("g").attr("class","paths");var ne=J.select("g.paths").selectAll("path.path").data(function(we){return we.paths},l);ne.attr("fill",function(we){return we.model.color});var se=ne.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(we){return we.model.color}).attr("fill-opacity",0);x(se),ne.attr("d",function(we){return we.svgD}),se.empty()||ne.sort(u),ne.exit().remove(),ne.on("mouseover",f).on("mouseout",o).on("click",
1221s),re.append("g").attr("class","dimensions");var oe=J.select("g.dimensions").selectAll("g.dimension").data(function(we){return we.dimensions},l);oe.enter().append("g").attr("class","dimension"),oe.attr("transform",function(we){return n(we.x,0)}),oe.exit().remove();var pe=oe.selectAll("g.category").data(function(we){return we.categories},l),ce=pe.enter().append("g").attr("class","category");pe.attr("transform",function(we){return n(0,we.y)}),ce.append("rect").attr("class","catrect").attr("pointer-events","none"),pe.select("rect.catrect").attr("fill","none").attr("width",function(we){return we.width}).attr("height",function(we){return we.height}),T(ce);var de=pe.selectAll("rect.bandrect").data(function(we){return we.bands},l);de.each(function(){e.raiseToTop(this)}),de.attr("fill",function(we){return we.color});var xe=de.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(we){return we.color}).attr("fill-opacity",0);de.attr("fill",function(we){return we.color}).attr("width",function(we){return we.width}).attr("height",function(we){return we.height}).attr("y",function(we){return we.y}).attr("cursor",function(we){return we.parcatsViewModel.arrangement==="fixed"?"default":we.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),_(xe),de.exit().remove(),ce.append("text").attr("class","catlabel").attr("pointer-events","none");var _e=N._fullLayout.paper_bgcolor;pe.select("text.catlabel").attr("text-anchor",function(we){return a(we)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",r.makeTextShadow(_e)).style("fill","rgb(0, 0, 0)").attr("x",function(we){return a(we)?we.width+5:-5}).attr("y",function(we){return we.height/2}).text(function(we){return we.model.categoryLabel}).each(function(we){t.font(m.select(this),we.parcatsViewModel.categorylabelfont),r.convertToTspans(m.select(this),N)}),ce.append("text").attr("class","dimlabel"),pe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(we){return we.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(we){return we.width/2}).attr("y",-5).text(function(we,Ee){return Ee===0?we.parcatsViewModel.model.dimensions[we.model.dimensionInd].dimensionLabel:null}).each(function(we){t.font(m.select(this),we.parcatsViewModel.labelfont)}),pe.selectAll("rect.bandrect").on("mouseover",I).on("mouseout",P),pe.exit().remove(),oe.call(m.behavior.drag().origin(function(we){return{x:we.x,y:0}}).on("dragstart",S).on("drag",E).on("dragend",D)),J.each(function(we){we.traceSelection=m.select(this),we.pathSelection=m.select(this).selectAll("g.paths").selectAll("path.path"),we.dimensionSelection=m.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),J.exit().remove()}function l(R){return R.key}function a(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),c(m.select(this));var N=h(R),U=p(R);if(R.parcatsViewModel.graphDiv.emit("plotly_hover",{points:N,event:m.event,constraints:U}),R.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee,j,X,J=m.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];ee=(ce.x+ce.width+de.x)/2,j=(R.topYs[X]+R.topYs[X+1]+R.height)/2;break}var xe=R.parcatsViewModel.x+ee,_e=R.parcatsViewModel.y+j,we=i.mostReadable(R.model.color,["black","white"]),Ee=R.model.count,fe=Ee/R.parcatsViewModel.model.count,ge={countLabel:Ee,probabilityLabel:fe.toFixed(3)},ke=[];R.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ke.push(["Count:",ge.countLabel].join(" ")),R.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ke.push(["P:",ge.probabilityLabel].join(" "));var be=ke.join("<br>"),Se=m.mouse(re)[0];y.loneHover({trace:ne,x:xe-oe.left+pe.left,y:_e-oe.top+pe.top,text:be,color:R.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:we,idealAlign:Se<xe?"right":"left",hovertemplate:(ne.line||{}).hovertemplate,hovertemplateLabels:ge,eventData:[{data:ne._input,fullData:ne,count:Ee,probability:fe}]},{container:se._hoverlayer.node(),outerContainer:se._paper.node(),gd:re})}}}
1221function o(R){if(!R.parcatsViewModel.dragDimension&&(x(m.select(this)),y.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:m.event,constraints:U})}}function h(R){for(var N=[],U=F(R.parcatsViewModel),ee=0;ee<R.model.valueInds.length;ee++){var j=R.model.valueInds[ee];N.push({curveNumber:U,pointNumber:j})}return N}function p(R){for(var N={},U=R.parcatsViewModel.model.dimensions,ee=0;ee<U.length;ee++){var j=U[ee],X=j.categories[R.model.categoryInds[ee]];N[j.containerInd]=X.categoryValue}return R.model.rawColor!==void 0&&(N.color=R.model.rawColor),N}function s(R){if(R.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var N=h(R),U=p(R);R.parcatsViewModel.graphDiv.emit("plotly_click",{points:N,event:m.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 c(R){R.attr("fill-opacity",.8).attr("stroke",function(N){return i.mostReadable(N.model.color,["black","white"])}).attr("stroke-width",.3)}function T(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 w(R){var N=R.parcatsViewModel.pathSelection,U=R.categoryViewModel.model.dimensionInd,ee=R.categoryViewModel.model.categoryInd;return N.filter(function(j){return j.model.categoryInds[U]===ee&&j.model.color===R.color})}function k(R,N,U){var ee=m.select(R).datum(),j=ee.categoryViewModel.model,X=ee.parcatsViewModel.graphDiv,J=m.select(R.parentNode).selectAll("rect.bandrect"),re=[];J.each(function(se){w(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 ee=m.select(R).datum(),j=ee.categoryViewModel.model,X=ee.parcatsViewModel.graphDiv,J=w(ee),re=[];J.each(function(se){Array.prototype.push.apply(re,h(se))});var ne={};ne[j.dimensionInd]=j.categoryValue,ee.rawColor!==void 0&&(ne.color=ee.rawColor),X.emit(N,{points:re,event:U,constraints:ne})}function A(R,N,U){R._fullLayout._calcInverseTransform(R);var ee,j,X=R._fullLayout._invScaleX,J=R._fullLayout._invScaleY,re=m.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?(ee=ne.left,j="left"):(ee=ne.left+ne.width,j="right");var xe=se.model.count,_e=se.model.categoryLabel,we=xe/se.parcatsViewModel.model.count,Ee={countLabel:xe,categoryLabel:_e,probabilityLabel:we.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 ge=fe.join("<br>");return{trace:ce,x:X*(ee-N.left),y:J*(de-N.top),text:ge,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:_e,probability:we}]}}function I(R){if(!R.parcatsViewModel.dragDimension&&R.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){if(m.mouse(this)[1]<-1)return;var N,U=R.parcatsViewModel.graphDiv,ee=U._fullLayout,j=ee._paperdiv.node().getBoundingClientRect(),X=R.parcatsViewModel.hoveron;X==="color"?(function(J){var re=m.select(J).datum(),ne=w(re);c(ne),ne.each(function(){e.raiseToTop(this)}),m.select(J.parentNode).selectAll("rect.bandrect").filter(function(se){return se.color===re.color}).each(function(){e.raiseToTop(this),m.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(this),L(this,"plotly_hover",m.event)):(function(J){m.select(J.parentNode).selectAll("rect.bandrect").each(function(re){var ne=w(re);c(ne),ne.each(function(){e.raiseToTop(this)})}),m.select(J.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),k(this,"plotly_hover",m.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=m.select(ne).datum(),_e=xe.categoryViewModel,we=_e.parcatsViewModel,Ee=we.model.dimensions[_e.model.dimensionInd],fe=we.trace,ge=de.y+de.height/2;we.dimensions.length>1&&Ee.displayInd===we.dimensions.length-1?(se=de.left,oe="left"):(se=de.left+de.width,oe="right");var ke=_e.model.categoryLabel,be=xe.parcatsViewModel.model.count,Se=0;xe.categoryViewModel.bands.forEach(function(ct){ct.color===xe.color&&(Se+=ct.count)});var Oe=_e.model.count,De=0;we.pathSelection.each(function(ct){ct.model.color===xe.color&&(De+=ct.model.count)});var je=Se/be,Je=Se/De,ze=Se/Oe,Ue={countLabel:be,categoryLabel:ke,probabilityLabel:je.toFixed(3)},Ge=[];_e.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ge.push(["Count:",Ue.countLabel].join(" ")),_e.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ge.push("P(color \u2229 "+ke+"): "+Ue.probabilityLabel),Ge.push("P("+ke+" | color): "+Je.toFixed(3)),Ge.push("P(color | "+ke+"): "+ze.toFixed(3)));var Ye=Ge.join("<br>"),et=i.mostReadable(xe.color,["black","white"]);return{trace:fe,x:pe*(se-re.left),y:ce*(ge-re.top),text:Ye,color:xe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:et,fontSize:10,idealAlign:oe,hovertemplate:fe.hovertemplate,hovertemplateLabels:Ue,eventData:[{data:fe._input,fullData:fe,category:ke,count:be,probability:je,categorycount:Oe,colorcount:De,bandcolorcount:Se}]}}(U,j,this):X==="dimension"&&(N=function(J,re,ne){var se=[];return m.select(ne.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){se.push(A(J,re,this))}),se}(U,j,this)),N&&y.loneHover(N,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:U}))}}function P(R){var N=R.parcatsViewModel;!N.dragDimension&&(x(N.pathSelection),T(N.dimensionSelection.selectAll("g.category")),_(N.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),y.loneUnhover(N.graphDiv._fullLayout._hoverlayer.node()),N.pathSelection.sort(u),N.hoverinfoItems.indexOf("skip")===-1)&&(R.parcatsViewModel.hoveron==="color"?L(this,"plotly_unhover",m.event):k(this,"plotly_unhover",m.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,m.select(this).selectAll("g.category").select("rect.catrect").each(function(N){var U=m.mouse(this)[0],ee=m.mouse(this)[1];-2<=U&&U<=N.width+2&&-2<=ee&&ee<=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),m.select(this.parentNode).selectAll("rect.bandrect").each(function(j){j.y<ee&&ee<=j.y+j.height&&(R.potentialClickBand=this)}))}),R.parcatsViewModel.dragDimension=R,y.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,ee=N+1,j=R.parcatsViewModel.dimensions[N];if(R.dragCategoryDisplayInd!==null){var X=j.categories[R.dragCategoryDisplayInd];X.model.dragY+=m.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=m.event.x;var pe=R.parcatsViewModel.dimensions[U],ce=R.parcatsViewModel.dimensions[ee];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),G(R.parcatsViewModel),V(R.parcatsViewModel),H(R.parcatsViewModel)}}
1221function D(R){if(R.parcatsViewModel.arrangement!=="fixed"&&R.dragDimensionDisplayInd!==null){m.select(this).selectAll("text").attr("font-weight","normal");var N={},U=F(R.parcatsViewModel),ee=R.parcatsViewModel.model.dimensions.map(function(oe){return oe.displayInd}),j=R.initialDragDimensionDisplayInds.some(function(oe,pe){return oe!==ee[pe]});j&&ee.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.displayInd}),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",m.event.sourceEvent):k(R.potentialClickBand,"plotly_click",m.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),G(R.parcatsViewModel),m.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,ee=0;ee<U.length;ee++)if(R.key===U[ee].uid){N=ee;break}return N}function H(R,N){var U;N===void 0&&(N=!1),R.pathSelection.data(function(ee){return ee.paths},l),(U=R.pathSelection,N?U.transition():U).attr("d",function(ee){return ee.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},l);var ee=R.dimensionSelection.selectAll("g.category").data(function(J){return J.categories},l);U(R.dimensionSelection).attr("transform",function(J){return n(J.x,0)}),U(ee).attr("transform",function(J){return n(0,J.y)}),ee.select(".dimlabel").text(function(J,re){return re===0?J.parcatsViewModel.model.dimensions[J.model.dimensionInd].dimensionLabel:null}),ee.select(".catlabel").attr("text-anchor",function(J){return a(J)?"start":"end"}).attr("x",function(J){return a(J)?J.width+5:-5}).each(function(J){var re,ne;a(J)?(re=J.width+5,ne="start"):(re=-5,ne="end"),m.select(this).selectAll("tspan").attr("x",re).attr("text-anchor",ne)});var j=ee.selectAll("rect.bandrect").data(function(J){return J.bands},l),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 ee,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;ee=J.hoverinfo==="all"?["count","probability"]:(J.hoverinfo||"").split("+");var _e={trace:J,key:J.uid,model:j,x:ce,y:de,width:oe,height:pe,hoveron:J.hoveron,hoverinfoItems:ee,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(_e),G(_e)),_e}function K(R,N,U,ee,j){var X,J,re=[],ne=[];for(J=0;J<U.length-1;J++)X=g(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,"+ee+" ",se+="l -"+U[U.length-1]+",0 ",J=U.length-2;J>=0;J--)se+="C"+ne[J]+","+(N[J+1]+ee)+" "+re[J]+","+(N[J]+ee)+" "+(R[J]+U[J])+","+(N[J]+ee),se+="l-"+U[J]+",0 ";return se+="Z"}function G(R){var N=R.dimensions,U=R.model,ee=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(et,ct){return j[ct][et]});return J.map(function(et){return Ye[et]})}se.sort(function(Ge,Ye){var et=pe(Ge),ct=pe(Ye);return R.sortpaths==="backward"&&(et.reverse(),ct.reverse()),et.push(Ge.valueInds[0]),ct.push(Ye.valueInds[0]),R.bundlecolors&&(et.unshift(Ge.rawColor),ct.unshift(Ye.rawColor)),et<ct?-1:et>ct?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}),_e=0;_e<se.length;_e++){var we,Ee=se[_e];we=de>0?xe*(Ee.count/de):0;for(var fe,ge=new Array(ee.length),ke=0;ke<Ee.categoryInds.length;ke++){var be=Ee.categoryInds[ke],Se=j[ke][be],Oe=X[ke];ge[Oe]=ee[Oe][Se],ee[Oe][Se]+=we;
1221var De=R.dimensions[Oe].categories[Se],je=De.bands.length,Je=De.bands[je-1];if(Je===void 0||Ee.rawColor!==Je.rawColor){var ze=Je===void 0?0:Je.y+Je.height;De.bands.push({key:ze,color:Ee.color,rawColor:Ee.rawColor,height:we,width:De.width,count:Ee.count,y:ze,categoryViewModel:De,parcatsViewModel:R})}else{var Ue=De.bands[je-1];Ue.height+=we,Ue.count+=Ee.count}}fe=R.pathShape==="hspline"?K(re,ge,ne,we,.5):K(re,ge,ne,we,0),ce[_e]={key:Ee.valueInds[0],model:Ee,height:we,leftXs:re,topYs:ge,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 ee in N){var j=N[ee].dimensionInd,X=R.model.dimensions[j];U.push(Q(R,X))}R.dimensions=U}function Q(R,N){var U,ee=R.model.dimensions.length,j=N.displayInd;U=40+(ee>1?(R.width-80-16)/(ee-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),_e=8*(pe-ce)/2,we=N.categories.map(function(Ee){return{displayInd:Ee.displayInd,categoryInd:Ee.categoryInd}});for(we.sort(function(Ee,fe){return Ee.displayInd-fe.displayInd}),se=0;se<ce;se++)ne=we[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:_e,bands:[],parcatsViewModel:R},_e=_e+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}}$.exports=function(R,N,U,ee){d(U,R,ee,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(v,$,te){var m=v("./parcats");$.exports=function(g,b,y,e){var n=g._fullLayout,t=n._paper,i=n._size;m(g,t,b,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},y,e)}},{"./parcats":886}],888:[function(v,$,te){var m=v("../../components/colorscale/attributes"),g=v("../../plots/cartesian/layout_attributes"),b=v("../../plots/font_attributes"),y=v("../../plots/domain").attributes,e=v("../../lib/extend").extendFlat,n=v("../../plot_api/plot_template").templatedArray;$.exports={domain:y({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({},g.tickvals,{editType:"plot"}),ticktext:e({},g.ticktext,{editType:"plot"}),tickformat:e({},g.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"},m("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(v,$,te){var m=v("./constants"),g=v("@plotly/d3"),b=v("../../lib/gup").keyFun,y=v("../../lib/gup").repeat,e=v("../../lib").sorterAsc,n=v("../../lib").strTranslate,t=m.bar.snapRatio;function i(A,I){return A*(1-t)+I*t}var r=m.bar.snapClose;function d(A,I){return A*(1-r)+I*r}function l(A,I,P,S){if(function(Q,R){for(var N=0;N<R.length;N++)if(Q>=R[N][0]&&Q<=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 G=K+E,W=I[G];if(E*P<E*d(V,W))return i(V,Z);if(E*P<E*W||G===F)return i(W,V);Z=V,V=W}}function a(A){A.attr("x",-m.bar.captureWidth/2).attr("width",m.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=o(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 o(A,I){return A.map(function(P){return P.map(function(S){return Math.max(0,S*I)}).sort(e)})}function h(){g.select(document.body).style("cursor",null)}function p(A){A.attr("stroke-dasharray",f)}function s(A,I){var P=g.select(A).selectAll(".highlight, .highlight-shadow");p(I?P.transition().duration(m.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=o(H,F),Z=NaN,K=NaN,G=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){G=P;break}}if(E=Z,isNaN(E)&&(E=isNaN(K)||isNaN(G)?isNaN(K)?G:K:I-V[K][1]<V[G][0]-I?K:G),!isNaN(E)){var Q=V[E],R=function(j,X){var J=m.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"}(Q,I);R&&(D.interval=H[E],D.intervalPix=Q,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 ee=[.25*N[Math.max(P-1,0)]+.75*N[P],.25*N[Math.min(P+1,N.length-1)]+.75*N[P]];if(U>=ee[0]&&U<=ee[1]){D.clickableOrdinalRange=ee;break}}}return D}function c(A,I){g.event.sourceEvent.stopPropagation();var P=I.height-g.mouse(A)[1]-2*m.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),s(A.parentNode)}function T(A,I){var P=x(I,I.height-g.mouse(A)[1]-2*m.verticalPadding),S="crosshair";P.clickableOrdinalRange?S="pointer":P.region&&(S=P.region+"-resize"),g.select(document.body).style("cursor",S)}function _(A){A.on("mousemove",function(I){g.event.preventDefault(),I.parent.inBrushDrag||T(this,I)}).on("mouseleave",function(I){I.parent.inBrushDrag||h()}).call(g.behavior.drag().on("dragstart",function(I){(function(P,S){g.event.sourceEvent.stopPropagation();var E=S.height-g.mouse(P)[1]-2*m.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]-m.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(G){return G[0]!==V[0]&&G[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){c(this,I)}).on("dragend",function(I){(function(P,S){var E=S.brush,D=E.filter,F=E.svgBrush;F._dragging||(T(P,S),c(P,S),S.brush.svgBrush.wasDragged=!1),F._dragging=!1,g.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),s(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=[l(0,Z,F.newExtent[0],F.stayingIntervals),l(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?s(P.parentNode,V):(V(),s(P.parentNode))}else V();F.brushEndCallback(E.filterSpecified?D.getConsolidated():[])})(this,I)}))}function w(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}$.exports={makeBrush:function(A,I,P,S,E,D){var F,H=function(){var V,Z,K=[];return{set:function(G){(K=G.map(function(W){return W.slice().sort(e)}).sort(w)).length===1&&K[0][0]===-1/0&&K[0][1]===1/0&&(K=[[0,-1]]),V=L(K),Z=K.reduce(function(W,Q){return[Math.min(W[0],Q[0]),Math.max(W[1],Q[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(G){return G.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("."+m.cn.axisBrush).data(y,b);P.enter().append("g").classed(m.cn.axisBrush,!0),function(S,E){var D=S.selectAll(".background").data(y);D.enter().append("rect").classed("background",!0).call(a).call(u).style("pointer-events","auto").attr("transform",n(0,m.verticalPadding)),D.call(_).attr("height",function(V){return V.height-m.verticalPadding});var F=S.selectAll(".highlight-shadow").data(y);F.enter().append("line").classed("highlight-shadow",!0).attr("x",-m.bar.width/2).attr("stroke-width",m.bar.width+m.bar.strokeWidth).attr("stroke",E).attr("opacity",m.bar.strokeOpacity).attr("stroke-linecap","butt"),F.attr("y1",function(V){return V.height}).call(p);var H=S.selectAll(".highlight").data(y);H.enter().append("line").classed("highlight",!0).attr("x",-m.bar.width/2).attr("stroke-width",m.bar.width-m.bar.strokeWidth).attr("stroke",m.bar.fillColor).attr("opacity",m.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(w)):[A[0]]):A=[A.sort(e)],I.tickvals){var P=I.tickvals.slice().sort(e);if(!(A=A.map(function(S){var E=[l(0,P,S[0],[]),l(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":893,"@plotly/d3":58}],890:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:v("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":888,"./base_plot":891,"./calc":892,"./defaults":894}],891:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../plots/get_data").getModuleCalcData,b=v("./plot"),y=v("../../constants/xmlns_namespaces");te.name="parcoords",te.plot=function(e){var n=g(e.calcdata,"parcoords")[0];n.length&&b(e,n)},te.clean=function(e,n,t,i){var r=i._has&&i._has("parcoords"),d=n._has&&n._has("parcoords");r&&!d&&(i._paperdiv.selectAll(".parcoords").remove(),i._glimages.selectAll("*").remove())},te.toSVG=function(e){var n=e._fullLayout._glimages,t=m.select(e).selectAll(".svg-container");t.filter(function(i,r){return r===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var i=this.toDataURL("image/png");n.append("svg:image").attr({xmlns:y.svg,"xlink:href":i,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){m.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":480,"../../plots/get_data":593,"./plot":900,"@plotly/d3":58}],892:[function(v,$,te){var m=v("../../lib").isArrayOrTypedArray,g=v("../../components/colorscale"),b=v("../../lib/gup").wrap;$.exports=function(y,e){var n,t;return g.hasColorscale(e,"line")&&m(e.line.color)?(n=e.line.color,t=g.extractOpts(e.line).colorscale,g.calc(y,e,{vals:n,containerStr:"line",cLetter:"c"})):(n=function(i){for(var r=new Array(i),d=0;d<i;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}],893:[function(v,$,te){$.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"}}},{}],894:[function(v,$,te){var m=v("../../lib"),g=v("../../components/colorscale/helpers").hasColorscale,b=v("../../components/colorscale/defaults"),y=v("../../plots/domain").defaults,e=v("../../plots/array_container_defaults"),n=v("../../plots/cartesian/axes"),t=v("./attributes"),i=v("./axisbrush"),r=v("./constants").maxDimensionCount,d=v("./merge_length");function l(a,u,f,o){function h(T,_){return m.coerce(a,u,t.dimensions,T,_)}var p=h("values"),s=h("visible");if(p&&p.length||(s=u.visible=!1),s){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,o.layout),h("multiselect");var c=h("constraintrange");c&&(u.constraintrange=i.cleanRanges(c,u))}}$.exports=function(a,u,f,o){function h(T,_){return m.coerce(a,u,t,T,_)}var p=a.dimensions;Array.isArray(p)&&p.length>r&&(m.log("parcoords traces support up to "+r+" dimensions at the moment"),p.splice(r));var s=e(a,u,{name:"dimensions",layout:o,handleItemDefaults:l}),x=function(T,_,w,k,L){var A=L("line.color",w);if(g(T,"line")&&m.isArrayOrTypedArray(A)){if(A.length)return L("line.colorscale"),b(T,_,k,L,{prefix:"line.",cLetter:"c"}),A.length;_.line.color=w}return 1/0}(a,u,f,o,h);y(u,o,h),Array.isArray(s)&&s.length||(u.visible=!1),d(u,s,"values",x);var c={family:o.font.family,size:Math.round(o.font.size/1.2),color:o.font.color};m.coerceFont(h,"labelfont",c),m.coerceFont(h,"tickfont",c),m.coerceFont(h,"rangefont",c),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":893,"./merge_length":898}],895:[function(v,$,te){var m=v("../../lib").isTypedArray;te.convertTypedArray=function(g){return m(g)?Array.prototype.slice.call(g):g},te.isOrdinal=function(g){return!!g.tickvals},te.isVisible=function(g){return g.visible||!("visible"in g)}},{"../../lib":503}],896:[function(v,$,te){var m=v("./base_index");m.plot=v("./plot"),$.exports=m},{"./base_index":890,"./plot":900}],897:[function(v,$,te){var m=v("glslify"),g=m([`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=m([`precision highp float; 1346#define GLSLIFY 1 1347 1348varying vec4 fragColor; 1349 1350void main() { 1351 gl_FragColor = fragColor; 1352} 1353`]),y=v("./constants").maxDimensionCount,e=v("../../lib"),n=new Uint8Array(4),t=new Uint8Array(4),i={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function r(s,x,c,T,_){var w=s._gl;w.enable(w.SCISSOR_TEST),w.scissor(x,c,T,_),s.clear({color:[0,0,0,0],depth:1})}function d(s,x,c,T,_,w){var k=w.key;c.drawCompleted||(function(L){L.read({x:0,y:0,width:1,height:1,data:n})}(s),c.drawCompleted=!0),function L(A){var I=Math.min(T,_-A*T);A===0&&(window.cancelAnimationFrame(c.currentRafs[k]),delete c.currentRafs[k],r(s,w.scissorX,w.scissorY,w.scissorWidth,w.viewBoxSize[1])),c.clearOnly||(w.count=2*I,w.offset=2*A*T,x(w),A*T+I<_&&(c.currentRafs[k]=window.requestAnimationFrame(function(){L(A+1)})),c.drawCompleted=!1)}(0)}function l(s,x){for(var c=new Array(256),T=0;T<256;T++)c[T]=s(T/255).concat(x);return c}function a(s,x){return(s>>>8*x)%256/255}function u(s,x,c){for(var T=new Array(8*x),_=0,w=0;w<x;w++)for(var k=0;k<2;k++)for(var L=0;L<4;L++){var A=4*s+L,I=c[64*w+A];A===63&&k===0&&(I*=-1),T[_++]=I}return T}function f(s){var x="0"+s;return x.substr(x.length-2)}function o(s){return s<y?"p"+f(s+1)+"_"+f(s+4):"colors"}function h(s,x,c,T,_,w,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===w?1:0;k*=D,L*=D,A*=D,I*=D;var V=s.lines.canvasOverdrag*D,Z=s.domain,K=s.canvasWidth*D,G=s.canvasHeight*D,W=s.pad.l*D,Q=s.pad.b*D,R=s.layoutHeight*D,N=s.layoutWidth*D,U=s.deselectedLines.color;return e.extendFlat({key:P,resolution:[K,G],viewBoxPos:[k+V,L],viewBoxSize:[A,I],i0:_,i1:w,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/s.lines.color.length,1/3))],scissorX:(T===x?0:k+V)+(W-V)+N*Z.x[0],scissorWidth:(T===c?K-k+V:A+.5)+(T===x?k+V:0),scissorY:L+Q+R*Z.y[0],scissorHeight:I,viewportX:W-V+N*Z.x[0],viewportY:Q+R*Z.y[0],viewportWidth:K,viewportHeight:G},E)}function p(s){var x=Math.max(0,Math.floor(2047*s[0]),0),c=Math.min(2047,Math.ceil(2047*s[1]),2047);return[Math.min(x,c),Math.max(x,c)]}$.exports=function(s,x){var c,T,_,w,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(G){for(var W={},Q=0;Q<=y;Q+=4)W[o(Q)]=G.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return W}(I),H=I.texture(i),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:g,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(G){c=G.model,T=G.viewModel,_=T.dimensions.slice(),w=_[0]?_[0].values.length:0;var W=c.lines,Q=A?W.color.map(function(N,U){return U/W.color.length}):W.color,R=function(N,U,ee){for(var j,X=new Array(N*(y+4)),J=0,re=0;re<N;re++){for(var ne=0;ne<y;ne++)X[J++]=ne<U.length?U[ne].paddedUnitValues[re]:.5;X[J++]=a(re,2),X[J++]=a(re,1),X[J++]=a(re,0),X[J++]=(j=ee[re],Math.max(1e-6,Math.min(.999999,j)))}return X}(w,_,Q);(function(N,U,ee){for(var j=0;j<=y;j+=4)N[o(j)](u(j/4,U,ee))})(F,w,R),L||A||(H=I.texture(e.extendFlat({data:l(c.unitToColor,255)},i)))}return{render:function(G,W,Q){var R,N,U,ee=G.length,j=1/0,X=-1/0;for(R=0;R<ee;R++)G[R].dim0.canvasX<j&&(j=G[R].dim0.canvasX,N=R),G[R].dim1.canvasX>X&&(X=G[R].dim1.canvasX,U=R);ee===0&&r(I,0,0,c.canvasWidth,c.canvasHeight);var J=function(we){var Ee,fe,ge,ke=[[],[]];for(ge=0;ge<64;ge++){var be=!we&&ge<_.length?_[ge].brush.filter.getBounds():[-1/0,1/0];ke[0][ge]=be[0],ke[1][ge]=be[1]}var Se=new Array(16384);for(Ee=0;Ee<16384;Ee++)Se[Ee]=255;if(!we)for(Ee=0;Ee<_.length;Ee++){var Oe=Ee%8,De=(Ee-Oe)/8,je=Math.pow(2,Oe),Je=_[Ee].brush.filter.get();if(!(Je.length<2)){var ze=p(Je[0])[1];for(fe=1;fe<Je.length;fe++){var Ue=p(Je[fe]);for(ge=ze+1;ge<Ue[0];ge++)Se[8*ge+De]&=~je;ze=Math.max(ze,Ue[1])}}}var Ge={shape:[8,2048],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:Se};return k?k(Ge):k=I.texture(Ge),{maskTexture:k,maskHeight:2048,loA:ke[0].slice(0,16),loB:ke[0].slice(16,32),loC:ke[0].slice(32,48),loD:ke[0].slice(48,64),hiA:ke[1].slice(0,16),hiB:ke[1].slice(16,32),hiC:ke[1].slice(32,48),hiD:ke[1].slice(48,64)}}(L);for(R=0;R<ee;R++){var re=G[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(c,N,U,R,ne,se,oe,pe,re.panelSizeX,re.panelSizeY,re.dim0.crossfilterDimensionIndex,L?0:A?2:1,J,de);D.clearOnly=Q;var _e=W?c.lines.blockLineCount:w;d(I,Z,D,_e,w,xe)}}},readPixel:function(G,W){return I.read({x:G,y:W,width:1,height:1,data:t}),t},readPixels:function(G,W,Q,R){var N=new Uint8Array(4*Q*R);return I.read({x:G,y:W,width:Q,height:R,data:N}),N},destroy:function(){for(var G in s.style["pointer-events"]="none",H.destroy(),k&&k.destroy(),F)F[G].destroy()},update:K}}},{"../../lib":503,"./constants":893,glslify:227}],898:[function(v,$,te){$.exports=function(m,g,b,y){var e,n;for(y||(y=1/0),e=0;e<g.length;e++)(n=g[e]).visible&&(y=Math.min(y,n[b].length));for(y===1/0&&(y=0),m._length=y,e=0;e<g.length;e++)(n=g[e]).visible&&(n._length=y);return y}},{}],899:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=g.numberFormat,y=v("color-rgba"),e=v("../../plots/cartesian/axes"),n=g.strRotate,t=g.strTranslate,i=v("../../lib/svg_text_utils"),r=v("../../components/drawing"),d=v("../../components/colorscale"),l=v("../../lib/gup"),a=l.keyFun,u=l.repeat,f=l.unwrap,o=v("./helpers"),h=v("./constants"),p=v("./axisbrush"),s=v("./lines");function x(V,Z,K){return g.aggNums(V,null,Z,K)}function c(V,Z){return _(x(Math.min,V,Z),x(Math.max,V,Z))}function T(V){var Z=V.range;return Z?_(Z[0],Z[1]):c(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 w(V,Z,K,G,W){var Q,R,N=T(K);return G?m.scale.ordinal().domain(G.map((Q=b(K.tickformat),R=W,R?function(U,ee){var j=R[ee];return j??Q(U)}:Q))).range(G.map(function(U){var ee=(U-N[0])/(N[1]-N[0]);return V-Z+ee*(2*Z-V)})):m.scale.linear().domain(N).range([V-Z,Z])}function k(V){if(V.tickvals){var Z=T(V);return m.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 Q=y(W[1]);return m.rgb("rgb("+Q[0]+","+Q[1]+","+Q[2]+")")}),G="rgb".split("").map(function(W){return m.scale.linear().clamp(!0).domain(Z).range(K.map((Q=W,function(R){return R[Q]})));var Q});return function(W){return G.map(function(Q){return Q(W)})}}function A(V){return V.dimensions.some(function(Z){return Z.brush.filterSpecified})}function I(V,Z,K){var G=f(Z),W=G.trace,Q=o.convertTypedArray(G.lineColor),R=W.line,N={color:y(h.deselectedLineColor)},U=d.extractOpts(R),ee=U.reversescale?d.flipScale(G.cscale):G.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=g.extendDeepNoArrays({},R,{color:Q.map(m.scale.linear().domain(T({values:Q,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])),_e=V.margin||{l:80,r:80,t:100,b:80},we=de,Ee=xe;return{key:K,colCount:X.filter(o.isVisible).length,dimensions:X,tickDistance:h.tickDistance,unitToColor:L(ee),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:_e,canvasWidth:we*h.canvasPixelRatio+2*ce.canvasOverdrag,canvasHeight:Ee*h.canvasPixelRatio,width:we,height:Ee,canvasPixelRatio:h.canvasPixelRatio}}function P(V,Z,K){var G=K.width,W=K.height,Q=K.dimensions,R=K.canvasPixelRatio,N=function(J){return G*J/Math.max(1,K.colCount-1)},U=h.verticalPadding/W,ee=function(J,re){return m.scale.linear().range([re,J-re])}(W,h.verticalPadding),j={key:K.key,xScale:N,model:K,inBrushDrag:!1},X={};return j.dimensions=Q.filter(o.isVisible).map(function(J,re){var ne=function(Se,Oe){return m.scale.linear().domain(T(Se)).range([Oe,1-Oe])}(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(Se){return Se.map(ne)}):[[-1/0,1/0]],xe=J.values;xe.length>J._length&&(xe=xe.slice(0,J._length));var _e,we=J.tickvals;function Ee(Se,Oe){return{val:Se,text:_e[Oe]}}function fe(Se,Oe){return Se.val-Oe.val}if(Array.isArray(we)&&we.length){_e=J.ticktext,Array.isArray(_e)&&_e.length?_e.length>we.length?_e=_e.slice(0,we.length):we.length>_e.length&&(we=we.slice(0,_e.length)):_e=we.map(b(J.tickformat));for(var ge=1;ge<we.length;ge++)if(we[ge]<we[ge-1]){for(var ke=we.map(Ee).sort(fe),be=0;be<we.length;be++)we[be]=ke[be].val,_e[be]=ke[be].text;break}}else we=void 0;return xe=o.convertTypedArray(xe),{key:oe,label:J.label,tickFormat:J.tickformat,tickvals:we,ticktext:_e,ordinal:o.isOrdinal(J),multiselect:J.multiselect,xIndex:re,crossfilterDimensionIndex:re,visibleIndex:J._index,height:W,values:xe,paddedUnitValues:xe.map(ne),unitTickvals:we&&we.map(ne),xScale:N,x:N(re),canvasX:N(re)*R,unitToPaddedPx:ee,domainScale:w(W,h.verticalPadding,J,we,_e),ordinalScale:k(J),parent:j,model:K,brush:p.makeBrush(V,ce,de,function(){V.linePickActive(!1)},function(){var Se=j;
vendor: 9,120 bytes, line 1353
1353Se.focusLayer&&Se.focusLayer.render(Se.panels,!0);var Oe=A(Se);!V.contextShown()&&Oe?(Se.contextLayer&&Se.contextLayer.render(Se.panels,!0),V.contextShown(!0)):V.contextShown()&&!Oe&&(Se.contextLayer&&Se.contextLayer.render(Se.panels,!0,!0),V.contextShown(!1))},function(Se){if(j.focusLayer.render(j.panels,!0),j.pickLayer&&j.pickLayer.render(j.panels,!0),V.linePickActive(!0),Z&&Z.filterChanged){var Oe=ne.invert,De=Se.map(function(je){return je.map(Oe).sort(g.sorterAsc)}).sort(function(je,Je){return je[0]-Je[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,G=V*Math.PI/180;return{dir:K,dx:Math.sin(G),dy:Math.cos(G),degrees:V}}function D(V,Z,K){for(var G=Z.panels||(Z.panels=[]),W=V.data(),Q=0;Q<W.length-1;Q++){var R=G[Q]||(G[Q]={}),N=W[Q],U=W[Q+1];R.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(),G=K[Z?K.length-1:0];return F(V.model.dimensions[V.visibleIndex],G)}$.exports=function(V,Z,K,G){var W=V._fullLayout,Q=W._toppaper,R=W._glcontainer,N=V._context.plotGlPixelRatio,U=V._fullLayout.paper_bgcolor;(function(be){for(var Se=0;Se<be.length;Se++)for(var Oe=0;Oe<be[Se].length;Oe++)for(var De=be[Se][Oe].trace,je=De.dimensions,Je=0;Je<je.length;Je++){var ze=je[Je].values,Ue=je[Je]._ax;Ue&&(Ue.range?Ue.range=_(Ue.range[0],Ue.range[1]):Ue.range=c(ze,De._length),Ue.dtick||(Ue.dtick=.01*(Math.abs(Ue.range[1]-Ue.range[0])||1)),Ue.tickformat=je[Je].tickformat,e.calcTicks(Ue),Ue.cleanRange())}})(Z);var ee,j,X=(ee=!0,j=!1,{linePickActive:function(be){return arguments.length?ee=!!be:ee},contextShown:function(be){return arguments.length?j=!!be:j}}),J=Z.filter(function(be){return f(be).trace.visible}).map(I.bind(0,K)).map(P.bind(0,X,G));R.each(function(be,Se){return g.extendFlat(be,J[Se])});var re=R.selectAll(".gl-canvas").each(function(be){be.viewModel=J[0],be.viewModel.plotGlPixelRatio=N,be.viewModel.paperColor=U,be.model=be.viewModel?be.viewModel.model:null}),ne=null;re.filter(function(be){return be.pick}).style("pointer-events","auto").on("mousemove",function(be){if(X.linePickActive()&&be.lineLayer&&G&&G.hover){var Se=m.event,Oe=this.width,De=this.height,je=m.mouse(this),Je=je[0],ze=je[1];if(Je<0||ze<0||Je>=Oe||ze>=De)return;var Ue=be.lineLayer.readPixel(Je,De-1-ze),Ge=Ue[3]!==0,Ye=Ge?Ue[2]+256*(Ue[1]+256*Ue[0]):null,et={x:Je,y:ze,clientX:Se.clientX,clientY:Se.clientY,dataIndex:be.model.key,curveNumber:Ye};Ye!==ne&&(Ge?G.hover(et):G.unhover&&G.unhover(et),ne=Ye)}}),re.style("opacity",function(be){return be.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var se=Q.selectAll("."+h.cn.parcoords).data(J,a);se.exit().remove(),se.enter().append("g").classed(h.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),se.attr("transform",function(be){return t(be.model.translateX,be.model.translateY)});var oe=se.selectAll("."+h.cn.parcoordsControlView).data(u,a);oe.enter().append("g").classed(h.cn.parcoordsControlView,!0),oe.attr("transform",function(be){return t(be.model.pad.l,be.model.pad.t)});var pe=oe.selectAll("."+h.cn.yAxis).data(function(be){return be.dimensions},a);pe.enter().append("g").classed(h.cn.yAxis,!0),oe.each(function(be){D(pe,be,N)}),re.each(function(be){if(be.viewModel){!be.lineLayer||G?be.lineLayer=s(this,be):be.lineLayer.update(be),(be.key||be.key===0)&&(be.viewModel[be.key]=be.lineLayer);var Se=!be.context||G;be.lineLayer.render(be.viewModel.panels,Se)}}),pe.attr("transform",function(be){return t(be.xScale(be.xIndex),0)}),pe.call(m.behavior.drag().origin(function(be){return be}).on("drag",function(be){var Se=be.parent;X.linePickActive(!1),be.x=Math.max(-h.overdrag,Math.min(be.model.width+h.overdrag,m.event.x)),be.canvasX=be.x*be.model.canvasPixelRatio,pe.sort(function(Oe,De){return Oe.x-De.x}).each(function(Oe,De){Oe.xIndex=De,Oe.x=be===Oe?Oe.x:Oe.xScale(Oe.xIndex),Oe.canvasX=Oe.x*Oe.model.canvasPixelRatio}),D(pe,Se,N),pe.filter(function(Oe){return Math.abs(be.xIndex-Oe.xIndex)!==0}).attr("transform",function(Oe){return t(Oe.xScale(Oe.xIndex),0)}),m.select(this).attr("transform",t(be.x,0)),pe.each(function(Oe,De,je){je===be.parent.key&&(Se.dimensions[De]=Oe)}),Se.contextLayer&&Se.contextLayer.render(Se.panels,!1,!A(Se)),Se.focusLayer.render&&Se.focusLayer.render(Se.panels)}).on("dragend",function(be){var Se=be.parent;be.x=be.xScale(be.xIndex),be.canvasX=be.x*be.model.canvasPixelRatio,D(pe,Se,N),m.select(this).attr("transform",function(Oe){return t(Oe.x,0)}),Se.contextLayer&&Se.contextLayer.render(Se.panels,!1,!A(Se)),Se.focusLayer&&Se.focusLayer.render(Se.panels),Se.pickLayer&&Se.pickLayer.render(Se.panels,!0),X.linePickActive(!0),G&&G.axesMoved&&G.axesMoved(Se.key,Se.dimensions.map(function(Oe){return Oe.crossfilterDimensionIndex}))})),pe.exit().remove();var ce=pe.selectAll("."+h.cn.axisOverlays).data(u,a);ce.enter().append("g").classed(h.cn.axisOverlays,!0),ce.selectAll("."+h.cn.axis).remove();var de=ce.selectAll("."+h.cn.axis).data(u,a);de.enter().append("g").classed(h.cn.axis,!0),de.each(function(be){var Se=be.model.height/be.model.tickDistance,Oe=be.domainScale,De=Oe.domain();m.select(this).call(m.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Se,be.tickFormat).tickValues(be.ordinal?De:null).tickFormat(function(je){return o.isOrdinal(be)?je:F(be.model.dimensions[be.visibleIndex],je)}).scale(Oe)),r.font(de.selectAll("text"),be.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",i.makeTextShadow(U)).style("cursor","default");var xe=ce.selectAll("."+h.cn.axisHeading).data(u,a);xe.enter().append("g").classed(h.cn.axisHeading,!0);var _e=xe.selectAll("."+h.cn.axisTitle).data(u,a);_e.enter().append("text").classed(h.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events","auto"),_e.text(function(be){return be.label}).each(function(be){var Se=m.select(this);r.font(Se,be.model.labelFont),i.convertToTspans(Se,V)}).attr("transform",function(be){var Se=E(be.model.labelAngle,be.model.labelSide),Oe=h.axisTitleOffset;return(Se.dir>0?"":t(0,2*Oe+be.model.height))+n(Se.degrees)+t(-Oe*Se.dx,-Oe*Se.dy)}).attr("text-anchor",function(be){var Se=E(be.model.labelAngle,be.model.labelSide);return 2*Math.abs(Se.dx)>Math.abs(Se.dy)?Se.dir*Se.dx<0?"start":"end":"middle"});var we=ce.selectAll("."+h.cn.axisExtent).data(u,a);we.enter().append("g").classed(h.cn.axisExtent,!0);var Ee=we.selectAll("."+h.cn.axisExtentTop).data(u,a);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,a);fe.enter().append("text").classed(h.cn.axisExtentTopText,!0).call(S),fe.text(function(be){return H(be,!0)}).each(function(be){r.font(m.select(this),be.model.rangeFont)});var ge=we.selectAll("."+h.cn.axisExtentBottom).data(u,a);ge.enter().append("g").classed(h.cn.axisExtentBottom,!0),ge.attr("transform",function(be){return t(0,be.model.height+h.axisExtentOffset)});var ke=ge.selectAll("."+h.cn.axisExtentBottomText).data(u,a);ke.enter().append("text").classed(h.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(S),ke.text(function(be){return H(be,!1)}).each(function(be){r.font(m.select(this),be.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":893,"./helpers":895,"./lines":897,"@plotly/d3":58,"color-rgba":91}],900:[function(v,$,te){var m=v("./parcoords"),g=v("../../lib/prepare_regl"),b=v("./helpers").isVisible,y={};function e(n,t,i){var r=t.indexOf(i),d=n.indexOf(r);return d===-1&&(d+=t.length),d}($.exports=function(n,t){var i=n._fullLayout;if(g(n,[],y)){var r={},d={},l={},a={},u=i._size;t.forEach(function(f,o){var h=f[0].trace;l[o]=h.index;var p=a[o]=h._fullInput.index;r[o]=n.data[p].dimensions,d[o]=n.data[p].dimensions.slice()}),m(n,t,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:function(f,o,h){var p=d[f][o],s=h.map(function(k){return k.slice()}),x="dimensions["+o+"].constraintrange",c=i._tracePreGUI[n._fullData[l[f]]._fullInput.uid];if(c[x]===void 0){var T=p.constraintrange;c[x]=T||null}var _=n._fullData[l[f]].dimensions[o];s.length?(s.length===1&&(s=s[0]),p.constraintrange=s,_.constraintrange=s.slice(),s=[s]):(delete p.constraintrange,delete _.constraintrange,s=null);var w={};w[x]=s,n.emit("plotly_restyle",[w,[a[f]]])},hover:function(f){n.emit("plotly_hover",f)},unhover:function(f){n.emit("plotly_unhover",f)},axesMoved:function(f,o){var h=function(p,s){return function(x,c){return e(p,s,x)-e(p,s,c)}}(o,d[f].filter(b));r[f].sort(h),d[f].filter(function(p){return!b(p)}).sort(function(p){return d[f].indexOf(p)}
1353).forEach(function(p){r[f].splice(r[f].indexOf(p),1),r[f].splice(d[f].indexOf(p),0,p)}),n.emit("plotly_restyle",[{dimensions:[r[f]]},[a[f]]])}})}}).reglPrecompiled=y},{"../../lib/prepare_regl":516,"./helpers":895,"./parcoords":899}],901:[function(v,$,te){var m=v("../../plots/attributes"),g=v("../../plots/domain").attributes,b=v("../../plots/font_attributes"),y=v("../../components/color/attributes"),e=v("../../plots/template_attributes").hovertemplateAttrs,n=v("../../plots/template_attributes").texttemplateAttrs,t=v("../../lib/extend").extendFlat,i=b({editType:"plot",arrayOk:!0,colorEditType:"plot"});$.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:y.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({},m.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({},i,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:t({},i,{}),outsidetextfont:t({},i,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:t({},i,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:g({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({},i,{}),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}],902:[function(v,$,te){var m=v("../../plots/plots");te.name="pie",te.plot=function(g,b,y,e){m.plotBasePlot(te.name,g,b,y,e)},te.clean=function(g,b,y,e){m.cleanBasePlot(te.name,g,b,y,e)}},{"../../plots/plots":619}],903:[function(v,$,te){var m=v("fast-isnumeric"),g=v("tinycolor2"),b=v("../../components/color"),y={};function e(t){return function(i,r){return!!i&&!!(i=g(i)).isValid()&&(i=b.addOpacity(i,i.getAlpha()),t[r]||(t[r]=i),i)}}function n(t,i){var r,d=JSON.stringify(t),l=i[d];if(!l){for(l=t.slice(),r=0;r<t.length;r++)l.push(g(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)l.push(g(t[r]).darken(20).toHexString());i[d]=l}return l}$.exports={calc:function(t,i){var r,d,l=[],a=t._fullLayout,u=a.hiddenlabels||[],f=i.labels,o=i.marker.colors||[],h=i.values,p=i._length,s=i._hasValues&&p;if(i.dlabel)for(f=new Array(p),r=0;r<p;r++)f[r]=String(i.label0+r*i.dlabel);var x={},c=e(a["_"+i.type+"colormap"]),T=0,_=!1;for(r=0;r<p;r++){var w,k,L;if(s){if(w=h[r],!m(w))continue;w=+w}else w=1;(k=f[r])!==void 0&&k!==""||(k=r);var A=x[k=String(k)];A===void 0?(x[k]=l.length,(L=u.indexOf(k)!==-1)||(T+=w),l.push({v:w,label:k,color:c(o[r],k),i:r,pts:[r],hidden:L})):(_=!0,(d=l[A]).v+=w,d.pts.push(r),d.hidden||(T+=w),d.color===!1&&o[r]&&(d.color=c(o[r],k)))}return l=l.filter(function(I){return I.v>=0}),(i.type==="funnelarea"?_:i.sort)&&l.sort(function(I,P){return P.v-I.v}),l[0]&&(l[0].vTotal=T),l},crossTraceCalc:function(t,i){var r=(i||{}).type;r||(r="pie");var d=t._fullLayout,l=t.calcdata,a=d[r+"colorway"],u=d["_"+r+"colormap"];d["extend"+r+"colors"]&&(a=n(a,y));for(var f=0,o=0;o<l.length;o++){var h=l[o];if(h[0].trace.type===r)for(var p=0;p<h.length;p++){var s=h[p];s.color===!1&&(u[s.label]?s.color=u[s.label]:(u[s.label]=s.color=a[f%a.length],f++))}}},makePullColorFn:e,generateExtendedColors:n}},{"../../components/color":366,"fast-isnumeric":190,tinycolor2:312}],904:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("./attributes"),y=v("../../plots/domain").defaults,e=v("../bar/defaults").handleText;
1353function n(t,i){var r=Array.isArray(t),d=g.isArrayOrTypedArray(i),l=Math.min(r?t.length:1/0,d?i.length:1/0);if(isFinite(l)||(l=0),l&&d){for(var a,u=0;u<l;u++){var f=i[u];if(m(f)&&f>0){a=!0;break}}a||(l=0)}return{hasLabels:r,hasValues:d,len:l}}$.exports={handleLabelsAndValues:n,supplyDefaults:function(t,i,r,d){function l(c,T){return g.coerce(t,i,b,c,T)}var a=n(l("labels"),l("values")),u=a.len;if(i._hasLabels=a.hasLabels,i._hasValues=a.hasValues,!i._hasLabels&&i._hasValues&&(l("label0"),l("dlabel")),u){i._length=u,l("marker.line.width")&&l("marker.line.color"),l("marker.colors"),l("scalegroup");var f,o=l("text"),h=l("texttemplate");if(h||(f=l("textinfo",Array.isArray(o)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),h||f&&f!=="none"){var p=l("textposition");e(t,i,d,l,p,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(p)||p==="auto"||p==="outside")&&l("automargin"),(p==="inside"||p==="auto"||Array.isArray(p))&&l("insidetextorientation")}y(i,d,l);var s=l("hole");if(l("title.text")){var x=l("title.position",s?"middle center":"top center");s||x!=="middle center"||(i.title.position="top center"),g.coerceFont(l,"title.font",d.font)}l("sort"),l("direction"),l("rotation"),l("pull")}else i.visible=!1}}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"./attributes":901,"fast-isnumeric":190}],905:[function(v,$,te){var m=v("../../components/fx/helpers").appendArrayMultiPointValues;$.exports=function(g,b){var y={curveNumber:b.index,pointNumbers:g.pts,data:b._input,fullData:b,label:g.label,color:g.color,value:g.v,percent:g.percent,text:g.text,bbox:g.bbox,v:g.v};return g.pts.length===1&&(y.pointNumber=y.i=g.pts[0]),m(y,b,g.pts),b.type==="funnelarea"&&(delete y.v,delete y.i),y}},{"../../components/fx/helpers":402}],906:[function(v,$,te){var m=v("../../lib");function g(b){return b.indexOf("e")!==-1?b.replace(/[.]?0+e/,"e"):b.indexOf(".")!==-1?b.replace(/[.]?0+$/,""):b}te.formatPiePercent=function(b,y){var e=g((100*b).toPrecision(3));return m.numSeparate(e,y)+"%"},te.formatPieValue=function(b,y){var e=g(b.toPrecision(10));return m.numSeparate(e,y)},te.getFirstFilled=function(b,y){if(Array.isArray(b))for(var e=0;e<y.length;e++){var n=b[y[e]];if(n||n===0||n==="")return n}},te.castOption=function(b,y){return Array.isArray(b)?te.getFirstFilled(b,y):b||void 0},te.getRotationAngle=function(b){return(b==="auto"?0:b)*Math.PI/180}},{"../../lib":503}],907:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults").supplyDefaults,supplyLayoutDefaults:v("./layout_defaults"),layoutAttributes:v("./layout_attributes"),calc:v("./calc").calc,crossTraceCalc:v("./calc").crossTraceCalc,plot:v("./plot").plot,style:v("./style"),styleOne:v("./style_one"),moduleType:"trace",name:"pie",basePlotModule:v("./base_plot"),categories:["pie-like","pie","showLegend"],meta:{}}},{"./attributes":901,"./base_plot":902,"./calc":903,"./defaults":904,"./layout_attributes":908,"./layout_defaults":909,"./plot":910,"./style":911,"./style_one":912}],908:[function(v,$,te){$.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],909:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y){function e(n,t){return m.coerce(b,y,g,n,t)}e("hiddenlabels"),e("piecolorway",y.colorway),e("extendpiecolors")}},{"../../lib":503,"./layout_attributes":908}],910:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../plots/plots"),b=v("../../components/fx"),y=v("../../components/color"),e=v("../../components/drawing"),n=v("../../lib"),t=n.strScale,i=n.strTranslate,r=v("../../lib/svg_text_utils"),d=v("../bar/uniform_text"),l=d.recordMinTextSize,a=d.clearMinTextSize,u=v("../bar/constants").TEXTPAD,f=v("./helpers"),o=v("./event_data"),h=v("../../lib").isValidTextValue;function p(Z,K,G){var W=G[0],Q=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(ee){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,ee.pts)],_module:N._module},j,0)),J==="all"&&(J="label+text+value+percent+name"),X.hovertemplate||J!=="none"&&J!=="skip"&&J){var re=ee.rInscribed||0,ne=Q+ee.pxmid[0]*(1-re),se=R+ee.pxmid[1]*(1-re),oe=j.separators,pe=[];if(J&&J.indexOf("label")!==-1&&pe.push(ee.label),ee.text=f.castOption(X.hovertext||X.text,ee.pts),J&&J.indexOf("text")!==-1){var ce=ee.text;n.isValidTextValue(ce)&&pe.push(ce)}ee.value=ee.v,ee.valueLabel=f.formatPieValue(ee.v,oe),J&&J.indexOf("value")!==-1&&pe.push(ee.valueLabel),ee.percent=ee.v/W.vTotal,ee.percentLabel=f.formatPiePercent(ee.percent,oe),J&&J.indexOf("percent")!==-1&&pe.push(ee.percentLabel);var de=X.hoverlabel,xe=de.font,_e=[];b.loneHover({trace:N,x0:ne-re*W.r,x1:ne+re*W.r,y:se,_x0:U?Q+ee.TL[0]:ne-re*W.r,_x1:U?Q+ee.TR[0]:ne+re*W.r,_y0:U?R+ee.TL[1]:se-re*W.r,_y1:U?R+ee.BL[1]:se+re*W.r,text:pe.join("<br>"),name:X.hovertemplate||J.indexOf("name")!==-1?X.name:void 0,idealAlign:ee.pxmid[0]<0?"left":"right",color:f.castOption(de.bgcolor,ee.pts)||ee.color,borderColor:f.castOption(de.bordercolor,ee.pts),fontFamily:f.castOption(xe.family,ee.pts),fontSize:f.castOption(xe.size,ee.pts),fontColor:f.castOption(xe.color,ee.pts),nameLength:f.castOption(de.namelength,ee.pts),textAlign:f.castOption(de.align,ee.pts),hovertemplate:f.castOption(X.hovertemplate,ee.pts),hovertemplateLabels:ee,eventData:[o(ee,X)]},{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:K,inOut_bbox:_e}),ee.bbox=_e[0],N._hasHoverLabel=!0}N._hasHoverEvent=!0,K.emit("plotly_hover",{points:[o(ee,X)],event:m.event})}}),Z.on("mouseout",function(ee){var j=K._fullLayout,X=K._fullData[N.index],J=m.select(this).datum(
1353);N._hasHoverEvent&&(ee.originalEvent=m.event,K.emit("plotly_unhover",{points:[o(J,X)],event:m.event}),N._hasHoverEvent=!1),N._hasHoverLabel&&(b.loneUnhover(j._hoverlayer.node()),N._hasHoverLabel=!1)}),Z.on("click",function(ee){var j=K._fullLayout,X=K._fullData[N.index];K._dragging||j.hovermode===!1||(K._hoverdata=[o(ee,X)],b.click(K,m.event))})}function s(Z,K,G){var W=f.castOption(Z.insidetextfont.color,K.pts);!W&&Z._input.textfont&&(W=f.castOption(Z._input.textfont.color,K.pts));var Q=f.castOption(Z.insidetextfont.family,K.pts)||f.castOption(Z.textfont.family,K.pts)||G.family,R=f.castOption(Z.insidetextfont.size,K.pts)||f.castOption(Z.textfont.size,K.pts)||G.size;return{color:W||y.contrast(K.color),family:Q,size:R}}function x(Z,K){for(var G,W,Q=0;Q<Z.length;Q++)if((W=(G=Z[Q][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);G.titleBox={width:U.width,height:U.height},N.remove()}}function c(Z,K,G){var W=G.r||K.rpx1,Q=K.rInscribed;if(K.startangle===K.stopangle)return{rCenter:1-Q,scale:0,rotate:0,textPosAngle:0};var R,N=K.ring,U=N===1&&Math.abs(K.startangle-K.stopangle)===2*Math.PI,ee=K.halfangle,j=K.midangle,X=G.trace.insidetextorientation,J=X==="horizontal",re=X==="tangential",ne=X==="radial",se=X==="auto",oe=[];if(!se){var pe,ce=function(fe,ge){if(function(Oe,De){var je=Oe.startangle,Je=Oe.stopangle;return je>De&&De>Je||je<De&&De<Je}(K,fe)){var ke=Math.abs(fe-K.startangle),be=Math.abs(fe-K.stopangle),Se=ke<be?ke:be;(R=ge==="tan"?_(Z,W,N,Se,0):T(Z,W,N,Se,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:Q*W*2/de,rCenter:1-Q,rotate:0}).textPosAngle=(K.startangle+K.stopangle)/2,R.scale>=1)return R;oe.push(R)}(se||ne)&&((R=T(Z,W,N,ee,j)).textPosAngle=(K.startangle+K.stopangle)/2,oe.push(R)),(se||re)&&((R=_(Z,W,N,ee,j)).textPosAngle=(K.startangle+K.stopangle)/2,oe.push(R));for(var xe=0,_e=0,we=0;we<oe.length;we++){var Ee=oe[we].scale;if(_e<Ee&&(_e=Ee,xe=we),!se&&_e>=1)break}return oe[xe]}function T(Z,K,G,W,Q){K=Math.max(0,K-2*u);var R=Z.width/Z.height,N=L(R,W,K,G);return{scale:2*N/Z.height,rCenter:w(R,N/K),rotate:k(Q)}}function _(Z,K,G,W,Q){K=Math.max(0,K-2*u);var R=Z.height/Z.width,N=L(R,W,K,G);return{scale:2*N/Z.width,rCenter:w(R,N/K),rotate:k(Q+Math.PI/2)}}function w(Z,K){return Math.cos(K)-Z*K}function k(Z){return(180/Math.PI*Z+720)%180-90}function L(Z,K,G,W){var Q=Z+1/(2*Math.tan(K));return G*Math.min(1/(Math.sqrt(Q*Q+.5)+Q),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 G=K.pxmid[0],W=K.pxmid[1],Q=Z.width/2,R=Z.height/2;return G<0&&(Q*=-1),W<0&&(R*=-1),{scale:1,rCenter:1,rotate:0,x:Q+Math.abs(R)*(Q>0?1:-1)/2,y:R/(1+G*G/(W*W)),outside:!0}}function P(Z,K){var G,W,Q,R=Z.trace,N={x:Z.cx,y:Z.cy},U={tx:0,ty:0};U.ty+=R.title.font.size,Q=E(R),R.title.position.indexOf("top")!==-1?(N.y-=(1+Q)*Z.r,U.ty-=Z.titleBox.height):R.title.position.indexOf("bottom")!==-1&&(N.y+=(1+Q)*Z.r);var ee,j,X=(ee=Z.r,j=Z.trace.aspectratio,ee/(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+Q)*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+Q)*X,U.tx-=Z.titleBox.width/2),G=J/Z.titleBox.width,W=S(Z,K)/Z.titleBox.height,{x:N.x,y:N.y,scale:Math.min(G,W),tx:U.tx,ty:U.ty}}function S(Z,K){var G=Z.trace,W=K.h*(G.domain.y[1]-G.domain.y[0]);return Math.min(Z.titleBox.height,W/2)}function E(Z){var K,G=Z.pull;if(!G)return 0;if(Array.isArray(G))for(G=0,K=0;K<Z.pull.length;K++)Z.pull[K]>G&&(G=Z.pull[K]);return G}function D(Z,K){for(var G=[],W=0;W<Z.length;W++){var Q=Z[W][0],R=Q.trace,N=R.domain,U=K.w*(N.x[1]-N.x[0]),ee=K.h*(N.y[1]-N.y[0]);R.title.text&&R.title.position!=="middle center"&&(ee-=S(Q,K));var j=U/2,X=ee/2;R.type!=="funnelarea"||R.scalegroup||(X/=R.aspectratio),Q.r=Math.min(j,X)/(1+E(R)),Q.cx=K.l+K.w*(R.domain.x[1]+R.domain.x[0])/2,Q.cy=K.t+K.h*(1-R.domain.y[0])-ee/2,R.title.text&&R.title.position.indexOf("bottom")!==-1&&(Q.cy-=S(Q,K)),R.scalegroup&&G.indexOf(R.scalegroup)===-1&&G.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 _e,we;oe.aspectratio>1?(_e=ne.r,we=_e/oe.aspectratio):(we=ne.r,_e=we*oe.aspectratio),_e*=(1+oe.baseratio)/2,xe=_e*we}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,G)}function F(Z,K){return[Z*Math.sin(K),-Z*Math.cos(K)]}function H(Z,K,G){var W=Z._fullLayout,Q=G.trace,R=Q.texttemplate,N=Q.textinfo;if(!R&&N&&N!=="none"){var U,ee=N.split("+"),j=function(xe){return ee.indexOf(xe)!==-1},X=j("label"),J=j("text"),re=j("value"),ne=j("percent"),se=W.separators;
vendor: 4,085 bytes, line 1353
1353if(U=X?[K.label]:[],J){var oe=f.getFirstFilled(Q.text,K.pts);h(oe)&&U.push(oe)}re&&U.push(f.formatPieValue(K.v,se)),ne&&U.push(f.formatPiePercent(K.v/G.vTotal,se)),K.text=U.join("<br>")}if(R){var pe=n.castOption(Q,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/G.vTotal,percentLabel:f.formatPiePercent(xe.v/G.vTotal,W.separators),color:xe.color,text:xe.text,customdata:n.castOption(Q,xe.i,"customdata")}}(K),de=f.getFirstFilled(Q.text,K.pts);(h(de)||de==="")&&(ce.text=de),K.text=n.texttemplateString(pe,ce,Z._fullLayout._d3locale,ce,Q._meta||{})}else K.text=""}}function V(Z,K){var G=Z.rotate*Math.PI/180,W=Math.cos(G),Q=Math.sin(G),R=(K.left+K.right)/2,N=(K.top+K.bottom)/2;Z.textX=R*W-N*Q,Z.textY=R*Q+N*W,Z.noCenter=!0}$.exports={plot:function(Z,K){var G=Z._fullLayout,W=G._size;a("pie",G),x(K,Z),D(K,W);var Q=n.makeTraceGroups(G._pielayer,K,"trace").each(function(R){var N=m.select(this),U=R[0],ee=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=m.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,_e){if(xe.hidden)m.select(this).selectAll("path,g").remove();else{xe.pointNumber=xe.i,xe.curveNumber=ee.index,X[xe.pxmid[1]<0?0:1][xe.pxmid[0]<0?0:1].push(xe);var we=U.cx,Ee=U.cy,fe=m.select(this),ge=fe.selectAll("path.surface").data([xe]);if(ge.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),fe.call(p,Z,R),ee.pull){var ke=+f.castOption(ee.pull,xe.pts)||0;ke>0&&(we+=ke*xe.pxmid[0],Ee+=ke*xe.pxmid[1])}xe.cxFinal=we,xe.cyFinal=Ee;var be=ee.hole;if(xe.v===U.vTotal){var Se="M"+(we+xe.px0[0])+","+(Ee+xe.px0[1])+ze(xe.px0,xe.pxmid,!0,1)+ze(xe.pxmid,xe.px0,!0,1)+"Z";be?ge.attr("d","M"+(we+be*xe.px0[0])+","+(Ee+be*xe.px0[1])+ze(xe.px0,xe.pxmid,!1,be)+ze(xe.pxmid,xe.px0,!1,be)+"Z"+Se):ge.attr("d",Se)}else{var Oe=ze(xe.px0,xe.px1,!0,1);if(be){var De=1-be;ge.attr("d","M"+(we+be*xe.px1[0])+","+(Ee+be*xe.px1[1])+ze(xe.px1,xe.px0,!1,be)+"l"+De*xe.px0[0]+","+De*xe.px0[1]+Oe+"Z")}else ge.attr("d","M"+we+","+Ee+"l"+xe.px0[0]+","+xe.px0[1]+Oe+"Z")}H(Z,xe,U);var je=f.castOption(ee.textposition,xe.pts),Je=fe.selectAll("g.slicetext").data(xe.text&&je!=="none"?[0]:[]);Je.enter().append("g").classed("slicetext",!0),Je.exit().remove(),Je.each(function(){var Ue=n.ensureSingle(m.select(this),"text","",function(nt){nt.attr("data-notex",1)}),Ge=n.ensureUniformFontSize(Z,je==="outside"?function(nt,Qe,Et){var Gt=f.castOption(nt.outsidetextfont.color,Qe.pts)||f.castOption(nt.textfont.color,Qe.pts)||Et.color,Xt=f.castOption(nt.outsidetextfont.family,Qe.pts)||f.castOption(nt.textfont.family,Qe.pts)||Et.family,Fe=f.castOption(nt.outsidetextfont.size,Qe.pts)||f.castOption(nt.textfont.size,Qe.pts)||Et.size;return{color:Gt,family:Xt,size:Fe}}(ee,xe,G.font):s(ee,xe,G.font));Ue.text(xe.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(e.font,Ge).call(r.convertToTspans,Z);var Ye,et=e.bBox(Ue.node());if(je==="outside")Ye=I(et,xe);else if(Ye=c(et,xe,U),je==="auto"&&Ye.scale<1){var ct=n.ensureUniformFontSize(Z,ee.outsidetextfont);Ue.call(e.font,ct),Ye=I(et=e.bBox(Ue.node()),xe)}var mt=Ye.textPosAngle,Ct=mt===void 0?xe.pxmid:F(U.r,mt);if(Ye.targetX=we+Ct[0]*Ye.rCenter+(Ye.x||0),Ye.targetY=Ee+Ct[1]*Ye.rCenter+(Ye.y||0),V(Ye,et),Ye.outside){var Tt=Ye.targetY;xe.yLabelMin=Tt-et.height/2,xe.yLabelMid=Tt,xe.yLabelMax=Tt+et.height/2,xe.labelExtraX=0,xe.labelExtraY=0,J=!0}
1353Ye.fontSize=Ge.size,l(ee.type,Ye,G),R[_e].transform=Ye,Ue.attr("transform",n.getTextTransform(Ye))})}function ze(Ue,Ge,Ye,et){var ct=et*(Ge[0]-Ue[0]),mt=et*(Ge[1]-Ue[1]);return"a"+et*U.r+","+et*U.r+" 0 "+xe.largeArc+(Ye?" 1 ":" 0 ")+ct+","+mt}});var re=m.select(this).selectAll("g.titletext").data(ee.title.text?[0]:[]);if(re.enter().append("g").classed("titletext",!0),re.exit().remove(),re.each(function(){var xe,_e=n.ensureSingle(m.select(this),"text","",function(Ee){Ee.attr("data-notex",1)}),we=ee.title.text;ee._meta&&(we=n.templateString(we,ee._meta)),_e.text(we).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(e.font,ee.title.font).call(r.convertToTspans,Z),xe=ee.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),_e.attr("transform",i(xe.x,xe.y)+t(Math.min(1,xe.scale))+i(xe.tx,xe.ty))}),J&&function(xe,_e){var we,Ee,fe,ge,ke,be,Se,Oe,De,je,Je,ze,Ue;function Ge(mt,Ct){return mt.pxmid[1]-Ct.pxmid[1]}function Ye(mt,Ct){return Ct.pxmid[1]-mt.pxmid[1]}function et(mt,Ct){Ct||(Ct={});var Tt,nt,Qe,Et,Gt=Ct.labelExtraY+(Ee?Ct.yLabelMax:Ct.yLabelMin),Xt=Ee?mt.yLabelMin:mt.yLabelMax,Fe=Ee?mt.yLabelMax:mt.yLabelMin,qe=mt.cyFinal+ke(mt.px0[1],mt.px1[1]),wt=Gt-Xt;if(wt*Se>0&&(mt.labelExtraY=wt),Array.isArray(_e.pull))for(nt=0;nt<je.length;nt++)(Qe=je[nt])===mt||(f.castOption(_e.pull,mt.pts)||0)>=(f.castOption(_e.pull,Qe.pts)||0)||((mt.pxmid[1]-Qe.pxmid[1])*Se>0?(wt=Qe.cyFinal+ke(Qe.px0[1],Qe.px1[1])-Xt-mt.labelExtraY)*Se>0&&(mt.labelExtraY+=wt):(Fe+mt.labelExtraY-qe)*Se>0&&(Tt=3*be*Math.abs(nt-je.indexOf(mt)),(Et=Qe.cxFinal+ge(Qe.px0[0],Qe.px1[0])+Tt-(mt.cxFinal+mt.pxmid[0])-mt.labelExtraX)*be>0&&(mt.labelExtraX+=Et)))}for(Ee=0;Ee<2;Ee++)for(fe=Ee?Ge:Ye,ke=Ee?Math.max:Math.min,Se=Ee?1:-1,we=0;we<2;we++){for(ge=we?Math.max:Math.min,be=we?1:-1,(Oe=xe[Ee][we]).sort(fe),De=xe[1-Ee][we],je=De.concat(Oe),ze=[],Je=0;Je<Oe.length;Je++)Oe[Je].yLabelMid!==void 0&&ze.push(Oe[Je]);for(Ue=!1,Je=0;Ee&&Je<De.length;Je++)if(De[Je].yLabelMid!==void 0){Ue=De[Je];break}for(Je=0;Je<ze.length;Je++){var ct=Je&&ze[Je-1];Ue&&!Je&&(ct=Ue),et(ze[Je],ct)}}}(X,ee),function(xe,_e){xe.each(function(we){var Ee=m.select(this);if(we.labelExtraX||we.labelExtraY){var fe=Ee.select("g.slicetext text");we.transform.targetX+=we.labelExtraX,we.transform.targetY+=we.labelExtraY,fe.attr("transform",n.getTextTransform(we.transform));var ge=we.cxFinal+we.pxmid[0],ke="M"+ge+","+(we.cyFinal+we.pxmid[1]),be=(we.yLabelMax-we.yLabelMin)*(we.pxmid[0]<0?-1:1)/4;if(we.labelExtraX){var Se=we.labelExtraX*we.pxmid[1]/we.pxmid[0],Oe=we.yLabelMid+we.labelExtraY-(we.cyFinal+we.pxmid[1]);Math.abs(Se)>Math.abs(Oe)?ke+="l"+Oe*we.pxmid[0]/we.pxmid[1]+","+Oe+"H"+(ge+we.labelExtraX+be):ke+="l"+we.labelExtraX+","+Se+"v"+(Oe-Se)+"h"+be}else ke+="V"+(we.yLabelMid+we.labelExtraY)+"h"+be;n.ensureSingle(Ee,"path","textline").call(y.stroke,_e.outsidetextfont.color).attr({"stroke-width":Math.min(2,_e.outsidetextfont.size/8),d:ke,fill:"none"})}else Ee.select("path.textline").remove()})}(j,ee),J&&ee.automargin){var ne=e.bBox(N.node()),se=ee.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;g.autoMargin(Z,"pie."+ee.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(){Q.selectAll("tspan").each(function(){var R=m.select(this);R.attr("dy")&&R.attr("dy",R.attr("dy"))})}
1353,0)},formatSliceLabel:H,transformInsideText:c,determineInsideTextFont:s,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":905,"./helpers":906,"@plotly/d3":58}],911:[function(v,$,te){var m=v("@plotly/d3"),g=v("./style_one"),b=v("../bar/uniform_text").resizeText;$.exports=function(y){var e=y._fullLayout._pielayer.selectAll(".trace");b(y,e,"pie"),e.each(function(n){var t=n[0].trace,i=m.select(this);i.style({opacity:t.opacity}),i.selectAll("path.surface").each(function(r){m.select(this).call(g,r,t)})})}},{"../bar/uniform_text":664,"./style_one":912,"@plotly/d3":58}],912:[function(v,$,te){var m=v("../../components/color"),g=v("./helpers").castOption;$.exports=function(b,y,e){var n=e.marker.line,t=g(n.color,y.pts)||m.defaultLine,i=g(n.width,y.pts)||0;b.style("stroke-width",i).call(m.fill,y.color).call(m.stroke,t)}},{"../../components/color":366,"./helpers":906}],913:[function(v,$,te){var m=v("../scatter/attributes");$.exports={x:m.x,y:m.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:m.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":927}],914:[function(v,$,te){var m=v("../../../stackgl_modules").gl_pointcloud2d,g=v("../../lib/str2rgbarray"),b=v("../../plots/cartesian/autorange").findExtremes,y=v("../scatter/get_trace_color");function e(t,i){this.scene=t,this.uid=i,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=m(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var n=e.prototype;n.handlePick=function(t){var i=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*i],this.pickXYData[2*i+1]]:[this.pickXData[i],this.pickYData[i]],textLabel:Array.isArray(this.textLabels)?this.textLabels[i]:this.textLabels,color:this.color,name:this.name,pointIndex:i,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=y(t,{})},n.updateFast=function(t){var i,r,d,l,a,u,f=this.xData=this.pickXData=t.x,o=this.yData=this.pickYData=t.y,h=this.pickXYData=t.xy,p=t.xbounds&&t.ybounds,s=t.indices,x=this.bounds;if(h){if(d=h,i=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<i;u++)l=d[2*u],a=d[2*u+1],l<x[0]&&(x[0]=l),l>x[2]&&(x[2]=l),a<x[1]&&(x[1]=a),a>x[3]&&(x[3]=a);if(s)r=s;else for(r=new Int32Array(i),u=0;u<i;u++)r[u]=u}else for(i=f.length,d=new Float32Array(2*i),r=new Int32Array(i),u=0;u<i;u++)l=f[u],a=o[u],r[u]=u,d[2*u]=l,d[2*u+1]=a,l<x[0]&&(x[0]=l),l>x[2]&&(x[2]=l),a<x[1]&&(x[1]=a),a>x[3]&&(x[3]=a);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=d;var c=g(t.marker.color),T=g(t.marker.border.color),_=t.opacity*t.marker.opacity;c[3]*=_,this.pointcloudOptions.color=c;var w=t.marker.blend;w===null&&(w=f.length<100||o.length<100),this.pointcloudOptions.blend=w,T[3]*=_,this.pointcloudOptions.borderColor=T;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()},$.exports=function(t,i){var r=new e(t,i.uid);return r.update(i),r}},{"../../../stackgl_modules":1124,"../../lib/str2rgbarray":528,"../../plots/cartesian/autorange":553,"../scatter/get_trace_color":937}],915:[function(v,$,te){var m=v("../../lib"),g=v("./attributes");$.exports=function(b,y,e){function n(t,i){return m.coerce(b,y,g,t,i)}
1353n("x"),n("y"),n("xbounds"),n("ybounds"),b.xy&&b.xy instanceof Float32Array&&(y.xy=b.xy),b.indices&&b.indices instanceof Int32Array&&(y.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"),y._length=null}},{"../../lib":503,"./attributes":913}],916:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("../scatter3d/calc"),plot:v("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:v("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":596,"../scatter3d/calc":956,"./attributes":913,"./convert":914,"./defaults":915}],917:[function(v,$,te){var m=v("../../plots/font_attributes"),g=v("../../plots/attributes"),b=v("../../components/color/attributes"),y=v("../../components/fx/attributes"),e=v("../../plots/domain").attributes,n=v("../../plots/template_attributes").hovertemplateAttrs,t=v("../../components/colorscale/attributes"),i=v("../../plot_api/plot_template").templatedArray,r=v("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,d=v("../../lib/extend").extendFlat,l=v("../../plot_api/edit_types").overrideAll;($.exports=l({hoverinfo:d({},g.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:y.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:m({}),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:y.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:y.hoverlabel,hovertemplate:n({},{keys:["value","label"]}),colorscales:i("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}],918:[function(v,$,te){var m=v("../../plot_api/edit_types").overrideAll,g=v("../../plots/get_data").getModuleCalcData,b=v("./plot"),y=v("../../components/fx/layout_attributes"),e=v("../../lib/setcursor"),n=v("../../components/dragelement"),t=v("../../plots/cartesian/select").prepSelect,i=v("../../lib"),r=v("../../registry");function d(l,a){var u=l._fullData[a],f=l._fullLayout,o=f.dragmode,h=f.dragmode==="pan"?"move":"crosshair",p=u._bgRect;if(o!=="pan"&&o!=="zoom"){e(p,h);var s={_id:"x",c2p:i.identity,_offset:u._sankey.translateX,_length:u._sankey.width},x={_id:"y",c2p:i.identity,_offset:u._sankey.translateY,_length:u._sankey.height},c={gd:l,element:p.node(),plotinfo:{id:a,xaxis:s,yaxis:x,fillRangeItems:i.noop},subplot:a,xaxes:[s],yaxes:[x],doneFnCompleted:function(T){var _,w=l._fullData[a],k=w.node.groups.slice(),L=[];function A(E){for(var D=w._sankey.graph.nodes,F=0;F<D.length;F++)if(D[F].pointNumber===E)return D[F]}for(var I=0;I<T.length;I++){var P=A(T[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-w.node._count]=!1}else L.push(P.pointNumber)}
1353_=k.filter(Boolean).concat([L]),r.call("_guiRestyle",l,{"node.groups":[_]},a)},prepFn:function(T,_,w){t(T,_,w,c,o)}};n.init(c)}}te.name="sankey",te.baseLayoutAttrOverrides=m({hoverlabel:y.hoverlabel},"plot","nested"),te.plot=function(l){var a=g(l.calcdata,"sankey")[0];b(l,a),te.updateFx(l)},te.clean=function(l,a,u,f){var o=f._has&&f._has("sankey"),h=a._has&&a._has("sankey");o&&!h&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},te.updateFx=function(l){for(var a=0;a<l._fullData.length;a++)d(l,a)}},{"../../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":923}],919:[function(v,$,te){var m=v("strongly-connected-components"),g=v("../../lib"),b=v("../../lib/gup").wrap,y=g.isArrayOrTypedArray,e=g.isIndex,n=v("../../components/colorscale");function t(i){var r,d=i.node,l=i.link,a=[],u=y(l.color),f=y(l.customdata),o={},h={},p=l.colorscales.length;for(r=0;r<p;r++){var s=l.colorscales[r],x=n.extractScale(s,{cLetter:"c"}),c=n.makeColorScaleFunc(x);h[s.label]=c}var T=0;for(r=0;r<l.value.length;r++)l.source[r]>T&&(T=l.source[r]),l.target[r]>T&&(T=l.target[r]);var _,w=T+1;i.node._count=w;var k=i.node.groups,L={};for(r=0;r<k.length;r++){var A=k[r];for(_=0;_<A.length;_++){var I=A[_],P=w+r;L.hasOwnProperty(I)?g.warn("Node "+I+" is already part of a group."):L[I]=P}}var S={source:[],target:[]};for(r=0;r<l.value.length;r++){var E=l.value[r],D=l.source[r],F=l.target[r];if(E>0&&e(D,w)&&e(F,w)&&(!L.hasOwnProperty(D)||!L.hasOwnProperty(F)||L[D]!==L[F])){L.hasOwnProperty(F)&&(F=L[F]),L.hasOwnProperty(D)&&(D=L[D]),F=+F,o[D=+D]=o[F]=!0;var H="";l.label&&l.label[r]&&(H=l.label[r]);var V=null;H&&h.hasOwnProperty(H)&&(V=h[H]),a.push({pointNumber:r,label:H,color:u?l.color[r]:l.color,customdata:f?l.customdata[r]:l.customdata,concentrationscale:V,source:D,target:F,value:+E}),S.source.push(D),S.target.push(F)}}var Z=w+k.length,K=y(d.color),G=y(d.customdata),W=[];for(r=0;r<Z;r++)if(o[r]){var Q=d.label[r];W.push({group:r>w-1,childrenNodes:[],pointNumber:r,label:Q,color:K?d.color[r]:d.color,customdata:G?d.customdata[r]:d.customdata})}var R=!1;return function(N,U,ee){for(var j=g.init2dArray(N,0),X=0;X<Math.min(U.length,ee.length);X++)if(g.isIndex(U[X],N)&&g.isIndex(ee[X],N)){if(U[X]===ee[X])return!0;j[U[X]].push(ee[X])}return m(j).components.some(function(J){return J.length>1})}(Z,S.source,S.target)&&(R=!0),{circular:R,links:a,nodes:W,groups:k,groupLookup:L}}$.exports=function(i,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}],920:[function(v,$,te){$.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"}}},{}],921:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("../../components/color"),y=v("tinycolor2"),e=v("../../plots/domain").defaults,n=v("../../components/fx/hoverlabel_defaults"),t=v("../../plot_api/plot_template"),i=v("../../plots/array_container_defaults");function r(d,l){function a(u,f){return m.coerce(d,l,g.link.colorscales,u,f)}a("label"),a("cmin"),a("cmax"),a("colorscale")}$.exports=function(d,l,a,u){function f(L,A){return m.coerce(d,l,g,L,A)}var o=m.extendDeep(u.hoverlabel,d.hoverlabel),h=d.node,p=t.newContainer(l,"node");function s(L,A){return m.coerce(h,p,g.node,L,A)}s("label"),s("groups"),s("x"),s("y"),s("pad"),s("thickness"),s("line.color"),s("line.width"),s("hoverinfo",d.hoverinfo),n(h,p,s,o),s("hovertemplate");var x=u.colorway;s("color",p.label.map(function(L,A){return b.addOpacity(function(I){return x[I%x.length]}(A),.8)})),s("customdata");var c=d.link||{},T=t.newContainer(l,"link");function _(L,A){return m.coerce(c,T,g.link,L,A)}_("label"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",d.hoverinfo),n(c,T,_,o),_("hovertemplate");var w,k=y(u.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",m.repeat(k,T.value.length)),_("customdata"),i(c,T,{name:"colorscales",handleItemDefaults:r}),e(l,u,f),f("orientation"),f("valueformat"),f("valuesuffix"),p.x.length&&p.y.length&&(w="freeform"),f("arrangement",w),m.coerceFont(f,"textfont",m.extendFlat({},u.font)),l._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":917,tinycolor2:312}],922:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc"),plot:v("./plot"),moduleType:"trace",name:"sankey",basePlotModule:v("./base_plot"),selectPoints:v("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":917,"./base_plot":918,"./calc":919,"./defaults":921,"./plot":923,"./select.js":925}],923:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=g.numberFormat,y=v("./render"),e=v("../../components/fx"),n=v("../../components/color"),t=v("./constants").cn,i=g._;function r(c){return c!==""}function d(c,T){return c.filter(function(_){return _.key===T.traceId})}function l(c,T){m.select(c).select("path").style("fill-opacity",T),m.select(c).select("rect").style("fill-opacity",T)}
1353function a(c){m.select(c).select("text.name").style("fill","black")}function u(c){return function(T){return c.node.sourceLinks.indexOf(T.link)!==-1||c.node.targetLinks.indexOf(T.link)!==-1}}function f(c){return function(T){return T.node.sourceLinks.indexOf(c.link)!==-1||T.node.targetLinks.indexOf(c.link)!==-1}}function o(c,T,_){T&&_&&d(_,T).selectAll("."+t.sankeyLink).filter(u(T)).call(p.bind(0,T,_,!1))}function h(c,T,_){T&&_&&d(_,T).selectAll("."+t.sankeyLink).filter(u(T)).call(s.bind(0,T,_,!1))}function p(c,T,_,w){var k=w.datum().link.label;w.style("fill-opacity",function(L){if(!L.link.concentrationscale)return .4}),k&&d(T,c).selectAll("."+t.sankeyLink).filter(function(L){return L.link.label===k}).style("fill-opacity",function(L){if(!L.link.concentrationscale)return .4}),_&&d(T,c).selectAll("."+t.sankeyNode).filter(f(c)).call(o)}function s(c,T,_,w){var k=w.datum().link.label;w.style("fill-opacity",function(L){return L.tinyColorAlpha}),k&&d(T,c).selectAll("."+t.sankeyLink).filter(function(L){return L.link.label===k}).style("fill-opacity",function(L){return L.tinyColorAlpha}),_&&d(T,c).selectAll(t.sankeyNode).filter(f(c)).call(h)}function x(c,T){var _=c.hoverlabel||{},w=g.nestedProperty(_,T).get();return!Array.isArray(w)&&w}$.exports=function(c,T){for(var _=c._fullLayout,w=_._paper,k=_._size,L=0;L<c._fullData.length;L++)if(c._fullData[L].visible&&c._fullData[L].type===t.sankey&&!c._fullData[L]._viewInitial){var A=c._fullData[L].node;c._fullData[L]._viewInitial={node:{groups:A.groups.slice(),x:A.x.slice(),y:A.y.slice()}}}var I=i(c,"source:")+" ",P=i(c,"target:")+" ",S=i(c,"concentration:")+" ",E=i(c,"incoming flow count:")+" ",D=i(c,"outgoing flow count:")+" ";y(c,w,T,{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){c._fullLayout.hovermode!==!1&&(m.select(F).call(p.bind(0,H,V,!0)),H.link.trace.link.hoverinfo!=="skip"&&(H.link.fullData=H.link.trace,c.emit("plotly_hover",{event:m.event,points:[H.link]})))},follow:function(F,H){if(c._fullLayout.hovermode!==!1){var V=H.link.trace.link;if(V.hoverinfo!=="none"&&V.hoverinfo!=="skip"){for(var Z=[],K=0,G=0;G<H.flow.links.length;G++){var W=H.flow.links[G];if(c._fullLayout.hovermode!=="closest"||H.link.pointNumber===W.pointNumber){H.link.pointNumber===W.pointNumber&&(K=G),W.fullData=W.trace,V=H.link.trace.link;var Q=N(W),R={valueLabel:b(H.valueFormat)(W.value)+H.valueSuffix};Z.push({x:Q[0],y:Q[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:m.event.x<Q[0]?"right":"left",hovertemplate:V.hovertemplate,hovertemplateLabels:R,eventData:[W]})}}e.loneHover(Z,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:c,anchorIndex:K}).each(function(){H.link.concentrationscale||l(this,.65),a(this)})}}function N(U){var ee,j;U.circular?(ee=(U.circularPathData.leftInnerExtent+U.circularPathData.rightInnerExtent)/2,j=U.circularPathData.verticalFullExtent):(ee=(U.source.x1+U.target.x0)/2,j=(U.y0+U.y1)/2);var X=[ee,j];return U.trace.orientation==="v"&&X.reverse(),X[0]+=H.parent.translateX,X[1]+=H.parent.translateY,X}},unhover:function(F,H,V){c._fullLayout.hovermode!==!1&&(m.select(F).call(s.bind(0,H,V,!0)),H.link.trace.link.hoverinfo!=="skip"&&(H.link.fullData=H.link.trace,c.emit("plotly_unhover",{event:m.event,points:[H.link]})),e.loneUnhover(_._hoverlayer.node()))},select:function(F,H){var V=H.link;V.originalEvent=m.event,c._hoverdata=[V],e.click(c,{target:!0})}},nodeEvents:{hover:function(F,H,V){c._fullLayout.hovermode!==!1&&(m.select(F).call(o,H,V),H.node.trace.node.hoverinfo!=="skip"&&(H.node.fullData=H.node.trace,c.emit("plotly_hover",{event:m.event,points:[H.node]})))},follow:function(F,H){if(c._fullLayout.hovermode!==!1){var V=H.node.trace.node;if(V.hoverinfo!=="none"&&V.hoverinfo!=="skip"){var Z=m.select(F).select("."+t.nodeRect),K=c._fullLayout._paperdiv.node().getBoundingClientRect(),G=Z.node().getBoundingClientRect(),W=G.left-2-K.left,Q=G.right+2-K.left,R=G.top+G.height/4-K.top,N={valueLabel:b(H.valueFormat)(H.node.value)+H.valueSuffix};H.node.fullData=H.node.trace,c._fullLayout._calcInverseTransform(c);var U=c._fullLayout._invScaleX,ee=c._fullLayout._invScaleY,j=e.loneHover({x0:U*W,x1:U*Q,y:ee*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:c});l(j,.85),a(j)}}},unhover:function(F,H,V){c._fullLayout.hovermode!==!1&&(m.select(F).call(h,H,V),H.node.trace.node.hoverinfo!=="skip"&&(H.node.fullData=H.node.trace,c.emit("plotly_unhover",{event:m.event,points:[H.node]})),e.loneUnhover(_._hoverlayer.node()))},select:function(F,H,V){var Z=H.node;Z.originalEvent=m.event,c._hoverdata=[Z],m.select(F).call(h,H,V),e.click(c,{target:!0})}}})}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"./constants":920,"./render":924,"@plotly/d3":58}],924:[function(v,$,te){var m=v("d3-force"),g=v("d3-interpolate").interpolateNumber,b=v("@plotly/d3"),y=v("@plotly/d3-sankey"),e=v("@plotly/d3-sankey-circular"),n=v("./constants"),t=v("tinycolor2"),i=v("../../components/color"),r=v("../../components/drawing"),d=v("../../lib"),l=d.strTranslate,a=d.strRotate,u=v("../../lib/gup"),f=u.keyFun,o=u.repeat,h=u.unwrap,p=v("../../lib/svg_text_utils"),s=v("../../registry"),x=v("../../constants/alignment"),c=x.CAP_SHIFT,T=x.LINE_SPACING;function _(G,W,Q){var R,N=h(W),U=N.trace,ee=U.domain,j=U.orientation==="h",X=U.node.pad,J=U.node.thickness,re=G.width*(ee.x[1]-ee.x[0]),ne=G.height*(ee.y[1]-ee.y[0]),se=N._nodes,oe=N._links,pe=N.circular;(R=pe?e.sankeyCircular().circularLinkGap(0):y.sankey()).iterations(n.sankeyIterations).size(j?[re,ne]:[ne,re]).nodeWidth(J).nodePadding(X).nodeId(function(Se){return Se.pointNumber}).nodes(se).links(oe);var ce,de,xe,_e=R();for(var we 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[we]);for(ce=0;ce<_e.nodes.length;ce++)if(_e.nodes[ce].pointNumber===fe){Ee=_e.nodes[ce];break}if(Ee){var ge={pointNumber:parseInt(we),x0:Ee.x0,x1:Ee.x1,y0:Ee.y0,y1:Ee.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};_e.nodes.unshift(ge),Ee.childrenNodes.unshift(ge)}}if(function(){for(ce=0;ce<_e.nodes.length;
1353ce++){var Se,Oe,De=_e.nodes[ce],je={};for(de=0;de<De.targetLinks.length;de++)Se=(Oe=De.targetLinks[de]).source.pointNumber+":"+Oe.target.pointNumber,je.hasOwnProperty(Se)||(je[Se]=[]),je[Se].push(Oe);var Je=Object.keys(je);for(de=0;de<Je.length;de++){var ze=je[Se=Je[de]],Ue=0,Ge={};for(xe=0;xe<ze.length;xe++)Ge[(Oe=ze[xe]).label]||(Ge[Oe.label]=0),Ge[Oe.label]+=Oe.value,Ue+=Oe.value;for(xe=0;xe<ze.length;xe++)(Oe=ze[xe]).flow={value:Ue,labelConcentration:Ge[Oe.label]/Ue,concentration:Oe.value/Ue,links:ze},Oe.concentrationscale&&(Oe.color=t(Oe.concentrationscale(Oe.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++)(Oe=De.sourceLinks[de]).concentrationOut=Oe.value/Ye;var et=0;for(de=0;de<De.targetLinks.length;de++)et+=De.targetLinks[de].value;for(de=0;de<De.targetLinks.length;de++)(Oe=De.targetLinks[de]).concenrationIn=Oe.value/et}}(),U.node.x.length&&U.node.y.length){for(ce=0;ce<Math.min(U.node.x.length,U.node.y.length,_e.nodes.length);ce++)if(U.node.x[ce]&&U.node.y[ce]){var ke=[U.node.x[ce]*re,U.node.y[ce]*ne];_e.nodes[ce].x0=ke[0]-J/2,_e.nodes[ce].x1=ke[0]+J/2;var be=_e.nodes[ce].y1-_e.nodes[ce].y0;_e.nodes[ce].y0=ke[1]-be/2,_e.nodes[ce].y1=ke[1]+be/2}U.arrangement==="snap"&&function(Se){Se.forEach(function(Oe){var De,je,Je,ze=0,Ue=Oe.length;for(Oe.sort(function(Ge,Ye){return Ge.y0-Ye.y0}),Je=0;Je<Ue;++Je)(De=Oe[Je]).y0>=ze||(je=ze-De.y0)>1e-6&&(De.y0+=je,De.y1+=je),ze=De.y1+X})}(function(Se){var Oe,De,je=Se.map(function(Ye,et){return{x0:Ye.x0,index:et}}).sort(function(Ye,et){return Ye.x0-et.x0}),Je=[],ze=-1,Ue=-1/0;for(ce=0;ce<je.length;ce++){var Ge=Se[je[ce].index];Ge.x0>Ue+J&&(ze+=1,Oe=Ge.x0),Ue=Ge.x0,Je[ze]||(Je[ze]=[]),Je[ze].push(Ge),De=Oe-Ge.x0,Ge.x0+=De,Ge.x1+=De}return Je}(se=_e.nodes)),R.update(_e)}return{circular:pe,key:Q,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:ee.x[0]*G.width+G.margin.l,translateY:G.height-ee.y[1]*G.height+G.margin.t,dragParallel:j?ne:re,dragPerpendicular:j?re:ne,arrangement:U.arrangement,sankey:R,graph:_e,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function w(G,W,Q){var R=t(W.color),N=W.source.label+"|"+W.target.label+"__"+Q;return W.trace=G.trace,W.curveNumber=G.trace.index,{circular:G.circular,key:N,traceId:G.key,pointNumber:W.pointNumber,link:W,tinyColorHue:i.tinyRGB(R),tinyColorAlpha:R.getAlpha(),linkPath:k,linkLineColor:G.linkLineColor,linkLineWidth:G.linkLineWidth,valueFormat:G.valueFormat,valueSuffix:G.valueSuffix,sankey:G.sankey,parent:G,interactionState:G.interactionState,flow:W.flow}}function k(){return function(G){if(G.link.circular)return W=G.link,Q=W.width/2,R=W.circularPathData,W.circularLinkType==="top"?"M "+R.targetX+" "+(R.targetY+Q)+" L"+R.rightInnerExtent+" "+(R.targetY+Q)+"A"+(R.rightLargeArcRadius+Q)+" "+(R.rightSmallArcRadius+Q)+" 0 0 1 "+(R.rightFullExtent-Q)+" "+(R.targetY-R.rightSmallArcRadius)+"L"+(R.rightFullExtent-Q)+" "+R.verticalRightInnerExtent+"A"+(R.rightLargeArcRadius+Q)+" "+(R.rightLargeArcRadius+Q)+" 0 0 1 "+R.rightInnerExtent+" "+(R.verticalFullExtent-Q)+"L"+R.leftInnerExtent+" "+(R.verticalFullExtent-Q)+"A"+(R.leftLargeArcRadius+Q)+" "+(R.leftLargeArcRadius+Q)+" 0 0 1 "+(R.leftFullExtent+Q)+" "+R.verticalLeftInnerExtent+"L"+(R.leftFullExtent+Q)+" "+(R.sourceY-R.leftSmallArcRadius)+"A"+(R.leftLargeArcRadius+Q)+" "+(R.leftSmallArcRadius+Q)+" 0 0 1 "+R.leftInnerExtent+" "+(R.sourceY+Q)+"L"+R.sourceX+" "+(R.sourceY+Q)+"L"+R.sourceX+" "+(R.sourceY-Q)+"L"+R.leftInnerExtent+" "+(R.sourceY-Q)+"A"+(R.leftLargeArcRadius-Q)+" "+(R.leftSmallArcRadius-Q)+" 0 0 0 "+(R.leftFullExtent-Q)+" "+(R.sourceY-R.leftSmallArcRadius)+"L"+(R.leftFullExtent-Q)+" "+R.verticalLeftInnerExtent+"A"+(R.leftLargeArcRadius-Q)+" "+(R.leftLargeArcRadius-Q)+" 0 0 0 "+R.leftInnerExtent+" "+(R.verticalFullExtent+Q)+"L"+R.rightInnerExtent+" "+(R.verticalFullExtent+Q)+"A"+(R.rightLargeArcRadius-Q)+" "+(R.rightLargeArcRadius-Q)+" 0 0 0 "+(R.rightFullE
1353xtent+Q)+" "+R.verticalRightInnerExtent+"L"+(R.rightFullExtent+Q)+" "+(R.targetY-R.rightSmallArcRadius)+"A"+(R.rightLargeArcRadius-Q)+" "+(R.rightSmallArcRadius-Q)+" 0 0 0 "+R.rightInnerExtent+" "+(R.targetY-Q)+"L"+R.targetX+" "+(R.targetY-Q)+"Z":"M "+R.targetX+" "+(R.targetY-Q)+" L"+R.rightInnerExtent+" "+(R.targetY-Q)+"A"+(R.rightLargeArcRadius+Q)+" "+(R.rightSmallArcRadius+Q)+" 0 0 0 "+(R.rightFullExtent-Q)+" "+(R.targetY+R.rightSmallArcRadius)+"L"+(R.rightFullExtent-Q)+" "+R.verticalRightInnerExtent+"A"+(R.rightLargeArcRadius+Q)+" "+(R.rightLargeArcRadius+Q)+" 0 0 0 "+R.rightInnerExtent+" "+(R.verticalFullExtent+Q)+"L"+R.leftInnerExtent+" "+(R.verticalFullExtent+Q)+"A"+(R.leftLargeArcRadius+Q)+" "+(R.leftLargeArcRadius+Q)+" 0 0 0 "+(R.leftFullExtent+Q)+" "+R.verticalLeftInnerExtent+"L"+(R.leftFullExtent+Q)+" "+(R.sourceY+R.leftSmallArcRadius)+"A"+(R.leftLargeArcRadius+Q)+" "+(R.leftSmallArcRadius+Q)+" 0 0 0 "+R.leftInnerExtent+" "+(R.sourceY-Q)+"L"+R.sourceX+" "+(R.sourceY-Q)+"L"+R.sourceX+" "+(R.sourceY+Q)+"L"+R.leftInnerExtent+" "+(R.sourceY+Q)+"A"+(R.leftLargeArcRadius-Q)+" "+(R.leftSmallArcRadius-Q)+" 0 0 1 "+(R.leftFullExtent-Q)+" "+(R.sourceY+R.leftSmallArcRadius)+"L"+(R.leftFullExtent-Q)+" "+R.verticalLeftInnerExtent+"A"+(R.leftLargeArcRadius-Q)+" "+(R.leftLargeArcRadius-Q)+" 0 0 1 "+R.leftInnerExtent+" "+(R.verticalFullExtent-Q)+"L"+R.rightInnerExtent+" "+(R.verticalFullExtent-Q)+"A"+(R.rightLargeArcRadius-Q)+" "+(R.rightLargeArcRadius-Q)+" 0 0 1 "+(R.rightFullExtent+Q)+" "+R.verticalRightInnerExtent+"L"+(R.rightFullExtent+Q)+" "+(R.targetY+R.rightSmallArcRadius)+"A"+(R.rightLargeArcRadius-Q)+" "+(R.rightSmallArcRadius-Q)+" 0 0 1 "+R.rightInnerExtent+" "+(R.targetY+Q)+"L"+R.targetX+" "+(R.targetY+Q)+"Z";var W,Q,R,N=G.link.source.x1,U=G.link.target.x0,ee=g(N,U),j=ee(.5),X=ee(.5),J=G.link.y0-G.link.width/2,re=G.link.y0+G.link.width/2,ne=G.link.y1-G.link.width/2,se=G.link.y1+G.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(G,W){var Q=t(W.color),R=n.nodePadAcross,N=G.nodePad/2;W.dx=W.x1-W.x0,W.dy=W.y1-W.y0;var U=W.dx,ee=Math.max(.5,W.dy),j="node_"+W.pointNumber;return W.group&&(j=d.randstr()),W.trace=G.trace,W.curveNumber=G.trace.index,{index:W.pointNumber,key:j,partOfGroup:W.partOfGroup||!1,group:W.group,traceId:G.key,trace:G.trace,node:W,nodePad:G.nodePad,nodeLineColor:G.nodeLineColor,nodeLineWidth:G.nodeLineWidth,textFont:G.textFont,size:G.horizontal?G.height:G.width,visibleWidth:Math.ceil(U),visibleHeight:ee,zoneX:-R,zoneY:-N,zoneWidth:U+2*R,zoneHeight:ee+2*N,labelY:G.horizontal?W.dy/2+1:W.dx/2+1,left:W.originalLayer===1,sizeAcross:G.width,forceLayouts:G.forceLayouts,horizontal:G.horizontal,darkBackground:Q.getBrightness()<=128,tinyColorHue:i.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),valueFormat:G.valueFormat,valueSuffix:G.valueSuffix,sankey:G.sankey,graph:G.graph,arrangement:G.arrangement,uniqueNodeLabelPathId:[G.guid,G.key,j].join("_"),interactionState:G.interactionState,figure:G}}function A(G){G.attr("transform",function(W){return l(W.node.x0.toFixed(3),W.node.y0.toFixed(3))})}function I(G){G.call(A)}function P(G,W){G.call(I),W.attr("d",k())}function S(G){G.attr("width",function(W){return W.node.x1-W.node.x0}).attr("height",function(W){return W.visibleHeight})}function E(G){return G.link.width>1||G.linkLineWidth>0}function D(G){return l(G.translateX,G.translateY)+(G.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function F(G,W,Q){G.on(".basic",null).on("mouseover.basic",function(R){R.interactionState.dragInProgress||R.partOfGroup||(Q.hover(this,R,W),R.interactionState.hovered=[this,R])}).on("mousemove.basic",function(R){R.interactionState.dragInProgress||R.partOfGroup||(Q.follow(this,R),R.interactionState.hovered=[this,R])}).on("mouseout.basic",function(R){R.interactionState.dragInProgress||R.partOfGroup||(Q.unhover(this,R,W),R.interactionState.hovered=!1)}).on("click.basic",function(R){R.interactionState.hovered&&(Q.unhover(this,R,W),R.interactionState.hovered=!1),R.interactionState.dragInProgress||R.partOfGroup||Q.select(this,R,W)})}function H(G,W,Q,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&&(Q.nodeEvents.unhover.apply(0,U.interactionState.hovered),U.interactionState.hovered=!1),U.arrangement==="snap")){var ee=U.traceId+"|"+U.key;U.forceLayouts[ee]?U.forceLayouts[ee].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]=m.forceSimulation(ne).alphaDecay(0).force("collide",m.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 _e=pe[xe];_e===ce.interactionState.dragInProgress?(_e.x=_e.lastDraggedX,_e.y=_e.lastDraggedY):(_e.vx=(_e.originalX-_e.x)/n.forceTicksPerFrame,_e.y=Math.min(ce.size-_e.dy/2,Math.max(_e.dy/2,_e.y))),de=Math.max(de,Math.abs(_e.vx),Math.abs(_e.vy))}!ce.interactionState.dragInProgress&&de<.1&&ce.forceLayouts[oe].alpha()>0&&ce.forceLayouts[oe].alpha(0)}}(0,X,ne,J)).stop()}(0,ee,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)}})}(G,W,U,ee,R)}}).on("drag",function(U){if(U.arrangement!=="fixed"){var ee=b.event.x,j=b.event.y;U.arrangement==="snap"?(U.node.x0=ee-U.visibleWidth/2,U.node.x1=ee+U.visibleWidth/2,U.node.y0=j-U.visibleHeight/2,U.node.y1=j+U.visibleHeight/2):(U.arrangement==="freeform"&&(U.node.x0=ee-U.visibleWidth/2,U.node.x1=ee+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(G.filter(K(U)),W))}}).on("dragend",function(U){if(U.arrangement!=="fixed"){U.interactionState.dragInProgress=!1;for(var ee=0;ee<U.node.childrenNodes.length;ee++)U.node.childrenNodes[ee].x=U.node.x,U.node.childrenNodes[ee].y=U.node.y;U.arrangement!=="snap"&&V(U,R)}});G.on(".drag",null).call(N)}function V(G,W){for(var Q=[],R=[],N=0;N<G.graph.nodes.length;N++){var U=(G.graph.nodes[N].x0+G.graph.nodes[N].x1)/2,ee=(G.graph.nodes[N].y0+G.graph.nodes[N].y1)/2;Q.push(U/G.figure.width),R.push(ee/G.figure.height)}s.call("_guiRestyle",W,{"node.x":[Q],"node.y":[R]},G.trace.index).then(function(){W._fullLayout._dragCover&&W._fullLayout._dragCover.remove()})}function Z(G){G.lastDraggedX=G.x0+G.dx/2,G.lastDraggedY=G.y0+G.dy/2}function K(G){return function(W){return W.node.originalX===G.node.originalX}}$.exports=function(G,W,Q,R,N){var U=!1;d.ensureSingle(G._fullLayout._infolayer,"g","first-render",function(){U=!0});var ee=G._fullLayout._dragCover,j=Q.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){G._fullData[de]._sankey=ce;var xe="bgsankey-"+ce.trace.uid+"-"+de;d.ensureSingle(G._fullLayout._draggers,"rect",xe),G._fullData[de]._bgRect=b.select("."+xe),G._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(o,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(w.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)?i.tinyRGB(t(ce.linkLineColor)):ce.tinyColorHue}).style("stroke-opacity",function(ce){return E(ce)?i.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 G._context.staticPlot||U||ee?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(o,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 _e,we=[];for(_e=0;_e<xe.length;_e++)xe[_e].originalX=(xe[_e].x0+xe[_e].x1)/2,xe[_e].originalY=(xe[_e].y0+xe[_e].y1)/2,we.indexOf(xe[_e].originalX)===-1&&we.pu
1353sh(xe[_e].originalX);for(we.sort(function(Ee,fe){return Ee-fe}),_e=0;_e<xe.length;_e++)xe[_e].originalLayerIndex=we.indexOf(xe[_e].originalX),xe[_e].originalLayer=xe[_e].originalLayerIndex/(we.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!G._context.staticPlot&&!U||ce.partOfGroup?0:1}),se.call(F,X,N.nodeEvents).call(H,re,N,G),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(o);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 i.tinyRGB(t(ce.nodeLineColor))}).style("stroke-opacity",function(ce){return i.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(o);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,G)}).style("text-shadow",p.makeTextShadow(G._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),_e=ce.textFont.size*((xe-1)*T-c),we=ce.nodeLineWidth/2+3,Ee=((ce.horizontal?ce.visibleHeight:ce.visibleWidth)-_e)/2;ce.horizontal&&(ce.left?we=-we:we+=ce.visibleWidth);var fe=ce.horizontal?"":"scale(-1,1)"+a(90);return l(ce.horizontal?we:Ee,ce.horizontal?Ee:we)+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":920,"@plotly/d3":58,"@plotly/d3-sankey":57,"@plotly/d3-sankey-circular":56,"d3-force":111,"d3-interpolate":116,tinycolor2:312}],925:[function(v,$,te){$.exports=function(m,g){for(var b=[],y=m.cd[0].trace,e=y._sankey.graph.nodes,n=0;n<e.length;n++){var t=e[n];if(!t.partOfGroup){var i=[(t.x0+t.x1)/2,(t.y0+t.y1)/2];y.orientation==="v"&&i.reverse(),g&&g.contains(i,!1,n,m)&&b.push({pointNumber:t.pointNumber})}}return b}},{}],926:[function(v,$,te){var m=v("../../lib");$.exports=function(g,b){for(var y=0;y<g.length;y++)g[y].i=y;m.mergeArray(b.text,g,"tx"),m.mergeArray(b.texttemplate,g,"txt"),m.mergeArray(b.hovertext,g,"htx"),m.mergeArray(b.customdata,g,"data"),m.mergeArray(b.textposition,g,"tp"),b.textfont&&(m.mergeArrayCastPositive(b.textfont.size,g,"ts"),m.mergeArray(b.textfont.color,g,"tc"),m.mergeArray(b.textfont.family,g,"tf"));var e=b.marker;if(e){m.mergeArrayCastPositive(e.size,g,"ms"),m.mergeArrayCastPositive(e.opacity,g,"mo"),m.mergeArray(e.symbol,g,"mx"),m.mergeArray(e.color,g,"mc");var n=e.line;e.line&&(m.mergeArray(n.color,g,"mlc"),m.mergeArrayCastPositive(n.width,g,"mlw"));var t=e.gradient;t&&t.type!=="none"&&(m.mergeArray(t.type,g,"mgt"),m.mergeArray(t.color,g,"mgc"))}}},{"../../lib":503}],927:[function(v,$,te){var m=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,g=v("../../plots/template_attributes").texttemplateAttrs,b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../../components/colorscale/attributes"),e=v("../../plots/font_attributes"),n=v("../../components/drawing/attributes").dash,t=v("../../components/drawing/attributes").pattern,i=v("../../components/drawing"),r=v("./constants"),d=v("../../lib/extend").extendFlat;$.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:m("x"),yhoverformat:m("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:g({},{}),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:i.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"},y("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"},y("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":931}],928:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../plots/cartesian/axes"),y=v("../../plots/cartesian/align_period"),e=v("../../constants/numerical").BADNUM,n=v("./subtypes"),t=v("./colorscale_calc"),i=v("./arrays_to_calcdata"),r=v("./calc_selection");function d(o,h,p,s,x,c,T){var _=h._length,w=o._fullLayout,k=p._id,L=s._id,A=w._firstScatter[u(h)]===h.uid,I=(f(h,w,p,s)||{}).orientation,P=h.fill;p._minDtick=0,s._minDtick=0;var S={padded:!0},E={padded:!0};T&&(S.ppad=E.ppad=T);var D=_<2||x[0]!==x[_-1]||c[0]!==c[_-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(s,c,E))}function l(o,h){if(n.hasMarkers(o)){var p,s=o.marker,x=1.6*(o.marker.sizeref||1);if(p=o.marker.sizemode==="area"?function(k){return Math.max(Math.sqrt((k||0)/x),3)}:function(k){return Math.max((k||0)/x,3)},g.isArrayOrTypedArray(s.size)){var c={type:"linear"};b.setConvert(c);for(var T=c.makeCalcdata(o.marker,"size"),_=new Array(h),w=0;w<h;w++)_[w]=p(T[w]);return _}return p(s.size)}}function a(o,h){var p=u(h),s=o._firstScatter;s[p]||(s[p]=h.uid)}function u(o){var h=o.stackgroup;return o.xaxis+o.yaxis+o.type+(h?"-"+h:"")}function f(o,h,p,s){var x=o.stackgroup;if(x){var c=h._scatterStackOpts[p._id+s._id][x],T=c.orientation==="v"?s:p;return T.type==="linear"||T.type==="log"?c:void 0}}$.exports={calc:function(o,h){var p,s,x,c,T,_,w=o._fullLayout,k=b.getFromId(o,h.xaxis||"x"),L=b.getFromId(o,h.yaxis||"y"),A=k.makeCalcdata(h,"x"),I=L.makeCalcdata(h,"y"),P=y(h,k,"x",A),S=y(h,L,"y",I),E=P.vals,D=S.vals,F=h._length,H=new Array(F),V=h.ids,Z=f(h,w,k,L),K=!1;a(w,h);var G,W="x",Q="y";Z?(g.pushUnique(Z.traceIndices,h._expandedIndex),(p=Z.orientation==="v")?(Q="s",G="x"):(W="s",G="y"),T=Z.stackgaps==="interpolate"):d(o,h,k,L,E,D,l(h,F));var R=!!h.xperiodalignment,N=!!h.yperiodalignment;for(s=0;s<F;s++){var U=H[s]={},ee=m(E[s]),j=m(D[s]);ee&&j?(U[W]=E[s],U[Q]=D[s],R&&(U.orig_x=A[s],U.xEnd=P.ends[s],U.xStart=P.starts[s]),N&&(U.orig_y=I[s],U.yEnd=S.ends[s],U.yStart=S.starts[s])):Z&&(p?ee:j)?(U[G]=p?E[s]:D[s],U.gap=!0,T?(U.s=e,K=!0):U.s=0):U[W]=U[Q]=e,V&&(U.id=String(V[s]))}if(i(H,h),t(o,h),r(H,h),Z){for(s=0;s<H.length;)H[s][G]===e?H.splice(s,1):s++;if(g.sort(H,function(ne,se){return ne[G]-se[G]||ne.i-se.i}),K){for(s=0;s<H.length-1&&H[s].gap;)s++;for((_=H[s].s)||(_=H[s].s=0),x=0;x<s;x++)H[x].s=_;for(c=H.length-1;c>s&&H[c].gap;)c--;for(_=H[c].s,x=H.length-1;x>c;x--)H[x].s=_;for(;s<c;)if(H[++s].gap){for(x=s+1;H[x].gap;)x++;for(var X=H[s-1][G],J=H[s-1].s,re=(H[x].s-J)/(H[x][G]-X);s<x;)H[s].s=J+(H[s][G]-X)*re,s++}}}return H},calcMarkerSize:l,calcAxisExpansion:d,setFirstScatter:a,getStackOpts:f}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"./arrays_to_calcdata":926,"./calc_selection":929,"./colorscale_calc":930,"./subtypes":952,"fast-isnumeric":190}],929:[function(v,$,te){var m=v("../../lib");$.exports=function(g,b){m.isArrayOrTypedArray(b.selectedpoints)&&m.tagSelected(g,b)}},{"../../lib":503}],930:[function(v,$,te){var m=v("../../components/colorscale/helpers").hasColorscale,g=v("../../components/colorscale/calc"),b=v("./subtypes");$.exports=function(y,e){b.hasLines(e)&&m(e,"line")&&g(y,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),b.hasMarkers(e)&&(m(e,"marker")&&g(y,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),m(e,"marker.line")&&g(y,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"./subtypes":952}],931:[function(v,$,te){$.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},{}],932:[function(v,$,te){var m=v("./calc");function g(b,y,e,n,t,i,r){t[n]=!0;var d={i:null,gap:!0,s:0};if(d[r]=e,b.splice(y,0,d),y&&e===b[y-1][r]){var l=b[y-1];d.s=l.s,d.i=l.i,d.gap=l.gap}else i&&(d.s=function(a,u,f,o){var h=a[u-1],p=a[u+1];return p?h?h.s+(p.s-h.s)*(f-h[o])/(p[o]-h[o]):p.s:h.s}(b,y,e,r));y||(b[0].t=b[1].t,b[0].trace=b[1].trace,delete b[1].t,delete b[1].trace)}$.exports=function(b,y){var e=y.xaxis,n=y.yaxis,t=e._id+n._id,i=b._fullLayout._scatterStackOpts[t];if(i){var r,d,l,a,u,f,o,h,p,s,x,c,T,_,w,k=b.calcdata;for(var L in i){var A=(s=i[L]).traceIndices;if(A.length){for(x=s.stackgaps==="interpolate",c=s.groupnorm,s.orientation==="v"?(T="x",_="y"):(T="y",_="x"),w=new Array(A.length),r=0;r<w.length;r++)w[r]=!1;f=k[A[0]];var I=new Array(f.length);for(r=0;r<f.length;
1353r++)I[r]=f[r][T];for(r=1;r<A.length;r++){for(u=k[A[r]],d=l=0;d<u.length;d++){for(o=u[d][T];o>I[l]&&l<I.length;l++)g(u,d,I[l],r,w,x,T),d++;if(o!==I[l]){for(a=0;a<r;a++)g(k[A[a]],l,o,a,w,x,T);I.splice(l,0,o)}l++}for(;l<I.length;l++)g(u,d,I[l],r,w,x,T),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(c)for(p=(c==="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=m.calcMarkerSize(E,E._rawLength),F=Array.isArray(D);if(D&&w[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;m.calcAxisExpansion(b,E,e,n,V,Z,D),u[0].t.orientation=s.orientation}}}}}},{"./calc":928}],933:[function(v,$,te){$.exports=function(m){for(var g=0;g<m.length;g++){var b=m[g];if(b.type==="scatter"){var y=b.fill;if(y!=="none"&&y!=="toself"&&(b.opacity=void 0,y==="tonexty"||y==="tonextx"))for(var e=g-1;e>=0;e--){var n=m[e];if(n.type==="scatter"&&n.xaxis===b.xaxis&&n.yaxis===b.yaxis){n.opacity=void 0;break}}}}}},{}],934:[function(v,$,te){var m=v("../../lib"),g=v("../../registry"),b=v("./attributes"),y=v("./constants"),e=v("./subtypes"),n=v("./xy_defaults"),t=v("./period_defaults"),i=v("./stack_defaults"),r=v("./marker_defaults"),d=v("./line_defaults"),l=v("./line_shape_defaults"),a=v("./text_defaults"),u=v("./fillcolor_defaults"),f=v("../../lib").coercePattern;$.exports=function(o,h,p,s){function x(I,P){return m.coerce(o,h,b,I,P)}var c=n(o,h,s,x);if(c||(h.visible=!1),h.visible){t(o,h,s,x),x("xhoverformat"),x("yhoverformat");var T=i(o,h,s,x),_=!T&&c<y.PTS_LINESONLY?"lines+markers":"lines";x("text"),x("hovertext"),x("mode",_),e.hasLines(h)&&(d(o,h,p,s,x),l(o,h,x),x("connectgaps"),x("line.simplify")),e.hasMarkers(h)&&r(o,h,p,s,x,{gradient:!0}),e.hasText(h)&&(x("texttemplate"),a(o,h,s,x));var w=[];(e.hasMarkers(h)||e.hasText(h))&&(x("cliponaxis"),x("marker.maxdisplayed"),w.push("points")),x("fill",T?T.fillDflt:"none"),h.fill!=="none"&&(u(o,h,p,x),e.hasLines(h)||l(o,h,x),f(x,"fillpattern",h.fillcolor,!1));var k=(h.line||{}).color,L=(h.marker||{}).color;h.fill!=="tonext"&&h.fill!=="toself"||w.push("fills"),x("hoveron",w.join("+")||"points"),h.hoveron!=="fills"&&x("hovertemplate");var A=g.getComponentMethod("errorbars","supplyDefaults");A(o,h,k||L||p,{axis:"y"}),A(o,h,k||L||p,{axis:"x",inherit:"y"}),m.coerceSelectionMarkerOpacity(h,x)}}},{"../../lib":503,"../../registry":638,"./attributes":927,"./constants":931,"./fillcolor_defaults":935,"./line_defaults":940,"./line_shape_defaults":942,"./marker_defaults":946,"./period_defaults":947,"./stack_defaults":950,"./subtypes":952,"./text_defaults":953,"./xy_defaults":954}],935:[function(v,$,te){var m=v("../../components/color"),g=v("../../lib").isArrayOrTypedArray;$.exports=function(b,y,e,n){var t=!1;if(y.marker){var i=y.marker.color,r=(y.marker.line||{}).color;i&&!g(i)?t=i:r&&!g(r)&&(t=r)}n("fillcolor",m.addOpacity((y.line||{}).color||t||e,.5))}},{"../../components/color":366,"../../lib":503}],936:[function(v,$,te){var m=v("../../plots/cartesian/axes");$.exports=function(g,b,y){var e={},n={_fullLayout:y},t=m.getFromTrace(n,b,"x"),i=m.getFromTrace(n,b,"y");return e.xLabel=m.tickText(t,t.c2l(g.x),!0).text,e.yLabel=m.tickText(i,i.c2l(g.y),!0).text,e}},{"../../plots/cartesian/axes":554}],937:[function(v,$,te){var m=v("../../components/color"),g=v("./subtypes");$.exports=function(b,y){var e,n;if(b.mode==="lines")return(e=b.line.color)&&m.opacity(e)?e:b.fillcolor;if(b.mode==="none")return b.fill?b.fillcolor:"";var t=y.mcc||(b.marker||{}).color,i=y.mlcc||((b.marker||{}).line||{}).color;return(n=t&&m.opacity(t)?t:i&&m.opacity(i)&&(y.mlw||((b.marker||{}).line||{}).width)?i:"")?m.opacity(n)<.3?m.addOpacity(n,.3):n:(e=(b.line||{}).color)&&m.opacity(e)&&g.hasLines(b)&&b.line.width?e:b.fillcolor}},{"../../components/color":366,"./subtypes":952}],938:[function(v,$,te){var m=v("../../lib"),g=v("../../components/fx"),b=v("../../registry"),y=v("./get_trace_color"),e=v("../../components/color"),n=m.fillText;$.exports=function(t,i,r,d){var l=t.cd,a=l[0].trace,u=t.xa,f=t.ya,o=u.c2p(i),h=f.c2p(r),p=[o,h],s=a.hoveron||"",x=a.mode.indexOf("markers")!==-1?3:.5,c=!!a.xperiodalignment,T=!!a.yperiodalignment;if(s.indexOf("points")!==-1){var _=function(oe){var pe=Math.max(x,oe.mrc||0),ce=u.c2p(oe.x)-o,de=f.c2p(oe.y)-h;return Math.max(Math.sqrt(ce*ce+de*de)-pe,1-x/pe)},w=g.getDistanceFunction(d,function(oe){if(c){var pe=u.c2p(oe.xStart),ce=u.c2p(oe.xEnd);return o>=Math.min(pe,ce)&&o<=Math.max(pe,ce)?0:1/0}var de=Math.max(3,oe.mrc||0),xe=1-1/de,_e=Math.abs(u.c2p(oe.x)-o);return _e<de?xe*_e/de:_e-de+xe},function(oe){if(T){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,_e=Math.abs(f.c2p(oe.y)-h);return _e<de?xe*_e/de:_e-de+xe},_);if(g.getClosest(l,w,t),t.index!==!1){var k=l[t.index],L=u.c2p(k.x,!0),A=f.c2p(k.y,!0),I=k.mrc||1;t.index=k.i;var P=l[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 m.extendFlat(t,{color:y(a,k),x0:L-I,x1:L+I,xLabelVal:E,y0:A-I,y1:A+I,yLabelVal:D,spikeDistance:_(k),hovertemplate:a.hovertemplate}),n(k,a,t),b.getComponentMethod("errorbars","hoverInfo")(k,a,t),[t]}}if(s.indexOf("fills")!==-1&&a._polygons){var F,H,V,Z,K,G,W,Q,R,N=a._polygons,U=[],ee=!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)&&(ee=!ee,U.push(V),J=Math.min(J,V.ymin),re=Math.max(re,V.ymax));if(ee){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++)(Q=Z[H-1][1])>ne!=(R=Z[H][1])>=ne&&(G=Z[H-1][0],W=Z[H][0],R-Q&&(K=G+(W-G)*(ne-Q)/(R-Q),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(a.fillcolor)?se=a.fillcolor:e.opacity((a.line||{}).color)&&(se=a.line.color),m.extendFlat(t,{distance:t.maxHoverDistance,x0:j,x1:X,y0:ne,y1:ne,color:se,hovertemplate:!1}),delete t.index,a.text&&!Array.isArray(a.text)?t.text=String(a.text):t.text=a.name,[t]}}}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"../../registry":638,"./get_trace_color":937}],939:[function(v,$,te){var m=v("./subtypes");$.exports={hasLines:m.hasLines,hasMarkers:m.hasMarkers,hasText:m.hasText,isBubble:m.isBubble,attributes:v("./attributes"),supplyDefaults:v("./defaults"),crossTraceDefaults:v("./cross_trace_defaults"),calc:v("./calc").calc,crossTraceCalc:v("./cross_trace_calc"),arraysToCalcdata:v("./arrays_to_calcdata"),plot:v("./plot"),colorbar:v("./marker_colorbar"),formatLabels:v("./format_labels"),style:v("./style").style,styleOnSelect:v("./style").styleOnSelect,hoverPoints:v("./hover"),selectPoints:v("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:v("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"./arrays_to_calcdata":926,"./attributes":927,"./calc":928,"./cross_trace_calc":932,"./cross_trace_defaults":933,"./defaults":934,"./format_labels":936,"./hover":938,"./marker_colorbar":945,"./plot":948,"./select":949,"./style":951,"./subtypes":952}],940:[function(v,$,te){var m=v("../../lib").isArrayOrTypedArray,g=v("../../components/colorscale/helpers").hasColorscale,b=v("../../components/colorscale/defaults");$.exports=function(y,e,n,t,i,r){var d=(y.marker||{}).color;i("line.color",n),g(y,"line")?b(y,e,t,i,{prefix:"line.",cLetter:"c"}):i("line.color",!m(d)&&d||n),i("line.width"),(r||{}
1353).noDash||i("line.dash")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],941:[function(v,$,te){var m=v("../../constants/numerical"),g=m.BADNUM,b=m.LOG_CLIP,y=b+.5,e=b-.5,n=v("../../lib"),t=n.segmentsIntersect,i=n.constrain,r=v("./constants");$.exports=function(d,l){var a,u,f,o,h,p,s,x,c,T,_,w,k,L,A,I,P,S,E=l.xaxis,D=l.yaxis,F=E.type==="log",H=D.type==="log",V=E._length,Z=D._length,K=l.connectGaps,G=l.baseTolerance,W=l.shape,Q=W==="linear",R=l.fill&&l.fill!=="none",N=[],U=r.minTolerance,ee=d.length,j=new Array(ee),X=0;function J(Ye){var et=d[Ye];if(!et)return!1;var ct=l.linearized?E.l2p(et.x):E.c2p(et.x),mt=l.linearized?D.l2p(et.y):D.c2p(et.y);if(ct===g){if(F&&(ct=E.c2p(et.x,!0)),ct===g)return!1;H&&mt===g&&(ct*=Math.abs(E._m*Z*(E._m>0?y:e)/(D._m*V*(D._m>0?y:e)))),ct*=1e3}if(mt===g){if(H&&(mt=D.c2p(et.y,!0)),mt===g)return!1;mt*=1e3}return[ct,mt]}function re(Ye,et,ct,mt){var Ct=ct-Ye,Tt=mt-et,nt=.5-Ye,Qe=.5-et,Et=Ct*Ct+Tt*Tt,Gt=Ct*nt+Tt*Qe;if(Gt>0&&Gt<Et){var Xt=nt*Tt-Qe*Ct;if(Xt*Xt<Et)return!0}}function ne(Ye,et){var ct=Ye[0]/V,mt=Ye[1]/Z,Ct=Math.max(0,-ct,ct-1,-mt,mt-1);return Ct&&P!==void 0&&re(ct,mt,P,S)&&(Ct=0),Ct&&et&&re(ct,mt,et[0]/V,et[1]/Z)&&(Ct=0),(1+r.toleranceGrowth*Ct)*G}function se(Ye,et){var ct=Ye[0]-et[0],mt=Ye[1]-et[1];return Math.sqrt(ct*ct+mt*mt)}var oe,pe,ce,de,xe,_e,we,Ee=r.maxScreensAway,fe=-V*Ee,ge=V*(1+Ee),ke=-Z*Ee,be=Z*(1+Ee),Se=[[fe,ke,ge,ke],[ge,ke,ge,be],[ge,be,fe,be],[fe,be,fe,ke]];function Oe(Ye){if(Ye[0]<fe||Ye[0]>ge||Ye[1]<ke||Ye[1]>be)return[i(Ye[0],fe,ge),i(Ye[1],ke,be)]}function De(Ye,et){return Ye[0]===et[0]&&(Ye[0]===fe||Ye[0]===ge)||Ye[1]===et[1]&&(Ye[1]===ke||Ye[1]===be)||void 0}function je(Ye,et,ct){return function(mt,Ct){var Tt=Oe(mt),nt=Oe(Ct),Qe=[];if(Tt&&nt&&De(Tt,nt))return Qe;Tt&&Qe.push(Tt),nt&&Qe.push(nt);var Et=2*n.constrain((mt[Ye]+Ct[Ye])/2,et,ct)-((Tt||mt)[Ye]+(nt||Ct)[Ye]);return Et&&((Tt&&nt?Et>0==Tt[Ye]>nt[Ye]?Tt:nt:Tt||nt)[Ye]+=Et),Qe}}function Je(Ye){var et=Ye[0],ct=Ye[1],mt=et===j[X-1][0],Ct=ct===j[X-1][1];if(!mt||!Ct)if(X>1){var Tt=et===j[X-2][0],nt=ct===j[X-2][1];mt&&(et===fe||et===ge)&&Tt?nt?X--:j[X-1]=Ye:Ct&&(ct===ke||ct===be)&&nt?Tt?X--:j[X-1]=Ye:j[X++]=Ye}else j[X++]=Ye}function ze(Ye){j[X-1][0]!==Ye[0]&&j[X-1][1]!==Ye[1]&&Je([ce,de]),Je(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]>ge?ge:0,pe=Ye[1]<ke?ke:Ye[1]>be?be:0,oe||pe){if(X)if(xe){var et=we(xe,Ye);et.length>1&&(ze(et[0]),j[X++]=et[1])}else _e=we(j[X-1],Ye)[0],j[X++]=_e;else j[X++]=[oe||Ye[0],pe||Ye[1]];var ct=j[X-1];oe&&pe&&(ct[0]!==oe||ct[1]!==pe)?(xe&&(ce!==oe&&de!==pe?Je(ce&&de?(mt=xe,Tt=(Ct=Ye)[0]-mt[0],nt=(Ct[1]-mt[1])/Tt,(mt[1]*Ct[0]-Ct[1]*mt[0])/Tt>0?[nt>0?fe:ge,be]:[nt>0?ge:fe,ke]):[ce||oe,de||pe]):ce&&de&&Je([ce,de])),Je([oe,pe])):ce-oe&&de-pe&&Je([oe||ce,pe||de]),xe=Ye,ce=oe,de=pe}else xe&&ze(we(xe,Ye)[0]),j[X++]=Ye;var mt,Ct,Tt,nt}for(W==="linear"||W==="spline"?we=function(Ye,et){for(var ct=[],mt=0,Ct=0;Ct<4;Ct++){var Tt=Se[Ct],nt=t(Ye[0],Ye[1],et[0],et[1],Tt[0],Tt[1],Tt[2],Tt[3]);nt&&(!mt||Math.abs(nt.x-ct[0][0])>1||Math.abs(nt.y-ct[0][1])>1)&&(nt=[nt.x,nt.y],mt&&se(nt,Ye)<se(ct[0],Ye)?ct.unshift(nt):ct.push(nt),mt++)}return ct}:W==="hv"||W==="vh"?we=function(Ye,et){var ct=[],mt=Oe(Ye),Ct=Oe(et);return mt&&Ct&&De(mt,Ct)||(mt&&ct.push(mt),Ct&&ct.push(Ct)),ct}:W==="hvh"?we=je(0,fe,ge):W==="vhv"&&(we=je(1,ke,be)),a=0;a<ee;a++)if(u=J(a)){for(X=0,xe=null,Ue(u),a++;a<ee;a++){if(!(o=J(a))){if(K)continue;break}if(Q&&l.simplify){var Ge=J(a+1);if(T=se(o,u),R&&(X===0||X===ee-1)||!(T<ne(o,Ge)*U)){for(x=[(o[0]-u[0])/T,(o[1]-u[1])/T],h=u,_=T,w=L=A=0,s=!1,f=o,a++;a<d.length;a++){if(p=Ge,Ge=J(a+1),!p){if(K)continue;break}if(I=(c=[p[0]-u[0],p[1]-u[1]])[0]*x[1]-c[1]*x[0],L=Math.min(L,I),(A=Math.max(A,I))-L>ne(p,Ge))break;f=p,(k=c[0]*x[0]+c[1]*x[1])>_?(_=k,o=p,s=!1):k<w&&(w=k,h=p,s=!0)}if(s?(Ue(o),f!==h&&Ue(h)):(h!==u&&Ue(h),f!==o&&Ue(o)),Ue(f),a>=d.length||!p)break;Ue(p),u=p}}else Ue(o)}xe&&Je([ce||xe[0],de||xe[1]]),N.push(j.slice(0,X))}return N}},{"../../constants/numerical":479,"../../lib":503,"./constants":931}],942:[function(v,$,te){$.exports=function(m,g,b){b("line.shape")==="spline"&&b("line.smoothing")}},{}],943:[function(v,$,te){var m={tonextx:1,tonexty:1,tonext:1};$.exports=function(g,b,y){var e,n,t,i,r,d={},l=!1,a=-1,u=0,f=-1;for(n=0;n<y.length;n++)(t=(e=y[n][0].trace).stackgroup||"")?t in d?r=d[t]:(r=d[t]=u,u++):e.fill in m&&f>=0?r=f:(r=f=u,u++),r<a&&(l=!0),e._groupIndex=a=r;var o=y.slice();l&&o.sort(function(p,s){var x=p[0].trace,c=s[0].trace;return x._groupIndex-c._groupIndex||x.index-c.index});var h={};for(n=0;n<o.length;n++)t=(e=o[n][0].trace).stackgroup||"",e.visible===!0?(e._nexttrace=null,e.fill in m&&(i=h[t],e._prevtrace=i||null,i&&(i._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 o}},{}],944:[function(v,$,te){var m=v("fast-isnumeric");$.exports=function(g,b){b||(b=2);var y=g.marker,e=y.sizeref||1,n=y.sizemin||0,t=y.sizemode==="area"?function(i){return Math.sqrt(i/e)}:function(i){return i/e};return function(i){var r=t(i/b);return m(r)&&r>0?Math.max(r,n):0}}},{"fast-isnumeric":190}],945:[function(v,$,te){$.exports={container:"marker",min:"cmin",max:"cmax"}},{}],946:[function(v,$,te){var m=v("../../components/color"),g=v("../../components/colorscale/helpers").hasColorscale,b=v("../../components/colorscale/defaults"),y=v("./subtypes");$.exports=function(e,n,t,i,r,d){var l=y.isBubble(e),a=(e.line||{}).color;d=d||{},a&&(t=a),r("marker.symbol"),r("marker.opacity",l?.7:1),r("marker.size"),r("marker.color",t),g(e,"marker")&&b(e,n,i,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",a&&!Array.isArray(a)&&n.marker.color!==a?a:l?m.background:m.defaultLine),g(e,"marker.line")&&b(e,n,i,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width",l?1:0)),l&&(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":952}],947:[function(v,$,te){var m=v("../../lib").dateTick0,g=v("../../constants/numerical").ONEWEEK;function b(y,e){return m(e,y%g==0?1:0)}$.exports=function(y,e,n,t,i){if(i||(i={x:!0,y:!0}),i.x){var r=t("xperiod");r&&(t("xperiod0",b(r,e.xcalendar)),t("xperiodalignment"))}if(i.y){var d=t("yperiod");d&&(t("yperiod0",b(d,e.ycalendar)),t("yperiodalignment"))}}},{"../../constants/numerical":479,"../../lib":503}],948:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../registry"),b=v("../../lib"),y=b.ensureSingle,e=b.identity,n=v("../../components/drawing"),t=v("./subtypes"),i=v("./line_points"),r=v("./link_traces"),d=v("../../lib/polygon").tester;function l(a,u,f,o,h,p,s){var x;(function(ge,ke,be,Se,Oe){var De=be.xaxis,je=be.yaxis,Je=m.extent(b.simpleMap(De.range,De.r2c)),ze=m.extent(b.simpleMap(je.range,je.r2c)),Ue=Se[0].trace;if(!!t.hasMarkers(Ue)){var Ge=Ue.marker.maxdisplayed;if(Ge!==0){var Ye=Se.filter(function(Ct){return Ct.x>=Je[0]&&Ct.x<=Je[1]&&Ct.y>=ze[0]&&Ct.y<=ze[1]}),et=Math.ceil(Ye.length/Ge),ct=0;Oe.forEach(function(Ct,Tt){var nt=Ct[0].trace;t.hasMarkers(nt)&&nt.marker.maxdisplayed>0&&Tt<ke&&ct++});var mt=Math.round(ct*et/3+Math.floor(ct/3)*et/7.1);Se.forEach(function(Ct){delete Ct.vis}),Ye.forEach(function(Ct,Tt){Math.round((Tt+mt)%et)===0&&(Ct.vis=!0)})}}})(0,u,f,o,h);var c=!!s&&s.duration>0;function T(ge){return c?ge.transition():ge}var _=f.xaxis,w=f.yaxis,k=o[0].trace,L=k.line,A=m.select(p),I=y(A,"g","errorbars"),P=y(A,"g","lines"),S=y(A,"g","points"),E=y(A,"g","text");if(g.getComponentMethod("errorbars","plot")(a,I,f,s),k.visible===!0){var D,F;T(A).style("opacity",k.opacity);var H=k.fill.charAt(k.fill.length-1);H!=="x"&&H!=="y"&&(H=""),o[0][f.isRangePlot?"nodeRangePlot3":"node3"]=A;var V,Z,K="",G=[],W=k._prevtrace;W&&(K=W._prevRevpath||"",F=W._nextFill,G=W._polygons);var Q,R,N,U,ee,j,X,J="",re="",ne=[],se=b.noop;if(D=k._ownFill,t.hasLines(k)||k.fill!=="none"){for(F&&F.datum(o),["hv","vh","hvh","vhv"].indexOf(L.shape)!==-1?(Q=n.steps(L.shape),R=n.steps(L.shape.split("").reverse().join(""))):Q=R=L.shape==="spline"?function(ge){var ke=ge[ge.length-1];return ge.length>1&&ge[0][0]===ke[0]&&ge[0][1]===ke[1]?n.smoothclosed(ge.slice(1),L.smoothing):n.smoothopen(ge,L.smoothing)}:function(ge){return"M"+ge.join("L")},N=function(ge){return R(ge.reverse())},ne=i(o,{xaxis:_,yaxis:w,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=(ee=ne[ne.length-1])[ee.length-1]),se=function(ge){return function(ke){if(V=Q(ke),Z=N(ke),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)&&ke.length>1){var be=m.select(this);if(be.datum(o),ge)T(be.style("opacity",0).attr("d",V).call(n.lineGroupStyle)).style("opacity",1);else{var Se=T(be);Se.attr("d",V),n.singleLineStyle(o,Se)}}}}}var oe=P.selectAll(".js-line").data(ne);T(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,a),ne.length?(D?(D.datum(o),U&&j&&(H?(H==="y"?U[1]=j[1]=w.c2p(0,!0):H==="x"&&(U[0]=j[0]=_.c2p(0,!0)),T(D).attr("d","M"+j+"L"+U+"L"+J.substr(1)).call(n.singleFillStyle,a)):T(D).attr("d",J+"Z").call(n.singleFillStyle,a))):F&&(k.fill.substr(0,6)==="tonext"&&J&&K?(k.fill==="tonext"?T(F).attr("d",J+"Z"+K+"Z").call(n.singleFillStyle,a):T(F).attr("d",J+"L"+K.substr(1)+"Z").call(n.singleFillStyle,a),k._pol
1353ygons=k._polygons.concat(G)):(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(o),E.datum(o),function(ge,ke,be){var Se,Oe=be[0].trace,De=t.hasMarkers(Oe),je=t.hasText(Oe),Je=Ee(Oe),ze=fe,Ue=fe;if(De||je){var Ge=e,Ye=Oe.stackgroup,et=Ye&&a._fullLayout._scatterStackOpts[_._id+w._id][Ye].stackgaps==="infer zero";Oe.marker.maxdisplayed||Oe._needsCull?Ge=et?xe:de:Ye&&!et&&(Ge=_e),De&&(ze=Ge),je&&(Ue=Ge)}var ct,mt=(Se=ge.selectAll("path.point").data(ze,Je)).enter().append("path").classed("point",!0);c&&mt.call(n.pointStyle,Oe,a).call(n.translatePoints,_,w).style("opacity",0).transition().style("opacity",1),Se.order(),De&&(ct=n.makePointStyleFns(Oe)),Se.each(function(Ct){var Tt=m.select(this),nt=T(Tt);n.translatePoint(Ct,nt,_,w)?(n.singlePointStyle(Ct,nt,Oe,ct,a),f.layerClipId&&n.hideOutsideRangePoint(Ct,nt,_,w,Oe.xcalendar,Oe.ycalendar),Oe.customdata&&Tt.classed("plotly-customdata",Ct.data!==null&&Ct.data!==void 0)):nt.remove()}),c?Se.exit().transition().style("opacity",0).remove():Se.exit().remove(),(Se=ke.selectAll("g").data(Ue,Je)).enter().append("g").classed("textpoint",!0).append("text"),Se.order(),Se.each(function(Ct){var Tt=m.select(this),nt=T(Tt.select("text"));n.translatePoint(Ct,nt,_,w)?f.layerClipId&&n.hideOutsideRangePoint(Ct,Tt,_,w,Oe.xcalendar,Oe.ycalendar):Tt.remove()}),Se.selectAll("text").call(n.textPointStyle,Oe,a).each(function(Ct){var Tt=_.c2p(Ct.x),nt=w.c2p(Ct.y);m.select(this).selectAll("tspan.line").each(function(){T(m.select(this)).attr({x:Tt,y:nt})})}),Se.exit().remove()}(S,E,o);var pe=k.cliponaxis===!1?null:f.layerClipId;n.setClipUrl(S,pe,a),n.setClipUrl(E,pe,a)}function ce(ge){T(ge).attr("d","M0,0Z")}function de(ge){return ge.filter(function(ke){return!ke.gap&&ke.vis})}function xe(ge){return ge.filter(function(ke){return ke.vis})}function _e(ge){return ge.filter(function(ke){return!ke.gap})}function we(ge){return ge.id}function Ee(ge){if(ge.ids)return we}function fe(){return!1}}$.exports=function(a,u,f,o,h,p){var s,x,c=!h,T=!!h&&h.duration>0,_=r(a,u,f);(s=o.selectAll("g.trace").data(_,function(w){return w[0].trace.uid})).enter().append("g").attr("class",function(w){return"trace scatter trace"+w[0].trace.uid}).style("stroke-miterlimit",2),s.order(),function(w,k,L){k.each(function(A){var I=y(m.select(this),"g","fills");n.setClipUrl(I,L.layerClipId,w);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]=y(m.select(this),"path","js-fill")})})}(a,s,u),T?(p&&(x=p()),m.transition().duration(h.duration).ease(h.easing).each("end",function(){x&&x()}).each("interrupt",function(){x&&x()}).each(function(){o.selectAll("g.trace").each(function(w,k){l(a,k,u,w,_,this,h)})})):s.each(function(w,k){l(a,k,u,w,_,this,h)}),c&&s.exit().remove(),o.selectAll("path:not([d])").remove()}},{"../../components/drawing":388,"../../lib":503,"../../lib/polygon":515,"../../registry":638,"./line_points":941,"./link_traces":943,"./subtypes":952,"@plotly/d3":58}],949:[function(v,$,te){var m=v("./subtypes");$.exports=function(g,b){var y,e,n,t,i=g.cd,r=g.xaxis,d=g.yaxis,l=[],a=i[0].trace;if(!m.hasMarkers(a)&&!m.hasText(a))return[];if(b===!1)for(y=0;y<i.length;y++)i[y].selected=0;else for(y=0;y<i.length;y++)e=i[y],n=r.c2p(e.x),t=d.c2p(e.y),e.i!==null&&b.contains([n,t],!1,y,g)?(l.push({pointNumber:e.i,x:r.c2d(e.x),y:d.c2d(e.y)}),e.selected=1):e.selected=0;return l}},{"./subtypes":952}],950:[function(v,$,te){var m=["orientation","groupnorm","stackgaps"];$.exports=function(g,b,y,e){var n=y._scatterStackOpts,t=e("stackgroup");if(t){var i=b.xaxis+b.yaxis,r=n[i];r||(r=n[i]={});var d=r[t],l=!1;d?d.traces.push(b):(d=r[t]={traceIndices:[],traces:[b]},l=!0);for(var a={orientation:b.x&&!b.y?"h":"v"},u=0;u<m.length;u++){var f=m[u],o=f+"Found";if(!d[o]){var h=g[f]!==void 0,p=f==="orientation";if((h||l)&&(d[f]=e(f,a[f]),p&&(d.fillDflt=d[f]==="h"?"tonextx":"tonexty"),h&&(d[o]=!0,!l&&(delete d.traces[0][f],p))
1353))for(var s=0;s<d.traces.length-1;s++){var x=d.traces[s];x._input.fill!==x.fill&&(x.fill=d.fillDflt)}}}return d}}},{}],951:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/drawing"),b=v("../../registry");function y(n,t,i){g.pointStyle(n.selectAll("path.point"),t,i)}function e(n,t,i){g.textPointStyle(n.selectAll("text"),t,i)}$.exports={style:function(n){var t=m.select(n).selectAll("g.trace.scatter");t.style("opacity",function(i){return i[0].trace.opacity}),t.selectAll("g.points").each(function(i){y(m.select(this),i.trace||i[0].trace,n)}),t.selectAll("g.text").each(function(i){e(m.select(this),i.trace||i[0].trace,n)}),t.selectAll("g.trace path.js-line").call(g.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(g.fillGroupStyle,n),b.getComponentMethod("errorbars","style")(t)},stylePoints:y,styleText:e,styleOnSelect:function(n,t,i){var r=t[0].trace;r.selectedpoints?(g.selectedPointStyle(i.selectAll("path.point"),r),g.selectedTextStyle(i.selectAll("text"),r)):(y(i,r,n),e(i,r,n))}}},{"../../components/drawing":388,"../../registry":638,"@plotly/d3":58}],952:[function(v,$,te){var m=v("../../lib");$.exports={hasLines:function(g){return g.visible&&g.mode&&g.mode.indexOf("lines")!==-1},hasMarkers:function(g){return g.visible&&(g.mode&&g.mode.indexOf("markers")!==-1||g.type==="splom")},hasText:function(g){return g.visible&&g.mode&&g.mode.indexOf("text")!==-1},isBubble:function(g){return m.isPlainObject(g.marker)&&m.isArrayOrTypedArray(g.marker.size)}}},{"../../lib":503}],953:[function(v,$,te){var m=v("../../lib");$.exports=function(g,b,y,e,n){n=n||{},e("textposition"),m.coerceFont(e,"textfont",y.font),n.noSelect||(e("selected.textfont.color"),e("unselected.textfont.color"))}},{"../../lib":503}],954:[function(v,$,te){var m=v("../../lib"),g=v("../../registry");$.exports=function(b,y,e,n){var t,i=n("x"),r=n("y");if(g.getComponentMethod("calendars","handleTraceDefaults")(b,y,["x","y"],e),i){var d=m.minRowLength(i);r?t=Math.min(d,m.minRowLength(r)):(t=d,n("y0"),n("dy"))}else{if(!r)return 0;t=m.minRowLength(r),n("x0"),n("dx")}return y._length=t,t}},{"../../lib":503,"../../registry":638}],955:[function(v,$,te){var m=v("../scatter/attributes"),g=v("../../components/colorscale/attributes"),b=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,y=v("../../plots/template_attributes").hovertemplateAttrs,e=v("../../plots/template_attributes").texttemplateAttrs,n=v("../../plots/attributes"),t=v("../../constants/gl3d_dashes"),i=v("../../constants/gl3d_markers"),r=v("../../lib/extend").extendFlat,d=v("../../plot_api/edit_types").overrideAll,l=v("../../lib/sort_object_keys"),a=m.line,u=m.marker,f=u.line,o=r({width:a.width,dash:{valType:"enumerated",values:l(t),dflt:"solid"}},g("line")),h=$.exports=d({x:m.x,y:m.y,z:{valType:"data_array"},text:r({},m.text,{}),texttemplate:e({},{}),hovertext:r({},m.hovertext,{}),hovertemplate:y(),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),mode:r({},m.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:m.connectgaps,line:o,marker:r({symbol:{valType:"enumerated",values:l(i),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})},g("marker.line"))},g("marker")),textposition:r({},m.textposition,{dflt:"top center"}),textfont:{color:m.textfont.color,size:m.textfont.size,family:r({},m.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":927}],956:[function(v,$,te){var m=v("../scatter/arrays_to_calcdata"),g=v("../scatter/colorscale_calc");$.exports=function(b,y){var e=[{x:!1,y:!1,trace:y,t:{}}];return m(e,y),g(b,y),e}},{"../scatter/arrays_to_calcdata":926,"../scatter/colorscale_calc":930}],957:[function(v,$,te){var m=v("../../registry");function g(b,y,e,n){if(!y||!y.visible)return null;for(var t=m.getComponentMethod("errorbars","makeComputeError")(y),i=new Array(b.length),r=0;r<b.length;r++){var d=t(+b[r],r);if(n.type==="log"){var l=n.c2l(b[r]),a=b[r]-d[0],u=b[r]+d[1];if(i[r]=[(n.c2l(a,!0)-l)*e,(n.c2l(u,!0)-l)*e],a>0){var f=n.c2l(a);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else i[r]=[-d[0]*e,d[1]*e]}return i}$.exports=function(b,y,e){var n=[g(b.x,b.error_x,y[0],e.xaxis),g(b.y,b.error_y,y[1],e.yaxis),g(b.z,b.error_z,y[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 i=new Array(t),r=0;r<t;r++){for(var d=[[0,0,0],[0,0,0]],l=0;l<3;l++)if(n[l])for(var a=0;a<2;a++)d[a][l]=n[l][r][a];i[r]=d}return i}},{"../../registry":638}],958:[function(v,$,te){var m=v("../../../stackgl_modules").gl_line3d,g=v("../../../stackgl_modules").gl_scatter3d,b=v("../../../stackgl_modules").gl_error3d,y=v("../../../stackgl_modules").gl_mesh3d,e=v("../../../stackgl_modules").delaunay_triangulate,n=v("../../lib"),t=v("../../lib/str2rgbarray"),i=v("../../lib/gl_format_color").formatColor,r=v("../scatter/make_bubble_size_func"),d=v("../../constants/gl3d_dashes"),l=v("../../constants/gl3d_markers"),a=v("../../plots/cartesian/axes"),u=v("../../components/fx/helpers").appendArrayPointValue,f=v("./calc_errors");function o(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=o.prototype;function p(L){return L==null?0:L.indexOf("left")>-1?-1:L.indexOf("right")>-1?1:0}function s(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 c(L){return l[L]}function T(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,G=V.yaxis,W=V.zaxis,Q=A.marker,R=A.line,N=A.x||[],U=A.y||[],ee=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=G.d2l(U[D],0,J)*Z[1],S=W.d2l(ee[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(Se,Oe){var De=V[Se];return a.tickText(De,De.d2l(Oe),!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(Se){return se[Se]}:function(){return se};for(F=new Array(ce),D=0;D<ce;D++){var xe={x:N[D],y:U[D],z:ee[D]}
vendor: 4,837 bytes, line 1353
1353,_e={xLabel:ne("xaxis",N[D]),yLabel:ne("yaxis",U[D]),zLabel:ne("zaxis",ee[D])},we={};u(we,A,D);var Ee=A._meta||{};F[D]=n.texttemplateString(de(D),_e,oe,we,xe,Ee)}}if(E={position:H,mode:A.mode,text:F},"line"in A&&(E.lineColor=i(R,1,j),E.lineWidth=R.width,E.lineDashes=R.dash),"marker"in A){var fe=r(A);E.scatterColor=i(Q,1,j),E.scatterSize=T(Q.size,j,x,20,fe),E.scatterMarker=T(Q.symbol,j,c,"\u25CF"),E.scatterLineWidth=Q.line.width,E.scatterLineColor=i(Q.line,1,j),E.scatterAngle=0}"textposition"in A&&(E.textOffset=function(Se){var Oe=[0,0];if(Array.isArray(Se))for(var De=0;De<Se.length;De++)Oe[De]=[0,0],Se[De]&&(Oe[De][0]=p(Se[De]),Oe[De][1]=s(Se[De]));else Oe[0]=p(Se),Oe[1]=s(Se);return Oe}(A.textposition),E.textColor=i(A.textfont,1,j),E.textSize=T(A.textfont.size,j,n.identity,12),E.textFont=A.textfont.family,E.textAngle=0);var ge=["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 ke=A.projection[ge[D]];(E.project[D]=ke.show)&&(E.projectOpacity[D]=ke.opacity,E.projectScale[D]=ke.scale)}E.errorBounds=f(A,Z,V);var be=function(Se){for(var Oe=[0,0,0],De=[[0,0,0],[0,0,0],[0,0,0]],je=[1,1,1],Je=0;Je<3;Je++){var ze=Se[Je];ze&&ze.copy_zstyle!==!1&&Se[2].visible!==!1&&(ze=Se[2]),ze&&ze.visible&&(Oe[Je]=ze.width/2,De[Je]=t(ze.color),je[Je]=ze.thickness)}return{capSize:Oe,color:De,lineWidth:je}}([A.error_x,A.error_y,A.error_z]);return E.errorColor=be.color,E.errorLineWidth=be.lineWidth,E.errorCapSize=be.capSize,E.delaunayAxis=A.surfaceaxis,E.delaunayColor=t(A.surfacecolor),E}function w(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"?w(L):L.map(w):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=m(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=g(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=g(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,G){var W,Q=(G+1)%3,R=(G+2)%3,N=[],U=[];for(W=0;W<Z.length;++W){var ee=Z[W];!isNaN(ee[Q])&&isFinite(ee[Q])&&!isNaN(ee[R])&&isFinite(ee[R])&&
1353(N.push([ee[Q],ee[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=y(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())},$.exports=function(L,A){var I=new o(L,A.uid);return I.update(A),I}},{"../../../stackgl_modules":1124,"../../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":944,"./calc_errors":957}],959:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("../scatter/subtypes"),y=v("../scatter/marker_defaults"),e=v("../scatter/line_defaults"),n=v("../scatter/text_defaults"),t=v("./attributes");$.exports=function(i,r,d,l){function a(x,c){return g.coerce(i,r,t,x,c)}if(function(x,c,T,_){var w=0,k=T("x"),L=T("y"),A=T("z");return m.getComponentMethod("calendars","handleTraceDefaults")(x,c,["x","y","z"],_),k&&L&&A&&(w=Math.min(k.length,L.length,A.length),c._length=c._xlength=c._ylength=c._zlength=w),w}(i,r,a,l)){a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),b.hasLines(r)&&(a("connectgaps"),e(i,r,d,l,a)),b.hasMarkers(r)&&y(i,r,d,l,a,{noSelect:!0}),b.hasText(r)&&(a("texttemplate"),n(i,r,l,a,{noSelect:!0}));var u=(r.line||{}).color,f=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",u||f);for(var o=["x","y","z"],h=0;h<3;++h){var p="projection."+o[h];a(p+".show")&&(a(p+".opacity"),a(p+".scale"))}var s=m.getComponentMethod("errorbars","supplyDefaults");s(i,r,u||f||d,{axis:"z"}),s(i,r,u||f||d,{axis:"y",inherit:"z"}),s(i,r,u||f||d,{axis:"x",inherit:"z"})}else r.visible=!1}},{"../../lib":503,"../../registry":638,"../scatter/line_defaults":940,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":955}],960:[function(v,$,te){$.exports={plot:v("./convert"),attributes:v("./attributes"),markerSymbols:v("../../constants/gl3d_markers"),supplyDefaults:v("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:v("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:v("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":477,"../../plots/gl3d":598,"./attributes":955,"./calc":956,"./convert":958,"./defaults":959}],961:[function(v,$,te){var m=v("../scatter/attributes"),g=v("../../plots/attributes"),b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../../plots/template_attributes").texttemplateAttrs,e=v("../../components/colorscale/attributes"),n=v("../../lib/extend").extendFlat,t=m.marker,i=m.line,r=t.line;$.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},m.mode,{dflt:"markers"}),text:n({},m.text,{}),texttemplate:y({editType:"plot"},{keys:["a","b","text"]}),hovertext:n({},m.hovertext,{}),line:{color:i.color,width:i.width,dash:i.dash,shape:n({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:m.connectgaps,fill:n({},m.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:m.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:m.textfont,textposition:m.textposition,selected:m.selected,unselected:m.unselected,hoverinfo:n({},g.hoverinfo,{flags:["a","b","text","name"]}),hoveron:m.hoveron,hovertemplate:b()}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":927}],962:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../scatter/colorscale_calc"),b=v("../scatter/arrays_to_calcdata"),y=v("../scatter/calc_selection"),e=v("../scatter/calc").calcMarkerSize,n=v("../carpet/lookup_carpetid");$.exports=function(t,i){var r=i._carpetTrace=n(t,i);if(r&&r.visible&&r.visible!=="legendonly"){var d;i.xaxis=r.xaxis,i.yaxis=r.yaxis;var l,a,u=i._length,f=new Array(u),o=!1;for(d=0;d<u;d++)if(l=i.a[d],a=i.b[d],m(l)&&m(a)){var h=r.ab2xy(+l,+a,!0),p=r.isVisible(+l,+a);p||(o=!0),f[d]={x:h[0],y:h[1],a:l,b:a,vis:p}}else f[d]={x:!1,y:!1};return i._needsCull=o,f[0].carpet=r,f[0].trace=i,e(i,u),g(t,i),b(f,i),y(f,i),f}}},{"../carpet/lookup_carpetid":708,"../scatter/arrays_to_calcdata":926,"../scatter/calc":928,"../scatter/calc_selection":929,"../scatter/colorscale_calc":930,"fast-isnumeric":190}],963:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/constants"),b=v("../scatter/subtypes"),y=v("../scatter/marker_defaults"),e=v("../scatter/line_defaults"),n=v("../scatter/line_shape_defaults"),t=v("../scatter/text_defaults"),i=v("../scatter/fillcolor_defaults"),r=v("./attributes");$.exports=function(d,l,a,u){function f(x,c){return m.coerce(d,l,r,x,c)}f("carpet"),l.xaxis="x",l.yaxis="y";var o=f("a"),h=f("b"),p=Math.min(o.length,h.length);if(p){l._length=p,f("text"),f("texttemplate"),f("hovertext"),f("mode",p<g.PTS_LINESONLY?"lines+markers":"lines"),b.hasLines(l)&&(e(d,l,a,u,f),n(d,l,f),f("connectgaps")),b.hasMarkers(l)&&y(d,l,a,u,f,{gradient:!0}),b.hasText(l)&&t(d,l,u,f);var s=[];(b.hasMarkers(l)||b.hasText(l))&&(f("marker.maxdisplayed"),s.push("points")),f("fill"),l.fill!=="none"&&(i(d,l,a,f),b.hasLines(l)||n(d,l,f)),l.fill!=="tonext"&&l.fill!=="toself"||s.push("fills"),f("hoveron",s.join("+")||"points")!=="fills"&&f("hovertemplate"),m.coerceSelectionMarkerOpacity(l,f)}else l.visible=!1}},{"../../lib":503,"../scatter/constants":931,"../scatter/fillcolor_defaults":935,"../scatter/line_defaults":940,"../scatter/line_shape_defaults":942,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":961}],964:[function(v,$,te){$.exports=function(m,g,b,y,e){var n=y[e];return m.a=n.a,m.b=n.b,m.y=n.y,m}},{}],965:[function(v,$,te){$.exports=function(m,g){var b={},y=g._carpet,e=y.ab2ij([m.a,m.b]),n=Math.floor(e[0]),t=e[0]-n,i=Math.floor(e[1]),r=e[1]-i,d=y.evalxy([],n,i,t,r);return b.yLabel=d[1].toFixed(3),b}},{}],966:[function(v,$,te){var m=v("../scatter/hover"),g=v("../../lib").fillText;$.exports=function(b,y,e,n){var t=m(b,y,e,n);if(t&&t[0].index!==!1){var i=t[0];if(i.index===void 0){var r=1-i.y0/b.ya._length,d=b.xa._length,l=d*r/2,a=d-l;return i.x0=Math.max(Math.min(i.x0,a),l),i.x1=Math.max(Math.min(i.x1,a),l),t}var u=i.cd[i.index];i.a=u.a,i.b=u.b,i.xLabelVal=void 0,i.yLabelVal=void 0;var f=i.trace,o=f._carpet,h=f._module.formatLabels(u,f);i.yLabel=h.yLabel,delete i.text;var p=[];if(!f.hovertemplate){var s=(u.hi||f.hoverinfo).split("+");s.indexOf("all")!==-1&&(s=["a","b","text"]),s.indexOf("a")!==-1&&x(o.aaxis,u.a),s.indexOf("b")!==-1&&x(o.baxis,u.b),p.push("y: "+i.yLabel),s.indexOf("text")!==-1&&g(u,f,p),i.extraText=p.join("<br>")}return t}function x(c,T){var _;_=c.labelprefix&&c.labelprefix.length>0?c.labelprefix.replace(/ = $/,""):c._hovertitle,p.push(_+": "+T.toFixed(3)+c.labelsuffix)}}},{"../../lib":503,"../scatter/hover":938}],967:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../scatter/marker_colorbar"),formatLabels:v("./format_labels"),calc:v("./calc"),plot:v("./plot"),style:v("../scatter/style").style,styleOnSelect:v("../scatter/style").styleOnSelect,hoverPoints:v("./hover"),selectPoints:v("../scatter/select"),eventData:v("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:v("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDepen
1353dent","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":961,"./calc":962,"./defaults":963,"./event_data":964,"./format_labels":965,"./hover":966,"./plot":968}],968:[function(v,$,te){var m=v("../scatter/plot"),g=v("../../plots/cartesian/axes"),b=v("../../components/drawing");$.exports=function(y,e,n,t){var i,r,d,l=n[0][0].carpet,a={xaxis:g.getFromId(y,l.xaxis||"x"),yaxis:g.getFromId(y,l.yaxis||"y"),plot:e.plot};for(m(y,a,n,t),i=0;i<n.length;i++)r=n[i][0].trace,d=t.selectAll("g.trace"+r.uid+" .js-line"),b.setClipUrl(d,n[i][0].carpet._clipPathId,y)}},{"../../components/drawing":388,"../../plots/cartesian/axes":554,"../scatter/plot":948}],969:[function(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../../plots/template_attributes").texttemplateAttrs,b=v("../scatter/attributes"),y=v("../../plots/attributes"),e=v("../../components/colorscale/attributes"),n=v("../../components/drawing/attributes").dash,t=v("../../lib/extend").extendFlat,i=v("../../plot_api/edit_types").overrideAll,r=b.marker,d=b.line,l=r.line;$.exports=i({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:g({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:l.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({},y.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:m()},"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":927}],970:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../constants/numerical").BADNUM,b=v("../scatter/colorscale_calc"),y=v("../scatter/arrays_to_calcdata"),e=v("../scatter/calc_selection"),n=v("../../lib")._;function t(i){return i&&typeof i=="string"}$.exports=function(i,r){var d,l=Array.isArray(r.locations),a=l?r.locations.length:r._length,u=new Array(a);d=r.geojson?function(x){return t(x)||m(x)}:t;for(var f=0;f<a;f++){var o=u[f]={};if(l){var h=r.locations[f];o.loc=d(h)?h:null}else{var p=r.lon[f],s=r.lat[f];m(p)&&m(s)?o.lonlat=[+p,+s]:o.lonlat=[g,g]}}return y(u,r),b(i,r),e(u,r),a&&(u[0].t={labels:{lat:n(i,"lat:")+" ",lon:n(i,"lon:")+" "}}),u}},{"../../constants/numerical":479,"../../lib":503,"../scatter/arrays_to_calcdata":926,"../scatter/calc_selection":929,"../scatter/colorscale_calc":930,"fast-isnumeric":190}],971:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/subtypes"),b=v("../scatter/marker_defaults"),y=v("../scatter/line_defaults"),e=v("../scatter/text_defaults"),n=v("../scatter/fillcolor_defaults"),t=v("./attributes");$.exports=function(i,r,d,l){function a(x,c){return m.coerce(i,r,t,x,c)}var u,f=a("locations");if(f&&f.length){var o,h=a("geojson");(typeof h=="string"&&h!==""||m.isPlainObject(h))&&(o="geojson-id"),a("locationmode",o)==="geojson-id"&&a("featureidkey"),u=f.length}else{var p=a("lon")||[],s=a("lat")||[];u=Math.min(p.length,s.length)}u?(r._length=u,a("text"),a("hovertext"),a("hovertemplate"),a("mode"),g.hasLines(r)&&(y(i,r,d,l,a),a("connectgaps")),g.hasMarkers(r)&&b(i,r,d,l,a,{gradient:!0}),g.hasText(r)&&(a("texttemplate"),e(i,r,l,a)),a("fill"),r.fill!=="none"&&n(i,r,d,a),m.coerceSelectionMarkerOpacity(r,a)):r.visible=!1}},{"../../lib":503,"../scatter/fillcolor_defaults":935,"../scatter/line_defaults":940,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":969}],972:[function(v,$,te){$.exports=function(m,g,b,y,e){m.lon=g.lon,m.lat=g.lat,m.location=g.loc?g.loc:null;var n=y[e];return n.fIn&&n.fIn.properties&&(m.properties=n.fIn.properties),m}},{}],973:[function(v,$,te){var m=v("../../plots/cartesian/axes");$.exports=function(g,b,y){var e={},n=y[b.geo]._subplot.mockAxis,t=g.lonlat;return e.lonLabel=m.tickText(n,n.c2l(t[0]),!0).text,e.latLabel=m.tickText(n,n.c2l(t[1]),!0).text,e}},{"../../plots/cartesian/axes":554}],974:[function(v,$,te){var m=v("../../components/fx"),g=v("../../constants/numerical").BADNUM,b=v("../scatter/get_trace_color"),y=v("../../lib").fillText,e=v("./attributes");$.exports=function(n,t,i){var r=n.cd,d=r[0].trace,l=n.xa,a=n.ya,u=n.subplot,f=u.projection.isLonLatOverEdges,o=u.project;if(m.getClosest(r,function(_){var w=_.lonlat;if(w[0]===g||f(w))return 1/0;var k=o(w),L=o([t,i]),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,s=[l.c2p(p),a.c2p(p)],x=h.mrc||1;n.x0=s[0]-x,n.x1=s[0]+x,n.y0=s[1]-x,n.y1=s[1]+x,n.loc=h.loc,n.lon=p[0],n.lat=p[1];var c={};c[d.geo]={_subplot:u};var T=d._module.formatLabels(h,d,c);
1353return n.lonLabel=T.lonLabel,n.latLabel=T.latLabel,n.color=b(d,h),n.extraText=function(_,w,k,L){if(_.hovertemplate)return;var A=w.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+"\xB0"}return P?F.push(w.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&&y(w,_,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":937,"./attributes":969}],975:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../scatter/marker_colorbar"),formatLabels:v("./format_labels"),calc:v("./calc"),calcGeoJSON:v("./plot").calcGeoJSON,plot:v("./plot").plot,style:v("./style"),styleOnSelect:v("../scatter/style").styleOnSelect,hoverPoints:v("./hover"),eventData:v("./event_data"),selectPoints:v("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:v("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":589,"../scatter/marker_colorbar":945,"../scatter/style":951,"./attributes":969,"./calc":970,"./defaults":971,"./event_data":972,"./format_labels":973,"./hover":974,"./plot":976,"./select":977,"./style":978}],976:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../lib/topojson_utils").getTopojsonFeatures,y=v("../../lib/geojson_utils"),e=v("../../lib/geo_location_utils"),n=v("../../plots/cartesian/autorange").findExtremes,t=v("../../constants/numerical").BADNUM,i=v("../scatter/calc").calcMarkerSize,r=v("../scatter/subtypes"),d=v("./style");$.exports={calcGeoJSON:function(l,a){var u,f,o=l[0].trace,h=a[o.geo],p=h._subplot,s=o._length;if(Array.isArray(o.locations)){var x=o.locationmode,c=x==="geojson-id"?e.extractTraceFeature(l):b(o,p.topojson);for(u=0;u<s;u++){f=l[u];var T=x==="geojson-id"?f.fOut:e.locationToFeature(x,f.loc,c);f.lonlat=T?T.properties.ct:[t,t]}}var _,w,k={padded:!0};if(h.fitbounds==="geojson"&&o.locationmode==="geojson-id"){var L=e.computeBbox(e.getTraceGeojson(o));_=[L[0],L[2]],w=[L[1],L[3]]}else{for(_=new Array(s),w=new Array(s),u=0;u<s;u++)f=l[u],_[u]=f.lonlat[0],w[u]=f.lonlat[1];k.ppad=i(o,s)}o._extremes.lon=n(h.lonaxis._ax,_,k),o._extremes.lat=n(h.lataxis._ax,w,k)},plot:function(l,a,u){var f=a.layers.frontplot.select(".scatterlayer"),o=g.makeTraceGroups(f,u,"trace scattergeo");function h(p,s){p.lonlat[0]===t&&m.select(s).remove()}o.selectAll("*").remove(),o.each(function(p){var s=m.select(this),x=p[0].trace;if(r.hasLines(x)||x.fill!=="none"){var c=y.calcTraceToLineCoords(p),T=x.fill!=="none"?y.makePolygon(c):y.makeLine(c);s.selectAll("path.js-line").data([{geojson:T,trace:x}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(x)&&s.selectAll("path.point").data(g.identity).enter().append("path").classed("point",!0).each(function(_){h(_,this)}),r.hasText(x)&&s.selectAll("g").data(g.identity).enter().append("g").append("text").each(function(_){h(_,this)}),d(l,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":928,"../scatter/subtypes":952,"./style":978,"@plotly/d3":58}],977:[function(v,$,te){var m=v("../scatter/subtypes"),g=v("../../constants/numerical").BADNUM;$.exports=function(b,y){var e,n,t,i,r,d=b.cd,l=b.xaxis,a=b.yaxis,u=[],f=d[0].trace;if(!m.hasMarkers(f)&&!m.hasText(f))return[];if(y===!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]!==g&&(t=l.c2p(n),i=a.c2p(n),y.contains([t,i],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":952}],978:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/drawing"),b=v("../../components/color"),y=v("../scatter/style"),e=y.stylePoints,n=y.styleText;$.exports=function(t,i){i&&function(r,d){var l=d[0].trace,a=d[0].node3;a.style("opacity",d[0].trace.opacity),e(a,l,r),n(a,l,r),a.selectAll("path.js-line").style("fill","none").each(function(u){var f=m.select(this),o=u.trace,h=o.line||{};f.call(b.stroke,h.color).call(g.dashLine,h.dash||"",h.width||0),o.fill!=="none"&&f.call(b.fill,o.fillcolor)})}(t,i)}},{"../../components/color":366,"../../components/drawing":388,"../scatter/style":951,"@plotly/d3":58}],979:[function(v,$,te){var m=v("../../plots/attributes"),g=v("../scatter/attributes"),b=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,y=v("../../components/colorscale/attributes"),e=v("../../lib/sort_object_keys"),n=v("../../lib/extend").extendFlat,t=v("../../plot_api/edit_types").overrideAll,i=v("./constants").DASHES,r=g.line,d=g.marker,l=d.line,a=$.exports=t({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:b("x"),yhoverformat:b("y"),text:g.text,hovertext:g.hovertext,textposition:g.textposition,textfont:g.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(i),dflt:"solid"}},marker:n({},y("marker"),{symbol:d.symbol,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,opacity:d.opacity,colorbar:d.colorbar,line:n({},y("marker.line"),{width:l.width})}),connectgaps:g.connectgaps,fill:n({},g.fill,{dflt:"none"}
1353),fillcolor:g.fillcolor,selected:{marker:g.selected.marker,textfont:g.selected.textfont},unselected:{marker:g.unselected.marker,textfont:g.unselected.textfont},opacity:m.opacity},"calc","nested");a.x.editType=a.y.editType=a.x0.editType=a.y0.editType="calc+clearAxisTypes",a.hovertemplate=g.hovertemplate,a.texttemplate=g.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":927,"./constants":982}],980:[function(v,$,te){var m=v("./hover");$.exports={moduleType:"trace",name:"scattergl",basePlotModule:v("../../plots/cartesian"),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:v("./attributes"),supplyDefaults:v("./defaults"),crossTraceDefaults:v("../scatter/cross_trace_defaults"),colorbar:v("../scatter/marker_colorbar"),formatLabels:v("./format_labels"),calc:v("./calc"),hoverPoints:m.hoverPoints,selectPoints:v("./select"),meta:{}}},{"../../plots/cartesian":568,"../scatter/cross_trace_defaults":933,"../scatter/marker_colorbar":945,"./attributes":979,"./calc":981,"./defaults":984,"./format_labels":986,"./hover":988,"./select":992}],981:[function(v,$,te){var m=v("@plotly/point-cluster"),g=v("../../lib"),b=v("../../plots/cartesian/axis_ids"),y=v("../../plots/cartesian/autorange").findExtremes,e=v("../../plots/cartesian/align_period"),n=v("../scatter/calc"),t=n.calcMarkerSize,i=n.
1353calcAxisExpansion,r=n.setFirstScatter,d=v("../scatter/colorscale_calc"),l=v("./convert"),a=v("./scene_update"),u=v("../../constants/numerical").BADNUM,f=v("./constants").TOO_MANY_POINTS;function o(h,p,s){var x=h._extremes[p._id],c=y(p,s._bnds,{padded:!0});x.min=x.min.concat(c.min),x.max=x.max.concat(c.max)}$.exports=function(h,p){var s,x=h._fullLayout,c=b.getFromId(h,p.xaxis),T=b.getFromId(h,p.yaxis),_=x._plots[p.xaxis+p.yaxis],w=p._length,k=w>=f,L=2*w,A={},I=c.makeCalcdata(p,"x"),P=T.makeCalcdata(p,"y"),S=e(p,c,"x",I),E=e(p,T,"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(w);for(s=0;s<w;s++)H[2*s]=D[s]===u?NaN:D[s],H[2*s+1]=F[s]===u?NaN:F[s],V[s]=s;if(c.type==="log")for(s=0;s<L;s+=2)H[s]=c.c2l(H[s]);if(T.type==="log")for(s=1;s<L;s+=2)H[s]=T.c2l(H[s]);k&&c.type!=="log"&&T.type!=="log"?A.tree=m(H):A.ids=V,d(h,p);var Z,K=function(W,Q,R,N,U,ee){var j=l.style(W,R);if(j.marker&&(j.marker.positions=N),j.line&&N.length>1&&g.extendFlat(j.line,l.linePositions(W,R,N)),j.errorX||j.errorY){var X=l.errorBarPositions(W,R,N,U,ee);j.errorX&&g.extendFlat(j.errorX,X.x),j.errorY&&g.extendFlat(j.errorY,X.y)}return j.text&&(g.extendFlat(j.text,{positions:N},l.textPosition(W,R,j.text,j.marker)),g.extendFlat(j.textSel,{positions:N},l.textPosition(W,R,j.text,j.markerSel)),g.extendFlat(j.textUnsel,{positions:N},l.textPosition(W,R,j.text,j.markerUnsel))),j}(h,0,p,H,D,F),G=a(h,_);return r(x,p),k?K.marker&&(Z=K.marker.sizeAvg||Math.max(K.marker.size,3)):Z=t(p,w),i(h,p,c,T,D,F,Z),K.errorX&&o(p,c,K.errorX),K.errorY&&o(p,T,K.errorY),K.fill&&!G.fill2d&&(G.fill2d=!0),K.marker&&!G.scatter2d&&(G.scatter2d=!0),K.line&&!G.line2d&&(G.line2d=!0),!K.errorX&&!K.errorY||G.error2d||(G.error2d=!0),K.text&&!G.glText&&(G.glText=!0),K.marker&&(K.marker.snap=w),G.lineOptions.push(K.line),G.errorXOptions.push(K.errorX),G.errorYOptions.push(K.errorY),G.fillOptions.push(K.fill),G.markerOptions.push(K.marker),G.markerSelectedOptions.push(K.markerSel),G.markerUnselectedOptions.push(K.markerUnsel),G.textOptions.push(K.text),G.textSelectedOptions.push(K.textSel),G.textUnselectedOptions.push(K.textUnsel),G.selectBatch.push([]),G.unselectBatch.push([]),A._scene=G,A.index=G.count,A.x=D,A.y=F,A.positions=H,G.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":928,"../scatter/colorscale_calc":930,"./constants":982,"./convert":983,"./scene_update":991,"@plotly/point-cluster":59}],982:[function(v,$,te){$.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]}}},{}],983:[function(v,$,te){var m=v("fast-isnumeric"),g=v("svg-path-sdf"),b=v("color-normalize"),y=v("../../registry"),e=v("../../lib"),n=v("../../components/drawing"),t=v("../../plots/cartesian/axis_ids"),i=v("../../lib/gl_format_color").formatColor,r=v("../scatter/subtypes"),d=v("../scatter/make_bubble_size_func"),l=v("./helpers"),a=v("./constants"),u=v("../../constants/interactions").DESELECTDIM,f={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},o=v("../../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,G=F.family,W={},Q=I._context.plotGlPixelRatio,R=P.texttemplate;if(R){W.text=[];var N=E._d3locale,U=Array.isArray(R),ee=U?Math.min(R.length,D):D,j=U?function(pe){return R[pe]}:function(){return R};for(S=0;S<ee;S++){var X={i:S},J=P._module.formatLabels(X,P,E),re={};o(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(G))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)?m(K[S])?K[S]:0:K)*Q,oe.family=Array.isArray(G)?G[S]:G}else W.font={size:K*Q,family:G};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),G=e.isArrayOrTypedArray(D.size),W=e.isArrayOrTypedArray(D.line.width);if(H||(S=l.isOpenSymbol(D.symbol)),H||V||Z||K){F.colors=new Array(E),F.borderColors=new Array(E);var Q=i(D,D.opacity,E),R=i(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(Q[0])){var U=Q;for(Q=Array(E),P=0;P<E;P++)Q[P]=U}for(F.colors=Q,F.borderColors=R,P=0;P<E;P++){if(H){var ee=D.symbol[P];S=l.isOpenSymbol(ee)}S&&(R[P]=Q[P].slice(),Q[P]=Q[P].slice(),Q[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(G||W){var J,re=F.sizes=new Array(E),ne=F.borderSizes=new Array(E),se=0;if(G){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 s(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 c(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 T=a.SYMBOL_SDF_SIZE,_=a.SYMBOL_SIZE,w=a.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=l.isDotSymbol(I);return k[I]?k[I]:(P=V&&!F?D(1.1*_)+L:D(_),S=g(P,{w:T,h:T,viewBox:[-_,-_,_,_],stroke:H?w:-w}),k[I]=S,S||null)}$.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=s(P,P.selected),E.markerUnsel=s(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=(a.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=c(P,P.error_x,D)),P.error_y&&P.error_y.visible&&(E.errorY=c(P,P.error_y,D)),P.fill&&P.fill!=="none"&&(E.fill={closed:!0,fill:P.fillcolor,thickness:0}),E}
1353,markerStyle:p,markerSelection:s,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 G=K||E.length>a.TOO_MANY_POINTS||r.hasMarkers(P)?"rect":"round";if(K&&P.connectgaps){var W=E[0],Q=E[1];for(D=0;D<E.length;D+=2)isNaN(E[D])||isNaN(E[D+1])?(E[D]=W,E[D+1]=Q):(W=E[D],Q=E[D+1])}return{join:G,positions:E}},errorBarPositions:function(I,P,S,E,D){var F=y.getComponentMethod("errorbars","makeComputeError"),H=t.getFromId(I,P.xaxis),V=t.getFromId(I,P.yaxis),Z=S.length/2,K={};function G(W,Q){var R=Q._id.charAt(0),N=P["error_"+R];if(N&&N.visible&&(Q.type==="linear"||Q.type==="log")){for(var U=F(N),ee={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(m(oe)){var pe=S[2*ne+ee],ce=U(oe,ne),de=ce[0],xe=ce[1];if(m(de)&&m(xe)){var _e=oe-de,we=oe+xe;X[se+j[0]]=pe-Q.c2l(_e),X[se+j[1]]=Q.c2l(we)-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 G(E,H),G(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 G=E.sizes?E.sizes[D]:E.size,W=Array.isArray(V)?V[D].size:V.size,Q=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[Q],U=f[R],ee=G?G/.8+1:0,j=-U*ee-.5*U;H.offset[D]=[N*ee/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":944,"../scatter/subtypes":952,"./constants":982,"./helpers":987,"color-normalize":89,"fast-isnumeric":190,"svg-path-sdf":310}],984:[function(v,$,te){var m=v("../../lib"),g=v("../../registry"),b=v("./helpers"),y=v("./attributes"),e=v("../scatter/constants"),n=v("../scatter/subtypes"),t=v("../scatter/xy_defaults"),i=v("../scatter/period_defaults"),r=v("../scatter/marker_defaults"),d=v("../scatter/line_defaults"),l=v("../scatter/fillcolor_defaults"),a=v("../scatter/text_defaults");$.exports=function(u,f,o,h){function p(L,A){return m.coerce(u,f,y,L,A)}var s=!!u.marker&&b.isOpenSymbol(u.marker.symbol),x=n.isBubble(u),c=t(u,f,h,p);if(c){i(u,f,h,p),p("xhoverformat"),p("yhoverformat");var T=c<e.PTS_LINESONLY?"lines+markers":"lines";p("text"),p("hovertext"),p("hovertemplate"),p("mode",T),n.hasLines(f)&&(p("connectgaps"),d(u,f,o,h,p),p("line.shape")),n.hasMarkers(f)&&(r(u,f,o,h,p),p("marker.line.width",s||x?1:0)),n.hasText(f)&&(p("texttemplate"),a(u,f,h,p));var _=(f.line||{}).color,w=(f.marker||{}).color;p("fill"),f.fill!=="none"&&l(u,f,o,p);var k=g.getComponentMethod("errorbars","supplyDefaults");k(u,f,_||w||o,{axis:"y"}),k(u,f,_||w||o,{axis:"x",inherit:"y"}),m.coerceSelectionMarkerOpacity(f,p)}else f.visible=!1}},{"../../lib":503,"../../registry":638,"../scatter/constants":931,"../scatter/fillcolor_defaults":935,"../scatter/line_defaults":940,"../scatter/marker_defaults":946,"../scatter/period_defaults":947,"../scatter/subtypes":952,"../scatter/text_defaults":953,"../scatter/xy_defaults":954,"./attributes":979,"./helpers":987}],985:[function(v,$,te){var m=v("../../lib"),g=v("../../components/color"),b=v("../../constants/interactions").DESELECTDIM;$.exports={styleTextSelection:function(y){var e,n,t=y[0],i=t.trace,r=t.t,d=r._scene,l=r.index,a=d.selectBatch[l],u=d.unselectBatch[l],f=d.textOptions[l],o=d.textSelectedOptions[l]||{},h=d.textUnselectedOptions[l]||{},p=m.extendFlat({},f);if(a.length||u.length){var s=o.color,x=h.color,c=f.color,T=Array.isArray(c);for(p.color=new Array(i._length),e=0;e<a.length;e++)n=a[e],p.color[n]=s||(T?c[n]:c);for(e=0;e<u.length;e++){n=u[e];var _=T?c[n]:c;p.color[n]=x||(s?_:g.addOpacity(_,b))}}d.glText[l].update(p)}}},{"../../components/color":366,"../../constants/interactions":478,"../../lib":503}],986:[function(v,$,te){var m=v("../scatter/format_labels");$.exports=function(g,b,y){var e=g.i;return"x"in g||(g.x=b._x[e]),"y"in g||(g.y=b._y[e]),m(g,b,y)}},{"../scatter/format_labels":936}],987:[function(v,$,te){var m=v("./constants");te.isOpenSymbol=function(g){return typeof g=="string"?m.OPEN_RE.test(g):g%200>100},te.isDotSymbol=function(g){return typeof g=="string"?m.DOT_RE.test(g):g>200}},{"./constants":982}],988:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("../scatter/get_trace_color");function y(e,n,t,i){var r=e.xa,d=e.ya,l=e.distance,a=e.dxy,u=e.index,f={pointNumber:u,x:n[u],y:t[u]};f.tx=Array.isArray(i.text)?i.text[u]:i.text,f.htx=Array.isArray(i.hovertext)?i.hovertext[u]:i.hovertext,f.data=Array.isArray(i.customdata)?i.customdata[u]:i.customdata,f.tp=Array.isArray(i.textposition)?i.textposition[u]:i.textposition;var o=i.textfont;o&&(f.ts=g.isArrayOrTypedArray(o.size)?o.size[u]:o.size,f.tc=Array.isArray(o.color)?o.color[u]:o.color,f.tf=Array.isArray(o.family)?o.family[u]:o.family);var h=i.marker;
vendor: 1,484 bytes, line 1353
1353h&&(f.ms=g.isArrayOrTypedArray(h.size)?h.size[u]:h.size,f.mo=g.isArrayOrTypedArray(h.opacity)?h.opacity[u]:h.opacity,f.mx=g.isArrayOrTypedArray(h.symbol)?h.symbol[u]:h.symbol,f.mc=g.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=g.isArrayOrTypedArray(p.width)?p.width[u]:p.width);var s=h&&h.gradient;s&&s.type!=="none"&&(f.mgt=Array.isArray(s.type)?s.type[u]:s.type,f.mgc=Array.isArray(s.color)?s.color[u]:s.color);var x=r.c2p(f.x,!0),c=d.c2p(f.y,!0),T=f.mrc||1,_=i.hoverlabel;_&&(f.hbg=Array.isArray(_.bgcolor)?_.bgcolor[u]:_.bgcolor,f.hbc=Array.isArray(_.bordercolor)?_.bordercolor[u]:_.bordercolor,f.hts=g.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=g.isArrayOrTypedArray(_.namelength)?_.namelength[u]:_.namelength);var w=i.hoverinfo;w&&(f.hi=Array.isArray(w)?w[u]:w);var k=i.hovertemplate;k&&(f.ht=Array.isArray(k)?k[u]:k);var L={};L[e.index]=f;var A=i._origX,I=i._origY,P=g.extendFlat({},e,{color:b(i,f),x0:x-T,x1:x+T,xLabelVal:A?A[u]:f.x,y0:c-T,y1:c+T,yLabelVal:I?I[u]:f.y,cd:L,distance:l,spikeDistance:a,hovertemplate:f.ht});return f.htx?P.text=f.htx:f.tx?P.text=f.tx:i.text&&(P.text=i.text),g.fillText(f,i,P),m.getComponentMethod("errorbars","hoverInfo")(f,i,P),P}$.exports={hoverPoints:function(e,n,t,i){var r,d,l,a,u,f,o,h,p,s,x=e.cd,c=x[0].t,T=x[
13530].trace,_=e.xa,w=e.ya,k=c.x,L=c.y,A=_.c2p(n),I=w.c2p(t),P=e.distance;if(c.tree){var S=_.p2c(A-P),E=_.p2c(A+P),D=w.p2c(I-P),F=w.p2c(I+P);r=i==="x"?c.tree.range(Math.min(S,E),Math.min(w._rl[0],w._rl[1]),Math.max(S,E),Math.max(w._rl[0],w._rl[1])):c.tree.range(Math.min(S,E),Math.min(D,F),Math.max(S,E),Math.max(D,F))}else r=c.ids;var H=P;if(i==="x"){var V=!!T.xperiodalignment,Z=!!T.yperiodalignment;for(f=0;f<r.length;f++){if(a=k[d=r[f]],o=Math.abs(_.c2p(a)-A),V){var K=_.c2p(T._xStarts[d]),G=_.c2p(T._xEnds[d]);o=A>=Math.min(K,G)&&A<=Math.max(K,G)?0:1/0}if(o<H){if(H=o,u=L[d],h=w.c2p(u)-I,Z){var W=w.c2p(T._yStarts[d]),Q=w.c2p(T._yEnds[d]);h=I>=Math.min(W,Q)&&I<=Math.max(W,Q)?0:1/0}s=Math.sqrt(o*o+h*h),l=r[f]}}}else for(f=r.length-1;f>-1;f--)a=k[d=r[f]],u=L[d],o=_.c2p(a)-A,h=w.c2p(u)-I,(p=Math.sqrt(o*o+h*h))<H&&(H=s=p,l=d);return e.index=l,e.distance=H,e.dxy=s,l===void 0?[e]:[y(e,k,L,T)]},calcHover:y}},{"../../lib":503,"../../registry":638,"../scatter/get_trace_color":937}],989:[function(v,$,te){arguments[4][896][0].apply(te,arguments)},{"./base_index":980,"./plot":990,dup:896}],990:[function(v,$,te){var m=v("regl-scatter2d"),g=v("regl-line2d"),b=v("regl-error2d"),y=v("gl-text"),e=v("../../lib"),n=v("../../components/dragelement/helpers").selectMode,t=v("../../lib/prepare_regl"),i=v("../scatter/subtypes"),r=v("../scatter/link_traces"),d=v("./edit_style").styleTextSelection,l={};function a(u,f,o,h){var p=u._size,s=u.width*h,x=u.height*h,c=p.l*h,T=p.b*h,_=p.r*h,w=p.t*h,k=p.w*h,L=p.h*h;return[c+f.domain[0]*k,T+o.domain[0]*L,s-_-(1-f.domain[1])*k,x-w-(1-o.domain[1])*L]}($.exports=function(u,f,o){if(o.length){var h,p,s=u._fullLayout,x=f._scene,c=f.xaxis,T=f.yaxis;if(x)if(t(u,["ANGLE_instanced_arrays","OES_element_index_uint"],l)){var _=x.count,w=s._glcanvas.data()[0].regl;if(r(u,f,o),x.dirty){if(x.error2d===!0&&(x.error2d=b(w)),x.line2d===!0&&(x.line2d=g(w)),x.scatter2d===!0&&(x.scatter2d=m(w)),x.fill2d===!0&&(x.fill2d=g(w)),x.glText===!0)for(x.glText=new Array(_),h=0;h<_;h++)x.glText[h]=new y(w);if(x.glText){if(_>x.glText.length){var k=_-x.glText.length;for(h=0;h<k;h++)x.glText.push(new y(w))}else if(_<x.glText.length){var L=x.glText.length-_;x.glText.splice(_,L).forEach(function(X){X.destroy()})}for(h=0;h<_;h++)x.glText[h].update(x.textOptions[h])}if(x.line2d&&(x.line2d.update(x.lineOptions),x.lineOptions=x.lineOptions.map(function(X){if(X&&X.positions){for(var J=X.positions,re=0;re<J.length&&(isNaN(J[re])||isNaN(J[re+1]));)re+=2;for(var ne=J.length-2;ne>re&&(isNaN(J[ne])||isNaN(J[ne+1]));)ne-=2;X.positions=J.slice(re,ne+2)}return X}),x.line2d.update(x.lineOptions)),x.error2d){var A=(x.errorXOptions||[]).concat(x.errorYOptions||[]);x.error2d.update(A)}x.scatter2d&&x.scatter2d.update(x.markerOptions),x.fillOrder=e.repeat(null,_),x.fill2d&&(x.fillOptions=x.fillOptions.map(function(X,J){var re=o[J];if(X&&re&&re[0]&&re[0].trace){var ne,se,oe=re[0],pe=oe.trace,ce=oe.t,de=x.lineOptions[J],xe=[];pe._ownfill&&xe.push(J),pe._nexttrace&&xe.push(J+1),xe.length&&(x.fillOrder[J]=xe);var _e,we,Ee=[],fe=de&&de.positions||ce.positions;if(pe.fill==="tozeroy"){for(_e=0;_e<fe.length&&isNaN(fe[_e+1]);)_e+=2;for(we=fe.length-2;we>_e&&isNaN(fe[we+1]);)we-=2;fe[_e+1]!==0&&(Ee=[fe[_e],0]),Ee=Ee.concat(fe.slice(_e,we+2)),fe[we+1]!==0&&(Ee=Ee.concat([fe[we],0]))}else if(pe.fill==="tozerox"){for(_e=0;_e<fe.length&&isNaN(fe[_e]);)_e+=2;for(we=fe.length-2;we>_e&&isNaN(fe[we]);)we-=2;fe[_e]!==0&&(Ee=[0,fe[_e+1]]),Ee=Ee.concat(fe.slice(_e,we+2)),fe[we]!==0&&(Ee=Ee.concat([0,fe[we+1]]))}else if(pe.fill==="toself"||pe.fill==="tonext"){for(Ee=[],ne=0,X.splitNull=!0,se=0;se<fe.length;se+=2)(isNaN(fe[se])||isNaN(fe[se+1]))&&((Ee=Ee.concat(fe.slice(ne,se))).push(fe[ne],fe[ne+1]),Ee.push(null,null),ne=se+2);Ee=Ee.concat(fe.slice(ne)),ne&&Ee.push(fe[ne],fe[ne+1])}else{var ge=pe._nexttrace;if(ge){var ke=x.lineOptions[J+1];if(ke){var be=ke.positions;if(pe.fill==="tonexty"){for(Ee=fe.slice(),J=Math.floor(be.length/2);J--;){var Se=be[2*J],Oe=be[2*J+1];isNaN(Se)||isNaN(Oe)||Ee.push(Se,Oe)}X.fill=ge.fillcolor}}}}if(pe._prevtrace&&pe._prevtrace.fill==="tonext"){var De=x.lineOptions[J-1].positions,je=Ee.length/2,Je=[ne=je];for(se=0;se<De.length;se+=2)(isNaN(De[se])||isNaN(De[se+1]))&&(Je.push(se/2+je+1),ne=se+2);Ee=Ee.concat(De),X.hole=Je}return X.fillmode=pe.fill,X.opacity=pe.opacity,X.positions=Ee,X}}),x.fill2d.update(x.fillOptions))}var I=s.dragmode,P=n(I),S=s.clickmode.indexOf("select")>-1;for(h=0;h<_;h++){var E=o[h][0],D=E.trace,F=E.t,H=F.index,V=D._length,Z=F.x,K=F.y;if(D.selectedpoints||P||S){if(P||(P=!0),D.selectedpoints){var G=x.selectBatch[H]=e.selIndices2selPoints(D),W={};for(p=0;p<G.length;p++)W[G[p]]=1;var Q=[];for(p=0;p<V;p++)W[p]||Q.push(p);x.unselectBatch[H]=Q}var R=F.xpx=new Array(V),N=F.ypx=new Array(V);for(p=0;p<V;p++)R[p]=c.c2p(Z[p]),N[p]=T.c2p(K[p])}else F.xpx=F.ypx=null}if(P){if(x.select2d||(x.select2d=m(s._glcanvas.data()[1].regl)),x.scatter2d){var U=new Array(_);for(h=0;h<_;h++)U[h]=x.selectBatch[h].length||x.unselectBatch[h].length?x.markerUnselectedOptions[h]:{};x.scatter2d.update(U)}x.select2d&&(x.select2d.update(x.markerOptions),x.select2d.update(x.markerSelectedOptions)),x.glText&&o.forEach(function(X){var J=((X||[])[0]||{}).trace||{};i.hasText(J)&&d(X)})}else x.scatter2d&&x.scatter2d.update(x.markerOptions);
1353var ee={viewport:a(s,c,T,u._context.plotGlPixelRatio),range:[(c._rl||c.range)[0],(T._rl||T.range)[0],(c._rl||c.range)[1],(T._rl||T.range)[1]]},j=e.repeat(ee,x.count);x.fill2d&&x.fill2d.update(j),x.line2d&&x.line2d.update(j),x.error2d&&x.error2d.update(j.concat(j)),x.scatter2d&&x.scatter2d.update(j),x.select2d&&x.select2d.update(j),x.glText&&x.glText.forEach(function(X){X.update(ee)})}else x.init()}}).reglPrecompiled=l},{"../../components/dragelement/helpers":384,"../../lib":503,"../../lib/prepare_regl":516,"../scatter/link_traces":943,"../scatter/subtypes":952,"./edit_style":985,"gl-text":225,"regl-error2d":279,"regl-line2d":280,"regl-scatter2d":281}],991:[function(v,$,te){var m=v("../../lib");$.exports=function(g,b){var y=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||((y=b._scene={}).init=function(){m.extendFlat(y,n,e)},y.init(),y.update=function(t){var i=m.repeat(t,y.count);if(y.fill2d&&y.fill2d.update(i),y.scatter2d&&y.scatter2d.update(i),y.line2d&&y.line2d.update(i),y.error2d&&y.error2d.update(i.concat(i)),y.select2d&&y.select2d.update(i),y.glText)for(var r=0;r<y.count;r++)y.glText[r].update(t)},y.draw=function(){for(var t=y.count,i=y.fill2d,r=y.error2d,d=y.line2d,l=y.scatter2d,a=y.glText,u=y.select2d,f=y.selectBatch,o=y.unselectBatch,h=0;h<t;h++){if(i&&y.fillOrder[h]&&i.draw(y.fillOrder[h]),d&&y.lineOptions[h]&&d.draw(h),r&&(y.errorXOptions[h]&&r.draw(h),y.errorYOptions[h]&&r.draw(h+t)),l&&y.markerOptions[h])if(o[h].length){var p=m.repeat([],y.count);p[h]=o[h],l.draw(p)}else f[h].length||l.draw(h);a[h]&&y.textOptions[h]&&a[h].render()}u&&u.draw(f),y.dirty=!1},y.destroy=function(){y.fill2d&&y.fill2d.destroy&&y.fill2d.destroy(),y.scatter2d&&y.scatter2d.destroy&&y.scatter2d.destroy(),y.error2d&&y.error2d.destroy&&y.error2d.destroy(),y.line2d&&y.line2d.destroy&&y.line2d.destroy(),y.select2d&&y.select2d.destroy&&y.select2d.destroy(),y.glText&&y.glText.forEach(function(t){t.destroy&&t.destroy()}),y.lineOptions=null,y.fillOptions=null,y.markerOptions=null,y.markerSelectedOptions=null,y.markerUnselectedOptions=null,y.errorXOptions=null,y.errorYOptions=null,y.textOptions=null,y.textSelectedOptions=null,y.textUnselectedOptions=null,y.selectBatch=null,y.unselectBatch=null,b._scene=null}),y.dirty||m.extendFlat(y,e),y}},{"../../lib":503}],992:[function(v,$,te){var m=v("../scatter/subtypes"),g=v("./edit_style").styleTextSelection;$.exports=function(b,y){var e=b.cd,n=b.xaxis,t=b.yaxis,i=[],r=e[0].trace,d=e[0].t,l=r._length,a=d.x,u=d.y,f=d._scene,o=d.index;if(!f)return i;var h=m.hasText(r),p=m.hasMarkers(r),s=!p&&!h;if(r.visible!==!0||s)return i;var x=[],c=[];if(y!==!1&&!y.degenerate)for(var T=0;T<l;T++)y.contains([d.xpx[T],d.ypx[T]],!1,T,b)?(x.push(T),i.push({pointNumber:T,x:n.c2d(a[T]),y:t.c2d(u[T])})):c.push(T);if(p){var _=f.scatter2d;if(x.length||c.length){if(!f.selectBatch[o].length&&!f.unselectBatch[o].length){var w=new Array(f.count);w[o]=f.markerUnselectedOptions[o],_.update.apply(_,w)}}else{var k=new Array(f.count);k[o]=f.markerOptions[o],_.update.apply(_,k)}}return f.selectBatch[o]=x,f.unselectBatch[o]=c,h&&g(e),i}},{"../scatter/subtypes":952,"./edit_style":985}],993:[function(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../../plots/template_attributes").texttemplateAttrs,b=v("../scattergeo/attributes"),y=v("../scatter/attributes"),e=v("../../plots/mapbox/layout_attributes"),n=v("../../plots/attributes"),t=v("../../components/colorscale/attributes"),i=v("../../lib/extend").extendFlat,r=v("../../plot_api/edit_types").overrideAll,d=b.line,l=b.marker;$.exports=r({lon:b.lon,lat:b.lat,mode:i({},y.mode,{dflt:"markers"}),text:i({},y.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:i({},y.hovertext,{}),line:{color:d.color,width:d.width}
1353,connectgaps:y.connectgaps,marker:i({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:l.opacity,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode},t("marker")),fill:b.fill,fillcolor:y.fillcolor,textfont:e.layers.symbol.textfont,textposition:e.layers.symbol.textposition,below:{valType:"string"},selected:{marker:y.selected.marker},unselected:{marker:y.unselected.marker},hoverinfo:i({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:m()},"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":927,"../scattergeo/attributes":969}],994:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../lib"),b=v("../../constants/numerical").BADNUM,y=v("../../lib/geojson_utils"),e=v("../../components/colorscale"),n=v("../../components/drawing"),t=v("../scatter/make_bubble_size_func"),i=v("../scatter/subtypes"),r=v("../../plots/mapbox/convert_text_opts"),d=v("../../components/fx/helpers").appendArrayPointValue,l=v("../../lib/svg_text_utils").NEWLINES,a=v("../../lib/svg_text_utils").BR_TAG_ALL;function u(){return{geojson:y.makeBlank(),layout:{visibility:"none"},paint:{}}}function f(p,s){return g.isArrayOrTypedArray(p)?s?function(x){return m(p[x])?+p[x]:0}:function(x){return p[x]}:p?function(){return p}:o}function o(){return""}function h(p){return p[0]===b}$.exports=function(p,s){var x,c=s[0].trace,T=c.visible===!0&&c._length!==0,_=c.fill!=="none",w=i.hasLines(c),k=i.hasMarkers(c),L=i.hasText(c),A=k&&c.marker.symbol==="circle",I=k&&c.marker.symbol!=="circle",P=u(),S=u(),E=u(),D=u(),F={fill:P,line:S,circle:E,symbol:D};if(!T)return F;if((_||w)&&(x=y.calcTraceToLineCoords(s)),_&&(P.geojson=y.makePolygon(x),P.layout.visibility="visible",g.extendFlat(P.paint,{"fill-color":c.fillcolor})),w&&(S.geojson=y.makeLine(x),S.layout.visibility="visible",g.extendFlat(S.paint,{"line-width":c.line.width,"line-color":c.line.color,"line-opacity":c.opacity})),A){var H=function(K){var G,W,Q,R,N=K[0].trace,U=N.marker,ee=N.selectedpoints,j=g.isArrayOrTypedArray(U.color),X=g.isArrayOrTypedArray(U.size),J=g.isArrayOrTypedArray(U.opacity);function re(_e){return N.opacity*_e}j&&(W=e.hasColorscale(N,"marker")?e.makeColorScaleFuncFromTrace(U):g.identity),X&&(Q=t(N)),J&&(R=function(_e){return re(m(_e)?+g.constrain(_e,0,1):0)});var ne,se=[];for(G=0;G<K.length;G++){var oe=K[G],pe=oe.lonlat;if(!h(pe)){var ce={};W&&(ce.mcc=oe.mcc=W(oe.mc)),Q&&(ce.mrc=oe.mrc=Q(oe.ms)),R&&(ce.mo=R(oe.mo)),ee&&(ce.selected=oe.selected||0),se.push({type:"Feature",geometry:{type:"Point",coordinates:pe},properties:ce})}}if(ee)for(ne=n.makeSelectedPointStyleFns(N),G=0;G<se.length;G++){var de=se[G].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}(s);E.geojson=H.geojson,E.layout.visibility="visible",g.extendFlat(E.paint,{"circle-color":H.mcc,"circle-radius":H.mrc,"circle-opacity":H.mo})}if((I||L)&&(D.geojson=function(K,G){for(var W=G._fullLayout,Q=K[0].trace,R=Q.marker||{},N=R.symbol,U=R.angle,ee=N!=="circle"?f(N):o,j=U!=="auto"?f(U,!0):o,X=i.hasText(Q)?f(Q.text):o,J=[],re=0;re<K.length;re++){var ne=K[re];if(!h(ne.lonlat)){var se,oe=Q.texttemplate;if(oe){var pe=Array.isArray(oe)?oe[re]||"":oe,ce=Q._module.formatLabels(ne,Q,W),de={};d(de,Q,ne.i);var xe=Q._meta||{};se=g.texttemplateString(pe,ce,W._d3locale,de,ne,xe)}else se=X(re);se&&(se=se.replace(l,"").replace(a,` 1354`)),J.push({type:"Feature",geometry:{type:"Point",coordinates:ne.lonlat},properties:{symbol:ee(re),angle:j(re),text:se}})}}return{type:"FeatureCollection",features:J}}(s,p),g.extendFlat(D.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),I&&(g.extendFlat(D.layout,{"icon-size":c.marker.size/10}),"angle"in c.marker&&c.marker.angle!=="auto"&&g.extendFlat(D.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),D.layout["icon-allow-overlap"]=c.marker.allowoverlap,g.extendFlat(D.paint,{"icon-opacity":c.opacity*c.marker.opacity,"icon-color":c.marker.color})),L)){var V=(c.marker||{}).size,Z=r(c.textposition,V);g.extendFlat(D.layout,{"text-size":c.textfont.size,"text-anchor":Z.anchor,"text-offset":Z.offset}),g.extendFlat(D.paint,{"text-color":c.textfont.color,"text-opacity":c.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":944,"../scatter/subtypes":952,"fast-isnumeric":190}],995:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/subtypes"),b=v("../scatter/marker_defaults"),y=v("../scatter/line_defaults"),e=v("../scatter/text_defaults"),n=v("../scatter/fillcolor_defaults"),t=v("./attributes");$.exports=function(i,r,d,l){function a(f,o){return m.coerce(i,r,t,f,o)}if(function(f,o,h){var p=h("lon")||[],s=h("lat")||[],x=Math.min(p.length,s.length);return o._length=x,x}(0,r,a)){if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),g.hasLines(r)&&(y(i,r,d,l,a,{noDash:!0}),a("connectgaps")),g.hasMarkers(r)){b(i,r,d,l,a,{noLine:!0}),a("marker.allowoverlap"),a("marker.angle");var u=r.marker;u.symbol!=="circle"&&(m.isArrayOrTypedArray(u.size)&&(u.size=u.size[0]),m.isArrayOrTypedArray(u.color)&&(u.color=u.color[0]))}g.hasText(r)&&e(i,r,l,a,{noSelect:!0}),a("fill"),r.fill!=="none"&&n(i,r,d,a),m.coerceSelectionMarkerOpacity(r,a)}else r.visible=!1}},{"../../lib":503,"../scatter/fillcolor_defaults":935,"../scatter/line_defaults":940,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":993}],996:[function(v,$,te){$.exports=function(m,g){return m.lon=g.lon,m.lat=g.lat,m}},{}],997:[function(v,$,te){var m=v("../../plots/cartesian/axes");$.exports=function(g,b,y){var e={},n=y[b.subplot]._subplot.mockAxis,t=g.lonlat;return e.lonLabel=m.tickText(n,n.c2l(t[0]),!0).text,e.latLabel=m.tickText(n,n.c2l(t[1]),!0).text,e}},{"../../plots/cartesian/axes":554}],998:[function(v,$,te){var m=v("../../components/fx"),g=v("../../lib"),b=v("../scatter/get_trace_color"),y=g.fillText,e=v("../../constants/numerical").BADNUM;function n(t,i,r){if(!t.hovertemplate){var d=(i.hi||t.hoverinfo).split("+"),l=d.indexOf("all")!==-1,a=d.indexOf("lon")!==-1,u=d.indexOf("lat")!==-1,f=i.lonlat,o=[];return l||a&&u?o.push("("+h(f[1])+", "+h(f[0])+")"):a?o.push(r.lon+h(f[0])):u&&o.push(r.lat+h(f[1])),(l||d.indexOf("text")!==-1)&&y(i,t,o),o.join("<br>")}function h(p){return p+"\xB0"}}$.exports={hoverPoints:function(t,i,r){var d=t.cd,l=d[0].trace,a=t.xa,u=t.ya,f=t.subplot,o=360*(i>=0?Math.floor((i+180)/360):Math.ceil((i-180)/360)),h=i-o;if(m.getClosest(d,function(L){var A=L.lonlat;if(A[0]===e)return 1/0;var I=g.modHalf(A[0],360),P=A[1],S=f.project([I,P]),E=S.x-a.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],s=p.lonlat,x=[g.modHalf(s[0],360)+o,s[1]],c=a.c2p(x),T=u.c2p(x),_=p.mrc||1;t.x0=c-_,t.x1=c+_,t.y0=T-_,t.y1=T+_;var w={};w[l.subplot]={_subplot:f};var k=l._module.formatLabels(p,l,w);return t.lonLabel=k.lonLabel,t.latLabel=k.latLabel,t.color=b(l,p),t.extraText=n(l,p,d[0].t.labels),t.hovertemplate=l.hovertemplate,[t]}},getExtraText:n}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":937}],999:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../scatter/marker_colorbar"),formatLabels:v("./format_labels"),calc:v("../scattergeo/calc"),plot:v("./plot"),hoverPoints:v("./hover").hoverPoints,eventData:v("./event_data"),selectPoints:v("./select"),styleOnSelect:function(m,g){g&&g[0].trace._glTrace.update(g)},moduleType:"trace",name:"scattermapbox",basePlotModule:v("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":613,"../scatter/marker_colorbar":945,"../scattergeo/calc":970,"./attributes":993,"./defaults":995,"./event_data":996,"./format_labels":997,"./hover":998,"./plot":1e3,"./select":1001}],1e3:[function(v,$,te){var m=v("./convert"),g=v("../../plots/mapbox/constants").traceLayerPrefix,b=["fill","line","circle","symbol"];function y(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
1354:"source-"+t+"-symbol"},this.layerIds={fill:g+t+"-fill",line:g+t+"-line",circle:g+t+"-circle",symbol:g+t+"-symbol"},this.below=null}var e=y.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,i){this.subplot.addLayer({type:n,id:this.layerIds[n],source:this.sourceIds[n],layout:t.layout,paint:t.paint},i)},e.update=function(n){var t,i,r,d=this.subplot,l=d.map,a=m(d.gd,n),u=d.belowLookup["trace-"+this.uid];if(u!==this.below){for(t=b.length-1;t>=0;t--)i=b[t],l.removeLayer(this.layerIds[i]);for(t=0;t<b.length;t++)r=a[i=b[t]],this.addLayer(i,r,u);this.below=u}for(t=0;t<b.length;t++)r=a[i=b[t]],d.setOptions(this.layerIds[i],"setLayoutProperty",r.layout),r.layout.visibility==="visible"&&(this.setSourceData(i,r),d.setOptions(this.layerIds[i],"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 i=b[t];n.removeLayer(this.layerIds[i]),n.removeSource(this.sourceIds[i])}},$.exports=function(n,t){for(var i=t[0].trace,r=new y(n,i.uid),d=m(n.gd,t),l=r.below=n.belowLookup["trace-"+i.uid],a=0;a<b.length;a++){var u=b[a],f=d[u];r.addSource(u,f),r.addLayer(u,f,l)}return t[0].trace._glTrace=r,r}},{"../../plots/mapbox/constants":611,"./convert":994}],1001:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/subtypes"),b=v("../../constants/numerical").BADNUM;$.exports=function(y,e){var n,t=y.cd,i=y.xaxis,r=y.yaxis,d=[],l=t[0].trace;if(!g.hasMarkers(l))return[];if(e===!1)for(n=0;n<t.length;n++)t[n].selected=0;else for(n=0;n<t.length;n++){var a=t[n],u=a.lonlat;if(u[0]!==b){var f=[m.modHalf(u[0],360),u[1]],o=[i.c2p(f),r.c2p(f)];e.contains(o,null,n,y)?(d.push({pointNumber:n,lon:u[0],lat:u[1]}),a.selected=1):a.selected=0}}return d}},{"../../constants/numerical":479,"../../lib":503,"../scatter/subtypes":952}],1002:[function(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../../plots/template_attributes").texttemplateAttrs,b=v("../../lib/extend").extendFlat,y=v("../scatter/attributes"),e=v("../../plots/attributes"),n=y.line;$.exports={mode:y.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:y.text,texttemplate:g({editType:"plot"},{keys:["r","theta","text"]}),hovertext:y.hovertext,line:{color:n.color,width:n.width,dash:n.dash,shape:b({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:y.connectgaps,marker:y.marker,cliponaxis:b({},y.cliponaxis,{dflt:!1}),textposition:y.textposition,textfont:y.textfont,fill:b({},y.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:y.fillcolor,hoverinfo:b({},e.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:y.hoveron,hovertemplate:m(),selected:y.selected,unselected:y.unselected}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":927}],1003:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../constants/numerical").BADNUM,b=v("../../plots/cartesian/axes"),y=v("../scatter/colorscale_calc"),e=v("../scatter/arrays_to_calcdata"),n=v("../scatter/calc_selection"),t=v("../scatter/calc").calcMarkerSize;$.exports=function(i,r){for(var d=i._fullLayout,l=r.subplot,a=d[l].radialaxis,u=d[l].angularaxis,f=a.makeCalcdata(r,"r"),o=u.makeCalcdata(r,"theta"),h=r._length,p=new Array(h),s=0;s<h;s++){var x=f[s],c=o[s],T=p[s]={};m(x)&&m(c)?(T.r=x,T.theta=c):T.r=g}var _=t(r,h);return r._extremes.x=b.findExtremes(a,f,{ppad:_}),y(i,r),e(p,r),n(p,r),p}},{"../../constants/numerical":479,"../../plots/cartesian/axes":554,"../scatter/arrays_to_calcdata":926,"../scatter/calc":928,"../scatter/calc_selection":929,"../scatter/colorscale_calc":930,"fast-isnumeric":190}],1004:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/subtypes"),b=v("../scatter/marker_defaults"),y=v("../scatter/line_defaults"),e=v("../scatter/line_shape_defaults"),n=v("../scatter/text_defaults"),t=v("../scatter/fillcolor_defaults"),i=v("../scatter/constants").PTS_LINESONLY,r=v("./attributes");function d(l,a,u,f){var o,h=f("r"),p=f("theta");if(h)p?o=Math.min(h.length,p.length):(o=h.length,f("theta0"),f("dtheta"));else{if(!p)return 0;o=a.theta.length,f("r0"),f("dr")}return a._length=o,o}$.exports={handleRThetaDefaults:d,supplyDefaults:function(l,a,u,f){function o(s,x){return m.coerce(l,a,r,s,x)}var h=d(l,a,f,o);if(h){o("thetaunit"),o("mode",h<i?"lines+markers":"lines"),o("text"),o("hovertext"),a.hoveron!=="fills"&&o("hovertemplate"),g.hasLines(a)&&(y(l,a,u,f,o),e(l,a,o),o("connectgaps")),g.hasMarkers(a)&&b(l,a,u,f,o,{gradient:!0}),g.hasText(a)&&(o("texttemplate"),n(l,a,f,o));var p=[];(g.hasMarkers(a)||g.hasText(a))&&(o("cliponaxis"),o("marker.maxdisplayed"),p.push("points")),o("fill"),a.fill!=="none"&&(t(l,a,u,o),g.hasLines(a)||e(l,a,o)),a.fill!=="tonext"&&a.fill!=="toself"||p.push("fills"),o("hoveron",p.join("+")||"points"),m.coerceSelectionMarkerOpacity(a,o)}else a.visible=!1}}},{"../../lib":503,"../scatter/constants":931,"../scatter/fillcolor_defaults":935,"../scatter/line_defaults":940,"../scatter/line_shape_defaults":942,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":1002}],1005:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes");$.exports=function(b,y,e){var n,t,i={},r=e[y.subplot]._subplot;r?(n=r.radialAxis,t=r.angularAxis):(n=(r=e[y.subplot]).radialaxis,t=r.angularaxis);var d=n.c2l(b.r);i.rLabel=g.tickText(n,d,!0).text;var l=t.thetaunit==="degrees"?m.rad2deg(b.theta):b.theta;return i.thetaLabel=g.tickText(t,l,!0).text,i}},{"../../lib":503,"../../plots/cartesian/axes":554}],1006:[function(v,$,te){var m=v("../scatter/hover");function g(b,y,e,n){var t=e.radialAxis,i=e.angularAxis;t._hovertitle="r",i._hovertitle="\u03B8";var r={};r[y.subplot]={_subplot:e};var d=y._module.formatLabels(b,y,r);n.rLabel=d.rLabel,n.thetaLabel=d.thetaLabel;var l=b.hi||y.hoverinfo,a=[];function u(o,h){a.push(o._hovertitle+": "+h)}if(!y.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&u(t,n.rLabel),f.indexOf("theta")!==-1&&u(i,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(a.push(n.text),delete n.text),n.extraText=a.join("<br>")}}$.exports={hoverPoints:function(b,y,e,n){var t=m(b,y,e,n);if(t&&t[0].index!==!1){var i=t[0];if(i.index===void 0)return t;var r=b.subplot,d=i.cd[i.index],l=i.trace;if(r.isPtInside(d))return i.xLabelVal=void 0,i.yLabelVal=void 0,g(d,l,r,i),i.hovertemplate=l.hovertemplate,t}},makeHoverPointText:g}},{"../scatter/hover":938}],1007:[function(v,$,te){$.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:v("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:v("./attributes"),supplyDefaults:v("./defaults").supplyDefaults,colorbar:v("../scatter/marker_colorbar"),formatLabels:v("./format_labels"),calc:v("./calc"),plot:v("./plot"),style:v("../scatter/style").style,styleOnSelect:v("../scatter/style").styleOnSelect,hoverPoints:v("./hover").hoverPoints,selectPoints:v("../scatter/select"),meta:{}}},{"../../plots/polar":622,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1002,"./calc":1003,"./defaults":1004,"./format_labels":1005,"./hover":1006,"./plot":1008}],1008:[function(v,$,te){var m=v("../scatter/plot"),g=v("../../constants/numerical").BADNUM;$.exports=function(b,y,e){for(var n=y.layers.frontplot.select("g.scatterlayer"),t={xaxis:y.xaxis,yaxis:y.yaxis,plot:y.framework,layerClipId:y._hasClipOnAxisFalse?y.clipIds.forTraces:null},i=y.radialAxis,r=y.angularAxis,d=0;d<e.length;d++)for(var l=e[d],a=0;a<l.length;a++){var u=l[a],f=u.r;if(f===g)u.x=u.y=g;else{var o=i.c2g(f),h=r.c2g(u.theta);
1354u.x=o*Math.cos(h),u.y=o*Math.sin(h)}}m(b,t,e,n)}},{"../../constants/numerical":479,"../scatter/plot":948}],1009:[function(v,$,te){var m=v("../scatterpolar/attributes"),g=v("../scattergl/attributes"),b=v("../../plots/template_attributes").texttemplateAttrs;$.exports={mode:m.mode,r:m.r,theta:m.theta,r0:m.r0,dr:m.dr,theta0:m.theta0,dtheta:m.dtheta,thetaunit:m.thetaunit,text:m.text,texttemplate:b({editType:"plot"},{keys:["r","theta","text"]}),hovertext:m.hovertext,hovertemplate:m.hovertemplate,line:g.line,connectgaps:g.connectgaps,marker:g.marker,fill:g.fill,fillcolor:g.fillcolor,textposition:g.textposition,textfont:g.textfont,hoverinfo:m.hoverinfo,selected:m.selected,unselected:m.unselected}},{"../../plots/template_attributes":633,"../scattergl/attributes":979,"../scatterpolar/attributes":1002}],1010:[function(v,$,te){$.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:v("../../plots/polar"),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../scatter/marker_colorbar"),formatLabels:v("./format_labels"),calc:v("./calc"),hoverPoints:v("./hover").hoverPoints,selectPoints:v("../scattergl/select"),meta:{}}},{"../../plots/polar":622,"../scatter/marker_colorbar":945,"../scattergl/select":992,"./attributes":1009,"./calc":1011,"./defaults":1012,"./format_labels":1013,"./hover":1014}],1011:[function(v,$,te){var m=v("../scatter/colorscale_calc"),g=v("../scatter/calc").calcMarkerSize,b=v("../scattergl/convert"),y=v("../../plots/cartesian/axes"),e=v("../scattergl/constants").TOO_MANY_POINTS;$.exports=function(n,t){var i=n._fullLayout,r=t.subplot,d=i[r].radialaxis,l=i[r].angularaxis,a=t._r=d.makeCalcdata(t,"r"),u=t._theta=l.makeCalcdata(t,"theta"),f=t._length,o={};f<a.length&&(a=a.slice(0,f)),f<u.length&&(u=u.slice(0,f)),o.r=a,o.theta=u,m(n,t);var h,p=o.opts=b.style(n,t);return f<e?h=g(t,f):p.marker&&(h=2*(p.marker.sizeAvg||Math.max(p.marker.size,3))),t._extremes.x=y.findExtremes(d,a,{ppad:h}),[{x:!1,y:!1,t:o,trace:t}]}},{"../../plots/cartesian/axes":554,"../scatter/calc":928,"../scatter/colorscale_calc":930,"../scattergl/constants":982,"../scattergl/convert":983}],1012:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/subtypes"),b=v("../scatterpolar/defaults").handleRThetaDefaults,y=v("../scatter/marker_defaults"),e=v("../scatter/line_defaults"),n=v("../scatter/text_defaults"),t=v("../scatter/fillcolor_defaults"),i=v("../scatter/constants").PTS_LINESONLY,r=v("./attributes");$.exports=function(d,l,a,u){function f(h,p){return m.coerce(d,l,r,h,p)}var o=b(d,l,u,f);o?(f("thetaunit"),f("mode",o<i?"lines+markers":"lines"),f("text"),f("hovertext"),l.hoveron!=="fills"&&f("hovertemplate"),g.hasLines(l)&&(e(d,l,a,u,f),f("connectgaps")),g.hasMarkers(l)&&y(d,l,a,u,f),g.hasText(l)&&(f("texttemplate"),n(d,l,u,f)),f("fill"),l.fill!=="none"&&t(d,l,a,f),m.coerceSelectionMarkerOpacity(l,f)):l.visible=!1}},{"../../lib":503,"../scatter/constants":931,"../scatter/fillcolor_defaults":935,"../scatter/line_defaults":940,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"../scatterpolar/defaults":1004,"./attributes":1009}],1013:[function(v,$,te){var m=v("../scatterpolar/format_labels");$.exports=function(g,b,y){var e=g.i;return"r"in g||(g.r=b._r[e]),"theta"in g||(g.theta=b._theta[e]),m(g,b,y)}},{"../scatterpolar/format_labels":1005}],1014:[function(v,$,te){var m=v("../scattergl/hover"),g=v("../scatterpolar/hover").makeHoverPointText;$.exports={hoverPoints:function(b,y,e,n){var t=b.cd[0].t,i=t.r,r=t.theta,d=m.hoverPoints(b,y,e,n);if(d&&d[0].index!==!1){var l=d[0];if(l.index===void 0)return d;var a=b.subplot,u=l.cd[l.index],f=l.trace;if(u.r=i[l.index],u.theta=r[l.index],a.isPtInside(u))return l.xLabelVal=void 0,l.yLabelVal=void 0,g(u,f,a,l),d}}}},{"../scattergl/hover":988,"../scatterpolar/hover":1006}],1015:[function(v,$,te){arguments[4][896][0].apply(te,arguments)},{"./base_index":1010,"./plot":1016,dup:896}],1016:[function(v,$,te){var m=v("@plotly/point-cluster"),g=v("fast-isnumeric"),b=v("../scattergl/plot"),y=v("../scattergl/scene_update"),e=v("../scattergl/convert"),n=v("../../lib"),t=v("../scattergl/constants").TOO_MANY_POINTS;$.exports=function(i,r,d){if(d.length){var l=r.radialAxis,a=r.angularAxis,u=y(i,r);return d.forEach(function(f){if(f&&f[0]&&f[0].trace){var o,h=f[0],p=h.trace,s=h.t,x=p._length,c=s.r,T=s.theta,_=s.opts,w=c.slice(),k=T.slice();for(o=0;o<c.length;o++)r.isPtInside({r:c[o],theta:T[o]})||(w[o]=NaN,k[o]=NaN);var L=new Array(2*x),A=Array(x),I=Array(x);for(o=0;o<x;o++){var P,S,E=w[o];if(g(E)){var D=l.c2g(E),F=a.c2g(k[o],p.thetaunit);P=D*Math.cos(F),S=D*Math.sin(F)}else P=S=NaN;A[o]=L[2*o]=P,I[o]=L[2*o+1]=S}s.tree=m(L),_.marker&&x>
1354=t&&(_.marker.cluster=s.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=L),_.line&&L.length>1&&n.extendFlat(_.line,e.linePositions(i,p,L)),_.text&&(n.extendFlat(_.text,{positions:L},e.textPosition(i,p,_.text,_.marker)),n.extendFlat(_.textSel,{positions:L},e.textPosition(i,p,_.text,_.markerSel)),n.extendFlat(_.textUnsel,{positions:L},e.textPosition(i,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([]),s.x=A,s.y=I,s.rawx=A,s.rawy=I,s.r=c,s.theta=T,s.positions=L,s._scene=u,s.index=u.count,u.count++}}),b(i,r,d)}},$.exports.reglPrecompiled={}},{"../../lib":503,"../scattergl/constants":982,"../scattergl/convert":983,"../scattergl/plot":990,"../scattergl/scene_update":991,"@plotly/point-cluster":59,"fast-isnumeric":190}],1017:[function(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../../plots/template_attributes").texttemplateAttrs,b=v("../../lib/extend").extendFlat,y=v("../scatter/attributes"),e=v("../../plots/attributes"),n=y.line;$.exports={mode:y.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:y.text,texttemplate:g({editType:"plot"},{keys:["real","imag","text"]}),hovertext:y.hovertext,line:{color:n.color,width:n.width,dash:n.dash,shape:b({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:y.connectgaps,marker:y.marker,cliponaxis:b({},y.cliponaxis,{dflt:!1}),textposition:y.textposition,textfont:y.textfont,fill:b({},y.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:y.fillcolor,hoverinfo:b({},e.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:y.hoveron,hovertemplate:m(),selected:y.selected,unselected:y.unselected}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":927}],1018:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../../constants/numerical").BADNUM,b=v("../scatter/colorscale_calc"),y=v("../scatter/arrays_to_calcdata"),e=v("../scatter/calc_selection"),n=v("../scatter/calc").calcMarkerSize;$.exports=function(t,i){for(var r=t._fullLayout,d=i.subplot,l=r[d].realaxis,a=r[d].imaginaryaxis,u=l.makeCalcdata(i,"real"),f=a.makeCalcdata(i,"imag"),o=i._length,h=new Array(o),p=0;p<o;p++){var s=u[p],x=f[p],c=h[p]={};m(s)&&m(x)?(c.real=s,c.imag=x):c.real=g}return n(i,o),b(t,i),y(h,i),e(h,i),h}},{"../../constants/numerical":479,"../scatter/arrays_to_calcdata":926,"../scatter/calc":928,"../scatter/calc_selection":929,"../scatter/colorscale_calc":930,"fast-isnumeric":190}],1019:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/subtypes"),b=v("../scatter/marker_defaults"),y=v("../scatter/line_defaults"),e=v("../scatter/line_shape_defaults"),n=v("../scatter/text_defaults"),t=v("../scatter/fillcolor_defaults"),i=v("../scatter/constants").PTS_LINESONLY,r=v("./attributes");$.exports=function(d,l,a,u){function f(p,s){return m.coerce(d,l,r,p,s)}var o=function(p,s,x,c){var T,_=c("real"),w=c("imag");return _&&w&&(T=Math.min(_.length,w.length)),s._length=T,T}(0,l,0,f);if(o){f("mode",o<i?"lines+markers":"lines"),f("text"),f("hovertext"),l.hoveron!=="fills"&&f("hovertemplate"),g.hasLines(l)&&(y(d,l,a,u,f),e(d,l,f),f("connectgaps")),g.hasMarkers(l)&&b(d,l,a,u,f,{gradient:!0}),g.hasText(l)&&(f("texttemplate"),n(d,l,u,f));var h=[];(g.hasMarkers(l)||g.hasText(l))&&(f("cliponaxis"),f("marker.maxdisplayed"),h.push("points")),f("fill"),l.fill!=="none"&&(t(d,l,a,f),g.hasLines(l)||e(d,l,f)),l.fill!=="tonext"&&l.fill!=="toself"||h.push("fills"),f("hoveron",h.join("+")||"points"),m.coerceSelectionMarkerOpacity(l,f)}else l.visible=!1}},{"../../lib":503,"../scatter/constants":931,"../scatter/fillcolor_defaults":935,"../scatter/line_defaults":940,"../scatter/line_shape_defaults":942,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":1017}],1020:[function(v,$,te){var m=v("../../plots/cartesian/axes");$.exports=function(g,b,y){var e={},n=y[b.subplot]._subplot;return e.realLabel=m.tickText(n.radialAxis,g.real,!0).text,e.imagLabel=m.tickText(n.angularAxis,g.imag,!0).text,e}},{"../../plots/cartesian/axes":554}],1021:[function(v,$,te){var m=v("../scatter/hover");function g(b,y,e,n){var t=e.radialAxis,i=e.angularAxis;t._hovertitle="real",i._hovertitle="imag";var r={};r[y.subplot]={_subplot:e};var d=y._module.formatLabels(b,y,r);n.realLabel=d.realLabel,n.imagLabel=d.imagLabel;var l=b.hi||y.hoverinfo,a=[];function u(o,h){a.push(o._hovertitle+": "+h)}if(!y.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&u(t,n.realLabel),f.indexOf("imag")!==-1&&u(i,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(a.push(n.text),delete n.text),n.extraText=a.join("<br>")}}$.exports={hoverPoints:function(b,y,e,n){var t=m(b,y,e,n);if(t&&t[0].index!==!1){var i=t[0];if(i.index===void 0)return t;var r=b.subplot,d=i.cd[i.index],l=i.trace;if(r.isPtInside(d))return i.xLabelVal=void 0,i.yLabelVal=void 0,g(d,l,r,i),i.hovertemplate=l.hovertemplate,t}},makeHoverPointText:g}},{"../scatter/hover":938}],1022:[function(v,$,te){$.exports={moduleType:"trace",name:"scattersmith",basePlotModule:v("../../plots/smith"),categories:["smith","symbols","showLegend","scatter-like"],attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../scatter/marker_colorbar"),formatLabels:v("./format_labels"),calc:v("./calc"),plot:v("./plot"),style:v("../scatter/style").style,styleOnSelect:v("../scatter/style").styleOnSelect,hoverPoints:v("./hover").hoverPoints,selectPoints:v("../scatter/select"),meta:{}}},{"../../plots/smith":629,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1017,"./calc":1018,"./defaults":1019,"./format_labels":1020,"./hover":1021,"./plot":1023}],1023:[function(v,$,te){var m=v("../scatter/plot"),g=v("../../constants/numerical").BADNUM,b=v("../../plots/smith/helpers").smith;$.exports=function(y,e,n){for(var t=e.layers.frontplot.select("g.scatterlayer"),i={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],l=0;l<d.length;l++){var a=d[l],u=a.real;if(u===g)a.x=a.y=g;else{var f=b([u,a.imag]);a.x=f[0],a.y=f[1]}}m(y,i,n,t)}},{"../../constants/numerical":479,"../../plots/smith/helpers":628,"../scatter/plot":948}],1024:[function(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../../plots/template_attributes").texttemplateAttrs,b=v("../scatter/attributes"),y=v("../../plots/attributes"),e=v("../../components/colorscale/attributes"),n=v("../../components/drawing/attributes").dash,t=v("../../lib/extend").extendFlat,i=b.marker,r=b.line,d=i.line;$.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:g({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:i.symbol,opacity:i.opacity,maxdisplayed:i.maxdisplayed,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,line:t({width:d.width,editType:"calc"},e("marker.line")),gradient:i.gradient,editType:"calc"},e("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:t({},y.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:b.hoveron,hovertemplate:m()}},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":927}],1025:[function(v,$,te){var m=v("fast-isnumeric"),g=v("../scatter/colorscale_calc"),b=v("../scatter/arrays_to_calcdata"),y=v("../scatter/calc_selection"),e=v("../scatter/calc").calcMarkerSize,n=["a","b","c"],t={a:["b","c"],b:["a","c"],c:["a","b"]};$.exports=function(i,r){var d,l,a,u,f,o,h=i._fullLayout[r.subplot].sum,p=r.sum||h,s={a:r.a,b:r.b,c:r.c};for(d=0;d<n.length;d++)if(!s[a=n[d]]){for(f=s[t[a][0]],o=s[t[a][1]],u=new Array(f.length),l=0;l<f.length;l++)u[l]=p-f[l]-o[l];s[a]=u}var x,c,T,_,w,k,L=r._length,A=new Array(L);for(d=0;d<L;d++)x=s.a[d],c=s.b[d],T=s.c[d],m(x)&&m(c)&&m(T)?((_=h/((x=+x)+(c=+c)+(T=+T)))!==1&&(x*=_,c*=_,T*=_),k=x,w=T-c,A[d]={x:w,y:k,a:x,b:c,c:T}):A[d]={x:!1,y:!1};return e(r,L),g(i,r),b(A,r),y(A,r),A}},{"../scatter/arrays_to_calcdata":926,"../scatter/calc":928,"../scatter/calc_selection":929,"../scatter/colorscale_calc":930,"fast-isnumeric":190}],1026:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/constants"),b=v("../scatter/subtypes"),y=v("../scatter/marker_defaults"),e=v("../scatter/line_defaults"),n=v("../scatter/line_shape_defaults"),t=v("../scatter/text_defaults"),i=v("../scatter/fillcolor_defaults"),r=v("./attributes");$.exports=function(d,l,a,u){function f(c,T){return m.coerce(d,l,r,c,T)}var o,h=f("a"),p=f("b"),s=f("c");if(h?(o=h.length,p?(o=Math.min(o,p.length),s&&(o=Math.min(o,s.length))):o=s?Math.min(o,s.length):0):p&&s&&(o=Math.min(p.length,s.length)),o){l._length=o,f("sum"),f("text"),f("hovertext"),l.hoveron!=="fills"&&f("hovertemplate"),f("mode",o<g.PTS_LINESONLY?"lines+markers":"lines"),b.hasLines(l)&&(e(d,l,a,u,f),n(d,l,f),f("connectgaps")),b.hasMarkers(l)&&y(d,l,a,u,f,{gradient:!0}),b.hasText(l)&&(f("texttemplate"),t(d,l,u,f));var x=[];(b.hasMarkers(l)||b.hasText(l))&&(f("cliponaxis"),f("marker.maxdisplayed"),x.push("points")),f("fill"),l.fill!=="none"&&(i(d,l,a,f),b.hasLines(l)||n(d,l,f)),l.fill!=="tonext"&&l.fill!=="toself"||x.push("fills"),f("hoveron",x.join("+")||"points"),m.coerceSelectionMarkerOpacity(l,f)}else l.visible=!1}},{"../../lib":503,"../scatter/constants":931,"../scatter/fillcolor_defaults":935,"../scatter/line_defaults":940,"../scatter/line_shape_defaults":942,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":1024}],1027:[function(v,$,te){$.exports=function(m,g,b,y,e){if(g.xa&&(m.xaxis=g.xa),g.ya&&(m.yaxis=g.ya),y[e]){var n=y[e];m.a=n.a,m.b=n.b,m.c=n.c}else m.a=g.a,m.b=g.b,m.c=g.c;return m}},{}],1028:[function(v,$,te){var m=v("../../plots/cartesian/axes");$.exports=function(g,b,y){var e={},n=y[b.subplot]._subplot;return e.aLabel=m.tickText(n.aaxis,g.a,!0).text,e.bLabel=m.tickText(n.baxis,g.b,!0).text,e.cLabel=m.tickText(n.caxis,g.c,!0).text,e}},{"../../plots/cartesian/axes":554}],1029:[function(v,$,te){var m=v("../scatter/hover");$.exports=function(g,b,y,e){var n=m(g,b,y,e);if(n&&n[0].index!==!1){var t=n[0];if(t.index===void 0){var i=1-t.y0/g.ya._length,r=g.xa._length,d=r*i/2,l=r-d;return t.x0=Math.max(Math.min(t.x0,l),d),t.x1=Math.max(Math.min(t.x1,l),d),n}var a=t.cd[t.index],u=t.trace,f=t.subplot;t.a=a.a,t.b=a.b,t.c=a.c,t.xLabelVal=void 0,t.yLabelVal=void 0;var o={};o[u.subplot]={_subplot:f};var h=u._module.formatLabels(a,u,o);t.aLabel=h.aLabel,t.bLabel=h.bLabel,t.cLabel=h.cLabel;var p=a.hi||u.hoverinfo,s=[];if(!u.hovertemplate){var x=p.split("+");x.indexOf("all")!==-1&&(x=["a","b","c"]),x.indexOf("a")!==-1&&c(f.aaxis,t.aLabel),x.indexOf("b")!==-1&&c(f.baxis,t.bLabel),x.indexOf("c")!==-1&&c(f.caxis,t.cLabel)}return t.extraText=s.join("<br>"),t.hovertemplate=u.hovertemplate,n}function c(T,_){s.push(T._hovertitle+": "+_)}}},{"../scatter/hover":938}],1030:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../scatter/marker_colorbar"),formatLabels:v("./format_labels"),calc:v("./calc"),plot:v("./plot"),style:v("../scatter/style").style,styleOnSelect:v("../scatter/style").styleOnSelect,hoverPoints:v("./hover"),selectPoints:v("../scatter/select"),eventData:v("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:v("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":634,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1024,"./calc":1025,"./defaults":1026,"./event_data":1027,"./format_labels":1028,"./hover":1029,"./plot":1031}],1031:[function(v,$,te){var m=v("../scatter/plot");$.exports=function(g,b,y){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");m(g,n,y,t)}},{"../scatter/plot":948}],1032:[function(v,$,te){var m=v("../scatter/attributes"),g=v("../../components/colorscale/attributes"),b=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,y=v("../../plots/template_attributes").hovertemplateAttrs,e=v("../scattergl/attributes"),n=v("../../plots/cartesian/constants").idRegex,t=v("../../plot_api/plot_template").templatedArray,i=v("../../lib/extend").extendFlat,r=m.marker,d=r.line,l=i(g("marker.line",{editTypeOverride:"calc"}),{width:i({},d.width,{editType:"calc"}),editType:"calc"}),a=i(g("marker"),{symbol:r.symbol,size:i({},r.size,{editType:"markerSize"}),sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,opacity:r.opacity,colorbar:r.colorbar,line:l,editType:"calc"});function u(f){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:n[f],editType:"plot"}}}a.color.editType=a.cmin.editType=a.cmax.editType="style",$.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:i({},e.text,{}),hovertext:i({},e.hovertext,{}),hovertemplate:y(),xhoverformat:b("x"),yhoverformat:b("y"),marker:a,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":927,"../scattergl/attributes":979}],1033:[function(v,$,te){var m=v("../../registry"),g=v("../../components/grid");$.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:v("../scatter/marker_colorbar"),calc:v("./calc"),plot:v("./plot"),hoverPoints:v("./hover").hoverPoints,selectPoints:v("./select"),editStyle:v("./edit_style"),meta:{}},m.register(g)},{"../../components/grid":410,"../../registry":638,"../scatter/marker_colorbar":945,"./attributes":1032,"./calc":1035,"./defaults":1036,"./edit_style":1037,"./hover":1039,"./plot":1041,"./select":1043}],1034:[function(v,$,te){var m=v("regl-line2d"),g=v("../../registry"),b=v("../../lib/prepare_regl"),y=v("../../plots/get_data").getModuleCalcData,e=v("../../plots/cartesian"),n=v("../../plots/cartesian/axis_ids").getFromId,t=v("../../plots/cartesian/axes").shouldShowZeroLine,i={};function r(l,a,u){for(var f=u.matrixOptions.data.length,o=a._visibleDims,h=u.viewOpts.ranges=new Array(f),p=0;p<o.length;p++){var s=o[p],x=h[p]=new Array(4),c=n(l,a._diag[s][0]);c&&(x[0]=c.r2l(c.range[0]),x[2]=c.r2l(c.range[1]));var T=n(l,a._diag[s][1]);T&&(x[1]=T.r2l(T.range[0]),x[3]=T.r2l(T.range[1]))}u.selectBatch.length||u.unselectBatch.length?u.matrix.update({ranges:h},{ranges:h}):u.matrix.update({ranges:h})}function d(l){var a=l._fullLayout,u=a._glcanvas.data()[0].regl,f=a._splomGrid;f||(f=a._splomGrid=m(u)),f.update(function(o){var h,p=o._context.plotGlPixelRatio,s=o._fullLayout,x=s._size,c=[0,0,s.width*p,s.height*p],T={};function _(G,W,Q,R,N,U){Q*=p,R*=p,N*=p,U*=p;var ee=W[G+"color"],j=W[G+"width"],X=String(ee+j);X in T?T[X].data.push(NaN,NaN,Q,R,N,U):T[X]={data:[Q,R,N,U],join:"rect",thickness:j*p,color:ee,viewport:c,range:c,overlay:!1}}for(h in s._splomSubplots){var w,k,L=s._plots[h],A=L.xaxis,I=L.yaxis,P=A._gridVals,S=I._gridVals,E=A._offset,D=A._length,F=I._length,H=x.b+I.domain[0]*x.h,V=-I._m,Z=-V*I.r2l(I.range[0],I.calendar);if(A.showgrid)for(h=0;h<P.length;h++)w=E+A.l2p(P[h].x),_("grid",A,w,H,w,H+F);if(I.showgrid)for(h=0;h<S.length;h++)k=H+Z+V*S[h].x,_("grid",I,E,k,E+D,k);t(o,A,I)&&(w=E+A.l2p(0),_("zeroline",A,w,H,w,H+F)),t(o,I,A)&&_("zeroline",I,E,k=H+Z+0,E+D,k)}var K=[];for(h in T)K.push(T[h]);return K}(l))}$.exports={name:"splom",attr:e.attr,attrRegex:e.attrRegex,layoutAttributes:e.layoutAttributes,supplyLayoutDefaults:e.supplyLayoutDefaults,drawFramework:e.drawFramework,plot:function(l){var a=l._fullLayout,u=g.getModule("splom"),f=y(l.calcdata,u)[0];
1354b(l,["ANGLE_instanced_arrays","OES_element_index_uint"],i)&&(a._hasOnlyLargeSploms&&d(l),u.plot(l,{},f))},drag:function(l){var a=l.calcdata,u=l._fullLayout;u._hasOnlyLargeSploms&&d(l);for(var f=0;f<a.length;f++){var o=a[f][0].trace,h=u._splomScenes[o.uid];o.type==="splom"&&h&&h.matrix&&r(l,o,h)}},updateGrid:d,clean:function(l,a,u,f){var o,h={};if(f._splomScenes){for(o=0;o<l.length;o++){var p=l[o];p.type==="splom"&&(h[p.uid]=1)}for(o=0;o<u.length;o++){var s=u[o];if(!h[s.uid]){var x=f._splomScenes[s.uid];x&&x.destroy&&x.destroy(),f._splomScenes[s.uid]=null,delete f._splomScenes[s.uid]}}}Object.keys(f._splomScenes||{}).length===0&&delete f._splomScenes,f._splomGrid&&!a._hasOnlyLargeSploms&&f._hasOnlyLargeSploms&&(f._splomGrid.destroy(),f._splomGrid=null,delete f._splomGrid),e.clean(l,a,u,f)},updateFx:e.updateFx,toSVG:e.toSVG,reglPrecompiled:i}},{"../../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}],1035:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axis_ids"),b=v("../scatter/calc").calcMarkerSize,y=v("../scatter/calc").calcAxisExpansion,e=v("../scatter/colorscale_calc"),n=v("../scattergl/convert").markerSelection,t=v("../scattergl/convert").markerStyle,i=v("./scene_update"),r=v("../../constants/numerical").BADNUM,d=v("../scattergl/constants").TOO_MANY_POINTS;$.exports=function(l,a){var u,f,o,h,p,s,x=a.dimensions,c=a._length,T={},_=T.cdata=[],w=T.data=[],k=a._visibleDims=[];function L(I,P){for(var S=I.makeCalcdata({v:P.values,vcalendar:a.calendar},"v"),E=0;E<S.length;E++)S[E]=S[E]===r?NaN:S[E];_.push(S),w.push(I.type==="log"?m.simpleMap(S,I.c2l):S)}for(u=0;u<x.length;u++)if((o=x[u]).visible){if(h=g.getFromId(l,a._diag[u][0]),p=g.getFromId(l,a._diag[u][1]),h&&p&&h.type!==p.type){m.log("Skipping splom dimension "+u+" with conflicting axis types");continue}h?(L(h,o),p&&p.type==="category"&&(p._categories=h._categories.slice())):L(p,o),k.push(u)}for(e(l,a),m.extendFlat(T,t(a)),s=_.length*c>d?T.sizeAvg||Math.max(T.size,3):b(a,c),f=0;f<k.length;f++)o=x[u=k[f]],h=g.getFromId(l,a._diag[u][0])||{},p=g.getFromId(l,a._diag[u][1])||{},y(l,a,h,p,_[f],_[f],s);var A=i(l,a);return A.matrix||(A.matrix=!0),A.matrixOptions=T,A.selectedOptions=n(a,a.selected),A.unselectedOptions=n(a,a.unselected),[{x:!1,y:!1,t:{},trace:a}]}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axis_ids":558,"../scatter/calc":928,"../scatter/colorscale_calc":930,"../scattergl/constants":982,"../scattergl/convert":983,"./scene_update":1042}],1036:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/array_container_defaults"),b=v("./attributes"),y=v("../scatter/subtypes"),e=v("../scatter/marker_defaults"),n=v("../parcoords/merge_length"),t=v("../scattergl/helpers").isOpenSymbol;function i(r,d){function l(u,f){return m.coerce(r,d,b.dimensions,u,f)}l("label");var a=l("values");a&&a.length?l("visible"):d.visible=!1,l("axis.type"),l("axis.matches")}$.exports=function(r,d,l,a){function u(c,T){return m.coerce(r,d,b,c,T)}var f=g(r,d,{name:"dimensions",handleItemDefaults:i}),o=u("diagonal.visible"),h=u("showupperhalf"),p=u("showlowerhalf");if(n(d,f,"values")&&(o||h||p)){u("text"),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat"),e(r,d,l,a,u);var s=t(d.marker.symbol),x=y.isBubble(d);u("marker.line.width",s||x?1:0),function(c,T,_,w){var k,L,A=T.dimensions,I=A.length,P=T.showupperhalf,S=T.showlowerhalf,E=T.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=w("xaxes",D),Z=w("yaxes",F),K=T._diag=new Array(I);T._xaxes={},T._yaxes={};var G=[],W=[];function Q(ne,se,oe,pe){if(ne){var ce=ne.charAt(0),de=_._splomAxes[ce];if(T["_"+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(T._axesDim={},k=0;k<I;k++){var U=A[k],ee=k===0,j=k===I-1,X=ee&&R||j&&N?void 0:V[k],J=ee&&N||j&&R?void 0:Z[k];Q(X,J,U,G),Q(J,X,U,W),K[k]=[X,J],T._axesDim[X]=k,T._axesDim[J]=k}for(k=0;k<G.length;k++)for(L=0;L<W.length;L++){var re=G[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,a,u),m.coerceSelectionMarkerOpacity(d,u)}else d.visible=!1}},{"../../lib":503,"../../plots/array_container_defaults":549,"../parcoords/merge_length":898,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scattergl/helpers":987,"./attributes":1032}],1037:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/colorscale_calc"),b=v("../scattergl/convert").markerStyle;$.exports=function(y,e){var n=e.trace,t=y._fullLayout._splomScenes[n.uid];if(t){g(y,n),m.extendFlat(t.matrixOptions,b(n));var i=m.extendFlat({},t.matrixOptions,t.viewOpts);t.matrix.update(i,null)}}},{"../../lib":503,"../scatter/colorscale_calc":930,"../scattergl/convert":983}],1038:[function(v,$,te){te.getDimIndex=function(m,g){for(var b=g._id,y={x:0,y:1}[b.charAt(0)],e=m._visibleDims,n=0;n<e.length;n++){var t=e[n];if(m._diag[t][y]===b)return n}return!1}},{}],1039:[function(v,$,te){var m=v("./helpers"),g=v("../scattergl/hover").calcHover;$.exports={hoverPoints:function(b,y,e){var n=b.cd[0].trace,t=b.scene.matrixOptions.cdata,i=b.xa,r=b.ya,d=i.c2p(y),l=r.c2p(e),a=b.distance,u=m.getDimIndex(n,i),f=m.getDimIndex(n,r);if(u===!1||f===!1)return[b];for(var o,h,p=t[u],s=t[f],x=a,c=0;c<p.length;c++){var T=p[c],_=s[c],w=i.c2p(T)-d,k=r.c2p(_)-l,L=Math.sqrt(w*w+k*k);L<x&&(x=h=L,o=c)}return b.index=o,b.distance=x,b.dxy=h,o===void 0?[b]:[g(b,p,s,n)]}}},{"../scattergl/hover":988,"./helpers":1038}],1040:[function(v,$,te){var m=v("./base_index");m.basePlotModule=v("./base_plot"),$.exports=m},{"./base_index":1033,"./base_plot":1034}],1041:[function(v,$,te){var m=v("regl-splom"),g=v("../../lib"),b=v("../../plots/cartesian/axis_ids"),y=v("../../components/dragelement/helpers").selectMode;function e(n,t){var i,r,d,l,a,u=n._fullLayout,f=u._size,o=t.trace,h=t.t,p=u._splomScenes[o.uid],s=p.matrixOptions,x=s.cdata,c=u._glcanvas.data()[0].regl,T=u.dragmode;if(x.length!==0){s.lower=o.showupperhalf,s.upper=o.showlowerhalf,s.diagonal=
1354o.diagonal.visible;var _=o._visibleDims,w=x.length,k=p.viewOpts={};for(k.ranges=new Array(w),k.domains=new Array(w),a=0;a<_.length;a++){d=_[a];var L=k.ranges[a]=new Array(4),A=k.domains[a]=new Array(4);(i=b.getFromId(n,o._diag[d][0]))&&(L[0]=i._rl[0],L[2]=i._rl[1],A[0]=i.domain[0],A[2]=i.domain[1]),(r=b.getFromId(n,o._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=m(c));var F=u.clickmode.indexOf("select")>-1,H=!0;if(y(T)||!!o.selectedpoints||F){var V=o._length;if(o.selectedpoints){p.selectBatch=o.selectedpoints;var Z=o.selectedpoints,K={};for(d=0;d<Z.length;d++)K[Z[d]]=!0;var G=[];for(d=0;d<V;d++)K[d]||G.push(d);p.unselectBatch=G}var W=h.xpx=new Array(w),Q=h.ypx=new Array(w);for(a=0;a<_.length;a++){if(d=_[a],i=b.getFromId(n,o._diag[d][0]))for(W[a]=new Array(V),l=0;l<V;l++)W[a][l]=i.c2p(x[a][l]);if(r=b.getFromId(n,o._diag[d][1]))for(Q[a]=new Array(V),l=0;l<V;l++)Q[a][l]=r.c2p(x[a][l])}if(p.selectBatch.length||p.unselectBatch.length){var R=g.extendFlat({},s,p.unselectedOptions,k),N=g.extendFlat({},s,p.selectedOptions,k);p.matrix.update(R,N),H=!1}}else h.xpx=h.ypx=null;if(H){var U=g.extendFlat({},s,k);p.matrix.update(U,null)}}}$.exports=function(n,t,i){if(i.length)for(var r=0;r<i.length;r++)e(n,i[r][0])}},{"../../components/dragelement/helpers":384,"../../lib":503,"../../plots/cartesian/axis_ids":558,"regl-splom":282}],1042:[function(v,$,te){var m=v("../../lib");$.exports=function(g,b){var y=g._fullLayout,e=b.uid,n=y._splomScenes;n||(n=y._splomScenes={});var t={dirty:!0,selectBatch:[],unselectBatch:[]},i=n[b.uid];return i||((i=n[e]=m.extendFlat({},t,{matrix:!1,selectBatch:[],unselectBatch:[]})).draw=function(){i.matrix&&i.matrix.draw&&(i.selectBatch.length||i.unselectBatch.length?i.matrix.draw(i.unselectBatch,i.selectBatch):i.matrix.draw()),i.dirty=!1},i.destroy=function(){i.matrix&&i.matrix.destroy&&i.matrix.destroy(),i.matrixOptions=null,i.selectBatch=null,i.unselectBatch=null,i=null}),i.dirty||m.extendFlat(i,t),i}},{"../../lib":503}],1043:[function(v,$,te){var m=v("../../lib"),g=v("../scatter/subtypes"),b=v("./helpers");$.exports=function(y,e){var n=y.cd,t=n[0].trace,i=n[0].t,r=y.scene,d=r.matrixOptions.cdata,l=y.xaxis,a=y.yaxis,u=[];if(!r)return u;var f=!g.hasMarkers(t)&&!g.hasText(t);if(t.visible!==!0||f)return u;var o=b.getDimIndex(t,l),h=b.getDimIndex(t,a);if(o===!1||h===!1)return u;var p=i.xpx[o],s=i.ypx[h],x=d[o],c=d[h],T=[],_=[];if(e!==!1&&!e.degenerate)for(var w=0;w<x.length;w++)e.contains([p[w],s[w]],null,w,y)?(T.push(w),u.push({pointNumber:w,x:x[w],y:c[w]})):_.push(w);var k=r.matrixOptions;return T.length||_.length?r.selectBatch.length||r.unselectBatch.length||r.matrix.update(r.unselectedOptions,m.extendFlat({},k,r.selectedOptions,r.viewOpts)):r.matrix.update(k,null),r.selectBatch=T,r.unselectBatch=_,u}},{"../../lib":503,"../scatter/subtypes":952,"./helpers":1038}],1044:[function(v,$,te){var m=v("../../components/colorscale/attributes"),g=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,b=v("../../plots/template_attributes").hovertemplateAttrs,y=v("../mesh3d/attributes"),e=v("../../plots/attributes"),n=v("../../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:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:n({},e.showlegend,{dflt:!1})};n(t,m("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(i){t[i]=y[i]}),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,$.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}],1045:[function(v,$,te){var m=v("../../lib"),g=v("../../components/colorscale/calc");function b(n){var t,i,r,d,l,a,u,f,o,h,p,s,x=n._x,c=n._y,T=n._z,_=n._len,w=-1/0,k=1/0,L=-1/0,A=1/0,I=-1/0,P=1/0,S="";for(_&&(u=x[0],o=c[0],p=T[0]),_>1&&(f=x[_-1],h=c[_-1],s=T[_-1]),t=0;t<_;
1354t++)w=Math.max(w,x[t]),k=Math.min(k,x[t]),L=Math.max(L,c[t]),A=Math.min(A,c[t]),I=Math.max(I,T[t]),P=Math.min(P,T[t]),d||x[t]===u||(d=!0,S+="x"),l||c[t]===o||(l=!0,S+="y"),a||T[t]===p||(a=!0,S+="z");d||(S+="x"),l||(S+="y"),a||(S+="z");var E=y(n._x),D=y(n._y),F=y(n._z);S=(S=(S=S.replace("x",(u>f?"-":"+")+"x")).replace("y",(o>h?"-":"+")+"y")).replace("z",(p>s?"-":"+")+"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"?c:T},Z=function(ce){return ce==="x"?E:ce==="y"?D:F},K=function(ce){return ce[_-1]<ce[0]?-1:1},G=V(S[1]),W=V(S[3]),Q=V(S[5]),R=Z(S[1]).length,N=Z(S[3]).length,U=Z(S[5]).length,ee=!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(i=0;i<N-1;i++){for(r=0;r<R-1;r++){var ne=j(t,i,r),se=j(t,i,r+1),oe=j(t,i+1,r),pe=j(t+1,i,r);if(G[ne]*X<G[se]*X&&W[ne]*J<W[oe]*J&&Q[ne]*re<Q[pe]*re||(ee=!0),ee)break}if(ee)break}if(ee)break}return ee&&(m.warn("Encountered arbitrary coordinates! Unable to input data grid."),H()),{xMin:k,yMin:A,zMin:P,xMax:w,yMax:L,zMax:I,Xs:E,Ys:D,Zs:F,len:_,fill:S}}function y(n){return m.distinctVals(n).vals}function e(n,t){if(t===void 0&&(t=n.length),m.isTypedArray(n))return n.subarray(0,t);for(var i=[],r=0;r<t;r++)i[r]=+n[r];return i}$.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 i=b(t);t._gridFill=i.fill,t._Xs=i.Xs,t._Ys=i.Ys,t._Zs=i.Zs,t._len=i.len;var r,d,l,a=0;t.starts&&(r=e(t.starts.x||[]),d=e(t.starts.y||[]),l=e(t.starts.z||[]),a=Math.min(r.length,d.length,l.length)),t._startsX=r||[],t._startsY=d||[],t._startsZ=l||[];var u,f=0,o=1/0;for(u=0;u<t._len;u++){var h=t._u[u],p=t._v[u],s=t._w[u],x=Math.sqrt(h*h+p*p+s*s);f=Math.max(f,x),o=Math.min(o,x)}for(g(n,t,{vals:[o,f],containerStr:"",cLetter:"c"}),u=0;u<a;u++){var c=r[u];i.xMax=Math.max(i.xMax,c),i.xMin=Math.min(i.xMin,c);var T=d[u];i.yMax=Math.max(i.yMax,T),i.yMin=Math.min(i.yMin,T);var _=l[u];i.zMax=Math.max(i.zMax,_),i.zMin=Math.min(i.zMin,_)}t._slen=a,t._normMax=f,t._xbnds=[i.xMin,i.xMax],t._ybnds=[i.yMin,i.yMax],t._zbnds=[i.zMin,i.zMax]},filter:e,processGrid:b}},{"../../components/colorscale/calc":374,"../../lib":503}],1046:[function(v,$,te){var m=v("../../../stackgl_modules").gl_streamtube3d,g=m.createTubeMesh,b=v("../../lib"),y=v("../../lib/gl_format_color").parseColorScale,e=v("../../components/colorscale").extractOpts,n=v("../../plots/gl3d/zip3"),t={xaxis:0,yaxis:1,zaxis:2};function i(u,f){this.scene=u,this.uid=f,this.mesh=null,this.data=null}var r=i.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 l(u){var f=u.length;return f===1?[.5,.5]:[u[1]-u[0],u[f-1]-u[f-2]]}function a(u,f){var o=u.fullSceneLayout,h=u.dataScale,p=f._len,s={};function x(R,N){var U=o[N],ee=h[t[N]];return b.simpleMap(R,function(j){return U.d2l(j)*ee})}if(s.vectors=n(x(f._u,"xaxis"),x(f._v,"yaxis"),x(f._w,"zaxis"),p),!p)return{positions:[],cells:[]};var c=x(f._Xs,"xaxis"),T=x(f._Ys,"yaxis"),_=x(f._Zs,"zaxis");if(s.meshgrid=[c,T,_],s.gridFill=f._gridFill,f._slen)s.startingPositions=n(x(f._startsX,"xaxis"),x(f._startsY,"yaxis"),x(f._startsZ,"zaxis"));else{for(var w=T[0],k=d(c),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],w,L[S]];s.startingPositions=A}s.colormap=y(f),s.tubeSize=f.sizeref,s.maxLength=f.maxdisplayed;var E=x(f._xbnds,"xaxis"),D=x(f._ybnds,"yaxis"),F=x(f._zbnds,"zaxis"),H=l(c),V=l(T),Z=l(_),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]]],G=m(s,K),W=e(f);G.vertexIntensityBounds=[W.min/f._normMax,W.max/f._normMax];var Q=f.lightposition;return G.lightPosition=[Q.x,Q.y,Q.z],G.ambient=f.lighting.ambient,G.diffuse=f.lighting.diffuse,G.specular=f.lighting.specular,G.roughness=f.lighting.roughness,G.fresnel=f.lighting.fresnel,G.opacity=f.opacity,f._pad=G.tubeScale*f.sizeref*2,G}r.handlePick=function(u){var f=this.scene.fullSceneLayout,o=this.scene.dataScale;function h(x,c){var T=f[c],_=o[t[c]];return T.l2c(x)/_}if(u.object===this.mesh){var p=u.data.position,s=u.data.velocity;
1354return u.traceCoordinate=[h(p[0],"xaxis"),h(p[1],"yaxis"),h(p[2],"zaxis"),h(s[0],"xaxis"),h(s[1],"yaxis"),h(s[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=a(this.scene,u);this.mesh.update(f)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},$.exports=function(u,f){var o=u.glplot.gl,h=a(u,f),p=g(o,h),s=new i(u,f.uid);return s.mesh=p,s.data=f,p._trace=s,u.glplot.add(p),s}},{"../../../stackgl_modules":1124,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/gl3d/zip3":609}],1047:[function(v,$,te){var m=v("../../lib"),g=v("../../components/colorscale/defaults"),b=v("./attributes");$.exports=function(y,e,n,t){function i(o,h){return m.coerce(y,e,b,o,h)}var r=i("u"),d=i("v"),l=i("w"),a=i("x"),u=i("y"),f=i("z");r&&r.length&&d&&d.length&&l&&l.length&&a&&a.length&&u&&u.length&&f&&f.length?(i("starts.x"),i("starts.y"),i("starts.z"),i("maxdisplayed"),i("sizeref"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),g(y,e,t,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),e._length=null):e.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":1044}],1048:[function(v,$,te){$.exports={moduleType:"trace",name:"streamtube",basePlotModule:v("../../plots/gl3d"),categories:["gl3d","showLegend"],attributes:v("./attributes"),supplyDefaults:v("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:v("./calc").calc,plot:v("./convert"),eventData:function(m,g){return m.tubex=m.x,m.tubey=m.y,m.tubez=m.z,m.tubeu=g.traceCoordinate[3],m.tubev=g.traceCoordinate[4],m.tubew=g.traceCoordinate[5],m.norm=g.traceCoordinate[6],m.divergence=g.traceCoordinate[7],delete m.x,delete m.y,delete m.z,m},meta:{}}},{"../../plots/gl3d":598,"./attributes":1044,"./calc":1045,"./convert":1046,"./defaults":1047}],1049:[function(v,$,te){var m=v("../../plots/attributes"),g=v("../../plots/template_attributes").hovertemplateAttrs,b=v("../../plots/template_attributes").texttemplateAttrs,y=v("../../components/colorscale/attributes"),e=v("../../plots/domain").attributes,n=v("../pie/attributes"),t=v("./constants"),i=v("../../lib/extend").extendFlat;$.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:i({colors:{valType:"data_array",editType:"calc"},line:{color:i({},n.marker.line.color,{dflt:null}),width:i({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},y("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:i({},m.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:g({},{keys:t.eventDataKeys}),textfont:n.textfont,insidetextorientation:n.insidetextorientation,insidetextfont:n.insidetextfont,outsidetextfont:i({},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":901,"./constants":1052}],1050:[function(v,$,te){var m=v("../../plots/plots");te.name="sunburst",te.plot=function(g,b,y,e){m.plotBasePlot(te.name,g,b,y,e)},te.clean=function(g,b,y,e){m.cleanBasePlot(te.name,g,b,y,e)}},{"../../plots/plots":619}],1051:[function(v,$,te){var m=v("d3-hierarchy"),g=v("fast-isnumeric"),b=v("../../lib"),y=v("../../components/colorscale").makeColorScaleFuncFromTrace,e=v("../pie/calc").makePullColorFn,n=v("../pie/calc").generateExtendedColors,t=v("../../components/colorscale").calc,i=v("../../constants/numerical").ALMOST_EQUAL,r={},d={},l={};te.calc=function(a,u){var f,o,h,p,s,x,c=a._fullLayout,T=u.ids,_=b.isArrayOrTypedArray(T),w=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||g(L[J])&&L[J]>=0};_?(f=Math.min(T.length,k.length),o=function(J){return E(T[J])&&D(J)},h=function(J){return String(T[J])}
1354):(f=Math.min(w.length,k.length),o=function(J){return E(w[J])&&D(J)},h=function(J){return String(w[J])}),A&&(f=Math.min(f,L.length));for(var F=0;F<f;F++)if(o(F)){var H=h(F),V=E(k[F])?String(k[F]):"",Z={i:F,id:H,pid:V,label:E(w[F])?String(w[F]):""};A&&(Z.v=+L[F]),I.push(Z),s=H,P[p=V]?P[p].push(s):P[p]=[s],S[s]=1}if(P[""]){if(P[""].length>1){for(var K=b.randstr(),G=0;G<I.length;G++)I[G].pid===""&&(I[G].pid=K);I.unshift({hasMultipleRoots:!0,id:K,pid:"",label:""})}}else{var W,Q=[];for(W in P)S[W]||Q.push(W);if(Q.length!==1)return b.warn(["Multiple implied roots, cannot build",u.type,"hierarchy of",u.name+".","These roots include:",Q.join(", ")].join(" "));W=Q[0],I.unshift({hasImpliedRoot:!0,id:W,pid:"",label:W})}try{x=m.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=m.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*i)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,ee;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(a,u,{vals:j,containerStr:"marker",cLetter:"c"}),ee=y(u.marker)):U=e(c["_"+u.type+"colormap"]),R.each(function(J){var re=J.data.data;re.color=u._hasColorscale?ee(j[re.i]):U(j[re.i],re.id)}),I[0].hierarchy=R,I}},te._runCrossTraceCalc=function(a,u){var f=u._fullLayout,o=u.calcdata,h=f[a+"colorway"],p=f["_"+a+"colormap"];f["extend"+a+"colors"]&&(h=n(h,a==="icicle"?l:a==="treemap"?d:r));var s,x=0;function c(w){var k=w.data.data,L=k.id;k.color===!1&&(p[L]?k.color=p[L]:w.parent?w.parent.parent?k.color=w.parent.data.data.color:(p[L]=k.color=h[x%h.length],x++):k.color=s)}for(var T=0;T<o.length;T++){var _=o[T][0];_.trace.type===a&&_.hierarchy&&(s=_.trace.root.color,_.hierarchy.each(c))}},te.crossTraceCalc=function(a){return te._runCrossTraceCalc("sunburst",a)}},{"../../components/colorscale":378,"../../constants/numerical":479,"../../lib":503,"../pie/calc":903,"d3-hierarchy":115,"fast-isnumeric":190}],1052:[function(v,$,te){$.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},{}],1053:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("../../plots/domain").defaults,y=v("../bar/defaults").handleText,e=v("../../components/colorscale"),n=e.hasColorscale,t=e.handleDefaults;$.exports=function(i,r,d,l){function a(s,x){return m.coerce(i,r,g,s,x)}var u=a("labels"),f=a("parents");if(u&&u.length&&f&&f.length){var o=a("values");o&&o.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("marker.line.width")&&a("marker.line.color",l.paper_bgcolor),a("marker.colors");var h=r._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;h&&t(i,r,l,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7);var p=a("text");a("texttemplate"),r.texttemplate||a("textinfo",Array.isArray(p)?"text+label":"label"),a("hovertext"),a("hovertemplate"),y(i,r,l,a,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),b(r,l,a),r._length=null}else r.visible=!1}},{"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"./attributes":1049}],1054:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../registry"),b=v("../../components/fx/helpers").appendArrayPointValue,y=v("../../components/fx"),e=v("../../lib"),n=v("../../lib/events"),t=v("./helpers"),i=v("../pie/helpers").formatPieValue;function r(d,l,a){for(var u=d.data.data,f={curveNumber:l.index,pointNumber:u.i,data:l._input,fullData:l},o=0;o<a.length;o++){var h=a[o];h in d&&(f[h]=d[h])}
1356return"parentString"in d&&!t.isHierarchyRoot(d)&&(f.parent=d.parentString),b(f,l,u.i),f}$.exports=function(d,l,a,u,f){var o=u[0],h=o.trace,p=o.hierarchy,s=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(c){var T=a._fullLayout;if(!a._dragging&&T.hovermode!==!1){var _,w=a._fullData[h.index],k=c.data.data,L=k.i,A=t.isHierarchyRoot(c),I=t.getParent(p,c),P=t.getValue(c),S=function(X){return e.castOption(w,L,X)},E=S("hovertemplate"),D=y.castHoverinfo(w,T,L),F=T.separators;if(E||D&&D!=="none"&&D!=="skip"){var H,V;s&&(H=o.cx+c.pxmid[0]*(1-c.rInscribed),V=o.cy+c.pxmid[1]*(1-c.rInscribed)),x&&(H=c._hoverX,V=c._hoverY);var Z,K={},G=[],W=[],Q=function(X){return G.indexOf(X)!==-1};D&&(G=D==="all"?w._module.attributes.hoverinfo.flags:D.split("+")),K.label=k.label,Q("label")&&K.label&&W.push(K.label),k.hasOwnProperty("v")&&(K.value=k.v,K.valueLabel=i(K.value,F),Q("value")&&W.push(K.valueLabel)),K.currentPath=c.currentPath=t.getPath(c.data),Q("current path")&&!A&&W.push(K.currentPath);var R=[],N=function(){R.indexOf(Z)===-1&&(W.push(Z),R.push(Z))};K.percentParent=c.percentParent=P/t.getValue(I),K.parent=c.parentString=t.getPtLabel(I),Q("percent parent")&&(Z=t.formatPercent(K.percentParent,F)+" of "+K.parent,N()),K.percentEntry=c.percentEntry=P/t.getValue(l),K.entry=c.entry=t.getPtLabel(l),!Q("percent entry")||A||c.onPathbar||(Z=t.formatPercent(K.percentEntry,F)+" of "+K.entry,N()),K.percentRoot=c.percentRoot=P/t.getValue(p),K.root=c.root=t.getPtLabel(p),Q("percent root")&&!A&&(Z=t.formatPercent(K.percentRoot,F)+" of "+K.root,N()),K.text=S("hovertext")||S("text"),Q("text")&&(Z=K.text,e.isValidTextValue(Z)&&W.push(Z)),_=[r(c,w,f.eventDataKeys)];var U={trace:w,y:V,_x0:c._x0,_x1:c._x1,_y0:c._y0,_y1:c._y1,text:W.join("<br>"),name:E||Q("name")?w.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:_};s&&(U.x0=H-c.rInscribed*c.rpx1,U.x1=H+c.rInscribed*c.rpx1,U.idealAlign=c.pxmid[0]<0?"left":"right"),x&&(U.x=H,U.idealAlign=H<0?"left":"right");var ee=[];y.loneHover(U,{container:T._hoverlayer.node(),outerContainer:T._paper.node(),gd:a,inOut_bbox:ee}),_[0].bbox=ee[0],h._hasHoverLabel=!0}if(x){var j=d.select("path.surface");f.styleOne(j,c,w,{hovered:!0})}h._hasHoverEvent=!0,a.emit("plotly_hover",{points:_||[r(c,w,f.eventDataKeys)],event:m.event})}}),d.on("mouseout",function(c){var T=a._fullLayout,_=a._fullData[h.index],w=m.select(this).datum();if(h._hasHoverEvent&&(c.originalEvent=m.event,a.emit("plotly_unhover",{points:[r(w,_,f.eventDataKeys)],event:m.event}),h._hasHoverEvent=!1),h._hasHoverLabel&&(y.loneUnhover(T._hoverlayer.node()),h._hasHoverLabel=!1),x){var k=d.select("path.surface");f.styleOne(k,w,_,{hovered:!1})}}),d.on("click",function(c){var T=a._fullLayout,_=a._fullData[h.index],w=s&&(t.isHierarchyRoot(c)||t.isLeaf(c)),k=t.getPtId(c),L=t.isEntry(c)?t.findEntryWithChild(p,k):t.findEntryWithLevel(p,k),A=t.getPtId(L),I={points:[r(c,_,f.eventDataKeys)],event:m.event};w||(I.nextLevel=A);var P=n.triggerHandler(a,"plotly_"+h.type+"click",I);if(P!==!1&&T.hovermode&&(a._hoverdata=[r(c,_,f.eventDataKeys)],y.click(a,m.event)),!w&&P!==!1&&!a._dragging&&!a._transitioning){g.call("_storeDirectGUIEdit",_,T._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};y.loneUnhover(T._hoverlayer.node()),g.call("animate",a,S,E)}})}},{"../../components/fx":406,"../../components/fx/helpers":402,"../../lib":503,"../../lib/events":492,"../../registry":638,"../pie/helpers":906,"./helpers":1055,"@plotly/d3":58}],1055:[function(v,$,te){var m=v("../../lib"),g=v("../../components/color"),b=v("../../lib/setcursor"),y=v("../pie/helpers");function e(n){return n.data.data.pid}te.findEntryWithLevel=function(n,t){var i;return t&&n.eachAfter(function(r){if(te.getPtId(r)===t)return i=r.copy()}),i||n},te.findEntryWithChild=function(n,t){var i;return n.eachAfter(function(r){for(var d=r.children||[],l=0;l<d.length;l++){var a=d[l];if(te.getPtId(a)===t)return i=r.copy()}}),i||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,i){var r=i.isTransitioning;if(!r){var d=n.datum();r=i.hideOnRoot&&te.isHierarchyRoot(d)||i.hideOnLeaves&&te.isLeaf(d)}b(n,r?null:"pointer")},te.getInsideTextFontKey=function(n,t,i,r,d){var l=(d||{}).onPathbar?"pathbar.textfont":"insidetextfont",a=i.data.data.i;return m.castOption(t,a,l+"."+n)||m.castOption(t,a,"textfont."+n)||r.size},te.getOutsideTextFontKey=function(n,t,i,r){var d=i.data.data.i;return m.castOption(t,d,"outsidetextfont."+n)||m.castOption(t,d,"textfont."+n)||r.size},te.isOutsideText=function(n,t){return!n._hasColorscale&&te.isHierarchyRoot(t)},te.determineTextFont=function(n,t,i,r){return te.isOutsideText(n,t)?function(d,l,a){return{color:te.getOutsideTextFontKey("color",d,l,a),family:te.getOutsideTextFontKey("family",d,l,a),size:te.getOutsideTextFontKey("size",d,l,a)}}(n,t,i):function(d,l,a,u){var f=(u||{}).onPathbar,o=l.data.data,h=o.i,p=m.castOption(d,h,(f?"pathbar.textfont":"insidetextfont")+".color");return!p&&d._input.textfont&&(p=m.castOption(d._input,h,"textfont.color")),{color:p||g.contrast(o.color),family:te.getInsideTextFontKey("family",d,l,a,u),size:te.getInsideTextFontKey("size",d,l,a,u)}}(n,t,i,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 i=n.parent;if(!i)return[];var r=t?[i.data[t]]:[i];return te.listPath(i,t).concat(r)},te.getPath=function(n){return te.listPath(n,"label").join("/")+"/"},te.formatValue=y.formatPieValue,te.formatPercent=function(n,t){var i=m.formatPercent(n,0);return i==="0%"&&(i=y.formatPiePercent(n,t)),i}},{"../../components/color":366,"../../lib":503,"../../lib/setcursor":524,"../pie/helpers":906}],1056:[function(v,$,te){$.exports={moduleType:"trace",name:"sunburst",basePlotModule:v("./base_plot"),categories:[],animatable:!0,attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults"),supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc").calc,crossTraceCalc:v("./calc").crossTraceCalc,plot:v("./plot").plot,style:v("./style").style,colorbar:v("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":945,"./attributes":1049,"./base_plot":1050,"./calc":1051,"./defaults":1053,"./layout_attributes":1057,"./layout_defaults":1058,"./plot":1059,"./style":1060}],1057:[function(v,$,te){$.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1058:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y){function e(n,t){return m.coerce(b,y,g,n,t)}e("sunburstcolorway",y.colorway),e("extendsunburstcolors")}},{"../../lib":503,"./layout_attributes":1057}],1059:[function(v,$,te){var m=v("@plotly/d3"),g=v("d3-hierarchy"),b=v("d3-interpolate").interpolate,y=v("../../components/drawing"),e=v("../../lib"),n=v("../../lib/svg_text_utils"),t=v("../bar/uniform_text"),i=t.recordMinTextSize,r=t.clearMinTextSize,d=v("../pie/plot"),l=v("../pie/helpers").getRotationAngle,a=d.computeTransform,u=d.transformInsideText,f=v("./style").styleOne,o=v("../bar/style").resizeText,h=v("./fx"),p=v("./constants"),s=v("./helpers");function x(T,_,w,k){var L=T._fullLayout,A=!L.uniformtext.mode&&s.hasTransition(k),I=m.select(w).selectAll("g.slice"),P=_[0],S=P.trace,E=P.hierarchy,D=s.findEntryWithLevel(E,S.level),F=s.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]),G=.5*Math.min(Z,K),W=P.cx=H.l+H.w*(V.x[1]+V.x[0])/2,Q=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[s.getPtId(Ee)]={rpx0:Ee.rpx0,rpx1:Ee.rpx1,x0:Ee.x0,x1:Ee.x1,transform:Ee.transform},!R&&s.isEntry(Ee)&&(R=Ee)});var U=function(Ee){return g.partition().size([2*Math.PI,Ee.height+1])(Ee)}(D).descendants(),ee=D.height+1,j=0,X=F;P.hasMultipleRoots&&s.isHierarchyRoot(D)&&(U=U.slice(1),ee-=1,j=1,X+=1),U=U.filter(function(Ee){return Ee.y1<=X});var J=l(S.rotation);
1356J&&U.forEach(function(Ee){Ee.x0+=J,Ee.x1+=J});var re=Math.min(ee,F),ne=function(Ee){return(Ee-j)/re*G},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,Q)},pe=function(Ee){return W+c(Ee)[0]*(Ee.transform.rCenter||0)+(Ee.transform.x||0)},ce=function(Ee){return Q+c(Ee)[1]*(Ee.transform.rCenter||0)+(Ee.transform.y||0)};(I=I.data(U,s.getPtId)).enter().append("g").classed("slice",!0),A?I.exit().transition().each(function(){var Ee=m.select(this);Ee.select("path.surface").transition().attrTween("d",function(fe){var ge=function(ke){var be,Se=s.getPtId(ke),Oe=N[Se],De=N[s.getPtId(D)];if(De){var je=(ke.x1>De.x1?2*Math.PI:0)+J;be=ke.rpx1<De.rpx1?{x0:ke.x0,x1:ke.x1,rpx0:0,rpx1:0}:{x0:je,x1:je,rpx0:ke.rpx0,rpx1:ke.rpx1}}else{var Je,ze=s.getPtId(ke.parent);I.each(function(ct){if(s.getPtId(ct)===ze)return Je=ct});var Ue,Ge=Je.children;Ge.forEach(function(ct,mt){if(s.getPtId(ct)===Se)return Ue=mt});var Ye=Ge.length,et=b(Je.x0,Je.x1);be={rpx0:G,rpx1:G,x0:et(Ue/Ye),x1:et((Ue+1)/Ye)}}return b(Oe,be)}(fe);return function(ke){return oe(ge(ke))}}),Ee.select("g.slicetext").attr("opacity",0)}).remove():I.exit().remove(),I.order();var de=null;if(A&&R){var xe=s.getPtId(R);I.each(function(Ee){de===null&&s.getPtId(Ee)===xe&&(de=Ee.x1)})}var _e=I;function we(Ee){var fe=Ee.parent,ge=N[s.getPtId(fe)],ke={};if(ge){var be=fe.children,Se=be.indexOf(Ee),Oe=be.length,De=b(ge.x0,ge.x1);ke.x0=De(Se/Oe),ke.x1=De(Se/Oe)}else ke.x0=ke.x1=0;return ke}A&&(_e=_e.transition().each("end",function(){var Ee=m.select(this);s.setSliceCursor(Ee,T,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})}
1356)),_e.each(function(Ee){var fe=m.select(this),ge=e.ensureSingle(fe,"path","surface",function(je){je.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(je){return je.rpx0===0&&e.isFullCircle([je.x0,je.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(je.halfangle)),je.ring/2))}(Ee),A?ge.transition().attrTween("d",function(je){var Je=function(ze){var Ue,Ge=N[s.getPtId(ze)],Ye={x0:ze.x0,x1:ze.x1,rpx0:ze.rpx0,rpx1:ze.rpx1};if(Ge)Ue=Ge;else if(R)if(ze.parent)if(de){var et=(ze.x1>de?2*Math.PI:0)+J;Ue={x0:et,x1:et}}else Ue={rpx0:G,rpx1:G},e.extendFlat(Ue,we(ze));else Ue={rpx0:0,rpx1:0};else Ue={x0:J,x1:J};return b(Ue,Ye)}(je);return function(ze){return oe(Je(ze))}}):ge.attr("d",oe),fe.call(h,D,T,_,{eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(s.setSliceCursor,T,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:T._transitioning}),ge.call(f,Ee,S);var ke=e.ensureSingle(fe,"g","slicetext"),be=e.ensureSingle(ke,"text","",function(je){je.attr("data-notex",1)}),Se=e.ensureUniformFontSize(T,s.determineTextFont(S,Ee,L.font));be.text(te.formatSliceLabel(Ee,D,S,_,L)).classed("slicetext",!0).attr("text-anchor","middle").call(y.font,Se).call(n.convertToTspans,T);var Oe=y.bBox(be.node());Ee.transform=u(Oe,Ee,P),Ee.transform.targetX=pe(Ee),Ee.transform.targetY=ce(Ee);var De=function(je,Je){var ze=je.transform;return a(ze,Je),ze.fontSize=Se.size,i(S.type,ze,L),e.getTextTransform(ze)};A?be.transition().attrTween("transform",function(je){var Je=function(ze){var Ue,Ge=N[s.getPtId(ze)],Ye=ze.transform;if(Ge)Ue=Ge;else if(Ue={rpx1:ze.rpx1,transform:{textPosAngle:Ye.textPosAngle,scale:0,rotate:Ye.rotate,rCenter:Ye.rCenter,x:Ye.x,y:Ye.y}},R)if(ze.parent)if(de){var et=ze.x1>de?2*Math.PI:0;Ue.x0=Ue.x1=et}else e.extendFlat(Ue,we(ze));else Ue.x0=Ue.x1=J;else Ue.x0=Ue.x1=J;var ct=b(Ue.transform.textPosAngle,ze.transform.textPosAngle),mt=b(Ue.rpx1,ze.rpx1),Ct=b(Ue.x0,ze.x0),Tt=b(Ue.x1,ze.x1),nt=b(Ue.transform.scale,Ye.scale),Qe=b(Ue.transform.rotate,Ye.rotate),Et=Ye.rCenter===0?3:Ue.transform.rCenter===0?1/3:1,Gt=b(Ue.transform.rCenter,Ye.rCenter);return function(Xt){var Fe=mt(Xt),qe=Ct(Xt),wt=Tt(Xt),ft=function(Ie){return Gt(Math.pow(Ie,Et))}(Xt),Ce={pxmid:se(Fe,(qe+wt)/2),rpx1:Fe,transform:{textPosAngle:ct(Xt),rCenter:ft,x:Ye.x,y:Ye.y}};return i(S.type,Ye,L),{transform:{targetX:pe(Ce),targetY:ce(Ce),scale:nt(Xt),rotate:Qe(Xt),rCenter:ft}}}}(je);return function(ze){return De(Je(ze),Oe)}}):be.attr("transform",De(Ee,Oe))})}function c(T){return _=T.rpx1,w=T.transform.textPosAngle,[_*Math.sin(w),-_*Math.cos(w)];var _,w}te.plot=function(T,_,w,k){var L,A,I=T._fullLayout,P=I._sunburstlayer,S=!w,E=!I.uniformtext.mode&&s.hasTransition(w);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()),m.transition().duration(w.duration).ease(w.easing).each("end",function(){A&&A()}).each("interrupt",function(){A&&A()}).each(function(){P.selectAll("g.trace").each(function(D){x(T,D,this,w)})})):(L.each(function(D){x(T,D,this,w)}),I.uniformtext.mode&&o(T,I._sunburstlayer.selectAll(".trace"),"sunburst")),S&&L.exit().remove()},te.formatSliceLabel=function(T,_,w,k,L){var A=w.texttemplate,I=w.textinfo;if(!(A||I&&I!=="none"))return"";var P=L.separators,S=k[0],E=T.data.data,D=S.hierarchy,F=s.isHierarchyRoot(T),H=s.getParent(D,T),V=s.getValue(T);if(!A){var Z,K=I.split("+"),G=function(J){return K.indexOf(J)!==-1},W=[];if(G("label")&&E.label&&W.push(E.label),E.hasOwnProperty("v")&&G("value")&&W.push(s.formatValue(E.v,P)),!F){G("current path")&&W.push(s.getPath(T.data));var Q=0;G("percent parent")&&Q++,G("percent entry")&&Q++,G("percent root")&&Q++;var R=Q>1;if(Q){var N,U=function(J){Z=s.formatPercent(N,P),R&&(Z+=" of "+J),W.push(Z)};G("percent parent")&&!F&&(N=V/s.getValue(H),U("parent")),G("percent entry")&&(N=V/s.getValue(_),U("entry")),G("percent root")&&(N=V/s.getValue(D
1356),U("root"))}}return G("text")&&(Z=e.castOption(w,E.i,"text"),e.isValidTextValue(Z)&&W.push(Z)),W.join("<br>")}var ee=e.castOption(w,E.i,"texttemplate");if(!ee)return"";var j={};E.label&&(j.label=E.label),E.hasOwnProperty("v")&&(j.value=E.v,j.valueLabel=s.formatValue(E.v,P)),j.currentPath=s.getPath(T.data),F||(j.percentParent=V/s.getValue(H),j.percentParentLabel=s.formatPercent(j.percentParent,P),j.parent=s.getPtLabel(H)),j.percentEntry=V/s.getValue(_),j.percentEntryLabel=s.formatPercent(j.percentEntry,P),j.entry=s.getPtLabel(_),j.percentRoot=V/s.getValue(D),j.percentRootLabel=s.formatPercent(j.percentRoot,P),j.root=s.getPtLabel(D),E.hasOwnProperty("color")&&(j.color=E.color);var X=e.castOption(w,E.i,"text");return(e.isValidTextValue(X)||X==="")&&(j.text=X),j.customdata=e.castOption(w,E.i,"customdata"),e.texttemplateString(ee,j,L._d3locale,j,w._meta||{})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/style":662,"../bar/uniform_text":664,"../pie/helpers":906,"../pie/plot":910,"./constants":1052,"./fx":1054,"./helpers":1055,"./style":1060,"@plotly/d3":58,"d3-hierarchy":115,"d3-interpolate":116}],1060:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/color"),b=v("../../lib"),y=v("../bar/uniform_text").resizeText;function e(n,t,i){var r=t.data.data,d=!t.children,l=r.i,a=b.castOption(i,l,"marker.line.color")||g.defaultLine,u=b.castOption(i,l,"marker.line.width")||0;n.style("stroke-width",u).call(g.fill,r.color).call(g.stroke,a).style("opacity",d?i.leaf.opacity:null)}$.exports={style:function(n){var t=n._fullLayout._sunburstlayer.selectAll(".trace");y(n,t,"sunburst"),t.each(function(i){var r=m.select(this),d=i[0].trace;r.style("opacity",d.opacity),r.selectAll("path.surface").each(function(l){m.select(this).call(e,l,d)})})},styleOne:e}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],1061:[function(v,$,te){var m=v("../../components/color"),g=v("../../components/colorscale/attributes"),b=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,y=v("../../plots/template_attributes").hovertemplateAttrs,e=v("../../plots/attributes"),n=v("../../lib/extend").extendFlat,t=v("../../plot_api/edit_types").overrideAll;function i(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:m.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:m.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var r=$.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:y(),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},g("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:i(),y:i(),z:i()},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({},g.zauto,{}),zmin:n({},g.zmin,{}),zmax:n({},g.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}],1062:[function(v,$,te){var m=v("../../components/colorscale/calc");$.exports=function(g,b){b.surfacecolor?m(g,b,{vals:b.surfacecolor,containerStr:"",cLetter:"c"}):m(g,b,{vals:b.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],1063:[function(v,$,te){var m=v("../../../stackgl_modules").gl_surface3d,g=v("../../../stackgl_modules").ndarray,b=v("../../../stackgl_modules").ndarray_linear_interpolate.d2,y=v("../heatmap/interp2d"),e=v("../heatmap/find_empties"),n=v("../../lib").isArrayOrTypedArray,t=v("../../lib/gl_format_color").parseColorScale,i=v("../../lib/str2rgbarray"),r=v("../../components/colorscale").extractOpts;function d(w,k,L){this.scene=w,this.uid=L,this.surface=k,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,
vendor: 12,082 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 l=d.prototype;l.getXat=function(w,k,L,A){var I=n(this.data.x)?n(this.data.x[0])?this.data.x[k][w]:this.data.x[w]:w;return L===void 0?I:A.d2l(I,0,L)},l.getYat=function(w,k,L,A){var I=n(this.data.y)?n(this.data.y[0])?this.data.y[k][w]:this.data.y[k]:k;return L===void 0?I:A.d2l(I,0,L)},l.getZat=function(w,k,L,A){var I=this.data.z[k][w];return I===null&&this.data.connectgaps&&this.data._interpolatedZ&&(I=this.data._interpolatedZ[k][w]),L===void 0?I:A.d2l(I,0,L)},l.handlePick=function(w){if(w.object===this.surface){var k=(w.data.index[0]-1)/this.dataScaleX-1,L=(w.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);w.index=[A,I],w.traceCoordinate=[this.getXat(A,I),this.getYat(A,I),this.getZat(A,I)],w.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=w.dataCoordinate[P];S!=null&&(w.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?w.textLabel=E[I][A]:w.textLabel=E||"",w.data.dataCoordinate=w.dataCoordinate.slice(),this.surface.highlight(w.data),this.scene.glplot.spikes.position=w.dataCoordinate,!0}};var a=[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(w,k){if(w<k)return 0;for(var L=0;Math.floor(w%k)===0;)w/=k,L++;return L}function f(w){for(var k=[],L=0;L<a.length;L++){var A=a[L];k.push(u(w,A))}return k}function o(w){for(var k=f(w),L=w,A=0;A<a.length;A++)if(k[A]>0){L=a[A];break}return L}function h(w,k){if(!(w<1||k<1)){for(var L=f(w),A=f(k),I=1,P=0;P<a.length;P++)I*=Math.pow(a[P],Math.max(L[P],A[P]));return I}}l.calcXnums=function(w){var k,L=[];for(k=1;k<w;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<w;k++)P+=L[k-1];for(k=1;k<w;k++)L[k-1]===0?L[k-1]=1:L[k-1]=Math.round(P/L[k-1]);return L},l.calcYnums=function(w){var k,L=[];for(k=1;k<w;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<w;k++)P+=L[k-1];for(k=1;k<w;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],s=p[9],x=p[13];function c(w,k,L){var A=L[8]+L[2]*k[0]+L[5]*k[1];return w[0]=(L[6]+L[0]*k[0]+L[3]*k[1])/A,w[1]=(L[7]+L[1]*k[0]+L[4]*k[1])/A,w}function T(w,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]))}(w,k,c,L),w}function _(w,k){for(var L=!1,A=0;A<w.length;A++)if(k===w[A]){L=!0;break}L===!1&&w.push(k)}l.estimateScale=function(w,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(w):this.calcYnums(w));L<s;)L*=2;for(;L>x;)L--,L/=o(L),++L<s&&(L=x);var A=Math.round(L/w);return A>1?A:1},l.refineCoords=function(w){for(var k=this.dataScaleX,L=this.dataScaleY,A=w[0].shape[0],I=w[0].shape[1],P=0|Math.floor(w[0].shape[0]*k+1),S=0|Math.floor(w[0].shape[1]*L+1),E=1+A+1,D=1+I+1,F=g(new Float32Array(E*D),[E,D]),H=[1/k,0,0,0,1/L,0,0,0,1],V=0;V<w.length;++V){this.surface.padField(F,w[V]);var Z=g(new Float32Array(P*S),[P,S]);T(Z,F,H),w[V]=Z}},l.setContourLevels=function(){var w,k,L,A=[[],[],[]],I=[!1,!1,!1],P=!1;for(w=0;w<3;++w)if(this.showContour[w]&&(P=!0,this.contourSize[w]>0&&this.contourStart[w]!==null&&this.contourEnd[w]!==null&&this.contourEnd[w]>this.contourStart[w]))for(I[w]=!0,k=this.contourStart[w];k<this.contourEnd[w];k+=this.contourSize[w])L=k*this.scene.dataScale[w],_(A[w],L);if(P){var S=[[],[],[]];for(w=0;w<3;++w)this.showContour[w]&&(S[w]=I[w]?A[w]:this.scene.contourLevels[w]);this.surface.update({levels:S})}},l.update=function(w){var k,L,A,I,P=this.scene,S=P.fullSceneLayout,E=this.surface,D=t(w),F=P.dataScale,H=w.z[0].length,V=w._ylength,Z=P.contourLevels;this.data=w;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,w.xcalendar,S.xaxis),K[1][L][A]=this.getYat(L,A,w.ycalendar,S.yaxis),K[2][L][A]=this.getZat(L,A,w.zcalendar,S.zaxis);if(w.connectgaps)for(w._emptypoints=e(K[2]),y(K[2],w._emptypoints),w._interpolatedZ=[],L=0;L<H;L++)for(w._interpolatedZ[L]=[],A=0;A<V;A++)w._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 G=[g(new Float32Array(H*V),[H,V]),g(new Float32Array(H*V),[H,V]),g(new Float32Array(H*V),[H,V])];for(k=0;k<3;k++)for(L=0;L<H;L++)for(A=0;A<V;A++)G[k].set(L,A,K[k][L][A]);K=[];var W={colormap:D,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!w.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:w.opacityscale,opacity:w.opacity},Q=r(w);if(W.intensityBounds=[Q.min,Q.max],w.surfacecolor){var R=g(new Float32Array(H*V),[H,V]);for(L=0;L<H;L++)for(A=0;A<V;A++)R.set(L,A,w.surfacecolor[A][L]);G.push(R)}else W.intensityBounds[0]*=F[2],W.intensityBounds[1]*=F[2];(x<G[0].shape[0]||x<G[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(G[0].shape[0],0),this.dataScaleY=this.estimateScale(G[0].shape[1],1),this.dataScaleX===1&&this.dataScaleY===1||this.refineCoords(G)),w.surfacecolor&&(W.intensity=G.pop());var N=[!0,!0,!0],U=["x","y","z"];for(k=0;k<3;++k){var ee=w.contours[U[k]];N[k]=ee.highlight,W.showContour[k]=ee.show||ee.highlight,W.showContour[k]&&(W.contourProject[k]=[ee.project.x,ee.project.y,ee.project.z],ee.show?(this.showContour[k]=!0,W.levels[k]=Z[k],E.highlightColor[k]=W.contourColor[k]=i(ee.color),ee.usecolormap?E.highlightTint[k]=W.contourTint[k]=0:E.highlightTint[k]=W.contourTint[k]=1,W.contourWidth[k]=ee.width,this.contourStart[k]=ee.start,this.contourEnd[k]=ee.end,this.contourSize[k]=ee.size):(this.showContour[k]=!1,this.contourStart[k]=null,this.contourEnd[k]=null,this.contourSize[k]=0),ee.highlight&&(W.dynamicColor[k]=i(ee.highlightcolor),W.dynamicWidth[k]=ee.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=G,E.update(W),E.visible=w.visible,E.enableDynamic=N,E.enableHighlight=N,E.snapToData=!0,"lighting"in w&&(E.ambientLight=w.lighting.ambient,E.diffuseLight=w.lighting.diffuse,E.specularLight=w.lighting.specular,E.roughness=w.lighting.roughness,E.fresnel=w.lighting.fresnel),"lightposition"in w&&(E.lightPosition=[w.lightposition.x,w.lightposition.y,w.lightposition.z])},l.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},$.exports=function(w,k){var L=w.glplot.gl,A=m({gl:L}),I=new d(w,A,k.uid);return A._trace=I,I.update(k),w.glplot.add(A),I}},{"../../../stackgl_modules":1124,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../heatmap/find_empties":798,"../heatmap/interp2d":801}],1064:[function(v,$,te){var m=v("../../registry"),g=v("../../lib"),b=v("../../components/colorscale/defaults"),y=v("./attributes");function e(t,i,r,d){var l=d("opacityscale");l==="max"?i.opacityscale=[[0,.1],[1,1]]:l==="min"?i.opacityscale=[[0,1],[1,.1]]:l==="extremes"?i.opacityscale=function(a,u){for(var f=[],o=0;o<32;o++){var h=o/31,p=u+(1-u)*(1-Math.pow(Math.sin(a*h*Math.PI),2));f.push([h,Math.max(0,Math.min(1,p))])}return f}(1,.1):function(a){var u=0;if(!Array.isArray(a)||a.length<2||!a[0]||!a[a.length-1]||+a[0][0]!=0||+a[a.length-1][0]!=1)return!1;for(var f=0;f<a.length;f++){var o=a[f];if(o.length!==2||+o[0]<u)return!1;u=+o[0]}return!0}(l)||(i.opacityscale=void 0)}function n(t,i,r){i in t&&!(r in t)&&(t[r]=t[i])}$.exports={supplyDefaults:function(t,i,r,d){var l,a;function u(_,w){return g.coerce(t,i,y,_,w)}var f=u("x"),o=u("y"),h=u("z");if(!h||!h.length||f&&f.length<1||o&&o.length<1)i.visible=!1;else{i._xlength=Array.isArray(f)&&g.isArrayOrTypedArray(f[0])?h.length:h[0].length,i._ylength=h.length,m.getComponentMethod("calendars","handleTraceDefaults")(t,i,["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"),s=["x","y","z"];for(l=0;l<3;++l){var x="contours."+s[l],c=u(x+".show"),T=u(x+".highlight");if(c||T)for(a=0;a<3;++a)u(x+".project."+s[a]);c&&(u(x+".color"),u(x+".width"),u(x+".usecolormap")),T&&(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,i,d,u,{prefix:"",cLetter:"c"}),e(t,i,d,u),i._length=null}},opacityscaleDefaults:e}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":1061}],1065:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults").supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:v("./calc"),plot:v("./convert"),moduleType:"trace",name:"surface",basePlotModule:v("../../plots/gl3d"),categories:["gl3d","2dMap","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":1061,"./calc":1062,"./convert":1063,"./defaults":1064}
1356],1066:[function(v,$,te){var m=v("../../components/annotations/attributes"),g=v("../../lib/extend").extendFlat,b=v("../../plot_api/edit_types").overrideAll,y=v("../../plots/font_attributes"),e=v("../../plots/domain").attributes,n=v("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers;($.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:g({},m.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:g({},y({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:g({},m.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:g({},y({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}],1067:[function(v,$,te){var m=v("../../plots/get_data").getModuleCalcData,g=v("./plot");te.name="table",te.plot=function(b){var y=m(b.calcdata,"table")[0];y.length&&g(b,y)},te.clean=function(b,y,e,n){var t=n._has&&n._has("table"),i=y._has&&y._has("table");t&&!i&&n._paperdiv.selectAll(".table").remove()}},{"../../plots/get_data":593,"./plot":1074}],1068:[function(v,$,te){var m=v("../../lib/gup").wrap;$.exports=function(){return m({})}},{"../../lib/gup":500}],1069:[function(v,$,te){$.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"}}},{}],1070:[function(v,$,te){var m=v("./constants"),g=v("../../lib/extend").extendFlat,b=v("fast-isnumeric");function y(l){if(Array.isArray(l)){for(var a=0,u=0;u<l.length;u++)a=Math.max(a,y(l[u]));return a}return l}function e(l,a){return l+a}function n(l){var a,u=l.slice(),f=1/0,o=0;for(a=0;a<u.length;a++)Array.isArray(u[a])||(u[a]=[u[a]]),f=Math.min(f,u[a].length),o=Math.max(o,u[a].length);if(f!==o)for(a=0;a<u.length;a++){var h=o-u[a].length;h&&(u[a]=u[a].concat(t(h)))}return u}function t(l){for(var a=new Array(l),u=0;u<l;u++)a[u]="";return a}function i(l){return l.calcdata.columns.reduce(function(a,u){return u.xIndex<l.xIndex?a+u.columnWidth:a},0)}function r(l,a){return Object.keys(l).map(function(u){return g({},l[u],{auxiliaryBlocks:a})})}function d(l,a){for(var u,f={},o=0,h=0,p={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,x=0,c=0;c<l.length;c++)u=l[c],p.rows.push({rowIndex:c,rowHeight:u}),((h+=u)>=a||c===l.length-1)&&(f[o]=p,p.key=x++,p.firstRowIndex=s,p.lastRowIndex=c,p={firstRowIndex:null,lastRowIndex:null,rows:[]},o+=h,s=c+1,h=0);return f}$.exports=function(l,a){var u=n(a.cells.values),f=function(F){return F.slice(a.header.values.length,F.length)},o=n(a.header.values);o.length&&!o[0].length&&(o[0]=[""],o=n(o));var h=o.concat(f(u).map(function(){return t((o[0]||[""]).length)})),p=a.domain,s=Math.floor(l._fullLayout._size.w*(p.x[1]-p.x[0])),x=Math.floor(l._fullLayout._size.h*(p.y[1]-p.y[0])),c=a.header.values.length?h[0].map(function(){return a.header.height}):[m.emptyHeaderHeight],T=u.length?u[0].map(function(){return a.cells.height}):[],_=c.reduce(e,0),w=d(T,x-_+m.uplift),k=r(d(c,_),[]),L=r(w,k),A={},I=a._fullInput.columnorder.concat(f(u.map(function(F,H){return H}))),P=h.map(function(F,H){var V=Array.isArray(a.columnwidth)?a.columnwidth[Math.min(H,a.columnwidth.length-1)]:a.columnwidth;return b(V)?Number(V):1}),S=P.reduce(e,0);P=P.map(function(F){return F/S*s});var E=Math.max(y(a.header.line.width),y(a.cells.line.width)),D={key:a.uid+l._context.staticPlot,translateX:p.x[0]*l._fullLayout._size.w,translateY:l._fullLayout._size.h*(1-p.y[1]),size:l._fullLayout._size,width:s,maxLineWidth:E,height:x,columnOrder:I,groupHeight:x,rowBlocks:L,headerRowBlocks:k,scrollY:0,cells:g({},a.cells,{values:u}),headerCells:g({},a.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:i,x:void 0,calcdata:void 0,columnWidth:P[H]}})};return D.columns.forEach(function(F){F.calcdata=D,F.x=i(F)}),D}},{"../../lib/extend":493,"./constants":1069,"fast-isnumeric":190}],1071:[function(v,$,te){var m=v("../../lib/extend").extendFlat;te.splitToPanels=function(g){var b=[0,0],y=m({},g,{key:"header",type:"header",page:0,prevPages:b,currentRepaint:[null,null],dragHandle:!0,values:g.calcdata.headerCells.values[g.specIndex],rowBlocks:g.calcdata.headerRowBlocks,calcdata:m({},g.calcdata,{cells:g.calcdata.headerCells})});return[m({},g,{key:"cells1",type:"cells",page:0,prevPages:b,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks}),m({},g,{key:"cells2",type:"cells",page:1,prevPages:b,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks}),y]},te.splitToCells=function(g){var b=function(y){var e=y.rowBlocks[y.page],n=e?e.rows[0].rowIndex:0,t=e?n+e.rows.length:0;return[n,t]}(g);return(g.values||[]).slice(b[0],b[1]).map(function(y,e){return{keyWithinBlock:e+(typeof y=="string"&&y.match(/[<$&>
1356 ]/)?"_keybuster_"+Math.random():""),key:b[0]+e,column:g,calcdata:g.calcdata,page:g.page,rowBlocks:g.rowBlocks,value:y}})}},{"../../lib/extend":493}],1072:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("../../plots/domain").defaults;$.exports=function(y,e,n,t){function i(r,d){return m.coerce(y,e,g,r,d)}b(e,t,i),i("columnwidth"),i("header.values"),i("header.format"),i("header.align"),i("header.prefix"),i("header.suffix"),i("header.height"),i("header.line.width"),i("header.line.color"),i("header.fill.color"),m.coerceFont(i,"header.font",m.extendFlat({},t.font)),function(r,d){for(var l=r.columnorder||[],a=r.header.values.length,u=l.slice(0,a),f=u.slice().sort(function(p,s){return p-s}),o=u.map(function(p){return f.indexOf(p)}),h=o.length;h<a;h++)o.push(h);d("columnorder",o)}(e,i),i("cells.values"),i("cells.format"),i("cells.align"),i("cells.prefix"),i("cells.suffix"),i("cells.height"),i("cells.line.width"),i("cells.line.color"),i("cells.fill.color"),m.coerceFont(i,"cells.font",m.extendFlat({},t.font)),e._length=null}},{"../../lib":503,"../../plots/domain":584,"./attributes":1066}],1073:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("./calc"),plot:v("./plot"),moduleType:"trace",name:"table",basePlotModule:v("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1066,"./base_plot":1067,"./calc":1068,"./defaults":1072,"./plot":1074}],1074:[function(v,$,te){var m=v("./constants"),g=v("@plotly/d3"),b=v("../../lib").numberFormat,y=v("../../lib/gup"),e=v("../../components/drawing"),n=v("../../lib/svg_text_utils"),t=v("../../lib").raiseToTop,i=v("../../lib").strTranslate,r=v("../../lib").cancelTransition,d=v("./data_preparation_helper"),l=v("./data_split_helpers"),a=v("../../components/color");function u(G){return Math.ceil(G.calcdata.maxLineWidth/2)}function f(G,W){return"clip"+G._fullLayout._uid+"_scrollAreaBottomClip_"+W.key}function o(G,W){return"clip"+G._fullLayout._uid+"_columnBoundaryClippath_"+W.calcdata.key+"_"+W.specIndex}function h(G){return[].concat.apply([],G.map(function(W){return W})).map(function(W){return W.__data__})}function p(G,W,Q){var R=G.selectAll("."+m.cn.scrollbarKit).data(y.repeat,y.keyFun);R.enter().append("g").classed(m.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,m.goldenRatio*m.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+m.scrollbarWidth/2+m.scrollbarOffset;return i(J,L(X))});var N=R.selectAll("."+m.cn.scrollbar).data(y.repeat,y.keyFun);N.enter().append("g").classed(m.cn.scrollbar,!0);var U=N.selectAll("."+m.cn.scrollbarSlider).data(y.repeat,y.keyFun);U.enter().append("g").classed(m.cn.scrollbarSlider,!0),U.attr("transform",function(X){return i(0,X.scrollbarState.topY||0)});var ee=U.selectAll("."+m.cn.scrollbarGlyph).data(y.repeat,y.keyFun);ee.enter().append("line").classed(m.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",m.scrollbarWidth).attr("stroke-linecap","round").attr("y1",m.scrollbarWidth/2),ee.attr("y2",function(X){return X.scrollbarState.barLength-m.scrollbarWidth/2}).attr("stroke-opacity",function(X){return X.columnDragInProgress||!X.scrollbarState.barWiggleRoom||Q?0:.4}),ee.transition().delay(0).duration(0),ee.transition().delay(m.scrollbarHideDelay).duration(m.scrollbarHideDuration).attr("stroke-opacity",0);var j=N.selectAll("."+m.cn.scrollbarCaptureZone).data(y.repeat,y.keyFun);j.enter().append("line").classed(m.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",m.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(X){var J=g.event.y,re=this.getBoundingClientRect(),ne=X.scrollbarState,se=J-re.top,oe=g.scale.linear().domain([0,ne.scrollableAreaHeight]).range([0,ne.totalHeight]).clamp(!0);ne.topY<=se&&se<=ne.bottomY||I(W,G,null,oe(se-ne.barLength/2))(X)}).call(g.behavior.drag().origin(function(X){return g.event.stopPropagation(),X.scrollbarState.scrollbarScrollInProgress=!0,X}).on("drag",I(W,G)).on("dragend",function(){})),j.attr("y2",function(X){return X.scrollbarState.scrollableAreaHeight}),W._context.staticPlot&&(ee.remove(),j.remove())}function s(G,W,Q,R){var N=function(ee){var j=ee.selectAll("."+m.cn.columnCell).data(l.splitToCells,function(X){return X.keyWithinBlock});return j.enter().append("g").classed(m.cn.columnCell,!0),j.exit().remove(),j}(function(ee){var j=ee.selectAll("."+m.cn.columnCells).data(y.repeat,y.keyFun);return j.enter().append("g").classed(m.cn.columnCells,!0),j.exit().remove(),j}(Q));(function(ee){ee.each(function(j,X){var J=j.calcdata.cells.font,re=j.column.specIndex,ne={size:T(J.size,re,X),c
1356olor:T(J.color,re,X),family:T(J.family,re,X)};j.rowNumber=j.key,j.align=T(j.calcdata.cells.align,re,X),j.cellBorderWidth=T(j.calcdata.cells.line.width,re,X),j.font=ne})})(N),function(ee){ee.attr("width",function(j){return j.column.columnWidth}).attr("stroke-width",function(j){return j.cellBorderWidth}).each(function(j){var X=g.select(this);a.stroke(X,T(j.calcdata.cells.line.color,j.column.specIndex,j.rowNumber)),a.fill(X,T(j.calcdata.cells.fill.color,j.column.specIndex,j.rowNumber))})}(function(ee){var j=ee.selectAll("."+m.cn.cellRect).data(y.repeat,function(X){return X.keyWithinBlock});return j.enter().append("rect").classed(m.cn.cellRect,!0),j}(N));var U=function(ee){var j=ee.selectAll("."+m.cn.cellText).data(y.repeat,function(X){return X.keyWithinBlock});return j.enter().append("text").classed(m.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){g.event.stopPropagation()}),j}(function(ee){var j=ee.selectAll("."+m.cn.cellTextHolder).data(y.repeat,function(X){return X.keyWithinBlock});return j.enter().append("g").classed(m.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),j}(N));(function(ee){ee.each(function(j){e.font(g.select(this),j.font)})})(U),x(U,W,R,G),F(N)}function x(G,W,Q,R){G.text(function(N){var U=N.column.specIndex,ee=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(m.latexCheck);N.latex=se;var oe,pe,ce=se?"":T(N.calcdata.cells.prefix,U,ee)||"",de=se?"":T(N.calcdata.cells.suffix,U,ee)||"",xe=se?null:T(N.calcdata.cells.format,U,ee)||null,_e=ce+(xe?b(xe)(N.value):N.value)+de;if(N.wrappingNeeded=!N.wrapped&&!re&&!se&&(oe=c(_e)),N.cellHeightMayIncrease=J||se||N.mayHaveMarkup||(oe===void 0?c(_e):oe),N.needsConvertToTspans=N.mayHaveMarkup||N.wrappingNeeded||N.latex,N.wrappingNeeded){var we=(m.wrapSplitCharacter===" "?_e.replace(/<a href=/gi,"<a_href="):_e).split(m.wrapSplitCharacter),Ee=m.wrapSplitCharacter===" "?we.map(function(fe){return fe.replace(/<a_href=/gi,"<a href=")}):we;N.fragments=Ee.map(function(fe){return{text:fe,width:null}}),N.fragments.push({fragment:m.wrapSpacer,width:null}),pe=Ee.join(m.lineBreaker)+m.lineBreaker+m.wrapSpacer}else delete N.fragments,pe=_e;return pe}).attr("dy",function(N){return N.needsConvertToTspans?0:"0.75em"}).each(function(N){var U=g.select(this),ee=N.wrappingNeeded?S:E;N.needsConvertToTspans?n.convertToTspans(U,R,ee(Q,this,W,R,N)):g.select(this.parentNode).attr("transform",function(j){return i(D(j),m.cellPad)}).attr("text-anchor",function(j){return{left:"start",center:"middle",right:"end"}[j.align]})})}function c(G){return G.indexOf(m.wrapSplitCharacter)!==-1}function T(G,W,Q){if(Array.isArray(G)){var R=G[Math.min(W,G.length-1)];return Array.isArray(R)?R[Math.min(Q,R.length-1)]:R}return G}function _(G,W,Q){G.transition().ease(m.releaseTransitionEase).duration(m.releaseTransitionDuration).attr("transform",i(W.x,Q))}function w(G){return G.type==="cells"}function k(G){return G.type==="header"}function L(G){return(G.rowBlocks.length?G.rowBlocks[0].auxiliaryBlocks:[]).reduce(function(W,Q){return W+V(Q,1/0)},0)}function A(G,W,Q){var R=h(W)[0];if(R!==void 0){var N=R.rowBlocks,U=R.calcdata,ee=H(N,N.length),j=R.calcdata.groupHeight-L(R),X=U.scrollY=Math.max(0,Math.min(ee-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,_e=0,we=0;we<xe.length;we++)_e+=xe[we].rowHeight;de.allRowsHeight=_e,ne<pe+_e&&ne+se>pe&&oe.push(ce),pe+=_e}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 i(0,ne)}),G&&(P(G,Q,W,J,R.prevPages,R,0),P(G,Q,W,J,R.prevPages,R,1),p(Q,G))}}function I(G,W,Q,R){return function(N){var U=N.calcdata?N.calcdata:N,ee=W.filter(function(re){return U.key===re.key}),j=Q||U.scrollbarState.dragMultiplier,X=U.scrollY;U.scrollY=R===void 0?U.scrollY+j*g.event.dy:R;var J=ee.selectAll("."+m.cn.yColumn).selectAll("."+m.cn.columnBlock).filter(w);return A(G,J,ee),U.scrollY===X}}function P(G,W,Q,R,N,U,ee){R[ee]!==N[ee]&&(clearTimeout(U.currentRepaint[ee]),U.currentRepaint[ee]=setTimeout(function(){var j=Q.filter(function(X,J){return J===ee&&R[J]!==N[J]});s(G,W,j,Q),N[ee]=R[ee]}))}function S(G,W,Q,R){return function(){var N=g.select(W.parentNode);N.each(function(U){var ee=U.fragments;N.selectAll("tspan.line").each(function(pe,ce){ee[ce].width=this.getComputedTextLength()});var j,X,J=ee[ee.length-1].width,re=ee.slice(0,-1),ne=[],se=0,oe=U.column.columnWidth-2*m.cellPad;for(U.value="";re.length;)se+(X=(j=re.shift()).width+J)>oe&&(U.value+=ne.join(m.wrapSpacer)+m.lineBreaker,ne=[],se=0),ne.push(j.text),se+=X;se&&(U.value+=ne.join(m.wrapSpacer)),U.wrapped=!0}),N.selectAll("tspan.line").remove(),x(N.select("."+m.cn.cellText),Q,G,R),g.select(W.parentNode.parentNode).call(F)}}function E(G,W,Q,R,N){return function(){if(!N.settledY){var U=g.select(W.parentNode),ee=K(N),j=N.key-ee.firstRowIndex,X=ee.rows[j].rowHeight,J=N.cellHeightMayIncrease?W.parentNode.getBoundingClientRect().height+2*m.cellPad:X,re=Math.max(J,X);re-ee.rows[j].rowHeight&&(ee.rows[j].rowHeight=re,G.selectAll("."+m.cn.columnCell).call(F),A(null,G.filter(w),0),p(Q,R,!0)),U.attr("transform",function(){var ne=this.parentNode.getBoundingClientRect(),se=g.select(this.parentNode).select("."+m.cn.cellRect).node().getBoundingClientRect(),oe=this.transform.baseVal.consolidate(),pe=se.top-ne.top+(oe?oe.matrix.f:m.cellPad);return i(D(N,g.select(this.parentNode).select("."+m.cn.cellTextHolder).node().getBoundingClientRect().width),pe)}),N.settledY=!0}}}function D(G,W){switch(G.align){case"left":return m.cellPad;case"right":return G.column.columnWidth-(W||0)-m.cellPad;case"center":return(G.column.columnWidth-(W||0))/2;default:return m.cellPad}}function F(G){G.attr("transform",function(W){var Q=W.rowBlocks[0].auxiliaryBlocks.reduce(function(N,U){return N+V(U,1/0)},0),R=V(K(W),W.key);return i(0,R+Q)}).selectAll("."+m.cn.cellRect).attr("height",function(W){return(Q=K(W),R=W.key,Q.rows[R-Q.firstRowIndex]).rowHeight;var Q,R})}function H(G,W){for(var Q=0,R=W-1;R>=0;R--)Q+=Z(G[R]);return Q}function V(G,W){for(var Q=0,R=0;R<G.rows.length&&G.rows[R].rowIndex<W;R++)Q+=G.rows[R].rowHeight;return Q}function Z(G){var W=G.allRowsHeight;if(W!==void 0)return W;for(var Q=0,R=0;R<G.rows.length;R++)Q+=G.rows[R].rowHeight;return G.allRowsHeight=Q,Q}function K(G){return G.rowBlocks[G.page]}$.exports=function(G,W){var Q=!G._context.staticPlot,R=G._fullLayout._paper.selectAll("."+m.cn.table).data(W.map(function(de){var xe=y.unwrap(de).trace;return d(G,xe)}),y.keyFun);R.exit().remove(),R.enter().append("g").classed(m.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 i(de.translateX,de.translateY)});
1356var N=R.selectAll("."+m.cn.tableControlView).data(y.repeat,y.keyFun),U=N.enter().append("g").classed(m.cn.tableControlView,!0).style("box-sizing","content-box");if(Q){var ee="onwheel"in document?"wheel":"mousewheel";U.on("mousemove",function(de){N.filter(function(xe){return de===xe}).call(p,G)}).on(ee,function(de){if(!de.scrollbarState.wheeling){de.scrollbarState.wheeling=!0;var xe=de.scrollY+g.event.deltaY;I(G,N,null,xe)(de)||(g.event.stopPropagation(),g.event.preventDefault()),de.scrollbarState.wheeling=!1}}).call(p,G,!0)}N.attr("transform",function(de){return i(de.size.l,de.size.t)});var j=N.selectAll("."+m.cn.scrollBackground).data(y.repeat,y.keyFun);j.enter().append("rect").classed(m.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(g.select(this),f(G,de),G)});var X=N.selectAll("."+m.cn.yColumn).data(function(de){return de.columns},y.keyFun);X.enter().append("g").classed(m.cn.yColumn,!0),X.exit().remove(),X.attr("transform",function(de){return i(de.x,0)}),Q&&X.call(g.behavior.drag().origin(function(de){return _(g.select(this),de,-m.uplift),t(this),de.calcdata.columnDragInProgress=!0,p(N.filter(function(xe){return de.calcdata.key===xe.key}),G),de}).on("drag",function(de){var xe=g.select(this),_e=function(we){return(de===we?g.event.x:we.x)+we.columnWidth/2};de.x=Math.max(-m.overdrag,Math.min(de.calcdata.width+m.overdrag-de.columnWidth,g.event.x)),h(X).filter(function(we){return we.calcdata.key===de.calcdata.key}).sort(function(we,Ee){return _e(we)-_e(Ee)}).forEach(function(we,Ee){we.xIndex=Ee,we.x=de===we?we.x:we.xScale(we)}),X.filter(function(we){return de!==we}).transition().ease(m.transitionEase).duration(m.transitionDuration).attr("transform",function(we){return i(we.x,0)}),xe.call(r).attr("transform",i(de.x,-m.uplift))}).on("dragend",function(de){var xe=g.select(this),_e=de.calcdata;de.x=de.xScale(de),de.calcdata.columnDragInProgress=!1,_(xe,de,0),function(we,Ee,fe){var ge=Ee.gdColumnsOriginalOrder;Ee.gdColumns.sort(function(ke,be){return fe[ge.indexOf(ke)]-fe[ge.indexOf(be)]}),Ee.columnorder=fe,we.emit("plotly_restyle")}(G,_e,_e.columns.map(function(we){return we.xIndex}))})),X.each(function(de){e.setClipUrl(g.select(this),o(G,de),G)});var J=X.selectAll("."+m.cn.columnBlock).data(l.splitToPanels,y.keyFun);J.enter().append("g").classed(m.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(w);Q&&ne.call(g.behavior.drag().origin(function(de){return g.event.stopPropagation(),de}).on("drag",I(G,N,-1)).on("dragend",function(){})),s(G,N,re,J),s(G,N,ne,J);var se=N.selectAll("."+m.cn.scrollAreaClip).data(y.repeat,y.keyFun);se.enter().append("clipPath").classed(m.cn.scrollAreaClip,!0).attr("id",function(de){return f(G,de)});var oe=se.selectAll("."+m.cn.scrollAreaClipRect).data(y.repeat,y.keyFun);oe.enter().append("rect").classed(m.cn.scrollAreaClipRect,!0).attr("x",-m.overdrag).attr("y",-m.uplift).attr("fill","none"),oe.attr("width",function(de){return de.width+2*m.overdrag}).attr("height",function(de){return de.height+m.uplift}),X.selectAll("."+m.cn.columnBoundary).data(y.repeat,y.keyFun).enter().append("g").classed(m.cn.columnBoundary,!0);var pe=X.selectAll("."+m.cn.columnBoundaryClippath).data(y.repeat,y.keyFun);pe.enter().append("clipPath").classed(m.cn.columnBoundaryClippath,!0),pe.attr("id",function(de){return o(G,de)});var ce=pe.selectAll("."+m.cn.columnBoundaryRect).data(y.repeat,y.keyFun);ce.enter().append("rect").classed(m.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)+m.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":1069,"./data_preparation_helper":1070,"./data_split_helpers":1071,"@plotly/d3":58}],1075:[function(v,$,te){var m=v("../../plots/template_attributes").hovertemplateAttrs,g=v("../../plots/template_attributes").texttemplateAttrs,b=v("../../components/colorscale/attributes"),y=v("../../plots/domain").attributes,e=v("../pie/attributes"),n=v("../sunburst/attributes"),t=v("./constants"),i=v("../../lib/extend").extendFlat;$.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:i({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:i({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:n.textinfo,texttemplate:g({editType:"plot"},{keys:t.eventDataKeys.concat(["label","value"])}),hovertext:e.hovertext,hoverinfo:n.hoverinfo,hovertemplate:m({},{keys:t.eventDataKeys}),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:i({},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:y({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":901,"../sunburst/attributes":1049,"./constants":1078}
1356],1076:[function(v,$,te){var m=v("../../plots/plots");te.name="treemap",te.plot=function(g,b,y,e){m.plotBasePlot(te.name,g,b,y,e)},te.clean=function(g,b,y,e){m.cleanBasePlot(te.name,g,b,y,e)}},{"../../plots/plots":619}],1077:[function(v,$,te){var m=v("../sunburst/calc");te.calc=function(g,b){return m.calc(g,b)},te.crossTraceCalc=function(g){return m._runCrossTraceCalc("treemap",g)}},{"../sunburst/calc":1051}],1078:[function(v,$,te){$.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1079:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("../../components/color"),y=v("../../plots/domain").defaults,e=v("../bar/defaults").handleText,n=v("../bar/constants").TEXTPAD,t=v("../../components/colorscale"),i=t.hasColorscale,r=t.handleDefaults;$.exports=function(d,l,a,u){function f(w,k){return m.coerce(d,l,g,w,k)}var o=f("labels"),h=f("parents");if(o&&o.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 s=f("text");f("texttemplate"),l.texttemplate||f("textinfo",Array.isArray(s)?"text+label":"label"),f("hovertext"),f("hovertemplate");var x=f("pathbar.visible");e(d,l,u,f,"auto",{hasPathbar:x,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition");var c=l.textposition.indexOf("bottom")!==-1;f("marker.line.width")&&f("marker.line.color",u.paper_bgcolor);var T=f("marker.colors");(l._hasColorscale=i(d,"marker","colors")||(d.marker||{}).coloraxis)?r(d,l,u,f,{prefix:"marker.",cLetter:"c"}):f("marker.depthfade",!(T||[]).length);var _=2*l.textfont.size;f("marker.pad.t",c?_/4:_),f("marker.pad.l",_/4),f("marker.pad.r",_/4),f("marker.pad.b",c?_:_/4),l._hovered={marker:{line:{width:2,color:b.contrast(u.paper_bgcolor)}}},x&&(f("pathbar.thickness",l.pathbar.textfont.size+2*n),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),y(l,u,f),l._length=null}else l.visible=!1}},{"../../components/color":366,"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/constants":650,"../bar/defaults":652,"./attributes":1075}],1080:[function(v,$,te){var m=v("@plotly/d3"),g=v("../sunburst/helpers"),b=v("../bar/uniform_text").clearMinTextSize,y=v("../bar/style").resizeText,e=v("./plot_one");$.exports=function(n,t,i,r,d){var l,a,u=d.type,f=d.drawDescendants,o=n._fullLayout,h=o["_"+u+"layer"],p=!i;b(u,o),(l=h.selectAll("g.trace."+u).data(t,function(s){return s[0].trace.uid})).enter().append("g").classed("trace",!0).classed(u,!0),l.order(),!o.uniformtext.mode&&g.hasTransition(i)?(r&&(a=r()),m.transition().duration(i.duration).ease(i.easing).each("end",function(){a&&a()}).each("interrupt",function(){a&&a()}).each(function(){h.selectAll("g.trace").each(function(s){e(n,s,this,i,f)})})):(l.each(function(s){e(n,s,this,i,f)}),o.uniformtext.mode&&y(n,h.selectAll(".trace"),u)),p&&l.exit().remove()}},{"../bar/style":662,"../bar/uniform_text":664,"../sunburst/helpers":1055,"./plot_one":1089,"@plotly/d3":58}],1081:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../components/drawing"),y=v("../../lib/svg_text_utils"),e=v("./partition"),n=v("./style").styleOne,t=v("./constants"),i=v("../sunburst/helpers"),r=v("../sunburst/fx");$.exports=function(d,l,a,u,f){var o=f.barDifY,h=f.width,p=f.height,s=f.viewX,x=f.viewY,c=f.pathSlice,T=f.toMoveInsideSlice,_=f.strTransform,w=f.hasTransition,k=f.handleSlicesExit,L=f.makeUpdateSliceInterpolator,A=f.makeUpdateTextInterpolator,I={},P=d._fullLayout,S=l[0],E=S.trace,D=S.hierarchy,F=h/E._entryDepth,H=i.listPath(a.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 G=H.indexOf(K.data.id);return G!==-1&&(K.x0=F*G,K.x1=F*(G+1),K.y0=o,K.y1=o+p,K.onPathbar=!0,!0)})).reverse(),(u=u.data(V,i.getPtId)).enter().append("g").classed("pathbar",!0),k(u,!0,I,[h,p],c),u.order();var Z=u;w&&(Z=Z.transition().each("end",function(){var K=m.select(this);i.setSliceCursor(K,d,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}
1356)),Z.each(function(K){K._x0=s(K.x0),K._x1=s(K.x1),K._y0=x(K.y0),K._y1=x(K.y1),K._hoverX=s(K.x1-Math.min(h,p)/2),K._hoverY=x(K.y1-p/2);var G=m.select(this),W=g.ensureSingle(G,"path","surface",function(U){U.style("pointer-events","all")});w?W.transition().attrTween("d",function(U){var ee=L(U,!0,I,[h,p]);return function(j){return c(ee(j))}}):W.attr("d",c),G.call(r,a,d,l,{styleOne:n,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(i.setSliceCursor,d,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:d._transitioning}),W.call(n,K,E,{hovered:!1}),K._text=(i.getPtLabel(K)||"").split("<br>").join(" ")||"";var Q=g.ensureSingle(G,"g","slicetext"),R=g.ensureSingle(Q,"text","",function(U){U.attr("data-notex",1)}),N=g.ensureUniformFontSize(d,i.determineTextFont(E,K,P.font,{onPathbar:!0}));R.text(K._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(b.font,N).call(y.convertToTspans,d),K.textBB=b.bBox(R.node()),K.transform=T(K,{fontSize:N.size,onPathbar:!0}),K.transform.fontSize=N.size,w?R.transition().attrTween("transform",function(U){var ee=A(U,!0,I,[h,p]);return function(j){return _(ee(j))}}):R.attr("transform",_(K))})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1054,"../sunburst/helpers":1055,"./constants":1078,"./partition":1087,"./style":1090,"@plotly/d3":58}],1082:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../components/drawing"),y=v("../../lib/svg_text_utils"),e=v("./partition"),n=v("./style").styleOne,t=v("./constants"),i=v("../sunburst/helpers"),r=v("../sunburst/fx"),d=v("../sunburst/plot").formatSliceLabel;$.exports=function(l,a,u,f,o){var h=o.width,p=o.height,s=o.viewX,x=o.viewY,c=o.pathSlice,T=o.toMoveInsideSlice,_=o.strTransform,w=o.hasTransition,k=o.handleSlicesExit,L=o.makeUpdateSliceInterpolator,A=o.makeUpdateTextInterpolator,I=o.prevEntry,P=l._fullLayout,S=a[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,i.getPtId),S._maxVisibleLayers=isFinite(K)?K-Z+1:0,f.enter().append("g").classed("slice",!0),k(f,!1,{},[h,p],c),f.order();var G=null;if(w&&I){var W=i.getPtId(I);f.each(function(N){G===null&&i.getPtId(N)===W&&(G={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var Q=function(){return G||{x0:0,x1:h,y0:0,y1:p}},R=f;return w&&(R=R.transition().each("end",function(){var N=m.select(this);i.setSliceCursor(N,l,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(N){var U=i.isHeader(N,S);N._x0=s(N.x0),N._x1=s(N.x1),N._y0=x(N.y0),N._y1=x(N.y1),N._hoverX=s(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 ee=m.select(this),j=g.ensureSingle(ee,"path","surface",function(ne){ne.style("pointer-events","all")});w?j.transition().attrTween("d",function(ne){var se=L(ne,!1,Q(),[h,p]);return function(oe){return c(se(oe))}}):j.attr("d",c),ee.call(r,u,l,a,{styleOne:n,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(i.setSliceCursor,l,{isTransitioning:l._transitioning}),j.call(n,N,S,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=U?H?"":i.getPtLabel(N)||"":d(N,u,S,a,P)||"";var X=g.ensureSingle(ee,"g","slicetext"),J=g.ensureSingle(X,"text","",function(ne){ne.attr("data-notex",1)}),re=g.ensureUniformFontSize(l,i.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(y.convertToTspans,l),N.textBB=b.bBox(J.node()),N.transform=T(N,{fontSize:re.size,isHeader:U}),N.transform.fontSize=re.size,w?J.transition().attrTween("transform",function(ne){var se=A(ne,!1,Q(),[h,p]);return function(oe){return _(se(oe))}}):J.attr("transform",_(N))}),G}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1054,"../sunburst/helpers":1055,"../sunburst/plot":1059,"./constants":1078,"./partition":1087,"./style":1090,"@plotly/d3":58}],1083:[function(v,$,te){$.exports=function m(g,b,y){var e;y.swapXY&&(e=g.x0,g.x0=g.y0,g.y0=e,e=g.x1,g.x1=g.y1,g.y1=e),y.flipX&&(e=g.x0,g.x0=b[0]-g.x1,g.x1=b[0]-e),y.flipY&&(e=g.y0,g.y0=b[1]-g.y1,g.y1=b[1]-e);var n=g.children;if(n)for(var t=0;t<n.length;t++)m(n[t],b,y)}},{}],1084:[function(v,$,te){$.exports={moduleType:"trace",name:"treemap",basePlotModule:v("./base_plot"),categories:[],animatable:!0,attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults"),supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc").calc,crossTraceCalc:v("./calc").crossTraceCalc,plot:v("./plot"),style:v("./style").style,colorbar:v("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":945,"./attributes":1075,"./base_plot":1076,"./calc":1077,"./defaults":1079,"./layout_attributes":1085,"./layout_defaults":1086,"./plot":1088,"./style":1090}],1085:[function(v,$,te){$.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1086:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y){function e(n,t){return m.coerce(b,y,g,n,t)}e("treemapcolorway",y.colorway),e("extendtreemapcolors")}},{"../../lib":503,"./layout_attributes":1085}],1087:[function(v,$,te){var m=v("d3-hierarchy"),g=v("./flip_tree");$.exports=function(b,y,e){var n,t=e.flipX,i=e.flipY,r=e.packing==="dice-slice",d=e.pad[i?"bottom":"top"],l=e.pad[t?"right":"left"],a=e.pad[t?"left":"right"],u=e.pad[i?"top":"bottom"];r&&(n=l,l=d,d=n,n=a,a=u,u=n);var f=m.treemap().tile(function(o,h){switch(o){case"squarify":return m.treemapSquarify.ratio(h);case"binary":return m.treemapBinary;case"dice":return m.treemapDice;case"slice":return m.treemapSlice;default:return m.treemapSliceDice}}(e.packing,e.squarifyratio)).paddingInner(e.pad.inner).paddingLeft(l).paddingRight(a).paddingTop(d).paddingBottom(u).size(r?[y[1],y[0]]:y)(b);return(r||t||i)&&g(f,y,{swapXY:r,flipX:t,flipY:i}),f}}
1356,{"./flip_tree":1083,"d3-hierarchy":115}],1088:[function(v,$,te){var m=v("./draw"),g=v("./draw_descendants");$.exports=function(b,y,e,n){return m(b,y,e,n,{type:"treemap",drawDescendants:g})}},{"./draw":1080,"./draw_descendants":1082}],1089:[function(v,$,te){var m=v("@plotly/d3"),g=v("d3-interpolate").interpolate,b=v("../sunburst/helpers"),y=v("../../lib"),e=v("../bar/constants").TEXTPAD,n=v("../bar/plot").toMoveInsideBar,t=v("../bar/uniform_text").recordMinTextSize,i=v("./constants"),r=v("./draw_ancestors");function d(l){return b.isHierarchyRoot(l)?"":b.getPtId(l)}$.exports=function(l,a,u,f,o){var h=l._fullLayout,p=a[0],s=p.trace,x=s.type==="icicle",c=p.hierarchy,T=b.findEntryWithLevel(c,s.level),_=m.select(u),w=_.selectAll("g.pathbar"),k=_.selectAll("g.slice");if(!T)return w.remove(),void k.remove();var L=b.isHierarchyRoot(T),A=!h.uniformtext.mode&&b.hasTransition(f),I=b.getMaxDepth(s),P=h._size,S=s.domain,E=P.w*(S.x[1]-S.x[0]),D=P.h*(S.y[1]-S.y[0]),F=E,H=s.pathbar.thickness,V=s.marker.line.width+i.gapWithPathbar,Z=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?D+V:-(H+V):0,K={x0:F,x1:F,y0:Z,y1:Z+H},G=function(Se,Oe,De){var je=s.tiling.pad,Je=function(Ye){return Ye-je<=Oe.x0},ze=function(Ye){return Ye+je>=Oe.x1},Ue=function(Ye){return Ye-je<=Oe.y0},Ge=function(Ye){return Ye+je>=Oe.y1};return Se.x0===Oe.x0&&Se.x1===Oe.x1&&Se.y0===Oe.y0&&Se.y1===Oe.y1?{x0:Se.x0,x1:Se.x1,y0:Se.y0,y1:Se.y1}:{x0:Je(Se.x0-je)?0:ze(Se.x0-je)?De[0]:Se.x0,x1:Je(Se.x1+je)?0:ze(Se.x1+je)?De[0]:Se.x1,y0:Ue(Se.y0-je)?0:Ge(Se.y0-je)?De[1]:Se.y0,y1:Ue(Se.y1+je)?0:Ge(Se.y1+je)?De[1]:Se.y1}},W=null,Q={},R={},N=null,U=function(Se,Oe){return Oe?Q[d(Se)]:R[d(Se)]},ee=function(Se,Oe,De,je){if(Oe)return Q[d(c)]||K;var Je=R[s.level]||De;return function(ze){return ze.data.depth-T.data.depth<I}(Se)?G(Se,Je,je):{}};p.hasMultipleRoots&&L&&I++,s._maxDepth=I,s._backgroundColor=h.paper_bgcolor,s._entryDepth=T.data.depth,s._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(Se){return j+Se},re=function(Se){return X+Se},ne=re(0),se=J(0),oe=function(Se){return se+Se},pe=function(Se){return ne+Se};function ce(Se,Oe){return Se+","+Oe}var de=oe(0),xe=function(Se){Se.x=Math.max(de,Se.x)},_e=s.pathbar.edgeshape,we=function(Se,Oe){var De=Se.x0,je=Se.x1,Je=Se.y0,ze=Se.y1,Ue=Se.textBB,Ge=function(Et){return s.textposition.indexOf(Et)!==-1},Ye=Ge("bottom"),et=Ge("top")||Oe.isHeader&&!Ye?"start":Ye?"end":"middle",ct=Ge("right"),mt=Ge("left")||Oe.onPathbar?-1:ct?1:0,Ct=s[x?"tiling":"marker"].pad;if(Oe.isHeader){if((De+=(x?Ct:Ct.l)-e)>=(je-=(x?Ct:Ct.r)-e)){var Tt=(De+je)/2;De=Tt,je=Tt}var nt;Ye?Je<(nt=ze-(x?Ct:Ct.b))&&nt<ze&&(Je=nt):Je<(nt=Je+(x?Ct:Ct.t))&&nt<ze&&(ze=nt)}var Qe=n(De,je,Je,ze,Ue,{isHorizontal:!1,constrained:!0,angle:0,anchor:et,leftToRight:mt});return Qe.fontSize=Oe.fontSize,Qe.targetX=J(Qe.targetX),Qe.targetY=re(Qe.targetY),isNaN(Qe.targetX)||isNaN(Qe.targetY)?{}:(De!==je&&Je!==ze&&t(s.type,Qe,h),{scale:Qe.scale,rotate:Qe.rotate,textX:Qe.textX,textY:Qe.textY,anchorX:Qe.anchorX,anchorY:Qe.anchorY,targetX:Qe.targetX,targetY:Qe.targetY})},Ee=function(Se,Oe){for(var De,je=0,Je=Se;!De&&je<I;)je++,(Je=Je.parent)?De=U(Je,Oe):je=I;return De||{}},fe=function(Se,Oe,De,je,Je){var ze,Ue=U(Se,Oe);if(Ue)ze=Ue;else if(Oe)ze=K;else if(W)if(Se.parent){var Ge=N||De;Ge&&!Oe?ze=G(Se,Ge,je):(ze={},y.extendFlat(ze,Ee(Se,Oe)))}else ze=y.extendFlat({},Se),x&&(Je.orientation==="h"?Je.flipX?ze.x0=Se.x1:ze.x1=0:Je.flipY?ze.y0=Se.y1:ze.y1=0);else ze={};return g(ze,{x0:Se.x0,x1:Se.x1,y0:Se.y0,y1:Se.y1})},ge=function(Se,Oe,De,je){var Je=U(Se,Oe),ze={},Ue=ee(Se,Oe,De,je);y.extendFlat(ze,{transform:we({x0:Ue.x0,x1:Ue.x1,y0:Ue.y0,y1:Ue.y1,textBB:Se.textBB,_text:Se._text},{isHeader:b.isHeader(Se,s)})}),Je?ze=Je:Se.parent&&y.extendFlat(ze,Ee(Se,Oe));var Ge=Se.transform;return Se.x0!==Se.x1&&Se.y0!==Se.y1&&t(s.type,Ge,h),g(ze,{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}})},ke=function(Se,Oe,De,je,Je){var ze=je[0],Ue=je[1];A?Se.exit().transition().each(function(){var Ge=m.select(this);Ge.select("path.surface").transition().attrTween("d",function(Ye){var et=function(ct,mt,Ct,Tt){var nt,Qe=U(ct,mt);if(mt)nt=K;else{var Et=U(T,mt);nt=Et?G(ct,Et,Tt):{}}return g(Qe,nt)}(Ye,Oe,0,[ze,Ue]);return function(ct){return Je(et(ct))}}),Ge.select("g.slicetext").attr("opacity",0)}).remove():Se.exit().remove()},be=function(Se){var Oe=Se.transform;
1356return Se.x0!==Se.x1&&Se.y0!==Se.y1&&t(s.type,Oe,h),y.getTextTransform({textX:Oe.textX,textY:Oe.textY,anchorX:Oe.anchorX,anchorY:Oe.anchorY,targetX:Oe.targetX,targetY:Oe.targetY,scale:Oe.scale,rotate:Oe.rotate})};A&&(w.each(function(Se){Q[d(Se)]={x0:Se.x0,x1:Se.x1,y0:Se.y0,y1:Se.y1},Se.transform&&(Q[d(Se)].transform={textX:Se.transform.textX,textY:Se.transform.textY,anchorX:Se.transform.anchorX,anchorY:Se.transform.anchorY,targetX:Se.transform.targetX,targetY:Se.transform.targetY,scale:Se.transform.scale,rotate:Se.transform.rotate})}),k.each(function(Se){R[d(Se)]={x0:Se.x0,x1:Se.x1,y0:Se.y0,y1:Se.y1},Se.transform&&(R[d(Se)].transform={textX:Se.transform.textX,textY:Se.transform.textY,anchorX:Se.transform.anchorX,anchorY:Se.transform.anchorY,targetX:Se.transform.targetX,targetY:Se.transform.targetY,scale:Se.transform.scale,rotate:Se.transform.rotate}),!W&&b.isEntry(Se)&&(W=Se)})),N=o(l,a,T,k,{width:E,height:D,viewX:J,viewY:re,pathSlice:function(Se){var Oe=J(Se.x0),De=J(Se.x1),je=re(Se.y0),Je=re(Se.y1),ze=De-Oe,Ue=Je-je;return!ze||!Ue?"":"M"+ce(Oe,je+0)+"L"+ce(De-0,je)+"L"+ce(De,Je-0)+"L"+ce(Oe+0,Je)+"Z"},toMoveInsideSlice:we,prevEntry:W,makeUpdateSliceInterpolator:fe,makeUpdateTextInterpolator:ge,handleSlicesExit:ke,hasTransition:A,strTransform:be}),s.pathbar.visible?r(l,a,T,w,{barDifY:Z,width:F,height:H,viewX:oe,viewY:pe,pathSlice:function(Se){var Oe=oe(Math.max(Math.min(Se.x0,Se.x0),0)),De=oe(Math.min(Math.max(Se.x1,Se.x1),F)),je=pe(Se.y0),Je=pe(Se.y1),ze=H/2,Ue={},Ge={};Ue.x=Oe,Ge.x=De,Ue.y=Ge.y=(je+Je)/2;var Ye={x:Oe,y:je},et={x:De,y:je},ct={x:De,y:Je},mt={x:Oe,y:Je};return _e===">"?(Ye.x-=ze,et.x-=ze,ct.x-=ze,mt.x-=ze):_e==="/"?(ct.x-=ze,mt.x-=ze,Ue.x-=ze/2,Ge.x-=ze/2):_e==="\\"?(Ye.x-=ze,et.x-=ze,Ue.x-=ze/2,Ge.x-=ze/2):_e==="<"&&(Ue.x-=ze,Ge.x-=ze),xe(Ye),xe(mt),xe(Ue),xe(et),xe(ct),xe(Ge),"M"+ce(Ye.x,Ye.y)+"L"+ce(et.x,et.y)+"L"+ce(Ge.x,Ge.y)+"L"+ce(ct.x,ct.y)+"L"+ce(mt.x,mt.y)+"L"+ce(Ue.x,Ue.y)+"Z"},toMoveInsideSlice:we,makeUpdateSliceInterpolator:fe,makeUpdateTextInterpolator:ge,handleSlicesExit:ke,hasTransition:A,strTransform:be}):w.remove()}},{"../../lib":503,"../bar/constants":650,"../bar/plot":659,"../bar/uniform_text":664,"../sunburst/helpers":1055,"./constants":1078,"./draw_ancestors":1081,"@plotly/d3":58,"d3-interpolate":116}],1090:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/color"),b=v("../../lib"),y=v("../sunburst/helpers"),e=v("../bar/uniform_text").resizeText;function n(t,i,r,d){var l,a,u=(d||{}).hovered,f=i.data.data,o=f.i,h=f.color,p=y.isHierarchyRoot(i),s=1;if(u)l=r._hovered.marker.line.color,a=r._hovered.marker.line.width;else if(p&&h===r.root.color)s=100,l="rgba(0,0,0,0)",a=0;else if(l=b.castOption(r,o,"marker.line.color")||g.defaultLine,a=b.castOption(r,o,"marker.line.width")||0,!r._hasColorscale&&!i.onPathbar){var x=r.marker.depthfade;if(x){var c,T=g.combine(g.addOpacity(r._backgroundColor,.75),h);if(x===!0){var _=y.getMaxDepth(r);c=isFinite(_)?y.isLeaf(i)?0:r._maxVisibleLayers-(i.data.depth-r._entryDepth):i.data.height+1}else c=i.data.depth-r._entryDepth,r._atRootLevel||c++;if(c>0)for(var w=0;w<c;w++){var k=.5*w/c;h=g.combine(g.addOpacity(T,k),h)}}}t.style("stroke-width",a).call(g.fill,h).call(g.stroke,l).style("opacity",s)}$.exports={style:function(t){var i=t._fullLayout._treemaplayer.selectAll(".trace");e(t,i,"treemap"),i.each(function(r){var d=m.select(this),l=r[0].trace;d.style("opacity",l.opacity),d.selectAll("path.surface").each(function(a){m.select(this).call(n,a,l,{hovered:!1})})})},styleOne:n}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"../sunburst/helpers":1055,"@plotly/d3":58}],1091:[function(v,$,te){var m=v("../box/attributes"),g=v("../../lib/extend").extendFlat,b=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat;$.exports={y:m.y,x:m.x,x0:m.x0,y0:m.y0,xhoverformat:b("x"),yhoverformat:b("y"),name:g({},m.name,{}),orientation:g({},m.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:m.fillcolor,points:g({},m.boxpoints,{}),jitter:g({},m.jitter,{}),pointpos:g({},m.pointpos,{}),width:g({},m.width,{}),marker:m.marker,text:m.text,hovertext:m.hovertext,hovertemplate:m.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:m.offsetgroup,alignmentgroup:m.alignmentgroup,selected:m.selected,unselected:m.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}
1356},{"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../box/attributes":673}],1092:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("../box/calc"),y=v("./helpers"),e=v("../../constants/numerical").BADNUM;function n(i,r,d){var l=r.max-r.min;if(!l)return i.bandwidth?i.bandwidth:0;if(i.bandwidth)return Math.max(i.bandwidth,l/1e4);var a=d.length,u=m.stdev(d,a-1,r.mean);return Math.max(function(f,o,h){return 1.059*Math.min(o,h/1.349)*Math.pow(f,-.2)}(a,u,r.q3-r.q1),l/100)}function t(i,r,d,l){var a,u=i.spanmode,f=i.span||[],o=[r.min,r.max],h=[r.min-2*l,r.max+2*l];function p(x){var c=f[x],T=d.type==="multicategory"?d.r2c(c):d.d2c(c,0,i[r.valLetter+"calendar"]);return T===e?h[x]:T}var s={type:"linear",range:a=u==="soft"?h:u==="hard"?o:[p(0),p(1)]};return g.setConvert(s),s.cleanRange(),a}$.exports=function(i,r){var d=b(i,r);if(d[0].t.empty)return d;for(var l=i._fullLayout,a=g.getFromId(i,r[r.orientation==="h"?"xaxis":"yaxis"]),u=1/0,f=-1/0,o=0,h=0,p=0;p<d.length;p++){var s=d[p],x=s.pts.map(y.extractVal),c=s.bandwidth=n(r,s,x),T=s.span=t(r,s,a,c);if(s.min===s.max&&c===0)T=s.span=[s.min,s.max],s.density=[{v:1,t:T[0]}],s.bandwidth=c,o=Math.max(o,1);else{var _=T[1]-T[0],w=Math.ceil(_/(c/3)),k=_/w;if(!isFinite(k)||!isFinite(w))return m.error("Something went wrong with computing the violin span"),d[0].t.empty=!0,d;var L=y.makeKDE(s,r,x);s.density=new Array(w);for(var A=0,I=T[0];I<T[1]+k/2;A++,I+=k){var P=L(I);s.density[A]={v:P,t:I},o=Math.max(o,P)}}h=Math.max(h,x.length),u=Math.min(u,T[0]),f=Math.max(f,T[1])}var S=g.findExtremes(a,[u,f],{padded:!0});if(r._extremes[a._id]=S,r.width)d[0].t.maxKDE=o;else{var E=l._violinScaleGroupStats,D=r.scalegroup,F=E[D];F?(F.maxKDE=Math.max(F.maxKDE,o),F.maxCount=Math.max(F.maxCount,h)):E[D]={maxKDE:o,maxCount:h}}return d[0].t.labels.kde=m._(i,"kde:"),d}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../box/calc":674,"./helpers":1095}],1093:[function(v,$,te){var m=v("../box/cross_trace_calc").setPositionOffset,g=["v","h"];$.exports=function(b,y){for(var e=b.calcdata,n=y.xaxis,t=y.yaxis,i=0;i<g.length;i++){for(var r=g[i],d=r==="h"?t:n,l=[],a=0;a<e.length;a++){var u=e[a],f=u[0].t,o=u[0].trace;o.visible!==!0||o.type!=="violin"||f.empty||o.orientation!==r||o.xaxis!==n._id||o.yaxis!==t._id||l.push(a)}m("violin",b,l,d)}}},{"../box/cross_trace_calc":675}],1094:[function(v,$,te){var m=v("../../lib"),g=v("../../components/color"),b=v("../box/defaults"),y=v("./attributes");$.exports=function(e,n,t,i){function r(_,w){return m.coerce(e,n,y,_,w)}function d(_,w){return m.coerce2(e,n,y,_,w)}if(b.handleSampleDefaults(e,n,r,i),n.visible!==!1){r("bandwidth"),r("side"),r("width")||(r("scalegroup",n.name),r("scalemode"));var l,a=r("span");Array.isArray(a)&&(l="manual"),r("spanmode",l);var u=r("line.color",(e.marker||{}).color||t),f=r("line.width"),o=r("fillcolor",g.addOpacity(n.line.color,.5));b.handlePointsDefaults(e,n,r,{prefix:""});var h=d("box.width"),p=d("box.fillcolor",o),s=d("box.line.color",u),x=d("box.line.width",f);r("box.visible",Boolean(h||p||s||x))||(n.box={visible:!1});var c=d("meanline.color",u),T=d("meanline.width",f);r("meanline.visible",Boolean(c||T))||(n.meanline={visible:!1})}}},{"../../components/color":366,"../../lib":503,"../box/defaults":676,"./attributes":1091}],1095:[function(v,$,te){var m=v("../../lib"),g=function(b){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*b*b)};te.makeKDE=function(b,y,e){var n=e.length,t=g,i=b.bandwidth,r=1/(n*i);return function(d){for(var l=0,a=0;a<n;a++)l+=t((d-e[a])/i);return r*l}},te.getPositionOnKdePath=function(b,y,e){var n,t;y.orientation==="h"?(n="y",t="x"):(n="x",t="y");var i=m.findPointOnPath(b.path,e,t,{pathLength:b.pathLength}),r=b.posCenterPx,d=i[n];return[d,y.side==="both"?2*r-d:r]},te.getKdeValue=function(b,y,e){var n=b.pts.map(te.extractVal);return te.makeKDE(b,y,n)(e)/b.posDensityScale},te.extractVal=function(b){return b.v}},{"../../lib":503}],1096:[function(v,$,te){var m=v("../../lib"),g=v("../../plots/cartesian/axes"),b=v("../box/hover"),y=v("./helpers");$.exports=function(e,n,t,i,r){r||(r={});var d,l,a=r.hoverLayer,u=e.cd,f=u[0].trace,o=f.hoveron,h=o.indexOf("violins")!==-1,p=o.indexOf("kde")!==-1,s=[];if(h||p){var x=b.hoverOnBoxes(e,n,t,i);if(p&&x.length>0){var c,T,_,w,k,L=e.xa,A=e.ya;f.orientation==="h"?(k=n,c="y",_=A,T="x",w=L):(k=t,c="x",_=L,T="y",w=A);var I=u[e.index];if(k>=I.span[0]&&k<=I.span[1]){var P=m.extendFlat({},e),S=w.c2p(k,!0),E=y.getKdeValue(I,f,k),D=y.getPositionOnKdePath(I,f,S),F=_._offset,H=_._length;P[c+"0"]=D[0],P[c+"1"]=D[1],P[T+"0"]=P[T+"1"]=S,P[T+"Label"]=T+": "+g.hoverLabelText(w,k,f[T+"hoverformat"])+", "+u[0].t.labels.kde+" "+E.toFixed(3),P.spikeDistance=x[0].spikeDistance;var V=c+"Spike";P[V]=x[0][V],x[0].spikeDistance=void 0,x[0][V]=void 0,P.hovertemplate=!1,s.push(P),(l={stroke:e.color})[c+"1"]=m.constrain(F+D[0],F,F+H),l[c+"2"]=m.constrain(F+D[1],F,F+H),l[T+"1"]=l[T+"2"]=w._offset+S}}h&&(s=s.concat(x))}o.indexOf("points")!==-1&&(d=b.hoverOnPoints(e,n,t));var Z=a.selectAll(".violinline-"+f.uid).data(l?[0]:[]);return Z.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),Z.exit().remove(),Z.attr(l),i==="closest"?d?[d]:s:(d&&s.push(d),s)}},{"../../lib":503,"../../plots/cartesian/axes":554,"../box/hover":678,"./helpers":1095}],1097:[function(v,$,te){$.exports={attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults"),crossTraceDefaults:v("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc"),crossTraceCalc:v("./cross_trace_calc"),plot:v("./plot"),style:v("./style"),styleOnSelect:v("../scatter/style").styleOnSelect,hoverPoints:v("./hover"),selectPoints:v("../box/select"),moduleType:"trace",name:"violin",basePlotModule:v("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../box/defaults":676,"../box/select":683,"../scatter/style":951,"./attributes":1091,"./calc":1092,"./cross_trace_calc":1093,"./defaults":1094,"./hover":1096,"./layout_attributes":1098,"./layout_defaults":1099,"./plot":1100,"./style":1101}],1098:[function(v,$,te){var m=v("../box/layout_attributes"),g=v("../../lib").extendFlat;$.exports={violinmode:g({},m.boxmode,{}),violingap:g({},m.boxgap,{}),violingroupgap:g({},m.boxgroupgap,{})}},{"../../lib":503,"../box/layout_attributes":680}],1099:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes"),b=v("../box/layout_defaults");$.exports=function(y,e,n){b._supply(y,e,n,function(t,i){return m.coerce(y,e,g,t,i)},"violin")}},{"../../lib":503,"../box/layout_defaults":681,"./layout_attributes":1098}],1100:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../components/drawing"),y=v("../box/plot"),e=v("../scatter/line_points"),n=v("./helpers");$.exports=function(t,i,r,d){var l=t._fullLayout,a=i.xaxis,u=i.yaxis;function f(o){var h=e(o,{xaxis:a,yaxis:u,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return b.smoothopen(h[0],1)}g.makeTraceGroups(d,r,"trace violins").each(function(o){var h=m.select(this),p=o[0],s=p.t,x=p.trace;if(x.visible!==!0||s.empty)h.remove();else{var c=s.bPos,T=s.bdPos,_=i[s.valLetter+"axis"],w=i[s.posLetter+"axis"],k=x.side==="both",L=k||x.side==="positive",A=k||x.side==="negative",I=h.selectAll("path.violin").data(g.identity);I.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),I.exit().remove(),I.each(function(Z){var K,G,W,Q,R,N,U,ee,j=m.select(this),X=Z.density,J=X.length,re=w.c2l(Z.pos+c,!0),ne=w.l2p(re);if(x.width)K=s.maxKDE/T;else{var se=l._violinScaleGroupStats[x.scalegroup];K=x.scalemode==="count"?se.maxKDE/T*(se.maxCount/Z.pts.length):se.maxKDE/T}if(L){for(U=new Array(J),R=0;R<J;R++)(ee=U[R]={})[s.posLetter]=re+X[R].v/K,ee[s.valLetter]=_.c2l(X[R].t,!0);G=f(U)}if(A){for(U=new Array(J),N=0,R=J-1;N<J;N++,R--)(ee=U[N]={})[s.posLetter]=re-X[R].v/K,ee[s.valLetter]=_.c2l(X[R].t,!0);
1356W=f(U)}if(k)Q=G+"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()),Q=L?"M"+oe+"L"+G.substr(1)+"L"+pe:"M"+pe+"L"+W.substr(1)+"L"+oe}j.attr("d",Q),Z.posCenterPx=ne,Z.posDensityScale=K*T,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=T*F,S=0):L?(P=[0,T*F/2],S=H*{x:1,y:-1}[s.posLetter]):(P=[T*F/2,0],S=H*{x:-1,y:1}[s.posLetter]),y.plotBoxAndWhiskers(h,{pos:w,val:_},x,{bPos:c,bdPos:P,bPosPxOffset:S}),y.plotBoxMean(h,{pos:w,val:_},x,{bPos:c,bdPos:P,bPosPxOffset:S}),!x.box.visible&&x.meanline.visible&&(E=g.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),G=n.getPositionOnKdePath(Z,x,K);m.select(this).attr("d",x.orientation==="h"?"M"+K+","+G[0]+"V"+G[1]:"M"+G[0]+","+K+"H"+G[1])}),y.plotPoints(h,{x:a,y:u},x,s)}})}},{"../../components/drawing":388,"../../lib":503,"../box/plot":682,"../scatter/line_points":941,"./helpers":1095,"@plotly/d3":58}],1101:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/color"),b=v("../scatter/style").stylePoints;$.exports=function(y){var e=m.select(y).selectAll("g.trace.violins");e.style("opacity",function(n){return n[0].trace.opacity}),e.each(function(n){var t=n[0].trace,i=m.select(this),r=t.box||{},d=r.line||{},l=t.meanline||{},a=l.width;i.selectAll("path.violin").style("stroke-width",t.line.width+"px").call(g.stroke,t.line.color).call(g.fill,t.fillcolor),i.selectAll("path.box").style("stroke-width",d.width+"px").call(g.stroke,d.color).call(g.fill,r.fillcolor);var u={"stroke-width":a+"px","stroke-dasharray":2*a+"px,"+a+"px"};i.selectAll("path.mean").style(u).call(g.stroke,l.color),i.selectAll("path.meanline").style(u).call(g.stroke,l.color),b(i,t,y)})}},{"../../components/color":366,"../scatter/style":951,"@plotly/d3":58}],1102:[function(v,$,te){var m=v("../../components/colorscale/attributes"),g=v("../isosurface/attributes"),b=v("../surface/attributes"),y=v("../../plots/attributes"),e=v("../../lib/extend").extendFlat,n=v("../../plot_api/edit_types").overrideAll,t=$.exports=n(e({x:g.x,y:g.y,z:g.z,value:g.value,isomin:g.isomin,isomax:g.isomax,surface:g.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:g.slices,caps:g.caps,text:g.text,hovertext:g.hovertext,xhoverformat:g.xhoverformat,yhoverformat:g.yhoverformat,zhoverformat:g.zhoverformat,valuehoverformat:g.valuehoverformat,hovertemplate:g.hovertemplate},m("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:g.colorbar,opacity:g.opacity,opacityscale:b.opacityscale,lightposition:g.lightposition,lighting:g.lighting,flatshading:g.flatshading,contour:g.contour,hoverinfo:e({},y.hoverinfo),showlegend:e({},y.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":1061}],1103:[function(v,$,te){var m=v("../../../stackgl_modules").gl_mesh3d,g=v("../../lib/gl_format_color").parseColorScale,b=v("../../lib/str2rgbarray"),y=v("../../components/colorscale").extractOpts,e=v("../../plots/gl3d/zip3"),n=v("../isosurface/convert").findNearestOnAxis,t=v("../isosurface/convert").generateIsoMeshes;function i(d,l,a){this.scene=d,this.uid=a,this.mesh=l,this.name="",this.data=null,this.showContour=!1}var r=i.prototype;r.handlePick=function(d){if(d.object===this.mesh){var l=d.data.index,a=this.data._meshX[l],u=this.data._meshY[l],f=this.data._meshZ[l],o=this.data._Ys.length,h=this.data._Zs.length,p=n(a,this.data._Xs).id,s=n(u,this.data._Ys).id,x=n(f,this.data._Zs).id,c=d.index=x+h*s+h*o*p;d.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var T=this.data.hovertext||this.data.text;return Array.isArray(T)&&T[c]!==void 0?d.textLabel=T[c]:T&&(d.textLabel=T),!0}},r.update=function(d){var l=this.scene,a=l.fullSceneLayout;function u(h,p,s,x){return p.map(function(c){return h.d2l(c,0,x)*s})}this.data=t(d);var f={positions:e(u(a.xaxis,d._meshX,l.dataScale[0],d.xcalendar),u(a.yaxis,d._meshY,l.dataScale[1],d.ycalendar),u(a.zaxis,d._meshZ,l.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},o=y(d);f.vertexIntensity=d._meshIntensity,f.vertexIntensityBounds=[o.min,o.max],f.colormap=g(d),this.mesh.update(f)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},$.exports=function(d,l){var a=d.glplot.gl,u=m({gl:a}),f=new i(d,u,l.uid);return u._trace=f,f.update(l),d.glplot.add(u),f}},{"../../../stackgl_modules":1124,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609,"../isosurface/convert":864}],1104:[function(v,$,te){var m=v("../../lib"),g=v("./attributes"),b=v("../isosurface/defaults").supplyIsoDefaults,y=v("../surface/defaults").opacityscaleDefaults;$.exports=function(e,n,t,i){function r(d,l){return m.coerce(e,n,g,d,l)}b(e,n,t,i,r),y(e,n,i,r)}},{"../../lib":503,"../isosurface/defaults":865,"../surface/defaults":1064,"./attributes":1102}],1105:[function(v,$,te){$.exports={attributes:v("./attributes"),supplyDefaults:v("./defaults"),calc:v("../isosurface/calc"),colorbar:{min:"cmin",max:"cmax"},plot:v("./convert"),moduleType:"trace",name:"volume",basePlotModule:v("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"../isosurface/calc":863,"./attributes":1102,"./convert":1103,"./defaults":1104}],1106:[function(v,$,te){var m=v("../bar/attributes"),g=v("../scatter/attributes").line,b=v("../../plots/attributes"),y=v("../../plots/cartesian/axis_format_attributes").axisHoverFormat,e=v("../../plots/template_attributes").hovertemplateAttrs,n=v("../../plots/template_attributes").texttemplateAttrs,t=v("./constants"),i=v("../../lib/extend").extendFlat,r=v("../../components/color");function d(l){return{marker:{color:i({},m.marker.color,{arrayOk:!1,editType:"style"}),line:{color:i({},m.marker.line.color,{arrayOk:!1,editType:"style"}),width:i({},m.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}$.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:m.x,x0:m.x0,dx:m.dx,y:m.y,y0:m.y0,dy:m.dy,xperiod:m.xperiod,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:y("x"),yhoverformat:y("y"),hovertext:m.hovertext,hovertemplate:e({},{keys:t.eventDataKeys}),hoverinfo:i({},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:m.text,textposition:m.textposition,insidetextanchor:m.insidetextanchor,textangle:m.textangle,textfont:m.textfont,insidetextfont:m.insidetextfont,outsidetextfont:m.outsidetextfont,constraintext:m.constraintext,cliponaxis:m.cliponaxis,orientation:m.orientation,offset:m.offset,width:m.width,increasing:d(),decreasing:d(),totals:d(),connector:{line:{color:i({},g.color,{dflt:r.defaultLine}),width:i({},g.width,{editType:"plot"}),dash:g.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},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":927,"./constants":1108}],1107:[function(v,$,te){var m=v("../../plots/cartesian/axes"),g=v("../../plots/cartesian/align_period"),b=v("../../lib").mergeArray,y=v("../scatter/calc_selection"),e=v("../../constants/numerical").BADNUM;function n(i){return i==="a"||i==="absolute"}function t(i){return i==="t"||i==="total"}$.exports=function(i,r){var d,l,a,u,f,o,h=m.getFromId(i,r.xaxis||"x"),p=m.getFromId(i,r.yaxis||"y");r.orientation==="h"?(d=h.makeCalcdata(r,"x"),a=p.makeCalcdata(r,"y"),u=g(r,p,"y",a),f=!!r.yperiodalignment,o="y"):(d=p.makeCalcdata(r,"y"),a=h.makeCalcdata(r,"x"),u=g(r,h,"x",a),f=!!r.xperiodalignment,o="x"),l=u.vals;for(var s,x=Math.min(l.length,d.length),c=new Array(x),T=0,_=!1,w=0;w<x;w++){var k=d[w]||0,L=!1;(d[w]!==e||t(r.measure[w])||n(r.measure[w]))&&w+1<x&&(d[w+1]!==e||t(r.measure[w+1])||n(r.measure[w+1]))&&
1356(L=!0);var A=c[w]={i:w,p:l[w],s:k,rawS:k,cNext:L};n(r.measure[w])?(T=A.s,A.isSum=!0,A.dir="totals",A.s=T):t(r.measure[w])?(A.isSum=!0,A.dir="totals",A.s=T):(A.isSum=!1,A.dir=A.rawS<0?"decreasing":"increasing",s=A.s,A.s=T+s,T+=s),A.dir==="totals"&&(_=!0),f&&(c[w].orig_p=a[w],c[w][o+"End"]=u.ends[w],c[w][o+"Start"]=u.starts[w]),r.ids&&(A.id=String(r.ids[w])),A.v=(r.base||0)+T}return c.length&&(c[0].hasTotals=_),b(r.text,c,"tx"),b(r.hovertext,c,"htx"),y(c,r),c}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":929}],1108:[function(v,$,te){$.exports={eventDataKeys:["initial","delta","final"]}},{}],1109:[function(v,$,te){var m=v("../bar/cross_trace_calc").setGroupPositions;$.exports=function(g,b){var y,e,n=g._fullLayout,t=g._fullData,i=g.calcdata,r=b.xaxis,d=b.yaxis,l=[],a=[],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"&&(y=i[e],f.orientation==="h"?u.push(y):a.push(y),l.push(y))}var o={mode:n.waterfallmode,norm:n.waterfallnorm,gap:n.waterfallgap,groupgap:n.waterfallgroupgap};for(m(g,r,d,a,o),m(g,d,r,u,o),e=0;e<l.length;e++){y=l[e];for(var h=0;h<y.length;h++){var p=y[h];p.isSum===!1&&(p.s0+=h===0?0:y[h-1].s),h+1<y.length&&(y[h].nextP0=y[h+1].p0,y[h].nextS0=y[h+1].s0)}}}},{"../bar/cross_trace_calc":651}],1110:[function(v,$,te){var m=v("../../lib"),g=v("../bar/defaults").handleGroupingDefaults,b=v("../bar/defaults").handleText,y=v("../scatter/xy_defaults"),e=v("../scatter/period_defaults"),n=v("./attributes"),t=v("../../components/color"),i=v("../../constants/delta.js"),r=i.INCREASING.COLOR,d=i.DECREASING.COLOR;function l(a,u,f){a(u+".marker.color",f),a(u+".marker.line.color",t.defaultLine),a(u+".marker.line.width")}$.exports={supplyDefaults:function(a,u,f,o){function h(s,x){return m.coerce(a,u,n,s,x)}if(y(a,u,o,h)){e(a,u,o,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(a,u,o,h,p,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u.textposition!=="none"&&(h("texttemplate"),u.texttemplate||h("textinfo")),l(h,"increasing",r),l(h,"decreasing",d),l(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(a,u){var f,o;function h(s){return m.coerce(o._input,o,n,s)}if(u.waterfallmode==="group")for(var p=0;p<a.length;p++)f=(o=a[p])._input,g(f,o,u,h)}}},{"../../components/color":366,"../../constants/delta.js":473,"../../lib":503,"../bar/defaults":652,"../scatter/period_defaults":947,"../scatter/xy_defaults":954,"./attributes":1106}],1111:[function(v,$,te){$.exports=function(m,g){return m.x="xVal"in g?g.xVal:g.x,m.y="yVal"in g?g.yVal:g.y,"initial"in g&&(m.initial=g.initial),"delta"in g&&(m.delta=g.delta),"final"in g&&(m.final=g.final),g.xa&&(m.xaxis=g.xa),g.ya&&(m.yaxis=g.ya),m}},{}],1112:[function(v,$,te){var m=v("../../plots/cartesian/axes").hoverLabelText,g=v("../../components/color").opacity,b=v("../bar/hover").hoverOnBars,y=v("../../constants/delta.js"),e=y.INCREASING.SYMBOL,n=y.DECREASING.SYMBOL;$.exports=function(t,i,r,d,l){var a=b(t,i,r,d,l);if(a){var u=a.cd,f=u[0].trace,o=f.orientation==="h",h=o?"x":"y",p=o?t.xa:t.ya,s=u[a.index],x=s.isSum?s.b+s.s:s.rawS;if(!s.isSum){a.initial=s.b+s.s-x,a.delta=x,a.final=a.initial+a.delta;var c=A(Math.abs(a.delta));a.deltaLabel=x<0?"("+c+")":c,a.finalLabel=A(a.final),a.initialLabel=A(a.initial)}var T=s.hi||f.hoverinfo,_=[];
1356if(T&&T!=="none"&&T!=="skip"){var w=T==="all",k=T.split("+"),L=function(I){return w||k.indexOf(I)!==-1};s.isSum||(!L("final")||L(o?"x":"y")||_.push(a.finalLabel),L("delta")&&(x<0?_.push(a.deltaLabel+" "+n):_.push(a.deltaLabel+" "+e)),L("initial")&&_.push("Initial: "+a.initialLabel))}return _.length&&(a.extraText=_.join("<br>")),a.color=function(I,P){var S=I[P.dir].marker,E=S.color,D=S.line.color,F=S.line.width;if(g(E))return E;if(g(D)&&F)return D}(f,s),[a]}function A(I){return m(p,I,f[h+"hoverformat"])}}},{"../../components/color":366,"../../constants/delta.js":473,"../../plots/cartesian/axes":554,"../bar/hover":655}],1113:[function(v,$,te){$.exports={attributes:v("./attributes"),layoutAttributes:v("./layout_attributes"),supplyDefaults:v("./defaults").supplyDefaults,crossTraceDefaults:v("./defaults").crossTraceDefaults,supplyLayoutDefaults:v("./layout_defaults"),calc:v("./calc"),crossTraceCalc:v("./cross_trace_calc"),plot:v("./plot"),style:v("./style").style,hoverPoints:v("./hover"),eventData:v("./event_data"),selectPoints:v("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:v("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":1106,"./calc":1107,"./cross_trace_calc":1109,"./defaults":1110,"./event_data":1111,"./hover":1112,"./layout_attributes":1114,"./layout_defaults":1115,"./plot":1116,"./style":1117}],1114:[function(v,$,te){$.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"}}},{}],1115:[function(v,$,te){var m=v("../../lib"),g=v("./layout_attributes");$.exports=function(b,y,e){var n=!1;function t(d,l){return m.coerce(b,y,g,d,l)}for(var i=0;i<e.length;i++){var r=e[i];if(r.visible&&r.type==="waterfall"){n=!0;break}}n&&(t("waterfallmode"),t("waterfallgap",.2),t("waterfallgroupgap"))}},{"../../lib":503,"./layout_attributes":1114}],1116:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../lib"),b=v("../../components/drawing"),y=v("../../constants/numerical").BADNUM,e=v("../bar/plot"),n=v("../bar/uniform_text").clearMinTextSize;$.exports=function(t,i,r,d){var l=t._fullLayout;n("waterfall",l),e.plot(t,i,r,d,{mode:l.waterfallmode,norm:l.waterfallmode,gap:l.waterfallgap,groupgap:l.waterfallgroupgap}),function(a,u,f,o){var h=u.xaxis,p=u.yaxis;g.makeTraceGroups(o,f,"trace bars").each(function(s){var x=m.select(this),c=s[0].trace,T=g.ensureSingle(x,"g","lines");if(c.connector&&c.connector.visible){var _=c.orientation==="h",w=c.connector.mode,k=T.selectAll("g.line").data(g.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=[],G=[],W=Z?H:V,Q=Z?V:H;return K[0]=W.c2p(F.s0,!0),G[0]=Q.c2p(F.p0,!0),K[1]=W.c2p(F.s1,!0),G[1]=Q.c2p(F.p1,!0),K[2]=W.c2p(F.nextS0,!0),G[2]=Q.c2p(F.nextP0,!0),Z?[K,G]:[G,K]}(A,h,p,_),S=P[0],E=P[1],D="";S[0]!==y&&E[0]!==y&&S[1]!==y&&E[1]!==y&&(w==="spanning"&&!A.isSum&&I>0&&(D+=_?"M"+S[0]+","+E[1]+"V"+E[0]:"M"+S[1]+","+E[0]+"H"+S[0]),w!=="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]!==y&&E[2]!==y&&(D+=_?"M"+S[1]+","+E[1]+"V"+E[2]:"M"+S[1]+","+E[1]+"H"+S[2])),D===""&&(D="M0,
13560Z"),g.ensureSingle(m.select(this),"path").attr("d",D).call(b.setClipUrl,u.layerClipId,a)}})}else T.remove()})}(t,i,r,d)}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../bar/plot":659,"../bar/uniform_text":664,"@plotly/d3":58}],1117:[function(v,$,te){var m=v("@plotly/d3"),g=v("../../components/drawing"),b=v("../../components/color"),y=v("../../constants/interactions").DESELECTDIM,e=v("../bar/style"),n=v("../bar/uniform_text").resizeText,t=e.styleTextPoints;$.exports={style:function(i,r,d){var l=d||m.select(i).selectAll("g.waterfalllayer").selectAll("g.trace");n(i,l,"waterfall"),l.style("opacity",function(a){return a[0].trace.opacity}),l.each(function(a){var u=m.select(this),f=a[0].trace;u.selectAll(".point > path").each(function(o){if(!o.isBlank){var h=f[o.dir].marker;m.select(this).call(b.fill,h.color).call(b.stroke,h.line.color).call(g.dashLine,h.line.dash,h.line.width).style("opacity",f.selectedpoints&&!o.selected?y:1)}}),t(u,f,i),u.selectAll(".lines").each(function(){var o=f.connector.line;g.lineGroupStyle(m.select(this).selectAll("path"),o.width,o.color,o.dash)})})}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],1118:[function(v,$,te){var m=v("../plots/cartesian/axes"),g=v("../lib"),b=v("../plot_api/plot_schema"),y=v("./helpers").pointsAccessorFunction,e=v("../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 i(a,u,f,o){if(o.enabled){for(var h=o.target,p=g.nestedProperty(u,h),s=p.get(),x=function(_,w){var k=_.func,L=w.d2c,A=w.c2d;switch(k){case"count":return r;case"first":return d;case"last":return l;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(g.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}}}(o,m.getDataConversions(a,u,h,s)),c=new Array(f.length),T=0;T<f.length;T++)c[T]=x(s,f[T]);p.set(c),o.func==="count"&&g.pushUnique(u._arrayAttrs,h)}}function r(a,u){return u.length}function d(a,u){return a[u[0]]}function l(a,u){return a[u[u.length-1]]}te.supplyDefaults=function(a,u){var f,o={};function h(A,I){return g.coerce(a,o,n,A,I)}if(!h("enabled"))return o;var p=b.findArrayAttributes(u),s={};for(f=0;f<p.length;f++)s[p[f]]=1;var x=h("groups");
1356if(!Array.isArray(x)){if(!s[x])return o.enabled=!1,o;s[x]=0}var c,T=a.aggregations||[],_=o.aggregations=new Array(T.length);function w(A,I){return g.coerce(T[f],c,t,A,I)}for(f=0;f<T.length;f++){c={_index:f};var k=w("target"),L=w("func");w("enabled")&&k&&(s[k]||L==="count"&&s[k]===void 0)?(L==="stddev"&&w("funcmode"),s[k]=0,_[f]=c):_[f]={enabled:!1,_index:f}}for(f=0;f<p.length;f++)s[p[f]]&&_.push({target:p[f],func:t.func.dflt,enabled:!0,_index:-1});return o},te.calcTransform=function(a,u,f){if(f.enabled){var o=f.groups,h=g.getTargetArray(u,{target:o});if(h){var p,s,x,c,T={},_={},w=[],k=y(u.transforms,f),L=h.length;for(u._length&&(L=Math.min(L,u._length)),p=0;p<L;p++)(x=T[s=h[p]])===void 0?(T[s]=w.length,c=[p],w.push(c),_[T[s]]=k(p)):(w[x].push(p),_[T[s]]=(_[T[s]]||[]).concat(k(p)));f._indexToPoints=_;var A=f.aggregations;for(p=0;p<A.length;p++)i(a,u,w,A[p]);typeof o=="string"&&i(a,u,w,{target:o,func:"first",enabled:!0}),u._length=w.length}}}},{"../constants/numerical":479,"../lib":503,"../plot_api/plot_schema":542,"../plots/cartesian/axes":554,"./helpers":1121}],1119:[function(v,$,te){var m=v("../lib"),g=v("../registry"),b=v("../plots/cartesian/axes"),y=v("./helpers").pointsAccessorFunction,e=v("../constants/filter_ops"),n=e.COMPARISON_OPS,t=e.INTERVAL_OPS,i=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(i),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 l(f,o){return m.coerce(r,d,te.attributes,f,o)}if(l("enabled")){var a=l("target");if(m.isArrayOrTypedArray(a)&&a.length===0)return d.enabled=!1,d;l("preservegaps"),l("operation"),l("value");var u=g.getComponentMethod("calendars","handleDefaults");u(r,d,"valuecalendar",null),u(r,d,"targetcalendar",null)}return d},te.calcTransform=function(r,d,l){if(l.enabled){var a=m.getTargetArray(d,l);if(a){var u=l.target,f=a.length;d._length&&(f=Math.min(f,d._length));var o=l.targetcalendar,h=d._arrayAttrs,p=l.preservegaps;if(typeof u=="string"){var s=m.nestedProperty(d,u+"calendar").get();s&&(o=s)}var x,c,T=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)},G=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(i)&&(Z=H?F.map(K):[K(F)]),D){case"=":return function(W){return G(W)===Z};case"!=":return function(W){return G(W)!==Z};case"<":return function(W){return G(W)<Z};case"<=":return function(W){return G(W)<=Z};case">":return function(W){return G(W)>Z};case">=":return function(W){return G(W)>=Z};case"[]":return function(W){var Q=G(W);return Q>=Z[0]&&Q<=Z[1]};case"()":return function(W){var Q=G(W);return Q>Z[0]&&Q<Z[1]};case"[)":return function(W){var Q=G(W);return Q>=Z[0]&&Q<Z[1]};case"(]":return function(W){var Q=G(W);return Q>Z[0]&&Q<=Z[1]};case"][":return function(W){var Q=G(W);return Q<=Z[0]||Q>=Z[1]};case")(":return function(W){var Q=G(W);return Q<Z[0]||Q>Z[1]};case"](":return function(W){var Q=G(W);return Q<=Z[0]||Q>Z[1]};case")[":return function(W){var Q=G(W);return Q<Z[0]||Q>=Z[1]};case"{}":return function(W){return Z.indexOf(G(W))!==-1};case"}{":return function(W){return Z.indexOf(G(W))===-1}}}(l,b.getDataToCoordFunc(r,d,u,a),o),_={},w={},k=0;p?(x=function(P){_[P.astr]=m.extendDeep([],P.get()),P.set(new Array(f))},c=function(P,S){var E=_[P.astr][S];P.get()[S]=E}):(x=function(P){_[P.astr]=m.extendDeep([],P.get()),P.set([])},c=function(P,S){var E=_[P.astr][S];P.get().push(E)}),I(x);for(var L=y(d.transforms,l),A=0;A<f;A++)T(a[A])?(I(c,A),w[k++]=L(A)):p&&k++;l._indexToPoints=w,d._length=k}}function I(P,S){for(var E=0;E<h.length;E++)P(m.nestedProperty(d,h[E]),S)}}},{"../constants/filter_ops":475,"../lib":503,"../plots/cartesian/axes":554,"../registry":638,"./helpers":1121}],1120:[function(v,$,te){var m=v("../lib"),g=v("../plot_api/plot_schema"),b=v("../plots/plots"),y=v("./helpers").pointsAccessorFunction;function e(n,t){var i,r,d,l,a,u,f,o,h,p,s=t.transform,x=t.transformIndex,c=n.transforms[x].groups,T=y(n.transforms,s);if(!m.isArrayOrTypedArray(c)||c.length===0)return[n];var _=m.filterUnique(c),w=new Array(_.length),k=c.length,L=g.findArrayAttributes(n),A=s.styles||[],I={};for(i=0;i<A.length;i++)I[A[i].target]=A[i].value;s.styles&&(p=m.keyedContainer(s,"styles","target","value.name"));var P={},S={};for(i=0;i<_.length;i++){P[u=_[i]]=i,S[u]=0,(f=w[i]=m.extendDeepNoArrays({},n))._group=u,f.transforms[x]._indexToPoints={};var E=null;for(p&&(E=p.get(u)),f.name=E||E===""?E:m.templateString(s.nameformat,{trace:n.name,group:u}),o=f.transforms,f.transforms=[],r=0;r<o.length;r++)f.transforms[r]=m.extendDeepNoArrays({},o[r]);for(r=0;r<L.length;r++)m.nestedProperty(f,L[r]).set([])}for(d=0;d<L.length;d++){for(l=L[d],r=0,h=[];r<_.length;r++)h[r]=m.nestedProperty(w[r],l).get();for(a=m.nestedProperty(n,l).get(),r=0;r<k;r++)h[P[c[r]]].push(a[r])}for(r=0;r<k;r++)(f=w[P[c[r]]]).transforms[x]._indexToPoints[S[c[r]]]=T(r),S[c[r]]++;for(i=0;i<_.length;i++)u=_[i],f=w[i],b.clearExpandedTraceDefaultColors(f),f=m.extendDeepNoArrays(f,I[u]||{});return w}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,i){var r,d={};function l(h,p){return m.coerce(n,d,te.attributes,h,p)}if(!l("enabled"))return d;l("groups"),l("nameformat",i._dataLength>1?"%{group} (%{trace})":"%{group}");var a=n.styles,u=d.styles=[];if(a)for(r=0;r<a.length;r++){var f=u[r]={};m.coerce(a[r],u[r],te.attributes.styles,"target");var o=m.coerce(a[r],u[r],te.attributes.styles,"value");m.isPlainObject(o)?f.value=m.extendDeep({},o):o&&delete f.value}return d},te.transform=function(n,t){var i,r,d,l=[];for(r=0;r<n.length;r++)for(i=e(n[r],t),d=0;d<i.length;d++)l.push(i[d]);return l}},{"../lib":503,"../plot_api/plot_schema":542,"../plots/plots":619,"./helpers":1121}],1121:[function(v,$,te){te.pointsAccessorFunction=function(m,g){for(var b,y,e=0;e<m.length&&(b=m[e])!==g;e++)b._indexToPoints&&b.enabled!==!1&&(y=b._indexToPoints);return y?function(n){return y[n]}:function(n){return[n]}}},{}],1122:[function(v,$,te){var m=v("../lib"),g=v("../plots/cartesian/axes"),b=v("./helpers").pointsAccessorFunction,y=v("../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(i,r){return m.coerce(e,n,te.attributes,i,r)}return t("enabled")&&(t("target"),t("order")),n},te.calcTransform=function(e,n,t){if(t.enabled){var i=m.getTargetArray(n,t);if(i){var r=t.target,d=i.length;n._length&&(d=Math.min(d,n._length));var l,a,u=n._arrayAttrs,f=function(c,T,_,w){var k,L=new Array(w),A=new Array(w);for(k=0;k<w;k++)L[k]={v:T[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===y?1:F===y?-1:D-F};
1356case"descending":return function(S,E){var D=P(S.v),F=P(E.v);return D===y?1:F===y?-1:F-D}}}(c,_)),k=0;k<w;k++)A[k]=L[k].i;return A}(t,i,g.getDataToCoordFunc(e,n,r,i),d),o=b(n.transforms,t),h={};for(l=0;l<u.length;l++){var p=m.nestedProperty(n,u[l]),s=p.get(),x=new Array(d);for(a=0;a<d;a++)x[a]=s[f[a]];p.set(x)}for(a=0;a<d;a++)h[a]=o(f[a]);t._indexToPoints=h,n._length=d}}}},{"../constants/numerical":479,"../lib":503,"../plots/cartesian/axes":554,"./helpers":1121}],1123:[function(v,$,te){te.version="2.11.1"},{}],1124:[function(v,$,te){(function(m){(function(){(function(g){typeof te=="object"&&$!==void 0?$.exports=g():(typeof window<"u"?window:m!==void 0?m:typeof self<"u"?self:this).stackgl=g()})(function(){return function g(b,y,e){function n(r,d){if(!y[r]){if(!b[r]){var l=typeof v=="function"&&v;if(!d&&l)return l(r,!0);if(t)return t(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var u=y[r]={exports:{}};b[r][0].call(u.exports,function(f){return n(b[r][1][f]||f)},u,u.exports,g,b,y,e)}return y[r].exports}for(var t=typeof v=="function"&&v,i=0;i<e.length;i++)n(e[i]);return n}({1:[function(g,b,y){y.byteLength=function(u){var f=l(u),o=f[0],h=f[1];return 3*(o+h)/4-h},y.toByteArray=function(u){var f,o,h=l(u),p=h[0],s=h[1],x=new t(function(_,w,k){return 3*(w+k)/4-k}(0,p,s)),c=0,T=s>0?p-4:p;for(o=0;o<T;o+=4)f=n[u.charCodeAt(o)]<<18|n[u.charCodeAt(o+1)]<<12|n[u.charCodeAt(o+2)]<<6|n[u.charCodeAt(o+3)],x[c++]=f>>16&255,x[c++]=f>>8&255,x[c++]=255&f;return s===2&&(f=n[u.charCodeAt(o)]<<2|n[u.charCodeAt(o+1)]>>4,x[c++]=255&f),s===1&&(f=n[u.charCodeAt(o)]<<10|n[u.charCodeAt(o+1)]<<4|n[u.charCodeAt(o+2)]>>2,x[c++]=f>>8&255,x[c++]=255&f),x},y.fromByteArray=function(u){for(var f,o=u.length,h=o%3,p=[],s=0,x=o-h;s<x;s+=16383)p.push(a(u,s,s+16383>x?x:s+16383));return h===1?(f=u[o-1],p.push(e[f>>2]+e[f<<4&63]+"==")):h===2&&(f=(u[o-2]<<8)+u[o-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,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,d=i.length;r<d;++r)e[r]=i[r],n[i.charCodeAt(r)]=r;function l(u){var f=u.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var o=u.indexOf("=");return o===-1&&(o=f),[o,o===f?0:4-o%4]}function a(u,f,o){for(var h,p,s=[],x=f;x<o;x+=3)h=(u[x]<<16&16711680)+(u[x+1]<<8&65280)+(255&u[x+2]),s.push(e[(p=h)>>18&63]+e[p>>12&63]+e[p>>6&63]+e[63&p]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],2:[function(g,b,y){},{}],3:[function(g,b,y){(function(e){(function(){var n=g("base64-js"),t=g("ieee754");y.Buffer=r,y.SlowBuffer=function(j){return+j!=j&&(j=0),r.alloc(+j)},y.INSPECT_MAX_BYTES=50;function i(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 a(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|o(se,oe),ce=i(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=i(oe);return pe.length===0||se.copy(pe,0,0,oe),pe}if(se.length!==void 0)return typeof se.length!="number"||ee(se.length)?i(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 l(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');
1356if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function a(j){return l(j),i(j<0?0:0|f(j))}function u(j){for(var X=j.length<0?0:0|f(j.length),J=i(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: 0x"+2147483647 .toString(16)+" bytes");return 0|j}function o(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 Q(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:Q(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 s(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),ee(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);if(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 _e=!0,we=0;we<ce;we++)if(de(j,se+we)!==de(X,we)){_e=!1;break}if(_e)return se}return-1}function c(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(ee(pe))return oe;j[J+oe]=pe}return oe}function T(j,X,J,re){return N(Q(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 w(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,_e=de>239?4:de>223?3:de>191?2:1;if(ne+_e<=J)switch(_e){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,_e=1):xe>65535&&(xe-=65536,re.push(xe>>>10&1023|55296),xe=56320|1023&xe),re.push(xe),ne+=_e}return function(we){var Ee=we.length;if(Ee<=4096)return String.fromCharCode.apply(String,we);for(var fe="",ge=0;ge<Ee;)fe+=String.fromCharCode.apply(String,we.slice(ge,ge+=4096));return fe}(re)}y.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 l(re),re<=0?i(re):ne!==void 0?typeof se=="string"?i(re).fill(ne,se):i(re).fill(ne):i(re)}(j,X,J)},r.allocUnsafe=function(j){return a(j)},r.allocUnsafeSlow=function(j){return a(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=o,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=y.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 s(this,j,X,J,!0)},r.prototype.lastIndexOf=function(j,X,J){return s(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 c(this,j,X,J);case"utf8":case"utf-8":return T(this,j,X,J);case"ascii":return _(this,j,X,J);case"latin1":case"binary":return w(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;
vendor: 3,163 bytes, line 1356
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 G=/[^+/0-9A-Za-z-_]/g;function W(j){return j<16?"0"+j.toString(16):j.toString(16)}function Q(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(G,"")).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 ee(j){return j!=j}}).call(this)}).call(this,g("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(g,b,y){y.read=function(e,n,t,i,r){var d,l,a=8*r-i-1,u=(1<<a)-1,f=u>>1,o=-7,h=t?r-1:0,p=t?-1:1,s=e[n+h];for(h+=p,d=s&(1<<-o)-1,s>>=-o,o+=a;o>0;d=256*d+e[n+h],h+=p,o-=8);for(l=d&(1<<-o)-1,d>>=-o,o+=i;o>0;l=256*l+e[n+h],h+=p,o-=8);if(d===0)d=1-f;else{if(d===u)return l?NaN:1/0*(s?-1:1);l+=Math.pow(2,i),d-=f}return(s?-1:1)*l*Math.pow(2,d-i)},y.write=function(e,n,t,i,r,d){var l,a,u,f=8*d-r-1,o=(1<<f)-1,h=o>>1,p=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,s=i?0:d-1,x=i?1:-1,c=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(a=isNaN(n)?1:0,l=o):(l=Math.floor(Math.log(n)/Math.LN2),n*(u=Math.pow(2,-l))<1&&(l--,u*=2),(n+=l+h>=1?p/u:p*Math.pow(2,1-h))*u>=2&&(l++,u/=2),l+h>=o?(a=0,l=o):l+h>=1?(a=(n*u-1)*Math.pow(2,r),l+=h):(a=n*Math.pow(2,h-1)*Math.pow(2,r),l=0));r>=8;e[t+s]=255&a,s+=x,a/=256,r-=8);for(l=l<<r|a,f+=r;f>0;e[t+s]=255&l,s+=x,l/=256,f-=8);e[t+s-x]|=128*c}},{}],5:[function(g,b,y){var e,n,t=b.exports={};function i(){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===i||!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:i}catch{e=i}try{n=typeof clearTimeout=="function"?clearTimeout:r}catch{n=r}})();var l,a=[],u=!1,f=-1;function o(){u&&l&&(u=!1,l.length?a=l.concat(a):f=-1,a.length&&h())}function h(){if(!u){var x=d(o);u=!0;for(var c=a.length;c;){for(l=a,a=[];++f<c;)l&&l[f].run();f=-1,c=a.length}l=null,u=!1,function(T){if(n===clearTimeout)return clearTimeout(T);
1356if((n===r||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(T);try{n(T)}catch{try{return n.call(null,T)}catch{return n.call(this,T)}}}(x)}}function p(x,c){this.fun=x,this.array=c}function s(){}t.nextTick=function(x){var c=new Array(arguments.length-1);if(arguments.length>1)for(var T=1;T<arguments.length;T++)c[T-1]=arguments[T];a.push(new p(x,c)),a.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=s,t.addListener=s,t.once=s,t.off=s,t.removeListener=s,t.removeAllListeners=s,t.emit=s,t.prependListener=s,t.prependOnceListener=s,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(g,b,y){b.exports={alpha_shape:g("alpha-shape"),convex_hull:g("convex-hull"),delaunay_triangulate:g("delaunay-triangulate"),gl_cone3d:g("gl-cone3d"),gl_error3d:g("gl-error3d"),gl_heatmap2d:g("gl-heatmap2d"),gl_line3d:g("gl-line3d"),gl_mesh3d:g("gl-mesh3d"),gl_plot2d:g("gl-plot2d"),gl_plot3d:g("gl-plot3d"),gl_pointcloud2d:g("gl-pointcloud2d"),gl_scatter3d:g("gl-scatter3d"),gl_select_box:g("gl-select-box"),gl_spikes2d:g("gl-spikes2d"),gl_streamtube3d:g("gl-streamtube3d"),gl_surface3d:g("gl-surface3d"),ndarray:g("ndarray"),ndarray_linear_interpolate:g("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(g,b,y){b.exports=function(d){var l=(d=d||{}).eye||[0,0,1],a=d.center||[0,0,0],u=d.up||[0,1,0],f=d.distanceLimits||[0,1/0],o=d.mode||"turntable",h=e(),p=n(),s=t();return h.setDistanceLimits(f[0],f[1]),h.lookAt(0,l,a,u),p.setDistanceLimits(f[0],f[1]),p.lookAt(0,l,a,u),s.setDistanceLimits(f[0],f[1]),s.lookAt(0,l,a,u),new i({turntable:h,orbit:p,matrix:s},o)};var e=g("turntable-camera-controller"),n=g("orbit-camera-controller"),t=g("matrix-camera-controller");function i(d,l){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(a){return d[a]}),this._mode=l,this._active=d[l],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=i.prototype;r.flush=function(d){for(var l=this._controllerList,a=0;a<l.length;++a)l[a].flush(d)},r.idle=function(d){for(var l=this._controllerList,a=0;a<l.length;++a)l[a].idle(d)},r.lookAt=function(d,l,a,u){for(var f=this._controllerList,o=0;o<f.length;++o)f[o].lookAt(d,l,a,u)},r.rotate=function(d,l,a,u){for(var f=this._controllerList,o=0;o<f.length;++o)f[o].rotate(d,l,a,u)},r.pan=function(d,l,a,u){for(var f=this._controllerList,o=0;o<f.length;++o)f[o].pan(d,l,a,u)},r.translate=function(d,l,a,u){for(var f=this._controllerList,o=0;o<f.length;++o)f[o].translate(d,l,a,u)},r.setMatrix=function(d,l){for(var a=this._controllerList,u=0;u<a.length;++u)a[u].setMatrix(d,l)},r.setDistanceLimits=function(d,l){for(var a=this._controllerList,u=0;u<a.length;++u)a[u].setDistanceLimits(d,l)},r.setDistance=function(d,l){for(var a=this._controllerList,u=0;u<a.length;++u)a[u].setDistance(d,l)},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 l=this._controllerNames.indexOf(d);if(!(l<0)){var a=this._active,u=this._controllerList[l],f=Math.max(a.lastT(),u.lastT());
1356a.recalcMatrix(f),u.setMatrix(f,a.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(g,b,y){var e=typeof WeakMap>"u"?g("weak-map"):WeakMap,n=g("gl-buffer"),t=g("gl-vao"),i=new e;b.exports=function(r){var d=i.get(r),l=d&&(d._triangleBuffer.handle||d._triangleBuffer.buffer);if(!l||!r.isBuffer(l)){var a=n(r,new Float32Array([-1,-1,-1,4,4,-1]));(d=t(r,[{buffer:a,type:r.FLOAT,size:2}]))._triangleBuffer=a,i.set(r,d)}d.bind(),r.drawArrays(r.TRIANGLES,0,3),d.unbind()}},{"gl-buffer":78,"gl-vao":150,"weak-map":313}],9:[function(g,b,y){var e=g("pad-left");b.exports=function(n,t,i){t=typeof t=="number"?t:1,i=i||": ";var r=n.split(/\r?\n/),d=String(r.length+t-1).length;return r.map(function(l,a){var u=a+t,f=String(u).length;return e(u,d-f)+i+l}).join(` 1357`)}},{"pad-left":264}],10:[function(g,b,y){b.exports=function(t){var i=t.length;if(i===0)return[];if(i===1)return[0];for(var r=t[0].length,d=[t[0]],l=[0],a=1;a<i;++a)if(d.push(t[a]),n(d,r)){if(l.push(a),l.length===r+1)return l}else d.pop();return l};var e=g("robust-orientation");function n(t,i){for(var r=new Array(i+1),d=0;d<t.length;++d)r[d]=t[d];for(d=0;d<=t.length;++d){for(var l=t.length;l<=i;++l){for(var a=new Array(i),u=0;u<i;++u)a[u]=Math.pow(l+1-d,u);r[l]=a}if(e.apply(void 0,r))return!0}return!1}},{"robust-orientation":284}],11:[function(g,b,y){b.exports=function(t,i){return e(i).filter(function(r){for(var d=new Array(r.length),l=0;l<r.length;++l)d[l]=i[r[l]];return n(d)*t<1})};var e=g("delaunay-triangulate"),n=g("circumradius")},{circumradius:49,"delaunay-triangulate":63}],12:[function(g,b,y){b.exports=function(t,i){return n(e(t,i))};var e=g("alpha-complex"),n=g("simplicial-complex-boundary")},{"alpha-complex":11,"simplicial-complex-boundary":290}],13:[function(g,b,y){b.exports=function(e){return atob(e)}},{}],14:[function(g,b,y){b.exports=function(t,i){for(var r=i.length,d=new Array(r+1),l=0;l<r;++l){for(var a=new Array(r+1),u=0;u<=r;++u)a[u]=t[u][l];d[l]=a}for(d[r]=new Array(r+1),l=0;l<=r;++l)d[r][l]=1;var f=new Array(r+1);for(l=0;l<r;++l)f[l]=i[l];f[r]=1;var o=e(d,f),h=n(o[r+1]);h===0&&(h=1);var p=new Array(r+1);for(l=0;l<=r;++l)p[l]=n(o[l])/h;return p};var e=g("robust-linear-solve");function n(t){for(var i=0,r=0;r<t.length;++r)i+=t[r];return i}},{"robust-linear-solve":283}],15:[function(g,b,y){var e=g("./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(g,b,y){b.exports=function(e,n){return e[0].mul(n[1]).cmp(n[0].mul(e[1]))}},{}],17:[function(g,b,y){var e=g("./lib/rationalize");b.exports=function(n,t){return e(n[0].mul(t[1]),n[1].mul(t[0]))}},{"./lib/rationalize":25}],18:[function(g,b,y){var e=g("./is-rat"),n=g("./lib/is-bn"),t=g("./lib/num-to-bn"),i=g("./lib/str-to-bn"),r=g("./lib/rationalize"),d=g("./div");b.exports=function l(a,u){if(e(a))return u?d(a,l(u)):[a[0].clone(),a[1].clone()];var f,o,h=0;if(n(a))f=a.clone();else if(typeof a=="string")f=i(a);else{if(a===0)return[t(0),t(1)];if(a===Math.floor(a))f=t(a);else{for(;a!==Math.floor(a);)a*=Math.pow(2,256),h-=256;f=t(a)}}if(e(u))f.mul(u[1]),o=u[0].clone();else if(n(u))o=u.clone();else if(typeof u=="string")o=i(u);else if(u)if(u===Math.floor(u))o=t(u);else{for(;u!==Math.floor(u);)u*=Math.pow(2,256),h+=256;o=t(u)}else o=t(1);return h>0?f=f.ushln(h):h<0&&(o=o.ushln(-h)),r(f,o)}},{"./div":17,"./is-rat":19,"./lib/is-bn":23,"./lib/num-to-bn":24,"./lib/rationalize":25,"./lib/str-to-bn":26}],19:[function(g,b,y){var e=g("./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(g,b,y){var e=g("bn.js");b.exports=function(n){return n.cmp(new e(0))}},{"bn.js":33}],21:[function(g,b,y){var e=g("./bn-sign");b.exports=function(n){var t=n.length,i=n.words,r=0;if(t===1)r=i[0];else if(t===2)r=i[0]+67108864*i[1];else for(var d=0;d<t;d++){var l=i[d];r+=l*Math.pow(67108864,d)}return e(n)*r}},{"./bn-sign":20}],22:[function(g,b,y){var e=g("double-bits"),n=g("bit-twiddle").countTrailingZeros;b.exports=function(t){var i=n(e.lo(t));if(i<32)return i;var r=n(e.hi(t));return r>20?52:r+32}},{"bit-twiddle":32,"double-bits":64}],23:[function(g,b,y){g("bn.js"),b.exports=function(e){return e&&typeof e=="object"&&Boolean(e.words)}},{"bn.js":33}],24:[function(g,b,y){var e=g("bn.js"),n=g("double-bits");b.exports=function(t){var i=n.exponent(t);return i<52?new e(t):new e(t*Math.pow(2,52-i)).ushln(i-52)}},{"bn.js":33,"double-bits":64}],25:[function(g,b,y){var e=g("./num-to-bn"),n=g("./bn-sign");b.exports=function(t,i){var r=n(t),d=n(i);if(r===0)return[e(0),e(1)];if(d===0)return[e(0),e(0)];d<0&&(t=t.neg(),i=i.neg());var l=t.gcd(i);return l.cmpn(1)?[t.div(l),i.div(l)]:[t,i]}},{"./bn-sign":20,"./num-to-bn":24}],26:[function(g,b,y){var e=g("bn.js");b.exports=function(n){return new e(n)}},{"bn.js":33}],27:[function(g,b,y){var e=g("./lib/rationalize");b.exports=function(n,t){return e(n[0].mul(t[0]),n[1].mul(t[1]))}},{"./lib/rationalize":25}],28:[function(g,b,y){var e=g("./lib/bn-sign");b.exports=function(n){return e(n[0])*e(n[1])}},{"./lib/bn-sign":20}],29:[function(g,b,y){var e=g("./lib/rationalize");b.exports=function(n,t){return e(n[0].mul(t[1]).sub(n[1].mul(t[0])
1357),n[1].mul(t[1]))}},{"./lib/rationalize":25}],30:[function(g,b,y){var e=g("./lib/bn-to-num"),n=g("./lib/ctz");b.exports=function(t){var i=t[0],r=t[1];if(i.cmpn(0)===0)return 0;var d=i.abs().divmod(r.abs()),l=d.div,a=e(l),u=d.mod,f=i.negative!==r.negative?-1:1;if(u.cmpn(0)===0)return f*a;if(a){var o=n(a)+4,h=e(u.ushln(o).divRound(r));return f*(a+h*Math.pow(2,-o))}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(g,b,y){function e(l,a,u,f,o){for(var h=o+1;f<=o;){var p=f+o>>>1,s=l[p];(u!==void 0?u(s,a):s-a)>=0?(h=p,o=p-1):f=p+1}return h}function n(l,a,u,f,o){for(var h=o+1;f<=o;){var p=f+o>>>1,s=l[p];(u!==void 0?u(s,a):s-a)>0?(h=p,o=p-1):f=p+1}return h}function t(l,a,u,f,o){for(var h=f-1;f<=o;){var p=f+o>>>1,s=l[p];(u!==void 0?u(s,a):s-a)<0?(h=p,f=p+1):o=p-1}return h}function i(l,a,u,f,o){for(var h=f-1;f<=o;){var p=f+o>>>1,s=l[p];(u!==void 0?u(s,a):s-a)<=0?(h=p,f=p+1):o=p-1}return h}function r(l,a,u,f,o){for(;f<=o;){var h=f+o>>>1,p=l[h],s=u!==void 0?u(p,a):p-a;if(s===0)return h;s<=0?f=h+1:o=h-1}return-1}function d(l,a,u,f,o,h){return typeof u=="function"?h(l,a,u,f===void 0?0:0|f,o===void 0?l.length-1:0|o):h(l,a,void 0,u===void 0?0:0|u,f===void 0?l.length-1:0|f)}b.exports={ge:function(l,a,u,f,o){return d(l,a,u,f,o,e)},gt:function(l,a,u,f,o){return d(l,a,u,f,o,n)},lt:function(l,a,u,f,o){return d(l,a,u,f,o,t)},le:function(l,a,u,f,o){return d(l,a,u,f,o,i)},eq:function(l,a,u,f,o){return d(l,a,u,f,o,r)}}},{}],32:[function(g,b,y){function e(t){var i=32;return(t&=-t)&&i--,65535&t&&(i-=16),16711935&t&&(i-=8),252645135&t&&(i-=4),858993459&t&&(i-=2),1431655765&t&&(i-=1),i}y.INT_BITS=32,y.INT_MAX=2147483647,y.INT_MIN=-1<<31,y.sign=function(t){return(t>0)-(t<0)},y.abs=function(t){var i=t>>31;return(t^i)-i},y.min=function(t,i){return i^(t^i)&-(t<i)},y.max=function(t,i){return t^(t^i)&-(t<i)},y.isPow2=function(t){return!(t&t-1||!t)},y.log2=function(t){var i,r;return i=(t>65535)<<4,i|=r=((t>>>=i)>255)<<3,i|=r=((t>>>=r)>15)<<2,(i|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},y.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},y.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},y.countTrailingZeros=e,y.nextPow2=function(t){return t+=t===0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},y.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},y.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 i=0;i<256;++i){var r=i,d=i,l=7;for(r>>>=1;r;r>>>=1)d<<=1,d|=1&r,--l;t[i]=d<<l&255}})(n),y.reverse=function(t){return n[255&t]<<24|n[t>>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},y.interleave2=function(t,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i&=65535)|i<<8))|i<<4))|i<<2))|i<<1))<<1},y.deinterleave2=function(t,i){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>i&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},y.interleave3=function(t,i,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(i=1227133513&((i=3272356035&((i=251719695&((i=4278190335&((i&=1023)|i<<16))|i<<8))|i<<4))|i<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},y.deinterleave3=function(t,i){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>i&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},y.nextCombination=function(t){var i=t|t-1;return i+1|(~i&-~i)-1>>>e(t)+1}},{}],33:[function(g,b,y){(function(e,n){function t(S,E){if(!S)throw new Error(E||"Assertion failed")}function i(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;
1357typeof 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:g("buffer").Buffer}catch{}function l(S,E){var D=S.charCodeAt(E);return D>=65&&D<=70?D-55:D>=97&&D<=102?D-87:D-48&15}function a(S,E,D){var F=l(S,D);return D-1>=E&&(F|=l(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=a(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=a(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,G=0,W=D;W<K;W+=F)G=u(S,W,W+F,E),this.imuln(H),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(Z!==0){var Q=1;for(G=u(S,W,S.length,E),W=0;W<Z;W++)Q*=E;this.imuln(Q),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G)}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"],o=[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,143489
135707,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,G=Z/67108864|0;D.words[0]=K;for(var W=1;W<F;W++){for(var Q=G>>>26,R=67108863&G,N=Math.min(W,E.length-1),U=Math.max(0,W-S.length+1);U<=N;U++){var ee=W-U|0;Q+=(Z=(H=0|S.words[ee])*(V=0|E.words[U])+R)/67108864|0,R=67108863&Z}D.words[W]=0|R,G=0|Q}return G!==0?D.words[W]=0|G: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 G=o[S],W=h[S];D="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var R=Q.modn(W).toString(S);D=(Q=Q.idivn(W)).isZero()?R+D:f[G-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",G=new S(H),W=this.clone();if(K){for(Z=0;!W.isZero();Z++)V=W.andln(255),W.iushrn(8),G[Z]=V;for(;Z<H;Z++)G[Z]=0}else{for(Z=0;Z<H-F;Z++)G[Z]=0;for(Z=0;!W.isZero();Z++)V=W.andln(255),W.iushrn(8),G[H-Z-1]=V}return G},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)==0&&(D+=13,E>>>=13),(127&E)==0&&(D+=7,E>>>=7),(15&E)==0&&(D+=4,E>>>=4),(3&E)==0&&(D+=2,E>>>=2),(1&E)==0&&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,879 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 s=function(S,E,D){var F,H,V,Z=S.words,K=E.words,G=D.words,W=0,Q=0|Z[0],R=8191&Q,N=Q>>>13,U=0|Z[1],ee=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],_e=8191&xe,we=xe>>>13,Ee=0|Z[6],fe=8191&Ee,ge=Ee>>>13,ke=0|Z[7],be=8191&ke,Se=ke>>>13,Oe=0|Z[8],De=8191&Oe,je=Oe>>>13,Je=0|Z[9],ze=8191&Je,Ue=Je>>>13,Ge=0|K[0],Ye=8191&Ge,et=Ge>>>13,ct=0|K[1],mt=8191&ct,Ct=ct>>>13,Tt=0|K[2],nt=8191&Tt,Qe=Tt>>>13,Et=0|K[3],Gt=8191&Et,Xt=Et>>>13,Fe=0|K[4],qe=8191&Fe,wt=Fe>>>13,ft=0|K[5],Ce=8191&ft,Ie=ft>>>13,Te=0|K[6],Pe=8191&Te,Ve=Te>>>13,tt=0|K[7],ot=8191&tt,at=tt>>>13,_t=0|K[8],bt=8191&_t,jt=_t>>>13,Nt=0|K[9],$e=8191&Nt,yt=Nt>>>13;D.negative=S.negative^E.negative,D.length=19;var Ot=(W+(F=Math.imul(R,Ye))|0)+((8191&(H=(H=Math.imul(R,et))+Math.imul(N,Ye)|0))<<13)|0;W=((V=Math.imul(N,et))+(H>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,F=Math.imul(ee,Ye),H=(H=Math.imul(ee,et))+Math.imul(j,Ye)|0,V=Math.imul(j,et);var Mt=(W+(F=F+Math.imul(R,mt)|0)|0)+((8191&(H=(H=H+Math.imul(R,Ct)|0)+Math.imul(N,mt)|0))<<13)|0;W=((V=V+Math.imul(N,Ct)|0)+(H>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,F=Math.imul(J,Ye),H=(H=Math.imul(J,et))+Math.imul(re,Ye)|0,V=Math.imul(re,et),F=F+Math.imul(ee,mt)|0,H=(H=H+Math.imul(ee,Ct)|0)+Math.imul(j,mt)|0,V=V+Math.imul(j,Ct)|0;var Pt=(W+(F=F+Math.imul(R,nt)|0)|0)+((8191&(H=(H=H+Math.imul(R,Qe)|0)+Math.imul(N,nt)|0))<<13)|0;W=((V=V+Math.imul(N,Qe)|0)+(H>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,F=Math.imul(se,Ye),H=(H=Math.imul(se,et))+Math.imul(oe,Ye)|0,V=Math.imul(oe,et),F=F+Math.imul(J,mt)|0,H=(H=H+Math.imul(J,Ct)|0)+Math.imul(re,mt)|0,V=V+Math.imul(re,Ct)|0,F=F+Math.imul(ee,nt)|0,H=(H=H+Math.imul(ee,Qe)|0)+Math.imul(j,nt)|0,V=V+Math.imul(j,Qe)|0;var Le=(W+(F=F+Math.imul(R,Gt)|0)|0)+((8191&(H=(H=H+Math.imul(R,Xt)|0)+Math.imul(N,Gt)|0))<<13)|0;W=((V=V+Math.imul(N,Xt)|0)+(H>>>13)|0)+(Le>>>26)|0,Le&=67108863,F=Math.imul(ce,Ye),H=(H=Math.imul(ce,et))+Math.imul(de,Ye)|0,V=Math.imul(de,et),F=F+Math.imul(se,mt)|0,H=(H=H+Math.imul(se,Ct)|0)+Math.imul(oe,mt)|0,V=V+Math.imul(oe,Ct)|0,F=F+Math.imul(J,nt)|0,H=(H=H+Math.imul(J,Qe)|0)+Math.imul(re,nt)|0,V=V+Math.imul(re,Qe)|0,F=F+Math.imul(ee,Gt)|0,H=(H=H+Math.imul(ee,Xt)|0)+Math.imul(j,Gt)|0,V=V+Math.imul(j,Xt)|0;var Xe=(W+(F=F+Math.imul(R,qe)|0)|0)+((8191&(H=(H=H+Math.imul(R,wt)|0)+Math.imul(N,qe)|0))<<13)|0;W=((V=V+Math.imul(N,wt)|0)+(H>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,F=Math.imul(_e,Ye),H=(H=Math.imul(_e,et))+Math.imul(we,Ye)|0,V=Math.imul(we,et),F=F+Math.imul(ce,mt)|0,H=(H=H+Math.imul(ce,Ct)|0)+Math.imul(de,mt)|0,V=V+Math.imul(de,Ct)|0,F=F+Math.imul(se,nt)|0,H=(H=H+Math.imul(se,Qe)|0)+Math.imul(oe,nt)|0,V=V+Math.imul(oe,Qe)|0,F=F+Math.imul(J,Gt)|0,H=(H=H+Math.imul(J,Xt)|0)+Math.imul(re,Gt)|0,V=V+Math.imul(re,Xt)|0,F=F+Math.imul(ee,qe)|0,H=(H=H+Math.imul(ee,wt)|0)+Math.imul(j,qe)|0,V=V+Math.imul(j,wt)|0;var it=(W+(F=F+Math.imul(R,Ce)|0)|0)+((8191&(H=(H=H+Math.imul(R,Ie)|0)+Math.imul(N,Ce)|0))<<13)|0;W=((V=V+Math.imul(N,Ie)|0)+(H>>>13)|0)+(it>>>26)|0,it&=67108863,F=Math.imul(fe,Ye),H=(H=Math.imul(fe,et))+Math.imul(ge,Ye)|0,V=Math.imul(ge,et),F=F+Math.imul(_e,mt)|0,H=(H=H+Math.imul(_e,Ct)|0)+Math.imul(we,mt)|0,V=V+Math.imul(we,Ct)|0,F=F+Math.imul(ce,nt)|0,H=(H=H+Math.imul(ce,Qe)|0)+Math.imul(de,nt)|0,V=V+Math.imul(de,Qe)|0,F=F+Math.imul(se,Gt)|0,H=(H=H+Math.imul(se,Xt)|0)+Math.imul(oe,Gt)|0,V=V+Math.imul(oe,Xt)|0,F=F+Math.imul(J,qe)|0,H=(H=H+Math.imul(J,wt)|0)+Math.imul(re,qe)|0,V=V+Math.imul(re,wt)|0,F=F+Math.imul(ee,Ce)|0,H=(H=H+Math.imul(ee,Ie)|0)+Math.imul(j,Ce)|0,V=V+Math.imul(j,Ie)|0;var At=(W+(F=F+Math.imul(R,Pe)|0)|0)+((8191&(H=(H=H+Math.imul(R,Ve)|0)+Math.imul(N,Pe)|0))<<13)|0;W=((V=V+Math.imul(N,Ve)|0)+(H>>>13)|0)+(At>>>26)|0,At&=67108863,F=Math.imul(be,Ye),H=(H=Math.imul(be,et))+Math.imul(Se,Ye)|0,V=Math.imul(Se,et),F=F+Math.imul(fe,mt)|0,H=(H=H+Math.imul(fe,Ct)|0)+Math.imul(ge,mt)|0,V=V+Math.imul(ge,Ct)|0,F=F+Math.imul(_e,nt)|0,H=(H=H+Math.imul(_e,Qe)|0)+Math.imul(we,nt)|0,V=V+Math.imul(we,Qe)|0,F=F+Math.imul(ce,Gt)|0,H=(H=H+Math.imul(ce,Xt)|0)+Math.imul(de,Gt)|0,V=V+Math.imul(de,Xt)|0,F=F+Math.imul(se,qe)|0,H=(H=H+Math.imul(se,wt)|0)+Math.imul(oe,qe)|0,V=V+Math.imul(oe,wt)|0,F=F+Math.imul(J,Ce)|0,H=(H=H+Math.imul(J,Ie)|0)+Math.imul(re,Ce)|0,V=V+Math.imul(re,Ie)|0,F=F+Math.imul(ee,Pe)|0,H=(H=H+Math.imul(ee,Ve)|0)+Math.imul(j,Pe)|0,V=V+Math.imul(j,Ve)|0;var It=(W+(F=F+Math.imul(R,ot)|0)|0)+((8191&(H=(H=H+Math.imul(R,at)|0)+Math.imul(N,ot)|0))<<13)|0;W=((V=V+Math.imul(N,at)|0)+(H>>>13)|0)+(It>>>26)|0,It&=67108863,F=Math.imul(De,Ye),H=(H=Math.imul(De,et))+Math.imul(je,Ye)|0,V=Math.imul(je,et),F=F+Math.imul(be,mt)|0,H=(H=H+Math.imul(be,Ct)|0)+Math.imul(Se,mt)|0,V=V+Math.imul(Se,Ct)|0,F=F+Math.imul(fe,nt)|0,H=(H=H+Math.imul(fe,Qe)|0)+Math.imul(ge,nt)|0,V=V+Math.imul(ge,Qe)|0,F=F+Math.imul(_e,Gt)|0,H=(H=H+Math.imul(_e,Xt)|0)+Math.imul(we,Gt)|0,V=V+Math.imul(we,Xt)|0,F=F+Math.imul(ce,qe)|0,H=(H=H+Math.imul(ce,wt)|0)+Math.imul(de,qe)|0,V=V+Math.imul(de,wt)|0,F=F+Math.imul(se,Ce)|0,H=(H=H+Math.imul(se,Ie)|0)+Math.imul(oe,Ce)|0,V=V+Math.imul(oe,Ie)|0,F=F+Math.imul(J,Pe)|0,H=(H=H+Math.imul(J,Ve)|0)+Math.imul(re,Pe)|0,V=V+Math.imul(re,Ve)|0,F=F+Math.imul(ee,ot)|0,H=(H=H+Math.imul(ee,at)|0)+Math.imul(j,ot)|0,V=V+Math.imul(j,at)|0;var Zt=(W+(F=F+Math.imul(R,bt)|0)|0)+((8191&(H=(H=H+Math.imul(R,jt)|0)+Math.imul(N,bt)|0))<<13)|0;W=((V=V+Math.imul(N,jt)|0)+(H>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,F=Math.imul(ze,Ye),H=(H=Math.imul(ze,et))+Math.imul(Ue,Ye)|0,V=Math.imul(Ue,et),F=F+Math.imul(De,mt)|0,H=(H=H+Math.imul(De,Ct)|0)+Math.imul(je,mt)|0,V=V+Math.imul(je,Ct)|0,F=F+Math.imul(be,nt)|0,H=(H=H+Math.imul(be,Qe)|0)+Math.imul(Se,nt)|0,V=V+Math.imul(Se,Qe)|0,F=F+Math.imul(fe,Gt)|0,H=(H=H+Math.imul(fe,Xt)|0)+Math.imul(ge,Gt)|0,V=V+Math.imul(ge,Xt)|0,F=F+Math.imul(_e,qe)|0,H=(H=H+Math.imul(_e,wt)|0)+Math.imul(we,qe)|0,V=V+Math.imul(we,wt)|0,F=F+Math.imul(ce,Ce)|0,H=(H=H+Math.imul(ce,Ie)|0)+Math.imul(de,Ce)|0,V=V+Math.imul(de,Ie)|0,F=F+Math.imul(se,Pe)|0,H=(H=H+Math.imul(se,Ve)|0)+Math.imul(oe,Pe)|0,V=V+Math.imul(oe,Ve)|0,F=F+Math.imul(J,ot)|0,H=(H=H+Math.imul(J,at)|0)+Math.imul(re,ot)|0,V=V+Math.imul(re,at)|0,F=F+Math.imul(ee,bt)|0,H=(H=H+Math.imul(ee,jt)|0)+Math.imul(j,bt)|0,V=V+Math.imul(j,jt)|0;var Jt=(W+(F=F+Math.imul(R,$e)|0)|0)+((8191&(H=(H=H+Math.imul(R,yt)|0)+Math.imul(N,$e)|0))<<13)|0;W=((V=V+Math.imul(N,yt)|0)+(H>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,F=Math.imul(ze,mt),H=(H=Math.imul(ze,Ct))+Math.imul(Ue,mt)|0,V=Math.imul(Ue,Ct),F=F+Math.imul(De,nt)|0,H=(H=H+Math.imul(De,Qe)|0)+Math.imul(je,nt)|0,V=V+Math.imul(je,Qe)|0,F=F+Math.imul(be,Gt)|0,H=(H=H+Math.imul(be,Xt)|0)+Math.imul(Se,Gt)|0,V=V+Math.imul(Se,Xt)|0,F=F+Math.imul(fe,qe)|0,H=(H=H+Math.imul(fe,wt)|0)+Math.imul(ge,qe)|0,V=V+Math.imul(ge,wt)|0,F=F+Math.imul(_e,Ce)|0,H=(H=H+Math.imul(_e,Ie)|0)+Math.imul(we,Ce)|0,V=V+Math.imul(we,Ie)|0,F=F+Math.imul(ce,Pe)|0,H=(H=H+Math.imul(ce,Ve)|0)+Math.imul(de,Pe)|0,V=V+Math.imul(de,Ve)|0,F=F+Math.imul(se,ot)|0,H=(H=H+Math.imul(se,at)|0)+Math.imul(oe,ot)|0,V=V+Math.imul(oe,at)|0,F=F+Math.imul(J,bt)|0,H=(H=H+Math.imul(J,jt)|0)+Math.imul(re,bt)|0,V=V+Math.imul(re,jt)|0;var Vt=(W+(F=F+Math.imul(ee,$e)|0)|0)+((8191&(H=(H=H+Math.imul(ee,yt)|0)+Math.imul(j,$e)|0))<<13)|0;W=((V=V+Math.imul(j,yt)|0)+(H>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,F=Math.imul(ze,nt),H=(H=Math.imul(ze,Qe))+Math.imul(Ue,nt)|0,V=Math.imul(Ue,Qe),F=F+Math.imul(De,Gt)|0,H=(H=H+Math.imul(De,Xt)|0)+Math.imul(je,Gt)|0,V=V+Math.imul(je,Xt)|0,F=F+Math.imul(be,qe)|0,H=(H=H+Math.imul(be,wt)|0)+Math.imul(Se,qe)|0,V=V+Math.imul(Se,wt)|0,F=F+Math.imul(fe,Ce)|0,H=(H=H+Math.imul(fe,Ie)|0)+Math.imul(ge,Ce)|0,V=V+Math.imul(ge,Ie)|0,F=F+Math.imul(_e,Pe)|0,H=(H=H+Math.imul(_e,Ve)|0)+Math.imul(we,Pe)|0,V=V+Math.imul(we,Ve)|0,F=F+Math.imul(ce,ot)|0,H=(H=H+Math.imul(ce,at)|0)+Math.imul(de,ot)|0,V=V+Math.imul(de,at)|0,F=F+Math.imul(se,bt)|0,H=(H=H+Math.imul(se,jt)|0)+Math.imul(oe,bt)|0,V=V+Math.imul(oe,jt)|0;var pr=(W+(F=F+Math.imul(J,$e)|0)|0)+((8191&(H=(H=H+Math.imul(J,yt)|0)+Math.imul(re,$e)|0))<<13)|0;W=((V=V+Math.imul(re,yt)|0)+(H>>>13)|0)+(pr>>>26)|0,pr&=67108863,F=Math.imul(ze,Gt),H=(H=Math.imul(ze,Xt))+Math.imul(Ue,Gt)|0,V=Math.imul(Ue,Xt),F=F+Math.imul(De,qe)|0,H=(H=H+Math.imul(De,wt)|0)+Math.imul(je,qe)|0,V=V+Math.imul(je,wt)|0,F=F+Math.imul(be,Ce)|0,H=(H=H+Math.imul(be,Ie)|0)+Math.imul(Se,Ce)|0,V=V+Math.imul(Se,Ie)|0,F=F+Math.imul(fe,Pe)|0,H=(H=H+Math.imul(fe,Ve)|0)+Math.imul(ge,Pe)|0,V=V+Math.imul(ge,Ve)|0,F=F+Math.imul(_e,ot)|0,H=(H=H+Math.imul(_e,at)|0)+Math.imul(we,ot)|0,V=V+Math.imul(we,at)|0,F=F+Math.imul(ce,bt)|0,H=(H=H+Math.imul(ce,jt)|0)+Math.imul(de,bt)|0,V=V+Math.imul(de,jt)|0;var Ir=(W+(F=F+Math.imul(se,$e)|0)|0)+((8191&(H=(H=H+Math.imul(se,yt)|0)+Math.imul(oe,$e)|0))<<13)|0;W=((V=V+Math.imul(oe,yt)|0)+(H>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,F=Math.imul(ze,qe),H=(H=Math.imul(ze,wt))+Math.imul(Ue,qe)|0,V=Math.imul(Ue,wt),F=F+Math.imul(De,Ce)|0,H=(H=H+Math.imul(De,Ie)|0)+Math.imul(je,Ce)|0,V=V+Math.imul(je,Ie)|0,F=F+Math.imul(be,Pe)|0,H=(H=H+Math.imul(be,Ve)|0)+Math.imul(Se,Pe)|0,V=V+Math.imul(Se,Ve)|0,F=F+Math.imul(fe,ot)|0,H=(H=H+Math.imul(fe,at)|0)+Math.imul(ge,ot)|0,V=V+Math.imul(ge,at)|0,F=F+Math.imul(_e,bt)|0,H=(H=H+Math.imul(_e,jt)|0)+Math.imul(we,bt)|0,V=V+Math.imul(we,jt)|0;var fr=(W+(F=F+Math.imul(ce,$e)|0)|0)+((8191&(H=(H=H+Math.imul(ce,yt)|0)+Math.imul(de,$e)|0))<<13)|0;W=((V=V+Math.imul(de,yt)|0)+(H>>>13)|0)+(fr>>>26)|0,fr&=67108863,F=Math.imul(ze,Ce),H=(H=Math.imul(ze,Ie))+Math.imul(Ue,Ce)|0,V=Math.imul(Ue,Ie),F=F+Math.imul(De,Pe)|0,H=(H=H+Math.imul(De,Ve)|0)+Math.imul(je,Pe)|0,V=V+Math.imul(je,Ve)|0,F=F+Math.imul(be,ot)|0,H=(H=H+Math.imul(be,at)|0)+Math.imul(Se,ot)|0,V=V+Math.imul(Se,at)|0,F=F+Math.imul(fe,bt)|0,H=(H=H+Math.imul(fe,jt)|0)+Math.imul(ge,bt)|0,V=V+Math.imul(ge,jt)|0;var $t=(W+(F=F+Math.imul(_e,$e)|0)|0)+((8191&(H=(H=H+Math.imul(_e,yt)|0)+Math.imul(we,$e)|0))<<13)|0;W=((V=V+Math.imul(we,yt)|0)+(H>>>13)|0)+($t>>>26)|0,$t&=67108863,F=Math.imul(ze,Pe),H=(H=Math.imul(ze,Ve))+Math.imul(Ue,Pe)|0,V=Math.imul(Ue,Ve),F=F+Math.imul(De,ot)|0,H=(H=H+Math.imul(De,at)|0)+Math.imul(je,ot)|0,V=V+Math.imul(je,at)|0,F=F+Math.imul(be,bt)|0,H=(H=H+Math.imul(be,jt)|0)+Math.imul(Se,bt)|0,V=V+Math.imul(Se,jt)|0;var er=(W+(F=F+Math.imul(fe,$e)|0)|0)+((8191&(H=(H=H+Math.imul(fe,yt)|0)+Math.imul(ge,$e)|0))<<13)|0;W=((V=V+Math.imul(ge,yt)|0)+(H>>>13)|0)+(er>>>26)|0,er&=67108863,F=Math.imul(ze,ot),H=(H=Math.imul(ze,at))+Math.imul(Ue,ot)|0,V=Math.imul(Ue,at),F=F+Math.imul(De,bt)|0,H=(H=H+Math.imul(De,jt)|0)+Math.imul(je,bt)|0,V=V+Math.imul(je,jt)|0;var ar=(W+(F=F+Math.imul(be,$e)|0)|0)+((8191&(H=(H=H+Math.imul(be,yt)|0)+Math.imul(Se,$e)|0))<<13)|0;W=((V=V+Math.imul(Se,yt)|0)+(H>>>13)|0)+(ar>>>26)|0,ar&=67108863,F=Math.imul(ze,bt),H=(H=Math.imul(ze,jt))+Math.imul(Ue,bt)|0,V=Math.imul(Ue,jt);var hr=(W+(F=F+Math.imul(De,$e)|0)|0)+((8191&(H=(H=H+Math.imul(De,yt)|0)+Math.imul(je,$e)|0))<<13)|0;W=((V=V+Math.imul(je,yt)|0)+(H>>>13)|0)+(hr>>>26)|0,hr&=67108863;var vr=(W+(F=Math.imul(ze,$e))|0)+((8191&(H=(H=Math.imul(ze,yt))+Math.imul(Ue,$e)|0))<<13)|0;return W=((V=Math.imul(Ue,yt))+(H>>>13)|0)+(vr>>>26)|0,vr&=67108863,G[0]=Ot,G[1]=Mt,G[2]=Pt,G[3]=Le,G[4]=Xe,G[5]=it,G[6]=At,G[7]=It,G[8]=Zt,G[9]=Jt,G[10]=Vt,G[11]=pr,G[12]=Ir,G[13]=fr,G[14]=$t,G[15]=er,G[16]=ar,G[17]=hr,G[18]=vr,W!==0&&(G[19]=W,D.length++),D};function x(S,E,D){return new c().mulp(S,E,D)}function c(S,E){this.x=S,this.y=E}Math.imul||(s=p),r.prototype.mulTo=function(S,E){var D=this.length+S.length;return this.length===10&&S.length===10?s(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,G=0;G<V.length-1;G++){var W=K;K=0;for(var Q=67108863&Z,R=Math.min(G,H.length-1),N=Math.max(0,G-F.length+1);N<=R;N++){var U=G-N,ee=(0|F.words[U])*(0|H.words[N]),j=67108863ⅇQ=67108863&(j=j+Q|0),K+=(W=(W=W+(ee/67108864|0)|0)+(j>>>26)|0)>>>26,W&=67108863}V.words[G]=Q,Z=W,W=K}return Z!==0?V.words[G]=Z:V.length--,V.strip()}(this,S,E):x(this,S,E)},c.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},c.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},c.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]]},c.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,G=Math.cos(2*Math.PI/K),W=Math.sin(2*Math.PI/K),Q=0;Q<H;Q+=K)for(var R=G,N=W,U=0;U<Z;U++){var ee=D[Q+U],j=F[Q+U],X=D[Q+U+Z],J=F[Q+U+Z],re=R*X-N*J;J=R*J+N*X,X=re,D[Q+U]=ee+X,F[Q+U]=j+J,D[Q+U+Z]=ee-X,F[Q+U+Z]=j-J,U!==K&&(re=G*R-W*N,N=G*N+W*R,R=re)}},c.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},c.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}},c.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},c.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)},c.prototype.stub=function(S){for(var E=new Array(S),D=0;D<S;D++)E[D]=0;return E},c.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),G=new Array(F),W=new Array(F),Q=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,G,F,H),this.transform(W,V,Q,R,F,H);for(var U=0;U<F;U++){var ee=K[U]*Q[U]-G[U]*R[U];G[U]=K[U]*R[U]+G[U]*Q[U],K[U]=ee}return this.conjugate(K,G,F),this.transform(K,G,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 G=K/26|0,W=K%26;Z[K]=(V.words[G]&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 G=0;G<V;G++)K.words[G]=this.words[G];K.length=V}if(V!==0)if(this.length>V)for(this.length-=V,G=0;G<this.length;G++)this.words[G]=this.words[G+V];else this.words[0]=0,this.length=1;var W=0;for(G=this.length-1;G>=0&&(W!==0||G>=F);G--){var Q=0|this.words[G];this.words[G]=W<<26-H|Q>>>H,W=Q&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 G=0;G<Z.length;G++)Z.words[G]=0}var W=F.clone()._ishlnsubmul(H,1,K);W.negative===0&&(F=W,Z&&(Z.words[K]=1));for(var Q=K-1;Q>=0;Q--){var R=67108864*(0|F.words[H.length+Q])+(0|F.words[H.length+Q-1]);for(R=Math.min(R/V|0,67108863),F._ishlnsubmul(H,R,Q);F.negative!==0;)R--,F.negative=0,F._ishlnsubmul(H,1,Q),F.isZero()||(F.negative^=1);Z&&(Z.words[Q]=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)!=0?(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 G=D.clone(),W=E.clone();!E.isZero();){for(var Q=0,R=1;(E.words[0]&R)==0&&Q<26;++Q,R<<=1);if(Q>0)for(E.iushrn(Q);Q-- >0;)(F.isOdd()||H.isOdd())&&(F.iadd(G),H.isub(W)),F.iushrn(1),H.iushrn(1);for(var N=0,U=1;(D.words[0]&U)==0&&N<26;++N,U<<=1);if(N>0)for(D.iushrn(N);N-- >0;
1357)(V.isOdd()||Z.isOdd())&&(V.iadd(G),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,G=1;(E.words[0]&G)==0&&K<26;++K,G<<=1);if(K>0)for(E.iushrn(K);K-- >0;)H.isOdd()&&H.iadd(Z),H.iushrn(1);for(var W=0,Q=1;(D.words[0]&Q)==0&&W<26;++W,Q<<=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 T={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 w(){_.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)},i(w,_),w.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},w.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},i(k,_),i(L,_),i(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(T[S])return T[S];var E;if(S==="k256")E=new w;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 T[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),G=this.m.bitLength();for(G=new r(2*G*G).toRed(this);this.pow(G,K).cmp(Z)!==0;)G.redIAdd(Z);for(var W=this.pow(G,F),Q=this.pow(S,F.addn(1).iushrn(1)),R=this.pow(S,F),N=H;R.cmp(V)!==0;){for(var U=R,ee=0;U.cmp(V)!==0;ee++)U=U.redSqr();t(ee<N);var j=this.pow(W,new r(1).iushln(N-ee-1));Q=Q.redMul(j),W=j.redSqr(),R=R.redMul(W),N=ee}return Q},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 G=E.words[F],W=K-1;W>=0;W--){var Q=G>>W&1;H!==D[0]&&(H=this.sqr(H)),Q!==0||V!==0?(V<<=1,V|=Q,(++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)},i(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(g,b,y){b.exports=function(e){var n,t,i,r=e.length,d=0;for(n=0;n<r;++n)d+=e[n].length;var l=new Array(d),a=0;for(n=0;n<r;++n){var u=e[n],f=u.length;for(t=0;t<f;++t){var o=l[a++]=new Array(f-1),h=0;for(i=0;i<f;++i)i!==t&&(o[h++]=u[i]);if(1&t){var p=o[1];o[1]=o[0],o[0]=p}}}return l}},{}],35:[function(g,b,y){b.exports=function(o,h,p){switch(arguments.length){case 1:return u(o);case 2:return typeof h=="function"?l(o,o,h,!0):f(o,h);case 3:return l(o,h,p,!1);default:throw new Error("box-intersect: Invalid arguments")}};var e,n=g("typedarray-pool"),t=g("./lib/sweep"),i=g("./lib/intersect");function r(o,h){for(var p=0;p<o;++p)if(!(h[p]<=h[p+o]))return!0;return!1}function d(o,h,p,s){for(var x=0,c=0,T=0,_=o.length;T<_;++T){var w=o[T];if(!r(h,w)){for(var k=0;k<2*h;++k)p[x++]=w[k];s[c++]=T}}return c}function l(o,h,p,s){var x=o.length,c=h.length;if(!(x<=0||c<=0)){var T=o[0].length>>>1;if(!(T<=0)){var _,w=n.mallocDouble(2*T*x),k=n.mallocInt32(x);if((x=d(o,T,w,k))>0){if(T===1&&s)t.init(x),_=t.sweepComplete(T,p,0,x,w,k,0,x,w,k);else{var L=n.mallocDouble(2*T*c),A=n.mallocInt32(c);(c=d(h,T,L,A))>0&&(t.init(x+c),_=T===1?t.sweepBipartite(T,p,0,x,w,k,0,c,L,A):i(T,p,s,x,w,k,c,L,A),n.free(L),n.free(A))}n.free(w),n.free(k)}return _}}}function a(o,h){e.push([o,h])}function u(o){return e=[],l(o,o,a,!0),e}function f(o,h){return e=[],l(o,h,a,!1),e}},{"./lib/intersect":37,"./lib/sweep":41,"typedarray-pool":308}],36:[function(g,b,y){function e(n){return n?function(t,i,r,d,l,a,u,f,o,h,p){return l-d>o-f?function(s,x,c,T,_,w,k,L,A,I,P){for(var S=2*s,E=T,D=S*T;E<_;++E,D+=S){var F=w[x+D],H=w[x+D+s],V=k[E];e:for(var Z=L,K=S*L;Z<A;++Z,K+=S){var G=I[x+K],W=I[x+K+s],Q=P[Z];if(!(W<F||H<G)){for(var R=x+1;R<s;++R){var N=w[R+D],U=w[R+s+D],ee=I[R+K],j=I[R+s+K];if(U<ee||j<N)continue e}var X=c(V,Q);if(X!==void 0)return X}}}}(t,i,r,d,l,a,u,f,o,h,p):function(s,x,c,T,_,w,k,L,A,I,P){for(var S=2*s,E=L,D=S*L;E<A;++E,D+=S){var F=I[x+D],H=I[x+D+s],V=P[E];e:for(var Z=T,K=S*T;Z<_;++Z,K+=S){var G=w[x+K],W=w[x+K+s],Q=k[Z];if(!(H<G||W<F)){for(var R=x+1;R<s;++R){var N=w[R+K],U=w[R+s+K],ee=I[R+D],j=I[R+s+D];if(U<ee||j<N)continue e}var X=c(Q,V);if(X!==void 0)return X}}}}(t,i,r,d,l,a,u,f,o,h,p)}:function(t,i,r,d,l,a,u,f,o,h,p,s){return a-l>h-o?d?function(x,c,T,_,w,k,L,A,I,P,S){for(var E=2*x,D=_,F=E*_;D<w;++D,F+=E){var H=k[c+F],V=k[c+F+x],Z=L[D];e:for(var K=A,G=E*A;K<I;++K,G+=E){var W=P[c+G],Q=S[K];if(!(W<=H||V<W)){for(var R=c+1;R<x;++R){var N=k[R+F],U=k[R+x+F],ee=P[R+G],j=P[R+x+G];if(U<ee||j<N)continue e}var X=T(Q,Z);if(X!==void 0)return X}}}}(t,i,r,l,a,u,f,o,h,p,s):function(x,c,T,_,w,k,L,A,I,P,S){for(var E=2*x,D=_,F=E*_;D<w;++D,F+=E){var H=k[c+F],V=k[c+F+x],Z=L[D];e:for(var K=A,G=E*A;K<I;++K,G+=E){var W=P[c+G],Q=S[K];if(!(W<H||V<W)){for(var R=c+1;R<x;++R){var N=k[R+F],U=k[R+x+F],ee=P[R+G],j=P[R+x+G];if(U<ee||j<N)continue e}var X=T(Z,Q);if(X!==void 0)return X}}}}(t,i,r,l,a,u,f,o,h,p,s):d?function(x,c,T,_,w,k,L,A,I,P,S){for(var E=2*x,D=A,F=E*A;D<I;++D,F+=E){var H=P[c+F],V=S[D];e:for(var Z=_,K=E*_;Z<w;++Z,K+=E){var G=k[c+K],W=k[c+K+x],Q=L[Z];if(!(H<=G||W<H)){for(var R=c+1;R<x;++R){var N=k[R+K],U=k[R+x+K],ee=P[R+F],j=P[R+x+F];if(U<ee||j<N)continue e}var X=T(V,Q);if(X!==void 0)return X}}}}(t,i,r,l,a,u,f,o,h,p,s):function(x,c,T,_,w,k,L,A,I,P,S){for(var E=2*x,D=A,F=E*A;D<I;++D,F+=E){var H=P[c+F],V=S[D];e:for(var Z=_,K=E*_;Z<w;++Z,K+=E){var G=k[c+K],W=k[c+K+x],Q=L[Z];if(!(H<G||W<H)){for(var R=c+1;R<x;++R){var N=k[R+K],U=k[R+x+K],ee=P[R+F],j=P[R+x+F];if(U<ee||j<N)continue e}var X=T(Q,V);if(X!==void 0)return X}}}}(t,i,r,l,a,u,f,o,h,p,s)}}y.partial=e(!1),y.full=e(!0)},{}],37:[function(g,b,y){b.exports=function(k,L,A,I,P,S,E,D,F){(function(ke,be){var Se=8*n.log2(be+1)*(ke+1)|0,Oe=n.nextPow2(6*Se);x.length<Oe&&(e.free(x),x=e.mallocInt32(Oe));var De=n.nextPow2(2*Se);c.length<De&&(e.free(c),c=e.mallocDouble(De))})(k,I+E);var H,V=0,Z=2*k;for(T(V++,0,0,I,0,E,A?16:0,-1/0,1/0),A||T(V++,0,0,E,0,I,1,-1/0,1/0);V>0;){var K=6*(V-=1),G=x[K],W=x[K+1],Q=x[K+2],R=x[K+3],N=x[K+4],U=x[K+5],ee=2*V,j=c[ee],X=c[ee+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&&(Q=o(k,G,W,Q,ne,se,X),W>=Q)||4&U&&(W=h(k,G,W,Q,ne,se,j))>=Q)){var ce=Q-W,de=N-R;if(re){if(k*ce*(ce+de)<1<<22){if((H=d.scanComplete(k,G,L,W,Q,ne,se,R,N,oe,pe))!==void 0)return H;continue}}else{if(k*Math.min(ce,de)<128){if((H=i(k,G,L,J,W,Q,ne,se,R,N,oe,pe))!==void 0)return H;continue}if(k*ce*de<1<<22){if((H=d.scanBipartite(k,G,L,J,W,Q,ne,se,R,N,oe,pe))!==void 0)return H;continue}}var xe=u(k,G,W,Q,ne,se,j,X);if(W<xe)if(k*(xe-W)<128){if((H=r(k,G+1,L,W,xe,ne,se,R,N,oe,pe))!==void 0)return H}else if(G===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 T(V++,G+1,W,xe,R,N,J,-1/0,1/0),T(V++,G+1,R,N,W,xe,1^J,-1/0,1/0);if(xe<Q){var _e=l(k,G,R,N,oe,pe),we=oe[Z*_e+G],Ee=f(k,G,_e,N,oe,pe,we);if(Ee<N&&T(V++,G,xe,Q,Ee,N,(4|J)+(re?16:0),we,X),R<_e&&T(V++,G,xe,Q,R,_e,(2|J)+(re?16:0),j,we),_e+1===Ee){if((H=re?w(k,G,L,xe,Q,ne,se,_e,oe,pe[_e]):_(k,G,L,J,xe,Q,ne,se,_e,oe,pe[_e]))!==void 0)return H}else if(_e<Ee){var fe;if(re){if(fe=p(k,G,xe,Q,ne,se,we),xe<fe){var ge=f(k,G,xe,fe,ne,se,we);if(G===k-2){if(xe<ge&&(H=d.sweepComplete(k,L,xe,ge,ne,se,_e,Ee,oe,pe))!==void 0||ge<fe&&(H=d.sweepBipartite(k,L,ge,fe,ne,se,_e,Ee,oe,pe))!==void 0)return H}else xe<ge&&T(V++,G+1,xe,ge,_e,Ee,16,-1/0,1/0),ge<fe&&(T(V++,G+1,ge,fe,_e,Ee,0,-1/0,1/0),T(V++,G+1,_e,Ee,ge,fe,1,-1/0,1/0))}}else fe=J?s(k,G,xe,Q,ne,se,we):p(k,G,xe,Q,ne,se,we),xe<fe&&(G===k-2?H=J?d.sweepBipartite(k,L,_e,Ee,oe,pe,xe,fe,ne,se):d.sweepBipartite(k,L,xe,fe,ne,se,_e,Ee,oe,pe):(T(V++,G+1,xe,fe,_e,Ee,J,-1/0,1/0),T(V++,G+1,_e,Ee,xe,fe,1^J,-1/0,1/0)))}}}}};var e=g("typedarray-pool"),n=g("bit-twiddle"),t=g("./brute"),i=t.partial,r=t.full,d=g("./sweep"),l=g("./median"),a=g("./partition"),u=a("!(lo>=p0)&&!(p1>=hi)"),f=a("lo===p0"),o=a("lo<p0"),h=a("hi<=p0"),p=a("lo<=p0&&p0<=hi"),s=a("lo<p0&&p0<=hi"),x=e.mallocInt32(1024),c=e.mallocDouble(1024);function T(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;c[V]=D,c[V+1]=F}function _(k,L,A,I,P,S,E,D,F,H,V){var Z=2*k,K=F*Z,G=H[K+L];e:for(var W=P,Q=P*Z;W<S;++W,Q+=Z){var R=E[Q+L],N=E[Q+L+k];if(!(G<R||N<G)&&(!I||G!==R)){for(var U,ee=D[W],j=L+1;j<k;++j){R=E[Q+j],N=E[Q+j+k];var X=H[K+j],J=H[K+j+k];if(N<X||J<R)continue e}
1357if((U=I?A(V,ee):A(ee,V))!==void 0)return U}}}function w(k,L,A,I,P,S,E,D,F,H){var V=2*k,Z=D*V,K=F[Z+L];e:for(var G=I,W=I*V;G<P;++G,W+=V){var Q=E[G];if(Q!==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 ee=F[Z+U],j=F[Z+U+k];if(N<ee||j<R)continue e}var X=A(Q,H);if(X!==void 0)return X}}}}},{"./brute":36,"./median":38,"./partition":39,"./sweep":41,"bit-twiddle":32,"typedarray-pool":308}],38:[function(g,b,y){b.exports=function(t,i,r,d,l,a){if(d<=r+1)return r;for(var u=r,f=d,o=d+r>>>1,h=2*t,p=o,s=l[h*o+i];u<f;){if(f-u<8){n(t,i,u,f,l,a),s=l[h*o+i];break}var x=f-u,c=Math.random()*x+u|0,T=l[h*c+i],_=Math.random()*x+u|0,w=l[h*_+i],k=Math.random()*x+u|0,L=l[h*k+i];T<=w?L>=w?(p=_,s=w):T>=L?(p=c,s=T):(p=k,s=L):w>=L?(p=_,s=w):L>=T?(p=c,s=T):(p=k,s=L);for(var A=h*(f-1),I=h*p,P=0;P<h;++P,++A,++I){var S=l[A];l[A]=l[I],l[I]=S}var E=a[f-1];for(a[f-1]=a[p],a[p]=E,p=e(t,i,u,f-1,l,a,s),A=h*(f-1),I=h*p,P=0;P<h;++P,++A,++I)S=l[A],l[A]=l[I],l[I]=S;if(E=a[f-1],a[f-1]=a[p],a[p]=E,o<p){for(f=p-1;u<f&&l[h*(f-1)+i]===s;)f-=1;f+=1}else{if(!(p<o))break;for(u=p+1;u<f&&l[h*u+i]===s;)u+=1}}return e(t,i,r,o,l,a,l[h*o+i])};var e=g("./partition")("lo<p0");function n(t,i,r,d,l,a){for(var u=2*t,f=u*(r+1)+i,o=r+1;o<d;++o,f+=u)for(var h=l[f],p=o,s=u*(o-1);p>r&&l[s+i]>h;--p,s-=u){for(var x=s,c=s+u,T=0;T<u;++T,++x,++c){var _=l[x];l[x]=l[c],l[c]=_}var w=a[p];a[p]=a[p-1],a[p-1]=w}}},{"./partition":39}],39:[function(g,b,y){b.exports=function(n){return e[n]};var e={"lo===p0":function(n,t,i,r,d,l,a){for(var u=2*n,f=u*i,o=f,h=i,p=t,s=i;r>s;++s,f+=u)if(d[f+p]===a)if(h===s)h+=1,o+=u;else{for(var x=0;u>x;++x){var c=d[f+x];d[f+x]=d[o],d[o++]=c}var T=l[s];l[s]=l[h],l[h++]=T}return h},"lo<p0":function(n,t,i,r,d,l,a){for(var u=2*n,f=u*i,o=f,h=i,p=t,s=i;r>s;++s,f+=u)if(d[f+p]<a)if(h===s)h+=1,o+=u;else{for(var x=0;u>x;++x){var c=d[f+x];d[f+x]=d[o],d[o++]=c}var T=l[s];l[s]=l[h],l[h++]=T}return h},"lo<=p0":function(n,t,i,r,d,l,a){for(var u=2*n,f=u*i,o=f,h=i,p=n+t,s=i;r>s;++s,f+=u)if(d[f+p]<=a)if(h===s)h+=1,o+=u;else{for(var x=0;u>x;++x){var c=d[f+x];d[f+x]=d[o],d[o++]=c}var T=l[s];l[s]=l[h],l[h++]=T}return h},"hi<=p0":function(n,t,i,r,d,l,a){for(var u=2*n,f=u*i,o=f,h=i,p=n+t,s=i;r>s;++s,f+=u)if(d[f+p]<=a)if(h===s)h+=1,o+=u;else{for(var x=0;u>x;++x){var c=d[f+x];d[f+x]=d[o],d[o++]=c}var T=l[s];l[s]=l[h],l[h++]=T}return h},"lo<p0&&p0<=hi":function(n,t,i,r,d,l,a){for(var u=2*n,f=u*i,o=f,h=i,p=t,s=n+t,x=i;r>x;++x,f+=u){var c=d[f+p],T=d[f+s];if(c<a&&a<=T)if(h===x)h+=1,o+=u;else{for(var _=0;u>_;++_){var w=d[f+_];d[f+_]=d[o],d[o++]=w}var k=l[x];l[x]=l[h],l[h++]=k}}return h},"lo<=p0&&p0<=hi":function(n,t,i,r,d,l,a){for(var u=2*n,f=u*i,o=f,h=i,p=t,s=n+t,x=i;r>x;++x,f+=u){var c=d[f+p],T=d[f+s];if(c<=a&&a<=T)if(h===x)h+=1,o+=u;else{for(var _=0;u>_;++_){var w=d[f+_];d[f+_]=d[o],d[o++]=w}var k=l[x];l[x]=l[h],l[h++]=k}}return h},"!(lo>=p0)&&!(p1>=hi)":function(n,t,i,r,d,l,a,u){for(var f=2*n,o=f*i,h=o,p=i,s=t,x=n+t,c=i;r>c;++c,o+=f){var T=d[o+s],_=d[o+x];if(!(T>=a||u>=_))if(p===c)p+=1,h+=f;else{for(var w=0;f>w;++w){var k=d[o+w];d[o+w]=d[h],d[h++]=k}var L=l[c];l[c]=l[p],l[p++]=L}}return p}}},{}],40:[function(g,b,y){b.exports=function(a,u){u<=128?e(0,u-1,a):function f(o,h,p){var s=(h-o+1)/6|0,x=o+s,c=h-s,T=o+h>>1,_=T-s,w=T+s,k=x,L=_,A=T,I=w,P=c,S=o+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);for(var F=p[2*L],H=p[2*L+1],V=p[2*I],Z=p[2*I+1],K=2*k,G=2*A,W=2*P,Q=2*x,R=2*T,N=2*c,U=0;U<2;++U){var ee=p[K+U],j=p[G+U],X=p[W+U];p[Q+U]=ee,p[R+U]=j,p[N+U]=X}t(_,o,p),t(w,h,p);for(var J=S;J<=E;++J)if(l(J,F,H,p))J!==S&&n(J,S,p),++S;else if(!l(J,V,Z,p))for(;;){if(l(E,V,Z,p)){l(E,F,H,p)?(i(J,S,E,p),++S,--E):(n(J,E,p),--E);break}if(--E<J)break}r(o,S-1,F,H,p),r(h,E+1,V,Z,p),S-2-o<=32?e(o,S-2,p):f(o,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,a)};function e(a,u,f){for(var o=2*(a+1),h=a+1;h<=u;++h){for(var p=f[o++],s=f[o++],x=h,c=o-2;x-- >a;){var T=f[c-2],_=f[c-1];if(T<p||T===p&&_<s)break;f[c]=T,f[c+1]=_,c-=2}f[c]=p,f[c+1]=s}}function n(a,u,f){u*=2;var o=f[a*=2],h=f[a+1];f[a]=f[u],f[a+1]=f[u+1],f[u]=o,f[u+1]=h}function t(a,u,f){u*=2,f[a*=2]=f[u],f[a+1]=f[u+1]}function i(a,u,f,o){u*=2,f*=2;var h=o[a*=2],p=o[a+1];o[a]=o[u],o[a+1]=o[u+1],o[u]=o[f],o[u+1]=o[f+1],o[f]=h,o[f+1]=p}function r(a,u,f,o,h){u*=2,h[a*=2]=h[u],h[u]=f,h[a+1]=h[u+1],h[u+1]=o}function d(a,u,f){u*=2;var o=f[a*=2],h=f[u];return!(o<h)&&(o!==h||f[a+1]>f[u+1])}function l(a,u,f,o){var h=o[a*=2];return h<u||h===u&&o[a+1]<f}},{}],41:[function(g,b,y){b.exports={init:function(p){var s=n.nextPow2(p);i.length<s&&(e.free(i),i=e.mallocInt32(s)),r.length<s&&(e.free(r),r=e.mallocInt32(s)),d.length<s&&(e.free(d),d=e.mallocInt32(s)),l.length<s&&(e.free(l),l=e.mallocInt32(s)),a.length<s&&(e.free(a),a=e.mallocInt32(s)),u.length<s&&(e.free(u),u=e.mallocInt32(s));var x=8*s;f.length<x&&(e.free(f),f=e.mallocDouble(x))},sweepBipartite:function(p,s,x,c,T,_,w,k,L,A){for(var I=0,P=2*p,S=p-1,E=P-1,D=x;D<c;++D){var F=_[D],H=P*D;f[I++]=T[H+S],f[I++]=-(F+1),f[I++]=T[H+E],f[I++]=F}for(D=w;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,G=0;for(D=0;D<Z;++D){var W=0|f[2*D+1];if(W>=1<<28)o(d,l,G--,W=W-(1<<28)|0);else if(W>=0)o(i,r,K--,W);else if(W<=-(1<<28)){W=-W-(1<<28)|0;for(var Q=0;Q<K;++Q)if((R=s(i[Q],W))!==void 0)return R;h(d,l,G++,W)}else{for(W=-W-1|0,Q=0;Q<G;++Q){var R;if((R=s(W,d[Q]))!==void 0)return R}h(i,r,K++,W)}}},sweepComplete:function(p,s,x,c,T,_,w,k,L,A){for(var I=0,P=2*p,S=p-1,E=P-1,D=x;D<c;++D){var F=_[D]+1<<1,H=P*D;f[I++]=T[H+S],f[I++]=-F,f[I++]=T[H+E],f[I++]=F}for(D=w;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,G=0,W=0;for(D=0;D<Z;++D){var Q=0|f[2*D+1],R=1&Q;if(D<Z-1&&Q>>1==f[2*D+3]>>1&&(R=2,D+=1),Q<0){for(var N=-(Q>>1)-1,U=0;U<W;++U)if((ee=s(a[U],N))!==void 0)return ee;if(R!==0){for(U=0;U<K;++U)if((ee=s(i[U],N))!==void 0)return ee}if(R!==1)for(U=0;U<G;++U){var ee;if((ee=s(d[U],N))!==void 0)return ee}R===0?h(i,r,K++,N):R===1?h(d,l,G++,N):R===2&&h(a,u,W++,N)}else N=(Q>>1)-1,R===0?o(i,r,K--,N):R===1?o(d,l,G--,N):R===2&&o(a,u,W--,N)}},scanBipartite:function(p,s,x,c,T,_,w,k,L,A,I,P){var S=0,E=2*p,D=s,F=s+p,H=1,V=1;c?V=1<<28:H=1<<28;for(var Z=T;Z<_;++Z){var K=Z+H,G=E*Z;f[S++]=w[G+D],f[S++]=-K,f[S++]=w[G+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 Q=S>>>1;t(f,Q);var R=0;for(Z=0;
1357Z<Q;++Z){var N=0|f[2*Z+1];if(N<0){var U=!1;if((K=-N)>=1<<28?(U=!c,K-=1<<28):(U=!!c,K-=1),U)h(i,r,R++,K);else{var ee=P[K],j=E*K,X=I[j+s+1],J=I[j+s+1+p];e:for(var re=0;re<R;++re){var ne=i[re],se=E*ne;if(!(J<w[se+s+1]||w[se+s+1+p]<X)){for(var oe=s+2;oe<p;++oe)if(I[j+oe+p]<w[se+oe]||w[se+oe+p]<I[j+oe])continue e;var pe,ce=k[ne];if((pe=c?x(ee,ce):x(ce,ee))!==void 0)return pe}}}}else o(i,r,R--,N-H)}},scanComplete:function(p,s,x,c,T,_,w,k,L,A,I){for(var P=0,S=2*p,E=s,D=s+p,F=c;F<T;++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>>>1;t(f,K);var G=0;for(F=0;F<K;++F){var W=0|f[2*F+1];if(W<0)if((H=-W)>=1<<28)i[G++]=H-(1<<28);else{var Q=I[H-=1],R=S*H,N=A[R+s+1],U=A[R+s+1+p];e:for(var ee=0;ee<G;++ee){var j=i[ee],X=w[j];if(X===Q)break;var J=S*j;if(!(U<_[J+s+1]||_[J+s+1+p]<N)){for(var re=s+2;re<p;++re)if(A[R+re+p]<_[J+re]||_[J+re+p]<A[R+re])continue e;var ne=x(X,Q);if(ne!==void 0)return ne}}}else{for(H=W-(1<<28),ee=G-1;ee>=0;--ee)if(i[ee]===H){for(re=ee+1;re<G;++re)i[re-1]=i[re];break}--G}}}};var e=g("typedarray-pool"),n=g("bit-twiddle"),t=g("./sort"),i=e.mallocInt32(1024),r=e.mallocInt32(1024),d=e.mallocInt32(1024),l=e.mallocInt32(1024),a=e.mallocInt32(1024),u=e.mallocInt32(1024),f=e.mallocDouble(8192);function o(p,s,x,c){var T=s[c],_=p[x-1];p[T]=_,s[_]=T}function h(p,s,x,c){p[x]=c,s[c]=x}},{"./sort":40,"bit-twiddle":32,"typedarray-pool":308}],42:[function(g,b,y){var e=g("./lib/monotone"),n=g("./lib/triangulation"),t=g("./lib/delaunay"),i=g("./lib/filter");function r(a){return[Math.min(a[0],a[1]),Math.max(a[0],a[1])]}function d(a,u){return a[0]-u[0]||a[1]-u[1]}function l(a,u,f){return u in a?a[u]:f}b.exports=function(a,u,f){Array.isArray(u)?(f=f||{},u=u||[]):(f=u||{},u=[]);var o=!!l(f,"delaunay",!0),h=!!l(f,"interior",!0),p=!!l(f,"exterior",!0),s=!!l(f,"infinity",!1);if(!h&&!p||a.length===0)return[];var x=e(a,u);if(o||h!==p||s){for(var c=n(a.length,function(w){return w.map(r).sort(d)}(u)),T=0;T<x.length;++T){var _=x[T];c.addTriangle(_[0],_[1],_[2])}return o&&t(a,c),p?h?s?i(c,0,s):c.cells():i(c,1,s):i(c,-1)}return x}},{"./lib/delaunay":43,"./lib/filter":44,"./lib/monotone":45,"./lib/triangulation":46}],43:[function(g,b,y){var e=g("robust-in-sphere")[4];g("binary-search-bounds");function n(t,i,r,d,l,a){var u=i.opposite(d,l);if(!(u<0)){if(l<d){var f=d;d=l,l=f,f=a,a=u,u=f}i.isConstraint(d,l)||e(t[d],t[l],t[a],t[u])<0&&r.push(d,l)}}b.exports=function(t,i){for(var r=[],d=t.length,l=i.stars,a=0;a<d;++a)for(var u=l[a],f=1;f<u.length;f+=2)if(!((s=u[f])<a)&&!i.isConstraint(a,s)){for(var o=u[f-1],h=-1,p=1;p<u.length;p+=2)if(u[p-1]===s){h=u[p];break}h<0||e(t[a],t[s],t[o],t[h])<0&&r.push(a,s)}for(;r.length>0;){for(var s=r.pop(),x=(a=r.pop(),o=-1,h=-1,u=l[a],1);x<u.length;x+=2){var c=u[x-1],T=u[x];c===s?h=T:T===s&&(o=c)}o<0||h<0||e(t[a],t[s],t[o],t[h])>=0||(i.flip(a,s),n(t,i,r,o,a,h),n(t,i,r,a,h,o),n(t,i,r,h,s,o),n(t,i,r,s,o,h))}}},{"binary-search-bounds":31,"robust-in-sphere":282}],44:[function(g,b,y){var e,n=g("binary-search-bounds");function t(r,d,l,a,u,f,o){this.cells=r,this.neighbor=d,this.flags=a,this.constraint=l,this.active=u,this.next=f,this.boundary=o}function i(r,d){return r[0]-d[0]||r[1]-d[1]||r[2]-d[2]}b.exports=function(r,d,l){var a=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(i);var H=new Array(P);for(S=0;S<H.length;++S)H[S]=0;var V=[],Z=[],K=new Array(3*P),G=new Array(3*P),W=null;A&&(W=[]);var Q=new t(I,K,G,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]=Q.locate(D,E,L.opposite(D,E)),ee=G[3*S+N]=L.isConstraint(E,D);U<0&&(ee?Z.push(S):(V.push(S),H[S]=1),A&&W.push([D,E,-1]))}return Q}(r,l);if(d===0)return l?a.cells.concat(a.boundary):a.cells;for(var u=1,f=a.active,o=a.next,h=a.flags,p=a.cells,s=a.constraint,x=a.neighbor;f.length>0||o.length>0;){for(;f.length>0;){var c=f.pop();if(h[c]!==-u){h[c]=u,p[c];for(var T=0;T<3;++T){var _=x[3*c+T];_>=0&&h[_]===0&&(s[3*c+T]?o.push(_):(f.push(_),h[_]=u))}}}var w=o;o=f,f=w,o.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 l?k.concat(a.boundary):k},t.prototype.locate=(e=[0,0,0],function(r,d,l){var a=r,u=d,f=l;return d<l?d<r&&(a=d,u=l,f=r):l<r&&(a=l,u=r,f=d),a<0?-1:(e[0]=a,e[1]=u,e[2]=f,n.eq(this.cells,e,i))})}
1357,{"binary-search-bounds":31}],45:[function(g,b,y){var e=g("binary-search-bounds"),n=g("robust-orientation")[3];function t(o,h,p,s,x){this.a=o,this.b=h,this.idx=p,this.lowerIds=s,this.upperIds=x}function i(o,h,p,s){this.a=o,this.b=h,this.type=p,this.idx=s}function r(o,h){var p=o.a[0]-h.a[0]||o.a[1]-h.a[1]||o.type-h.type;return p||(o.type!==0&&(p=n(o.a,o.b,h.b))?p:o.idx-h.idx)}function d(o,h){return n(o.a,o.b,h)}function l(o,h,p,s,x){for(var c=e.lt(h,s,d),T=e.gt(h,s,d),_=c;_<T;++_){for(var w=h[_],k=w.lowerIds,L=k.length;L>1&&n(p[k[L-2]],p[k[L-1]],s)>0;)o.push([k[L-1],k[L-2],x]),L-=1;k.length=L,k.push(x);var A=w.upperIds;for(L=A.length;L>1&&n(p[A[L-2]],p[A[L-1]],s)<0;)o.push([A[L-2],A[L-1],x]),L-=1;A.length=L,A.push(x)}}function a(o,h){var p;return(p=o.a[0]<h.a[0]?n(o.a,o.b,h.a):n(h.b,h.a,o.a))?p:(p=h.b[0]<o.b[0]?n(o.a,o.b,h.b):n(h.b,h.a,o.b))||o.idx-h.idx}function u(o,h,p){var s=e.le(o,p,a),x=o[s],c=x.upperIds,T=c[c.length-1];x.upperIds=[T],o.splice(s+1,0,new t(p.a,p.b,p.idx,[T],c))}function f(o,h,p){var s=p.a;p.a=p.b,p.b=s;var x=e.eq(o,p,a),c=o[x];o[x-1].upperIds=c.upperIds,o.splice(x,1)}b.exports=function(o,h){for(var p=o.length,s=h.length,x=[],c=0;c<p;++c)x.push(new i(o[c],null,0,c));for(c=0;c<s;++c){var T=h[c],_=o[T[0]],w=o[T[1]];_[0]<w[0]?x.push(new i(_,w,2,c),new i(w,_,1,c)):_[0]>w[0]&&x.push(new i(w,_,2,c),new i(_,w,1,c))}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=(c=0,x.length);c<I;++c){var P=x[c],S=P.type;S===0?l(A,L,o,P.a,P.idx):S===2?u(L,o,P):f(L,o,P)}return A}},{"binary-search-bounds":31,"robust-orientation":284}],46:[function(g,b,y){var e=g("binary-search-bounds");function n(r,d){this.stars=r,this.edges=d}b.exports=function(r,d){for(var l=new Array(r),a=0;a<r;++a)l[a]=[];return new n(l,d)};var t=n.prototype;function i(r,d,l){for(var a=1,u=r.length;a<u;a+=2)if(r[a-1]===d&&r[a]===l)return r[a-1]=r[u-2],r[a]=r[u-1],void(r.length=u-2)}t.isConstraint=function(){var r=[0,0];function d(l,a){return l[0]-a[0]||l[1]-a[1]}return function(l,a){return r[0]=Math.min(l,a),r[1]=Math.max(l,a),e.eq(this.edges,r,d)>=0}}(),t.removeTriangle=function(r,d,l){var a=this.stars;i(a[r],d,l),i(a[d],l,r),i(a[l],r,d)},t.addTriangle=function(r,d,l){var a=this.stars;a[r].push(d,l),a[d].push(l,r),a[l].push(r,d)},t.opposite=function(r,d){for(var l=this.stars[d],a=1,u=l.length;a<u;a+=2)if(l[a]===r)return l[a-1];return-1},t.flip=function(r,d){var l=this.opposite(r,d),a=this.opposite(d,r);this.removeTriangle(r,d,l),this.removeTriangle(d,r,a),this.addTriangle(r,a,l),this.addTriangle(d,l,a)},t.edges=function(){for(var r=this.stars,d=[],l=0,a=r.length;l<a;++l)for(var u=r[l],f=0,o=u.length;f<o;f+=2)d.push([u[f],u[f+1]]);return d},t.cells=function(){for(var r=this.stars,d=[],l=0,a=r.length;l<a;++l)for(var u=r[l],f=0,o=u.length;f<o;f+=2){var h=u[f],p=u[f+1];l<Math.min(h,p)&&d.push([l,h,p])}return d}},{"binary-search-bounds":31}],47:[function(g,b,y){b.exports=function(e){for(var n=1,t=1;t<e.length;++t)for(var i=0;i<t;++i)if(e[t]<e[i])n=-n;else if(e[i]===e[t])return 0;return n}},{}],48:[function(g,b,y){var e=g("dup"),n=g("robust-linear-solve");function t(d,l){for(var a=0,u=d.length,f=0;f<u;++f)a+=d[f]*l[f];return a}function i(d){var l=d.length;if(l===0)return[];d[0].length;var a=e([d.length+1,d.length+1],1),u=e([d.length+1],1);a[l][l]=0;for(var f=0;f<l;++f){for(var o=0;o<=f;++o)a[o][f]=a[f][o]=2*t(d[f],d[o]);u[f]=t(d[f],d[f])}var h=n(a,u),p=0,s=h[l+1];for(f=0;f<s.length;++f)p+=s[f];var x=new Array(l);for(f=0;f<l;++f){s=h[f];var c=0;for(o=0;o<s.length;++o)c+=s[o];x[f]=c/p}return x}function r(d){if(d.length===0)return[];for(var l=d[0].length,a=e([l]),u=i(d),f=0;f<d.length;++f)for(var o=0;o<l;++o)a[o]+=d[f][o]*u[f];return a}r.barycenetric=i,b.exports=r},{dup:65,"robust-linear-solve":283}],49:[function(g,b,y){b.exports=function(n){for(var t=e(n),i=0,r=0;r<n.length;++r)for(var d=n[r],l=0;l<t.length;++l)i+=Math.pow(d[l]-t[l],2);return Math.sqrt(i/n.length)};var e=g("circumcenter")},{circumcenter:48}],50:[function(g,b,y){b.exports=function(T,_,w){var k;if(w){k=_;for(var L=new Array(_.length),A=0;A<_.length;++A){var I=_[A];L[A]=[I[0],I[1],w[A]]}_=L}for(var P=function(S,E,D){var F=h(S,[],o(S));return x(E,F,D),!!F}(T,_,!!w);c(T,_,!!w);)P=!0;if(w&&P)for(k.length=0,w.length=0,A=0;A<_.length;++A)I=_[A],k.push([I[0],I[1]]),w.push(I[2]);return P};var e=g("union-find"),n=g("box-intersect"),t=g("robust-segment-intersect"),i=g("big-rat"),r=g("big-rat/cmp"),d=g("big-rat/to-float"),l=g("rat-vec"),a=g("nextafter"),u=g("./lib/rat-seg-intersect");function f(T){var _=d(T);return[a(_,-1/0),a(_,1/0)]}function o(T){for(var _=new Array(T.length),w=0;w<T.length;++w){var k=T[w];_[w]=[a(k[0],-1/0),a(k[1],-1/0),a(k[0],1/0),a(k[1],1/0)]}return _}function h(T,_,w){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([a(S[0],-1/0),a(E[0],-1/0),a(S[1],1/0),a(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,T[V]=[Math.min(T[I][0],T[V][0]),Math.min(T[I][1],T[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,T[H++]=T[I]):F[I]=-1}for(T.length=H,I=0;I<k;++I)F[I]<0&&(F[I]=F[L.find(I)]);return F}function p(T,_){return T[0]-_[0]||T[1]-_[1]}function s(T,_){var w=T[0]-_[0]||T[1]-_[1];return w||(T[2]<_[2]?-1:T[2]>_[2]?1:0)}function x(T,_,w){if(T.length!==0){if(_)for(var k=0;k<T.length;++k){var L=_[(I=T[k])[0]],A=_[I[1]];I[0]=Math.min(L,A),I[1]=Math.max(L,A)}else for(k=0;k<T.length;++k){var I;L=(I=T[k])[0],A=I[1],I[0]=Math.min(L,A),I[1]=Math.max(L,A)}w?T.sort(s):T.sort(p);var P=1;for(k=1;k<T.length;++k){var S=T[k-1],E=T[k];(E[0]!==S[0]||E[1]!==S[1]||w&&E[2]!==S[2])&&(T[P++]=E)}T.length=P}}function c(T,_,w){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]=[a(Math.min(V[0],Z[0]),-1/0),a(Math.min(V[1],Z[1]),-1/0),a(Math.max(V[0],Z[0]),1/0),a(Math.max(V[1],Z[1]),1/0)]}return D}(T,_),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 G=S[Z[0]],W=S[Z[1]],Q=S[K[0]],R=S[K[1]];t(G,W,Q,R)&&F.push([H,V])}}),F}(T,_,k),A=o(T),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 G=S[Z],W=S[K[0]],Q=S[K[1]];t(W,Q,G,G)&&H.push([V,Z])}}),H}(T,_,k,A),P=h(T,function(S,E,D,F,H){var V,Z,K=S.map(function(de){return[i(de[0]),i(de[1])]});for(V=0;V<D.length;++V){var G=D[V];Z=G[0];var W=G[1],Q=E[Z],R=E[W],N=u(l(S[Q[0]]),l(S[Q[1]]),l(S[R[0]]),l(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 _e=K[de[1]],we=K[xe[1]];return r(_e[0],we[0])||r(_e[1],we[1])}),V=F.length-1;V>=0;--V){var ee=E[Z=(pe=F[V])[0]],j=ee[0],X=ee[1],J=S[j],re=S[X];if((J[0]-re[0]||J[1]-re[1])<0){var ne=j;j=X,X=ne}ee[0]=j;var se,oe=ee[1]=pe[1];for(H&&(se=ee[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}(T,_,L,I,w));return x(_,P,w),!!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(g,b,y){b.exports=function(u,f,o,h){var p=r(f,u),s=r(h,o),x=a(p,s);if(i(x)===0)return null;var c=r(u,o),T=a(s,c),_=n(T,x),w=l(p,_);return d(u,w)};var e=g("big-rat/mul"),n=g("big-rat/div"),t=g("big-rat/sub"),i=g("big-rat/sign"),r=g("rat-vec/sub"),d=g("rat-vec/add"),l=g("rat-vec/muls");function a(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(g,b,y){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(g,b,y){var e=g("./colorScale"),n=g("lerp");function t(d){return[d[0]/255,d[1]/255,d[2]/255,d[3]]}function i(d){for(var l,a="#",u=0;u<3;++u)a+=("00"+(l=(l=d[u]).toString(16))).substr(l.length);return a}function r(d){return"rgba("+d.join(",")+")"}b.exports=function(d){var l,a,u,f,o,h,p,s,x,c;if(d||(d={}
1357),s=(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");o=e[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);o=h.slice()}if(o.length>s+1)throw new Error(h+" map requires nshades to be at least size "+o.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],l=o.map(function(L){return Math.round(L.index*s)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var T=o.map(function(L,A){var I=o[A].index,P=o[A].rgb.slice();return P.length===4&&P[3]>=0&&P[3]<=1||(P[3]=x[0]+(x[1]-x[0])*I),P}),_=[];for(c=0;c<l.length-1;++c){f=l[c+1]-l[c],a=T[c],u=T[c+1];for(var w=0;w<f;w++){var k=w/f;_.push([Math.round(n(a[0],u[0],k)),Math.round(n(a[1],u[1],k)),Math.round(n(a[2],u[2],k)),n(a[3],u[3],k)])}}return _.push(o[o.length-1].rgb.concat(x[1])),p==="hex"?_=_.map(i):p==="rgbaString"?_=_.map(r):p==="float"&&(_=_.map(t)),_}},{"./colorScale":52,lerp:240}],54:[function(g,b,y){b.exports=function(l,a,u,f){var o=e(a,u,f);if(o===0){var h=n(e(l,a,u)),p=n(e(l,a,f));if(h===p){if(h===0){var s=d(l,a,u),x=d(l,a,f);return s===x?0:s?1:-1}return 0}return p===0?h>0||d(l,a,f)?-1:1:h===0?p>0||d(l,a,u)?1:-1:n(p-h)}var c=e(l,a,u);return c>0?o>0&&e(l,a,f)>0?1:-1:c<0?o>0||e(l,a,f)>0?1:-1:e(l,a,f)>0||d(l,a,u)?1:-1};var e=g("robust-orientation"),n=g("signum"),t=g("two-sum"),i=g("robust-product"),r=g("robust-sum");function d(l,a,u){var f=t(l[0],-a[0]),o=t(l[1],-a[1]),h=t(u[0],-a[0]),p=t(u[1],-a[1]),s=r(i(f,h),i(o,p));return s[s.length-1]>=0}},{"robust-orientation":284,"robust-product":285,"robust-sum":289,signum:55,"two-sum":307}],55:[function(g,b,y){b.exports=function(e){return e<0?-1:e>0?1:0}},{}],56:[function(g,b,y){b.exports=function(t,i){var r=t.length,d=t.length-i.length;if(d)return d;switch(r){case 0:return 0;case 1:return t[0]-i[0];case 2:return t[0]+t[1]-i[0]-i[1]||e(t[0],t[1])-e(i[0],i[1]);case 3:var l=t[0]+t[1],a=i[0]+i[1];if(d=l+t[2]-(a+i[2]))return d;var u=e(t[0],t[1]),f=e(i[0],i[1]);return e(u,t[2])-e(f,i[2])||e(u+t[2],l)-e(f+i[2],a);case 4:var o=t[0],h=t[1],p=t[2],s=t[3],x=i[0],c=i[1],T=i[2],_=i[3];return o+h+p+s-(x+c+T+_)||e(o,h,p,s)-e(x,c,T,_,x)||e(o+h,o+p,o+s,h+p,h+s,p+s)-e(x+c,x+T,x+_,c+T,c+_,T+_)||e(o+h+p,o+h+s,o+p+s,h+p+s)-e(x+c+T,x+c+_,x+T+_,c+T+_);default:for(var w=t.slice().sort(n),k=i.slice().sort(n),L=0;L<r;++L)if(d=w[L]-k[L])return d;return 0}};var e=Math.min;function n(t,i){return t-i}},{}],57:[function(g,b,y){var e=g("compare-cell"),n=g("cell-orientation");b.exports=function(t,i){return e(t,i)||n(t)-n(i)}},{"cell-orientation":47,"compare-cell":56}],58:[function(g,b,y){var e=g("./lib/ch1d"),n=g("./lib/ch2d"),t=g("./lib/chnd");b.exports=function(i){var r=i.length;if(r===0)return[];if(r===1)return[[0]];var d=i[0].length;return d===0?[]:d===1?e(i):d===2?n(i):t(i,d)}},{"./lib/ch1d":59,"./lib/ch2d":60,"./lib/chnd":61}],59:[function(g,b,y){b.exports=function(e){for(var n=0,t=0,i=1;i<e.length;++i)e[i][0]<e[n][0]&&(n=i),e[i][0]>e[t][0]&&(t=i);return n<t?[[n],[t]]:n>t?[[t],[n]]:[[n]]}},{}],60:[function(g,b,y){b.exports=function(n){var t=e(n),i=t.length;if(i<=2)return[];for(var r=new Array(i),d=t[i-1],l=0;l<i;++l){var a=t[l];r[l]=[d,a],d=a}return r};var e=g("monotone-convex-hull-2d")},{"monotone-convex-hull-2d":246}],61:[function(g,b,y){b.exports=function(t,i){try{return e(t,!0)}catch{var r=n(t);if(r.length<=i)return[];var d=function(a,u){for(var f=a.length,o=new Array(f),h=0;h<u.length;++h)o[h]=a[u[h]];var p=u.length;for(h=0;h<f;++h)u.indexOf(h)<0&&(o[p++]=a[h]);return o}(t,r);return function(a,u){for(var f=a.length,o=u.length,h=0;h<f;++h)for(var p=a[h],s=0;s<p.length;++s){var x=p[s];if(x<o)p[s]=u[x];else{x-=o;for(var c=0;c<o;++c)x>=u[c]&&(x+=1);p[s]=x}}return a}(e(d,!0),r)}};var e=g("incremental-convex-hull"),n=g("affine-hull")},{"affine-hull":10,"incremental-convex-hull":233}],62:[function(g,b,y){b.exports=function(e,n,t,i,r,d){var l=r-1,a=r*r,u=l*l,f=(1+2*r)*u,o=r*u,h=a*(3-2*r),p=a*l;if(e.length){d||(d=new Array(e.length));for(var s=e.length-1;s>=0;--s)d[s]=f*e[s]+o*n[s]+h*t[s]+p*i[s];return d}return f*e+o*n+h*t+p*i},b.exports.derivative=function(e,n,t,i,r,d){var l=6*r*r-6*r,a=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 o=e.length-1;o>=0;--o)d[o]=l*e[o]+a*n[o]+u*t[o]+f*i[o];return d}return l*e+a*n+u*t[o]+f*i}},{}],63:[function(g,b,y){var e=g("incremental-convex-hull"),n=g("uniq");function t(r,d){this.point=r,this.index=d}function i(r,d){for(var l=r.point,a=d.point,u=l.length,f=0;f<u;++f){var o=a[f]-l[f];if(o)return o}return 0}b.exports=function(r,d){var l=r.length;if(l===0)return[];var a=r[0].length;if(a<1)return[];
1357if(a===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}(l,r,d);for(var u=new Array(l),f=1,o=0;o<l;++o){for(var h=r[o],p=new Array(a+1),s=0,x=0;x<a;++x){var c=h[x];p[x]=c,s+=c*c}p[a]=s,u[o]=new t(p,o),f=Math.max(s,f)}n(u,i),l=u.length;var T=new Array(l+a+1),_=new Array(l+a+1),w=(a+1)*(a+1)*f,k=new Array(a+1);for(o=0;o<=a;++o)k[o]=0;for(k[a]=w,T[0]=k.slice(),_[0]=-1,o=0;o<=a;++o)(p=k.slice())[o]=1,T[o+1]=p,_[o+1]=-1;for(o=0;o<l;++o){var L=u[o];T[o+a+1]=L.point,_[o+a+1]=L.index}var A=e(T,!1);if(A=d?A.filter(function(I){for(var P=0,S=0;S<=a;++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<=a;++P){var S=_[I[P]];if(S<0)return!1;I[P]=S}return!0}),1&a)for(o=0;o<A.length;++o)p=(L=A[o])[0],L[0]=L[1],L[1]=p;return A}},{"incremental-convex-hull":233,uniq:310}],64:[function(g,b,y){(function(e){(function(){var n=!1;if(typeof Float64Array<"u"){var t=new Float64Array(1),i=new Uint32Array(t.buffer);t[0]=1,n=!0,i[1]===1072693248?(b.exports=function(d){return t[0]=d,[i[0],i[1]]},b.exports.pack=function(d,l){return i[0]=d,i[1]=l,t[0]},b.exports.lo=function(d){return t[0]=d,i[0]},b.exports.hi=function(d){return t[0]=d,i[1]}):i[0]===1072693248?(b.exports=function(d){return t[0]=d,[i[1],i[0]]},b.exports.pack=function(d,l){return i[1]=d,i[0]=l,t[0]},b.exports.lo=function(d){return t[0]=d,i[1]},b.exports.hi=function(d){return t[0]=d,i[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,l){return r.writeUInt32LE(d,0,!0),r.writeUInt32LE(l,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 l=b.exports.lo(d),a=b.exports.hi(d),u=1048575&a;return 2146435072&a&&(u+=1<<20),[l,u]},b.exports.denormalized=function(d){return!(2146435072&b.exports.hi(d))}}).call(this)}).call(this,g("buffer").Buffer)},{buffer:3}],65:[function(g,b,y){b.exports=function(e,n){switch(n===void 0&&(n=0),typeof e){case"number":if(e>0)return function(t,i){var r,d;for(r=new Array(t),d=0;d<t;++d)r[d]=i;return r}(0|e,n);break;case"object":if(typeof e.length=="number")return function t(i,r,d){var l=0|i[d];if(l<=0)return[];var a,u=new Array(l);if(d===i.length-1)for(a=0;a<l;++a)u[a]=r;else for(a=0;a<l;++a)u[a]=t(i,r,d+1);return u}(e,n,0)}return[]}},{}],66:[function(g,b,y){b.exports=function(n,t){var i=n.length;if(typeof t!="number"){t=0;for(var r=0;r<i;++r){var d=n[r];t=Math.max(t,d[0],d[1])}t=1+(0|t)}t|=0;var l=new Array(t);for(r=0;r<t;++r)l[r]=[];for(r=0;r<i;++r)d=n[r],l[d[0]].push(d[1]),l[d[1]].push(d[0]);for(var a=0;a<t;++a)e(l[a],function(u,f){return u-f});return l};var e=g("uniq")},{uniq:310}],67:[function(g,b,y){b.exports=function(e,n,t){var i=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]],[i*e[12]+e[8],i*e[13]+e[9],i*e[14]+e[10],i*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(g,b,y){b.exports=function(l,a,u){switch(arguments.length){case 0:return new i([0],[0],0);case 1:return typeof l=="number"?new i(f=d(l),f,0):new i(l,d(l.length),0);case 2:if(typeof a=="number"){var f=d(l.length);return new i(l,f,+a)}u=0;case 3:if(l.length!==a.length)throw new Error("state and velocity lengths must match");return new i(l,a,u)}};var e=g("cubic-hermite"),n=g("binary-search-bounds");function t(l,a,u){return Math.min(a,Math.max(l,u))}function i(l,a,u){this.dimension=l.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=l.slice().reverse(),this._velocity=a.slice().reverse(),this._time=[u],this._scratch=[l.slice(),l.slice(),l.slice(),l.slice(),l.slice()]}
1357var r=i.prototype;function d(l){for(var a=new Array(l),u=0;u<l;++u)a[u]=0;return a}r.flush=function(l){var a=n.gt(this._time,l)-1;a<=0||(this._time.splice(0,a),this._state.splice(0,a*this.dimension),this._velocity.splice(0,a*this.dimension))},r.curve=function(l){var a=this._time,u=a.length,f=n.le(a,l),o=this._scratch[0],h=this._state,p=this._velocity,s=this.dimension,x=this.bounds;if(f<0)for(var c=s-1,T=0;T<s;++T,--c)o[T]=h[c];else if(f>=u-1){c=h.length-1;var _=l-a[u-1];for(T=0;T<s;++T,--c)o[T]=h[c]+_*p[c]}else{c=s*(f+1)-1;var w=a[f],k=a[f+1]-w||1,L=this._scratch[1],A=this._scratch[2],I=this._scratch[3],P=this._scratch[4],S=!0;for(T=0;T<s;++T,--c)L[T]=h[c],I[T]=p[c]*k,A[T]=h[c+s],P[T]=p[c+s]*k,S=S&&L[T]===A[T]&&I[T]===P[T]&&I[T]===0;if(S)for(T=0;T<s;++T)o[T]=L[T];else e(L,I,A,P,(l-w)/k,o)}var E=x[0],D=x[1];for(T=0;T<s;++T)o[T]=t(E[T],D[T],o[T]);return o},r.dcurve=function(l){var a=this._time,u=a.length,f=n.le(a,l),o=this._scratch[0],h=this._state,p=this._velocity,s=this.dimension;if(f>=u-1)for(var x=h.length-1,c=(a[u-1],0);c<s;++c,--x)o[c]=p[x];else{x=s*(f+1)-1;var T=a[f],_=a[f+1]-T||1,w=this._scratch[1],k=this._scratch[2],L=this._scratch[3],A=this._scratch[4],I=!0;for(c=0;c<s;++c,--x)w[c]=h[x],L[c]=p[x]*_,k[c]=h[x+s],A[c]=p[x+s]*_,I=I&&w[c]===k[c]&&L[c]===A[c]&&L[c]===0;if(I)for(c=0;c<s;++c)o[c]=0;else for(e.derivative(w,L,k,A,(l-T)/_,o),c=0;c<s;++c)o[c]/=_}return o},r.lastT=function(){var l=this._time;return l[l.length-1]},r.stable=function(){for(var l=this._velocity,a=l.length,u=this.dimension-1;u>=0;--u)if(l[--a])return!1;return!0},r.jump=function(l){var a=this.lastT(),u=this.dimension;if(!(l<a||arguments.length!==u+1)){var f=this._state,o=this._velocity,h=f.length-this.dimension,p=this.bounds,s=p[0],x=p[1];this._time.push(a,l);for(var c=0;c<2;++c)for(var T=0;T<u;++T)f.push(f[h++]),o.push(0);for(this._time.push(l),T=u;T>0;--T)f.push(t(s[T-1],x[T-1],arguments[T])),o.push(0)}},r.push=function(l){var a=this.lastT(),u=this.dimension;if(!(l<a||arguments.length!==u+1)){var f=this._state,o=this._velocity,h=f.length-this.dimension,p=l-a,s=this.bounds,x=s[0],c=s[1],T=p>1e-6?1/p:0;this._time.push(l);for(var _=u;_>0;--_){var w=t(x[_-1],c[_-1],arguments[_]);f.push(w),o.push((w-f[h++])*T)}}},r.set=function(l){var a=this.dimension;if(!(l<this.lastT()||arguments.length!==a+1)){var u=this._state,f=this._velocity,o=this.bounds,h=o[0],p=o[1];this._time.push(l);for(var s=a;s>0;--s)u.push(t(h[s-1],p[s-1],arguments[s])),f.push(0)}},r.move=function(l){var a=this.lastT(),u=this.dimension;if(!(l<=a||arguments.length!==u+1)){var f=this._state,o=this._velocity,h=f.length-this.dimension,p=this.bounds,s=p[0],x=p[1],c=l-a,T=c>1e-6?1/c:0;this._time.push(l);for(var _=u;_>0;--_){var w=arguments[_];f.push(t(s[_-1],x[_-1],f[h++]+w)),o.push(w*T)}}},r.idle=function(l){var a=this.lastT();if(!(l<a)){var u=this.dimension,f=this._state,o=this._velocity,h=f.length-u,p=this.bounds,s=p[0],x=p[1],c=l-a;this._time.push(l);for(var T=u-1;T>=0;--T)f.push(t(s[T],x[T],f[h]+c*o[h])),o.push(0),h+=1}}},{"binary-search-bounds":31,"cubic-hermite":62}],69:[function(g,b,y){b.exports=function(s){return new r(s||p,null)};function e(s,x,c,T,_,w){this._color=s,this.key=x,this.value=c,this.left=T,this.right=_,this._count=w}function n(s){return new e(s._color,s.key,s.value,s.left,s.right,s._count)}function t(s,x){return new e(s,x.key,x.value,x.left,x.right,x._count)}function i(s){s._count=1+(s.left?s.left._count:0)+(s.right?s.right._count:0)}function r(s,x){this._compare=s,this.root=x}var d=r.prototype;function l(s,x){var c;return x.left&&(c=l(s,x.left))?c:(c=s(x.key,x.value))||(x.right?l(s,x.right):void 0)}function a(s,x,c,T){if(x(s,T.key)<=0){var _;if(T.left&&(_=a(s,x,c,T.left))||(_=c(T.key,T.value)))return _}if(T.right)return a(s,x,c,T.right)}function u(s,x,c,T,_){var w,k=c(s,_.key),L=c(x,_.key);if(k<=0&&(_.left&&(w=u(s,x,c,T,_.left))||L>0&&(w=T(_.key,_.value))))return w;if(L>0&&_.right)return u(s,x,c,T,_.right)}function f(s,x){this.tree=s,this._stack=x}Object.defineProperty(d,"keys",{get:function(){var s=[];return this.forEach(function(x,c){s.push(x)}),s}}),Object.defineProperty(d,"values",{get:function(){var s=[];return this.forEach(function(x,c){s.push(c)}),s}}),Object.defineProperty(d,"length",{get:function(){return this.root?this.root._count:0}}),d.insert=function(s,x){for(var c=this._compare,T=this.root,_=[],w=[];T;){var k=c(s,T.key);_.push(T),w.push(k),T=k<=0?T.left:T.right}
1357_.push(new e(0,s,x,null,null,1));for(var L=_.length-2;L>=0;--L)T=_[L],w[L]<=0?_[L]=new e(T._color,T.key,T.value,_[L+1],T.right,T._count+1):_[L]=new e(T._color,T.key,T.value,T.left,_[L+1],T._count+1);for(L=_.length-1;L>1;--L){var A=_[L-1];if(T=_[L],A._color===1||T._color===1)break;var I=_[L-2];if(I.left===A)if(A.left===T){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]=T,i(I),i(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=T.left,I._color=0,I.left=T.right,T._color=1,T.left=A,T.right=I,_[L-2]=T,_[L-1]=A,i(I),i(A),i(T),L>=3&&((S=_[L-3]).left===I?S.left=T:S.right=T);break}A._color=1,I.right=t(1,P),I._color=0,L-=1}else if(A.right===T){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]=T,i(I),i(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=T.right,I._color=0,I.right=T.left,T._color=1,T.right=A,T.left=I,_[L-2]=T,_[L-1]=A,i(I),i(A),i(T),L>=3&&((S=_[L-3]).right===I?S.right=T:S.left=T);break}A._color=1,I.left=t(1,P),I._color=0,L-=1}}return _[0]._color=1,new r(c,_[0])},d.forEach=function(s,x,c){if(this.root)switch(arguments.length){case 1:return l(s,this.root);case 2:return a(x,this._compare,s,this.root);case 3:return this._compare(x,c)>=0?void 0:u(x,c,this._compare,s,this.root)}},Object.defineProperty(d,"begin",{get:function(){for(var s=[],x=this.root;x;)s.push(x),x=x.left;return new f(this,s)}}),Object.defineProperty(d,"end",{get:function(){for(var s=[],x=this.root;x;)s.push(x),x=x.right;return new f(this,s)}}),d.at=function(s){if(s<0)return new f(this,[]);for(var x=this.root,c=[];;){if(c.push(x),x.left){if(s<x.left._count){x=x.left;continue}s-=x.left._count}if(!s)return new f(this,c);if(s-=1,!x.right||s>=x.right._count)break;x=x.right}return new f(this,[])},d.ge=function(s){for(var x=this._compare,c=this.root,T=[],_=0;c;){var w=x(s,c.key);T.push(c),w<=0&&(_=T.length),c=w<=0?c.left:c.right}return T.length=_,new f(this,T)},d.gt=function(s){for(var x=this._compare,c=this.root,T=[],_=0;c;){var w=x(s,c.key);T.push(c),w<0&&(_=T.length),c=w<0?c.left:c.right}return T.length=_,new f(this,T)},d.lt=function(s){for(var x=this._compare,c=this.root,T=[],_=0;c;){var w=x(s,c.key);T.push(c),w>0&&(_=T.length),c=w<=0?c.left:c.right}return T.length=_,new f(this,T)},d.le=function(s){for(var x=this._compare,c=this.root,T=[],_=0;c;){var w=x(s,c.key);T.push(c),w>=0&&(_=T.length),c=w<0?c.left:c.right}return T.length=_,new f(this,T)},d.find=function(s){for(var x=this._compare,c=this.root,T=[];c;){var _=x(s,c.key);if(T.push(c),_===0)return new f(this,T);c=_<=0?c.left:c.right}return new f(this,[])},d.remove=function(s){var x=this.find(s);return x?x.remove():this},d.get=function(s){for(var x=this._compare,c=this.root;c;){var T=x(s,c.key);if(T===0)return c.value;c=T<=0?c.left:c.right}};var o=f.prototype;function h(s,x){s.key=x.key,s.value=x.value,s.left=x.left,s.right=x.right,s._color=x._color,s._count=x._count}function p(s,x){return s<x?-1:s>x?1:0}Object.defineProperty(o,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(o,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),o.clone=function(){return new f(this.tree,this._stack.slice())},o.remove=function(){var s=this._stack;if(s.length===0)return this.tree;var x=new Array(s.length),c=s[s.length-1];x[x.length-1]=new e(c._color,c.key,c.value,c.left,c.right,c._count);for(var T=s.length-2;T>=0;--T)(c=s[T]).left===s[T+1]?x[T]=new e(c._color,c.key,c.value,x[T+1],c.right,c._count):x[T]=new e(c._color,c.key,c.value,c.left,x[T+1],c._count);if((c=x[x.length-1]).left&&c.right){var _=x.length;for(c=c.left;c.right;)x.push(c),c=c.right;var w=x[_-1];for(x.push(new e(c._color,w.key,w.value,c.left,c.right,c._count)),x[_-1].key=c.key,x[_-1].value=c.value,T=x.length-2;T>=_;--T)c=x[T],x[T]=new e(c._color,c.key,c.value,c.left,x[T+1],c._count);x[_-1].left=x[_]}if((c=x[x.length-1])._color===0){var k=x[x.length-2];for(k.left===c?k.left=null:k.right===c&&(k.right=null),x.pop(),T=0;T<x.length;++T)x[T]._count--;return new r(this.tree._compare,x[0])}if(c.left||c.right){for(c.left?h(c,c.left):c.right&&h(c,c.right),c._color=1,T=0;T<x.length-1;++T)x[T]._count--;return new r(this.tree._compare,x[0])}if(x.length===1)return new r(this.tree._compare,null);for(T=0;T<x.length;++T)x[T]._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,i(P),i(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,i(P),i(S),i(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,i(P),i(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,i(P),i(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,i(P),i(S),i(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,i(P),i(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===c?L.left=null:L.right=null,new r(this.tree._compare,x[0])},Object.defineProperty(o,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(o,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(o,"index",{get:function(){var s=0,x=this._stack;if(x.length===0){var c=this.tree.root;return c?c._count:0}x[x.length-1].left&&(s=x[x.length-1].left._count);for(var T=x.length-2;T>=0;--T)x[T+1]===x[T].right&&(++s,x[T].left&&(s+=x[T].left._count));return s},enumerable:!0}),o.next=function(){var s=this._stack;if(s.length!==0){var x=s[s.length-1];if(x.right)for(x=x.right;x;)s.push(x),x=x.left;else for(s.pop();s.length>0&&s[s.length-1].right===x;)x=s[s.length-1],s.pop()}},Object.defineProperty(o,"hasNext",{get:function(){var s=this._stack;if(s.length===0)return!1;if(s[s.length-1].right)return!0;for(var x=s.length-1;x>0;--x)if(s[x-1].left===s[x])return!0;return!1}}),o.update=function(s){var x=this._stack;if(x.length===0)throw new Error("Can't update empty node!");var c=new Array(x.length),T=x[x.length-1];c[c.length-1]=new e(T._color,T.key,s,T.left,T.right,T._count);for(var _=x.length-2;_>=0;--_)(T=x[_]).left===x[_+1]?c[_]=new e(T._color,T.key,T.value,c[_+1],T.right,T._count):c[_]=new e(T._color,T.key,T.value,T.left,c[_+1],T._count);return new r(this.tree._compare,c[0])},o.prev=function(){var s=this._stack;if(s.length!==0){var x=s[s.length-1];if(x.left)for(x=x.left;x;)s.push(x),x=x.right;else for(s.pop();s.length>0&&s[s.length-1].left===x;)x=s[s.length-1],s.pop()}},Object.defineProperty(o,"hasPrev",{get:function(){var s=this._stack;if(s.length===0)return!1;if(s[s.length-1].left)return!0;for(var x=s.length-1;x>0;--x)if(s[x-1].right===s[x])return!0;return!1}})},{}],70:[function(g,b,y){b.exports=function(_,w){var k=new a(_);return k.update(w),k};var e=g("./lib/text.js"),n=g("./lib/lines.js"),t=g("./lib/background.js"),i=g("./lib/cube.js"),r=g("./lib/ticks.js"),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function l(_,w){return _[0]=w[0],_[1]=w[1],_[2]=w[2],_}function a(_){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=a.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 w(Z,K,G){if(G in _){var W,Q=_[G],R=this[G];(Z?Array.isArray(Q)&&Array.isArray(Q[0]):Array.isArray(Q))?this[G]=W=[K(Q[0]),K(Q[1]),K(Q[2])]:this[G]=W=[K(Q),K(Q),K(Q)];for(var N=0;N<3;++N)if(W[N]!==R[N])return!0}return!1}_=_||{};var k,L=w.bind(this,!1,Number),A=w.bind(this,!1,Boolean),I=w.bind(this,!1,String),P=w.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 o=[new f,new f,new f];function h(_,w,k,L,A){for(var I=_.primalOffset,P=_.primalMinor,S=_.mirrorOffset,E=_.mirrorMinor,D=L[w],F=0;F<3;++F)if(w!==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],s={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],c=[0,0,0],T=[0,0,0];u.draw=function(_){_=_||s;for(var w=this.gl,k=_.model||d,L=_.view||d,A=_.projection||d,I=this.bounds,P=_._ortho||!1,S=i(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)/w.drawingBufferHeight,G=0;G<3;++G)this.lastCubeProps.cubeEdges[G]=E[G],this.lastCubeProps.axis[G]=D[G];var W=o;for(G=0;G<3;++G)h(o[G],G,this.bounds,E,D);w=this.gl;var Q,R=p;for(G=0;G<3;++G)this.backgroundEnable[G]?R[G]=D[G]:R[G]=0;for(this._background.draw(k,L,A,I,R,this.backgroundColor),this._lines.bind(k,L,A,this),G=0;G<3;++G){var N=[0,0,0];D[G]>0?N[G]=I[1][G]:N[G]=I[0][G];for(var U=0;U<2;++U){var ee=(G+1+U)%3,j=(G+1+(1^U))%3;this.gridEnable[ee]&&this._lines.drawGrid(ee,j,this.bounds,N,this.gridColor[ee],this.gridWidth[ee]*this.pixelRatio)}for(U=0;U<2;++U)ee=(G+1+U)%3,j=(G+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(ee,j,this.bounds,N,this.zeroLineColor[j],this.zeroLineWidth[j]*this.pixelRatio)}for(G=0;G<3;++G){this.lineEnable[G]&&this._lines.drawAxisLine(G,this.bounds,W[G].primalOffset,this.lineColor[G],this.lineWidth[G]*this.pixelRatio),this.lineMirror[G]&&this._lines.drawAxisLine(G,this.bounds,W[G].mirrorOffset,this.lineColor[G],this.lineWidth[G]*this.pixelRatio);var X=l(x,W[G].primalMinor),J=l(c,W[G].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[G]&&this._lines.drawAxisTicks(G,W[G].primalOffset,X,this.lineTickColor[G],this.lineTickWidth[G]*this.pixelRatio),this.lineTickMirror[G]&&this._lines.drawAxisTicks(G,W[G].mirrorOffset,J,this.lineTickColor[G],this.lineTickWidth[G]*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,ge){var ke=(Ee+1)%3,be=(Ee+2)%3,Se=fe[ke],Oe=fe[be],De=ge[ke],je=ge[be];Se>0&&je>0||Se>0&&je<0||Se<0&&je>0||Se<0&&je<0?pe(ke):(Oe>0&&De>0||Oe>0&&De<0||Oe<0&&De>0||Oe<0&&De<0)&&pe(be)}for(G=0;G<3;++G){var de=W[G].primalMinor,xe=W[G].mirrorMinor,_e=l(T,W[G].primalOffset);for(U=0;U<3;++U)this.lineTickEnable[G]&&(_e[U]+=K*de[U]*Math.max(this.lineTickLength[U],0)/k[5*U]);var we=[0,0,0];if(we[G]=1,this.tickEnable[G]){for(this.tickAngle[G]===-3600?(this.tickAngle[G]=0,this.tickAlign[G]="auto"):this.tickAlign[G]=-1,se=1,(Q=[this.tickAlign[G],.5,se])[0]==="auto"?Q[0]=0:Q[0]=parseInt(""+Q[0]),oe=[0,0,0],ce(G,de,xe),U=0;U<3;++U)_e[U]+=K*de[U]*this.tickPad[U]/k[5*U];this._text.drawTicks(G,this.tickSize[G],this.tickAngle[G],_e,this.tickColor[G],we,oe,Q)}if(this.labelEnable[G]){for(se=0,oe=[0,0,0],this.labels[G].length>4&&(pe(G),se=1),(Q=[this.labelAlign[G],.5,se])[0]==="auto"?Q[0]=0:Q[0]=parseInt(""+Q[0]),U=0;U<3;++U)_e[U]+=K*de[U]*this.labelPad[U]/k[5*U];_e[G]+=.5*(I[0][G]+I[1][G]),this._text.drawLabel(G,this.labelSize[G],this.labelAngle[G],_e,this.labelColor[G],[0,0,0],oe,Q)}}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(g,b,y){b.exports=function(d){for(var l=[],a=[],u=0,f=0;f<3;++f)for(var o=(f+1)%3,h=(f+2)%3,p=[0,0,0],s=[0,0,0],x=-1;x<=1;x+=2){a.push(u,u+2,u+1,u+1,u+2,u+3),p[f]=x,s[f]=x;for(var c=-1;c<=1;c+=2){p[o]=c;for(var T=-1;T<=1;
1357T+=2)p[h]=T,l.push(p[0],p[1],p[2],s[0],s[1],s[2]),u+=1}var _=o;o=h,h=_}var w=e(d,new Float32Array(l)),k=e(d,new Uint16Array(a),d.ELEMENT_ARRAY_BUFFER),L=n(d,[{buffer:w,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:w,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 i(d,w,L,A)};var e=g("gl-buffer"),n=g("gl-vao"),t=g("./shaders").bg;function i(d,l,a,u){this.gl=d,this.buffer=l,this.vao=a,this.shader=u}var r=i.prototype;r.draw=function(d,l,a,u,f,o){for(var h=!1,p=0;p<3;++p)h=h||f[p];if(h){var s=this.gl;s.enable(s.POLYGON_OFFSET_FILL),s.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:l,projection:a,bounds:u,enable:f,colors:o},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),s.disable(s.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(g,b,y){b.exports=function(c,T,_,w,k){n(r,T,c),n(r,_,r);for(var L=0,A=0;A<2;++A){a[2]=w[A][2];for(var I=0;I<2;++I){a[1]=w[I][1];for(var P=0;P<2;++P)a[0]=w[P][0],f(d[L],a,r),L+=1}}var S=-1;for(A=0;A<8;++A){for(var E=d[A][3],D=0;D<3;++D)l[A][D]=d[A][D]/E;k&&(l[A][2]*=-1),E<0&&(S<0||l[A][2]<l[S][2])&&(S=A)}if(S<0){S=0;for(var F=0;F<3;++F){for(var H=(F+2)%3,V=(F+1)%3,Z=-1,K=-1,G=0;G<2;++G){var W=(R=G<<F)+(G<<H)+(1-G<<V),Q=R+(1-G<<H)+(G<<V);i(l[R],l[W],l[Q],u)<0||(G?Z=1:K=1)}if(Z<0||K<0)K>Z&&(S|=1<<F);else{for(G=0;G<2;++G){W=(R=G<<F)+(G<<H)+(1-G<<V),Q=R+(1-G<<H)+(G<<V);var R,N=h([d[R],d[W],d[Q],d[R+(1<<H)+(1<<V)]]);G?Z=N:K=N}K>Z&&(S|=1<<F)}}}var U=7^S,ee=-1;for(A=0;A<8;++A)A!==S&&A!==U&&(ee<0||l[ee][1]>l[A][1])&&(ee=A);var j=-1;for(A=0;A<3;++A)(J=ee^1<<A)!==S&&J!==U&&(j<0&&(j=J),(V=l[J])[0]<l[j][0]&&(j=J));var X=-1;for(A=0;A<3;++A){var J;(J=ee^1<<A)!==S&&J!==U&&J!==j&&(X<0&&(X=J),(V=l[J])[0]>l[X][0]&&(X=J))}var re=p;re[0]=re[1]=re[2]=0,re[e.log2(j^ee)]=ee&j,re[e.log2(ee^X)]=ee&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=s,oe=S;for(F=0;F<3;++F)se[F]=oe&1<<F?-1:1;return x};var e=g("bit-twiddle"),n=g("gl-mat4/multiply"),t=g("split-polygon"),i=g("robust-orientation"),r=new Array(16),d=new Array(8),l=new Array(8),a=new Array(3),u=[0,0,0];function f(c,T,_){for(var w=0;w<4;++w){c[w]=_[12+w];for(var k=0;k<3;++k)c[w]+=T[k]*_[4*k+w]}}(function(){for(var c=0;c<8;++c)d[c]=[1,1,1,1],l[c]=[1,1,1]})();var o=[[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(c){for(var T=0;T<o.length;++T)if((c=t.positive(c,o[T])).length<3)return 0;var _=c[0],w=_[0]/_[3],k=_[1]/_[3],L=0;for(T=1;T+1<c.length;++T){var A=c[T],I=c[T+1],P=A[0]/A[3]-w,S=A[1]/A[3]-k,E=I[0]/I[3]-w,D=I[1]/I[3]-k;L+=Math.abs(P*D-S*E)}return L}var p=[1,1,1],s=[0,0,0],x={cubeEdges:p,axis:s}},{"bit-twiddle":32,"gl-mat4/multiply":100,"robust-orientation":284,"split-polygon":300}],73:[function(g,b,y){b.exports=function(p,s,x){var c=[],T=[0,0,0],_=[0,0,0],w=[0,0,0],k=[0,0,0];c.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=c.length/3|0,I=0;I<x[L].length;++I){var P=+x[L][I].x;c.push(P,0,1,P,1,1,P,0,-1,P,0,-1,P,1,1,P,1,-1)}var S=c.length/3|0;T[L]=A,_[L]=S-A,A=c.length/3|0;for(var E=0;E<x[L].length;++E)P=+x[L][E].x,c.push(P,0,1,P,1,1,P,0,-1,P,0,-1,P,1,1,P,1,-1);S=c.length/3|0,w[L]=A,k[L]=S-A}var D=e(p,new Float32Array(c)),F=n(p,[{buffer:D,type:p.FLOAT,size:3,stride:0,offset:0}]),H=t(p);return H.attributes.position.location=0,new o(p,D,F,H,_,T,k,w)};var e=g("gl-buffer"),n=g("gl-vao"),t=g("./shaders").line,i=[0,0,0],r=[0,0,0],d=[0,0,0],l=[0,0,0],a=[1,1];function u(p){return p[0]=p[1]=p[2]=0,p}function f(p,s){return p[0]=s[0],p[1]=s[1],p[2]=s[2],p}function o(p,s,x,c,T,_,w,k){this.gl=p,this.vertBuffer=s,this.vao=x,this.shader=c,this.tickCount=T,this.tickOffset=_,this.gridCount=w,this.gridOffset=k}var h=o.prototype;h.bind=function(p,s,x){this.shader.bind(),this.shader.uniforms.model=p,this.shader.uniforms.view=s,this.shader.uniforms.projection=x,a[0]=this.gl.drawingBufferWidth,a[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=a,this.vao.bind()},h.unbind=function(){this.vao.unbind()},h.drawAxisLine=function(p,s,x,c,T){var _=u(r);this.shader.uniforms.majorAxis=r,_[p]=s[1][p]-s[0][p],this.shader.uniforms.minorAxis=_;var w,k=f(l,x);k[p]+=s[0][p],this.shader.uniforms.offset=k,this.shader.uniforms.lineWidth=T,this.shader.uniforms.color=c,(w=u(d))[(p+2)%3]=1,this.shader.uniforms.screenAxis=w,this.vao.draw(this.gl.TRIANGLES,6),(w=u(d))[(p+1)%3]=1,this.shader.uniforms.screenAxis=w,this.vao.draw(this.gl.TRIANGLES,6)},h.drawAxisTicks=function(p,s,x,c,T){if(this.tickCount[p]){var _=u(i);_[p]=1,this.shader.uniforms.majorAxis=_,this.shader.uniforms.offset=s,this.shader.uniforms.minorAxis=x,this.shader.uniforms.color=c,this.shader.uniforms.lineWidth=T;var w=u(d);w[p]=1,this.shader.uniforms.screenAxis=w,this.vao.draw(this.gl.TRIANGLES,this.tickCount[p],this.tickOffset[p])}}
vendor: 5,437 bytes, lines 1357-1515
1357,h.drawGrid=function(p,s,x,c,T,_){if(this.gridCount[p]){var w=u(r);w[s]=x[1][s]-x[0][s],this.shader.uniforms.minorAxis=w;var k=f(l,c);k[s]+=x[0][s],this.shader.uniforms.offset=k;var L=u(i);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=T,this.vao.draw(this.gl.TRIANGLES,this.gridCount[p],this.gridOffset[p])}},h.drawZero=function(p,s,x,c,T,_){var w=u(r);this.shader.uniforms.majorAxis=w,w[p]=x[1][p]-x[0][p],this.shader.uniforms.minorAxis=w;var k=f(l,c);k[p]+=x[0][p],this.shader.uniforms.offset=k;var L=u(d);L[s]=1,this.shader.uniforms.screenAxis=L,this.shader.uniforms.lineWidth=_,this.shader.uniforms.color=T,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(g,b,y){var e=g("glslify"),n=g("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`]),i=e([`precision highp float; 1385#define GLSLIFY 1 1386 1387uniform vec4 color; 1388void main() { 1389 gl_FragColor = color; 1390}`]);y.line=function(u){return n(u,t,i,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}`]);y.text=function(u){return n(u,r,d,null,[{name:"position",type:"vec3"}])};var l=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}`]),a=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}`]);y.bg=function(u){return n(u,l,a,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":132,glslify:231}],75:[function(g,b,y){(function(e){(function(){b.exports=function(o,h,p,s,x,c){var T=n(o),_=t(o,[{buffer:T,size:3}]),w=r(o);w.attributes.position.location=0;var k=new a(o,w,T,_);return k.update(h,p,s,x,c),k};var n=g("gl-buffer"),t=g("gl-vao"),i=g("vectorize-text"),r=g("./shaders").text,d=window||e.global||{},l=d.__TEXT_CACHE||{};d.__TEXT_CACHE={};function a(o,h,p,s){this.gl=o,this.shader=h,this.buffer=p,this.vao=s,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=a.prototype,f=[0,0];u.bind=function(o,h,p,s){this.vao.bind(),this.shader.bind();var x=this.shader.uniforms;x.model=o,x.view=h,x.projection=p,x.pixelScale=s,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.unbind=function(){this.vao.unbind()},u.update=function(o,h,p,s,x){var c=[];function T(S,E,D,F,H,V){var Z=l[D];Z||(Z=l[D]={});var K=Z[E];K||(K=Z[E]=function(X,J){try{return i(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 G=(F||12)/12,W=K.positions,Q=K.cells,R=0,N=Q.length;R<N;++R)for(var U=Q[R],ee=2;ee>=0;--ee){var j=W[U[ee]];c.push(G*j[0],-G*j[1],S)}}for(var _=[0,0,0],w=[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]=c.length/3|0,T(.5*(o[0][I]+o[1][I]),h[I],p[I],12,1.25,A),L[I]=(c.length/3|0)-k[I],_[I]=c.length/3|0;for(var P=0;P<s[I].length;++P)s[I][P].text&&T(s[I][P].x,s[I][P].text,s[I][P].font||x,s[I][P].fontSize||12,1.25,A);w[I]=(c.length/3|0)-_[I]}this.buffer.update(c),this.tickOffset=_,this.tickCount=w,this.labelOffset=k,this.labelCount=L},u.drawTicks=function(o,h,p,s,x,c,T,_){this.tickCount[o]&&(this.shader.uniforms.axis=c,this.shader.uniforms.color=x,this.shader.uniforms.angle=p,this.shader.uniforms.scale=h,this.shader.uniforms.offset=s,this.shader.uniforms.alignDir=T,this.shader.uniforms.alignOpt=_,this.vao.draw(this.gl.TRIANGLES,this.tickCount[o],this.tickOffset[o]))},u.drawLabel=function(o,h,p,s,x,c,T,_){this.labelCount[o]&&(this.shader.uniforms.axis=c,this.shader.uniforms.color=x,this.shader.uniforms.angle=p,this.shader.uniforms.scale=h,this.shader.uniforms.offset=s,this.shader.uniforms.alignDir=T,this.shader.uniforms.alignOpt=_,this.vao.draw(this.gl.TRIANGLES,this.labelCount[o],this.labelOffset[o]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this)}).call(this,g("_process"))},{"./shaders":74,_process:5,"gl-buffer":78,"gl-vao":150,"vectorize-text":311}],76:[function(g,b,y){function e(n,t){var i=n+"",r=i.indexOf("."),d=0;r>=0&&(d=i.length-r-1);var l=Math.pow(10,d),a=Math.round(n*t*l),u=a+"";if(u.indexOf("e")>=0)return u;var f=a/l,o=a%l;a<0?(f=0|-Math.ceil(f),o=0|-o):(f=0|Math.floor(f),o|=0);var h=""+f;if(a<0&&(h="-"+h),d){for(var p=""+o;p.length<d;)p="0"+p;return h+"."+p}return h}y.create=function(n,t){for(var i=[],r=0;r<3;++r){for(var d=[],l=(n[0][r],n[1][r],0);l*t[r]<=n[1][r];++l)d.push({x:l*t[r],text:e(t[r],l)});for(l=-1;l*t[r]>=n[0][r];--l)d.push({x:l*t[r],text:e(t[r],l)});i.push(d)}return i},y.equal=function(n,t){for(var i=0;i<3;++i){if(n[i].length!==t[i].length)return!1;for(var r=0;r<n[i].length;++r){var d=n[i][r],l=t[i][r];if(d.x!==l.x||d.text!==l.text||d.font!==l.font||d.fontColor!==l.fontColor||d.fontSize!==l.fontSize||d.dx!==l.dx||d.dy!==l.dy)return!1}}return!0}},{}],77:[function(g,b,y){b.exports=function(x,c,T,_,w){var k=c.model||l,L=c.view||l,A=c.projection||l,I=c._ortho||!1,P=x.bounds,S=(w=w||t(k,L,A,P,I)).axis;i(a,L,k),i(a,A,a);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(a,a));r(a,a);for(var H=0;H<3;++H){var V=(H+1)%3,Z=(H+2)%3,K=s;e:for(D=0;D<2;++D){var G=[];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 Q=0;Q<2;++Q)K[Z]=P[Q^W^D][Z],G.push(K.slice())}var R=I?5:4;for(W=R;W===R;++W){if(G.length===0)continue e;G=n.positive(G,F[W])}for(W=0;W<G.length;++W){Z=G[W];var N=h(s,a,Z,T,_);for(Q=0;Q<3;++Q)E[Q].lo=Math.min(E[Q].lo,Z[Q]),E[Q].hi=Math.max(E[Q].hi,Z[Q]),Q!==H&&(E[Q].pixelsPerDataUnit=Math.min(E[Q].pixelsPerDataUnit,Math.abs(N[Q])))}}}}return E};var e=g("extract-frustum-planes"),n=g("split-polygon"),t=g("./lib/cube.js"),i=g("gl-mat4/multiply"),r=g("gl-mat4/transpose"),d=g("gl-vec4/transformMat4"),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),a=new Float32Array(16);function u(x,c,T){this.lo=x,this.hi=c,this.pixelsPerDataUnit=T}var f=[0,0,0,1],o=[0,0,0,1];function h(x,c,T,_,w){for(var k=0;k<3;++k){for(var L=f,A=o,I=0;I<3;++I)A[I]=L[I]=T[I];A[3]=L[3]=1,A[k]+=1,d(A,A,c),A[3]<0&&(x[k]=1/0),L[k]-=1,d(L,L,c),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])*w;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)],s=[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(g,b,y){var e=g("typedarray-pool"),n=g("ndarray-ops"),t=g("ndarray"),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function r(u,f,o,h,p){this.gl=u,this.type=f,this.handle=o,this.length=h,this.usage=p}var d=r.prototype;function l(u,f,o,h,p,s){var x=p.length*p.BYTES_PER_ELEMENT;if(s<0)return u.bufferData(f,p,h),x;if(x+s>o)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return u.bufferSubData(f,s,p),o}function a(u,f){for(var o=e.malloc(u.length,f),h=u.length,p=0;p<h;
1571++p)o[p]=u[p];return o}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 o=u.dtype;if(i.indexOf(o)<0&&(o="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(o=gl.getExtension("OES_element_index_uint")&&o!=="uint16"?"uint32":"uint16"),o===u.dtype&&function(x,c){for(var T=1,_=c.length-1;_>=0;--_){if(c[_]!==T)return!1;T*=x[_]}return!0}(u.shape,u.stride))u.offset===0&&u.data.length===u.shape[0]?this.length=l(this.gl,this.type,this.length,this.usage,u.data,f):this.length=l(this.gl,this.type,this.length,this.usage,u.data.subarray(u.offset,u.shape[0]),f);else{var h=e.malloc(u.size,o),p=t(h,u.shape);n.assign(p,u),this.length=l(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 s;s=this.type===this.gl.ELEMENT_ARRAY_BUFFER?a(u,"uint16"):a(u,"float32"),this.length=l(this.gl,this.type,this.length,this.usage,f<0?s:s.subarray(0,u.length),f),e.free(s)}else if(typeof u=="object"&&typeof u.length=="number")this.length=l(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,o,h){if(o=o||u.ARRAY_BUFFER,h=h||u.DYNAMIC_DRAW,o!==u.ARRAY_BUFFER&&o!==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(),s=new r(u,o,p,0,h);return s.update(f),s}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],79:[function(g,b,y){var e=g("gl-vec3");b.exports=function(t,i){var r=t.positions,d=t.vectors,l={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(t.positions.length===0)return i&&(i[0]=[0,0,0],i[1]=[0,0,0]),l;for(var a=0,u=1/0,f=-1/0,o=1/0,h=-1/0,p=1/0,s=-1/0,x=null,c=null,T=[],_=1/0,w=!1,k=0;k<r.length;k++){var L=r[k];u=Math.min(L[0],u),f=Math.max(L[0],f),o=Math.min(L[1],o),h=Math.max(L[1],h),p=Math.min(L[2],p),s=Math.max(L[2],s);var A=d[k];if(e.length(A)>a&&(a=e.length(A)),k){var I=2*e.distance(x,L)/(e.length(c)+e.length(A));I?(_=Math.min(_,I),w=!1):w=!0}w||(x=L,c=A),T.push(A)}var P=[u,o,p],S=[f,h,s];i&&(i[0]=P,i[1]=S),a===0&&(a=1);var E=1/a;isFinite(_)||(_=1),l.vectorScale=_;var D=t.coneSize||.5;t.absoluteConeSize&&(D=t.absoluteConeSize*E),l.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=T[k],G=e.length(K)*E,W=0;W<8;W++){l.positions.push([H,V,Z,F++]),l.positions.push([H,V,Z,F++]),l.positions.push([H,V,Z,F++]),l.positions.push([H,V,Z,F++]),l.positions.push([H,V,Z,F++]),l.positions.push([H,V,Z,F++]),l.vectors.push(K),l.vectors.push(K),l.vectors.push(K),l.vectors.push(K),l.vectors.push(K),l.vectors.push(K),l.vertexIntensity.push(G,G,G),l.vertexIntensity.push(G,G,G);var Q=l.positions.length;l.cells.push([Q-6,Q-5,Q-4],[Q-3,Q-2,Q-1])}return l};var n=g("./lib/shaders");b.exports.createMesh=g("./create_mesh"),b.exports.createConeMesh=function(t,i){return b.exports.createMesh(t,i,{shaders:n,traceType:"cone"})}},{"./create_mesh":80,"./lib/shaders":81,"gl-vec3":169}],80:[function(g,b,y){var e=g("gl-shader"),n=g("gl-buffer"),t=g("gl-vao"),i=g("gl-texture2d"),r=g("gl-mat4/multiply"),d=g("gl-mat4/invert"),l=g("ndarray"),a=g("colormap"),u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(s,x,c,T,_,w,k,L,A,I,P){this.gl=s,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=x,this.dirty=!0,this.triShader=c,this.pickShader=T,this.trianglePositions=_,this.triangleVectors=w,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 o=f.prototype;function h(s,x){var c=e(s,x.meshShader.vertex,x.meshShader.fragment,null,x.meshShader.attributes);return c.attributes.position.location=0,c.attributes.color.location=2,c.attributes.uv.location=3,c.attributes.vector.location=4,c}function p(s,x){var c=e(s,x.pickShader.vertex,x.pickShader.fragment,null,x.pickShader.attributes);return c.attributes.position.location=0,c.attributes.id.location=1,c.attributes.vector.location=4,c}o.isOpaque=function(){return this.opacity>=1}
vendor: 5,048 bytes, line 1571
1571,o.isTransparent=function(){return this.opacity<1},o.pickSlots=1,o.setPickBase=function(s){this.pickId=s},o.update=function(s){s=s||{};var x=this.gl;this.dirty=!0,"lightPosition"in s&&(this.lightPosition=s.lightPosition),"opacity"in s&&(this.opacity=s.opacity),"ambient"in s&&(this.ambientLight=s.ambient),"diffuse"in s&&(this.diffuseLight=s.diffuse),"specular"in s&&(this.specularLight=s.specular),"roughness"in s&&(this.roughness=s.roughness),"fresnel"in s&&(this.fresnel=s.fresnel),s.tubeScale!==void 0&&(this.tubeScale=s.tubeScale),s.vectorScale!==void 0&&(this.vectorScale=s.vectorScale),s.coneScale!==void 0&&(this.coneScale=s.coneScale),s.coneOffset!==void 0&&(this.coneOffset=s.coneOffset),s.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=x.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=x.LINEAR,this.texture.setPixels(function(ee){for(var j=a({colormap:ee,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 l(X,[256,256,4],[4,0,1])}(s.colormap)),this.texture.generateMipmap());var c=s.cells,T=s.positions,_=s.vectors;if(T&&c&&_){var w=[],k=[],L=[],A=[],I=[];this.cells=c,this.positions=T,this.vectors=_;var P=s.meshColor||[1,1,1,1],S=s.vertexIntensity,E=1/0,D=-1/0;if(S)if(s.vertexIntensityBounds)E=+s.vertexIntensityBounds[0],D=+s.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<T.length;++F)H=T[F][2],E=Math.min(E,H),D=Math.max(D,H);for(this.intensity=S||function(ee){for(var j=ee.length,X=new Array(j),J=0;J<j;++J)X[J]=ee[J][2];return X}(T),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],F=0;F<T.length;++F)for(var V=T[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<c.length;++F){var G=c[F];switch(G.length){case 3:for(Z=0;Z<3;++Z){V=T[Q=G[Z]];for(var W=0;W<3;++W)if(isNaN(V[W])||!isFinite(V[W]))continue e}for(Z=0;Z<3;++Z){var Q;V=T[Q=G[2-Z]],w.push(V[0],V[1],V[2],V[3]);var R=_[Q];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[Q]-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(w),this.triangleVectors.update(k),this.triangleColors.update(L),this.triangleUVs.update(A),this.triangleIds.update(new Uint32Array(I))}},o.drawTransparent=o.draw=function(s){s=s||{};for(var x=this.gl,c=s.model||u,T=s.view||u,_=s.projection||u,w=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],k=0;k<3;++k)w[0][k]=Math.max(w[0][k],this.clipBounds[0][k]),w[1][k]=Math.min(w[1][k],this.clipBounds[1][k]);var L={model:c,view:T,projection:_,inverseModel:u.slice(),clipBounds:w,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()}},o.drawPick=function(s){s=s||{};for(var x=this.gl,c=s.model||u,T=s.view||u,_=s.projection||u,w=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],k=0;k<3;++k)w[0][k]=Math.max(w[0][k],this.clipBounds[0][k]),w[1][k]=Math.min(w[1][k],this.clipBounds[1][k]);this._model=[].slice.call(c),this._view=[].slice.call(T),this._projection=[].slice.call(_),this._resolution=[x.drawingBufferWidth,x.drawingBufferHeight];var L={model:c,view:T,projection:_,clipBounds:w,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())},o.pick=function(s){if(!s||s.id!==this.pickId)return null;var x=s.value[0]+256*s.value[1]+65536*s.value[2],c=this.cells[x],T=this.positions[c[1]].slice(0,3),_={position:T,dataCoordinate:T,index:Math.floor(c[1]/48)};return this.traceType==="cone"?_.index=Math.floor(c[1]/48):this.traceType==="streamtube"&&(_.intensity=this.intensity[c[1]],_.velocity=this.vectors[c[1]].slice(0,3),_.divergence=this.vectors[c[1]][3],_.index=x),_},o.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(s,x,c){var T=c.shaders;arguments.length===1&&(s=(x=s).gl);var _=h(s,T),w=p(s,T),k=i(s,l(new Uint8Array([255,255,255,255]),[1,1,4]));k.generateMipmap(),k.minFilter=s.LINEAR_MIPMAP_LINEAR,k.magFilter=s.LINEAR;var L=n(s),A=n(s),I=n(s),P=n(s),S=n(s),E=t(s,[{buffer:L,type:s.FLOAT,size:4},{buffer:S,type:s.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:s.FLOAT,size:4},{buffer:P,type:s.FLOAT,size:2},{buffer:A,type:s.FLOAT,size:4}]),D=new f(s,k,_,w,L,A,S,I,P,E,c.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(g,b,y){var e=g("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`]),i=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}`]);y.meshShader={vertex:n,fragment:t,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},y.pickShader={vertex:i,fragment:r,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:231}],82:[function(g,b,y){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(g,b,y){var e=g("./1.0/numbers");b.exports=function(n){return e[n]}},{"./1.0/numbers":82}],84:[function(g,b,y){b.exports=function(f){var o=f.gl,h=e(o),p=n(o,[{buffer:h,type:o.FLOAT,size:3,offset:0,stride:40},{buffer:h,type:o.FLOAT,size:4,offset:12,stride:40},{buffer:h,type:o.FLOAT,size:3,offset:28,stride:40}]),s=t(o);s.attributes.position.location=0,s.attributes.color.location=1,s.attributes.offset.location=2;var x=new r(o,h,p,s);return x.update(f),x};var e=g("gl-buffer"),n=g("gl-vao"),t=g("./shaders/index"),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function r(f,o,h,p){this.gl=f,this.shader=p,this.buffer=o,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 l(f,o){for(var h=0;h<3;++h)f[0][h]=Math.min(f[0][h],o[h]),f[1][h]=Math.max(f[1][h],o[h])}d.isOpaque=function(){return!this.hasAlpha},d.isTransparent=function(){return this.hasAlpha},d.drawTransparent=d.draw=function(f){var o=this.gl,h=this.shader.uniforms;this.shader.bind();var p=h.view=f.view||i,s=h.projection=f.projection||i;h.model=f.model||i,h.clipBounds=this.clipBounds,h.opacity=this.opacity;var x=p[12],c=p[13],T=p[14],_=p[15],w=(f._ortho?2:1)*this.pixelRatio*(s[3]*x+s[7]*c+s[11]*T+s[15]*_)/o.drawingBufferHeight;this.vao.bind();for(var k=0;k<3;++k)o.lineWidth(this.lineWidth[k]*this.pixelRatio),h.capSize=this.capSize[k]*w,this.lineCount[k]&&o.drawArrays(o.LINES,this.lineOffset[k],this.lineCount[k]);this.vao.unbind()};var a=function(){for(var f=new Array(3),o=0;o<3;++o){for(var h=[],p=1;p<=2;++p)for(var s=-1;s<=1;s+=2){var x=[0,0,0];x[(p+o)%3]=s,h.push(x)}f[o]=h}return f}();function u(f,o,h,p){for(var s=a[p],x=0;x<s.length;++x){var c=s[x];f.push(o[0],o[1],o[2],h[0],h[1],h[2],h[3],c[0],c[1],c[2])}return s.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 o=f.color||[[0,0,0],[0,0,0],[0,0,0]],h=f.position,p=f.error;if(Array.isArray(o[0])||(o=[o,o,o]),h&&p){var s=[],x=h.length,c=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var T=0;T<3;++T){this.lineOffset[T]=c;e:for(var _=0;_<x;++_){for(var w=h[_],k=0;k<3;++k)if(isNaN(w[k])||!isFinite(w[k]))continue e;var L=p[_],A=o[T];if(Array.isArray(A[0])&&(A=o[_]),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][T])&&!isNaN(L[1][T])){var I;
1910L[0][T]<0&&((I=w.slice())[T]+=L[0][T],s.push(w[0],w[1],w[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),l(this.bounds,I),c+=2+u(s,I,A,T)),L[1][T]>0&&((I=w.slice())[T]+=L[1][T],s.push(w[0],w[1],w[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),l(this.bounds,I),c+=2+u(s,I,A,T))}}this.lineCount[T]=c-this.lineOffset[T]}this.buffer.update(s)}},d.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":85,"gl-buffer":78,"gl-vao":150}],85:[function(g,b,y){var e=g("glslify"),n=g("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}`]),i=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,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":132,glslify:231}],86:[function(g,b,y){var e=g("gl-texture2d");b.exports=function(x,c,T,_){n||(n=x.FRAMEBUFFER_UNSUPPORTED,t=x.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,i=x.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,r=x.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var w=x.getExtension("WEBGL_draw_buffers");if(!d&&w&&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,w),Array.isArray(c)&&(_=T,T=0|c[1],c=0|c[0]),typeof c!="number")throw new Error("gl-fbo: Missing shape parameter");var k=x.getParameter(x.MAX_RENDERBUFFER_SIZE);if(c<0||c>k||T<0||T>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(!w)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(L>x.getParameter(w.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,c,T,A,L,P,S,w)};var n,t,i,r,d=null;function l(x){return[x.getParameter(x.FRAMEBUFFER_BINDING),x.getParameter(x.RENDERBUFFER_BINDING),x.getParameter(x.TEXTURE_BINDING_2D)]}function a(x,c){x.bindFramebuffer(x.FRAMEBUFFER,c[0]),x.bindRenderbuffer(x.RENDERBUFFER,c[1]),x.bindTexture(x.TEXTURE_2D,c[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 i: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")}}function f(x,c,T,_,w,k){if(!_)return null;var L=e(x,c,T,w,_);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 o(x,c,T,_,w){var k=x.createRenderbuffer();return x.bindRenderbuffer(x.RENDERBUFFER,k),x.renderbufferStorage(x.RENDERBUFFER,_,c,T),x.framebufferRenderbuffer(x.FRAMEBUFFER,w,x.RENDERBUFFER,k),k}function h(x,c,T,_,w,k,L,A){this.gl=x,this._shape=[0|c,0|T],this._destroyed=!1,this._ext=A,this.color=new Array(w);for(var I=0;I<w;++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|c,0|T];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=l(E.gl),F=E.gl,H=E.handle=F.createFramebuffer(),V=E._shape[0],Z=E._shape[1],K=E.color.length,G=E._ext,W=E._use
1961Stencil,Q=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=o(F,V,Z,F.RGBA4,F.COLOR_ATTACHMENT0),G&&G.drawBuffersWEBGL(d[0])):K>1&&G.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):Q&&(E.depth=f(F,V,Z,F.UNSIGNED_SHORT,F.DEPTH_COMPONENT,F.DEPTH_ATTACHMENT)):Q&&W?E._depth_rb=o(F,V,Z,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):Q?E._depth_rb=o(F,V,Z,F.DEPTH_COMPONENT16,F.DEPTH_ATTACHMENT):W&&(E._depth_rb=o(F,V,Z,F.STENCIL_INDEX,F.STENCIL_ATTACHMENT));var ee=F.checkFramebufferStatus(F.FRAMEBUFFER);if(ee!==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),a(F,D),u(ee)}a(F,D)}(this)}var p=h.prototype;function s(x,c,T){if(x._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(x._shape[0]!==c||x._shape[1]!==T){var _=x.gl,w=_.getParameter(_.MAX_RENDERBUFFER_SIZE);if(c<0||c>w||T<0||T>w)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");x._shape[0]=c,x._shape[1]=T;for(var k=l(_),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(),a(_,k),u(A)),a(_,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 c=0|x[0],T=0|x[1];return s(this,c,T),[c,T]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(x){return s(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,s(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 c=0;c<this.color.length;++c)this.color[c].dispose(),this.color[c]=null;this._color_rb&&(x.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{"gl-texture2d":146}],87:[function(g,b,y){var e=g("sprintf-js").sprintf,n=g("gl-constants/lookup"),t=g("glsl-shader-name"),i=g("add-line-numbers");b.exports=function(r,d,l){var a=t(d)||"of unknown name (see npm glsl-shader-name)",u="unknown type";l!==void 0&&(u=l===n.FRAGMENT_SHADER?"fragment":"vertex");for(var f=e(`Error compiling %s shader %s: 1962`,u,a),o=e("%s%s",f,r),h=r.split(` 1963`),p={},s=0;s<h.length;s++){var x=h[s];if(x!==""&&x!=="\0"){var c=parseInt(x.split(":")[2]);if(isNaN(c))throw new Error(e("Could not parse error: %s",x));p[c]=x}}var T=i(d).split(` 1964`);for(s=0;s<T.length;
1964s++)if(p[s+3]||p[s+2]||p[s+1]){var _=T[s];if(f+=_+` 1965`,p[s+1]){var w=p[s+1];w=w.substr(w.split(":",3).join(":").length+1).trim(),f+=e(`^^^ %s 1966 1967`,w)}}return{long:f.trim(),short:o.trim()}}},{"add-line-numbers":9,"gl-constants/lookup":83,"glsl-shader-name":223,"sprintf-js":301}],88:[function(g,b,y){b.exports=function(o,h){var p=o.gl,s=i(p,d.vertex,d.fragment),x=i(p,d.pickVertex,d.pickFragment),c=r(p),T=r(p),_=r(p),w=r(p),k=new l(o,s,x,c,T,_,w);return k.update(h),o.addObject(k),k};var e=g("binary-search-bounds"),n=g("iota-array"),t=g("typedarray-pool"),i=g("gl-shader"),r=g("gl-buffer"),d=g("./lib/shaders");function l(o,h,p,s,x,c,T){this.plot=o,this.shader=h,this.pickShader=p,this.positionBuffer=s,this.weightBuffer=x,this.colorBuffer=c,this.idBuffer=T,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var a,u=l.prototype,f=[0,0,1,0,0,1,1,0,1,1,0,1];u.draw=(a=[1,0,0,0,1,0,0,0,1],function(){var o=this.plot,h=this.shader,p=this.bounds,s=this.numVertices;if(!(s<=0)){var x=o.gl,c=o.dataBox,T=p[2]-p[0],_=p[3]-p[1],w=c[2]-c[0],k=c[3]-c[1];a[0]=2*T/w,a[4]=2*_/k,a[6]=2*(p[0]-c[0])/w-1,a[7]=2*(p[1]-c[1])/k-1,h.bind();var L=h.uniforms;L.viewTransform=a,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,s)}}),u.drawPick=function(){var o=[1,0,0,0,1,0,0,0,1],h=[0,0,0,0];return function(p){var s=this.plot,x=this.pickShader,c=this.bounds,T=this.numVertices;if(!(T<=0)){var _=s.gl,w=s.dataBox,k=c[2]-c[0],L=c[3]-c[1],A=w[2]-w[0],I=w[3]-w[1];o[0]=2*k/A,o[4]=2*L/I,o[6]=2*(c[0]-w[0])/A-1,o[7]=2*(c[1]-w[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=o,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,T),p+this.shape[0]*this.shape[1]}}}(),u.pick=function(o,h,p){var s=this.pickOffset,x=this.shape[0]*this.shape[1];if(p<s||p>=s+x)return null;var c=p-s,T=this.xData,_=this.yData;return{object:this,pointId:c,dataCoord:[T[c%this.shape[0]],_[c/this.shape[0]|0]]}},u.update=function(o){var h=(o=o||{}).shape||[0,0],p=o.x||n(h[0]),s=o.y||n(h[1]),x=o.z||new Float32Array(h[0]*h[1]),c=o.zsmooth!==!1;this.xData=p,this.yData=s;var T,_,w,k,L=o.colorLevels||[0],A=o.colorValues||[0,0,0,1],I=L.length,P=this.bounds;c?(T=P[0]=p[0],_=P[1]=s[0],w=P[2]=p[p.length-1],k=P[3]=s[s.length-1]):(T=P[0]=p[0]+(p[1]-p[0])/2,_=P[1]=s[0]+(s[1]-s[0])/2,w=P[2]=p[p.length-1]+(p[p.length-1]-p[p.length-2])/2,k=P[3]=s[s.length-1]+(s[s.length-1]-s[s.length-2])/2);var S=1/(w-T),E=1/(k-_),D=h[0],F=h[1];this.shape=[D,F];var H=(c?(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),G=t.mallocUint32(H),W=0,Q=c?D-1:D,R=c?F-1:F,N=0;N<R;++N){var U,ee;c?(U=E*(s[N]-_),ee=E*(s[N+1]-_)):(U=N<F-1?E*(s[N]-(s[N+1]-s[N])/2-_):E*(s[N]-(s[N]-s[N-1])/2-_),ee=N<F-1?E*(s[N]+(s[N+1]-s[N])/2-_):E*(s[N]+(s[N]-s[N-1])/2-_));for(var j=0;j<Q;++j){var X,J;c?(X=S*(p[j]-T),J=S*(p[j+1]-T)):(X=j<D-1?S*(p[j]-(p[j+1]-p[j])/2-T):S*(p[j]-(p[j]-p[j-1])/2-T),J=j<D-1?S*(p[j]+(p[j+1]-p[j])/2-T):S*(p[j]+(p[j]-p[j-1])/2-T));for(var re=0;re<f.length;re+=2){var ne,se,oe,pe,ce=f[re],de=f[re+1],xe=x[c?(N+de)*D+(j+ce):N*D+j],_e=e.le(L,xe);if(_e<0)ne=A[0],se=A[1],oe=A[2],pe=A[3];else if(_e===I-1)ne=A[4*I-4],se=A[4*I-3],oe=A[4*I-2],pe=A[4*I-1];else{var we=(xe-L[_e])/(L[_e+1]-L[_e]),Ee=1-we,fe=4*_e,ge=4*(_e+1);ne=Ee*A[fe]+we*A[ge],se=Ee*A[fe+1]+we*A[ge+1],oe=Ee*A[fe+2]+we*A[ge+2],pe=Ee*A[fe+3]+we*A[ge+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*ee,K[2*W]=ce,K[2*W+1]=de,G[W]=N*D+j,W+=1}}}this.positionBuffer.update(Z),this.weightBuffer.update(K),this.colorBuffer.update(V),this.idBuffer.update(G),t.free(Z),t.free(V),t.free(K),t.free(G)},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(g,b,y){var e=g("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(g,b,y){var e=g("glslify"),n=g("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`]),i=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"}];y.createShader=function(l){return n(l,t,i,null,d)},y.createPickShader=function(l){return n(l,t,r,null,d)}},{"gl-shader":132,glslify:231}],91:[function(g,b,y){b.exports=function(T){var _=T.gl||T.scene&&T.scene.gl,w=u(_);w.attributes.position.location=0,w.attributes.nextPosition.location=1,w.attributes.arcLength.location=2,w.attributes.lineWidth.location=3,w.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=l(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(_,w,k,L,A,S);return E.update(T),E};var e=g("gl-buffer"),n=g("gl-vao"),t=g("gl-texture2d"),i=new Uint8Array(4),r=new Float32Array(i.buffer),d=g("binary-search-bounds"),l=g("ndarray"),a=g("./lib/shaders"),u=a.createShader,f=a.createPickShader,o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(T,_){for(var w=0,k=0;k<3;++k){var L=T[k]-_[k];w+=L*L}return Math.sqrt(w)}function p(T){for(var _=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],w=0;w<3;++w)_[0][w]=Math.max(T[0][w],_[0][w]),_[1][w]=Math.min(T[1][w],_[1][w]);return _}function s(T,_,w,k){this.arcLength=T,this.position=_,this.index=w,this.dataCoordinate=k}function x(T,_,w,k,L,A){this.gl=T,this.shader=_,this.pickShader=w,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 c=x.prototype;c.isTransparent=function(){return this.hasAlpha},c.isOpaque=function(){return!this.hasAlpha},c.pickSlots=1,c.setPickBase=function(T){this.pickId=T},c.drawTransparent=c.draw=function(T){if(this.vertexCount){var _=this.gl,w=this.shader,k=this.vao;w.bind(),w.uniforms={model:T.model||o,view:T.view||o,projection:T.projection||o,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,472 bytes, line 2198
2198,k.bind(),k.draw(_.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},c.drawPick=function(T){if(this.vertexCount){var _=this.gl,w=this.pickShader,k=this.vao;w.bind(),w.uniforms={model:T.model||o,view:T.view||o,projection:T.projection||o,pickId:this.pickId,clipBounds:p(this.clipBounds),screenShape:[_.drawingBufferWidth,_.drawingBufferHeight],pixelRatio:this.pixelRatio},k.bind(),k.draw(_.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},c.update=function(T){var _,w;this.dirty=!0;var k=!!T.connectGaps;"dashScale"in T&&(this.dashScale=T.dashScale),this.hasAlpha=!1,"opacity"in T&&(this.opacity=+T.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=T.position||T.positions;if(D){var F=T.color||T.colors||[0,0,0,1],H=T.lineWidth||1,V=!1;e:for(_=1;_<D.length;++_){var Z,K,G,W=D[_-1],Q=D[_];for(A.push(P),I.push(W.slice()),w=0;w<3;++w){if(isNaN(W[w])||isNaN(Q[w])||!isFinite(W[w])||!isFinite(Q[w])){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][w]=Math.min(E[0][w],W[w],Q[w]),E[1][w]=Math.max(E[1][w],W[w],Q[w])}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),G=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,Q),V){for(w=0;w<2;++w)L.push(W[0],W[1],W[2],Q[0],Q[1],Q[2],N,G,Z[0],Z[1],Z[2],Z[3]);S+=2,V=!1}L.push(W[0],W[1],W[2],Q[0],Q[1],Q[2],N,G,Z[0],Z[1],Z[2],Z[3],W[0],W[1],W[2],Q[0],Q[1],Q[2],N,-G,Z[0],Z[1],Z[2],Z[3],Q[0],Q[1],Q[2],W[0],W[1],W[2],P,-G,K[0],K[1],K[2],K[3],Q[0],Q[1],Q[2],W[0],W[1],W[2],P,G,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 T){var U=T.dashes.slice();for(U.unshift(0),_=1;_<U.length;++_)U[_]=U[_-1]+U[_];var ee=l(new Array(1024),[256,1,4]);for(_=0;_<256;++_){for(w=0;w<4;++w)ee.set(_,0,w,0);1&d.le(U,U[U.length-1]*_/255)?ee.set(_,0,0,0):ee.set(_,0,0,255)}this.texture.setPixels(ee)}},c.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},c.pick=function(T){if(!T||T.id!==this.pickId)return null;var _=function(D,F,H,V){return i[0]=V,i[1]=H,i[2]=F,i[3]=D,r[0]}(T.value[0],T.value[1],T.value[2],0),w=d.le(this.arcLength,_);if(w<0)return null;if(w===this.arcLength.length-1)return new s(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),w);for(var k=this.points[w],L=this.points[Math.min(w+1,this.points.length-1)],A=(_-this.arcLength[w])/(this.arcLength[w+1]-this.arcLength[w]),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?w:w+1,this.points.length-1);return new s(_,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(g,b,y){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(g,b,y){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(g,b,y){b.exports=function(e){var n=e[0],t=e[1],i=e[2],r=e[3],d=e[4],l=e[5],a=e[6],u=e[7],f=e[8],o=e[9],h=e[10],p=e[11],s=e[12],x=e[13],c=e[14],T=e[15];return(n*l-t*d)*(h*T-p*c)-(n*a-i*d)*(o*T-p*x)+(n*u-r*d)*(o*c-h*x)+(t*a-i*l)*(f*T-p*s)-(t*u-r*l)*(f*c-h*s)+(i*u-r*a)*(f*x-o*s)}},{}],95:[function(g,b,y){b.exports=function(e,n){var t=n[0],i=n[1],r=n[2],d=n[3],l=t+t,a=i+i,u=r+r,f=t*l,o=i*l,h=i*a,p=r*l,s=r*a,x=r*u,c=d*l,T=d*a,_=d*u;return e[0]=1-h-x,e[1]=o+_,e[2]=p-T,e[3]=0,e[4]=o-_,e[5]=1-f-x,e[6]=s+c,e[7]=0,e[8]=p+T,e[9]=s-c,e[10]=1-f-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],96:[function(g,b,y){b.exports=function(e,n,t){var i=n[0],r=n[1],d=n[2],l=n[3],a=i+i,u=r+r,f=d+d,o=i*a,h=i*u,p=i*f,s=r*u,x=r*f,c=d*f,T=l*a,_=l*u,w=l*f;return e[0]=1-(s+c),e[1]=h+w,e[2]=p-_,e[3]=0,e[4]=h-w,e[5]=1-(o+c),e[6]=x+T,e[7]=0,e[8]=p+_,e[9]=x-T,e[10]=1-(o+s),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},{}],97:[function(g,b,y){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(g,b,y){b.exports=function(e,n){var t=n[0],i=n[1],r=n[2],d=n[3],l=n[4],a=n[5],u=n[6],f=n[7],o=n[8],h=n[9],p=n[10],s=n[11],x=n[12],c=n[13],T=n[14],_=n[15],w=t*a-i*l,k=t*u-r*l,L=t*f-d*l,A=i*u-r*a,I=i*f-d*a,P=r*f-d*u,S=o*c-h*x,E=o*T-p*x,D=o*_-s*x,F=h*T-p*c,H=h*_-s*c,V=p*_-s*T,Z=w*V-k*H+L*F+A*D-I*E+P*S;return Z?(Z=1/Z,e[0]=(a*V-u*H+f*F)*Z,e[1]=(r*H-i*V-d*F)*Z,e[2]=(c*P-T*I+_*A)*Z,e[3]=(p*I-h*P-s*A)*Z,e[4]=(u*D-l*V-f*E)*Z,e[5]=(t*V-r*D+d*E)*Z,e[6]=(T*L-x*P-_*k)*Z,e[7]=(o*P-p*L+s*k)*Z,e[8]=(l*H-a*D+f*S)*Z,e[9]=(i*D-t*H-d*S)*Z,e[10]=(x*I-c*L+_*w)*Z,e[11]=(h*L-o*I-s*w)*Z,e[12]=(a*E-l*F-u*S)*Z,e[13]=(t*F-i*E+r*S)*Z,e[14]=(c*k-x*A-T*w)*Z,e[15]=(o*A-h*k+p*w)*Z,e):null}},{}],99:[function(g,b,y){var e=g("./identity");b.exports=function(n,t,i,r){var d,l,a,u,f,o,h,p,s,x,c=t[0],T=t[1],_=t[2],w=r[0],k=r[1],L=r[2],A=i[0],I=i[1],P=i[2];return Math.abs(c-A)<1e-6&&Math.abs(T-I)<1e-6&&Math.abs(_-P)<1e-6?e(n):(h=c-A,p=T-I,s=_-P,x=1/Math.sqrt(h*h+p*p+s*s),d=k*(s*=x)-L*(p*=x),l=L*(h*=x)-w*s,a=w*p-k*h,(x=Math.sqrt(d*d+l*l+a*a))?(d*=x=1/x,l*=x,a*=x):(d=0,l=0,a=0),u=p*a-s*l,f=s*d-h*a,o=h*l-p*d,(x=Math.sqrt(u*u+f*f+o*o))?(u*=x=1/x,f*=x,o*=x):(u=0,f=0,o=0),n[0]=d,n[1]=u,n[2]=h,n[3]=0,n[4]=l,n[5]=f,n[6]=p,n[7]=0,n[8]=a,n[9]=o,n[10]=s,n[11]=0,n[12]=-(d*c+l*T+a*_),n[13]=-(u*c+f*T+o*_),n[14]=-(h*c+p*T+s*_),n[15]=1,n)}},{"./identity":97}],100:[function(g,b,y){b.exports=function(e,n,t){var i=n[0],r=n[1],d=n[2],l=n[3],a=n[4],u=n[5],f=n[6],o=n[7],h=n[8],p=n[9],s=n[10],x=n[11],c=n[12],T=n[13],_=n[14],w=n[15],k=t[0],L=t[1],A=t[2],I=t[3];return e[0]=k*i+L*a+A*h+I*c,e[1]=k*r+L*u+A*p+I*T,e[2]=k*d+L*f+A*s+I*_,e[3]=k*l+L*o+A*x+I*w,k=t[4],L=t[5],A=t[6],I=t[7],e[4]=k*i+L*a+A*h+I*c,e[5]=k*r+L*u+A*p+I*T,e[6]=k*d+L*f+A*s+I*_,e[7]=k*l+L*o+A*x+I*w,k=t[8],L=t[9],A=t[10],I=t[11],e[8]=k*i+L*a+A*h+I*c,e[9]=k*r+L*u+A*p+I*T,e[10]=k*d+L*f+A*s+I*_,e[11]=k*l+L*o+A*x+I*w,k=t[12],L=t[13],A=t[14],I=t[15],e[12]=k*i+L*a+A*h+I*c,e[13]=k*r+L*u+A*p+I*T,e[14]=k*d+L*f+A*s+I*_,e[15]=k*l+L*o+A*x+I*w,e}},{}],101:[function(g,b,y){b.exports=function(e,n,t,i,r,d,l){var a=1/(n-t),u=1/(i-r),f=1/(d-l);return e[0]=-2*a,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)*a,e[13]=(r+i)*u,e[14]=(l+d)*f,e[15]=1,e}},{}],102:[function(g,b,y){b.exports=function(e,n,t,i,r){var d=1/Math.tan(n/2),l=1/(i-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+i)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*i*l,e[15]=0,e}},{}],103:[function(g,b,y){b.exports=function(e,n,t,i){var r,d,l,a,u,f,o,h,p,s,x,c,T,_,w,k,L,A,I,P,S,E,D,F,H=i[0],V=i[1],Z=i[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),l=1-d,a=n[0],u=n[1],f=n[2],o=n[3],h=n[4],p=n[5],s=n[6],x=n[7],c=n[8],T=n[9],_=n[10],w=n[11],k=H*H*l+d,L=V*H*l+Z*r,A=Z*H*l-V*r,I=H*V*l-Z*r,P=V*V*l+d,S=Z*V*l+H*r,E=H*Z*l+V*r,D=V*Z*l-H
2198*r,F=Z*Z*l+d,e[0]=a*k+h*L+c*A,e[1]=u*k+p*L+T*A,e[2]=f*k+s*L+_*A,e[3]=o*k+x*L+w*A,e[4]=a*I+h*P+c*S,e[5]=u*I+p*P+T*S,e[6]=f*I+s*P+_*S,e[7]=o*I+x*P+w*S,e[8]=a*E+h*D+c*F,e[9]=u*E+p*D+T*F,e[10]=f*E+s*D+_*F,e[11]=o*E+x*D+w*F,n!==e&&(e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15]),e)}},{}],104:[function(g,b,y){b.exports=function(e,n,t){var i=Math.sin(t),r=Math.cos(t),d=n[4],l=n[5],a=n[6],u=n[7],f=n[8],o=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*i,e[5]=l*r+o*i,e[6]=a*r+h*i,e[7]=u*r+p*i,e[8]=f*r-d*i,e[9]=o*r-l*i,e[10]=h*r-a*i,e[11]=p*r-u*i,e}},{}],105:[function(g,b,y){b.exports=function(e,n,t){var i=Math.sin(t),r=Math.cos(t),d=n[0],l=n[1],a=n[2],u=n[3],f=n[8],o=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*i,e[1]=l*r-o*i,e[2]=a*r-h*i,e[3]=u*r-p*i,e[8]=d*i+f*r,e[9]=l*i+o*r,e[10]=a*i+h*r,e[11]=u*i+p*r,e}},{}],106:[function(g,b,y){b.exports=function(e,n,t){var i=Math.sin(t),r=Math.cos(t),d=n[0],l=n[1],a=n[2],u=n[3],f=n[4],o=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*i,e[1]=l*r+o*i,e[2]=a*r+h*i,e[3]=u*r+p*i,e[4]=f*r-d*i,e[5]=o*r-l*i,e[6]=h*r-a*i,e[7]=p*r-u*i,e}},{}],107:[function(g,b,y){b.exports=function(e,n,t){var i=t[0],r=t[1],d=t[2];return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=n[3]*i,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(g,b,y){b.exports=function(e,n,t){var i,r,d,l,a,u,f,o,h,p,s,x,c=t[0],T=t[1],_=t[2];return n===e?(e[12]=n[0]*c+n[4]*T+n[8]*_+n[12],e[13]=n[1]*c+n[5]*T+n[9]*_+n[13],e[14]=n[2]*c+n[6]*T+n[10]*_+n[14],e[15]=n[3]*c+n[7]*T+n[11]*_+n[15]):(i=n[0],r=n[1],d=n[2],l=n[3],a=n[4],u=n[5],f=n[6],o=n[7],h=n[8],p=n[9],s=n[10],x=n[11],e[0]=i,e[1]=r,e[2]=d,e[3]=l,e[4]=a,e[5]=u,e[6]=f,e[7]=o,e[8]=h,e[9]=p,e[10]=s,e[11]=x,e[12]=i*c+a*T+h*_+n[12],e[13]=r*c+u*T+p*_+n[13],e[14]=d*c+f*T+s*_+n[14],e[15]=l*c+o*T+x*_+n[15]),e}},{}],109:[function(g,b,y){b.exports=function(e,n){if(e===n){var t=n[1],i=n[2],r=n[3],d=n[6],l=n[7],a=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]=i,e[9]=d,e[11]=n[14],e[12]=r,e[13]=l,e[14]=a}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(g,b,y){var e=g("barycentric"),n=g("polytope-closest-point/lib/closest_point_2d.js");function t(d,l){for(var a=[0,0,0,0],u=0;u<4;++u)for(var f=0;f<4;++f)a[f]+=d[4*u+f]*l[u];return a}function i(d,l,a,u,f){for(var o=t(u,t(a,t(l,[d[0],d[1],d[2],1]))),h=0;h<3;++h)o[h]/=o[3];return[.5*f[0]*(1+o[0]),.5*f[1]*(1-o[1])]}function r(d,l){for(var a=[0,0,0],u=0;u<d.length;++u)for(var f=d[u],o=l[u],h=0;h<3;++h)a[h]+=o*f[h];return a}b.exports=function(d,l,a,u,f,o){if(d.length===1)return[0,d[0].slice()];for(var h=new Array(d.length),p=0;p<d.length;++p)h[p]=i(d[p],a,u,f,o);var s=0,x=1/0;for(p=0;p<h.length;++p){for(var c=0,T=0;T<2;++T)c+=Math.pow(h[p][T]-l[T],2);c<x&&(x=c,s=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,l),w=0;for(p=0;p<3;++p){if(_[p]<-.001||_[p]>1.0001)return null;w+=_[p]}return Math.abs(w-1)>.001?null:[s,r(d,_),_]}},{barycentric:14,"polytope-closest-point/lib/closest_point_2d.js":270}],111:[function(g,b,y){var e=g("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`]),i=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}`]),l=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}`]),a=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}`]),o=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`]);y.meshShader={vertex:n,fragment:t,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},y.wireShader={vertex:i,fragment:r,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},y.pointShader={vertex:d,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},y.pickShader={vertex:a,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},y.pointPickShader={vertex:f,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},y.contourShader={vertex:o,fragment:h,attributes:[{name:"position",type:"vec3"}]}},{glslify:231}],112:[function(g,b,y){var e=g("gl-shader"),n=g("gl-buffer"),t=g("gl-vao"),i=g("gl-texture2d"),r=g("normals"),d=g("gl-mat4/multiply"),l=g("gl-mat4/invert"),a=g("ndarray"),u=g("colormap"),f=g("simplicial-complex-contour"),o=g("typedarray-pool"),h=g("./lib/shaders"),p=g("./lib/closest-point"),s=h.meshShader,x=h.wireShader,c=h.pointShader,T=h.pickShader,_=h.pointPickShader,w=h.contourShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function L(V,Z,K,G,W,Q,R,N,U,ee,j,X,J,re,ne,se,oe,pe,ce,de,xe,_e,we,Ee,fe,ge,ke){this.gl=V,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=Z,this.dirty=!0,this.triShader=K,this.lineShader=G,this.pointShader=W,this.pickShader=Q,this.pointPickShader=R,this.contourShader=N,this.trianglePositions=U,this.triangleColors=j,this.triangleNormals=J,this.triangleUVs=X,this.triangleIds=ee,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=_e,this.pointUVs=we,this.pointSizes=Ee,this.pointIds=xe,this.pointVAO=fe,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ge,this.contourVAO=ke,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 G=(Z[K][0]-V)/(Z[K][0]-Z[K-1][0]);return Z[K][1]*(1-G)+G*Z[K-1][1]}}return 1}function P(V){var Z=e(V,s.vertex,s.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,c.vertex,c.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,T.vertex,T.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,w.vertex,w.fragment);return Z.attributes.position.location=0,Z}A.isOpaque=function(){return!this.hasAlpha},A.isTransparent=function(){return this.hasAlpha}
2562,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,G=Z.vertexIds,W=Z.vertexWeights,Q=K.length,R=o.mallocFloat32(6*Q),N=0,U=0;U<Q;++U)for(var ee=K[U],j=0;j<2;++j){var X=ee[0];ee.length===2&&(X=ee[j]);for(var J=G[X][0],re=G[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)),o.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=i(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(Xt,Fe){for(var qe=u({colormap:Xt,nshades:256,format:"rgba"}),wt=new Uint8Array(1024),ft=0;ft<256;++ft){for(var Ce=qe[ft],Ie=0;Ie<3;++Ie)wt[4*ft+Ie]=Ce[Ie];wt[4*ft+3]=Fe?255*I(ft/255,Fe):255*Ce[3]}return a(wt,[256,256,4],[4,0,1])}(V.colormap,this.opacityscale)),this.texture.generateMipmap());var K=V.cells,G=V.positions;if(G&&K){var W=[],Q=[],R=[],N=[],U=[],ee=[],j=[],X=[],J=[],re=[],ne=[],se=[],oe=[],pe=[];this.cells=K,this.positions=G;var ce=V.vertexNormals,de=V.cellNormals,xe=V.vertexNormalsEpsilon===void 0?1e-6:V.vertexNormalsEpsilon,_e=V.faceNormalsEpsilon===void 0?1e-6:V.faceNormalsEpsilon;V.useFacetNormals&&!de&&(de=r.faceNormals(K,G,_e)),de||ce||(ce=r.vertexNormals(K,G,xe));var we=V.vertexColors,Ee=V.cellColors,fe=V.meshColor||[1,1,1,1],ge=V.vertexUVs,ke=V.vertexIntensity,be=V.cellUVs,Se=V.cellIntensity,Oe=1/0,De=-1/0;if(!ge&&!be)if(ke)if(V.vertexIntensityBounds)Oe=+V.vertexIntensityBounds[0],De=+V.vertexIntensityBounds[1];else for(var je=0;je<ke.length;++je){var Je=ke[je];Oe=Math.min(Oe,Je),De=Math.max(De,Je)}else if(Se)if(V.cellIntensityBounds)Oe=+V.cellIntensityBounds[0],De=+V.cellIntensityBounds[1];else for(je=0;je<Se.length;++je)Je=Se[je],Oe=Math.min(Oe,Je),De=Math.max(De,Je);else for(je=0;je<G.length;++je)Je=G[je][2],Oe=Math.min(Oe,Je),De=Math.max(De,Je);this.intensity=ke||Se||function(Xt){for(var Fe=Xt.length,qe=new Array(Fe),wt=0;wt<Fe;++wt)qe[wt]=Xt[wt][2];return qe}(G),this.pickVertex=!(Se||Ee);var ze=V.pointSizes,Ue=V.pointSize||1;for(this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],je=0;je<G.length;++je)for(var Ge=G[je],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 et=0,ct=0,mt=0;e:for(je=0;je<K.length;++je){var Ct=K[je];switch(Ct.length){case 1:for(Ge=G[nt=Ct[0]],Ye=0;Ye<3;++Ye)if(isNaN(Ge[Ye])||!isFinite(Ge[Ye]))continue e;re.push(Ge[0],Ge[1],Ge[2]),Qe=we?we[nt]:Ee?Ee[je]:fe,this.opacityscale&&ke?Q.push(Qe[0],Qe[1],Qe[2],this.opacity*I((ke[nt]-Oe)/(De-Oe),this.opacityscale)):Qe.length===3?ne.push(Qe[0],Qe[1],Qe[2],this.opacity):(ne.push(Qe[0],Qe[1],Qe[2],Qe[3]*this.opacity),Qe[3]<1&&(this.hasAlpha=!0)),Et=ge?ge[nt]:ke?[(ke[nt]-Oe)/(De-Oe),0]:be?be[je]:Se?[(Se[je]-Oe)/(De-Oe),0]:[(Ge[2]-Oe)/(De-Oe),0],se.push(Et[0],Et[1]),ze?oe.push(ze[nt]):oe.push(Ue),pe.push(je),mt+=1;break;case 2:for(Ye=0;Ye<2;++Ye){Ge=G[nt=Ct[Ye]];for(var Tt=0;Tt<3;++Tt)if(isNaN(Ge[Tt])||!isFinite(Ge[Tt]))continue e}for(Ye=0;Ye<2;++Ye)Ge=G[nt=Ct[Ye]],ee.push(Ge[0],Ge[1],Ge[2]),Qe=we?we[nt]:Ee?Ee[je]:fe,this.opacityscale&&ke?Q.push(Qe[0],Qe[1],Qe[2],this.opacity*I((ke[nt]-Oe)/(De-Oe),this.opacityscale)):Qe.length===3?j.push(Qe[0],Qe[1],Qe[2],this.opacity):(j.push(Qe[0],Qe[1],Qe[2],Qe[3]*this.opacity),Qe[3]<1&&(this.hasAlpha=!0)),Et=ge?ge[nt]:ke?[(ke[nt]-Oe)/(De-Oe),0]:be?be[je]:Se?[(Se[je]-Oe)/(De-Oe),0]:[(Ge[2]-Oe)/(De-Oe),0],X.push(Et[0],Et[1]),J.push(je);ct+=1;break;case 3:for(Ye=0;Ye<3;++Ye)for(Ge=G[nt=Ct[Ye]],Tt=0;Tt<3;++Tt)if(isNaN(Ge[Tt])||!isFinite(Ge[Tt]))continue e;
2562for(Ye=0;Ye<3;++Ye){var nt,Qe,Et,Gt;Ge=G[nt=Ct[2-Ye]],W.push(Ge[0],Ge[1],Ge[2]),(Qe=we?we[nt]:Ee?Ee[je]:fe)?this.opacityscale&&ke?Q.push(Qe[0],Qe[1],Qe[2],this.opacity*I((ke[nt]-Oe)/(De-Oe),this.opacityscale)):Qe.length===3?Q.push(Qe[0],Qe[1],Qe[2],this.opacity):(Q.push(Qe[0],Qe[1],Qe[2],Qe[3]*this.opacity),Qe[3]<1&&(this.hasAlpha=!0)):Q.push(.5,.5,.5,1),Et=ge?ge[nt]:ke?[(ke[nt]-Oe)/(De-Oe),0]:be?be[je]:Se?[(Se[je]-Oe)/(De-Oe),0]:[(Ge[2]-Oe)/(De-Oe),0],N.push(Et[0],Et[1]),Gt=ce?ce[nt]:de[je],R.push(Gt[0],Gt[1],Gt[2]),U.push(je)}et+=1}}this.pointCount=mt,this.edgeCount=ct,this.triangleCount=et,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(ee),this.edgeColors.update(j),this.edgeUVs.update(X),this.edgeIds.update(new Uint32Array(J)),this.trianglePositions.update(W),this.triangleColors.update(Q),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,G=V.view||k,W=V.projection||k,Q=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],R=0;R<3;++R)Q[0][R]=Math.max(Q[0][R],this.clipBounds[0][R]),Q[1][R]=Math.min(Q[1][R],this.clipBounds[1][R]);var N={model:K,view:G,projection:W,inverseModel:k.slice(),clipBounds:Q,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=l(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),l(U,U),R=0;R<3;++R)N.eyePosition[R]=U[12+R]/U[15];var ee,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&&((ee=this.triShader).bind(),ee.uniforms=N,this.triangleVAO.bind(),Z.drawArrays(Z.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((ee=this.lineShader).bind(),ee.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&&((ee=this.pointShader).bind(),ee.uniforms=N,this.pointVAO.bind(),Z.drawArrays(Z.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((ee=this.contourShader).bind(),ee.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,G=V.view||k,W=V.projection||k,Q=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],R=0;R<3;++R)Q[0][R]=Math.max(Q[0][R],this.clipBounds[0][R]),Q[1][R]=Math.min(Q[1][R],this.clipBounds[1][R]);this._model=[].slice.call(K),this._view=[].slice.call(G),this._projection=[].slice.call(W),this._resolution=[Z.drawingBufferWidth,Z.drawingBufferHeight];var N,U={model:K,view:G,projection:W,clipBounds:Q,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],G=this.positions,W=new Array(K.length),Q=0;Q<K.length;++Q)W[Q]=G[K[Q]];var R=V.coord[0],N=V.coord[1];if(!this.pickVertex){var U=this.positions[K[0]],ee=this.positions[K[1]],j=this.positions[K[2]],X=[(U[0]+ee[0]+j[0])/3,(U[1]+ee[1]+j[1])/3,(U[2]+ee[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(Q=0;Q<K.length;++Q)ne+=re[Q]*this.intensity[K[Q]];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 G=P(V),W=S(V),Q=E(V),R=D(V),N=F(V),U=H(V),ee=i(V,a(new Uint8Array([255,255,255,255]),[1,1,4]));ee.generateMipmap(),ee.minFilter=V.LINEAR_MIPMAP_LINEAR,ee.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}]),_e=n(V),we=n(V),Ee=n(V),fe=n(V),ge=n(V),ke=t(V,[{buffer:_e,type:V.FLOAT,size:3},{buffer:ge,type:V.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:we,type:V.FLOAT,size:4},{buffer:Ee,type:V.FLOAT,size:2},{buffer:fe,type:V.FLOAT,size:1}]),be=n(V),Se=t(V,[{buffer:be,type:V.FLOAT,size:3}]),Oe=new L(V,ee,G,W,Q,R,N,U,j,ne,X,J,re,se,oe,de,pe,ce,xe,_e,ge,we,Ee,fe,ke,be,Se);return Oe.update(Z),Oe}},{"./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(g,b,y){b.exports=function(a){var u=a.gl,f=e(u,[0,0,0,1,1,0,1,1]),o=n(u,t.boxVert,t.lineFrag);return new i(a,f,o)};var e=g("gl-buffer"),n=g("gl-shader"),t=g("./shaders");function i(a,u,f){this.plot=a,this.vbo=u,this.shader=f}var r,d,l=i.prototype;l.bind=function(){var a=this.shader;this.vbo.bind(),this.shader.bind(),a.attributes.coord.pointer(),a.uniforms.screenBox=this.plot.screenBox},l.drawBox=(r=[0,0],d=[0,0],function(a,u,f,o,h){var p=this.plot,s=this.shader,x=p.gl;r[0]=a,r[1]=u,d[0]=f,d[1]=o,s.uniforms.lo=r,s.uniforms.hi=d,s.uniforms.color=h,x.drawArrays(x.TRIANGLE_STRIP,0,4)}),l.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":116,"gl-buffer":78,"gl-shader":132}],114:[function(g,b,y){b.exports=function(p){var s=p.gl,x=e(s),c=n(s,i.gridVert,i.gridFrag),T=n(s,i.tickVert,i.gridFrag);return new r(p,x,c,T)};var e=g("gl-buffer"),n=g("gl-shader"),t=g("binary-search-bounds"),i=g("./shaders");function r(p,s,x,c){this.plot=p,this.vbo=s,this.shader=x,this.tickShader=c,this.ticks=[[],[]]}function d(p,s){return p-s}var l,a,u,f,o,h=r.prototype;h.draw=(l=[0,0],a=[0,0],u=[0,0],function(){for(var p=this.plot,s=this.vbo,x=this.shader,c=this.ticks,T=p.gl,_=p._tickBounds,w=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*(w[S+2]+w[S]),H=w[S+2]-w[S];a[S]=2*D/H,l[S]=2*(E-F)/H}x.bind(),s.bind(),x.attributes.dataCoord.pointer(),x.uniforms.dataShift=l,x.uniforms.dataScale=a;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*c[S].length;I[S]&&Z&&T.drawArrays(T.TRIANGLES,V,Z),V+=Z}}),h.drawTickMarks=function(){var p=[0,0],s=[0,0],x=[1,0],c=[0,1],T=[0,0],_=[0,0];return function(){for(var w=this.plot,k=this.vbo,L=this.tickShader,A=this.ticks,I=w.gl,P=w._tickBounds,S=w.dataBox,E=w.viewBox,D=w.pixelRatio,F=w.screenBox,H=F[2]-F[0],V=F[3]-F[1],Z=E[2]-E[0],K=E[3]-E[1],G=0;G<2;++G){var W=P[G],Q=P[G+2]-W,R=.5*(S[G+2]+S[G]),N=S[G+2]-S[G];s[G]=2*Q/N,p[G]=2*(W-R)/N}s[0]*=Z/H,p[0]*=Z/H,s[1]*=K/V,p[1]*=K/V,L.bind(),k.bind(),L.attributes.dataCoord.pointer();var U=L.uniforms;U.dataShift=p,U.dataScale=s;var ee=w.tickMarkLength,j=w.tickMarkWidth,X=w.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);T[0]=2*(E[0]-ee[1])/H-1,T[1]=(E[3]+E[1])/V-1,_[0]=ee[1]*D/H,_[1]=j[1]*D/V,xe&&(U.color=X[1],U.tickScale=_,U.dataAxis=c,U.screenOffset=T,I.drawArrays(I.TRIANGLES,de,xe)),T[0]=(E[2]+E[0])/H-1,T[1]=2*(E[1]-ee[0])/V-1,_[0]=j[0]*D/H,_[1]=ee[0]*D/V,oe&&(U.color=X[0],U.tickScale=_,U.dataAxis=x,U.screenOffset=T,I.drawArrays(I.TRIANGLES,se,oe)),T[0]=2*(E[2]+ee[3])/H-1,T[1]=(E[3]+E[1])/V-1,_[0]=ee[3]*D/H,_[1]=j[3]*D/V,xe&&(U.color=X[3],U.tickScale=_,U.dataAxis=c,U.screenOffset=T,I.drawArrays(I.TRIANGLES,de,xe)),T[0]=(E[2]+E[0])/H-1,T[1]=2*(E[3]+ee[2])/V-1,_[0]=j[2]*D/H,_[1]=ee[2]*D/V,oe&&(U.color=X[2],U.tickScale=_,U.dataAxis=x,U.screenOffset=T,I.drawArrays(I.TRIANGLES,se,oe))}}(),h.update=(f=[1,1,-1,-1,1,-1],o=[1,-1,1,1,-1,-1],function(p){for(var s=p.ticks,x=p.bounds,c=new Float32Array(18*(s[0].length+s[1].length)),T=(this.plot.zeroLineEnable,0),_=[[],[]],w=0;w<2;++w)for(var k=_[w],L=s[w],A=x[w],I=x[w+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)c[T++]=S,c[T++]=f[E],c[T++]=o[E]}this.ticks=_,this.vbo.update(c)}),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(g,b,y){b.exports=function(a){var u=a.gl,f=e(u,[-1,-1,-1,1,1,-1,1,1]),o=n(u,t.lineVert,t.lineFrag);return new i(a,f,o)};var e=g("gl-buffer"),n=g("gl-shader"),t=g("./shaders");function i(a,u,f){this.plot=a,this.vbo=u,this.shader=f}var r,d,l=i.prototype;l.bind=function(){var a=this.shader;this.vbo.bind(),this.shader.bind(),a.attributes.coord.pointer(),a.uniforms.screenBox=this.plot.screenBox},l.drawLine=(r=[0,0],d=[0,0],function(a,u,f,o,h,p){var s=this.plot,x=this.shader,c=s.gl;r[0]=a,r[1]=u,d[0]=f,d[1]=o,x.uniforms.start=r,x.uniforms.end=d,x.uniforms.width=h*s.pixelRatio,x.uniforms.color=p,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),l.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":116,"gl-buffer":78,"gl-shader":132}],116:[function(g,b,y){var e=g("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(g,b,y){b.exports=function(s){var x=s.gl,c=e(x),T=n(x,r.textVert,r.textFrag);return new d(s,c,T)};var e=g("gl-buffer"),n=g("gl-shader"),t=g("text-cache"),i=g("binary-search-bounds"),r=g("./shaders");function d(s,x,c){this.plot=s,this.vbo=x,this.shader=c,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var l,a,u,f,o,h,p=d.prototype;p.drawTicks=(l=[0,0],a=[0,0],u=[0,0],function(s){var x=this.plot,c=this.shader,T=this.tickX[s],_=this.tickOffset[s],w=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[s],G=this.labelCount[s],W=i.lt(T,L[s]),Q=i.le(T,L[s+2]);l[0]=l[1]=0,l[s]=1,a[s]=(k[2+s]+k[s])/(A[2+s]-A[s])-1;var R=2/A[2+(1^s)]-A[1^s];a[1^s]=R*k[1^s]-1,P[s]&&(a[1^s]-=R*I*S[s],W<Q&&_[Q]>_[W]&&(c.uniforms.dataAxis=l,c.uniforms.screenOffset=a,c.uniforms.color=E[s],c.uniforms.angle=D[s],w.drawArrays(w.TRIANGLES,_[W],_[Q]-_[W]))),F[s]&&G&&(a[1^s]-=R*I*H[s],c.uniforms.dataAxis=u,c.uniforms.screenOffset=a,c.uniforms.color=V[s],c.uniforms.angle=Z[s],w.drawArrays(w.TRIANGLES,K,G)),a[1^s]=R*k[2+(1^s)]-1,P[s+2]&&(a[1^s]+=R*I*S[s+2],W<Q&&_[Q]>_[W]&&(c.uniforms.dataAxis=l,c.uniforms.screenOffset=a,c.uniforms.color=E[s+2],c.uniforms.angle=D[s+2],w.drawArrays(w.TRIANGLES,_[W],_[Q]-_[W]))),F[s+2]&&G&&(a[1^s]+=R*I*H[s+2],c.uniforms.dataAxis=u,c.uniforms.screenOffset=a,c.uniforms.color=V[s+2],c.uniforms.angle=Z[s+2],w.drawArrays(w.TRIANGLES,K,G))}),p.drawTitle=function(){var s=[0,0],x=[0,0];return function(){var c=this.plot,T=this.shader,_=c.gl,w=c.screenBox,k=c.titleCenter,L=c.titleAngle,A=c.titleColor,I=c.pixelRatio;if(this.titleCount){for(var P=0;P<2;++P)x[P]=2*(k[P]*I-w[P])/(w[2+P]-w[P])-1;T.bind(),T.uniforms.dataAxis=s,T.uniforms.screenOffset=x,T.uniforms.angle=L,T.uniforms.color=A,_.drawArrays(_.TRIANGLES,this.titleOffset,this.titleCount)}}}(),p.bind=(f=[0,0],o=[0,0],h=[0,0],function(){var s=this.plot,x=this.shader,c=s._tickBounds,T=s.dataBox,_=s.screenBox,w=s.viewBox;x.bind();for(var k=0;k<2;++k){var L=c[k],A=c[k+2]-L,I=.5*(T[k+2]+T[k]),P=T[k+2]-T[k],S=w[k],E=w[k+2]-S,D=_[k],F=_[k+2]-D;o[k]=2*A/P*E/F,f[k]=2*(L-I)/P*E/F}h[1]=2*s.pixelRatio/(_[3]-_[1]),h[0]=h[1]*(_[3]-_[1])/(_[2]-_[0]),x.uniforms.dataScale=o,x.uniforms.dataShift=f,x.uniforms.textScale=h,this.vbo.bind(),x.attributes.textCoordinate.pointer()}),p.update=function(s){var x,c,T,_,w,k=[],L=s.ticks,A=s.bounds;for(w=0;w<2;++w){var I=[Math.floor(k.length/3)],P=[-1/0],S=L[w];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[w+2]-A[w]),Z=A[w],K=F.split(` 2644`),G=0;G<K.length;G++)for(T=t(H,K[G]).data,c=0;c<T.length;c+=2)k.push(T[c]*_,-T[c+1]*_-G*_*1.2,(D-Z)*V);I.push(Math.floor(k.length/3)),P.push(D)}this.tickOffset[w]=I,this.tickX[w]=P}for(w=0;w<2;++w){for(this.labelOffset[w]=Math.floor(k.length/3),T=t(s.labelFont[w],s.labels[w],{textAlign:"center"}).data,_=s.labelSize[w],x=0;x<T.length;x+=2)k.push(T[x]*_,-T[x+1]*_,0);this.labelCount[w]=Math.floor(k.length/3)-this.labelOffset[w]}for(this.titleOffset=Math.floor(k.length/3),T=t(s.titleFont,s.title).data,_=s.titleSize,x=0;x<T.length;x+=2)k.push(T[x]*_,-T[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(g,b,y){b.exports=function(f){var o=f.gl,h=e(o,[o.drawingBufferWidth,o.drawingBufferHeight]),p=new d(o,h);return p.grid=n(p),p.text=t(p),p.line=i(p),p.box=r(p),p.update(f),p};var e=g("gl-select-static"),n=g("./lib/grid"),t=g("./lib/text"),i=g("./lib/line"),r=g("./lib/box");function d(f,o){this.gl=f,this.pickBuffer=o,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 l=d.prototype;function a(f){for(var o=f.slice(),h=0;h<o.length;++h)o[h]=o[h].slice();return o}function u(f,o){return f.x-o.x}l.setDirty=function(){this.dirty=this.pickDirty=!0},l.setOverlayDirty=function(){this.dirty=!0},l.nextDepthValue=function(){return this._depthCounter++/65536},l.draw=function(){var f=this.gl,o=this.screenBox,h=this.viewBox,p=this.dataBox,s=this.pixelRatio,x=this.grid,c=this.line,T=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(o[0],o[1],o[2]-o[0],o[3]-o[1]);var w=this.borderColor;f.clearColor(w[0]*w[3],w[1]*w[3],w[2]*w[3],w[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]){c.bind();for(var P=0;P<2;++P)if(L[P]&&p[P]<=0&&p[P+2]>=0){var S=o[P]-p[P]*(o[P+2]-o[P])/(p[P+2]-p[P]);P===0?c.drawLine(S,o[1],S,o[3],I[P],A[P]):c.drawLine(o[0],S,o[2],S,I[P],A[P])}}for(P=0;P<_.length;++P)_[P].draw();f.viewport(o[0],o[1],o[2]-o[0],o[3]-o[1]),f.scissor(o[0],o[1],o[2]-o[0],o[3]-o[1]),this.grid.drawTickMarks(),c.bind();var E=this.borderLineEnable,D=this.borderLineWidth,F=this.borderLineColor;for(E[1]&&c.drawLine(h[0],h[1]-.5*D[1]*s,h[0],h[3]+.5*D[3]*s,D[1],F[1]),E[0]&&c.drawLine(h[0]-.5*D[0]*s,h[1],h[2]+.5*D[2]*s,h[1],D[0],F[0]),E[3]&&c.drawLine(h[2],h[1]-.5*D[1]*s,h[2],h[3]+.5*D[3]*s,D[3],F[3]),E[2]&&c.drawLine(h[0]-.5*D[0]*s,h[3],h[2]+.5*D[2]*s,h[3],D[2],F[2]),T.bind(),P=0;P<2;++P)T.drawTicks(P);this.titleEnable&&T.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)}},l.drawPick=function(){if(!this.static){var f=this.pickBuffer;this.gl,this._pickTimeout=null,f.begin();for(var o=1,h=this.objects,p=0;p<h.length;++p)o=h[p].drawPick(o);f.end()}},l.pick=function(f,o){if(!this.static){var h=this.pixelRatio,p=this.pickPixelRatio,s=this.viewBox,x=0|Math.round((f-s[0]/h)*p),c=0|Math.round((o-s[1]/h)*p),T=this.pickBuffer.query(x,c,this.pickRadius);if(!T)return null;for(var _=T.id+(T.value[0]<<8)+(T.value[1]<<16)+(T.value[2]<<24),w=this.objects,k=0;k<w.length;++k){var L=w[k].pick(x,c,_);if(L)return L}return null}},l.setScreenBox=function(f){var o=this.screenBox,h=this.pixelRatio;o[0]=0|Math.round(f[0]*h),o[1]=0|Math.round(f[1]*h),o[2]=0|Math.round(f[2]*h),o[3]=0|Math.round(f[3]*h),this.setDirty()},l.setDataBox=function(f){var o=this.dataBox;(o[0]!==f[0]||o[1]!==f[1]||o[2]!==f[2]||o[3]!==f[3])&&(o[0]=f[0],o[1]=f[1],o[2]=f[2],o[3]=f[3],this.setDirty())},l.setViewBox=function(f){var o=this.pixelRatio,h=this.viewBox;h[0]=0|Math.round(f[0]*o),h[1]=0|Math.round(f[1]*o),h[2]=0|Math.round(f[2]*o),h[3]=0|Math.round(f[3]*o);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()},l.update=function(f){f=f||{};var o=this.gl;this.pixelRatio=f.pixelRatio||1;var h=this.pixelRatio;this.pickPixelRatio=Math.max(h,1),this.setScreenBox(f.screenBox||[0,0,o.drawingBufferWidth/h,o.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,s=(p[2]-p[0])/(p[3]-p[1]);this.setDataBox(f.dataBox||[-10,-10/s,10,10/s]),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=a(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=a(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=a(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=a(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=a(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=a(f.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var x=f.ticks||[[],[]],c=this._tickBounds;c[0]=c[1]=1/0,c[2]=c[3]=-1/0;for(var T=0;T<2;++T){var _=x[T].slice(0);_.length!==0&&(_.sort(u),c[T]=Math.min(c[T],_[0].x),c[T+2]=Math.max(c[T+2],_[_.length-1].x))}this.grid.update({bounds:c,ticks:x}),this.text.update({bounds:c,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()},l.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},l.addObject=function(f){this.objects.indexOf(f)<0&&(this.objects.push(f),this.setDirty())},l.removeObject=function(f){for(var o=this.objects,h=0;h<o.length;++h)if(o[h]===f){o.splice(h,1),this.setDirty();break}},l.addOverlay=function(f){this.overlays.indexOf(f)<0&&(this.overlays.push(f),this.setOverlayDirty())},l.removeOverlay=function(f){for(var o=this.overlays,h=0;h<o.length;++h)if(o[h]===f){o.splice(h,1),this.setOverlayDirty();break}}},{"./lib/box":113,"./lib/grid":114,"./lib/line":115,"./lib/text":117,"gl-select-static":131}],119:[function(g,b,y){b.exports=function(l,a){l=l||document.body,a=a||{};var u=[.01,1/0];"distanceLimits"in a&&(u[0]=a.distanceLimits[0],u[1]=a.distanceLimits[1]),"zoomMin"in a&&(u[0]=a.zoomMin),"zoomMax"in a&&(u[1]=a.zoomMax);var f=n({center:a.center||[0,0,0],up:a.up||[0,1,0],eye:a.eye||[0,0,10],mode:a.mode||"orbit",distanceLimits:u}),o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=0,p=l.clientWidth,s=l.clientHeight,x={keyBindingMode:"rotate",enableWheel:!0,view:f,element:l,delay:a.delay||16,rotateSpeed:a.rotateSpeed||1,zoomSpeed:a.zoomSpeed||1,translateSpeed:a.translateSpeed||1,flipX:!!a.flipX,flipY:!!a.flipY,modes:f.modes,_ortho:a._ortho||a.projection&&a.projection.type==="orthographic"||!1,tick:function(){var c=e(),T=this.delay,_=c-2*T;f.idle(c-T),f.recalcMatrix(_),f.flush(c-(100+2*T));for(var w=!0,k=f.computedMatrix,L=0;L<16;++L)w=w&&o[L]===k[L],o[L]=k[L];var A=l.clientWidth===p&&l.clientHeight===s;return p=l.clientWidth,s=l.clientHeight,w?!A:(h=Math.exp(f.computedRadius[0]),!0)},lookAt:function(c,T,_){f.lookAt(f.lastT(),c,T,_)},rotate:function(c,T,_){f.rotate(f.lastT(),c,T,_)},pan:function(c,T,_){f.pan(f.lastT(),c,T,_)},translate:function(c,T,_){f.translate(f.lastT(),c,T,_)}};return Object.defineProperties(x,{matrix:{get:function(){return f.computedMatrix},set:function(c){return f.setMatrix(f.lastT(),c),f.computedMatrix},enumerable:!0},mode:{get:function(){return f.getMode()},set:function(c){var T=f.computedUp.slice(),_=f.computedEye.slice(),w=f.computedCenter.slice();if(f.setMode(c),c==="turntable"){var k=e();f._active.lookAt(k,_,w,T),f._active.lookAt(k+500,_,w,[0,0,1]),f._active.flush(k)}return f.getMode()},enumerable:!0},center:{get:function(){return f.computedCenter},set:function(c){return f.lookAt(f.lastT(),null,c),f.computedCenter},enumerable:!0},eye:{get:function(){return f.computedEye},set:function(c){return f.lookAt(f.lastT(),c),f.computedEye},enumerable:!0},up:{get:function(){return f.computedUp},set:function(c){return f.lookAt(f.lastT(),null,null,c),f.computedUp},enumerable:!0},distance:{get:function(){return h},set:function(c){return f.setDistance(f.lastT(),c),c},enumerable:!0},distanceLimits:{get:function(){return f.getDistanceLimits(u)},set:function(c){return f.setDistanceLimits(c),c},enumerable:!0}}),l.addEventListener("contextmenu",function(c){return c.preventDefault(),!1}),x._lastX=-1,x._lastY=-1,x._lastMods={shift:!1,control:!1,alt:!1,meta:!1},x.enableMouseListeners=function(){function c(T,_,w,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&T),H=!!(2&T),V=!!(4&T),Z=1/l.clientHeight,K=Z*(_-x._lastX),G=Z*(w-x._lastY),W=x.flipX?1:-1,Q=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,-Q*R*G,0),(I&&F&&!S&&!E&&!D||H||F&&S&&!E&&!D)&&f.pan(N,-x.translateSpeed*K*h,x.translateSpeed*G*h,0),P&&F&&!S&&!E&&!D||V||F&&!S&&E&&!D)){var U=-x.zoomSpeed*G/window.innerHeight*(N-f.lastT())*100;f.pan(N,0,0,h*(Math.exp(U)-1))}return x._lastX=_,x._lastY=w,x._lastMods=k,!0}}x.mouseListener=t(l,c),l.addEventListener("touchstart",function(T){var _=r(T.changedTouches[0],l);c(0,_[0],_[1],x._lastMods),c(1,_[0],_[1],x._lastMods)},!!d&&{passive:!0}),l.addEventListener("touchmove",function(T){var _=r(T.changedTouches[0],l);c(1,_[0],_[1],x._lastMods),T.preventDefault()},!!d&&{passive:!1}),l.addEventListener("touchend",function(T){c(0,x._lastX,x._lastY,x._lastMods)},!!d&&{passive:!0}),x.wheelListener=i(l,function(T,_){if(x.keyBindingMode!==!1&&x.enableWheel){var w=x.flipX?1:-1,k=x.flipY?1:-1,L=e();if(Math.abs(T)>Math.abs(_))f.rotate(L,0,0,-T*w*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=g("right-now"),n=g("3d-view"),t=g("mouse-change"),i=g("mouse-wheel"),r=g("mouse-event-offset"),d=g("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(g,b,y){var e=g("glslify"),n=g("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}`]),i=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,i,null,[{name:"position",type:"vec2"}])}},{"gl-shader":132,glslify:231}],121:[function(g,b,y){var e=g("./camera.js"),n=g("gl-axes3d"),t=g("gl-axes3d/properties"),i=g("gl-spikes3d"),r=g("gl-select-static"),d=g("gl-fbo"),l=g("a-big-triangle"),a=g("mouse-change"),u=g("gl-mat4/perspective"),f=g("gl-mat4/ortho"),o=g("./lib/shader"),h=g("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 s(c){var T=Math.round(Math.log(Math.abs(c))/Math.log(10));if(T<0){var _=Math.round(Math.pow(10,-T));return Math.ceil(c*_)/_}return T>0?(_=Math.round(Math.pow(10,T)),Math.ceil(c/_)*_):Math.ceil(c)}function x(c){return typeof c!="boolean"||c}b.exports={createScene:function(c){(c=c||{}).camera=c.camera||{};
vendor: 5,867 bytes, line 2660
2660var T=c.canvas;T||(T=document.createElement("canvas"),c.container?c.container.appendChild(T):document.body.appendChild(T));var _=c.gl;if(_||(c.glOptions&&(h=!!c.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}(T,c.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:h})),!_)throw new Error("webgl not supported");var w=c.bounds||[[-10,-10,-10],[10,10,10]],k=new p,L=d(_,_.drawingBufferWidth,_.drawingBufferHeight,{preferFloat:!h}),A=o(_),I=c.cameraObject&&c.cameraObject._ortho===!0||c.camera.projection&&c.camera.projection.type==="orthographic"||!1,P={eye:c.camera.eye||[2,0,0],center:c.camera.center||[0,0,0],up:c.camera.up||[0,1,0],zoomMin:c.camera.zoomMax||.1,zoomMax:c.camera.zoomMin||100,mode:c.camera.mode||"turntable",_ortho:I},S=c.axes||{},E=n(_,S);E.enable=!S.disable;var D=c.spikes||{},F=i(_,D),H=[],V=[],Z=[],K=[],G=!0,W=!0,Q=new Array(16),R=new Array(16),N={view:null,projection:Q,model:R,_ortho:!1},U=(W=!0,[_.drawingBufferWidth,_.drawingBufferHeight]),ee=c.cameraObject||e(T,P),j={gl:_,contextLost:!1,pixelRatio:c.pixelRatio||1,canvas:T,selection:k,camera:ee,axes:E,axesPixels:null,spikes:F,bounds:w,objects:H,shape:U,aspect:c.aspectRatio||[1,1,1],pickRadius:c.pickRadius||10,zNear:c.zNear||.01,zFar:c.zFar||1e3,fovy:c.fovy||Math.PI/4,clearColor:c.clearColor||[0,0,0,0],autoResize:x(c.autoResize),autoBounds:x(c.autoBounds),autoScale:!!c.autoScale,autoCenter:x(c.autoCenter),clipToBounds:x(c.clipToBounds),snapToData:!!c.snapToData,onselect:c.onselect||null,onrender:c.onrender||null,onclick:c.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},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=T.parentNode,de=1,xe=1;ce&&ce!==document.body?(de=ce.clientWidth,xe=ce.clientHeight):(de=window.innerWidth,xe=window.innerHeight);var _e=0|Math.ceil(de*j.pixelRatio),we=0|Math.ceil(xe*j.pixelRatio);if(_e!==T.width||we!==T.height){T.width=_e,T.height=we;var Ee=T.style;Ee.position=Ee.position||"absolute",Ee.left="0px",Ee.top="0px",Ee.width=de+"px",Ee.height=xe+"px",G=!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 _e=H[xe],we=_e.pickSlots;if(we){for(var Ee=0;Ee<de;++Ee)if(Z[Ee]+we<255){V[xe]=Ee,_e.setPickBase(Z[Ee]+1),Z[Ee]+=we;continue e}var fe=r(_,U);V[xe]=de,K.push(fe),Z.push(we),_e.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||(G=!0,W=!0)},j.add=function(ce){j._stopped||(ce.axes=E,H.push(ce),V.push(-1),G=!0,W=!0,re())},j.remove=function(ce){if(!j._stopped){var de=H.indexOf(ce);de<0||(H.splice(de,1),V.pop(),G=!0,W=!0,re())}},j.dispose=function(){if(!j._stopped&&(j._stopped=!0,window.removeEventListener("resize",J),T.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=a(T,function(ce,de,xe){if(!j._stopped){var _e=K.length,we=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 ge=0;ge<_e;++ge){var ke=K[ge].query(de,X[1]-xe-1,j.pickRadius);if(ke){if(ke.distance>k.distance)continue;for(var be=0;be<we;++be){var Se=H[be];if(V[be]===ge){var Oe=Se.pick(ke);Oe&&(k.buttons=ce,k.screen=ke.coord,k.distance=ke.distance,k.object=Se,k.index=Oe.distance,k.dataPosition=Oe.position,k.dataCoordinate=Oe.dataCoordinate,k.data=Oe,fe=!0)}}}}}Ee&&Ee!==k.object&&(Ee.highlight&&Ee.highlight(null),G=!0),k.object&&(k.object.highlight&&k.object.highlight(k.data),G=!0),(fe=fe||k.object!==Ee)&&j.onselect&&j.onselect(k),1&ce&&!(1&j._prevButtons)&&j.onclick&&j.onclick(k),j._prevButtons=ce}})},T.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,G=G||ce,W=W||ce,E.pixelRatio=j.pixelRatio,F.pixelRatio=j.pixelRatio;var de=H.length,xe=se[0],_e=se[1];xe[0]=xe[1]=xe[2]=1/0,_e[0]=_e[1]=_e[2]=-1/0;for(var we=0;we<de;++we){(Ue=H[we]).pixelRatio=j.pixelRatio,Ue.axes=j.axes,G=G||!!Ue.dirty,W=W||!!Ue.dirty;var Ee=Ue.bounds;if(Ee)for(var fe=Ee[0],ge=Ee[1],ke=0;ke<3;++ke)xe[ke]=Math.min(xe[ke],fe[ke]),_e[ke]=Math.max(_e[ke],ge[ke])}var be=j.bounds;if(j.autoBounds)for(ke=0;ke<3;++ke){if(_e[ke]<xe[ke])xe[ke]=-1,_e[ke]=1;else{xe[ke]===_e[ke]&&(xe[ke]-=1,_e[ke]+=1);var Se=.05*(_e[ke]-xe[ke]);xe[ke]=xe[ke]-Se,_e[ke]=_e[ke]+Se}be[0][ke]=xe[ke],be[1][ke]=_e[ke]}var Oe=!1;for(ke=0;ke<3;++ke)Oe=Oe||oe[0][ke]!==be[0][ke]||oe[1][ke]!==be[1][ke],oe[0][ke]=be[0][ke],oe[1][ke]=be[1][ke];if(W=W||Oe,G=G||Oe){if(Oe){var De=[0,0,0];for(we=0;we<3;++we)De[we]=s((be[1][we]-be[0][we])/10);
2660E.autoTicks?E.update({bounds:be,tickSpacing:De}):E.update({bounds:be})}var je=_.drawingBufferWidth,Je=_.drawingBufferHeight;for(U[0]=je,U[1]=Je,X[0]=0|Math.max(je/j.pixelRatio,1),X[1]=0|Math.max(Je/j.pixelRatio,1),function(Ge,Ye){var et=Ge.bounds,ct=Ge.cameraParams,mt=ct.projection,Ct=ct.model,Tt=Ge.gl.drawingBufferWidth,nt=Ge.gl.drawingBufferHeight,Qe=Ge.zNear,Et=Ge.zFar,Gt=Ge.fovy,Xt=Tt/nt;Ye?(f(mt,-Xt,Xt,-1,1,Qe,Et),ct._ortho=!0):(u(mt,Gt,Xt,Qe,Et),ct._ortho=!1);for(var Fe=0;Fe<16;++Fe)Ct[Fe]=0;Ct[15]=1;var qe=0;for(Fe=0;Fe<3;++Fe)qe=Math.max(qe,et[1][Fe]-et[0][Fe]);for(Fe=0;Fe<3;++Fe)Ge.autoScale?Ct[5*Fe]=Ge.aspect[Fe]/(et[1][Fe]-et[0][Fe]):Ct[5*Fe]=1/qe,Ge.autoCenter&&(Ct[12+Fe]=.5*-Ct[5*Fe]*(et[0][Fe]+et[1][Fe]))}(j,I),we=0;we<de;++we)(Ue=H[we]).axesBounds=be,j.clipToBounds&&(Ue.clipBounds=be);k.object&&(j.snapToData?F.position=k.dataCoordinate:F.position=k.dataPosition,F.bounds=be),W&&(W=!1,function(){if(!ne()){_.colorMask(!0,!0,!0,!0),_.depthMask(!0),_.disable(_.BLEND),_.enable(_.DEPTH_TEST),_.depthFunc(_.LEQUAL);for(var Ge=H.length,Ye=K.length,et=0;et<Ye;++et){var ct=K[et];ct.shape=X,ct.begin();for(var mt=0;mt<Ge;++mt)if(V[mt]===et){var Ct=H[mt];Ct.drawPick&&(Ct.pixelRatio=1,Ct.drawPick(N))}ct.end()}}}()),j.axesPixels=t(j.axes,N,je,Je),j.onrender&&j.onrender(),_.bindFramebuffer(_.FRAMEBUFFER,null),_.viewport(0,0,je,Je),j.clearRGBA(),_.depthMask(!0),_.colorMask(!0,!0,!0,!0),_.enable(_.DEPTH_TEST),_.depthFunc(_.LEQUAL),_.disable(_.BLEND),_.disable(_.CULL_FACE);var ze=!1;for(E.enable&&(ze=ze||E.isTransparent(),E.draw(N)),F.axes=E,k.object&&F.draw(N),_.disable(_.CULL_FACE),we=0;we<de;++we)(Ue=H[we]).axes=E,Ue.pixelRatio=j.pixelRatio,Ue.isOpaque&&Ue.isOpaque()&&Ue.draw(N),Ue.isTransparent&&Ue.isTransparent()&&(ze=!0);if(ze){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),we=0;we<de;++we)(Ue=H[we]).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),we=0;we<de;++we){var Ue;(Ue=H[we]).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,l(_),_.disable(_.BLEND)}for(G=!1,we=0;we<de;++we)H[we].dirty=!1}}}return j.enableMouseListeners(),function ce(){j._stopped||j.contextLost||(pe(),requestAnimationFrame(ce))}(),j.redraw=function(){j._stopped||(G=!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(g,b,y){var e=g("glslify");y.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}`]),y.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`]),y.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`]),y.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(g,b,y){var e=g("gl-shader"),n=g("gl-buffer"),t=g("typedarray-pool"),i=g("./lib/shader");function r(u,f,o,h,p){this.plot=u,this.offsetBuffer=f,this.pickBuffer=o,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 o=u.gl,h=n(o),p=n(o),s=e(o,i.pointVertex,i.pointFragment),x=e(o,i.pickVertex,i.pickFragment),c=new r(u,h,p,s,x);return c.update(f),u.addObject(c),c};var d,l,a=r.prototype;a.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},a.update=function(u){var f;function o(_,w){return _ in u?u[_]:w}u=u||{},this.sizeMin=o("sizeMin",.5),this.sizeMax=o("sizeMax",20),this.color=o("color",[1,0,0,1]).slice(),this.areaRatio=o("areaRatio",1),this.borderColor=o("borderColor",[0,0,0,1]).slice(),this.blend=o("blend",!1);var h=u.positions.length>>>1,p=u.positions instanceof Float32Array,s=u.idToIndex instanceof Int32Array&&u.idToIndex.length>=h,x=u.positions,c=p?x:t.mallocFloat32(x.length),T=s?u.idToIndex:t.mallocInt32(h);if(p||c.set(x),!s)for(c.set(x),f=0;f<h;f++)T[f]=f;this.points=x,this.offsetBuffer.update(c),this.pickBuffer.update(T),p||t.free(c),s||t.free(T),this.pointCount=h,this.pickOffset=0},a.unifiedDraw=(d=[1,0,0,0,1,0,0,0,1],l=[0,0,0,0],function(u){var f=u!==void 0,o=f?this.pickShader:this.shader,h=this.plot.gl,p=this.plot.dataBox;if(this.pointCount===0)return u;var s=p[2]-p[0],x=p[3]-p[1],c=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),T=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/M
2754ath.pow(c,.33333)));d[0]=2/s,d[4]=2/x,d[6]=-2*p[0]/s-1,d[7]=-2*p[1]/x-1,this.offsetBuffer.bind(),o.bind(),o.attributes.position.pointer(),o.uniforms.matrix=d,o.uniforms.color=this.color,o.uniforms.borderColor=this.borderColor,o.uniforms.pointCloud=T<5,o.uniforms.pointSize=T,o.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),f&&(l[0]=255&u,l[1]=u>>8&255,l[2]=u>>16&255,l[3]=u>>24&255,this.pickBuffer.bind(),o.attributes.pickId.pointer(h.UNSIGNED_BYTE),o.uniforms.pickOffset=l,this.pickOffset=u);var _=h.getParameter(h.BLEND),w=h.getParameter(h.DITHER);return _&&!this.blend&&h.disable(h.BLEND),w&&h.disable(h.DITHER),h.drawArrays(h.POINTS,0,this.pointCount),_&&!this.blend&&h.enable(h.BLEND),w&&h.enable(h.DITHER),u+this.pointCount}),a.draw=a.unifiedDraw,a.drawPick=a.unifiedDraw,a.pick=function(u,f,o){var h=this.pickOffset,p=this.pointCount;if(o<h||o>=h+p)return null;var s=o-h,x=this.points;return{object:this,pointId:s,dataCoord:[x[2*s],x[2*s+1]]}}},{"./lib/shader":122,"gl-buffer":78,"gl-shader":132,"typedarray-pool":308}],124:[function(g,b,y){b.exports=function(e,n,t,i){var r,d,l,a,u,f=n[0],o=n[1],h=n[2],p=n[3],s=t[0],x=t[1],c=t[2],T=t[3];return(d=f*s+o*x+h*c+p*T)<0&&(d=-d,s=-s,x=-x,c=-c,T=-T),1-d>1e-6?(r=Math.acos(d),l=Math.sin(r),a=Math.sin((1-i)*r)/l,u=Math.sin(i*r)/l):(a=1-i,u=i),e[0]=a*f+u*s,e[1]=a*o+u*x,e[2]=a*h+u*c,e[3]=a*p+u*T,e}},{}],125:[function(g,b,y){b.exports=function(e){return e||e===0?e.toString():""}},{}],126:[function(g,b,y){var e=g("vectorize-text");b.exports=function(t,i,r){var d=n[i];if(d||(d=n[i]={}),t in d)return d[t];var l={textAlign:"center",textBaseline:"middle",lineHeight:1,font:i,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},a=e(t,l);l.triangles=!1;var u,f,o=e(t,l);if(r&&r!==1){for(u=0;u<a.positions.length;++u)for(f=0;f<a.positions[u].length;++f)a.positions[u][f]/=r;for(u=0;u<o.positions.length;++u)for(f=0;f<o.positions[u].length;++f)o.positions[u][f]/=r}var h=[[1/0,1/0],[-1/0,-1/0]],p=o.positions.length;for(u=0;u<p;++u){var s=o.positions[u];for(f=0;f<2;++f)h[0][f]=Math.min(h[0][f],s[f]),h[1][f]=Math.max(h[1][f],s[f])}return d[t]=[a,o,h]};var n={}},{"vectorize-text":311}],127:[function(g,b,y){var e=g("gl-shader"),n=g("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}`]),i=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`]),l=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}`]),a=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],u={vertex:t,fragment:d,attributes:a},f={vertex:i,fragment:d,attributes:a},o={vertex:r,fragment:d,attributes:a},h={vertex:t,fragment:l,attributes:a},p={vertex:i,fragment:l,attributes:a},s={vertex:r,fragment:l,attributes:a};function x(c,T){var _=e(c,T),w=_.attributes;return w.position.location=0,w.color.location=1,w.glyph.location=2,w.id.location=3,_}y.createPerspective=function(c){return x(c,u)},y.createOrtho=function(c){return x(c,f)},y.createProject=function(c){return x(c,o)},y.createPickPerspective=function(c){return x(c,h)},y.createPickOrtho=function(c){return x(c,p)},y.createPickProject=function(c){return x(c,s)}},{"gl-shader":132,glslify:231}],128:[function(g,b,y){var e=g("is-string-blank"),n=g("gl-buffer"),t=g("gl-vao"),i=g("typedarray-pool"),r=g("gl-mat4/multiply"),d=g("./lib/shaders"),l=g("./lib/glyphs"),a=g("./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 G=Z[0],W=Z[1],Q=Z[2],R=Z[3];return Z[0]=K[0]*G+K[4]*W+K[8]*Q+K[12]*R,Z[1]=K[1]*G+K[5]*W+K[9]*Q+K[13]*R,Z[2]=K[2]*G+K[6]*W+K[10]*Q+K[14]*R,Z[3]=K[3]*G+K[7]*W+K[11]*Q+K[15]*R,Z}function o(Z,K,G,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 s(Z,K,G,W,Q,R,N,U,ee,j,X,J){this.gl=Z,this.pixelRatio=1,this.shader=K,this.orthoShader=G,this.projectShader=W,this.pointBuffer=Q,this.colorBuffer=R,this.glyphBuffer=N,this.idBuffer=U,this.vao=ee,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,G=d.createPerspective(K),W=d.createOrtho(K),Q=d.createProject(K),R=d.createPickPerspective(K),N=d.createPickOrtho(K),U=d.createPickProject(K),ee=n(K),j=n(K),X=n(K),J=n(K),re=t(K,[{buffer:ee,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 s(K,G,W,Q,ee,j,X,J,re,R,N,U);return ne.update(Z),ne};var x=s.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 c=[0,0],T=[0,0,0],_=[0,0,0],w=[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,G,W){return Z[0]=K[0],Z[1]=K[1],Z[2]=K[2],Z[G]=W,Z}function D(Z,K,G,W){var Q,R=K.axesProject,N=K.gl,U=Z.uniforms,ee=G.model||u,
2998j=G.view||u,X=G.projection||u,J=K.axesBounds,re=function(be){for(var Se=I,Oe=0;Oe<2;++Oe)for(var De=0;De<3;++De)Se[Oe][De]=Math.max(Math.min(be[Oe][De],1e8),-1e8);return Se}(K.clipBounds);Q=K.axes&&K.axes.lastCubeProps?K.axes.lastCubeProps.axis:[1,1,1],c[0]=2/N.drawingBufferWidth,c[1]=2/N.drawingBufferHeight,Z.bind(),U.view=j,U.projection=X,U.screenSize=c,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,Q[ne]<0?se[12+ne]=J[0][ne]:se[12+ne]=J[1][ne],r(se,ee,se),U.model=se;var pe=(ne+1)%3,ce=(ne+2)%3,de=P(T),xe=P(_);de[pe]=1,xe[ce]=1;var _e=o(0,0,0,S(w,de)),we=o(0,0,0,S(k,xe));if(Math.abs(_e[1])>Math.abs(we[1])){var Ee=_e;_e=we,we=Ee,Ee=de,de=xe,xe=Ee;var fe=pe;pe=ce,ce=fe}_e[0]<0&&(de[pe]=-1),we[1]>0&&(xe[ce]=-1);var ge=0,ke=0;for(oe=0;oe<4;++oe)ge+=Math.pow(ee[4*pe+oe],2),ke+=Math.pow(ee[4*ce+oe],2);de[pe]/=Math.sqrt(ge),xe[ce]/=Math.sqrt(ke),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,G,W,Q,R,N){var U=G.gl;if((R===G.projectHasAlpha||N)&&D(K,G,W,Q),R===G.hasAlpha||N){Z.bind();var ee=Z.uniforms;ee.model=W.model||u,ee.view=W.view||u,ee.projection=W.projection||u,c[0]=2/U.drawingBufferWidth,c[1]=2/U.drawingBufferHeight,ee.screenSize=c,ee.highlightId=G.highlightId,ee.highlightScale=G.highlightScale,ee.fragClipBounds=F,ee.clipBounds=G.axes.bounds,ee.opacity=G.opacity,ee.pickGroup=G.pickId/255,ee.pixelRatio=Q,G.vao.bind(),G.vao.draw(U.TRIANGLES,G.vertexCount),G.lineWidth>0&&(U.lineWidth(G.lineWidth*Q),G.vao.draw(U.LINES,G.lineVertexCount,G.vertexCount)),G.vao.unbind()}}function V(Z,K,G,W){var Q;Q=Array.isArray(Z)?K<Z.length?Z[K]:void 0:Z,Q=a(Q);var R=!0;e(Q)&&(Q="\u25BC",R=!1);var N=l(Q,G,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)},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 G=this.points[K],W=this._selectResult;W.index=K;for(var Q=0;Q<3;++Q)W.position[Q]=W.dataCoordinate[Q]=G[Q];return W},x.highlight=function(Z){if(Z){var K=Z.index,G=255&K,W=K>>8&255,Q=K>>16&255;this.highlightId=[G/255,W/255,Q/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 G=+Z.projectScale;this.projectScale=[G,G,G]}if(this.projectHasAlpha=!1,"projectOpacity"in Z){Array.isArray(Z.projectOpacity)?this.projectOpacity=Z.projectOpacity.slice():(G=+Z.projectOpacity,this.projectOpacity=[G,G,G]);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 Q,R,N=Z.position,U=Z.font||"normal",ee=Z.alignment||[0,0];if(ee.length===2)Q=ee[0],R=ee[1];else for(Q=[],R=[],W=0;W<ee.length;++W)Q[W]=ee[W][0],R[W]=ee[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 _e=N[W],we=0;we<3;++we)if(isNaN(_e[we])||!isFinite(_e[we]))continue e;var Ee=(et=V(J,W,U,this.pixelRatio)).mesh,fe=et.lines,ge=et.bounds;ce+=3*Ee.cells.length,de+=2*fe.edges.length}}var ke=ce+de,be=i.mallocFloat(3*ke),Se=i.mallocFloat(4*ke),Oe=i.mallocFloat(2*ke),De=i.mallocUint32(ke);if(ke>0){var je=0,Je=ce,ze=[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,_e=N[W],we=0;we<3;++we){if(isNaN(_e[we])||!isFinite(_e[we]))continue e;X[we]=Math.max(X[we],_e[we]),j[we]=Math.min(j[we],_e[we])}Ee=(et=V(J,W,U,this.pixelRatio)).mesh,fe=et.lines,ge=et.bounds;var et,ct=et.visible;if(ct)if(Array.isArray(re)){if((mt=Ge?W<re.length?re[W]:[0,0,0,0]:re).length===3){for(we=0;we<3;++we)ze[we]=mt[we];ze[3]=1}else if(mt.length===4){for(we=0;we<4;++we)ze[we]=mt[we];!this.hasAlpha&&mt[3]<1&&(this.hasAlpha=!0)}}else ze[0]=ze[1]=ze[2]=0,ze[3]=1;else ze=[1,1,1,0];if(ct)if(Array.isArray(oe)){var mt;if((mt=Ye?W<oe.length?oe[W]:[0,0,0,0]:oe).length===3){for(we=0;we<3;
2998++we)Ue[we]=mt[we];Ue[we]=1}else if(mt.length===4){for(we=0;we<4;++we)Ue[we]=mt[we];!this.hasAlpha&&mt[3]<1&&(this.hasAlpha=!0)}}else Ue[0]=Ue[1]=Ue[2]=0,Ue[3]=1;else Ue=[1,1,1,0];var Ct=.5;ct?Array.isArray(ne)?Ct=W<ne.length?+ne[W]:12:ne?Ct=+ne:this.useOrtho&&(Ct=12):Ct=0;var Tt=0;Array.isArray(se)?Tt=W<se.length?+se[W]:0:se&&(Tt=+se);var nt=Math.cos(Tt),Qe=Math.sin(Tt);for(_e=N[W],we=0;we<3;++we)X[we]=Math.max(X[we],_e[we]),j[we]=Math.min(j[we],_e[we]);var Et=Q,Gt=R;Et=0,Array.isArray(Q)?Et=W<Q.length?Q[W]:0:Q&&(Et=Q),Gt=0,Array.isArray(R)?Gt=W<R.length?R[W]:0:R&&(Gt=R);var Xt=[Et*=Et>0?1-ge[0][0]:Et<0?1+ge[1][0]:1,Gt*=Gt>0?1-ge[0][1]:Gt<0?1+ge[1][1]:1],Fe=Ee.cells||[],qe=Ee.positions||[];for(we=0;we<Fe.length;++we)for(var wt=Fe[we],ft=0;ft<3;++ft){for(var Ce=0;Ce<3;++Ce)be[3*je+Ce]=_e[Ce];for(Ce=0;Ce<4;++Ce)Se[4*je+Ce]=ze[Ce];De[je]=pe;var Ie=qe[wt[ft]];Oe[2*je]=Ct*(nt*Ie[0]-Qe*Ie[1]+Xt[0]),Oe[2*je+1]=Ct*(Qe*Ie[0]+nt*Ie[1]+Xt[1]),je+=1}for(Fe=fe.edges,qe=fe.positions,we=0;we<Fe.length;++we)for(wt=Fe[we],ft=0;ft<2;++ft){for(Ce=0;Ce<3;++Ce)be[3*Je+Ce]=_e[Ce];for(Ce=0;Ce<4;++Ce)Se[4*Je+Ce]=Ue[Ce];De[Je]=pe,Ie=qe[wt[ft]],Oe[2*Je]=Ct*(nt*Ie[0]-Qe*Ie[1]+Xt[0]),Oe[2*Je+1]=Ct*(Qe*Ie[0]+nt*Ie[1]+Xt[1]),Je+=1}}}this.bounds=[j,X],this.points=N,this.pointCount=N.length,this.vertexCount=ce,this.lineVertexCount=de,this.pointBuffer.update(be),this.colorBuffer.update(Se),this.glyphBuffer.update(Oe),this.idBuffer.update(De),i.free(be),i.free(Se),i.free(Oe),i.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(g,b,y){var e=g("glslify");y.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`]),y.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(g,b,y){var e=g("gl-shader"),n=g("gl-buffer"),t=g("./lib/shaders");function i(d,l,a){this.plot=d,this.boxBuffer=l,this.boxShader=a,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,l){var a=d.gl,u=n(a,[0,0,0,1,1,0,1,1]),f=e(a,t.boxVertex,t.boxFragment),o=new i(d,u,f);return o.update(l),d.addOverlay(o),o};var r=i.prototype;r.draw=function(){if(this.enabled){var d=this.plot,l=this.selectBox,a=this.borderWidth,u=(this.innerFill,this.innerColor),f=(this.outerFill,this.outerColor),o=this.borderColor,h=d.box,p=d.screenBox,s=d.dataBox,x=d.viewBox,c=d.pixelRatio,T=(l[0]-s[0])*(x[2]-x[0])/(s[2]-s[0])+x[0],_=(l[1]-s[1])*(x[3]-x[1])/(s[3]-s[1])+x[1],w=(l[2]-s[0])*(x[2]-x[0])/(s[2]-s[0])+x[0],k=(l[3]-s[1])*(x[3]-x[1])/(s[3]-s[1])+x[1];if(T=Math.max(T,x[0]),_=Math.max(_,x[1]),w=Math.min(w,x[2]),k=Math.min(k,x[3]),!(w<T||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,_,T,k,f),h.drawBox(0,k,L,A,f),h.drawBox(w,_,L,k,f)),this.innerFill&&h.drawBox(T,_,w,k,u),a>0){var I=a*c;h.drawBox(T-I,_-I,w+I,_+I,o),h.drawBox(T-I,k-I,w+I,k+I,o),h.drawBox(T-I,_-I,T+I,k+I,o),h.drawBox(w-I,_-I,w+I,k+I,o)}}}},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(g,b,y){b.exports=function(a,u){var f=u[0],o=u[1],h=e(a,f,o,{}),p=n.mallocUint8(f*o*4);return new d(a,h,p)};var e=g("gl-fbo"),n=g("typedarray-pool"),t=g("ndarray"),i=g("bit-twiddle").nextPow2;function r(a,u,f,o,h){this.coord=[a,u],this.id=f,this.value=o,this.distance=h}function d(a,u,f){this.gl=a,this.fbo=u,this.buffer=f,this._readTimeout=null;var o=this;this._readCallback=function(){o.gl&&(u.bind(),a.readPixels(0,0,u.shape[0],u.shape[1],a.RGBA,a.UNSIGNED_BYTE,o.buffer),o._readTimeout=null)}}var l=d.prototype;Object.defineProperty(l,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]}
3016,set:function(a){if(this.gl){this.fbo.shape=a;var u=this.fbo.shape[0],f=this.fbo.shape[1];if(f*u*4>this.buffer.length){n.free(this.buffer);for(var o=this.buffer=n.mallocUint8(i(f*u*4)),h=0;h<f*u*4;++h)o[h]=255}return a}}}),l.begin=function(){var a=this.gl;this.shape,a&&(this.fbo.bind(),a.clearColor(1,1,1,1),a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT))},l.end=function(){var a=this.gl;a&&(a.bindFramebuffer(a.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},l.query=function(a,u,f){if(!this.gl)return null;var o=this.fbo.shape.slice();a|=0,u|=0,typeof f!="number"&&(f=1);var h=0|Math.min(Math.max(a-f,0),o[0]),p=0|Math.min(Math.max(a+f,0),o[0]),s=0|Math.min(Math.max(u-f,0),o[1]),x=0|Math.min(Math.max(u+f,0),o[1]);if(p<=h||x<=s)return null;var c=[p-h,x-s],T=t(this.buffer,[c[0],c[1],4],[4,4*o[0],1],4*(h+o[0]*s)),_=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),G=L.get(H,V,2),W=L.get(H,V,3);if(Z<255||K<255||G<255||W<255){var Q=A-H,R=I-V,N=Q*Q+R*R;N<P&&(P=N,S=H,E=V)}}return[S,E,P]}(T.hi(c[0],c[1],1),f,f),w=_[0],k=_[1];return w<0||Math.pow(this.radius,2)<_[2]?null:new r(w+h|0,k+s|0,T.get(w,k,0),[T.get(w,k,1),T.get(w,k,2),T.get(w,k,3)],Math.sqrt(_[2]))},l.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(g,b,y){var e=g("./lib/create-uniforms"),n=g("./lib/create-attributes"),t=g("./lib/reflect"),i=g("./lib/shader-cache"),r=g("./lib/runtime-reflect"),d=g("./lib/GLError");function l(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 a=l.prototype;function u(f,o){return f.name<o.name?-1:1}a.bind=function(){var f;this.program||this._relink();var o=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),h=this.gl.lastAttribCount;if(o>h)for(f=h;f<o;f++)this.gl.enableVertexAttribArray(f);else if(h>o)for(f=o;f<h;f++)this.gl.disableVertexAttribArray(f);this.gl.lastAttribCount=o,this.gl.useProgram(this.program)},a.dispose=function(){for(var f=this.gl.lastAttribCount,o=0;o<f;o++)this.gl.disableVertexAttribArray(o);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},a.update=function(f,o,h,p){if(!o||arguments.length===1){var s=f;f=s.vertex,o=s.fragment,h=s.uniforms,p=s.attributes}var x=this,c=x.gl,T=x._vref;x._vref=i.shader(c,c.VERTEX_SHADER,f),T&&T.dispose(),x.vertShader=x._vref.shader;var _=this._fref;if(x._fref=i.shader(c,c.FRAGMENT_SHADER,o),_&&_.dispose(),x.fragShader=x._fref.shader,!h||!p){var w=c.createProgram();if(c.attachShader(w,x.fragShader),c.attachShader(w,x.vertShader),c.linkProgram(w),!c.getProgramParameter(w,c.LINK_STATUS)){var k=c.getProgramInfoLog(w);throw new d(k,"Error linking program:"+k)}h=h||r.uniforms(c,w),p=p||r.attributes(c,w),c.deleteProgram(w)}(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=i.program(c,x._vref,x._fref,I,P);for(var K=0;K<h.length;++K)V[K]=c.getUniformLocation(x.program,h[K].name)}Z(),x._relink=Z,x.types={uniforms:t(h),attributes:t(p)},x.attributes=n(c,x,A,P),Object.defineProperty(x,"uniforms",e(c,x,h,V))}
3016,b.exports=function(f,o,h,p,s){var x=new l(f);return x.update(o,h,p,s),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(g,b,y){function e(n,t,i){this.shortMessage=t||"",this.longMessage=i||"",this.rawError=n||"",this.message="gl-shader: "+(t||n||"")+(i?` 3017`+i:""),this.stack=new Error().stack}e.prototype=new Error,e.prototype.name="GLError",e.prototype.constructor=e,b.exports=e},{}],134:[function(g,b,y){b.exports=function(l,a,u,f){for(var o={},h=0,p=u.length;h<p;++h){var s=u[h],x=s.name,c=s.type,T=s.locations;switch(c){case"bool":case"int":case"float":r(l,a,T[0],f,1,o,x);break;default:if(c.indexOf("vec")>=0){if((_=c.charCodeAt(c.length-1)-48)<2||_>4)throw new e("","Invalid data type for attribute "+x+": "+c);r(l,a,T[0],f,_,o,x)}else{if(!(c.indexOf("mat")>=0))throw new e("","Unknown data type for attribute "+x+": "+c);var _;if((_=c.charCodeAt(c.length-1)-48)<2||_>4)throw new e("","Invalid data type for attribute "+x+": "+c);d(l,a,T,f,_,o,x)}}}return o};var e=g("./GLError");function n(l,a,u,f,o,h){this._gl=l,this._wrapper=a,this._index=u,this._locations=f,this._dimension=o,this._constFunc=h}var t=n.prototype;t.pointer=function(l,a,u,f){var o=this._gl,h=this._locations[this._index];o.vertexAttribPointer(h,this._dimension,l||o.FLOAT,!!a,u||0,f||0),o.enableVertexAttribArray(h)},t.set=function(l,a,u,f){return this._constFunc(this._locations[this._index],l,a,u,f)},Object.defineProperty(t,"location",{get:function(){return this._locations[this._index]},set:function(l){return l!==this._locations[this._index]&&(this._locations[this._index]=0|l,this._wrapper.program=null),0|l}});var i=[function(l,a,u){return u.length===void 0?l.vertexAttrib1f(a,u):l.vertexAttrib1fv(a,u)},function(l,a,u,f){return u.length===void 0?l.vertexAttrib2f(a,u,f):l.vertexAttrib2fv(a,u)},function(l,a,u,f,o){return u.length===void 0?l.vertexAttrib3f(a,u,f,o):l.vertexAttrib3fv(a,u)},function(l,a,u,f,o,h){return u.length===void 0?l.vertexAttrib4f(a,u,f,o,h):l.vertexAttrib4fv(a,u)}];function r(l,a,u,f,o,h,p){var s=i[o],x=new n(l,a,u,f,o,s);Object.defineProperty(h,p,{set:function(c){return l.disableVertexAttribArray(f[u]),s(l,f[u],c),c},get:function(){return x},enumerable:!0})}function d(l,a,u,f,o,h,p){for(var s=new Array(o),x=new Array(o),c=0;c<o;++c)r(l,a,u[c],f,o,s,c),x[c]=s[c];Object.defineProperty(s,"location",{set:function(w){if(Array.isArray(w))for(var k=0;k<o;++k)x[k].location=w[k];else for(k=0;k<o;++k)x[k].location=w+k;return w},get:function(){for(var w=new Array(o),k=0;k<o;++k)w[k]=f[u[k]];return w},enumerable:!0}),s.pointer=function(w,k,L,A){w=w||l.FLOAT,k=!!k,L=L||o*o,A=A||0;for(var I=0;I<o;++I){var P=f[u[I]];l.vertexAttribPointer(P,o,w,k,L,A+I*o),l.enableVertexAttribArray(P)}};var T=new Array(o),_=l["vertexAttrib"+o+"fv"];Object.defineProperty(h,p,{set:function(w){for(var k=0;k<o;++k){var L=f[u[k]];if(l.disableVertexAttribArray(L),Array.isArray(w[0]))_.call(l,L,w[k]);else{for(var A=0;A<o;++A)T[A]=w[o*k+A];_.call(l,L,T)}}return w},get:function(){return s},enumerable:!0})}},{"./GLError":133}],135:[function(g,b,y){var e=g("./reflect"),n=g("./GLError");function t(r){return function(){return r}}function i(r,d){for(var l=new Array(r),a=0;a<r;++a)l[a]=d;return l}b.exports=function(r,d,l,a){function u(p){return function(s){for(var x=function F(H,V){if(typeof V!="object")return[[H,V]];var Z=[];for(var K in V){var G=V[K],W=H;parseInt(K)+""===K?W+="["+K+"]":W+="."+K,typeof G=="object"?Z.push.apply(Z,F(W,G)):Z.push([W,G])}return Z}("",p),c=0;c<x.length;++c){var T=x[c],_=T[0],w=T[1];if(a[w]){var k=s;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?s[I][P]:s[P]}else k=s[L]}var S,E=l[w].type;switch(E){case"bool":case"int":case"sampler2D":case"samplerCube":r.uniform1i(a[w],k);break;case"float":r.uniform1f(a[w],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"](a[w],!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"](a[w],k);break;case"v":r["uniform"+S+"fv"](a[w],k);break;default:throw new n("","Unrecognized data type for vector "+name+": "+E)}}}}}}function f(p,s,x){if(typeof x=="object"){var c=o(x);Object.defineProperty(p,s,{get:t(c),set:u(x),enumerable:!0,configurable:!1})}else a[x]?Object.defineProperty(p,s,{get:(T=x,function(_,w,k){return _.getUniform(w.program,k[T])}),set:u(x),enumerable:!0,configurable:!1}):p[s]=function(_){switch(_){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var w=_.indexOf("vec");if(0<=w&&w<=1&&_.length===4+w){if((k=_.charCodeAt(_.length-1)-48)<2||k>4)throw new n("","Invalid data type");return _.charAt(0)==="b"?i(k,!1):i(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 i(k*k,0)}throw new n("","Unknown uniform data type for "+name+": "+_)}}
3017(l[x].type);var T}function o(p){var s;if(Array.isArray(p)){s=new Array(p.length);for(var x=0;x<p.length;++x)f(s,x,p[x])}else for(var c in s={},p)f(s,c,p[c]);return s}var h=e(l,!0);return{get:t(o(h)),set:u(h),enumerable:!0,configurable:!0}}},{"./GLError":133,"./reflect":136}],136:[function(g,b,y){b.exports=function(e,n){for(var t={},i=0;i<e.length;++i)for(var r=e[i].name.split("."),d=t,l=0;l<r.length;++l){var a=r[l].split("[");if(a.length>1){a[0]in d||(d[a[0]]=[]),d=d[a[0]];for(var u=1;u<a.length;++u){var f=parseInt(a[u]);u<a.length-1||l<r.length-1?(f in d||(u<a.length-1?d[f]=[]:d[f]={}),d=d[f]):d[f]=n?i:e[i].type}}else l<r.length-1?(a[0]in d||(d[a[0]]={}),d=d[a[0]]):d[a[0]]=n?i:e[i].type}return t}},{}],137:[function(g,b,y){y.uniforms=function(i,r){for(var d=i.getProgramParameter(r,i.ACTIVE_UNIFORMS),l=[],a=0;a<d;++a){var u=i.getActiveUniform(r,a);if(u){var f=t(i,u.type);if(u.size>1)for(var o=0;o<u.size;++o)l.push({name:u.name.replace("[0]","["+o+"]"),type:f});else l.push({name:u.name,type:f})}}return l},y.attributes=function(i,r){for(var d=i.getProgramParameter(r,i.ACTIVE_ATTRIBUTES),l=[],a=0;a<d;++a){var u=i.getActiveAttrib(r,a);u&&l.push({name:u.name,type:t(i,u.type)})}return l};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(i,r){if(!n){var d=Object.keys(e);n={};for(var l=0;l<d.length;++l){var a=d[l];n[i[a]]=e[a]}}return n[r]}},{}],138:[function(g,b,y){y.shader=function(u,f,o){return a(u).getShaderReference(f,o)},y.program=function(u,f,o,h,p){return a(u).getProgram(f,o,h,p)};var e=g("./GLError"),n=g("gl-format-compiler-error"),t=new(typeof WeakMap>"u"?g("weakmap-shim"):WeakMap),i=0;function r(u,f,o,h,p,s,x){this.id=u,this.src=f,this.type=o,this.shader=h,this.count=s,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,o=this.programs,h=0,p=o.length;h<p;++h){var s=u.programs[o[h]];s&&(delete u.programs[h],f.deleteProgram(s))}f.deleteShader(this.shader),delete u.shaders[this.type===f.FRAGMENT_SHADER|0][this.src]}};var l=d.prototype;function a(u){var f=t.get(u);return f||(f=new d(u),t.set(u,f)),f}l.getShaderReference=function(u,f){var o=this.gl,h=this.shaders[u===o.FRAGMENT_SHADER|0],p=h[f];if(p&&o.isShader(p.shader))p.count+=1;else{var s=function(x,c,T){var _=x.createShader(c);if(x.shaderSource(_,T),x.compileShader(_),!x.getShaderParameter(_,x.COMPILE_STATUS)){var w=x.getShaderInfoLog(_);try{var k=n(w,T,c)}catch(L){throw console.warn("Failed to format compiler error: "+L),new e(w,`Error compiling shader: 3018`+w)}throw new e(w,k.short,k.long)}return _}(o,u,f);p=h[f]=new r(i++,f,u,s,[],1,this)}return p},l.getProgram=function(u,f,o,h){var p=[u.id,f.id,o.join(":"),h.join(":")].join("@"),s=this.programs[p];return s&&this.gl.isProgram(s)||(this.programs[p]=s=function(x,c,T,_,w){var k=x.createProgram();x.attachShader(k,c),x.attachShader(k,T);for(var L=0;L<_.length;++L)x.bindAttribLocation(k,w[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,o,h),u.programs.push(p),f.programs.push(p)),s}},{"./GLError":133,"gl-format-compiler-error":87,"weakmap-shim":316}],139:[function(g,b,y){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,i){var r=new e(t);return r.update(i),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(i){return i.slice()}),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},n.draw=function(){var t=this.enable,i=this.width,r=this.color,d=this.center,l=this.plot,a=l.line,u=l.dataBox,f=l.viewBox;if(a.bind(),u[0]<=d[0]&&d[0]<=u[2]&&u[1]<=d[1]&&d[1]<=u[3]){var o=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]&&a.drawLine(o,h,f[0],h,i[0],r[0]),t[1]&&a.drawLine(o,h,o,f[1],i[1],r[1]),t[2]&&a.drawLine(o,h,f[2],h,i[2],r[2]),t[3]&&a.drawLine(o,h,o,f[3],i[3],r[3])}},n.dispose=function(){this.plot.removeOverlay(this)}},{}],140:[function(g,b,y){var e=g("glslify"),n=g("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`]),i=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,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":132,glslify:231}],141:[function(g,b,y){var e=g("gl-buffer"),n=g("gl-vao"),t=g("./shaders/index");b.exports=function(f,o){var h=[];function p(_,w,k,L,A,I){var P=[_,w,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 s=e(f,h),x=n(f,[{type:f.FLOAT,buffer:s,size:3,offset:0,stride:28},{type:f.FLOAT,buffer:s,size:3,offset:12,stride:28},{type:f.FLOAT,buffer:s,size:1,offset:24,stride:28}]),c=t(f);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var T=new r(f,s,x,c);return T.update(o),T};var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function r(f,o,h,p){this.gl=f,this.buffer=o,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,l=[0,0,0],a=[0,0,0],u=[0,0];d.isTransparent=function(){return!1},d.drawTransparent=function(f){},d.draw=function(f){var o=this.gl,h=this.vao,p=this.shader;h.bind(),p.bind();var s,x=f.model||i,c=f.view||i,T=f.projection||i;this.axes&&(s=this.axes.lastCubeProps.axis);for(var _=l,w=a,k=0;k<3;++k)s&&s[k]<0?(_[k]=this.bounds[0][k],w[k]=this.bounds[1][k]):(_[k]=this.bounds[1][k],w[k]=this.bounds[0][k]);for(u[0]=o.drawingBufferWidth,u[1]=o.drawingBufferHeight,p.uniforms.model=x,p.uniforms.view=c,p.uniforms.projection=T,p.uniforms.coordinates=[this.position,_,w],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(o.TRIANGLES,6,6*k),this.drawSides[k]&&h.draw(o.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(g,b,y){var e=g("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`]),i=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}`]);y.meshShader={vertex:n,fragment:t,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},y.pickShader={vertex:i,fragment:r,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:231}],143:[function(g,b,y){var e=g("gl-vec3"),n=g("gl-vec4"),t=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(f,o,h,p){for(var s=0,x=0;x<f.length;x++)for(var c=f[x].velocities,T=0;T<c.length;T++)s=Math.max(s,e.length(c[T]));var _=f.map(function(F){return function(H,V,Z,K){for(var G=H.points,W=H.velocities,Q=H.divergences,R=[],N=[],U=[],ee=[],j=[],X=[],J=0,re=0,ne=n.create(),se=n.create(),oe=0;oe<G.length;oe++){var pe=G[oe],ce=W[oe],de=Q[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(ee.length>0)for(xe=0;xe<8;xe++){var _e=(xe+1)%8;R.push(ee[xe],j[xe],j[_e],j[_e],ee[_e],ee[xe]),U.push(se,ne,ne,ne,se,se),X.push(J,re,re,re,J,J);var we=R.length;N.push([we-6,we-5,we-4],[we-3,we-2,we-1])}var Ee=ee;ee=j,j=Ee;var fe=se;se=ne,ne=fe;var ge=J;J=re,re=ge}return{positions:R,cells:N,vectors:U,vertexIntensity:X}}(F,h,p,s)}),w=[],k=[],L=[],A=[];for(x=0;x<_.length;x++){var I=_[x],P=w.length;for(w=w.concat(I.positions),L=L.concat(I.vectors),A=A.concat(I.vertexIntensity),T=0;T<I.cells.length;T++){var S=I.cells[T],E=[];k.push(E);for(var D=0;D<S.length;D++)E.push(S[D]+P)}}return{positions:w,cells:k,vectors:L,vertexIntensity:A,colormap:o}},r=function(f,o){var h,p=f.length;for(h=0;h<p;h++){var s=f[h];if(s===o)return h;if(s>o)return h-1}return h},d=function(f,o,h){return f<o?o:f>h?h:f},l=function(f){var o=1/0;f.sort(function(x,c){return x-c});for(var h=f.length,p=1;p<h;p++){var s=Math.abs(f[p]-f[p-1]);s<o&&(o=s)}return o};b.exports=function(f,o){var h=f.startingPositions,p=f.maxLength||1e3,s=f.tubeSize||1,x=f.absoluteTubeSize,c=f.gridFill||"+x+y+z",T={};c.indexOf("-x")!==-1&&(T.reversedX=!0),c.indexOf("-y")!==-1&&(T.reversedY=!0),c.indexOf("-z")!==-1&&(T.reversedZ=!0),T.filled=t.indexOf(c.replace(/-/g,"").replace(/\+/g,""));var _=f.getVelocity||function(oe){return function(pe,ce,de){var xe=ce.vectors,_e=ce.meshgrid,we=pe[0],Ee=pe[1],fe=pe[2],ge=_e[0].length,ke=_e[1].length,be=_e[2].length,Se=r(_e[0],we),Oe=r(_e[1],Ee),De=r(_e[2],fe),je=Se+1,Je=Oe+1,ze=De+1;if(Se=d(Se,0,ge-1),je=d(je,0,ge-1),Oe=d(Oe,0,ke-1),Je=d(Je,0,ke-1),De=d(De,0,be-1),ze=d(ze,0,be-1),Se<0||Oe<0||De<0||je>ge-1||Je>ke-1||ze>be-1)return e.create();var Ue,Ge,Ye,et,ct,mt,Ct=_e[0][Se],Tt=_e[0][je],nt=_e[1][Oe],Qe=_e[1][Je],Et=_e[2][De],Gt=(we-Ct)/(Tt-Ct),Xt=(Ee-nt)/(Qe-nt),Fe=(fe-Et)/(_e[2][ze]-Et);switch(isFinite(Gt)||(Gt=.5),isFinite(Xt)||(Xt=.5),isFinite(Fe)||(Fe=.5),de.reversedX&&(Se=ge-1-Se,je=ge-1-je),de.reversedY&&(Oe=ke-1-Oe,Je=ke-1-Je),de.reversedZ&&(De=be-1-De,ze=be-1-ze),de.filled){case 5:ct=De,mt=ze,Ye=Oe*be,et=Je*be,Ue=Se*be*ke,Ge=je*be*ke;break;case 4:ct=De,mt=ze,Ue=Se*be,Ge=je*be,Ye=Oe*be*ge,et=Je*be*ge;break;case 3:Ye=Oe,et=Je,ct=De*ke,mt=ze*ke,Ue=Se*ke*be,Ge=je*ke*be;break;case 2:Ye=Oe,et=Je,Ue=Se*ke,Ge=je*ke,ct=De*ke*ge,mt=ze*ke*ge;break;
3315case 1:Ue=Se,Ge=je,ct=De*ge,mt=ze*ge,Ye=Oe*ge*be,et=Je*ge*be;break;default:Ue=Se,Ge=je,Ye=Oe*ge,et=Je*ge,ct=De*ge*ke,mt=ze*ge*ke}var qe=xe[Ue+Ye+ct],wt=xe[Ue+Ye+mt],ft=xe[Ue+et+ct],Ce=xe[Ue+et+mt],Ie=xe[Ge+Ye+ct],Te=xe[Ge+Ye+mt],Pe=xe[Ge+et+ct],Ve=xe[Ge+et+mt],tt=e.create(),ot=e.create(),at=e.create(),_t=e.create();e.lerp(tt,qe,Ie,Gt),e.lerp(ot,wt,Te,Gt),e.lerp(at,ft,Pe,Gt),e.lerp(_t,Ce,Ve,Gt);var bt=e.create(),jt=e.create();e.lerp(bt,tt,at,Xt),e.lerp(jt,ot,_t,Xt);var Nt=e.create();return e.lerp(Nt,bt,jt,Fe),Nt}(oe,f,T)},w=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 _e=_(ce);e.subtract(_e,_e,pe),e.scale(_e,_e,1/de),e.add(ce,oe,[0,0,de]);var we=_(ce);return e.subtract(we,we,pe),e.scale(we,we,1/de),e.add(ce,xe,_e),e.add(ce,ce,we),ce},k=[],L=o[0][0],A=o[0][1],I=o[0][2],P=o[1][0],S=o[1][1],E=o[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(o[0],o[1])/p,H=F*F,V=1,Z=0,K=h.length;K>1&&(V=function(oe){for(var pe=[],ce=[],de=[],xe={},_e={},we={},Ee=oe.length,fe=0;fe<Ee;fe++){var ge=oe[fe],ke=ge[0],be=ge[1],Se=ge[2];xe[ke]||(pe.push(ke),xe[ke]=!0),_e[be]||(ce.push(be),_e[be]=!0),we[Se]||(de.push(Se),we[Se]=!0)}var Oe=l(pe),De=l(ce),je=l(de),Je=Math.min(Oe,De,je);return isFinite(Je)?Je:1}(h));for(var G=0;G<K;G++){var W=e.create();e.copy(W,h[G]);var Q=[W],R=[],N=_(W),U=W;R.push(N);var ee=[],j=w(W,N),X=e.length(j);isFinite(X)&&X>Z&&(Z=X),ee.push(X),k.push({points:Q,velocities:R,divergences:ee});for(var J=0;J<100*p&&Q.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&&(Q.push(re),U=re,R.push(N),j=w(re,N),X=e.length(j),isFinite(X)&&X>Z&&(Z=X),ee.push(X)),W=re}}var se=i(k,f.colormap,Z,V);return x?se.tubeScale=x:(Z===0&&(Z=1),se.tubeScale=.5*s*V/Z),se};var a=g("./lib/shaders"),u=g("gl-cone3d").createMesh;b.exports.createTubeMesh=function(f,o){return u(f,o,{shaders:a,traceType:"streamtube"})}},{"./lib/shaders":142,"gl-cone3d":79,"gl-vec3":169,"gl-vec4":205}],144:[function(g,b,y){var e=g("gl-shader"),n=g("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`]),i=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 \u2014 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`]);y.createShader=function(l){var a=e(l,t,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return a.attributes.uv.location=0,a.attributes.f.location=1,a.attributes.normal.location=2,a},y.createPickShader=function(l){var a=e(l,t,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return a.attributes.uv.location=0,a.attributes.f.location=1,a.attributes.normal.location=2,a},y.createContourShader=function(l){var a=e(l,r,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return a.attributes.uv.location=0,a.attributes.f.location=1,a},y.createPickContourShader=function(l){var a=e(l,r,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return a.attributes.uv.location=0,a.attributes.f.location=1,a}},{"gl-shader":132,glslify:231}],145:[function(g,b,y){b.exports=function(N){var U=N.gl,ee=c(U),j=_(U),X=T(U),J=w(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=i(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]],ee,j,re,ne,de,X,J,se,oe,pe,ce,[0,0,0]),_e={levels:[[],[],[]]};for(var we in N)_e[we]=N[we];return _e.colormap=_e.colormap||"jet",xe.update(_e),xe};var e=g("bit-twiddle"),n=g("gl-buffer"),t=g("gl-vao"),i=g("gl-texture2d"),r=g("typedarray-pool"),d=g("colormap"),l=g("ndarray-ops"),a=g("ndarray-pack"),u=g("ndarray"),f=g("surface-nets"),o=g("gl-mat4/multiply"),h=g("gl-mat4/invert"),p=g("binary-search-bou
3517nds"),s=g("ndarray-gradient"),x=g("./lib/shaders"),c=x.createShader,T=x.createContourShader,_=x.createPickShader,w=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,ee,j,X){this.position=N,this.index=U,this.uv=ee,this.level=j,this.dataCoordinate=X}(function(){for(var N=0;N<3;++N){var U=A[N],ee=(N+2)%3;U[(N+1)%3+0]=1,U[ee+3]=1,U[N+6]=1}})();function P(N,U,ee,j,X,J,re,ne,se,oe,pe,ce,de,xe,_e){this.gl=N,this.shape=U,this.bounds=ee,this.objectOffset=_e,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 ee=!1,j=a([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&&(ee=!0),[X[0],X[1],X[2],255*re]})]);return l.divseq(j,255),this.hasAlphaScale=ee,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 ee,j,X,J=U.axes&&U.axes.lastCubeProps.axis||E,re=U.showSurface,ne=U.showContour;for(ee=0;ee<3;++ee)for(re=re||U.surfaceProject[ee],j=0;j<3;++j)ne=ne||U.contourProject[ee][j];for(ee=0;ee<3;++ee){var se=D.projections[ee];for(j=0;j<16;++j)se[j]=0;for(j=0;j<4;++j)se[5*j]=1;se[5*ee]=0,se[12+ee]=U.axesBounds[+(J[ee]>0)][ee],o(se,N.model,se);var oe=D.clipBounds[ee];for(X=0;X<2;++X)for(j=0;j<3;++j)oe[X][j]=N.clipBounds[X][j];oe[0][ee]=-1e8,oe[1][ee]=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 ee=this.gl;ee.disable(ee.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(o(ne,j.view,j.model),o(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(ee.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(ee.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],ee.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(ee.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],ee.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(ee.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],ee.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(ee.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(ee.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 G={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 Q(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[Q(N[0]),Q(N[1]),Q(N[2])];var U=Q(N);return[U.slice(),U.slice(),U.slice()]}}S.drawPick=function(N){N=N||{};var U=this.gl;U.disable(U.CULL_FACE);var ee=G;ee.model=N.model||k,ee.view=N.view||k,ee.projection=N.projection||k,ee.shape=this._field[2].shape,ee.pickId=this.pickId/255,ee.lowerBound=this.bounds[0],ee.upperBound=this.bounds[1],ee.objectOffset=this.objectOffset,ee.permutation=Z;for(var j=0;j<2;++j)for(var X=ee.clipBounds[j],J=0;J<3;++J)X[J]=Math.min(Math.max(this.clipBounds[j][J],-1e8),1e8);var re=F(ee,this);if(re.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=ee,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=ee;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,ee=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=ee.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,_e=ne+de,we=ce*(de?se:1-se),Ee=0;Ee<3;++Ee)oe[Ee]+=this._field[Ee].get(xe,_e)*we;for(var fe=this._pickResult.level,ge=0;ge<3;++ge)if(fe[ge]=p.le(this.contourLevels[ge],oe[ge]),fe[ge]<0)this.contourLevels[ge].length>0&&(fe[ge]=0);else if(fe[ge]<this.contourLevels[ge].length-1){var ke=this.contourLevels[ge][fe[ge]],be=this.contourLevels[ge][fe[ge]+1];Math.abs(ke-oe[ge])>Math.abs(be-oe[ge])&&(fe[ge]+=1)}for(ee.index[0]=J<.5?X:X+1,ee.index[1]=se<.5?ne:ne+1,ee.uv[0]=j/U[0],ee.uv[1]=re/U[1],Ee=0;Ee<3;++Ee)ee.dataCoordinate[Ee]=this._field[Ee].get(ee.index[0],ee.index[1]);return ee},S.padField=function(N,U){var ee=U.shape.slice(),j=N.shape.slice();l.assign(N.lo(1,1).hi(ee[0],ee[1]),U),l.assign(N.lo(1).hi(ee[0],1),U.hi(ee[0],1)),l.assign(N.lo(1,j[1]-1).hi(ee[0],1),U.lo(0,ee[1]-1).hi(ee[0],1)),l.assign(N.lo(0,1).hi(1,ee[1]),U.hi(1)),l.assign(N.lo(j[0]-1,1).hi(1,ee[1]),U.lo(ee[0]-1)),N.set(0,0,U.get(0,0)),N.set(0,j[1]-1,U.get(0,ee[1]-1)),N.set(j[0]-1,0,U.get(ee[0]-1,0)),N.set(j[0]-1,j[1]-1,U.get(ee[0]-1,ee[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(Jt){return W(Jt,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.op
vendor: 7,284 bytes, line 3517
3517acityscale),"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,ee=!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,_e=u(r.mallocFloat(3*xe[2].size*2),[3,X[0]+2,X[1]+2,2]);for(J=0;J<3;++J)s(_e.pick(J),xe[J],"mirror");var we=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=_e.get(0,J,de,0),fe=_e.get(0,J,de,1),ge=_e.get(1,J,de,0),ke=_e.get(1,J,de,1),be=_e.get(2,J,de,0),Se=_e.get(2,J,de,1),Oe=ge*Se-ke*be,De=be*fe-Se*Ee,je=Ee*ke-fe*ge,Je=Math.sqrt(Oe*Oe+De*De+je*je);Je<1e-8?(Je=Math.max(Math.abs(Oe),Math.abs(De),Math.abs(je)))<1e-8?(je=1,De=Oe=0,Je=1):Je=1/Je:Je=1/Math.sqrt(Je),we.set(J,de,0,Oe*Je),we.set(J,de,1,De*Je),we.set(J,de,2,je*Je)}r.free(_e.data);var ze=[1/0,1/0,1/0],Ue=[-1/0,-1/0,-1/0],Ge=1/0,Ye=-1/0,et=(X[0]-1)*(X[1]-1)*6,ct=r.mallocFloat(e.nextPow2(10*et)),mt=0,Ct=0;for(J=0;J<X[0]-1;++J)e:for(de=0;de<X[1]-1;++de){for(var Tt=0;Tt<2;++Tt)for(var nt=0;nt<2;++nt)for(var Qe=0;Qe<3;++Qe){var Et=this._field[Qe].get(1+J+Tt,1+de+nt);if(isNaN(Et)||!isFinite(Et))continue e}for(Qe=0;Qe<6;++Qe){var Gt=J+L[Qe][0],Xt=de+L[Qe][1],Fe=this._field[0].get(Gt+1,Xt+1),qe=this._field[1].get(Gt+1,Xt+1);Et=this._field[2].get(Gt+1,Xt+1),Oe=we.get(Gt+1,Xt+1,0),De=we.get(Gt+1,Xt+1,1),je=we.get(Gt+1,Xt+1,2),N.intensity&&(wt=N.intensity.get(Gt,Xt));var wt=N.intensity?N.intensity.get(Gt,Xt):Et+this.objectOffset[2];ct[mt++]=Gt,ct[mt++]=Xt,ct[mt++]=Fe,ct[mt++]=qe,ct[mt++]=Et,ct[mt++]=0,ct[mt++]=wt,ct[mt++]=Oe,ct[mt++]=De,ct[mt++]=je,ze[0]=Math.min(ze[0],Fe+this.objectOffset[0]),ze[1]=Math.min(ze[1],qe+this.objectOffset[1]),ze[2]=Math.min(ze[2],Et+this.objectOffset[2]),Ge=Math.min(Ge,wt),Ue[0]=Math.max(Ue[0],Fe+this.objectOffset[0]),Ue[1]=Math.max(Ue[1],qe+this.objectOffset[1]),Ue[2]=Math.max(Ue[2],Et+this.objectOffset[2]),Ye=Math.max(Ye,wt),Ct+=1}}for(N.intensityBounds&&(Ge=+N.intensityBounds[0],Ye=+N.intensityBounds[1]),J=6;J<mt;J+=10)ct[J]=(ct[J]-Ge)/(Ye-Ge);this._vertexCount=Ct,this._coordinateBuffer.update(ct.subarray(0,mt)),r.freeFloat(ct),r.free(we.data),this.bounds=[ze,Ue],this.intensity=N.intensity||this._field[2],this.intensityBounds[0]===Ge&&this.intensityBounds[1]===Ye||(ee=!0),this.intensityBounds=[Ge,Ye]}if("levels"in N){var ft=N.levels;for(ft=Array.isArray(ft[0])?ft.slice():[[],[],ft],J=0;J<3;++J)ft[J]=ft[J].slice(),ft[J].sort(function(Jt,Vt){return Jt-Vt});for(J=0;J<3;++J)for(de=0;de<ft[J].length;++de)ft[J][de]-=this.objectOffset[J];e:for(J=0;J<3;++J){if(ft[J].length!==this.contourLevels[J].length){ee=!0;break}for(de=0;de<ft[J].length;++de)if(ft[J][de]!==this.contourLevels[J][de]){ee=!0;break e}}this.contourLevels=ft}if(ee){xe=this._field,X=this.shape;for(var Ce=[],Ie=0;Ie<3;++Ie){var Te=this.contourLevels[Ie],Pe=[],Ve=[],tt=[0,0,0];for(J=0;J<Te.length;++J){var ot=f(this._field[Ie],Te[J]);Pe.push(Ce.length/5|0),Ct=0;e:for(de=0;de<ot.cells.length;++de){var at=ot.cells[de];for(Qe=0;Qe<2;++Qe){var _t=ot.positions[at[Qe]],bt=_t[0],jt=0|Math.floor(bt),Nt=bt-jt,$e=_t[1],yt=0|Math.floor($e),Ot=$e-yt,Mt=!1;t:for(var Pt=0;Pt<3;++Pt){tt[Pt]=0;var Le=(Ie+Pt+1)%3;for(Tt=0;Tt<2;++Tt){var Xe=Tt?Nt:1-Nt;for(Gt=0|Math.min(Math.max(jt+Tt,0),X[0]),nt=0;nt<2;++nt){var it=nt?Ot:1-Ot;if(Xt=0|Math.min(Math.max(yt+nt,0),X[1]),Et=Pt<2?this._field[Le].get(Gt,Xt):(this.intensity.get(Gt,Xt)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Et)||isNaN(Et)){Mt=!0;break t}var At=Xe*it;tt[Pt]+=At*Et}}}if(Mt){if(Qe>0){for(var It=0;It<5;++It)Ce.pop();Ct-=1}continue e}Ce.push(tt[0],tt[1],_t[0],_t[1],tt[2]),Ct+=1}}Ve.push(Ct)}this._contourOffsets[Ie]=Pe,this._contourCounts[Ie]=Ve}var Zt=r.mallocFloat(Ce.length);for(J=0;J<Ce.length;++J)Zt[J]=Ce[J];this._contourBuffer.update(Zt),r.freeFloat(Zt)}},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,ee;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(ee=this.snapToData?N.dataCoordinate:N.position,U=0;U<3;++U)ee[U]-=this.objectOffset[U];if(this.enableDynamic[0]&&ee[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&ee[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&ee[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]=ee[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,ee[re]),xe=de.cells,_e=de.positions;for(this._dynamicOffsets[re]=j,U=0;U<xe.length;++U)for(var we=xe[U],Ee=0;Ee<2;++Ee){var fe=_e[we[Ee]],ge=+fe[0],ke=0|ge,be=0|Math.min(ke+1,X[0]),Se=ge-ke,Oe=1-Se,De=+fe[1],je=0|De,Je=0|Math.min(je+1,X[1]),ze=De-je,Ue=1-ze,Ge=Oe*Ue,Ye=Oe*ze,et=Se*Ue,ct=Se*ze,mt=Ge*pe.get(ke,je)+Ye*pe.get(ke,Je)+et*pe.get(be,je)+ct*pe.get(be,Je),Ct=Ge*ce.get(ke,je)+Ye*ce.get(ke,Je)+et*ce.get(be,je)+ct*ce.get(be,Je);if(isNaN(mt)||isNaN(Ct)){Ee&&(j-=1);break}J[2*j+0]=mt,J[2*j+1]=Ct,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(g,b,y){var e=g("ndarray"),n=g("ndarray-ops"),t=g("typedarray-pool");b.exports=function(_){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||l(_),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 w=arguments[1],k=a(w)?w:w.raw;if(k)return c(_,k,0|w.width,0|w.height,arguments[2]||_.RGBA,arguments[3]||_.UNSIGNED_BYTE);if(w.shape&&w.data&&w.stride)return T(_,w)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var i=null,r=null,d=null;function l(_){i=[_.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 a(_){return typeof HTMLCanvasElement<"u"&&_ instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&_ instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&_ instanceof HTMLVideoElement||typeof ImageData<"u"&&_ instanceof ImageData}var u=function(_,w){n.muls(_,w,255)};function f(_,w,k){var L=_.gl,A=L.getParameter(L.MAX_TEXTURE_SIZE);if(w<0||w>A||k<0||k>A)throw new Error("gl-texture2d: Invalid texture size");return _._shape=[w,k],_.bind(),L.texImage2D(L.TEXTURE_2D,0,_.format,w,k,0,_.format,_.type,null),_._mipLevels=[0],_}function o(_,w,k,L,A,I){this.gl=_,this.handle=w,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=o.prototype;function p(_,w){return _.length===3?w[2]===1&&w[1]===_[0]*_[2]&&w[0]===_[2]:w[0]===1&&w[1]===_[0]}function s(_){var w=_.createTexture();return _.bindTexture(_.TEXTURE_2D,w),_.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),w}function x(_,w,k,L,A){var I=_.getParameter(_.MAX_TEXTURE_SIZE);if(w<0||w>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=s(_);return _.texImage2D(_.TEXTURE_2D,0,L,w,k,0,L,A,null),new o(_,P,w,k,L,A)}function c(_,w,k,L,A,I){var P=s(_);return _.texImage2D(_.TEXTURE_2D,0,A,A,I,w),new o(_,P,k,L,A,I)}function T(_,w){var k=w.dtype,L=w.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,w.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],w=e(w.data,L,[w.stride[0],w.stride[1],1],w.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=w.size;if(I)S=w.offset===0&&w.data.length===F?w.data:w.data.subarray(w.offset,w.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,w):u(V,w),S=E.subarray(0,F)}var Z=s(_);return _.texImage2D(_.TEXTURE_2D,0,D,L[0],L[1],0,D,P,S),I||t.free(E),new o(_,Z,L[0],L[1],D,P)}Object.defineProperties(h,{minFilter:{get:function(){return this._minFilter},set:function(_){this.bind();var w=this.gl;
3517if(this.type===w.FLOAT&&i.indexOf(_)>=0&&(w.getExtension("OES_texture_float_linear")||(_=w.NEAREST)),r.indexOf(_)<0)throw new Error("gl-texture2d: Unknown filter mode "+_);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,_),this._minFilter=_}},magFilter:{get:function(){return this._magFilter},set:function(_){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(_)>=0&&(w.getExtension("OES_texture_float_linear")||(_=w.NEAREST)),r.indexOf(_)<0)throw new Error("gl-texture2d: Unknown filter mode "+_);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,_),this._magFilter=_}},mipSamples:{get:function(){return this._anisoSamples},set:function(_){var w=this._anisoSamples;if(this._anisoSamples=0|Math.max(_,1),w!==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 w=0;w<2;++w)if(d.indexOf(_[w])<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 w=this.gl;return _!==void 0&&w.activeTexture(w.TEXTURE0+(0|_)),w.bindTexture(w.TEXTURE_2D,this.handle),_!==void 0?0|_:w.getParameter(w.ACTIVE_TEXTURE)-w.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]),w=0;_>0;++w,_>>>=1)this._mipLevels.indexOf(w)<0&&this._mipLevels.push(w)},h.setPixels=function(_,w,k,L){var A=this.gl;this.bind(),Array.isArray(w)?(L=k,k=0|w[1],w=0|w[0]):(w=w||0,k=k||0),L=L||0;var I=a(_)?_:_.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,w,k,this.format,this.type,I);else{if(!(_.shape&&_.stride&&_.data))throw new Error("gl-texture2d: Unsupported data type");if(_.shape.length<2||w+_.shape[1]>this._shape[1]>>>L||k+_.shape[0]>this._shape[0]>>>L||w<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,G=Z.shape.slice();if(G.length<2||G.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var W=0,Q=0,R=p(G,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"),G.length===2)Q=P.LUMINANCE,G=[G[0],G[1],1],Z=e(Z.data,G,[Z.stride[0],Z.stride[1],1],Z.offset);else{if(G.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(G[2]===1)Q=P.ALPHA;else if(G[2]===2)Q=P.LUMINANCE_ALPHA;else if(G[2]===3)Q=P.RGB;else{if(G[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");Q=P.RGBA}G[2]}if(Q!==P.LUMINANCE&&Q!==P.ALPHA||F!==P.LUMINANCE&&F!==P.ALPHA||(Q=F),Q!==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,G[0],G[1],0,F,H,Z.data):P.texSubImage2D(P.TEXTURE_2D,D,S,E,G[0],G[1],F,H,Z.data):U?P.texImage2D(P.TEXTURE_2D,D,F,G[0],G[1],0,F,H,Z.data.subarray(Z.offset,Z.offset+N)):P.texSubImage2D(P.TEXTURE_2D,D,S,E,G[0],G[1],F,H,Z.data.subarray(Z.offset,Z.offset+N));else{var ee;ee=H===P.FLOAT?t.mallocFloat32(N):t.mallocUint8(N);var j=e(ee,G,[G[2],G[2]*G[0],1]);W===P.FLOAT&&H===P.UNSIGNED_BYTE?u(j,Z):n.assign(j,Z),U?P.texImage2D(P.TEXTURE_2D,D,F,G[0],G[1],0,F,H,ee.subarray(0,N)):P.texSubImage2D(P.TEXTURE_2D,D,S,E,G[0],G[1],F,H,ee.subarray(0,N)),H===P.FLOAT?t.freeFloat32(ee):t.freeUint8(ee)}})(A,w,k,L,this.format,this.type,this._mipLevels,_)}}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],147:[function(g,b,y){b.exports=function(e,n,t){n?n.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var i=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(t){if(t.length>i)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 l=d.buffer,a=d.size||4,u=d.type||e.FLOAT,f=!!d.normalized,o=d.stride||0,h=d.offset||0;l.bind(),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,a,u,f,o,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<i;++r)e.disableVertexAttribArray(r)}else for(e.bindBuffer(e.ARRAY_BUFFER,null),r=0;r<i;++r)e.disableVertexAttribArray(r)}},{}],148:[function(g,b,y){var e=g("./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,i,r){this._elements=i,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},n.prototype.dispose=function(){},n.prototype.unbind=function(){},n.prototype.draw=function(t,i,r){r=r||0;var d=this.gl;this._elements?d.drawElements(t,i,this._elementsType,r):d.drawArrays(t,r,i)},b.exports=function(t){return new n(t)}},{"./do-bind.js":147}],149:[function(g,b,y){var e=g("./do-bind.js");function n(i,r,d,l,a,u){this.location=i,this.dimension=r,this.a=d,this.b=l,this.c=a,this.d=u}function t(i,r,d){this.gl=i,this._ext=r,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=i.UNSIGNED_SHORT}n.prototype.bind=function(i){switch(this.dimension){case 1:i.vertexAttrib1f(this.location,this.a);break;case 2:i.vertexAttrib2f(this.location,this.a,this.b);break;case 3:i.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:i.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},t.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var i=0;i<this._attribs.length;++i)this._attribs[i].bind(this.gl)},t.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},t.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},t.prototype.update=function(i,r,d){if(this.bind(),e(this.gl,r,i),this.unbind(),this._attribs.length=0,i)for(var l=0;l<i.length;++l){var a=i[l];typeof a=="number"?this._attribs.push(new n(l,1,a)):Array.isArray(a)&&this._attribs.push(new n(l,a.length,a[0],a[1],a[2],a[3]))}this._useElements=!!r,this._elementsType=d||this.gl.UNSIGNED_SHORT},t.prototype.draw=function(i,r,d){d=d||0;var l=this.gl;this._useElements?l.drawElements(i,r,this._elementsType,d):l.drawArrays(i,d,r)},b.exports=function(i,r){return new t(i,r,r.createVertexArrayOES())}},{"./do-bind.js":147}],150:[function(g,b,y){var e=g("./lib/vao-native.js"),n=g("./lib/vao-emulated.js");function t(i){this.bindVertexArrayOES=i.bindVertexArray.bind(i),this.createVertexArrayOES=i.createVertexArray.bind(i),this.deleteVertexArrayOES=i.deleteVertexArray.bind(i)}b.exports=function(i,r,d,l){var a,u=i.createVertexArray?new t(i):i.getExtension("OES_vertex_array_object");return(a=u?e(i,u):n(i)).update(r,d,l),a}},{"./lib/vao-emulated.js":148,"./lib/vao-native.js":149}],151:[function(g,b,y){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(g,b,y){b.exports=function(i,r){var d=e(i[0],i[1],i[2]),l=e(r[0],r[1],r[2]);n(d,d),n(l,l);var a=t(d,l);return a>1?0:Math.acos(a)};var e=g("./fromValues"),n=g("./normalize"),t=g("./dot")},{"./dot":162,"./fromValues":168,"./normalize":179}],153:[function(g,b,y){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(g,b,y){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(g,b,y){b.exports=function(e,n){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e}},{}],156:[function(g,b,y){b.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},{}],157:[function(g,b,y){b.exports=function(e,n,t){var i=n[0],r=n[1],d=n[2],l=t[0],a=t[1],u=t[2];return e[0]=r*u-d*a,e[1]=d*l-i*u,e[2]=i*a-r*l,e}},{}],158:[function(g,b,y){b.exports=g("./distance")},{"./distance":159}],159:[function(g,b,y){b.exports=function(e,n){var t=n[0]-e[0],i=n[1]-e[1],r=n[2]-e[2];return Math.sqrt(t*t+i*i+r*r)}},{}],160:[function(g,b,y){b.exports=g("./divide")},{"./divide":161}],161:[function(g,b,y){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(g,b,y){b.exports=function(e,n){return e[0]*n[0]+e[1]*n[1]+e[2]*n[2]}},{}],163:[function(g,b,y){b.exports=1e-6},{}],164:[function(g,b,y){b.exports=function(n,t){var i=n[0],r=n[1],d=n[2],l=t[0],a=t[1],u=t[2];return Math.abs(i-l)<=e*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(r-a)<=e*Math.max(1,Math.abs(r),Math.abs(a)
3517)&&Math.abs(d-u)<=e*Math.max(1,Math.abs(d),Math.abs(u))};var e=g("./epsilon")},{"./epsilon":163}],165:[function(g,b,y){b.exports=function(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}},{}],166:[function(g,b,y){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(g,b,y){b.exports=function(n,t,i,r,d,l){var a,u;for(t||(t=3),i||(i=0),u=r?Math.min(r*t+i,n.length):n.length,a=i;a<u;a+=t)e[0]=n[a],e[1]=n[a+1],e[2]=n[a+2],d(e,e,l),n[a]=e[0],n[a+1]=e[1],n[a+2]=e[2];return n};var e=g("./create")()},{"./create":156}],168:[function(g,b,y){b.exports=function(e,n,t){var i=new Float32Array(3);return i[0]=e,i[1]=n,i[2]=t,i}},{}],169:[function(g,b,y){b.exports={EPSILON:g("./epsilon"),create:g("./create"),clone:g("./clone"),angle:g("./angle"),fromValues:g("./fromValues"),copy:g("./copy"),set:g("./set"),equals:g("./equals"),exactEquals:g("./exactEquals"),add:g("./add"),subtract:g("./subtract"),sub:g("./sub"),multiply:g("./multiply"),mul:g("./mul"),divide:g("./divide"),div:g("./div"),min:g("./min"),max:g("./max"),floor:g("./floor"),ceil:g("./ceil"),round:g("./round"),scale:g("./scale"),scaleAndAdd:g("./scaleAndAdd"),distance:g("./distance"),dist:g("./dist"),squaredDistance:g("./squaredDistance"),sqrDist:g("./sqrDist"),length:g("./length"),len:g("./len"),squaredLength:g("./squaredLength"),sqrLen:g("./sqrLen"),negate:g("./negate"),inverse:g("./inverse"),normalize:g("./normalize"),dot:g("./dot"),cross:g("./cross"),lerp:g("./lerp"),random:g("./random"),transformMat4:g("./transformMat4"),transformMat3:g("./transformMat3"),transformQuat:g("./transformQuat"),rotateX:g("./rotateX"),rotateY:g("./rotateY"),rotateZ:g("./rotateZ"),forEach:g("./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(g,b,y){b.exports=function(e,n){return e[0]=1/n[0],e[1]=1/n[1],e[2]=1/n[2],e}},{}],171:[function(g,b,y){b.exports=g("./length")},{"./length":172}],172:[function(g,b,y){b.exports=function(e){var n=e[0],t=e[1],i=e[2];return Math.sqrt(n*n+t*t+i*i)}},{}],173:[function(g,b,y){b.exports=function(e,n,t,i){var r=n[0],d=n[1],l=n[2];return e[0]=r+i*(t[0]-r),e[1]=d+i*(t[1]-d),e[2]=l+i*(t[2]-l),e}},{}],174:[function(g,b,y){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(g,b,y){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(g,b,y){b.exports=g("./multiply")},{"./multiply":177}],177:[function(g,b,y){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(g,b,y){b.exports=function(e,n){return e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e}},{}],179:[function(g,b,y){b.exports=function(e,n){var t=n[0],i=n[1],r=n[2],d=t*t+i*i+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(g,b,y){b.exports=function(e,n){n=n||1;var t=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*n;return e[0]=Math.cos(t)*r,e[1]=Math.sin(t)*r,e[2]=i*n,e}},{}],181:[function(g,b,y){b.exports=function(e,n,t,i){var r=t[1],d=t[2],l=n[1]-r,a=n[2]-d,u=Math.sin(i),f=Math.cos(i);return e[0]=n[0],e[1]=r+l*f-a*u,e[2]=d+l*u+a*f,e}},{}],182:[function(g,b,y){b.exports=function(e,n,t,i){var r=t[0],d=t[2],l=n[0]-r,a=n[2]-d,u=Math.sin(i),f=Math.cos(i);return e[0]=r+a*u+l*f,e[1]=n[1],e[2]=d+a*f-l*u,e}},{}],183:[function(g,b,y){b.exports=function(e,n,t,i){var r=t[0],d=t[1],l=n[0]-r,a=n[1]-d,u=Math.sin(i),f=Math.cos(i);return e[0]=r+l*f-a*u,e[1]=d+l*u+a*f,e[2]=n[2],e}},{}],184:[function(g,b,y){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(g,b,y){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(g,b,y){b.exports=function(e,n,t,i){return e[0]=n[0]+t[0]*i,e[1]=n[1]+t[1]*i,e[2]=n[2]+t[2]*i,e}},{}],187:[function(g,b,y){b.exports=function(e,n,t,i){return e[0]=n,e[1]=t,e[2]=i,e}},{}],188:[function(g,b,y){b.exports=g("./squaredDistance")},{"./squaredDistance":190}],189:[function(g,b,y){b.exports=g("./squaredLength")},{"./squaredLength":191}],190:[function(g,b,y){b.exports=function(e,n){var t=n[0]-e[0],i=n[1]-e[1],r=n[2]-e[2];return t*t+i*i+r*r}},{}],191:[function(g,b,y){b.exports=function(e){var n=e[0],t=e[1],i=e[2];return n*n+t*t+i*i}},{}],192:[function(g,b,y){b.exports=g("./subtract")},{"./subtract":193}],193:[function(g,b,y){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(g,b,y){b.exports=function(e,n,t){var i=n[0],r=n[1],d=n[2];return e[0]=i*t[0]+r*t[3]+d*t[6],e[1]=i*t[1]+r*t[4]+d*t[7],e[2]=i*t[2]+r*t[5]+d*t[8],e}},{}],195:[function(g,b,y){b.exports=function(e,n,t){var i=n[0],r=n[1],d=n[2],l=t[3]*i+t[7]*r+t[11]*d+t[15];return l=l||1,e[0]=(t[0]*i+t[4]*r+t[8]*d+t[12])/l,e[1]=(t[1]*i+t[5]*r+t[9]*d+t[13])/l,e[2]=(t[2]*i+t[6]*r+t[10]*d+t[14])/l,e}},{}],196:[function(g,b,y){b.exports=function(e,n,t){var i=n[0],r=n[1],d=n[2],l=t[0],a=t[1],u=t[2],f=t[3],o=f*i+a*d-u*r,h=f*r+u*i-l*d,p=f*d+l*r-a*i,s=-l*i-a*r-u*d;return e[0]=o*f+s*-l+h*-u-p*-a,e[1]=h*f+s*-a+p*-l-o*-u,e[2]=p*f+s*-u+o*-a-h*-l,e}},{}],197:[function(g,b,y){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(g,b,y){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(g,b,y){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(g,b,y){b.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},{}],201:[function(g,b,y){b.exports=function(e,n){var t=n[0]-e[0],i=n[1]-e[1],r=n[2]-e[2],d=n[3]-e[3];return Math.sqrt(t*t+i*i+r*r+d*d)}},{}],202:[function(g,b,y){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(g,b,y){b.exports=function(e,n){return e[0]*n[0]+e[1]*n[1]+e[2]*n[2]+e[3]*n[3]}},{}],204:[function(g,b,y){b.exports=function(e,n,t,i){var r=new Float32Array(4);return r[0]=e,r[1]=n,r[2]=t,r[3]=i,r}},{}],205:[function(g,b,y){b.exports={create:g("./create"),clone:g("./clone"),fromValues:g("./fromValues"),copy:g("./copy"),set:g("./set"),add:g("./add"),subtract:g("./subtract"),multiply:g("./multiply"),divide:g("./divide"),min:g("./min"),max:g("./max"),scale:g("./scale"),scaleAndAdd:g("./scaleAndAdd"),distance:g("./distance"),squaredDistance:g("./squaredDistance"),length:g("./length"),squaredLength:g("./squaredLength"),negate:g("./negate"),inverse:g("./inverse"),normalize:g("./normalize"),dot:g("./dot"),lerp:g("./lerp"),random:g("./random"),transformMat4:g("./transformMat4"),transformQuat:g("./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(g,b,y){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(g,b,y){b.exports=function(e){var n=e[0],t=e[1],i=e[2],r=e[3];return Math.sqrt(n*n+t*t+i*i+r*r)}},{}],208:[function(g,b,y){b.exports=function(e,n,t,i){var r=n[0],d=n[1],l=n[2],a=n[3];return e[0]=r+i*(t[0]-r),e[1]=d+i*(t[1]-d),e[2]=l+i*(t[2]-l),e[3]=a+i*(t[3]-a),e}},{}],209:[function(g,b,y){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(g,b,y){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(g,b,y){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(g,b,y){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(g,b,y){b.exports=function(e,n){var t=n[0],i=n[1],r=n[2],d=n[3],l=t*t+i*i+r*r+d*d;return l>0&&(l=1/Math.sqrt(l),e[0]=t*l,e[1]=i*l,e[2]=r*l,e[3]=d*l),e}},{}],214:[function(g,b,y){var e=g("./normalize"),n=g("./scale");b.exports=function(t,i){return i=i||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),e(t,t),n(t,t,i),t}},{"./normalize":213,"./scale":215}],215:[function(g,b,y){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(g,b,y){b.exports=function(e,n,t,i){return e[0]=n[0]+t[0]*i,e[1]=n[1]+t[1]*i,e[2]=n[2]+t[2]*i,e[3]=n[3]+t[3]*i,e}},{}],217:[function(g,b,y){b.exports=function(e,n,t,i,r){return e[0]=n,e[1]=t,e[2]=i,e[3]=r,e}},{}],218:[function(g,b,y){b.exports=function(e,n){var t=n[0]-e[0],i=n[1]-e[1],r=n[2]-e[2],d=n[3]-e[3];return t*t+i*i+r*r+d*d}},{}],219:[function(g,b,y){b.exports=function(e){var n=e[0],t=e[1],i=e[2],r=e[3];return n*n+t*t+i*i+r*r}},{}],220:[function(g,b,y){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(g,b,y){b.exports=function(e,n,t){var i=n[0],r=n[1],d=n[2],l=n[3];return e[0]=t[0]*i+t[4]*r+t[8]*d+t[12]*l,e[1]=t[1]*i+t[5]*r+t[9]*d+t[13]*l,e[2]=t[2]*i+t[6]*r+t[10]*d+t[14]*l,e[3]=t[3]*i+t[7]*r+t[11]*d+t[15]*l,e}},{}],222:[function(g,b,y){b.exports=function(e,n,t){var i=n[0],r=n[1],d=n[2],l=t[0],a=t[1],u=t[2],f=t[3],o=f*i+a*d-u*r,h=f*r+u*i-l*d,p=f*d+l*r-a*i,s=-l*i-a*r-u*d;return e[0]=o*f+s*-l+h*-u-p*-a,e[1]=h*f+s*-a+p*-l-o*-u,e[2]=p*f+s*-u+o*-a-h*-l,e[3]=n[3],e}},{}],223:[function(g,b,y){var e=g("glsl-tokenizer"),n=g("atob-lite");b.exports=function(t){for(var i=Array.isArray(t)?t:e(t),r=0;r<i.length;r++){var d=i[r];if(d.type==="preprocessor"){var l=d.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(l&&l[2]){var a=l[1],u=l[2];return(a?n(u):u).trim()}}}}},{"atob-lite":13,"glsl-tokenizer":230}],224:[function(g,b,y){b.exports=function(l){var a,u,f,o=0,h=0,p=999,s=[],x=[],c=1,T=0,_=0,w=!1,k=!1,L="",A=t,I=e;(l=l||{}).version==="300 es"&&(A=r,I=i);var P={},S={};for(o=0;o<A.length;o++)P[A[o]]=!0;for(o=0;o<I.length;o++)S[I[o]]=!0;return function(N){return x=[],N!==null?function(U){o=0,U.toString&&(U=U.toString());var ee;for(L+=U.replace(/\r\n/g,` 3518`),f=L.length;a=L[o],o<f;){switch(ee=o,p){case 0:o=V();break;case 1:case 2:o=H();break;case 3:o=Z();break;case 4:o=W();break;case 11:o=G();break;case 5:o=Q();break;case 9999:o=R();break;case 9:o=F();break;case 999:o=D()}if(ee!==o)switch(L[ee]){case` 3519`:T=0,++c;break;default:++T}}return h+=o,L=L.slice(o),x}(N):function(U){return s.length&&E(s.join("")),p=10,E("(eof)"),x}()};function E(N){N.length&&x.push({type:d[p],data:N,position:_,line:c,column:T})}function D(){return s=s.length?[]:s,u==="/"&&a==="*"?(_=h+o-1,p=0,u=a,o+1):u
3519==="/"&&a==="/"?(_=h+o-1,p=1,u=a,o+1):a==="#"?(p=2,_=h+o,o):/\s/.test(a)?(p=9,_=h+o,o):(w=/\d/.test(a),k=/[^\w_]/.test(a),_=h+o,p=w?4:k?3:9999,o)}function F(){return/[^\s]/g.test(a)?(E(s.join("")),p=999,o):(s.push(a),u=a,o+1)}function H(){return a!=="\r"&&a!==` 3520`||u==="\\"?(s.push(a),u=a,o+1):(E(s.join("")),p=999,o)}function V(){return a==="/"&&u==="*"?(s.push(a),E(s.join("")),p=999,o+1):(s.push(a),u=a,o+1)}function Z(){if(u==="."&&/\d/.test(a))return p=5,o;if(u==="/"&&a==="*")return p=0,o;if(u==="/"&&a==="/")return p=1,o;if(a==="."&&s.length){for(;K(s););return p=5,o}if(a===";"||a===")"||a==="("){if(s.length)for(;K(s););return E(a),p=999,o+1}var N=s.length===2&&a!=="=";if(/[\w_\d\s]/.test(a)||N){for(;K(s););return p=999,o}return s.push(a),u=a,o+1}function K(N){for(var U,ee,j=0;;){if(U=n.indexOf(N.slice(0,N.length+j).join("")),ee=n[U],U===-1){if(j--+N.length>0)continue;ee=N.slice(0,1).join("")}return E(ee),_+=ee.length,(s=s.slice(ee.length)).length}}function G(){return/[^a-fA-F0-9]/.test(a)?(E(s.join("")),p=999,o):(s.push(a),u=a,o+1)}function W(){return a==="."||/[eE]/.test(a)?(s.push(a),p=5,u=a,o+1):a==="x"&&s.length===1&&s[0]==="0"?(p=11,s.push(a),u=a,o+1):/[^\d]/.test(a)?(E(s.join("")),p=999,o):(s.push(a),u=a,o+1)}function Q(){return a==="f"&&(s.push(a),u=a,o+=1),/[eE]/.test(a)?(s.push(a),u=a,o+1):(a!=="-"&&a!=="+"||!/[eE]/.test(u))&&/[^\d]/.test(a)?(E(s.join("")),p=999,o):(s.push(a),u=a,o+1)}function R(){if(/[^\d\w_]/.test(a)){var N=s.join("");return p=S[N]?8:P[N]?7:6,E(s.join("")),p=999,o}return s.push(a),u=a,o+1}};var e=g("./lib/literals"),n=g("./lib/operators"),t=g("./lib/builtins"),i=g("./lib/literals-300es"),r=g("./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(g,b,y){var e=g("./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(g,b,y){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(g,b,y){var e=g("./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(g,b,y){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(g,b,y){b.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],230:[function(g,b,y){var e=g("./index");b.exports=function(n,t){var i=e(t),r=[];return r=(r=r.concat(i(n))).concat(i(null))}},{"./index":224}],231:[function(g,b,y){b.exports=function(e){typeof e=="string"&&(e=[e]);for(var n=[].slice.call(arguments,1),t=[],i=0;i<e.length-1;i++)t.push(e[i],n[i]||"");return t.push(e[i]),t.join("")}},{}],232:[function(g,b,y){var e=g("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(g,b,y){b.exports=function(u,f){var o=u.length;
3520if(o===0)throw new Error("Must have at least d+1 points");var h=u[0].length;if(o<=h)throw new Error("Must input at least d+1 points");var p=u.slice(0,h+1),s=e.apply(void 0,p);if(s===0)throw new Error("Input not in general position");for(var x=new Array(h+1),c=0;c<=h;++c)x[c]=c;s<0&&(x[0]=1,x[1]=0);var T=new t(x,new Array(h+1),!1),_=T.adjacent,w=new Array(h+2);for(c=0;c<=h;++c){for(var k=x.slice(),L=0;L<=h;++L)L===c&&(k[L]=-1);var A=k[0];k[0]=k[1],k[1]=A;var I=new t(k,new Array(h+1),!0);_[c]=I,w[c]=I}for(w[h+1]=T,c=0;c<=h;++c){k=_[c].vertices;var P=_[c].adjacent;for(L=0;L<=h;++L){var S=k[L];if(S<0)P[L]=T;else for(var E=0;E<=h;++E)_[E].vertices.indexOf(S)<0&&(P[L]=_[E])}}var D=new l(h,p,w),F=!!f;for(c=h+1;c<o;++c)D.insert(u[c],F);return D.boundary()};var e=g("robust-orientation"),n=g("simplicial-complex").compareCells;function t(u,f,o){this.vertices=u,this.adjacent=f,this.boundary=o,this.lastVisited=-1}function i(u,f,o){this.vertices=u,this.cell=f,this.index=o}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 l(u,f,o){this.dimension=u,this.vertices=f,this.simplices=o,this.interior=o.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,s=d[u];s||(s=d[u]=((p=e[u+1])||(p=e),function(x){return function(){var c=this.tuple;return x.apply(this,c)}}(p))),this.orient=s}var a=l.prototype;a.handleBoundaryDegeneracy=function(u,f){var o=this.dimension,h=this.vertices.length-1,p=this.tuple,s=this.vertices,x=[u];for(u.lastVisited=-h;x.length>0;)for(var c=(u=x.pop()).adjacent,T=0;T<=o;++T){var _=c[T];if(_.boundary&&!(_.lastVisited<=-h)){for(var w=_.vertices,k=0;k<=o;++k){var L=w[k];p[k]=L<0?f:s[L]}var A=this.orient();if(A>0)return _;_.lastVisited=-h,A===0&&x.push(_)}}return null},a.walk=function(u,f){var o=this.vertices.length-1,h=this.dimension,p=this.vertices,s=this.tuple,x=f?this.interior.length*Math.random()|0:this.interior.length-1,c=this.interior[x];e:for(;!c.boundary;){for(var T=c.vertices,_=c.adjacent,w=0;w<=h;++w)s[w]=p[T[w]];for(c.lastVisited=o,w=0;w<=h;++w){var k=_[w];if(!(k.lastVisited>=o)){var L=s[w];s[w]=u;var A=this.orient();if(s[w]=L,A<0){c=k;continue e}k.boundary?k.lastVisited=-o:k.lastVisited=o}}return}return c},a.addPeaks=function(u,f){var o=this.vertices.length-1,h=this.dimension,p=this.vertices,s=this.tuple,x=this.interior,c=this.simplices,T=[f];f.lastVisited=o,f.vertices[f.vertices.indexOf(-1)]=o,f.boundary=!1,x.push(f);for(var _=[];T.length>0;){var w=(f=T.pop()).vertices,k=f.adjacent,L=w.indexOf(o);if(!(L<0)){for(var A=0;A<=h;++A)if(A!==L){var I=k[A];if(I.boundary&&!(I.lastVisited>=o)){var P=I.vertices;if(I.lastVisited!==-o){for(var S=0,E=0;E<=h;++E)P[E]<0?(S=E,s[E]=u):s[E]=p[P[E]];if(this.orient()>0){P[S]=o,I.boundary=!1,x.push(I),T.push(I),I.lastVisited=o;continue}I.lastVisited=-o}var D=I.adjacent,F=w.slice(),H=k.slice(),V=new t(F,H,!0);c.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===o)){for(var G=new Array(h-1),W=0,Q=0;Q<=h;++Q){var R=F[Q];R<0||Q===E||(G[W++]=R)}_.push(new i(G,V,E))}}}}}}for(_.sort(r),A=0;A+1<_.length;A+=2){var N=_[A],U=_[A+1],ee=N.index,j=U.index;ee<0||j<0||(N.cell.adjacent[N.index]=U.cell,U.cell.adjacent[U.index]=N.cell)}},a.insert=function(u,f){var o=this.vertices;o.push(u);var h=this.walk(u,f);if(h){for(var p=this.dimension,s=this.tuple,x=0;x<=p;++x){var c=h.vertices[x];s[x]=c<0?u:o[c]}var T=this.orient(s);T<0||(T!==0||(h=this.handleBoundaryDegeneracy(h,u)))&&this.addPeaks(u,h)}},a.boundary=function(){for(var u=this.dimension,f=[],o=this.simplices,h=o.length,p=0;p<h;++p){var s=o[p];if(s.boundary){for(var x=new Array(u),c=s.vertices,T=0,_=0,w=0;w<=u;++w)c[w]>=0?x[T++]=c[w]:_=1&w;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(g,b,y){var e=g("binary-search-bounds");function n(T,_,w,k,L){this.mid=T,this.left=_,this.right=w,this.leftPoints=k,this.rightPoints=L,this.count=(_?_.count:0)+(w?w.count:0)+k.length}b.exports=function(T){return!T||T.length===0?new x(null):new x(s(T))};var t=n.prototype;function i(T,_){T.mid=_.mid,T.left=_.left,T.right=_.right,T.leftPoints=_.leftPoints,T.rightPoints=_.rightPoints,T.count=_.count}function r(T,_){var w=s(_);T.mid=w.mid,T.left=w.left,T.right=w.right,T.leftPoints=w.leftPoints,T.rightPoints=w.rightPoints,T.count=w.count}function d(T,_){var w=T.intervals([]);w.push(_),r(T,w)}function l(T,_){var w=T.intervals([]),k=w.indexOf(_);return k<0?0:(w.splice(k,1),r(T,w),1)}function a(T,_,w){for(var k=0;k<T.length&&T[k][0]<=_;++k){var L=w(T[k]);if(L)return L}}function u(T,_,w){for(var k=T.length-1;k>=0&&T[k][1]>=_;--k){var L=w(T[k]);if(L)return L}}function f(T,_){for(var w=0;w<T.length;++w){var k=_(T[w]);if(k)return k}}function o(T,_){return T-_}function h(T,_){var w=T[0]-_[0];return w||T[1]-_[1]}function p(T,_){var w=T[1]-_[1];return w||T[0]-_[0]}function s(T){if(T.length===0)return null;for(var _=[],w=0;w<T.length;++w)_.push(T[w][0],T[w][1]);_.sort(o);var k=_[_.length>>1],L=[],A=[],I=[];for(w=0;w<T.length;++w){var P=T[w];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,s(L),s(A),S,E)}function x(T){this.root=T}t.intervals=function(T){return T.push.apply(T,this.leftPoints),this.left&&this.left.intervals(T),this.right&&this.right.intervals(T),T},t.insert=function(T){var _=this.count-this.leftPoints.length;if(this.count+=1,T[1]<this.mid)this.left?4*(this.left.count+1)>3*(_+1)?d(this,T):this.left.insert(T):this.left=s([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(_+1)?d(this,T):this.right.insert(T):this.right=s([T]);else{var w=e.ge(this.leftPoints,T,h),k=e.ge(this.rightPoints,T,p);this.leftPoints.splice(w,0,T),this.rightPoints.splice(k,0,T)}},t.remove=function(T){var _=this.count-this.leftPoints;if(T[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(_-1)?l(this,T):(A=this.left.remove(T))===2?(this.left=null,this.count-=1,1):(A===1&&(this.count-=1),A):0;if(T[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(_-1)?l(this,T):(A=this.right.remove(T))===2?(this.right=null,this.count-=1,1):(A===1&&(this.count-=1),A):0;if(this.count===1)return this.leftPoints[0]===T?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===T){if(this.left&&this.right){for(var w=this,k=this.left;k.right;)w=k,k=k.right;if(w===this)k.right=this.right;else{var L=this.left,A=this.right;w.count-=k.count,w.right=k.left,k.left=L,k.right=A}i(this,k),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?i(this,this.left):i(this,this.right);return 1}for(L=e.ge(this.leftPoints,T,h);L<this.leftPoints.length&&this.leftPoints[L][0]===T[0];++L)if(this.leftPoints[L]===T){for(this.count-=1,this.leftPoints.splice(L,1),A=e.ge(this.rightPoints,T,p);A<this.rightPoints.length&&this.rightPoints[A][1]===T[1];++A)if(this.rightPoints[A]===T)return this.rightPoints.splice(A,1),1}return 0},t.queryPoint=function(T,_){if(T<this.mid)return this.left&&(w=this.left.queryPoint(T,_))?w:a(this.leftPoints,T,_);if(T>this.mid){var w;return this.right&&(w=this.right.queryPoint(T,_))?w:u(this.rightPoints,T,_)}return f(this.leftPoints,_)},t.queryInterval=function(T,_,w){var k;return T<this.mid&&this.left&&(k=this.left.queryInterval(T,_,w))||_>this.mid&&this.right&&(k=this.right.queryInterval(T,_,w))?k:_<this.mid?a(this.leftPoints,_,w):T>this.mid?u(this.rightPoints,T,w):f(this.leftPoints,w)};var c=x.prototype;c.insert=function(T){this.root?this.root.insert(T):this.root=new n(T[0],null,null,[T],[T])},c.remove=function(T){if(this.root){var _=this.root.remove(T);return _===2&&(this.root=null),_!==0}return!1},c.queryPoint=function(T,_){if(this.root)return this.root.queryPoint(T,_)},c.queryInterval=function(T,_,w){if(T<=_&&this.root)return this.root.queryInterval(T,_,w)},Object.defineProperty(c,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(c,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})}
3520,{"binary-search-bounds":31}],235:[function(g,b,y){b.exports=function(e){for(var n=new Array(e),t=0;t<e;++t)n[t]=t;return n}},{}],236:[function(g,b,y){b.exports=!0},{}],237:[function(g,b,y){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(g,b,y){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(i){i||(i={});var r=i.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=i.tablet?n.test(r):e.test(r);return!d&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(d=!0),d}},{}],239:[function(g,b,y){b.exports=function(e){for(var n,t=e.length,i=0;i<t;i++)if(((n=e.charCodeAt(i))<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(g,b,y){b.exports=function(e,n,t){return e*(1-t)+n*t}},{}],241:[function(g,b,y){var e=g("./normalize"),n=g("gl-mat4/create"),t=g("gl-mat4/clone"),i=g("gl-mat4/determinant"),r=g("gl-mat4/invert"),d=g("gl-mat4/transpose"),l={length:g("gl-vec3/length"),normalize:g("gl-vec3/normalize"),dot:g("gl-vec3/dot"),cross:g("gl-vec3/cross")},a=n(),u=n(),f=[0,0,0,0],o=[[0,0,0],[0,0,0],[0,0,0]],h=[0,0,0];function p(s,x,c,T,_){s[0]=x[0]*T+c[0]*_,s[1]=x[1]*T+c[1]*_,s[2]=x[2]*T+c[2]*_}b.exports=function(s,x,c,T,_,w){if(x||(x=[0,0,0]),c||(c=[0,0,0]),T||(T=[0,0,0]),_||(_=[0,0,0,1]),w||(w=[0,0,0,1]),!e(a,s)||(t(u,a),u[3]=0,u[7]=0,u[11]=0,u[15]=1,Math.abs(i(u)<1e-8)))return!1;var k,L,A,I,P,S,E,D=a[3],F=a[7],H=a[11],V=a[12],Z=a[13],K=a[14],G=a[15];if(D!==0||F!==0||H!==0){if(f[0]=D,f[1]=F,f[2]=H,f[3]=G,!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(Q,R){Q[0][0]=R[0],Q[0][1]=R[1],Q[0][2]=R[2],Q[1][0]=R[4],Q[1][1]=R[5],Q[1][2]=R[6],Q[2][0]=R[8],Q[2][1]=R[9],Q[2][2]=R[10]}(o,a),c[0]=l.length(o[0]),l.normalize(o[0],o[0]),T[0]=l.dot(o[0],o[1]),p(o[1],o[1],o[0],1,-T[0]),c[1]=l.length(o[1]),l.normalize(o[1],o[1]),T[0]/=c[1],T[1]=l.dot(o[0],o[2]),p(o[2],o[2],o[0],1,-T[1]),T[2]=l.dot(o[1],o[2]),p(o[2],o[2],o[1],1,-T[2]),c[2]=l.length(o[2]),l.normalize(o[2],o[2]),T[1]/=c[2],T[2]/=c[2],l.cross(h,o[1],o[2]),l.dot(o[0],h)<0)for(var W=0;W<3;W++)c[W]*=-1,o[W][0]*=-1,o[W][1]*=-1,o[W][2]*=-1;return w[0]=.5*Math.sqrt(Math.max(1+o[0][0]-o[1][1]-o[2][2],0)),w[1]=.5*Math.sqrt(Math.max(1-o[0][0]+o[1][1]-o[2][2],0)),w[2]=.5*Math.sqrt(Math.max(1-o[0][0]-o[1][1]+o[2][2],0)),w[3]=.5*Math.sqrt(Math.max(1+o[0][0]+o[1][1]+o[2][2],0)),o[2][1]>o[1][2]&&(w[0]=-w[0]),o[0][2]>o[2][0]&&(w[1]=-w[1]),o[1][0]>o[0][1]&&(w[2]=-w[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(g,b,y){b.exports=function(e,n){var t=n[15];if(t===0)return!1;for(var i=1/t,r=0;r<16;r++)e[r]=n[r]*i;return!0}},{}],243:[function(g,b,y){var e=g("gl-vec3/lerp"),n=g("mat4-recompose"),t=g("mat4-decompose"),i=g("gl-mat4/determinant"),r=g("quat-slerp"),d=u(),l=u(),a=u();function u(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(o){return[o||0,o||0,o||0]}b.exports=function(o,h,p,s){if(i(h)===0||i(p)===0)return!1;var x=t(h,d.translate,d.scale,d.skew,d.perspective,d.quaternion),c=t(p,l.translate,l.scale,l.skew,l.perspective,l.quaternion);return!(!x||!c)&&(e(a.translate,d.translate,l.translate,s),e(a.skew,d.skew,l.skew,s),e(a.scale,d.scale,l.scale,s),e(a.perspective,d.perspective,l.perspective,s),r(a.quaternion,d.quaternion,l.quaternion,s),n(o,a.translate,a.scale,a.skew,a.perspective,a.quaternion),!0)}},{"gl-mat4/determinant":94,"gl-vec3/lerp":173,"mat4-decompose":241,"mat4-recompose":244,"quat-slerp":271}],244:[function(g,b,y){var e={identity:g("gl-mat4/identity"),translate:g("gl-mat4/translate"),multiply:g("gl-mat4/multiply"),create:g("gl-mat4/create"),scale:g("gl-mat4/scale"),fromRotationTranslation:g("gl-mat4/fromRotationTranslation")},n=(e.create(),e.create());b.exports=function(t,i,r,d,l,a){return e.identity(t),e.fromRotationTranslation(t,a,i),t[3]=l[0],t[7]=l[1],t[11]=l[2],t[15]=l[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,012 bytes, line 3525
3525],245:[function(g,b,y){var e=g("binary-search-bounds"),n=g("mat4-interpolate"),t=g("gl-mat4/invert"),i=g("gl-mat4/rotateX"),r=g("gl-mat4/rotateY"),d=g("gl-mat4/rotateZ"),l=g("gl-mat4/lookAt"),a=g("gl-mat4/translate"),u=(g("gl-mat4/scale"),g("gl-vec3/normalize")),f=[0,0,0];function o(s){this._components=s.slice(),this._time=[0],this.prevMatrix=s.slice(),this.nextMatrix=s.slice(),this.computedMatrix=s.slice(),this.computedInverse=s.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(s){return new o((s=s||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var h=o.prototype;h.recalcMatrix=function(s){var x=this._time,c=e.le(x,s),T=this.computedMatrix;if(!(c<0)){var _=this._components;if(c===x.length-1)for(var w=16*c,k=0;k<16;++k)T[k]=_[w++];else{var L=x[c+1]-x[c],A=(w=16*c,this.prevMatrix),I=!0;for(k=0;k<16;++k)A[k]=_[w++];var P=this.nextMatrix;for(k=0;k<16;++k)P[k]=_[w++],I=I&&A[k]===P[k];if(L<1e-6||I)for(k=0;k<16;++k)T[k]=A[k];else n(T,A,P,(s-x[c])/L)}var S=this.computedUp;S[0]=T[1],S[1]=T[5],S[2]=T[9],u(S,S);var E=this.computedInverse;t(E,T);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]-T[2+4*k]*V}},h.idle=function(s){if(!(s<this.lastT())){for(var x=this._components,c=x.length-16,T=0;T<16;++T)x.push(x[c++]);this._time.push(s)}},h.flush=function(s){var x=e.gt(this._time,s)-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(s,x,c,T){this.recalcMatrix(s),x=x||this.computedEye,c=c||f,T=T||this.computedUp,this.setMatrix(s,l(this.computedMatrix,x,c,T));for(var _=0,w=0;w<3;++w)_+=Math.pow(c[w]-x[w],2);_=Math.log(Math.sqrt(_)),this.computedRadius[0]=_},h.rotate=function(s,x,c,T){this.recalcMatrix(s);var _=this.computedInverse;x&&r(_,_,x),c&&i(_,_,c),T&&d(_,_,T),this.setMatrix(s,t(this.computedMatrix,_))};var p=[0,0,0];h.pan=function(s,x,c,T){p[0]=-(x||0),p[1]=-(c||0),p[2]=-(T||0),this.recalcMatrix(s);var _=this.computedInverse;a(_,_,p),this.setMatrix(s,t(_,_))},h.translate=function(s,x,c,T){p[0]=x||0,p[1]=c||0,p[2]=T||0,this.recalcMatrix(s);var _=this.computedMatrix;a(_,_,p),this.setMatrix(s,_)},h.setMatrix=function(s,x){if(!(s<this.lastT())){this._time.push(s);for(var c=0;c<16;++c)this._components.push(x[c])}},h.setDistance=function(s,x){this.computedRadius[0]=x},h.setDistanceLimits=function(s,x){var c=this._limits;c[0]=s,c[1]=x},h.getDistanceLimits=function(s){var x=this._limits;return s?(s[0]=x[0],s[1]=x[1],s):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(g,b,y){b.exports=function(n){var t=n.length;if(t<3){for(var i=new Array(t),r=0;r<t;++r)i[r]=r;return t===2&&n[0][0]===n[1][0]&&n[0][1]===n[1][1]?[0]:i}var d=new Array(t);for(r=0;r<t;++r)d[r]=r;d.sort(function(x,c){var T=n[x][0]-n[c][0];return T||n[x][1]-n[c][1]});var l=[d[0],d[1]],a=[d[0],d[1]];for(r=2;r<t;++r){for(var u=d[r],f=n[u],o=l.length;o>1&&e(n[l[o-2]],n[l[o-1]],f)<=0;)o-=1,l.pop();for(l.push(u),o=a.length;o>1&&e(n[a[o-2]],n[a[o-1]],f)>=0;)o-=1,a.pop();a.push(u)}i=new Array(a.length+l.length-2);for(var h=0,p=(r=0,l.length);r<p;++r)i[h++]=l[r];for(var s=a.length-2;s>0;--s)i[h++]=a[s];return i};var e=g("robust-orientation")[3]},{"robust-orientation":284}],247:[function(g,b,y){b.exports=function(n,t){t||(t=n,n=window);var i=0,r=0,d=0,l={shift:!1,alt:!1,control:!1,meta:!1},a=!1;function u(w){var k=!1;return"altKey"in w&&(k=k||w.altKey!==l.alt,l.alt=!!w.altKey),"shiftKey"in w&&(k=k||w.shiftKey!==l.shift,l.shift=!!w.shiftKey),"ctrlKey"in w&&(k=k||w.ctrlKey!==l.control,l.control=!!w.ctrlKey),"metaKey"in w&&(k=k||w.metaKey!==l.meta,l.meta=!!w.metaKey),k}function f(w,k){var L=e.x(k),A=e.y(k);"buttons"in k&&(w=0|k.buttons),(w!==i||L!==r||A!==d||u(k))&&(i=0|w,r=L||0,d=A||0,t&&t(i,r,d,l))}function o(w){f(0,w)}function h(){(i||r||d||l.shift||l.alt||l.meta||l.control)&&(r=d=0,i=0,l.shift=l.alt=l.control=l.meta=!1,t&&t(0,0,0,l))}function p(w){u(w)&&t&&t(i,r,d,l)}function s(w){e.buttons(w)===0?f(0,w):f(i,w)}function x(w){f(i|e.buttons(w),w)}function c(w){f(i&~e.buttons(w),w)}function T(){a||(a=!0,n.addEventListener("mousemove",s),n.addEventListener("mousedown",x),n.addEventListener("mouseup",c),n.addEventListener("mouseleave",o),n.addEventListener("mouseenter",o),n.addEventListener("mouseout",o),n.addEventListener("mouseover",o),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)))}T();var _={element:n};return Object.defineProperties(_,{enabled:{get:function(){return a}
3525,set:function(w){w?T():function(){!a||(a=!1,n.removeEventListener("mousemove",s),n.removeEventListener("mousedown",x),n.removeEventListener("mouseup",c),n.removeEventListener("mouseleave",o),n.removeEventListener("mouseenter",o),n.removeEventListener("mouseout",o),n.removeEventListener("mouseover",o),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 i},enumerable:!0},x:{get:function(){return r},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return l},enumerable:!0}}),_};var e=g("mouse-event")},{"mouse-event":249}],248:[function(g,b,y){var e={left:0,top:0};b.exports=function(n,t,i){t=t||n.currentTarget||n.srcElement,Array.isArray(i)||(i=[0,0]);var r=n.clientX||0,d=n.clientY||0,l=(a=t,a===window||a===document||a===document.body?e:a.getBoundingClientRect()),a;return i[0]=r-l.left,i[1]=d-l.top,i}},{}],249:[function(g,b,y){function e(n){return n.target||n.srcElement||window}y.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},y.element=e,y.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},y.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(g,b,y){var e=g("to-px");b.exports=function(n,t,i){typeof n=="function"&&(i=!!t,t=n,n=window);var r=e("ex",n),d=function(l){i&&l.preventDefault();var a=l.deltaX||0,u=l.deltaY||0,f=l.deltaZ||0,o=1;switch(l.deltaMode){case 1:o=r;break;case 2:o=window.innerHeight}if(u*=o,f*=o,(a*=o)||u||f)return t(a,u,f,l)};return n.addEventListener("wheel",d),d}},{"to-px":304}],251:[function(g,b,y){var e=g("typedarray-pool");b.exports=function(t){function i(o){throw new Error("ndarray-extract-contour: "+o)}typeof t!="object"&&i("Must specify arguments");var r=t.order;Array.isArray(r)||i("Must specify order");var d=t.arrayArguments||1;d<1&&i("Must have at least one array argument");var l=t.scalarArguments||0;l<0&&i("Scalar arg count must be > 0"),typeof t.vertex!="function"&&i("Must specify vertex creation function"),typeof t.cell!="function"&&i("Must specify cell creation function"),typeof t.phase!="function"&&i("Must specify phase function");for(var a=t.getters||[],u=new Array(d),f=0;f<d;++f)a.indexOf(f)>=0?u[f]=!0:u[f]=!1;return function(o,h,p,s,x,c){var T=[c,x].join(",");return(0,n[T])(o,h,p,e.mallocUint32,e.freeUint32)}(t.vertex,t.cell,t.phase,0,r,u)};var n={"false,0,1":function(t,i,r,d,l){return function(a,u,f,o){var h,p=0|a.shape[0],s=0|a.shape[1],x=a.data,c=0|a.offset,T=0|a.stride[0],_=0|a.stride[1],w=c,k=0|-T,L=0,A=0|-_,I=0,P=-T-_|0,S=0,E=0|T,D=_-T*p|0,F=0,H=0,V=0,Z=2*p|0,K=d(Z),G=d(Z),W=0,Q=0,R=-1,N=-1,U=0,ee=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[w],u,f,o),w+=E;if(w+=D,s>0){if(H=1,K[W++]=r(x[w],u,f,o),w+=E,p>0)for(F=1,h=x[w],Q=K[W]=r(h,u,f,o),U=K[W+R],X=K[W+ee],ne=K[W+J],Q===U&&Q===X&&Q===ne||(L=x[w+k],I=x[w+A],S=x[w+P],t(F,H,h,L,I,S,Q,U,X,ne,u,f,o),se=G[W]=V++),W+=1,w+=E,F=2;F<p;++F)h=x[w],Q=K[W]=r(h,u,f,o),U=K[W+R],X=K[W+ee],ne=K[W+J],Q===U&&Q===X&&Q===ne||(L=x[w+k],I=x[w+A],S=x[w+P],t(F,H,h,L,I,S,Q,U,X,ne,u,f,o),se=G[W]=V++,ne!==U&&i(G[W+R],se,S,L,ne,U,u,f,o)),W+=1,w+=E;for(w+=D,W=0,oe=R,R=N,N=oe,oe=ee,ee=j,j=oe,oe=J,J=re,re=oe,H=2;H<s;++H){if(K[W++]=r(x[w],u,f,o),w+=E,p>0)for(F=1,h=x[w],Q=K[W]=r(h,u,f,o),U=K[W+R],X=K[W+ee],ne=K[W+J],Q===U&&Q===X&&Q===ne||(L=x[w+k],I=x[w+A],S=x[w+P],t(F,H,h,L,I,S,Q,U,X,ne,u,f,o),se=G[W]=V++,ne!==X&&i(G[W+ee],se,I,S,X,ne,u,f,o)),W+=1,w+=E,F=2;F<p;++F)h=x[w],Q=K[W]=r(h,u,f,o),U=K[W+R],X=K[W+ee],ne=K[W+J],Q===U&&Q===X&&Q===ne||(L=x[w+k],I=x[w+A],S=x[w+P],t(F,H,h,L,I,S,Q,U,X,ne,u,f,o),se=G[W]=V++,ne!==X&&i(G[W+ee],se,I,S,X,ne,u,f,o),ne!==U&&i(G[W+R],se,S,L,ne,U,u,f,o)),W+=1,w+=E;1&H&&(W=0),oe=R,R=N,N=oe,oe=ee,ee=j,j=oe,oe=J,J=re,re=oe,w+=D}}l(G),l(K)}},"false,1,0":function(t,i,r,d,l){return function(a,u,f,o){var h,p=0|a.shape[0],s=0|a.shape[1],x=a.data,c=0|a.offset,T=0|a.stride[0],_=0|a.stride[1],w=c,k=0|-T,L=0,A=0|-_,I=0,P=-T-_|0,S=0,E=0|_,D=T-_*s|0,F=0,H=0,V=0,Z=2*s|0,K=d(Z),G=d(Z),W=0,Q=0,R=-1,N=-1,U=0,ee=0|-s,j=0|s,X=0,J=-s-1|0,re=s-1|0,ne=0,se=0,oe=0;for(H=0;H<s;++H)K[W++]=r(x[w],u,f,o),w+=E;if(w+=D,p>0){if(F=1,K[W++]=r(x[w],u,f,o),w+=E,s>0)for(H=1,h=x[w],Q=K[W]=r(h,u,f,o),X=K[W+ee],U=K[W+R],ne=K[W+J],Q===X&&Q===U&&Q===ne||(L=x[w+k],I=x[w+A],S=x[w+P],t(F,H,h,L,I,S,Q,X,U,ne,u,f,o),se=G[W]=V++),W+=1,w+=E,H=2;H<s;++H)h=x[w],Q=K[W]=r(h,u,f,o),X=K[W+ee],U=K[W+R],ne=K[W+J],Q===X&&Q===U&&Q===ne||(L=x[w+k],I=x[w+A],S=x[w+P],t(F,H,h,L,I,S,Q,X,U,ne,u,f,o),se=G[W]=V++,ne!==U&&i(G[W+R],se,I,S,U,ne,u,f,o)),W+=1,w+=E;for(w+=D,W=0,oe=ee,ee=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[w],u,f,o),w+=E,s>0)for(H=1,h=x[w],Q=K[W]=r(h,u,f,o),X=K[W+ee],U=K[W+R],ne=K[W+J],Q===X&&Q===U&&Q===ne||(L=x[w+k],I=x[w+A],S=x[w+P],t(F,H,h,L,I,S,Q,X,U,ne,u,f,o),se=G[W]=V++,ne!==X&&i(G[W+ee],se,S,L,ne,X,u,f,o)),W+=1,w+=E,H=2;H<s;++H)h=x[w],Q=K[W]=r(h,u,f,o),X=K[W+ee],U=K[W+R],ne=K[W+J],Q===X&&Q===U&&Q===ne||(L=x[w+k],I=x[w+A],S=x[w+P],t(F,H,h,L,I,S,Q,X,U,ne,u,f,o),se=G[W]=V++,ne!==U&&i(G[W+R],se,I,S,U,ne,u,f,o),ne!==X&&i(G[W+ee],se,S,L,ne,X,u,f,o)),W+=1,w+=E;1&F&&(W=0),oe=ee,ee=j,j=oe,oe=R,R=N,N=oe,oe=J,J=re,re=oe,w+=D}}l(G),l(K)}}}},{"typedarray-pool":308}],252:[function(g,b,y){var e=g("dup"),n={zero:function(p,s,x,c){var T=p[0];c|=0;var _=0,w=x[0];for(_=0;_<T;++_)s[c]=0,c+=w},fdTemplate1:function(p,s,x,c,T,_,w){var k=p[0],L=x[0],A=-1*L,I=L;c|=0,w|=0;var P=0,S=L,E=_[0];for(P=0;P<k;++P)T[w]=.5*(s[c+A]-s[c+I]),c+=S,w+=E},fdTemplate2:function(p,s,x,c,T,_,w,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,G=-1*E,W=E;c|=0,w|=0,A|=0;var Q=0,R=0,N=E,U=S-P*E,ee=F,j=D-P*F,X=V,J=H-P*V;for(R=0;R<I;++R){for(Q=0;Q<P;
3525++Q)T[w]=.5*(s[c+Z]-s[c+K]),k[A]=.5*(s[c+G]-s[c+W]),c+=N,w+=ee,A+=X;c+=U,w+=j,A+=J}}},t={cdiff:function(p){var s={};return function(x,c,T){var _=x.dtype,w=x.order,k=c.dtype,L=c.order,A=T.dtype,I=T.order,P=[_,w.join(),k,L.join(),A,I.join()].join(),S=s[P];return S||(s[P]=S=p([_,w,k,L,A,I])),S(x.shape.slice(0),x.data,x.stride,0|x.offset,c.data,c.stride,0|c.offset,T.data,T.stride,0|T.offset)}},zero:function(p){var s={};return function(x){var c=x.dtype,T=x.order,_=[c,T.join()].join(),w=s[_];return w||(s[_]=w=p([c,T])),w(x.shape.slice(0),x.data,x.stride,0|x.offset)}},fdTemplate1:function(p){var s={};return function(x,c){var T=x.dtype,_=x.order,w=c.dtype,k=c.order,L=[T,_.join(),w,k.join()].join(),A=s[L];return A||(s[L]=A=p([T,_,w,k])),A(x.shape.slice(0),x.data,x.stride,0|x.offset,c.data,c.stride,0|c.offset)}},fdTemplate2:function(p){var s={};return function(x,c,T){var _=x.dtype,w=x.order,k=c.dtype,L=c.order,A=T.dtype,I=T.order,P=[_,w.join(),k,L.join(),A,I.join()].join(),S=s[P];return S||(s[P]=S=p([_,w,k,L,A,I])),S(x.shape.slice(0),x.data,x.stride,0|x.offset,c.data,c.stride,0|c.offset,T.data,T.stride,0|T.offset)}}};function i(p){return(0,t[p.funcName])(r.bind(void 0,p))}function r(p){return n[p.funcName]}function d(p){return i({funcName:p.funcName})}var l={},a={},u=d({funcName:"cdiff"}),f=d({funcName:"zero"});function o(p){return p in l?l[p]:l[p]=d({funcName:"fdTemplate"+p})}function h(p,s,x,c){return function(T,_){var w=_.shape.slice();return w[0]>2&&w[1]>2&&c(_.pick(-1,-1).lo(1,1).hi(w[0]-2,w[1]-2),T.pick(-1,-1,0).lo(1,1).hi(w[0]-2,w[1]-2),T.pick(-1,-1,1).lo(1,1).hi(w[0]-2,w[1]-2)),w[1]>2&&(x(_.pick(0,-1).lo(1).hi(w[1]-2),T.pick(0,-1,1).lo(1).hi(w[1]-2)),s(T.pick(0,-1,0).lo(1).hi(w[1]-2))),w[1]>2&&(x(_.pick(w[0]-1,-1).lo(1).hi(w[1]-2),T.pick(w[0]-1,-1,1).lo(1).hi(w[1]-2)),s(T.pick(w[0]-1,-1,0).lo(1).hi(w[1]-2))),w[0]>2&&(x(_.pick(-1,0).lo(1).hi(w[0]-2),T.pick(-1,0,0).lo(1).hi(w[0]-2)),s(T.pick(-1,0,1).lo(1).hi(w[0]-2))),w[0]>2&&(x(_.pick(-1,w[1]-1).lo(1).hi(w[0]-2),T.pick(-1,w[1]-1,0).lo(1).hi(w[0]-2)),s(T.pick(-1,w[1]-1,1).lo(1).hi(w[0]-2))),T.set(0,0,0,0),T.set(0,0,1,0),T.set(w[0]-1,0,0,0),T.set(w[0]-1,0,1,0),T.set(0,w[1]-1,0,0),T.set(0,w[1]-1,1,0),T.set(w[0]-1,w[1]-1,0,0),T.set(w[0]-1,w[1]-1,1,0),T}}b.exports=function(p,s,x){return Array.isArray(x)||(x=e(s.dimension,typeof x=="string"?x:"clamp")),s.size===0?p:s.dimension===0?(p.set(0),p):function(c){var T=c.join();if(L=a[T])return L;for(var _=c.length,w=[u,f],k=1;k<=_;++k)w.push(o(k));var L=h.apply(void 0,w);return a[T]=L,L}(x)(p,s)}},{dup:65}],253:[function(g,b,y){function e(r,d){var l=Math.floor(d),a=d-l,u=0<=l&&l<r.shape[0],f=0<=l+1&&l+1<r.shape[0];return(1-a)*(u?+r.get(l):0)+a*(f?+r.get(l+1):0)}function n(r,d,l){var a=Math.floor(d),u=d-a,f=0<=a&&a<r.shape[0],o=0<=a+1&&a+1<r.shape[0],h=Math.floor(l),p=l-h,s=0<=h&&h<r.shape[1],x=0<=h+1&&h+1<r.shape[1],c=f&&s?r.get(a,h):0,T=f&&x?r.get(a,h+1):0;return(1-p)*((1-u)*c+u*(o&&s?r.get(a+1,h):0))+p*((1-u)*T+u*(o&&x?r.get(a+1,h+1):0))}function t(r,d,l,a){var u=Math.floor(d),f=d-u,o=0<=u&&u<r.shape[0],h=0<=u+1&&u
3525+1<r.shape[0],p=Math.floor(l),s=l-p,x=0<=p&&p<r.shape[1],c=0<=p+1&&p+1<r.shape[1],T=Math.floor(a),_=a-T,w=0<=T&&T<r.shape[2],k=0<=T+1&&T+1<r.shape[2],L=o&&x&&w?r.get(u,p,T):0,A=o&&c&&w?r.get(u,p+1,T):0,I=h&&x&&w?r.get(u+1,p,T):0,P=h&&c&&w?r.get(u+1,p+1,T):0,S=o&&x&&k?r.get(u,p,T+1):0,E=o&&c&&k?r.get(u,p+1,T+1):0;return(1-_)*((1-s)*((1-f)*L+f*I)+s*((1-f)*A+f*P))+_*((1-s)*((1-f)*S+f*(h&&x&&k?r.get(u+1,p,T+1):0))+s*((1-f)*E+f*(h&&c&&k?r.get(u+1,p+1,T+1):0)))}function i(r){var d,l,a=0|r.shape.length,u=new Array(a),f=new Array(a),o=new Array(a),h=new Array(a);for(d=0;d<a;++d)l=+arguments[d+1],u[d]=Math.floor(l),f[d]=l-u[d],o[d]=0<=u[d]&&u[d]<r.shape[d],h[d]=0<=u[d]+1&&u[d]+1<r.shape[d];var p,s,x,c=0;e:for(d=0;d<1<<a;++d){for(s=1,x=r.offset,p=0;p<a;++p)if(d&1<<p){if(!h[p])continue e;s*=f[p],x+=r.stride[p]*(u[p]+1)}else{if(!o[p])continue e;s*=1-f[p],x+=r.stride[p]*u[p]}c+=s*r.data[x]}return c}b.exports=function(r,d,l,a){switch(r.shape.length){case 0:return 0;case 1:return e(r,d);case 2:return n(r,d,l);case 3:return t(r,d,l,a);default:return i.apply(void 0,arguments)}},b.exports.d1=e,b.exports.d2=n,b.exports.d3=t},{}],254:[function(g,b,y){var e={"float64,2,1,0":function(){return function(d,l,a,u,f){var o=d[0],h=d[1],p=d[2],s=a[0],x=a[1],c=a[2];u|=0;var T=0,_=0,w=0,k=c,L=x-p*c,A=s-h*x;for(w=0;w<o;++w){for(_=0;_<h;++_){for(T=0;T<p;++T)l[u]/=f,u+=k;u+=L}u+=A}}},"uint8,2,0,1,float64,2,1,0":function(){return function(d,l,a,u,f,o,h,p){for(var s=d[0],x=d[1],c=d[2],T=a[0],_=a[1],w=a[2],k=o[0],L=o[1],A=o[2],I=u|=0,P=h|=0,S=0|d[0];S>0;){S<64?(s=S,S=0):(s=64,S-=64);for(var E=0|d[1];E>0;){E<64?(x=E,E=0):(x=64,E-=64),u=I+S*T+E*_,h=P+S*k+E*L;var D=0,F=0,H=0,V=w,Z=T-c*w,K=_-s*T,G=A,W=k-c*A,Q=L-s*k;for(H=0;H<x;++H){for(F=0;F<s;++F){for(D=0;D<c;++D)l[u]=f[h]*p,u+=V,h+=G;u+=Z,h+=W}u+=K,h+=Q}}}}},"float32,1,0,float32,1,0":function(){return function(d,l,a,u,f,o,h){var p=d[0],s=d[1],x=a[0],c=a[1],T=o[0],_=o[1];u|=0,h|=0;var w=0,k=0,L=c,A=x-s*c,I=_,P=T-s*_;for(k=0;k<p;++k){for(w=0;w<s;++w)l[u]=f[h],u+=L,h+=I;u+=A,h+=P}}},"float32,1,0,float32,0,1":function(){return function(d,l,a,u,f,o,h){for(var p=d[0],s=d[1],x=a[0],c=a[1],T=o[0],_=o[1],w=u|=0,k=h|=0,L=0|d[1];L>0;){L<64?(s=L,L=0):(s=64,L-=64);for(var A=0|d[0];A>0;){A<64?(p=A,A=0):(p=64,A-=64),u=w+L*c+A*x,h=k+L*_+A*T;var I=0,P=0,S=c,E=x-s*c,D=_,F=T-s*_;for(P=0;P<p;++P){for(I=0;I<s;++I)l[u]=f[h],u+=S,h+=D;u+=E,h+=F}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(d,l,a,u,f,o,h){for(var p=d[0],s=d[1],x=d[2],c=a[0],T=a[1],_=a[2],w=o[0],k=o[1],L=o[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?(s=E,E=0):(s=64,E-=64),u=A+P*_+S*c+E*T,h=I+P*L+S*w+E*k;var D=0,F=0,H=0,V=_,Z=c-x*_,K=T-p*c,G=L,W=w-x*L,Q=k-p*w;for(H=0;H<s;++H){for(F=0;F<p;++F){for(D=0;D<x;++D)l[u]=f[h],u+=V,h+=G;u+=Z,h+=W}u+=K,h+=Q}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(d,l,a,u,f,o,h){var p=d[0],s=d[1],x=d[2],c=a[0],T=a[1],_=a[2],w=o[0],k=o[1],L=o[2];u|=0,h|=0;var A=0,I=0,P=0,S=_,E=c-x*_,D=T-p*c,F=L,H=w-x*L,V=k-p*w;for(P=0;P<s;++P){for(I=0;I<p;++I){for(A=0;A<x;++A)l[u]=f[h],u+=S,h+=F;u+=E,h+=H}u+=D,h+=V}}}},n=function(d,l){var a=l.join(",");return(0,e[a])()},t={mul:function(d){var l={};return function(a,u,f){var o=a.dtype,h=a.order,p=u.dtype,s=u.order,x=f.dtype,c=f.order,T=[o,h.join(),p,s.join(),x,c.join()].join(),_=l[T];return _||(l[T]=_=d([o,h,p,s,x,c])),_(a.shape.slice(0),a.data,a.stride,0|a.offset,u.data,u.stride,0|u.offset,f.data,f.stride,0|f.offset)}},muls:function(d){var l={};return function(a,u,f){var o=a.dtype,h=a.order,p=u.dtype,s=u.order,x=[o,h.join(),p,s.join()].join(),c=l[x];return c||(l[x]=c=d([o,h,p,s])),c(a.shape.slice(0),a.data,a.stride,0|a.offset,u.data,u.stride,0|u.offset,f)}},mulseq:function(d){var l={};return function(a,u){var f=a.dtype,o=a.order,h=[f,o.join()].join(),p=l[h];return p||(l[h]=p=d([f,o])),p(a.shape.slice(0),a.data,a.stride,0|a.offset,u)}},div:function(d){var l={};return function(a,u,f){var o=a.dtype,h=a.order,p=u.dtype,s=u.order,x=f.dtype,c=f.order,T=[o,h.join(),p,s.join(),x,c.join()].join(),_=l[T];return _||(l[T]=_=d([o,h,p,s,x,c])),_(a.shape.slice(0),a.data,a.stride,0|a.offset,u.data,u.stride,0|u.offset,f.data,f.stride,0|f.offset)}},divs:function(d){var l={};return function(a,u,f){var o=a.dtype,h=a.order,p=u.dtype,s=u.order,x=[o,h.join(),p,s.join()].join(),c=l[x];return c||(l[x]=c=d([o,h,p,s])),c(a.shape.slice(0),a.data,a.stride,0|a.offset,u.data,u.stride,0|u.offset,f)}},divseq:function(d){var l={};return function(a,u){var f=a.dtype,o=a.order,h=[f,o.join()].join(),p=l[h];return p||(l[h]=p=d([f,o])),p(a.shape.slice(0),a.data,a.stride,0|a.offset,u)}},assign:function(d){var l={};return function(a,u){var f=a.dtype,o=a.order,h=u.dtype,p=u.order,s=[f,o.join(),h,p.join()].join(),x=l[s];return x||(l[s]=x=d([f,o,h,p])),x(a.shape.slice(0),a.data,a.stride,0|a.offset,u.data,u.stride,0|u.offset)}}};function i(d){return l={funcName:d.funcName},(0,t[l.funcName])(n.bind(void 0,l));var l}
3525var r={mul:"*",div:"/"};(function(){for(var d in r)y[d]=i({funcName:d}),y[d+"s"]=i({funcName:d+"s"}),y[d+"seq"]=i({funcName:d+"seq"})})(),y.assign=i({funcName:"assign"})},{}],255:[function(g,b,y){var e=g("ndarray"),n=g("./doConvert.js");b.exports=function(t,i){for(var r=[],d=t,l=1;Array.isArray(d);)r.push(d.length),l*=d.length,d=d[0];return r.length===0?e():(i||(i=e(new Float64Array(l),r)),n(i,t),i)}},{"./doConvert.js":256,ndarray:259}],256:[function(g,b,y){var e,n=function(){return function(t,i,r,d,l){var a=t[0],u=t[1],f=t[2],o=r[0],h=r[1],p=r[2],s=[0,0,0];d|=0;var x=0,c=0,T=0,_=p,w=h-f*p,k=o-u*h;for(T=0;T<a;++T){for(c=0;c<u;++c){for(x=0;x<f;++x){var L,A=l;for(L=0;L<s.length-1;++L)A=A[s[L]];i[d]=A[s[s.length-1]],d+=_,++s[2]}d+=w,s[2]-=f,++s[1]}d+=k,s[1]-=u,++s[0]}}};b.exports=(e={funcName:"convert"},function(t){var i={};return function(r,d){var l=r.dtype,a=r.order,u=[l,a.join()].join(),f=i[u];return f||(i[u]=f=t([l,a])),f(r.shape.slice(0),r.data,r.stride,0|r.offset,d)}}(n.bind(void 0,e)))},{}],257:[function(g,b,y){var e=g("typedarray-pool");function n(d){switch(d){case"uint32":return[e.mallocUint32,e.freeUint32];default:return null}}var t={"uint32,1,0":function(d,l){return function(a,u,f,o,h,p,s,x,c,T,_){var w,k,L,A,I,P,S,E,D=a*h+o,F=d(x);for(w=a+1;w<=u;++w){for(k=w,L=D+=h,I=0,P=D,A=0;A<x;++A)F[I++]=f[P],P+=c;e:for(;k-- >a;){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+=T,I+=_}for(I=L,P=L-h,A=0;A<x;++A)f[I]=f[P],I+=c,P+=c;L-=h}for(I=L,P=0,A=0;A<x;++A)f[I]=F[P++],I+=c}l(F)}}},i={"uint32,1,0":function(d,l,a){return function u(f,o,h,p,s,x,c,T,_,w,k){var L,A,I,P,S,E,D,F,H,V,Z,K,G,W,Q,R,N,U,ee,j,X,J,re,ne,se,oe=(o-f+1)/6|0,pe=f+oe,ce=o-oe,de=f+o>>1,xe=de-oe,_e=de+oe,we=pe,Ee=xe,fe=de,ge=_e,ke=ce,be=f+1,Se=o-1,Oe=!0,De=0,je=0,Je=0,ze=T,Ue=l(ze),Ge=l(ze);Z=s*we,K=s*Ee,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=we,we=Ee,Ee=A;break e}if(Je<0)break e;se+=w}Z=s*ge,K=s*ke,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=ge,ge=ke,ke=A;break e}if(Je<0)break e;se+=w}Z=s*we,K=s*fe,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=we,we=fe,fe=A;break e}if(Je<0)break e;se+=w}Z=s*Ee,K=s*fe,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=Ee,Ee=fe,fe=A;break e}if(Je<0)break e;se+=w}Z=s*we,K=s*ge,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=we,we=ge,ge=A;break e}if(Je<0)break e;se+=w}Z=s*fe,K=s*ge,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=fe,fe=ge,ge=A;break e}if(Je<0)break e;se+=w}Z=s*Ee,K=s*ke,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=Ee,Ee=ke,ke=A;break e}if(Je<0)break e;se+=w}Z=s*Ee,K=s*fe,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=Ee,Ee=fe,fe=A;break e}if(Je<0)break e;se+=w}Z=s*ge,K=s*ke,se=p;e:for(V=0;V<T;++V){if(F=K+se,(Je=h[D=Z+se]-h[F])>0){A=ge,ge=ke,ke=A;break e}if(Je<0)break e;se+=w}for(Z=s*we,K=s*Ee,G=s*fe,W=s*ge,Q=s*ke,R=s*pe,N=s*de,U=s*ce,ne=0,se=p,V=0;V<T;++V)D=Z+se,F=K+se,H=G+se,ee=W+se,j=Q+se,X=R+se,J=N+se,re=U+se,Ue[ne]=h[F],Ge[ne]=h[ee],Oe=Oe&&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=s*xe,K=s*f,se=p,V=0;V<T;++V)F=K+se,h[D=Z+se]=h[F],se+=_;for(Z=s*_e,K=s*o,se=p,V=0;V<T;++V)F=K+se,h[D=Z+se]=h[F],se+=_;if(Oe)for(E=be;E<=Se;++E){for(D=p+E*s,ne=0,V=0;V<T&&(Je=h[D]-Ue[ne])===0;++V)ne+=k,D+=w;if(Je!==0)if(Je<0){if(E!==be)for(Z=s*E,K=s*be,se=p,V=0;V<T;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;++be}else for(;;){for(D=p+Se*s,ne=0,V=0;V<T&&(Je=h[D]-Ue[ne])===0;++V)ne+=k,D+=w;if(!(Je>0)){if(Je<0){for(Z=s*E,K=s*be,G=s*Se,se=p,V=0;V<T;++V)F=K+se,H=G+se,L=h[D=Z+se],h[D]=h[F],h[F]=h[H],h[H]=L,se+=_;++be,--Se;break}for(Z=s*E,K=s*Se,se=p,V=0;V<T;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;--Se;break}Se--}}else for(E=be;E<=Se;++E){for(D=p+E*s,ne=0,V=0;V<T&&(De=h[D]-Ue[ne])===0;++V)ne+=k,D+=w;if(De<0){if(E!==be)for(Z=s*E,K=s*be,se=p,V=0;V<T;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;++be}else{for(D=p+E*s,ne=0,V=0;V<T&&(je=h[D]-Ge[ne])===0;++V)ne+=k,D+=w;if(je>0)for(;;){for(D=p+Se*s,ne=0,V=0;V<T&&(Je=h[D]-Ge[ne])===0;++V)ne+=k,D+=w;if(!(Je>0)){for(D=p+Se*s,ne=0,V=0;V<T&&(Je=h[D]-Ue[ne])===0;++V)ne+=k,D+=w;if(Je<0){for(Z=s*E,K=s*be,G=s*Se,se=p,V=0;V<T;++V)F=K+se,H=G+se,L=h[D=Z+se],h[D]=h[F],h[F]=h[H],h[H]=L,se+=_;++be,--Se}else{for(Z=s*E,K=s*Se,se=p,V=0;V<T;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;--Se}break}if(--Se<E)break}}}for(Z=s*f,K=s*(be-1),ne=0,se=p,V=0;V<T;++V)F=K+se,h[D=Z+se]=h[F],h[F]=Ue[ne],++ne,se+=_;for(Z=s*o,K=s*(Se+1),ne=0,se=p,V=0;V<T;++V)F=K+se,h[D=Z+se]=h[F],h[F]=Ge[ne],++ne,se+=_;if(be-2-f<=32?d(f,be-2,h,p,s,x,c,T,_,w,k):u(f,be-2,h,p,s,x,c,T,_,w,k),o-(Se+2)<=32?d(Se+2,o,h,p,s,x,c,T,_,w,k):u(Se+2,o,h,p,s,x,c,T,_,w,k),Oe)return a(Ue),void a(Ge);if(be<pe&&Se>ce){e:for(;;){for(D=p+be*s,ne=0,se=p,V=0;V<T;++V){if(h[D]!==Ue[ne])break e;++ne,D+=_}++be}e:for(;;){for(D=p+Se*s,ne=0,se=p,V=0;V<T;++V){if(h[D]!==Ge[ne])break e;++ne,D+=_}--Se}for(E=be;E<=Se;++E){for(D=p+E*s,ne=0,V=0;V<T&&(De=h[D]-Ue[ne])===0;++V)ne+=k,D+=w;if(De===0){if(E!==be)for(Z=s*E,K=s*be,se=p,V=0;V<T;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;++be}else{for(D=p+E*s,ne=0,V=0;V<T&&(je=h[D]-Ge[ne])===0;++V)ne+=k,D+=w;if(je===0)for(;;){for(D=p+Se*s,ne=0,V=0;V<T&&(Je=h[D]-Ge[ne])===0;++V)ne+=k,D+=w;if(Je!==0){for(D=p+Se*s,ne=0,V=0;V<T&&(Je=h[D]-Ue[ne])===0;++V)ne+=k,D+=w;if(Je<0){for(Z=s*E,K=s*be,G=s*Se,se=p,V=0;V<T;++V)F=K+se,H=G+se,L=h[D=Z+se],h[D]=h[F],h[F]=h[H],h[H]=L,se+=_;++be,--Se}else{for(Z=s*E,K=s*Se,se=p,V=0;V<T;++V)F=K+se,L=h[D=Z+se],h[D]=h[F],h[F]=L,se+=_;--Se}break}if(--Se<E)break}}}}a(Ue),a(Ge),Se-be<=32?d(be,Se,h,p,s,x,c,T,_,w,k):u(be,Se,h,p,s,x,c,T,_,w,k)}}},r={"uint32,1,0":function(d,l){return function(a){var u=a.data,f=0|a.offset,o=a.shape,h=a.stride,p=0|h[0],s=0|o[0],x=0|h[1],c=0|o[1],T=x,_=x;s<=32?d(0,s-1,u,f,p,x,s,c,T,_,1):l(0,s-1,u,f,p,x,s,c,T,_,1)}}};b.exports=function(d,l){var a=[l,d].join(","),u=r[a],f=function(h,p){var s=n(p),x=[p,h].join(","),c=t[x];return s?c(s[0],s[1]):c()}(d,l),o=function(h,p,s){var x=n(p),c=[p,h].join(","),T=i[c];return h.length>1&&x?T(s,x[0],x[1]):T(s)}(d,l,f);return u(f,o)}},{"typedarray-pool":308}],258:[function(g,b,y){var e=g("./lib/compile_sort.js"),n={};b.exports=function(t){var i=t.order,r=t.dtype,d=[i,r].join(":"),l=n[d];return l||(n[d]=l=e(i,r)),l(t),t}},{"./lib/compile_sort.js":257}],259:[function(g,b,y){var e=g("is-buffer"),n=typeof Float64Array<"u";function t(a,u){return a[0]-u[0]}function i(){var a,u=this.stride,f=new Array(u.length);for(a=0;a<f.length;++a)f[a]=[Math.abs(u[a]),a];f.sort(t);var o=new Array(f.length);for(a=0;a<o.length;++a)o[a]=f[a][1];return o}var r={T:function(a){function u(o){this.data=o}var f=u.prototype;return f.dtype=a,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(o){return new u(o)}},0:function(a,u){function f(h,p){this.data=h,this.offset=p}var o=f.prototype;return o.dtype=a,o.index=function(){return this.offset}
3525,o.dimension=0,o.size=1,o.shape=o.stride=o.order=[],o.lo=o.hi=o.transpose=o.step=function(){return new f(this.data,this.offset)},o.pick=function(){return u(this.data)},o.valueOf=o.get=function(){return a==="generic"?this.data.get(this.offset):this.data[this.offset]},o.set=function(h){return a==="generic"?this.data.set(this.offset,h):this.data[this.offset]=h},function(h,p,s,x){return new f(h,x)}},1:function(a,u,f){function o(p,s,x,c){this.data=p,this.shape=[s],this.stride=[x],this.offset=0|c}var h=o.prototype;return h.dtype=a,h.dimension=1,Object.defineProperty(h,"size",{get:function(){return this.shape[0]}}),h.order=[0],h.set=function(p,s){return a==="generic"?this.data.set(this.offset+this.stride[0]*p,s):this.data[this.offset+this.stride[0]*p]=s},h.get=function(p){return a==="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},h.hi=function(p){return new o(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,this.stride[0],this.offset)},h.lo=function(p){var s=this.offset,x=0,c=this.shape[0],T=this.stride[0];return typeof p=="number"&&p>=0&&(s+=T*(x=0|p),c-=x),new o(this.data,c,T,s)},h.step=function(p){var s=this.shape[0],x=this.stride[0],c=this.offset,T=0,_=Math.ceil;return typeof p=="number"&&((T=0|p)<0?(c+=x*(s-1),s=_(-s/T)):s=_(s/T),x*=T),new o(this.data,s,x,c)},h.transpose=function(p){p=p===void 0?0:0|p;var s=this.shape,x=this.stride;return new o(this.data,s[p],x[p],this.offset)},h.pick=function(p){var s=[],x=[],c=this.offset;return typeof p=="number"&&p>=0?c=c+this.stride[0]*p|0:(s.push(this.shape[0]),x.push(this.stride[0])),(0,u[s.length+1])(this.data,s,x,c)},function(p,s,x,c){return new o(p,s[0],x[0],c)}},2:function(a,u,f){function o(p,s,x,c,T,_){this.data=p,this.shape=[s,x],this.stride=[c,T],this.offset=0|_}var h=o.prototype;return h.dtype=a,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,s,x){return a==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*s,x):this.data[this.offset+this.stride[0]*p+this.stride[1]*s]=x},h.get=function(p,s){return a==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*s):this.data[this.offset+this.stride[0]*p+this.stride[1]*s]},h.index=function(p,s){return this.offset+this.stride[0]*p+this.stride[1]*s},h.hi=function(p,s){return new o(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,typeof s!="number"||s<0?this.shape[1]:0|s,this.stride[0],this.stride[1],this.offset)},h.lo=function(p,s){var x=this.offset,c=0,T=this.shape[0],_=this.shape[1],w=this.stride[0],k=this.stride[1];return typeof p=="number"&&p>=0&&(x+=w*(c=0|p),T-=c),typeof s=="number"&&s>=0&&(x+=k*(c=0|s),_-=c),new o(this.data,T,_,w,k,x)},h.step=function(p,s){var x=this.shape[0],c=this.shape[1],T=this.stride[0],_=this.stride[1],w=this.offset,k=0,L=Math.ceil;return typeof p=="number"&&((k=0|p)<0?(w+=T*(x-1),x=L(-x/k)):x=L(x/k),T*=k),typeof s=="number"&&((k=0|s)<0?(w+=_*(c-1),c=L(-c/k)):c=L(c/k),_*=k),new o(this.data,x,c,T,_,w)},h.transpose=function(p,s){p=p===void 0?0:0|p,s=s===void 0?1:0|s;var x=this.shape,c=this.stride;return new o(this.data,x[p],x[s],c[p],c[s],this.offset)},h.pick=function(p,s){var x=[],c=[],T=this.offset;return typeof p=="number"&&p>=0?T=T+this.stride[0]*p|0:(x.push(this.shape[0]),c.push(this.stride[0])),typeof s=="number"&&s>=0?T=T+this.stride[1]*s|0:(x.push(this.shape[1]),c.push(this.stride[1])),(0,u[x.length+1])(this.data,x,c,T)},function(p,s,x,c){return new o(p,s[0],s[1],x[0],x[1],c)}},3:function(a,u,f){function o(p,s,x,c,T,_,w,k){this.data=p,this.shape=[s,x,c],this.stride=[T,_,w],this.offset=0|k}var h=o.prototype;return h.dtype=a,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]),s=Math.abs(this.stride[1]),x=Math.abs(this.stride[2]);return p>s?s>x?[2,1,0]:p>x?[1,2,0]:[1,0,2]:p>x?[2,0,1]:x>s?[0,1,2]:[0,2,1]}}),h.set=function(p,s,x,c){return a==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x,c):this.data[this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x]=c},h.get=function(p,s,x){return a==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x):this.data[this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x]},h.index=function(p,s,x){return this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x}
3525,h.hi=function(p,s,x){return new o(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,typeof s!="number"||s<0?this.shape[1]:0|s,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,s,x){var c=this.offset,T=0,_=this.shape[0],w=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&&(c+=L*(T=0|p),_-=T),typeof s=="number"&&s>=0&&(c+=A*(T=0|s),w-=T),typeof x=="number"&&x>=0&&(c+=I*(T=0|x),k-=T),new o(this.data,_,w,k,L,A,I,c)},h.step=function(p,s,x){var c=this.shape[0],T=this.shape[1],_=this.shape[2],w=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+=w*(c-1),c=P(-c/I)):c=P(c/I),w*=I),typeof s=="number"&&((I=0|s)<0?(A+=k*(T-1),T=P(-T/I)):T=P(T/I),k*=I),typeof x=="number"&&((I=0|x)<0?(A+=L*(_-1),_=P(-_/I)):_=P(_/I),L*=I),new o(this.data,c,T,_,w,k,L,A)},h.transpose=function(p,s,x){p=p===void 0?0:0|p,s=s===void 0?1:0|s,x=x===void 0?2:0|x;var c=this.shape,T=this.stride;return new o(this.data,c[p],c[s],c[x],T[p],T[s],T[x],this.offset)},h.pick=function(p,s,x){var c=[],T=[],_=this.offset;return typeof p=="number"&&p>=0?_=_+this.stride[0]*p|0:(c.push(this.shape[0]),T.push(this.stride[0])),typeof s=="number"&&s>=0?_=_+this.stride[1]*s|0:(c.push(this.shape[1]),T.push(this.stride[1])),typeof x=="number"&&x>=0?_=_+this.stride[2]*x|0:(c.push(this.shape[2]),T.push(this.stride[2])),(0,u[c.length+1])(this.data,c,T,_)},function(p,s,x,c){return new o(p,s[0],s[1],s[2],x[0],x[1],x[2],c)}},4:function(a,u,f){function o(p,s,x,c,T,_,w,k,L,A){this.data=p,this.shape=[s,x,c,T],this.stride=[_,w,k,L],this.offset=0|A}var h=o.prototype;return h.dtype=a,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,s,x,c,T){return a==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c,T):this.data[this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c]=T},h.get=function(p,s,x,c){return a==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c):this.data[this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c]},h.index=function(p,s,x,c){return this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c},h.hi=function(p,s,x,c){return new o(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,typeof s!="number"||s<0?this.shape[1]:0|s,typeof x!="number"||x<0?this.shape[2]:0|x,typeof c!="number"||c<0?this.shape[3]:0|c,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},h.lo=function(p,s,x,c){var T=this.offset,_=0,w=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&&(T+=I*(_=0|p),w-=_),typeof s=="number"&&s>=0&&(T+=P*(_=0|s),k-=_),typeof x=="number"&&x>=0&&(T+=S*(_=0|x),L-=_),typeof c=="number"&&c>=0&&(T+=E*(_=0|c),A-=_),new o(this.data,w,k,L,A,I,P,S,E,T)},h.step=function(p,s,x,c){var T=this.shape[0],_=this.shape[1],w=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*(T-1),T=D(-T/E)):T=D(T/E),L*=E),typeof s=="number"&&((E=0|s)<0?(S+=A*(_-1),_=D(-_/E)):_=D(_/E),A*=E),typeof x=="number"&&((E=0|x)<0?(S+=I*(w-1),w=D(-w/E)):w=D(w/E),I*=E),typeof c=="number"&&((E=0|c)<0?(S+=P*(k-1),k=D(-k/E)):k=D(k/E),P*=E),new o(this.data,T,_,w,k,L,A,I,P,S)},h.transpose=function(p,s,x,c){p=p===void 0?0:0|p,s=s===void 0?1:0|s,x=x===void 0?2:0|x,c=c===void 0?3:0|c;var T=this.shape,_=this.stride;return new o(this.data,T[p],T[s],T[x],T[c],_[p],_[s],_[x],_[c],this.offset)},h.pick=function(p,s,x,c){var T=[],_=[],w=this.offset;return typeof p=="number"&&p>=0?w=w+this.stride[0]*p|0:(T.push(this.shape[0]),_.push(this.stride[0])),typeof s=="number"&&s>=0?w=w+this.stride[1]*s|0:(T.push(this.shape[1]),_.push(this.stride[1])),typeof x=="number"&&x>=0?w=w+this.stride[2]*x|0:(T.push(this.shape[2]),_.push(this.stride[2])),typeof c=="number"&&c>=0?w=w+this.stride[3]*c|0:(T.push(this.shape[3]),_.push(this.stride[3])),(0,u[T.length+1])(this.data,T,_,w)},function(p,s,x,c){return new o(p,s[0],s[1],s[2],s[3],x[0],x[1],x[2],x[3],c)}},5:function(a,u,f){function o(p,s,x,c,T,_,w,k,L,A,I,P){this.data=p,this.shape=[s,x,c,T,_],this.stride=[w,k,L,A,I],this.offset=0|P}var h=o.prototype;return h.dtype=a,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,s,x,c,T,_){return a==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c+this.stride[4]*T,_):this.data[this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c+this.stride[4]*T]=_},h.get=function(p,s,x,c,T){return a==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c+this.stride[4]*T):this.data[this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c+this.stride[4]*T]},h.index=function(p,s,x,c,T){return this.offset+this.stride[0]*p+this.stride[1]*s+this.stride[2]*x+this.stride[3]*c+this.stride[4]*T}
3525,h.hi=function(p,s,x,c,T){return new o(this.data,typeof p!="number"||p<0?this.shape[0]:0|p,typeof s!="number"||s<0?this.shape[1]:0|s,typeof x!="number"||x<0?this.shape[2]:0|x,typeof c!="number"||c<0?this.shape[3]:0|c,typeof T!="number"||T<0?this.shape[4]:0|T,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},h.lo=function(p,s,x,c,T){var _=this.offset,w=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*(w=0|p),k-=w),typeof s=="number"&&s>=0&&(_+=E*(w=0|s),L-=w),typeof x=="number"&&x>=0&&(_+=D*(w=0|x),A-=w),typeof c=="number"&&c>=0&&(_+=F*(w=0|c),I-=w),typeof T=="number"&&T>=0&&(_+=H*(w=0|T),P-=w),new o(this.data,k,L,A,I,P,S,E,D,F,H,_)},h.step=function(p,s,x,c,T){var _=this.shape[0],w=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 s=="number"&&((H=0|s)<0?(F+=P*(w-1),w=V(-w/H)):w=V(w/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 c=="number"&&((H=0|c)<0?(F+=E*(L-1),L=V(-L/H)):L=V(L/H),E*=H),typeof T=="number"&&((H=0|T)<0?(F+=D*(A-1),A=V(-A/H)):A=V(A/H),D*=H),new o(this.data,_,w,k,L,A,I,P,S,E,D,F)},h.transpose=function(p,s,x,c,T){p=p===void 0?0:0|p,s=s===void 0?1:0|s,x=x===void 0?2:0|x,c=c===void 0?3:0|c,T=T===void 0?4:0|T;var _=this.shape,w=this.stride;return new o(this.data,_[p],_[s],_[x],_[c],_[T],w[p],w[s],w[x],w[c],w[T],this.offset)},h.pick=function(p,s,x,c,T){var _=[],w=[],k=this.offset;return typeof p=="number"&&p>=0?k=k+this.stride[0]*p|0:(_.push(this.shape[0]),w.push(this.stride[0])),typeof s=="number"&&s>=0?k=k+this.stride[1]*s|0:(_.push(this.shape[1]),w.push(this.stride[1])),typeof x=="number"&&x>=0?k=k+this.stride[2]*x|0:(_.push(this.shape[2]),w.push(this.stride[2])),typeof c=="number"&&c>=0?k=k+this.stride[3]*c|0:(_.push(this.shape[3]),w.push(this.stride[3])),typeof T=="number"&&T>=0?k=k+this.stride[4]*T|0:(_.push(this.shape[4]),w.push(this.stride[4])),(0,u[_.length+1])(this.data,_,w,k)},function(p,s,x,c){return new o(p,s[0],s[1],s[2],s[3],s[4],x[0],x[1],x[2],x[3],x[4],c)}}};function d(a,u){var f=u===-1?"T":String(u),o=r[f];return u===-1?o(a):u===0?o(a,l[a][0]):o(a,l[a],i)}var l={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};b.exports=function(a,u,f,o){if(a===void 0)return(0,l.array[0])([]);typeof a=="number"&&(a=[a]),u===void 0&&(u=[a.length]);var h=u.length;if(f===void 0){f=new Array(h);for(var p=h-1,s=1;p>=0;--p)f[p]=s,s*=u[p]}if(o===void 0)for(o=0,p=0;p<h;++p)f[p]<0&&(o-=(u[p]-1)*f[p]);for(var x=function(T){if(e(T))return"buffer";if(n)switch(Object.prototype.toString.call(T)){case"[object Float64Array]":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(T)?"array":"generic"}(a),c=l[x];c.length<=h+1;)c.push(d(x,c.length-1));return(0,c[h+1])(a,u,f,o)}},{"is-buffer":237}],260:[function(g,b,y){var e=g("double-bits"),n=Math.pow(2,-1074);b.exports=function(t,i){if(isNaN(t)||isNaN(i))return NaN;if(t===i)return t;if(t===0)return i<0?-n:n;var r=e.hi(t),d=e.lo(t);return i>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(g,b,y){y.vertexNormals=function(e,n,t){for(var i=n.length,r=new Array(i),d=t===void 0?1e-6:t,l=0;l<i;++l)r[l]=[0,0,0];for(l=0;l<e.length;++l)for(var a=e[l],u=0,f=a[a.length-1],o=a[0],h=0;h<a.length;++h){u=f,f=o,o=a[(h+1)%a.length];for(var p=n[u],s=n[f],x=n[o],c=new Array(3),T=0,_=new Array(3),w=0,k=0;k<3;++k)c[k]=p[k]-s[k],T+=c[k]*c[k],_[k]=x[k]-s[k],w+=_[k]*_[k];if(T*w>
3525d){var L=r[f],A=1/Math.sqrt(T*w);for(k=0;k<3;++k){var I=(k+1)%3,P=(k+2)%3;L[k]+=A*(_[I]*c[P]-_[P]*c[I])}}}for(l=0;l<i;++l){L=r[l];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},y.faceNormals=function(e,n,t){for(var i=e.length,r=new Array(i),d=t===void 0?1e-6:t,l=0;l<i;++l){for(var a=e[l],u=new Array(3),f=0;f<3;++f)u[f]=n[a[f]];var o=new Array(3),h=new Array(3);for(f=0;f<3;++f)o[f]=u[1][f]-u[0][f],h[f]=u[2][f]-u[0][f];var p=new Array(3),s=0;for(f=0;f<3;++f){var x=(f+1)%3,c=(f+2)%3;p[f]=o[x]*h[c]-o[c]*h[x],s+=p[f]*p[f]}for(s=s>d?1/Math.sqrt(s):0,f=0;f<3;++f)p[f]*=s;r[l]=p}return r}},{}],262:[function(g,b,y){b.exports=function(e,n,t,i,r,d,l,a,u,f){var o=n+d+f;if(h>0){var h=Math.sqrt(o+1);e[0]=.5*(l-u)/h,e[1]=.5*(a-i)/h,e[2]=.5*(t-d)/h,e[3]=.5*h}else{var p=Math.max(n,d,f);h=Math.sqrt(2*p-o+1),n>=p?(e[0]=.5*h,e[1]=.5*(r+t)/h,e[2]=.5*(a+i)/h,e[3]=.5*(l-u)/h):d>=p?(e[0]=.5*(t+r)/h,e[1]=.5*h,e[2]=.5*(u+l)/h,e[3]=.5*(a-i)/h):(e[0]=.5*(i+a)/h,e[1]=.5*(l+u)/h,e[2]=.5*h,e[3]=.5*(t-r)/h)}return e}},{}],263:[function(g,b,y){b.exports=function(o){var h=(o=o||{}).center||[0,0,0],p=o.rotation||[0,0,0,1],s=o.radius||1;h=[].slice.call(h,0,3),a(p=[].slice.call(p,0,4),p);var x=new u(p,h,Math.log(s));return x.setDistanceLimits(o.zoomMin,o.zoomMax),("eye"in o||"up"in o)&&x.lookAt(0,o.eye,o.center,o.up),x};var e=g("filtered-vector"),n=g("gl-mat4/lookAt"),t=g("gl-mat4/fromQuat"),i=g("gl-mat4/invert"),r=g("./lib/quatFromFrame");function d(o,h,p){return Math.sqrt(Math.pow(o,2)+Math.pow(h,2)+Math.pow(p,2))}function l(o,h,p,s){return Math.sqrt(Math.pow(o,2)+Math.pow(h,2)+Math.pow(p,2)+Math.pow(s,2))}function a(o,h){var p=h[0],s=h[1],x=h[2],c=h[3],T=l(p,s,x,c);T>1e-6?(o[0]=p/T,o[1]=s/T,o[2]=x/T,o[3]=c/T):(o[0]=o[1]=o[2]=0,o[3]=1)}function u(o,h,p){this.radius=e([p]),this.center=e(h),this.rotation=e(o),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(o){this.radius.curve(o),this.center.curve(o),this.rotation.curve(o);var h=this.computedRotation;a(h,h);var p=this.computedMatrix;t(p,h);var s=this.computedCenter,x=this.computedEye,c=this.computedUp,T=Math.exp(this.computedRadius[0]);x[0]=s[0]+T*p[2],x[1]=s[1]+T*p[6],x[2]=s[2]+T*p[10],c[0]=p[1],c[1]=p[5],c[2]=p[9];for(var _=0;_<3;++_){for(var w=0,k=0;k<3;++k)w+=p[_+4*k]*x[k];p[12+_]=-w}},f.getMatrix=function(o,h){this.recalcMatrix(o);var p=this.computedMatrix;if(h){for(var s=0;s<16;++s)h[s]=p[s];return h}return p},f.idle=function(o){this.center.idle(o),this.radius.idle(o),this.rotation.idle(o)},f.flush=function(o){this.center.flush(o),this.radius.flush(o),this.rotation.flush(o)},f.pan=function(o,h,p,s){h=h||0,p=p||0,s=s||0,this.recalcMatrix(o);var x=this.computedMatrix,c=x[1],T=x[5],_=x[9],w=d(c,T,_);c/=w,T/=w,_/=w;var k=x[0],L=x[4],A=x[8],I=k*c+L*T+A*_,P=d(k-=c*I,L-=T*I,A-=_*I);k/=P,L/=P,A/=P,x[2],x[6],x[10];var S=k*h+c*p,E=L*h+T*p,D=A*h+_*p;this.center.move(o,S,E,D);var F=Math.exp(this.computedRadius[0]);F=Math.max(1e-4,F+s),this.radius.set(o,Math.log(F))},f.rotate=function(o,h,p,s){this.recalcMatrix(o),h=h||0,p=p||0;var x=this.computedMatrix,c=x[0],T=x[4],_=x[8],w=x[1],k=x[5],L=x[9],A=x[2],I=x[6],P=x[10],S=h*c+p*w,E=h*T+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=l(F,H,V,Z);K>1e-6?(F/=K,H/=K,V/=K,Z/=K):(F=H=V=0,Z=1);var G=this.computedRotation,W=G[0],Q=G[1],R=G[2],N=G[3],U=W*Z+N*F+Q*V-R*H,ee=Q*Z+N*H+R*F-W*V,j=R*Z+N*V+W*H-Q*F,X=N*Z-W*F-Q*H-R*V;if(s){F=A,H=I,V=P;var J=Math.sin(s)/d(F,H,V);F*=J,H*=J,V*=J,X=X*(Z=Math.cos(h))-(U=U*Z+X*F+ee*V-j*H)*F-(ee=ee*Z+X*H+j*F-U*V)*H-(j=j*Z+X*V+U*H-ee*F)*V}var re=l(U,ee,j,X);re>1e-6?(U/=re,ee/=re,j/=re,X/=re):(U=ee=j=0,X=1),this.rotation.set(o,U,ee,j,X)},f.lookAt=function(o,h,p,s){this.recalcMatrix(o),p=p||this.computedCenter,h=h||this.computedEye,s=s||this.computedUp;var x=this.computedMatrix;n(x,h,p,s);var c=this.computedRotation;r(c,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),a(c,c),this.rotation.set(o,c[0],c[
35251],c[2],c[3]);for(var T=0,_=0;_<3;++_)T+=Math.pow(p[_]-h[_],2);this.radius.set(o,.5*Math.log(Math.max(T,1e-6))),this.center.set(o,p[0],p[1],p[2])},f.translate=function(o,h,p,s){this.center.move(o,h||0,p||0,s||0)},f.setMatrix=function(o,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]),a(p,p),this.rotation.set(o,p[0],p[1],p[2],p[3]);var s=this.computedMatrix;i(s,h);var x=s[15];if(Math.abs(x)>1e-6){var c=s[12]/x,T=s[13]/x,_=s[14]/x;this.recalcMatrix(o);var w=Math.exp(this.computedRadius[0]);this.center.set(o,c-s[2]*w,T-s[6]*w,_-s[10]*w),this.radius.idle(o)}else this.center.idle(o),this.radius.idle(o)},f.setDistance=function(o,h){h>0&&this.radius.set(o,Math.log(h))},f.setDistanceLimits=function(o,h){o=o>0?Math.log(o):-1/0,h=h>0?Math.log(h):1/0,h=Math.max(h,o),this.radius.bounds[0][0]=o,this.radius.bounds[1][0]=h},f.getDistanceLimits=function(o){var h=this.radius.bounds;return o?(o[0]=Math.exp(h[0][0]),o[1]=Math.exp(h[1][0]),o):[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(o){var h=this.lastT(),p=o.center;p&&this.center.set(h,p[0],p[1],p[2]);var s=o.rotation;s&&this.rotation.set(h,s[0],s[1],s[2],s[3]);var x=o.distance;x&&x>0&&this.radius.set(h,Math.log(x)),this.setDistanceLimits(o.zoomMin,o.zoomMax)}},{"./lib/quatFromFrame":262,"filtered-vector":68,"gl-mat4/fromQuat":95,"gl-mat4/invert":98,"gl-mat4/lookAt":99}],264:[function(g,b,y){var e=g("repeat-string");b.exports=function(n,t,i){return e(i=i!==void 0?i+"":" ",t)+n}},{"repeat-string":277}
3525],265:[function(g,b,y){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(g,b,y){b.exports=function(n,t){for(var i=0|t.length,r=n.length,d=[new Array(i),new Array(i)],l=0;l<i;++l)d[0][l]=[],d[1][l]=[];for(l=0;l<r;++l){var a=n[l];d[0][a[0]].push(a),d[1][a[1]].push(a)}var u=[];for(l=0;l<i;++l)d[0][l].length+d[1][l].length===0&&u.push([l]);function f(T,_){var w=d[_][T[_]];w.splice(w.indexOf(T),1)}function o(T,_,w){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[T],t[_],t[L],t[F])>0&&(k=D,L=F,A=P)}return w||k&&f(k,A),L}function h(T,_){var w=d[_][T][0],k=[T];f(w,_);for(var L=w[1^_];;){for(;L!==T;)k.push(L),L=o(k[k.length-2],L,!1);if(d[0][T].length+d[1][T].length===0)break;var A=k[k.length-1],I=T,P=k[1],S=o(A,I,!0);if(e(t[A],t[I],t[P],t[S])<0)break;k.push(T),L=o(A,I)}return k}function p(T,_){return _[1]===_[_.length-1]}for(l=0;l<i;++l)for(var s=0;s<2;++s){for(var x=[];d[s][l].length>0;){d[0][l].length;var c=h(l,s);p(0,c)?x.push.apply(x,c):(x.length>0&&u.push(x),x=c)}x.length>0&&u.push(x)}return u};var e=g("compare-angle")},{"compare-angle":54}],267:[function(g,b,y){b.exports=function(n,t){for(var i=e(n,t.length),r=new Array(t.length),d=new Array(t.length),l=[],a=0;a<t.length;++a){var u=i[a].length;d[a]=u,r[a]=!0,u<=1&&l.push(a)}for(;l.length>0;){var f=l.pop();r[f]=!1;var o=i[f];for(a=0;a<o.length;++a){var h=o[a];--d[h]==0&&l.push(h)}}var p=new Array(t.length),s=[];for(a=0;a<t.length;++a)r[a]?(f=s.length,p[a]=f,s.push(t[a])):p[a]=-1;var x=[];for(a=0;a<n.length;++a){var c=n[a];r[c[0]]&&r[c[1]]&&x.push([p[c[0]],p[c[1]]])}return[x,s]};var e=g("edges-to-adjacency-list")},{"edges-to-adjacency-list":66}],268:[function(g,b,y){b.exports=function(u,f){var o=l(u,f);u=o[0];for(var h=(f=o[1]).length,p=(u.length,e(u,f.length)),s=0;s<h;++s)if(p[s].length%2==1)throw new Error("planar-graph-to-polyline: graph must be manifold");var x=n(u,f),c=(x=x.filter(function(oe){for(var pe=oe.length,ce=[0],de=0;de<pe;++de){var xe=f[oe[de]],_e=f[oe[(de+1)%pe]],we=i(-xe[0],xe[1]),Ee=i(-xe[0],_e[1]),fe=i(_e[0],xe[1]),ge=i(_e[0],_e[1]);ce=r(ce,r(r(we,Ee),r(fe,ge)))}return ce[ce.length-1]>0})).length,T=new Array(c),_=new Array(c);for(s=0;s<c;++s){T[s]=s;var w=new Array(c),k=x[s].map(function(oe){return f[oe]}),L=t([k]),A=0;e:for(var I=0;I<c;++I)if(w[I]=0,s!==I){for(var P=(ne=x[I]).length,S=0;S<P;++S){var E=L(f[ne[S]]);if(E!==0){E<0&&(w[I]=1,A+=1);continue e}}w[I]=1,A+=1}_[s]=[A,s,w]}for(_.sort(function(oe,pe){return pe[0]-oe[0]}),s=0;s<c;++s){var D=(w=_[s])[1],F=w[2];for(I=0;I<c;++I)F[I]&&(T[I]=D)}var H=function(oe){for(var pe=new Array(oe),ce=0;ce<oe;++ce)pe[ce]=[];return pe}(c);for(s=0;s<c;++s)H[s].push(T[s]),H[T[s]].push(s);var V={},Z=a(h,!1);for(s=0;s<c;++s)for(P=(ne=x[s]).length,I=0;I<P;++I){var K=ne[I],G=ne[(I+1)%P],W=Math.min(K,G)+":"+Math.max(K,G);if(W in V){var Q=V[W];
3525H[Q].push(s),H[s].push(Q),Z[K]=Z[G]=!0}else V[W]=s}function R(oe){for(var pe=oe.length,ce=0;ce<pe;++ce)if(!Z[oe[ce]])return!1;return!0}var N=[],U=a(c,-1);for(s=0;s<c;++s)T[s]!==s||R(x[s])?U[s]=-1:(N.push(s),U[s]=0);for(o=[];N.length>0;){var ee=N.pop(),j=H[ee];d(j,function(oe,pe){return oe-pe});var X,J=j.length,re=U[ee];if(re===0){var ne=x[ee];X=[ne]}for(s=0;s<J;++s){var se=j[s];U[se]>=0||(U[se]=1^re,N.push(se),re===0&&(R(ne=x[se])||(ne.reverse(),X.push(ne))))}re===0&&o.push(X)}return o};var e=g("edges-to-adjacency-list"),n=g("planar-dual"),t=g("point-in-big-polygon"),i=g("two-product"),r=g("robust-sum"),d=g("uniq"),l=g("./lib/trim-leaves");function a(u,f){for(var o=new Array(u),h=0;h<u;++h)o[h]=f;return o}},{"./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(g,b,y){b.exports=function(a){for(var u=a.length,f=[],o=[],h=0;h<u;++h)for(var p=a[h],s=p.length,x=s-1,c=0;c<s;x=c++){var T=p[x],_=p[c];T[0]===_[0]?o.push([T,_]):f.push([T,_])}if(f.length===0)return o.length===0?l:(w=d(o),function(A){return w(A[0],A[1])?0:1});var w,k=n(f),L=function(A,I){return function(P){var S=i.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 o.length===0?L:function(A,I){return function(P){return A(P[0],P[1])?0:I(P)}}(d(o),L)};var e=g("robust-orientation")[3],n=g("slab-decomposition"),t=g("interval-tree-1d"),i=g("binary-search-bounds");function r(){return!0}function d(a){for(var u={},f=0;f<a.length;++f){var o=a[f],h=o[0][0],p=o[0][1],s=o[1][1],x=[Math.min(p,s),Math.max(p,s)];h in u?u[h].push(x):u[h]=[x]}var c={},T=Object.keys(u);for(f=0;f<T.length;++f){var _=u[T[f]];c[T[f]]=t(_)}return function(w){return function(k,L){var A=w[k];return!!A&&!!A.queryPoint(L,r)}}(c)}function l(a){return 1}},{"binary-search-bounds":31,"interval-tree-1d":234,"robust-orientation":284,"slab-decomposition":299}],270:[function(g,b,y){var e=new Float64Array(4),n=new Float64Array(4),t=new Float64Array(4);b.exports=function(i,r,d,l,a){e.length<l.length&&(e=new Float64Array(l.length),n=new Float64Array(l.length),t=new Float64Array(l.length));for(var u=0;u<l.length;++u)e[u]=i[u]-l[u],n[u]=r[u]-i[u],t[u]=d[u]-i[u];var f=0,o=0,h=0,p=0,s=0,x=0;for(u=0;u<l.length;++u){var c=n[u],T=t[u],_=e[u];f+=c*c,o+=c*T,h+=T*T,p+=_*c,s+=_*T,x+=_*_}var w,k,L,A,I,P=Math.abs(f*h-o*o),S=o*s-h*p,E=o*p-f*s;if(S+E<=P)if(S<0)E<0&&p<0?(E=0,-p>=f?(S=1,w=f+2*p+x):w=p*(S=-p/f)+x):(S=0,s>=0?(E=0,w=x):-s>=h?(E=1,w=h+2*s+x):w=s*(E=-s/h)+x);else if(E<0)E=0,p>=0?(S=0,w=x):-p>=f?(S=1,w=f+2*p+x):w=p*(S=-p/f)+x;else{var D=1/P;w=(S*=D)*(f*S+o*(E*=D)+2*p)+E*(o*S+h*E+2*s)+x}else S<0?(L=h+s)>(k=o+p)?(A=L-k)>=(I=f-2*o+h)?(S=1,E=0,w=f+2*p+x):w=(S=A/I)*(f*S+o*(E=1-S)+2*p)+E*(o*S+h*E+2*s)+x:(S=0,L<=0?(E=1,w=h+2*s+x):s>=0?(E=0,w=x):w=s*(E=-s/h)+x):E<0?(L=f+p)>(k=o+s)?(A=L-k)>=(I=f-2*o+h)?(E=1,S=0,w=h+2*s+x):w=(S=1-(E=A/I))*(f*S+o*E+2*p)+E*(o*S+h*E+2*s)+x:(E=0,L<=0?(S=1,w=f+2*p+x):p>=0?(S=0,w=x):w=p*(S=-p/f)+x):(A=h+s-o-p)<=0?(S=0,E=1,w=h+2*s+x):A>=(I=f-2*o+h)?(S=1,E=0,w=f+2*p+x):w=(S=A/I)*(f*S+o*(E=1-S)+2*p)+E*(o*S+h*E+2*s)+x;var F=1-S-E;for(u=0;u<l.length;++u)a[u]=F*i[u]+S*r[u]+E*d[u];return w<0?0:w}},{}],271:[function(g,b,y){b.exports=g("gl-quat/slerp")},{"gl-quat/slerp":124}],272:[function(g,b,y){var e=g("big-rat/add");b.exports=function(n,t){for(var i=n.length,r=new Array(i),d=0;d<i;++d)r[d]=e(n[d],t[d]);return r}},{"big-rat/add":15}],273:[function(g,b,y){b.exports=function(n){for(var t=new Array(n.length),i=0;i<n.length;++i)t[i]=e(n[i]);return t};var e=g("big-rat")},{"big-rat":18}],274:[function(g,b,y){var e=g("big-rat"),n=g("big-rat/mul");b.exports=function(t,i){for(var r=e(i),d=t.length,l=new Array(d),a=0;a<d;++a)l[a]=n(t[a],r);return l}},{"big-rat":18,"big-rat/mul":27}],275:[function(g,b,y){var e=g("big-rat/sub");b.exports=function(n,t){for(var i=n.length,r=new Array(i),d=0;d<i;++d)r[d]=e(n[d],t[d]);return r}},{"big-rat/sub":29}],276:[function(g,b,y){var e=g("compare-cell"),n=g("compare-oriented-cell"),t=g("cell-orientation");b.exports=function(i){i.sort(n);for(var r=i.length,d=0,l=0;l<r;
3525++l){var a=i[l],u=t(a);if(u!==0){if(d>0){var f=i[d-1];if(e(a,f)===0&&t(f)!==u){d-=1;continue}}i[d++]=a}}return i.length=d,i}},{"cell-orientation":47,"compare-cell":56,"compare-oriented-cell":57}],277:[function(g,b,y){var e,n="";b.exports=function(t,i){if(typeof t!="string")throw new TypeError("expected a string");if(i===1)return t;if(i===2)return t+t;var r=t.length*i;if(e!==t||e===void 0)e=t,n="";else if(n.length>=r)return n.substr(0,r);for(;r>n.length&&i>1;)1&i&&(n+=t),i>>=1,t+=t;return n=(n+=t).substr(0,r)}},{}],278:[function(g,b,y){(function(e){(function(){b.exports=e.performance&&e.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,m!==void 0?m:typeof self<"u"?self:typeof window<"u"?window:{})},{}],279:[function(g,b,y){b.exports=function(e){for(var n=e.length,t=e[e.length-1],i=n,r=n-2;r>=0;--r){var d=t,l=e[r];(u=l-((t=d+l)-d))&&(e[--i]=t,t=u)}var a=0;for(r=i;r<n;++r){var u;d=e[r],(u=(l=t)-((t=d+l)-d))&&(e[a++]=u)}return e[a++]=t,e.length=a,e}},{}],280:[function(g,b,y){var e=g("two-product"),n=g("robust-sum"),t=g("robust-scale"),i=g("robust-compress");function r(h,p,s,x){return function(c){return x(h(s(c[0][0],c[1][1]),s(-c[0][1],c[1][0])))}}function d(h,p,s,x){return function(c){return x(h(p(h(s(c[1][1],c[2][2]),s(-c[1][2],c[2][1])),c[0][0]),h(p(h(s(c[1][0],c[2][2]),s(-c[1][2],c[2][0])),-c[0][1]),p(h(s(c[1][0],c[2][1]),s(-c[1][1],c[2][0])),c[0][2]))))}}function l(h,p,s,x){return function(c){return x(h(h(p(h(p(h(s(c[2][2],c[3][3]),s(-c[2][3],c[3][2])),c[1][1]),h(p(h(s(c[2][1],c[3][3]),s(-c[2][3],c[3][1])),-c[1][2]),p(h(s(c[2][1],c[3][2]),s(-c[2][2],c[3][1])),c[1][3]))),c[0][0]),p(h(p(h(s(c[2][2],c[3][3]),s(-c[2][3],c[3][2])),c[1][0]),h(p(h(s(c[2][0],c[3][3]),s(-c[2][3],c[3][0])),-c[1][2]),p(h(s(c[2][0],c[3][2]),s(-c[2][2],c[3][0])),c[1][3]))),-c[0][1])),h(p(h(p(h(s(c[2][1],c[3][3]),s(-c[2][3],c[3][1])),c[1][0]),h(p(h(s(c[2][0],c[3][3]),s(-c[2][3],c[3][0])),-c[1][1]),p(h(s(c[2][0],c[3][1]),s(-c[2][1],c[3][0])),c[1][3]))),c[0][2]),p(h(p(h(s(c[2][1],c[3][2]),s(-c[2][2],c[3][1])),c[1][0]),h(p(h(s(c[2][0],c[3][2]),s(-c[2][2],c[3][0])),-c[1][1]),p(h(s(c[2][0],c[3][1]),s(-c[2][1],c[3][0])),c[1][2]))),-c[0][3]))))}}function a(h,p,s,x){return function(c){return x(h(h(p(h(h(p(h(p(h(s(c[3][3],c[4][4]),s(-c[3][4],c[4][3])),c[2][2]),h(p(h(s(c[3][2],c[4][4]),s(-c[3][4],c[4][2])),-c[2][3]),p(h(s(c[3][2],c[4][3]),s(-c[3][3],c[4][2])),c[2][4]))),c[1][1]),p(h(p(h(s(c[3][3],c[4][4]),s(-c[3][4],c[4][3])),c[2][1]),h(p(h(s(c[3][1],c[4][4]),s(-c[3][4],c[4][1])),-c[2][3]),p(h(s(c[3][1],c[4][3]),s(-c[3][3],c[4][1])),c[2][4]))),-c[1][2])),h(p(h(p(h(s(c[3][2],c[4][4]),s(-c[3][4],c[4][2])),c[2][1]),h(p(h(s(c[3][1],c[4][4]),s(-c[3][4],c[4][1])),-c[2][2]),p(h(s(c[3][1],c[4][2]),s(-c[3][2],c[4][1])),c[2][4]))),c[1][3]),p(h(p(h(s(c[3][2],c[4][3]),s(-c[3][3],c[4][2])),c[2][1]),h(p(h(s(c[3][1],c[4][3]),s(-c[3][3],c[4][1])),-c[2][2]),p(h(s(c[3][1],c[4][2]),s(-c[3][2],c[4][1])),c[2][3]))),-c[1][4]))),c[0][0]),p(h(h(p(h(p(h(s(c[3][3],c[4][4]),s(-c[3][4],c[4][3])),c[2][2]),h(p(h(s(c[3][2],c[4][4]),s(-c[3][4],c[4][2])),-c[2][3]),p(h(s(c[3][2],c[4][3]),s(-c[3][3],c[4][2])),c[2][4]))),c[1][0]),p(h(p(h(s(c[3][3],c[4][4]),s(-c[3][4],c[4][3])),c[2][0]),h(p(h(s(c[3][0],c[4][4]),s(-c[3][4],c[4][0])),-c[2][3]),p(h(s(c[3][0],c[4][3]),s(-c[3][3],c[4][0])),c[2][4]))),-c[1][2])),h(p(h(p(h(s(c[3][2],c[4][4]),s(-c[3][4],c[4][2])),c[2][0]),h(p(h(s(c[3][0],c[4][4]),s(-c[3][4],c[4][0])),-c[2][2]),p(h(s(c[3][0],c[4][2]),s(-c[3][2],c[4][0])),c[2][4]))),c[1][3]),p(h(p(h(s(c[3][2],c[4][3]),s(-c[3][3],c[4][2])),c[2][0]),h(p(h(s(c[3][0],c[4][3]),s(-c[3][3],c[4][0])),-c[2][2]),p(h(s(c[3][0],c[4][2]),s(-c[3][2],c[4][0])),c[2][3]))),-c[1][4]))),-c[0][1])),h(p(h(h(p(h(p(h(s(c[3][3],c[4][4]),s(-c[3][4],c[4][3])),c[2][1]),h(p(h(s(c[3][1],c[4][4]),s(-c[3][4],c[4][1])),-c[2][3]),p(h(s(c[3][1],c[4][3]),s(-c[3][3],c[4][1])),c[2][4]))),c[1][0]),p(h(p(h(s(c[3][3],c[4][4]),s(-c[3][4],c[4][3])),c[2][0]),h(p(h(s(c[3][0],c[4][4]),s(-c[3][4],c[4][0])),-c[2][3]),p(h(s(c[3][0],c[4][3]),s(-c[3][3],c[4][0])),c[2][4]))),-c[1][1])),h(p(h(p(h(s(c[3][1],c[4][4]),s(-c[3][4],c[4][1])),c[2][0]),h(p(h(s(c[3][0],c[4][4]),s(-c[3][4],c[4][0])),-c[2][1]),p(h(s(c[3][0],c[4][1]),s(-c[3][1],c[4][0])),c[2][4]))),c[1][3]),p(h(p(h(s(c[3][1],c[4][3]),s(-c[3][3],c[4][1])),c[2][0]),h(p(h(s(c[3][0],c[4][3]),s(-c[3][3],c[4][0])),-c[2][1]),p(h(s(c[3][0],c[4][1]),s(-c[3][1],c[4][0])),c[2][3]))),-c[1][4]))),c[0][2]),h(p(h(h(p(h(p(h(s(c[3][2],
vendor: 12,209 bytes, line 3525
3525c[4][4]),s(-c[3][4],c[4][2])),c[2][1]),h(p(h(s(c[3][1],c[4][4]),s(-c[3][4],c[4][1])),-c[2][2]),p(h(s(c[3][1],c[4][2]),s(-c[3][2],c[4][1])),c[2][4]))),c[1][0]),p(h(p(h(s(c[3][2],c[4][4]),s(-c[3][4],c[4][2])),c[2][0]),h(p(h(s(c[3][0],c[4][4]),s(-c[3][4],c[4][0])),-c[2][2]),p(h(s(c[3][0],c[4][2]),s(-c[3][2],c[4][0])),c[2][4]))),-c[1][1])),h(p(h(p(h(s(c[3][1],c[4][4]),s(-c[3][4],c[4][1])),c[2][0]),h(p(h(s(c[3][0],c[4][4]),s(-c[3][4],c[4][0])),-c[2][1]),p(h(s(c[3][0],c[4][1]),s(-c[3][1],c[4][0])),c[2][4]))),c[1][2]),p(h(p(h(s(c[3][1],c[4][2]),s(-c[3][2],c[4][1])),c[2][0]),h(p(h(s(c[3][0],c[4][2]),s(-c[3][2],c[4][0])),-c[2][1]),p(h(s(c[3][0],c[4][1]),s(-c[3][1],c[4][0])),c[2][2]))),-c[1][4]))),-c[0][3]),p(h(h(p(h(p(h(s(c[3][2],c[4][3]),s(-c[3][3],c[4][2])),c[2][1]),h(p(h(s(c[3][1],c[4][3]),s(-c[3][3],c[4][1])),-c[2][2]),p(h(s(c[3][1],c[4][2]),s(-c[3][2],c[4][1])),c[2][3]))),c[1][0]),p(h(p(h(s(c[3][2],c[4][3]),s(-c[3][3],c[4][2])),c[2][0]),h(p(h(s(c[3][0],c[4][3]),s(-c[3][3],c[4][0])),-c[2][2]),p(h(s(c[3][0],c[4][2]),s(-c[3][2],c[4][0])),c[2][3]))),-c[1][1])),h(p(h(p(h(s(c[3][1],c[4][3]),s(-c[3][3],c[4][1])),c[2][0]),h(p(h(s(c[3][0],c[4][3]),s(-c[3][3],c[4][0])),-c[2][1]),p(h(s(c[3][0],c[4][1]),s(-c[3][1],c[4][0])),c[2][3]))),c[1][2]),p(h(p(h(s(c[3][1],c[4][2]),s(-c[3][2],c[4][1])),c[2][0]),h(p(h(s(c[3][0],c[4][2]),s(-c[3][2],c[4][0])),-c[2][1]),p(h(s(c[3][0],c[4][1]),s(-c[3][1],c[4][0])),c[2][2]))),-c[1][3]))),c[0][4])))))}}function u(h){return(h===2?r:h===3?d:h===4?l:h===5?a:void 0)(n,t,e,i)}var f=[function(){return[0]},function(h){return[h[0][0]]}];function o(h,p,s,x,c,T,_,w){return function(k){switch(k.length){case 0:return h(k);case 1:return p(k);case 2:return s(k);case 3:return x(k);case 4:return c(k);case 5:return T(k)}var L=_[k.length];return L||(L=_[k.length]=w(k.length)),L(k)}}(function(){for(;f.length<6;)f.push(u(f.length));b.exports=o.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(g,b,y){var e=g("two-product"),n=g("robust-sum");b.exports=function(t,i){for(var r=e(t[0],i[0]),d=1;d<t.length;++d)r=n(r,e(t[d],i[d]));return r}},{"robust-sum":289,"two-product":306}],282:[function(g,b,y){var e=g("two-product"),n=g("robust-sum"),t=g("robust-subtract"),i=g("robust-scale");function r(p){return(p===3?d:p===4?l:p===5?a:u)(n,t,e,i)}function d(p,s,x,c){return function(T,_,w){var k=x(T[0],T[0]),L=c(k,_[0]),A=c(k,w[0]),I=x(_[0],_[0]),P=c(I,T[0]),S=c(I,w[0]),E=x(w[0],w[0]),D=c(E,T[0]),F=c(E,_[0]),H=p(s(F,S),s(P,L)),V=s(D,A),Z=s(H,V);return Z[Z.length-1]}}function l(p,s,x,c){return function(T,_,w,k){var L=p(x(T[0],T[0]),x(T[1],T[1])),A=c(L,_[0]),I=c(L,w[0]),P=c(L,k[0]),S=p(x(_[0],_[0]),x(_[1],_[1])),E=c(S,T[0]),D=c(S,w[0]),F=c(S,k[0]),H=p(x(w[0],w[0]),x(w[1],w[1])),V=c(H,T[0]),Z=c(H,_[0]),K=c(H,k[0]),G=p(x(k[0],k[0]),x(k[1],k[1])),W=c(G,T[0]),Q=c(G,_[0]),R=c(G,w[0]),N=p(p(c(s(R,K),_[1]),p(c(s(Q,F),-w[1]),c(s(Z,D),k[1]))),p(c(s(Q,F),T[1]),p(c(s(W,P),-_[1]),c(s(E,A),k[1])))),U=p(p(c(s(R,K),T[1]),p(c(s(W,P),-w[1]),c(s(V,I),k[1]))),p(c(s(Z,D),T[1]),p(c(s(V,I),-_[1]),c(s(E,A),w[1])))),ee=s(N,U);return ee[ee.length-1]}}function a(p,s,x,c){return function(T,_,w,k,L){var A=p(x(T[0],T[0]),p(x(T[1],T[1]),x(T[2],T[2]))),I=c(A,_[0]),P=c(A,w[0]),S=c(A,k[0]),E=c(A,L[0]),D=p(x(_[0],_[0]),p(x(_[1],_[1]),x(_[2],_[2]))),F=c(D,T[0]),H=c(D,w[0]),V=c(D,k[0]),Z=c(D,L[0]),K=p(x(w[0],w[0]),p(x(w[1],w[1]),x(w[2],w[2]))),G=c(K,T[0]),W=c(K,_[0]),Q=c(K,k[0]),R=c(K,L[0]),N=p(x(k[0],k[0]),p(x(k[1],k[1]),x(k[2],k[2]))),U=c(N,T[0]),ee=c(N,_[0]),j=c(N,w[0]),X=c(N,L[0]),J=p(x(L[0],L[0]),p(x(L[1],L[1]),x(L[2],L[2]))),re=c(J,T[0]),ne=c(J,_[0]),se=c(J,w[0]),oe=c(J,k[0]),pe=p(p(p(c(p(c(s(oe,X),w[1]),p(c(s(se,R),-k[1]),c(s(j,Q),L[1]))),_[2]),p(c(p(c(s(oe,X),_[1]),p(c(s(ne,Z),-k[1]),c(s(ee,V),L[1]))),-w[2]),c(p(c(s(se,R),_[1]),p(c(s(ne,Z),-w[1]),c(s(W,H),L[1]))),k[2]))),p(c(p(c(s(j,Q),_[1]),p(c(s(ee,V),-w[1]),c(s(W,H),k[1]))),-L[2]),p(c(p(c(s(oe,X),_[1]),p(c(s(ne,Z),-k[1]),c(s(ee,V),L[1]))),T[2]),c(p(c(s(oe,X),T[1]),p(c(s(re,E),-k[1]),c(s(U,S),L[1]))),-_[2])))),p(p(c(p(c(s(ne,Z),T[1]),p(c(s(re,E),-_[1]),c(s(F,I),L[1]))),k[2]),p(c(p(c(s(ee,V),T[1]),p(c(s(U,S),-_[1]),c(s(F,I),k[1]))),-L[2]),c(p(c(s(j,Q),_[1]),p(c(s(ee,V),-w[1]),c(s(W,H),k[1]))),T[2]))),p(c(p(c(s(j,Q),T[1]),p(c(s(U,S),-w[1]),c(s(G,P),k[1]))),-_[2]),p(c(p(c(s(ee,V),T[1]),p(c(s(U,S),-_[1]),c(s(F,I),k[1]))),w[2]),c(p(c(s(W,H),T[1]),p(c(s(G,P),-_[1]),c(s(F,I),w[1]))),-k[2]))))),ce=p(p(p(c(p(c(s(oe,X),w[1]),p(c(s(se,R),-k[1]),c(s(j,Q),L[1]))),T[2]),c(p(c(s(oe,X),T[1]),p(c(s(re,E),-k[1]),c(s(U,S),L[1]))),-w[2])),p(c(p(c(s(se,R),T[1]),p(c(s(re,E),-w[1]),c(s(G,P),L[1]))),k[2]),c(p(c(s(j,Q),T[1]),p(c(s(U,S),-w[1]),c(s(G,P),k[1]))),-L[2]))),p(p(c(p(c(s(se,R),_[1]),p(c(s(ne,Z),-w[1]),c(s(W,H),L[1]))),T[2]),c(p(c(s(se,R),T[1]),p(c(s(re,E),-w[1]),c(s(G,P),L[1]))),-_[2])),p(c(p(c(s(ne,Z),T[1]),p(c(s(re,E),-_[1]),c(s(F,I),L[1]))),w[2]),c(p(c(s(W,H),T[1]),p(c(s(G,P),-_[1]),c(s(F,I),w[1]))),-L[2])))),de=s(pe,ce);return de[de.length-1]}}function u(p,s,x,c){return function(T,_,w,k,L,A){var I=p(p(x(T[0],T[0]),x(T[1],T[1])),p(x(T[2],T[2]),x(T[3],T[3]))),P=c(I,_[0]),S=c(I,w[0]),E=c(I,k[0]),D=c(I,L[0]),F=c(I,A[0]),H=p(p(x(_[0],_[0]),x(_[1],_[1])),p(x(_[2],_[2]),x(_[3],_[3]))),V=c(H,T[0]),Z=c(H,w[0]),K=c(H,k[0]),G=c(H,L[0]),W=c(H,A[0]),Q=p(p(x(w[0],w[0]),x(w[1],w[1])),p(x(w[2],w[2]),x(w[3],w[3]))),R=c(Q,T[0]),N=c(Q,_[0]),U=c(Q,k[0]),ee=c(Q,L[0]),j=c(Q,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=c(X,T[0]),re=c(X,_[0]),ne=c(X,w[0]),se=c(X,L[0]),oe=c(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=c(pe,T[0]),de=c(pe,_[0]),xe=c(pe,w[0]),_e=c(pe,k[0]),we=c(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=c(Ee,T[0]),ge=c(Ee,_[0]),ke=c(Ee,w[0]),be=c(Ee,k[0]),Se=c(Ee,L[0]),Oe=p(p(p(c(p(p(c(p(c(s(Se,we),k[1]),p(c(s(be,oe),-L[1]),c(s(_e,se),A[1]))),w[2]),c(p(c(s(Se,we),w[1]),p(c(s(ke,j),-L[1]),c(s(xe,ee),A[1]))),-k[2])),p(c(p(c(s(be,oe),w[1]),p(c(s(ke,j),-k[1]),c(s(ne,U),A[1]))),L[2]),c(p(c(s(_e,se),w[1]),p(c(s(xe,ee),-k[1]),c(s(ne,U),L[1]))),-A[2]))),_[3]),p(c(p(p(c(p(c(s(Se,we),k[1]),p(c(s(be,oe),-L[1]),c(s(_e,se),A[1]))),_[2]),c(p(c(s(Se,we),_[1]),p(c(s(ge,W),-L[1]),c(s(de,G),A[1]))),-k[2])),p(c(p(c(s(be,oe),_[1]),p(c(s(ge,W),-k[1]),c(s(re,K),A[1]))),L[2]),c(p(c(s(_e,se),_[1]),p(c(s(de,G),-k[1]),c(s(re,K),L[1]))),-A[2]))),-w[3]),c(p(p(c(p(c(s(Se,we),w[1]),p(c(s(ke,j),-L[1]),c(s(xe,ee),A[1]))),_[2]),c(p(c(s(Se,we),_[1]),p(c(s(ge,W),-L[1]),c(s(de,G),A[1]))),-w[2])),p(c(p(c(s(ke,j),_[1]),p(c(s(ge,W),-w[1]),c(s(N,Z),A[1]))),L[2]),c(p(c(s(xe,ee),_[1]),p(c(s(de,G),-w[1]),c(s(N,Z),L[1]))),-A[2]))),k[3]))),p(p(c(p(p(c(p(c(s(be,oe),w[1]),p(c(s(ke,j),-k[1]),c(s(ne,U),A[1]))),_[2]),c(p(c(s(be,oe),_[1]),p(c(s(ge,W),-k[1]),c(s(re,K),A[1]))),-w[2])),p(c(p(c(s(ke,j),_[1]),p(c(s(ge,W),-w[1]),c(s(N,Z),A[1]))),k[2]),c(p(c(s(ne,U),_[1]),p(c(s(re,K),-w[1]),c(s(N,Z),k[1]))),-A[2]))),-L[3]),c(p(p(c(p(c(s(_e,se),w[1]),p(c(s(xe,ee),-k[1]),c(s(ne,U),L[1]))),_[2]),c(p(c(s(_e,se),_[1]),p(c(s(de,G),-k[1]),c(s(re,K),L[1]))),-w[2])),p(c(p(c(s(xe,ee),_[1]),p(c(s(de,G),-w[1]),c(s(N,Z),L[1]))),k[2]),c(p(c(s(ne,U),_[1]),p(c(s(re,K),-w[1]),c(s(N,Z),k[1]))),-L[2]))),A[3])),p(c(p(p(c(p(c(s(Se,we),k[1]),p(c(s(be,oe),-L[1]),c(s(_e,se),A[1]))),_[2]),c(p(c(s(Se,we),_[1]),p(c(s(ge,W),-L[1]),c(s(de,G),A[1]))),-k[2])),p(c(p(c(s(be,oe),_[1]),p(c(s(ge,W),-k[1]),c(s(re,K),A[1]))),L[2]),c(p(c(s(_e,se),_[1]),p(c(s(de,G),-k[1]),c(s(re,K),L[1]))),-A[2]))),T[3]),c(p(p(c(p(c(s(Se,we),k[1]),p(c(s(be,oe),-L[1]),c(s(_e,se),A[1]))),T[2]),c(p(c(s(Se,we),T[1]),p(c(s(fe,F),-L[1]),c(s(ce,D),A[1]))),-k[2])),p(c(p(c(s(be,oe),T[1]),p(c(s(fe,F),-k[1]),c(s(J,E),A[1]))),L[2]),c(p(c(s(_e,se),T[1]),p(c(s(ce,D),-k[1]),c(s(J,E),L[1]))),-A[2]))),-_[3])))),p(p(p(c(p(p(c(p(c(s(Se,we),_[1]),p(c(s(ge,W),-L[1]),c(s(de,G),A[1]))),T[2]),c(p(c(s(Se,we),T[1]),p(c(s(fe,F),-L[1]),c(s(ce,D),A[1]))),-_[2])),p(c(p(c(s(ge,W),T[1]),p(c(s(fe,F),-_[1]),c(s(V,P),A[1]))),L[2]),c(p(c(s(de,G),T[1]),p(c(s(ce,D),-_[1]),c(s(V,P),L[1]))),-A[2]))),k[3]),c(p(p(c(p(c(s(be,oe),_[1]),p(c(s(ge,W),-k[1]),c(s(re,K),A[1]))),T[2]),c(p(c(s(be,oe),T[1]),p(c(s(fe,F),-k[1]),c(s(J,E),A[1]))),-_[2])),p(c(p(c(s(ge,W),T[1]),p(c(s(fe,F),-_[1]),c(s(V,P),A[1]))),k[2]),c(p(c(s(re,K),T[1]),p(c(s(J,E),-_[1]),c(s(V,P),k[1]))),-A[2]))),-L[3])),p(c(p(p(c(p(c(s(_e,se),_[1]),p(c(s(de,G),-k[1]),c(s(re,K),L[1]))),T[2]),c(p(c(s(_e,se),T[1]),p(c(s(ce,D),-k[1]),c(s(J,E),L[1]))),-_[2])),p(c(p(c(s(de,G),T[1]),p(c(s(ce,D),-_[1]),c(s(V,P),L[1]))),k[2]),c(p(c(s(re,K),T[1]),p(c(s(J,E),-_[1]),c(s(V,P),k[1]))),-L[2]))),A[3]),c(p(p(c(p(c(s(be,oe),w[1]),p(c(s(ke,j),-k[1]),c(s(ne,U),A[1]))),_[2]),c(p(c(s(be,oe),_[1]),p(c(s(ge,W),-k[1]),c(s(re,K),A[1]))),-w[2])),p(c(p(c(s(ke,j),_[1]),p(c(s(ge,W),-w[1]),c(s(N,Z),A[1]))),k[2]),c(p(c(s(ne,U),_[1]),p(c(s(re,K),-w[1]),c(s(N,Z),k[1]))),-A[2]))),T[3]))),p(p(c(p(p(c(p(c(s(be,oe),w[1]),p(c(s(ke,j),-k[1]),c(s(ne,U),A[1]))),T[2]),c(p(c(s(be,oe),T[1]),p(c(s(fe,F),-k[1]),c(s(J,E),A[1]))),-w[2])),p(c(p(c(s(ke,j),T[1]),p(c(s(fe,F),-w[1]),c(s(R,S),A[1]))),k[2]),c(p(c(s(ne,U),T[1]),p(c(s(J,E),-w[1]),c(s(R,S),k[1]))),-A[2]))),-_[3]),c(p(p(c(p(c(s(be,oe),_[1]),p(c(s(ge,W),-k[1]),c(s(re,K),A[1]))),T[2]),c(p(c(s(be,oe),T[1]),p(c(s(fe,F),-k[1]),c(s(J,E),A[1]))),-_[2])),p(c(p(c(s(ge,W),T[1]),p(c(s(fe,F),-_[1]),c(s(V,P),A[1]))),k[2]),c(p(c(s(re,K),T[1]),p(c(s(J,E),-_[1]),c(s(V,P),k[1]))),-A[2]))),w[3])),p(c(p(p(c(p(c(s(ke,j),_[1]),p(c(s(ge,W),-w[1]),c(s(N,Z),A[1]))),T[2]),c(p(c(s(ke,j),T[1]),p(c(s(fe,F),-w[1]),c(s(R,S),A[1]))),-_[2])),p(c(p(c(s(ge,W),T[1]),p(c(s(fe,F),-_[1]),c(s(V,P),A[1]))),w[2]),c(p(c(s(N,Z),T[1]),p(c(s(R,S),-_[1]),c(s(V,P),w[1]))),-A[2]))),-k[3]),c(p(p(c(p(c(s(ne,U),_[1]),p(c(s(re,K),-w[1]),c(s(N,Z),k[1]))),T[2]),c(p(c(s(ne,U),T[1]),p(c(s(J,E),-w[1]),c(s(R,S),k[1]))),-_[2])),p(c(p(c(s(re,K),T[1]),p(c(s(J,E),-_[1]),c(s(V,P),k[1]))),w[2]),c(p(c(s(N,Z),T[1]),p(c(s(R,S),-_[1]),c(s(V,P),w[1]))),-k[2]))),A[3]))))),De=p(p(p(c(p(p(c(p(c(s(Se,we),k[1]),p(c(s(be,oe),-L[1]),c(s(_e,se),A[1]))),w[2]),c(p(c(s(Se,we),w[1]),p(c(s(ke,j),-L[1]),c(s(xe,ee),A[1]))),-k[2])),p(c(p(c(s(be,oe),w[1]),p(c(s(ke,j),-k[1]),c(s(ne,U),A[1]))),L[2]),c(p(c(s(_e,se),w[1]),p(c(s(xe,ee),-k[1]),c(s(ne,U),L[1]))),-A[2]))),T[3]),p(c(p(p(c(p(c(s(Se,we),k[1]),p(c(s(be,oe),-L[1]),c(s(_e,se),A[1]))),T[2]),c(p(c(s(Se,we),T[1]),p(c(s(fe,F),-L[1]),c(s(ce,D),A[1]))),-k[2])),p(c(p(c(s(be,oe),T[1]),p(c(s(fe,F),-k[1]),c(s(J,E),A[1]))),L[2]),c(p(c(s(_e,se),T[1]),p(c(s(ce,D),-k[1]),c(s(J,E),L[1]))),-A[2]))),-w[3]),c(p(p(c(p(c(s(Se,we),w[1]),p(c(s(ke,j),-L[1]),c(s(xe,ee),A[1]))),T[2]),c(p(c(s(Se,we),T[1]),p(c(s(fe,F),-L[1]),c(s(ce,D),A[1]))),-w[2])),p(c(p(c(s(ke,j),T[1]),p(c(s(fe,F),-w[1]),c(s(R,S),A[1]))),L[2]),c(p(c(s(xe,ee),T[1]),p(c(s(ce,D),-w[1]),c(s(R,S),L[1]))),-A[2]))),k[3]))),p(p(c(p(p(c(p(c(s(be,oe),w[1]),p(c(s(ke,j),-k[1]),c(s(ne,U),A[1]))),T[2]),c(p(c(s(be,oe),T[1]),p(c(s(fe,F),-k[1]),c(s(J,E),A[1]))),-w[2])),p(c(p(c(s(ke,j),T[1]),p(c(s(fe,F),-w[1]),c(s(R,S),A[1]))),k[2]),c(p(c(s(ne,U),T[1]),p(c(s(J,E),-w[1]),c(s(R,S),k[1]))),-A[2]))),-L[3]),c(p(p(c(p(c(s(_e,se),w[1]),p(c(s(xe,ee),-k[1]),c(s(ne,U),L[1]))),T[2]),c(p(c(s(_e,se),T[1]),p(c(s(ce,D),-k[1]),c(s(J,E),L[1]))),-w[2])),p(c(p(c(s(xe,ee),T[1]),p(c(s(ce,D),-w[1]),c(s(R,S),L[1]))),k[2]),c(p(c(s(ne,U),T[1]),p(c(s(J,E),-w[1]),c(s(R,S),k[1]))),-L[2]))),A[3])),p(c(p(p(c(p(c(s(Se,we),w[1]),p(c(s(ke,j),-L[1]),c(s(xe,ee),A[1]))),_[2]),c(p(c(s(Se,we),_[1]),p(c(s(ge,W),-L[1]),c(s(de,G),A[1]))),-w[2])),p(c(p(c(s(ke,j),_[1]),p(c(s(ge,W),-w[1]),c(s(N,Z),A[1]))),L[2]),c(p(c(s(xe,ee),_[1]),p(c(s(de,G),-w[1]),c(s(N,Z),L[1]))),-A[2]))),T[3]),c(p(p(c(p(c(s(Se,we),w[1]),p(c(s(ke,j),-L[1]),c(s(xe,ee),A[1]))),T[2]),c(p(c(s(Se,we),T[1]),p(c(s(fe,F),-L[1]),c(s(ce,D),A[1]))),-w[2])),p(c(p(c(s(ke,j),T[1]),p(c(s(fe,F),-w[1]),c(s(R,S),A[1]))),L[2]),c(p(c(s(xe,ee),T[1]),p(c(s(ce,D),-w[1]),c(s(R,S),L[1]))),-A[2]))),-_[3])))),p(p(p(c(p(p(c(p(c(s(Se,we),_[1]),p(c(s(ge,W),-L[1]),c(s(de,G),A[1]))),T[2]),c(p(c(s(Se,we),T[1]),p(c(s(fe,F),-L[1]),c(s(ce,D),A[1]))),-_[2])),p(c(p(c(s(ge,W),T[1]),p(c(s(fe,F),-_[1]),c(s(V,P),A[1]))),L[2]),c(p(c(s(de,G),T[1]),p(c(s(ce,D),-_[1]),c(s(V,P),L[1]))),-A[2]))),w[3]),c(p(
3525p(c(p(c(s(ke,j),_[1]),p(c(s(ge,W),-w[1]),c(s(N,Z),A[1]))),T[2]),c(p(c(s(ke,j),T[1]),p(c(s(fe,F),-w[1]),c(s(R,S),A[1]))),-_[2])),p(c(p(c(s(ge,W),T[1]),p(c(s(fe,F),-_[1]),c(s(V,P),A[1]))),w[2]),c(p(c(s(N,Z),T[1]),p(c(s(R,S),-_[1]),c(s(V,P),w[1]))),-A[2]))),-L[3])),p(c(p(p(c(p(c(s(xe,ee),_[1]),p(c(s(de,G),-w[1]),c(s(N,Z),L[1]))),T[2]),c(p(c(s(xe,ee),T[1]),p(c(s(ce,D),-w[1]),c(s(R,S),L[1]))),-_[2])),p(c(p(c(s(de,G),T[1]),p(c(s(ce,D),-_[1]),c(s(V,P),L[1]))),w[2]),c(p(c(s(N,Z),T[1]),p(c(s(R,S),-_[1]),c(s(V,P),w[1]))),-L[2]))),A[3]),c(p(p(c(p(c(s(_e,se),w[1]),p(c(s(xe,ee),-k[1]),c(s(ne,U),L[1]))),_[2]),c(p(c(s(_e,se),_[1]),p(c(s(de,G),-k[1]),c(s(re,K),L[1]))),-w[2])),p(c(p(c(s(xe,ee),_[1]),p(c(s(de,G),-w[1]),c(s(N,Z),L[1]))),k[2]),c(p(c(s(ne,U),_[1]),p(c(s(re,K),-w[1]),c(s(N,Z),k[1]))),-L[2]))),T[3]))),p(p(c(p(p(c(p(c(s(_e,se),w[1]),p(c(s(xe,ee),-k[1]),c(s(ne,U),L[1]))),T[2]),c(p(c(s(_e,se),T[1]),p(c(s(ce,D),-k[1]),c(s(J,E),L[1]))),-w[2])),p(c(p(c(s(xe,ee),T[1]),p(c(s(ce,D),-w[1]),c(s(R,S),L[1]))),k[2]),c(p(c(s(ne,U),T[1]),p(c(s(J,E),-w[1]),c(s(R,S),k[1]))),-L[2]))),-_[3]),c(p(p(c(p(c(s(_e,se),_[1]),p(c(s(de,G),-k[1]),c(s(re,K),L[1]))),T[2]),c(p(c(s(_e,se),T[1]),p(c(s(ce,D),-k[1]),c(s(J,E),L[1]))),-_[2])),p(c(p(c(s(de,G),T[1]),p(c(s(ce,D),-_[1]),c(s(V,P),L[1]))),k[2]),c(p(c(s(re,K),T[1]),p(c(s(J,E),-_[1]),c(s(V,P),k[1]))),-L[2]))),w[3])),p(c(p(p(c(p(c(s(xe,ee),_[1]),p(c(s(de,G),-w[1]),c(s(N,Z),L[1]))),T[2]),c(p(c(s(xe,ee),T[1]),p(c(s(ce,D),-w[1]),c(s(R,S),L[1]))),-_[2])),p(c(p(c(s(de,G),T[1]),p(c(s(ce,D),-_[1]),c(s(V,P),L[1]))),w[2]),c(p(c(s(N,Z),T[1]),p(c(s(R,S),-_[1]),c(s(V,P),w[1]))),-L[2]))),-k[3]),c(p(p(c(p(c(s(ne,U),_[1]),p(c(s(re,K),-w[1]),c(s(N,Z),k[1]))),T[2]),c(p(c(s(ne,U),T[1]),p(c(s(J,E),-w[1]),c(s(R,S),k[1]))),-_[2])),p(c(p(c(s(re,K),T[1]),p(c(s(J,E),-_[1]),c(s(V,P),k[1]))),w[2]),c(p(c(s(N,Z),T[1]),p(c(s(R,S),-_[1]),c(s(V,P),w[1]))),-k[2]))),L[3]))))),je=s(Oe,De);return je[je.length-1]}}var f=[function(){return 0},function(){return 0},function(){return 0}];function o(p){var s=f[p.length];return s||(s=f[p.length]=r(p.length)),s.apply(void 0,p)}function h(p,s,x,c,T,_,w,k){return function(L,A,I,P,S,E){switch(arguments.length){case 0:case 1:return 0;case 2:return c(L,A);case 3:return T(L,A,I);case 4:return _(L,A,I,P);case 5:return w(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,[o].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(g,b,y){var e=g("robust-determinant");function n(f){var o=f===2?t:f===3?i:f===4?r:f===5?d:l;return o(f<6?e[f]:e)}function t(f){return function(o,h){return[f([[+h[0],+o[0][1]],[+h[1],+o[1][1]]]),f([[+o[0][0],+h[0]],[+o[1][0],+h[1]]]),f(o)]}}function i(f){return function(o,h){return[f([[+h[0],+o[0][1],+o[0][2]],[+h[1],
vendor: 9,949 bytes, line 3525
3525+o[1][1],+o[1][2]],[+h[2],+o[2][1],+o[2][2]]]),f([[+o[0][0],+h[0],+o[0][2]],[+o[1][0],+h[1],+o[1][2]],[+o[2][0],+h[2],+o[2][2]]]),f([[+o[0][0],+o[0][1],+h[0]],[+o[1][0],+o[1][1],+h[1]],[+o[2][0],+o[2][1],+h[2]]]),f(o)]}}function r(f){return function(o,h){return[f([[+h[0],+o[0][1],+o[0][2],+o[0][3]],[+h[1],+o[1][1],+o[1][2],+o[1][3]],[+h[2],+o[2][1],+o[2][2],+o[2][3]],[+h[3],+o[3][1],+o[3][2],+o[3][3]]]),f([[+o[0][0],+h[0],+o[0][2],+o[0][3]],[+o[1][0],+h[1],+o[1][2],+o[1][3]],[+o[2][0],+h[2],+o[2][2],+o[2][3]],[+o[3][0],+h[3],+o[3][2],+o[3][3]]]),f([[+o[0][0],+o[0][1],+h[0],+o[0][3]],[+o[1][0],+o[1][1],+h[1],+o[1][3]],[+o[2][0],+o[2][1],+h[2],+o[2][3]],[+o[3][0],+o[3][1],+h[3],+o[3][3]]]),f([[+o[0][0],+o[0][1],+o[0][2],+h[0]],[+o[1][0],+o[1][1],+o[1][2],+h[1]],[+o[2][0],+o[2][1],+o[2][2],+h[2]],[+o[3][0],+o[3][1],+o[3][2],+h[3]]]),f(o)]}}function d(f){return function(o,h){return[f([[+h[0],+o[0][1],+o[0][2],+o[0][3],+o[0][4]],[+h[1],+o[1][1],+o[1][2],+o[1][3],+o[1][4]],[+h[2],+o[2][1],+o[2][2],+o[2][3],+o[2][4]],[+h[3],+o[3][1],+o[3][2],+o[3][3],+o[3][4]],[+h[4],+o[4][1],+o[4][2],+o[4][3],+o[4][4]]]),f([[+o[0][0],+h[0],+o[0][2],+o[0][3],+o[0][4]],[+o[1][0],+h[1],+o[1][2],+o[1][3],+o[1][4]],[+o[2][0],+h[2],+o[2][2],+o[2][3],+o[2][4]],[+o[3][0],+h[3],+o[3][2],+o[3][3],+o[3][4]],[+o[4][0],+h[4],+o[4][2],+o[4][3],+o[4][4]]]),f([[+o[0][0],+o[0][1],+h[0],+o[0][3],+o[0][4]],[+o[1][0],+o[1][1],+h[1],+o[1][3],+o[1][4]],[+o[2][0],+o[2][1],+h[2],+o[2][3],+o[2][4]],[+o[3][0],+o[3][1],+h[3],+o[3][3],+o[3][4]],[+o[4][0],+o[4][1],+h[4],+o[4][3],+o[4][4]]]),f([[+o[0][0],+o[0][1],+o[0][2],+h[0],+o[0][4]],[+o[1][0],+o[1][1],+o[1][2],+h[1],+o[1][4]],[+o[2][0],+o[2][1],+o[2][2],+h[2],+o[2][4]],[+o[3][0],+o[3][1],+o[3][2],+h[3],+o[3][4]],[+o[4][0],+o[4][1],+o[4][2],+h[4],+o[4][4]]]),f([[+o[0][0],+o[0][1],+o[0][2],+o[0][3],+h[0]],[+o[1][0],+o[1][1],+o[1][2],+o[1][3],+h[1]],[+o[2][0],+o[2][1],+o[2][2],+o[2][3],+h[2]],[+o[3][0],+o[3][1],+o[3][2],+o[3][3],+h[3]],[+o[4][0],+o[4][1],+o[4][2],+o[4][3],+h[4]]]),f(o)]}}function l(f){return function(o,h){return[f([[+h[0],+o[0][1],+o[0][2],+o[0][3],+o[0][4],+o[0][5]],[+h[1],+o[1][1],+o[1][2],+o[1][3],+o[1][4],+o[1][5]],[+h[2],+o[2][1],+o[2][2],+o[2][3],+o[2][4],+o[2][5]],[+h[3],+o[3][1],+o[3][2],+o[3][3],+o[3][4],+o[3][5]],[+h[4],+o[4][1],+o[4][2],+o[4][3],+o[4][4],+o[4][5]],[+h[5],+o[5][1],+o[5][2],+o[5][3],+o[5][4],+o[5][5]]]),f([[+o[0][0],+h[0],+o[0][2],+o[0][3],+o[0][4],+o[0][5]],[+o[1][0],+h[1],+o[1][2],+o[1][3],+o[1][4],+o[1][5]],[+o[2][0],+h[2],+o[2][2],+o[2][3],+o[2][4],+o[2][5]],[+o[3][0],+h[3],+o[3][2],+o[3][3],+o[3][4],+o[3][5]],[+o[4][0],+h[4],+o[4][2],+o[4][3],+o[4][4],+o[4][5]],[+o[5][0],+h[5],+o[5][2],+o[5][3],+o[5][4],+o[5][5]]]),f([[+o[0][0],+o[0][1],+h[0],+o[0][3],+o[0][4],+o[0][5]],[+o[1][0],+o[1][1],+h[1],+o[1][3],+o[1][4],+o[1][5]],[+o[2][0],+o[2][1],+h[2],+o[2][3],+o[2][4],+o[2][5]],[+o[3][0],+o[3][1],+h[3],+o[3][3],+o[3][4],+o[3][5]],[+o[4][0],+o[4][1],+h[4],+o[4][3],+o[4][4],+o[4][5]],[+o[5][0],+o[5][1],+h[5],+o[5][3],+o[5][4],+o[5][5]]]),f([[+o[0][0],+o[0][1],+o[0][2],+h[0],+o[0][4],+o[0][5]],[+o[1][0],+o[1][1],+o[1][2],+h[1],+o[1][4],+o[1][5]],[+o[2][0],+o[2][1],+o[2][2],+h[2],+o[2][4],+o[2][5]],[+o[3][0],+o[3][1],+o[3][2],+h[3],+o[3][4],+o[3][5]],[+o[4][0],+o[4][1],+o[4][2],+h[4],+o[4][4],+o[4][5]],[+o[5][0],+o[5][1],+o[5][2],+h[5],+o[5][4],+o[5][5]]]),f([[+o[0][0],+o[0][1],+o[0][2],+o[0][3],+h[0],+o[0][5]],[+o[1][0],+o[1][1],+o[1][2],+o[1][3],+h[1],+o[1][5]],[+o[2][0],+o[2][1],+o[2][2],+o[2][3],+h[2],+o[2][5]],[+o[3][0],+o[3][1],+o[3][2],+o[3][3],+h[3],+o[3][5]],[+o[4][0],+o[4][1],+o[4][2],+o[4][3],+h[4],+o[4][5]],[+o[5][0],+o[5][1],+o[5][2],+o[5][3],+h[5],+o[5][5]]]),f([[+o[0][0],+o[0][1],+o[0][2],+o[0][3],+o[0][4],+h[0]],[+o[1][0],+o[1][1],+o[1][2],+o[1][3],+o[1][4],+h[1]],[+o[2][0],+o[2][1],+o[2][2],+o[2][3],+o[2][4],+h[2]],[+o[3][0],+o[3][1],+o[3][2],+o[3][3],+o[3][4],+h[3]],[+o[4][0],+o[4][1],+o[4][2],+o[4][3],+o[4][4],+h[4]],[+o[5][0],+o[5][1],+o[5][2],+o[5][3],+o[5][4],+h[5]]]),f(o)]}}var a=[function(){return[[0]]},function(f,o){return[[o[0]],[f[0][0]]]}];function u(f,o,h,p,s,x,c,T){return function(_,w){switch(_.length){case 0:return f(_,w);case 1:return o(_,w);case 2:return h(_,w);case 3:return p(_,w);case 4:return s(_,w);case 5:return x(_,w)}var k=c[_.length];return k||(k=c[_.length]=T(_.length)),k(_,w)}}(function(){for(;a.length<6;)a.push(n(a.length));b.exports=u.apply(void 0,a.concat([a,n]));for(var f=0;f<6;++f)b.exports[f]=a[f]})()},{"robust-determinant":280}],284:[function(g,b,y){var e=g("two-product"),n=g("robust-sum"),t=g("robust-scale"),i=g("robust-subtract");function r(s,x,c,T){return function(_,w,k){var L=s(s(x(w[1],k[0]),x(-k[1],w[0])),s(x(_[1],w[0]),x(-w[1],_[0]))),A=s(x(_[1],k[0]),x(-k[1],_[0])),I=T(L,A);return I[I.length-1]}}function d(s,x,c,T){return function(_,w,k,L){var A=s(s(c(s(x(k[1],L[0]),x(-L[1],k[0])),w[2]),s(c(s(x(w[1],L[0]),x(-L[1],w[0])),-k[2]),c(s(x(w[1],k[0]),x(-k[1],w[0])),L[2]))),s(c(s(x(w[1],L[0]),x(-L[1],w[0])),_[2]),s(c(s(x(_[1],L[0]),x(-L[1],_[0])),-w[2]),c(s(x(_[1],w[0]),x(-w[1],_[0])),L[2])))),I=s(s(c(s(x(k[1],L[0]),x(-L[1],k[0])),_[2]),s(c(s(x(_[1],L[0]),x(-L[1],_[0])),-k[2]),c(s(x(_[1],k[0]),x(-k[1],_[0])),L[2]))),s(c(s(x(w[1],k[0]),x(-k[1],w[0])),_[2]),s(c(s(x(_[1],k[0]),x(-k[1],_[0])),-w[2]),c(s(x(_[1],w[0]),x(-w[1],_[0])),k[2])))),P=T(A,I);return P[P.length-1]}}function l(s,x,c,T){return function(_,w,k,L,A){var I=s(s(s(c(s(c(s(x(L[1],A[0]),x(-A[1],L[0])),k[2]),s(c(s(x(k[1],A[0]),x(-A[1],k[0])),-L[2]),c(s(x(k[1],L[0]),x(-L[1],k[0])),A[2]))),w[3]),s(c(s(c(s(x(L[1],A[0]),x(-A[1],L[0])),w[2]),s(c(s(x(w[1],A[0]),x(-A[1],w[0])),-L[2]),c(s(x(w[1],L[0]),x(-L[1],w[0])),A[2]))),-k[3]),c(s(c(s(x(k[1],A[0]),x(-A[1],k[0])),w[2]),s(c(s(x(w[1],A[0]),x(-A[1],w[0])),-k[2]),c(s(x(w[1],k[0]),x(-k[1],w[0])),A[2]))),L[3]))),s(c(s(c(s(x(k[1],L[0]),x(-L[1],k[0])),w[2]),s(c(s(x(w[1],L[0]),x(-L[1],w[0])),-k[2]),c(s(x(w[1],k[0]),x(-k[1],w[0])),L[2]))),-A[3]),s(c(s(c(s(x(L[1],A[0]),x(-A[1],L[0])),w[2]),s(c(s(x(w[1],A[0]),x(-A[1],w[0])),-L[2]),c(s(x(w[1],L[0]),x(-L[1],w[0])),A[2]))),_[3]),c(s(c(s(x(L[1],A[0]),x(-A[1],L[0])),_[2]),s(c(s(x(_[1],A[0]),x(-A[1],_[0])),-L[2]),c(s(x(_[1],L[0]),x(-L[1],_[0])),A[2]))),-w[3])))),s(s(c(s(c(s(x(w[1],A[0]),x(-A[1],w[0])),_[2]),s(c(s(x(_[1],A[0]),x(-A[1],_[0])),-w[2]),c(s(x(_[1],w[0]),x(-w[1],_[0])),A[2]))),L[3]),s(c(s(c(s(x(w[1],L[0]),x(-L[1],w[0])),_[2]),s(c(s(x(_[1],L[0]),x(-L[1],_[0])),-w[2]),c(s(x(_[1],w[0]),x(-w[1],_[0])),L[2]))),-A[3]),c(s(c(s(x(k[1],L[0]),x(-L[1],k[0])),w[2]),s(c(s(x(w[1],L[0]),x(-L[1],w[0])),-k[2]),c(s(x(w[1],k[0]),x(-k[1],w[0])),L[2]))),_[3]))),s(c(s(c(s(x(k[1],L[0]),x(-L[1],k[0])),_[2]),s(c(s(x(_[1],L[0]),x(-L[1],_[0])),-k[2]),c(s(x(_[1],k[0]),x(-k[1],_[0])),L[2]))),-w[3]),s(c(s(c(s(x(w[1],L[0]),x(-L[1],w[0])),_[2]),s(c(s(x(_[1],L[0]),x(-L[1],_[0])),-w[2]),c(s(x(_[1],w[0]),x(-w[1],_[0])),L[2]))),k[3]),c(s(c(s(x(w[1],k[0]),x(-k[1],w[0])),_[2]),s(c(s(x(_[1],k[0]),x(-k[1],_[0])),-w[2]),c(s(x(_[1],w[0]),x(-w[1],_[0])),k[2]))),-L[3]))))),P=s(s(s(c(s(c(s(x(L[1],A[0]),x(-A[1],L[0])),k[2]),s(c(s(x(k[1],A[0]),x(-A[1],k[0])),-L[2]),c(s(x(k[1],L[0]),x(-L[1],k[0])),A[2]))),_[3]),c(s(c(s(x(L[1],A[0]),x(-A[1],L[0])),_[2]),s(c(s(x(_[1],A[0]),x(-A[1],_[0])),-L[2]),c(s(x(_[1],L[0]),x(-L[1],_[0])),A[2]))),-k[3])),s(c(s(c(s(x(k[1],A[0]),x(-A[1],k[0])),_[2]),s(c(s(x(_[1],A[0]),x(-A[1],_[0])),-k[2]),c(s(x(_[1],k[0]),x(-k[1],_[0])),A[2]))),L[3]),c(s(c(s(x(k[1],L[0]),x(-L[1],k[0])),_[2]),s(c(s(x(_[1],L[0]),x(-L[1],_[0])),-k[2]),c(s(x(_[1],k[0]),x(-k[1],_[0])),L[2]))),-A[3]))),s(s(c(s(c(s(x(k[1],A[0]),x(-A[1],k[0])),w[2]),s(c(s(x(w[1],A[0]),x(-A[1],w[0])),-k[2]),c(s(x(w[1],k[0]),x(-k[1],w[0])),A[2]))),_[3]),c(s(c(s(x(k[1],A[0]),x(-A[1],k[0])),_[2]),s(c(s(x(_[1],A[0]),x(-A[1],_[0])),-k[2]),c(s(x(_[1],k[0]),x(-k[1],_[0])),A[2]))),-w[3])),s(c(s(c(s(x(w[1],A[0]),x(-A[1],w[0])),_[2]),s(c(s(x(_[1],A[0]),x(-A[1],_[0])),-w[2]),c(s(x(_[1],w[0]),x(-w[1],_[0])),A[2]))),k[3]),c(s(c(s(x(w[1],k[0]),x(-k[1],w[0])),_[2]),s(c(s(x(_[1],k[0]),x(-k[1],_[0])),-w[2]),c(s(x(_[1],w[0]),x(-w[1],_[0])),k[2]))),-A[3])))),S=T(I,P);return S[S.length-1]}}function a(s){return(s===3?r:s===4?d:l)(n,e,t,i)}var u=a(3),f=a(4),o=[function(){return 0},function(){return 0},function(s,x){return x[0]-s[0]},function(s,x,c){var T,_=(s[1]-c[1])*(x[0]-c[0]),w=(s[0]-c[0])*(x[1]-c[1]),k=_-w;if(_>0){if(w<=0)return k;T=_+w}else{if(!(_<0)||w>=0)return k;T=-(_+w)}var L=33306690738754716e-32*T;return k>=L||k<=-L?k:u(s,x,c)},function(s,x,c,T){var _=s[0]-T[0],w=x[0]-T[0],k=c[0]-T[0],L=s[1]-T[1],A=x[1]-T[1],I=c[1]-T[1],P=s[2]-T[2],S=x[2]-T[2],E=c[2]-T[2],D=w*I,F=k*A,H=k*L,V=_*I,Z=_*A,K=w*L,G=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 G>W||-G>W?G:f(s,x,c,T)}];function h(s){var x=o[s.length];return x||(x=o[s.length]=a(s.length)),x.apply(void 0,s)}function p(s,x,c,T,_,w,k){return function(L,A,I,P,S){switch(arguments.length){case 0:case 1:return 0;case 2:return T(L,A);case 3:return _(L,A,I);case 4:return w(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 s(E)}}(function(){for(;o.length<=5;)o.push(a(o.length));b.exports=p.apply(void 0,[h].concat(o));for(var s=0;s<=5;++s)b.exports[s]=o[s]})()},{"robust-scale":286,"robust-subtract":288,"robust-sum":289,"two-product":306}],285:[function(g,b,y){var e=g("robust-sum"),n=g("robust-scale");b.exports=function(t,i){if(t.length===1)return n(i,t[0]);if(i.length===1)return n(t,i[0]);if(t.length===0||i.length===0)return[0];var r=[0];if(t.length<i.length)for(var d=0;d<t.length;++d)r=e(r,n(i,t[d]));else for(d=0;d<i.length;++d)r=e(r,n(t,i[d]));return r}},{"robust-scale":286,"robust-sum":289}],286:[function(g,b,y){var e=g("two-product"),n=g("two-sum");b.exports=function(t,i){var r=t.length;if(r===1){var d=e(t[0],i);return d[0]?d:[d[1]]}var l=new Array(2*r),a=[.1,.1],u=[.1,.1],f=0;
3525e(t[0],i,a),a[0]&&(l[f++]=a[0]);for(var o=1;o<r;++o){e(t[o],i,u);var h=a[1];n(h,u[0],a),a[0]&&(l[f++]=a[0]);var p=u[1],s=a[1],x=p+s,c=s-(x-p);a[1]=x,c&&(l[f++]=c)}return a[1]&&(l[f++]=a[1]),f===0&&(l[f++]=0),l.length=f,l}},{"two-product":306,"two-sum":307}],287:[function(g,b,y){b.exports=function(n,t,i,r){var d=e(n,i,r),l=e(t,i,r);if(d>0&&l>0||d<0&&l<0)return!1;var a=e(i,n,t),u=e(r,n,t);return a>0&&u>0||a<0&&u<0?!1:d===0&&l===0&&a===0&&u===0?function(f,o,h,p){for(var s=0;s<2;++s){var x=f[s],c=o[s],T=Math.min(x,c),_=Math.max(x,c),w=h[s],k=p[s],L=Math.min(w,k);if(Math.max(w,k)<T||_<L)return!1}return!0}(n,t,i,r):!0};var e=g("robust-orientation")[3]},{"robust-orientation":284}],288:[function(g,b,y){b.exports=function(e,n){var t=0|e.length,i=0|n.length;if(t===1&&i===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,l=new Array(t+i),a=0,u=0,f=0,o=Math.abs,h=e[u],p=o(h),s=-n[f],x=o(s);p<x?(d=h,(u+=1)<t&&(h=e[u],p=o(h))):(d=s,(f+=1)<i&&(s=-n[f],x=o(s))),u<t&&p<x||f>=i?(r=h,(u+=1)<t&&(h=e[u],p=o(h))):(r=s,(f+=1)<i&&(s=-n[f],x=o(s)));for(var c,T,_=r+d,w=_-r,k=d-w,L=k,A=_;u<t&&f<i;)p<x?(r=h,(u+=1)<t&&(h=e[u],p=o(h))):(r=s,(f+=1)<i&&(s=-n[f],x=o(s))),(k=(d=L)-(w=(_=r+d)-r))&&(l[a++]=k),L=A-((c=A+_)-(T=c-A))+(_-T),A=c;for(;u<t;)(k=(d=L)-(w=(_=(r=h)+d)-r))&&(l[a++]=k),L=A-((c=A+_)-(T=c-A))+(_-T),A=c,(u+=1)<t&&(h=e[u]);for(;f<i;)(k=(d=L)-(w=(_=(r=s)+d)-r))&&(l[a++]=k),L=A-((c=A+_)-(T=c-A))+(_-T),A=c,(f+=1)<i&&(s=-n[f]);return L&&(l[a++]=L),A&&(l[a++]=A),a||(l[a++]=0),l.length=a,l}},{}],289:[function(g,b,y){b.exports=function(e,n){var t=0|e.length,i=0|n.length;if(t===1&&i===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,l=new Array(t+i),a=0,u=0,f=0,o=Math.abs,h=e[u],p=o(h),s=n[f],x=o(s);p<x?(d=h,(u+=1)<t&&(h=e[u],p=o(h))):(d=s,(f+=1)<i&&(s=n[f],x=o(s))),u<t&&p<x||f>=i?(r=h,(u+=1)<t&&(h=e[u],p=o(h))):(r=s,(f+=1)<i&&(s=n[f],x=o(s)));for(var c,T,_=r+d,w=_-r,k=d-w,L=k,A=_;u<t&&f<i;)p<x?(r=h,(u+=1)<t&&(h=e[u],p=o(h))):(r=s,(f+=1)<i&&(s=n[f],x=o(s))),(k=(d=L)-(w=(_=r+d)-r))&&(l[a++]=k),L=A-((c=A+_)-(T=c-A))+(_-T),A=c;for(;u<t;)(k=(d=L)-(w=(_=(r=h)+d)-r))&&(l[a++]=k),L=A-((c=A+_)-(T=c-A))+(_-T),A=c,(u+=1)<t&&(h=e[u]);for(;f<i;)(k=(d=L)-(w=(_=(r=s)+d)-r))&&(l[a++]=k),L=A-((c=A+_)-(T=c-A))+(_-T),A=c,(f+=1)<i&&(s=n[f]);return L&&(l[a++]=L),A&&(l[a++]=A),a||(l[a++]=0),l.length=a,l}},{}],290:[function(g,b,y){b.exports=function(t){return n(e(t))};var e=g("boundary-cells"),n=g("reduce-simplicial-complex")},{"boundary-cells":34,"reduce-simplicial-complex":276}],291:[function(g,b,y){b.exports=function(r,d,l,a){if(l=l||0,a===void 0&&(a=function(c){for(var T=c.length,_=0,w=0;w<T;++w)_=0|Math.max(_,c[w].length);return _-1}(r)),r.length===0||a<1)return{cells:[],vertexIds:[],vertexWeights:[]};var u=function(c,T){for(var _=c.length,w=n.mallocUint8(_),k=0;k<_;++k)w[k]=c[k]<T|0;return w}(d,+l),f=function(c,T){for(var _=c.length,w=T*(T+1)/2*_|0,k=n.mallocUint32(2*w),L=0,A=0;A<_;++A)for(var I=c[A],P=(T=I.length,0);P<T;++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,a),o=function(c,T,_,w){for(var k=c.data,L=c.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=T[S],F=T[E];k[2*I]=S,k[2*I+1]=E,A[I++]=(F-w)/(F-D)}}return c.shape[0]=I,e(A,[I])}(f,d,u,+l),h=function(c,T){var _=n.mallocInt32(2*T),w=c.shape[0],k=c.data;_[0]=0;for(var L=0,A=0;A<w;++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]=w;++L<T;)_[2*L]=_[2*L+1]=w;return _}(f,0|d.length),p=i(a)(r,f.data,h,u),s=function(c){for(var T=0|c.shape[0],_=c.data,w=new Array(T),k=0;k<T;++k)w[k]=[_[2*k],_[2*k+1]];return w}(f),x=[].slice.call(o.data,0,o.shape[0]);return n.free(u),n.free(f.data),n.free(o.data),n.free(h),{cells:p,vertexIds:s,vertexWeights:x}};var e=g("ndarray"),n=g("typedarray-pool"),t=g("ndarray-sort"),i=g("./lib/codegen")},{"./lib/codegen":292,ndarray:259,"ndarray-sort":258,"typedarray-pool":308}],292:[function(g,b,y){b.exports=function(n){return e[n]()};var e=[function(){return function(n,t,i,r){for(var d=n.length,l=0;l<d;++l)n[l].length;return[]}},function(){function n(t,i,r,d){for(var l=0|Math.min(r,d),a=0|Math.max(r,d),u=t[2*l],f=t[2*l+1
3525];u<f;){var o=u+f>>1,h=i[2*o+1];if(h===a)return o;a<h?f=o:u=o+1}return u}return function(t,i,r,d){for(var l=t.length,a=[],u=0;u<l;++u){var f=t[u];if(f.length===2){var o=(d[f[0]]<<0)+(d[f[1]]<<1);if(o===0||o===3)continue;switch(o){case 0:break;case 1:a.push([n(r,i,f[0],f[1])]);break;case 2:a.push([n(r,i,f[1],f[0])])}}}return a}},function(){function n(t,i,r,d){for(var l=0|Math.min(r,d),a=0|Math.max(r,d),u=t[2*l],f=t[2*l+1];u<f;){var o=u+f>>1,h=i[2*o+1];if(h===a)return o;a<h?f=o:u=o+1}return u}return function(t,i,r,d){for(var l=t.length,a=[],u=0;u<l;++u){var f=t[u],o=f.length;if(o===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:a.push([n(r,i,f[0],f[2]),n(r,i,f[0],f[1])]);break;case 2:a.push([n(r,i,f[1],f[0]),n(r,i,f[1],f[2])]);break;case 3:a.push([n(r,i,f[0],f[2]),n(r,i,f[1],f[2])]);break;case 4:a.push([n(r,i,f[2],f[1]),n(r,i,f[2],f[0])]);break;case 5:a.push([n(r,i,f[2],f[1]),n(r,i,f[0],f[1])]);break;case 6:a.push([n(r,i,f[1],f[0]),n(r,i,f[2],f[0])])}}else if(o===2){var h;if((h=(d[f[0]]<<0)+(d[f[1]]<<1))===0||h===3)continue;switch(h){case 0:break;case 1:a.push([n(r,i,f[0],f[1])]);break;case 2:a.push([n(r,i,f[1],f[0])])}}}return a}},function(){function n(t,i,r,d){for(var l=0|Math.min(r,d),a=0|Math.max(r,d),u=t[2*l],f=t[2*l+1];u<f;){var o=u+f>>1,h=i[2*o+1];if(h===a)return o;a<h?f=o:u=o+1}return u}return function(t,i,r,d){for(var l=t.length,a=[],u=0;u<l;++u){var f=t[u],o=f.length;if(o===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:a.push([n(r,i,f[0],f[1]),n(r,i,f[0],f[2]),n(r,i,f[0],f[3])]);break;case 2:a.push([n(r,i,f[1],f[2]),n(r,i,f[1],f[0]),n(r,i,f[1],f[3])]);break;case 3:a.push([n(r,i,f[1],f[2]),n(r,i,f[0],f[2]),n(r,i,f[0],f[3])],[n(r,i,f[1],f[3]),n(r,i,f[1],f[2]),n(r,i,f[0],f[3])]);break;case 4:a.push([n(r,i,f[2],f[0]),n(r,i,f[2],f[1]),n(r,i,f[2],f[3])]);break;case 5:a.push([n(r,i,f[0],f[1]),n(r,i,f[2],f[1]),n(r,i,f[0],f[3])],[n(r,i,f[2],f[1]),n(r,i,f[2],f[3]),n(r,i,f[0],f[3])]);break;case 6:a.push([n(r,i,f[2],f[0]),n(r,i,f[1],f[0]),n(r,i,f[1],f[3])],[n(r,i,f[2],f[3]),n(r,i,f[2],f[0]),n(r,i,f[1],f[3])]);break;case 7:a.push([n(r,i,f[0],f[3]),n(r,i,f[1],f[3]),n(r,i,f[2],f[3])]);break;case 8:a.push([n(r,i,f[3],f[1]),n(r,i,f[3],f[0]),n(r,i,f[3],f[2])]);break;case 9:a.push([n(r,i,f[3],f[1]),n(r,i,f[0],f[1]),n(r,i,f[0],f[2])],[n(r,i,f[3],f[2]),n(r,i,f[3],f[1]),n(r,i,f[0],f[2])]);break;case 10:a.push([n(r,i,f[1],f[0]),n(r,i,f[3],f[0]),n(r,i,f[1],f[2])],[n(r,i,f[3],f[0]),n(r,i,f[3],f[2]),n(r,i,f[1],f[2])]);break;case 11:a.push([n(r,i,f[1],f[2]),n(r,i,f[0],f[2]),n(r,i,f[3],f[2])]);break;case 12:a.push([n(r,i,f[3],f[0]),n(r,i,f[2],f[0]),n(r,i,f[2],f[1])],[n(r,i,f[3],f[1]),n(r,i,f[3],f[0]),n(r,i,f[2],f[1])]);break;case 13:a.push([n(r,i,f[0],f[1]),n(r,i,f[2],f[1]),n(r,i,f[3],f[1])]);break;case 14:a.push([n(r,i,f[2],f[0]),n(r,i,f[1],f[0]),n(r,i,f[3],f[0])])}}else if(o===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:a.push([n(r,i,f[0],f[2]),n(r,i,f[0],f[1])]);break;case 2:a.push([n(r,i,f[1],f[0]),n(r,i,f[1],f[2])]);break;case 3:a.push([n(r,i,f[0],f[2]),n(r,i,f[1],f[2])]);break;case 4:a.push([n(r,i,f[2],f[1]),n(r,i,f[2],f[0])]);break;case 5:a.push([n(r,i,f[2],f[1]),n(r,i,f[0],f[1])]);break;case 6:a.push([n(r,i,f[1],f[0]),n(r,i,f[2],f[0])])}}else if(o===2){var h;if((h=(d[f[0]]<<0)+(d[f[1]]<<1))===0||h===3)continue;switch(h){case 0:break;case 1:a.push([n(r,i,f[0],f[1])]);break;case 2:a.push([n(r,i,f[1],f[0])])}}}return a}}]},{}],293:[function(g,b,y){var e=g("bit-twiddle"),n=g("union-find");function t(f,o){var h=f.length,p=f.length-o.length,s=Math.min;if(p)return p;switch(h){case 0:return 0;case 1:return f[0]-o[0];case 2:return(T=f[0]+f[1]-o[0]-o[1])||s(f[0],f[1])-s(o[0],o[1]);case 3:var x=f[0]+f[1],c=o[0]+o[1];if(T=x+f[2]-(c+o[2]))return T;var T,_=s(f[0],f[1]),w=s(o[0],o[1]);return(T=s(_,f[2])-s(w,o[2]))||s(_+f[2],x)-s(w+o[2],c);default:var k=f.slice(0);k.sort();var L=o.slice(0);L.sort();for(var A=0;A<h;++A)if(p=k[A]-L[A])return p;return 0}}function i(f,o){return t(f[0],o[0])}function r(f,o){if(o){for(var h=f.length,p=new Array(h),s=0;s<h;++s)p[s]=[f[s],o[s]];for(p.sort(i),s=0;s<h;++s)f[s]=p[s][0],o[s]=p[s][1];return f}return f.sort(t),f}function d(f){if(f.length===0)return[];for(var o=1,h=f.length,p=1;p<h;++p){var s=f[p];
3525if(t(s,f[p-1])){if(p===o){o++;continue}f[o++]=s}}return f.length=o,f}function l(f,o){for(var h=0,p=f.length-1,s=-1;h<=p;){var x=h+p>>1,c=t(f[x],o);c<=0?(c===0&&(s=x),h=x+1):c>0&&(p=x-1)}return s}function a(f,o){for(var h=new Array(f.length),p=0,s=h.length;p<s;++p)h[p]=[];for(var x=[],c=(p=0,o.length);p<c;++p)for(var T=o[p],_=T.length,w=1,k=1<<_;w<k;++w){x.length=e.popCount(w);for(var L=0,A=0;A<_;++A)w&1<<A&&(x[L++]=T[A]);var I=l(f,x);if(!(I<0))for(;h[I++].push(p),!(I>=f.length||t(f[I],x)!==0););}return h}function u(f,o){if(o<0)return[];for(var h=[],p=(1<<o+1)-1,s=0;s<f.length;++s)for(var x=f[s],c=p;c<1<<x.length;c=e.nextCombination(c)){for(var T=new Array(o+1),_=0,w=0;w<x.length;++w)c&1<<w&&(T[_++]=x[w]);h.push(T)}return r(h)}y.dimension=function(f){for(var o=0,h=Math.max,p=0,s=f.length;p<s;++p)o=h(o,f[p].length);return o-1},y.countVertices=function(f){for(var o=-1,h=Math.max,p=0,s=f.length;p<s;++p)for(var x=f[p],c=0,T=x.length;c<T;++c)o=h(o,x[c]);return o+1},y.cloneCells=function(f){for(var o=new Array(f.length),h=0,p=f.length;h<p;++h)o[h]=f[h].slice(0);return o},y.compareCells=t,y.normalize=r,y.unique=d,y.findCell=l,y.incidence=a,y.dual=function(f,o){if(!o)return a(d(u(f,0)),f);for(var h=new Array(o),p=0;p<o;++p)h[p]=[];p=0;for(var s=f.length;p<s;++p)for(var x=f[p],c=0,T=x.length;c<T;++c)h[x[c]].push(p);return h},y.explode=function(f){for(var o=[],h=0,p=f.length;h<p;++h)for(var s=f[h],x=0|s.length,c=1,T=1<<x;c<T;++c){for(var _=[],w=0;w<x;++w)c>>>w&1&&_.push(s[w]);o.push(_)}return r(o)},y.skeleton=u,y.boundary=function(f){for(var o=[],h=0,p=f.length;h<p;++h)for(var s=f[h],x=0,c=s.length;x<c;++x){for(var T=new Array(s.length-1),_=0,w=0;_<c;++_)_!==x&&(T[w++]=s[_]);o.push(T)}return r(o)},y.connectedComponents=function(f,o){return o?function(h,p){for(var s=new n(p),x=0;x<h.length;++x)for(var c=h[x],T=0;T<c.length;++T)for(var _=T+1;_<c.length;++_)s.link(c[T],c[_]);var w=[],k=s.ranks;for(x=0;x<k.length;++x)k[x]=-1;for(x=0;x<h.length;++x){var L=s.find(h[x][0]);k[L]<0?(k[L]=w.length,w.push([h[x].slice(0)])):w[k[L]].push(h[x].slice(0))}return w}(f,o):function(h){for(var p=d(r(u(h,0))),s=new n(p.length),x=0;x<h.length;++x)for(var c=h[x],T=0;T<c.length;++T)for(var _=l(p,[c[T]]),w=T+1;w<c.length;++w)s.link(_,l(p,[c[w]]));var k=[],L=s.ranks;for(x=0;x<L.length;++x)L[x]=-1;for(x=0;x<h.length;++x){var A=s.find(l(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(g,b,y){arguments[4][32][0].apply(y,arguments)},{dup:32}],295:[function(g,b,y){arguments[4][293][0].apply(y,arguments)},{"bit-twiddle":294,dup:293,"union-find":296}],296:[function(g,b,y){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 i=t[n];t[n]=t[i],n=i}return n},e.prototype.link=function(n,t){var i=this.find(n),r=this.find(t);if(i!==r){var d=this.ranks,l=this.roots,a=d[i],u=d[r];a<u?l[i]=r:u<a?l[r]=i:(l[r]=i,++d[i])}}},{}],297:[function(g,b,y){b.exports=function(t,i,r){for(var d=i.length,l=t.length,a=new Array(d),u=new Array(d),f=new Array(d),o=new Array(d),h=0;h<d;++h)a[h]=u[h]=-1,f[h]=1/0,o[h]=!1;for(h=0;h<l;++h){var p=t[h];if(p.length!==2)throw new Error("Input must be a graph");var s=p[1],x=p[0];u[x]!==-1?u[x]=-2:u[x]=s,a[s]!==-1?a[s]=-2:a[s]=x}function c(K){if(o[K])return 1/0;var G,W,Q,R,N,U=a[K],ee=u[K];return U<0||ee<0?1/0:(G=i[K],W=i[U],Q=i[ee],R=Math.abs(e(G,W,Q)),N=Math.sqrt(Math.pow(W[0]-Q[0],2)+Math.pow(W[1]-Q[1],2)),R/N)}function T(K,G){var W=S[K],Q=S[G];S[K]=Q,S[G]=W,E[W]=G,E[Q]=K}function _(K){return f[S[K]]}function w(K){return 1&K?K-1>>1:(K>>1)-1}function k(K){for(var G=_(K);;){var W=G,Q=2*K+1,R=2*(K+1),N=K;if(Q<D){var U=_(Q);U<W&&(N=Q,W=U)}if(R<D&&_(R)<W&&(N=R),N===K)return K;T(K,N),K=N}}function L(K){for(var G=_(K);K>0;){var W=w(K);if(W>=0&&G<_(W)){T(K,W),K=W;continue}return K}}function A(){if(D>0){var K=S[0];return T(0,D-1),D-=1,k(0),K}return-1}function I(K,G){var W=S[K];return f[W]===G?K:(f[W]=-1/0,L(K),A(),f[W]=G,L((D+=1)-1))}function P(K){if(!o[K]){o[K]=!0;var G=a[K],W=u[K];a[W]>=0&&(a[W]=G),u[G]>=0&&(u[G]=W),E[G]>=0&&I(E[G],c(G)),E[W]>=0&&I(E[W],c(W))}}var S=[],E=new Array(d);for(h=0;h<d;++h)(f[h]=c(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)o[h]||(E[h]=H.length,H.push(i[h].slice()));H.length;function V(K,G){if(K[G]<0)return G;var W=G,Q=G;do{var R=K[Q];
3525if(!o[Q]||R<0||R===Q||(R=K[Q=R],!o[Q]||R<0||R===Q))break;Q=R,W=K[W]}while(W!==Q);for(var N=G;N!==Q;N=K[N])K[N]=Q;return Q}var Z=[];return t.forEach(function(K){var G=V(a,K[0]),W=V(u,K[1]);if(G>=0&&W>=0&&G!==W){var Q=E[G],R=E[W];Q!==R&&Z.push([Q,R])}}),n.unique(n.normalize(Z)),{positions:H,edges:Z}};var e=g("robust-orientation"),n=g("simplicial-complex")},{"robust-orientation":284,"simplicial-complex":295}],298:[function(g,b,y){b.exports=function(t,i){var r,d,l,a;if(i[0][0]<i[1][0])r=i[0],d=i[1];else{if(!(i[0][0]>i[1][0]))return n(i,t);r=i[1],d=i[0]}if(t[0][0]<t[1][0])l=t[0],a=t[1];else{if(!(t[0][0]>t[1][0]))return-n(t,i);l=t[1],a=t[0]}var u=e(r,d,a),f=e(r,d,l);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(a,l,d),f=e(a,l,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]-a[0]};var e=g("robust-orientation");function n(t,i){var r,d,l,a;if(i[0][0]<i[1][0])r=i[0],d=i[1];else{if(!(i[0][0]>i[1][0])){var u=Math.min(t[0][1],t[1][1]),f=Math.max(t[0][1],t[1][1]),o=Math.min(i[0][1],i[1][1]),h=Math.max(i[0][1],i[1][1]);return f<o?f-o:u>h?u-h:f-h}r=i[1],d=i[0]}t[0][1]<t[1][1]?(l=t[0],a=t[1]):(l=t[1],a=t[0]);var p=e(d,r,l);return p||(p=e(d,r,a))||a-d}},{"robust-orientation":284}],299:[function(g,b,y){b.exports=function(f){for(var o=f.length,h=2*o,p=new Array(h),s=0;s<o;++s){var x=f[s],c=x[0][0]<x[1][0];p[2*s]=new u(x[0][0],x,c,s),p[2*s+1]=new u(x[1][0],x,!c,s)}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 T=n(i),_=[],w=[],k=[];for(s=0;s<h;){for(var L=p[s].x,A=[];s<h;){var I=p[s];if(I.x!==L)break;s+=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 a(I.segment[0][1],I.index,!0,!0)),A.push(new a(I.segment[1][1],I.index,!1,!1))):(A.push(new a(I.segment[1][1],I.index,!0,!1)),A.push(new a(I.segment[0][1],I.index,!1,!0)))):T=I.create?T.insert(I.segment,I.index):T.remove(I.segment)}_.push(T.root),w.push(L),k.push(A)}return new r(_,w,k)};var e=g("binary-search-bounds"),n=g("functional-red-black-tree"),t=g("robust-orientation"),i=g("./lib/order-segments");function r(f,o,h){this.slabs=f,this.coordinates=o,this.horizontal=h}function d(f,o){return f.y-o}function l(f,o){for(var h=null;f;){var p,s,x=f.key;x[0][0]<x[1][0]?(p=x[0],s=x[1]):(p=x[1],s=x[0]);var c=t(p,s,o);if(c<0)f=f.left;else if(c>0)if(o[0]!==x[1][0])h=f,f=f.right;else{if(T=l(f.right,o))return T;f=f.left}else{if(o[0]!==x[1][0])return f;var T;if(T=l(f.right,o))return T;f=f.left}}return h}function a(f,o,h,p){this.y=f,this.index=o,this.start=h,this.closed=p}function u(f,o,h,p){this.x=f,this.segment=o,this.create=h,this.index=p}r.prototype.castUp=function(f){var o=e.le(this.coordinates,f[0]);if(o<0)return-1;this.slabs[o];var h=l(this.slabs[o],f),p=-1;if(h&&(p=h.value),this.coordinates[o]===f[0]){var s=null;if(h&&(s=h.key),o>0){var x=l(this.slabs[o-1],f);x&&(s?i(x.key,s)>0&&(s=x.key,p=x.value):(p=x.value,s=x.key))}var c=this.horizontal[o];if(c.length>0){var T=e.ge(c,f[1],d);if(T<c.length){var _=c[T];if(f[1]===_.y){if(_.closed)return _.index;for(;T<c.length-1&&c[T+1].y===f[1];)if((_=c[T+=1]).closed)return _.index;if(_.y===f[1]&&!_.start){if((T+=1)>=c.length)return p;_=c[T]}}if(_.start)if(s){var w=t(s[0],s[1],[f[0],_.y]);s[0][0]>s[1][0]&&(w=-w),w>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(g,b,y){var e=g("robust-dot-product"),n=g("robust-sum");function t(r,d){var l=n(e(r,d),[d[d.length-1]]);return l[l.length-1]}function i(r,d,l,a){var u=-d/(a-d);u<0?u=0:u>1&&(u=1);for(var f=1-u,o=r.length,h=new Array(o),p=0;p<o;++p)h[p]=u*r[p]+f*l[p];return h}b.exports=function(r,d){for(var l=[],a=[],u=t(r[r.length-1],d),f=r[r.length-1],o=r[0],h=0;h<r.length;++h,f=o){var p=t(o=r[h],d);if(u<0&&p>0||u>0&&p<0){var s=i(f,p,o,u);l.push(s),a.push(s.slice())}p<0?a.push(o.slice()):p>0?l.push(o.slice()):(l.push(o.slice()),a.push(o.slice())),u=p}return{positive:l,negative:a}}
3525,b.exports.positive=function(r,d){for(var l=[],a=t(r[r.length-1],d),u=r[r.length-1],f=r[0],o=0;o<r.length;++o,u=f){var h=t(f=r[o],d);(a<0&&h>0||a>0&&h<0)&&l.push(i(u,h,f,a)),h>=0&&l.push(f.slice()),a=h}return l},b.exports.negative=function(r,d){for(var l=[],a=t(r[r.length-1],d),u=r[r.length-1],f=r[0],o=0;o<r.length;++o,u=f){var h=t(f=r[o],d);(a<0&&h>0||a>0&&h<0)&&l.push(i(u,h,f,a)),h<=0&&l.push(f.slice()),a=h}return l}},{"robust-dot-product":281,"robust-sum":289}],301:[function(g,b,y){(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(l){return i(d(l),arguments)}function t(l,a){return n.apply(null,[l].concat(a||[]))}function i(l,a){var u,f,o,h,p,s,x,c,T,_=1,w=l.length,k="";for(f=0;f<w;f++)if(typeof l[f]=="string")k+=l[f];else if(typeof l[f]=="object"){if((h=l[f]).keys)for(u=a[_],o=0;o<h.keys.length;o++){if(u==null)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',h.keys[o],h.keys[o-1]));u=u[h.keys[o]]}else u=h.param_no?a[h.param_no]:a[_++];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)&&(c=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)||c&&!h.sign?T="":(T=c?"+":"-",u=u.toString().replace(e.sign,"")),s=h.pad_char?h.pad_char==="0"?"0":h.pad_char.charAt(1):" ",x=h.width-(T+u).length,p=h.width&&x>0?s.repeat(x):"",k+=h.align?T+u+p:s==="0"?T+p+u:p+T+u)}return k}var r=Object.create(null);function d(l){if(r[l])return r[l];for(var a,u=l,f=[],o=0;u;){if((a=e.text.exec(u))!==null)f.push(a[0]);else if((a=e.modulo.exec(u))!==null)f.push("%");else{if((a=e.placeholder.exec(u))===null)throw new SyntaxError("[sprintf] unexpected placeholder");if(a[2]){o|=1;var h=[],p=a[2],s=[];if((s=e.key.exec(p))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");for(h.push(s[1]);(p=p.substring(s[0].length))!=="";)if((s=e.key_access.exec(p))!==null)h.push(s[1]);else{if((s=e.index_access.exec(p))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");h.push(s[1])}a[2]=h}else o|=2;if(o===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");f.push({placeholder:a[0],param_no:a[1],keys:a[2],sign:a[3],pad_char:a[4],align:a[5],width:a[6],precision:a[7],type:a[8]})}u=u.substring(a[0].length)}return r[l]=f}y!==void 0&&(y.sprintf=n,y.vsprintf=t),typeof window<"u"&&(window.sprintf=n,window.vsprintf=t)})()},{}],302:[function(g,b,y){b.exports=function(r,d){if(r.dimension<=0)return{positions:[],cells:[]};if(r.dimension===1)return function(u,f){for(var o=n(u,f),h=o.length,p=new Array(h),s=new Array(h),x=0;x<h;++x)p[x]=[o[x]],s[x]=[x];return{positions:p,cells:s}}(r,d);var l=r.order.join()+"-"+r.dtype,a=i[l];return d=+d||0,a||(a=i[l]=function(u,f){var o=u.length+"d",h=t[o];if(h)return h(e,u,f)}(r.order,r.dtype)),a(r,d)};var e=g("ndarray-extract-contour"),n=g("zero-crossings"),t={"2d":function(r,d,l){var a=r({order:d,scalarArguments:3,getters:l==="generic"?[0]:void 0,phase:function(u,f,o,h){return u>h|0},vertex:function(u,f,o,h,p,s,x,c,T,_,w,k,L){var A=(x<<0)+(c<<1)+(T<<2)+(_<<3)|0;if(A!==0&&A!==15)switch(A){case 0:w.push([u-.5,f-.5]);break;case 1:w.push([u-.25-.25*(h+o-2*L)/(o-h),f-.25-.25*(p+o-2*L)/(o-p
3525)]);break;case 2:w.push([u-.75-.25*(-h-o+2*L)/(h-o),f-.25-.25*(s+h-2*L)/(h-s)]);break;case 3:w.push([u-.5,f-.5-.5*(p+o+s+h-4*L)/(o-p+h-s)]);break;case 4:w.push([u-.25-.25*(s+p-2*L)/(p-s),f-.75-.25*(-p-o+2*L)/(p-o)]);break;case 5:w.push([u-.5-.5*(h+o+s+p-4*L)/(o-h+p-s),f-.5]);break;case 6:w.push([u-.5-.25*(-h-o+s+p)/(h-o+p-s),f-.5-.25*(-p-o+s+h)/(p-o+h-s)]);break;case 7:w.push([u-.75-.25*(s+p-2*L)/(p-s),f-.75-.25*(s+h-2*L)/(h-s)]);break;case 8:w.push([u-.75-.25*(-s-p+2*L)/(s-p),f-.75-.25*(-s-h+2*L)/(s-h)]);break;case 9:w.push([u-.5-.25*(h+o+-s-p)/(o-h+s-p),f-.5-.25*(p+o+-s-h)/(o-p+s-h)]);break;case 10:w.push([u-.5-.5*(-h-o-s-p+4*L)/(h-o+s-p),f-.5]);break;case 11:w.push([u-.25-.25*(-s-p+2*L)/(s-p),f-.75-.25*(p+o-2*L)/(o-p)]);break;case 12:w.push([u-.5,f-.5-.5*(-p-o-s-h+4*L)/(p-o+s-h)]);break;case 13:w.push([u-.75-.25*(h+o-2*L)/(o-h),f-.25-.25*(-s-h+2*L)/(s-h)]);break;case 14:w.push([u-.25-.25*(-h-o+2*L)/(h-o),f-.25-.25*(-p-o+2*L)/(p-o)]);break;case 15:w.push([u-.5,f-.5])}},cell:function(u,f,o,h,p,s,x,c,T){p?c.push([u,f]):c.push([f,u])}});return function(u,f){var o=[],h=[];return a(u,o,h,f),{positions:o,cells:h}}}},i={}},{"ndarray-extract-contour":251,"zero-crossings":318}],303:[function(g,b,y){(function(e){(function(){b.exports=function r(d,l,a){a=a||{};var u=i[d];u||(u=i[d]={" ":{data:new Float32Array(0),shape:.2}});var f=u[l];if(!f)if(l.length<=1||!/\d/.test(l))f=u[l]=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(l,{triangles:!0,font:d,textAlign:a.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var o=l.split(/(\d|\s)/),h=new Array(o.length),p=0,s=0,x=0;x<o.length;
3525++x)h[x]=r(d,o[x]),p+=h[x].data.length,s+=h[x].shape,x>0&&(s+=.02);var c=new Float32Array(p),T=0,_=-.5*s;for(x=0;x<h.length;++x){for(var w=h[x].data,k=0;k<w.length;k+=2)c[T++]=w[k]+_,c[T++]=w[k+1];_+=h[x].shape+.02}f=u[l]={data:c,shape:s}}return f};var n=g("vectorize-text"),t=window||e.global||{},i=t.__TEXT_CACHE||{};t.__TEXT_CACHE={}}).call(this)}).call(this,g("_process"))},{_process:5,"vectorize-text":311}],304:[function(g,b,y){var e=g("parse-unit");b.exports=t;function n(i,r){var d=e(getComputedStyle(i).getPropertyValue(r));return d[0]*t(d[1],i)}function t(i,r){switch(r=r||document.body,i=(i||"px").trim().toLowerCase(),r!==window&&r!==document||(r=document.body),i){case"%":return r.clientHeight/100;case"ch":case"ex":return function(d,l){var a=document.createElement("div");a.style["font-size"]="128"+d,l.appendChild(a);var u=n(a,"font-size")/128;return l.removeChild(a),u}(i,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(g,b,y){b.exports=function(p){var s=(p=p||{}).center||[0,0,0],x=p.up||[0,1,0],c=p.right||u(x),T=p.radius||1,_=p.theta||0,w=p.phi||0;if(s=[].slice.call(s,0,3),x=[].slice.call(x,0,3),r(x,x),c=[].slice.call(c,0,3),r(c,c),"eye"in p){var k=p.eye,L=[k[0]-s[0],k[1]-s[1],k[2]-s[2]];i(c,L,x),l(c[0],c[1],c[2])<1e-6?c=u(x):r(c,c),T=l(L[0],L[1],L[2]);var A=d(x,L)/T,I=d(c,L)/T;w=Math.acos(A),_=Math.acos(I)}return T=Math.log(T),new f(p.zoomMin,p.zoomMax,s,x,c,T,_,w)};var e=g("filtered-vector"),n=g("gl-mat4/invert"),t=g("gl-mat4/rotate"),i=g("gl-vec3/cross"),r=g("gl-vec3/normalize"),d=g("gl-vec3/dot");function l(p,s,x){return Math.sqrt(Math.pow(p,2)+Math.pow(s,2)+Math.pow(x,2))}function a(p){return Math.min(1,Math.max(-1,p))}function u(p){var s=Math.abs(p[0]),x=Math.abs(p[1]),c=Math.abs(p[2]),T=[0,0,0];s>Math.max(x,c)?T[2]=1:x>Math.max(s,c)?T[0]=1:T[1]=1;for(var _=0,w=0,k=0;k<3;++k)_+=p[k]*p[k],w+=T[k]*p[k];for(k=0;k<3;++k)T[k]-=w/_*p[k];return r(T,T),T}function f(p,s,x,c,T,_,w,k){this.center=e(x),this.up=e(c),this.right=e(T),this.radius=e([_]),this.angle=e([w,k]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(p,s),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 o=f.prototype;o.setDistanceLimits=function(p,s){p=p>0?Math.log(p):-1/0,s=s>0?Math.log(s):1/0,s=Math.max(s,p),this.radius.bounds[0][0]=p,this.radius.bounds[1][0]=s},o.getDistanceLimits=function(p){var s=this.radius.bounds[0];return p?(p[0]=Math.exp(s[0][0]),p[1]=Math.exp(s[1][0]),p):[Math.exp(s[0][0]),Math.exp(s[1][0])]},o.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 s=this.computedUp,x=this.computedRight,c=0,T=0,_=0;_<3;++_)T+=s[_]*x[_],c+=s[_]*s[_];var w=Math.sqrt(c),k=0;for(_=0;_<3;++_)x[_]-=s[_]*T/c,k+=x[_]*x[_],s[_]/=w;var L=Math.sqrt(k);for(_=0;_<3;++_)x[_]/=L;var A=this.computedToward;i(A,s,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,G=H,W=-E*H,Q=-D*H,R=F,N=this.computedEye,U=this.computedMatrix;for(_=0;_<3;++_){var ee=Z*x[_]+K*A[_]+G*s[_];U[4*_+1]=W*x[_]+Q*A[_]+R*s[_],U[4*_+2]=ee,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=l(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},o.getMatrix=function(p,s){this.recalcMatrix(p);var x=this.computedMatrix;if(s){for(var c=0;c<16;++c)s[c]=x[c];return s}return x};var h=[0,0,0];o.rotate=function(p,s,x,c){if(this.angle.move(p,s,x),c){this.recalcMatrix(p);var T=this.computedMatrix;h[0]=T[2],h[1]=T[6],h[2]=T[10];for(var _=this.computedUp,w=this.computedRight,k=this.computedToward,L=0;L<3;++L)T[4*L]=_[L],T[4*L+1]=w[L],T[4*L+2]=k[L];for(t(T,T,c,h),L=0;L<3;++L)_[L]=T[4*L],w[L]=T[4*L+1];this.up.set(p,_[0],_[1],_[2]),this.right.set(p,w[0],w[1],w[2])}},o.pan=function(p,s,x,c){s=s||0,x=x||0,c=c||0,this.recalcMatrix(p);var T=this.computedMatrix,_=(Math.exp(this.computedRadius[0]),T[1]),w=T[5],k=T[9],L=l(_,w,k);_/=L,w/=L,k/=L;var A=T[0],I=T[4],P=T[8],S=A*_+I*w+P*k,E=l(A-=_*S,I-=w*S,P-=k*S),D=(A/=E)*s+_*x,F=(I/=E)*s+w*x,H=(P/=E)*s+k*x;this.center.move(p,D,F,H);var V=Math.exp(this.computedRadius[0]);V=Math.max(1e-4,V+c),this.radius.set(p,Math.log(V))},o.translate=function(p,s,x,c){this.center.move(p,s||0,x||0,c||0)},o.setMatrix=function(p,s,x,c){var T=1;typeof x=="number"&&(T=0|x),(T<0||T>3)&&(T=1);var _=(T+2)%3;s||(this.recalcMatrix(p),s=this.computedMatrix);var w=s[T],k=s[T+4],L=s[T+8];if(c){var A=Math.abs(w),I=Math.abs(k),P=Math.abs(L),S=Math.max(A,I,P);A===S?(w=w<0?-1:1,k=L=0):P===S?(L=L<0?-1:1,w=k=0):(k=k<0?-1:1,w=L=0)}else{var E=l(w,k,L);w/=E,k/=E,L/=E}var D,F,H=s[_],V=s[_+4],Z=s[_+8],K=H*w+V*k+Z*L,G=l(H-=w*K,V-=k*K,Z-=L*K),W=k*(Z/=G)-L*(V/=G),Q=L*(H/=G)-w*Z,R=w*V-k*H,N=l(W,Q,R);if(W/=N,Q/=N,R/=N,this.center.jump(p,fe,ge,ke),this.radius.idle(p),this.up.jump(p,w,k,L),this.right.jump(p,H,V,Z),T===2){var U=s[1],ee=s[5],j=s[9],X=U*H+ee*V+j*Z,J=U*W+ee*Q+j*R;D=oe<0?-Math.PI/2:Math.PI/2,F=Math.atan2(J,X)}else{var re=s[2],ne=s[6],se=s[10],oe=re*w+ne*k+se*L,pe=re*H+ne*V+se*Z,ce=re*W+ne*Q+se*R;D=Math.asin(a(oe)),F=Math.atan2(ce,pe)}this.angle.jump(p,F,D),this.recalcMatrix(p);var de=s[2],xe=s[6],_e=s[10],we=this.computedMatrix;n(we,s);var Ee=we[15],fe=we[12]/Ee,ge=we[13]/Ee,ke=we[14]/Ee,be=Math.exp(this.computedRadius[0]);this.center.jump(p,fe-de*be,ge-xe*be,ke-_e*be)},o.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},o.idle=function(p){this.center.idle(p),this.up.idle(p),this.right.idle(p),this.radius.idle(p),this.angle.idle(p)},o.flush=function(p){this.center.flush(p),this.up.flush(p),this.right.flush(p),this.radius.flush(p),this.angle.flush(p)},o.setDistance=function(p,s){s>0&&this.radius.set(p,Math.log(s))},o.lookAt=function(p,s,x,c){this.recalcMatrix(p),s=s||this.computedEye,x=x||this.computedCenter;var T=(c=c||this.computedUp)[0],_=c[1],w=c[2],k=l(T,_,w);if(!(k<1e-6)){T/=k,_/=k,w/=k;var L=s[0]-x[0],A=s[1]-x[1],I=s[2]-x[2],P=l(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=T*E+_*D+w*F,V=l(E-=H*T,D-=H*_,F-=H*w);if(!(V<.01&&(V=l(E=_*I-w*A,D=w*L-T*I,F=T*A-_*L))<1e-6)){E/=V,D/=V,F/=V,this.up.set(p,T,_,w),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-w*D,K=w*E-T*F,G=T*D-_*E,W=l(Z,K,G),Q=T*L+_*A+w*I,R=E*L+D*A+F*I,N=(Z/=W)*L+(K/=W)*A+(G/=W)*I,U=Math.asin(a(Q)),ee=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-ee),ne=Math.abs(X-ee),se=Math.abs(X-2*Math.PI-ee);re<ne&&(X+=2*Math.PI),se<ne&&(X-=2*Math.PI),this.angle.jump(this.angle.lastT(),X,J),this.angle.set(p,ee,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(g,b,y){b.exports=function(n,t,i){var r=n*t,d=e*n,l=d-(d-n),a=n-l,u=e*t,f=u-(u-t),o=t-f,h=a*o-(r-l*f-a*f-l*o);return i?(i[0]=h,i[1]=r,i):[h,r]};var e=+(Math.pow(2,27)+1)},{}],307:[function(g,b,y){b.exports=function(e,n,t){var i=e+n,r=i-e,d=n-r,l=e-(i-r);return t?(t[0]=l+d,t[1]=i,t):[l+d,i]}},{}],308:[function(g,b,y){(function(e){(function(){var n=g("bit-twiddle"),t=g("dup"),i=g("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",l=typeof BigInt64Array<"u",a=e.__TYPEDARRAY_POOL;a.UINT8C||(a.UINT8C=t([32,0])),a.BIGUINT64||(a.BIGUINT64=t([32,0])),a.BIGINT64||(a.BIGINT64=t([32,0])),a.BUFFER||(a.BUFFER=t([32,0]));var u=a.DATA,f=a.BUFFER;function o(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 s(E){return new Uint16Array(h(2*E),0,E)}function x(E){return new Uint32Array(h(4*E),0,E)}function c(E){return new Int8Array(h(E),0,E)}function T(E){return new Int16Array(h(2*E),0,E)}function _(E){return new Int32Array(h(4*E),0,E)}function w(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 l?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 i(E)}y.free=function(E){if(i.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)}},y.freeUint8=y.freeUint16=y.freeUint32=y.freeBigUint64=y.freeInt8=y.freeInt16=y.freeInt32=y.freeBigInt64=y.freeFloat32=y.freeFloat=y.freeFloat64=y.freeDouble=y.freeUint8Clamped=y.freeDataView=function(E){o(E.buffer)},y.freeArrayBuffer=o,y.freeBuffer=function(E){f[n.log2(E.length)].push(E)},y.malloc=function(E,D){if(D===void 0||D==="arraybuffer")return h(E);switch(D){case"uint8":return p(E);case"uint16":return s(E);case"uint32":return x(E);case"int8":return c(E);case"int16":return T(E);case"int32":return _(E);case"float":case"float32":return w(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},y.mallocArrayBuffer=h,y.mallocUint8=p,y.mallocUint16=s,y.mallocUint32=x,y.mallocInt8=c,y.mallocInt16=T,y.mallocInt32=_,y.mallocFloat32=y.mallocFloat=w,y.mallocFloat64=y.mallocDouble=k,y.mallocUint8Clamped=L,y.mallocBigUint64=A,y.mallocBigInt64=I,y.mallocDataView=P,y.mallocBuffer=S,y.clearCache=function(){for(var E=0;E<32;++E)a.UINT8[E].length=0,a.UINT16[E].length=0,a.UINT32[E].length=0,a.INT8[E].length=0,a.INT16[E].length=0,a.INT32[E].length=0,a.FLOAT[E].length=0,a.DOUBLE[E].length=0,a.BIGUINT64[E].length=0,a.BIGINT64[E].length=0,a.UINT8C[E].length=0,u[E].length=0,f[E].length=0}}).call(this)}).call(this,m!==void 0?m:typeof self<"u"?self:typeof window<"u"?window:{})},{"bit-twiddle":32,buffer:3,dup:65}],309:[function(g,b,y){function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var i=0;i<t;++i)this.roots[i]=i,this.ranks[i]=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 i=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[i]!==t;){var d=r[i];r[i]=t,i=d}return t},n.link=function(t,i){var r=this.find(t),d=this.find(i);if(r!==d){var l=this.ranks,a=this.roots,u=l[r],f=l[d];u<f?a[r]=d:f<u?a[d]=r:(a[d]=r,++l[r])}}},{}],310:[function(g,b,y){b.exports=function(e,n,t){return e.length===0?e:n?(t||e.sort(n),function(i,r){for(var d=1,l=i.length,a=i[0],u=i[0],f=1;f<l;++f)if(u=a,r(a=i[f],u)){if(f===d){d++;continue}i[d++]=a}return i.length=d,i}(e,n)):(t||e.sort(),function(i){for(var r=1,d=i.length,l=i[0],a=i[0],u=1;u<d;++u,a=l)if(a=l,(l=i[u])!==a){if(u===r){r++;continue}i[r++]=l}return i.length=r,i}(e))}},{}],311:[function(g,b,y){b.exports=function(i,r){return typeof r=="object"&&r!==null||(r={}),e(i,r.canvas||n,r.context||t,r)};var e=g("./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(g,b,y){b.exports=function(o,h,p,s){var x=64,c=1.25,T={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return s&&(s.size&&s.size>0&&(x=s.size),s.lineSpacing&&s.lineSpacing>0&&(c=s.lineSpacing),s.styletags&&s.styletags.breaklines&&(T.breaklines=!!s.styletags.breaklines),s.styletags&&s.styletags.bolds&&(T.bolds=!!s.styletags.bolds),s.styletags&&s.styletags.italics&&(T.italics=!!s.styletags.italics),s.styletags&&s.styletags.subscripts&&(T.subscripts=!!s.styletags.subscripts),s.styletags&&s.styletags.superscripts&&(T.superscripts=!!s.styletags.superscripts)),p.font=[s.fontStyle,s.fontVariant,s.fontWeight,x+"px",s.font].filter(function(_){return _}).join(" "),p.textAlign="start",p.textBaseline="alphabetic",p.direction="ltr",f(function(_,w,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=l("b","b|",k,S)),I.italics===!0&&(S=l("i","i|",k,S)),I.superscripts===!0&&(S=l("sup","+1",k,S)),I.subscripts===!0&&(S=l("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,G=D.split(` 3527`),W=G.length,Q=Math.round(A*L),R=L,N=2*L,U=0,ee=W*Q+N;_.height<ee&&(_.height=ee),w.fillStyle="#000",w.fillRect(0,0,_.width,_.height),w.fillStyle="#fff";var j=0,X="";function J(){if(X!==""){var xe=w.measureText(X).width;
3527w.fillText(X,R+V,N+Z),V+=xe}}function re(){return Math.round(K)+"px "}function ne(xe,_e){var we=""+w.font;if(I.subscripts===!0){var Ee=xe.indexOf("-"),fe=_e.indexOf("-"),ge=Ee>-1?parseInt(xe[1+Ee]):0,ke=fe>-1?parseInt(_e[1+fe]):0;ge!==ke&&(we=we.replace(re(),"?px "),K*=Math.pow(.75,ke-ge),we=we.replace("?px ",re())),Z+=.25*Q*(ke-ge)}if(I.superscripts===!0){var be=xe.indexOf("+"),Se=_e.indexOf("+"),Oe=be>-1?parseInt(xe[1+be]):0,De=Se>-1?parseInt(_e[1+Se]):0;Oe!==De&&(we=we.replace(re(),"?px "),K*=Math.pow(.75,De-Oe),we=we.replace("?px ",re())),Z-=.25*Q*(De-Oe)}if(I.bolds===!0){var je=xe.indexOf("b|")>-1,Je=_e.indexOf("b|")>-1;!je&&Je&&(we=ze?we.replace("italic ","italic bold "):"bold "+we),je&&!Je&&(we=we.replace("bold ",""))}if(I.italics===!0){var ze=xe.indexOf("i|")>-1,Ue=_e.indexOf("i|")>-1;!ze&&Ue&&(we="italic "+we),ze&&!Ue&&(we=we.replace("italic ",""))}w.font=we}for(F=0;F<W;++F){var se=G[F]+` 3528`;for(V=0,Z=F*Q,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+Q*W;return n(w.getImageData(0,0,ce,de).data,[de,ce,4]).pick(-1,-1,0).transpose(1,0)}(h,p,o,x,c,T),s,x)},b.exports.processPixels=f;var e=g("surface-nets"),n=g("ndarray"),t=g("simplify-planar-graph"),i=g("clean-pslg"),r=g("cdt2d"),d=g("planar-graph-to-polyline");function l(o,h,p,s){for(var x="<"+o+">",c="</"+o+">",T=x.length,_=c.length,w=h[0]==="+"||h[0]==="-",k=0,L=-_;k>-1&&(k=p.indexOf(x,k))!==-1&&(L=p.indexOf(c,k+T))!==-1&&!(L<=k);){for(var A=k;A<L+_;++A)if(A<k+T||A>=L)s[A]=null,p=p.substr(0,A)+" "+p.substr(A+1);else if(s[A]!==null){var I=s[A].indexOf(h[0]);I===-1?s[A]+=h:w&&(s[A]=s[A].substr(0,I+1)+(1+parseInt(s[A][I+1]))+s[A].substr(I+2))}var P=k+T,S=p.substr(P,L-P).indexOf(x);k=S!==-1?S:L+_}return s}function a(o,h){var p=e(o,128);return h?t(p.cells,p.positions,.25):{edges:p.cells,positions:p.positions}}function u(o,h,p,s){var x=a(o,s),c=function(F,H,V){for(var Z=H.textAlign||"start",K=H.textBaseline||"alphabetic",G=[1<<30,1<<30],W=[0,0],Q=F.length,R=0;R<Q;++R)for(var N=F[R],U=0;U<2;++U)G[U]=0|Math.min(G[U],N[U]),W[U]=0|Math.max(W[U],N[U]);var ee=0;switch(Z){case"center":ee=-.5*(G[0]+W[0]);break;case"right":case"end":ee=-W[0];break;case"left":case"start":ee=-G[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+Z+"'")}var j=0;switch(K){case"hanging":case"top":j=-G[1];break;case"middle":j=-.5*(G[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]-G[0]):"height"in H&&(X=H.height/(W[1]-G[1])),F.map(function(J){return[X*(J[0]+ee),X*(J[1]+j)]})}(x.positions,h,p),T=x.edges,_=h.orientation==="ccw";if(i(c,T),h.polygons||h.polygon||h.polyline){for(var w=d(T,c),k=new Array(w.length),L=0;L<w.length;++L){for(var A=w[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]=c[S[D]].slice();_&&E.reverse(),I[P]=E}k[L]=I}return k}return h.triangles||h.triangulate||h.triangle?{cells:r(c,T,{delaunay:!1,exterior:!1,interior:!0}),positions:c}:{edges:T,positions:c}}function f(o,h,p){try{return u(o,h,p,!0)}catch{}try{return u(o,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(g,b,y){(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,i=Object.freeze({});if(t.set(i,1),t.get(i)===1)return void(b.exports=WeakMap);e=!0}}var r=Object.getOwnPropertyNames,d=Object.defineProperty,l=Object.isExtensible,a="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),a="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(c)}}),"getPropertyNames"in Object){var o=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(k){return o(k).filter(c)}})}(function(){var k=Object.freeze;
3528d(Object,"freeze",{value:function(I){return T(I),k(I)}});var L=Object.seal;d(Object,"seal",{value:function(I){return T(I),L(I)}});var A=Object.preventExtensions;d(Object,"preventExtensions",{value:function(I){return T(I),A(I)}})})();var h=!1,p=0,s=function(){this instanceof s||w();var k=[],L=[],A=p++;return Object.create(s.prototype,{get___:{value:_(function(I,P){var S,E=T(I);return E?A in E?E[A]:P:(S=k.indexOf(I))>=0?L[S]:P})},has___:{value:_(function(I){var P=T(I);return P?A in P:k.indexOf(I)>=0})},set___:{value:_(function(I,P){var S,E=T(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=T(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)})}})};s.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 s||w();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 s),I.set(S,E)),this}:function(S,E){if(P)try{A.set(S,E)}catch{I||(I=new s),I.set___(S,E)}else A.set(S,E);return this},Object.create(s.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=s.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=s)}function x(k){k.permitHostObjects___&&k.permitHostObjects___(x)}function c(k){return!(k.substr(0,8)=="weakmap:"&&k.substr(k.length-3)==="___")}function T(k){if(k!==Object(k))throw new TypeError("Not an object: "+k);var L=k[a];if(L&&L.key===k)return L;if(l(k)){L={key:k};try{return d(k,a,{value:L,writable:!1,enumerable:!1,configurable:!1}),L}catch{return}}}function _(k){return k.prototype=null,Object.freeze(k)}function w(){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(g,b,y){var e=g("./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 i=t.valueOf(n);return i&&i.identity===n?i:e(t,n)}}},{"./hidden-store.js":315}],315:[function(g,b,y){b.exports=function(e,n){var t={identity:n},i=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(r){return r!==n?i.apply(this,arguments):t},writable:!0}),t}},{}],316:[function(g,b,y){var e=g("./create-store.js");b.exports=function(){var n=e();return{get:function(t,i){var r=n(t);return r.hasOwnProperty("value")?r.value:i},set:function(t,i){return n(t).value=i,this},has:function(t){return"value"in n(t)},delete:function(t){return delete n(t).value}}}},{"./create-store.js":314}],317:[function(g,b,y){var e,n=function(){return function(t,i,r,d,l,a){var u=t[0],f=r[0],o=[0],h=f;d|=0;var p=0,s=f;for(p=0;p<u;++p){var x=i[d]-a,c=i[d+h]-a;x>=0!=c>=0&&l.push(o[0]+.5+.5*(x+c)/(x-c)),d+=s,++o[0]}}};b.exports=(e={funcName:"zeroCrossings"},function(t){var i={};return function(r,d,l){var a=r.dtype,u=r.order,f=[a,u.join()].join(),o=i[f];return o||(i[f]=o=t([a,u])),o(r.shape.slice(0),r.data,r.stride,0|r.offset,d,l)}}(n.bind(void 0,e)))},{}],318:[function(g,b,y){b.exports=function(n,t){var i=[];return t=+t||0,e(n.hi(n.shape[0]-1),i,t),i};var e=g("./lib/zc-core")},{"./lib/zc-core":317}]},{},[6])(6)})}).call(this)}).call(this,typeof Gi<"u"?Gi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[27])(27)})})(Lh);
3528var wd=yd(Lh.exports);function Td(di){let Kn,v,$,te;return $=new Eh({}),{c(){Kn=tc("div"),v=tc("div"),Mc($.$$.fragment),ri(v,"class","h-5 dark:text-white opacity-50"),ri(Kn,"class","h-full min-h-[15rem] flex justify-center items-center")},m(m,g){cl(m,Kn,g),ll(Kn,v),Ac($,v,null),te=!0},p:_s,i(m){te||(Sl($.$$.fragment,m),te=!0)},o(m){Al($.$$.fragment,m),te=!1},d(m){m&&ul(Kn),Sc($)}}}function kd(di){let Kn,v,$;return{c(){Kn=tc("div"),v=tc("img"),ri(v,"class","w-full max-h-[30rem] object-contain"),Ah(v.src,$=di[0].plot)||ri(v,"src",$),ri(Kn,"class","output-image w-full flex justify-center items-center relative")},m(te,m){cl(te,Kn,m),ll(Kn,v)},p(te,m){m&1&&!Ah(v.src,$=te[0].plot)&&ri(v,"src",$)},i:_s,o:_s,d(te){te&&ul(Kn)}}}function Md(di){let Kn;return{c(){Kn=tc("div"),ri(Kn,"id","bokehDiv")},m(v,$){cl(v,Kn,$)},p:_s,i:_s,o:_s,d(v){v&&ul(Kn)}}}function Ad(di){let Kn;return{c(){Kn=tc("div")},m(v,$){cl(v,Kn,$),di[3](Kn)},p:_s,i:_s,o:_s,d(v){v&&ul(Kn),di[3](null)}}}function Sd(di){let Kn,v,$,te;const m=[Ad,Md,kd,Td],g=[];function b(y,e){return y[0]&&y[0].type=="plotly"?0:y[0]&&y[0].type=="bokeh"?1:y[0]&&y[0].type=="matplotlib"?2:3}return Kn=b(di),v=g[Kn]=m[Kn](di),{c(){v.c(),$=sd()},m(y,e){g[Kn].m(y,e),cl(y,$,e),te=!0},p(y,[e]){let n=Kn;Kn=b(y),Kn===n?g[Kn].p(y,e):(ld(),Al(g[n],1,1,()=>{g[n]=null}),cd(),v=g[Kn],v?v.p(y,e):(v=g[Kn]=m[Kn](y),v.c()),Sl(v,1),v.m($.parentNode,$))},i(y){te||(Sl(v),te=!0)},o(y){Al(v),te=!1},d(y){g[Kn].d(y),y&&ul($)}}}const Ed="https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js";function Ld(di,Kn,v){let{value:$}=Kn,{target:te}=Kn,m,g;const b=["https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.4.2.min.js","https://cdn.pydata.org/bokeh/release/bokeh-tables-2.4.2.min.js","https://cdn.pydata.org/bokeh/release/bokeh-gl-2.4.2.min.js","https://cdn.pydata.org/bokeh/release/bokeh-api-2.4.2.min.js"];function y(){return b.map((o,h)=>{const p=document.createElement("script");return p.onload=()=>l(h+1),p.src=o,document.head.appendChild(p),p})}function e(){const o=document.createElement("script");return o.onload=u,o.src=Ed,document.head.appendChild(o),o}function n(){if(!g){g=document.getElementById("plotly.js-style-global");const o=g.cloneNode();te.appendChild(o);for(const h of g.sheet.cssRules)o.sheet.insertRule(h.cssText)}}const t=e();let i=[];const r=[],d=Array(5).fill(0).map((o,h)=>a(h)),l=o=>{$&&$.type=="bokeh"&&r[o]()};function a(o){return new Promise((h,p)=>{r[o]=h})}function u(){l(0),i=y()}Promise.all(d).then(()=>{let o=JSON.parse($.plot);window.Bokeh.embed.embed_item(o,"bokehDiv")}),ud(()=>{if($&&$.type=="plotly"){n();let o=JSON.parse($.plot);wd.react(m,o)}else if($&&$.type=="bokeh"){document.getElementById("bokehDiv").innerHTML="";let o=JSON.parse($.plot);window.Bokeh.embed.embed_item(o,"bokehDiv")}}),fd(()=>{t in document.children&&(document.removeChild(t),i.forEach(o=>document.removeChild(o)))});function f(o){hd[o?"unshift":"push"](()=>{m=o,v(1,m)})}return di.$$set=o=>{"value"in o&&v(0,$=o.value),"target"in o&&v(2,te=o.target)},[$,m,te,f]}class Cd extends Ju{constructor(Kn){super(),Ku(this,Kn,Ld,Sd,Qu,{value:0,target:2})}}function Pd(di){let Kn,v,$,te,m,g;Kn=new bd({props:{show_label:di[5],label:di[4]||"Plot",Icon:Eh}});const b=[di[3]];let y={};for(let e=0;e<b.length;e+=1)y=pd(y,b[e]);return $=new dd({props:y}),m=new Cd({props:{value:di[0],target:di[6]}}),m.$on("change",di[7]),{c(){Mc(Kn.$$.fragment),v=Sh(),Mc($.$$.fragment),te=Sh(),Mc(m.$$.fragment)},m(e,n){Ac(Kn,e,n),cl(e,v,n),Ac($,e,n),cl(e,te,n),Ac(m,e,n),g=!0},p(e,n){const t={};n&32&&(t.show_label=e[5]),n&16&&(t.label=e[4]||"Plot"),Kn.$set(t);const i=n&8?md(b,[gd(e[3])]):{};$.$set(i);const r={};n&1&&(r.value=e[0]),n&64&&(r.target=e[6]),m.$set(r)},i(e){g||(Sl(Kn.$$.fragment,e),Sl($.$$.fragment,e),Sl(m.$$.fragment,e),g=!0)},o(e){Al(Kn.$$.fragment,e),Al($.$$.fragment,e),Al(m.$$.fragment,e),g=!1},d(e){Sc(Kn,e),e&&ul(v),Sc($,e),e&&ul(te),Sc(m,e)}}}function Id(di){let Kn,v;return Kn=new xd({props:{padding:!1,elem_id:di[1],visible:di[2],$$slots:{default:[Pd]},$$scope:{ctx:di}}}),{c(){Mc(Kn.$$.fragment)},m($,te){Ac(Kn,$,te),v=!0},p($,[te]){const m={};te&2&&(m.elem_id=$[1]),te&4&&(m.visible=$[2]),te&377&&(m.$$scope={dirty:te,ctx:$}),Kn.$set(m)},i($){v||(Sl(Kn.$$.fragment,$),v=!0)},o($){Al(Kn.$$.fragment,$),v=!1},d($){Sc(Kn,$)}}}function Od(di,Kn,v){let{value:$=null}=Kn,{elem_id:te=""}=Kn,{visible:m=!0}=Kn,{loading_status:g}=Kn,{label:b}=Kn,{show_label:y}=Kn,{target:e}=Kn;function n(t){vd.call(this,di,t)}return di.$$set=t=>{"value"in t&&v(0,$=t.value),"elem_id"in t&&v(1,te=t.elem_id),"visible"in t&&v(2,m=t.visible),"loading_status"in t&&v(3,g=t.loading_status),"label"in t&&v(4,b=t.label),"show_label"in t&&v(5,y=t.show_label),"target"in t&&v(6,e=t.target)},[$,te,m,g,b,y,e,n]}class zd extends Ju{constructor(Kn){super(),Ku(this,Kn,Od,Id,Qu,{value:0,elem_id:1,visible:2,loading_status:3,label:4,show_label:5,target:6})}}var jd=zd;const Ud=["static"];export{jd as Component,Ud as modes}; 3529//# sourceMappingURL=index.e0bb1a9c.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.